@flarehr/promoted-benefits-admin 0.3.5838 → 0.3.7296

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
- var __defProp=Object.defineProperty,__typeError=t=>{throw TypeError(t)},__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__publicField=(t,e,n)=>__defNormalProp(t,"symbol"!=typeof e?e+"":e,n),__accessCheck=(t,e,n)=>e.has(t)||__typeError("Cannot "+n),__privateGet=(t,e,n)=>(__accessCheck(t,e,"read from private field"),n?n.call(t):e.get(t)),__privateAdd=(t,e,n)=>e.has(t)?__typeError("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),__privateSet=(t,e,n,r)=>(__accessCheck(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),__privateMethod=(t,e,n)=>(__accessCheck(t,e,"access private method"),n),__privateWrapper=(t,e,n,r)=>({set _(r){__privateSet(t,e,r,n)},get _(){return __privateGet(t,e,r)}});!function(){"use strict";var t,e,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,w,b,x,S,k,E,P,T,A,C,R,O,M,F,L,D,V,I,j,B,N,U,G,W,H,$,z,q,K,Y,Q,X,Z,J,tt,et,nt,rt,it,ot,st,at,lt,ut,ct,dt,ht,pt,ft,mt,vt,gt,yt,_t,wt,bt,xt,St,kt,Et,Pt,Tt,At,Ct={},Rt=[],Ot=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mt=Array.isArray;function Ft(t,e){for(var n in e)t[n]=e[n];return t}function Lt(t){var e=t.parentNode;e&&e.removeChild(t)}function Dt(t,e,n){var r,i,o,s={};for(o in e)"key"==o?r=e[o]:"ref"==o?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?yt.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===s[o]&&(s[o]=t.defaultProps[o]);return Vt(t,s,r,i,null)}function Vt(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++wt:i,__i:-1,__u:0};return null==i&&null!=_t.vnode&&_t.vnode(o),o}function It(){return{current:null}}function jt(t){return t.children}function Bt(t,e){this.props=t,this.context=e}function Nt(t,e){if(null==e)return t.__?Nt(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?Nt(t):null}function Ut(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return Ut(t)}}function Gt(t){(!t.__d&&(t.__d=!0)&&bt.push(t)&&!Wt.__r++||xt!==_t.debounceRendering)&&((xt=_t.debounceRendering)||St)(Wt)}function Wt(){var t,e,n,r,i,o,s,a;for(bt.sort(kt);t=bt.shift();)t.__d&&(e=bt.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=Ft({},i)).__v=i.__v+1,_t.vnode&&_t.vnode(r),Xt(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,null==o?Nt(i):o,!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Zt(s,r,a),r.__e!=o&&Ut(r)),bt.length>e&&bt.sort(kt));Wt.__r=0}function Ht(t,e,n,r,i,o,s,a,l,u,c){var d,h,p,f,m,v=r&&r.__k||Rt,g=e.length;for(n.__d=l,function(t,e,n){var r,i,o,s,a,l=e.length,u=n.length,c=u,d=0;for(t.__k=[],r=0;r<l;r++)s=r+d,null!=(i=t.__k[r]=null==(i=e[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Vt(null,i,null,null,null):Mt(i)?Vt(jt,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Vt(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,a=qt(i,n,s,c),i.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:a>s?c>l-s?d+=a-s:d--:a<s&&(a==s-d?d-=a-s:d++),a!==r+d&&(i.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=Nt(o)),te(o,o,!1),n[s]=null,c--);if(c)for(r=0;r<u;r++)null!=(o=n[r])&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=Nt(o)),te(o,o))}(n,e,v),l=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?Ct:v[p.__i]||Ct,p.__i=d,Xt(t,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Jt(h.ref,null,p),c.push(p.ref,p.__c||f,p)),null==m&&null!=f&&(m=f),65536&p.__u||h.__k===p.__k?l=$t(p,l,t):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:f&&(l=f.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=m}function $t(t,e,n){var r,i;if("function"==typeof t.type){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=$t(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Nt(t)),n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function zt(t,e){return e=e||[],null==t||"boolean"==typeof t||(Mt(t)?t.some((function(t){zt(t,e)})):e.push(t)),e}function qt(t,e,n,r){var i=t.key,o=t.type,s=n-1,a=n+1,l=e[n];if(null===l||l&&i==l.key&&o===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<e.length;){if(s>=0){if((l=e[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(a<e.length){if((l=e[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a++}}return-1}function Kt(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||Ot.test(e)?n:n+"px"}function Yt(t,e,n,r,i){var o;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Kt(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Kt(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Et,t.addEventListener(e,o?Tt:Pt,o)):t.removeEventListener(e,o?Tt:Pt,o);else{if("http://www.w3.org/2000/svg"==i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function Qt(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e.t)e.t=Et++;else if(e.t<n.u)return;return n(_t.event?_t.event(e):e)}}}function Xt(t,e,n,r,i,o,s,a,l,u){var c,d,h,p,f,m,v,g,y,_,w,b,x,S,k,E,P=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=_t.__b)&&c(e);t:if("function"==typeof P)try{if(g=e.props,y="prototype"in P&&P.prototype.render,_=(c=P.contextType)&&r[c.__c],w=c?_?_.props.value:c.__:r,n.__c?v=(d=e.__c=n.__c).__=d.__E:(y?e.__c=d=new P(g,w):(e.__c=d=new Bt(g,w),d.constructor=P,d.render=ee),_&&_.sub(d),d.props=g,d.state||(d.state={}),d.context=w,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),y&&null==d.__s&&(d.__s=d.state),y&&null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Ft({},d.__s)),Ft(d.__s,P.getDerivedStateFromProps(g,d.__s))),p=d.props,f=d.state,d.__v=e,h)y&&null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),y&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(y&&null==P.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,w),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,w)||e.__v===n.__v)){for(e.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,w),y&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,m)}))}if(d.context=w,d.props=g,d.__P=t,d.__e=!1,x=_t.__r,S=0,y){for(d.state=d.__s,d.__d=!1,x&&x(e),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,x&&x(e),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(r=Ft(Ft({},r),d.getChildContext())),y&&!h&&null!=d.getSnapshotBeforeUpdate&&(m=d.getSnapshotBeforeUpdate(p,f)),Ht(t,Mt(E=null!=c&&c.type===jt&&null==c.key?c.props.children:c)?E:[E],e,n,r,i,o,s,a,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(T){if(e.__v=null,l||null!=o){for(e.__u|=l?160:32;a&&8===a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else e.__e=n.__e,e.__k=n.__k;_t.__e(T,e,n)}else null==o&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=function(t,e,n,r,i,o,s,a,l){var u,c,d,h,p,f,m,v=n.props,g=e.props,y=e.type;if("svg"===y?i="http://www.w3.org/2000/svg":"math"===y?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!y&&(y?p.localName===y:3===p.nodeType)){t=p,o[u]=null;break}if(null==t){if(null===y)return document.createTextNode(g);t=document.createElementNS(i,y,g.is&&g),o=null,a=!1}if(null===y)v===g||a&&t.data===g||(t.data=g);else{if(o=o&&yt.call(t.childNodes),v=n.props||Ct,!a&&null!=o)for(v={},u=0;u<t.attributes.length;u++)v[(p=t.attributes[u]).name]=p.value;for(u in v)if(p=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)d=p;else if("key"!==u&&!(u in g)){if("value"==u&&"defaultValue"in g||"checked"==u&&"defaultChecked"in g)continue;Yt(t,u,null,p,i)}for(u in g)p=g[u],"children"==u?h=p:"dangerouslySetInnerHTML"==u?c=p:"value"==u?f=p:"checked"==u?m=p:"key"===u||a&&"function"!=typeof p||v[u]===p||Yt(t,u,p,v[u],i);if(c)a||d&&(c.__html===d.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(d&&(t.innerHTML=""),Ht(t,Mt(h)?h:[h],e,n,r,"foreignObject"===y?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Nt(n,0),a,l),null!=o)for(u=o.length;u--;)null!=o[u]&&Lt(o[u]);a||(u="value",void 0!==f&&(f!==t[u]||"progress"===y&&!f||"option"===y&&f!==v[u])&&Yt(t,u,f,v[u],i),u="checked",void 0!==m&&m!==t[u]&&Yt(t,u,m,v[u],i))}return t}(n.__e,e,n,r,i,o,s,l,u);(c=_t.diffed)&&c(e)}function Zt(t,e,n){e.__d=void 0;for(var r=0;r<n.length;r++)Jt(n[r],n[++r],n[++r]);_t.__c&&_t.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(n){_t.__e(n,e.__v)}}))}function Jt(t,e,n){try{if("function"==typeof t){var r="function"==typeof t.__u;r&&t.__u(),r&&null==e||(t.__u=t(e))}else t.current=e}catch(i){_t.__e(i,n)}}function te(t,e,n){var r,i;if(_t.unmount&&_t.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Jt(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){_t.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&te(r[i],e,n||"function"!=typeof t.type);n||null==t.__e||Lt(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function ee(t,e,n){return this.constructor(t,n)}function ne(t,e,n){var r,i,o,s;_t.__&&_t.__(t,e),i=(r="function"==typeof n)?null:n&&n.__k||e.__k,o=[],s=[],Xt(e,t=(!r&&n||e).__k=Dt(jt,null,[t]),i||Ct,Ct,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?yt.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Zt(o,t,s)}function re(t,e){ne(t,e,re)}function ie(t,e,n){var r,i,o,s,a=Ft({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==o?r=e[o]:"ref"==o?i=e[o]:a[o]=void 0===e[o]&&void 0!==s?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?yt.call(arguments,2):n),Vt(t.type,a,r||t.key,i||t.ref,null)}function oe(t,e){var n={__c:e="__cC"+At++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,Gt(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n&&n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}function se(){return(se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}yt=Rt.slice,_t={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},wt=0,Bt.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Ft({},this.state),"function"==typeof t&&(t=t(Ft({},n),this.props)),t&&Ft(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),Gt(this))},Bt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Gt(this))},Bt.prototype.render=jt,bt=[],St="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kt=function(t,e){return t.__v.__b-e.__v.__b},Wt.__r=0,Et=0,Pt=Qt(!1),Tt=Qt(!0),At=0;var ae=["context","children"];function le(t){return this.getChildContext=function(){return t.context},ie(t.children,function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}(t,ae))}function ue(){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=Dt(le,se({},this._props,{context:t.detail.context}),function t(e,n){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;var r=[],i={},o=0,s=e.attributes,a=e.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[ce(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=t(a[o],null),u=a[o].slot;u?i[u]=Dt(pe,{name:u},l):r[o]=l}var c=n?Dt(pe,null,r):r;return Dt(n||e.nodeName.toLowerCase(),i,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?re:ne)(this._vdom,this._root)}function ce(t){return t.replace(/-(\w)/g,(function(t,e){return e?e.toUpperCase():""}))}function de(t,e,n){if(this._vdom){var r={};r[t]=n=null==n?void 0:n,r[ce(t)]=n,this._vdom=ie(this._vdom,r),ne(this._vdom,this._root)}}function he(){ne(this._vdom=null,this._root)}function pe(t,e){var n=this;return Dt("slot",se({},t,{ref:function(t){t?(n.ref=t,n._listener||(n._listener=function(t){t.stopPropagation(),t.detail.context=e},t.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}var fe=function(){function t(t){var e=this;this._insertTag=function(t){var n;n=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,n),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{n.insertRule(t,n.cssRules.length)}catch(Ty){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)})),this.tags=[],this.ctr=0},t}(),me="-ms-",ve="-moz-",ge="-webkit-",ye="comm",_e="rule",we="decl",be="@keyframes",xe=Math.abs,Se=String.fromCharCode,ke=Object.assign;function Ee(t){return t.trim()}function Pe(t,e,n){return t.replace(e,n)}function Te(t,e){return t.indexOf(e)}function Ae(t,e){return 0|t.charCodeAt(e)}function Ce(t,e,n){return t.slice(e,n)}function Re(t){return t.length}function Oe(t){return t.length}function Me(t,e){return e.push(t),t}var Fe=1,Le=1,De=0,Ve=0,Ie=0,je="";function Be(t,e,n,r,i,o,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Fe,column:Le,length:s,return:""}}function Ne(t,e){return ke(Be("",null,null,"",null,null,0),t,{length:-t.length},e)}function Ue(){return Ie=Ve<De?Ae(je,Ve++):0,Le++,10===Ie&&(Le=1,Fe++),Ie}function Ge(){return Ae(je,Ve)}function We(){return Ve}function He(t,e){return Ce(je,t,e)}function $e(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ze(t){return Fe=Le=1,De=Re(je=t),Ve=0,[]}function qe(t){return je="",t}function Ke(t){return Ee(He(Ve-1,Xe(91===t?t+2:40===t?t+1:t)))}function Ye(t){for(;(Ie=Ge())&&Ie<33;)Ue();return $e(t)>2||$e(Ie)>3?"":" "}function Qe(t,e){for(;--e&&Ue()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return He(t,We()+(e<6&&32==Ge()&&32==Ue()))}function Xe(t){for(;Ue();)switch(Ie){case t:return Ve;case 34:case 39:34!==t&&39!==t&&Xe(Ie);break;case 40:41===t&&Xe(t);break;case 92:Ue()}return Ve}function Ze(t,e){for(;Ue()&&t+Ie!==57&&(t+Ie!==84||47!==Ge()););return"/*"+He(e,Ve-1)+"*"+Se(47===t?t:Ue())}function Je(t){for(;!$e(Ge());)Ue();return He(t,Ve)}function tn(t){return qe(en("",null,null,null,[""],t=ze(t),0,[0],t))}function en(t,e,n,r,i,o,s,a,l){for(var u=0,c=0,d=s,h=0,p=0,f=0,m=1,v=1,g=1,y=0,_="",w=i,b=o,x=r,S=_;v;)switch(f=y,y=Ue()){case 40:if(108!=f&&58==Ae(S,d-1)){-1!=Te(S+=Pe(Ke(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=Ke(y);break;case 9:case 10:case 13:case 32:S+=Ye(f);break;case 92:S+=Qe(We()-1,7);continue;case 47:switch(Ge()){case 42:case 47:Me(rn(Ze(Ue(),We()),e,n),l);break;default:S+="/"}break;case 123*m:a[u++]=Re(S)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(S=Pe(S,/\f/g,"")),p>0&&Re(S)-d&&Me(p>32?on(S+";",r,n,d-1):on(Pe(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Me(x=nn(S,e,n,u,c,i,a,_,w=[],b=[],d),o),123===y)if(0===c)en(S,e,x,x,w,o,d,a,b);else switch(99===h&&110===Ae(S,3)?100:h){case 100:case 108:case 109:case 115:en(t,x,x,r&&Me(nn(t,x,x,0,0,i,a,_,i,w=[],d),b),i,b,d,a,r?w:b);break;default:en(S,x,x,x,[""],b,0,a,b)}}u=c=p=0,m=g=1,_=S="",d=s;break;case 58:d=1+Re(S),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(Ie=Ve>0?Ae(je,--Ve):0,Le--,10===Ie&&(Le=1,Fe--),Ie))continue;switch(S+=Se(y),y*m){case 38:g=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(Re(S)-1)*g,g=1;break;case 64:45===Ge()&&(S+=Ke(Ue())),h=Ge(),c=d=Re(_=S+=Je(We())),y++;break;case 45:45===f&&2==Re(S)&&(m=0)}}return o}function nn(t,e,n,r,i,o,s,a,l,u,c){for(var d=i-1,h=0===i?o:[""],p=Oe(h),f=0,m=0,v=0;f<r;++f)for(var g=0,y=Ce(t,d+1,d=xe(m=s[f])),_=t;g<p;++g)(_=Ee(m>0?h[g]+" "+y:Pe(y,/&\f/g,h[g])))&&(l[v++]=_);return Be(t,e,n,0===i?_e:a,l,u,c)}function rn(t,e,n){return Be(t,e,n,ye,Se(Ie),Ce(t,2,-2),0)}function on(t,e,n,r){return Be(t,e,n,we,Ce(t,0,r),Ce(t,r+1,-1),r)}function sn(t,e){for(var n="",r=Oe(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function an(t,e,n,r){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case we:return t.return=t.return||t.value;case ye:return"";case be:return t.return=t.value+"{"+sn(t.children,r)+"}";case _e:t.value=t.props.join(",")}return Re(n=sn(t.children,r))?t.return=t.value+"{"+n+"}":""}function ln(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}var un=function(t,e,n){for(var r=0,i=0;r=i,i=Ge(),38===r&&12===i&&(e[n]=1),!$e(i);)Ue();return He(t,Ve)},cn=function(t,e){return qe(function(t,e){var n=-1,r=44;do{switch($e(r)){case 0:38===r&&12===Ge()&&(e[n]=1),t[n]+=un(Ve-1,e,n);break;case 2:t[n]+=Ke(r);break;case 4:if(44===r){t[++n]=58===Ge()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=Se(r)}}while(r=Ue());return t}(ze(t),e))},dn=new WeakMap,hn=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||dn.get(n))&&!r){dn.set(t,!0);for(var i=[],o=cn(e,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)t.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},pn=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function fn(t,e){switch(function(t,e){return 45^Ae(t,0)?(((e<<2^Ae(t,0))<<2^Ae(t,1))<<2^Ae(t,2))<<2^Ae(t,3):0}(t,e)){case 5103:return ge+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ge+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return ge+t+ve+t+me+t+t;case 6828:case 4268:return ge+t+me+t+t;case 6165:return ge+t+me+"flex-"+t+t;case 5187:return ge+t+Pe(t,/(\w+).+(:[^]+)/,ge+"box-$1$2"+me+"flex-$1$2")+t;case 5443:return ge+t+me+"flex-item-"+Pe(t,/flex-|-self/,"")+t;case 4675:return ge+t+me+"flex-line-pack"+Pe(t,/align-content|flex-|-self/,"")+t;case 5548:return ge+t+me+Pe(t,"shrink","negative")+t;case 5292:return ge+t+me+Pe(t,"basis","preferred-size")+t;case 6060:return ge+"box-"+Pe(t,"-grow","")+ge+t+me+Pe(t,"grow","positive")+t;case 4554:return ge+Pe(t,/([^-])(transform)/g,"$1"+ge+"$2")+t;case 6187:return Pe(Pe(Pe(t,/(zoom-|grab)/,ge+"$1"),/(image-set)/,ge+"$1"),t,"")+t;case 5495:case 3959:return Pe(t,/(image-set\([^]*)/,ge+"$1$`$1");case 4968:return Pe(Pe(t,/(.+:)(flex-)?(.*)/,ge+"box-pack:$3"+me+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ge+t+t;case 4095:case 3583:case 4068:case 2532:return Pe(t,/(.+)-inline(.+)/,ge+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Re(t)-1-e>6)switch(Ae(t,e+1)){case 109:if(45!==Ae(t,e+4))break;case 102:return Pe(t,/(.+:)(.+)-([^]+)/,"$1"+ge+"$2-$3$1"+ve+(108==Ae(t,e+3)?"$3":"$2-$3"))+t;case 115:return~Te(t,"stretch")?fn(Pe(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==Ae(t,e+1))break;case 6444:switch(Ae(t,Re(t)-3-(~Te(t,"!important")&&10))){case 107:return Pe(t,":",":"+ge)+t;case 101:return Pe(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ge+(45===Ae(t,14)?"inline-":"")+"box$3$1"+ge+"$2$3$1"+me+"$2box$3")+t}break;case 5936:switch(Ae(t,e+11)){case 114:return ge+t+me+Pe(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ge+t+me+Pe(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ge+t+me+Pe(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return ge+t+me+t+t}return t}var mn,vn,gn,yn,_n=[function(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case we:t.return=fn(t.value,t.length);break;case be:return sn([Ne(t,{value:Pe(t.value,"@","@"+ge)})],r);case _e:if(t.length)return function(t,e){return t.map(e).join("")}(t.props,(function(e){switch(function(t,e){return(t=e.exec(t))?t[0]:t}(e,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return sn([Ne(t,{props:[Pe(e,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return sn([Ne(t,{props:[Pe(e,/:(plac\w+)/,":"+ge+"input-$1")]}),Ne(t,{props:[Pe(e,/:(plac\w+)/,":-moz-$1")]}),Ne(t,{props:[Pe(e,/:(plac\w+)/,me+"input-$1")]})],r)}return""}))}}],wn=function(t){var e=t.key;if("css"===e){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var r,i,o=t.stylisPlugins||_n,s={},a=[];r=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;n<e.length;n++)s[e[n]]=!0;a.push(t)}));var l,u,c,d,h=[an,(d=function(t){l.insert(t)},function(t){t.root||(t=t.return)&&d(t)})],p=(u=[hn,pn].concat(o,h),c=Oe(u),function(t,e,n,r){for(var i="",o=0;o<c;o++)i+=u[o](t,e,n,r)||"";return i});i=function(t,e,n,r){l=n,sn(tn(t?t+"{"+e.styles+"}":e.styles),p),r&&(f.inserted[e.name]=!0)};var f={key:e,sheet:new fe({key:e,container:r,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(a),f},bn=0,xn=[],Sn=_t,kn=Sn.__b,En=Sn.__r,Pn=Sn.diffed,Tn=Sn.__c,An=Sn.unmount,Cn=Sn.__;function Rn(t,e){Sn.__h&&Sn.__h(vn,t,bn||e),bn=0;var n=vn.__H||(vn.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function On(t){return bn=1,Mn(Kn,t)}function Mn(t,e,n){var r=Rn(mn++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Kn(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=vn,!vn.u)){var i=function(t,e,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(t){return!!t.__c}));if(i.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var s=!1;return i.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&r.__c.props===t)&&(!o||o.call(this,t,e,n))};vn.u=!0;var o=vn.shouldComponentUpdate,s=vn.componentWillUpdate;vn.componentWillUpdate=function(t,e,n){if(this.__e){var r=o;o=void 0,i(t,e,n),o=r}s&&s.call(this,t,e,n)},vn.shouldComponentUpdate=i}return r.__N||r.__}function Fn(t,e){var n=Rn(mn++,3);!Sn.__s&&qn(n.__H,e)&&(n.__=t,n.i=e,vn.__H.__h.push(n))}function Ln(t,e){var n=Rn(mn++,4);!Sn.__s&&qn(n.__H,e)&&(n.__=t,n.i=e,vn.__h.push(n))}function Dn(t){return bn=5,In((function(){return{current:t}}),[])}function Vn(t,e,n){bn=6,Ln((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function In(t,e){var n=Rn(mn++,7);return qn(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function jn(t,e){return bn=8,In((function(){return t}),e)}function Bn(t){var e=vn.context[t.__c],n=Rn(mn++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(vn)),e.props.value):t.__}function Nn(t,e){Sn.useDebugValue&&Sn.useDebugValue(e?e(t):t)}function Un(){var t=Rn(mn++,11);if(!t.__){for(var e=vn.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Gn(){for(var t;t=xn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach($n),t.__H.__h.forEach(zn),t.__H.__h=[]}catch(O_){t.__H.__h=[],Sn.__e(O_,t.__v)}}Sn.__b=function(t){vn=null,kn&&kn(t)},Sn.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Cn&&Cn(t,e)},Sn.__r=function(t){En&&En(t),mn=0;var e=(vn=t.__c).__H;e&&(gn===vn?(e.__h=[],vn.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0}))):(e.__h.forEach($n),e.__h.forEach(zn),e.__h=[],mn=0)),gn=vn},Sn.diffed=function(t){Pn&&Pn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==xn.push(e)&&yn===Sn.requestAnimationFrame||((yn=Sn.requestAnimationFrame)||Hn)(Gn)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.i=void 0}))),gn=vn=null},Sn.__c=function(t,e){e.some((function(t){try{t.__h.forEach($n),t.__h=t.__h.filter((function(t){return!t.__||zn(t)}))}catch(c_){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Sn.__e(c_,t.__v)}})),Tn&&Tn(t,e)},Sn.unmount=function(t){An&&An(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{$n(t)}catch(n){e=n}})),n.__H=void 0,e&&Sn.__e(e,n.__v))};var Wn="function"==typeof requestAnimationFrame;function Hn(t){var e,n=function(){clearTimeout(r),Wn&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Wn&&(e=requestAnimationFrame(n))}function $n(t){var e=vn,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),vn=e}function zn(t){var e=vn;t.__c=t.__(),vn=e}function qn(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function Kn(t,e){return"function"==typeof e?e(t):e}function Yn(t,e){for(var n in e)t[n]=e[n];return t}function Qn(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function Xn(t,e){this.props=t,this.context=e}function Zn(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:Qn(this.props,t)}function r(e){return this.shouldComponentUpdate=n,Dt(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Xn.prototype=new Bt).isPureReactComponent=!0,Xn.prototype.shouldComponentUpdate=function(t,e){return Qn(this.props,t)||Qn(this.state,e)};var Jn=_t.__b;_t.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Jn&&Jn(t)};var tr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function er(t){function e(e){var n=Yn({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=tr,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var nr=function(t,e){return null==t?null:zt(zt(t).map(e))},rr={map:nr,forEach:nr,count:function(t){return t?zt(t).length:0},only:function(t){var e=zt(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:zt},ir=_t.__e;_t.__e=function(t,e,n,r){if(t.then)for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e);ir(t,e,n,r)};var or=_t.unmount;function sr(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=Yn({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return sr(t,e,n)}))),t}function ar(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return ar(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function lr(){this.__u=0,this.t=null,this.__b=null}function ur(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function cr(t){var e,n,r;function i(i){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return Dt(n,i)}return i.displayName="Lazy",i.__f=!0,i}function dr(){this.u=null,this.o=null}_t.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),or&&or(t)},(lr.prototype=new Bt).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=ur(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=ar(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},lr.prototype.componentWillUnmount=function(){this.t=[]},lr.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=sr(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&Dt(jt,null,t.fallback);return i&&(i.__u&=-33),[Dt(jt,null,e.__a?null:t.children),i]};var hr=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function pr(t){return this.getChildContext=function(){return t.context},t.children}function fr(t){var e=this,n=t.i;e.componentWillUnmount=function(){ne(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),ne(Dt(pr,{context:e.context},t.__v),e.l)}function mr(t,e){var n=Dt(fr,{__v:t,i:e});return n.containerInfo=e,n}(dr.prototype=new Bt).__a=function(t){var e=this,n=ur(e.__v),r=e.o.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),hr(e,t,r)):i()};n?n(o):o()}},dr.prototype.render=function(t){this.u=null,this.o=new Map;var e=zt(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},dr.prototype.componentDidUpdate=dr.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){hr(t,n,e)}))};var vr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,gr=/^(?: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]/,yr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,_r=/[A-Z0-9]/g,wr="undefined"!=typeof document,br=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function xr(t,e,n){return null==e.__k&&(e.textContent=""),ne(t,e),"function"==typeof n&&n(),t?t.__c:null}function Sr(t,e,n){return re(t,e),"function"==typeof n&&n(),t?t.__c:null}Bt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(Bt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var kr=_t.event;function Er(){}function Pr(){return this.cancelBubble}function Tr(){return this.defaultPrevented}_t.event=function(t){return kr&&(t=kr(t)),t.persist=Er,t.isPropagationStopped=Pr,t.isDefaultPrevented=Tr,t.nativeEvent=t};var Ar,Cr={enumerable:!1,configurable:!0,get:function(){return this.class}},Rr=_t.vnode;_t.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={},i=-1===n.indexOf("-");for(var o in e){var s=e[o];if(!("value"===o&&"defaultValue"in e&&null==s||wr&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===s?s="":"translate"===a&&"no"===s?s=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||br(e.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":yr.test(o)&&(o=a):a=o="oninput":i&&gr.test(o)?o=o.replace(_r,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=zt(e.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=zt(e.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",Cr)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=vr,Rr&&Rr(t)};var Or=_t.__r;_t.__r=function(t){Or&&Or(t),Ar=t.__c};var Mr=_t.diffed;_t.diffed=function(t){Mr&&Mr(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value),Ar=null};var Fr={ReactCurrentDispatcher:{current:{readContext:function(t){return Ar.__n[t.__c].props.value},useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Fn,useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Mn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr}}};function Lr(t){return Dt.bind(null,t)}function Dr(t){return!!t&&t.$$typeof===vr}function Vr(t){return Dr(t)&&t.type===jt}function Ir(t){return!!t&&!!t.displayName&&("string"==typeof t.displayName||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function jr(t){return Dr(t)?ie.apply(null,arguments):t}function Br(t){return!!t.__k&&(ne(null,t),!0)}function Nr(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ur=function(t,e){return t(e)},Gr=function(t,e){return t(e)},Wr=jt;function Hr(t){t()}function $r(t){return t}function zr(){return[!1,Hr]}var qr=Ln,Kr=Dr;function Yr(t,e){var n=e(),r=On({h:{__:n,v:e}}),i=r[0].h,o=r[1];return Ln((function(){i.__=n,i.v=e,Qr(i)&&o({h:i})}),[t,n,e]),Fn((function(){return Qr(i)&&o({h:i}),t((function(){Qr(i)&&o({h:i})}))}),[t]),n}function Qr(t){var e,n,r=t.v,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(s){return!0}}var Xr={useState:On,useId:Un,useReducer:Mn,useEffect:Fn,useLayoutEffect:Ln,useInsertionEffect:qr,useTransition:zr,useDeferredValue:$r,useSyncExternalStore:Yr,startTransition:Hr,useRef:Dn,useImperativeHandle:Vn,useMemo:In,useCallback:jn,useContext:Bn,useDebugValue:Nn,version:"17.0.2",Children:rr,render:xr,hydrate:Sr,unmountComponentAtNode:Br,createPortal:mr,createElement:Dt,createContext:oe,createFactory:Lr,cloneElement:jr,createRef:It,Fragment:jt,isValidElement:Dr,isElement:Kr,isFragment:Vr,isMemo:Ir,findDOMNode:Nr,Component:Bt,PureComponent:Xn,memo:Zn,forwardRef:er,flushSync:Gr,unstable_batchedUpdates:Ur,StrictMode:Wr,Suspense:lr,SuspenseList:dr,lazy:cr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fr};const Zr=Object.freeze(Object.defineProperty({__proto__:null,Children:rr,Component:Bt,Fragment:jt,PureComponent:Xn,StrictMode:Wr,Suspense:lr,SuspenseList:dr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fr,cloneElement:jr,createContext:oe,createElement:Dt,createFactory:Lr,createPortal:mr,createRef:It,default:Xr,findDOMNode:Nr,flushSync:Gr,forwardRef:er,hydrate:Sr,isElement:Kr,isFragment:Vr,isMemo:Ir,isValidElement:Dr,lazy:cr,memo:Zn,render:xr,startTransition:Hr,unmountComponentAtNode:Br,unstable_batchedUpdates:Ur,useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Fn,useErrorBoundary:function(t){var e=Rn(mn++,10),n=On();return e.__=t,vn.componentDidCatch||(vn.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]},useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Mn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));function Jr(){return Jr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jr.apply(null,arguments)}var ti={exports:{}},ei={},ni="function"==typeof Symbol&&Symbol.for,ri=ni?Symbol.for("react.element"):60103,ii=ni?Symbol.for("react.portal"):60106,oi=ni?Symbol.for("react.fragment"):60107,si=ni?Symbol.for("react.strict_mode"):60108,ai=ni?Symbol.for("react.profiler"):60114,li=ni?Symbol.for("react.provider"):60109,ui=ni?Symbol.for("react.context"):60110,ci=ni?Symbol.for("react.async_mode"):60111,di=ni?Symbol.for("react.concurrent_mode"):60111,hi=ni?Symbol.for("react.forward_ref"):60112,pi=ni?Symbol.for("react.suspense"):60113,fi=ni?Symbol.for("react.suspense_list"):60120,mi=ni?Symbol.for("react.memo"):60115,vi=ni?Symbol.for("react.lazy"):60116,gi=ni?Symbol.for("react.block"):60121,yi=ni?Symbol.for("react.fundamental"):60117,_i=ni?Symbol.for("react.responder"):60118,wi=ni?Symbol.for("react.scope"):60119;function bi(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case ri:switch(t=t.type){case ci:case di:case oi:case ai:case si:case pi:return t;default:switch(t=t&&t.$$typeof){case ui:case hi:case vi:case mi:case li:return t;default:return e}}case ii:return e}}}function xi(t){return bi(t)===di}ei.AsyncMode=ci,ei.ConcurrentMode=di,ei.ContextConsumer=ui,ei.ContextProvider=li,ei.Element=ri,ei.ForwardRef=hi,ei.Fragment=oi,ei.Lazy=vi,ei.Memo=mi,ei.Portal=ii,ei.Profiler=ai,ei.StrictMode=si,ei.Suspense=pi,ei.isAsyncMode=function(t){return xi(t)||bi(t)===ci},ei.isConcurrentMode=xi,ei.isContextConsumer=function(t){return bi(t)===ui},ei.isContextProvider=function(t){return bi(t)===li},ei.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===ri},ei.isForwardRef=function(t){return bi(t)===hi},ei.isFragment=function(t){return bi(t)===oi},ei.isLazy=function(t){return bi(t)===vi},ei.isMemo=function(t){return bi(t)===mi},ei.isPortal=function(t){return bi(t)===ii},ei.isProfiler=function(t){return bi(t)===ai},ei.isStrictMode=function(t){return bi(t)===si},ei.isSuspense=function(t){return bi(t)===pi},ei.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===oi||t===di||t===ai||t===si||t===pi||t===fi||"object"==typeof t&&null!==t&&(t.$$typeof===vi||t.$$typeof===mi||t.$$typeof===li||t.$$typeof===ui||t.$$typeof===hi||t.$$typeof===yi||t.$$typeof===_i||t.$$typeof===wi||t.$$typeof===gi)},ei.typeOf=bi,ti.exports=ei;var Si=ti.exports,ki={};ki[Si.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ki[Si.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Ei(t,e,n){var r="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]+";"):r+=n+" "})),r}var Pi=function(t,e,n){var r=t.key+"-"+e.name;!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles)},Ti=function(t,e,n){Pi(t,e,n);var r=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+r:"",i,t.sheet,!0),i=i.next}while(void 0!==i)}};var Ai={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ci=!1,Ri=/[A-Z]|^ms/g,Oi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Mi=function(t){return 45===t.charCodeAt(1)},Fi=function(t){return null!=t&&"boolean"!=typeof t},Li=ln((function(t){return Mi(t)?t:t.replace(Ri,"-$&").toLowerCase()})),Di=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(Oi,(function(t,e,n){return ji={name:e,styles:n,next:ji},e}))}return 1===Ai[t]||Mi(t)||"number"!=typeof e||0===e?e:e+"px"},Vi="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ii(t,e,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return ji={name:i.name,styles:i.styles,next:ji},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)ji={name:s.name,styles:s.styles,next:ji},s=s.next;return o.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ii(t,e,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s){var a=s;null!=e&&void 0!==e[a]?r+=o+"{"+e[a]+"}":Fi(a)&&(r+=Li(o)+":"+Di(o,a)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&Ci)throw new Error(Vi);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=e&&void 0!==e[s[0]]){var l=Ii(t,e,s);switch(o){case"animation":case"animationName":r+=Li(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<s.length;u++)Fi(s[u])&&(r+=Li(o)+":"+Di(o,s[u])+";")}}return r}(t,e,n);case"function":if(void 0!==t){var a=ji,l=n(t);return ji=a,Ii(t,e,l)}}var u=n;if(null==e)return u;var c=e[u];return void 0!==c?c:u}var ji,Bi=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function Ni(t,e,n){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var r=!0,i="";ji=void 0;var o=t[0];null==o||void 0===o.raw?(r=!1,i+=Ii(n,e,o)):i+=o[0];for(var s=1;s<t.length;s++){if(i+=Ii(n,e,t[s]),r)i+=o[s]}Bi.lastIndex=0;for(var a,l="";null!==(a=Bi.exec(i));)l+="-"+a[1];var u=function(t){for(var e,n=0,r=0,i=t.length;i>=4;++r,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:ji}}var Ui=!!Zr.useInsertionEffect&&Zr.useInsertionEffect,Gi=Ui||function(t){return t()},Wi=Ui||Ln,Hi=oe("undefined"!=typeof HTMLElement?wn({key:"css"}):null),$i=Hi.Provider,zi=function(t){return er((function(e,n){var r=Bn(Hi);return t(e,r,n)}))},qi=oe({}),Ki={}.hasOwnProperty,Yi="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Qi=function(t,e){var n={};for(var r in e)Ki.call(e,r)&&(n[r]=e[r]);return n[Yi]=t,n},Xi=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return Pi(e,n,r),Gi((function(){return Ti(e,n,r)})),null},Zi=zi((function(t,e,n){var r=t.css;"string"==typeof r&&void 0!==e.registered[r]&&(r=e.registered[r]);var i=t[Yi],o=[r],s="";"string"==typeof t.className?s=Ei(e.registered,o,t.className):null!=t.className&&(s=t.className+" ");var a=Ni(o,void 0,Bn(qi));s+=e.key+"-"+a.name;var l={};for(var u in t)Ki.call(t,u)&&"css"!==u&&u!==Yi&&(l[u]=t[u]);return l.className=s,n&&(l.ref=n),Dt(jt,null,Dt(Xi,{cache:e,serialized:a,isStringTag:"string"==typeof i}),Dt(i,l))})),Ji=zi((function(t,e){var n=Ni([t.styles],void 0,Bn(qi)),r=Dn();return Wi((function(){var t=e.key+"-global",i=new e.sheet.constructor({key:t,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),o=!1,s=document.querySelector('style[data-emotion="'+t+" "+n.name+'"]');return e.sheet.tags.length&&(i.before=e.sheet.tags[0]),null!==s&&(o=!0,s.setAttribute("data-emotion",t),i.hydrate([s])),r.current=[i,o],function(){i.flush()}}),[e]),Wi((function(){var t=r.current,i=t[0];if(t[1])t[1]=!1;else{if(void 0!==n.next&&Ti(e,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}e.insert("",n,i,!1)}}),[e,n.name]),null}));function to(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ni(e)}var eo=0;function no(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)"ref"==a?s=e[a]:l[a]=e[a];var u={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--eo,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return _t.vnode&&_t.vnode(u),u}var ro=jt;function io(t,e,n){return Ki.call(e,"css")?no(Zi,Qi(t,e),n):no(t,e,n)}function oo(t,e,n){return Ki.call(e,"css")?no(Zi,Qi(t,e),n):no(t,e,n)}const so=to({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},":host":{"--fl-color-primary-900":"#000563","--fl-color-primary-800":"#031495","--fl-color-primary-700":"#1033c6","--fl-color-primary-600":"#2e66f7","--fl-color-primary-500":"#5786f8","--fl-color-primary-400":"#88abfa","--fl-color-primary-300":"#b5cbfb","--fl-color-primary-200":"#d6e2fc","--fl-color-primary-100":"#eaf0fe","--fl-color-primary-50":"#f2f6ff","--kit-font-family":"Inter, 'Source Sans Pro', sans-serif",fontFamily:"Inter, 'Source Sans Pro', sans-serif"}}),ao=()=>oo(jt,{children:[io(Ji,{styles:to`
1
+ var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),__accessCheck=(e,t,n)=>t.has(e)||__typeError("Cannot "+n),__privateGet=(e,t,n)=>(__accessCheck(e,t,"read from private field"),n?n.call(e):t.get(e)),__privateAdd=(e,t,n)=>t.has(e)?__typeError("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),__privateSet=(e,t,n,r)=>(__accessCheck(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),__privateMethod=(e,t,n)=>(__accessCheck(e,t,"access private method"),n),__privateWrapper=(e,t,n,r)=>({set _(r){__privateSet(e,t,r,n)},get _(){return __privateGet(e,t,r)}});!function(){"use strict";var e,t,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,w,b,x,S,k,E,P,T,A,C,R,O,F,M,L,D,V,I,j,B,N,U,G,W,H,$,z,q,K,Y,Q,X,Z,J,ee,te,ne,re,ie,oe,se,ae,le,ue,ce,de,he,pe,fe,me,ve,ge,ye,_e,we,be,xe,Se,ke,Ee,Pe,Te,Ae,Ce={},Re=[],Oe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function Me(e,t){for(var n in t)e[n]=t[n];return e}function Le(e){var t=e.parentNode;t&&t.removeChild(e)}function De(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return Ve(e,s,r,i,null)}function Ve(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++we:i,__i:-1,__u:0};return null==i&&null!=_e.vnode&&_e.vnode(o),o}function Ie(){return{current:null}}function je(e){return e.children}function Be(e,t){this.props=e,this.context=t}function Ne(e,t){if(null==t)return e.__?Ne(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Ne(e):null}function Ue(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Ue(e)}}function Ge(e){(!e.__d&&(e.__d=!0)&&be.push(e)&&!We.__r++||xe!==_e.debounceRendering)&&((xe=_e.debounceRendering)||Se)(We)}function We(){var e,t,n,r,i,o,s,a;for(be.sort(ke);e=be.shift();)e.__d&&(t=be.length,r=void 0,o=(i=(n=e).__v).__e,s=[],a=[],n.__P&&((r=Me({},i)).__v=i.__v+1,_e.vnode&&_e.vnode(r),Xe(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,null==o?Ne(i):o,!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Ze(s,r,a),r.__e!=o&&Ue(r)),be.length>t&&be.sort(ke));We.__r=0}function He(e,t,n,r,i,o,s,a,l,u,c){var d,h,p,f,m,v=r&&r.__k||Re,g=t.length;for(n.__d=l,function(e,t,n){var r,i,o,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)s=r+d,null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Ve(null,i,null,null,null):Fe(i)?Ve(je,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Ve(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=qe(i,n,s,c),i.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:a>s?c>l-s?d+=a-s:d--:a<s&&(a==s-d?d-=a-s:d++),a!==r+d&&(i.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Ne(o)),et(o,o,!1),n[s]=null,c--);if(c)for(r=0;r<u;r++)null!=(o=n[r])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Ne(o)),et(o,o))}(n,t,v),l=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?Ce:v[p.__i]||Ce,p.__i=d,Xe(e,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Je(h.ref,null,p),c.push(p.ref,p.__c||f,p)),null==m&&null!=f&&(m=f),65536&p.__u||h.__k===p.__k?l=$e(p,l,e):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:f&&(l=f.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=m}function $e(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=$e(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Ne(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function ze(e,t){return t=t||[],null==e||"boolean"==typeof e||(Fe(e)?e.some((function(e){ze(e,t)})):t.push(e)),t}function qe(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&i==l.key&&o===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a++}}return-1}function Ke(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Oe.test(t)?n:n+"px"}function Ye(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ke(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ke(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Ee,e.addEventListener(t,o?Te:Pe,o)):e.removeEventListener(t,o?Te:Pe,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function Qe(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=Ee++;else if(t.t<n.u)return;return n(_e.event?_e.event(t):t)}}}function Xe(e,t,n,r,i,o,s,a,l,u){var c,d,h,p,f,m,v,g,y,_,w,b,x,S,k,E,P=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(c=_e.__b)&&c(t);e:if("function"==typeof P)try{if(g=t.props,y="prototype"in P&&P.prototype.render,_=(c=P.contextType)&&r[c.__c],w=c?_?_.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:(y?t.__c=d=new P(g,w):(t.__c=d=new Be(g,w),d.constructor=P,d.render=tt),_&&_.sub(d),d.props=g,d.state||(d.state={}),d.context=w,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),y&&null==d.__s&&(d.__s=d.state),y&&null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Me({},d.__s)),Me(d.__s,P.getDerivedStateFromProps(g,d.__s))),p=d.props,f=d.state,d.__v=t,h)y&&null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),y&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(y&&null==P.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,w),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,w)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,w),y&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,m)}))}if(d.context=w,d.props=g,d.__P=e,d.__e=!1,x=_e.__r,S=0,y){for(d.state=d.__s,d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(r=Me(Me({},r),d.getChildContext())),y&&!h&&null!=d.getSnapshotBeforeUpdate&&(m=d.getSnapshotBeforeUpdate(p,f)),He(e,Fe(E=null!=c&&c.type===je&&null==c.key?c.props.children:c)?E:[E],t,n,r,i,o,s,a,l,u),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(T){if(t.__v=null,l||null!=o){for(t.__u|=l?160:32;a&&8===a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else t.__e=n.__e,t.__k=n.__k;_e.__e(T,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a,l){var u,c,d,h,p,f,m,v=n.props,g=t.props,y=t.type;if("svg"===y?i="http://www.w3.org/2000/svg":"math"===y?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!y&&(y?p.localName===y:3===p.nodeType)){e=p,o[u]=null;break}if(null==e){if(null===y)return document.createTextNode(g);e=document.createElementNS(i,y,g.is&&g),o=null,a=!1}if(null===y)v===g||a&&e.data===g||(e.data=g);else{if(o=o&&ye.call(e.childNodes),v=n.props||Ce,!a&&null!=o)for(v={},u=0;u<e.attributes.length;u++)v[(p=e.attributes[u]).name]=p.value;for(u in v)if(p=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)d=p;else if("key"!==u&&!(u in g)){if("value"==u&&"defaultValue"in g||"checked"==u&&"defaultChecked"in g)continue;Ye(e,u,null,p,i)}for(u in g)p=g[u],"children"==u?h=p:"dangerouslySetInnerHTML"==u?c=p:"value"==u?f=p:"checked"==u?m=p:"key"===u||a&&"function"!=typeof p||v[u]===p||Ye(e,u,p,v[u],i);if(c)a||d&&(c.__html===d.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),He(e,Fe(h)?h:[h],t,n,r,"foreignObject"===y?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ne(n,0),a,l),null!=o)for(u=o.length;u--;)null!=o[u]&&Le(o[u]);a||(u="value",void 0!==f&&(f!==e[u]||"progress"===y&&!f||"option"===y&&f!==v[u])&&Ye(e,u,f,v[u],i),u="checked",void 0!==m&&m!==e[u]&&Ye(e,u,m,v[u],i))}return e}(n.__e,t,n,r,i,o,s,l,u);(c=_e.diffed)&&c(t)}function Ze(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Je(n[r],n[++r],n[++r]);_e.__c&&_e.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(n){_e.__e(n,t.__v)}}))}function Je(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(i){_e.__e(i,n)}}function et(e,t,n){var r,i;if(_e.unmount&&_e.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Je(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){_e.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&et(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Le(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function tt(e,t,n){return this.constructor(e,n)}function nt(e,t,n){var r,i,o,s;_e.__&&_e.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],s=[],Xe(t,e=(!r&&n||t).__k=De(je,null,[e]),i||Ce,Ce,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?ye.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),Ze(o,e,s)}function rt(e,t){nt(e,t,rt)}function it(e,t,n){var r,i,o,s,a=Me({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?ye.call(arguments,2):n),Ve(e.type,a,r||e.key,i||e.ref,null)}function ot(e,t){var n={__c:t="__cC"+Ae++,__: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.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Ge(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}function st(){return(st=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}ye=Re.slice,_e={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},we=0,Be.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Me({},this.state),"function"==typeof e&&(e=e(Me({},n),this.props)),e&&Me(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Ge(this))},Be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ge(this))},Be.prototype.render=je,be=[],Se="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ke=function(e,t){return e.__v.__b-t.__v.__b},We.__r=0,Ee=0,Pe=Qe(!1),Te=Qe(!0),Ae=0;var at=["context","children"];function lt(e){return this.getChildContext=function(){return e.context},it(e.children,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,at))}function ut(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=De(lt,st({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[ct(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=e(a[o],null),u=a[o].slot;u?i[u]=De(pt,{name:u},l):r[o]=l}var c=n?De(pt,null,r):r;return De(n||t.nodeName.toLowerCase(),i,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?rt:nt)(this._vdom,this._root)}function ct(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function dt(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[ct(e)]=n,this._vdom=it(this._vdom,r),nt(this._vdom,this._root)}}function ht(){nt(this._vdom=null,this._root)}function pt(e,t){var n=this;return De("slot",st({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}var ft=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(Hy){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),mt="-ms-",vt="-moz-",gt="-webkit-",yt="comm",_t="rule",wt="decl",bt="@keyframes",xt=Math.abs,St=String.fromCharCode,kt=Object.assign;function Et(e){return e.trim()}function Pt(e,t,n){return e.replace(t,n)}function Tt(e,t){return e.indexOf(t)}function At(e,t){return 0|e.charCodeAt(t)}function Ct(e,t,n){return e.slice(t,n)}function Rt(e){return e.length}function Ot(e){return e.length}function Ft(e,t){return t.push(e),e}var Mt=1,Lt=1,Dt=0,Vt=0,It=0,jt="";function Bt(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Mt,column:Lt,length:s,return:""}}function Nt(e,t){return kt(Bt("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ut(){return It=Vt<Dt?At(jt,Vt++):0,Lt++,10===It&&(Lt=1,Mt++),It}function Gt(){return At(jt,Vt)}function Wt(){return Vt}function Ht(e,t){return Ct(jt,e,t)}function $t(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zt(e){return Mt=Lt=1,Dt=Rt(jt=e),Vt=0,[]}function qt(e){return jt="",e}function Kt(e){return Et(Ht(Vt-1,Xt(91===e?e+2:40===e?e+1:e)))}function Yt(e){for(;(It=Gt())&&It<33;)Ut();return $t(e)>2||$t(It)>3?"":" "}function Qt(e,t){for(;--t&&Ut()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return Ht(e,Wt()+(t<6&&32==Gt()&&32==Ut()))}function Xt(e){for(;Ut();)switch(It){case e:return Vt;case 34:case 39:34!==e&&39!==e&&Xt(It);break;case 40:41===e&&Xt(e);break;case 92:Ut()}return Vt}function Zt(e,t){for(;Ut()&&e+It!==57&&(e+It!==84||47!==Gt()););return"/*"+Ht(t,Vt-1)+"*"+St(47===e?e:Ut())}function Jt(e){for(;!$t(Gt());)Ut();return Ht(e,Vt)}function en(e){return qt(tn("",null,null,null,[""],e=zt(e),0,[0],e))}function tn(e,t,n,r,i,o,s,a,l){for(var u=0,c=0,d=s,h=0,p=0,f=0,m=1,v=1,g=1,y=0,_="",w=i,b=o,x=r,S=_;v;)switch(f=y,y=Ut()){case 40:if(108!=f&&58==At(S,d-1)){-1!=Tt(S+=Pt(Kt(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=Kt(y);break;case 9:case 10:case 13:case 32:S+=Yt(f);break;case 92:S+=Qt(Wt()-1,7);continue;case 47:switch(Gt()){case 42:case 47:Ft(rn(Zt(Ut(),Wt()),t,n),l);break;default:S+="/"}break;case 123*m:a[u++]=Rt(S)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(S=Pt(S,/\f/g,"")),p>0&&Rt(S)-d&&Ft(p>32?on(S+";",r,n,d-1):on(Pt(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Ft(x=nn(S,t,n,u,c,i,a,_,w=[],b=[],d),o),123===y)if(0===c)tn(S,t,x,x,w,o,d,a,b);else switch(99===h&&110===At(S,3)?100:h){case 100:case 108:case 109:case 115:tn(e,x,x,r&&Ft(nn(e,x,x,0,0,i,a,_,i,w=[],d),b),i,b,d,a,r?w:b);break;default:tn(S,x,x,x,[""],b,0,a,b)}}u=c=p=0,m=g=1,_=S="",d=s;break;case 58:d=1+Rt(S),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(It=Vt>0?At(jt,--Vt):0,Lt--,10===It&&(Lt=1,Mt--),It))continue;switch(S+=St(y),y*m){case 38:g=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(Rt(S)-1)*g,g=1;break;case 64:45===Gt()&&(S+=Kt(Ut())),h=Gt(),c=d=Rt(_=S+=Jt(Wt())),y++;break;case 45:45===f&&2==Rt(S)&&(m=0)}}return o}function nn(e,t,n,r,i,o,s,a,l,u,c){for(var d=i-1,h=0===i?o:[""],p=Ot(h),f=0,m=0,v=0;f<r;++f)for(var g=0,y=Ct(e,d+1,d=xt(m=s[f])),_=e;g<p;++g)(_=Et(m>0?h[g]+" "+y:Pt(y,/&\f/g,h[g])))&&(l[v++]=_);return Bt(e,t,n,0===i?_t:a,l,u,c)}function rn(e,t,n){return Bt(e,t,n,yt,St(It),Ct(e,2,-2),0)}function on(e,t,n,r){return Bt(e,t,n,wt,Ct(e,0,r),Ct(e,r+1,-1),r)}function sn(e,t){for(var n="",r=Ot(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function an(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case wt:return e.return=e.return||e.value;case yt:return"";case bt:return e.return=e.value+"{"+sn(e.children,r)+"}";case _t:e.value=e.props.join(",")}return Rt(n=sn(e.children,r))?e.return=e.value+"{"+n+"}":""}function ln(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var un=function(e,t,n){for(var r=0,i=0;r=i,i=Gt(),38===r&&12===i&&(t[n]=1),!$t(i);)Ut();return Ht(e,Vt)},cn=function(e,t){return qt(function(e,t){var n=-1,r=44;do{switch($t(r)){case 0:38===r&&12===Gt()&&(t[n]=1),e[n]+=un(Vt-1,t,n);break;case 2:e[n]+=Kt(r);break;case 4:if(44===r){e[++n]=58===Gt()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=St(r)}}while(r=Ut());return e}(zt(e),t))},dn=new WeakMap,hn=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||dn.get(n))&&!r){dn.set(e,!0);for(var i=[],o=cn(t,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},pn=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function fn(e,t){switch(function(e,t){return 45^At(e,0)?(((t<<2^At(e,0))<<2^At(e,1))<<2^At(e,2))<<2^At(e,3):0}(e,t)){case 5103:return gt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return gt+e+vt+e+mt+e+e;case 6828:case 4268:return gt+e+mt+e+e;case 6165:return gt+e+mt+"flex-"+e+e;case 5187:return gt+e+Pt(e,/(\w+).+(:[^]+)/,gt+"box-$1$2"+mt+"flex-$1$2")+e;case 5443:return gt+e+mt+"flex-item-"+Pt(e,/flex-|-self/,"")+e;case 4675:return gt+e+mt+"flex-line-pack"+Pt(e,/align-content|flex-|-self/,"")+e;case 5548:return gt+e+mt+Pt(e,"shrink","negative")+e;case 5292:return gt+e+mt+Pt(e,"basis","preferred-size")+e;case 6060:return gt+"box-"+Pt(e,"-grow","")+gt+e+mt+Pt(e,"grow","positive")+e;case 4554:return gt+Pt(e,/([^-])(transform)/g,"$1"+gt+"$2")+e;case 6187:return Pt(Pt(Pt(e,/(zoom-|grab)/,gt+"$1"),/(image-set)/,gt+"$1"),e,"")+e;case 5495:case 3959:return Pt(e,/(image-set\([^]*)/,gt+"$1$`$1");case 4968:return Pt(Pt(e,/(.+:)(flex-)?(.*)/,gt+"box-pack:$3"+mt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gt+e+e;case 4095:case 3583:case 4068:case 2532:return Pt(e,/(.+)-inline(.+)/,gt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Rt(e)-1-t>6)switch(At(e,t+1)){case 109:if(45!==At(e,t+4))break;case 102:return Pt(e,/(.+:)(.+)-([^]+)/,"$1"+gt+"$2-$3$1"+vt+(108==At(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Tt(e,"stretch")?fn(Pt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==At(e,t+1))break;case 6444:switch(At(e,Rt(e)-3-(~Tt(e,"!important")&&10))){case 107:return Pt(e,":",":"+gt)+e;case 101:return Pt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gt+(45===At(e,14)?"inline-":"")+"box$3$1"+gt+"$2$3$1"+mt+"$2box$3")+e}break;case 5936:switch(At(e,t+11)){case 114:return gt+e+mt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gt+e+mt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gt+e+mt+Pt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gt+e+mt+e+e}return e}var mn,vn,gn,yn,_n=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case wt:e.return=fn(e.value,e.length);break;case bt:return sn([Nt(e,{value:Pt(e.value,"@","@"+gt)})],r);case _t:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return sn([Nt(e,{props:[Pt(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return sn([Nt(e,{props:[Pt(t,/:(plac\w+)/,":"+gt+"input-$1")]}),Nt(e,{props:[Pt(t,/:(plac\w+)/,":-moz-$1")]}),Nt(e,{props:[Pt(t,/:(plac\w+)/,mt+"input-$1")]})],r)}return""}))}}],wn=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,o=e.stylisPlugins||_n,s={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,u,c,d,h=[an,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(u=[hn,pn].concat(o,h),c=Ot(u),function(e,t,n,r){for(var i="",o=0;o<c;o++)i+=u[o](e,t,n,r)||"";return i});i=function(e,t,n,r){l=n,sn(en(e?e+"{"+t.styles+"}":t.styles),p),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new ft({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(a),f},bn=0,xn=[],Sn=_e,kn=Sn.__b,En=Sn.__r,Pn=Sn.diffed,Tn=Sn.__c,An=Sn.unmount,Cn=Sn.__;function Rn(e,t){Sn.__h&&Sn.__h(vn,e,bn||t),bn=0;var n=vn.__H||(vn.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function On(e){return bn=1,Fn(Kn,e)}function Fn(e,t,n){var r=Rn(mn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Kn(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=vn,!vn.u)){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!o||o.call(this,e,t,n);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};vn.u=!0;var o=vn.shouldComponentUpdate,s=vn.componentWillUpdate;vn.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},vn.shouldComponentUpdate=i}return r.__N||r.__}function Mn(e,t){var n=Rn(mn++,3);!Sn.__s&&qn(n.__H,t)&&(n.__=e,n.i=t,vn.__H.__h.push(n))}function Ln(e,t){var n=Rn(mn++,4);!Sn.__s&&qn(n.__H,t)&&(n.__=e,n.i=t,vn.__h.push(n))}function Dn(e){return bn=5,In((function(){return{current:e}}),[])}function Vn(e,t,n){bn=6,Ln((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function In(e,t){var n=Rn(mn++,7);return qn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function jn(e,t){return bn=8,In((function(){return e}),t)}function Bn(e){var t=vn.context[e.__c],n=Rn(mn++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(vn)),t.props.value):e.__}function Nn(e,t){Sn.useDebugValue&&Sn.useDebugValue(t?t(e):e)}function Un(){var e=Rn(mn++,11);if(!e.__){for(var t=vn.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Gn(){for(var e;e=xn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach($n),e.__H.__h.forEach(zn),e.__H.__h=[]}catch(K_){e.__H.__h=[],Sn.__e(K_,e.__v)}}Sn.__b=function(e){vn=null,kn&&kn(e)},Sn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Cn&&Cn(e,t)},Sn.__r=function(e){En&&En(e),mn=0;var t=(vn=e.__c).__H;t&&(gn===vn?(t.__h=[],vn.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach($n),t.__h.forEach(zn),t.__h=[],mn=0)),gn=vn},Sn.diffed=function(e){Pn&&Pn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==xn.push(t)&&yn===Sn.requestAnimationFrame||((yn=Sn.requestAnimationFrame)||Hn)(Gn)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),gn=vn=null},Sn.__c=function(e,t){t.some((function(e){try{e.__h.forEach($n),e.__h=e.__h.filter((function(e){return!e.__||zn(e)}))}catch(T_){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Sn.__e(T_,e.__v)}})),Tn&&Tn(e,t)},Sn.unmount=function(e){An&&An(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{$n(e)}catch(n){t=n}})),n.__H=void 0,t&&Sn.__e(t,n.__v))};var Wn="function"==typeof requestAnimationFrame;function Hn(e){var t,n=function(){clearTimeout(r),Wn&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Wn&&(t=requestAnimationFrame(n))}function $n(e){var t=vn,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),vn=t}function zn(e){var t=vn;e.__c=e.__(),vn=t}function qn(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Kn(e,t){return"function"==typeof t?t(e):t}function Yn(e,t){for(var n in t)e[n]=t[n];return e}function Qn(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Xn(e,t){this.props=e,this.context=t}function Zn(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:Qn(this.props,e)}function r(t){return this.shouldComponentUpdate=n,De(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Xn.prototype=new Be).isPureReactComponent=!0,Xn.prototype.shouldComponentUpdate=function(e,t){return Qn(this.props,e)||Qn(this.state,t)};var Jn=_e.__b;_e.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Jn&&Jn(e)};var er="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function tr(e){function t(t){var n=Yn({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=er,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var nr=function(e,t){return null==e?null:ze(ze(e).map(t))},rr={map:nr,forEach:nr,count:function(e){return e?ze(e).length:0},only:function(e){var t=ze(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:ze},ir=_e.__e;_e.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);ir(e,t,n,r)};var or=_e.unmount;function sr(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Yn({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return sr(e,t,n)}))),e}function ar(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return ar(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 lr(){this.__u=0,this.t=null,this.__b=null}function ur(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function cr(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return De(n,i)}return i.displayName="Lazy",i.__f=!0,i}function dr(){this.u=null,this.o=null}_e.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),or&&or(e)},(lr.prototype=new Be).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=ur(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=ar(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},lr.prototype.componentWillUnmount=function(){this.t=[]},lr.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]=sr(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&De(je,null,e.fallback);return i&&(i.__u&=-33),[De(je,null,t.__a?null:e.children),i]};var hr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!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 pr(e){return this.getChildContext=function(){return e.context},e.children}function fr(e){var t=this,n=e.i;t.componentWillUnmount=function(){nt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},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)}}),nt(De(pr,{context:t.context},e.__v),t.l)}function mr(e,t){var n=De(fr,{__v:e,i:t});return n.containerInfo=t,n}(dr.prototype=new Be).__a=function(e){var t=this,n=ur(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),hr(t,e,r)):i()};n?n(o):o()}},dr.prototype.render=function(e){this.u=null,this.o=new Map;var t=ze(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},dr.prototype.componentDidUpdate=dr.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){hr(e,n,t)}))};var vr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,gr=/^(?: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]/,yr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,_r=/[A-Z0-9]/g,wr="undefined"!=typeof document,br=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function xr(e,t,n){return null==t.__k&&(t.textContent=""),nt(e,t),"function"==typeof n&&n(),e?e.__c:null}function Sr(e,t,n){return rt(e,t),"function"==typeof n&&n(),e?e.__c:null}Be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(Be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var kr=_e.event;function Er(){}function Pr(){return this.cancelBubble}function Tr(){return this.defaultPrevented}_e.event=function(e){return kr&&(e=kr(e)),e.persist=Er,e.isPropagationStopped=Pr,e.isDefaultPrevented=Tr,e.nativeEvent=e};var Ar,Cr={enumerable:!1,configurable:!0,get:function(){return this.class}},Rr=_e.vnode;_e.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},i=-1===n.indexOf("-");for(var o in t){var s=t[o];if(!("value"===o&&"defaultValue"in t&&null==s||wr&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===s?s="":"translate"===a&&"no"===s?s=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||br(t.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":yr.test(o)&&(o=a):a=o="oninput":i&&gr.test(o)?o=o.replace(_r,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=ze(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=ze(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Cr)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=vr,Rr&&Rr(e)};var Or=_e.__r;_e.__r=function(e){Or&&Or(e),Ar=e.__c};var Fr=_e.diffed;_e.diffed=function(e){Fr&&Fr(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Ar=null};var Mr={ReactCurrentDispatcher:{current:{readContext:function(e){return Ar.__n[e.__c].props.value},useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Mn,useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Fn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr}}};function Lr(e){return De.bind(null,e)}function Dr(e){return!!e&&e.$$typeof===vr}function Vr(e){return Dr(e)&&e.type===je}function Ir(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function jr(e){return Dr(e)?it.apply(null,arguments):e}function Br(e){return!!e.__k&&(nt(null,e),!0)}function Nr(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ur=function(e,t){return e(t)},Gr=function(e,t){return e(t)},Wr=je;function Hr(e){e()}function $r(e){return e}function zr(){return[!1,Hr]}var qr=Ln,Kr=Dr;function Yr(e,t){var n=t(),r=On({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Ln((function(){i.__=n,i.v=t,Qr(i)&&o({h:i})}),[e,n,t]),Mn((function(){return Qr(i)&&o({h:i}),e((function(){Qr(i)&&o({h:i})}))}),[e]),n}function Qr(e){var t,n,r=e.v,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(s){return!0}}var Xr={useState:On,useId:Un,useReducer:Fn,useEffect:Mn,useLayoutEffect:Ln,useInsertionEffect:qr,useTransition:zr,useDeferredValue:$r,useSyncExternalStore:Yr,startTransition:Hr,useRef:Dn,useImperativeHandle:Vn,useMemo:In,useCallback:jn,useContext:Bn,useDebugValue:Nn,version:"17.0.2",Children:rr,render:xr,hydrate:Sr,unmountComponentAtNode:Br,createPortal:mr,createElement:De,createContext:ot,createFactory:Lr,cloneElement:jr,createRef:Ie,Fragment:je,isValidElement:Dr,isElement:Kr,isFragment:Vr,isMemo:Ir,findDOMNode:Nr,Component:Be,PureComponent:Xn,memo:Zn,forwardRef:tr,flushSync:Gr,unstable_batchedUpdates:Ur,StrictMode:Wr,Suspense:lr,SuspenseList:dr,lazy:cr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mr};const Zr=Object.freeze(Object.defineProperty({__proto__:null,Children:rr,Component:Be,Fragment:je,PureComponent:Xn,StrictMode:Wr,Suspense:lr,SuspenseList:dr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mr,cloneElement:jr,createContext:ot,createElement:De,createFactory:Lr,createPortal:mr,createRef:Ie,default:Xr,findDOMNode:Nr,flushSync:Gr,forwardRef:tr,hydrate:Sr,isElement:Kr,isFragment:Vr,isMemo:Ir,isValidElement:Dr,lazy:cr,memo:Zn,render:xr,startTransition:Hr,unmountComponentAtNode:Br,unstable_batchedUpdates:Ur,useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Mn,useErrorBoundary:function(e){var t=Rn(mn++,10),n=On();return t.__=e,vn.componentDidCatch||(vn.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Fn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jr.apply(null,arguments)}var ei={exports:{}},ti={},ni="function"==typeof Symbol&&Symbol.for,ri=ni?Symbol.for("react.element"):60103,ii=ni?Symbol.for("react.portal"):60106,oi=ni?Symbol.for("react.fragment"):60107,si=ni?Symbol.for("react.strict_mode"):60108,ai=ni?Symbol.for("react.profiler"):60114,li=ni?Symbol.for("react.provider"):60109,ui=ni?Symbol.for("react.context"):60110,ci=ni?Symbol.for("react.async_mode"):60111,di=ni?Symbol.for("react.concurrent_mode"):60111,hi=ni?Symbol.for("react.forward_ref"):60112,pi=ni?Symbol.for("react.suspense"):60113,fi=ni?Symbol.for("react.suspense_list"):60120,mi=ni?Symbol.for("react.memo"):60115,vi=ni?Symbol.for("react.lazy"):60116,gi=ni?Symbol.for("react.block"):60121,yi=ni?Symbol.for("react.fundamental"):60117,_i=ni?Symbol.for("react.responder"):60118,wi=ni?Symbol.for("react.scope"):60119;function bi(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ri:switch(e=e.type){case ci:case di:case oi:case ai:case si:case pi:return e;default:switch(e=e&&e.$$typeof){case ui:case hi:case vi:case mi:case li:return e;default:return t}}case ii:return t}}}function xi(e){return bi(e)===di}ti.AsyncMode=ci,ti.ConcurrentMode=di,ti.ContextConsumer=ui,ti.ContextProvider=li,ti.Element=ri,ti.ForwardRef=hi,ti.Fragment=oi,ti.Lazy=vi,ti.Memo=mi,ti.Portal=ii,ti.Profiler=ai,ti.StrictMode=si,ti.Suspense=pi,ti.isAsyncMode=function(e){return xi(e)||bi(e)===ci},ti.isConcurrentMode=xi,ti.isContextConsumer=function(e){return bi(e)===ui},ti.isContextProvider=function(e){return bi(e)===li},ti.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ri},ti.isForwardRef=function(e){return bi(e)===hi},ti.isFragment=function(e){return bi(e)===oi},ti.isLazy=function(e){return bi(e)===vi},ti.isMemo=function(e){return bi(e)===mi},ti.isPortal=function(e){return bi(e)===ii},ti.isProfiler=function(e){return bi(e)===ai},ti.isStrictMode=function(e){return bi(e)===si},ti.isSuspense=function(e){return bi(e)===pi},ti.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===oi||e===di||e===ai||e===si||e===pi||e===fi||"object"==typeof e&&null!==e&&(e.$$typeof===vi||e.$$typeof===mi||e.$$typeof===li||e.$$typeof===ui||e.$$typeof===hi||e.$$typeof===yi||e.$$typeof===_i||e.$$typeof===wi||e.$$typeof===gi)},ti.typeOf=bi,ei.exports=ti;var Si=ei.exports,ki={};ki[Si.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ki[Si.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Ei(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Pi=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ti=function(e,t,n){Pi(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var Ai={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ci=!1,Ri=/[A-Z]|^ms/g,Oi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Fi=function(e){return 45===e.charCodeAt(1)},Mi=function(e){return null!=e&&"boolean"!=typeof e},Li=ln((function(e){return Fi(e)?e:e.replace(Ri,"-$&").toLowerCase()})),Di=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Oi,(function(e,t,n){return ji={name:t,styles:n,next:ji},t}))}return 1===Ai[e]||Fi(e)||"number"!=typeof t||0===t?t:t+"px"},Vi="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ii(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return ji={name:i.name,styles:i.styles,next:ji},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)ji={name:s.name,styles:s.styles,next:ji},s=s.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ii(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":Mi(a)&&(r+=Li(o)+":"+Di(o,a)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&Ci)throw new Error(Vi);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=Ii(e,t,s);switch(o){case"animation":case"animationName":r+=Li(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<s.length;u++)Mi(s[u])&&(r+=Li(o)+":"+Di(o,s[u])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var a=ji,l=n(e);return ji=a,Ii(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var ji,Bi=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function Ni(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";ji=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=Ii(n,t,o)):i+=o[0];for(var s=1;s<e.length;s++){if(i+=Ii(n,t,e[s]),r)i+=o[s]}Bi.lastIndex=0;for(var a,l="";null!==(a=Bi.exec(i));)l+="-"+a[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:ji}}var Ui=!!Zr.useInsertionEffect&&Zr.useInsertionEffect,Gi=Ui||function(e){return e()},Wi=Ui||Ln,Hi=ot("undefined"!=typeof HTMLElement?wn({key:"css"}):null),$i=Hi.Provider,zi=function(e){return tr((function(t,n){var r=Bn(Hi);return e(t,r,n)}))},qi=ot({}),Ki={}.hasOwnProperty,Yi="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Qi=function(e,t){var n={};for(var r in t)Ki.call(t,r)&&(n[r]=t[r]);return n[Yi]=e,n},Xi=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Pi(t,n,r),Gi((function(){return Ti(t,n,r)})),null},Zi=zi((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Yi],o=[r],s="";"string"==typeof e.className?s=Ei(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var a=Ni(o,void 0,Bn(qi));s+=t.key+"-"+a.name;var l={};for(var u in e)Ki.call(e,u)&&"css"!==u&&u!==Yi&&(l[u]=e[u]);return l.className=s,n&&(l.ref=n),De(je,null,De(Xi,{cache:t,serialized:a,isStringTag:"string"==typeof i}),De(i,l))})),Ji=zi((function(e,t){var n=Ni([e.styles],void 0,Bn(qi)),r=Dn();return Wi((function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,s=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==s&&(o=!0,s.setAttribute("data-emotion",e),i.hydrate([s])),r.current=[i,o],function(){i.flush()}}),[t]),Wi((function(){var e=r.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Ti(t,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}t.insert("",n,i,!1)}}),[t,n.name]),null}));function eo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ni(t)}var to=0;function no(e,t,n,r,i,o){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)"ref"==a?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--to,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return _e.vnode&&_e.vnode(u),u}var ro=je;function io(e,t,n){return Ki.call(t,"css")?no(Zi,Qi(e,t),n):no(e,t,n)}function oo(e,t,n){return Ki.call(t,"css")?no(Zi,Qi(e,t),n):no(e,t,n)}const so=eo({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},":host":{"--fl-color-primary-900":"#000563","--fl-color-primary-800":"#031495","--fl-color-primary-700":"#1033c6","--fl-color-primary-600":"#2e66f7","--fl-color-primary-500":"#5786f8","--fl-color-primary-400":"#88abfa","--fl-color-primary-300":"#b5cbfb","--fl-color-primary-200":"#d6e2fc","--fl-color-primary-100":"#eaf0fe","--fl-color-primary-50":"#f2f6ff","--kit-font-family":"Inter, 'Source Sans Pro', sans-serif",fontFamily:"Inter, 'Source Sans Pro', sans-serif"}}),ao=()=>oo(je,{children:[io(Ji,{styles:eo`
2
2
  ${{"*, ::before, ::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"#e5e7eb","--tw-border-spacing-x":"0","--tw-border-spacing-y":"0","--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-scroll-snap-strictness":"proximity","--tw-gradient-from-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-via-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-to-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"rgb(59 130 246 / 0.5)","--tw-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-drop-shadow":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-opacity":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-size":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-layout":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-paint":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-style":"var(--tw-empty,/*!*/ /*!*/)"},"::before, ::after":{"--tw-content":"''"},"html, :host":{lineHeight:"1.5",WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:"4",fontFamily:'Inter, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',fontFeatureSettings:" normal",fontVariationSettings:" normal",WebkitTapHighlightColor:"transparent"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1, h2, h3, h4, h5, h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b, strong":{fontWeight:"bolder"},"code, kbd, samp, pre":{fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontFeatureSettings:" normal",fontVariationSettings:" normal",fontSize:"1em"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button, input, optgroup, select, textarea":{fontFamily:"inherit",fontFeatureSettings:"inherit",fontVariationSettings:"inherit",fontSize:"100%",fontWeight:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",margin:"0",padding:"0"},"button, select":{textTransform:"none"},"button, input:where([type='button']), input:where([type='reset']), input:where([type='submit'])":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button, ::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol, ul, menu":{listStyle:"none",margin:"0",padding:"0"},dialog:{padding:"0"},textarea:{resize:"vertical"},"input::placeholder, textarea::placeholder":{opacity:"1",color:"#9ca3af"},'button, [role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img, svg, video, canvas, audio, iframe, embed, object":{display:"block",verticalAlign:"middle"},"img, video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"},"::backdrop":{"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0","--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-scroll-snap-strictness":"proximity","--tw-gradient-from-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-via-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-to-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"rgb(59 130 246 / 0.5)","--tw-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-drop-shadow":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-opacity":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-size":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-layout":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-paint":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-style":"var(--tw-empty,/*!*/ /*!*/)"},"[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select":{appearance:"none",backgroundColor:"#fff",borderColor:"#6b7280",borderWidth:"1px",borderRadius:"0px",paddingTop:"0.5rem",paddingRight:"0.75rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 0 #0000"},"[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"#2563eb","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)",borderColor:"#2563eb"},"input::placeholder,textarea::placeholder":{color:"#6b7280",opacity:"1"},"::-webkit-datetime-edit-fields-wrapper":{padding:"0"},"::-webkit-date-and-time-value":{minHeight:"1.5em",textAlign:"inherit"},"::-webkit-datetime-edit":{display:"inline-flex"},"::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field":{paddingTop:"0",paddingBottom:"0"},select:{backgroundImage:"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\")",backgroundPosition:"right 0.5rem center",backgroundRepeat:"no-repeat",backgroundSize:"1.5em 1.5em",paddingRight:"2.5rem",printColorAdjust:"exact"},'[multiple],[size]:where(select:not([size="1"]))':{backgroundImage:"initial",backgroundPosition:"initial",backgroundRepeat:"unset",backgroundSize:"initial",paddingRight:"0.75rem",printColorAdjust:"unset"},"[type='checkbox'],[type='radio']":{appearance:"none",padding:"0",printColorAdjust:"exact",display:"inline-block",verticalAlign:"middle",backgroundOrigin:"border-box",userSelect:"none",flexShrink:"0",height:"1rem",width:"1rem",color:"#2563eb",backgroundColor:"#fff",borderColor:"#6b7280",borderWidth:"1px","--tw-shadow":"0 0 #0000"},"[type='checkbox']":{borderRadius:"0px"},"[type='radio']":{borderRadius:"100%"},"[type='checkbox']:focus,[type='radio']:focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":"#2563eb","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"},"[type='checkbox']:checked,[type='radio']:checked":{borderColor:"transparent",backgroundColor:"currentColor",backgroundSize:"100% 100%",backgroundPosition:"center",backgroundRepeat:"no-repeat"},"[type='checkbox']:checked":{backgroundImage:"url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")"},"@media (forced-colors: active)":{"[type='checkbox']:checked":{appearance:"auto"},"[type='radio']:checked":{appearance:"auto"},"[type='checkbox']:indeterminate":{appearance:"auto"}},"[type='radio']:checked":{backgroundImage:"url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")"},"[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus":{borderColor:"transparent",backgroundColor:"currentColor"},"[type='checkbox']:indeterminate":{backgroundImage:"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\")",borderColor:"transparent",backgroundColor:"currentColor",backgroundSize:"100% 100%",backgroundPosition:"center",backgroundRepeat:"no-repeat"},"[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus":{borderColor:"transparent",backgroundColor:"currentColor"},"[type='file']":{background:"unset",borderColor:"inherit",borderWidth:"0",borderRadius:"0",padding:"0",fontSize:"unset",lineHeight:"inherit"},"[type='file']:focus":{outline:"1px auto -webkit-focus-ring-color"}}}
3
- `}),io(Ji,{styles:so})]});let lo;const uo=()=>Bn(lo);class co extends Error{constructor(t,e){super(t),__publicField(this,"response"),this.response=e}}const ho=async(t,e,n,r)=>{await po(t,e,n,r,!0)},po=async(t,e,n,r,i)=>{const o=await fetch(t,{method:n,body:r?JSON.stringify(r):void 0,headers:{"content-type":"application/json","x-app-version":"0.3.5838",authorization:`Bearer ${e}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!o.ok)throw new co(`[API Error] Status: ${o.statusText}. Response: ${await o.text()}`,o);return i?{}:await o.json()},fo=t=>async e=>{const n=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`);return ho(n,t.accessToken,"POST",e)},mo=t=>e=>async n=>{const r=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion/${e}`);return ho(r,t.accessToken,"PUT",n)},vo=()=>{const t=uo();return{getAllPromotions:(e=t.backend,async()=>{const t=new URL(`${e.url}/promoted-benefits/admin/v1.0/promotion`);return po(t,e.accessToken,"GET")}),createPromotion:fo(t.backend),updatePromotion:mo(t.backend)};var e};var go=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yo="undefined"==typeof window||"Deno"in globalThis;function _o(){}function wo(t){return"number"==typeof t&&t>=0&&t!==1/0}function bo(t,e){return Math.max(t+(e||0)-Date.now(),0)}function xo(t,e){return"function"==typeof t?t(e):t}function So(t,e){return"function"==typeof t?t(e):t}function ko(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=t;if(s)if(r){if(e.queryHash!==Po(s,e.options))return!1}else if(!Ao(e.queryKey,s))return!1;if("all"!==n){const t=e.isActive();if("active"===n&&!t)return!1;if("inactive"===n&&t)return!1}return("boolean"!=typeof a||e.isStale()===a)&&((!i||i===e.state.fetchStatus)&&!(o&&!o(e)))}function Eo(t,e){const{exact:n,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(To(e.options.mutationKey)!==To(o))return!1}else if(!Ao(e.options.mutationKey,o))return!1}return(!r||e.state.status===r)&&!(i&&!i(e))}function Po(t,e){return((null==e?void 0:e.queryKeyHashFn)||To)(t)}function To(t){return JSON.stringify(t,((t,e)=>Mo(e)?Object.keys(e).sort().reduce(((t,n)=>(t[n]=e[n],t)),{}):e))}function Ao(t,e){return t===e||typeof t==typeof e&&(!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&!Object.keys(e).some((n=>!Ao(t[n],e[n]))))}function Co(t,e){if(t===e)return t;const n=Oo(t)&&Oo(e);if(n||Mo(t)&&Mo(e)){const r=n?t:Object.keys(t),i=r.length,o=n?e:Object.keys(e),s=o.length,a=n?[]:{};let l=0;for(let u=0;u<s;u++){const i=n?u:o[u];(!n&&r.includes(i)||n)&&void 0===t[i]&&void 0===e[i]?(a[i]=void 0,l++):(a[i]=Co(t[i],e[i]),a[i]===t[i]&&void 0!==t[i]&&l++)}return i===s&&l===i?t:a}return e}function Ro(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function Oo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Mo(t){if(!Fo(t))return!1;const e=t.constructor;if(void 0===e)return!0;const n=e.prototype;return!!Fo(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype)}function Fo(t){return"[object Object]"===Object.prototype.toString.call(t)}function Lo(t,e,n){return"function"==typeof n.structuralSharing?n.structuralSharing(t,e):!1!==n.structuralSharing?Co(t,e):e}function Do(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Vo(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Io=Symbol();function jo(t,e){return!t.queryFn&&(null==e?void 0:e.initialPromise)?()=>e.initialPromise:t.queryFn&&t.queryFn!==Io?t.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`))}var Bo=new(r=class extends go{constructor(){super(),__privateAdd(this,t),__privateAdd(this,e),__privateAdd(this,n),__privateSet(this,n,(t=>{if(!yo&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}))}onSubscribe(){__privateGet(this,e)||this.setEventListener(__privateGet(this,n))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=__privateGet(this,e))||t.call(this),__privateSet(this,e,void 0))}setEventListener(t){var r;__privateSet(this,n,t),null==(r=__privateGet(this,e))||r.call(this),__privateSet(this,e,t((t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})))}setFocused(e){__privateGet(this,t)!==e&&(__privateSet(this,t,e),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach((e=>{e(t)}))}isFocused(){var e;return"boolean"==typeof __privateGet(this,t)?__privateGet(this,t):"hidden"!==(null==(e=globalThis.document)?void 0:e.visibilityState)}},t=new WeakMap,e=new WeakMap,n=new WeakMap,r),No=new(a=class extends go{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,s),__privateSet(this,s,(t=>{if(!yo&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}))}onSubscribe(){__privateGet(this,o)||this.setEventListener(__privateGet(this,s))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,void 0))}setEventListener(t){var e;__privateSet(this,s,t),null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,t(this.setOnline.bind(this)))}setOnline(t){__privateGet(this,i)!==t&&(__privateSet(this,i,t),this.listeners.forEach((e=>{e(t)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,s=new WeakMap,a);function Uo(t){return Math.min(1e3*2**t,3e4)}function Go(t){return"online"!==(t??"online")||No.isOnline()}var Wo=class extends Error{constructor(t){super("CancelledError"),this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}};function Ho(t){return t instanceof Wo}function $o(t){let e,n,r,i=!1,o=0,s=!1;const a=new Promise(((t,e)=>{n=t,r=e})),l=()=>Bo.isFocused()&&("always"===t.networkMode||No.isOnline())&&t.canRun(),u=()=>Go(t.networkMode)&&t.canRun(),c=r=>{var i;s||(s=!0,null==(i=t.onSuccess)||i.call(t,r),null==e||e(),n(r))},d=n=>{var i;s||(s=!0,null==(i=t.onError)||i.call(t,n),null==e||e(),r(n))},h=()=>new Promise((n=>{var r;e=t=>{(s||l())&&n(t)},null==(r=t.onPause)||r.call(t)})).then((()=>{var n;e=void 0,s||null==(n=t.onContinue)||n.call(t)})),p=()=>{if(s)return;let e;const n=0===o?t.initialPromise:void 0;try{e=n??t.fn()}catch(r){e=Promise.reject(r)}Promise.resolve(e).then(c).catch((e=>{var n;if(s)return;const r=t.retry??(yo?0:3),a=t.retryDelay??Uo,u="function"==typeof a?a(o,e):a,c=!0===r||"number"==typeof r&&o<r||"function"==typeof r&&r(o,e);var f;!i&&c?(o++,null==(n=t.onFail)||n.call(t,o,e),(f=u,new Promise((t=>{setTimeout(t,f)}))).then((()=>l()?void 0:h())).then((()=>{i?d(e):p()}))):d(e)}))};return{promise:a,cancel:e=>{var n;s||(d(new Wo(e)),null==(n=t.abort)||n.call(t))},continue:()=>(null==e||e(),a),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:u,start:()=>(u()?p():h().then(p),a)}}var zo=function(){let t=[],e=0,n=t=>{t()},r=t=>{t()},i=t=>setTimeout(t,0);const o=r=>{e?t.push(r):i((()=>{n(r)}))};return{batch:o=>{let s;e++;try{s=o()}finally{e--,e||(()=>{const e=t;t=[],e.length&&i((()=>{r((()=>{e.forEach((t=>{n(t)}))}))}))})()}return s},batchCalls:t=>(...e)=>{o((()=>{t(...e)}))},schedule:o,setNotifyFunction:t=>{n=t},setBatchNotifyFunction:t=>{r=t},setScheduler:t=>{i=t}}}(),qo=(u=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wo(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(yo?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,u),Ko=(y=class extends qo{constructor(t){super(),__privateAdd(this,v),__privateAdd(this,c),__privateAdd(this,d),__privateAdd(this,h),__privateAdd(this,p),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,t.defaultOptions),this.setOptions(t.options),this.observers=[],__privateSet(this,h,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,__privateSet(this,c,function(t){const e="function"==typeof t.initialData?t.initialData():t.initialData,n=void 0!==e,r=n?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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"}}(this.options)),this.state=t.state??__privateGet(this,c),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return null==(t=__privateGet(this,p))?void 0:t.promise}setOptions(t){this.options={...__privateGet(this,f),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,h).remove(this)}setData(t,e){const n=Lo(this.state.data,t,this.options);return __privateMethod(this,v,g).call(this,{data:n,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt,manual:null==e?void 0:e.manual}),n}setState(t,e){__privateMethod(this,v,g).call(this,{type:"setState",state:t,setStateOptions:e})}cancel(t){var e,n;const r=null==(e=__privateGet(this,p))?void 0:e.promise;return null==(n=__privateGet(this,p))||n.cancel(t),r?r.then(_o).catch(_o):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,c))}isActive(){return this.observers.some((t=>!1!==So(t.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((t=>t.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(t=0){return this.state.isInvalidated||void 0===this.state.data||!bo(this.state.dataUpdatedAt,t)}onFocus(){var t;const e=this.observers.find((t=>t.shouldFetchOnWindowFocus()));null==e||e.refetch({cancelRefetch:!1}),null==(t=__privateGet(this,p))||t.continue()}onOnline(){var t;const e=this.observers.find((t=>t.shouldFetchOnReconnect()));null==e||e.refetch({cancelRefetch:!1}),null==(t=__privateGet(this,p))||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),__privateGet(this,h).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter((e=>e!==t)),this.observers.length||(__privateGet(this,p)&&(__privateGet(this,m)?__privateGet(this,p).cancel({revert:!0}):__privateGet(this,p).cancelRetry()),this.scheduleGc()),__privateGet(this,h).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(t,e){var n,r,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==e?void 0:e.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,p))return __privateGet(this,p).continueRetry(),__privateGet(this,p).promise;if(t&&this.setOptions(t),!this.options.queryFn){const t=this.observers.find((t=>t.options.queryFn));t&&this.setOptions(t.options)}const o=new AbortController,s=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},a={fetchOptions:e,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const t=jo(this.options,e),n={queryKey:this.queryKey,meta:this.meta};return s(n),__privateSet(this,m,!1),this.options.persister?this.options.persister(t,n,this):t(n)}};s(a),null==(n=this.options.behavior)||n.onFetch(a,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(r=a.fetchOptions)?void 0:r.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=a.fetchOptions)?void 0:i.meta});const l=t=>{var e,n,r,i;Ho(t)&&t.silent||__privateMethod(this,v,g).call(this,{type:"error",error:t}),Ho(t)||(null==(n=(e=__privateGet(this,h).config).onError)||n.call(e,t,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,this.state.data,t,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return __privateSet(this,p,$o({initialPromise:null==e?void 0:e.initialPromise,fn:a.fetchFn,abort:o.abort.bind(o),onSuccess:t=>{var e,n,r,i;if(void 0!==t){try{this.setData(t)}catch(o){return void l(o)}null==(n=(e=__privateGet(this,h).config).onSuccess)||n.call(e,t,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,t,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(t,e)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:t,error:e})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),__privateGet(this,p).start()}},c=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...Yo(e.data,this.options),fetchMeta:t.meta??null};case"success":return{...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=t.error;return Ho(n)&&n.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...e,error:n,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),zo.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate()})),__privateGet(this,h).notify({query:this,type:"updated",action:t})}))},y);function Yo(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Go(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}var Qo=(w=class extends go{constructor(t={}){super(),__privateAdd(this,_),this.config=t,__privateSet(this,_,new Map)}build(t,e,n){const r=e.queryKey,i=e.queryHash??Po(r,e);let o=this.get(i);return o||(o=new Ko({cache:this,queryKey:r,queryHash:i,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){__privateGet(this,_).has(t.queryHash)||(__privateGet(this,_).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=__privateGet(this,_).get(t.queryHash);e&&(t.destroy(),e===t&&__privateGet(this,_).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){zo.batch((()=>{this.getAll().forEach((t=>{this.remove(t)}))}))}get(t){return __privateGet(this,_).get(t)}getAll(){return[...__privateGet(this,_).values()]}find(t){const e={exact:!0,...t};return this.getAll().find((t=>ko(e,t)))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter((e=>ko(t,e))):e}notify(t){zo.batch((()=>{this.listeners.forEach((e=>{e(t)}))}))}onFocus(){zo.batch((()=>{this.getAll().forEach((t=>{t.onFocus()}))}))}onOnline(){zo.batch((()=>{this.getAll().forEach((t=>{t.onOnline()}))}))}},_=new WeakMap,w),Xo=(P=class extends qo{constructor(t){super(),__privateAdd(this,k),__privateAdd(this,b),__privateAdd(this,x),__privateAdd(this,S),this.mutationId=t.mutationId,__privateSet(this,x,t.mutationCache),__privateSet(this,b,[]),this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){__privateGet(this,b).includes(t)||(__privateGet(this,b).push(t),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){__privateSet(this,b,__privateGet(this,b).filter((e=>e!==t))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){__privateGet(this,b).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var t;return(null==(t=__privateGet(this,S))?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var e,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,w;__privateSet(this,S,$o({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{__privateMethod(this,k,E).call(this,{type:"failed",failureCount:t,error:e})},onPause:()=>{__privateMethod(this,k,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,k,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const b="pending"===this.state.status,P=!__privateGet(this,S).canStart();try{if(!b){__privateMethod(this,k,E).call(this,{type:"pending",variables:t,isPaused:P}),await(null==(n=(e=__privateGet(this,x).config).onMutate)?void 0:n.call(e,t,this));const o=await(null==(i=(r=this.options).onMutate)?void 0:i.call(r,t));o!==this.state.context&&__privateMethod(this,k,E).call(this,{type:"pending",context:o,variables:t,isPaused:P})}const p=await __privateGet(this,S).start();return await(null==(s=(o=__privateGet(this,x).config).onSuccess)?void 0:s.call(o,p,t,this.state.context,this)),await(null==(l=(a=this.options).onSuccess)?void 0:l.call(a,p,t,this.state.context)),await(null==(c=(u=__privateGet(this,x).config).onSettled)?void 0:c.call(u,p,null,this.state.variables,this.state.context,this)),await(null==(h=(d=this.options).onSettled)?void 0:h.call(d,p,null,t,this.state.context)),__privateMethod(this,k,E).call(this,{type:"success",data:p}),p}catch(T){try{throw await(null==(f=(p=__privateGet(this,x).config).onError)?void 0:f.call(p,T,t,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,t,this.state.context)),await(null==(y=(g=__privateGet(this,x).config).onSettled)?void 0:y.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(w=(_=this.options).onSettled)?void 0:w.call(_,void 0,T,t,this.state.context)),T}finally{__privateMethod(this,k,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},b=new WeakMap,x=new WeakMap,S=new WeakMap,k=new WeakSet,E=function(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),zo.batch((()=>{__privateGet(this,b).forEach((e=>{e.onMutationUpdate(t)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:t})}))},P);var Zo=(C=class extends go{constructor(t={}){super(),__privateAdd(this,T),__privateAdd(this,A),this.config=t,__privateSet(this,T,new Map),__privateSet(this,A,Date.now())}build(t,e,n){const r=new Xo({mutationCache:this,mutationId:++__privateWrapper(this,A)._,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){const e=Jo(t),n=__privateGet(this,T).get(e)??[];n.push(t),__privateGet(this,T).set(e,n),this.notify({type:"added",mutation:t})}remove(t){var e;const n=Jo(t);if(__privateGet(this,T).has(n)){const r=null==(e=__privateGet(this,T).get(n))?void 0:e.filter((e=>e!==t));r&&(0===r.length?__privateGet(this,T).delete(n):__privateGet(this,T).set(n,r))}this.notify({type:"removed",mutation:t})}canRun(t){var e;const n=null==(e=__privateGet(this,T).get(Jo(t)))?void 0:e.find((t=>"pending"===t.state.status));return!n||n===t}runNext(t){var e;const n=null==(e=__privateGet(this,T).get(Jo(t)))?void 0:e.find((e=>e!==t&&e.state.isPaused));return(null==n?void 0:n.continue())??Promise.resolve()}clear(){zo.batch((()=>{this.getAll().forEach((t=>{this.remove(t)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(t){const e={exact:!0,...t};return this.getAll().find((t=>Eo(e,t)))}findAll(t={}){return this.getAll().filter((e=>Eo(t,e)))}notify(t){zo.batch((()=>{this.listeners.forEach((e=>{e(t)}))}))}resumePausedMutations(){const t=this.getAll().filter((t=>t.state.isPaused));return zo.batch((()=>Promise.all(t.map((t=>t.continue().catch(_o))))))}},T=new WeakMap,A=new WeakMap,C);function Jo(t){var e;return(null==(e=t.options.scope)?void 0:e.id)??String(t.mutationId)}function ts(t){return{onFetch:(e,n)=>{var r,i,o,s,a;const l=e.options,u=null==(o=null==(i=null==(r=e.fetchOptions)?void 0:r.meta)?void 0:i.fetchMore)?void 0:o.direction,c=(null==(s=e.state.data)?void 0:s.pages)||[],d=(null==(a=e.state.data)?void 0:a.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const f=async()=>{let n=!1;const r=jo(e.options,e.fetchOptions),i=async(t,i,o)=>{if(n)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);const s={queryKey:e.queryKey,pageParam:i,direction:o?"backward":"forward",meta:e.options.meta};var a;a=s,Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(e.signal.aborted?n=!0:e.signal.addEventListener("abort",(()=>{n=!0})),e.signal)});const l=await r(s),{maxPages:u}=e.options,c=o?Vo:Do;return{pages:c(t.pages,l,u),pageParams:c(t.pageParams,i,u)}};if(u&&c.length){const t="backward"===u,e={pages:c,pageParams:d},n=(t?ns:es)(l,e);h=await i(e,n,t)}else{const e=t??c.length;do{const t=0===p?d[0]??l.initialPageParam:es(l,h);if(p>0&&null==t)break;h=await i(h,t),p++}while(p<e)}return h};e.options.persister?e.fetchFn=()=>{var t,r;return null==(r=(t=e.options).persister)?void 0:r.call(t,f,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=f}}}function es(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function ns(t,{pages:e,pageParams:n}){var r;return e.length>0?null==(r=t.getPreviousPageParam)?void 0:r.call(t,e[0],e,n[0],n):void 0}var rs=(j=class{constructor(t={}){__privateAdd(this,R),__privateAdd(this,O),__privateAdd(this,M),__privateAdd(this,F),__privateAdd(this,L),__privateAdd(this,D),__privateAdd(this,V),__privateAdd(this,I),__privateSet(this,R,t.queryCache||new Qo),__privateSet(this,O,t.mutationCache||new Zo),__privateSet(this,M,t.defaultOptions||{}),__privateSet(this,F,new Map),__privateSet(this,L,new Map),__privateSet(this,D,0)}mount(){__privateWrapper(this,D)._++,1===__privateGet(this,D)&&(__privateSet(this,V,Bo.subscribe((async t=>{t&&(await this.resumePausedMutations(),__privateGet(this,R).onFocus())}))),__privateSet(this,I,No.subscribe((async t=>{t&&(await this.resumePausedMutations(),__privateGet(this,R).onOnline())}))))}unmount(){var t,e;__privateWrapper(this,D)._--,0===__privateGet(this,D)&&(null==(t=__privateGet(this,V))||t.call(this),__privateSet(this,V,void 0),null==(e=__privateGet(this,I))||e.call(this),__privateSet(this,I,void 0))}isFetching(t){return __privateGet(this,R).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return __privateGet(this,O).findAll({...t,status:"pending"}).length}getQueryData(t){var e;const n=this.defaultQueryOptions({queryKey:t});return null==(e=__privateGet(this,R).get(n.queryHash))?void 0:e.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(void 0===e)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=__privateGet(this,R).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(xo(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return __privateGet(this,R).findAll(t).map((({queryKey:t,state:e})=>[t,e.data]))}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=__privateGet(this,R).get(r.queryHash),o=function(t,e){return"function"==typeof t?t(e):t}(e,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,R).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return zo.batch((()=>__privateGet(this,R).findAll(t).map((({queryKey:t})=>[t,this.setQueryData(t,e,n)]))))}getQueryState(t){var e;const n=this.defaultQueryOptions({queryKey:t});return null==(e=__privateGet(this,R).get(n.queryHash))?void 0:e.state}removeQueries(t){const e=__privateGet(this,R);zo.batch((()=>{e.findAll(t).forEach((t=>{e.remove(t)}))}))}resetQueries(t,e){const n=__privateGet(this,R),r={type:"active",...t};return zo.batch((()=>(n.findAll(t).forEach((t=>{t.reset()})),this.refetchQueries(r,e))))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=zo.batch((()=>__privateGet(this,R).findAll(t).map((t=>t.cancel(n)))));return Promise.all(r).then(_o).catch(_o)}invalidateQueries(t={},e={}){return zo.batch((()=>{if(__privateGet(this,R).findAll(t).forEach((t=>{t.invalidate()})),"none"===t.refetchType)return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)}))}refetchQueries(t={},e){const n={...e,cancelRefetch:(null==e?void 0:e.cancelRefetch)??!0},r=zo.batch((()=>__privateGet(this,R).findAll(t).filter((t=>!t.isDisabled())).map((t=>{let e=t.fetch(void 0,n);return n.throwOnError||(e=e.catch(_o)),"paused"===t.state.fetchStatus?Promise.resolve():e}))));return Promise.all(r).then(_o)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const n=__privateGet(this,R).build(this,e);return n.isStaleByTime(xo(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(_o).catch(_o)}fetchInfiniteQuery(t){return t.behavior=ts(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(_o).catch(_o)}ensureInfiniteQueryData(t){return t.behavior=ts(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return No.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,R)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,M)}setDefaultOptions(t){__privateSet(this,M,t)}setQueryDefaults(t,e){__privateGet(this,F).set(To(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...__privateGet(this,F).values()];let n={};return e.forEach((e=>{Ao(t,e.queryKey)&&(n={...n,...e.defaultOptions})})),n}setMutationDefaults(t,e){__privateGet(this,L).set(To(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...__privateGet(this,L).values()];let n={};return e.forEach((e=>{Ao(t,e.mutationKey)&&(n={...n,...e.defaultOptions})})),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...__privateGet(this,M).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Po(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),!0!==e.enabled&&e.queryFn===Io&&(e.enabled=!1),e}defaultMutationOptions(t){return(null==t?void 0:t._defaulted)?t:{...__privateGet(this,M).mutations,...(null==t?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){__privateGet(this,R).clear(),__privateGet(this,O).clear()}},R=new WeakMap,O=new WeakMap,M=new WeakMap,F=new WeakMap,L=new WeakMap,D=new WeakMap,V=new WeakMap,I=new WeakMap,j),is=(ut=class extends go{constructor(t,e){super(),__privateAdd(this,J),__privateAdd(this,B),__privateAdd(this,N),__privateAdd(this,U),__privateAdd(this,G),__privateAdd(this,W),__privateAdd(this,H),__privateAdd(this,$),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,Y),__privateAdd(this,Q),__privateAdd(this,X),__privateAdd(this,Z,new Set),this.options=e,__privateSet(this,B,t),__privateSet(this,$,null),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,N).addObserver(this),os(__privateGet(this,N),this.options)?__privateMethod(this,J,tt).call(this):this.updateResult(),__privateMethod(this,J,it).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ss(__privateGet(this,N),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ss(__privateGet(this,N),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,J,ot).call(this),__privateMethod(this,J,st).call(this),__privateGet(this,N).removeObserver(this)}setOptions(t,e){const n=this.options,r=__privateGet(this,N);if(this.options=__privateGet(this,B).defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof So(this.options.enabled,__privateGet(this,N)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,J,at).call(this),__privateGet(this,N).setOptions(this.options),n._defaulted&&!Ro(this.options,n)&&__privateGet(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,N),observer:this});const i=this.hasListeners();i&&as(__privateGet(this,N),r,this.options,n)&&__privateMethod(this,J,tt).call(this),this.updateResult(e),!i||__privateGet(this,N)===r&&So(this.options.enabled,__privateGet(this,N))===So(n.enabled,__privateGet(this,N))&&xo(this.options.staleTime,__privateGet(this,N))===xo(n.staleTime,__privateGet(this,N))||__privateMethod(this,J,et).call(this);const o=__privateMethod(this,J,nt).call(this);!i||__privateGet(this,N)===r&&So(this.options.enabled,__privateGet(this,N))===So(n.enabled,__privateGet(this,N))&&o===__privateGet(this,X)||__privateMethod(this,J,rt).call(this,o)}getOptimisticResult(t){const e=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),t),n=this.createResult(e,t);return function(t,e){if(!Ro(t.getCurrentResult(),e))return!0;return!1}(this,n)&&(__privateSet(this,G,n),__privateSet(this,H,this.options),__privateSet(this,W,__privateGet(this,N).state)),n}getCurrentResult(){return __privateGet(this,G)}trackResult(t,e){const n={};return Object.keys(t).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),null==e||e(r),t[r])})})),n}trackProp(t){__privateGet(this,Z).add(t)}getCurrentQuery(){return __privateGet(this,N)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=__privateGet(this,B).defaultQueryOptions(t),n=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),e);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,e)))}fetch(t){return __privateMethod(this,J,tt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,G))))}createResult(t,e){var n;const r=__privateGet(this,N),i=this.options,o=__privateGet(this,G),s=__privateGet(this,W),a=__privateGet(this,H),l=t!==r?t.state:__privateGet(this,U),{state:u}=t;let c,d={...u},h=!1;if(e._optimisticResults){const n=this.hasListeners(),o=!n&&os(t,e),s=n&&as(t,r,e,i);(o||s)&&(d={...d,...Yo(u.data,t.options)}),"isRestoring"===e._optimisticResults&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:f,status:m}=d;if(e.select&&void 0!==d.data)if(o&&d.data===(null==s?void 0:s.data)&&e.select===__privateGet(this,z))c=__privateGet(this,q);else try{__privateSet(this,z,e.select),c=e.select(d.data),c=Lo(null==o?void 0:o.data,c,e),__privateSet(this,q,c),__privateSet(this,$,null)}catch(b){__privateSet(this,$,b)}else c=d.data;if(void 0!==e.placeholderData&&void 0===c&&"pending"===m){let t;if((null==o?void 0:o.isPlaceholderData)&&e.placeholderData===(null==a?void 0:a.placeholderData))t=o.data;else if(t="function"==typeof e.placeholderData?e.placeholderData(null==(n=__privateGet(this,K))?void 0:n.state.data,__privateGet(this,K)):e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),__privateSet(this,$,null)}catch(b){__privateSet(this,$,b)}void 0!==t&&(m="success",c=Lo(null==o?void 0:o.data,t,e),h=!0)}__privateGet(this,$)&&(p=__privateGet(this,$),c=__privateGet(this,q),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,y="error"===m,_=g&&v,w=void 0!==c;return{status:m,fetchStatus:d.fetchStatus,isPending:g,isSuccess:"success"===m,isError:y,isInitialLoading:_,isLoading:_,data:c,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!g,isLoadingError:y&&!w,isPaused:"paused"===d.fetchStatus,isPlaceholderData:h,isRefetchError:y&&w,isStale:ls(t,e),refetch:this.refetch}}updateResult(t){const e=__privateGet(this,G),n=this.createResult(__privateGet(this,N),this.options);if(__privateSet(this,W,__privateGet(this,N).state),__privateSet(this,H,this.options),void 0!==__privateGet(this,W).data&&__privateSet(this,K,__privateGet(this,N)),Ro(n,e))return;__privateSet(this,G,n);const r={};!1!==(null==t?void 0:t.listeners)&&(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!__privateGet(this,Z).size)return!0;const r=new Set(n??__privateGet(this,Z));return this.options.throwOnError&&r.add("error"),Object.keys(__privateGet(this,G)).some((t=>{const n=t;return __privateGet(this,G)[n]!==e[n]&&r.has(n)}))})()&&(r.listeners=!0),__privateMethod(this,J,lt).call(this,{...r,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,J,it).call(this)}},B=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,$=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,Y=new WeakMap,Q=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakSet,tt=function(t){__privateMethod(this,J,at).call(this);let e=__privateGet(this,N).fetch(this.options,t);return(null==t?void 0:t.throwOnError)||(e=e.catch(_o)),e},et=function(){__privateMethod(this,J,ot).call(this);const t=xo(this.options.staleTime,__privateGet(this,N));if(yo||__privateGet(this,G).isStale||!wo(t))return;const e=bo(__privateGet(this,G).dataUpdatedAt,t);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,G).isStale||this.updateResult()}),e+1))},nt=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,N)):this.options.refetchInterval)??!1},rt=function(t){__privateMethod(this,J,st).call(this),__privateSet(this,X,t),!yo&&!1!==So(this.options.enabled,__privateGet(this,N))&&wo(__privateGet(this,X))&&0!==__privateGet(this,X)&&__privateSet(this,Q,setInterval((()=>{(this.options.refetchIntervalInBackground||Bo.isFocused())&&__privateMethod(this,J,tt).call(this)}),__privateGet(this,X)))},it=function(){__privateMethod(this,J,et).call(this),__privateMethod(this,J,rt).call(this,__privateMethod(this,J,nt).call(this))},ot=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},st=function(){__privateGet(this,Q)&&(clearInterval(__privateGet(this,Q)),__privateSet(this,Q,void 0))},at=function(){const t=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),this.options);if(t===__privateGet(this,N))return;const e=__privateGet(this,N);__privateSet(this,N,t),__privateSet(this,U,t.state),this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))},lt=function(t){zo.batch((()=>{t.listeners&&this.listeners.forEach((t=>{t(__privateGet(this,G))})),__privateGet(this,B).getQueryCache().notify({query:__privateGet(this,N),type:"observerResultsUpdated"})}))},ut);function os(t,e){return function(t,e){return!1!==So(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||void 0!==t.state.data&&ss(t,e,e.refetchOnMount)}function ss(t,e,n){if(!1!==So(e.enabled,t)){const r="function"==typeof n?n(t):n;return"always"===r||!1!==r&&ls(t,e)}return!1}function as(t,e,n,r){return(t!==e||!1===So(r.enabled,t))&&(!n.suspense||"error"!==t.state.status)&&ls(t,n)}function ls(t,e){return!1!==So(e.enabled,t)&&t.isStaleByTime(xo(e.staleTime,t))}var us=(gt=class extends go{constructor(t,e){super(),__privateAdd(this,ft),__privateAdd(this,ct),__privateAdd(this,dt),__privateAdd(this,ht),__privateAdd(this,pt),__privateSet(this,ct,t),this.setOptions(e),this.bindMethods(),__privateMethod(this,ft,mt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const n=this.options;this.options=__privateGet(this,ct).defaultMutationOptions(t),Ro(this.options,n)||__privateGet(this,ct).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,ht),observer:this}),(null==n?void 0:n.mutationKey)&&this.options.mutationKey&&To(n.mutationKey)!==To(this.options.mutationKey)?this.reset():"pending"===(null==(e=__privateGet(this,ht))?void 0:e.state.status)&&__privateGet(this,ht).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||null==(t=__privateGet(this,ht))||t.removeObserver(this)}onMutationUpdate(t){__privateMethod(this,ft,mt).call(this),__privateMethod(this,ft,vt).call(this,t)}getCurrentResult(){return __privateGet(this,dt)}reset(){var t;null==(t=__privateGet(this,ht))||t.removeObserver(this),__privateSet(this,ht,void 0),__privateMethod(this,ft,mt).call(this),__privateMethod(this,ft,vt).call(this)}mutate(t,e){var n;return __privateSet(this,pt,e),null==(n=__privateGet(this,ht))||n.removeObserver(this),__privateSet(this,ht,__privateGet(this,ct).getMutationCache().build(__privateGet(this,ct),this.options)),__privateGet(this,ht).addObserver(this),__privateGet(this,ht).execute(t)}},ct=new WeakMap,dt=new WeakMap,ht=new WeakMap,pt=new WeakMap,ft=new WeakSet,mt=function(){var t;const e=(null==(t=__privateGet(this,ht))?void 0:t.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,dt,{...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset})},vt=function(t){zo.batch((()=>{var e,n,r,i,o,s,a,l;if(__privateGet(this,pt)&&this.hasListeners()){const u=__privateGet(this,dt).variables,c=__privateGet(this,dt).context;"success"===(null==t?void 0:t.type)?(null==(n=(e=__privateGet(this,pt)).onSuccess)||n.call(e,t.data,u,c),null==(i=(r=__privateGet(this,pt)).onSettled)||i.call(r,t.data,null,u,c)):"error"===(null==t?void 0:t.type)&&(null==(s=(o=__privateGet(this,pt)).onError)||s.call(o,t.error,u,c),null==(l=(a=__privateGet(this,pt)).onSettled)||l.call(a,void 0,t.error,u,c))}this.listeners.forEach((t=>{t(__privateGet(this,dt))}))}))},gt),cs=oe(void 0),ds=t=>{const e=Bn(cs);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},hs=({client:t,children:e})=>(Fn((()=>(t.mount(),()=>{t.unmount()})),[t]),no(cs.Provider,{value:t,children:e})),ps=oe(!1),fs=()=>Bn(ps);ps.Provider;var ms=oe(function(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}()),vs=()=>Bn(ms);function gs(t,e){return"function"==typeof t?t(...e):!!t}function ys(){}var _s=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},ws=t=>{Fn((()=>{t.clearReset()}),[t])},bs=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&gs(n,[t.error,r]),xs=t=>{t.suspense&&("number"!=typeof t.staleTime&&(t.staleTime=1e3),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,1e3)))},Ss=(t,e)=>(null==t?void 0:t.suspense)&&e.isPending,ks=(t,e,n)=>e.fetchOptimistic(t).catch((()=>{n.clearReset()}));function Es(t,e){return function(t,e){var n,r,i,o;const s=ds(),a=fs(),l=vs(),u=s.defaultQueryOptions(t);null==(r=null==(n=s.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||r.call(n,u),u._optimisticResults=a?"isRestoring":"optimistic",xs(u),_s(u,l),ws(l);const[c]=On((()=>new e(s,u))),d=c.getOptimisticResult(u);if(Yr(jn((t=>{const e=a?()=>{}:c.subscribe(zo.batchCalls(t));return c.updateResult(),e}),[c,a]),(()=>c.getCurrentResult())),Fn((()=>{c.setOptions(u,{listeners:!1})}),[u,c]),Ss(u,d))throw ks(u,c,l);if(bs({result:d,errorResetBoundary:l,throwOnError:u.throwOnError,query:s.getQueryCache().get(u.queryHash)}))throw d.error;return null==(o=null==(i=s.getDefaultOptions().queries)?void 0:i._experimental_afterQuery)||o.call(i,u,d),u.notifyOnChangeProps?d:c.trackResult(d)}(t,is)}var Ps=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ts=ln((function(t){return Ps.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91})),As=function(t){return"theme"!==t},Cs=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?Ts:As},Rs=function(t,e,n){var r;if(e){var i=e.shouldForwardProp;r=t.__emotion_forwardProp&&i?function(e){return t.__emotion_forwardProp(e)&&i(e)}:i}return"function"!=typeof r&&n&&(r=t.__emotion_forwardProp),r},Os=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return Pi(e,n,r),Gi((function(){return Ti(e,n,r)})),null},Ms=function t(e,n){var r,i,o=e.__emotion_real===e,s=o&&e.__emotion_base||e;void 0!==n&&(r=n.label,i=n.target);var a=Rs(e,n,o),l=a||Cs(s),u=!l("as");return function(){var c=arguments,d=o&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,p=1;p<h;p++)d.push(c[p],c[0][p])}var f=zi((function(t,e,n){var r=u&&t.as||s,o="",c=[],h=t;if(null==t.theme){for(var p in h={},t)h[p]=t[p];h.theme=Bn(qi)}"string"==typeof t.className?o=Ei(e.registered,c,t.className):null!=t.className&&(o=t.className+" ");var f=Ni(d.concat(c),e.registered,h);o+=e.key+"-"+f.name,void 0!==i&&(o+=" "+i);var m=u&&void 0===a?Cs(r):l,v={};for(var g in t)u&&"as"===g||m(g)&&(v[g]=t[g]);return v.className=o,n&&(v.ref=n),Dt(jt,null,Dt(Os,{cache:e,serialized:f,isStringTag:"string"==typeof r}),Dt(r,v))}));return f.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",f.defaultProps=e.defaultProps,f.__emotion_real=f,f.__emotion_base=s,f.__emotion_styles=d,f.__emotion_forwardProp=a,Object.defineProperty(f,"toString",{value:function(){return"."+i}}),f.withComponent=function(e,r){return t(e,Jr({},n,r,{shouldForwardProp:Rs(f,r,!0)})).apply(void 0,d)},f}}.bind();function Fs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(t){Ms[t]=Ms(t)}));const Ls=er(Fs),Ds=Ms.td`
3
+ `}),io(Ji,{styles:so})]});let lo;const uo=()=>Bn(lo);class co extends Error{constructor(e,t){super(e),__publicField(this,"response"),this.response=t}}const ho=async(e,t,n,r)=>{await po(e,t,n,r,!0)},po=async(e,t,n,r,i)=>{const o=await fetch(e,{method:n,body:r?JSON.stringify(r):void 0,headers:{"content-type":"application/json","x-app-version":"0.3.7296",authorization:`Bearer ${t}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!o.ok)throw new co(`[API Error] Status: ${o.statusText}. Response: ${await o.text()}`,o);return i?{}:await o.json()},fo=e=>async t=>{const n=new URL(`${e.url}/promoted-benefits/admin/v1.0/promotion`);return ho(n,e.accessToken,"POST",t)},mo=e=>t=>async n=>{const r=new URL(`${e.url}/promoted-benefits/admin/v1.0/promotion/${t}`);return ho(r,e.accessToken,"PUT",n)},vo=()=>{const e=uo();return{getAllPromotions:(t=e.backend,async()=>{const e=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`);return po(e,t.accessToken,"GET")}),createPromotion:fo(e.backend),updatePromotion:mo(e.backend)};var t};var go=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(){}},yo="undefined"==typeof window||"Deno"in globalThis;function _o(){}function wo(e){return"number"==typeof e&&e>=0&&e!==1/0}function bo(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xo(e,t){return"function"==typeof e?e(t):e}function So(e,t){return"function"==typeof e?e(t):e}function ko(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s)if(r){if(t.queryHash!==Po(s,t.options))return!1}else if(!Ao(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function Eo(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(To(t.options.mutationKey)!==To(o))return!1}else if(!Ao(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function Po(e,t){return((null==t?void 0:t.queryKeyHashFn)||To)(e)}function To(e){return JSON.stringify(e,((e,t)=>Fo(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function Ao(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!Ao(e[n],t[n]))))}function Co(e,t){if(e===t)return e;const n=Oo(e)&&Oo(t);if(n||Fo(e)&&Fo(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let l=0;for(let u=0;u<s;u++){const i=n?u:o[u];(!n&&r.includes(i)||n)&&void 0===e[i]&&void 0===t[i]?(a[i]=void 0,l++):(a[i]=Co(e[i],t[i]),a[i]===e[i]&&void 0!==e[i]&&l++)}return i===s&&l===i?e:a}return t}function Ro(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Oo(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Fo(e){if(!Mo(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Mo(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Mo(e){return"[object Object]"===Object.prototype.toString.call(e)}function Lo(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?Co(e,t):t}function Do(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Vo(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Io=Symbol();function jo(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==Io?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var Bo=new(r=class extends go{constructor(){super(),__privateAdd(this,e),__privateAdd(this,t),__privateAdd(this,n),__privateSet(this,n,(e=>{if(!yo&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){__privateGet(this,t)||this.setEventListener(__privateGet(this,n))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,t))||e.call(this),__privateSet(this,t,void 0))}setEventListener(e){var r;__privateSet(this,n,e),null==(r=__privateGet(this,t))||r.call(this),__privateSet(this,t,e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})))}setFocused(t){__privateGet(this,e)!==t&&(__privateSet(this,e,t),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var t;return"boolean"==typeof __privateGet(this,e)?__privateGet(this,e):"hidden"!==(null==(t=globalThis.document)?void 0:t.visibilityState)}},e=new WeakMap,t=new WeakMap,n=new WeakMap,r),No=new(a=class extends go{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,s),__privateSet(this,s,(e=>{if(!yo&&window.addEventListener){const 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(){__privateGet(this,o)||this.setEventListener(__privateGet(this,s))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,void 0))}setEventListener(e){var t;__privateSet(this,s,e),null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,e(this.setOnline.bind(this)))}setOnline(e){__privateGet(this,i)!==e&&(__privateSet(this,i,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,s=new WeakMap,a);function Uo(e){return Math.min(1e3*2**e,3e4)}function Go(e){return"online"!==(e??"online")||No.isOnline()}var Wo=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function Ho(e){return e instanceof Wo}function $o(e){let t,n,r,i=!1,o=0,s=!1;const a=new Promise(((e,t)=>{n=e,r=t})),l=()=>Bo.isFocused()&&("always"===e.networkMode||No.isOnline())&&e.canRun(),u=()=>Go(e.networkMode)&&e.canRun(),c=r=>{var i;s||(s=!0,null==(i=e.onSuccess)||i.call(e,r),null==t||t(),n(r))},d=n=>{var i;s||(s=!0,null==(i=e.onError)||i.call(e,n),null==t||t(),r(n))},h=()=>new Promise((n=>{var r;t=e=>{(s||l())&&n(e)},null==(r=e.onPause)||r.call(e)})).then((()=>{var n;t=void 0,s||null==(n=e.onContinue)||n.call(e)})),p=()=>{if(s)return;let t;const n=0===o?e.initialPromise:void 0;try{t=n??e.fn()}catch(r){t=Promise.reject(r)}Promise.resolve(t).then(c).catch((t=>{var n;if(s)return;const r=e.retry??(yo?0:3),a=e.retryDelay??Uo,u="function"==typeof a?a(o,t):a,c=!0===r||"number"==typeof r&&o<r||"function"==typeof r&&r(o,t);var f;!i&&c?(o++,null==(n=e.onFail)||n.call(e,o,t),(f=u,new Promise((e=>{setTimeout(e,f)}))).then((()=>l()?void 0:h())).then((()=>{i?d(t):p()}))):d(t)}))};return{promise:a,cancel:t=>{var n;s||(d(new Wo(t)),null==(n=e.abort)||n.call(e))},continue:()=>(null==t||t(),a),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:u,start:()=>(u()?p():h().then(p),a)}}var zo=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0);const o=r=>{t?e.push(r):i((()=>{n(r)}))};return{batch:o=>{let s;t++;try{s=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return s},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),qo=(u=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wo(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(yo?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,u),Ko=(y=class extends qo{constructor(e){super(),__privateAdd(this,v),__privateAdd(this,c),__privateAdd(this,d),__privateAdd(this,h),__privateAdd(this,p),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,e.defaultOptions),this.setOptions(e.options),this.observers=[],__privateSet(this,h,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,__privateSet(this,c,function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?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"}}(this.options)),this.state=e.state??__privateGet(this,c),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null==(e=__privateGet(this,p))?void 0:e.promise}setOptions(e){this.options={...__privateGet(this,f),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,h).remove(this)}setData(e,t){const n=Lo(this.state.data,e,this.options);return __privateMethod(this,v,g).call(this,{data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){__privateMethod(this,v,g).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,n;const r=null==(t=__privateGet(this,p))?void 0:t.promise;return null==(n=__privateGet(this,p))||n.cancel(e),r?r.then(_o).catch(_o):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,c))}isActive(){return this.observers.some((e=>!1!==So(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!bo(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,p))||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,p))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),__privateGet(this,h).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(__privateGet(this,p)&&(__privateGet(this,m)?__privateGet(this,p).cancel({revert:!0}):__privateGet(this,p).cancelRetry()),this.scheduleGc()),__privateGet(this,h).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(e,t){var n,r,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,p))return __privateGet(this,p).continueRetry(),__privateGet(this,p).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=new AbortController,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},a={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=jo(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return s(n),__privateSet(this,m,!1),this.options.persister?this.options.persister(e,n,this):e(n)}};s(a),null==(n=this.options.behavior)||n.onFetch(a,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(r=a.fetchOptions)?void 0:r.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=a.fetchOptions)?void 0:i.meta});const l=e=>{var t,n,r,i;Ho(e)&&e.silent||__privateMethod(this,v,g).call(this,{type:"error",error:e}),Ho(e)||(null==(n=(t=__privateGet(this,h).config).onError)||n.call(t,e,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return __privateSet(this,p,$o({initialPromise:null==t?void 0:t.initialPromise,fn:a.fetchFn,abort:o.abort.bind(o),onSuccess:e=>{var t,n,r,i;if(void 0!==e){try{this.setData(e)}catch(o){return void l(o)}null==(n=(t=__privateGet(this,h).config).onSuccess)||n.call(t,e,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(e,t)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),__privateGet(this,p).start()}},c=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(e){this.state=(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,...Yo(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return Ho(n)&&n.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),zo.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),__privateGet(this,h).notify({query:this,type:"updated",action:e})}))},y);function Yo(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Go(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var Qo=(w=class extends go{constructor(e={}){super(),__privateAdd(this,_),this.config=e,__privateSet(this,_,new Map)}build(e,t,n){const r=t.queryKey,i=t.queryHash??Po(r,t);let o=this.get(i);return o||(o=new Ko({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){__privateGet(this,_).has(e.queryHash)||(__privateGet(this,_).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=__privateGet(this,_).get(e.queryHash);t&&(e.destroy(),t===e&&__privateGet(this,_).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){zo.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return __privateGet(this,_).get(e)}getAll(){return[...__privateGet(this,_).values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>ko(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>ko(e,t))):t}notify(e){zo.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){zo.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){zo.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},_=new WeakMap,w),Xo=(P=class extends qo{constructor(e){super(),__privateAdd(this,k),__privateAdd(this,b),__privateAdd(this,x),__privateAdd(this,S),this.mutationId=e.mutationId,__privateSet(this,x,e.mutationCache),__privateSet(this,b,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){__privateGet(this,b).includes(e)||(__privateGet(this,b).push(e),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){__privateSet(this,b,__privateGet(this,b).filter((t=>t!==e))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){__privateGet(this,b).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var e;return(null==(e=__privateGet(this,S))?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var t,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,w;__privateSet(this,S,$o({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{__privateMethod(this,k,E).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,k,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,k,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const b="pending"===this.state.status,P=!__privateGet(this,S).canStart();try{if(!b){__privateMethod(this,k,E).call(this,{type:"pending",variables:e,isPaused:P}),await(null==(n=(t=__privateGet(this,x).config).onMutate)?void 0:n.call(t,e,this));const o=await(null==(i=(r=this.options).onMutate)?void 0:i.call(r,e));o!==this.state.context&&__privateMethod(this,k,E).call(this,{type:"pending",context:o,variables:e,isPaused:P})}const p=await __privateGet(this,S).start();return await(null==(s=(o=__privateGet(this,x).config).onSuccess)?void 0:s.call(o,p,e,this.state.context,this)),await(null==(l=(a=this.options).onSuccess)?void 0:l.call(a,p,e,this.state.context)),await(null==(c=(u=__privateGet(this,x).config).onSettled)?void 0:c.call(u,p,null,this.state.variables,this.state.context,this)),await(null==(h=(d=this.options).onSettled)?void 0:h.call(d,p,null,e,this.state.context)),__privateMethod(this,k,E).call(this,{type:"success",data:p}),p}catch(T){try{throw await(null==(f=(p=__privateGet(this,x).config).onError)?void 0:f.call(p,T,e,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,e,this.state.context)),await(null==(y=(g=__privateGet(this,x).config).onSettled)?void 0:y.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(w=(_=this.options).onSettled)?void 0:w.call(_,void 0,T,e,this.state.context)),T}finally{__privateMethod(this,k,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},b=new WeakMap,x=new WeakMap,S=new WeakMap,k=new WeakSet,E=function(e){this.state=(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),zo.batch((()=>{__privateGet(this,b).forEach((t=>{t.onMutationUpdate(e)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:e})}))},P);var Zo=(C=class extends go{constructor(e={}){super(),__privateAdd(this,T),__privateAdd(this,A),this.config=e,__privateSet(this,T,new Map),__privateSet(this,A,Date.now())}build(e,t,n){const r=new Xo({mutationCache:this,mutationId:++__privateWrapper(this,A)._,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=Jo(e),n=__privateGet(this,T).get(t)??[];n.push(e),__privateGet(this,T).set(t,n),this.notify({type:"added",mutation:e})}remove(e){var t;const n=Jo(e);if(__privateGet(this,T).has(n)){const r=null==(t=__privateGet(this,T).get(n))?void 0:t.filter((t=>t!==e));r&&(0===r.length?__privateGet(this,T).delete(n):__privateGet(this,T).set(n,r))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const n=null==(t=__privateGet(this,T).get(Jo(e)))?void 0:t.find((e=>"pending"===e.state.status));return!n||n===e}runNext(e){var t;const n=null==(t=__privateGet(this,T).get(Jo(e)))?void 0:t.find((t=>t!==e&&t.state.isPaused));return(null==n?void 0:n.continue())??Promise.resolve()}clear(){zo.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>Eo(t,e)))}findAll(e={}){return this.getAll().filter((t=>Eo(e,t)))}notify(e){zo.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return zo.batch((()=>Promise.all(e.map((e=>e.continue().catch(_o))))))}},T=new WeakMap,A=new WeakMap,C);function Jo(e){var t;return(null==(t=e.options.scope)?void 0:t.id)??String(e.mutationId)}function es(e){return{onFetch:(t,n)=>{var r,i,o,s,a;const l=t.options,u=null==(o=null==(i=null==(r=t.fetchOptions)?void 0:r.meta)?void 0:i.fetchMore)?void 0:o.direction,c=(null==(s=t.state.data)?void 0:s.pages)||[],d=(null==(a=t.state.data)?void 0:a.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const f=async()=>{let n=!1;const r=jo(t.options,t.fetchOptions),i=async(e,i,o)=>{if(n)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const s={queryKey:t.queryKey,pageParam:i,direction:o?"backward":"forward",meta:t.options.meta};var a;a=s,Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",(()=>{n=!0})),t.signal)});const l=await r(s),{maxPages:u}=t.options,c=o?Vo:Do;return{pages:c(e.pages,l,u),pageParams:c(e.pageParams,i,u)}};if(u&&c.length){const e="backward"===u,t={pages:c,pageParams:d},n=(e?ns:ts)(l,t);h=await i(t,n,e)}else{const t=e??c.length;do{const e=0===p?d[0]??l.initialPageParam:ts(l,h);if(p>0&&null==e)break;h=await i(h,e),p++}while(p<t)}return h};t.options.persister?t.fetchFn=()=>{var e,r;return null==(r=(e=t.options).persister)?void 0:r.call(e,f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function ts(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ns(e,{pages:t,pageParams:n}){var r;return t.length>0?null==(r=e.getPreviousPageParam)?void 0:r.call(e,t[0],t,n[0],n):void 0}var rs=(j=class{constructor(e={}){__privateAdd(this,R),__privateAdd(this,O),__privateAdd(this,F),__privateAdd(this,M),__privateAdd(this,L),__privateAdd(this,D),__privateAdd(this,V),__privateAdd(this,I),__privateSet(this,R,e.queryCache||new Qo),__privateSet(this,O,e.mutationCache||new Zo),__privateSet(this,F,e.defaultOptions||{}),__privateSet(this,M,new Map),__privateSet(this,L,new Map),__privateSet(this,D,0)}mount(){__privateWrapper(this,D)._++,1===__privateGet(this,D)&&(__privateSet(this,V,Bo.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,R).onFocus())}))),__privateSet(this,I,No.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,R).onOnline())}))))}unmount(){var e,t;__privateWrapper(this,D)._--,0===__privateGet(this,D)&&(null==(e=__privateGet(this,V))||e.call(this),__privateSet(this,V,void 0),null==(t=__privateGet(this,I))||t.call(this),__privateSet(this,I,void 0))}isFetching(e){return __privateGet(this,R).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return __privateGet(this,O).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,R).get(n.queryHash))?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=__privateGet(this,R).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(xo(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return __privateGet(this,R).findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=__privateGet(this,R).get(r.queryHash),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,R).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return zo.batch((()=>__privateGet(this,R).findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,R).get(n.queryHash))?void 0:t.state}removeQueries(e){const t=__privateGet(this,R);zo.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=__privateGet(this,R),r={type:"active",...e};return zo.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(r,t))))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=zo.batch((()=>__privateGet(this,R).findAll(e).map((e=>e.cancel(n)))));return Promise.all(r).then(_o).catch(_o)}invalidateQueries(e={},t={}){return zo.batch((()=>{if(__privateGet(this,R).findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)}))}refetchQueries(e={},t){const n={...t,cancelRefetch:(null==t?void 0:t.cancelRefetch)??!0},r=zo.batch((()=>__privateGet(this,R).findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(_o)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(r).then(_o)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=__privateGet(this,R).build(this,t);return n.isStaleByTime(xo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_o).catch(_o)}fetchInfiniteQuery(e){return e.behavior=es(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_o).catch(_o)}ensureInfiniteQueryData(e){return e.behavior=es(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return No.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,R)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,F)}setDefaultOptions(e){__privateSet(this,F,e)}setQueryDefaults(e,t){__privateGet(this,M).set(To(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...__privateGet(this,M).values()];let n={};return t.forEach((t=>{Ao(e,t.queryKey)&&(n={...n,...t.defaultOptions})})),n}setMutationDefaults(e,t){__privateGet(this,L).set(To(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...__privateGet(this,L).values()];let n={};return t.forEach((t=>{Ao(e,t.mutationKey)&&(n={...n,...t.defaultOptions})})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...__privateGet(this,F).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Po(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===Io&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...__privateGet(this,F).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){__privateGet(this,R).clear(),__privateGet(this,O).clear()}},R=new WeakMap,O=new WeakMap,F=new WeakMap,M=new WeakMap,L=new WeakMap,D=new WeakMap,V=new WeakMap,I=new WeakMap,j),is=(ue=class extends go{constructor(e,t){super(),__privateAdd(this,J),__privateAdd(this,B),__privateAdd(this,N),__privateAdd(this,U),__privateAdd(this,G),__privateAdd(this,W),__privateAdd(this,H),__privateAdd(this,$),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,Y),__privateAdd(this,Q),__privateAdd(this,X),__privateAdd(this,Z,new Set),this.options=t,__privateSet(this,B,e),__privateSet(this,$,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,N).addObserver(this),os(__privateGet(this,N),this.options)?__privateMethod(this,J,ee).call(this):this.updateResult(),__privateMethod(this,J,ie).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ss(__privateGet(this,N),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ss(__privateGet(this,N),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,J,oe).call(this),__privateMethod(this,J,se).call(this),__privateGet(this,N).removeObserver(this)}setOptions(e,t){const n=this.options,r=__privateGet(this,N);if(this.options=__privateGet(this,B).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof So(this.options.enabled,__privateGet(this,N)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,J,ae).call(this),__privateGet(this,N).setOptions(this.options),n._defaulted&&!Ro(this.options,n)&&__privateGet(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,N),observer:this});const i=this.hasListeners();i&&as(__privateGet(this,N),r,this.options,n)&&__privateMethod(this,J,ee).call(this),this.updateResult(t),!i||__privateGet(this,N)===r&&So(this.options.enabled,__privateGet(this,N))===So(n.enabled,__privateGet(this,N))&&xo(this.options.staleTime,__privateGet(this,N))===xo(n.staleTime,__privateGet(this,N))||__privateMethod(this,J,te).call(this);const o=__privateMethod(this,J,ne).call(this);!i||__privateGet(this,N)===r&&So(this.options.enabled,__privateGet(this,N))===So(n.enabled,__privateGet(this,N))&&o===__privateGet(this,X)||__privateMethod(this,J,re).call(this,o)}getOptimisticResult(e){const t=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),e),n=this.createResult(t,e);return function(e,t){if(!Ro(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(__privateSet(this,G,n),__privateSet(this,H,this.options),__privateSet(this,W,__privateGet(this,N).state)),n}getCurrentResult(){return __privateGet(this,G)}trackResult(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),null==t||t(r),e[r])})})),n}trackProp(e){__privateGet(this,Z).add(e)}getCurrentQuery(){return __privateGet(this,N)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=__privateGet(this,B).defaultQueryOptions(e),n=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){return __privateMethod(this,J,ee).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,G))))}createResult(e,t){var n;const r=__privateGet(this,N),i=this.options,o=__privateGet(this,G),s=__privateGet(this,W),a=__privateGet(this,H),l=e!==r?e.state:__privateGet(this,U),{state:u}=e;let c,d={...u},h=!1;if(t._optimisticResults){const n=this.hasListeners(),o=!n&&os(e,t),s=n&&as(e,r,t,i);(o||s)&&(d={...d,...Yo(u.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:f,status:m}=d;if(t.select&&void 0!==d.data)if(o&&d.data===(null==s?void 0:s.data)&&t.select===__privateGet(this,z))c=__privateGet(this,q);else try{__privateSet(this,z,t.select),c=t.select(d.data),c=Lo(null==o?void 0:o.data,c,t),__privateSet(this,q,c),__privateSet(this,$,null)}catch(b){__privateSet(this,$,b)}else c=d.data;if(void 0!==t.placeholderData&&void 0===c&&"pending"===m){let e;if((null==o?void 0:o.isPlaceholderData)&&t.placeholderData===(null==a?void 0:a.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(null==(n=__privateGet(this,K))?void 0:n.state.data,__privateGet(this,K)):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),__privateSet(this,$,null)}catch(b){__privateSet(this,$,b)}void 0!==e&&(m="success",c=Lo(null==o?void 0:o.data,e,t),h=!0)}__privateGet(this,$)&&(p=__privateGet(this,$),c=__privateGet(this,q),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,y="error"===m,_=g&&v,w=void 0!==c;return{status:m,fetchStatus:d.fetchStatus,isPending:g,isSuccess:"success"===m,isError:y,isInitialLoading:_,isLoading:_,data:c,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!g,isLoadingError:y&&!w,isPaused:"paused"===d.fetchStatus,isPlaceholderData:h,isRefetchError:y&&w,isStale:ls(e,t),refetch:this.refetch}}updateResult(e){const t=__privateGet(this,G),n=this.createResult(__privateGet(this,N),this.options);if(__privateSet(this,W,__privateGet(this,N).state),__privateSet(this,H,this.options),void 0!==__privateGet(this,W).data&&__privateSet(this,K,__privateGet(this,N)),Ro(n,t))return;__privateSet(this,G,n);const r={};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!__privateGet(this,Z).size)return!0;const r=new Set(n??__privateGet(this,Z));return this.options.throwOnError&&r.add("error"),Object.keys(__privateGet(this,G)).some((e=>{const n=e;return __privateGet(this,G)[n]!==t[n]&&r.has(n)}))})()&&(r.listeners=!0),__privateMethod(this,J,le).call(this,{...r,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,J,ie).call(this)}},B=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,$=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,Y=new WeakMap,Q=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakSet,ee=function(e){__privateMethod(this,J,ae).call(this);let t=__privateGet(this,N).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(_o)),t},te=function(){__privateMethod(this,J,oe).call(this);const e=xo(this.options.staleTime,__privateGet(this,N));if(yo||__privateGet(this,G).isStale||!wo(e))return;const t=bo(__privateGet(this,G).dataUpdatedAt,e);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,G).isStale||this.updateResult()}),t+1))},ne=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,N)):this.options.refetchInterval)??!1},re=function(e){__privateMethod(this,J,se).call(this),__privateSet(this,X,e),!yo&&!1!==So(this.options.enabled,__privateGet(this,N))&&wo(__privateGet(this,X))&&0!==__privateGet(this,X)&&__privateSet(this,Q,setInterval((()=>{(this.options.refetchIntervalInBackground||Bo.isFocused())&&__privateMethod(this,J,ee).call(this)}),__privateGet(this,X)))},ie=function(){__privateMethod(this,J,te).call(this),__privateMethod(this,J,re).call(this,__privateMethod(this,J,ne).call(this))},oe=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},se=function(){__privateGet(this,Q)&&(clearInterval(__privateGet(this,Q)),__privateSet(this,Q,void 0))},ae=function(){const e=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),this.options);if(e===__privateGet(this,N))return;const t=__privateGet(this,N);__privateSet(this,N,e),__privateSet(this,U,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))},le=function(e){zo.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(__privateGet(this,G))})),__privateGet(this,B).getQueryCache().notify({query:__privateGet(this,N),type:"observerResultsUpdated"})}))},ue);function os(e,t){return function(e,t){return!1!==So(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&ss(e,t,t.refetchOnMount)}function ss(e,t,n){if(!1!==So(t.enabled,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&ls(e,t)}return!1}function as(e,t,n,r){return(e!==t||!1===So(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&ls(e,n)}function ls(e,t){return!1!==So(t.enabled,e)&&e.isStaleByTime(xo(t.staleTime,e))}var us=(ge=class extends go{constructor(e,t){super(),__privateAdd(this,fe),__privateAdd(this,ce),__privateAdd(this,de),__privateAdd(this,he),__privateAdd(this,pe),__privateSet(this,ce,e),this.setOptions(t),this.bindMethods(),__privateMethod(this,fe,me).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=__privateGet(this,ce).defaultMutationOptions(e),Ro(this.options,n)||__privateGet(this,ce).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,he),observer:this}),(null==n?void 0:n.mutationKey)&&this.options.mutationKey&&To(n.mutationKey)!==To(this.options.mutationKey)?this.reset():"pending"===(null==(t=__privateGet(this,he))?void 0:t.state.status)&&__privateGet(this,he).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||null==(e=__privateGet(this,he))||e.removeObserver(this)}onMutationUpdate(e){__privateMethod(this,fe,me).call(this),__privateMethod(this,fe,ve).call(this,e)}getCurrentResult(){return __privateGet(this,de)}reset(){var e;null==(e=__privateGet(this,he))||e.removeObserver(this),__privateSet(this,he,void 0),__privateMethod(this,fe,me).call(this),__privateMethod(this,fe,ve).call(this)}mutate(e,t){var n;return __privateSet(this,pe,t),null==(n=__privateGet(this,he))||n.removeObserver(this),__privateSet(this,he,__privateGet(this,ce).getMutationCache().build(__privateGet(this,ce),this.options)),__privateGet(this,he).addObserver(this),__privateGet(this,he).execute(e)}},ce=new WeakMap,de=new WeakMap,he=new WeakMap,pe=new WeakMap,fe=new WeakSet,me=function(){var e;const t=(null==(e=__privateGet(this,he))?void 0:e.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,de,{...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset})},ve=function(e){zo.batch((()=>{var t,n,r,i,o,s,a,l;if(__privateGet(this,pe)&&this.hasListeners()){const u=__privateGet(this,de).variables,c=__privateGet(this,de).context;"success"===(null==e?void 0:e.type)?(null==(n=(t=__privateGet(this,pe)).onSuccess)||n.call(t,e.data,u,c),null==(i=(r=__privateGet(this,pe)).onSettled)||i.call(r,e.data,null,u,c)):"error"===(null==e?void 0:e.type)&&(null==(s=(o=__privateGet(this,pe)).onError)||s.call(o,e.error,u,c),null==(l=(a=__privateGet(this,pe)).onSettled)||l.call(a,void 0,e.error,u,c))}this.listeners.forEach((e=>{e(__privateGet(this,de))}))}))},ge),cs=ot(void 0),ds=e=>{const t=Bn(cs);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hs=({client:e,children:t})=>(Mn((()=>(e.mount(),()=>{e.unmount()})),[e]),no(cs.Provider,{value:e,children:t})),ps=ot(!1),fs=()=>Bn(ps);ps.Provider;var ms=ot(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),vs=()=>Bn(ms);function gs(e,t){return"function"==typeof e?e(...t):!!e}function ys(){}var _s=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},ws=e=>{Mn((()=>{e.clearReset()}),[e])},bs=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&gs(n,[e.error,r]),xs=e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},Ss=(e,t)=>(null==e?void 0:e.suspense)&&t.isPending,ks=(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()}));function Es(e,t){return function(e,t){var n,r,i,o;const s=ds(),a=fs(),l=vs(),u=s.defaultQueryOptions(e);null==(r=null==(n=s.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||r.call(n,u),u._optimisticResults=a?"isRestoring":"optimistic",xs(u),_s(u,l),ws(l);const[c]=On((()=>new t(s,u))),d=c.getOptimisticResult(u);if(Yr(jn((e=>{const t=a?()=>{}:c.subscribe(zo.batchCalls(e));return c.updateResult(),t}),[c,a]),(()=>c.getCurrentResult())),Mn((()=>{c.setOptions(u,{listeners:!1})}),[u,c]),Ss(u,d))throw ks(u,c,l);if(bs({result:d,errorResetBoundary:l,throwOnError:u.throwOnError,query:s.getQueryCache().get(u.queryHash)}))throw d.error;return null==(o=null==(i=s.getDefaultOptions().queries)?void 0:i._experimental_afterQuery)||o.call(i,u,d),u.notifyOnChangeProps?d:c.trackResult(d)}(e,is)}var Ps=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ts=ln((function(e){return Ps.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),As=function(e){return"theme"!==e},Cs=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Ts:As},Rs=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Os=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Pi(t,n,r),Gi((function(){return Ti(t,n,r)})),null},Fs=function e(t,n){var r,i,o=t.__emotion_real===t,s=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var a=Rs(t,n,o),l=a||Cs(s),u=!l("as");return function(){var c=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,p=1;p<h;p++)d.push(c[p],c[0][p])}var f=zi((function(e,t,n){var r=u&&e.as||s,o="",c=[],h=e;if(null==e.theme){for(var p in h={},e)h[p]=e[p];h.theme=Bn(qi)}"string"==typeof e.className?o=Ei(t.registered,c,e.className):null!=e.className&&(o=e.className+" ");var f=Ni(d.concat(c),t.registered,h);o+=t.key+"-"+f.name,void 0!==i&&(o+=" "+i);var m=u&&void 0===a?Cs(r):l,v={};for(var g in e)u&&"as"===g||m(g)&&(v[g]=e[g]);return v.className=o,n&&(v.ref=n),De(je,null,De(Os,{cache:t,serialized:f,isStringTag:"string"==typeof r}),De(r,v))}));return f.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",f.defaultProps=t.defaultProps,f.__emotion_real=f,f.__emotion_base=s,f.__emotion_styles=d,f.__emotion_forwardProp=a,Object.defineProperty(f,"toString",{value:function(){return"."+i}}),f.withComponent=function(t,r){return e(t,Jr({},n,r,{shouldForwardProp:Rs(f,r,!0)})).apply(void 0,d)},f}}.bind();function Ms({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Fs[e]=Fs(e)}));const Ls=tr(Ms);function Ds({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Vs=tr(Ds),Is=Fs.td`
4
4
  ${{whiteSpace:"nowrap",paddingTop:"1rem",paddingBottom:"1rem",paddingLeft:"1rem",paddingRight:"0.75rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}}
5
- `,Vs=Ms.td`
5
+ `,js=Fs.td`
6
6
  ${{whiteSpace:"nowrap",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"1.25rem",paddingBottom:"1.25rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"}}
7
- `,Is=Ms.span({display:"inline-flex",alignItems:"center",borderRadius:"0.375rem",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset"},(t=>t.className)),js=t=>{const e=new Date(t.value);return oo(Ds,{children:[e.toLocaleDateString(),io("br",{}),e.toLocaleTimeString()]})},Bs=t=>t.url?io(Vs,{children:oo(Is,{as:"a",href:t.url,target:"_blank",rel:"noopener noreferrer",css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:[io("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),io(Ls,{css:{marginTop:"auto",marginBottom:"auto",marginLeft:"0.25rem",height:"0.75rem",width:"0.75rem"}})]})}):io(Vs,{children:io(Is,{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-color":"rgb(220 38 38 / 0.2)"},children:"Unlinked"})}),Ns=t=>io(Vs,{children:io("button",{as:"button",onClick:()=>t.onClick(t.id),css:{display:"inline-flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingLeft:"0.25rem",paddingRight:"0.25rem"},children:t.children})}),Us=(t,e,n)=>{var r;switch(null==n?void 0:n.kind){case"status":return io(Vs,{children:io(Is,{className:null==(r=n.styleOverrides)?void 0:r[e],children:e})});case"date":return io(js,{value:e});case"link":return io(Bs,{url:e});case"button":return io(Ns,{id:t,value:e,onClick:n.onClick,children:n.children});default:return io(Ds,{children:e})}},Gs=Ms.input`
7
+ `,Bs=Fs.span({display:"inline-flex",alignItems:"center",borderRadius:"0.375rem",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset"},(e=>e.className)),Ns=e=>{const t=new Date(e.value);return oo(Is,{children:[t.toLocaleDateString(),io("br",{}),t.toLocaleTimeString()]})},Us=e=>e.url?io(js,{children:oo(Bs,{as:"a",href:e.url,target:"_blank",rel:"noopener noreferrer",css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:[io("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),io(Ls,{css:{marginTop:"auto",marginBottom:"auto",marginLeft:"0.25rem",height:"0.75rem",width:"0.75rem"}})]})}):io(js,{children:io(Bs,{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-color":"rgb(220 38 38 / 0.2)"},children:"Unlinked"})}),Gs=e=>io(js,{children:io("button",{as:"button",onClick:()=>e.onClick(e.id),css:{display:"inline-flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingLeft:"0.25rem",paddingRight:"0.25rem"},children:e.children})}),Ws=(e,t,n)=>{var r;switch(null==n?void 0:n.kind){case"status":return io(js,{children:io(Bs,{className:null==(r=n.styleOverrides)?void 0:r[t],children:t})});case"date":return io(Ns,{value:t});case"link":return io(Us,{url:t});case"button":return io(Gs,{id:e,value:t,onClick:n.onClick,children:n.children});default:return io(Is,{children:t})}},Hs=Fs.input`
8
8
  ${()=>({display:"block",minHeight:"2.25rem",width:"100%",borderRadius:"0.375rem",borderWidth:"0px",paddingTop:"0.375rem",paddingBottom:"0.375rem",paddingRight:"5rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","::placeholder":{"--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))"},":focus":{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset"},":disabled":{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.5rem"}})}
9
9
 
10
- ${({prefix:t})=>t?{paddingLeft:"1.75rem"}:{paddingLeft:"0.75rem"}}
10
+ ${({prefix:e})=>e?{paddingLeft:"2.5rem"}:{paddingLeft:"0.75rem"}}
11
11
 
12
- ${({hasError:t})=>t?{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(252 165 165 / var(--tw-ring-opacity))",":focus":{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity))"}}:{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(209 213 219 / var(--tw-ring-opacity))",":focus":{"--tw-ring-color":"var(--fl-color-primary-600)"}}}
13
- `,Ws=er((({label:t,id:e,type:n,placeholder:r,setPlaceholderOnFocus:i,value:o,className:s,onChange:a,onBlur:l,error:u,helperText:c,disabled:d},h)=>oo("div",{className:s,children:[io("label",{htmlFor:e,css:{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:t}),io("div",{css:{marginTop:"0.5rem"},children:io(Gs,{type:n,value:o,name:e,id:e,placeholder:r,onChange:t=>{const e=t;e.target instanceof HTMLInputElement&&a(e.target.value.trim())},onBlur:t=>{const e=t;e.target instanceof HTMLInputElement&&l&&l(e.target.value.trim())},onFocus:()=>{r&&i&&!(null==o?void 0:o.trim())&&a(r)},hasError:!!u,ref:h,disabled:d})}),u&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:u}),c&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:c})]})));function Hs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const $s=er(Hs);function zs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{fillRule:"evenodd",d:"M10 17a.75.75 0 0 1-.75-.75V5.612L5.29 9.77a.75.75 0 0 1-1.08-1.04l5.25-5.5a.75.75 0 0 1 1.08 0l5.25 5.5a.75.75 0 1 1-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0 1 10 17Z",clipRule:"evenodd"}))}const qs=er(zs);function Ks({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{fillRule:"evenodd",d:"M2.24 6.8a.75.75 0 0 0 1.06-.04l1.95-2.1v8.59a.75.75 0 0 0 1.5 0V4.66l1.95 2.1a.75.75 0 1 0 1.1-1.02l-3.25-3.5a.75.75 0 0 0-1.1 0L2.2 5.74a.75.75 0 0 0 .04 1.06Zm8 6.4a.75.75 0 0 0-.04 1.06l3.25 3.5a.75.75 0 0 0 1.1 0l3.25-3.5a.75.75 0 1 0-1.1-1.02l-1.95 2.1V6.75a.75.75 0 0 0-1.5 0v8.59l-1.95-2.1a.75.75 0 0 0-1.06-.04Z",clipRule:"evenodd"}))}const Ys=er(Ks);function Qs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const Xs=er(Qs);function Zs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Js=er(Zs);function ta({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{d:"m5.433 13.917 1.262-3.155A4 4 0 0 1 7.58 9.42l6.92-6.918a2.121 2.121 0 0 1 3 3l-6.92 6.918c-.383.383-.84.685-1.343.886l-3.154 1.262a.5.5 0 0 1-.65-.65Z"}),Dt("path",{d:"M3.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0 0 10 3H4.75A2.75 2.75 0 0 0 2 5.75v9.5A2.75 2.75 0 0 0 4.75 18h9.5A2.75 2.75 0 0 0 17 15.25V10a.75.75 0 0 0-1.5 0v5.25c0 .69-.56 1.25-1.25 1.25h-9.5c-.69 0-1.25-.56-1.25-1.25v-9.5Z"}))}const ea=er(ta),na=t=>{const[e,n]=On(),[r,i]=On(),[o,s]=On("asc"),a=In((()=>r?[...t.data].sort(((t,e)=>{const n=r.sort?r.sort(t[r.field],e[r.field]):t[r.field].localeCompare(e[r.field]);return"desc"===o?-1*n:n})):t.data),[t.data,r,o]),l=In((()=>e?a.filter((t=>t.id.toLowerCase().includes(e.toLowerCase()))):a),[a,e]);return io(ro,{children:oo("div",{css:{paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[oo("div",{css:{"@media (min-width: 640px)":{display:"flex",alignItems:"center"}},children:[oo("div",{css:{"@media (min-width: 640px)":{flex:"1 1 auto"}},children:[io("h1",{css:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:t.title}),io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"},children:t.subtitle}),io(Ws,{css:{marginTop:"0.5rem",maxWidth:"20rem"},label:"Search",id:"search",type:"text",onChange:t=>n(t)})]}),io("div",{css:{marginTop:"1rem","@media (min-width: 640px)":{marginLeft:"4rem",marginTop:"0px",flex:"none"}},children:io("button",{type:"button",onClick:t.onAdd,css:{display:"block",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:t.addButtonText})})]}),io("div",{css:{marginTop:"2rem",display:"flow-root"},children:io("div",{css:{marginLeft:"-1rem",marginRight:"-1rem",marginTop:"-0.5rem",marginBottom:"-0.5rem",overflowX:"auto","@media (min-width: 640px)":{marginLeft:"-1.5rem",marginRight:"-1.5rem"},"@media (min-width: 1024px)":{marginLeft:"-2rem",marginRight:"-2rem"}},children:io("div",{css:{display:"inline-block",minWidth:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem",verticalAlign:"middle","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:io("div",{css:{overflow:"hidden","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:oo("table",{css:{minWidth:"100%","> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-divide-opacity))"}},children:[io("thead",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},children:io("tr",{children:t.columns.map((t=>io("th",{scope:"col",css:{paddingTop:"0.875rem",paddingBottom:"0.875rem",paddingLeft:"1rem",paddingRight:"0.75rem",textAlign:"left",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:oo("button",{onClick:()=>(t=>{r===t?s("asc"===o?"desc":"asc"):(i(t),s("asc"))})(t),css:{display:"inline-flex"},children:[io("span",{children:t.name}),t.isSortable&&oo("span",{css:{marginLeft:"0.5rem"},children:[r===t&&"asc"===o&&io($s,{css:{height:"1.25rem",width:"1.25rem"}}),r===t&&"desc"===o&&io(qs,{css:{height:"1.25rem",width:"1.25rem"}}),r!==t&&io(Ys,{css:{height:"1.25rem",width:"1.25rem"}})]})]})},t.field)))})}),io("tbody",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-divide-opacity))"},"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))"},children:l.map(((e,n)=>io("tr",{children:t.columns.map(((t,r)=>io(jt,{children:Us(e.id,e[t.field],t.type)},`${e[t.field]}-${n}-${r}`)))},`${e[t.columns[0].field]}-${n}`)))})]})})})})})]})})};
12
+ ${({hasError:e})=>e?{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(252 165 165 / var(--tw-ring-opacity))",":focus":{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity))"}}:{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(209 213 219 / var(--tw-ring-opacity))",":focus":{"--tw-ring-color":"var(--fl-color-primary-600)"}}}
13
+ `;function $s({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const zs=tr($s);function qs({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Ks=tr(qs),Ys=tr((({label:e,id:t,type:n,icon:r,placeholder:i,setPlaceholderOnFocus:o,value:s,className:a,onChange:l,onBlur:u,error:c,helperText:d,disabled:h,remove:p},f)=>oo("div",{className:a,children:[e&&io("label",{htmlFor:t,css:{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[r&&io("span",{css:{position:"absolute",marginLeft:"0.5rem",marginTop:"0.5rem"},children:r}),oo("div",{css:{marginTop:"0.5rem",display:"flex",alignItems:"center"},children:[io(Hs,{type:n,value:s,name:t,id:t,placeholder:i,onChange:e=>{const t=e;t.target instanceof HTMLInputElement&&l(t.target.value.trim())},onBlur:e=>{const t=e;t.target instanceof HTMLInputElement&&u&&u(t.target.value.trim())},onFocus:()=>{i&&o&&!(null==s?void 0:s.trim())&&l(i)},hasError:!!c,ref:f,disabled:h,prefix:!!r}),p&&io(Ks,{css:{marginLeft:"0.5rem",height:"1.25rem",width:"1.25rem"},onClick:()=>p()})]})]}),c&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:c}),d&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:d})]})));function Qs({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const Xs=tr(Qs);function Zs({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M10 17a.75.75 0 0 1-.75-.75V5.612L5.29 9.77a.75.75 0 0 1-1.08-1.04l5.25-5.5a.75.75 0 0 1 1.08 0l5.25 5.5a.75.75 0 1 1-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0 1 10 17Z",clipRule:"evenodd"}))}const Js=tr(Zs);function ea({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const ta=tr(ea);function na({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ra=tr(na);function ia({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{d:"m5.433 13.917 1.262-3.155A4 4 0 0 1 7.58 9.42l6.92-6.918a2.121 2.121 0 0 1 3 3l-6.92 6.918c-.383.383-.84.685-1.343.886l-3.154 1.262a.5.5 0 0 1-.65-.65Z"}),De("path",{d:"M3.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0 0 10 3H4.75A2.75 2.75 0 0 0 2 5.75v9.5A2.75 2.75 0 0 0 4.75 18h9.5A2.75 2.75 0 0 0 17 15.25V10a.75.75 0 0 0-1.5 0v5.25c0 .69-.56 1.25-1.25 1.25h-9.5c-.69 0-1.25-.56-1.25-1.25v-9.5Z"}))}const oa=tr(ia),sa=Fs.button({marginRight:"1rem",display:"inline-flex",alignItems:"center",borderRadius:"0.375rem",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},(e=>e.className),(({isActive:e})=>e&&{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))"})),aa={name:"All",filterFunction:()=>!0},la=e=>{const[t,n]=On(),[r,i]=On(aa),[o,s]=On(e.columns[0]),[a,l]=On("asc"),u=In((()=>o?[...e.data].sort(((e,t)=>{const n=o.sort?o.sort(e[o.field],t[o.field]):e[o.field].localeCompare(t[o.field]);return"desc"===a?-1*n:n})):e.data),[e.data,o,a]),c=In((()=>{const e=u.filter(r.filterFunction);return t?e.filter((e=>e.id.toLowerCase().includes(t.toLowerCase()))):e}),[u,t,r]),d=(e,t)=>{const n={name:e.name,filterFunction:n=>e.predicate(n[t.field])};return()=>i(n)};return io(ro,{children:oo("div",{css:{paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[oo("div",{css:{"@media (min-width: 640px)":{display:"flex",alignItems:"center"}},children:[oo("div",{css:{"@media (min-width: 640px)":{flex:"1 1 auto"}},children:[io("h1",{css:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.title}),io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"},children:e.subtitle}),io(Ys,{css:{marginTop:"0.5rem",maxWidth:"20rem"},label:"",icon:io(Vs,{css:{height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))"}}),placeholder:"Search...",id:"search",type:"text",onChange:e=>n(e)})]}),io("div",{css:{marginTop:"1rem","@media (min-width: 640px)":{marginLeft:"4rem",marginTop:"0px",flex:"none"}},children:io("button",{type:"button",onClick:e.onAdd,css:{display:"block",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:e.addButtonText})})]}),io("div",{css:{marginTop:"2rem",display:"flow-root"},children:io("div",{css:{marginLeft:"-1rem",marginRight:"-1rem",marginTop:"-0.5rem",marginBottom:"-0.5rem",overflowX:"auto","@media (min-width: 640px)":{marginLeft:"-1.5rem",marginRight:"-1.5rem"},"@media (min-width: 1024px)":{marginLeft:"-2rem",marginRight:"-2rem"}},children:io("div",{css:{display:"inline-block",minWidth:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem",verticalAlign:"middle","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:io("div",{css:{overflow:"hidden","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:oo("table",{css:{minWidth:"100%","> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-divide-opacity))"}},children:[io("thead",{children:io("tr",{children:oo("td",{css:{padding:"1rem"},colspan:e.columns.length,children:[io(sa,{onClick:()=>i(aa),isActive:r===aa,children:"All"}),e.columns.map((e=>{var t;return null==(t=e.filters)?void 0:t.map((t=>io(sa,{onClick:d(t,e),isActive:r.name===t.name,children:t.name},t.name)))}))]})})}),io("thead",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},children:io("tr",{children:e.columns.map((e=>io("th",{scope:"col",css:{paddingTop:"0.875rem",paddingBottom:"0.875rem",paddingLeft:"1rem",paddingRight:"0.75rem",textAlign:"left",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:oo("button",{disabled:!e.isSortable,onClick:()=>(e=>{o===e?l("asc"===a?"desc":"asc"):(s(e),l("asc"))})(e),css:{display:"inline-flex"},children:[io("span",{children:e.name}),oo("span",{css:{marginLeft:"0.5rem"},children:[o===e&&"asc"===a&&io(Xs,{css:{height:"1.25rem",width:"1.25rem"}}),o===e&&"desc"===a&&io(Js,{css:{height:"1.25rem",width:"1.25rem"}}),o!==e&&io("svg",{css:{height:"1.25rem",width:"1.25rem"}})]})]})},e.field)))})}),io("tbody",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-divide-opacity))"},"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))"},children:c.map(((t,n)=>io("tr",{children:e.columns.map(((e,r)=>io(je,{children:Ws(t.id,t[e.field],e.type)},`${t[e.field]}-${n}-${r}`)))},`${t[e.columns[0].field]}-${n}`)))})]})})})})})]})})};
14
14
  /**
15
15
  * @remix-run/router v1.19.2
16
16
  *
@@ -21,7 +21,7 @@ var __defProp=Object.defineProperty,__typeError=t=>{throw TypeError(t)},__defNor
21
21
  *
22
22
  * @license MIT
23
23
  */
24
- function ra(){return ra=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ra.apply(this,arguments)}var ia,oa;(oa=ia||(ia={})).Pop="POP",oa.Push="PUSH",oa.Replace="REPLACE";const sa="popstate";function aa(t){return void 0===t&&(t={}),function(t,e,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=ia.Pop,l=null,u=c();null==u&&(u=0,s.replaceState(ra({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=ia.Pop;let t=c(),e=null==t?null:t-u;u=t,l&&l({action:a,location:m.location,delta:e})}function h(t,e){a=ia.Push;let r=da(m.location,t,e);n&&n(r,t),u=c()+1;let d=ca(r,u),h=m.createHref(r);try{s.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(h)}o&&l&&l({action:a,location:m.location,delta:1})}function p(t,e){a=ia.Replace;let r=da(m.location,t,e);n&&n(r,t),u=c();let i=ca(r,u),d=m.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:m.location,delta:0})}function f(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:ha(t);return n=n.replace(/ $/,"%20"),la(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}let m={get action(){return a},get location(){return t(i,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(sa,d),l=t,()=>{i.removeEventListener(sa,d),l=null}},createHref:t=>e(i,t),createURL:f,encodeLocation(t){let e=f(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:h,replace:p,go:t=>s.go(t)};return m}((function(t,e){let{pathname:n="/",search:r="",hash:i=""}=pa(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),da("",{pathname:n,search:r,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");r=-1===n?e:e.slice(0,n)}return r+"#"+("string"==typeof e?e:ha(e))}),(function(t,e){ua("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}function la(t,e){if(!1===t||null==t)throw new Error(e)}function ua(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(Ty){}}}function ca(t,e){return{usr:t.state,key:t.key,idx:e}}function da(t,e,n,r){return void 0===n&&(n=null),ra({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?pa(e):e,{state:n,key:e&&e.key||r||Math.random().toString(36).substr(2,8)})}function ha(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function pa(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}var fa,ma;function va(t,e,n){return void 0===n&&(n="/"),function(t,e,n,r){let i="string"==typeof e?pa(e):e,o=Ra(i.pathname||"/",n);if(null==o)return null;let s=ga(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){let n=t.length===e.length&&t.slice(0,-1).every(((t,n)=>t===e[n]));return n?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let a=null;for(let l=0;null==a&&l<s.length;++l){let t=Ca(o);a=Ta(s[l],t,r)}return a}(t,e,n,!1)}function ga(t,e,n,r){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(t,i,o)=>{let s={relativePath:void 0===o?t.path||"":o,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(la(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=Fa([r,s.relativePath]),l=n.concat(s);t.children&&t.children.length>0&&(la(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),ga(t.children,e,l,a)),(null!=t.path||t.index)&&e.push({path:a,score:Pa(a,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let r of ya(t.path))i(t,e,r);else i(t,e)})),e}function ya(t){let e=t.split("/");if(0===e.length)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=ya(r.join("/")),a=[];return a.push(...s.map((t=>""===t?o:[o,t].join("/")))),i&&a.push(...s),a.map((e=>t.startsWith("/")&&""===e?"/":e))}(ma=fa||(fa={})).data="data",ma.deferred="deferred",ma.redirect="redirect",ma.error="error";const _a=/^:[\w-]+$/,wa=3,ba=2,xa=1,Sa=10,ka=-2,Ea=t=>"*"===t;function Pa(t,e){let n=t.split("/"),r=n.length;return n.some(Ea)&&(r+=ka),e&&(r+=ba),n.filter((t=>!Ea(t))).reduce(((t,e)=>t+(_a.test(e)?wa:""===e?xa:Sa)),r)}function Ta(t,e,n){let{routesMeta:r}=t,i={},o="/",s=[];for(let a=0;a<r.length;++a){let t=r[a],l=a===r.length-1,u="/"===o?e:e.slice(o.length)||"/",c=Aa({path:t.relativePath,caseSensitive:t.caseSensitive,end:l},u),d=t.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=Aa({path:t.relativePath,caseSensitive:t.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:Fa([o,c.pathname]),pathnameBase:La(Fa([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=Fa([o,c.pathnameBase]))}return s}function Aa(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=function(t,e,n){void 0===e&&(e=!1);void 0===n&&(n=!0);ua("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,n)=>(r.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));t.endsWith("*")?(r.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,e?void 0:"i");return[o,r]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((t,e,n)=>{let{paramName:r,isOptional:i}=e;if("*"===r){let t=a[n]||"";s=o.slice(0,o.length-t.length).replace(/(.)\/+$/,"$1")}const l=a[n];return t[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:o,pathnameBase:s,pattern:t}}function Ca(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return ua(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function Ra(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&"/"!==r?null:t.slice(n)||"/"}function Oa(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Ma(t,e,n,r){let i;void 0===r&&(r=!1),"string"==typeof t?i=pa(t):(i=ra({},t),la(!i.pathname||!i.pathname.includes("?"),Oa("?","pathname","search",i)),la(!i.pathname||!i.pathname.includes("#"),Oa("#","pathname","hash",i)),la(!i.search||!i.search.includes("#"),Oa("#","search","hash",i)));let o,s=""===t||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let t=e.length-1;if(!r&&a.startsWith("..")){let e=a.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}o=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof t?pa(t):t,o=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:o,search:Da(r),hash:Va(i)}}(i,o),u=a&&"/"!==a&&a.endsWith("/"),c=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const Fa=t=>t.join("/").replace(/\/\/+/g,"/"),La=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Da=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Va=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";const Ia=["post","put","patch","delete"];new Set(Ia);const ja=["get",...Ia];
24
+ function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ua.apply(this,arguments)}var ca,da;(da=ca||(ca={})).Pop="POP",da.Push="PUSH",da.Replace="REPLACE";const ha="popstate";function pa(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=ca.Pop,l=null,u=c();null==u&&(u=0,s.replaceState(ua({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=ca.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:a,location:m.location,delta:t})}function h(e,t){a=ca.Push;let r=ga(m.location,e,t);n&&n(r,e),u=c()+1;let d=va(r,u),h=m.createHref(r);try{s.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(h)}o&&l&&l({action:a,location:m.location,delta:1})}function p(e,t){a=ca.Replace;let r=ga(m.location,e,t);n&&n(r,e),u=c();let i=va(r,u),d=m.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:m.location,delta:0})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:ya(e);return n=n.replace(/ $/,"%20"),fa(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(ha,d),l=e,()=>{i.removeEventListener(ha,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:p,go:e=>s.go(e)};return m}((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=_a(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),ga("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:ya(t))}),(function(e,t){ma("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function fa(e,t){if(!1===e||null==e)throw new Error(t)}function ma(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(Hy){}}}function va(e,t){return{usr:e.state,key:e.key,idx:t}}function ga(e,t,n,r){return void 0===n&&(n=null),ua({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?_a(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function ya(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function _a(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var wa,ba;function xa(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let i="string"==typeof t?_a(t):t,o=Va(i.pathname||"/",n);if(null==o)return null;let s=Sa(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(s);let a=null;for(let l=0;null==a&&l<s.length;++l){let e=Da(o);a=Ma(s[l],e,r)}return a}(e,t,n,!1)}function Sa(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(fa(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=Ba([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(fa(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Sa(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:Fa(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of ka(e.path))i(e,t,r);else i(e,t)})),t}function ka(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=ka(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}(ba=wa||(wa={})).data="data",ba.deferred="deferred",ba.redirect="redirect",ba.error="error";const Ea=/^:[\w-]+$/,Pa=3,Ta=2,Aa=1,Ca=10,Ra=-2,Oa=e=>"*"===e;function Fa(e,t){let n=e.split("/"),r=n.length;return n.some(Oa)&&(r+=Ra),t&&(r+=Ta),n.filter((e=>!Oa(e))).reduce(((e,t)=>e+(Ea.test(t)?Pa:""===t?Aa:Ca)),r)}function Ma(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let e=r[a],l=a===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=La({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=La({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:Ba([o,c.pathname]),pathnameBase:Na(Ba([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=Ba([o,c.pathnameBase]))}return s}function La(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);ma("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function Da(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return ma(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Va(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Ia(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function ja(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=_a(e):(i=ua({},e),fa(!i.pathname||!i.pathname.includes("?"),Ia("?","pathname","search",i)),fa(!i.pathname||!i.pathname.includes("#"),Ia("#","pathname","hash",i)),fa(!i.search||!i.search.includes("#"),Ia("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?_a(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:Ua(r),hash:Ga(i)}}(i,o),u=a&&"/"!==a&&a.endsWith("/"),c=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const Ba=e=>e.join("/").replace(/\/\/+/g,"/"),Na=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ua=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Ga=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";const Wa=["post","put","patch","delete"];new Set(Wa);const Ha=["get",...Wa];
25
25
  /**
26
26
  * React Router v6.26.2
27
27
  *
@@ -32,7 +32,7 @@ function ra(){return ra=Object.assign?Object.assign.bind():function(t){for(var e
32
32
  *
33
33
  * @license MIT
34
34
  */
35
- function Ba(){return Ba=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ba.apply(this,arguments)}new Set(ja);const Na=oe(null),Ua=oe(null),Ga=oe(null),Wa=oe(null),Ha=oe({outlet:null,matches:[],isDataRoute:!1}),$a=oe(null);function za(){return null!=Bn(Wa)}function qa(){return za()||la(!1),Bn(Wa).location}function Ka(t){Bn(Ga).static||Ln(t)}function Ya(){let{isDataRoute:t}=Bn(Ha);return t?function(){let{router:t}=function(){let t=Bn(Na);return t||la(!1),t}(el.UseNavigateStable),e=rl(nl.UseNavigateStable),n=Dn(!1);return Ka((()=>{n.current=!0})),jn((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?t.navigate(r):t.navigate(r,Ba({fromRouteId:e},i)))}),[t,e])}():function(){za()||la(!1);let t=Bn(Na),{basename:e,future:n,navigator:r}=Bn(Ga),{matches:i}=Bn(Ha),{pathname:o}=qa(),s=JSON.stringify(function(t,e){let n=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?n.map(((t,e)=>e===n.length-1?t.pathname:t.pathnameBase)):n.map((t=>t.pathnameBase))}(i,n.v7_relativeSplatPath)),a=Dn(!1);return Ka((()=>{a.current=!0})),jn((function(n,i){if(void 0===i&&(i={}),!a.current)return;if("number"==typeof n)return void r.go(n);let l=Ma(n,JSON.parse(s),o,"path"===i.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:Fa([e,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}),[e,r,s,o,t])}()}function Qa(t,e){return function(t,e,n,r){za()||la(!1);let{navigator:i}=Bn(Ga),{matches:o}=Bn(Ha),s=o[o.length-1],a=s?s.params:{};!s||s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u,c=qa();if(e){var d;let t="string"==typeof e?pa(e):e;"/"===l||(null==(d=t.pathname)?void 0:d.startsWith(l))||la(!1),u=t}else u=c;let h=u.pathname||"/",p=h;if("/"!==l){let t=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(t.length).join("/")}let f=va(t,{pathname:p}),m=function(t,e,n,r){var i;void 0===e&&(e=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==t){var o;if(!n)return null;if(n.errors)t=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===e.length&&!n.initialized&&n.matches.length>0))return null;t=n.matches}}let s=t,a=null==(i=n)?void 0:i.errors;if(null!=a){let t=s.findIndex((t=>t.route.id&&void 0!==(null==a?void 0:a[t.route.id])));t>=0||la(!1),s=s.slice(0,Math.min(s.length,t+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<s.length;c++){let t=s[c];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=c),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&void 0===e[t.route.id]&&(!r||void 0===r[t.route.id]);if(t.route.lazy||i){l=!0,s=u>=0?s.slice(0,u+1):[s[0]];break}}}return s.reduceRight(((t,r,i)=>{let o,c=!1,d=null,h=null;n&&(o=a&&r.route.id?a[r.route.id]:void 0,d=r.route.errorElement||Za,l&&(u<0&&0===i?(c=!0,h=null):u===i&&(c=!0,h=r.route.hydrateFallbackElement||null)));let p=e.concat(s.slice(0,i+1)),f=()=>{let e;return e=o?d:c?h:r.route.Component?Dt(r.route.Component,null):r.route.element?r.route.element:t,Dt(tl,{match:r,routeContext:{outlet:t,matches:p,isDataRoute:null!=n},children:e})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?Dt(Ja,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):f()}),null)}(f&&f.map((t=>Object.assign({},t,{params:Object.assign({},a,t.params),pathname:Fa([l,i.encodeLocation?i.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:Fa([l,i.encodeLocation?i.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,n,r);if(e&&m)return Dt(Wa.Provider,{value:{location:Ba({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:ia.Pop}},m);return m}(t,e)}function Xa(){let t=function(){var t;let e=Bn($a),n=function(){let t=Bn(Ua);return t||la(!1),t}(nl.UseRouteError),r=rl(nl.UseRouteError);if(void 0!==e)return e;return null==(t=n.errors)?void 0:t[r]}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return Dt(jt,null,Dt("h2",null,"Unexpected Application Error!"),Dt("h3",{style:{fontStyle:"italic"}},e),n?Dt("pre",{style:r},n):null,null)}const Za=Dt(Xa,null);class Ja extends Bt{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?Dt(Ha.Provider,{value:this.props.routeContext},Dt($a.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tl(t){let{routeContext:e,match:n,children:r}=t,i=Bn(Na);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),Dt(Ha.Provider,{value:e},r)}var el=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(el||{}),nl=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(nl||{});function rl(t){let e=function(){let t=Bn(Ha);return t||la(!1),t}(),n=e.matches[e.matches.length-1];return n.route.id||la(!1),n.route.id}function il(t){la(!1)}function ol(t){let{basename:e="/",children:n=null,location:r,navigationType:i=ia.Pop,navigator:o,static:s=!1,future:a}=t;za()&&la(!1);let l=e.replace(/^\/*/,"/"),u=In((()=>({basename:l,navigator:o,static:s,future:Ba({v7_relativeSplatPath:!1},a)})),[l,a,o,s]);"string"==typeof r&&(r=pa(r));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,m=In((()=>{let t=Ra(c,l);return null==t?null:{location:{pathname:t,search:d,hash:h,state:p,key:f},navigationType:i}}),[l,c,d,h,p,f,i]);return null==m?null:Dt(Ga.Provider,{value:u},Dt(Wa.Provider,{children:n,value:m}))}function sl(t){let{children:e,location:n}=t;return Qa(al(e),n)}function al(t,e){void 0===e&&(e=[]);let n=[];return rr.forEach(t,((t,r)=>{if(!Dr(t))return;let i=[...e,r];if(t.type===jt)return void n.push.apply(n,al(t.props.children,i));t.type!==il&&la(!1),t.props.index&&t.props.children&&la(!1);let o={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(o.children=al(t.props.children,i)),n.push(o)})),n}
35
+ function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$a.apply(this,arguments)}new Set(Ha);const za=ot(null),qa=ot(null),Ka=ot(null),Ya=ot(null),Qa=ot({outlet:null,matches:[],isDataRoute:!1}),Xa=ot(null);function Za(){return null!=Bn(Ya)}function Ja(){return Za()||fa(!1),Bn(Ya).location}function el(e){Bn(Ka).static||Ln(e)}function tl(){let{isDataRoute:e}=Bn(Qa);return e?function(){let{router:e}=function(){let e=Bn(za);return e||fa(!1),e}(al.UseNavigateStable),t=ul(ll.UseNavigateStable),n=Dn(!1);return el((()=>{n.current=!0})),jn((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,$a({fromRouteId:t},i)))}),[e,t])}():function(){Za()||fa(!1);let e=Bn(za),{basename:t,future:n,navigator:r}=Bn(Ka),{matches:i}=Bn(Qa),{pathname:o}=Ja(),s=JSON.stringify(function(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}(i,n.v7_relativeSplatPath)),a=Dn(!1);return el((()=>{a.current=!0})),jn((function(n,i){if(void 0===i&&(i={}),!a.current)return;if("number"==typeof n)return void r.go(n);let l=ja(n,JSON.parse(s),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Ba([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}),[t,r,s,o,e])}()}function nl(e,t){return function(e,t,n,r){Za()||fa(!1);let{navigator:i}=Bn(Ka),{matches:o}=Bn(Qa),s=o[o.length-1],a=s?s.params:{};!s||s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u,c=Ja();if(t){var d;let e="string"==typeof t?_a(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||fa(!1),u=e}else u=c;let h=u.pathname||"/",p=h;if("/"!==l){let e=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=xa(e,{pathname:p}),m=function(e,t,n,r){var i;void 0===t&&(t=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let s=e,a=null==(i=n)?void 0:i.errors;if(null!=a){let e=s.findIndex((e=>e.route.id&&void 0!==(null==a?void 0:a[e.route.id])));e>=0||fa(!1),s=s.slice(0,Math.min(s.length,e+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<s.length;c++){let e=s[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=c),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){l=!0,s=u>=0?s.slice(0,u+1):[s[0]];break}}}return s.reduceRight(((e,r,i)=>{let o,c=!1,d=null,h=null;n&&(o=a&&r.route.id?a[r.route.id]:void 0,d=r.route.errorElement||il,l&&(u<0&&0===i?(c=!0,h=null):u===i&&(c=!0,h=r.route.hydrateFallbackElement||null)));let p=t.concat(s.slice(0,i+1)),f=()=>{let t;return t=o?d:c?h:r.route.Component?De(r.route.Component,null):r.route.element?r.route.element:e,De(sl,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?De(ol,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):f()}),null)}(f&&f.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:Ba([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Ba([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n,r);if(t&&m)return De(Ya.Provider,{value:{location:$a({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:ca.Pop}},m);return m}(e,t)}function rl(){let e=function(){var e;let t=Bn(Xa),n=function(){let e=Bn(qa);return e||fa(!1),e}(ll.UseRouteError),r=ul(ll.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return De(je,null,De("h2",null,"Unexpected Application Error!"),De("h3",{style:{fontStyle:"italic"}},t),n?De("pre",{style:r},n):null,null)}const il=De(rl,null);class ol extends Be{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?De(Qa.Provider,{value:this.props.routeContext},De(Xa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sl(e){let{routeContext:t,match:n,children:r}=e,i=Bn(za);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),De(Qa.Provider,{value:t},r)}var al=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(al||{}),ll=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ll||{});function ul(e){let t=function(){let e=Bn(Qa);return e||fa(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||fa(!1),n.route.id}function cl(e){fa(!1)}function dl(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ca.Pop,navigator:o,static:s=!1,future:a}=e;Za()&&fa(!1);let l=t.replace(/^\/*/,"/"),u=In((()=>({basename:l,navigator:o,static:s,future:$a({v7_relativeSplatPath:!1},a)})),[l,a,o,s]);"string"==typeof r&&(r=_a(r));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,m=In((()=>{let e=Va(c,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:i}}),[l,c,d,h,p,f,i]);return null==m?null:De(Ka.Provider,{value:u},De(Ya.Provider,{children:n,value:m}))}function hl(e){let{children:t,location:n}=e;return nl(pl(t),n)}function pl(e,t){void 0===t&&(t=[]);let n=[];return rr.forEach(e,((e,r)=>{if(!Dr(e))return;let i=[...t,r];if(e.type===je)return void n.push.apply(n,pl(e.props.children,i));e.type!==cl&&fa(!1),e.props.index&&e.props.children&&fa(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=pl(e.props.children,i)),n.push(o)})),n}
36
36
  /**
37
37
  * React Router DOM v6.26.2
38
38
  *
@@ -42,10 +42,10 @@ function Ba(){return Ba=Object.assign?Object.assign.bind():function(t){for(var e
42
42
  * LICENSE.md file in the root directory of this source tree.
43
43
  *
44
44
  * @license MIT
45
- */new Promise((()=>{}));try{window.__reactRouterVersion="6"}catch(Ty){}const ll=Zr.startTransition;function ul(t){let{basename:e,children:n,future:r,window:i}=t,o=Dn();null==o.current&&(o.current=aa({window:i,v5Compat:!0}));let s=o.current,[a,l]=On({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=jn((t=>{u&&ll?ll((()=>l(t))):l(t)}),[l,u]);return Ln((()=>s.listen(c)),[s,c]),Dt(ol,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var cl,dl,hl,pl;let fl;(dl=cl||(cl={})).UseScrollRestoration="useScrollRestoration",dl.UseSubmit="useSubmit",dl.UseSubmitFetcher="useSubmitFetcher",dl.UseFetcher="useFetcher",dl.useViewTransitionState="useViewTransitionState",(pl=hl||(hl={})).UseFetcher="useFetcher",pl.UseFetchers="useFetchers",pl.UseScrollRestoration="useScrollRestoration";const ml=()=>{if(fl)return fl;return fl=new rs({defaultOptions:{queries:{retry:(t,e)=>{var n;return e instanceof co&&![401,403].includes((null==(n=e.response)?void 0:n.status)||0)}}}}),fl},vl="getAllPromotions",gl=/^https:\/\/([A-Za-z]+)-partner/,yl=t=>{switch((t=>{if(t.startsWith("http://localhost"))return"local";const e=t.toLowerCase().match(gl);return e&&e.length>1?e[1]:"prod"})(t.url)){case"local":case"autodev":case"test":return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/staging/";default:return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/master/"}},_l=()=>{const{getAllPromotions:t}=vo(),e=Ya(),{isPending:n,error:r,data:i}=Es({queryKey:[vl],queryFn:t}),o=uo(),s=In((()=>{return t=o.backend,((null==(e=i)?void 0:e.data)||[]).map((e=>{var n;return{id:e.id,category:e.category.title,promotionStatus:e.status,contentfulUrl:(null==(n=e.contentfulContent)?void 0:n.contentId)?`${yl(t)}entries/${e.contentfulContent.contentId}?focusedField=slug`:void 0,createdAt:e.createdAt,updatedAt:e.updatedAt,edit:"Edit"}})).sort(((t,e)=>new Date(e.updatedAt).valueOf()-new Date(t.updatedAt).valueOf()));var t,e}),[o.backend,i]),a=In((()=>[{name:"Id",field:"id",isSortable:!0},{name:"Category",field:"category",isSortable:!0},{name:"Status",field:"promotionStatus",isSortable:!0,type:{kind:"status",styleOverrides:{Enabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-color":"rgb(22 163 74 / 0.2)"},Disabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-color":"rgb(220 38 38 / 0.2)"}}}},{name:"Contentful",field:"contentfulUrl",isSortable:!0,sort:t=>t?-1:1,type:{kind:"link"}},{name:"Created",field:"createdAt",isSortable:!0,sort:(t,e)=>new Date(e).valueOf()-new Date(t).valueOf(),type:{kind:"date"}},{name:"Updated",field:"updatedAt",isSortable:!0,sort:(t,e)=>new Date(e).valueOf()-new Date(t).valueOf(),type:{kind:"date"}},{name:"Edit",field:"edit",isSortable:!1,type:{kind:"button",onClick:t=>e(`/promotion/${t}`),children:io(ea,{alt:"edit","data-testid":"edit",css:{height:"1.25rem",width:"1.25rem",":hover":{fill:"var(--fl-color-primary-600)"}}})}}]),[e]);switch(!0){case n:return io(ro,{children:"Loading..."});case!!r:return oo(ro,{children:["An error has occurred: ",r.message]});case!!i:return io(na,{columns:a,data:s,title:"Promotions",subtitle:"A list of currently configured promoted benefits",addButtonText:"Add New Promotion",onAdd:()=>e("/promotion"),onClick:t=>e(`/promotion/${t}`)});default:return io(ro,{children:"No data returned from backend"})}};function wl(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>t(...e)),{get:(n,r)=>"create"===r?t:(e.has(r)||e.set(r,t(r)),e.get(r))})}function bl(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const xl=t=>Array.isArray(t);function Sl(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function kl(t){return"string"==typeof t||Array.isArray(t)}function El(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function Pl(t,e,n,r){if("function"==typeof e){const[i,o]=El(r);e=e(void 0!==n?n:t.custom,i,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,o]=El(r);e=e(void 0!==n?n:t.custom,i,o)}return e}function Tl(t,e,n){const r=t.getProps();return Pl(r,e,void 0!==n?n:r.custom,t)}const Al=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cl=["initial",...Al],Rl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ol=new Set(Rl),Ml=t=>1e3*t,Fl=t=>t/1e3,Ll={type:"spring",stiffness:500,damping:25,restSpeed:10},Dl={type:"keyframes",duration:.8},Vl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Il=(t,{keyframes:e})=>e.length>2?Dl:Ol.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ll:Vl;function jl(t,e){return t[e]||t.default||t}const Bl=!1,Nl=t=>null!==t;function Ul(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(Nl),o=e&&"loop"!==n&&e%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}const Gl=t=>t;const Wl=["read","resolveKeyframes","update","preRender","render","postRender"];function Hl(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Wl.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(s)}const l={schedule:(t,i=!1,s=!1)=>{const a=s&&r?e:n;return i&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{s=t,r?i=!0:(r=!0,[e,n]=[n,e],n.clear(),e.forEach(a),r=!1,i&&(i=!1,l.process(t)))}};return l}(o),t)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:h}=s,p=()=>{const o=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(p))};return{schedule:Wl.reduce(((e,o)=>{const a=s[o];return e[o]=(e,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(p)),a.schedule(e,o,s)),e}),{}),cancel:t=>{for(let e=0;e<Wl.length;e++)s[Wl[e]].cancel(t)},state:i,steps:s}}const{schedule:$l,cancel:zl,state:ql,steps:Kl}=Hl("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Gl,!0),Yl=t=>/^0[^.\s]+$/u.test(t);let Ql=Gl;const Xl=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Zl=t=>e=>"string"==typeof e&&e.startsWith(t),Jl=Zl("--"),tu=Zl("var(--"),eu=t=>!!tu(t)&&nu.test(t.split("/*")[0].trim()),nu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ru=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function iu(t,e,n=1){const[r,i]=function(t){const e=ru.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${null!=n?n:r}`,i]}(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const t=o.trim();return Xl(t)?parseFloat(t):t}return eu(i)?iu(i,e,n+1):i}const ou=(t,e,n)=>n>e?e:n<t?t:n,su={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},au={...su,transform:t=>ou(0,1,t)},lu={...su,default:1},uu=t=>Math.round(1e5*t)/1e5,cu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,du=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,hu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function pu(t){return"string"==typeof t}const fu=t=>({test:e=>pu(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),mu=fu("deg"),vu=fu("%"),gu=fu("px"),yu=fu("vh"),_u=fu("vw"),wu={...vu,parse:t=>vu.parse(t)/100,transform:t=>vu.transform(100*t)},bu=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),xu=t=>t===su||t===gu,Su=(t,e)=>parseFloat(t.split(", ")[e]),ku=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Su(i[1],e);{const e=r.match(/^matrix\((.+)\)$/u);return e?Su(e[1],t):0}},Eu=new Set(["x","y","z"]),Pu=Rl.filter((t=>!Eu.has(t)));const Tu={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:ku(4,13),y:ku(5,14)};Tu.translateX=Tu.x,Tu.translateY=Tu.y;const Au=t=>e=>e.test(t),Cu=[su,gu,vu,mu,_u,yu,{test:t=>"auto"===t,parse:t=>t}],Ru=t=>Cu.find(Au(t)),Ou=new Set;let Mu=!1,Fu=!1;function Lu(){if(Fu){const t=Array.from(Ou).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return Pu.forEach((n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var r;null===(r=t.getValue(e))||void 0===r||r.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}Fu=!1,Mu=!1,Ou.forEach((t=>t.complete())),Ou.clear()}function Du(){Ou.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Fu=!0)}))}class Vu{constructor(t,e,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ou.add(this),Mu||(Mu=!0,$l.read(Du),$l.resolveKeyframes(Lu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:r}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==r?void 0:r.get(),o=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const r=n.readValue(e,o);null!=r&&(t[0]=r)}void 0===t[0]&&(t[0]=o),r&&void 0===i&&r.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ou.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ou.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Iu=(t,e)=>n=>Boolean(pu(n)&&hu.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ju=(t,e,n)=>r=>{if(!pu(r))return r;const[i,o,s,a]=r.match(cu);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Bu={...su,transform:t=>Math.round((t=>ou(0,255,t))(t))},Nu={test:Iu("rgb","red"),parse:ju("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Bu.transform(t)+", "+Bu.transform(e)+", "+Bu.transform(n)+", "+uu(au.transform(r))+")"};const Uu={test:Iu("#"),parse:function(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:Nu.transform},Gu={test:Iu("hsl","hue"),parse:ju("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+vu.transform(uu(e))+", "+vu.transform(uu(n))+", "+uu(au.transform(r))+")"},Wu={test:t=>Nu.test(t)||Uu.test(t)||Gu.test(t),parse:t=>Nu.test(t)?Nu.parse(t):Gu.test(t)?Gu.parse(t):Uu.parse(t),transform:t=>pu(t)?t:t.hasOwnProperty("red")?Nu.transform(t):Gu.transform(t)};const Hu="number",$u="color",zu="var",qu="var(",Ku="${}",Yu=/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 Qu(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=e.replace(Yu,(t=>(Wu.test(t)?(r.color.push(o),i.push($u),n.push(Wu.parse(t))):t.startsWith(qu)?(r.var.push(o),i.push(zu),n.push(t)):(r.number.push(o),i.push(Hu),n.push(parseFloat(t))),++o,Ku))).split(Ku);return{values:n,split:s,indexes:r,types:i}}function Xu(t){return Qu(t).values}function Zu(t){const{split:e,types:n}=Qu(t),r=e.length;return t=>{let i="";for(let o=0;o<r;o++)if(i+=e[o],void 0!==t[o]){const e=n[o];i+=e===Hu?uu(t[o]):e===$u?Wu.transform(t[o]):t[o]}return i}}const Ju=t=>"number"==typeof t?0:t;const tc={test:function(t){var e,n;return isNaN(t)&&pu(t)&&((null===(e=t.match(cu))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(du))||void 0===n?void 0:n.length)||0)>0},parse:Xu,createTransformer:Zu,getAnimatableNone:function(t){const e=Xu(t);return Zu(t)(e.map(Ju))}},ec=new Set(["brightness","contrast","saturate","opacity"]);function nc(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(cu)||[];if(!r)return t;const i=n.replace(r,"");let o=ec.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const rc=/\b([a-z-]*)\(.*?\)/gu,ic={...tc,getAnimatableNone:t=>{const e=t.match(rc);return e?e.map(nc).join(" "):t}},oc={...su,transform:Math.round},sc={borderWidth:gu,borderTopWidth:gu,borderRightWidth:gu,borderBottomWidth:gu,borderLeftWidth:gu,borderRadius:gu,radius:gu,borderTopLeftRadius:gu,borderTopRightRadius:gu,borderBottomRightRadius:gu,borderBottomLeftRadius:gu,width:gu,maxWidth:gu,height:gu,maxHeight:gu,size:gu,top:gu,right:gu,bottom:gu,left:gu,padding:gu,paddingTop:gu,paddingRight:gu,paddingBottom:gu,paddingLeft:gu,margin:gu,marginTop:gu,marginRight:gu,marginBottom:gu,marginLeft:gu,rotate:mu,rotateX:mu,rotateY:mu,rotateZ:mu,scale:lu,scaleX:lu,scaleY:lu,scaleZ:lu,skew:mu,skewX:mu,skewY:mu,distance:gu,translateX:gu,translateY:gu,translateZ:gu,x:gu,y:gu,z:gu,perspective:gu,transformPerspective:gu,opacity:au,originX:wu,originY:wu,originZ:gu,zIndex:oc,backgroundPositionX:gu,backgroundPositionY:gu,fillOpacity:au,strokeOpacity:au,numOctaves:oc},ac={...sc,color:Wu,backgroundColor:Wu,outlineColor:Wu,fill:Wu,stroke:Wu,borderColor:Wu,borderTopColor:Wu,borderRightColor:Wu,borderBottomColor:Wu,borderLeftColor:Wu,filter:ic,WebkitFilter:ic},lc=t=>ac[t];function uc(t,e){let n=lc(t);return n!==ic&&(n=tc),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const cc=new Set(["auto","none","0"]);class dc extends Vu{constructor(t,e,n,r,i){super(t,e,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let n=t[a];if("string"==typeof n&&(n=n.trim(),eu(n))){const r=iu(n,e.current);void 0!==r&&(t[a]=r),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!bu.has(n)||2!==t.length)return;const[r,i]=t,o=Ru(r),s=Ru(i);if(o!==s)if(xu(o)&&xu(s))for(let a=0;a<t.length;a++){const e=t[a];"string"==typeof e&&(t[a]=parseFloat(e))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let i=0;i<t.length;i++)("number"==typeof(r=t[i])?0===r:null===r||"none"===r||"0"===r||Yl(r))&&n.push(i);var r;n.length&&function(t,e,n){let r,i=0;for(;i<t.length&&!r;){const e=t[i];"string"==typeof e&&!cc.has(e)&&Qu(e).values.length&&(r=t[i]),i++}if(r&&n)for(const o of e)t[o]=uc(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tu[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const r=e[e.length-1];void 0!==r&&t.getValue(n,r).jump(r,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Tu[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}function hc(t){let e;return()=>(void 0===e&&(e=t()),e)}let pc;function fc(){pc=void 0}const mc={now:()=>(void 0===pc&&mc.set(ql.isProcessing||Bl?ql.timestamp:performance.now()),pc),set:t=>{pc=t,queueMicrotask(fc)}},vc=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!tc.test(t)&&"0"!==t||t.startsWith("url(")));class gc{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=mc.now(),this.options={autoplay:t,delay:e,type:n,repeat:r,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Du(),Lu()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=mc.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,r){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],s=vc(i,e),a=vc(o,e);return!(!s||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||"spring"===n&&r)}(t,n,r,i)){if(!o)return null==a||a(Ul(t,this.options,e)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function yc(t,e){return e?t*(1e3/e):0}const _c=5;function wc(t,e,n){const r=Math.max(e-_c,0);return yc(n-t(r),e-r)}const bc=.001,xc=.01,Sc=10,kc=.05,Ec=1;function Pc({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o,s=1-e;s=ou(kc,Ec,s),t=ou(xc,Sc,Fl(t)),s<1?(i=e=>{const r=e*s,i=r*t,o=r-n,a=Ac(e,s),l=Math.exp(-i);return bc-o/a*l},o=e=>{const r=e*s*t,o=r*n+n,a=Math.pow(s,2)*Math.pow(e,2)*t,l=Math.exp(-r),u=Ac(Math.pow(e,2),s);return(-i(e)+bc>0?-1:1)*((o-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-bc,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let i=1;i<Tc;i++)r-=t(r)/e(r);return r}(i,o,5/t);if(t=Ml(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*s*Math.sqrt(r*e),duration:t}}}const Tc=12;function Ac(t,e){return t*Math.sqrt(1-e*e)}const Cc=["duration","bounce"],Rc=["stiffness","damping","mass"];function Oc(t,e){return e.some((e=>void 0!==t[e]))}function Mc({keyframes:t,restDelta:e,restSpeed:n,...r}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:h}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Oc(t,Rc)&&Oc(t,Cc)){const n=Pc(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...r,velocity:-Fl(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(a*u)),m=o-i,v=Fl(Math.sqrt(a/u)),g=Math.abs(m)<5;let y;if(n||(n=g?.01:2),e||(e=g?.005:.5),f<1){const t=Ac(v,f);y=e=>{const n=Math.exp(-f*v*e);return o-n*((p+f*v*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)y=t=>o-Math.exp(-v*t)*(m+(p+v*m)*t);else{const t=v*Math.sqrt(f*f-1);y=e=>{const n=Math.exp(-f*v*e),r=Math.min(t*e,300);return o-n*((p+f*v*m)*Math.sinh(r)+t*m*Math.cosh(r))/t}}return{calculatedDuration:h&&c||null,next:t=>{const r=y(t);if(h)s.done=t>=c;else{let i=0;f<1&&(i=0===t?Ml(p):wc(y,t,r));const a=Math.abs(i)<=n,l=Math.abs(o-r)<=e;s.done=a&&l}return s.value=s.done?o:r,s}}}function Fc({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],h={done:!1,value:d},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=d+f,v=void 0===s?m:s(m);v!==m&&(f=v-d);const g=t=>-f*Math.exp(-t/r),y=t=>v+g(t),_=t=>{const e=g(t),n=y(t);h.done=Math.abs(e)<=u,h.value=h.done?v:n};let w,b;const x=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,b=Mc({keyframes:[h.value,p(h.value)],velocity:wc(y,t,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==w||(e=!0,_(t),x(t)),void 0!==w&&t>=w?b.next(t-w):(!e&&_(t),h)}}}const Lc=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Dc=1e-7,Vc=12;function Ic(t,e,n,r){if(t===e&&n===r)return Gl;const i=e=>function(t,e,n,r,i){let o,s,a=0;do{s=e+(n-e)/2,o=Lc(s,r,i)-t,o>0?n=s:e=s}while(Math.abs(o)>Dc&&++a<Vc);return s}(e,0,1,t,n);return t=>0===t||1===t?t:Lc(i(t),e,r)}const jc=Ic(.42,0,1,1),Bc=Ic(0,0,.58,1),Nc=Ic(.42,0,.58,1),Uc=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Gc=t=>e=>1-t(1-e),Wc=t=>1-Math.sin(Math.acos(t)),Hc=Gc(Wc),$c=Uc(Wc),zc=Ic(.33,1.53,.69,.99),qc=Gc(zc),Kc={linear:Gl,easeIn:jc,easeInOut:Nc,easeOut:Bc,circIn:Wc,circInOut:$c,circOut:Hc,backIn:qc,backInOut:Uc(qc),backOut:zc,anticipate:t=>(t*=2)<1?.5*qc(t):.5*(2-Math.pow(2,-10*(t-1)))},Yc=t=>{if(Array.isArray(t)){Ql(4===t.length);const[e,n,r,i]=t;return Ic(e,n,r,i)}return"string"==typeof t?(Ql(void 0!==Kc[t]),Kc[t]):t},Qc=(t,e)=>n=>e(t(n)),Xc=(...t)=>t.reduce(Qc),Zc=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},Jc=(t,e,n)=>t+(e-t)*n;function td(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ed(t,e){return n=>n>0?e:t}const nd=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},rd=[Uu,Nu,Gu];function id(t){const e=(n=t,rd.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let r=e.parse(t);return e===Gu&&(r=function({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let i=0,o=0,s=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;i=td(a,r,t+1/3),o=td(a,r,t),s=td(a,r,t-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(r)),r}const od=(t,e)=>{const n=id(t),r=id(e);if(!n||!r)return ed(t,e);const i={...n};return t=>(i.red=nd(n.red,r.red,t),i.green=nd(n.green,r.green,t),i.blue=nd(n.blue,r.blue,t),i.alpha=Jc(n.alpha,r.alpha,t),Nu.transform(i))},sd=new Set(["none","hidden"]);function ad(t,e){return n=>Jc(t,e,n)}function ld(t){return"number"==typeof t?ad:"string"==typeof t?eu(t)?ed:Wu.test(t)?od:dd:Array.isArray(t)?ud:"object"==typeof t?Wu.test(t)?od:cd:ed}function ud(t,e){const n=[...t],r=n.length,i=t.map(((t,n)=>ld(t)(t,e[n])));return t=>{for(let e=0;e<r;e++)n[e]=i[e](t);return n}}function cd(t,e){const n={...t,...e},r={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(r[i]=ld(t[i])(t[i],e[i]));return t=>{for(const e in r)n[e]=r[e](t);return n}}const dd=(t,e)=>{const n=tc.createTransformer(e),r=Qu(t),i=Qu(e);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?sd.has(t)&&!i.values.length||sd.has(e)&&!r.values.length?function(t,e){return sd.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Xc(ud(function(t,e){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],a=t.indexes[s][i[s]],l=null!==(n=t.values[a])&&void 0!==n?n:0;r[o]=l,i[s]++}return r}(r,i),i.values),n):ed(t,e)};function hd(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Jc(t,e,n);return ld(t)(t,e)}function pd(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Ql(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const r=[],i=n||hd,o=t.length-1;for(let s=0;s<o;s++){let n=i(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||Gl:e;n=Xc(t,n)}r.push(n)}return r}(e,r,i),a=s.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=Zc(t[n],t[n+1],e);return s[n](r)};return n?e=>l(ou(t[0],t[o-1],e)):l}function fd(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Zc(0,e,r);t.push(Jc(n,1,i))}}(e,t.length-1),e}function md({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=(t=>Array.isArray(t)&&"number"!=typeof t[0])(r)?r.map(Yc):Yc(r),o={done:!1,value:e[0]},s=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:fd(e),t),a=pd(s,e,{ease:Array.isArray(i)?i:(l=e,u=i,l.map((()=>u||Nc)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const vd=t=>{const e=({timestamp:e})=>t(e);return{start:()=>$l.update(e,!0),stop:()=>zl(e),now:()=>ql.isProcessing?ql.timestamp:mc.now()}},gd={decay:Fc,inertia:Fc,tween:md,keyframes:md,spring:Mc},yd=t=>t/100;class _d extends gc{constructor(t){super(t),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,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||Vu;this.resolver=new o(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,r),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=this.options,s=gd[e]||md;let a,l;s!==md&&"number"!=typeof t[0]&&(a=Xc(yd,hd(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});"mirror"===i&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=function(t){let e=0,n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}(u));const{calculatedDuration:c}=u,d=c+r;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:r,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,_=i;if(h){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(_=o)),y=ou(0,1,n)*c}const w=g?{done:!1,value:a[0]}:_.next(y);s&&(w.value=s(w.value));let{done:b}=w;g||null===l||(b=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return x&&void 0!==r&&(w.value=Ul(a,this.options,r)),m&&m(w.value),x&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Fl(t.calculatedDuration):0}get time(){return Fl(this.currentTime)}set time(t){t=Ml(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Fl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=vd,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&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(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const wd=new Set(["opacity","clipPath","filter","transform"]),bd=t=>Array.isArray(t)&&"number"==typeof t[0];function xd(t){return Boolean(!t||"string"==typeof t&&t in kd||bd(t)||Array.isArray(t)&&t.every(xd))}const Sd=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,kd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Sd([0,.65,.55,1]),circOut:Sd([.55,0,1,.45]),backIn:Sd([.31,.01,.66,-.59]),backOut:Sd([.33,1.53,.69,.99])};function Ed(t){return Pd(t)||kd.easeOut}function Pd(t){return t?bd(t)?Sd(t):Array.isArray(t)?t.map(Ed):kd[t]:void 0}const Td=hc((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class Ad extends gc{constructor(t){super(t);const{name:e,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new dc(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,r),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:r=300,times:i,ease:o,type:s,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(c=this.options).type||!xd(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new _d({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const i=[];let o=0;for(;!r.done&&o<2e4;)r=n.sample(o),i.push(r.value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),r=c.duration,i=c.times,o=c.ease,s="keyframes"}var c;const d=function(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Pd(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:o});return d.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:n}=this.options;a.set(Ul(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Fl(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Fl(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Ml(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return Gl;const{animation:n}=e;n.timeline=t,n.onfinish=null}else this.pendingTimeline=t;return Gl}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:r,type:i,ease:o,times:s}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new _d({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),d=Ml(this.time);t.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;return Td()&&n&&wd.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}}const Cd=hc((()=>void 0!==window.ScrollTimeline));class Rd{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map((e=>{if(!Cd()||!e.attachTimeline)return e.pause(),function(t,e){let n;const r=()=>{const{currentTime:r}=e,i=(null===r?0:r.value)/100;n!==i&&t(i),n=i};return $l.update(r,!0),()=>zl(r)}((t=>{e.time=e.duration*t}),t);e.attachTimeline(t)}));return()=>{e.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Od=(t,e,n,r={},i,o,s)=>a=>{const l=jl(r,t)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c-=Ml(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(d={...d,...Il(t,d)}),d.duration&&(d.duration=Ml(d.duration)),d.repeatDelay&&(d.repeatDelay=Ml(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(h=!0)),h&&!o&&void 0!==e.get()){const t=Ul(d.keyframes,l);if(void 0!==t)return $l.update((()=>{d.onUpdate(t),d.onComplete()})),new Rd([])}return!o&&Ad.supports(d)?new Ad(d):new _d(d)},Md=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Fd=t=>xl(t)?t[t.length-1]||0:t;function Ld(t,e){-1===t.indexOf(e)&&t.push(e)}function Dd(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Vd{constructor(){this.subscriptions=[]}add(t){return Ld(this.subscriptions,t),()=>Dd(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Id{constructor(t,e={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=mc.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=mc.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Vd);const n=this.events[t].add(e);return"change"===t?()=>{n(),$l.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=mc.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return yc(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),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 jd(t,e){return new Id(t,e)}function Bd(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jd(n))}const Nd=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ud="data-"+Nd("framerAppearId");function Gd(t){return t.props[Ud]}function Wd(t){return Ol.has(t)?"transform":wd.has(t)?Nd(t):void 0}class Hd extends Id{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=Wd(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let r=!1;return()=>{if(r)return;r=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(Dd(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const $d=t=>Boolean(t&&t.getVelocity);function zd(t,e){var n;if(!t.applyWillChange)return;let r=t.getValue("willChange");return r||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(r=new Hd("auto"),t.addValue("willChange",r)),i=r,Boolean($d(i)&&i.add)?r.add(e):void 0;var i}function qd({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}function Kd(t,e,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(s=r);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const d in l){const e=t.getValue(d,null!==(o=t.latestValues[d])&&void 0!==o?o:null),r=l[d];if(void 0===r||c&&qd(c,d))continue;const i={delay:n,...jl(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const e=Gd(t);if(e){const t=window.MotionHandoffAnimation(e,d,$l);null!==t&&(i.startTime=t,a=!0)}}e.start(Od(d,e,r,t.shouldReduceMotion&&Ol.has(d)?{type:!1}:i,t,a,zd(t,d)));const h=e.animation;h&&u.push(h)}return a&&Promise.all(u).then((()=>{$l.update((()=>{a&&function(t,e){const n=Tl(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o)Bd(t,s,Fd(o[s]))}(t,a)}))})),u}function Yd(t,e,n={}){var r;const i=Tl(t,e,"exit"===n.type?null===(r=t.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Kd(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(t,e,n=0,r=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*r,l=1===i?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(Qd).forEach(((t,r)=>{t.notify("AnimationStart",e),s.push(Yd(t,e,{...o,delay:n+l(r)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(s)}(t,e,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then((()=>e()))}return Promise.all([s(),a(n.delay)])}function Qd(t,e){return t.sortNodePosition(e)}const Xd=[...Al].reverse(),Zd=Al.length;function Jd(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map((e=>Yd(t,e,n)));r=Promise.all(i)}else if("string"==typeof e)r=Yd(t,e,n);else{const i="function"==typeof e?Tl(t,e,n.custom):e;r=Promise.all(Kd(t,i,n))}return r.then((()=>{t.notify("AnimationComplete",e)}))}(t,e,n))))}function th(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Sl(e,t)}function eh(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nh(){return{animate:eh(!0),whileInView:eh(),whileHover:eh(),whileTap:eh(),whileDrag:eh(),whileFocus:eh(),exit:eh()}}class rh{constructor(t){this.isMounted=!1,this.node=t}update(){}}let ih=0;const oh={animation:{Feature:class extends rh{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=Jd(t),n=nh(),r=!0;const i=e=>(n,r)=>{var i;const o=Tl(t,r,"exit"===e?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:t,transitionEnd:e,...r}=o;n={...n,...r,...e}}return n};function o(o){const s=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set;let c={},d=1/0;for(let e=0;e<Zd;e++){const h=Xd[e],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=kl(f),v=h===o?p.isActive:null;!1===v&&(d=e);let g=f===a[h]&&f!==s[h]&&m;if(g&&r&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===v||!f&&!p.prevProp||bl(f)||"boolean"==typeof f)continue;let y=th(p.prevProp,f)||h===o&&p.isActive&&!g&&m||e>d&&m,_=!1;const w=Array.isArray(f)?f:[f];let b=w.reduce(i(h),{});!1===v&&(b={});const{prevResolvedValues:x={}}=p,S={...x,...b},k=e=>{y=!0,u.has(e)&&(_=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=b[t],n=x[t];if(c.hasOwnProperty(t))continue;let r=!1;r=xl(e)&&xl(n)?!Sl(e,n):e!==n,r?null!=e?k(t):u.add(t):void 0!==e&&u.has(t)?k(t):p.protectedKeys[t]=!0}p.prevProp=f,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),r&&t.blockInitialAnimation&&(y=!1),!y||g&&!_||l.push(...w.map((t=>({animation:t,options:{type:h}}))))}if(u.size){const e={};u.forEach((n=>{const r=t.getBaseTarget(n),i=t.getValue(n);i&&(i.liveStyle=!0),e[n]=null!=r?r:null})),l.push({animation:e})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||t.manuallyAnimateOnMount||(h=!1),r=!1,h?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,r){var i;if(n[e].isActive===r)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)})),n[e].isActive=r;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=nh(),r=!0}}}(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();bl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends rh{constructor(){super(...arguments),this.id=ih++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const r=this.node.animationState.setActive("exit",!t);e&&!t&&r.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},sh=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function ah(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const lh=t=>e=>sh(e)&&t(e,ah(e));function uh(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function ch(t,e,n,r){return uh(t,e,lh(n),r)}const dh=(t,e)=>Math.abs(t-e);class hh{constructor(t,e,{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;const t=mh(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=dh(t.x,e.x),r=dh(t.y,e.y);return Math.sqrt(n**2+r**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:r}=t,{timestamp:i}=ql;this.history.push({...r,timestamp:i});const{onStart:o,onMove:s}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=ph(e,this.transformPagePoint),$l.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=mh("pointercancel"===t.type?this.lastMoveEventInfo:ph(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),r&&r(t,o)},!sh(t))return;this.dragSnapToOrigin=i,this.handlers=e,this.transformPagePoint=n,this.contextWindow=r||window;const o=ph(ah(t),this.transformPagePoint),{point:s}=o,{timestamp:a}=ql;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,mh(o,this.history)),this.removeListeners=Xc(ch(this.contextWindow,"pointermove",this.handlePointerMove),ch(this.contextWindow,"pointerup",this.handlePointerUp),ch(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zl(this.updatePoint)}}function ph(t,e){return e?{point:e(t.point)}:t}function fh(t,e){return{x:t.x-e.x,y:t.y-e.y}}function mh({point:t},e){return{point:t,delta:fh(t,gh(e)),offset:fh(t,vh(e)),velocity:yh(e,.1)}}function vh(t){return t[0]}function gh(t){return t[t.length-1]}function yh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=gh(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Ml(e)));)n--;if(!r)return{x:0,y:0};const o=Fl(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function _h(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const wh=_h("dragHorizontal"),bh=_h("dragVertical");function xh(t){let e=!1;if("y"===t)e=bh();else if("x"===t)e=wh();else{const t=wh(),n=bh();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Sh(){const t=xh(!0);return!t||(t(),!1)}function kh(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Eh=.9999,Ph=1.0001,Th=-.01,Ah=.01;function Ch(t){return t.max-t.min}function Rh(t,e,n,r=.5){t.origin=r,t.originPoint=Jc(e.min,e.max,t.origin),t.scale=Ch(n)/Ch(e),t.translate=Jc(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Eh&&t.scale<=Ph||isNaN(t.scale))&&(t.scale=1),(t.translate>=Th&&t.translate<=Ah||isNaN(t.translate))&&(t.translate=0)}function Oh(t,e,n,r){Rh(t.x,e.x,n.x,r?r.originX:void 0),Rh(t.y,e.y,n.y,r?r.originY:void 0)}function Mh(t,e,n){t.min=n.min+e.min,t.max=t.min+Ch(e)}function Fh(t,e,n){t.min=e.min-n.min,t.max=t.min+Ch(e)}function Lh(t,e,n){Fh(t.x,e.x,n.x),Fh(t.y,e.y,n.y)}function Dh(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Vh(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}const Ih=.35;function jh(t,e,n){return{min:Bh(t,e),max:Bh(t,n)}}function Bh(t,e){return"number"==typeof t?t:t[e]||0}const Nh=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Uh=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Gh(t){return[t("x"),t("y")]}function Wh({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function Hh(t){return void 0===t||1===t}function $h({scale:t,scaleX:e,scaleY:n}){return!Hh(t)||!Hh(e)||!Hh(n)}function zh(t){return $h(t)||qh(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function qh(t){return Kh(t.x)||Kh(t.y)}function Kh(t){return t&&"0%"!==t}function Yh(t,e,n){return n+e*(t-n)}function Qh(t,e,n,r,i){return void 0!==i&&(t=Yh(t,i,r)),Yh(t,n,r)+e}function Xh(t,e=0,n=1,r,i){t.min=Qh(t.min,e,n,r,i),t.max=Qh(t.max,e,n,r,i)}function Zh(t,{x:e,y:n}){Xh(t.x,e.translate,e.scale,e.originPoint),Xh(t.y,n.translate,n.scale,n.originPoint)}const Jh=.999999999999,tp=1.0000000000001;function ep(t,e){t.min=t.min+e,t.max=t.max+e}function np(t,e,n,r,i=.5){Xh(t,e,n,Jc(t.min,t.max,i),r)}function rp(t,e){np(t.x,e.x,e.scaleX,e.scale,e.originX),np(t.y,e.y,e.scaleY,e.scale,e.originY)}function ip(t,e){return Wh(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}const op=({current:t})=>t?t.ownerDocument.defaultView:null,sp=new WeakMap;class ap{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Uh(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new hh(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ah(t,"page").point)},onStart:(t,e)=>{var n;const{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();if(r&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=xh(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gh((t=>{let e=this.getAxisMotionValue(t).get()||0;if(vu.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[t];if(r){e=Ch(r)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),o&&$l.postRender((()=>o(t,e))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=zd(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(r&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Gh((t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:op(this.visualElement)})}stop(t,e){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&$l.postRender((()=>o(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:r}=this.getProps();if(!n||!lp(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},r){return void 0!==e&&t<e?t=r?Jc(e,t,r.min):Math.max(t,e):void 0!==n&&t>n&&(t=r?Jc(n,t,r.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&kh(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!r)&&function(t,{top:e,left:n,bottom:r,right:i}){return{x:Dh(t.x,n,i),y:Dh(t.y,e,r)}}(r.layoutBox,e),this.elastic=function(t=Ih){return!1===t?t=0:!0===t&&(t=Ih),{x:jh(t,"left","right"),y:jh(t,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Gh((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(r.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!kh(t))return!1;const n=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(t,e,n){const r=ip(t,n),{scroll:i}=e;return i&&(ep(r.x,i.offset.x),ep(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Vh(t.x,e.x),y:Vh(t.y,e.y)}}(r.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Wh(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Gh((s=>{if(!lp(s,e,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?t[s]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Od(t,n,0,e,this.visualElement,!1,zd(this.visualElement,t)))}stopAnimation(){Gh((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Gh((t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()}))}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),r=n[e];return r||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Gh((e=>{const{drag:n}=this.getProps();if(!lp(e,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(e);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[e];i.set(t[e]-Jc(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!kh(e)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Gh((t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();r[t]=function(t,e){let n=.5;const r=Ch(t),i=Ch(e);return i>r?n=Zc(e.min,e.max-r,t.min):r>i&&(n=Zc(t.min,t.max-i,e.min)),ou(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Gh((e=>{if(!lp(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(Jc(i,o,r[e]))}))}addListeners(){if(!this.visualElement.current)return;sp.set(this.visualElement,this);const t=ch(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();kh(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),$l.read(e);const i=uh(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Gh((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{i(),t(),r(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Ih,dragMomentum:s=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function lp(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const up=t=>(e,n)=>{t&&$l.postRender((()=>t(e,n)))};const cp=oe(null);const dp=oe({}),hp=oe({}),pp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fp(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mp={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!gu.test(t))return t;t=parseFloat(t)}return`${fp(t,e.target.x)}% ${fp(t,e.target.y)}%`}},vp={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=tc.parse(t);if(i.length>5)return r;const o=tc.createTransformer(t),s="number"!=typeof i[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const u=Jc(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}},gp={};const{schedule:yp,cancel:_p}=Hl(queueMicrotask,!1);class wp extends Bt{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=t;var o;o=xp,Object.assign(gp,o),i&&(e.group&&e.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()})),pp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,r||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||$l.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yp.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function bp(t){const[e,n]=function(){const t=Bn(cp);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=Un();Fn((()=>r(i)),[]);const o=jn((()=>n&&n(i)),[i,n]);return!e&&n?[!1,o]:[!0]}(),r=Bn(dp);return no(wp,{...t,layoutGroup:r,switchLayoutGroup:Bn(hp),isPresent:e,safeToRemove:n})}const xp={borderRadius:{...mp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mp,borderTopRightRadius:mp,borderBottomLeftRadius:mp,borderBottomRightRadius:mp,boxShadow:vp},Sp=["TopLeft","TopRight","BottomLeft","BottomRight"],kp=Sp.length,Ep=t=>"string"==typeof t?parseFloat(t):t,Pp=t=>"number"==typeof t||gu.test(t);function Tp(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Ap=Rp(0,.5,Hc),Cp=Rp(.5,.95,Gl);function Rp(t,e,n){return r=>r<t?0:r>e?1:n(Zc(t,e,r))}function Op(t,e){t.min=e.min,t.max=e.max}function Mp(t,e){Op(t.x,e.x),Op(t.y,e.y)}function Fp(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Lp(t,e,n,r,i){return t=Yh(t-=e,1/n,r),void 0!==i&&(t=Yh(t,1/i,r)),t}function Dp(t,e,[n,r,i],o,s){!function(t,e=0,n=1,r=.5,i,o=t,s=t){vu.test(e)&&(e=parseFloat(e),e=Jc(s.min,s.max,e/100)-s.min);if("number"!=typeof e)return;let a=Jc(o.min,o.max,r);t===o&&(a-=e),t.min=Lp(t.min,e,n,a,i),t.max=Lp(t.max,e,n,a,i)}(t,e[n],e[r],e[i],e.scale,o,s)}const Vp=["x","scaleX","originX"],Ip=["y","scaleY","originY"];function jp(t,e,n,r){Dp(t.x,e,Vp,n?n.x:void 0,r?r.x:void 0),Dp(t.y,e,Ip,n?n.y:void 0,r?r.y:void 0)}function Bp(t){return 0===t.translate&&1===t.scale}function Np(t){return Bp(t.x)&&Bp(t.y)}function Up(t,e){return t.min===e.min&&t.max===e.max}function Gp(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Wp(t,e){return Gp(t.x,e.x)&&Gp(t.y,e.y)}function Hp(t){return Ch(t.x)/Ch(t.y)}function $p(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class zp{constructor(){this.members=[]}add(t){Ld(this.members,t),t.scheduleRender()}remove(t){if(Dd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let r=e;r>=0;r--){const t=this.members[r];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const qp=(t,e)=>t.depth-e.depth;class Kp{constructor(){this.children=[],this.isDirty=!1}add(t){Ld(this.children,t),this.isDirty=!0}remove(t){Dd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(qp),this.isDirty=!1,this.children.forEach(t)}}function Yp(t){const e=$d(t)?t.get():t;return Md(e)?e.toValue():e}const Qp={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Xp="undefined"!=typeof window&&void 0!==window.MotionDebug,Zp=["","X","Y","Z"],Jp={visibility:"hidden"};let tf=0;function ef(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function nf(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Gd(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",$l,!(e||r))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&nf(r)}function rf({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=tf++,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,Xp&&(Qp.totalNodes=Qp.resolvedTargetDeltas=Qp.recalculatedProjection=0),this.nodes.forEach(af),this.nodes.forEach(ff),this.nodes.forEach(mf),this.nodes.forEach(lf),Xp&&window.MotionDebug.record(Qp)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,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 Kp)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Vd),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=e)instanceof SVGElement&&"svg"!==r.tagName,this.instance=e;const{layoutId:i,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),t){let n;const r=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=mc.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(zl(r),t(o-e))};return $l.read(r,!0),()=>zl(r)}(r,250),pp.hasAnimatedSinceResize&&(pp.hasAnimatedSinceResize=!1,this.nodes.forEach(pf))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||bf,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Wp(this.targetLayout,r)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...jl(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||pf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zl(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(vf),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&nf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const t=this.path[i];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(cf);this.isUpdating||this.nodes.forEach(df),this.isUpdating=!1,this.nodes.forEach(hf),this.nodes.forEach(of),this.nodes.forEach(sf),this.clearAllSnapshots();const t=mc.now();ql.delta=ou(0,1e3/60,t-ql.timestamp),ql.timestamp=t,ql.isProcessing=!0,Kl.update.process(ql),Kl.preRender.process(ql),Kl.render.process(ql),ql.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(uf),this.sharedNodes.forEach(gf)}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)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Uh(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=r(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Np(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;t&&(e||zh(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var r;return t&&(n=this.removeTransform(n)),kf((r=n).x),kf(r.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return Uh();const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Pf))){const{scroll:t}=this.root;t&&(ep(n.x,t.offset.x),ep(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n=Uh();if(Mp(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let r=0;r<this.path.length;r++){const e=this.path[r],{scroll:i,options:o}=e;e!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&Mp(n,t),ep(n.x,i.offset.x),ep(n.y,i.offset.y))}return n}applyTransform(t,e=!1){const n=Uh();Mp(n,t);for(let r=0;r<this.path.length;r++){const t=this.path[r];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&rp(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),zh(t.latestValues)&&rp(n,t.latestValues)}return zh(this.latestValues)&&rp(n,this.latestValues),n}removeTransform(t){const e=Uh();Mp(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!zh(t.latestValues))continue;$h(t.latestValues)&&t.updateSnapshot();const r=Uh();Mp(r,t.measurePageBox()),jp(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,r)}return zh(this.latestValues)&&jp(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.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!==ql.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(t||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=ql.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Uh(),this.relativeTargetOrigin=Uh(),Lh(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Mp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Uh(),this.targetWithTransforms=Uh()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Mh(s.x,a.x,l.x),Mh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Mp(this.target,this.layout.layoutBox),Zh(this.target,this.targetDelta)):Mp(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Uh(),this.relativeTargetOrigin=Uh(),Lh(this.relativeTargetOrigin,this.target,t.target),Mp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Xp&&Qp.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!$h(this.parent.latestValues)&&!qh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let r=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===ql.timestamp&&(r=!1),r)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;Mp(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,r=!1){const i=n.length;if(!i)return;let o,s;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&rp(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Zh(t,s)),r&&zh(o.latestValues)&&rp(t,o.latestValues))}e.x<tp&&e.x>Jh&&(e.x=1),e.y<tp&&e.y>Jh&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms=Uh());const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Fp(this.prevProjectionDelta.x,this.projectionDelta.x),Fp(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Oh(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&$p(this.projectionDelta.x,this.prevProjectionDelta.x)&&$p(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Xp&&Qp.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Nh(),this.projectionDelta=Nh(),this.projectionDeltaWithTransform=Nh()}setAnimationOrigin(t,e=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=Nh();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const s=Uh(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(wf));let d;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,f,m,v;yf(o.x,t.x,n),yf(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lh(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,m=s,v=n,_f(p.x,f.x,m.x,v),_f(p.y,f.y,m.y,v),d&&(l=this.relativeTarget,h=d,Up(l.x,h.x)&&Up(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d=Uh()),Mp(d,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,r,i,o){i?(t.opacity=Jc(0,void 0!==n.opacity?n.opacity:1,Ap(r)),t.opacityExit=Jc(void 0!==e.opacity?e.opacity:1,0,Cp(r))):o&&(t.opacity=Jc(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<kp;s++){const i=`border${Sp[s]}Radius`;let o=Tp(e,i),a=Tp(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Pp(o)===Pp(a)?(t[i]=Math.max(Jc(Ep(o),Ep(a),r),0),(vu.test(a)||vu.test(o))&&(t[i]+="%")):t[i]=a)}(e.rotate||n.rotate)&&(t.rotate=Jc(e.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$l.update((()=>{pp.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const r=$d(t)?t:jd(t);return r.start(Od("",r,e,n)),r.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.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);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:r,latestValues:i}=t;if(e&&n&&r){if(this!==t&&this.layout&&r&&Ef(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Uh();const e=Ch(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const r=Ch(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+r}Mp(e,n),rp(e,i),Oh(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new zp);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const r={};n.z&&ef("z",t,r,this.animationValues);for(let i=0;i<Zp.length;i++)ef(`rotate${Zp[i]}`,t,r,this.animationValues),ef(`skew${Zp[i]}`,t,r,this.animationValues);t.render();for(const i in r)t.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Jp;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Yp(null==t?void 0:t.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Yp(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!zh(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=function(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),1===e.x&&1===e.y||(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;t&&(r=`perspective(${t}px) ${r}`),e&&(r+=`rotate(${e}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),i&&(r.transform=i(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?r.opacity=o===this?null!==(n=null!==(e=s.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const u in gp){if(void 0===s[u])continue;const{correct:t,applyTo:e}=gp[u],n="none"===r.transform?s[u]:t(s[u],o);if(e){const t=e.length;for(let i=0;i<t;i++)r[e[i]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=o===this?Yp(null==t?void 0:t.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(cf),this.root.sharedNodes.clear()}}}function of(t){t.updateLayout()}function sf(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:r}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?Gh((t=>{const r=o?n.measuredBox[t]:n.layoutBox[t],i=Ch(r);r.min=e[t].min,r.max=r.min+i})):Ef(i,n.layoutBox,e)&&Gh((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=Ch(e[r]);i.max=i.min+s,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[r].max=t.relativeTarget[r].min+s)}));const s=Nh();Oh(s,e,n.layoutBox);const a=Nh();o?Oh(a,t.applyTransform(r,!0),n.measuredBox):Oh(a,e,n.layoutBox);const l=!Np(s);let u=!1;if(!t.resumeFrom){const r=t.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s=Uh();Lh(s,n.layoutBox,i.layoutBox);const a=Uh();Lh(a,e,o.layoutBox),Wp(s,a)||(u=!0),r.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=s,t.relativeParent=r)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function af(t){Xp&&Qp.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function lf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function uf(t){t.clearSnapshot()}function cf(t){t.clearMeasurements()}function df(t){t.isLayoutDirty=!1}function hf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function pf(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ff(t){t.resolveTargetDelta()}function mf(t){t.calcProjection()}function vf(t){t.resetSkewAndRotation()}function gf(t){t.removeLeadSnapshot()}function yf(t,e,n){t.translate=Jc(e.translate,0,n),t.scale=Jc(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _f(t,e,n,r){t.min=Jc(e.min,n.min,r),t.max=Jc(e.max,n.max,r)}function wf(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const bf={duration:.45,ease:[.4,0,.1,1]},xf=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Sf=xf("applewebkit/")&&!xf("chrome/")?Math.round:Gl;function kf(t){t.min=Sf(t.min),t.max=Sf(t.max)}function Ef(t,e,n){return"position"===t||"preserve-aspect"===t&&(r=Hp(e),i=Hp(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function Pf(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const Tf=rf({attachResizeListener:(t,e)=>uh(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Af={current:void 0},Cf=rf({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Af.current){const t=new Tf({});t.mount(window),t.setOptions({layoutScroll:!0}),Af.current=t}return Af.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Rf={pan:{Feature:class extends rh{constructor(){super(...arguments),this.removePointerDownListener=Gl}onPointerDown(t){this.session=new hh(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:op(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:up(t),onStart:up(e),onMove:n,onEnd:(t,e)=>{delete this.session,r&&$l.postRender((()=>r(t,e)))}}}mount(){this.removePointerDownListener=ch(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends rh{constructor(t){super(t),this.removeGroupControls=Gl,this.removeListeners=Gl,this.controls=new ap(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gl}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Cf,MeasureLayout:bp}};function Of(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd";return ch(t.current,n,((n,i)=>{if("touch"===n.pointerType||Sh())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const s=o[r];s&&$l.postRender((()=>s(n,i)))}),{passive:!t.getProps()[r]})}const Mf=(t,e)=>!!e&&(t===e||Mf(t,e.parentElement));function Ff(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ah(n))}const Lf=new WeakMap,Df=new WeakMap,Vf=t=>{const e=Lf.get(t.target);e&&e(t)},If=t=>{t.forEach(Vf)};function jf(t,e,n){const r=function({root:t,...e}){const n=t||document;Df.has(n)||Df.set(n,{});const r=Df.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(If,{root:t,...e})),r[i]}(e);return Lf.set(t,n),r.observe(t),()=>{Lf.delete(t),r.unobserve(t)}}const Bf={some:0,all:1};const Nf={inView:{Feature:class extends rh{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:r="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Bf[r]};return jf(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=e?n:r;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends rh{constructor(){super(...arguments),this.removeStartListeners=Gl,this.removeEndListeners=Gl,this.removeAccessibleListeners=Gl,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=ch(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||Mf(this.node.current,t.target)?n:r;o&&$l.update((()=>o(t,e)))}),{passive:!(n.onTap||n.onPointerUp)}),i=ch(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Xc(r,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=uh(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=uh(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&Ff("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&$l.postRender((()=>n(t,e)))}))})),Ff("down",((t,e)=>{this.startPress(t,e)}))})),e=uh(this.node.current,"blur",(()=>{this.isPressing&&Ff("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Xc(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&$l.postRender((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Sh()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&$l.postRender((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=ch(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=uh(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Xc(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends rh{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(Ty){t=!0}t&&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=Xc(uh(this.node.current,"focus",(()=>this.onFocus())),uh(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends rh{mount(){this.unmount=Xc(Of(this.node,!0),Of(this.node,!1))}unmount(){}}}},Uf={layout:{ProjectionNode:Cf,MeasureLayout:bp}},Gf=oe({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Wf=oe({}),Hf="undefined"!=typeof window,$f=Hf?Ln:Fn,zf=oe({strict:!1});let qf=!1;function Kf(t,e,n,r,i){var o;const{visualElement:s}=Bn(Wf),a=Bn(zf),l=Bn(cp),u=Bn(Gf).reducedMotion,c=Dn();r=r||a.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const d=c.current,h=Bn(hp);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Qf(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&kh(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(c.current,n,i,h),qr((()=>{d&&d.update(n,l)}));const p=n[Ud],f=Dn(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return $f((()=>{d&&(d.updateFeatures(),yp.render(d.render),f.current&&d.animationState&&d.animationState.animateChanges())})),Fn((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current=!1,qf||(qf=!0,queueMicrotask(Yf)))})),d}function Yf(){window.MotionHandoffIsComplete=!0}function Qf(t){if(t)return!1!==t.options.allowProjection?t.projection:Qf(t.parent)}function Xf(t,e,n){return jn((r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&("function"==typeof n?n(r):kh(n)&&(n.current=r))}),[e])}function Zf(t){return bl(t.animate)||Cl.some((e=>kl(t[e])))}function Jf(t){return Boolean(Zf(t)||t.variants)}function tm(t){const{initial:e,animate:n}=function(t,e){if(Zf(t)){const{initial:e,animate:n}=t;return{initial:!1===e||kl(e)?e:void 0,animate:kl(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,Bn(Wf));return In((()=>({initial:e,animate:n})),[em(e),em(n)])}function em(t){return Array.isArray(t)?t.join(" "):t}const nm={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"]},rm={};for(const bS in nm)rm[bS]={isEnabled:t=>nm[bS].some((e=>!!t[e]))};const im=Symbol.for("motionComponentSymbol");function om({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&function(t){for(const e in t)rm[e]={...rm[e],...t[e]}}(t);const o=er((function(t,o){let s;const a={...Bn(Gf),...t,layoutId:sm(t)},{isStatic:l}=a,u=tm(t),c=r(t,l);if(!l&&Hf){Bn(zf).strict;const t=function(t){const{drag:e,layout:n}=rm;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(a);s=t.MeasureLayout,u.visualElement=Kf(i,c,a,e,t.ProjectionNode)}return no(Wf.Provider,{value:u,children:[s&&u.visualElement?no(s,{visualElement:u.visualElement,...a}):null,n(i,t,Xf(c,u.visualElement,o),c,l,u.visualElement)]})}));return o[im]=i,o}function sm({layoutId:t}){const e=Bn(dp).id;return e&&void 0!==t?e+"-"+t:t}const am=["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 lm(t){return"string"==typeof t&&!t.includes("-")&&!!(am.indexOf(t)>-1||/[A-Z]/u.test(t))}function um(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const o in n)t.style.setProperty(o,n[o])}const cm=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 dm(t,e,n,r){um(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(cm.has(i)?i:Nd(i),e.attrs[i])}function hm(t,{layout:e,layoutId:n}){return Ol.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!gp[t]||"opacity"===t)}function pm(t,e,n){var r;const{style:i}=t,o={};for(const s in i)($d(i[s])||e.style&&$d(e.style[s])||hm(s,t)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(o[s]=i[s]);return n&&i&&"string"==typeof i.willChange&&(n.applyWillChange=!1),o}function fm(t,e,n){const r=pm(t,e,n);for(const i in t)if($d(t[i])||$d(e[i])){r[-1!==Rl.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return r}function mm(t){const e=Dn(null);return null===e.current&&(e.current=t()),e.current}const vm=t=>(e,n)=>{const r=Bn(Wf),i=Bn(cp),o=()=>function({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:r},i,o,s,a){const l={latestValues:_m(i,o,s,!a&&t,e),renderState:n()};return r&&(l.mount=t=>r(i,t,l)),l}(t,e,r,i,n);return n?o():mm(o)};function gm(t,e){const n=Wd(e);n&&Ld(t,n)}function ym(t,e,n){const r=Array.isArray(e)?e:[e];for(let i=0;i<r.length;i++){const e=Pl(t,r[i]);if(e){const{transitionEnd:t,transition:r,...i}=e;n(i,t)}}}function _m(t,e,n,r,i){var o;const s={},a=[],l=r&&void 0===(null===(o=t.style)||void 0===o?void 0:o.willChange),u=i(t,{});for(const v in u)s[v]=Yp(u[v]);let{initial:c,animate:d}=t;const h=Zf(t),p=Jf(t);e&&p&&!h&&!1!==t.inherit&&(void 0===c&&(c=e.initial),void 0===d&&(d=e.animate));let f=!!n&&!1===n.initial;f=f||!1===c;const m=f?d:c;return m&&"boolean"!=typeof m&&!bl(m)&&ym(t,m,((t,e)=>{for(const n in t){let e=t[n];if(Array.isArray(e)){e=e[f?e.length-1:0]}null!==e&&(s[n]=e)}for(const n in e)s[n]=e[n]})),l&&(d&&!1!==c&&!bl(d)&&ym(t,d,(t=>{for(const e in t)gm(a,e)})),a.length&&(s.willChange=a.join(","))),s}const wm=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),bm=()=>({...wm(),attrs:{}}),xm=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Sm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},km=Rl.length;function Em(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const t=e[l];if(Ol.has(l))s=!0;else if(Jl(l))i[l]=t;else{const e=xm(t,sc[l]);l.startsWith("origin")?(a=!0,o[l]=e):r[l]=e}}if(e.transform||(s||n?r.transform=function(t,e,n){let r="",i=!0;for(let o=0;o<km;o++){const s=Rl[o],a=t[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=xm(a,sc[s]);l||(i=!1,r+=`${Sm[s]||s}(${t}) `),n&&(e[s]=t)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;r.transformOrigin=`${t} ${e} ${n}`}}function Pm(t,e,n){return"string"==typeof t?t:gu.transform(e+n*t)}const Tm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Am={offset:"strokeDashoffset",array:"strokeDasharray"};function Cm(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(Em(t,u,d),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:f}=t;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Pm(e,t.x,t.width)} ${Pm(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?Tm:Am;t[o.offset]=gu.transform(-r);const s=gu.transform(e),a=gu.transform(n);t[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Rm=t=>"string"==typeof t&&"svg"===t.toLowerCase(),Om={useVisualState:vm({scrapeMotionValuesFromProps:fm,createRenderState:bm,onMount:(t,e,{renderState:n,latestValues:r})=>{$l.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(Ty){n.dimensions={x:0,y:0,width:0,height:0}}})),$l.render((()=>{Cm(n,r,Rm(e.tagName),t.transformTemplate),dm(e,n)}))}})},Mm={useVisualState:vm({applyWillChange:!0,scrapeMotionValuesFromProps:pm,createRenderState:wm})};function Fm(t,e,n){for(const r in e)$d(e[r])||hm(r,n)||(t[r]=e[r])}function Lm(t,e){const n={};return Fm(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return In((()=>{const n=wm();return Em(n,e,t),Object.assign({},n.vars,n.style)}),[e])}(t,e)),n}function Dm(t,e){const n={},r=Lm(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const Vm=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"]);function Im(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Vm.has(t)}let jm=t=>!Im(t);try{(Bm=require("@emotion/is-prop-valid").default)&&(jm=t=>t.startsWith("on")?!Im(t):Bm(t))}catch(wS){}var Bm;function Nm(t,e,n,r){const i=In((()=>{const n=bm();return Cm(n,e,Rm(r),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};Fm(e,t.style,t),i.style={...e,...i.style}}return i}function Um(t=!1){return(e,n,r,{latestValues:i},o)=>{const s=(lm(e)?Nm:Dm)(n,i,o,e),a=function(t,e,n){const r={};for(const i in t)"values"===i&&"object"==typeof t.values||(jm(i)||!0===n&&Im(i)||!e&&!Im(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}(n,"string"==typeof e,t),l=e!==jt?{...a,...s,ref:r}:{},{children:u}=n;return Dt(e,{...l,children:In((()=>$d(u)?u.get():u),[u])})}}function Gm(t,e){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return om({...lm(n)?Om:Mm,preloadedFeatures:t,useRender:Um(r),createVisualElement:e,Component:n})}}const Wm={current:null},Hm={current:!1};const $m=new WeakMap,zm=[...Cu,Wu,tc],qm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Km=Cl.length;class Ym{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Vu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,$l.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Zf(e),this.isVariantNode=Jf(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const d in c){const t=c[d];void 0!==a[d]&&$d(t)&&t.set(a[d],!1)}}mount(t){this.current=t,$m.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Hm.current||function(){if(Hm.current=!0,Hf)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Wm.current=t.matches;t.addListener(e),e()}else Wm.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Wm.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){$m.delete(this.current),this.projection&&this.projection.unmount(),zl(this.notifyUpdate),zl(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ol.has(t),r=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&$l.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{r(),i(),o&&o(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in rm){const e=rm[t];if(!e)continue;const{isEnabled:n,Feature:r}=e;if(!this.features[t]&&r&&n(this.props)&&(this.features[t]=new r(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Uh()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<qm.length;n++){const e=qm[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const r=t["on"+e];r&&(this.propEventSubscriptions[e]=this.on(e,r))}this.prevMotionValues=function(t,e,n){for(const r in e){const i=e[r],o=n[r];if($d(i))t.addValue(r,i);else if($d(o))t.addValue(r,jd(i,{owner:t}));else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,jd(void 0!==e?e:i,{owner:t}))}}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let n=0;n<Km;n++){const t=Cl[n],r=this.props[t];(kl(r)||!1===r)&&(e[t]=r)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=jd(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let r=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=r&&("string"==typeof r&&(Xl(r)||Yl(r))?r=parseFloat(r):(i=r,!zm.find(Au(i))&&tc.test(e)&&(r=uc(t,e))),this.setBaseTarget(t,$d(r)?r.get():r)),$d(r)?r.get():r}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=Pl(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(r=i[t])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||$d(i)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Vd),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Qm extends Ym{constructor(){super(...arguments),this.KeyframeResolver=dc}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}class Xm extends Qm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=um}readValueFromInstance(t,e){if(Ol.has(e)){const t=lc(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),i=(Jl(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ip(t,e)}build(t,e,n){Em(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return pm(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$d(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}class Zm extends Qm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Uh}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ol.has(e)){const t=lc(e);return t&&t.default||0}return e=cm.has(e)?e:Nd(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return fm(t,e,n)}build(t,e,n){Cm(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,r){dm(t,e,0,r)}mount(t){this.isSVGTag=Rm(t.tagName),super.mount(t)}}const Jm=wl(Gm({...oh,...Nf,...Rf,...Uf},((t,e)=>lm(t)?new Zm(e):new Xm(e,{allowProjection:t!==jt}))));class tv extends Bt{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function ev({children:t,isPresent:e}){const n=Un(),r=Dn(null),i=Dn({width:0,height:0,top:0,left:0}),{nonce:o}=Bn(Gf);return qr((()=>{const{width:t,height:s,top:a,left:l}=i.current;if(e||!r.current||!t||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return o&&(u.nonce=o),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[e]),no(tv,{isPresent:e,childRef:r,sizeRef:i,children:jr(t,{ref:r})})}const nv=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=mm(rv),l=Un(),u=In((()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:t=>{a.set(t,!0);for(const e of a.values())if(!e)return;r&&r()},register:t=>(a.set(t,!1),()=>a.delete(t))})),o?[Math.random()]:[n]);return In((()=>{a.forEach(((t,e)=>a.set(e,!1)))}),[n]),Fn((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(t=no(ev,{isPresent:n,children:t})),no(cp.Provider,{value:u,children:t})};function rv(){return new Map}const iv=t=>t.key||"";function ov(t){const e=[];return rr.forEach(t,(t=>{Dr(t)&&e.push(t)})),e}const sv=({children:t,exitBeforeEnter:e,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=In((()=>ov(t)),[t]),l=a.map(iv),u=Dn(!0),c=Dn(a),d=mm((()=>new Map)),[h,p]=On(a),[f,m]=On(a);$f((()=>{u.current=!1,c.current=a;for(let t=0;t<f.length;t++){const e=iv(f[t]);l.includes(e)?d.delete(e):!0!==d.get(e)&&d.set(e,!1)}}),[f,l.length,l.join("-")]);const v=[];if(a!==h){let t=[...a];for(let e=0;e<f.length;e++){const n=f[e],r=iv(n);l.includes(r)||(t.splice(e,0,n),v.push(n))}return"wait"===s&&v.length&&(t=v),m(ov(t)),void p(a)}const{forceRender:g}=Bn(dp);return no(jt,{children:f.map((t=>{const e=iv(t),h=a===f||l.includes(e);return no(nv,{isPresent:h,initial:!(u.current&&!r)&&void 0,custom:h?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:h?void 0:()=>{if(!d.has(e))return;d.set(e,!0);let t=!0;d.forEach((e=>{e||(t=!1)})),t&&(null==g||g(),m(c.current),i&&i())},children:t},e)}))})};var av=t=>"checkbox"===t.type,lv=t=>t instanceof Date,uv=t=>null==t;const cv=t=>"object"==typeof t;var dv=t=>!uv(t)&&!Array.isArray(t)&&cv(t)&&!lv(t),hv=t=>dv(t)&&t.target?av(t.target)?t.target.checked:t.target.value:t,pv=(t,e)=>t.has((t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t)(e)),fv=t=>{const e=t.constructor&&t.constructor.prototype;return dv(e)&&e.hasOwnProperty("isPrototypeOf")},mv="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function vv(t){let e;const n=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else{if(mv&&(t instanceof Blob||t instanceof FileList)||!n&&!dv(t))return t;if(e=n?[]:{},n||fv(t))for(const n in t)t.hasOwnProperty(n)&&(e[n]=vv(t[n]));else e=t}return e}var gv=t=>Array.isArray(t)?t.filter(Boolean):[],yv=t=>void 0===t,_v=(t,e,n)=>{if(!e||!dv(t))return n;const r=gv(e.split(/[,[\].]+?/)).reduce(((t,e)=>uv(t)?t:t[e]),t);return yv(r)||r===t?yv(t[e])?n:t[e]:r},wv=t=>"boolean"==typeof t,bv=t=>/^\w*$/.test(t),xv=t=>gv(t.replace(/["|']|\]/g,"").split(/\.|\[/)),Sv=(t,e,n)=>{let r=-1;const i=bv(e)?[e]:xv(e),o=i.length,s=o-1;for(;++r<o;){const e=i[r];let o=n;if(r!==s){const n=t[e];o=dv(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===e)return;t[e]=o,t=t[e]}return t};const kv={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ev={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Pv="max",Tv="min",Av="maxLength",Cv="minLength",Rv="pattern",Ov="required",Mv="validate",Fv=Xr.createContext(null),Lv=()=>Xr.useContext(Fv);var Dv=(t,e,n,r=!0)=>{const i={defaultValues:e._defaultValues};for(const o in t)Object.defineProperty(i,o,{get:()=>{const i=o;return e._proxyFormState[i]!==Ev.all&&(e._proxyFormState[i]=!r||Ev.all),n&&(n[i]=!0),t[i]}});return i},Vv=t=>dv(t)&&!Object.keys(t).length,Iv=(t,e,n,r)=>{n(t);const{name:i,...o}=t;return Vv(o)||Object.keys(o).length>=Object.keys(e).length||Object.keys(o).find((t=>e[t]===(!r||Ev.all)))},jv=t=>Array.isArray(t)?t:[t],Bv=(t,e,n)=>!t||!e||t===e||jv(t).some((t=>t&&(n?t===e:t.startsWith(e)||e.startsWith(t))));function Nv(t){const e=Xr.useRef(t);e.current=t,Xr.useEffect((()=>{const n=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{n&&n.unsubscribe()}}),[t.disabled])}var Uv=t=>"string"==typeof t,Gv=(t,e,n,r,i)=>Uv(t)?(r&&e.watch.add(t),_v(n,t,i)):Array.isArray(t)?t.map((t=>(r&&e.watch.add(t),_v(n,t)))):(r&&(e.watchAll=!0),n);function Wv(t){const e=Lv(),{name:n,disabled:r,control:i=e.control,shouldUnregister:o}=t,s=pv(i._names.array,n),a=function(t){const e=Lv(),{control:n=e.control,name:r,defaultValue:i,disabled:o,exact:s}=t||{},a=Xr.useRef(r);a.current=r,Nv({disabled:o,subject:n._subjects.values,next:t=>{Bv(a.current,t.name,s)&&u(vv(Gv(a.current,n._names,t.values||n._formValues,!1,i)))}});const[l,u]=Xr.useState(n._getWatch(r,i));return Xr.useEffect((()=>n._removeUnmounted())),l}({control:i,name:n,defaultValue:_v(i._formValues,n,_v(i._defaultValues,n,t.defaultValue)),exact:!0}),l=function(t){const e=Lv(),{control:n=e.control,disabled:r,name:i,exact:o}=t||{},[s,a]=Xr.useState(n._formState),l=Xr.useRef(!0),u=Xr.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=Xr.useRef(i);return c.current=i,Nv({disabled:r,next:t=>l.current&&Bv(c.current,t.name,o)&&Iv(t,u.current,n._updateFormState)&&a({...n._formState,...t}),subject:n._subjects.state}),Xr.useEffect((()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1})),[n]),Dv(s,n,u.current,!1)}({control:i,name:n,exact:!0}),u=Xr.useRef(i.register(n,{...t.rules,value:a,...wv(t.disabled)?{disabled:t.disabled}:{}}));return Xr.useEffect((()=>{const t=i._options.shouldUnregister||o,e=(t,e)=>{const n=_v(i._fields,t);n&&n._f&&(n._f.mount=e)};if(e(n,!0),t){const t=vv(_v(i._options.defaultValues,n));Sv(i._defaultValues,n,t),yv(_v(i._formValues,n))&&Sv(i._formValues,n,t)}return()=>{(s?t&&!i._state.action:t)?i.unregister(n):e(n,!1)}}),[n,i,s,o]),Xr.useEffect((()=>{_v(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:_v(i._fields,n)._f.value})}),[r,n,i]),{field:{name:n,value:a,...wv(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Xr.useCallback((t=>u.current.onChange({target:{value:hv(t),name:n},type:kv.CHANGE})),[n]),onBlur:Xr.useCallback((()=>u.current.onBlur({target:{value:_v(i._formValues,n),name:n},type:kv.BLUR})),[n,i]),ref:Xr.useCallback((t=>{const e=_v(i._fields,n);e&&t&&(e._f.ref={focus:()=>t.focus(),select:()=>t.select(),setCustomValidity:e=>t.setCustomValidity(e),reportValidity:()=>t.reportValidity()})}),[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!_v(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!_v(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!_v(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!_v(l.validatingFields,n)},error:{enumerable:!0,get:()=>_v(l.errors,n)}})}}const Hv=t=>t.render(Wv(t));var $v=(t,e,n,r,i)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:i||!0}}:{},zv=t=>({isOnSubmit:!t||t===Ev.onSubmit,isOnBlur:t===Ev.onBlur,isOnChange:t===Ev.onChange,isOnAll:t===Ev.all,isOnTouch:t===Ev.onTouched}),qv=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some((e=>t.startsWith(e)&&/^\.\w+/.test(t.slice(e.length)))));const Kv=(t,e,n,r)=>{for(const i of n||Object.keys(t)){const n=_v(t,i);if(n){const{_f:t,...o}=n;if(t){if(t.refs&&t.refs[0]&&e(t.refs[0],i)&&!r)return!0;if(t.ref&&e(t.ref,t.name)&&!r)return!0;if(Kv(o,e))break}else if(dv(o)&&Kv(o,e))break}}};var Yv=(t,e,n)=>{const r=jv(_v(t,n));return Sv(r,"root",e[n]),Sv(t,n,r),t},Qv=t=>"file"===t.type,Xv=t=>"function"==typeof t,Zv=t=>{if(!mv)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Jv=t=>Uv(t),tg=t=>"radio"===t.type,eg=t=>t instanceof RegExp;const ng={value:!1,isValid:!1},rg={value:!0,isValid:!0};var ig=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter((t=>t&&t.checked&&!t.disabled)).map((t=>t.value));return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!yv(t[0].attributes.value)?yv(t[0].value)||""===t[0].value?rg:{value:t[0].value,isValid:!0}:rg:ng}return ng};const og={isValid:!1,value:null};var sg=t=>Array.isArray(t)?t.reduce(((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t),og):og;function ag(t,e,n="validate"){if(Jv(t)||Array.isArray(t)&&t.every(Jv)||wv(t)&&!t)return{type:n,message:Jv(t)?t:"",ref:e}}var lg=t=>dv(t)&&!eg(t)?t:{value:t,message:""},ug=async(t,e,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:c,max:d,pattern:h,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=t._f,y=_v(e,f);if(!v||g)return{};const _=s?s[0]:o,w=t=>{r&&_.reportValidity&&(_.setCustomValidity(wv(t)?"":t||""),_.reportValidity())},b={},x=tg(o),S=av(o),k=x||S,E=(m||Qv(o))&&yv(o.value)&&yv(y)||Zv(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,P=$v.bind(null,f,n,b),T=(t,e,n,r=Av,i=Cv)=>{const s=t?e:n;b[f]={type:t?r:i,message:s,ref:o,...P(t?r:i,s)}};if(i?!Array.isArray(y)||!y.length:a&&(!k&&(E||uv(y))||wv(y)&&!y||S&&!ig(s).isValid||x&&!sg(s).isValid)){const{value:t,message:e}=Jv(a)?{value:!!a,message:a}:lg(a);if(t&&(b[f]={type:Ov,message:e,ref:_,...P(Ov,e)},!n))return w(e),b}if(!(E||uv(c)&&uv(d))){let t,e;const r=lg(d),i=lg(c);if(uv(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=t=>new Date((new Date).toDateString()+" "+t),a="time"==o.type,l="week"==o.type;Uv(r.value)&&y&&(t=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Uv(i.value)&&y&&(e=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);uv(r.value)||(t=n>r.value),uv(i.value)||(e=n<i.value)}if((t||e)&&(T(!!t,r.message,i.message,Pv,Tv),!n))return w(b[f].message),b}if((l||u)&&!E&&(Uv(y)||i&&Array.isArray(y))){const t=lg(l),e=lg(u),r=!uv(t.value)&&y.length>+t.value,i=!uv(e.value)&&y.length<+e.value;if((r||i)&&(T(r,t.message,e.message),!n))return w(b[f].message),b}if(h&&!E&&Uv(y)){const{value:t,message:e}=lg(h);if(eg(t)&&!y.match(t)&&(b[f]={type:Rv,message:e,ref:o,...P(Rv,e)},!n))return w(e),b}if(p)if(Xv(p)){const t=ag(await p(y,e),_);if(t&&(b[f]={...t,...P(Mv,t.message)},!n))return w(t.message),b}else if(dv(p)){let t={};for(const r in p){if(!Vv(t)&&!n)break;const i=ag(await p[r](y,e),_,r);i&&(t={...i,...P(r,i.message)},w(i.message),n&&(b[f]=t))}if(!Vv(t)&&(b[f]={ref:_,...t},!n))return b}return w(!0),b};function cg(t,e){const n=Array.isArray(e)?e:bv(e)?[e]:xv(e),r=1===n.length?t:function(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=yv(t)?r++:t[e[r++]];return t}(t,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(dv(r)&&Vv(r)||Array.isArray(r)&&function(t){for(const e in t)if(t.hasOwnProperty(e)&&!yv(t[e]))return!1;return!0}(r))&&cg(t,n.slice(0,-1)),t}var dg=()=>{let t=[];return{get observers(){return t},next:e=>{for(const n of t)n.next&&n.next(e)},subscribe:e=>(t.push(e),{unsubscribe:()=>{t=t.filter((t=>t!==e))}}),unsubscribe:()=>{t=[]}}},hg=t=>uv(t)||!cv(t);function pg(t,e){if(hg(t)||hg(e))return t===e;if(lv(t)&&lv(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const i of n){const n=t[i];if(!r.includes(i))return!1;if("ref"!==i){const t=e[i];if(lv(n)&&lv(t)||dv(n)&&dv(t)||Array.isArray(n)&&Array.isArray(t)?!pg(n,t):n!==t)return!1}}return!0}var fg=t=>"select-multiple"===t.type,mg=t=>tg(t)||av(t),vg=t=>Zv(t)&&t.isConnected,gg=t=>{for(const e in t)if(Xv(t[e]))return!0;return!1};function yg(t,e={}){const n=Array.isArray(t);if(dv(t)||n)for(const r in t)Array.isArray(t[r])||dv(t[r])&&!gg(t[r])?(e[r]=Array.isArray(t[r])?[]:{},yg(t[r],e[r])):uv(t[r])||(e[r]=!0);return e}function _g(t,e,n){const r=Array.isArray(t);if(dv(t)||r)for(const i in t)Array.isArray(t[i])||dv(t[i])&&!gg(t[i])?yv(e)||hg(n[i])?n[i]=Array.isArray(t[i])?yg(t[i],[]):{...yg(t[i])}:_g(t[i],uv(e)?{}:e[i],n[i]):n[i]=!pg(t[i],e[i]);return n}var wg=(t,e)=>_g(t,e,yg(e)),bg=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>yv(t)?t:e?""===t?NaN:t?+t:t:n&&Uv(t)?new Date(t):r?r(t):t;function xg(t){const e=t.ref;if(!(t.refs?t.refs.every((t=>t.disabled)):e.disabled))return Qv(e)?e.files:tg(e)?sg(t.refs).value:fg(e)?[...e.selectedOptions].map((({value:t})=>t)):av(e)?ig(t.refs).value:bg(yv(e.value)?t.ref.value:e.value,t)}var Sg=(t,e,n,r)=>{const i={};for(const o of t){const t=_v(e,o);t&&Sv(i,o,t._f)}return{criteriaMode:n,names:[...t],fields:i,shouldUseNativeValidation:r}},kg=t=>yv(t)?t:eg(t)?t.source:dv(t)?eg(t.value)?t.value.source:t.value:t;const Eg="AsyncFunction";var Pg=t=>!(t&&t.validate||!(Xv(t.validate)&&t.validate.constructor.name===Eg||dv(t.validate)&&Object.values(t.validate).find((t=>t.constructor.name===Eg)))),Tg=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function Ag(t,e,n){const r=_v(t,n);if(r||bv(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=_v(e,r),s=_v(t,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}var Cg=(t,e,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(e||t):(n?r.isOnBlur:i.isOnBlur)?!t:!(n?r.isOnChange:i.isOnChange)||t),Rg=(t,e)=>!gv(_v(t,e)).length&&cg(t,e);const Og={mode:Ev.onSubmit,reValidateMode:Ev.onChange,shouldFocusError:!0};function Mg(t={}){let e,n={...Og,...t},r={submitCount:0,isDirty:!1,isLoading:Xv(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(dv(n.defaultValues)||dv(n.values))&&vv(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:vv(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:dg(),array:dg(),state:dg()},h=zv(n.mode),p=zv(n.reValidateMode),f=n.criteriaMode===Ev.all,m=async t=>{if(c.isValid||t){const t=n.resolver?Vv((await w()).errors):await b(i,!0);t!==r.isValid&&d.state.next({isValid:t})}},v=(t,e)=>{(c.isValidating||c.validatingFields)&&((t||Array.from(l.mount)).forEach((t=>{t&&(e?Sv(r.validatingFields,t,e):cg(r.validatingFields,t))})),d.state.next({validatingFields:r.validatingFields,isValidating:!Vv(r.validatingFields)}))},g=(t,e,n,r)=>{const l=_v(i,t);if(l){const i=_v(s,t,yv(n)?_v(o,t):n);yv(i)||r&&r.defaultChecked||e?Sv(s,t,e?i:xg(l._f)):k(t,i),a.mount&&m()}},y=(t,e,n,s,a)=>{let l=!1,u=!1;const h={name:t},p=!!(_v(i,t)&&_v(i,t)._f&&_v(i,t)._f.disabled);if(!n||s){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=x(),l=u!==h.isDirty);const n=p||pg(_v(o,t),e);u=!(p||!_v(r.dirtyFields,t)),n||p?cg(r.dirtyFields,t):Sv(r.dirtyFields,t,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!n}if(n){const e=_v(r.touchedFields,t);e||(Sv(r.touchedFields,t,n),h.touchedFields=r.touchedFields,l=l||c.touchedFields&&e!==n)}return l&&a&&d.state.next(h),l?h:{}},_=(n,i,o,s)=>{const a=_v(r.errors,n),l=c.isValid&&wv(i)&&r.isValid!==i;var h;if(t.delayError&&o?(h=()=>((t,e)=>{Sv(r.errors,t,e),d.state.next({errors:r.errors})})(n,o),e=t=>{clearTimeout(u),u=setTimeout(h,t)},e(t.delayError)):(clearTimeout(u),e=null,o?Sv(r.errors,n,o):cg(r.errors,n)),(o?!pg(a,o):a)||!Vv(s)||l){const t={...s,...l&&wv(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...t},d.state.next(t)}},w=async t=>{v(t,!0);const e=await n.resolver(s,n.context,Sg(t||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return v(t),e},b=async(t,e,i={valid:!0})=>{for(const o in t){const a=t[o];if(a){const{_f:t,...u}=a;if(t){const u=l.array.has(t.name),d=a._f&&Pg(a._f);d&&c.validatingFields&&v([o],!0);const h=await ug(a,s,f,n.shouldUseNativeValidation&&!e,u);if(d&&c.validatingFields&&v([o]),h[t.name]&&(i.valid=!1,e))break;!e&&(_v(h,t.name)?u?Yv(r.errors,h,t.name):Sv(r.errors,t.name,h[t.name]):cg(r.errors,t.name))}!Vv(u)&&await b(u,e,i)}}return i.valid},x=(t,e)=>(t&&e&&Sv(s,t,e),!pg(R(),o)),S=(t,e,n)=>Gv(t,l,{...a.mount?s:yv(e)?o:Uv(t)?{[t]:e}:e},n,e),k=(t,e,n={})=>{const r=_v(i,t);let o=e;if(r){const n=r._f;n&&(!n.disabled&&Sv(s,t,bg(e,n)),o=Zv(n.ref)&&uv(e)?"":e,fg(n.ref)?[...n.ref.options].forEach((t=>t.selected=o.includes(t.value))):n.refs?av(n.ref)?n.refs.length>1?n.refs.forEach((t=>(!t.defaultChecked||!t.disabled)&&(t.checked=Array.isArray(o)?!!o.find((e=>e===t.value)):o===t.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((t=>t.checked=t.value===o)):Qv(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.values.next({name:t,values:{...s}})))}(n.shouldDirty||n.shouldTouch)&&y(t,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&C(t)},E=(t,e,n)=>{for(const r in e){const o=e[r],s=`${t}.${r}`,a=_v(i,s);!l.array.has(t)&&hg(o)&&(!a||a._f)||lv(o)?k(s,o,n):E(s,o,n)}},P=(t,e,n={})=>{const u=_v(i,t),h=l.array.has(t),p=vv(e);Sv(s,t,p),h?(d.array.next({name:t,values:{...s}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:t,dirtyFields:wg(o,s),isDirty:x(t,p)})):!u||u._f||uv(p)?k(t,p,n):E(t,p,n),qv(t,l)&&d.state.next({...r}),d.values.next({name:a.mount?t:void 0,values:{...s}})},T=async o=>{a.mount=!0;const u=o.target;let g=u.name,x=!0;const S=_v(i,g),k=t=>{x=Number.isNaN(t)||pg(t,_v(s,g,t))};if(S){let a,E;const P=u.type?xg(S._f):hv(o),T=o.type===kv.BLUR||o.type===kv.FOCUS_OUT,A=!Tg(S._f)&&!n.resolver&&!_v(r.errors,g)&&!S._f.deps||Cg(T,_v(r.touchedFields,g),r.isSubmitted,p,h),R=qv(g,l,T);Sv(s,g,P),T?(S._f.onBlur&&S._f.onBlur(o),e&&e(0)):S._f.onChange&&S._f.onChange(o);const O=y(g,P,T,!1),M=!Vv(O)||R;if(!T&&d.values.next({name:g,type:o.type,values:{...s}}),A)return c.isValid&&("onBlur"===t.mode?T&&m():m()),M&&d.state.next({name:g,...R?{}:O});if(!T&&R&&d.state.next({...r}),n.resolver){const{errors:t}=await w([g]);if(k(P),x){const e=Ag(r.errors,i,g),n=Ag(t,i,e.name||g);a=n.error,g=n.name,E=Vv(t)}}else v([g],!0),a=(await ug(S,s,f,n.shouldUseNativeValidation))[g],v([g]),k(P),x&&(a?E=!1:c.isValid&&(E=await b(i,!0)));x&&(S._f.deps&&C(S._f.deps),_(g,E,a,O))}},A=(t,e)=>{if(_v(r.errors,e)&&t.focus)return t.focus(),1},C=async(t,e={})=>{let o,s;const a=jv(t);if(n.resolver){const e=await(async t=>{const{errors:e}=await w(t);if(t)for(const n of t){const t=_v(e,n);t?Sv(r.errors,n,t):cg(r.errors,n)}else r.errors=e;return e})(yv(t)?t:a);o=Vv(e),s=t?!a.some((t=>_v(e,t))):o}else t?(s=(await Promise.all(a.map((async t=>{const e=_v(i,t);return await b(e&&e._f?{[t]:e}:e)})))).every(Boolean),(s||r.isValid)&&m()):s=o=await b(i);return d.state.next({...!Uv(t)||c.isValid&&o!==r.isValid?{}:{name:t},...n.resolver||!t?{isValid:o}:{},errors:r.errors}),e.shouldFocus&&!s&&Kv(i,A,t?a:l.mount),s},R=t=>{const e={...a.mount?s:o};return yv(t)?e:Uv(t)?_v(e,t):t.map((t=>_v(e,t)))},O=(t,e)=>({invalid:!!_v((e||r).errors,t),isDirty:!!_v((e||r).dirtyFields,t),error:_v((e||r).errors,t),isValidating:!!_v(r.validatingFields,t),isTouched:!!_v((e||r).touchedFields,t)}),M=(t,e,n)=>{const o=(_v(i,t,{_f:{}})._f||{}).ref,s=_v(r.errors,t)||{},{ref:a,message:l,type:u,...c}=s;Sv(r.errors,t,{...c,...e,ref:o}),d.state.next({name:t,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},F=(t,e={})=>{for(const a of t?jv(t):l.mount)l.mount.delete(a),l.array.delete(a),e.keepValue||(cg(i,a),cg(s,a)),!e.keepError&&cg(r.errors,a),!e.keepDirty&&cg(r.dirtyFields,a),!e.keepTouched&&cg(r.touchedFields,a),!e.keepIsValidating&&cg(r.validatingFields,a),!n.shouldUnregister&&!e.keepDefaultValue&&cg(o,a);d.values.next({values:{...s}}),d.state.next({...r,...e.keepDirty?{isDirty:x()}:{}}),!e.keepIsValid&&m()},L=({disabled:t,name:e,field:n,fields:r,value:i})=>{if(wv(t)&&a.mount||t){const o=t?void 0:yv(i)?xg(n?n._f:_v(r,e)._f):i;Sv(s,e,o),y(e,o,!1,!1,!0)}},D=(e,r={})=>{let s=_v(i,e);const u=wv(r.disabled)||wv(t.disabled);return Sv(i,e,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:e}},name:e,mount:!0,...r}}),l.mount.add(e),s?L({field:s,disabled:wv(r.disabled)?r.disabled:t.disabled,name:e,value:r.value}):g(e,!0,r.value),{...u?{disabled:r.disabled||t.disabled}:{},...n.progressive?{required:!!r.required,min:kg(r.min),max:kg(r.max),minLength:kg(r.minLength),maxLength:kg(r.maxLength),pattern:kg(r.pattern)}:{},name:e,onChange:T,onBlur:T,ref:t=>{if(t){D(e,r),s=_v(i,e);const n=yv(t.value)&&t.querySelectorAll&&t.querySelectorAll("input,select,textarea")[0]||t,a=mg(n),l=s._f.refs||[];if(a?l.find((t=>t===n)):n===s._f.ref)return;Sv(i,e,{_f:{...s._f,...a?{refs:[...l.filter(vg),n,...Array.isArray(_v(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else s=_v(i,e,{}),s._f&&(s._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!pv(l.array,e)||!a.action)&&l.unMount.add(e)}}},V=()=>n.shouldFocusError&&Kv(i,A,l.mount),I=(t,e)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=vv(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:t,values:e}=await w();r.errors=t,l=e}else await b(i);if(cg(r.errors,"root"),Vv(r.errors)){d.state.next({errors:{}});try{await t(l,o)}catch(u){a=u}}else e&&await e({...r.errors},o),V(),setTimeout(V);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Vv(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(e,n={})=>{const u=e?vv(e):o,h=vv(u),p=Vv(e),f=p?o:h;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const t of l.mount)_v(r.dirtyFields,t)?Sv(f,t,_v(s,t)):P(t,_v(f,t));else{if(mv&&yv(e))for(const t of l.mount){const e=_v(i,t);if(e&&e._f){const t=Array.isArray(e._f.refs)?e._f.refs[0]:e._f.ref;if(Zv(t)){const e=t.closest("form");if(e){e.reset();break}}}}i={}}s=t.shouldUnregister?n.keepDefaultValues?vv(o):{}:vv(f),d.array.next({values:{...f}}),d.values.next({values:{...f}})}l={mount:n.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!n.keepIsValid||!!n.keepDirtyValues,a.watch=!!t.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||pg(e,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&s?wg(o,s):r.dirtyFields:n.keepDefaultValues&&e?wg(o,e):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(t,e)=>j(Xv(t)?t(s):t,e);return{control:{register:D,unregister:F,getFieldState:O,handleSubmit:I,setError:M,_executeSchema:w,_getWatch:S,_getDirty:x,_updateValid:m,_removeUnmounted:()=>{for(const t of l.unMount){const e=_v(i,t);e&&(e._f.refs?e._f.refs.every((t=>!vg(t))):!vg(e._f.ref))&&F(t)}l.unMount=new Set},_updateFieldArray:(t,e=[],n,l,u=!0,h=!0)=>{if(l&&n){if(a.action=!0,h&&Array.isArray(_v(i,t))){const e=n(_v(i,t),l.argA,l.argB);u&&Sv(i,t,e)}if(h&&Array.isArray(_v(r.errors,t))){const e=n(_v(r.errors,t),l.argA,l.argB);u&&Sv(r.errors,t,e),Rg(r.errors,t)}if(c.touchedFields&&h&&Array.isArray(_v(r.touchedFields,t))){const e=n(_v(r.touchedFields,t),l.argA,l.argB);u&&Sv(r.touchedFields,t,e)}c.dirtyFields&&(r.dirtyFields=wg(o,s)),d.state.next({name:t,isDirty:x(t,e),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Sv(s,t,e)},_updateDisabledField:L,_getFieldArray:e=>gv(_v(a.mount?s:o,e,t.shouldUnregister?_v(o,e,[]):[])),_reset:j,_resetDefaultValues:()=>Xv(n.defaultValues)&&n.defaultValues().then((t=>{B(t,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:t=>{r={...r,...t}},_disableForm:t=>{wv(t)&&(d.state.next({disabled:t}),Kv(i,((e,n)=>{const r=_v(i,n);r&&(e.disabled=r._f.disabled||t,Array.isArray(r._f.refs)&&r._f.refs.forEach((e=>{e.disabled=r._f.disabled||t})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:t=>{r.errors=t,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(t){a=t},get _defaultValues(){return o},get _names(){return l},set _names(t){l=t},get _formState(){return r},set _formState(t){r=t},get _options(){return n},set _options(t){n={...n,...t}}},trigger:C,register:D,handleSubmit:I,watch:(t,e)=>Xv(t)?d.values.subscribe({next:n=>t(S(void 0,e),n)}):S(t,e,!0),setValue:P,getValues:R,reset:B,resetField:(t,e={})=>{_v(i,t)&&(yv(e.defaultValue)?P(t,vv(_v(o,t))):(P(t,e.defaultValue),Sv(o,t,vv(e.defaultValue))),e.keepTouched||cg(r.touchedFields,t),e.keepDirty||(cg(r.dirtyFields,t),r.isDirty=e.defaultValue?x(t,vv(_v(o,t))):x()),e.keepError||(cg(r.errors,t),c.isValid&&m()),d.state.next({...r}))},clearErrors:t=>{t&&jv(t).forEach((t=>cg(r.errors,t))),d.state.next({errors:t?r.errors:{}})},unregister:F,setError:M,setFocus:(t,e={})=>{const n=_v(i,t),r=n&&n._f;if(r){const t=r.refs?r.refs[0]:r.ref;t.focus&&(t.focus(),e.shouldSelect&&t.select())}},getFieldState:O}}const Fg="undefined"!=typeof document?Xr.useLayoutEffect:()=>{};const Lg=t=>{var e;return null!==(e=null==t?void 0:t.ownerDocument)&&void 0!==e?e:document},Dg=t=>{if(t&&"window"in t&&t.window===t)return t;return Lg(t).defaultView||window};function Vg(t){let e=null;return()=>(null==e&&(e=t()),e)}const Ig=Vg((function(){return t=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&t.test((null===(e=window.navigator.userAgentData)||void 0===e?void 0:e.platform)||window.navigator.platform);var t,e})),jg=Vg((function(){return t=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(e=window.navigator.userAgentData)||void 0===e?void 0:e.brands.some((e=>t.test(e.brand))))||t.test(window.navigator.userAgent));var t,e}));class Bg{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,e){this.nativeEvent=e,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget,this.bubbles=e.bubbles,this.cancelable=e.cancelable,this.defaultPrevented=e.defaultPrevented,this.eventPhase=e.eventPhase,this.isTrusted=e.isTrusted,this.timeStamp=e.timeStamp,this.type=t}}function Ng(t){let e=Dn({isFocused:!1,observer:null});Fg((()=>{const t=e.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}}),[]);let n=function(t){const e=Dn(null);return Fg((()=>{e.current=t}),[t]),jn(((...t)=>{const n=e.current;return null==n?void 0:n(...t)}),[])}((e=>{null==t||t(e)}));return jn((t=>{if(t.target instanceof HTMLButtonElement||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement){e.current.isFocused=!0;let r=t.target,i=t=>{e.current.isFocused=!1,r.disabled&&n(new Bg("blur",t)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver((()=>{if(e.current.isFocused&&r.disabled){var t;null===(t=e.current.observer)||void 0===t||t.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),e.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}let Ug=null,Gg=new Set,Wg=new Map,Hg=!1,$g=!1;const zg={Tab:!0,Escape:!0};function qg(t,e){for(let n of Gg)n(t,e)}function Kg(t){Hg=!0,function(t){return!(t.metaKey||!Ig()&&t.altKey||t.ctrlKey||"Control"===t.key||"Shift"===t.key||"Meta"===t.key)}(t)&&(Ug="keyboard",qg("keyboard",t))}function Yg(t){Ug="pointer","mousedown"!==t.type&&"pointerdown"!==t.type||(Hg=!0,qg("pointer",t))}function Qg(t){var e;(0===(e=t).mozInputSource&&e.isTrusted||(jg()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType))&&(Hg=!0,Ug="virtual")}function Xg(t){t.target!==window&&t.target!==document&&(Hg||$g||(Ug="virtual",qg("virtual",t)),Hg=!1,$g=!1)}function Zg(){Hg=!1,$g=!0}function Jg(t){if("undefined"==typeof window||Wg.get(Dg(t)))return;const e=Dg(t),n=Lg(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Hg=!0,r.apply(this,arguments)},n.addEventListener("keydown",Kg,!0),n.addEventListener("keyup",Kg,!0),n.addEventListener("click",Qg,!0),e.addEventListener("focus",Xg,!0),e.addEventListener("blur",Zg,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",Yg,!0),n.addEventListener("pointermove",Yg,!0),n.addEventListener("pointerup",Yg,!0)):(n.addEventListener("mousedown",Yg,!0),n.addEventListener("mousemove",Yg,!0),n.addEventListener("mouseup",Yg,!0)),e.addEventListener("beforeunload",(()=>{ty(t)}),{once:!0}),Wg.set(e,{focus:r})}const ty=(t,e)=>{const n=Dg(t),r=Lg(t);e&&r.removeEventListener("DOMContentLoaded",e),Wg.has(n)&&(n.HTMLElement.prototype.focus=Wg.get(n).focus,r.removeEventListener("keydown",Kg,!0),r.removeEventListener("keyup",Kg,!0),r.removeEventListener("click",Qg,!0),n.removeEventListener("focus",Xg,!0),n.removeEventListener("blur",Zg,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",Yg,!0),r.removeEventListener("pointermove",Yg,!0),r.removeEventListener("pointerup",Yg,!0)):(r.removeEventListener("mousedown",Yg,!0),r.removeEventListener("mousemove",Yg,!0),r.removeEventListener("mouseup",Yg,!0)),Wg.delete(n))};function ey(){return"pointer"!==Ug}"undefined"!=typeof document&&function(t){const e=Lg(t);let n;"loading"!==e.readyState?Jg(t):(n=()=>{Jg(t)},e.addEventListener("DOMContentLoaded",n))}();const ny=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ry(t,e,n){Jg(),Fn((()=>{let e=(e,r)=>{(function(t,e,n){var r;const i="undefined"!=typeof window?Dg(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Dg(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Dg(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Dg(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((t=t||(null==n?void 0:n.target)instanceof i&&!ny.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof o||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===e&&n instanceof a&&!zg[n.key])})(!!(null==n?void 0:n.isTextInput),e,r)&&t(ey())};return Gg.add(e),()=>{Gg.delete(e)}}),e)}let iy=!1,oy=0;function sy(){iy=!0,setTimeout((()=>{iy=!1}),50)}function ay(t){"touch"===t.pointerType&&sy()}function ly(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",ay):document.addEventListener("touchend",sy),oy++,()=>{oy--,oy>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",ay):document.removeEventListener("touchend",sy))}}function uy(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,s]=On(!1),a=Dn({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Fn(ly,[]);let{hoverProps:l,triggerHoverEnd:u}=In((()=>{let t=(t,r)=>{if(a.pointerType=r,i||"touch"===r||a.isHovered||!t.currentTarget.contains(t.target))return;a.isHovered=!0;let o=t.currentTarget;a.target=o,e&&e({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),s(!0)},o=(t,e)=>{if(a.pointerType="",a.target=null,"touch"===e||!a.isHovered)return;a.isHovered=!1;let i=t.currentTarget;r&&r({type:"hoverend",target:i,pointerType:e}),n&&n(!1),s(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=e=>{iy&&"mouse"===e.pointerType||t(e,e.pointerType)},l.onPointerLeave=t=>{!i&&t.currentTarget.contains(t.target)&&o(t,t.pointerType)}):(l.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=e=>{a.ignoreEmulatedMouseEvents||iy||t(e,"mouse"),a.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=t=>{!i&&t.currentTarget.contains(t.target)&&o(t,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[e,n,r,i,a]);return Fn((()=>{i&&u({currentTarget:a.target},a.pointerType)}),[i]),{hoverProps:l,isHovered:o}}function cy(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=Dn({isFocused:!1,isFocusVisible:e||ey()}),[o,s]=On(!1),[a,l]=On((()=>i.current.isFocused&&i.current.isFocusVisible)),u=jn((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),c=jn((t=>{i.current.isFocused=t,s(t),u()}),[u]);ry((t=>{i.current.isFocusVisible=t,u()}),[],{isTextInput:n});let{focusProps:d}=function(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=jn((t=>{if(t.target===t.currentTarget)return r&&r(t),i&&i(!1),!0}),[r,i]),s=Ng(o),a=jn((t=>{const e=Lg(t.target);t.target===t.currentTarget&&e.activeElement===t.target&&(n&&n(t),i&&i(!0),s(t))}),[i,n,s]);return{focusProps:{onFocus:!e&&(n||i||r)?a:void 0,onBlur:e||!r&&!i?void 0:o}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=function(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=Dn({isFocusWithin:!1}),s=jn((t=>{o.current.isFocusWithin&&!t.currentTarget.contains(t.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(t),i&&i(!1))}),[n,i,o]),a=Ng(s),l=jn((t=>{o.current.isFocusWithin||document.activeElement!==t.target||(r&&r(t),i&&i(!0),o.current.isFocusWithin=!0,a(t))}),[r,i,a]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:a,focusProps:r?h:d}}var dy=Object.defineProperty,hy=(t,e,n)=>(((t,e,n)=>{e in t?dy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!=typeof e?e+"":e,n),n);let py=new class{constructor(){hy(this,"current",this.detect()),hy(this,"handoffState","pending"),hy(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function fy(t){return py.isServer?null:t instanceof Node?t.ownerDocument:null!=t&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}function my(t){"function"==typeof queueMicrotask?queueMicrotask(t):Promise.resolve().then(t).catch((t=>setTimeout((()=>{throw t}))))}function vy(){let t=[],e={addEventListener:(t,n,r,i)=>(t.addEventListener(n,r,i),e.add((()=>t.removeEventListener(n,r,i)))),requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add((()=>cancelAnimationFrame(n)))},nextFrame:(...t)=>e.requestAnimationFrame((()=>e.requestAnimationFrame(...t))),setTimeout(...t){let n=setTimeout(...t);return e.add((()=>clearTimeout(n)))},microTask(...t){let n={current:!0};return my((()=>{n.current&&t[0]()})),e.add((()=>{n.current=!1}))},style(t,e,n){let r=t.style.getPropertyValue(e);return Object.assign(t.style,{[e]:n}),this.add((()=>{Object.assign(t.style,{[e]:r})}))},group(t){let e=vy();return t(e),this.add((()=>e.dispose()))},add:e=>(t.includes(e)||t.push(e),()=>{let n=t.indexOf(e);if(n>=0)for(let e of t.splice(n,1))e()}),dispose(){for(let e of t.splice(0))e()}};return e}function gy(){let[t]=On(vy);return Fn((()=>()=>t.dispose()),[t]),t}let yy=(t,e)=>{py.isServer?Fn(t,e):Ln(t,e)};function _y(t){let e=Dn(t);return yy((()=>{e.current=t}),[t]),e}let wy=function(t){let e=_y(t);return Xr.useCallback(((...t)=>e.current(...t)),[e])};function by({disabled:t=!1}={}){let e=Dn(null),[n,r]=On(!1),i=gy(),o=wy((()=>{e.current=null,r(!1),i.dispose()})),s=wy((t=>{if(i.dispose(),null===e.current){e.current=t.currentTarget,r(!0);{let n=fy(t.currentTarget);i.addEventListener(n,"pointerup",o,!1),i.addEventListener(n,"pointermove",(t=>{if(e.current){let n=function(t){let e=t.width/2,n=t.height/2;return{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}(t);r(function(t,e){return!(!t||!e||t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom)}(n,e.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",o,!1)}}}));return{pressed:n,pressProps:t?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}let xy=oe(void 0);function Sy(){return Bn(xy)}function ky({value:t,children:e}){return Xr.createElement(xy.Provider,{value:t},e)}function Ey(...t){return Array.from(new Set(t.flatMap((t=>"string"==typeof t?t.split(" "):[])))).filter(Boolean).join(" ")}function Py(t,e,...n){if(t in e){let r=e[t];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((t=>`"${t}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Py),r}var Ty,Ay,Cy=((Ay=Cy||{})[Ay.None=0]="None",Ay[Ay.RenderStrategy=1]="RenderStrategy",Ay[Ay.Static=2]="Static",Ay),Ry=((Ty=Ry||{})[Ty.Unmount=0]="Unmount",Ty[Ty.Hidden=1]="Hidden",Ty);function Oy({ourProps:t,theirProps:e,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:Fy;let l=Ly(e,t);if(o)return My(l,n,r,s,a);let u=null!=i?i:0;if(2&u){let{static:t=!1,...e}=l;if(t)return My(e,n,r,s,a)}if(1&u){let{unmount:t=!0,...e}=l;return Py(t?0:1,{0:()=>null,1:()=>My({...e,hidden:!0,style:{display:"none"}},n,r,s,a)})}return My(l,n,r,s,a)}function My(t,e={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=jy(t,["unmount","static"]),u=void 0!==t.ref?{[a]:t.ref}:{},c="function"==typeof s?s(e):s;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(e)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(e){let t=!1,n=[];for(let[r,i]of Object.entries(e))"boolean"==typeof i&&(t=!0),!0===i&&n.push(r.replace(/([A-Z])/g,(t=>`-${t.toLowerCase()}`)));if(t){d["data-headlessui-state"]=n.join(" ");for(let t of n)d[`data-${t}`]=""}}if(o===jt&&(Object.keys(Iy(l)).length>0||Object.keys(Iy(d)).length>0)){if(Dr(c)&&!(Array.isArray(c)&&c.length>1)){let t=c.props,e=null==t?void 0:t.className,n="function"==typeof e?(...t)=>Ey(e(...t),l.className):Ey(e,l.className),r=n?{className:n}:{},o=Ly(c.props,Iy(jy(l,["ref"])));for(let i in d)i in o&&delete d[i];return jr(c,Object.assign({},o,d,u,{ref:i(c.ref,u.ref)},r))}if(Object.keys(Iy(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Iy(l)).concat(Object.keys(Iy(d))).map((t=>` - ${t}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((t=>` - ${t}`)).join("\n")].join("\n"))}return Dt(o,Object.assign({},jy(l,["ref"]),o!==jt&&u,o!==jt&&d),c)}function Fy(...t){return t.every((t=>null==t))?void 0:e=>{for(let n of t)null!=n&&("function"==typeof n?n(e):n.current=e)}}function Ly(...t){if(0===t.length)return{};if(1===t.length)return t[0];let e={},n={};for(let r of t)for(let t in r)t.startsWith("on")&&"function"==typeof r[t]?(null!=n[t]||(n[t]=[]),n[t].push(r[t])):e[t]=r[t];if(e.disabled||e["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[t=>{var e;return null==(e=null==t?void 0:t.preventDefault)?void 0:e.call(t)}]);for(let r in n)Object.assign(e,{[r](t,...e){let i=n[r];for(let n of i){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;n(t,...e)}}});return e}function Dy(...t){if(0===t.length)return{};if(1===t.length)return t[0];let e={},n={};for(let r of t)for(let t in r)t.startsWith("on")&&"function"==typeof r[t]?(null!=n[t]||(n[t]=[]),n[t].push(r[t])):e[t]=r[t];for(let r in n)Object.assign(e,{[r](...t){let e=n[r];for(let n of e)null==n||n(...t)}});return e}function Vy(t){var e;return Object.assign(er(t),{displayName:null!=(e=t.displayName)?e:t.name})}function Iy(t){let e=Object.assign({},t);for(let n in e)void 0===e[n]&&delete e[n];return e}function jy(t,e=[]){let n=Object.assign({},t);for(let r of e)r in n&&delete n[r];return n}function By(t,e,n){let[r,i]=On(n),o=void 0!==t,s=Dn(o),a=Dn(!1),l=Dn(!1);return!o||s.current||a.current?!o&&s.current&&!l.current&&(l.current=!0,s.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,s.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?t:r,wy((t=>(o||i(t),null==e?void 0:e(t))))]}function Ny(t){let[e]=On(t);return e}function Uy(t={},e=null,n=[]){for(let[r,i]of Object.entries(t))Wy(n,Gy(e,r),i);return n}function Gy(t,e){return t?t+"["+e+"]":e}function Wy(t,e,n){if(Array.isArray(n))for(let[r,i]of n.entries())Wy(t,Gy(e,r.toString()),i);else n instanceof Date?t.push([e,n.toISOString()]):"boolean"==typeof n?t.push([e,n?"1":"0"]):"string"==typeof n?t.push([e,n]):"number"==typeof n?t.push([e,`${n}`]):null==n?t.push([e,""]):Uy(n,e,t)}function Hy(t){var e,n;let r=null!=(e=null==t?void 0:t.form)?e:t.closest("form");if(r){for(let e of r.elements)if(e!==t&&("INPUT"===e.tagName&&"submit"===e.type||"BUTTON"===e.tagName&&"submit"===e.type||"INPUT"===e.nodeName&&"image"===e.type))return void e.click();null==(n=r.requestSubmit)||n.call(r)}}var $y=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))($y||{});let zy=Vy((function(t,e){var n;let{features:r=1,...i}=t;return Oy({ourProps:{ref:e,"aria-hidden":!(2&~r)||(null!=(n=i["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}},theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})})),qy=oe(null);function Ky(t){let[e,n]=On(null);return Xr.createElement(qy.Provider,{value:{target:e}},t.children,Xr.createElement(zy,{features:$y.Hidden,ref:n}))}function Yy({children:t}){let e=Bn(qy);if(!e)return Xr.createElement(Xr.Fragment,null,t);let{target:n}=e;return n?mr(Xr.createElement(Xr.Fragment,null,t),n):null}function Qy({data:t,form:e,disabled:n,onReset:r,overrides:i}){let[o,s]=On(null),a=gy();return Fn((()=>{if(r&&o)return a.addEventListener(o,"reset",r)}),[o,e,r]),Xr.createElement(Yy,null,Xr.createElement(Xy,{setForm:s,formId:e}),Uy(t).map((([t,r])=>Xr.createElement(zy,{features:$y.Hidden,...Iy({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:e,disabled:n,name:t,value:r,...i})}))))}function Xy({setForm:t,formId:e}){return Fn((()=>{if(e){let n=document.getElementById(e);n&&t(n)}}),[t,e]),e?null:Xr.createElement(zy,{features:$y.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let n=e.closest("form");n&&t(n)}})}let Zy=oe(void 0);function Jy(){return Bn(Zy)}function t_({id:t,children:e}){return Xr.createElement(Zy.Provider,{value:t},e)}function e_(t){let e=t.parentElement,n=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(n=e),e=e.parentElement;let r=""===(null==e?void 0:e.getAttribute("disabled"));return(!r||!function(t){if(!t)return!1;let e=t.previousElementSibling;for(;null!==e;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}(n))&&r}let n_=Symbol();function r_(...t){let e=Dn(t);Fn((()=>{e.current=t}),[t]);let n=wy((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}));return t.every((t=>null==t||(null==t?void 0:t[n_])))?void 0:n}let i_=oe(null);function o_(){let t=Bn(i_);if(null===t){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,o_),t}return t}function s_(){var t,e;return null!=(e=null==(t=Bn(i_))?void 0:t.value)?e:void 0}function a_(){let[t,e]=On([]);return[t.length>0?t.join(" "):void 0,In((()=>function(t){let n=wy((t=>(e((e=>[...e,t])),()=>e((e=>{let n=e.slice(),r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}))))),r=In((()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value})),[n,t.slot,t.name,t.props,t.value]);return Xr.createElement(i_.Provider,{value:r},t.children)}),[e])]}i_.displayName="DescriptionContext";let l_=Vy((function(t,e){let n=Un(),r=Sy(),{id:i=`headlessui-description-${n}`,...o}=t,s=o_(),a=r_(e);yy((()=>s.register(i)),[i,s.register]);let l=r||!1,u=In((()=>({...s.slot,disabled:l})),[s.slot,l]);return Oy({ourProps:{ref:a,...s.props,id:i},theirProps:o,slot:u,defaultTag:"p",name:s.name||"Description"})})),u_=Object.assign(l_,{});var c_,d_=((c_=d_||{}).Space=" ",c_.Enter="Enter",c_.Escape="Escape",c_.Backspace="Backspace",c_.Delete="Delete",c_.ArrowLeft="ArrowLeft",c_.ArrowUp="ArrowUp",c_.ArrowRight="ArrowRight",c_.ArrowDown="ArrowDown",c_.Home="Home",c_.End="End",c_.PageUp="PageUp",c_.PageDown="PageDown",c_.Tab="Tab",c_);let h_=oe(null);function p_(){let t=Bn(h_);if(null===t){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,p_),t}return t}function f_(t){var e,n,r;let i=null!=(n=null==(e=Bn(h_))?void 0:e.value)?n:void 0;return(null!=(r=null==t?void 0:t.length)?r:0)>0?[i,...t].filter(Boolean).join(" "):i}function m_({inherit:t=!1}={}){let e=f_(),[n,r]=On([]),i=t?[e,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,In((()=>function(t){let e=wy((t=>(r((e=>[...e,t])),()=>r((e=>{let n=e.slice(),r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}))))),n=In((()=>({register:e,slot:t.slot,name:t.name,props:t.props,value:t.value})),[e,t.slot,t.name,t.props,t.value]);return Xr.createElement(h_.Provider,{value:n},t.children)}),[r])]}h_.displayName="LabelContext";let v_=Vy((function(t,e){var n;let r=Un(),i=p_(),o=Jy(),s=Sy(),{id:a=`headlessui-label-${r}`,htmlFor:l=(null!=o?o:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...c}=t,d=r_(e);yy((()=>i.register(a)),[a,i.register]);let h=wy((t=>{let e=t.currentTarget;if(e instanceof HTMLLabelElement&&t.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),e instanceof HTMLLabelElement){let t=document.getElementById(e.htmlFor);if(t){let e=t.getAttribute("disabled");if("true"===e||""===e)return;let n=t.getAttribute("aria-disabled");if("true"===n||""===n)return;(t instanceof HTMLInputElement&&("radio"===t.type||"checkbox"===t.type)||"radio"===t.role||"checkbox"===t.role||"switch"===t.role)&&t.click(),t.focus({preventScroll:!0})}}})),p=s||!1,f=In((()=>({...i.slot,disabled:p})),[i.slot,p]),m={ref:d,...i.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),Oy({ourProps:m,theirProps:c,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})})),g_=Object.assign(v_,{});function y_(t,e){return null!==t&&null!==e&&"object"==typeof t&&"object"==typeof e&&"id"in t&&"id"in e?t.id===e.id:t===e}function __(t,e=!1){let[n,r]=Mn((()=>({})),{}),i=In((()=>function(t){if(null===t)return{width:0,height:0};let{width:e,height:n}=t.getBoundingClientRect();return{width:e,height:n}}(t)),[t,n]);return yy((()=>{if(!t)return;let e=new ResizeObserver(r);return e.observe(t),()=>{e.disconnect()}}),[t]),e?{width:`${i.width}px`,height:`${i.height}px`}:i}let w_=class extends Map{constructor(t){super(),this.factory=t}get(t){let e=super.get(t);return void 0===e&&(e=this.factory(t),this.set(t,e)),e}};function b_(t,e){let n=t(),r=new Set;return{getSnapshot:()=>n,subscribe:t=>(r.add(t),()=>r.delete(t)),dispatch(t,...i){let o=e[t].call(n,...i);o&&(n=o,r.forEach((t=>t())))}}}function x_(t){return Yr(t.subscribe,t.getSnapshot,t.getSnapshot)}let S_=new w_((()=>b_((()=>[]),{ADD(t){return this.includes(t)?this:[...this,t]},REMOVE(t){let e=this.indexOf(t);if(-1===e)return this;let n=this.slice();return n.splice(e,1),n}})));function k_(t,e){let n=S_.get(e),r=Un(),i=x_(n);if(yy((()=>{if(t)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)}),[n,t]),!t)return!1;let o=i.indexOf(r),s=i.length;return-1===o&&(o=s,s+=1),o===s-1}let E_=new Map,P_=new Map;function T_(t){var e;let n=null!=(e=P_.get(t))?e:0;return P_.set(t,n+1),0!==n||(E_.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),t.setAttribute("aria-hidden","true"),t.inert=!0),()=>A_(t)}function A_(t){var e;let n=null!=(e=P_.get(t))?e:1;if(1===n?P_.delete(t):P_.set(t,n-1),1!==n)return;let r=E_.get(t);r&&(null===r["aria-hidden"]?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r["aria-hidden"]),t.inert=r.inert,E_.delete(t))}let C_=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((t=>`${t}:not([tabindex='-1'])`)).join(","),R_=["[data-autofocus]"].map((t=>`${t}:not([tabindex='-1'])`)).join(",");var O_,M_,F_,L_=((F_=L_||{})[F_.First=1]="First",F_[F_.Previous=2]="Previous",F_[F_.Next=4]="Next",F_[F_.Last=8]="Last",F_[F_.WrapAround=16]="WrapAround",F_[F_.NoScroll=32]="NoScroll",F_[F_.AutoFocus=64]="AutoFocus",F_),D_=((M_=D_||{})[M_.Error=0]="Error",M_[M_.Overflow=1]="Overflow",M_[M_.Success=2]="Success",M_[M_.Underflow=3]="Underflow",M_),V_=((O_=V_||{})[O_.Previous=-1]="Previous",O_[O_.Next=1]="Next",O_);function I_(t=document.body){return null==t?[]:Array.from(t.querySelectorAll(C_)).sort(((t,e)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER))))}var j_=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(j_||{});function B_(t,e=0){var n;return t!==(null==(n=fy(t))?void 0:n.body)&&Py(e,{0:()=>t.matches(C_),1(){let e=t;for(;null!==e;){if(e.matches(C_))return!0;e=e.parentElement}return!1}})}var N_=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(N_||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(t=>{1===t.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===t.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let U_=["textarea","input"].join(",");function G_(t,e=t=>t){return t.slice().sort(((t,n)=>{let r=e(t),i=e(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function W_(t,e){return function(t,e,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,s=Array.isArray(t)?n?G_(t):t:64&e?function(t=document.body){return null==t?[]:Array.from(t.querySelectorAll(R_)).sort(((t,e)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER))))}(t):I_(t);i.length>0&&s.length>1&&(s=s.filter((t=>!i.some((e=>null!=e&&"current"in e?(null==e?void 0:e.current)===t:e===t))))),r=null!=r?r:o.activeElement;let a,l=(()=>{if(5&e)return 1;if(10&e)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&e)return 0;if(2&e)return Math.max(0,s.indexOf(r))-1;if(4&e)return Math.max(0,s.indexOf(r))+1;if(8&e)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&e?{preventScroll:!0}:{},d=0,h=s.length;do{if(d>=h||d+h<=0)return 0;let t=u+d;if(16&e)t=(t+h)%h;else{if(t<0)return 3;if(t>=h)return 1}a=s[t],null==a||a.focus(c),d+=l}while(a!==o.activeElement);return 6&e&&function(t){var e,n;return null!=(n=null==(e=null==t?void 0:t.matches)?void 0:e.call(t,U_))&&n}(a)&&a.select(),2}(I_(),e,{relativeTo:t})}function H_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function $_(){return H_()||/Android/gi.test(window.navigator.userAgent)}function z_(t,e,n,r){let i=_y(n);Fn((()=>{if(t)return document.addEventListener(e,n,r),()=>document.removeEventListener(e,n,r);function n(t){i.current(t)}}),[t,e,r])}const q_=30;function K_(t,e,n){let r=k_(t,"outside-click"),i=_y(n),o=jn((function(t,n){if(t.defaultPrevented)return;let r=n(t);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function t(e){return"function"==typeof e?t(e()):Array.isArray(e)||e instanceof Set?e:[e]}(e);for(let e of o)if(null!==e&&(e.contains(r)||t.composed&&t.composedPath().includes(e)))return;return!B_(r,j_.Loose)&&-1!==r.tabIndex&&t.preventDefault(),i.current(t,r)}),[i,e]),s=Dn(null);z_(r,"pointerdown",(t=>{var e,n;s.current=(null==(n=null==(e=t.composedPath)?void 0:e.call(t))?void 0:n[0])||t.target}),!0),z_(r,"mousedown",(t=>{var e,n;s.current=(null==(n=null==(e=t.composedPath)?void 0:e.call(t))?void 0:n[0])||t.target}),!0),z_(r,"click",(t=>{$_()||s.current&&(o(t,(()=>s.current)),s.current=null)}),!0);let a=Dn({x:0,y:0});z_(r,"touchstart",(t=>{a.current.x=t.touches[0].clientX,a.current.y=t.touches[0].clientY}),!0),z_(r,"touchend",(t=>{let e=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY;if(!(Math.abs(e-a.current.x)>=q_||Math.abs(n-a.current.y)>=q_))return o(t,(()=>t.target instanceof HTMLElement?t.target:null))}),!0),function(t,e,n,r){let i=_y(n);Fn((()=>{if(t)return window.addEventListener(e,n,r),()=>window.removeEventListener(e,n,r);function n(t){i.current(t)}}),[t,e,r])}(r,"blur",(t=>o(t,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function Y_(...t){return In((()=>fy(...t)),[...t])}function Q_(t,e){return In((()=>{var n;if(t.type)return t.type;let r=null!=(n=t.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==e?void 0:e.tagName)&&!e.hasAttribute("type")?"button":void 0}),[t.type,t.as,e])}function X_(){let t;return{before({doc:e}){var n;let r=e.documentElement,i=null!=(n=e.defaultView)?n:window;t=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:e,d:n}){let r=e.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,t-i);n.style(r,"paddingRight",`${o}px`)}}}function Z_(t){let e={};for(let n of t)Object.assign(e,n(e));return e}let J_=b_((()=>new Map),{PUSH(t,e){var n;let r=null!=(n=this.get(t))?n:{doc:t,count:0,d:vy(),meta:new Set};return r.count++,r.meta.add(e),this.set(t,r),this},POP(t,e){let n=this.get(t);return n&&(n.count--,n.meta.delete(e)),this},SCROLL_PREVENT({doc:t,d:e,meta:n}){let r={doc:t,d:e,meta:Z_(n)},i=[H_()?{before({doc:t,d:e,meta:n}){function r(t){return n.containers.flatMap((t=>t())).some((e=>e.contains(t)))}e.microTask((()=>{var n;if("auto"!==window.getComputedStyle(t.documentElement).scrollBehavior){let n=vy();n.style(t.documentElement,"scrollBehavior","auto"),e.add((()=>e.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;e.addEventListener(t,"click",(e=>{if(e.target instanceof HTMLElement)try{let n=e.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),s=t.querySelector(i);s&&!r(s)&&(o=s)}catch{}}),!0),e.addEventListener(t,"touchstart",(t=>{if(t.target instanceof HTMLElement)if(r(t.target)){let n=t.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;e.style(n,"overscrollBehavior","contain")}else e.style(t.target,"touchAction","none")})),e.addEventListener(t,"touchmove",(t=>{if(t.target instanceof HTMLElement){if("INPUT"===t.target.tagName)return;if(r(t.target)){let e=t.target;for(;e.parentElement&&""!==e.dataset.headlessuiPortal&&!(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth);)e=e.parentElement;""===e.dataset.headlessuiPortal&&t.preventDefault()}else t.preventDefault()}}),{passive:!1}),e.add((()=>{var t;let e=null!=(t=window.scrollY)?t:window.pageYOffset;i!==e&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},X_(),{before({doc:t,d:e}){e.style(t.documentElement,"overflow","hidden")}}];i.forEach((({before:t})=>null==t?void 0:t(r))),i.forEach((({after:t})=>null==t?void 0:t(r)))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});function tw(t,e,n=()=>[document.body]){!function(t,e,n=()=>({containers:[]})){let r=x_(J_),i=e?r.get(e):void 0,o=!!i&&i.count>0;yy((()=>{if(e&&t)return J_.dispatch("PUSH",e,n),()=>J_.dispatch("POP",e,n)}),[t,e])}(k_(t,"scroll-lock"),e,(t=>{var e;return{containers:[...null!=(e=t.containers)?e:[],n]}}))}function ew(t){return[t.screenX,t.screenY]}J_.subscribe((()=>{let t=J_.getSnapshot(),e=new Map;for(let[n]of t)e.set(n,n.documentElement.style.overflow);for(let n of t.values()){let t="hidden"===e.get(n.doc),r=0!==n.count;(r&&!t||!r&&t)&&J_.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&J_.dispatch("TEARDOWN",n)}}));var nw;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"test"===(null==(nw=null==process?void 0:{})?void 0:nw.NODE_ENV)&&void 0===Element.prototype.getAnimations&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var rw=(t=>(t[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t))(rw||{});function iw(t){let e={};for(let n in t)!0===t[n]&&(e[`data-${n}`]="");return e}function ow(t,e,n,r){let[i,o]=On(n),{hasFlag:s,addFlag:a,removeFlag:l}=function(t=0){let[e,n]=On(t),r=jn((t=>n(t)),[e]),i=jn((t=>n((e=>e|t))),[e]),o=jn((t=>(e&t)===t),[e]),s=jn((t=>n((e=>e&~t))),[n]),a=jn((t=>n((e=>e^t))),[n]);return{flags:e,setFlag:r,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(t&&i?3:0),u=Dn(!1),c=Dn(!1),d=gy();return yy((()=>{var i;if(t)return n&&o(!0),e?(null==(i=null==r?void 0:r.start)||i.call(r,n),function(t,{prepare:e,run:n,done:r,inFlight:i}){let o=vy();return function(t,{inFlight:e,prepare:n}){if(null!=e&&e.current)return void n();let r=t.style.transition;t.style.transition="none",n(),t.offsetHeight,t.style.transition=r}(t,{prepare:e,inFlight:i}),o.nextFrame((()=>{n(),o.requestAnimationFrame((()=>{o.add(function(t,e){var n,r;let i=vy();if(!t)return i.dispose;let o=!1;i.add((()=>{o=!0}));let s=null!=(r=null==(n=t.getAnimations)?void 0:n.call(t).filter((t=>t instanceof CSSTransition)))?r:[];return 0===s.length?(e(),i.dispose):(Promise.allSettled(s.map((t=>t.finished))).then((()=>{o||e()})),i.dispose)}(t,r))}))})),o.dispose}(e,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){c.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var t;c.current&&"function"==typeof e.getAnimations&&e.getAnimations().length>0||(u.current=!1,l(7),n||o(!1),null==(t=null==r?void 0:r.end)||t.call(r,n))}})):void(n&&a(3))}),[t,n,e,d]),t?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function sw(){return"undefined"!=typeof window}function aw(t){return cw(t)?(t.nodeName||"").toLowerCase():"#document"}function lw(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function uw(t){var e;return null==(e=(cw(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function cw(t){return!!sw()&&(t instanceof Node||t instanceof lw(t).Node)}function dw(t){return!!sw()&&(t instanceof Element||t instanceof lw(t).Element)}function hw(t){return!!sw()&&(t instanceof HTMLElement||t instanceof lw(t).HTMLElement)}function pw(t){return!(!sw()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof lw(t).ShadowRoot)}function fw(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=ww(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function mw(t){return["table","td","th"].includes(aw(t))}function vw(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(Ty){return!1}}))}function gw(t){const e=yw(),n=dw(t)?ww(t):t;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function yw(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function _w(t){return["html","body","#document"].includes(aw(t))}function ww(t){return lw(t).getComputedStyle(t)}function bw(t){return dw(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xw(t){if("html"===aw(t))return t;const e=t.assignedSlot||t.parentNode||pw(t)&&t.host||uw(t);return pw(e)?e.host:e}function Sw(t){const e=xw(t);return _w(e)?t.ownerDocument?t.ownerDocument.body:t.body:hw(e)&&fw(e)?e:Sw(e)}function kw(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=Sw(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),s=lw(i);if(o){const t=Ew(s);return e.concat(s,s.visualViewport||[],fw(i)?i:[],t&&n?kw(t):[])}return e.concat(i,kw(i,[],n))}function Ew(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Pw=Math.min,Tw=Math.max,Aw=Math.round,Cw=Math.floor,Rw=t=>({x:t,y:t}),Ow={left:"right",right:"left",bottom:"top",top:"bottom"},Mw={start:"end",end:"start"};function Fw(t,e,n){return Tw(t,Pw(e,n))}function Lw(t,e){return"function"==typeof t?t(e):t}function Dw(t){return t.split("-")[0]}function Vw(t){return t.split("-")[1]}function Iw(t){return"x"===t?"y":"x"}function jw(t){return"y"===t?"height":"width"}function Bw(t){return["top","bottom"].includes(Dw(t))?"y":"x"}function Nw(t){return Iw(Bw(t))}function Uw(t){return t.replace(/start|end/g,(t=>Mw[t]))}function Gw(t){return t.replace(/left|right|bottom|top/g,(t=>Ow[t]))}function Ww(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Hw(t,e,n){let{reference:r,floating:i}=t;const o=Bw(e),s=Nw(e),a=jw(s),l=Dw(e),u="y"===o,c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Vw(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function $w(t,e){var n;void 0===e&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Lw(e,t),f=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(p),m=a[h?"floating"===d?"reference":"floating":d],v=Ww(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g="floating"===d?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),_=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},w=Ww(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-w.top+f.top)/_.y,bottom:(w.bottom-v.bottom+f.bottom)/_.y,left:(v.left-w.left+f.left)/_.x,right:(w.right-v.right+f.right)/_.x}}function zw(t){const e=ww(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=hw(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Aw(n)!==o||Aw(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function qw(t){return dw(t)?t:t.contextElement}function Kw(t){const e=qw(t);if(!hw(e))return Rw(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=zw(e);let s=(o?Aw(n.width):n.width)/r,a=(o?Aw(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Yw=Rw(0);function Qw(t){const e=lw(t);return yw()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Yw}function Xw(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),o=qw(t);let s=Rw(1);e&&(r?dw(r)&&(s=Kw(r)):s=Kw(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==lw(t))&&e}(o,n,r)?Qw(o):Rw(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const t=lw(o),e=r&&dw(r)?lw(r):r;let n=t,i=Ew(n);for(;i&&r&&e!==n;){const t=Kw(i),e=i.getBoundingClientRect(),r=ww(i),o=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;l*=t.x,u*=t.y,c*=t.x,d*=t.y,l+=o,u+=s,n=lw(i),i=Ew(n)}}return Ww({width:c,height:d,x:l,y:u})}function Zw(t,e){const n=bw(t).scrollLeft;return e?e.left+n:Xw(uw(t)).left+n}function Jw(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=lw(t),r=uw(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const t=yw();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(t,n);else if("document"===e)r=function(t){const e=uw(t),n=bw(t),r=t.ownerDocument.body,i=Tw(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Tw(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Zw(t);const a=-n.scrollTop;return"rtl"===ww(r).direction&&(s+=Tw(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(uw(t));else if(dw(e))r=function(t,e){const n=Xw(t,!0,"fixed"===e),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=hw(t)?Kw(t):Rw(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:i*o.x,y:r*o.y}}(e,n);else{const n=Qw(t);r={...e,x:e.x-n.x,y:e.y-n.y}}return Ww(r)}function tb(t,e){const n=xw(t);return!(n===e||!dw(n)||_w(n))&&("fixed"===ww(n).position||tb(n,e))}function eb(t,e,n){const r=hw(e),i=uw(e),o="fixed"===n,s=Xw(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Rw(0);if(r||!r&&!o)if(("body"!==aw(e)||fw(i))&&(a=bw(e)),r){const t=Xw(e,!0,o,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=Zw(i));let u=0,c=0;if(i&&!r&&!o){const t=i.getBoundingClientRect();c=t.top+a.scrollTop,u=t.left+a.scrollLeft-Zw(i,t)}return{x:s.left+a.scrollLeft-l.x-u,y:s.top+a.scrollTop-l.y-c,width:s.width,height:s.height}}function nb(t){return"static"===ww(t).position}function rb(t,e){if(!hw(t)||"fixed"===ww(t).position)return null;if(e)return e(t);let n=t.offsetParent;return uw(t)===n&&(n=n.ownerDocument.body),n}function ib(t,e){const n=lw(t);if(vw(t))return n;if(!hw(t)){let e=xw(t);for(;e&&!_w(e);){if(dw(e)&&!nb(e))return e;e=xw(e)}return n}let r=rb(t,e);for(;r&&mw(r)&&nb(r);)r=rb(r,e);return r&&_w(r)&&nb(r)&&!gw(r)?n:r||function(t){let e=xw(t);for(;hw(e)&&!_w(e);){if(gw(e))return e;if(vw(e))return null;e=xw(e)}return null}(t)||n}const ob={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o="fixed"===i,s=uw(r),a=!!e&&vw(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Rw(1);const c=Rw(0),d=hw(r);if((d||!d&&!o)&&(("body"!==aw(r)||fw(s))&&(l=bw(r)),hw(r))){const t=Xw(r);u=Kw(r),c.x=t.x+r.clientLeft,c.y=t.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:uw,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[..."clippingAncestors"===n?vw(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=kw(t,[],!1).filter((t=>dw(t)&&"body"!==aw(t))),i=null;const o="fixed"===ww(t).position;let s=o?xw(t):t;for(;dw(s)&&!_w(s);){const e=ww(s),n=gw(s);n||"fixed"!==e.position||(i=null),(o?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||fw(s)&&!n&&tb(t,s))?r=r.filter((t=>t!==s)):i=e,s=xw(s)}return e.set(t,r),r}(e,this._c):[].concat(n),r],s=o[0],a=o.reduce(((t,n)=>{const r=Jw(e,n,i);return t.top=Tw(r.top,t.top),t.right=Pw(r.right,t.right),t.bottom=Pw(r.bottom,t.bottom),t.left=Tw(r.left,t.left),t}),Jw(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ib,getElementRects:async function(t){const e=this.getOffsetParent||ib,n=this.getDimensions,r=await n(t.floating);return{reference:eb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=zw(t);return{width:e,height:n}},getScale:Kw,isElement:dw,isRTL:function(t){return"rtl"===ww(t).direction}};function sb(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=qw(t),c=i||o?[...u?kw(u):[],...kw(e)]:[];c.forEach((t=>{i&&t.addEventListener("scroll",n,{passive:!0}),o&&t.addEventListener("resize",n)}));const d=u&&a?function(t,e){let n,r=null;const i=uw(t);function o(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const{left:u,top:c,width:d,height:h}=t.getBoundingClientRect();if(a||e(),!d||!h)return;const p={rootMargin:-Cw(c)+"px "+-Cw(i.clientWidth-(u+d))+"px "+-Cw(i.clientHeight-(c+h))+"px "+-Cw(u)+"px",threshold:Tw(0,Pw(1,l))||1};let f=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return s();e?s(!1,e):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}f=!1}try{r=new IntersectionObserver(m,{...p,root:i.ownerDocument})}catch(Ty){r=new IntersectionObserver(m,p)}r.observe(t)}(!0),o}(u,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((t=>{let[r]=t;r&&r.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=f)||t.observe(e)}))),n()})),u&&!l&&f.observe(u),f.observe(e));let m=l?Xw(t):null;return l&&function e(){const r=Xw(t);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(e)}(),n(),()=>{var t;c.forEach((t=>{i&&t.removeEventListener("scroll",n),o&&t.removeEventListener("resize",n)})),null==d||d(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const ab=$w,lb=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:n,platform:r,elements:i}=t,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Dw(n),a=Vw(n),l="y"===Bw(n),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Lw(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},ub=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=Lw(t,e),u={x:n,y:r},c=await $w(e,l),d=Bw(Dw(i)),h=Iw(d);let p=u[h],f=u[d];if(o){const t="y"===h?"bottom":"right";p=Fw(p+c["y"===h?"top":"left"],p,p-c[t])}if(s){const t="y"===d?"bottom":"right";f=Fw(f+c["y"===d?"top":"left"],f,f-c[t])}const m=a.fn({...e,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},cb=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=Lw(t,e);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Dw(i),y=Bw(a),_=Dw(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=h||(_||!m?[Gw(a)]:function(t){const e=Gw(t);return[Uw(t),e,Uw(e)]}(a)),x="none"!==f;!h&&x&&b.push(...function(t,e,n,r){const i=Vw(t);let o=function(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}(Dw(t),"start"===n,r);return i&&(o=o.map((t=>t+"-"+i)),e&&(o=o.concat(o.map(Uw)))),o}(a,m,f,w));const S=[a,...b],k=await $w(e,v),E=[];let P=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&E.push(k[g]),d){const t=function(t,e,n){void 0===n&&(n=!1);const r=Vw(t),i=Nw(t),o=jw(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Gw(s)),[s,Gw(s)]}(i,s,w);E.push(k[t[0]],k[t[1]])}if(P=[...P,{placement:i,overflows:E}],!E.every((t=>t<=0))){var T,A;const t=((null==(T=o.flip)?void 0:T.index)||0)+1,e=S[t];if(e)return{data:{index:t,overflows:P},reset:{placement:e}};let n=null==(A=P.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var C;const t=null==(C=P.filter((t=>{if(x){const e=Bw(t.placement);return e===y||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(n=t);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},db=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...u}=Lw(t,e),c=await $w(e,u),d=Dw(i),h=Vw(i),p="y"===Bw(i),{width:f,height:m}=o.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=h===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,v="end"===h?"top":"bottom");const y=m-c.top-c.bottom,_=f-c.left-c.right,w=Pw(m-c[v],y),b=Pw(f-c[g],_),x=!e.middlewareData.shift;let S=w,k=b;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(k=_),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(S=y),x&&!h){const t=Tw(c.left,0),e=Tw(c.right,0),n=Tw(c.top,0),r=Tw(c.bottom,0);p?k=f-2*(0!==t||0!==e?t+e:Tw(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:Tw(c.top,c.bottom))}await l({...e,availableWidth:k,availableHeight:S});const E=await s.getDimensions(a.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},hb=(t,e,n)=>{const r=new Map,i={platform:ob,...n},o={...i.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=Hw(u,r,l),h=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:n,fn:o}=a[m],{x:v,y:g,data:y,reset:_}=await o({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:t,floating:e}});c=null!=v?v:c,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(h=_.placement),_.rects&&(u=!0===_.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):_.rects),({x:c,y:d}=Hw(u,h,l))),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}})(t,e,{...i,platform:o})};var pb="undefined"!=typeof document?Ln:Fn;function fb(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!=r--;)if(!fb(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!t.$$typeof)&&!fb(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function mb(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vb(t,e){const n=mb(t);return Math.round(e*n)/n}function gb(t){const e=Dn(t);return pb((()=>{e.current=t})),e}const yb=(t,e)=>({...lb(t),options:[t,e]}),_b=(t,e)=>({...ub(t),options:[t,e]}),wb=(t,e)=>({...cb(t),options:[t,e]}),bb=(t,e)=>({...db(t),options:[t,e]}),xb={...Zr},Sb=xb.useInsertionEffect||(t=>t());function kb(t){const e=Dn((()=>{}));return Sb((()=>{e.current=t})),jn((function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null==e.current?void 0:e.current(...n)}),[])}var Eb="undefined"!=typeof document?Ln:Fn;let Pb=!1,Tb=0;const Ab=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Tb++;const Cb=xb.useId||function(){const[t,e]=On((()=>Pb?Ab():void 0));return Eb((()=>{null==t&&e(Ab())}),[]),Fn((()=>{Pb=!0}),[]),t};const Rb=oe(null),Ob=oe(null),Mb=()=>{var t;return(null==(t=Bn(Rb))?void 0:t.id)||null},Fb=()=>Bn(Ob),Lb="data-floating-ui-focusable";function Db(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=Cb(),o=Dn({}),[s]=On((()=>function(){const t=new Map;return{emit(e,n){var r;null==(r=t.get(e))||r.forEach((t=>t(n)))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,(null==(r=t.get(e))?void 0:r.filter((t=>t!==n)))||[])}}}())),a=null!=Mb(),[l,u]=On(r.reference),c=kb(((t,e,r)=>{o.current.openEvent=t?e:void 0,s.emit("openchange",{open:t,event:e,reason:r,nested:a}),null==n||n(t,e,r)})),d=In((()=>({setPositionReference:u})),[]),h=In((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return In((()=>({dataRef:o,open:e,onOpenChange:c,elements:h,events:s,floatingId:i,refs:d})),[e,c,h,s,i,d])}function Vb(t){void 0===t&&(t={});const{nodeId:e}=t,n=Db({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[o,s]=On(null),[a,l]=On(null),u=(null==i?void 0:i.reference)||o,c=Dn(null),d=Fb();Eb((()=>{u&&(c.current=u)}),[u]);const h=function(t){void 0===t&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=On({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,p]=On(r);fb(h,r)||p(r);const[f,m]=On(null),[v,g]=On(null),y=jn((t=>{t!==x.current&&(x.current=t,m(t))}),[]),_=jn((t=>{t!==S.current&&(S.current=t,g(t))}),[]),w=o||f,b=s||v,x=Dn(null),S=Dn(null),k=Dn(c),E=null!=l,P=gb(l),T=gb(i),A=gb(u),C=jn((()=>{if(!x.current||!S.current)return;const t={placement:e,strategy:n,middleware:h};T.current&&(t.platform=T.current),hb(x.current,S.current,t).then((t=>{const e={...t,isPositioned:!1!==A.current};R.current&&!fb(k.current,e)&&(k.current=e,Gr((()=>{d(e)})))}))}),[h,e,n,T,A]);pb((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d((t=>({...t,isPositioned:!1}))))}),[u]);const R=Dn(!1);pb((()=>(R.current=!0,()=>{R.current=!1})),[]),pb((()=>{if(w&&(x.current=w),b&&(S.current=b),w&&b){if(P.current)return P.current(w,b,C);C()}}),[w,b,C,P,E]);const O=In((()=>({reference:x,floating:S,setReference:y,setFloating:_})),[y,_]),M=In((()=>({reference:w,floating:b})),[w,b]),F=In((()=>{const t={position:n,left:0,top:0};if(!M.floating)return t;const e=vb(M.floating,c.x),r=vb(M.floating,c.y);return a?{...t,transform:"translate("+e+"px, "+r+"px)",...mb(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:e,top:r}}),[n,a,M.floating,c.x,c.y]);return In((()=>({...c,update:C,refs:O,elements:M,floatingStyles:F})),[c,C,O,M,F])}({...t,elements:{...i,...a&&{reference:a}}}),p=jn((t=>{const e=dw(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;l(e),h.refs.setReference(e)}),[h.refs]),f=jn((t=>{(dw(t)||null===t)&&(c.current=t,s(t)),(dw(h.refs.reference.current)||null===h.refs.reference.current||null!==t&&!dw(t))&&h.refs.setReference(t)}),[h.refs]),m=In((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:c})),[h.refs,f,p]),v=In((()=>({...h.elements,domReference:u})),[h.elements,u]),g=In((()=>({...h,...r,refs:m,elements:v,nodeId:e})),[h,m,v,e,r]);return Eb((()=>{r.dataRef.current.floatingContext=g;const t=null==d?void 0:d.nodesRef.current.find((t=>t.id===e));t&&(t.context=g)})),In((()=>({...h,context:g,refs:m,elements:v})),[h,m,v,g])}const Ib="active",jb="selected";function Bb(t,e,n){const r=new Map,i="item"===n;let o=t;if(i&&t){const{[Ib]:e,[jb]:n,...r}=t;o=r}return{..."floating"===n&&{tabIndex:-1,[Lb]:""},...o,...e.map((e=>{const r=e?e[n]:null;return"function"==typeof r?t?r(t):null:r})).concat(t).reduce(((t,e)=>e?(Object.entries(e).forEach((e=>{let[n,o]=e;var s;i&&[Ib,jb].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(s=r.get(n))||s.push(o),t[n]=function(){for(var t,e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return null==(t=r.get(n))?void 0:t.map((t=>t(...i))).find((t=>void 0!==t))})):t[n]=o)})),t):t),{})}}function Nb(t,e){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:e}}}}const Ub=t=>({name:"inner",options:t,async fn(e){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Lw(t,e),{rects:d,elements:{floating:h}}=e,p=n.current[s],f=(null==u?void 0:u.current)||h,m=h.clientTop||f.clientTop,v=0!==h.clientTop,g=0!==f.clientTop,y=h===f;if(!p)return{};const _={...e,...await yb(-p.offsetTop-h.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(e)},w=await ab(Nb(_,f.scrollHeight+m+h.clientTop),c),b=await ab(_,{...c,elementContext:"reference"}),x=Tw(0,w.top),S=_.y+x,k=Aw(Tw(0,f.scrollHeight+(v&&y||g?2*m:0)-x-Tw(0,w.bottom)));if(f.style.maxHeight=k+"px",f.scrollTop=x,i){const t=f.scrollHeight>f.offsetHeight&&f.offsetHeight<p.offsetHeight*a-1||b.top>=-l||b.bottom>=-l;Gr((()=>i(t)))}return r&&(r.current=await ab(Nb({..._,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function Gb(t,e){const{open:n,elements:r}=t,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=e,l=kb(a),u=Dn(!1),c=Dn(null),d=Dn(null);Fn((()=>{if(!i)return;function t(t){if(t.ctrlKey||!e||null==o.current)return;const n=t.deltaY,r=o.current.top>=-.5,i=o.current.bottom>=-.5,s=e.scrollHeight-e.clientHeight,a=n<0?-1:1,u=n<0?"max":"min";e.scrollHeight<=e.clientHeight||(!r&&n>0||!i&&n<0?(t.preventDefault(),Gr((()=>{l((t=>t+Math[u](n,s*a)))}))):/firefox/i.test(function(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map((t=>{let{brand:e,version:n}=t;return e+"/"+n})).join(" "):navigator.userAgent}())&&(e.scrollTop+=n))}const e=(null==s?void 0:s.current)||r.floating;return n&&e?(e.addEventListener("wheel",t),requestAnimationFrame((()=>{c.current=e.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{c.current=null,d.current=null,e.removeEventListener("wheel",t)}):void 0}),[i,n,r.floating,o,s,l]);const h=In((()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const t=(null==s?void 0:s.current)||r.floating;if(o.current&&t&&u.current){if(null!==c.current){const e=t.scrollTop-c.current;(o.current.bottom<-.5&&e<-1||o.current.top<-.5&&e>1)&&Gr((()=>l((t=>t+e))))}requestAnimationFrame((()=>{c.current=t.scrollTop}))}}})),[r.floating,l,o,s]);return In((()=>i?{floating:h}:{}),[i,h])}let Wb=oe({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Wb.displayName="FloatingContext";let Hb=oe(null);Hb.displayName="PlacementContext";let $b=4;function zb({children:t,enabled:e=!0}){let[n,r]=On(null),[i,o]=On(0),s=Dn(null),[a,l]=On(null);!function(t){yy((()=>{if(!t)return;let e=new MutationObserver((()=>{let e=window.getComputedStyle(t).maxHeight,n=parseFloat(e);if(isNaN(n))return;let r=parseInt(e);isNaN(r)||n!==r&&(t.style.maxHeight=`${Math.ceil(n)}px`)}));return e.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}}),[t])}(a);let u=e&&null!==n&&null!==a,{to:c="bottom",gap:d=0,offset:h=0,padding:p=0,inner:f}=function(t,e){var n,r,i;let o=qb(null!=(n=null==t?void 0:t.gap)?n:"var(--anchor-gap, 0)",e),s=qb(null!=(r=null==t?void 0:t.offset)?r:"var(--anchor-offset, 0)",e),a=qb(null!=(i=null==t?void 0:t.padding)?i:"var(--anchor-padding, 0)",e);return{...t,gap:o,offset:s,padding:a}}(n,a),[m,v="center"]=c.split(" ");yy((()=>{u&&o(0)}),[u]);let{refs:g,floatingStyles:y,context:_}=Vb({open:u,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[yb({mainAxis:"selection"===m?0:d,crossAxis:h}),_b({padding:p}),"selection"!==m&&wb({padding:p}),"selection"===m&&f?Ub({...f,padding:p,overflowRef:s,offset:i,minItemsVisible:$b,referenceOverflowThreshold:p,onFallbackChange(t){var e,n;if(!t)return;let r=_.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,s=Math.min($b,r.childElementCount),a=0,l=0;for(let o of null!=(n=null==(e=_.elements.floating)?void 0:e.childNodes)?n:[])if(o instanceof HTMLElement){let t=o.offsetTop,e=t+o.clientHeight+i,n=r.scrollTop,u=n+r.clientHeight;if(!(t>=n&&e<=u)){l=Math.max(0,Math.min(e,u)-Math.max(t,n)),a=o.clientHeight;break}s--}s>=1&&o((t=>{let e=a*s-l+i;return t>=e?t:e}))}}):null,bb({padding:p,apply({availableWidth:t,availableHeight:e,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${t}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${e}px)`})}})].filter(Boolean),whileElementsMounted:sb}),[w=m,b=v]=_.placement.split("-");"selection"===m&&(w="selection");let x=In((()=>({anchor:[w,b].filter(Boolean).join(" ")})),[w,b]),S=Gb(_,{overflowRef:s,onChange:o}),{getReferenceProps:k,getFloatingProps:E}=function(t){void 0===t&&(t=[]);const e=t.map((t=>null==t?void 0:t.reference)),n=t.map((t=>null==t?void 0:t.floating)),r=t.map((t=>null==t?void 0:t.item)),i=jn((e=>Bb(e,t,"reference")),e),o=jn((e=>Bb(e,t,"floating")),n),s=jn((e=>Bb(e,t,"item")),r);return In((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s})),[i,o,s])}([S]),P=wy((t=>{l(t),g.setFloating(t)}));return Dt(Hb.Provider,{value:r},Dt(Wb.Provider,{value:{setFloating:P,setReference:g.setReference,styles:y,getReferenceProps:k,getFloatingProps:E,slot:x}},t))}function qb(t,e,n=void 0){let r=gy(),i=wy(((t,e)=>{if(null==t)return[n,null];if("number"==typeof t)return[t,null];if("string"==typeof t){if(!e)return[n,null];let i=Yb(t,e);return[i,n=>{let o=Kb(t);{let s=o.map((t=>window.getComputedStyle(e).getPropertyValue(t)));r.requestAnimationFrame((function a(){r.nextFrame(a);let l=!1;for(let[t,n]of o.entries()){let r=window.getComputedStyle(e).getPropertyValue(n);if(s[t]!==r){s[t]=r,l=!0;break}}if(!l)return;let u=Yb(t,e);i!==u&&(n(u),i=u)}))}return r.dispose}]}return[n,null]})),o=In((()=>i(t,e)[0]),[t,e]),[s=o,a]=On();return yy((()=>{let[n,r]=i(t,e);if(a(n),r)return r(a)}),[t,e]),s}function Kb(t){let e=/var\((.*)\)/.exec(t);if(e){let t=e[1].indexOf(",");if(-1===t)return[e[1]];let n=e[1].slice(0,t).trim(),r=e[1].slice(t+1).trim();return r?[n,...Kb(r)]:[n]}return[]}function Yb(t,e){let n=document.createElement("div");e.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",t,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return e.removeChild(n),r}let Qb=oe(null);Qb.displayName="OpenClosedContext";var Xb=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(Xb||{});function Zb(){return Bn(Qb)}function Jb({value:t,children:e}){return Xr.createElement(Qb.Provider,{value:t},e)}var tx,ex=((tx=ex||{})[tx.First=0]="First",tx[tx.Previous=1]="Previous",tx[tx.Next=2]="Next",tx[tx.Last=3]="Last",tx[tx.Specific=4]="Specific",tx[tx.Nothing=5]="Nothing",tx);function nx(t,e){let n=e.resolveItems();if(n.length<=0)return null;let r=e.resolveActiveIndex(),i=null!=r?r:-1;switch(t.focus){case 0:for(let t=0;t<n.length;++t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 1:-1===i&&(i=n.length);for(let t=i-1;t>=0;--t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 2:for(let t=i+1;t<n.length;++t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 3:for(let t=n.length-1;t>=0;--t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 4:for(let r=0;r<n.length;++r)if(e.resolveId(n[r],r,n)===t.id)return r;return r;case 5:return null;default:!function(t){throw new Error("Unexpected object: "+t)}(t)}}function rx(){let t=function(){let t="undefined"==typeof document;return"useSyncExternalStore"in Zr&&(t=>t.useSyncExternalStore)(Zr)((()=>()=>{}),(()=>!1),(()=>!t))}(),[e,n]=On(py.isHandoffComplete);return e&&!1===py.isHandoffComplete&&n(!1),Fn((()=>{!0!==e&&n(!0)}),[e]),Fn((()=>py.handoff()),[]),!t&&e}let ix=oe(!1);function ox(t){let e=Bn(ix),n=Bn(ux),r=Y_(t),[i,o]=On((()=>{var t;if(!e&&null!==n)return null!=(t=n.current)?t:null;if(py.isServer)return null;let i=null==r?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)}));return Fn((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),Fn((()=>{e||null!==n&&o(n.current)}),[n,o,e]),i}let sx=jt,ax=Vy((function(t,e){let n=t,r=Dn(null),i=r_(function(t,e=!0){return Object.assign(t,{[n_]:e})}((t=>{r.current=t})),e),o=Y_(r),s=ox(r),[a]=On((()=>{var t;return py.isServer?null:null!=(t=null==o?void 0:o.createElement("div"))?t:null})),l=Bn(cx),u=rx();return yy((()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))}),[s,a]),yy((()=>{if(a&&l)return l.register(a)}),[l,a]),function(t){let e=wy(t),n=Dn(!1);Fn((()=>(n.current=!1,()=>{n.current=!0,my((()=>{n.current&&e()}))})),[e])}((()=>{var t;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&(null==(t=s.parentElement)||t.removeChild(s)))})),u&&s&&a?mr(Oy({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:sx,name:"Portal"}),a):null}));let lx=jt,ux=oe(null);let cx=oe(null),dx=Vy((function(t,e){let n=r_(e),{enabled:r=!0,...i}=t;return r?Xr.createElement(ax,{...i,ref:n}):Oy({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:sx,name:"Portal"})})),hx=Vy((function(t,e){let{target:n,...r}=t,i={ref:r_(e)};return Xr.createElement(ux.Provider,{value:n},Oy({ourProps:i,theirProps:r,defaultTag:lx,name:"Popover.Group"}))})),px=Object.assign(dx,{Group:hx});function fx(t){var e;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||(null!=(e=t.as)?e:wx)!==jt||1===Xr.Children.count(t.children)}let mx=oe(null);mx.displayName="TransitionContext";var vx=(t=>(t.Visible="visible",t.Hidden="hidden",t))(vx||{});let gx=oe(null);function yx(t){return"children"in t?yx(t.children):t.current.filter((({el:t})=>null!==t.current)).filter((({state:t})=>"visible"===t)).length>0}function _x(t,e){let n=_y(t),r=Dn([]),i=function(){let t=Dn(!1);return yy((()=>(t.current=!0,()=>{t.current=!1})),[]),t}(),o=gy(),s=wy(((t,e=Ry.Hidden)=>{let s=r.current.findIndex((({el:e})=>e===t));-1!==s&&(Py(e,{[Ry.Unmount](){r.current.splice(s,1)},[Ry.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var t;!yx(r)&&i.current&&(null==(t=n.current)||t.call(n))})))})),a=wy((t=>{let e=r.current.find((({el:e})=>e===t));return e?"visible"!==e.state&&(e.state="visible"):r.current.push({el:t,state:"visible"}),()=>s(t,Ry.Unmount)})),l=Dn([]),u=Dn(Promise.resolve()),c=Dn({enter:[],leave:[]}),d=wy(((t,n,r)=>{l.current.splice(0),e&&(e.chains.current[n]=e.chains.current[n].filter((([e])=>e!==t))),null==e||e.chains.current[n].push([t,new Promise((t=>{l.current.push(t)}))]),null==e||e.chains.current[n].push([t,new Promise((t=>{Promise.all(c.current[n].map((([t,e])=>e))).then((()=>t()))}))]),"enter"===n?u.current=u.current.then((()=>null==e?void 0:e.wait.current)).then((()=>r(n))):r(n)})),h=wy(((t,e,n)=>{Promise.all(c.current[e].splice(0).map((([t,e])=>e))).then((()=>{var t;null==(t=l.current.shift())||t()})).then((()=>n(e)))}));return In((()=>({children:r,register:a,unregister:s,onStart:d,onStop:h,wait:u,chains:c})),[a,s,r,d,h,c,u])}gx.displayName="NestingContext";let wx=jt,bx=Cy.RenderStrategy;let xx=Vy((function(t,e){let{show:n,appear:r=!1,unmount:i=!0,...o}=t,s=Dn(null),a=r_(...fx(t)?[s,e]:null===e?[]:[e]);rx();let l=Zb();if(void 0===n&&null!==l&&(n=(l&Xb.Open)===Xb.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=On(n?"visible":"hidden"),d=_x((()=>{n||c("hidden")})),[h,p]=On(!0),f=Dn([n]);yy((()=>{!1!==h&&f.current[f.current.length-1]!==n&&(f.current.push(n),p(!1))}),[f,n]);let m=In((()=>({show:n,appear:r,initial:h})),[n,r,h]);yy((()=>{n?c("visible"):!yx(d)&&null!==s.current&&c("hidden")}),[n,d]);let v={unmount:i},g=wy((()=>{var e;h&&p(!1),null==(e=t.beforeEnter)||e.call(t)})),y=wy((()=>{var e;h&&p(!1),null==(e=t.beforeLeave)||e.call(t)}));return Xr.createElement(gx.Provider,{value:d},Xr.createElement(mx.Provider,{value:m},Oy({ourProps:{...v,as:jt,children:Xr.createElement(Sx,{ref:a,...v,...o,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:jt,features:bx,visible:"visible"===u,name:"Transition"})))})),Sx=Vy((function(t,e){var n,r;let{transition:i=!0,beforeEnter:o,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:d,entered:h,leave:p,leaveFrom:f,leaveTo:m,...v}=t,[g,y]=On(null),_=Dn(null),w=fx(t),b=r_(...w?[_,e,y]:null===e?[]:[e]),x=null==(n=v.unmount)||n?Ry.Unmount:Ry.Hidden,{show:S,appear:k,initial:E}=function(){let t=Bn(mx);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),[P,T]=On(S?"visible":"hidden"),A=function(){let t=Bn(gx);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),{register:C,unregister:R}=A;yy((()=>C(_)),[C,_]),yy((()=>{if(x===Ry.Hidden&&_.current)return S&&"visible"!==P?void T("visible"):Py(P,{hidden:()=>R(_),visible:()=>C(_)})}),[P,_,C,R,S,x]);let O=rx();yy((()=>{if(w&&O&&"visible"===P&&null===_.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[_,P,O,w]);let M=E&&!k,F=k&&S&&E,L=Dn(!1),D=_x((()=>{L.current||(T("hidden"),R(_))}),A),V=wy((t=>{L.current=!0;let e=t?"enter":"leave";D.onStart(_,e,(t=>{"enter"===t?null==o||o():"leave"===t&&(null==a||a())}))})),I=wy((t=>{let e=t?"enter":"leave";L.current=!1,D.onStop(_,e,(t=>{"enter"===t?null==s||s():"leave"===t&&(null==l||l())})),"leave"===e&&!yx(D)&&(T("hidden"),R(_))}));Fn((()=>{w&&i||(V(S),I(S))}),[S,w,i]);let j=(()=>!(!i||!w||!O||M))(),[,B]=ow(j,g,S,{start:V,end:I}),N=Iy({ref:b,className:(null==(r=Ey(v.className,F&&u,F&&c,B.enter&&u,B.enter&&B.closed&&c,B.enter&&!B.closed&&d,B.leave&&p,B.leave&&!B.closed&&f,B.leave&&B.closed&&m,!B.transition&&S&&h))?void 0:r.trim())||void 0,...iw(B)}),U=0;return"visible"===P&&(U|=Xb.Open),"hidden"===P&&(U|=Xb.Closed),B.enter&&(U|=Xb.Opening),B.leave&&(U|=Xb.Closing),Xr.createElement(gx.Provider,{value:D},Xr.createElement(Jb,{value:U},Oy({ourProps:N,theirProps:v,defaultTag:wx,features:bx,visible:"visible"===P,name:"Transition.Child"})))})),kx=Vy((function(t,e){let n=null!==Bn(mx),r=null!==Zb();return Xr.createElement(Xr.Fragment,null,!n&&r?Xr.createElement(xx,{ref:e,...t}):Xr.createElement(Sx,{ref:e,...t}))})),Ex=Object.assign(xx,{Child:kx,Root:xx});let Px=Vy((function(t,e){let n=`headlessui-control-${Un()}`,[r,i]=m_(),[o,s]=a_(),a=Sy(),{disabled:l=a||!1,...u}=t,c=In((()=>({disabled:l})),[l]);return Xr.createElement(ky,{value:l},Xr.createElement(i,{value:r},Xr.createElement(s,{value:o},Xr.createElement(t_,{id:n},Oy({ourProps:{ref:e,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...u,children:Xr.createElement(Ky,null,"function"==typeof u.children?u.children(c):u.children)},slot:c,defaultTag:"div",name:"Field"})))))}));let Tx=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ax(t){var e,n;let r=null!=(e=t.innerText)?e:"",i=t.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?null!=(n=i.innerText)?n:"":r;return Tx.test(s)&&(s=s.replace(Tx,"")),s}function Cx(t){let e=Dn(""),n=Dn("");return wy((()=>{let r=t.current;if(!r)return"";let i=r.innerText;if(e.current===i)return n.current;let o=function(t){let e=t.getAttribute("aria-label");if("string"==typeof e)return e.trim();let n=t.getAttribute("aria-labelledby");if(n){let t=n.split(" ").map((t=>{let e=document.getElementById(t);if(e){let t=e.getAttribute("aria-label");return"string"==typeof t?t.trim():Ax(e).trim()}return null})).filter(Boolean);if(t.length>0)return t.join(", ")}return Ax(t).trim()}(r).trim().toLowerCase();return e.current=i,n.current=o,o}))}var Rx=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Rx||{}),Ox=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Ox||{}),Mx=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(Mx||{}),Fx=(t=>(t[t.OpenListbox=0]="OpenListbox",t[t.CloseListbox=1]="CloseListbox",t[t.GoToOption=2]="GoToOption",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterOption=5]="RegisterOption",t[t.UnregisterOption=6]="UnregisterOption",t[t.SetButtonElement=7]="SetButtonElement",t[t.SetOptionsElement=8]="SetOptionsElement",t))(Fx||{});function Lx(t,e=t=>t){let n=null!==t.activeOptionIndex?t.options[t.activeOptionIndex]:null,r=G_(e(t.options.slice()),(t=>t.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Dx={1:t=>t.dataRef.current.disabled||1===t.listboxState?t:{...t,activeOptionIndex:null,listboxState:1,__demoMode:!1},0(t){if(t.dataRef.current.disabled||0===t.listboxState)return t;let e=t.activeOptionIndex,{isSelected:n}=t.dataRef.current,r=t.options.findIndex((t=>n(t.dataRef.current.value)));return-1!==r&&(e=r),{...t,listboxState:0,activeOptionIndex:e,__demoMode:!1}},2(t,e){var n,r,i,o,s;if(t.dataRef.current.disabled||1===t.listboxState)return t;let a={...t,searchQuery:"",activationTrigger:null!=(n=e.trigger)?n:1,__demoMode:!1};if(e.focus===ex.Nothing)return{...a,activeOptionIndex:null};if(e.focus===ex.Specific)return{...a,activeOptionIndex:t.options.findIndex((t=>t.id===e.id))};if(e.focus===ex.Previous){let n=t.activeOptionIndex;if(null!==n){let o=t.options[n].dataRef.current.domRef,s=nx(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});if(null!==s){let e=t.options[s].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.previousElementSibling)===e.current||null===(null==(i=e.current)?void 0:i.previousElementSibling))return{...a,activeOptionIndex:s}}}}else if(e.focus===ex.Next){let n=t.activeOptionIndex;if(null!==n){let r=t.options[n].dataRef.current.domRef,i=nx(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});if(null!==i){let e=t.options[i].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.nextElementSibling)===e.current||null===(null==(s=e.current)?void 0:s.nextElementSibling))return{...a,activeOptionIndex:i}}}}let l=Lx(t),u=nx(e,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(t,e)=>{if(t.dataRef.current.disabled||1===t.listboxState)return t;let n=""!==t.searchQuery?0:1,r=t.searchQuery+e.value.toLowerCase(),i=(null!==t.activeOptionIndex?t.options.slice(t.activeOptionIndex+n).concat(t.options.slice(0,t.activeOptionIndex+n)):t.options).find((t=>{var e;return!t.dataRef.current.disabled&&(null==(e=t.dataRef.current.textValue)?void 0:e.startsWith(r))})),o=i?t.options.indexOf(i):-1;return-1===o||o===t.activeOptionIndex?{...t,searchQuery:r}:{...t,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4:t=>t.dataRef.current.disabled||1===t.listboxState||""===t.searchQuery?t:{...t,searchQuery:""},5:(t,e)=>{let n={id:e.id,dataRef:e.dataRef},r=Lx(t,(t=>[...t,n]));return null===t.activeOptionIndex&&t.dataRef.current.isSelected(e.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...t,...r}},6:(t,e)=>{let n=Lx(t,(t=>{let n=t.findIndex((t=>t.id===e.id));return-1!==n&&t.splice(n,1),t}));return{...t,...n,activationTrigger:1}},7:(t,e)=>t.buttonElement===e.element?t:{...t,buttonElement:e.element},8:(t,e)=>t.optionsElement===e.element?t:{...t,optionsElement:e.element}},Vx=oe(null);function Ix(t){let e=Bn(Vx);if(null===e){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ix),e}return e}Vx.displayName="ListboxActionsContext";let jx=oe(null);function Bx(t){let e=Bn(jx);if(null===e){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Bx),e}return e}function Nx(t,e){return Py(e.type,Dx,t,e)}jx.displayName="ListboxDataContext";let Ux=jt;let Gx=oe(!1),Wx=Cy.RenderStrategy|Cy.Static;let Hx=jt;let $x=Vy((function(t,e){var n;let r=Sy(),{value:i,defaultValue:o,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:d=r||!1,horizontal:h=!1,multiple:p=!1,__demoMode:f=!1,...m}=t;const v=h?"horizontal":"vertical";let g=r_(e),y=Ny(o),[_=(p?[]:void 0),w]=By(i,l,y),[b,x]=Mn(Nx,{dataRef:{current:null},listboxState:f?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:f}),S=Dn({static:!1,hold:!1}),k=Dn(new Map),E=function(t=y_){return jn(((e,n)=>{if("string"==typeof t){let r=t;return(null==e?void 0:e[r])===(null==n?void 0:n[r])}return t(e,n)}),[t])}(u),P=jn((t=>Py(T.mode,{1:()=>_.some((e=>E(e,t))),0:()=>E(_,t)})),[_]),T=In((()=>({...b,value:_,disabled:d,invalid:c,mode:p?1:0,orientation:v,compare:E,isSelected:P,optionsPropsRef:S,listRef:k})),[_,d,c,p,b,k]);yy((()=>{b.dataRef.current=T}),[T]),K_(0===T.listboxState,[T.buttonElement,T.optionsElement],((t,e)=>{var n;x({type:1}),B_(e,j_.Loose)||(t.preventDefault(),null==(n=T.buttonElement)||n.focus())}));let A=In((()=>({open:0===T.listboxState,disabled:d,invalid:c,value:_})),[T,d,_,c]),C=wy((t=>{let e=T.options.find((e=>e.id===t));e&&V(e.dataRef.current.value)})),R=wy((()=>{if(null!==T.activeOptionIndex){let{dataRef:t,id:e}=T.options[T.activeOptionIndex];V(t.current.value),x({type:2,focus:ex.Specific,id:e})}})),O=wy((()=>x({type:0}))),M=wy((()=>x({type:1}))),F=gy(),L=wy(((t,e,n)=>{F.dispose(),F.microTask((()=>t===ex.Specific?x({type:2,focus:ex.Specific,id:e,trigger:n}):x({type:2,focus:t,trigger:n})))})),D=wy(((t,e)=>(x({type:5,id:t,dataRef:e}),()=>x({type:6,id:t})))),V=wy((t=>Py(T.mode,{0:()=>null==w?void 0:w(t),1(){let e=T.value.slice(),n=e.findIndex((e=>E(e,t)));return-1===n?e.push(t):e.splice(n,1),null==w?void 0:w(e)}}))),I=wy((t=>x({type:3,value:t}))),j=wy((()=>x({type:4}))),B=wy((t=>{x({type:7,element:t})})),N=wy((t=>{x({type:8,element:t})})),U=In((()=>({onChange:V,registerOption:D,goToOption:L,closeListbox:M,openListbox:O,selectActiveOption:R,selectOption:C,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[G,W]=m_({inherit:!0}),H={ref:g},$=jn((()=>{if(void 0!==y)return null==w?void 0:w(y)}),[w,y]);return Xr.createElement(W,{value:G,props:{htmlFor:null==(n=T.buttonElement)?void 0:n.id},slot:{open:0===T.listboxState,disabled:d}},Xr.createElement(zb,null,Xr.createElement(Vx.Provider,{value:U},Xr.createElement(jx.Provider,{value:T},Xr.createElement(Jb,{value:Py(T.listboxState,{0:Xb.Open,1:Xb.Closed})},null!=a&&null!=_&&Xr.createElement(Qy,{disabled:d,data:{[a]:_},form:s,onReset:$}),Oy({ourProps:H,theirProps:m,slot:A,defaultTag:Ux,name:"Listbox"}))))))})),zx=Vy((function(t,e){var n;let r=Bx("Listbox.Button"),i=Ix("Listbox.Button"),o=Un(),s=Jy(),{id:a=s||`headlessui-listbox-button-${o}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...c}=t,d=function(){let t=Dn([]),e=jn((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}),[]);return(...n)=>{if(!n.every((t=>null==t)))return t.current=n,e}}(),h=r_(e,Bn(Wb).setReference,i.setButtonElement),p=Bn(Wb).getReferenceProps,f=wy((t=>{switch(t.key){case d_.Enter:Hy(t.currentTarget);break;case d_.Space:case d_.ArrowDown:t.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(ex.First);break;case d_.ArrowUp:t.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(ex.Last)}})),m=wy((t=>{if(t.key===d_.Space)t.preventDefault()})),v=wy((t=>{var e;if(e_(t.currentTarget))return t.preventDefault();0===r.listboxState?(Gr((()=>i.closeListbox())),null==(e=r.buttonElement)||e.focus({preventScroll:!0})):(t.preventDefault(),i.openListbox())})),g=wy((t=>t.preventDefault())),y=f_([a]),_=s_(),{isFocusVisible:w,focusProps:b}=cy({autoFocus:u}),{isHovered:x,hoverProps:S}=uy({isDisabled:l}),{pressed:k,pressProps:E}=by({disabled:l}),P=In((()=>({open:0===r.listboxState,active:k||0===r.listboxState,disabled:l,invalid:r.invalid,value:r.value,hover:x,focus:w,autofocus:u})),[r.listboxState,r.value,l,x,w,k,r.invalid,u]);return Oy({mergeRefs:d,ourProps:Dy(p(),{ref:h,id:a,type:Q_(t,r.buttonElement),"aria-haspopup":"listbox","aria-controls":null==(n=r.optionsElement)?void 0:n.id,"aria-expanded":0===r.listboxState,"aria-labelledby":y,"aria-describedby":_,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:m,onKeyPress:g,onClick:v},b,S,E),theirProps:c,slot:P,defaultTag:"button",name:"Listbox.Button"})})),qx=g_,Kx=Vy((function(t,e){var n,r;let i=Un(),{id:o=`headlessui-listbox-options-${i}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=t,d=function(t){return In((()=>t?"string"==typeof t?{to:t}:t:null),[t])}(s),[h,p]=On(null);d&&(a=!0);let f=Bx("Listbox.Options"),m=Ix("Listbox.Options"),v=Y_(f.optionsElement),g=Zb(),[y,_]=ow(u,h,null!==g?(g&Xb.Open)===Xb.Open:0===f.listboxState);!function(t,e,n){let r=_y((t=>{let e=t.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&n()}));Fn((()=>{if(!t)return;let n=null===e?null:e instanceof HTMLElement?e:e.current;if(!n)return;let i=vy();if("undefined"!=typeof ResizeObserver){let t=new ResizeObserver((()=>r.current(n)));t.observe(n),i.add((()=>t.disconnect()))}if("undefined"!=typeof IntersectionObserver){let t=new IntersectionObserver((()=>r.current(n)));t.observe(n),i.add((()=>t.disconnect()))}return()=>i.dispose()}),[e,r,t])}(y,f.buttonElement,m.closeListbox),tw(!f.__demoMode&&(l&&0===f.listboxState),v),function(t,{allowed:e,disallowed:n}={}){let r=k_(t,"inert-others");yy((()=>{var t,i;if(!r)return;let o=vy();for(let e of null!=(t=null==n?void 0:n())?t:[])e&&o.add(T_(e));let s=null!=(i=null==e?void 0:e())?i:[];for(let e of s){if(!e)continue;let t=fy(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let t of n.children)s.some((e=>t.contains(e)))||o.add(T_(t));n=n.parentElement}}return o.dispose}),[r,e,n])}(!f.__demoMode&&(l&&0===f.listboxState),{allowed:jn((()=>[f.buttonElement,f.optionsElement]),[f.buttonElement,f.optionsElement])});let w=!function(t,e){let n=Dn({left:0,top:0});if(yy((()=>{if(!e)return;let t=e.getBoundingClientRect();t&&(n.current=t)}),[t,e]),null==e||!t||e===document.activeElement)return!1;let r=e.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}(0!==f.listboxState,f.buttonElement)&&y,b=function(t,e){let[n,r]=On(e);return!t&&n!==e&&r(e),t?n:e}(y&&1===f.listboxState,f.value),x=wy((t=>f.compare(b,t))),S=In((()=>{var t;if(null==d||null==(t=null==d?void 0:d.to)||!t.includes("selection"))return null;let e=f.options.findIndex((t=>x(t.dataRef.current.value)));return-1===e&&(e=0),e}),[d,f.options]),k=(()=>{if(null==d)return;if(null===S)return{...d,inner:void 0};let t=Array.from(f.listRef.current.values());return{...d,inner:{listRef:{current:t},index:S}}})(),[E,P]=function(t=null){!1===t&&(t=null),"string"==typeof t&&(t={to:t});let e=Bn(Hb),n=In((()=>t),[JSON.stringify(t,"undefined"!=typeof HTMLElement?(t,e)=>e instanceof HTMLElement?e.outerHTML:e:void 0)]);yy((()=>{null==e||e(null!=n?n:null)}),[e,n]);let r=Bn(Wb);return In((()=>[r.setFloating,t?r.styles:{}]),[r.setFloating,t,r.styles])}(k),T=function(){let{getFloatingProps:t,slot:e}=Bn(Wb);return jn(((...n)=>Object.assign({},t(...n),{"data-anchor":e.anchor})),[t,e])}(),A=r_(e,d?E:null,m.setOptionsElement,p),C=gy();Fn((()=>{var t;let e=f.optionsElement;e&&0===f.listboxState&&e!==(null==(t=fy(e))?void 0:t.activeElement)&&(null==e||e.focus({preventScroll:!0}))}),[f.listboxState,f.optionsElement]);let R=wy((t=>{var e,n;switch(C.dispose(),t.key){case d_.Space:if(""!==f.searchQuery)return t.preventDefault(),t.stopPropagation(),m.search(t.key);case d_.Enter:if(t.preventDefault(),t.stopPropagation(),null!==f.activeOptionIndex){let{dataRef:t}=f.options[f.activeOptionIndex];m.onChange(t.current.value)}0===f.mode&&(Gr((()=>m.closeListbox())),null==(e=f.buttonElement)||e.focus({preventScroll:!0}));break;case Py(f.orientation,{vertical:d_.ArrowDown,horizontal:d_.ArrowRight}):return t.preventDefault(),t.stopPropagation(),m.goToOption(ex.Next);case Py(f.orientation,{vertical:d_.ArrowUp,horizontal:d_.ArrowLeft}):return t.preventDefault(),t.stopPropagation(),m.goToOption(ex.Previous);case d_.Home:case d_.PageUp:return t.preventDefault(),t.stopPropagation(),m.goToOption(ex.First);case d_.End:case d_.PageDown:return t.preventDefault(),t.stopPropagation(),m.goToOption(ex.Last);case d_.Escape:return t.preventDefault(),t.stopPropagation(),Gr((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case d_.Tab:t.preventDefault(),t.stopPropagation(),Gr((()=>m.closeListbox())),W_(f.buttonElement,t.shiftKey?L_.Previous:L_.Next);break;default:1===t.key.length&&(m.search(t.key),C.setTimeout((()=>m.clearSearch()),350))}})),O=null==(n=f.buttonElement)?void 0:n.id,M=In((()=>({open:0===f.listboxState})),[f.listboxState]),F=Dy(d?T():{},{id:o,ref:A,"aria-activedescendant":null===f.activeOptionIndex||null==(r=f.options[f.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===f.mode||void 0,"aria-labelledby":O,"aria-orientation":f.orientation,onKeyDown:R,role:"listbox",tabIndex:0===f.listboxState?0:void 0,style:{...c.style,...P,"--button-width":__(f.buttonElement,!0).width},...iw(_)});return Xr.createElement(px,{enabled:!!a&&(t.static||y)},Xr.createElement(jx.Provider,{value:1===f.mode?f:{...f,isSelected:x}},Oy({ourProps:F,theirProps:c,slot:M,defaultTag:"div",features:Wx,visible:w,name:"Listbox.Options"})))})),Yx=Vy((function(t,e){let n=Un(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=t,a=!0===Bn(Gx),l=Bx("Listbox.Option"),u=Ix("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===r,d=l.isSelected(o),h=Dn(null),p=Cx(h),f=_y({disabled:i,value:o,domRef:h,get textValue(){return p()}}),m=r_(e,h,(t=>{t?l.listRef.current.set(r,t):l.listRef.current.delete(r)}));yy((()=>{if(!l.__demoMode&&0===l.listboxState&&c&&0!==l.activationTrigger)return vy().requestAnimationFrame((()=>{var t,e;null==(e=null==(t=h.current)?void 0:t.scrollIntoView)||e.call(t,{block:"nearest"})}))}),[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),yy((()=>{if(!a)return u.registerOption(r,f)}),[f,r,a]);let v=wy((t=>{var e;if(i)return t.preventDefault();u.onChange(o),0===l.mode&&(Gr((()=>u.closeListbox())),null==(e=l.buttonElement)||e.focus({preventScroll:!0}))})),g=wy((()=>{if(i)return u.goToOption(ex.Nothing);u.goToOption(ex.Specific,r)})),y=function(){let t=Dn([-1,-1]);return{wasMoved(e){let n=ew(e);return(t.current[0]!==n[0]||t.current[1]!==n[1])&&(t.current=n,!0)},update(e){t.current=ew(e)}}}(),_=wy((t=>{y.update(t),!i&&(c||u.goToOption(ex.Specific,r,0))})),w=wy((t=>{y.wasMoved(t)&&(i||c||u.goToOption(ex.Specific,r,0))})),b=wy((t=>{y.wasMoved(t)&&(i||c&&u.goToOption(ex.Nothing))})),x=In((()=>({active:c,focus:c,selected:d,disabled:i,selectedOption:d&&a})),[c,d,i,a]);return!d&&a?null:Oy({ourProps:a?{}:{id:r,ref:m,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":d,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:_,onMouseEnter:_,onPointerMove:w,onMouseMove:w,onPointerLeave:b,onMouseLeave:b},theirProps:s,slot:x,defaultTag:"div",name:"Listbox.Option"})})),Qx=Vy((function(t,e){let{options:n,placeholder:r,...i}=t,o={ref:r_(e)},s=Bx("ListboxSelectedOption"),a=In((()=>({})),[]),l=void 0===s.value||null===s.value||1===s.mode&&Array.isArray(s.value)&&0===s.value.length;return Xr.createElement(Gx.Provider,{value:!0},Oy({ourProps:o,theirProps:{...i,children:Xr.createElement(Xr.Fragment,null,r&&l?r:n)},slot:a,defaultTag:Hx,name:"ListboxSelectedOption"}))})),Xx=Object.assign($x,{Button:zx,Label:qx,Options:Kx,Option:Yx,SelectedOption:Qx}),Zx=oe(null);Zx.displayName="GroupContext";let Jx=jt;let tS=Vy((function(t,e){var n;let r=Un(),i=Jy(),o=Sy(),{id:s=i||`headlessui-switch-${r}`,disabled:a=o||!1,checked:l,defaultChecked:u,onChange:c,name:d,value:h,form:p,autoFocus:f=!1,...m}=t,v=Bn(Zx),[g,y]=On(null),_=r_(Dn(null),e,null===v?null:v.setSwitch,y),w=Ny(u),[b,x]=By(l,c,null!=w&&w),S=gy(),[k,E]=On(!1),P=wy((()=>{E(!0),null==x||x(!b),S.nextFrame((()=>{E(!1)}))})),T=wy((t=>{if(e_(t.currentTarget))return t.preventDefault();t.preventDefault(),P()})),A=wy((t=>{t.key===d_.Space?(t.preventDefault(),P()):t.key===d_.Enter&&Hy(t.currentTarget)})),C=wy((t=>t.preventDefault())),R=f_(),O=s_(),{isFocusVisible:M,focusProps:F}=cy({autoFocus:f}),{isHovered:L,hoverProps:D}=uy({isDisabled:a}),{pressed:V,pressProps:I}=by({disabled:a}),j=In((()=>({checked:b,disabled:a,hover:L,focus:M,active:V,autofocus:f,changing:k})),[b,L,M,V,a,k,f]),B=Dy({id:s,ref:_,role:"switch",type:Q_(t,g),tabIndex:-1===t.tabIndex?0:null!=(n=t.tabIndex)?n:0,"aria-checked":b,"aria-labelledby":R,"aria-describedby":O,disabled:a||void 0,autoFocus:f,onClick:T,onKeyUp:A,onKeyPress:C},F,D,I),N=jn((()=>{if(void 0!==w)return null==x?void 0:x(w)}),[x,w]);return Xr.createElement(Xr.Fragment,null,null!=d&&Xr.createElement(Qy,{disabled:a,data:{[d]:h||"on"},overrides:{type:"checkbox",checked:b},form:p,onReset:N}),Oy({ourProps:B,theirProps:m,slot:j,defaultTag:"button",name:"Switch"}))})),eS=function(t){var e;let[n,r]=On(null),[i,o]=m_(),[s,a]=a_(),l=In((()=>({switch:n,setSwitch:r})),[n,r]),u=t;return Xr.createElement(a,{name:"Switch.Description",value:s},Xr.createElement(o,{name:"Switch.Label",value:i,props:{htmlFor:null==(e=l.switch)?void 0:e.id,onClick(t){n&&(t.currentTarget instanceof HTMLLabelElement&&t.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},Xr.createElement(Zx.Provider,{value:l},Oy({ourProps:{},theirProps:u,slot:{},defaultTag:Jx,name:"Switch.Group"}))))},nS=g_,rS=u_,iS=Object.assign(tS,{Group:eS,Label:nS,Description:rS});function oS(t,e){if(void 0===t.inserted[e.name])return t.insert("",e,t.sheet,!0)}function sS(t,e,n){var r=[],i=Ei(t,r,n);return r.length<2?n:i+e(r)}var aS=function t(e){for(var n="",r=0;r<e.length;r++){var i=e[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=t(i);else for(var s in o="",i)i[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},lS=function(t){var e=wn(t);e.sheet.speedy=function(t){this.isSpeedy=t},e.compat=!0;var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ni(n,e.registered,void 0);return Ti(e,i,!1),e.key+"-"+i.name};return{css:n,cx:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return sS(e.registered,n,aS(r))},injectGlobal:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ni(n,e.registered);oS(e,i)},keyframes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ni(n,e.registered),o="animation-"+i.name;return oS(e,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(t){t.forEach((function(t){e.inserted[t]=!0}))},flush:function(){e.registered={},e.inserted={},e.sheet.flush()},sheet:e.sheet,cache:e,getRegisteredStyles:Ei.bind(null,e.registered),merge:sS.bind(null,e.registered,n)}}({key:"css"}),uS=lS.cx,cS=lS.css;const dS=Ms(zx)`
45
+ */new Promise((()=>{}));try{window.__reactRouterVersion="6"}catch(Hy){}const fl=Zr.startTransition;function ml(e){let{basename:t,children:n,future:r,window:i}=e,o=Dn();null==o.current&&(o.current=pa({window:i,v5Compat:!0}));let s=o.current,[a,l]=On({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=jn((e=>{u&&fl?fl((()=>l(e))):l(e)}),[l,u]);return Ln((()=>s.listen(c)),[s,c]),De(dl,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var vl,gl,yl,_l;let wl;(gl=vl||(vl={})).UseScrollRestoration="useScrollRestoration",gl.UseSubmit="useSubmit",gl.UseSubmitFetcher="useSubmitFetcher",gl.UseFetcher="useFetcher",gl.useViewTransitionState="useViewTransitionState",(_l=yl||(yl={})).UseFetcher="useFetcher",_l.UseFetchers="useFetchers",_l.UseScrollRestoration="useScrollRestoration";const bl=()=>{if(wl)return wl;return wl=new rs({defaultOptions:{queries:{retry:(e,t)=>{var n;return t instanceof co&&![401,403].includes((null==(n=t.response)?void 0:n.status)||0)}}}}),wl},xl="getAllPromotions",Sl=/^https:\/\/([A-Za-z]+)-partner/,kl=e=>{switch((e=>{if(e.startsWith("http://localhost"))return"local";const t=e.toLowerCase().match(Sl);return t&&t.length>1?t[1]:"prod"})(e.url)){case"local":case"autodev":case"test":return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/staging/";default:return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/master/"}},El=()=>{const{getAllPromotions:e}=vo(),t=tl(),{isPending:n,error:r,data:i}=Es({queryKey:[xl],queryFn:e}),o=uo(),s=In((()=>{return e=o.backend,((null==(t=i)?void 0:t.data)||[]).map((t=>{var n;return{id:t.id,category:t.category.title,promotionStatus:t.status,contentfulUrl:(null==(n=t.contentfulContent)?void 0:n.contentId)?`${kl(e)}entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,createdAt:t.createdAt,updatedAt:t.updatedAt,edit:"Edit"}})).sort(((e,t)=>new Date(t.updatedAt).valueOf()-new Date(e.updatedAt).valueOf()));var e,t}),[o.backend,i]),a=In((()=>[{name:"Id",field:"id",isSortable:!0},{name:"Category",field:"category",isSortable:!0},{name:"Status",field:"promotionStatus",isSortable:!0,type:{kind:"status",styleOverrides:{Enabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-color":"rgb(22 163 74 / 0.2)"},Disabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-color":"rgb(220 38 38 / 0.2)"}}},filters:[{name:"Enabled",predicate:e=>"Enabled"===e},{name:"Disabled",predicate:e=>"Disabled"===e}]},{name:"Contentful",field:"contentfulUrl",isSortable:!0,sort:e=>e?-1:1,type:{kind:"link"},filters:[{name:"Linked",predicate:e=>!!e},{name:"Unlinked",predicate:e=>!e}]},{name:"Created",field:"createdAt",isSortable:!0,sort:(e,t)=>new Date(t).valueOf()-new Date(e).valueOf(),type:{kind:"date"}},{name:"Updated",field:"updatedAt",isSortable:!0,sort:(e,t)=>new Date(t).valueOf()-new Date(e).valueOf(),type:{kind:"date"}},{name:"Edit",field:"edit",isSortable:!1,type:{kind:"button",onClick:e=>t(`/promotion/${e}`),children:io(oa,{alt:"edit","data-testid":"edit",css:{height:"1.25rem",width:"1.25rem",":hover":{fill:"var(--fl-color-primary-600)"}}})}}]),[t]);switch(!0){case n:return io(ro,{children:"Loading..."});case!!r:return oo(ro,{children:["An error has occurred: ",r.message]});case!!i:return io(la,{columns:a,data:s,title:"Promotions",subtitle:"A list of currently configured promoted benefits",addButtonText:"Add New Promotion",onAdd:()=>t("/promotion"),onClick:e=>t(`/promotion/${e}`)});default:return io(ro,{children:"No data returned from backend"})}};function Pl(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Tl(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const Al=e=>Array.isArray(e);function Cl(e,t){if(!Array.isArray(t))return!1;const 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 Rl(e){return"string"==typeof e||Array.isArray(e)}function Ol(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Fl(e,t,n,r){if("function"==typeof t){const[i,o]=Ol(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=Ol(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function Ml(e,t,n){const r=e.getProps();return Fl(r,t,void 0!==n?n:r.custom,e)}const Ll=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dl=["initial",...Ll],Vl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Il=new Set(Vl),jl=e=>1e3*e,Bl=e=>e/1e3,Nl={type:"spring",stiffness:500,damping:25,restSpeed:10},Ul={type:"keyframes",duration:.8},Gl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Wl=(e,{keyframes:t})=>t.length>2?Ul:Il.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Nl:Gl;function Hl(e,t){return e[t]||e.default||e}const $l=!1,zl=e=>null!==e;function ql(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(zl),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}const Kl=e=>e;const Yl=["read","resolveKeyframes","update","preRender","render","postRender"];function Ql(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Yl.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,i=!1,s=!1)=>{const a=s&&r?t:n;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,r?i=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,l.process(e)))}};return l}(o),e)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:h}=s,p=()=>{const o=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:Yl.reduce(((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(p)),a.schedule(t,o,s)),t}),{}),cancel:e=>{for(let t=0;t<Yl.length;t++)s[Yl[t]].cancel(e)},state:i,steps:s}}const{schedule:Xl,cancel:Zl,state:Jl,steps:eu}=Ql("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Kl,!0),tu=e=>/^0[^.\s]+$/u.test(e);let nu=Kl;const ru=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),iu=e=>t=>"string"==typeof t&&t.startsWith(e),ou=iu("--"),su=iu("var(--"),au=e=>!!su(e)&&lu.test(e.split("/*")[0].trim()),lu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,uu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cu(e,t,n=1){const[r,i]=function(e){const t=uu.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${null!=n?n:r}`,i]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return ru(e)?parseFloat(e):e}return au(i)?cu(i,t,n+1):i}const du=(e,t,n)=>n>t?t:n<e?e:n,hu={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},pu={...hu,transform:e=>du(0,1,e)},fu={...hu,default:1},mu=e=>Math.round(1e5*e)/1e5,vu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,gu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,yu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function _u(e){return"string"==typeof e}const wu=e=>({test:t=>_u(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),bu=wu("deg"),xu=wu("%"),Su=wu("px"),ku=wu("vh"),Eu=wu("vw"),Pu={...xu,parse:e=>xu.parse(e)/100,transform:e=>xu.transform(100*e)},Tu=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Au=e=>e===hu||e===Su,Cu=(e,t)=>parseFloat(e.split(", ")[t]),Ru=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Cu(i[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?Cu(t[1],e):0}},Ou=new Set(["x","y","z"]),Fu=Vl.filter((e=>!Ou.has(e)));const Mu={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:Ru(4,13),y:Ru(5,14)};Mu.translateX=Mu.x,Mu.translateY=Mu.y;const Lu=e=>t=>t.test(e),Du=[hu,Su,xu,bu,Eu,ku,{test:e=>"auto"===e,parse:e=>e}],Vu=e=>Du.find(Lu(e)),Iu=new Set;let ju=!1,Bu=!1;function Nu(){if(Bu){const e=Array.from(Iu).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return Fu.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Bu=!1,ju=!1,Iu.forEach((e=>e.complete())),Iu.clear()}function Uu(){Iu.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Bu=!0)}))}class Gu{constructor(e,t,n,r,i,o=!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=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Iu.add(this),ju||(ju=!0,Xl.read(Uu),Xl.resolveKeyframes(Nu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(null===e[i])if(0===i){const i=null==r?void 0:r.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Iu.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Iu.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Wu=(e,t)=>n=>Boolean(_u(n)&&yu.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Hu=(e,t,n)=>r=>{if(!_u(r))return r;const[i,o,s,a]=r.match(vu);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},$u={...hu,transform:e=>Math.round((e=>du(0,255,e))(e))},zu={test:Wu("rgb","red"),parse:Hu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$u.transform(e)+", "+$u.transform(t)+", "+$u.transform(n)+", "+mu(pu.transform(r))+")"};const qu={test:Wu("#"),parse:function(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}},transform:zu.transform},Ku={test:Wu("hsl","hue"),parse:Hu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xu.transform(mu(t))+", "+xu.transform(mu(n))+", "+mu(pu.transform(r))+")"},Yu={test:e=>zu.test(e)||qu.test(e)||Ku.test(e),parse:e=>zu.test(e)?zu.parse(e):Ku.test(e)?Ku.parse(e):qu.parse(e),transform:e=>_u(e)?e:e.hasOwnProperty("red")?zu.transform(e):Ku.transform(e)};const Qu="number",Xu="color",Zu="var",Ju="var(",ec="${}",tc=/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 nc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(tc,(e=>(Yu.test(e)?(r.color.push(o),i.push(Xu),n.push(Yu.parse(e))):e.startsWith(Ju)?(r.var.push(o),i.push(Zu),n.push(e)):(r.number.push(o),i.push(Qu),n.push(parseFloat(e))),++o,ec))).split(ec);return{values:n,split:s,indexes:r,types:i}}function rc(e){return nc(e).values}function ic(e){const{split:t,types:n}=nc(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){const t=n[o];i+=t===Qu?mu(e[o]):t===Xu?Yu.transform(e[o]):e[o]}return i}}const oc=e=>"number"==typeof e?0:e;const sc={test:function(e){var t,n;return isNaN(e)&&_u(e)&&((null===(t=e.match(vu))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(gu))||void 0===n?void 0:n.length)||0)>0},parse:rc,createTransformer:ic,getAnimatableNone:function(e){const t=rc(e);return ic(e)(t.map(oc))}},ac=new Set(["brightness","contrast","saturate","opacity"]);function lc(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(vu)||[];if(!r)return e;const i=n.replace(r,"");let o=ac.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const uc=/\b([a-z-]*)\(.*?\)/gu,cc={...sc,getAnimatableNone:e=>{const t=e.match(uc);return t?t.map(lc).join(" "):e}},dc={...hu,transform:Math.round},hc={borderWidth:Su,borderTopWidth:Su,borderRightWidth:Su,borderBottomWidth:Su,borderLeftWidth:Su,borderRadius:Su,radius:Su,borderTopLeftRadius:Su,borderTopRightRadius:Su,borderBottomRightRadius:Su,borderBottomLeftRadius:Su,width:Su,maxWidth:Su,height:Su,maxHeight:Su,size:Su,top:Su,right:Su,bottom:Su,left:Su,padding:Su,paddingTop:Su,paddingRight:Su,paddingBottom:Su,paddingLeft:Su,margin:Su,marginTop:Su,marginRight:Su,marginBottom:Su,marginLeft:Su,rotate:bu,rotateX:bu,rotateY:bu,rotateZ:bu,scale:fu,scaleX:fu,scaleY:fu,scaleZ:fu,skew:bu,skewX:bu,skewY:bu,distance:Su,translateX:Su,translateY:Su,translateZ:Su,x:Su,y:Su,z:Su,perspective:Su,transformPerspective:Su,opacity:pu,originX:Pu,originY:Pu,originZ:Su,zIndex:dc,backgroundPositionX:Su,backgroundPositionY:Su,fillOpacity:pu,strokeOpacity:pu,numOctaves:dc},pc={...hc,color:Yu,backgroundColor:Yu,outlineColor:Yu,fill:Yu,stroke:Yu,borderColor:Yu,borderTopColor:Yu,borderRightColor:Yu,borderBottomColor:Yu,borderLeftColor:Yu,filter:cc,WebkitFilter:cc},fc=e=>pc[e];function mc(e,t){let n=fc(e);return n!==cc&&(n=sc),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vc=new Set(["auto","none","0"]);class gc extends Gu{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),au(n))){const r=cu(n,t.current);void 0!==r&&(e[a]=r),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Tu.has(n)||2!==e.length)return;const[r,i]=e,o=Vu(r),s=Vu(i);if(o!==s)if(Au(o)&&Au(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let i=0;i<e.length;i++)("number"==typeof(r=e[i])?0===r:null===r||"none"===r||"0"===r||tu(r))&&n.push(i);var r;n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!vc.has(t)&&nc(t).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=mc(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mu[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Mu[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function yc(e){let t;return()=>(void 0===t&&(t=e()),t)}let _c;function wc(){_c=void 0}const bc={now:()=>(void 0===_c&&bc.set(Jl.isProcessing||$l?Jl.timestamp:performance.now()),_c),set:e=>{_c=e,queueMicrotask(wc)}},xc=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!sc.test(e)&&"0"!==e||e.startsWith("url(")));class Sc{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=bc.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Uu(),Nu()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=bc.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=xc(i,t),a=xc(o,t);return!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,i)){if(!o)return null==a||a(ql(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(e,t);!1!==u&&(this._resolved={keyframes:e,finalKeyframe:t,...u},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function kc(e,t){return t?e*(1e3/t):0}const Ec=5;function Pc(e,t,n){const r=Math.max(t-Ec,0);return kc(n-e(r),t-r)}const Tc=.001,Ac=.01,Cc=10,Rc=.05,Oc=1;function Fc({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,s=1-t;s=du(Rc,Oc,s),e=du(Ac,Cc,Bl(e)),s<1?(i=t=>{const r=t*s,i=r*e,o=r-n,a=Lc(t,s),l=Math.exp(-i);return Tc-o/a*l},o=t=>{const r=t*s*e,o=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Lc(Math.pow(t,2),s);return(-i(t)+Tc>0?-1:1)*((o-a)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-Tc,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let i=1;i<Mc;i++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=jl(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const Mc=12;function Lc(e,t){return e*Math.sqrt(1-t*t)}const Dc=["duration","bounce"],Vc=["stiffness","damping","mass"];function Ic(e,t){return t.some((t=>void 0!==e[t]))}function jc({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Ic(e,Vc)&&Ic(e,Dc)){const n=Fc(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-Bl(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(a*u)),m=o-i,v=Bl(Math.sqrt(a/u)),g=Math.abs(m)<5;let y;if(n||(n=g?.01:2),t||(t=g?.005:.5),f<1){const e=Lc(v,f);y=t=>{const n=Math.exp(-f*v*t);return o-n*((p+f*v*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===f)y=e=>o-Math.exp(-v*e)*(m+(p+v*m)*e);else{const e=v*Math.sqrt(f*f-1);y=t=>{const n=Math.exp(-f*v*t),r=Math.min(e*t,300);return o-n*((p+f*v*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:h&&c||null,next:e=>{const r=y(e);if(h)s.done=e>=c;else{let i=0;f<1&&(i=0===e?jl(p):Pc(y,e,r));const a=Math.abs(i)<=n,l=Math.abs(o-r)<=t;s.done=a&&l}return s.value=s.done?o:r,s}}}function Bc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let f=n*t;const m=d+f,v=void 0===s?m:s(m);v!==m&&(f=v-d);const g=e=>-f*Math.exp(-e/r),y=e=>v+g(e),_=e=>{const t=g(e),n=y(e);h.done=Math.abs(t)<=u,h.value=h.done?v:n};let w,b;const x=e=>{var t;(t=h.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(w=e,b=jc({keyframes:[h.value,p(h.value)],velocity:Pc(y,e,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return b||void 0!==w||(t=!0,_(e),x(e)),void 0!==w&&e>=w?b.next(e-w):(!t&&_(e),h)}}}const Nc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Uc=1e-7,Gc=12;function Wc(e,t,n,r){if(e===t&&n===r)return Kl;const i=t=>function(e,t,n,r,i){let o,s,a=0;do{s=t+(n-t)/2,o=Nc(s,r,i)-e,o>0?n=s:t=s}while(Math.abs(o)>Uc&&++a<Gc);return s}(t,0,1,e,n);return e=>0===e||1===e?e:Nc(i(e),t,r)}const Hc=Wc(.42,0,1,1),$c=Wc(0,0,.58,1),zc=Wc(.42,0,.58,1),qc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Kc=e=>t=>1-e(1-t),Yc=e=>1-Math.sin(Math.acos(e)),Qc=Kc(Yc),Xc=qc(Yc),Zc=Wc(.33,1.53,.69,.99),Jc=Kc(Zc),ed={linear:Kl,easeIn:Hc,easeInOut:zc,easeOut:$c,circIn:Yc,circInOut:Xc,circOut:Qc,backIn:Jc,backInOut:qc(Jc),backOut:Zc,anticipate:e=>(e*=2)<1?.5*Jc(e):.5*(2-Math.pow(2,-10*(e-1)))},td=e=>{if(Array.isArray(e)){nu(4===e.length);const[t,n,r,i]=e;return Wc(t,n,r,i)}return"string"==typeof e?(nu(void 0!==ed[e]),ed[e]):e},nd=(e,t)=>n=>t(e(n)),rd=(...e)=>e.reduce(nd),id=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},od=(e,t,n)=>e+(t-e)*n;function sd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ad(e,t){return n=>n>0?t:e}const ld=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ud=[qu,zu,Ku];function cd(e){const t=(n=e,ud.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Ku&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=sd(a,r,e+1/3),o=sd(a,r,e),s=sd(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(r)),r}const dd=(e,t)=>{const n=cd(e),r=cd(t);if(!n||!r)return ad(e,t);const i={...n};return e=>(i.red=ld(n.red,r.red,e),i.green=ld(n.green,r.green,e),i.blue=ld(n.blue,r.blue,e),i.alpha=od(n.alpha,r.alpha,e),zu.transform(i))},hd=new Set(["none","hidden"]);function pd(e,t){return n=>od(e,t,n)}function fd(e){return"number"==typeof e?pd:"string"==typeof e?au(e)?ad:Yu.test(e)?dd:gd:Array.isArray(e)?md:"object"==typeof e?Yu.test(e)?dd:vd:ad}function md(e,t){const n=[...e],r=n.length,i=e.map(((e,n)=>fd(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function vd(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=fd(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const gd=(e,t)=>{const n=sc.createTransformer(t),r=nc(e),i=nc(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?hd.has(e)&&!i.values.length||hd.has(t)&&!r.values.length?function(e,t){return hd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):rd(md(function(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][i[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[o]=l,i[s]++}return r}(r,i),i.values),n):ad(e,t)};function yd(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return od(e,t,n);return fd(e)(e,t)}function _d(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(nu(o===t.length),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||yd,o=e.length-1;for(let s=0;s<o;s++){let n=i(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||Kl:t;n=rd(e,n)}r.push(n)}return r}(t,r,i),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=id(e[n],e[n+1],t);return s[n](r)};return n?t=>l(du(e[0],e[o-1],t)):l}function wd(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=id(0,t,r);e.push(od(n,1,i))}}(t,e.length-1),t}function bd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(td):td(r),o={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:wd(t),e),a=_d(s,t,{ease:Array.isArray(i)?i:(l=t,u=i,l.map((()=>u||zc)).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}const xd=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Xl.update(t,!0),stop:()=>Zl(t),now:()=>Jl.isProcessing?Jl.timestamp:bc.now()}},Sd={decay:Bc,inertia:Bc,tween:bd,keyframes:bd,spring:jc},kd=e=>e/100;class Ed extends Sc{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,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||Gu;this.resolver=new o(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=this.options,s=Sd[t]||bd;let a,l;s!==bd&&"number"!=typeof e[0]&&(a=rd(kd,yd(e[0],e[1])),e=[0,100]);const u=s({...this.options,keyframes:e});"mirror"===i&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=function(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}(u));const{calculatedDuration:c}=u,d=c+r;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,_=i;if(h){const e=Math.min(this.currentTime,u)/c;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1);Boolean(t%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(_=o)),y=du(0,1,n)*c}const w=g?{done:!1,value:a[0]}:_.next(y);s&&(w.value=s(w.value));let{done:b}=w;g||null===l||(b=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return x&&void 0!==r&&(w.value=ql(a,this.options,r)),m&&m(w.value),x&&this.finish(),w}get duration(){const{resolved:e}=this;return e?Bl(e.calculatedDuration):0}get time(){return Bl(this.currentTime)}set time(e){e=jl(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Bl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=xd,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&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(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Pd=new Set(["opacity","clipPath","filter","transform"]),Td=e=>Array.isArray(e)&&"number"==typeof e[0];function Ad(e){return Boolean(!e||"string"==typeof e&&e in Rd||Td(e)||Array.isArray(e)&&e.every(Ad))}const Cd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Rd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cd([0,.65,.55,1]),circOut:Cd([.55,0,1,.45]),backIn:Cd([.31,.01,.66,-.59]),backOut:Cd([.33,1.53,.69,.99])};function Od(e){return Fd(e)||Rd.easeOut}function Fd(e){return e?Td(e)?Cd(e):Array.isArray(e)?e.map(Od):Rd[e]:void 0}const Md=yc((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class Ld extends Sc{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new gc(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:i,ease:o,type:s,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(c=this.options).type||!Ad(c.ease)){const{onComplete:t,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(e,t){const n=new Ed({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<2e4;)r=n.sample(o),i.push(r.value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(e,u);1===(e=c.keyframes).length&&(e[1]=e[0]),r=c.duration,i=c.times,o=c.ease,s="keyframes"}var c;const d=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Fd(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,e,{...this.options,duration:r,times:i,ease:o});return d.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:n}=this.options;a.set(ql(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:s,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Bl(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Bl(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=jl(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Kl;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Kl}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:i,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...u}=this.options,c=new Ed({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),d=jl(this.time);e.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;return Md()&&n&&Pd.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}}const Dd=yc((()=>void 0!==window.ScrollTimeline));class Vd{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}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){const t=this.animations.map((t=>{if(!Dd()||!t.attachTimeline)return t.pause(),function(e,t){let n;const r=()=>{const{currentTime:r}=t,i=(null===r?0:r.value)/100;n!==i&&e(i),n=i};return Xl.update(r,!0),()=>Zl(r)}((e=>{t.time=t.duration*e}),e);t.attachTimeline(e)}));return()=>{t.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]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Id=(e,t,n,r={},i,o,s)=>a=>{const l=Hl(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c-=jl(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:o?void 0:i};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(d={...d,...Wl(e,d)}),d.duration&&(d.duration=jl(d.duration)),d.repeatDelay&&(d.repeatDelay=jl(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(h=!0)),h&&!o&&void 0!==t.get()){const e=ql(d.keyframes,l);if(void 0!==e)return Xl.update((()=>{d.onUpdate(e),d.onComplete()})),new Vd([])}return!o&&Ld.supports(d)?new Ld(d):new Ed(d)},jd=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Bd=e=>Al(e)?e[e.length-1]||0:e;function Nd(e,t){-1===e.indexOf(t)&&e.push(t)}function Ud(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Gd{constructor(){this.subscriptions=[]}add(e){return Nd(this.subscriptions,e),()=>Ud(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Wd{constructor(e,t={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=bc.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){var t;this.current=e,this.updatedAt=bc.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}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 Gd);const n=this.events[e].add(t);return"change"===e?()=>{n(),Xl.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const 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.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}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 this.current}getPrevious(){return this.prev}getVelocity(){const e=bc.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return kc(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 Hd(e,t){return new Wd(e,t)}function $d(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hd(n))}const zd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),qd="data-"+zd("framerAppearId");function Kd(e){return e.props[qd]}function Yd(e){return Il.has(e)?"transform":Pd.has(e)?zd(e):void 0}class Qd extends Wd{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const t=Yd(e);if(!t)return;const n=this.counts.get(t)||0;this.counts.set(t,n+1),0===n&&(this.output.push(t),this.update());let r=!1;return()=>{if(r)return;r=!0;const e=this.counts.get(t)-1;this.counts.set(t,e),0===e&&(Ud(this.output,t),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const Xd=e=>Boolean(e&&e.getVelocity);function Zd(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");return r||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(r=new Qd("auto"),e.addValue("willChange",r)),i=r,Boolean(Xd(i)&&i.add)?r.add(t):void 0;var i}function Jd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function eh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const t=e.getValue(d,null!==(o=e.latestValues[d])&&void 0!==o?o:null),r=l[d];if(void 0===r||c&&Jd(c,d))continue;const i={delay:n,...Hl(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const t=Kd(e);if(t){const e=window.MotionHandoffAnimation(t,d,Xl);null!==e&&(i.startTime=e,a=!0)}}t.start(Id(d,t,r,e.shouldReduceMotion&&Il.has(d)?{type:!1}:i,e,a,Zd(e,d)));const h=t.animation;h&&u.push(h)}return a&&Promise.all(u).then((()=>{Xl.update((()=>{a&&function(e,t){const n=Ml(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o)$d(e,s,Bd(o[s]))}(e,a)}))})),u}function th(e,t,n={}){var r;const i=Ml(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(eh(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(nh).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(th(e,t,{...o,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function nh(e,t){return e.sortNodePosition(t)}const rh=[...Ll].reverse(),ih=Ll.length;function oh(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map((t=>th(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=th(e,t,n);else{const i="function"==typeof t?Ml(e,t,n.custom):t;r=Promise.all(eh(e,i,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function sh(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Cl(t,e)}function ah(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function lh(){return{animate:ah(!0),whileInView:ah(),whileHover:ah(),whileTap:ah(),whileDrag:ah(),whileFocus:ah(),exit:ah()}}class uh{constructor(e){this.isMounted=!1,this.node=e}update(){}}let ch=0;const dh={animation:{Feature:class extends uh{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=oh(e),n=lh(),r=!0;const i=t=>(n,r)=>{var i;const o=Ml(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function o(o){const s=e.getProps(),a=e.getVariantContext(!0)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<ih;t++){const h=rh[t],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=Rl(f),v=h===o?p.isActive:null;!1===v&&(d=t);let g=f===a[h]&&f!==s[h]&&m;if(g&&r&&e.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===v||!f&&!p.prevProp||Tl(f)||"boolean"==typeof f)continue;let y=sh(p.prevProp,f)||h===o&&p.isActive&&!g&&m||t>d&&m,_=!1;const w=Array.isArray(f)?f:[f];let b=w.reduce(i(h),{});!1===v&&(b={});const{prevResolvedValues:x={}}=p,S={...x,...b},k=t=>{y=!0,u.has(t)&&(_=!0,u.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=b[e],n=x[e];if(c.hasOwnProperty(e))continue;let r=!1;r=Al(t)&&Al(n)?!Cl(t,n):t!==n,r?null!=t?k(e):u.add(e):void 0!==t&&u.has(e)?k(e):p.protectedKeys[e]=!0}p.prevProp=f,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),r&&e.blockInitialAnimation&&(y=!1),!y||g&&!_||l.push(...w.map((e=>({animation:e,options:{type:h}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=lh(),r=!0}}}(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Tl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends uh{constructor(){super(...arguments),this.id=ch++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},hh=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function ph(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const fh=e=>t=>hh(t)&&e(t,ph(t));function mh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function vh(e,t,n,r){return mh(e,t,fh(n),r)}const gh=(e,t)=>Math.abs(e-t);class yh{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;const e=bh(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=gh(e.x,t.x),r=gh(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=Jl;this.history.push({...r,timestamp:i});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=_h(t,this.transformPagePoint),Xl.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=bh("pointercancel"===e.type?this.lastMoveEventInfo:_h(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!hh(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const o=_h(ph(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=Jl;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,bh(o,this.history)),this.removeListeners=rd(vh(this.contextWindow,"pointermove",this.handlePointerMove),vh(this.contextWindow,"pointerup",this.handlePointerUp),vh(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Zl(this.updatePoint)}}function _h(e,t){return t?{point:t(e.point)}:e}function wh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bh({point:e},t){return{point:e,delta:wh(e,Sh(t)),offset:wh(e,xh(t)),velocity:kh(t,.1)}}function xh(e){return e[0]}function Sh(e){return e[e.length-1]}function kh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Sh(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>jl(t)));)n--;if(!r)return{x:0,y:0};const o=Bl(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Eh(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const Ph=Eh("dragHorizontal"),Th=Eh("dragVertical");function Ah(e){let t=!1;if("y"===e)t=Th();else if("x"===e)t=Ph();else{const e=Ph(),n=Th();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Ch(){const e=Ah(!0);return!e||(e(),!1)}function Rh(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const Oh=.9999,Fh=1.0001,Mh=-.01,Lh=.01;function Dh(e){return e.max-e.min}function Vh(e,t,n,r=.5){e.origin=r,e.originPoint=od(t.min,t.max,e.origin),e.scale=Dh(n)/Dh(t),e.translate=od(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Oh&&e.scale<=Fh||isNaN(e.scale))&&(e.scale=1),(e.translate>=Mh&&e.translate<=Lh||isNaN(e.translate))&&(e.translate=0)}function Ih(e,t,n,r){Vh(e.x,t.x,n.x,r?r.originX:void 0),Vh(e.y,t.y,n.y,r?r.originY:void 0)}function jh(e,t,n){e.min=n.min+t.min,e.max=e.min+Dh(t)}function Bh(e,t,n){e.min=t.min-n.min,e.max=e.min+Dh(t)}function Nh(e,t,n){Bh(e.x,t.x,n.x),Bh(e.y,t.y,n.y)}function Uh(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Gh(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}}const Wh=.35;function Hh(e,t,n){return{min:$h(e,t),max:$h(e,n)}}function $h(e,t){return"number"==typeof e?e:e[t]||0}const zh=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),qh=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Kh(e){return[e("x"),e("y")]}function Yh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Qh(e){return void 0===e||1===e}function Xh({scale:e,scaleX:t,scaleY:n}){return!Qh(e)||!Qh(t)||!Qh(n)}function Zh(e){return Xh(e)||Jh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Jh(e){return ep(e.x)||ep(e.y)}function ep(e){return e&&"0%"!==e}function tp(e,t,n){return n+t*(e-n)}function np(e,t,n,r,i){return void 0!==i&&(e=tp(e,i,r)),tp(e,n,r)+t}function rp(e,t=0,n=1,r,i){e.min=np(e.min,t,n,r,i),e.max=np(e.max,t,n,r,i)}function ip(e,{x:t,y:n}){rp(e.x,t.translate,t.scale,t.originPoint),rp(e.y,n.translate,n.scale,n.originPoint)}const op=.999999999999,sp=1.0000000000001;function ap(e,t){e.min=e.min+t,e.max=e.max+t}function lp(e,t,n,r,i=.5){rp(e,t,n,od(e.min,e.max,i),r)}function up(e,t){lp(e.x,t.x,t.scaleX,t.scale,t.originX),lp(e.y,t.y,t.scaleY,t.scale,t.originY)}function cp(e,t){return Yh(function(e,t){if(!t)return e;const 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}}(e.getBoundingClientRect(),t))}const dp=({current:e})=>e?e.ownerDocument.defaultView:null,hp=new WeakMap;class pp{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=qh(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new yh(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(ph(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();if(r&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ah(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Kh((e=>{let t=this.getAxisMotionValue(e).get()||0;if(xu.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Dh(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Xl.postRender((()=>o(e,t))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=Zd(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>Kh((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:dp(this.visualElement)})}stop(e,t){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Xl.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!fp(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?od(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?od(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&Rh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Uh(e.x,n,i),y:Uh(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Wh){return!1===e?e=0:!0===e&&(e=Wh),{x:Hh(e,"left","right"),y:Hh(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Kh((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Rh(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=cp(e,n),{scroll:i}=t;return i&&(ap(r.x,i.offset.x),ap(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Gh(e.x,t.x),y:Gh(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=Yh(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Kh((s=>{if(!fp(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(Id(e,n,0,t,this.visualElement,!1,Zd(this.visualElement,e)))}stopAnimation(){Kh((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){Kh((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Kh((t=>{const{drag:n}=this.getProps();if(!fp(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-od(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Rh(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Kh((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Dh(e),i=Dh(t);return i>r?n=id(t.min,t.max-r,e.min):r>i&&(n=id(e.min,e.max-i,t.min)),du(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Kh((t=>{if(!fp(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(od(i,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;hp.set(this.visualElement,this);const e=vh(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Rh(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Xl.read(t);const i=mh(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Kh((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Wh,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function fp(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const mp=e=>(t,n)=>{e&&Xl.postRender((()=>e(t,n)))};const vp=ot(null);const gp=ot({}),yp=ot({}),_p={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wp(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const bp={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Su.test(e))return e;e=parseFloat(e)}return`${wp(e,t.target.x)}% ${wp(e,t.target.y)}%`}},xp={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=sc.parse(e);if(i.length>5)return r;const o=sc.createTransformer(e),s="number"!=typeof i[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=od(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}},Sp={};const{schedule:kp,cancel:Ep}=Ql(queueMicrotask,!1);class Pp extends Be{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;var o;o=Ap,Object.assign(Sp,o),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()})),_p.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Xl.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),kp.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{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(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Tp(e){const[t,n]=function(){const e=Bn(vp);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=Un();Mn((()=>r(i)),[]);const o=jn((()=>n&&n(i)),[i,n]);return!t&&n?[!1,o]:[!0]}(),r=Bn(gp);return no(Pp,{...e,layoutGroup:r,switchLayoutGroup:Bn(yp),isPresent:t,safeToRemove:n})}const Ap={borderRadius:{...bp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bp,borderTopRightRadius:bp,borderBottomLeftRadius:bp,borderBottomRightRadius:bp,boxShadow:xp},Cp=["TopLeft","TopRight","BottomLeft","BottomRight"],Rp=Cp.length,Op=e=>"string"==typeof e?parseFloat(e):e,Fp=e=>"number"==typeof e||Su.test(e);function Mp(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Lp=Vp(0,.5,Qc),Dp=Vp(.5,.95,Kl);function Vp(e,t,n){return r=>r<e?0:r>t?1:n(id(e,t,r))}function Ip(e,t){e.min=t.min,e.max=t.max}function jp(e,t){Ip(e.x,t.x),Ip(e.y,t.y)}function Bp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Np(e,t,n,r,i){return e=tp(e-=t,1/n,r),void 0!==i&&(e=tp(e,1/i,r)),e}function Up(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){xu.test(t)&&(t=parseFloat(t),t=od(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=od(o.min,o.max,r);e===o&&(a-=t),e.min=Np(e.min,t,n,a,i),e.max=Np(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}const Gp=["x","scaleX","originX"],Wp=["y","scaleY","originY"];function Hp(e,t,n,r){Up(e.x,t,Gp,n?n.x:void 0,r?r.x:void 0),Up(e.y,t,Wp,n?n.y:void 0,r?r.y:void 0)}function $p(e){return 0===e.translate&&1===e.scale}function zp(e){return $p(e.x)&&$p(e.y)}function qp(e,t){return e.min===t.min&&e.max===t.max}function Kp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Yp(e,t){return Kp(e.x,t.x)&&Kp(e.y,t.y)}function Qp(e){return Dh(e.x)/Dh(e.y)}function Xp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Zp{constructor(){this.members=[]}add(e){Nd(this.members,e),e.scheduleRender()}remove(e){if(Ud(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const 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);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{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)}}const Jp=(e,t)=>e.depth-t.depth;class ef{constructor(){this.children=[],this.isDirty=!1}add(e){Nd(this.children,e),this.isDirty=!0}remove(e){Ud(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Jp),this.isDirty=!1,this.children.forEach(e)}}function tf(e){const t=Xd(e)?e.get():e;return jd(t)?t.toValue():t}const nf={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},rf="undefined"!=typeof window&&void 0!==window.MotionDebug,of=["","X","Y","Z"],sf={visibility:"hidden"};let af=0;function lf(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function uf(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Kd(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xl,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&uf(r)}function cf({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=af++,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,rf&&(nf.totalNodes=nf.resolvedTargetDeltas=nf.recalculatedProjection=0),this.nodes.forEach(pf),this.nodes.forEach(wf),this.nodes.forEach(bf),this.nodes.forEach(ff),rf&&window.MotionDebug.record(nf)},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 t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ef)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Gd),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const 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;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:i,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=bc.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zl(r),e(o-t))};return Xl.read(r,!0),()=>Zl(r)}(r,250),_p.hasAnimatedSinceResize&&(_p.hasAnimatedSinceResize=!1,this.nodes.forEach(_f))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||Tf,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Yp(this.targetLayout,r)||n,u=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,u);const t={...Hl(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||_f(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Zl(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(xf),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&uf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(vf);this.isUpdating||this.nodes.forEach(gf),this.isUpdating=!1,this.nodes.forEach(yf),this.nodes.forEach(df),this.nodes.forEach(hf),this.clearAllSnapshots();const e=bc.now();Jl.delta=du(0,1e3/60,e-Jl.timestamp),Jl.timestamp=e,Jl.isProcessing=!0,eu.update.process(Jl),eu.preRender.process(Jl),eu.render.process(Jl),Jl.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mf),this.sharedNodes.forEach(Sf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xl.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xl.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=qh(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const 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;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!zp(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||Zh(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Rf((r=n).x),Rf(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return qh();const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(Ff))){const{scroll:e}=this.root;e&&(ap(n.x,e.offset.x),ap(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=qh();if(jp(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:i,options:o}=t;t!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&jp(n,e),ap(n.x,i.offset.x),ap(n.y,i.offset.y))}return n}applyTransform(e,t=!1){const n=qh();jp(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&up(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Zh(e.latestValues)&&up(n,e.latestValues)}return Zh(this.latestValues)&&up(n,this.latestValues),n}removeTransform(e){const t=qh();jp(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Zh(e.latestValues))continue;Xh(e.latestValues)&&e.updateSnapshot();const r=qh();jp(r,e.measurePageBox()),Hp(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Zh(this.latestValues)&&Hp(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||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!==Jl.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=Jl.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qh(),this.relativeTargetOrigin=qh(),Nh(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),jp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=qh(),this.targetWithTransforms=qh()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,jh(s.x,a.x,l.x),jh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):jp(this.target,this.layout.layoutBox),ip(this.target,this.targetDelta)):jp(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qh(),this.relativeTargetOrigin=qh(),Nh(this.relativeTargetOrigin,this.target,e.target),jp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}rf&&nf.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Xh(this.parent.latestValues)&&!Jh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Jl.timestamp&&(r=!1),r)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;jp(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let o,s;t.x=t.y=1;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&up(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,ip(e,s)),r&&Zh(o.latestValues)&&up(e,o.latestValues))}t.x<sp&&t.x>op&&(t.x=1),t.y<sp&&t.y>op&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=qh());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Bp(this.prevProjectionDelta.x,this.projectionDelta.x),Bp(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ih(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&Xp(this.projectionDelta.x,this.prevProjectionDelta.x)&&Xp(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),rf&&nf.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zh(),this.projectionDelta=zh(),this.projectionDeltaWithTransform=zh()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=zh();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=qh(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(Pf));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,p,f,m,v;kf(o.x,e.x,n),kf(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nh(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,m=s,v=n,Ef(p.x,f.x,m.x,v),Ef(p.y,f.y,m.y,v),d&&(l=this.relativeTarget,h=d,qp(l.x,h.x)&&qp(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d=qh()),jp(d,this.relativeTarget)),a&&(this.animationValues=i,function(e,t,n,r,i,o){i?(e.opacity=od(0,void 0!==n.opacity?n.opacity:1,Lp(r)),e.opacityExit=od(void 0!==t.opacity?t.opacity:1,0,Dp(r))):o&&(e.opacity=od(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<Rp;s++){const i=`border${Cp[s]}Radius`;let o=Mp(t,i),a=Mp(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Fp(o)===Fp(a)?(e[i]=Math.max(od(Op(o),Op(a),r),0),(xu.test(a)||xu.test(o))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=od(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,u)),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&&(Zl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xl.update((()=>{_p.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Xd(e)?e:Hd(e);return r.start(Id("",r,t,n)),r.animation}(0,1e3,{...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);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Of(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||qh();const t=Dh(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Dh(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}jp(t,n),up(t,i),Ih(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Zp);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&lf("z",e,r,this.animationValues);for(let i=0;i<of.length;i++)lf(`rotate${of[i]}`,e,r,this.animationValues),lf(`skew${of[i]}`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return sf;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=tf(null==e?void 0:e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=tf(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Zh(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),i&&(r.transform=i(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?r.opacity=o===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const u in Sp){if(void 0===s[u])continue;const{correct:e,applyTo:t}=Sp[u],n="none"===r.transform?s[u]:e(s[u],o);if(t){const e=t.length;for(let i=0;i<e;i++)r[t[i]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=o===this?tf(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(vf),this.root.sharedNodes.clear()}}}function df(e){e.updateLayout()}function hf(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?Kh((e=>{const r=o?n.measuredBox[e]:n.layoutBox[e],i=Dh(r);r.min=t[e].min,r.max=r.min+i})):Of(i,n.layoutBox,t)&&Kh((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=Dh(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=zh();Ih(s,t,n.layoutBox);const a=zh();o?Ih(a,e.applyTransform(r,!0),n.measuredBox):Ih(a,t,n.layoutBox);const l=!zp(s);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s=qh();Nh(s,n.layoutBox,i.layoutBox);const a=qh();Nh(a,t,o.layoutBox),Yp(s,a)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function pf(e){rf&&nf.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ff(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function mf(e){e.clearSnapshot()}function vf(e){e.clearMeasurements()}function gf(e){e.isLayoutDirty=!1}function yf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _f(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wf(e){e.resolveTargetDelta()}function bf(e){e.calcProjection()}function xf(e){e.resetSkewAndRotation()}function Sf(e){e.removeLeadSnapshot()}function kf(e,t,n){e.translate=od(t.translate,0,n),e.scale=od(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ef(e,t,n,r){e.min=od(t.min,n.min,r),e.max=od(t.max,n.max,r)}function Pf(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Tf={duration:.45,ease:[.4,0,.1,1]},Af=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Cf=Af("applewebkit/")&&!Af("chrome/")?Math.round:Kl;function Rf(e){e.min=Cf(e.min),e.max=Cf(e.max)}function Of(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Qp(t),i=Qp(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function Ff(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Mf=cf({attachResizeListener:(e,t)=>mh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Lf={current:void 0},Df=cf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Lf.current){const e=new Mf({});e.mount(window),e.setOptions({layoutScroll:!0}),Lf.current=e}return Lf.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Vf={pan:{Feature:class extends uh{constructor(){super(...arguments),this.removePointerDownListener=Kl}onPointerDown(e){this.session=new yh(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dp(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:mp(e),onStart:mp(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Xl.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=vh(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends uh{constructor(e){super(e),this.removeGroupControls=Kl,this.removeListeners=Kl,this.controls=new pp(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kl}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Df,MeasureLayout:Tp}};function If(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return vh(e.current,n,((n,i)=>{if("touch"===n.pointerType||Ch())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const s=o[r];s&&Xl.postRender((()=>s(n,i)))}),{passive:!e.getProps()[r]})}const jf=(e,t)=>!!t&&(e===t||jf(e,t.parentElement));function Bf(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ph(n))}const Nf=new WeakMap,Uf=new WeakMap,Gf=e=>{const t=Nf.get(e.target);t&&t(e)},Wf=e=>{e.forEach(Gf)};function Hf(e,t,n){const r=function({root:e,...t}){const n=e||document;Uf.has(n)||Uf.set(n,{});const r=Uf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Wf,{root:e,...t})),r[i]}(t);return Nf.set(e,n),r.observe(e),()=>{Nf.delete(e),r.unobserve(e)}}const $f={some:0,all:1};const zf={inView:{Feature:class extends uh{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:$f[r]};return Hf(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends uh{constructor(){super(...arguments),this.removeStartListeners=Kl,this.removeEndListeners=Kl,this.removeAccessibleListeners=Kl,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=vh(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||jf(this.node.current,e.target)?n:r;o&&Xl.update((()=>o(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),i=vh(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=rd(r,i),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=mh(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=mh(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&Bf("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Xl.postRender((()=>n(e,t)))}))})),Bf("down",((e,t)=>{this.startPress(e,t)}))})),t=mh(this.node.current,"blur",(()=>{this.isPressing&&Bf("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=rd(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Xl.postRender((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ch()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Xl.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=vh(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=mh(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=rd(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends uh{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(Hy){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=rd(mh(this.node.current,"focus",(()=>this.onFocus())),mh(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends uh{mount(){this.unmount=rd(If(this.node,!0),If(this.node,!1))}unmount(){}}}},qf={layout:{ProjectionNode:Df,MeasureLayout:Tp}},Kf=ot({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Yf=ot({}),Qf="undefined"!=typeof window,Xf=Qf?Ln:Mn,Zf=ot({strict:!1});let Jf=!1;function em(e,t,n,r,i){var o;const{visualElement:s}=Bn(Yf),a=Bn(Zf),l=Bn(vp),u=Bn(Kf).reducedMotion,c=Dn();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const d=c.current,h=Bn(yp);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:nm(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Rh(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(c.current,n,i,h),qr((()=>{d&&d.update(n,l)}));const p=n[qd],f=Dn(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return Xf((()=>{d&&(d.updateFeatures(),kp.render(d.render),f.current&&d.animationState&&d.animationState.animateChanges())})),Mn((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current=!1,Jf||(Jf=!0,queueMicrotask(tm)))})),d}function tm(){window.MotionHandoffIsComplete=!0}function nm(e){if(e)return!1!==e.options.allowProjection?e.projection:nm(e.parent)}function rm(e,t,n){return jn((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Rh(n)&&(n.current=r))}),[t])}function im(e){return Tl(e.animate)||Dl.some((t=>Rl(e[t])))}function om(e){return Boolean(im(e)||e.variants)}function sm(e){const{initial:t,animate:n}=function(e,t){if(im(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Rl(t)?t:void 0,animate:Rl(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,Bn(Yf));return In((()=>({initial:t,animate:n})),[am(t),am(n)])}function am(e){return Array.isArray(e)?e.join(" "):e}const lm={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"]},um={};for(const BS in lm)um[BS]={isEnabled:e=>lm[BS].some((t=>!!e[t]))};const cm=Symbol.for("motionComponentSymbol");function dm({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&function(e){for(const t in e)um[t]={...um[t],...e[t]}}(e);const o=tr((function(e,o){let s;const a={...Bn(Kf),...e,layoutId:hm(e)},{isStatic:l}=a,u=sm(e),c=r(e,l);if(!l&&Qf){Bn(Zf).strict;const e=function(e){const{drag:t,layout:n}=um;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(a);s=e.MeasureLayout,u.visualElement=em(i,c,a,t,e.ProjectionNode)}return no(Yf.Provider,{value:u,children:[s&&u.visualElement?no(s,{visualElement:u.visualElement,...a}):null,n(i,e,rm(c,u.visualElement,o),c,l,u.visualElement)]})}));return o[cm]=i,o}function hm({layoutId:e}){const t=Bn(gp).id;return t&&void 0!==e?t+"-"+e:e}const pm=["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 fm(e){return"string"==typeof e&&!e.includes("-")&&!!(pm.indexOf(e)>-1||/[A-Z]/u.test(e))}function mm(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const vm=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 gm(e,t,n,r){mm(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(vm.has(i)?i:zd(i),t.attrs[i])}function ym(e,{layout:t,layoutId:n}){return Il.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Sp[e]||"opacity"===e)}function _m(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(Xd(i[s])||t.style&&Xd(t.style[s])||ym(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(o[s]=i[s]);return n&&i&&"string"==typeof i.willChange&&(n.applyWillChange=!1),o}function wm(e,t,n){const r=_m(e,t,n);for(const i in e)if(Xd(e[i])||Xd(t[i])){r[-1!==Vl.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}function bm(e){const t=Dn(null);return null===t.current&&(t.current=e()),t.current}const xm=e=>(t,n)=>{const r=Bn(Yf),i=Bn(vp),o=()=>function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,s,a){const l={latestValues:Em(i,o,s,!a&&e,t),renderState:n()};return r&&(l.mount=e=>r(i,e,l)),l}(e,t,r,i,n);return n?o():bm(o)};function Sm(e,t){const n=Yd(t);n&&Nd(e,n)}function km(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const t=Fl(e,r[i]);if(t){const{transitionEnd:e,transition:r,...i}=t;n(i,e)}}}function Em(e,t,n,r,i){var o;const s={},a=[],l=r&&void 0===(null===(o=e.style)||void 0===o?void 0:o.willChange),u=i(e,{});for(const v in u)s[v]=tf(u[v]);let{initial:c,animate:d}=e;const h=im(e),p=om(e);t&&p&&!h&&!1!==e.inherit&&(void 0===c&&(c=t.initial),void 0===d&&(d=t.animate));let f=!!n&&!1===n.initial;f=f||!1===c;const m=f?d:c;return m&&"boolean"!=typeof m&&!Tl(m)&&km(e,m,((e,t)=>{for(const n in e){let t=e[n];if(Array.isArray(t)){t=t[f?t.length-1:0]}null!==t&&(s[n]=t)}for(const n in t)s[n]=t[n]})),l&&(d&&!1!==c&&!Tl(d)&&km(e,d,(e=>{for(const t in e)Sm(a,t)})),a.length&&(s.willChange=a.join(","))),s}const Pm=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Tm=()=>({...Pm(),attrs:{}}),Am=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Cm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rm=Vl.length;function Om(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(Il.has(l))s=!0;else if(ou(l))i[l]=e;else{const t=Am(e,hc[l]);l.startsWith("origin")?(a=!0,o[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<Rm;o++){const s=Vl[o],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=Am(a,hc[s]);l||(i=!1,r+=`${Cm[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function Fm(e,t,n){return"string"==typeof e?e:Su.transform(t+n*e)}const Mm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lm={offset:"strokeDashoffset",array:"strokeDasharray"};function Dm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(Om(e,u,d),c)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:f}=e;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Fm(t,e.x,e.width)} ${Fm(n,e.y,e.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Mm:Lm;e[o.offset]=Su.transform(-r);const s=Su.transform(t),a=Su.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Vm=e=>"string"==typeof e&&"svg"===e.toLowerCase(),Im={useVisualState:xm({scrapeMotionValuesFromProps:wm,createRenderState:Tm,onMount:(e,t,{renderState:n,latestValues:r})=>{Xl.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(Hy){n.dimensions={x:0,y:0,width:0,height:0}}})),Xl.render((()=>{Dm(n,r,Vm(t.tagName),e.transformTemplate),gm(t,n)}))}})},jm={useVisualState:xm({applyWillChange:!0,scrapeMotionValuesFromProps:_m,createRenderState:Pm})};function Bm(e,t,n){for(const r in t)Xd(t[r])||ym(r,n)||(e[r]=t[r])}function Nm(e,t){const n={};return Bm(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return In((()=>{const n=Pm();return Om(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function Um(e,t){const n={},r=Nm(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Gm=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"]);function Wm(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Gm.has(e)}let Hm=e=>!Wm(e);try{($m=require("@emotion/is-prop-valid").default)&&(Hm=e=>e.startsWith("on")?!Wm(e):$m(e))}catch(jS){}var $m;function zm(e,t,n,r){const i=In((()=>{const n=Tm();return Dm(n,t,Vm(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Bm(t,e.style,e),i.style={...t,...i.style}}return i}function qm(e=!1){return(t,n,r,{latestValues:i},o)=>{const s=(fm(t)?zm:Um)(n,i,o,t),a=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Hm(i)||!0===n&&Wm(i)||!t&&!Wm(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),l=t!==je?{...a,...s,ref:r}:{},{children:u}=n;return De(t,{...l,children:In((()=>Xd(u)?u.get():u),[u])})}}function Km(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return dm({...fm(n)?Im:jm,preloadedFeatures:e,useRender:qm(r),createVisualElement:t,Component:n})}}const Ym={current:null},Qm={current:!1};const Xm=new WeakMap,Zm=[...Du,Yu,sc],Jm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],ev=Dl.length;class tv{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Gu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Xl.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=im(t),this.isVariantNode=om(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const d in c){const e=c[d];void 0!==a[d]&&Xd(e)&&e.set(a[d],!1)}}mount(e){this.current=e,Xm.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))),Qm.current||function(){if(Qm.current=!0,Qf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ym.current=e.matches;e.addListener(t),t()}else Ym.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ym.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Xm.delete(this.current),this.projection&&this.projection.unmount(),Zl(this.notifyUpdate),Zl(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Il.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Xl.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),i(),o&&o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in um){const t=um[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const 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):qh()}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 n=0;n<Jm.length;n++){const t=Jm[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Xd(i))e.addValue(r,i);else if(Xd(o))e.addValue(r,Hd(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,Hd(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let n=0;n<ev;n++){const e=Dl[n],r=this.props[e];(Rl(r)||!1===r)&&(t[e]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const 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);const 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 void 0===n&&void 0!==t&&(n=Hd(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var i;return null!=r&&("string"==typeof r&&(ru(r)||tu(r))?r=parseFloat(r):(i=r,!Zm.find(Lu(i))&&sc.test(t)&&(r=mc(e,t))),this.setBaseTarget(e,Xd(r)?r.get():r)),Xd(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=Fl(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||Xd(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new Gd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class nv extends tv{constructor(){super(...arguments),this.KeyframeResolver=gc}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?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]}}class rv extends nv{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=mm}readValueFromInstance(e,t){if(Il.has(t)){const e=fc(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=(ou(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return cp(e,t)}build(e,t,n){Om(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return _m(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Xd(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class iv extends nv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=qh}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Il.has(t)){const e=fc(t);return e&&e.default||0}return t=vm.has(t)?t:zd(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return wm(e,t,n)}build(e,t,n){Dm(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){gm(e,t,0,r)}mount(e){this.isSVGTag=Vm(e.tagName),super.mount(e)}}const ov=Pl(Km({...dh,...zf,...Vf,...qf},((e,t)=>fm(e)?new iv(t):new rv(t,{allowProjection:e!==je}))));class sv extends Be{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const 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 av({children:e,isPresent:t}){const n=Un(),r=Dn(null),i=Dn({width:0,height:0,top:0,left:0}),{nonce:o}=Bn(Kf);return qr((()=>{const{width:e,height:s,top:a,left:l}=i.current;if(t||!r.current||!e||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return o&&(u.nonce=o),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[t]),no(sv,{isPresent:t,childRef:r,sizeRef:i,children:jr(e,{ref:r})})}const lv=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=bm(uv),l=Un(),u=In((()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:e=>{a.set(e,!0);for(const t of a.values())if(!t)return;r&&r()},register:e=>(a.set(e,!1),()=>a.delete(e))})),o?[Math.random()]:[n]);return In((()=>{a.forEach(((e,t)=>a.set(t,!1)))}),[n]),Mn((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(e=no(av,{isPresent:n,children:e})),no(vp.Provider,{value:u,children:e})};function uv(){return new Map}const cv=e=>e.key||"";function dv(e){const t=[];return rr.forEach(e,(e=>{Dr(e)&&t.push(e)})),t}const hv=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=In((()=>dv(e)),[e]),l=a.map(cv),u=Dn(!0),c=Dn(a),d=bm((()=>new Map)),[h,p]=On(a),[f,m]=On(a);Xf((()=>{u.current=!1,c.current=a;for(let e=0;e<f.length;e++){const t=cv(f[e]);l.includes(t)?d.delete(t):!0!==d.get(t)&&d.set(t,!1)}}),[f,l.length,l.join("-")]);const v=[];if(a!==h){let e=[...a];for(let t=0;t<f.length;t++){const n=f[t],r=cv(n);l.includes(r)||(e.splice(t,0,n),v.push(n))}return"wait"===s&&v.length&&(e=v),m(dv(e)),void p(a)}const{forceRender:g}=Bn(gp);return no(je,{children:f.map((e=>{const t=cv(e),h=a===f||l.includes(t);return no(lv,{isPresent:h,initial:!(u.current&&!r)&&void 0,custom:h?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:h?void 0:()=>{if(!d.has(t))return;d.set(t,!0);let e=!0;d.forEach((t=>{t||(e=!1)})),e&&(null==g||g(),m(c.current),i&&i())},children:e},t)}))})};var pv=e=>"checkbox"===e.type,fv=e=>e instanceof Date,mv=e=>null==e;const vv=e=>"object"==typeof e;var gv=e=>!mv(e)&&!Array.isArray(e)&&vv(e)&&!fv(e),yv=e=>gv(e)&&e.target?pv(e.target)?e.target.checked:e.target.value:e,_v=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),wv=e=>{const t=e.constructor&&e.constructor.prototype;return gv(t)&&t.hasOwnProperty("isPrototypeOf")},bv="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function xv(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(bv&&(e instanceof Blob||e instanceof FileList)||!n&&!gv(e))return e;if(t=n?[]:{},n||wv(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=xv(e[n]));else t=e}return t}var Sv=e=>Array.isArray(e)?e.filter(Boolean):[],kv=e=>void 0===e,Ev=(e,t,n)=>{if(!t||!gv(e))return n;const r=Sv(t.split(/[,[\].]+?/)).reduce(((e,t)=>mv(e)?e:e[t]),e);return kv(r)||r===e?kv(e[t])?n:e[t]:r},Pv=e=>"boolean"==typeof e,Tv=e=>/^\w*$/.test(e),Av=e=>Sv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Cv=(e,t,n)=>{let r=-1;const i=Tv(t)?[t]:Av(t),o=i.length,s=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==s){const n=e[t];o=gv(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t)return;e[t]=o,e=e[t]}return e};const Rv={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ov={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Fv="max",Mv="min",Lv="maxLength",Dv="minLength",Vv="pattern",Iv="required",jv="validate",Bv=Xr.createContext(null),Nv=()=>Xr.useContext(Bv),Uv=e=>{const{children:t,...n}=e;return Xr.createElement(Bv.Provider,{value:n},t)};var Gv=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Ov.all&&(t._proxyFormState[i]=!r||Ov.all),n&&(n[i]=!0),e[i]}});return i},Wv=e=>gv(e)&&!Object.keys(e).length,Hv=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Wv(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!r||Ov.all)))},$v=e=>Array.isArray(e)?e:[e],zv=(e,t,n)=>!e||!t||e===t||$v(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function qv(e){const t=Xr.useRef(e);t.current=e,Xr.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var Kv=e=>"string"==typeof e,Yv=(e,t,n,r,i)=>Kv(e)?(r&&t.watch.add(e),Ev(n,e,i)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),Ev(n,e)))):(r&&(t.watchAll=!0),n);function Qv(e){const t=Nv(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,s=_v(i._names.array,n),a=function(e){const t=Nv(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:s}=e||{},a=Xr.useRef(r);a.current=r,qv({disabled:o,subject:n._subjects.values,next:e=>{zv(a.current,e.name,s)&&u(xv(Yv(a.current,n._names,e.values||n._formValues,!1,i)))}});const[l,u]=Xr.useState(n._getWatch(r,i));return Xr.useEffect((()=>n._removeUnmounted())),l}({control:i,name:n,defaultValue:Ev(i._formValues,n,Ev(i._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=Nv(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[s,a]=Xr.useState(n._formState),l=Xr.useRef(!0),u=Xr.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=Xr.useRef(i);return c.current=i,qv({disabled:r,next:e=>l.current&&zv(c.current,e.name,o)&&Hv(e,u.current,n._updateFormState)&&a({...n._formState,...e}),subject:n._subjects.state}),Xr.useEffect((()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1})),[n]),Gv(s,n,u.current,!1)}({control:i,name:n,exact:!0}),u=Xr.useRef(i.register(n,{...e.rules,value:a,...Pv(e.disabled)?{disabled:e.disabled}:{}}));return Xr.useEffect((()=>{const e=i._options.shouldUnregister||o,t=(e,t)=>{const n=Ev(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=xv(Ev(i._options.defaultValues,n));Cv(i._defaultValues,n,e),kv(Ev(i._formValues,n))&&Cv(i._formValues,n,e)}return()=>{(s?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}}),[n,i,s,o]),Xr.useEffect((()=>{Ev(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:Ev(i._fields,n)._f.value})}),[r,n,i]),{field:{name:n,value:a,...Pv(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Xr.useCallback((e=>u.current.onChange({target:{value:yv(e),name:n},type:Rv.CHANGE})),[n]),onBlur:Xr.useCallback((()=>u.current.onBlur({target:{value:Ev(i._formValues,n),name:n},type:Rv.BLUR})),[n,i]),ref:Xr.useCallback((e=>{const t=Ev(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ev(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ev(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ev(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ev(l.validatingFields,n)},error:{enumerable:!0,get:()=>Ev(l.errors,n)}})}}const Xv=e=>e.render(Qv(e));var Zv=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Jv=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)}))},eg=(e,t,n={})=>n.shouldFocus||kv(n.shouldFocus)?n.focusName||`${e}.${kv(n.focusIndex)?t:n.focusIndex}.`:"",tg=e=>({isOnSubmit:!e||e===Ov.onSubmit,isOnBlur:e===Ov.onBlur,isOnChange:e===Ov.onChange,isOnAll:e===Ov.all,isOnTouch:e===Ov.onTouched}),ng=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const rg=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=Ev(e,i);if(n){const{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(rg(o,t))break}else if(gv(o)&&rg(o,t))break}}};var ig=(e,t,n)=>{const r=$v(Ev(e,n));return Cv(r,"root",t[n]),Cv(e,n,r),e},og=e=>"file"===e.type,sg=e=>"function"==typeof e,ag=e=>{if(!bv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},lg=e=>Kv(e),ug=e=>"radio"===e.type,cg=e=>e instanceof RegExp;const dg={value:!1,isValid:!1},hg={value:!0,isValid:!0};var pg=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!kv(e[0].attributes.value)?kv(e[0].value)||""===e[0].value?hg:{value:e[0].value,isValid:!0}:hg:dg}return dg};const fg={isValid:!1,value:null};var mg=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),fg):fg;function vg(e,t,n="validate"){if(lg(e)||Array.isArray(e)&&e.every(lg)||Pv(e)&&!e)return{type:n,message:lg(e)?e:"",ref:t}}var gg=e=>gv(e)&&!cg(e)?e:{value:e,message:""},yg=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:c,max:d,pattern:h,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=e._f,y=Ev(t,f);if(!v||g)return{};const _=s?s[0]:o,w=e=>{r&&_.reportValidity&&(_.setCustomValidity(Pv(e)?"":e||""),_.reportValidity())},b={},x=ug(o),S=pv(o),k=x||S,E=(m||og(o))&&kv(o.value)&&kv(y)||ag(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,P=Zv.bind(null,f,n,b),T=(e,t,n,r=Lv,i=Dv)=>{const s=e?t:n;b[f]={type:e?r:i,message:s,ref:o,...P(e?r:i,s)}};if(i?!Array.isArray(y)||!y.length:a&&(!k&&(E||mv(y))||Pv(y)&&!y||S&&!pg(s).isValid||x&&!mg(s).isValid)){const{value:e,message:t}=lg(a)?{value:!!a,message:a}:gg(a);if(e&&(b[f]={type:Iv,message:t,ref:_,...P(Iv,t)},!n))return w(t),b}if(!(E||mv(c)&&mv(d))){let e,t;const r=gg(d),i=gg(c);if(mv(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Kv(r.value)&&y&&(e=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Kv(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);mv(r.value)||(e=n>r.value),mv(i.value)||(t=n<i.value)}if((e||t)&&(T(!!e,r.message,i.message,Fv,Mv),!n))return w(b[f].message),b}if((l||u)&&!E&&(Kv(y)||i&&Array.isArray(y))){const e=gg(l),t=gg(u),r=!mv(e.value)&&y.length>+e.value,i=!mv(t.value)&&y.length<+t.value;if((r||i)&&(T(r,e.message,t.message),!n))return w(b[f].message),b}if(h&&!E&&Kv(y)){const{value:e,message:t}=gg(h);if(cg(e)&&!y.match(e)&&(b[f]={type:Vv,message:t,ref:o,...P(Vv,t)},!n))return w(t),b}if(p)if(sg(p)){const e=vg(await p(y,t),_);if(e&&(b[f]={...e,...P(jv,e.message)},!n))return w(e.message),b}else if(gv(p)){let e={};for(const r in p){if(!Wv(e)&&!n)break;const i=vg(await p[r](y,t),_,r);i&&(e={...i,...P(r,i.message)},w(i.message),n&&(b[f]=e))}if(!Wv(e)&&(b[f]={ref:_,...e},!n))return b}return w(!0),b},_g=(e,t)=>[...e,...$v(t)],wg=e=>Array.isArray(e)?e.map((()=>{})):void 0;function bg(e,t,n){return[...e.slice(0,t),...$v(n),...e.slice(t)]}var xg=(e,t,n)=>Array.isArray(e)?(kv(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],Sg=(e,t)=>[...$v(t),...$v(e)];var kg=(e,t)=>kv(t)?[]:function(e,t){let n=0;const r=[...e];for(const i of t)r.splice(i-n,1),n++;return Sv(r).length?r:[]}(e,$v(t).sort(((e,t)=>e-t))),Eg=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function Pg(e,t){const n=Array.isArray(t)?t:Tv(t)?[t]:Av(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=kv(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(gv(r)&&Wv(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!kv(e[t]))return!1;return!0}(r))&&Pg(e,n.slice(0,-1)),e}var Tg=(e,t,n)=>(e[t]=n,e);var Ag=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},Cg=e=>mv(e)||!vv(e);function Rg(e,t){if(Cg(e)||Cg(t))return e===t;if(fv(e)&&fv(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(fv(n)&&fv(e)||gv(n)&&gv(e)||Array.isArray(n)&&Array.isArray(e)?!Rg(n,e):n!==e)return!1}}return!0}var Og=e=>"select-multiple"===e.type,Fg=e=>ug(e)||pv(e),Mg=e=>ag(e)&&e.isConnected,Lg=e=>{for(const t in e)if(sg(e[t]))return!0;return!1};function Dg(e,t={}){const n=Array.isArray(e);if(gv(e)||n)for(const r in e)Array.isArray(e[r])||gv(e[r])&&!Lg(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Dg(e[r],t[r])):mv(e[r])||(t[r]=!0);return t}function Vg(e,t,n){const r=Array.isArray(e);if(gv(e)||r)for(const i in e)Array.isArray(e[i])||gv(e[i])&&!Lg(e[i])?kv(t)||Cg(n[i])?n[i]=Array.isArray(e[i])?Dg(e[i],[]):{...Dg(e[i])}:Vg(e[i],mv(t)?{}:t[i],n[i]):n[i]=!Rg(e[i],t[i]);return n}var Ig=(e,t)=>Vg(e,t,Dg(t)),jg=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>kv(e)?e:t?""===e?NaN:e?+e:e:n&&Kv(e)?new Date(e):r?r(e):e;function Bg(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return og(t)?t.files:ug(t)?mg(e.refs).value:Og(t)?[...t.selectedOptions].map((({value:e})=>e)):pv(t)?pg(e.refs).value:jg(kv(t.value)?e.ref.value:t.value,e)}var Ng=(e,t,n,r)=>{const i={};for(const o of e){const e=Ev(t,o);e&&Cv(i,o,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Ug=e=>kv(e)?e:cg(e)?e.source:gv(e)?cg(e.value)?e.value.source:e.value:e;const Gg="AsyncFunction";var Wg=e=>!(e&&e.validate||!(sg(e.validate)&&e.validate.constructor.name===Gg||gv(e.validate)&&Object.values(e.validate).find((e=>e.constructor.name===Gg)))),Hg=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function $g(e,t,n){const r=Ev(e,n);if(r||Tv(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=Ev(t,r),s=Ev(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}var zg=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e),qg=(e,t)=>!Sv(Ev(e,t)).length&&Pg(e,t);const Kg={mode:Ov.onSubmit,reValidateMode:Ov.onChange,shouldFocusError:!0};function Yg(e={}){let t,n={...Kg,...e},r={submitCount:0,isDirty:!1,isLoading:sg(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(gv(n.defaultValues)||gv(n.values))&&xv(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:xv(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Ag(),array:Ag(),state:Ag()},h=tg(n.mode),p=tg(n.reValidateMode),f=n.criteriaMode===Ov.all,m=async e=>{if(c.isValid||e){const e=n.resolver?Wv((await w()).errors):await b(i,!0);e!==r.isValid&&d.state.next({isValid:e})}},v=(e,t)=>{(c.isValidating||c.validatingFields)&&((e||Array.from(l.mount)).forEach((e=>{e&&(t?Cv(r.validatingFields,e,t):Pg(r.validatingFields,e))})),d.state.next({validatingFields:r.validatingFields,isValidating:!Wv(r.validatingFields)}))},g=(e,t,n,r)=>{const l=Ev(i,e);if(l){const i=Ev(s,e,kv(n)?Ev(o,e):n);kv(i)||r&&r.defaultChecked||t?Cv(s,e,t?i:Bg(l._f)):k(e,i),a.mount&&m()}},y=(e,t,n,s,a)=>{let l=!1,u=!1;const h={name:e},p=!!(Ev(i,e)&&Ev(i,e)._f&&Ev(i,e)._f.disabled);if(!n||s){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=x(),l=u!==h.isDirty);const n=p||Rg(Ev(o,e),t);u=!(p||!Ev(r.dirtyFields,e)),n||p?Pg(r.dirtyFields,e):Cv(r.dirtyFields,e,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!n}if(n){const t=Ev(r.touchedFields,e);t||(Cv(r.touchedFields,e,n),h.touchedFields=r.touchedFields,l=l||c.touchedFields&&t!==n)}return l&&a&&d.state.next(h),l?h:{}},_=(n,i,o,s)=>{const a=Ev(r.errors,n),l=c.isValid&&Pv(i)&&r.isValid!==i;var h;if(e.delayError&&o?(h=()=>((e,t)=>{Cv(r.errors,e,t),d.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(u),u=setTimeout(h,e)},t(e.delayError)):(clearTimeout(u),t=null,o?Cv(r.errors,n,o):Pg(r.errors,n)),(o?!Rg(a,o):a)||!Wv(s)||l){const e={...s,...l&&Pv(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}},w=async e=>{v(e,!0);const t=await n.resolver(s,n.context,Ng(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return v(e),t},b=async(e,t,i={valid:!0})=>{for(const o in e){const a=e[o];if(a){const{_f:e,...u}=a;if(e){const u=l.array.has(e.name),d=a._f&&Wg(a._f);d&&c.validatingFields&&v([o],!0);const h=await yg(a,s,f,n.shouldUseNativeValidation&&!t,u);if(d&&c.validatingFields&&v([o]),h[e.name]&&(i.valid=!1,t))break;!t&&(Ev(h,e.name)?u?ig(r.errors,h,e.name):Cv(r.errors,e.name,h[e.name]):Pg(r.errors,e.name))}!Wv(u)&&await b(u,t,i)}}return i.valid},x=(e,t)=>(e&&t&&Cv(s,e,t),!Rg(R(),o)),S=(e,t,n)=>Yv(e,l,{...a.mount?s:kv(t)?o:Kv(e)?{[e]:t}:t},n,t),k=(e,t,n={})=>{const r=Ev(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&Cv(s,e,jg(t,n)),o=ag(n.ref)&&mv(t)?"":t,Og(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?pv(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):og(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.values.next({name:e,values:{...s}})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&C(e)},E=(e,t,n)=>{for(const r in t){const o=t[r],s=`${e}.${r}`,a=Ev(i,s);!l.array.has(e)&&Cg(o)&&(!a||a._f)||fv(o)?k(s,o,n):E(s,o,n)}},P=(e,t,n={})=>{const u=Ev(i,e),h=l.array.has(e),p=xv(t);Cv(s,e,p),h?(d.array.next({name:e,values:{...s}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:e,dirtyFields:Ig(o,s),isDirty:x(e,p)})):!u||u._f||mv(p)?k(e,p,n):E(e,p,n),ng(e,l)&&d.state.next({...r}),d.values.next({name:a.mount?e:void 0,values:{...s}})},T=async o=>{a.mount=!0;const u=o.target;let g=u.name,x=!0;const S=Ev(i,g),k=e=>{x=Number.isNaN(e)||Rg(e,Ev(s,g,e))};if(S){let a,E;const P=u.type?Bg(S._f):yv(o),T=o.type===Rv.BLUR||o.type===Rv.FOCUS_OUT,A=!Hg(S._f)&&!n.resolver&&!Ev(r.errors,g)&&!S._f.deps||zg(T,Ev(r.touchedFields,g),r.isSubmitted,p,h),R=ng(g,l,T);Cv(s,g,P),T?(S._f.onBlur&&S._f.onBlur(o),t&&t(0)):S._f.onChange&&S._f.onChange(o);const O=y(g,P,T,!1),F=!Wv(O)||R;if(!T&&d.values.next({name:g,type:o.type,values:{...s}}),A)return c.isValid&&("onBlur"===e.mode?T&&m():m()),F&&d.state.next({name:g,...R?{}:O});if(!T&&R&&d.state.next({...r}),n.resolver){const{errors:e}=await w([g]);if(k(P),x){const t=$g(r.errors,i,g),n=$g(e,i,t.name||g);a=n.error,g=n.name,E=Wv(e)}}else v([g],!0),a=(await yg(S,s,f,n.shouldUseNativeValidation))[g],v([g]),k(P),x&&(a?E=!1:c.isValid&&(E=await b(i,!0)));x&&(S._f.deps&&C(S._f.deps),_(g,E,a,O))}},A=(e,t)=>{if(Ev(r.errors,t)&&e.focus)return e.focus(),1},C=async(e,t={})=>{let o,s;const a=$v(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await w(e);if(e)for(const n of e){const e=Ev(t,n);e?Cv(r.errors,n,e):Pg(r.errors,n)}else r.errors=t;return t})(kv(e)?e:a);o=Wv(t),s=e?!a.some((e=>Ev(t,e))):o}else e?(s=(await Promise.all(a.map((async e=>{const t=Ev(i,e);return await b(t&&t._f?{[e]:t}:t)})))).every(Boolean),(s||r.isValid)&&m()):s=o=await b(i);return d.state.next({...!Kv(e)||c.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!s&&rg(i,A,e?a:l.mount),s},R=e=>{const t={...a.mount?s:o};return kv(e)?t:Kv(e)?Ev(t,e):e.map((e=>Ev(t,e)))},O=(e,t)=>({invalid:!!Ev((t||r).errors,e),isDirty:!!Ev((t||r).dirtyFields,e),error:Ev((t||r).errors,e),isValidating:!!Ev(r.validatingFields,e),isTouched:!!Ev((t||r).touchedFields,e)}),F=(e,t,n)=>{const o=(Ev(i,e,{_f:{}})._f||{}).ref,s=Ev(r.errors,e)||{},{ref:a,message:l,type:u,...c}=s;Cv(r.errors,e,{...c,...t,ref:o}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},M=(e,t={})=>{for(const a of e?$v(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(Pg(i,a),Pg(s,a)),!t.keepError&&Pg(r.errors,a),!t.keepDirty&&Pg(r.dirtyFields,a),!t.keepTouched&&Pg(r.touchedFields,a),!t.keepIsValidating&&Pg(r.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&Pg(o,a);d.values.next({values:{...s}}),d.state.next({...r,...t.keepDirty?{isDirty:x()}:{}}),!t.keepIsValid&&m()},L=({disabled:e,name:t,field:n,fields:r,value:i})=>{if(Pv(e)&&a.mount||e){const o=e?void 0:kv(i)?Bg(n?n._f:Ev(r,t)._f):i;Cv(s,t,o),y(t,o,!1,!1,!0)}},D=(t,r={})=>{let s=Ev(i,t);const u=Pv(r.disabled)||Pv(e.disabled);return Cv(i,t,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:t}},name:t,mount:!0,...r}}),l.mount.add(t),s?L({field:s,disabled:Pv(r.disabled)?r.disabled:e.disabled,name:t,value:r.value}):g(t,!0,r.value),{...u?{disabled:r.disabled||e.disabled}:{},...n.progressive?{required:!!r.required,min:Ug(r.min),max:Ug(r.max),minLength:Ug(r.minLength),maxLength:Ug(r.maxLength),pattern:Ug(r.pattern)}:{},name:t,onChange:T,onBlur:T,ref:e=>{if(e){D(t,r),s=Ev(i,t);const n=kv(e.value)&&e.querySelectorAll&&e.querySelectorAll("input,select,textarea")[0]||e,a=Fg(n),l=s._f.refs||[];if(a?l.find((e=>e===n)):n===s._f.ref)return;Cv(i,t,{_f:{...s._f,...a?{refs:[...l.filter(Mg),n,...Array.isArray(Ev(o,t))?[{}]:[]],ref:{type:n.type,name:t}}:{ref:n}}}),g(t,!1,void 0,n)}else s=Ev(i,t,{}),s._f&&(s._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!_v(l.array,t)||!a.action)&&l.unMount.add(t)}}},V=()=>n.shouldFocusError&&rg(i,A,l.mount),I=(e,t)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=xv(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await w();r.errors=e,l=t}else await b(i);if(Pg(r.errors,"root"),Wv(r.errors)){d.state.next({errors:{}});try{await e(l,o)}catch(u){a=u}}else t&&await t({...r.errors},o),V(),setTimeout(V);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Wv(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(t,n={})=>{const u=t?xv(t):o,h=xv(u),p=Wv(t),f=p?o:h;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)Ev(r.dirtyFields,e)?Cv(f,e,Ev(s,e)):P(e,Ev(f,e));else{if(bv&&kv(t))for(const e of l.mount){const t=Ev(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(ag(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}s=e.shouldUnregister?n.keepDefaultValues?xv(o):{}:xv(f),d.array.next({values:{...f}}),d.values.next({values:{...f}})}l={mount:n.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!n.keepIsValid||!!n.keepDirtyValues,a.watch=!!e.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||Rg(t,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&s?Ig(o,s):r.dirtyFields:n.keepDefaultValues&&t?Ig(o,t):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(e,t)=>j(sg(e)?e(s):e,t);return{control:{register:D,unregister:M,getFieldState:O,handleSubmit:I,setError:F,_executeSchema:w,_getWatch:S,_getDirty:x,_updateValid:m,_removeUnmounted:()=>{for(const e of l.unMount){const t=Ev(i,e);t&&(t._f.refs?t._f.refs.every((e=>!Mg(e))):!Mg(t._f.ref))&&M(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,h=!0)=>{if(l&&n){if(a.action=!0,h&&Array.isArray(Ev(i,e))){const t=n(Ev(i,e),l.argA,l.argB);u&&Cv(i,e,t)}if(h&&Array.isArray(Ev(r.errors,e))){const t=n(Ev(r.errors,e),l.argA,l.argB);u&&Cv(r.errors,e,t),qg(r.errors,e)}if(c.touchedFields&&h&&Array.isArray(Ev(r.touchedFields,e))){const t=n(Ev(r.touchedFields,e),l.argA,l.argB);u&&Cv(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=Ig(o,s)),d.state.next({name:e,isDirty:x(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Cv(s,e,t)},_updateDisabledField:L,_getFieldArray:t=>Sv(Ev(a.mount?s:o,t,e.shouldUnregister?Ev(o,t,[]):[])),_reset:j,_resetDefaultValues:()=>sg(n.defaultValues)&&n.defaultValues().then((e=>{B(e,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{Pv(e)&&(d.state.next({disabled:e}),rg(i,((t,n)=>{const r=Ev(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:e=>{r.errors=e,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(e){a=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:C,register:D,handleSubmit:I,watch:(e,t)=>sg(e)?d.values.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:P,getValues:R,reset:B,resetField:(e,t={})=>{Ev(i,e)&&(kv(t.defaultValue)?P(e,xv(Ev(o,e))):(P(e,t.defaultValue),Cv(o,e,xv(t.defaultValue))),t.keepTouched||Pg(r.touchedFields,e),t.keepDirty||(Pg(r.dirtyFields,e),r.isDirty=t.defaultValue?x(e,xv(Ev(o,e))):x()),t.keepError||(Pg(r.errors,e),c.isValid&&m()),d.state.next({...r}))},clearErrors:e=>{e&&$v(e).forEach((e=>Pg(r.errors,e))),d.state.next({errors:e?r.errors:{}})},unregister:M,setError:F,setFocus:(e,t={})=>{const n=Ev(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:O}}const Qg="undefined"!=typeof document?Xr.useLayoutEffect:()=>{};const Xg=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Zg=e=>{if(e&&"window"in e&&e.window===e)return e;return Xg(e).defaultView||window};function Jg(e){let t=null;return()=>(null==t&&(t=e()),t)}const ey=Jg((function(){return e=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform);var e,t})),ty=Jg((function(){return e=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent));var e,t}));class ny{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function ry(e){let t=Dn({isFocused:!1,observer:null});Qg((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=Dn(null);return Qg((()=>{t.current=e}),[e]),jn(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return jn((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,i=e=>{t.current.isFocused=!1,r.disabled&&n(new ny("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}let iy=null,oy=new Set,sy=new Map,ay=!1,ly=!1;const uy={Tab:!0,Escape:!0};function cy(e,t){for(let n of oy)n(e,t)}function dy(e){ay=!0,function(e){return!(e.metaKey||!ey()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(iy="keyboard",cy("keyboard",e))}function hy(e){iy="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(ay=!0,cy("pointer",e))}function py(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(ty()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(ay=!0,iy="virtual")}function fy(e){e.target!==window&&e.target!==document&&(ay||ly||(iy="virtual",cy("virtual",e)),ay=!1,ly=!1)}function my(){ay=!1,ly=!0}function vy(e){if("undefined"==typeof window||sy.get(Zg(e)))return;const t=Zg(e),n=Xg(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ay=!0,r.apply(this,arguments)},n.addEventListener("keydown",dy,!0),n.addEventListener("keyup",dy,!0),n.addEventListener("click",py,!0),t.addEventListener("focus",fy,!0),t.addEventListener("blur",my,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",hy,!0),n.addEventListener("pointermove",hy,!0),n.addEventListener("pointerup",hy,!0)):(n.addEventListener("mousedown",hy,!0),n.addEventListener("mousemove",hy,!0),n.addEventListener("mouseup",hy,!0)),t.addEventListener("beforeunload",(()=>{gy(e)}),{once:!0}),sy.set(t,{focus:r})}const gy=(e,t)=>{const n=Zg(e),r=Xg(e);t&&r.removeEventListener("DOMContentLoaded",t),sy.has(n)&&(n.HTMLElement.prototype.focus=sy.get(n).focus,r.removeEventListener("keydown",dy,!0),r.removeEventListener("keyup",dy,!0),r.removeEventListener("click",py,!0),n.removeEventListener("focus",fy,!0),n.removeEventListener("blur",my,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",hy,!0),r.removeEventListener("pointermove",hy,!0),r.removeEventListener("pointerup",hy,!0)):(r.removeEventListener("mousedown",hy,!0),r.removeEventListener("mousemove",hy,!0),r.removeEventListener("mouseup",hy,!0)),sy.delete(n))};function yy(){return"pointer"!==iy}"undefined"!=typeof document&&function(e){const t=Xg(e);let n;"loading"!==t.readyState?vy(e):(n=()=>{vy(e)},t.addEventListener("DOMContentLoaded",n))}();const _y=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function wy(e,t,n){vy(),Mn((()=>{let t=(t,r)=>{(function(e,t,n){var r;const i="undefined"!=typeof window?Zg(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Zg(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Zg(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Zg(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof i&&!_y.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof o||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===t&&n instanceof a&&!uy[n.key])})(!!(null==n?void 0:n.isTextInput),t,r)&&e(yy())};return oy.add(t),()=>{oy.delete(t)}}),t)}let by=!1,xy=0;function Sy(){by=!0,setTimeout((()=>{by=!1}),50)}function ky(e){"touch"===e.pointerType&&Sy()}function Ey(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",ky):document.addEventListener("touchend",Sy),xy++,()=>{xy--,xy>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",ky):document.removeEventListener("touchend",Sy))}}function Py(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,s]=On(!1),a=Dn({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Mn(Ey,[]);let{hoverProps:l,triggerHoverEnd:u}=In((()=>{let e=(e,r)=>{if(a.pointerType=r,i||"touch"===r||a.isHovered||!e.currentTarget.contains(e.target))return;a.isHovered=!0;let o=e.currentTarget;a.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),s(!0)},o=(e,t)=>{if(a.pointerType="",a.target=null,"touch"===t||!a.isHovered)return;a.isHovered=!1;let i=e.currentTarget;r&&r({type:"hoverend",target:i,pointerType:t}),n&&n(!1),s(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{by&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{a.ignoreEmulatedMouseEvents||by||e(t,"mouse"),a.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[t,n,r,i,a]);return Mn((()=>{i&&u({currentTarget:a.target},a.pointerType)}),[i]),{hoverProps:l,isHovered:o}}function Ty(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=Dn({isFocused:!1,isFocusVisible:t||yy()}),[o,s]=On(!1),[a,l]=On((()=>i.current.isFocused&&i.current.isFocusVisible)),u=jn((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),c=jn((e=>{i.current.isFocused=e,s(e),u()}),[u]);wy((e=>{i.current.isFocusVisible=e,u()}),[],{isTextInput:n});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=jn((e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0}),[r,i]),s=ry(o),a=jn((e=>{const t=Xg(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),s(e))}),[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?a:void 0,onBlur:t||!r&&!i?void 0:o}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=Dn({isFocusWithin:!1}),s=jn((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,o]),a=ry(s),l=jn((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(r&&r(e),i&&i(!0),o.current.isFocusWithin=!0,a(e))}),[r,i,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:a,focusProps:r?h:d}}var Ay=Object.defineProperty,Cy=(e,t,n)=>(((e,t,n)=>{t in e?Ay(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let Ry=new class{constructor(){Cy(this,"current",this.detect()),Cy(this,"handoffState","pending"),Cy(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function Oy(e){return Ry.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Fy(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function My(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add((()=>e.removeEventListener(n,r,i)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return Fy((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=My();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Ly(){let[e]=On(My);return Mn((()=>()=>e.dispose()),[e]),e}let Dy=(e,t)=>{Ry.isServer?Mn(e,t):Ln(e,t)};function Vy(e){let t=Dn(e);return Dy((()=>{t.current=e}),[e]),t}let Iy=function(e){let t=Vy(e);return Xr.useCallback(((...e)=>t.current(...e)),[t])};function jy({disabled:e=!1}={}){let t=Dn(null),[n,r]=On(!1),i=Ly(),o=Iy((()=>{t.current=null,r(!1),i.dispose()})),s=Iy((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,r(!0);{let n=Oy(e.currentTarget);i.addEventListener(n,"pointerup",o,!1),i.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);r(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",o,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}let By=ot(void 0);function Ny(){return Bn(By)}function Uy({value:e,children:t}){return Xr.createElement(By.Provider,{value:e},t)}function Gy(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function Wy(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Wy),r}var Hy,$y,zy=(($y=zy||{})[$y.None=0]="None",$y[$y.RenderStrategy=1]="RenderStrategy",$y[$y.Static=2]="Static",$y),qy=((Hy=qy||{})[Hy.Unmount=0]="Unmount",Hy[Hy.Hidden=1]="Hidden",Hy);function Ky({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:Qy;let l=Xy(t,e);if(o)return Yy(l,n,r,s,a);let u=null!=i?i:0;if(2&u){let{static:e=!1,...t}=l;if(e)return Yy(t,n,r,s,a)}if(1&u){let{unmount:e=!0,...t}=l;return Wy(e?0:1,{0:()=>null,1:()=>Yy({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return Yy(l,n,r,s,a)}function Yy(e,t={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=t_(e,["unmount","static"]),u=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof s?s(t):s;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=n.join(" ");for(let e of n)d[`data-${e}`]=""}}if(o===je&&(Object.keys(e_(l)).length>0||Object.keys(e_(d)).length>0)){if(Dr(c)&&!(Array.isArray(c)&&c.length>1)){let e=c.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>Gy(t(...e),l.className):Gy(t,l.className),r=n?{className:n}:{},o=Xy(c.props,e_(t_(l,["ref"])));for(let i in d)i in o&&delete d[i];return jr(c,Object.assign({},o,d,u,{ref:i(c.ref,u.ref)},r))}if(Object.keys(e_(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(e_(l)).concat(Object.keys(e_(d))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return De(o,Object.assign({},t_(l,["ref"]),o!==je&&u,o!==je&&d),c)}function Qy(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Xy(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let r in n)Object.assign(t,{[r](e,...t){let i=n[r];for(let n of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Zy(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let r in n)Object.assign(t,{[r](...e){let t=n[r];for(let n of t)null==n||n(...e)}});return t}function Jy(e){var t;return Object.assign(tr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function e_(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function t_(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function n_(e,t,n){let[r,i]=On(n),o=void 0!==e,s=Dn(o),a=Dn(!1),l=Dn(!1);return!o||s.current||a.current?!o&&s.current&&!l.current&&(l.current=!0,s.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,s.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?e:r,Iy((e=>(o||i(e),null==t?void 0:t(e))))]}function r_(e){let[t]=On(e);return t}function i_(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))s_(n,o_(t,r),i);return n}function o_(e,t){return e?e+"["+t+"]":t}function s_(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())s_(e,o_(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):i_(n,t,e)}function a_(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}}var l_=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(l_||{});let u_=Jy((function(e,t){var n;let{features:r=1,...i}=e;return Ky({ourProps:{ref:t,"aria-hidden":!(2&~r)||(null!=(n=i["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}},theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})})),c_=ot(null);function d_(e){let[t,n]=On(null);return Xr.createElement(c_.Provider,{value:{target:t}},e.children,Xr.createElement(u_,{features:l_.Hidden,ref:n}))}function h_({children:e}){let t=Bn(c_);if(!t)return Xr.createElement(Xr.Fragment,null,e);let{target:n}=t;return n?mr(Xr.createElement(Xr.Fragment,null,e),n):null}function p_({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[o,s]=On(null),a=Ly();return Mn((()=>{if(r&&o)return a.addEventListener(o,"reset",r)}),[o,t,r]),Xr.createElement(h_,null,Xr.createElement(f_,{setForm:s,formId:t}),i_(e).map((([e,r])=>Xr.createElement(u_,{features:l_.Hidden,...e_({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...i})}))))}function f_({setForm:e,formId:t}){return Mn((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:Xr.createElement(u_,{features:l_.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}let m_=ot(void 0);function v_(){return Bn(m_)}function g_({id:e,children:t}){return Xr.createElement(m_.Provider,{value:e},t)}function y_(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}let __=Symbol();function w_(...e){let t=Dn(e);Mn((()=>{t.current=e}),[e]);let n=Iy((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[__])))?void 0:n}let b_=ot(null);function x_(){let e=Bn(b_);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,x_),e}return e}function S_(){var e,t;return null!=(t=null==(e=Bn(b_))?void 0:e.value)?t:void 0}function k_(){let[e,t]=On([]);return[e.length>0?e.join(" "):void 0,In((()=>function(e){let n=Iy((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),r=In((()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value})),[n,e.slot,e.name,e.props,e.value]);return Xr.createElement(b_.Provider,{value:r},e.children)}),[t])]}b_.displayName="DescriptionContext";let E_=Jy((function(e,t){let n=Un(),r=Ny(),{id:i=`headlessui-description-${n}`,...o}=e,s=x_(),a=w_(t);Dy((()=>s.register(i)),[i,s.register]);let l=r||!1,u=In((()=>({...s.slot,disabled:l})),[s.slot,l]);return Ky({ourProps:{ref:a,...s.props,id:i},theirProps:o,slot:u,defaultTag:"p",name:s.name||"Description"})})),P_=Object.assign(E_,{});var T_,A_=((T_=A_||{}).Space=" ",T_.Enter="Enter",T_.Escape="Escape",T_.Backspace="Backspace",T_.Delete="Delete",T_.ArrowLeft="ArrowLeft",T_.ArrowUp="ArrowUp",T_.ArrowRight="ArrowRight",T_.ArrowDown="ArrowDown",T_.Home="Home",T_.End="End",T_.PageUp="PageUp",T_.PageDown="PageDown",T_.Tab="Tab",T_);let C_=ot(null);function R_(){let e=Bn(C_);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,R_),e}return e}function O_(e){var t,n,r;let i=null!=(n=null==(t=Bn(C_))?void 0:t.value)?n:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function F_({inherit:e=!1}={}){let t=O_(),[n,r]=On([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,In((()=>function(e){let t=Iy((e=>(r((t=>[...t,e])),()=>r((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=In((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return Xr.createElement(C_.Provider,{value:n},e.children)}),[r])]}C_.displayName="LabelContext";let M_=Jy((function(e,t){var n;let r=Un(),i=R_(),o=v_(),s=Ny(),{id:a=`headlessui-label-${r}`,htmlFor:l=(null!=o?o:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...c}=e,d=w_(t);Dy((()=>i.register(a)),[a,i.register]);let h=Iy((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),p=s||!1,f=In((()=>({...i.slot,disabled:p})),[i.slot,p]),m={ref:d,...i.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),Ky({ourProps:m,theirProps:c,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})})),L_=Object.assign(M_,{});function D_(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function V_(e,t=!1){let[n,r]=Fn((()=>({})),{}),i=In((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return Dy((()=>{if(!e)return;let t=new ResizeObserver(r);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}let I_=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function j_(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...i){let o=t[e].call(n,...i);o&&(n=o,r.forEach((e=>e())))}}}function B_(e){return Yr(e.subscribe,e.getSnapshot,e.getSnapshot)}let N_=new I_((()=>j_((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function U_(e,t){let n=N_.get(t),r=Un(),i=B_(n);if(Dy((()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)}),[n,e]),!e)return!1;let o=i.indexOf(r),s=i.length;return-1===o&&(o=s,s+=1),o===s-1}let G_=new Map,W_=new Map;function H_(e){var t;let n=null!=(t=W_.get(e))?t:0;return W_.set(e,n+1),0!==n||(G_.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>$_(e)}function $_(e){var t;let n=null!=(t=W_.get(e))?t:1;if(1===n?W_.delete(e):W_.set(e,n-1),1!==n)return;let r=G_.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,G_.delete(e))}let z_=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),q_=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var K_,Y_,Q_,X_=((Q_=X_||{})[Q_.First=1]="First",Q_[Q_.Previous=2]="Previous",Q_[Q_.Next=4]="Next",Q_[Q_.Last=8]="Last",Q_[Q_.WrapAround=16]="WrapAround",Q_[Q_.NoScroll=32]="NoScroll",Q_[Q_.AutoFocus=64]="AutoFocus",Q_),Z_=((Y_=Z_||{})[Y_.Error=0]="Error",Y_[Y_.Overflow=1]="Overflow",Y_[Y_.Success=2]="Success",Y_[Y_.Underflow=3]="Underflow",Y_),J_=((K_=J_||{})[K_.Previous=-1]="Previous",K_[K_.Next=1]="Next",K_);function ew(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(z_)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var tw=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(tw||{});function nw(e,t=0){var n;return e!==(null==(n=Oy(e))?void 0:n.body)&&Wy(t,{0:()=>e.matches(z_),1(){let t=e;for(;null!==t;){if(t.matches(z_))return!0;t=t.parentElement}return!1}})}var rw=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(rw||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let iw=["textarea","input"].join(",");function ow(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function sw(e,t){return function(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?ow(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(q_)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):ew(e);i.length>0&&s.length>1&&(s=s.filter((e=>!i.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),r=null!=r?r:o.activeElement;let a,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,s.indexOf(r))-1;if(4&t)return Math.max(0,s.indexOf(r))+1;if(8&t)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},d=0,h=s.length;do{if(d>=h||d+h<=0)return 0;let e=u+d;if(16&t)e=(e+h)%h;else{if(e<0)return 3;if(e>=h)return 1}a=s[e],null==a||a.focus(c),d+=l}while(a!==o.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,iw))&&n}(a)&&a.select(),2}(ew(),t,{relativeTo:e})}function aw(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function lw(){return aw()||/Android/gi.test(window.navigator.userAgent)}function uw(e,t,n,r){let i=Vy(n);Mn((()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}const cw=30;function dw(e,t,n){let r=U_(e,"outside-click"),i=Vy(n),o=jn((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!nw(r,tw.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i,t]),s=Dn(null);uw(r,"pointerdown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),uw(r,"mousedown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),uw(r,"click",(e=>{lw()||s.current&&(o(e,(()=>s.current)),s.current=null)}),!0);let a=Dn({x:0,y:0});uw(r,"touchstart",(e=>{a.current.x=e.touches[0].clientX,a.current.y=e.touches[0].clientY}),!0),uw(r,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-a.current.x)>=cw||Math.abs(n-a.current.y)>=cw))return o(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,r){let i=Vy(n);Mn((()=>{if(e)return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}(r,"blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function hw(...e){return In((()=>Oy(...e)),[...e])}function pw(e,t){return In((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function fw(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=null!=(n=t.defaultView)?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`)}}}function mw(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let vw=j_((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:My(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:mw(n)},i=[aw()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=My();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),s=e.querySelector(i);s&&!r(s)&&(o=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},fw(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(r))),i.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function gw(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=B_(vw),i=t?r.get(t):void 0,o=!!i&&i.count>0;Dy((()=>{if(t&&e)return vw.dispatch("PUSH",t,n),()=>vw.dispatch("POP",t,n)}),[e,t])}(U_(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}function yw(e){return[e.screenX,e.screenY]}vw.subscribe((()=>{let e=vw.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&vw.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&vw.dispatch("TEARDOWN",n)}}));var _w;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"test"===(null==(_w=null==process?void 0:{})?void 0:_w.NODE_ENV)&&void 0===Element.prototype.getAnimations&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var ww=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(ww||{});function bw(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function xw(e,t,n,r){let[i,o]=On(n),{hasFlag:s,addFlag:a,removeFlag:l}=function(e=0){let[t,n]=On(e),r=jn((e=>n(e)),[t]),i=jn((e=>n((t=>t|e))),[t]),o=jn((e=>(t&e)===e),[t]),s=jn((e=>n((t=>t&~e))),[n]),a=jn((e=>n((t=>t^e))),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(e&&i?3:0),u=Dn(!1),c=Dn(!1),d=Ly();return Dy((()=>{var i;if(e)return n&&o(!0),t?(null==(i=null==r?void 0:r.start)||i.call(r,n),function(e,{prepare:t,run:n,done:r,inFlight:i}){let o=My();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{n(),o.requestAnimationFrame((()=>{o.add(function(e,t){var n,r;let i=My();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),i.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,r))}))})),o.dispose}(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){c.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var e;c.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(u.current=!1,l(7),n||o(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})):void(n&&a(3))}),[e,n,t,d]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Sw(){return"undefined"!=typeof window}function kw(e){return Tw(e)?(e.nodeName||"").toLowerCase():"#document"}function Ew(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Pw(e){var t;return null==(t=(Tw(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Tw(e){return!!Sw()&&(e instanceof Node||e instanceof Ew(e).Node)}function Aw(e){return!!Sw()&&(e instanceof Element||e instanceof Ew(e).Element)}function Cw(e){return!!Sw()&&(e instanceof HTMLElement||e instanceof Ew(e).HTMLElement)}function Rw(e){return!(!Sw()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ew(e).ShadowRoot)}function Ow(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Iw(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Fw(e){return["table","td","th"].includes(kw(e))}function Mw(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(Hy){return!1}}))}function Lw(e){const t=Dw(),n=Aw(e)?Iw(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Dw(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Vw(e){return["html","body","#document"].includes(kw(e))}function Iw(e){return Ew(e).getComputedStyle(e)}function jw(e){return Aw(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bw(e){if("html"===kw(e))return e;const t=e.assignedSlot||e.parentNode||Rw(e)&&e.host||Pw(e);return Rw(t)?t.host:t}function Nw(e){const t=Bw(e);return Vw(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cw(t)&&Ow(t)?t:Nw(t)}function Uw(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=Nw(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=Ew(i);if(o){const e=Gw(s);return t.concat(s,s.visualViewport||[],Ow(i)?i:[],e&&n?Uw(e):[])}return t.concat(i,Uw(i,[],n))}function Gw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ww=Math.min,Hw=Math.max,$w=Math.round,zw=Math.floor,qw=e=>({x:e,y:e}),Kw={left:"right",right:"left",bottom:"top",top:"bottom"},Yw={start:"end",end:"start"};function Qw(e,t,n){return Hw(e,Ww(t,n))}function Xw(e,t){return"function"==typeof e?e(t):e}function Zw(e){return e.split("-")[0]}function Jw(e){return e.split("-")[1]}function eb(e){return"x"===e?"y":"x"}function tb(e){return"y"===e?"height":"width"}function nb(e){return["top","bottom"].includes(Zw(e))?"y":"x"}function rb(e){return eb(nb(e))}function ib(e){return e.replace(/start|end/g,(e=>Yw[e]))}function ob(e){return e.replace(/left|right|bottom|top/g,(e=>Kw[e]))}function sb(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ab(e,t,n){let{reference:r,floating:i}=e;const o=nb(t),s=rb(t),a=tb(s),l=Zw(t),u="y"===o,c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Jw(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function lb(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Xw(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[h?"floating"===d?"reference":"floating":d],v=sb(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g="floating"===d?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),_=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},w=sb(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-w.top+f.top)/_.y,bottom:(w.bottom-v.bottom+f.bottom)/_.y,left:(v.left-w.left+f.left)/_.x,right:(w.right-v.right+f.right)/_.x}}function ub(e){const t=Iw(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Cw(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=$w(n)!==o||$w(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function cb(e){return Aw(e)?e:e.contextElement}function db(e){const t=cb(e);if(!Cw(t))return qw(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ub(t);let s=(o?$w(n.width):n.width)/r,a=(o?$w(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const hb=qw(0);function pb(e){const t=Ew(e);return Dw()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:hb}function fb(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=cb(e);let s=qw(1);t&&(r?Aw(r)&&(s=db(r)):s=db(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ew(e))&&t}(o,n,r)?pb(o):qw(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const e=Ew(o),t=r&&Aw(r)?Ew(r):r;let n=e,i=Gw(n);for(;i&&r&&t!==n;){const e=db(i),t=i.getBoundingClientRect(),r=Iw(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=o,u+=s,n=Ew(i),i=Gw(n)}}return sb({width:c,height:d,x:l,y:u})}function mb(e,t){const n=jw(e).scrollLeft;return t?t.left+n:fb(Pw(e)).left+n}function vb(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ew(e),r=Pw(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const e=Dw();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Pw(e),n=jw(e),r=e.ownerDocument.body,i=Hw(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Hw(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+mb(e);const a=-n.scrollTop;return"rtl"===Iw(r).direction&&(s+=Hw(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(Pw(e));else if(Aw(t))r=function(e,t){const n=fb(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Cw(e)?db(e):qw(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=pb(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return sb(r)}function gb(e,t){const n=Bw(e);return!(n===t||!Aw(n)||Vw(n))&&("fixed"===Iw(n).position||gb(n,t))}function yb(e,t,n){const r=Cw(t),i=Pw(t),o="fixed"===n,s=fb(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=qw(0);if(r||!r&&!o)if(("body"!==kw(t)||Ow(i))&&(a=jw(t)),r){const e=fb(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=mb(i));let u=0,c=0;if(i&&!r&&!o){const e=i.getBoundingClientRect();c=e.top+a.scrollTop,u=e.left+a.scrollLeft-mb(i,e)}return{x:s.left+a.scrollLeft-l.x-u,y:s.top+a.scrollTop-l.y-c,width:s.width,height:s.height}}function _b(e){return"static"===Iw(e).position}function wb(e,t){if(!Cw(e)||"fixed"===Iw(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Pw(e)===n&&(n=n.ownerDocument.body),n}function bb(e,t){const n=Ew(e);if(Mw(e))return n;if(!Cw(e)){let t=Bw(e);for(;t&&!Vw(t);){if(Aw(t)&&!_b(t))return t;t=Bw(t)}return n}let r=wb(e,t);for(;r&&Fw(r)&&_b(r);)r=wb(r,t);return r&&Vw(r)&&_b(r)&&!Lw(r)?n:r||function(e){let t=Bw(e);for(;Cw(t)&&!Vw(t);){if(Lw(t))return t;if(Mw(t))return null;t=Bw(t)}return null}(e)||n}const xb={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,s=Pw(r),a=!!t&&Mw(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=qw(1);const c=qw(0),d=Cw(r);if((d||!d&&!o)&&(("body"!==kw(r)||Ow(s))&&(l=jw(r)),Cw(r))){const e=fb(r);u=db(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:Pw,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?Mw(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Uw(e,[],!1).filter((e=>Aw(e)&&"body"!==kw(e))),i=null;const o="fixed"===Iw(e).position;let s=o?Bw(e):e;for(;Aw(s)&&!Vw(s);){const t=Iw(s),n=Lw(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||Ow(s)&&!n&&gb(e,s))?r=r.filter((e=>e!==s)):i=t,s=Bw(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=o[0],a=o.reduce(((e,n)=>{const r=vb(t,n,i);return e.top=Hw(r.top,e.top),e.right=Ww(r.right,e.right),e.bottom=Ww(r.bottom,e.bottom),e.left=Hw(r.left,e.left),e}),vb(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:bb,getElementRects:async function(e){const t=this.getOffsetParent||bb,n=this.getDimensions,r=await n(e.floating);return{reference:yb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ub(e);return{width:t,height:n}},getScale:db,isElement:Aw,isRTL:function(e){return"rtl"===Iw(e).direction}};function Sb(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=cb(e),c=i||o?[...u?Uw(u):[],...Uw(t)]:[];c.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=u&&a?function(e,t){let n,r=null;const i=Pw(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const{left:u,top:c,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p={rootMargin:-zw(c)+"px "+-zw(i.clientWidth-(u+d))+"px "+-zw(i.clientHeight-(c+h))+"px "+-zw(u)+"px",threshold:Hw(0,Ww(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}f=!1}try{r=new IntersectionObserver(m,{...p,root:i.ownerDocument})}catch(Hy){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),o}(u,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),u&&!l&&f.observe(u),f.observe(t));let m=l?fb(e):null;return l&&function t(){const r=fb(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const kb=lb,Eb=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Zw(n),a=Jw(n),l="y"===nb(n),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Xw(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},Pb=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Xw(e,t),u={x:n,y:r},c=await lb(t,l),d=nb(Zw(i)),h=eb(d);let p=u[h],f=u[d];if(o){const e="y"===h?"bottom":"right";p=Qw(p+c["y"===h?"top":"left"],p,p-c[e])}if(s){const e="y"===d?"bottom":"right";f=Qw(f+c["y"===d?"top":"left"],f,f-c[e])}const m=a.fn({...t,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},Tb=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=Xw(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Zw(i),y=nb(a),_=Zw(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=h||(_||!m?[ob(a)]:function(e){const t=ob(e);return[ib(e),t,ib(t)]}(a)),x="none"!==f;!h&&x&&b.push(...function(e,t,n,r){const i=Jw(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}(Zw(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(ib)))),o}(a,m,f,w));const S=[a,...b],k=await lb(t,v),E=[];let P=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&E.push(k[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Jw(e),i=rb(e),o=tb(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=ob(s)),[s,ob(s)]}(i,s,w);E.push(k[e[0]],k[e[1]])}if(P=[...P,{placement:i,overflows:E}],!E.every((e=>e<=0))){var T,A;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(A=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var C;const e=null==(C=P.filter((e=>{if(x){const t=nb(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},Ab=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Xw(e,t),c=await lb(t,u),d=Zw(i),h=Jw(i),p="y"===nb(i),{width:f,height:m}=o.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=h===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,v="end"===h?"top":"bottom");const y=m-c.top-c.bottom,_=f-c.left-c.right,w=Ww(m-c[v],y),b=Ww(f-c[g],_),x=!t.middlewareData.shift;let S=w,k=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=_),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=y),x&&!h){const e=Hw(c.left,0),t=Hw(c.right,0),n=Hw(c.top,0),r=Hw(c.bottom,0);p?k=f-2*(0!==e||0!==t?e+t:Hw(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:Hw(c.top,c.bottom))}await l({...t,availableWidth:k,availableHeight:S});const E=await s.getDimensions(a.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Cb=(e,t,n)=>{const r=new Map,i={platform:xb,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=ab(u,r,l),h=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:n,fn:o}=a[m],{x:v,y:g,data:y,reset:_}=await o({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=v?v:c,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(h=_.placement),_.rects&&(u=!0===_.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):_.rects),({x:c,y:d}=ab(u,h,l))),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}})(e,t,{...i,platform:o})};var Rb="undefined"!=typeof document?Ln:Mn;function Ob(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Ob(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!Ob(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Fb(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mb(e,t){const n=Fb(e);return Math.round(t*n)/n}function Lb(e){const t=Dn(e);return Rb((()=>{t.current=e})),t}const Db=(e,t)=>({...Eb(e),options:[e,t]}),Vb=(e,t)=>({...Pb(e),options:[e,t]}),Ib=(e,t)=>({...Tb(e),options:[e,t]}),jb=(e,t)=>({...Ab(e),options:[e,t]}),Bb={...Zr},Nb=Bb.useInsertionEffect||(e=>e());function Ub(e){const t=Dn((()=>{}));return Nb((()=>{t.current=e})),jn((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var Gb="undefined"!=typeof document?Ln:Mn;let Wb=!1,Hb=0;const $b=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Hb++;const zb=Bb.useId||function(){const[e,t]=On((()=>Wb?$b():void 0));return Gb((()=>{null==e&&t($b())}),[]),Mn((()=>{Wb=!0}),[]),e};const qb=ot(null),Kb=ot(null),Yb=()=>{var e;return(null==(e=Bn(qb))?void 0:e.id)||null},Qb=()=>Bn(Kb),Xb="data-floating-ui-focusable";function Zb(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=zb(),o=Dn({}),[s]=On((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),a=null!=Yb(),[l,u]=On(r.reference),c=Ub(((e,t,r)=>{o.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)})),d=In((()=>({setPositionReference:u})),[]),h=In((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return In((()=>({dataRef:o,open:t,onOpenChange:c,elements:h,events:s,floatingId:i,refs:d})),[t,c,h,s,i,d])}function Jb(e){void 0===e&&(e={});const{nodeId:t}=e,n=Zb({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,s]=On(null),[a,l]=On(null),u=(null==i?void 0:i.reference)||o,c=Dn(null),d=Qb();Gb((()=>{u&&(c.current=u)}),[u]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=On({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=On(r);Ob(h,r)||p(r);const[f,m]=On(null),[v,g]=On(null),y=jn((e=>{e!==x.current&&(x.current=e,m(e))}),[]),_=jn((e=>{e!==S.current&&(S.current=e,g(e))}),[]),w=o||f,b=s||v,x=Dn(null),S=Dn(null),k=Dn(c),E=null!=l,P=Lb(l),T=Lb(i),A=Lb(u),C=jn((()=>{if(!x.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};T.current&&(e.platform=T.current),Cb(x.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};R.current&&!Ob(k.current,t)&&(k.current=t,Gr((()=>{d(t)})))}))}),[h,t,n,T,A]);Rb((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const R=Dn(!1);Rb((()=>(R.current=!0,()=>{R.current=!1})),[]),Rb((()=>{if(w&&(x.current=w),b&&(S.current=b),w&&b){if(P.current)return P.current(w,b,C);C()}}),[w,b,C,P,E]);const O=In((()=>({reference:x,floating:S,setReference:y,setFloating:_})),[y,_]),F=In((()=>({reference:w,floating:b})),[w,b]),M=In((()=>{const e={position:n,left:0,top:0};if(!F.floating)return e;const t=Mb(F.floating,c.x),r=Mb(F.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Fb(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,F.floating,c.x,c.y]);return In((()=>({...c,update:C,refs:O,elements:F,floatingStyles:M})),[c,C,O,F,M])}({...e,elements:{...i,...a&&{reference:a}}}),p=jn((e=>{const t=Aw(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),f=jn((e=>{(Aw(e)||null===e)&&(c.current=e,s(e)),(Aw(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!Aw(e))&&h.refs.setReference(e)}),[h.refs]),m=In((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:c})),[h.refs,f,p]),v=In((()=>({...h.elements,domReference:u})),[h.elements,u]),g=In((()=>({...h,...r,refs:m,elements:v,nodeId:t})),[h,m,v,t,r]);return Gb((()=>{r.dataRef.current.floatingContext=g;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=g)})),In((()=>({...h,context:g,refs:m,elements:v})),[h,m,v,g])}const ex="active",tx="selected";function nx(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[ex]:t,[tx]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[Xb]:""},...o,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,o]=t;var s;i&&[ex,tx].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(s=r.get(n))||s.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}function rx(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const ix=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Xw(e,t),{rects:d,elements:{floating:h}}=t,p=n.current[s],f=(null==u?void 0:u.current)||h,m=h.clientTop||f.clientTop,v=0!==h.clientTop,g=0!==f.clientTop,y=h===f;if(!p)return{};const _={...t,...await Db(-p.offsetTop-h.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(t)},w=await kb(rx(_,f.scrollHeight+m+h.clientTop),c),b=await kb(_,{...c,elementContext:"reference"}),x=Hw(0,w.top),S=_.y+x,k=$w(Hw(0,f.scrollHeight+(v&&y||g?2*m:0)-x-Hw(0,w.bottom)));if(f.style.maxHeight=k+"px",f.scrollTop=x,i){const e=f.scrollHeight>f.offsetHeight&&f.offsetHeight<p.offsetHeight*a-1||b.top>=-l||b.bottom>=-l;Gr((()=>i(e)))}return r&&(r.current=await kb(rx({..._,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function ox(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=t,l=Ub(a),u=Dn(!1),c=Dn(null),d=Dn(null);Mn((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const n=e.deltaY,r=o.current.top>=-.5,i=o.current.bottom>=-.5,s=t.scrollHeight-t.clientHeight,a=n<0?-1:1,u=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),Gr((()=>{l((e=>e+Math[u](n,s*a)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==s?void 0:s.current)||r.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{c.current=t.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{c.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,r.floating,o,s,l]);const h=In((()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const e=(null==s?void 0:s.current)||r.floating;if(o.current&&e&&u.current){if(null!==c.current){const t=e.scrollTop-c.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&Gr((()=>l((e=>e+t))))}requestAnimationFrame((()=>{c.current=e.scrollTop}))}}})),[r.floating,l,o,s]);return In((()=>i?{floating:h}:{}),[i,h])}let sx=ot({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});sx.displayName="FloatingContext";let ax=ot(null);ax.displayName="PlacementContext";let lx=4;function ux({children:e,enabled:t=!0}){let[n,r]=On(null),[i,o]=On(0),s=Dn(null),[a,l]=On(null);!function(e){Dy((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(a);let u=t&&null!==n&&null!==a,{to:c="bottom",gap:d=0,offset:h=0,padding:p=0,inner:f}=function(e,t){var n,r,i;let o=cx(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=cx(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=cx(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:a}}(n,a),[m,v="center"]=c.split(" ");Dy((()=>{u&&o(0)}),[u]);let{refs:g,floatingStyles:y,context:_}=Jb({open:u,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[Db({mainAxis:"selection"===m?0:d,crossAxis:h}),Vb({padding:p}),"selection"!==m&&Ib({padding:p}),"selection"===m&&f?ix({...f,padding:p,overflowRef:s,offset:i,minItemsVisible:lx,referenceOverflowThreshold:p,onFallbackChange(e){var t,n;if(!e)return;let r=_.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,s=Math.min(lx,r.childElementCount),a=0,l=0;for(let o of null!=(n=null==(t=_.elements.floating)?void 0:t.childNodes)?n:[])if(o instanceof HTMLElement){let e=o.offsetTop,t=e+o.clientHeight+i,n=r.scrollTop,u=n+r.clientHeight;if(!(e>=n&&t<=u)){l=Math.max(0,Math.min(t,u)-Math.max(e,n)),a=o.clientHeight;break}s--}s>=1&&o((e=>{let t=a*s-l+i;return e>=t?e:t}))}}):null,jb({padding:p,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Sb}),[w=m,b=v]=_.placement.split("-");"selection"===m&&(w="selection");let x=In((()=>({anchor:[w,b].filter(Boolean).join(" ")})),[w,b]),S=ox(_,{overflowRef:s,onChange:o}),{getReferenceProps:k,getFloatingProps:E}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),i=jn((t=>nx(t,e,"reference")),t),o=jn((t=>nx(t,e,"floating")),n),s=jn((t=>nx(t,e,"item")),r);return In((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s})),[i,o,s])}([S]),P=Iy((e=>{l(e),g.setFloating(e)}));return De(ax.Provider,{value:r},De(sx.Provider,{value:{setFloating:P,setReference:g.setReference,styles:y,getReferenceProps:k,getFloatingProps:E,slot:x}},e))}function cx(e,t,n=void 0){let r=Ly(),i=Iy(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let i=hx(e,t);return[i,n=>{let o=dx(e);{let s=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));r.requestAnimationFrame((function a(){r.nextFrame(a);let l=!1;for(let[e,n]of o.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let u=hx(e,t);i!==u&&(n(u),i=u)}))}return r.dispose}]}return[n,null]})),o=In((()=>i(e,t)[0]),[e,t]),[s=o,a]=On();return Dy((()=>{let[n,r]=i(e,t);if(a(n),r)return r(a)}),[e,t]),s}function dx(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...dx(r)]:[n]}return[]}function hx(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}let px=ot(null);px.displayName="OpenClosedContext";var fx=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(fx||{});function mx(){return Bn(px)}function vx({value:e,children:t}){return Xr.createElement(px.Provider,{value:e},t)}var gx,yx=((gx=yx||{})[gx.First=0]="First",gx[gx.Previous=1]="Previous",gx[gx.Next=2]="Next",gx[gx.Last=3]="Last",gx[gx.Specific=4]="Specific",gx[gx.Nothing=5]="Nothing",gx);function _x(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function wx(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Zr&&(e=>e.useSyncExternalStore)(Zr)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=On(Ry.isHandoffComplete);return t&&!1===Ry.isHandoffComplete&&n(!1),Mn((()=>{!0!==t&&n(!0)}),[t]),Mn((()=>Ry.handoff()),[]),!e&&t}let bx=ot(!1);function xx(e){let t=Bn(bx),n=Bn(Px),r=hw(e),[i,o]=On((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e:null;if(Ry.isServer)return null;let i=null==r?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)}));return Mn((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),Mn((()=>{t||null!==n&&o(n.current)}),[n,o,t]),i}let Sx=je,kx=Jy((function(e,t){let n=e,r=Dn(null),i=w_(function(e,t=!0){return Object.assign(e,{[__]:t})}((e=>{r.current=e})),t),o=hw(r),s=xx(r),[a]=On((()=>{var e;return Ry.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=Bn(Tx),u=wx();return Dy((()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))}),[s,a]),Dy((()=>{if(a&&l)return l.register(a)}),[l,a]),function(e){let t=Iy(e),n=Dn(!1);Mn((()=>(n.current=!1,()=>{n.current=!0,Fy((()=>{n.current&&t()}))})),[t])}((()=>{var e;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s)))})),u&&s&&a?mr(Ky({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:Sx,name:"Portal"}),a):null}));let Ex=je,Px=ot(null);let Tx=ot(null),Ax=Jy((function(e,t){let n=w_(t),{enabled:r=!0,...i}=e;return r?Xr.createElement(kx,{...i,ref:n}):Ky({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:Sx,name:"Portal"})})),Cx=Jy((function(e,t){let{target:n,...r}=e,i={ref:w_(t)};return Xr.createElement(Px.Provider,{value:n},Ky({ourProps:i,theirProps:r,defaultTag:Ex,name:"Popover.Group"}))})),Rx=Object.assign(Ax,{Group:Cx});function Ox(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:Ix)!==je||1===Xr.Children.count(e.children)}let Fx=ot(null);Fx.displayName="TransitionContext";var Mx=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Mx||{});let Lx=ot(null);function Dx(e){return"children"in e?Dx(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Vx(e,t){let n=Vy(e),r=Dn([]),i=function(){let e=Dn(!1);return Dy((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),o=Ly(),s=Iy(((e,t=qy.Hidden)=>{let s=r.current.findIndex((({el:t})=>t===e));-1!==s&&(Wy(t,{[qy.Unmount](){r.current.splice(s,1)},[qy.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var e;!Dx(r)&&i.current&&(null==(e=n.current)||e.call(n))})))})),a=Iy((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>s(e,qy.Unmount)})),l=Dn([]),u=Dn(Promise.resolve()),c=Dn({enter:[],leave:[]}),d=Iy(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(c.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?u.current=u.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),h=Iy(((e,t,n)=>{Promise.all(c.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return In((()=>({children:r,register:a,unregister:s,onStart:d,onStop:h,wait:u,chains:c})),[a,s,r,d,h,c,u])}Lx.displayName="NestingContext";let Ix=je,jx=zy.RenderStrategy;let Bx=Jy((function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,s=Dn(null),a=w_(...Ox(e)?[s,t]:null===t?[]:[t]);wx();let l=mx();if(void 0===n&&null!==l&&(n=(l&fx.Open)===fx.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=On(n?"visible":"hidden"),d=Vx((()=>{n||c("hidden")})),[h,p]=On(!0),f=Dn([n]);Dy((()=>{!1!==h&&f.current[f.current.length-1]!==n&&(f.current.push(n),p(!1))}),[f,n]);let m=In((()=>({show:n,appear:r,initial:h})),[n,r,h]);Dy((()=>{n?c("visible"):!Dx(d)&&null!==s.current&&c("hidden")}),[n,d]);let v={unmount:i},g=Iy((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),y=Iy((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return Xr.createElement(Lx.Provider,{value:d},Xr.createElement(Fx.Provider,{value:m},Ky({ourProps:{...v,as:je,children:Xr.createElement(Nx,{ref:a,...v,...o,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:je,features:jx,visible:"visible"===u,name:"Transition"})))})),Nx=Jy((function(e,t){var n,r;let{transition:i=!0,beforeEnter:o,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:d,entered:h,leave:p,leaveFrom:f,leaveTo:m,...v}=e,[g,y]=On(null),_=Dn(null),w=Ox(e),b=w_(...w?[_,t,y]:null===t?[]:[t]),x=null==(n=v.unmount)||n?qy.Unmount:qy.Hidden,{show:S,appear:k,initial:E}=function(){let e=Bn(Fx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[P,T]=On(S?"visible":"hidden"),A=function(){let e=Bn(Lx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:C,unregister:R}=A;Dy((()=>C(_)),[C,_]),Dy((()=>{if(x===qy.Hidden&&_.current)return S&&"visible"!==P?void T("visible"):Wy(P,{hidden:()=>R(_),visible:()=>C(_)})}),[P,_,C,R,S,x]);let O=wx();Dy((()=>{if(w&&O&&"visible"===P&&null===_.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[_,P,O,w]);let F=E&&!k,M=k&&S&&E,L=Dn(!1),D=Vx((()=>{L.current||(T("hidden"),R(_))}),A),V=Iy((e=>{L.current=!0;let t=e?"enter":"leave";D.onStart(_,t,(e=>{"enter"===e?null==o||o():"leave"===e&&(null==a||a())}))})),I=Iy((e=>{let t=e?"enter":"leave";L.current=!1,D.onStop(_,t,(e=>{"enter"===e?null==s||s():"leave"===e&&(null==l||l())})),"leave"===t&&!Dx(D)&&(T("hidden"),R(_))}));Mn((()=>{w&&i||(V(S),I(S))}),[S,w,i]);let j=(()=>!(!i||!w||!O||F))(),[,B]=xw(j,g,S,{start:V,end:I}),N=e_({ref:b,className:(null==(r=Gy(v.className,M&&u,M&&c,B.enter&&u,B.enter&&B.closed&&c,B.enter&&!B.closed&&d,B.leave&&p,B.leave&&!B.closed&&f,B.leave&&B.closed&&m,!B.transition&&S&&h))?void 0:r.trim())||void 0,...bw(B)}),U=0;return"visible"===P&&(U|=fx.Open),"hidden"===P&&(U|=fx.Closed),B.enter&&(U|=fx.Opening),B.leave&&(U|=fx.Closing),Xr.createElement(Lx.Provider,{value:D},Xr.createElement(vx,{value:U},Ky({ourProps:N,theirProps:v,defaultTag:Ix,features:jx,visible:"visible"===P,name:"Transition.Child"})))})),Ux=Jy((function(e,t){let n=null!==Bn(Fx),r=null!==mx();return Xr.createElement(Xr.Fragment,null,!n&&r?Xr.createElement(Bx,{ref:t,...e}):Xr.createElement(Nx,{ref:t,...e}))})),Gx=Object.assign(Bx,{Child:Ux,Root:Bx});let Wx=Jy((function(e,t){let n=`headlessui-control-${Un()}`,[r,i]=F_(),[o,s]=k_(),a=Ny(),{disabled:l=a||!1,...u}=e,c=In((()=>({disabled:l})),[l]);return Xr.createElement(Uy,{value:l},Xr.createElement(i,{value:r},Xr.createElement(s,{value:o},Xr.createElement(g_,{id:n},Ky({ourProps:{ref:t,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...u,children:Xr.createElement(d_,null,"function"==typeof u.children?u.children(c):u.children)},slot:c,defaultTag:"div",name:"Field"})))))}));let Hx=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function $x(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?null!=(n=i.innerText)?n:"":r;return Hx.test(s)&&(s=s.replace(Hx,"")),s}function zx(e){let t=Dn(""),n=Dn("");return Iy((()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():$x(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return $x(e).trim()}(r).trim().toLowerCase();return t.current=i,n.current=o,o}))}var qx=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(qx||{}),Kx=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Kx||{}),Yx=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Yx||{}),Qx=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(Qx||{});function Xx(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=ow(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Zx={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex((e=>n(e.dataRef.current.value)));return-1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,i,o,s;if(e.dataRef.current.disabled||1===e.listboxState)return e;let a={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===yx.Nothing)return{...a,activeOptionIndex:null};if(t.focus===yx.Specific)return{...a,activeOptionIndex:e.options.findIndex((e=>e.id===t.id))};if(t.focus===yx.Previous){let n=e.activeOptionIndex;if(null!==n){let o=e.options[n].dataRef.current.domRef,s=_x(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.options[s].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.previousElementSibling)===t.current||null===(null==(i=t.current)?void 0:i.previousElementSibling))return{...a,activeOptionIndex:s}}}}else if(t.focus===yx.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,i=_x(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.options[i].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.nextElementSibling)===t.current||null===(null==(s=t.current)?void 0:s.nextElementSibling))return{...a,activeOptionIndex:i}}}}let l=Xx(e),u=_x(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=i?e.options.indexOf(i):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Xx(e,(e=>[...e,n]));return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Xx(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},Jx=ot(null);function eS(e){let t=Bn(Jx);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eS),t}return t}Jx.displayName="ListboxActionsContext";let tS=ot(null);function nS(e){let t=Bn(tS);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,nS),t}return t}function rS(e,t){return Wy(t.type,Zx,e,t)}tS.displayName="ListboxDataContext";let iS=je;let oS=ot(!1),sS=zy.RenderStrategy|zy.Static;let aS=je;let lS=Jy((function(e,t){var n;let r=Ny(),{value:i,defaultValue:o,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:d=r||!1,horizontal:h=!1,multiple:p=!1,__demoMode:f=!1,...m}=e;const v=h?"horizontal":"vertical";let g=w_(t),y=r_(o),[_=(p?[]:void 0),w]=n_(i,l,y),[b,x]=Fn(rS,{dataRef:{current:null},listboxState:f?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:f}),S=Dn({static:!1,hold:!1}),k=Dn(new Map),E=function(e=D_){return jn(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(u),P=jn((e=>Wy(T.mode,{1:()=>_.some((t=>E(t,e))),0:()=>E(_,e)})),[_]),T=In((()=>({...b,value:_,disabled:d,invalid:c,mode:p?1:0,orientation:v,compare:E,isSelected:P,optionsPropsRef:S,listRef:k})),[_,d,c,p,b,k]);Dy((()=>{b.dataRef.current=T}),[T]),dw(0===T.listboxState,[T.buttonElement,T.optionsElement],((e,t)=>{var n;x({type:1}),nw(t,tw.Loose)||(e.preventDefault(),null==(n=T.buttonElement)||n.focus())}));let A=In((()=>({open:0===T.listboxState,disabled:d,invalid:c,value:_})),[T,d,_,c]),C=Iy((e=>{let t=T.options.find((t=>t.id===e));t&&V(t.dataRef.current.value)})),R=Iy((()=>{if(null!==T.activeOptionIndex){let{dataRef:e,id:t}=T.options[T.activeOptionIndex];V(e.current.value),x({type:2,focus:yx.Specific,id:t})}})),O=Iy((()=>x({type:0}))),F=Iy((()=>x({type:1}))),M=Ly(),L=Iy(((e,t,n)=>{M.dispose(),M.microTask((()=>e===yx.Specific?x({type:2,focus:yx.Specific,id:t,trigger:n}):x({type:2,focus:e,trigger:n})))})),D=Iy(((e,t)=>(x({type:5,id:e,dataRef:t}),()=>x({type:6,id:e})))),V=Iy((e=>Wy(T.mode,{0:()=>null==w?void 0:w(e),1(){let t=T.value.slice(),n=t.findIndex((t=>E(t,e)));return-1===n?t.push(e):t.splice(n,1),null==w?void 0:w(t)}}))),I=Iy((e=>x({type:3,value:e}))),j=Iy((()=>x({type:4}))),B=Iy((e=>{x({type:7,element:e})})),N=Iy((e=>{x({type:8,element:e})})),U=In((()=>({onChange:V,registerOption:D,goToOption:L,closeListbox:F,openListbox:O,selectActiveOption:R,selectOption:C,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[G,W]=F_({inherit:!0}),H={ref:g},$=jn((()=>{if(void 0!==y)return null==w?void 0:w(y)}),[w,y]);return Xr.createElement(W,{value:G,props:{htmlFor:null==(n=T.buttonElement)?void 0:n.id},slot:{open:0===T.listboxState,disabled:d}},Xr.createElement(ux,null,Xr.createElement(Jx.Provider,{value:U},Xr.createElement(tS.Provider,{value:T},Xr.createElement(vx,{value:Wy(T.listboxState,{0:fx.Open,1:fx.Closed})},null!=a&&null!=_&&Xr.createElement(p_,{disabled:d,data:{[a]:_},form:s,onReset:$}),Ky({ourProps:H,theirProps:m,slot:A,defaultTag:iS,name:"Listbox"}))))))})),uS=Jy((function(e,t){var n;let r=nS("Listbox.Button"),i=eS("Listbox.Button"),o=Un(),s=v_(),{id:a=s||`headlessui-listbox-button-${o}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...c}=e,d=function(){let e=Dn([]),t=jn((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}(),h=w_(t,Bn(sx).setReference,i.setButtonElement),p=Bn(sx).getReferenceProps,f=Iy((e=>{switch(e.key){case A_.Enter:a_(e.currentTarget);break;case A_.Space:case A_.ArrowDown:e.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(yx.First);break;case A_.ArrowUp:e.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(yx.Last)}})),m=Iy((e=>{if(e.key===A_.Space)e.preventDefault()})),v=Iy((e=>{var t;if(y_(e.currentTarget))return e.preventDefault();0===r.listboxState?(Gr((()=>i.closeListbox())),null==(t=r.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),i.openListbox())})),g=Iy((e=>e.preventDefault())),y=O_([a]),_=S_(),{isFocusVisible:w,focusProps:b}=Ty({autoFocus:u}),{isHovered:x,hoverProps:S}=Py({isDisabled:l}),{pressed:k,pressProps:E}=jy({disabled:l}),P=In((()=>({open:0===r.listboxState,active:k||0===r.listboxState,disabled:l,invalid:r.invalid,value:r.value,hover:x,focus:w,autofocus:u})),[r.listboxState,r.value,l,x,w,k,r.invalid,u]);return Ky({mergeRefs:d,ourProps:Zy(p(),{ref:h,id:a,type:pw(e,r.buttonElement),"aria-haspopup":"listbox","aria-controls":null==(n=r.optionsElement)?void 0:n.id,"aria-expanded":0===r.listboxState,"aria-labelledby":y,"aria-describedby":_,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:m,onKeyPress:g,onClick:v},b,S,E),theirProps:c,slot:P,defaultTag:"button",name:"Listbox.Button"})})),cS=L_,dS=Jy((function(e,t){var n,r;let i=Un(),{id:o=`headlessui-listbox-options-${i}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,d=function(e){return In((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(s),[h,p]=On(null);d&&(a=!0);let f=nS("Listbox.Options"),m=eS("Listbox.Options"),v=hw(f.optionsElement),g=mx(),[y,_]=xw(u,h,null!==g?(g&fx.Open)===fx.Open:0===f.listboxState);!function(e,t,n){let r=Vy((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));Mn((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let i=My();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}return()=>i.dispose()}),[t,r,e])}(y,f.buttonElement,m.closeListbox),gw(!f.__demoMode&&(l&&0===f.listboxState),v),function(e,{allowed:t,disallowed:n}={}){let r=U_(e,"inert-others");Dy((()=>{var e,i;if(!r)return;let o=My();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&o.add(H_(t));let s=null!=(i=null==t?void 0:t())?i:[];for(let t of s){if(!t)continue;let e=Oy(t);if(!e)continue;let n=t.parentElement;for(;n&&n!==e.body;){for(let e of n.children)s.some((t=>e.contains(t)))||o.add(H_(e));n=n.parentElement}}return o.dispose}),[r,t,n])}(!f.__demoMode&&(l&&0===f.listboxState),{allowed:jn((()=>[f.buttonElement,f.optionsElement]),[f.buttonElement,f.optionsElement])});let w=!function(e,t){let n=Dn({left:0,top:0});if(Dy((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(n.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}(0!==f.listboxState,f.buttonElement)&&y,b=function(e,t){let[n,r]=On(t);return!e&&n!==t&&r(t),e?n:t}(y&&1===f.listboxState,f.value),x=Iy((e=>f.compare(b,e))),S=In((()=>{var e;if(null==d||null==(e=null==d?void 0:d.to)||!e.includes("selection"))return null;let t=f.options.findIndex((e=>x(e.dataRef.current.value)));return-1===t&&(t=0),t}),[d,f.options]),k=(()=>{if(null==d)return;if(null===S)return{...d,inner:void 0};let e=Array.from(f.listRef.current.values());return{...d,inner:{listRef:{current:e},index:S}}})(),[E,P]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=Bn(ax),n=In((()=>e),[JSON.stringify(e,"undefined"!=typeof HTMLElement?(e,t)=>t instanceof HTMLElement?t.outerHTML:t:void 0)]);Dy((()=>{null==t||t(null!=n?n:null)}),[t,n]);let r=Bn(sx);return In((()=>[r.setFloating,e?r.styles:{}]),[r.setFloating,e,r.styles])}(k),T=function(){let{getFloatingProps:e,slot:t}=Bn(sx);return jn(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),A=w_(t,d?E:null,m.setOptionsElement,p),C=Ly();Mn((()=>{var e;let t=f.optionsElement;t&&0===f.listboxState&&t!==(null==(e=Oy(t))?void 0:e.activeElement)&&(null==t||t.focus({preventScroll:!0}))}),[f.listboxState,f.optionsElement]);let R=Iy((e=>{var t,n;switch(C.dispose(),e.key){case A_.Space:if(""!==f.searchQuery)return e.preventDefault(),e.stopPropagation(),m.search(e.key);case A_.Enter:if(e.preventDefault(),e.stopPropagation(),null!==f.activeOptionIndex){let{dataRef:e}=f.options[f.activeOptionIndex];m.onChange(e.current.value)}0===f.mode&&(Gr((()=>m.closeListbox())),null==(t=f.buttonElement)||t.focus({preventScroll:!0}));break;case Wy(f.orientation,{vertical:A_.ArrowDown,horizontal:A_.ArrowRight}):return e.preventDefault(),e.stopPropagation(),m.goToOption(yx.Next);case Wy(f.orientation,{vertical:A_.ArrowUp,horizontal:A_.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),m.goToOption(yx.Previous);case A_.Home:case A_.PageUp:return e.preventDefault(),e.stopPropagation(),m.goToOption(yx.First);case A_.End:case A_.PageDown:return e.preventDefault(),e.stopPropagation(),m.goToOption(yx.Last);case A_.Escape:return e.preventDefault(),e.stopPropagation(),Gr((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case A_.Tab:e.preventDefault(),e.stopPropagation(),Gr((()=>m.closeListbox())),sw(f.buttonElement,e.shiftKey?X_.Previous:X_.Next);break;default:1===e.key.length&&(m.search(e.key),C.setTimeout((()=>m.clearSearch()),350))}})),O=null==(n=f.buttonElement)?void 0:n.id,F=In((()=>({open:0===f.listboxState})),[f.listboxState]),M=Zy(d?T():{},{id:o,ref:A,"aria-activedescendant":null===f.activeOptionIndex||null==(r=f.options[f.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===f.mode||void 0,"aria-labelledby":O,"aria-orientation":f.orientation,onKeyDown:R,role:"listbox",tabIndex:0===f.listboxState?0:void 0,style:{...c.style,...P,"--button-width":V_(f.buttonElement,!0).width},...bw(_)});return Xr.createElement(Rx,{enabled:!!a&&(e.static||y)},Xr.createElement(tS.Provider,{value:1===f.mode?f:{...f,isSelected:x}},Ky({ourProps:M,theirProps:c,slot:F,defaultTag:"div",features:sS,visible:w,name:"Listbox.Options"})))})),hS=Jy((function(e,t){let n=Un(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=e,a=!0===Bn(oS),l=nS("Listbox.Option"),u=eS("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===r,d=l.isSelected(o),h=Dn(null),p=zx(h),f=Vy({disabled:i,value:o,domRef:h,get textValue(){return p()}}),m=w_(t,h,(e=>{e?l.listRef.current.set(r,e):l.listRef.current.delete(r)}));Dy((()=>{if(!l.__demoMode&&0===l.listboxState&&c&&0!==l.activationTrigger)return My().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=h.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),Dy((()=>{if(!a)return u.registerOption(r,f)}),[f,r,a]);let v=Iy((e=>{var t;if(i)return e.preventDefault();u.onChange(o),0===l.mode&&(Gr((()=>u.closeListbox())),null==(t=l.buttonElement)||t.focus({preventScroll:!0}))})),g=Iy((()=>{if(i)return u.goToOption(yx.Nothing);u.goToOption(yx.Specific,r)})),y=function(){let e=Dn([-1,-1]);return{wasMoved(t){let n=yw(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=yw(t)}}}(),_=Iy((e=>{y.update(e),!i&&(c||u.goToOption(yx.Specific,r,0))})),w=Iy((e=>{y.wasMoved(e)&&(i||c||u.goToOption(yx.Specific,r,0))})),b=Iy((e=>{y.wasMoved(e)&&(i||c&&u.goToOption(yx.Nothing))})),x=In((()=>({active:c,focus:c,selected:d,disabled:i,selectedOption:d&&a})),[c,d,i,a]);return!d&&a?null:Ky({ourProps:a?{}:{id:r,ref:m,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":d,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:_,onMouseEnter:_,onPointerMove:w,onMouseMove:w,onPointerLeave:b,onMouseLeave:b},theirProps:s,slot:x,defaultTag:"div",name:"Listbox.Option"})})),pS=Jy((function(e,t){let{options:n,placeholder:r,...i}=e,o={ref:w_(t)},s=nS("ListboxSelectedOption"),a=In((()=>({})),[]),l=void 0===s.value||null===s.value||1===s.mode&&Array.isArray(s.value)&&0===s.value.length;return Xr.createElement(oS.Provider,{value:!0},Ky({ourProps:o,theirProps:{...i,children:Xr.createElement(Xr.Fragment,null,r&&l?r:n)},slot:a,defaultTag:aS,name:"ListboxSelectedOption"}))})),fS=Object.assign(lS,{Button:uS,Label:cS,Options:dS,Option:hS,SelectedOption:pS}),mS=ot(null);mS.displayName="GroupContext";let vS=je;let gS=Jy((function(e,t){var n;let r=Un(),i=v_(),o=Ny(),{id:s=i||`headlessui-switch-${r}`,disabled:a=o||!1,checked:l,defaultChecked:u,onChange:c,name:d,value:h,form:p,autoFocus:f=!1,...m}=e,v=Bn(mS),[g,y]=On(null),_=w_(Dn(null),t,null===v?null:v.setSwitch,y),w=r_(u),[b,x]=n_(l,c,null!=w&&w),S=Ly(),[k,E]=On(!1),P=Iy((()=>{E(!0),null==x||x(!b),S.nextFrame((()=>{E(!1)}))})),T=Iy((e=>{if(y_(e.currentTarget))return e.preventDefault();e.preventDefault(),P()})),A=Iy((e=>{e.key===A_.Space?(e.preventDefault(),P()):e.key===A_.Enter&&a_(e.currentTarget)})),C=Iy((e=>e.preventDefault())),R=O_(),O=S_(),{isFocusVisible:F,focusProps:M}=Ty({autoFocus:f}),{isHovered:L,hoverProps:D}=Py({isDisabled:a}),{pressed:V,pressProps:I}=jy({disabled:a}),j=In((()=>({checked:b,disabled:a,hover:L,focus:F,active:V,autofocus:f,changing:k})),[b,L,F,V,a,k,f]),B=Zy({id:s,ref:_,role:"switch",type:pw(e,g),tabIndex:-1===e.tabIndex?0:null!=(n=e.tabIndex)?n:0,"aria-checked":b,"aria-labelledby":R,"aria-describedby":O,disabled:a||void 0,autoFocus:f,onClick:T,onKeyUp:A,onKeyPress:C},M,D,I),N=jn((()=>{if(void 0!==w)return null==x?void 0:x(w)}),[x,w]);return Xr.createElement(Xr.Fragment,null,null!=d&&Xr.createElement(p_,{disabled:a,data:{[d]:h||"on"},overrides:{type:"checkbox",checked:b},form:p,onReset:N}),Ky({ourProps:B,theirProps:m,slot:j,defaultTag:"button",name:"Switch"}))})),yS=function(e){var t;let[n,r]=On(null),[i,o]=F_(),[s,a]=k_(),l=In((()=>({switch:n,setSwitch:r})),[n,r]),u=e;return Xr.createElement(a,{name:"Switch.Description",value:s},Xr.createElement(o,{name:"Switch.Label",value:i,props:{htmlFor:null==(t=l.switch)?void 0:t.id,onClick(e){n&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},Xr.createElement(mS.Provider,{value:l},Ky({ourProps:{},theirProps:u,slot:{},defaultTag:vS,name:"Switch.Group"}))))},_S=L_,wS=P_,bS=Object.assign(gS,{Group:yS,Label:_S,Description:wS});function xS(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function SS(e,t,n){var r=[],i=Ei(e,r,n);return r.length<2?n:i+t(r)}var kS=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=e(i);else for(var s in o="",i)i[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},ES=function(e){var t=wn(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ni(n,t.registered,void 0);return Ti(t,i,!1),t.key+"-"+i.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return SS(t.registered,n,kS(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ni(n,t.registered);xS(t,i)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ni(n,t.registered),o="animation-"+i.name;return xS(t,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Ei.bind(null,t.registered),merge:SS.bind(null,t.registered,n)}}({key:"css"}),PS=ES.cx,TS=ES.css;const AS=Fs(uS)`
46
46
  ${{position:"relative",minHeight:"2.25rem",width:"100%",cursor:"pointer",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",paddingRight:"2.5rem",textAlign:"left",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-inset":"inset",":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.5rem"},"@media (min-width: 768px)":{paddingTop:"0.375rem",paddingBottom:"0.375rem"}}}
47
47
 
48
- ${({hasError:t})=>t?{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(252 165 165 / var(--tw-ring-opacity))",":focus":{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity))"}}:{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(209 213 219 / var(--tw-ring-opacity))",":focus":{"--tw-ring-color":"var(--fl-color-primary-600)"}}}
49
- `,hS=Ms(g_)`
48
+ ${({hasError:e})=>e?{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(252 165 165 / var(--tw-ring-opacity))",":focus":{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity))"}}:{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(209 213 219 / var(--tw-ring-opacity))",":focus":{"--tw-ring-color":"var(--fl-color-primary-600)"}}}
49
+ `,CS=Fs(L_)`
50
50
  ${{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}}
51
- `,pS=(t,e)=>{var n;return t?(null==(n=e.find((e=>e.key==t)))?void 0:n.displayValue)??"Select":"Select"},fS=(t,e)=>t&&Array.isArray(t)&&0!==t.length?t.map((t=>{var n;return null==(n=e.find((e=>e.key==t)))?void 0:n.displayValue})).join(", "):"Select",mS=er((({label:t,items:e,value:n,className:r,onChange:i,error:o,helperText:s,isMultiSelect:a},l)=>oo("div",{className:r,children:[io(Xx,{value:n||(a?[]:""),onChange:t=>{if(a){const n=t,r=t.findIndex((t=>{var n;return null==(n=e.find((e=>e.key==t)))?void 0:n.isReset}));0===r&&n.length>1?i([...n.slice(1)]):i(r>-1?[n[r]]:t)}else i(t)},multiple:a,children:({open:r})=>oo(ro,{children:[io(hS,{children:t}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[oo(dS,{as:"button",ref:l,hasError:!!o,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a?fS(n,e):pS(n,e)}),io("span",{css:{pointerEvents:"none",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"#4b5563",paddingRight:"0.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:io(Js,{css:{height:"1.25rem",width:"1.25rem"},"aria-hidden":"true"})})]}),io(Ex,{show:r,leave:uS(cS({transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)",transitionDuration:"100ms"})),leaveFrom:uS(cS({opacity:"1"})),leaveTo:uS(cS({opacity:"0"})),children:io(Kx,{css:{position:"absolute",zIndex:"10",marginTop:"0.25rem",maxHeight:"15rem",width:"100%",overflow:"auto",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.25rem"}},children:e.map((t=>oo(Yx,{className:"group",css:{position:"relative",cursor:"default",userSelect:"none",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",paddingRight:"2.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","&[data-active]":{backgroundColor:"var(--fl-color-primary-600)","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},"&[data-selected]":{fontWeight:"600"}},value:t.key,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.displayValue}),io("span",{css:{visibility:"hidden",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingRight:"0.75rem",".group[data-selected] &":{visibility:"visible"},".group[data-active] &":{fill:"#fff"}},children:io(Xs,{css:{height:"1.25rem",width:"1.25rem",fill:"inherit"},"aria-hidden":"true"})})]},t.key)))})})]})]})}),o&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:o}),s&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:s})]}))),vS=t=>oo("div",{children:[oo(Px,{children:[io(g_,{as:"p",css:{fontSize:"0.875rem",lineHeight:"1.25rem"},children:io("span",{css:{fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:t.label})}),io(iS,{checked:t.value,onChange:t.onChange,className:"group",css:{position:"relative",marginTop:"0.5rem",display:"inline-flex",height:"1.5rem",width:"2.75rem",flexShrink:"0",cursor:"pointer",borderRadius:"9999px",borderWidth:"2px",borderColor:"transparent","--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(79 70 229 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px"},"&[data-checked]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}},children:io("span",{"aria-hidden":"true",css:{pointerEvents:"none",display:"inline-block",height:"1.25rem",width:"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",".group[data-checked] &":{"--tw-translate-x":"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}}})})]}),t.helperText&&io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:t.helperText})]}),gS=()=>{const t=function(){let{matches:t}=Bn(Ha),e=t[t.length-1];return e?e.params:{}}(),e=Ya(),{createPromotion:n,updatePromotion:r,getAllPromotions:i}=vo(),o=ds(),{isPending:s,error:a,data:l}=Es({queryKey:[vl],queryFn:i}),u=function(t){const e=ds(),[n]=On((()=>new us(e,t)));Fn((()=>{n.setOptions(t)}),[n,t]);const r=Yr(jn((t=>n.subscribe(zo.batchCalls(t))),[n]),(()=>n.getCurrentResult())),i=jn(((t,e)=>{n.mutate(t,e).catch(ys)}),[n]);if(r.error&&gs(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}({mutationFn:t.promotionId?r(t.promotionId):n,onSuccess:()=>o.invalidateQueries({queryKey:[vl]})}),c=uo(),d=In((()=>((t,e)=>{var n;return e?{id:e.id,category:e.category.title,promotionStatus:"Enabled"===e.status,contentfulUrl:(null==(n=e.contentfulContent)?void 0:n.contentId)?`${yl(t)}/entries/${e.contentfulContent.contentId}?focusedField=slug`:void 0,ignoreAudiencesIfUserNotFound:e.ignoreAudiencesIfUserNotFound??!1}:void 0})(c.backend,null==l?void 0:l.data.find((e=>e.id===t.promotionId)))),[c.backend,null==l?void 0:l.data,t.promotionId]),{handleSubmit:h,control:p}=function(t={}){const e=Xr.useRef(),n=Xr.useRef(),[r,i]=Xr.useState({isDirty:!1,isValidating:!1,isLoading:Xv(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:Xv(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...Mg(t),formState:r});const o=e.current.control;return o._options=t,Nv({subject:o._subjects.state,next:t=>{Iv(t,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Xr.useEffect((()=>o._disableForm(t.disabled)),[o,t.disabled]),Xr.useEffect((()=>{if(o._proxyFormState.isDirty){const t=o._getDirty();t!==r.isDirty&&o._subjects.state.next({isDirty:t})}}),[o,r.isDirty]),Xr.useEffect((()=>{t.values&&!pg(t.values,n.current)?(o._reset(t.values,o._options.resetOptions),n.current=t.values,i((t=>({...t})))):o._resetDefaultValues()}),[t.values,o]),Xr.useEffect((()=>{t.errors&&o._setErrors(t.errors)}),[t.errors,o]),Xr.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),Xr.useEffect((()=>{t.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[t.shouldUnregister,o]),e.current.formState=Dv(r,o),e.current}({mode:"onBlur",values:{id:t.promotionId||"",category:(null==d?void 0:d.category)||"",isEnabled:(null==d?void 0:d.promotionStatus)||!1,ignoreAudiencesIfUserNotFound:(null==d?void 0:d.ignoreAudiencesIfUserNotFound)||!1}}),f=t=>{const e={promotionId:(n=t).id,category:n.category,isEnabled:n.isEnabled,ignoreAudiencesIfUserNotFound:n.ignoreAudiencesIfUserNotFound};var n;u.mutate(e)};Fn((()=>{u.isSuccess&&e("/")}),[e,u]);const m=t.promotionId?"Edit":"Add";switch(!0){case"Edit"===m&&s:return io("div",{children:"Loading..."});case"Edit"===m&&!!a:return oo("div",{children:[io("p",{children:a.message}),io("button",{css:{marginTop:"1rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},onClick:()=>e("/"),children:"Back"})]});default:return oo("div",{css:{display:"flex",gap:"2rem",paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[io("div",{css:{marginTop:"1rem",verticalAlign:"top"},children:io("button",{onClick:()=>e("/"),children:"<"})}),oo("form",{onSubmit:h(f),children:[io("div",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"0",marginTop:"calc(3rem * calc(1 - var(--tw-space-y-reverse)))",marginBottom:"calc(3rem * var(--tw-space-y-reverse))"}},children:oo("div",{css:{borderBottomWidth:"1px",borderColor:"rgb(17 24 39 / 0.1)",paddingBottom:"3rem"},children:[oo("h2",{css:{fontSize:"1rem",lineHeight:"1.75rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:[m," Promotion"]}),oo("p",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:[m," a promoted benefit"]}),oo("div",{css:{marginTop:"2.5rem",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",columnGap:"1.5rem",rowGap:"2rem","@media (min-width: 640px)":{gridTemplateColumns:"repeat(6, minmax(0, 1fr))"}},children:[io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Hv,{name:"id",control:p,rules:{required:"Please provide an ID",pattern:{value:/^[a-z0-9\\-]+$/i,message:"Id must be lowercase and can only contain letters, numbers and hyphens."}},render:({field:t,fieldState:e})=>{var n;return io(Ws,{label:"Promotion Id",id:"id",type:"text",disabled:"Edit"==m,helperText:"This should be the same as the contentful slug",error:null==(n=e.error)?void 0:n.message,...t})}})}),"Edit"===m&&d&&oo("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:[io("label",{css:{marginBottom:"0.5rem",display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Contentful"}),d.contentfulUrl?oo("a",{href:d.contentfulUrl,target:"_blank",rel:"noopener noreferrer",css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:[io("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),io(Ls,{css:{marginTop:"auto",marginBottom:"auto",marginLeft:"0.25rem",height:"0.75rem",width:"0.75rem"}})]}):io("div",{css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(220 38 38 / 0.2)"},children:"Unlinked"})]}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Hv,{name:"category",control:p,rules:{required:"Please provide a category"},render:({field:t,fieldState:e})=>{var n;return io(mS,{items:[{key:"cars",displayValue:"Cars"},{key:"health",displayValue:"Health"},{key:"energy",displayValue:"Energy"},{key:"everyday",displayValue:"Everyday"},{key:"savingsAccount",displayValue:"Savings Account"},{key:"homeLoan",displayValue:"Home Loan"}],label:"Category",error:null==(n=e.error)?void 0:n.message,...t})}})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Hv,{name:"isEnabled",control:p,render:({field:t})=>io(vS,{label:"Enabled",id:"id",helperText:"A promotion will be shown to users if it is 'Enabled' and Contentful content is available.",...t})})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Hv,{name:"ignoreAudiencesIfUserNotFound",control:p,render:({field:t})=>io(vS,{label:"Ignore audiences if user does not exist",id:"id",helperText:"Show this promotion to a user even if they do not exist in Segment, regardless of the configured audiences.",...t})})})]})]})}),u.isError&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:u.error.message}),io("div",{css:{marginTop:"1.5rem",display:"flex",alignItems:"center",justifyContent:"flex-end",columnGap:"1.5rem"},children:u.isPending?io("div",{css:{fontSize:"0.875rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Loading..."}):io("button",{type:"submit",css:{borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:"Save"})})]})]})}},yS=t=>io(Jm.div,{css:{position:"absolute",bottom:"0px",left:"0px",right:"0px",top:"0px"},initial:{x:"forward"===t.direction?"100%":"-100%"},animate:{x:"0"},exit:{x:"forward"===t.direction?"-100%":"100%"},transition:{duration:.5,type:"spring"},children:io("div",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:io("div",{css:{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 640px)":{padding:"1.5rem"}},children:t.children})})}),_S=t=>{const e=qa(),[n,r]=On("forward");var i;return i={backend:{url:t.backendUrl,accessToken:t.accessToken}},lo=oe({...i,backend:{url:i.backend.url.replace(/\/?$/,""),accessToken:i.backend.accessToken}}),Fn((()=>{if("/"===e.pathname)r("forward");else r("backward")}),[e.pathname]),io("div",{class:"mx-auto max-w-7xl sm:px-6 lg:px-8 relative",children:io(sv,{initial:!1,children:oo(sl,{location:e,children:[io(il,{path:"/",element:io(yS,{direction:n,children:io(_l,{})})}),io(il,{path:"/promotion",element:io(yS,{direction:n,children:io(gS,{})})}),io(il,{path:"/promotion/:promotionId",element:io(yS,{direction:n,children:io(gS,{})})})]},e.pathname)})})};!function(t,e,n,r){function i(){var e=Reflect.construct(HTMLElement,[],i);return e._vdomComponent=t,e._root=r&&r.shadow?e.attachShadow({mode:r.mode||"open"}):e,e}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=ue,i.prototype.attributeChangedCallback=de,i.prototype.disconnectedCallback=he,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),i.observedAttributes=n,n.forEach((function(t){Object.defineProperty(i.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(t,e)}})})),customElements.define(e,i)}((t=>{const e=Dn(null),{EmotionProvider:n}=((t,e)=>{const[n,r]=On();return Fn((()=>{if(e&&e.current){const n=e=>{document.getElementsByTagName(t).length>0?e():requestAnimationFrame((()=>n(e)))};n((()=>{r(wn({container:e.current,key:t}))}))}}),[t,e]),{EmotionProvider:({children:t})=>n?io($i,{value:n,children:t}):io(ro,{})}})("promoted-benefits-admin",e);return oo(ro,{children:[io("head",{ref:e}),io(n,{children:io(hs,{client:ml(),children:oo(ul,{basename:t.hashRouteBase,children:[io(ao,{}),io("body",{children:io(_S,{...t})})]})})})]})}),"promoted-benefits-admin",["backend-url","access-token"],{shadow:!0})}();
51
+ `,RS=(e,t)=>{var n;return e?(null==(n=t.find((t=>t.key==e)))?void 0:n.displayValue)??"Select":"Select"},OS=(e,t)=>e&&Array.isArray(e)&&0!==e.length?e.map((e=>{var n;return null==(n=t.find((t=>t.key==e)))?void 0:n.displayValue})).join(", "):"Select",FS=tr((({label:e,items:t,value:n,className:r,onChange:i,error:o,helperText:s,isMultiSelect:a},l)=>oo("div",{className:r,children:[io(fS,{value:n||(a?[]:""),onChange:e=>{if(a){const n=e,r=e.findIndex((e=>{var n;return null==(n=t.find((t=>t.key==e)))?void 0:n.isReset}));0===r&&n.length>1?i([...n.slice(1)]):i(r>-1?[n[r]]:e)}else i(e)},multiple:a,children:({open:r})=>oo(ro,{children:[io(CS,{children:e}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[oo(AS,{as:"button",ref:l,hasError:!!o,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a?OS(n,t):RS(n,t)}),io("span",{css:{pointerEvents:"none",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"#4b5563",paddingRight:"0.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:io(ra,{css:{height:"1.25rem",width:"1.25rem"},"aria-hidden":"true"})})]}),io(Gx,{show:r,leave:PS(TS({transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)",transitionDuration:"100ms"})),leaveFrom:PS(TS({opacity:"1"})),leaveTo:PS(TS({opacity:"0"})),children:io(dS,{css:{position:"absolute",zIndex:"10",marginTop:"0.25rem",maxHeight:"15rem",width:"100%",overflow:"auto",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.25rem"}},children:t.map((e=>oo(hS,{className:"group",css:{position:"relative",cursor:"default",userSelect:"none",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",paddingRight:"2.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","&[data-active]":{backgroundColor:"var(--fl-color-primary-600)","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},"&[data-selected]":{fontWeight:"600"}},value:e.key,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.displayValue}),io("span",{css:{visibility:"hidden",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingRight:"0.75rem",".group[data-selected] &":{visibility:"visible"},".group[data-active] &":{fill:"#fff"}},children:io(ta,{css:{height:"1.25rem",width:"1.25rem",fill:"inherit"},"aria-hidden":"true"})})]},e.key)))})})]})]})}),o&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:o}),s&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:s})]}))),MS=e=>oo("div",{children:[oo(Wx,{children:[io(L_,{as:"p",css:{fontSize:"0.875rem",lineHeight:"1.25rem"},children:io("span",{css:{fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.label})}),io(bS,{checked:e.value,onChange:e.onChange,className:"group",css:{position:"relative",marginTop:"0.5rem",display:"inline-flex",height:"1.5rem",width:"2.75rem",flexShrink:"0",cursor:"pointer",borderRadius:"9999px",borderWidth:"2px",borderColor:"transparent","--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(79 70 229 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px"},"&[data-checked]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}},children:io("span",{"aria-hidden":"true",css:{pointerEvents:"none",display:"inline-block",height:"1.25rem",width:"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",".group[data-checked] &":{"--tw-translate-x":"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}}})})]}),e.helperText&&io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:e.helperText})]}),LS=tr(((e,t)=>{const{control:n,formState:{errors:r}}=Nv(),{fields:i,append:o,remove:s}=function(e){const t=Nv(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o}=e,[s,a]=Xr.useState(n._getFieldArray(r)),l=Xr.useRef(n._getFieldArray(r).map(Jv)),u=Xr.useRef(s),c=Xr.useRef(r),d=Xr.useRef(!1);c.current=r,u.current=s,n._names.array.add(r),e.rules&&n.register(r,e.rules),qv({next:({values:e,name:t})=>{if(t===c.current||!t){const t=Ev(e,c.current);Array.isArray(t)&&(a(t),l.current=t.map(Jv))}},subject:n._subjects.array});const h=Xr.useCallback((e=>{d.current=!0,n._updateFieldArray(r,e)}),[n,r]);return Xr.useEffect((()=>{if(n._state.action=!1,ng(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!tg(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then((e=>{const t=Ev(e.errors,r),i=Ev(n._formState.errors,r);(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type)&&(t?Cv(n._formState.errors,r,t):Pg(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=Ev(n._fields,r);!e||!e._f||tg(n._options.reValidateMode).isOnSubmit&&tg(n._options.mode).isOnSubmit||yg(e,n._formValues,n._options.criteriaMode===Ov.all,n._options.shouldUseNativeValidation,!0).then((e=>!Wv(e)&&n._subjects.state.next({errors:ig(n._formState.errors,e,r)})))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&rg(n._fields,((e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1})),n._names.focus="",n._updateValid(),d.current=!1}),[s,r,n]),Xr.useEffect((()=>(!Ev(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||o)&&n.unregister(r)})),[r,n,i,o]),{swap:Xr.useCallback(((e,t)=>{const i=n._getFieldArray(r);Eg(i,e,t),Eg(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,Eg,{argA:e,argB:t},!1)}),[h,r,n]),move:Xr.useCallback(((e,t)=>{const i=n._getFieldArray(r);xg(i,e,t),xg(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,xg,{argA:e,argB:t},!1)}),[h,r,n]),prepend:Xr.useCallback(((e,t)=>{const i=$v(xv(e)),o=Sg(n._getFieldArray(r),i);n._names.focus=eg(r,0,t),l.current=Sg(l.current,i.map(Jv)),h(o),a(o),n._updateFieldArray(r,o,Sg,{argA:wg(e)})}),[h,r,n]),append:Xr.useCallback(((e,t)=>{const i=$v(xv(e)),o=_g(n._getFieldArray(r),i);n._names.focus=eg(r,o.length-1,t),l.current=_g(l.current,i.map(Jv)),h(o),a(o),n._updateFieldArray(r,o,_g,{argA:wg(e)})}),[h,r,n]),remove:Xr.useCallback((e=>{const t=kg(n._getFieldArray(r),e);l.current=kg(l.current,e),h(t),a(t),n._updateFieldArray(r,t,kg,{argA:e})}),[h,r,n]),insert:Xr.useCallback(((e,t,i)=>{const o=$v(xv(t)),s=bg(n._getFieldArray(r),e,o);n._names.focus=eg(r,e,i),l.current=bg(l.current,e,o.map(Jv)),h(s),a(s),n._updateFieldArray(r,s,bg,{argA:e,argB:wg(t)})}),[h,r,n]),update:Xr.useCallback(((e,t)=>{const i=xv(t),o=Tg(n._getFieldArray(r),e,i);l.current=[...o].map(((t,n)=>t&&n!==e?l.current[n]:Jv())),h(o),a([...o]),n._updateFieldArray(r,o,Tg,{argA:e,argB:i},!0,!1)}),[h,r,n]),replace:Xr.useCallback((e=>{const t=$v(xv(e));l.current=t.map(Jv),h([...t]),a([...t]),n._updateFieldArray(r,[...t],(e=>e),{},!0,!1)}),[h,r,n]),fields:Xr.useMemo((()=>s.map(((e,t)=>({...e,[i]:l.current[t]||Jv()})))),[s,i])}}({control:n,name:"audiences"});return oo("div",{children:[io("label",{htmlFor:"audiences",css:{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Audience"}),e.helperText&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:"This should be the same as the audience key in segment"}),i.map(((e,o)=>io("div",{css:{marginBottom:"0.5rem"},children:io(Xv,{name:`audiences.${o}`,control:n,rules:{pattern:{value:/^[A-Za-z0-9_]+$/i,message:"Audience must be lowercase and can only contain letters, numbers and underscores."}},render:({field:e,fieldState:n})=>{var a;return io(Ys,{id:`audience-${o}`,type:"text",error:(null==r?void 0:r.audiences)?null==(a=null==r?void 0:r.audiences[o])?void 0:a.message:"",...e,ref:t,disabled:!n.isDirty||o!==i.length-1,remove:()=>s(o)})}})},e.id))),oo("button",{css:{display:"flex",fontSize:"0.875rem",lineHeight:"1.25rem"},type:"button",onClick:()=>o(""),children:[io(zs,{css:{height:"1rem",width:"1rem"}})," Add Audience"]})]})})),DS=()=>{const e=function(){let{matches:e}=Bn(Qa),t=e[e.length-1];return t?t.params:{}}(),t=tl(),{createPromotion:n,updatePromotion:r,getAllPromotions:i}=vo(),o=ds(),{isPending:s,error:a,data:l}=Es({queryKey:[xl],queryFn:i}),u=function(e){const t=ds(),[n]=On((()=>new us(t,e)));Mn((()=>{n.setOptions(e)}),[n,e]);const r=Yr(jn((e=>n.subscribe(zo.batchCalls(e))),[n]),(()=>n.getCurrentResult())),i=jn(((e,t)=>{n.mutate(e,t).catch(ys)}),[n]);if(r.error&&gs(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}({mutationFn:e.promotionId?r(e.promotionId):n,onSuccess:()=>o.invalidateQueries({queryKey:[xl]})}),c=uo(),d=In((()=>((e,t)=>{var n;return t?{id:t.id,category:t.category.title,promotionStatus:"Enabled"===t.status,contentfulUrl:(null==(n=t.contentfulContent)?void 0:n.contentId)?`${kl(e)}/entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,ignoreAudiencesIfUserNotFound:t.ignoreAudiencesIfUserNotFound??!1,audiences:t.audiences}:void 0})(c.backend,null==l?void 0:l.data.find((t=>t.id===e.promotionId)))),[c.backend,null==l?void 0:l.data,e.promotionId]),h=function(e={}){const t=Xr.useRef(),n=Xr.useRef(),[r,i]=Xr.useState({isDirty:!1,isValidating:!1,isLoading:sg(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:sg(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Yg(e),formState:r});const o=t.current.control;return o._options=e,qv({subject:o._subjects.state,next:e=>{Hv(e,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Xr.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),Xr.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==r.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,r.isDirty]),Xr.useEffect((()=>{e.values&&!Rg(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),Xr.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),Xr.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),Xr.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=Gv(r,o),t.current}({mode:"onBlur",values:{id:e.promotionId||"",category:(null==d?void 0:d.category)||"",isEnabled:(null==d?void 0:d.promotionStatus)||!1,ignoreAudiencesIfUserNotFound:(null==d?void 0:d.ignoreAudiencesIfUserNotFound)||!1,audiences:(null==d?void 0:d.audiences)||[]}}),p=h.control,f=e=>{const t={promotionId:(n=e).id,category:n.category,isEnabled:n.isEnabled,ignoreAudiencesIfUserNotFound:n.ignoreAudiencesIfUserNotFound,audiences:n.audiences};var n;u.mutate(t)};Mn((()=>{u.isSuccess&&t("/")}),[t,u]);const m=e.promotionId?"Edit":"Add";switch(!0){case"Edit"===m&&s:return io("div",{children:"Loading..."});case"Edit"===m&&!!a:return oo("div",{children:[io("p",{children:a.message}),io("button",{css:{marginTop:"1rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},onClick:()=>t("/"),children:"Back"})]});default:return oo("div",{css:{display:"flex",gap:"2rem",paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[io("div",{css:{marginTop:"1rem",verticalAlign:"top"},children:io("button",{onClick:()=>t("/"),children:"<"})}),io(Uv,{...h,children:oo("form",{onSubmit:h.handleSubmit(f),children:[io("div",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"0",marginTop:"calc(3rem * calc(1 - var(--tw-space-y-reverse)))",marginBottom:"calc(3rem * var(--tw-space-y-reverse))"}},children:oo("div",{css:{borderBottomWidth:"1px",borderColor:"rgb(17 24 39 / 0.1)",paddingBottom:"3rem"},children:[oo("h2",{css:{fontSize:"1rem",lineHeight:"1.75rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:[m," Promotion"]}),oo("p",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:[m," a promoted benefit"]}),oo("div",{css:{marginTop:"2.5rem",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",columnGap:"1.5rem",rowGap:"2rem","@media (min-width: 640px)":{gridTemplateColumns:"repeat(6, minmax(0, 1fr))"}},children:[io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Xv,{name:"id",control:p,rules:{required:"Please provide an ID",pattern:{value:/^[a-z0-9\\-]+$/i,message:"Id must be lowercase and can only contain letters, numbers and hyphens."}},render:({field:e,fieldState:t})=>{var n;return io(Ys,{label:"Promotion Id",id:"id",type:"text",disabled:"Edit"==m,helperText:"This should be the same as the contentful slug",error:null==(n=t.error)?void 0:n.message,...e})}})}),"Edit"===m&&d&&oo("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:[io("label",{css:{marginBottom:"0.5rem",display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Contentful"}),d.contentfulUrl?oo("a",{href:d.contentfulUrl,target:"_blank",rel:"noopener noreferrer",css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:[io("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),io(Ls,{css:{marginTop:"auto",marginBottom:"auto",marginLeft:"0.25rem",height:"0.75rem",width:"0.75rem"}})]}):io("div",{css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(220 38 38 / 0.2)"},children:"Unlinked"})]}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Xv,{name:"category",control:p,rules:{required:"Please provide a category"},render:({field:e,fieldState:t})=>{var n;return io(FS,{items:[{key:"cars",displayValue:"Cars"},{key:"health",displayValue:"Health"},{key:"energy",displayValue:"Energy"},{key:"everyday",displayValue:"Everyday"},{key:"savingsAccount",displayValue:"Savings Account"},{key:"homeLoan",displayValue:"Home Loan"}],label:"Category",error:null==(n=t.error)?void 0:n.message,...e})}})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Xv,{name:"isEnabled",control:p,render:({field:e})=>io(MS,{label:"Enabled",id:"id",helperText:"A promotion will be shown to users if it is 'Enabled' and Contentful content is available.",...e})})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Xv,{name:"ignoreAudiencesIfUserNotFound",control:p,render:({field:e})=>io(MS,{label:"Ignore audiences if user does not exist",id:"id",helperText:"Show this promotion to a user even if they do not exist in Segment, regardless of the configured audiences.",...e})})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(LS,{})})]})]})}),u.isError&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:u.error.message}),io("div",{css:{marginTop:"1.5rem",display:"flex",alignItems:"center",justifyContent:"flex-end",columnGap:"1.5rem"},children:u.isPending?io("div",{css:{fontSize:"0.875rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Loading..."}):io("button",{type:"submit",css:{borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:"Save"})})]})})]})}},VS=e=>io(ov.div,{css:{position:"absolute",bottom:"0px",left:"0px",right:"0px",top:"0px"},initial:{x:"forward"===e.direction?"100%":"-100%"},animate:{x:"0"},exit:{x:"forward"===e.direction?"-100%":"100%"},transition:{duration:.5,type:"spring"},children:io("div",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:io("div",{css:{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 640px)":{padding:"1.5rem"}},children:e.children})})}),IS=e=>{const t=Ja(),[n,r]=On("forward");var i;return i={backend:{url:e.backendUrl,accessToken:e.accessToken}},lo=ot({...i,backend:{url:i.backend.url.replace(/\/?$/,""),accessToken:i.backend.accessToken}}),Mn((()=>{if("/"===t.pathname)r("forward");else r("backward")}),[t.pathname]),io("div",{class:"mx-auto max-w-7xl sm:px-6 lg:px-8 relative",children:io(hv,{initial:!1,children:oo(hl,{location:t,children:[io(cl,{path:"/",element:io(VS,{direction:n,children:io(El,{})})}),io(cl,{path:"/promotion",element:io(VS,{direction:n,children:io(DS,{})})}),io(cl,{path:"/promotion/:promotionId",element:io(VS,{direction:n,children:io(DS,{})})})]},t.pathname)})})};!function(e,t,n,r){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=ut,i.prototype.attributeChangedCallback=dt,i.prototype.disconnectedCallback=ht,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,n.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t,i)}((e=>{const t=Dn(null),{EmotionProvider:n}=((e,t)=>{const[n,r]=On();return Mn((()=>{if(t&&t.current){const n=t=>{document.getElementsByTagName(e).length>0?t():requestAnimationFrame((()=>n(t)))};n((()=>{r(wn({container:t.current,key:e}))}))}}),[e,t]),{EmotionProvider:({children:e})=>n?io($i,{value:n,children:e}):io(ro,{})}})("promoted-benefits-admin",t);return oo(ro,{children:[io("head",{ref:t}),io(n,{children:io(hs,{client:bl(),children:oo(ml,{basename:e.hashRouteBase,children:[io(ao,{}),io("body",{children:io(IS,{...e})})]})})})]})}),"promoted-benefits-admin",["backend-url","access-token"],{shadow:!0})}();