@flarehr/promoted-benefits-admin 0.3.2396 → 0.3.3013
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +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,G,U,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 Gt(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 Gt(t)}}function Ut(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&&Gt(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,Ut(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),Ut(this))},Bt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ut(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(by){}}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 Ge(){return Ie=Ve<De?Ae(je,Ve++):0,Le++,10===Ie&&(Le=1,Fe++),Ie}function Ue(){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=Ue())&&Ie<33;)Ge();return $e(t)>2||$e(Ie)>3?"":" "}function Qe(t,e){for(;--e&&Ge()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return He(t,We()+(e<6&&32==Ue()&&32==Ge()))}function Xe(t){for(;Ge();)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:Ge()}return Ve}function Ze(t,e){for(;Ge()&&t+Ie!==57&&(t+Ie!==84||47!==Ue()););return"/*"+He(e,Ve-1)+"*"+Se(47===t?t:Ge())}function Je(t){for(;!$e(Ue());)Ge();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=Ge()){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(Ue()){case 42:case 47:Me(rn(Ze(Ge(),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===Ue()&&(S+=Ke(Ge())),h=Ue(),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=Ue(),38===r&&12===i&&(e[n]=1),!$e(i);)Ge();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===Ue()&&(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===Ue()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=Se(r)}}while(r=Ge());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 Gn(){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 Un(){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(E_){t.__H.__h=[],Sn.__e(E_,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)(Un)),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(i_){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Sn.__e(i_,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:Gn,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 Gr=function(t,e){return t(e)},Ur=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:Gn,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:Ur,unstable_batchedUpdates:Gr,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:Ur,forwardRef:er,hydrate:Sr,isElement:Kr,isFragment:Vr,isMemo:Ir,isValidElement:Dr,lazy:cr,memo:Zn,render:xr,startTransition:Hr,unmountComponentAtNode:Br,unstable_batchedUpdates:Gr,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:Gn,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 Gi=!!Zr.useInsertionEffect&&Zr.useInsertionEffect,Ui=Gi||function(t){return t()},Wi=Gi||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),Ui((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=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,G,U,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 Gt(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 Gt(t)}}function Ut(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&&Gt(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,Ut(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),Ut(this))},Bt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ut(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 Ge(){return Ie=Ve<De?Ae(je,Ve++):0,Le++,10===Ie&&(Le=1,Fe++),Ie}function Ue(){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=Ue())&&Ie<33;)Ge();return $e(t)>2||$e(Ie)>3?"":" "}function Qe(t,e){for(;--e&&Ge()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return He(t,We()+(e<6&&32==Ue()&&32==Ge()))}function Xe(t){for(;Ge();)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:Ge()}return Ve}function Ze(t,e){for(;Ge()&&t+Ie!==57&&(t+Ie!==84||47!==Ue()););return"/*"+He(e,Ve-1)+"*"+Se(47===t?t:Ge())}function Je(t){for(;!$e(Ue());)Ge();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=Ge()){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(Ue()){case 42:case 47:Me(rn(Ze(Ge(),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===Ue()&&(S+=Ke(Ge())),h=Ue(),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=Ue(),38===r&&12===i&&(e[n]=1),!$e(i);)Ge();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===Ue()&&(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===Ue()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=Se(r)}}while(r=Ge());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 Gn(){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 Un(){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)(Un)),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:Gn,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 Gr=function(t,e){return t(e)},Ur=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:Gn,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:Ur,unstable_batchedUpdates:Gr,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:Ur,forwardRef:er,hydrate:Sr,isElement:Kr,isFragment:Vr,isMemo:Ir,isValidElement:Dr,lazy:cr,memo:Zn,render:xr,startTransition:Hr,unmountComponentAtNode:Br,unstable_batchedUpdates:Gr,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:Gn,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 Gi=!!Zr.useInsertionEffect&&Zr.useInsertionEffect,Ui=Gi||function(t){return t()},Wi=Gi||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),Ui((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`
|
|
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.2396",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 Go(t){return Math.min(1e3*2**t,3e4)}function Uo(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=()=>Uo(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??Go,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:Uo(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,G),__privateAdd(this,U),__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,U,n),__privateSet(this,H,this.options),__privateSet(this,W,__privateGet(this,N).state)),n}getCurrentResult(){return __privateGet(this,U)}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,U))))}createResult(t,e){var n;const r=__privateGet(this,N),i=this.options,o=__privateGet(this,U),s=__privateGet(this,W),a=__privateGet(this,H),l=t!==r?t.state:__privateGet(this,G),{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,U),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,U,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,U)).some((t=>{const n=t;return __privateGet(this,U)[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,G=new WeakMap,U=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,U).isStale||!wo(t))return;const e=bo(__privateGet(this,U).dataUpdatedAt,t);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,U).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,G,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,U))})),__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),Ui((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(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.3013",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 Go(t){return Math.min(1e3*2**t,3e4)}function Uo(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=()=>Uo(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??Go,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:Uo(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,G),__privateAdd(this,U),__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,U,n),__privateSet(this,H,this.options),__privateSet(this,W,__privateGet(this,N).state)),n}getCurrentResult(){return __privateGet(this,U)}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,U))))}createResult(t,e){var n;const r=__privateGet(this,N),i=this.options,o=__privateGet(this,U),s=__privateGet(this,W),a=__privateGet(this,H),l=t!==r?t.state:__privateGet(this,G),{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,U),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,U,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,U)).some((t=>{const n=t;return __privateGet(this,U)[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,G=new WeakMap,U=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,U).isStale||!wo(t))return;const e=bo(__privateGet(this,U).dataUpdatedAt,t);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,U).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,G,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,U))})),__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),Ui((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`
|
|
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
5
|
`,Vs=Ms.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})}),Gs=(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})}},Us=
|
|
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})}),Gs=(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})}},Us=Ms.input`
|
|
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
|
+
|
|
10
|
+
${({prefix:t})=>t?{paddingLeft:"1.75rem"}:{paddingLeft:"0.75rem"}}
|
|
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(Us,{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:Gs(e.id,e[t.field],t.type)},`${e[t.field]}-${n}-${r}`)))},`${e[t.columns[0].field]}-${n}`)))})]})})})})})]})})};
|
|
8
14
|
/**
|
|
9
15
|
* @remix-run/router v1.19.2
|
|
10
16
|
*
|
|
@@ -15,7 +21,7 @@ var __defProp=Object.defineProperty,__typeError=t=>{throw TypeError(t)},__defNor
|
|
|
15
21
|
*
|
|
16
22
|
* @license MIT
|
|
17
23
|
*/
|
|
18
|
-
function
|
|
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];
|
|
19
25
|
/**
|
|
20
26
|
* React Router v6.26.2
|
|
21
27
|
*
|
|
@@ -26,7 +32,7 @@ function Ws(){return Ws=Object.assign?Object.assign.bind():function(t){for(var e
|
|
|
26
32
|
*
|
|
27
33
|
* @license MIT
|
|
28
34
|
*/
|
|
29
|
-
function
|
|
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),Ga=oe(null),Ua=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(Ua).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(Ua),{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(Ua),{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(Ga);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(Ua.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}
|
|
30
36
|
/**
|
|
31
37
|
* React Router DOM v6.26.2
|
|
32
38
|
*
|
|
@@ -36,16 +42,10 @@ function Ea(){return Ea=Object.assign?Object.assign.bind():function(t){for(var e
|
|
|
36
42
|
* LICENSE.md file in the root directory of this source tree.
|
|
37
43
|
*
|
|
38
44
|
* @license MIT
|
|
39
|
-
*/new Promise((()=>{}));try{window.__reactRouterVersion="6"}catch(by){}const Ka=Zr.startTransition;function Ya(t){let{basename:e,children:n,future:r,window:i}=t,o=Dn();null==o.current&&(o.current=qs({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&&Ka?Ka((()=>l(t))):l(t)}),[l,u]);return Ln((()=>s.listen(c)),[s,c]),Dt($a,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var Qa,Xa,Za,Ja;let tl;(Xa=Qa||(Qa={})).UseScrollRestoration="useScrollRestoration",Xa.UseSubmit="useSubmit",Xa.UseSubmitFetcher="useSubmitFetcher",Xa.UseFetcher="useFetcher",Xa.useViewTransitionState="useViewTransitionState",(Ja=Za||(Za={})).UseFetcher="useFetcher",Ja.UseFetchers="useFetchers",Ja.UseScrollRestoration="useScrollRestoration";const el=()=>{if(tl)return tl;return tl=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)}}}}),tl},nl="getAllPromotions";function rl({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 il=er(rl);function ol({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 sl=er(ol);function al({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 ll=er(al),ul=/^https:\/\/([A-Za-z]+)-partner/,cl=t=>{switch((t=>{if(t.startsWith("http://localhost"))return"local";const e=t.toLowerCase().match(ul);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/"}},dl=()=>{const{getAllPromotions:t}=vo(),e=Da(),{isPending:n,error:r,data:i}=Es({queryKey:[nl],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)?`${cl(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"},{name:"Category",field:"category"},{name:"Promotion Status",field:"promotionStatus",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",type:{kind:"link"}},{name:"Created At",field:"createdAt",type:{kind:"date"}},{name:"Updated At",field:"updatedAt",type:{kind:"date"}},{name:"Edit",field:"edit",type:{kind:"button",onClick:t=>e(`/promotion/${t}`),children:io(ll,{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(Us,{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 hl(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 pl(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const fl=t=>Array.isArray(t);function ml(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 vl(t){return"string"==typeof t||Array.isArray(t)}function gl(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function yl(t,e,n,r){if("function"==typeof e){const[i,o]=gl(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]=gl(r);e=e(void 0!==n?n:t.custom,i,o)}return e}function _l(t,e,n){const r=t.getProps();return yl(r,e,void 0!==n?n:r.custom,t)}const wl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bl=["initial",...wl],xl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Sl=new Set(xl),kl=t=>1e3*t,El=t=>t/1e3,Pl={type:"spring",stiffness:500,damping:25,restSpeed:10},Tl={type:"keyframes",duration:.8},Al={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Cl=(t,{keyframes:e})=>e.length>2?Tl:Sl.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Pl:Al;function Rl(t,e){return t[e]||t.default||t}const Ol=!1,Ml=t=>null!==t;function Fl(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(Ml),o=e&&"loop"!==n&&e%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}const Ll=t=>t;const Dl=["read","resolveKeyframes","update","preRender","render","postRender"];function Vl(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Dl.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:Dl.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<Dl.length;e++)s[Dl[e]].cancel(t)},state:i,steps:s}}const{schedule:Il,cancel:jl,state:Bl,steps:Nl}=Vl("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Ll,!0),Gl=t=>/^0[^.\s]+$/u.test(t);let Ul=Ll;const Wl=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Hl=t=>e=>"string"==typeof e&&e.startsWith(t),$l=Hl("--"),zl=Hl("var(--"),ql=t=>!!zl(t)&&Kl.test(t.split("/*")[0].trim()),Kl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ql(t,e,n=1){const[r,i]=function(t){const e=Yl.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 Wl(t)?parseFloat(t):t}return ql(i)?Ql(i,e,n+1):i}const Xl=(t,e,n)=>n>e?e:n<t?t:n,Zl={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Jl={...Zl,transform:t=>Xl(0,1,t)},tu={...Zl,default:1},eu=t=>Math.round(1e5*t)/1e5,nu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,ru=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,iu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ou(t){return"string"==typeof t}const su=t=>({test:e=>ou(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),au=su("deg"),lu=su("%"),uu=su("px"),cu=su("vh"),du=su("vw"),hu={...lu,parse:t=>lu.parse(t)/100,transform:t=>lu.transform(100*t)},pu=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),fu=t=>t===Zl||t===uu,mu=(t,e)=>parseFloat(t.split(", ")[e]),vu=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return mu(i[1],e);{const e=r.match(/^matrix\((.+)\)$/u);return e?mu(e[1],t):0}},gu=new Set(["x","y","z"]),yu=xl.filter((t=>!gu.has(t)));const _u={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:vu(4,13),y:vu(5,14)};_u.translateX=_u.x,_u.translateY=_u.y;const wu=t=>e=>e.test(t),bu=[Zl,uu,lu,au,du,cu,{test:t=>"auto"===t,parse:t=>t}],xu=t=>bu.find(wu(t)),Su=new Set;let ku=!1,Eu=!1;function Pu(){if(Eu){const t=Array.from(Su).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 yu.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)}))}Eu=!1,ku=!1,Su.forEach((t=>t.complete())),Su.clear()}function Tu(){Su.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Eu=!0)}))}class Au{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?(Su.add(this),ku||(ku=!0,Il.read(Tu),Il.resolveKeyframes(Pu))):(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),Su.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Su.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Cu=(t,e)=>n=>Boolean(ou(n)&&iu.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ru=(t,e,n)=>r=>{if(!ou(r))return r;const[i,o,s,a]=r.match(nu);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Ou={...Zl,transform:t=>Math.round((t=>Xl(0,255,t))(t))},Mu={test:Cu("rgb","red"),parse:Ru("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Ou.transform(t)+", "+Ou.transform(e)+", "+Ou.transform(n)+", "+eu(Jl.transform(r))+")"};const Fu={test:Cu("#"),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:Mu.transform},Lu={test:Cu("hsl","hue"),parse:Ru("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+lu.transform(eu(e))+", "+lu.transform(eu(n))+", "+eu(Jl.transform(r))+")"},Du={test:t=>Mu.test(t)||Fu.test(t)||Lu.test(t),parse:t=>Mu.test(t)?Mu.parse(t):Lu.test(t)?Lu.parse(t):Fu.parse(t),transform:t=>ou(t)?t:t.hasOwnProperty("red")?Mu.transform(t):Lu.transform(t)};const Vu="number",Iu="color",ju="var",Bu="var(",Nu="${}",Gu=/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 Uu(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=e.replace(Gu,(t=>(Du.test(t)?(r.color.push(o),i.push(Iu),n.push(Du.parse(t))):t.startsWith(Bu)?(r.var.push(o),i.push(ju),n.push(t)):(r.number.push(o),i.push(Vu),n.push(parseFloat(t))),++o,Nu))).split(Nu);return{values:n,split:s,indexes:r,types:i}}function Wu(t){return Uu(t).values}function Hu(t){const{split:e,types:n}=Uu(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===Vu?eu(t[o]):e===Iu?Du.transform(t[o]):t[o]}return i}}const $u=t=>"number"==typeof t?0:t;const zu={test:function(t){var e,n;return isNaN(t)&&ou(t)&&((null===(e=t.match(nu))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(ru))||void 0===n?void 0:n.length)||0)>0},parse:Wu,createTransformer:Hu,getAnimatableNone:function(t){const e=Wu(t);return Hu(t)(e.map($u))}},qu=new Set(["brightness","contrast","saturate","opacity"]);function Ku(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(nu)||[];if(!r)return t;const i=n.replace(r,"");let o=qu.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const Yu=/\b([a-z-]*)\(.*?\)/gu,Qu={...zu,getAnimatableNone:t=>{const e=t.match(Yu);return e?e.map(Ku).join(" "):t}},Xu={...Zl,transform:Math.round},Zu={borderWidth:uu,borderTopWidth:uu,borderRightWidth:uu,borderBottomWidth:uu,borderLeftWidth:uu,borderRadius:uu,radius:uu,borderTopLeftRadius:uu,borderTopRightRadius:uu,borderBottomRightRadius:uu,borderBottomLeftRadius:uu,width:uu,maxWidth:uu,height:uu,maxHeight:uu,size:uu,top:uu,right:uu,bottom:uu,left:uu,padding:uu,paddingTop:uu,paddingRight:uu,paddingBottom:uu,paddingLeft:uu,margin:uu,marginTop:uu,marginRight:uu,marginBottom:uu,marginLeft:uu,rotate:au,rotateX:au,rotateY:au,rotateZ:au,scale:tu,scaleX:tu,scaleY:tu,scaleZ:tu,skew:au,skewX:au,skewY:au,distance:uu,translateX:uu,translateY:uu,translateZ:uu,x:uu,y:uu,z:uu,perspective:uu,transformPerspective:uu,opacity:Jl,originX:hu,originY:hu,originZ:uu,zIndex:Xu,backgroundPositionX:uu,backgroundPositionY:uu,fillOpacity:Jl,strokeOpacity:Jl,numOctaves:Xu},Ju={...Zu,color:Du,backgroundColor:Du,outlineColor:Du,fill:Du,stroke:Du,borderColor:Du,borderTopColor:Du,borderRightColor:Du,borderBottomColor:Du,borderLeftColor:Du,filter:Qu,WebkitFilter:Qu},tc=t=>Ju[t];function ec(t,e){let n=tc(t);return n!==Qu&&(n=zu),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const nc=new Set(["auto","none","0"]);class rc extends Au{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(),ql(n))){const r=Ql(n,e.current);void 0!==r&&(t[a]=r),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!pu.has(n)||2!==t.length)return;const[r,i]=t,o=xu(r),s=xu(i);if(o!==s)if(fu(o)&&fu(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||Gl(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&&!nc.has(e)&&Uu(e).values.length&&(r=t[i]),i++}if(r&&n)for(const o of e)t[o]=ec(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=_u[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]=_u[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 ic(t){let e;return()=>(void 0===e&&(e=t()),e)}let oc;function sc(){oc=void 0}const ac={now:()=>(void 0===oc&&ac.set(Bl.isProcessing||Ol?Bl.timestamp:performance.now()),oc),set:t=>{oc=t,queueMicrotask(sc)}},lc=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!zu.test(t)&&"0"!==t||t.startsWith("url(")));class uc{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=ac.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||(Tu(),Pu()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=ac.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=lc(i,e),a=lc(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(Fl(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 cc(t,e){return e?t*(1e3/e):0}const dc=5;function hc(t,e,n){const r=Math.max(e-dc,0);return cc(n-t(r),e-r)}const pc=.001,fc=.01,mc=10,vc=.05,gc=1;function yc({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o,s=1-e;s=Xl(vc,gc,s),t=Xl(fc,mc,El(t)),s<1?(i=e=>{const r=e*s,i=r*t,o=r-n,a=wc(e,s),l=Math.exp(-i);return pc-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=wc(Math.pow(e,2),s);return(-i(e)+pc>0?-1:1)*((o-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-pc,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let i=1;i<_c;i++)r-=t(r)/e(r);return r}(i,o,5/t);if(t=kl(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 _c=12;function wc(t,e){return t*Math.sqrt(1-e*e)}const bc=["duration","bounce"],xc=["stiffness","damping","mass"];function Sc(t,e){return e.some((e=>void 0!==t[e]))}function kc({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(!Sc(t,xc)&&Sc(t,bc)){const n=yc(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...r,velocity:-El(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(a*u)),m=o-i,v=El(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=wc(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?kl(p):hc(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 Ec({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=kc({keyframes:[h.value,p(h.value)],velocity:hc(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 Pc=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Tc=1e-7,Ac=12;function Cc(t,e,n,r){if(t===e&&n===r)return Ll;const i=e=>function(t,e,n,r,i){let o,s,a=0;do{s=e+(n-e)/2,o=Pc(s,r,i)-t,o>0?n=s:e=s}while(Math.abs(o)>Tc&&++a<Ac);return s}(e,0,1,t,n);return t=>0===t||1===t?t:Pc(i(t),e,r)}const Rc=Cc(.42,0,1,1),Oc=Cc(0,0,.58,1),Mc=Cc(.42,0,.58,1),Fc=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Lc=t=>e=>1-t(1-e),Dc=t=>1-Math.sin(Math.acos(t)),Vc=Lc(Dc),Ic=Fc(Dc),jc=Cc(.33,1.53,.69,.99),Bc=Lc(jc),Nc={linear:Ll,easeIn:Rc,easeInOut:Mc,easeOut:Oc,circIn:Dc,circInOut:Ic,circOut:Vc,backIn:Bc,backInOut:Fc(Bc),backOut:jc,anticipate:t=>(t*=2)<1?.5*Bc(t):.5*(2-Math.pow(2,-10*(t-1)))},Gc=t=>{if(Array.isArray(t)){Ul(4===t.length);const[e,n,r,i]=t;return Cc(e,n,r,i)}return"string"==typeof t?(Ul(void 0!==Nc[t]),Nc[t]):t},Uc=(t,e)=>n=>e(t(n)),Wc=(...t)=>t.reduce(Uc),Hc=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},$c=(t,e,n)=>t+(e-t)*n;function zc(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 qc(t,e){return n=>n>0?e:t}const Kc=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Yc=[Fu,Mu,Lu];function Qc(t){const e=(n=t,Yc.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let r=e.parse(t);return e===Lu&&(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=zc(a,r,t+1/3),o=zc(a,r,t),s=zc(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 Xc=(t,e)=>{const n=Qc(t),r=Qc(e);if(!n||!r)return qc(t,e);const i={...n};return t=>(i.red=Kc(n.red,r.red,t),i.green=Kc(n.green,r.green,t),i.blue=Kc(n.blue,r.blue,t),i.alpha=$c(n.alpha,r.alpha,t),Mu.transform(i))},Zc=new Set(["none","hidden"]);function Jc(t,e){return n=>$c(t,e,n)}function td(t){return"number"==typeof t?Jc:"string"==typeof t?ql(t)?qc:Du.test(t)?Xc:rd:Array.isArray(t)?ed:"object"==typeof t?Du.test(t)?Xc:nd:qc}function ed(t,e){const n=[...t],r=n.length,i=t.map(((t,n)=>td(t)(t,e[n])));return t=>{for(let e=0;e<r;e++)n[e]=i[e](t);return n}}function nd(t,e){const n={...t,...e},r={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(r[i]=td(t[i])(t[i],e[i]));return t=>{for(const e in r)n[e]=r[e](t);return n}}const rd=(t,e)=>{const n=zu.createTransformer(e),r=Uu(t),i=Uu(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?Zc.has(t)&&!i.values.length||Zc.has(e)&&!r.values.length?function(t,e){return Zc.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Wc(ed(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):qc(t,e)};function id(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return $c(t,e,n);return td(t)(t,e)}function od(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Ul(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||id,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]||Ll:e;n=Wc(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=Hc(t[n],t[n+1],e);return s[n](r)};return n?e=>l(Xl(t[0],t[o-1],e)):l}function sd(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Hc(0,e,r);t.push($c(n,1,i))}}(e,t.length-1),e}function ad({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=(t=>Array.isArray(t)&&"number"!=typeof t[0])(r)?r.map(Gc):Gc(r),o={done:!1,value:e[0]},s=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:sd(e),t),a=od(s,e,{ease:Array.isArray(i)?i:(l=e,u=i,l.map((()=>u||Mc)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const ld=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Il.update(e,!0),stop:()=>jl(e),now:()=>Bl.isProcessing?Bl.timestamp:ac.now()}},ud={decay:Ec,inertia:Ec,tween:ad,keyframes:ad,spring:kc},cd=t=>t/100;class dd extends uc{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)||Au;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=ud[e]||ad;let a,l;s!==ad&&"number"!=typeof t[0]&&(a=Wc(cd,id(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=Xl(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=Fl(a,this.options,r)),m&&m(w.value),x&&this.finish(),w}get duration(){const{resolved:t}=this;return t?El(t.calculatedDuration):0}get time(){return El(this.currentTime)}set time(t){t=kl(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=El(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ld,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 hd=new Set(["opacity","clipPath","filter","transform"]),pd=t=>Array.isArray(t)&&"number"==typeof t[0];function fd(t){return Boolean(!t||"string"==typeof t&&t in vd||pd(t)||Array.isArray(t)&&t.every(fd))}const md=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,vd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:md([0,.65,.55,1]),circOut:md([.55,0,1,.45]),backIn:md([.31,.01,.66,-.59]),backOut:md([.33,1.53,.69,.99])};function gd(t){return yd(t)||vd.easeOut}function yd(t){return t?pd(t)?md(t):Array.isArray(t)?t.map(gd):vd[t]:void 0}const _d=ic((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class wd extends uc{constructor(t){super(t);const{name:e,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new rc(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||!fd(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new dd({...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=yd(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(Fl(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 El(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return El(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=kl(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 Ll;const{animation:n}=e;n.timeline=t,n.onfinish=null}else this.pendingTimeline=t;return Ll}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 dd({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),d=kl(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 _d()&&n&&hd.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}}const bd=ic((()=>void 0!==window.ScrollTimeline));class xd{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(!bd()||!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 Il.update(r,!0),()=>jl(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 Sd=(t,e,n,r={},i,o,s)=>a=>{const l=Rl(r,t)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c-=kl(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,...Cl(t,d)}),d.duration&&(d.duration=kl(d.duration)),d.repeatDelay&&(d.repeatDelay=kl(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=Fl(d.keyframes,l);if(void 0!==t)return Il.update((()=>{d.onUpdate(t),d.onComplete()})),new xd([])}return!o&&wd.supports(d)?new wd(d):new dd(d)},kd=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Ed=t=>fl(t)?t[t.length-1]||0:t;function Pd(t,e){-1===t.indexOf(e)&&t.push(e)}function Td(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Ad{constructor(){this.subscriptions=[]}add(t){return Pd(this.subscriptions,t),()=>Td(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 Cd{constructor(t,e={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=ac.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=ac.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 Ad);const n=this.events[t].add(e);return"change"===t?()=>{n(),Il.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=ac.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return cc(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 Rd(t,e){return new Cd(t,e)}function Od(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Rd(n))}const Md=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Fd="data-"+Md("framerAppearId");function Ld(t){return t.props[Fd]}function Dd(t){return Sl.has(t)?"transform":hd.has(t)?Md(t):void 0}class Vd extends Cd{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=Dd(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&&(Td(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const Id=t=>Boolean(t&&t.getVelocity);function jd(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 Vd("auto"),t.addValue("willChange",r)),i=r,Boolean(Id(i)&&i.add)?r.add(e):void 0;var i}function Bd({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}function Nd(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&&Bd(c,d))continue;const i={delay:n,...Rl(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const e=Ld(t);if(e){const t=window.MotionHandoffAnimation(e,d,Il);null!==t&&(i.startTime=t,a=!0)}}e.start(Sd(d,e,r,t.shouldReduceMotion&&Sl.has(d)?{type:!1}:i,t,a,jd(t,d)));const h=e.animation;h&&u.push(h)}return a&&Promise.all(u).then((()=>{Il.update((()=>{a&&function(t,e){const n=_l(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o)Od(t,s,Ed(o[s]))}(t,a)}))})),u}function Gd(t,e,n={}){var r;const i=_l(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(Nd(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(Ud).forEach(((t,r)=>{t.notify("AnimationStart",e),s.push(Gd(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 Ud(t,e){return t.sortNodePosition(e)}const Wd=[...wl].reverse(),Hd=wl.length;function $d(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=>Gd(t,e,n)));r=Promise.all(i)}else if("string"==typeof e)r=Gd(t,e,n);else{const i="function"==typeof e?_l(t,e,n.custom):e;r=Promise.all(Nd(t,i,n))}return r.then((()=>{t.notify("AnimationComplete",e)}))}(t,e,n))))}function zd(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ml(e,t)}function qd(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kd(){return{animate:qd(!0),whileInView:qd(),whileHover:qd(),whileTap:qd(),whileDrag:qd(),whileFocus:qd(),exit:qd()}}class Yd{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Qd=0;const Xd={animation:{Feature:class extends Yd{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=$d(t),n=Kd(),r=!0;const i=e=>(n,r)=>{var i;const o=_l(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<Hd;e++){const h=Wd[e],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=vl(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||pl(f)||"boolean"==typeof f)continue;let y=zd(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=fl(e)&&fl(n)?!ml(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=Kd(),r=!0}}}(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();pl(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 Yd{constructor(){super(...arguments),this.id=Qd++}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(){}}}},Zd=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Jd(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const th=t=>e=>Zd(e)&&t(e,Jd(e));function eh(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function nh(t,e,n,r){return eh(t,e,th(n),r)}const rh=(t,e)=>Math.abs(t-e);class ih{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=ah(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=rh(t.x,e.x),r=rh(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}=Bl;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=oh(e,this.transformPagePoint),Il.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=ah("pointercancel"===t.type?this.lastMoveEventInfo:oh(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),r&&r(t,o)},!Zd(t))return;this.dragSnapToOrigin=i,this.handlers=e,this.transformPagePoint=n,this.contextWindow=r||window;const o=oh(Jd(t),this.transformPagePoint),{point:s}=o,{timestamp:a}=Bl;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,ah(o,this.history)),this.removeListeners=Wc(nh(this.contextWindow,"pointermove",this.handlePointerMove),nh(this.contextWindow,"pointerup",this.handlePointerUp),nh(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),jl(this.updatePoint)}}function oh(t,e){return e?{point:e(t.point)}:t}function sh(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ah({point:t},e){return{point:t,delta:sh(t,uh(e)),offset:sh(t,lh(e)),velocity:ch(e,.1)}}function lh(t){return t[0]}function uh(t){return t[t.length-1]}function ch(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=uh(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>kl(e)));)n--;if(!r)return{x:0,y:0};const o=El(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 dh(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const hh=dh("dragHorizontal"),ph=dh("dragVertical");function fh(t){let e=!1;if("y"===t)e=ph();else if("x"===t)e=hh();else{const t=hh(),n=ph();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function mh(){const t=fh(!0);return!t||(t(),!1)}function vh(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const gh=.9999,yh=1.0001,_h=-.01,wh=.01;function bh(t){return t.max-t.min}function xh(t,e,n,r=.5){t.origin=r,t.originPoint=$c(e.min,e.max,t.origin),t.scale=bh(n)/bh(e),t.translate=$c(n.min,n.max,t.origin)-t.originPoint,(t.scale>=gh&&t.scale<=yh||isNaN(t.scale))&&(t.scale=1),(t.translate>=_h&&t.translate<=wh||isNaN(t.translate))&&(t.translate=0)}function Sh(t,e,n,r){xh(t.x,e.x,n.x,r?r.originX:void 0),xh(t.y,e.y,n.y,r?r.originY:void 0)}function kh(t,e,n){t.min=n.min+e.min,t.max=t.min+bh(e)}function Eh(t,e,n){t.min=e.min-n.min,t.max=t.min+bh(e)}function Ph(t,e,n){Eh(t.x,e.x,n.x),Eh(t.y,e.y,n.y)}function Th(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 Ah(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 Ch=.35;function Rh(t,e,n){return{min:Oh(t,e),max:Oh(t,n)}}function Oh(t,e){return"number"==typeof t?t:t[e]||0}const Mh=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Fh=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Lh(t){return[t("x"),t("y")]}function Dh({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function Vh(t){return void 0===t||1===t}function Ih({scale:t,scaleX:e,scaleY:n}){return!Vh(t)||!Vh(e)||!Vh(n)}function jh(t){return Ih(t)||Bh(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Bh(t){return Nh(t.x)||Nh(t.y)}function Nh(t){return t&&"0%"!==t}function Gh(t,e,n){return n+e*(t-n)}function Uh(t,e,n,r,i){return void 0!==i&&(t=Gh(t,i,r)),Gh(t,n,r)+e}function Wh(t,e=0,n=1,r,i){t.min=Uh(t.min,e,n,r,i),t.max=Uh(t.max,e,n,r,i)}function Hh(t,{x:e,y:n}){Wh(t.x,e.translate,e.scale,e.originPoint),Wh(t.y,n.translate,n.scale,n.originPoint)}const $h=.999999999999,zh=1.0000000000001;function qh(t,e){t.min=t.min+e,t.max=t.max+e}function Kh(t,e,n,r,i=.5){Wh(t,e,n,$c(t.min,t.max,i),r)}function Yh(t,e){Kh(t.x,e.x,e.scaleX,e.scale,e.originX),Kh(t.y,e.y,e.scaleY,e.scale,e.originY)}function Qh(t,e){return Dh(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 Xh=({current:t})=>t?t.ownerDocument.defaultView:null,Zh=new WeakMap;class Jh{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=Fh(),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 ih(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Jd(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=fh(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),Lh((t=>{let e=this.getAxisMotionValue(t).get()||0;if(lu.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[t];if(r){e=bh(r)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),o&&Il.postRender((()=>o(t,e))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=jd(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:()=>Lh((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:Xh(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&&Il.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||!tp(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?$c(e,t,r.min):Math.max(t,e):void 0!==n&&t>n&&(t=r?$c(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&&vh(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!r)&&function(t,{top:e,left:n,bottom:r,right:i}){return{x:Th(t.x,n,i),y:Th(t.y,e,r)}}(r.layoutBox,e),this.elastic=function(t=Ch){return!1===t?t=0:!0===t&&(t=Ch),{x:Rh(t,"left","right"),y:Rh(t,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Lh((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||!vh(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=Qh(t,n),{scroll:i}=e;return i&&(qh(r.x,i.offset.x),qh(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ah(t.x,e.x),y:Ah(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=Dh(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Lh((s=>{if(!tp(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(Sd(t,n,0,e,this.visualElement,!1,jd(this.visualElement,t)))}stopAnimation(){Lh((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Lh((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){Lh((e=>{const{drag:n}=this.getProps();if(!tp(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]-$c(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!vh(e)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Lh((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=bh(t),i=bh(e);return i>r?n=Hc(e.min,e.max-r,t.min):r>i&&(n=Hc(t.min,t.max-i,e.min)),Xl(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(),Lh((e=>{if(!tp(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set($c(i,o,r[e]))}))}addListeners(){if(!this.visualElement.current)return;Zh.set(this.visualElement,this);const t=nh(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();vh(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()),Il.read(e);const i=eh(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Lh((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=Ch,dragMomentum:s=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function tp(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const ep=t=>(e,n)=>{t&&Il.postRender((()=>t(e,n)))};const np=oe(null);const rp=oe({}),ip=oe({}),op={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sp(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ap={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!uu.test(t))return t;t=parseFloat(t)}return`${sp(t,e.target.x)}% ${sp(t,e.target.y)}%`}},lp={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=zu.parse(t);if(i.length>5)return r;const o=zu.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=$c(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}},up={};const{schedule:cp,cancel:dp}=Vl(queueMicrotask,!1);class hp extends Bt{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=t;var o;o=fp,Object.assign(up,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()})),op.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()||Il.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),cp.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 pp(t){const[e,n]=function(){const t=Bn(np);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=Gn();Fn((()=>r(i)),[]);const o=jn((()=>n&&n(i)),[i,n]);return!e&&n?[!1,o]:[!0]}(),r=Bn(rp);return no(hp,{...t,layoutGroup:r,switchLayoutGroup:Bn(ip),isPresent:e,safeToRemove:n})}const fp={borderRadius:{...ap,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ap,borderTopRightRadius:ap,borderBottomLeftRadius:ap,borderBottomRightRadius:ap,boxShadow:lp},mp=["TopLeft","TopRight","BottomLeft","BottomRight"],vp=mp.length,gp=t=>"string"==typeof t?parseFloat(t):t,yp=t=>"number"==typeof t||uu.test(t);function _p(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const wp=xp(0,.5,Vc),bp=xp(.5,.95,Ll);function xp(t,e,n){return r=>r<t?0:r>e?1:n(Hc(t,e,r))}function Sp(t,e){t.min=e.min,t.max=e.max}function kp(t,e){Sp(t.x,e.x),Sp(t.y,e.y)}function Ep(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Pp(t,e,n,r,i){return t=Gh(t-=e,1/n,r),void 0!==i&&(t=Gh(t,1/i,r)),t}function Tp(t,e,[n,r,i],o,s){!function(t,e=0,n=1,r=.5,i,o=t,s=t){lu.test(e)&&(e=parseFloat(e),e=$c(s.min,s.max,e/100)-s.min);if("number"!=typeof e)return;let a=$c(o.min,o.max,r);t===o&&(a-=e),t.min=Pp(t.min,e,n,a,i),t.max=Pp(t.max,e,n,a,i)}(t,e[n],e[r],e[i],e.scale,o,s)}const Ap=["x","scaleX","originX"],Cp=["y","scaleY","originY"];function Rp(t,e,n,r){Tp(t.x,e,Ap,n?n.x:void 0,r?r.x:void 0),Tp(t.y,e,Cp,n?n.y:void 0,r?r.y:void 0)}function Op(t){return 0===t.translate&&1===t.scale}function Mp(t){return Op(t.x)&&Op(t.y)}function Fp(t,e){return t.min===e.min&&t.max===e.max}function Lp(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Dp(t,e){return Lp(t.x,e.x)&&Lp(t.y,e.y)}function Vp(t){return bh(t.x)/bh(t.y)}function Ip(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class jp{constructor(){this.members=[]}add(t){Pd(this.members,t),t.scheduleRender()}remove(t){if(Td(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 Bp=(t,e)=>t.depth-e.depth;class Np{constructor(){this.children=[],this.isDirty=!1}add(t){Pd(this.children,t),this.isDirty=!0}remove(t){Td(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Bp),this.isDirty=!1,this.children.forEach(t)}}function Gp(t){const e=Id(t)?t.get():t;return kd(e)?e.toValue():e}const Up={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Wp="undefined"!=typeof window&&void 0!==window.MotionDebug,Hp=["","X","Y","Z"],$p={visibility:"hidden"};let zp=0;function qp(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Kp(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ld(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Il,!(e||r))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Kp(r)}function Yp({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=zp++,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,Wp&&(Up.totalNodes=Up.resolvedTargetDeltas=Up.recalculatedProjection=0),this.nodes.forEach(Zp),this.nodes.forEach(sf),this.nodes.forEach(af),this.nodes.forEach(Jp),Wp&&window.MotionDebug.record(Up)},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 Np)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Ad),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=ac.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(jl(r),t(o-e))};return Il.read(r,!0),()=>jl(r)}(r,250),op.hasAnimatedSinceResize&&(op.hasAnimatedSinceResize=!1,this.nodes.forEach(of))}))}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()||pf,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Dp(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={...Rl(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||of(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,jl(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(lf),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&&Kp(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(ef);this.isUpdating||this.nodes.forEach(nf),this.isUpdating=!1,this.nodes.forEach(rf),this.nodes.forEach(Qp),this.nodes.forEach(Xp),this.clearAllSnapshots();const t=ac.now();Bl.delta=Xl(0,1e3/60,t-Bl.timestamp),Bl.timestamp=t,Bl.isProcessing=!0,Nl.update.process(Bl),Nl.preRender.process(Bl),Nl.render.process(Bl),Bl.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tf),this.sharedNodes.forEach(uf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Il.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Il.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=Fh(),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&&!Mp(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;t&&(e||jh(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)),vf((r=n).x),vf(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 Fh();const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(yf))){const{scroll:t}=this.root;t&&(qh(n.x,t.offset.x),qh(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n=Fh();if(kp(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&&kp(n,t),qh(n.x,i.offset.x),qh(n.y,i.offset.y))}return n}applyTransform(t,e=!1){const n=Fh();kp(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&&Yh(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),jh(t.latestValues)&&Yh(n,t.latestValues)}return jh(this.latestValues)&&Yh(n,this.latestValues),n}removeTransform(t){const e=Fh();kp(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!jh(t.latestValues))continue;Ih(t.latestValues)&&t.updateSnapshot();const r=Fh();kp(r,t.measurePageBox()),Rp(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,r)}return jh(this.latestValues)&&Rp(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!==Bl.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=Bl.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Fh(),this.relativeTargetOrigin=Fh(),Ph(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),kp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Fh(),this.targetWithTransforms=Fh()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,kh(s.x,a.x,l.x),kh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):kp(this.target,this.layout.layoutBox),Hh(this.target,this.targetDelta)):kp(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=Fh(),this.relativeTargetOrigin=Fh(),Ph(this.relativeTargetOrigin,this.target,t.target),kp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Wp&&Up.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Ih(this.parent.latestValues)&&!Bh(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===Bl.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;kp(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&&Yh(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Hh(t,s)),r&&jh(o.latestValues)&&Yh(t,o.latestValues))}e.x<zh&&e.x>$h&&(e.x=1),e.y<zh&&e.y>$h&&(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=Fh());const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Ep(this.prevProjectionDelta.x,this.projectionDelta.x),Ep(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Sh(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&Ip(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ip(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Wp&&Up.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=Mh(),this.projectionDelta=Mh(),this.projectionDeltaWithTransform=Mh()}setAnimationOrigin(t,e=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=Mh();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const s=Fh(),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(hf));let d;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,f,m,v;cf(o.x,t.x,n),cf(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ph(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,m=s,v=n,df(p.x,f.x,m.x,v),df(p.y,f.y,m.y,v),d&&(l=this.relativeTarget,h=d,Fp(l.x,h.x)&&Fp(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d=Fh()),kp(d,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,r,i,o){i?(t.opacity=$c(0,void 0!==n.opacity?n.opacity:1,wp(r)),t.opacityExit=$c(void 0!==e.opacity?e.opacity:1,0,bp(r))):o&&(t.opacity=$c(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<vp;s++){const i=`border${mp[s]}Radius`;let o=_p(e,i),a=_p(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||yp(o)===yp(a)?(t[i]=Math.max($c(gp(o),gp(a),r),0),(lu.test(a)||lu.test(o))&&(t[i]+="%")):t[i]=a)}(e.rotate||n.rotate)&&(t.rotate=$c(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&&(jl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Il.update((()=>{op.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const r=Id(t)?t:Rd(t);return r.start(Sd("",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&&gf(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Fh();const e=bh(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const r=bh(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+r}kp(e,n),Yh(e,i),Sh(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new jp);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&&qp("z",t,r,this.animationValues);for(let i=0;i<Hp.length;i++)qp(`rotate${Hp[i]}`,t,r,this.animationValues),qp(`skew${Hp[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 $p;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Gp(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=Gp(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!jh(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 up){if(void 0===s[u])continue;const{correct:t,applyTo:e}=up[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?Gp(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(ef),this.root.sharedNodes.clear()}}}function Qp(t){t.updateLayout()}function Xp(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?Lh((t=>{const r=o?n.measuredBox[t]:n.layoutBox[t],i=bh(r);r.min=e[t].min,r.max=r.min+i})):gf(i,n.layoutBox,e)&&Lh((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=bh(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=Mh();Sh(s,e,n.layoutBox);const a=Mh();o?Sh(a,t.applyTransform(r,!0),n.measuredBox):Sh(a,e,n.layoutBox);const l=!Mp(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=Fh();Ph(s,n.layoutBox,i.layoutBox);const a=Fh();Ph(a,e,o.layoutBox),Dp(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 Zp(t){Wp&&Up.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 Jp(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tf(t){t.clearSnapshot()}function ef(t){t.clearMeasurements()}function nf(t){t.isLayoutDirty=!1}function rf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function of(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function sf(t){t.resolveTargetDelta()}function af(t){t.calcProjection()}function lf(t){t.resetSkewAndRotation()}function uf(t){t.removeLeadSnapshot()}function cf(t,e,n){t.translate=$c(e.translate,0,n),t.scale=$c(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function df(t,e,n,r){t.min=$c(e.min,n.min,r),t.max=$c(e.max,n.max,r)}function hf(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const pf={duration:.45,ease:[.4,0,.1,1]},ff=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),mf=ff("applewebkit/")&&!ff("chrome/")?Math.round:Ll;function vf(t){t.min=mf(t.min),t.max=mf(t.max)}function gf(t,e,n){return"position"===t||"preserve-aspect"===t&&(r=Vp(e),i=Vp(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function yf(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const _f=Yp({attachResizeListener:(t,e)=>eh(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wf={current:void 0},bf=Yp({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!wf.current){const t=new _f({});t.mount(window),t.setOptions({layoutScroll:!0}),wf.current=t}return wf.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),xf={pan:{Feature:class extends Yd{constructor(){super(...arguments),this.removePointerDownListener=Ll}onPointerDown(t){this.session=new ih(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xh(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ep(t),onStart:ep(e),onMove:n,onEnd:(t,e)=>{delete this.session,r&&Il.postRender((()=>r(t,e)))}}}mount(){this.removePointerDownListener=nh(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 Yd{constructor(t){super(t),this.removeGroupControls=Ll,this.removeListeners=Ll,this.controls=new Jh(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ll}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:bf,MeasureLayout:pp}};function Sf(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd";return nh(t.current,n,((n,i)=>{if("touch"===n.pointerType||mh())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const s=o[r];s&&Il.postRender((()=>s(n,i)))}),{passive:!t.getProps()[r]})}const kf=(t,e)=>!!e&&(t===e||kf(t,e.parentElement));function Ef(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Jd(n))}const Pf=new WeakMap,Tf=new WeakMap,Af=t=>{const e=Pf.get(t.target);e&&e(t)},Cf=t=>{t.forEach(Af)};function Rf(t,e,n){const r=function({root:t,...e}){const n=t||document;Tf.has(n)||Tf.set(n,{});const r=Tf.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(Cf,{root:t,...e})),r[i]}(e);return Pf.set(t,n),r.observe(t),()=>{Pf.delete(t),r.unobserve(t)}}const Of={some:0,all:1};const Mf={inView:{Feature:class extends Yd{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:Of[r]};return Rf(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 Yd{constructor(){super(...arguments),this.removeStartListeners=Ll,this.removeEndListeners=Ll,this.removeAccessibleListeners=Ll,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=nh(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||kf(this.node.current,t.target)?n:r;o&&Il.update((()=>o(t,e)))}),{passive:!(n.onTap||n.onPointerUp)}),i=nh(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Wc(r,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=eh(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=eh(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&Ef("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&Il.postRender((()=>n(t,e)))}))})),Ef("down",((t,e)=>{this.startPress(t,e)}))})),e=eh(this.node.current,"blur",(()=>{this.isPressing&&Ef("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Wc(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&&Il.postRender((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!mh()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Il.postRender((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=nh(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=eh(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Wc(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Yd{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(by){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=Wc(eh(this.node.current,"focus",(()=>this.onFocus())),eh(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Yd{mount(){this.unmount=Wc(Sf(this.node,!0),Sf(this.node,!1))}unmount(){}}}},Ff={layout:{ProjectionNode:bf,MeasureLayout:pp}},Lf=oe({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Df=oe({}),Vf="undefined"!=typeof window,If=Vf?Ln:Fn,jf=oe({strict:!1});let Bf=!1;function Nf(t,e,n,r,i){var o;const{visualElement:s}=Bn(Df),a=Bn(jf),l=Bn(np),u=Bn(Lf).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(ip);!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:Uf(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&vh(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[Fd],f=Dn(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return If((()=>{d&&(d.updateFeatures(),cp.render(d.render),f.current&&d.animationState&&d.animationState.animateChanges())})),Fn((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current=!1,Bf||(Bf=!0,queueMicrotask(Gf)))})),d}function Gf(){window.MotionHandoffIsComplete=!0}function Uf(t){if(t)return!1!==t.options.allowProjection?t.projection:Uf(t.parent)}function Wf(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):vh(n)&&(n.current=r))}),[e])}function Hf(t){return pl(t.animate)||bl.some((e=>vl(t[e])))}function $f(t){return Boolean(Hf(t)||t.variants)}function zf(t){const{initial:e,animate:n}=function(t,e){if(Hf(t)){const{initial:e,animate:n}=t;return{initial:!1===e||vl(e)?e:void 0,animate:vl(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,Bn(Df));return In((()=>({initial:e,animate:n})),[qf(e),qf(n)])}function qf(t){return Array.isArray(t)?t.join(" "):t}const Kf={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"]},Yf={};for(const mS in Kf)Yf[mS]={isEnabled:t=>Kf[mS].some((e=>!!t[e]))};const Qf=Symbol.for("motionComponentSymbol");function Xf({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&function(t){for(const e in t)Yf[e]={...Yf[e],...t[e]}}(t);const o=er((function(t,o){let s;const a={...Bn(Lf),...t,layoutId:Zf(t)},{isStatic:l}=a,u=zf(t),c=r(t,l);if(!l&&Vf){Bn(jf).strict;const t=function(t){const{drag:e,layout:n}=Yf;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=Nf(i,c,a,e,t.ProjectionNode)}return no(Df.Provider,{value:u,children:[s&&u.visualElement?no(s,{visualElement:u.visualElement,...a}):null,n(i,t,Wf(c,u.visualElement,o),c,l,u.visualElement)]})}));return o[Qf]=i,o}function Zf({layoutId:t}){const e=Bn(rp).id;return e&&void 0!==t?e+"-"+t:t}const Jf=["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 tm(t){return"string"==typeof t&&!t.includes("-")&&!!(Jf.indexOf(t)>-1||/[A-Z]/u.test(t))}function em(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 nm=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 rm(t,e,n,r){em(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(nm.has(i)?i:Md(i),e.attrs[i])}function im(t,{layout:e,layoutId:n}){return Sl.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!up[t]||"opacity"===t)}function om(t,e,n){var r;const{style:i}=t,o={};for(const s in i)(Id(i[s])||e.style&&Id(e.style[s])||im(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 sm(t,e,n){const r=om(t,e,n);for(const i in t)if(Id(t[i])||Id(e[i])){r[-1!==xl.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return r}function am(t){const e=Dn(null);return null===e.current&&(e.current=t()),e.current}const lm=t=>(e,n)=>{const r=Bn(Df),i=Bn(np),o=()=>function({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:r},i,o,s,a){const l={latestValues:dm(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():am(o)};function um(t,e){const n=Dd(e);n&&Pd(t,n)}function cm(t,e,n){const r=Array.isArray(e)?e:[e];for(let i=0;i<r.length;i++){const e=yl(t,r[i]);if(e){const{transitionEnd:t,transition:r,...i}=e;n(i,t)}}}function dm(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]=Gp(u[v]);let{initial:c,animate:d}=t;const h=Hf(t),p=$f(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&&!pl(m)&&cm(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&&!pl(d)&&cm(t,d,(t=>{for(const e in t)um(a,e)})),a.length&&(s.willChange=a.join(","))),s}const hm=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),pm=()=>({...hm(),attrs:{}}),fm=(t,e)=>e&&"number"==typeof t?e.transform(t):t,mm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vm=xl.length;function gm(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(Sl.has(l))s=!0;else if($l(l))i[l]=t;else{const e=fm(t,Zu[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<vm;o++){const s=xl[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=fm(a,Zu[s]);l||(i=!1,r+=`${mm[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 ym(t,e,n){return"string"==typeof t?t:uu.transform(e+n*t)}const _m={offset:"stroke-dashoffset",array:"stroke-dasharray"},wm={offset:"strokeDashoffset",array:"strokeDasharray"};function bm(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(gm(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`${ym(e,t.x,t.width)} ${ym(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?_m:wm;t[o.offset]=uu.transform(-r);const s=uu.transform(e),a=uu.transform(n);t[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const xm=t=>"string"==typeof t&&"svg"===t.toLowerCase(),Sm={useVisualState:lm({scrapeMotionValuesFromProps:sm,createRenderState:pm,onMount:(t,e,{renderState:n,latestValues:r})=>{Il.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(by){n.dimensions={x:0,y:0,width:0,height:0}}})),Il.render((()=>{bm(n,r,xm(e.tagName),t.transformTemplate),rm(e,n)}))}})},km={useVisualState:lm({applyWillChange:!0,scrapeMotionValuesFromProps:om,createRenderState:hm})};function Em(t,e,n){for(const r in e)Id(e[r])||im(r,n)||(t[r]=e[r])}function Pm(t,e){const n={};return Em(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return In((()=>{const n=hm();return gm(n,e,t),Object.assign({},n.vars,n.style)}),[e])}(t,e)),n}function Tm(t,e){const n={},r=Pm(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 Am=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 Cm(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Am.has(t)}let Rm=t=>!Cm(t);try{(Om=require("@emotion/is-prop-valid").default)&&(Rm=t=>t.startsWith("on")?!Cm(t):Om(t))}catch(fS){}var Om;function Mm(t,e,n,r){const i=In((()=>{const n=pm();return bm(n,e,xm(r),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};Em(e,t.style,t),i.style={...e,...i.style}}return i}function Fm(t=!1){return(e,n,r,{latestValues:i},o)=>{const s=(tm(e)?Mm:Tm)(n,i,o,e),a=function(t,e,n){const r={};for(const i in t)"values"===i&&"object"==typeof t.values||(Rm(i)||!0===n&&Cm(i)||!e&&!Cm(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((()=>Id(u)?u.get():u),[u])})}}function Lm(t,e){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Xf({...tm(n)?Sm:km,preloadedFeatures:t,useRender:Fm(r),createVisualElement:e,Component:n})}}const Dm={current:null},Vm={current:!1};const Im=new WeakMap,jm=[...bu,Du,zu],Bm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Nm=bl.length;class Gm{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=Au,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,Il.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=Hf(e),this.isVariantNode=$f(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]&&Id(t)&&t.set(a[d],!1)}}mount(t){this.current=t,Im.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))),Vm.current||function(){if(Vm.current=!0,Vf)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Dm.current=t.matches;t.addListener(e),e()}else Dm.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Dm.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Im.delete(this.current),this.projection&&this.projection.unmount(),jl(this.notifyUpdate),jl(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=Sl.has(t),r=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&Il.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 Yf){const e=Yf[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):Fh()}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<Bm.length;n++){const e=Bm[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(Id(i))t.addValue(r,i);else if(Id(o))t.addValue(r,Rd(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,Rd(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<Nm;n++){const t=bl[n],r=this.props[t];(vl(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=Rd(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&&(Wl(r)||Gl(r))?r=parseFloat(r):(i=r,!jm.find(wu(i))&&zu.test(e)&&(r=ec(t,e))),this.setBaseTarget(t,Id(r)?r.get():r)),Id(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=yl(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||Id(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 Ad),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Um extends Gm{constructor(){super(...arguments),this.KeyframeResolver=rc}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 Wm extends Um{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=em}readValueFromInstance(t,e){if(Sl.has(e)){const t=tc(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),i=($l(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Qh(t,e)}build(t,e,n){gm(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return om(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Id(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}class Hm extends Um{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Fh}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Sl.has(e)){const t=tc(e);return t&&t.default||0}return e=nm.has(e)?e:Md(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return sm(t,e,n)}build(t,e,n){bm(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,r){rm(t,e,0,r)}mount(t){this.isSVGTag=xm(t.tagName),super.mount(t)}}const $m=hl(Lm({...Xd,...Mf,...xf,...Ff},((t,e)=>tm(t)?new Hm(e):new Wm(e,{allowProjection:t!==jt}))));class zm 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 qm({children:t,isPresent:e}){const n=Gn(),r=Dn(null),i=Dn({width:0,height:0,top:0,left:0}),{nonce:o}=Bn(Lf);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(zm,{isPresent:e,childRef:r,sizeRef:i,children:jr(t,{ref:r})})}const Km=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=am(Ym),l=Gn(),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(qm,{isPresent:n,children:t})),no(np.Provider,{value:u,children:t})};function Ym(){return new Map}const Qm=t=>t.key||"";function Xm(t){const e=[];return rr.forEach(t,(t=>{Dr(t)&&e.push(t)})),e}const Zm=({children:t,exitBeforeEnter:e,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=In((()=>Xm(t)),[t]),l=a.map(Qm),u=Dn(!0),c=Dn(a),d=am((()=>new Map)),[h,p]=On(a),[f,m]=On(a);If((()=>{u.current=!1,c.current=a;for(let t=0;t<f.length;t++){const e=Qm(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=Qm(n);l.includes(r)||(t.splice(e,0,n),v.push(n))}return"wait"===s&&v.length&&(t=v),m(Xm(t)),void p(a)}const{forceRender:g}=Bn(rp);return no(jt,{children:f.map((t=>{const e=Qm(t),h=a===f||l.includes(e);return no(Km,{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)}))})},Jm=Ms.input`
|
|
40
|
-
${()=>({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"}})}
|
|
41
|
-
|
|
42
|
-
${({prefix:t})=>t?{paddingLeft:"1.75rem"}:{paddingLeft:"0.75rem"}}
|
|
43
|
-
|
|
44
|
-
${({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)"}}}
|
|
45
|
-
`,tv=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:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:t}),io("div",{css:{marginTop:"0.5rem"},children:io(Jm,{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})]})));var ev=t=>"checkbox"===t.type,nv=t=>t instanceof Date,rv=t=>null==t;const iv=t=>"object"==typeof t;var ov=t=>!rv(t)&&!Array.isArray(t)&&iv(t)&&!nv(t),sv=t=>ov(t)&&t.target?ev(t.target)?t.target.checked:t.target.value:t,av=(t,e)=>t.has((t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t)(e)),lv=t=>{const e=t.constructor&&t.constructor.prototype;return ov(e)&&e.hasOwnProperty("isPrototypeOf")},uv="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function cv(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(uv&&(t instanceof Blob||t instanceof FileList)||!n&&!ov(t))return t;if(e=n?[]:{},n||lv(t))for(const n in t)t.hasOwnProperty(n)&&(e[n]=cv(t[n]));else e=t}return e}var dv=t=>Array.isArray(t)?t.filter(Boolean):[],hv=t=>void 0===t,pv=(t,e,n)=>{if(!e||!ov(t))return n;const r=dv(e.split(/[,[\].]+?/)).reduce(((t,e)=>rv(t)?t:t[e]),t);return hv(r)||r===t?hv(t[e])?n:t[e]:r},fv=t=>"boolean"==typeof t,mv=t=>/^\w*$/.test(t),vv=t=>dv(t.replace(/["|']|\]/g,"").split(/\.|\[/)),gv=(t,e,n)=>{let r=-1;const i=mv(e)?[e]:vv(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=ov(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===e)return;t[e]=o,t=t[e]}return t};const yv={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_v={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},wv="max",bv="min",xv="maxLength",Sv="minLength",kv="pattern",Ev="required",Pv="validate",Tv=Xr.createContext(null),Av=()=>Xr.useContext(Tv);var Cv=(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]!==_v.all&&(e._proxyFormState[i]=!r||_v.all),n&&(n[i]=!0),t[i]}});return i},Rv=t=>ov(t)&&!Object.keys(t).length,Ov=(t,e,n,r)=>{n(t);const{name:i,...o}=t;return Rv(o)||Object.keys(o).length>=Object.keys(e).length||Object.keys(o).find((t=>e[t]===(!r||_v.all)))},Mv=t=>Array.isArray(t)?t:[t],Fv=(t,e,n)=>!t||!e||t===e||Mv(t).some((t=>t&&(n?t===e:t.startsWith(e)||e.startsWith(t))));function Lv(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 Dv=t=>"string"==typeof t,Vv=(t,e,n,r,i)=>Dv(t)?(r&&e.watch.add(t),pv(n,t,i)):Array.isArray(t)?t.map((t=>(r&&e.watch.add(t),pv(n,t)))):(r&&(e.watchAll=!0),n);function Iv(t){const e=Av(),{name:n,disabled:r,control:i=e.control,shouldUnregister:o}=t,s=av(i._names.array,n),a=function(t){const e=Av(),{control:n=e.control,name:r,defaultValue:i,disabled:o,exact:s}=t||{},a=Xr.useRef(r);a.current=r,Lv({disabled:o,subject:n._subjects.values,next:t=>{Fv(a.current,t.name,s)&&u(cv(Vv(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:pv(i._formValues,n,pv(i._defaultValues,n,t.defaultValue)),exact:!0}),l=function(t){const e=Av(),{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,Lv({disabled:r,next:t=>l.current&&Fv(c.current,t.name,o)&&Ov(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]),Cv(s,n,u.current,!1)}({control:i,name:n,exact:!0}),u=Xr.useRef(i.register(n,{...t.rules,value:a,...fv(t.disabled)?{disabled:t.disabled}:{}}));return Xr.useEffect((()=>{const t=i._options.shouldUnregister||o,e=(t,e)=>{const n=pv(i._fields,t);n&&n._f&&(n._f.mount=e)};if(e(n,!0),t){const t=cv(pv(i._options.defaultValues,n));gv(i._defaultValues,n,t),hv(pv(i._formValues,n))&&gv(i._formValues,n,t)}return()=>{(s?t&&!i._state.action:t)?i.unregister(n):e(n,!1)}}),[n,i,s,o]),Xr.useEffect((()=>{pv(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:pv(i._fields,n)._f.value})}),[r,n,i]),{field:{name:n,value:a,...fv(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Xr.useCallback((t=>u.current.onChange({target:{value:sv(t),name:n},type:yv.CHANGE})),[n]),onBlur:Xr.useCallback((()=>u.current.onBlur({target:{value:pv(i._formValues,n),name:n},type:yv.BLUR})),[n,i]),ref:Xr.useCallback((t=>{const e=pv(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:()=>!!pv(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!pv(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!pv(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!pv(l.validatingFields,n)},error:{enumerable:!0,get:()=>pv(l.errors,n)}})}}const jv=t=>t.render(Iv(t));var Bv=(t,e,n,r,i)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:i||!0}}:{},Nv=t=>({isOnSubmit:!t||t===_v.onSubmit,isOnBlur:t===_v.onBlur,isOnChange:t===_v.onChange,isOnAll:t===_v.all,isOnTouch:t===_v.onTouched}),Gv=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some((e=>t.startsWith(e)&&/^\.\w+/.test(t.slice(e.length)))));const Uv=(t,e,n,r)=>{for(const i of n||Object.keys(t)){const n=pv(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(Uv(o,e))break}else if(ov(o)&&Uv(o,e))break}}};var Wv=(t,e,n)=>{const r=Mv(pv(t,n));return gv(r,"root",e[n]),gv(t,n,r),t},Hv=t=>"file"===t.type,$v=t=>"function"==typeof t,zv=t=>{if(!uv)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},qv=t=>Dv(t),Kv=t=>"radio"===t.type,Yv=t=>t instanceof RegExp;const Qv={value:!1,isValid:!1},Xv={value:!0,isValid:!0};var Zv=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&&!hv(t[0].attributes.value)?hv(t[0].value)||""===t[0].value?Xv:{value:t[0].value,isValid:!0}:Xv:Qv}return Qv};const Jv={isValid:!1,value:null};var tg=t=>Array.isArray(t)?t.reduce(((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t),Jv):Jv;function eg(t,e,n="validate"){if(qv(t)||Array.isArray(t)&&t.every(qv)||fv(t)&&!t)return{type:n,message:qv(t)?t:"",ref:e}}var ng=t=>ov(t)&&!Yv(t)?t:{value:t,message:""},rg=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=pv(e,f);if(!v||g)return{};const _=s?s[0]:o,w=t=>{r&&_.reportValidity&&(_.setCustomValidity(fv(t)?"":t||""),_.reportValidity())},b={},x=Kv(o),S=ev(o),k=x||S,E=(m||Hv(o))&&hv(o.value)&&hv(y)||zv(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,P=Bv.bind(null,f,n,b),T=(t,e,n,r=xv,i=Sv)=>{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||rv(y))||fv(y)&&!y||S&&!Zv(s).isValid||x&&!tg(s).isValid)){const{value:t,message:e}=qv(a)?{value:!!a,message:a}:ng(a);if(t&&(b[f]={type:Ev,message:e,ref:_,...P(Ev,e)},!n))return w(e),b}if(!(E||rv(c)&&rv(d))){let t,e;const r=ng(d),i=ng(c);if(rv(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;Dv(r.value)&&y&&(t=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Dv(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);rv(r.value)||(t=n>r.value),rv(i.value)||(e=n<i.value)}if((t||e)&&(T(!!t,r.message,i.message,wv,bv),!n))return w(b[f].message),b}if((l||u)&&!E&&(Dv(y)||i&&Array.isArray(y))){const t=ng(l),e=ng(u),r=!rv(t.value)&&y.length>+t.value,i=!rv(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&&Dv(y)){const{value:t,message:e}=ng(h);if(Yv(t)&&!y.match(t)&&(b[f]={type:kv,message:e,ref:o,...P(kv,e)},!n))return w(e),b}if(p)if($v(p)){const t=eg(await p(y,e),_);if(t&&(b[f]={...t,...P(Pv,t.message)},!n))return w(t.message),b}else if(ov(p)){let t={};for(const r in p){if(!Rv(t)&&!n)break;const i=eg(await p[r](y,e),_,r);i&&(t={...i,...P(r,i.message)},w(i.message),n&&(b[f]=t))}if(!Rv(t)&&(b[f]={ref:_,...t},!n))return b}return w(!0),b};function ig(t,e){const n=Array.isArray(e)?e:mv(e)?[e]:vv(e),r=1===n.length?t:function(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=hv(t)?r++:t[e[r++]];return t}(t,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(ov(r)&&Rv(r)||Array.isArray(r)&&function(t){for(const e in t)if(t.hasOwnProperty(e)&&!hv(t[e]))return!1;return!0}(r))&&ig(t,n.slice(0,-1)),t}var og=()=>{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=[]}}},sg=t=>rv(t)||!iv(t);function ag(t,e){if(sg(t)||sg(e))return t===e;if(nv(t)&&nv(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(nv(n)&&nv(t)||ov(n)&&ov(t)||Array.isArray(n)&&Array.isArray(t)?!ag(n,t):n!==t)return!1}}return!0}var lg=t=>"select-multiple"===t.type,ug=t=>Kv(t)||ev(t),cg=t=>zv(t)&&t.isConnected,dg=t=>{for(const e in t)if($v(t[e]))return!0;return!1};function hg(t,e={}){const n=Array.isArray(t);if(ov(t)||n)for(const r in t)Array.isArray(t[r])||ov(t[r])&&!dg(t[r])?(e[r]=Array.isArray(t[r])?[]:{},hg(t[r],e[r])):rv(t[r])||(e[r]=!0);return e}function pg(t,e,n){const r=Array.isArray(t);if(ov(t)||r)for(const i in t)Array.isArray(t[i])||ov(t[i])&&!dg(t[i])?hv(e)||sg(n[i])?n[i]=Array.isArray(t[i])?hg(t[i],[]):{...hg(t[i])}:pg(t[i],rv(e)?{}:e[i],n[i]):n[i]=!ag(t[i],e[i]);return n}var fg=(t,e)=>pg(t,e,hg(e)),mg=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>hv(t)?t:e?""===t?NaN:t?+t:t:n&&Dv(t)?new Date(t):r?r(t):t;function vg(t){const e=t.ref;if(!(t.refs?t.refs.every((t=>t.disabled)):e.disabled))return Hv(e)?e.files:Kv(e)?tg(t.refs).value:lg(e)?[...e.selectedOptions].map((({value:t})=>t)):ev(e)?Zv(t.refs).value:mg(hv(e.value)?t.ref.value:e.value,t)}var gg=(t,e,n,r)=>{const i={};for(const o of t){const t=pv(e,o);t&&gv(i,o,t._f)}return{criteriaMode:n,names:[...t],fields:i,shouldUseNativeValidation:r}},yg=t=>hv(t)?t:Yv(t)?t.source:ov(t)?Yv(t.value)?t.value.source:t.value:t;const _g="AsyncFunction";var wg=t=>!(t&&t.validate||!($v(t.validate)&&t.validate.constructor.name===_g||ov(t.validate)&&Object.values(t.validate).find((t=>t.constructor.name===_g)))),bg=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function xg(t,e,n){const r=pv(t,n);if(r||mv(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=pv(e,r),s=pv(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 Sg=(t,e,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(e||t):(n?r.isOnBlur:i.isOnBlur)?!t:!(n?r.isOnChange:i.isOnChange)||t),kg=(t,e)=>!dv(pv(t,e)).length&&ig(t,e);const Eg={mode:_v.onSubmit,reValidateMode:_v.onChange,shouldFocusError:!0};function Pg(t={}){let e,n={...Eg,...t},r={submitCount:0,isDirty:!1,isLoading:$v(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(ov(n.defaultValues)||ov(n.values))&&cv(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:cv(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:og(),array:og(),state:og()},h=Nv(n.mode),p=Nv(n.reValidateMode),f=n.criteriaMode===_v.all,m=async t=>{if(c.isValid||t){const t=n.resolver?Rv((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?gv(r.validatingFields,t,e):ig(r.validatingFields,t))})),d.state.next({validatingFields:r.validatingFields,isValidating:!Rv(r.validatingFields)}))},g=(t,e,n,r)=>{const l=pv(i,t);if(l){const i=pv(s,t,hv(n)?pv(o,t):n);hv(i)||r&&r.defaultChecked||e?gv(s,t,e?i:vg(l._f)):k(t,i),a.mount&&m()}},y=(t,e,n,s,a)=>{let l=!1,u=!1;const h={name:t},p=!!(pv(i,t)&&pv(i,t)._f&&pv(i,t)._f.disabled);if(!n||s){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=x(),l=u!==h.isDirty);const n=p||ag(pv(o,t),e);u=!(p||!pv(r.dirtyFields,t)),n||p?ig(r.dirtyFields,t):gv(r.dirtyFields,t,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!n}if(n){const e=pv(r.touchedFields,t);e||(gv(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=pv(r.errors,n),l=c.isValid&&fv(i)&&r.isValid!==i;var h;if(t.delayError&&o?(h=()=>((t,e)=>{gv(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?gv(r.errors,n,o):ig(r.errors,n)),(o?!ag(a,o):a)||!Rv(s)||l){const t={...s,...l&&fv(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,gg(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&&wg(a._f);d&&c.validatingFields&&v([o],!0);const h=await rg(a,s,f,n.shouldUseNativeValidation&&!e,u);if(d&&c.validatingFields&&v([o]),h[t.name]&&(i.valid=!1,e))break;!e&&(pv(h,t.name)?u?Wv(r.errors,h,t.name):gv(r.errors,t.name,h[t.name]):ig(r.errors,t.name))}!Rv(u)&&await b(u,e,i)}}return i.valid},x=(t,e)=>(t&&e&&gv(s,t,e),!ag(R(),o)),S=(t,e,n)=>Vv(t,l,{...a.mount?s:hv(e)?o:Dv(t)?{[t]:e}:e},n,e),k=(t,e,n={})=>{const r=pv(i,t);let o=e;if(r){const n=r._f;n&&(!n.disabled&&gv(s,t,mg(e,n)),o=zv(n.ref)&&rv(e)?"":e,lg(n.ref)?[...n.ref.options].forEach((t=>t.selected=o.includes(t.value))):n.refs?ev(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)):Hv(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=pv(i,s);!l.array.has(t)&&sg(o)&&(!a||a._f)||nv(o)?k(s,o,n):E(s,o,n)}},P=(t,e,n={})=>{const u=pv(i,t),h=l.array.has(t),p=cv(e);gv(s,t,p),h?(d.array.next({name:t,values:{...s}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:t,dirtyFields:fg(o,s),isDirty:x(t,p)})):!u||u._f||rv(p)?k(t,p,n):E(t,p,n),Gv(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=pv(i,g),k=t=>{x=Number.isNaN(t)||ag(t,pv(s,g,t))};if(S){let a,E;const P=u.type?vg(S._f):sv(o),T=o.type===yv.BLUR||o.type===yv.FOCUS_OUT,A=!bg(S._f)&&!n.resolver&&!pv(r.errors,g)&&!S._f.deps||Sg(T,pv(r.touchedFields,g),r.isSubmitted,p,h),R=Gv(g,l,T);gv(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=!Rv(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=xg(r.errors,i,g),n=xg(t,i,e.name||g);a=n.error,g=n.name,E=Rv(t)}}else v([g],!0),a=(await rg(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(pv(r.errors,e)&&t.focus)return t.focus(),1},C=async(t,e={})=>{let o,s;const a=Mv(t);if(n.resolver){const e=await(async t=>{const{errors:e}=await w(t);if(t)for(const n of t){const t=pv(e,n);t?gv(r.errors,n,t):ig(r.errors,n)}else r.errors=e;return e})(hv(t)?t:a);o=Rv(e),s=t?!a.some((t=>pv(e,t))):o}else t?(s=(await Promise.all(a.map((async t=>{const e=pv(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({...!Dv(t)||c.isValid&&o!==r.isValid?{}:{name:t},...n.resolver||!t?{isValid:o}:{},errors:r.errors}),e.shouldFocus&&!s&&Uv(i,A,t?a:l.mount),s},R=t=>{const e={...a.mount?s:o};return hv(t)?e:Dv(t)?pv(e,t):t.map((t=>pv(e,t)))},O=(t,e)=>({invalid:!!pv((e||r).errors,t),isDirty:!!pv((e||r).dirtyFields,t),error:pv((e||r).errors,t),isValidating:!!pv(r.validatingFields,t),isTouched:!!pv((e||r).touchedFields,t)}),M=(t,e,n)=>{const o=(pv(i,t,{_f:{}})._f||{}).ref,s=pv(r.errors,t)||{},{ref:a,message:l,type:u,...c}=s;gv(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?Mv(t):l.mount)l.mount.delete(a),l.array.delete(a),e.keepValue||(ig(i,a),ig(s,a)),!e.keepError&&ig(r.errors,a),!e.keepDirty&&ig(r.dirtyFields,a),!e.keepTouched&&ig(r.touchedFields,a),!e.keepIsValidating&&ig(r.validatingFields,a),!n.shouldUnregister&&!e.keepDefaultValue&&ig(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(fv(t)&&a.mount||t){const o=t?void 0:hv(i)?vg(n?n._f:pv(r,e)._f):i;gv(s,e,o),y(e,o,!1,!1,!0)}},D=(e,r={})=>{let s=pv(i,e);const u=fv(r.disabled)||fv(t.disabled);return gv(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:fv(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:yg(r.min),max:yg(r.max),minLength:yg(r.minLength),maxLength:yg(r.maxLength),pattern:yg(r.pattern)}:{},name:e,onChange:T,onBlur:T,ref:t=>{if(t){D(e,r),s=pv(i,e);const n=hv(t.value)&&t.querySelectorAll&&t.querySelectorAll("input,select,textarea")[0]||t,a=ug(n),l=s._f.refs||[];if(a?l.find((t=>t===n)):n===s._f.ref)return;gv(i,e,{_f:{...s._f,...a?{refs:[...l.filter(cg),n,...Array.isArray(pv(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else s=pv(i,e,{}),s._f&&(s._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!av(l.array,e)||!a.action)&&l.unMount.add(e)}}},V=()=>n.shouldFocusError&&Uv(i,A,l.mount),I=(t,e)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=cv(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(ig(r.errors,"root"),Rv(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:Rv(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(e,n={})=>{const u=e?cv(e):o,h=cv(u),p=Rv(e),f=p?o:h;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const t of l.mount)pv(r.dirtyFields,t)?gv(f,t,pv(s,t)):P(t,pv(f,t));else{if(uv&&hv(e))for(const t of l.mount){const e=pv(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?cv(o):{}:cv(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||ag(e,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&s?fg(o,s):r.dirtyFields:n.keepDefaultValues&&e?fg(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($v(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=pv(i,t);e&&(e._f.refs?e._f.refs.every((t=>!cg(t))):!cg(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(pv(i,t))){const e=n(pv(i,t),l.argA,l.argB);u&&gv(i,t,e)}if(h&&Array.isArray(pv(r.errors,t))){const e=n(pv(r.errors,t),l.argA,l.argB);u&&gv(r.errors,t,e),kg(r.errors,t)}if(c.touchedFields&&h&&Array.isArray(pv(r.touchedFields,t))){const e=n(pv(r.touchedFields,t),l.argA,l.argB);u&&gv(r.touchedFields,t,e)}c.dirtyFields&&(r.dirtyFields=fg(o,s)),d.state.next({name:t,isDirty:x(t,e),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else gv(s,t,e)},_updateDisabledField:L,_getFieldArray:e=>dv(pv(a.mount?s:o,e,t.shouldUnregister?pv(o,e,[]):[])),_reset:j,_resetDefaultValues:()=>$v(n.defaultValues)&&n.defaultValues().then((t=>{B(t,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:t=>{r={...r,...t}},_disableForm:t=>{fv(t)&&(d.state.next({disabled:t}),Uv(i,((e,n)=>{const r=pv(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)=>$v(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={})=>{pv(i,t)&&(hv(e.defaultValue)?P(t,cv(pv(o,t))):(P(t,e.defaultValue),gv(o,t,cv(e.defaultValue))),e.keepTouched||ig(r.touchedFields,t),e.keepDirty||(ig(r.dirtyFields,t),r.isDirty=e.defaultValue?x(t,cv(pv(o,t))):x()),e.keepError||(ig(r.errors,t),c.isValid&&m()),d.state.next({...r}))},clearErrors:t=>{t&&Mv(t).forEach((t=>ig(r.errors,t))),d.state.next({errors:t?r.errors:{}})},unregister:F,setError:M,setFocus:(t,e={})=>{const n=pv(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 Tg="undefined"!=typeof document?Xr.useLayoutEffect:()=>{};const Ag=t=>{var e;return null!==(e=null==t?void 0:t.ownerDocument)&&void 0!==e?e:document},Cg=t=>{if(t&&"window"in t&&t.window===t)return t;return Ag(t).defaultView||window};function Rg(t){let e=null;return()=>(null==e&&(e=t()),e)}const Og=Rg((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})),Mg=Rg((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 Fg{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 Lg(t){let e=Dn({isFocused:!1,observer:null});Tg((()=>{const t=e.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}}),[]);let n=function(t){const e=Dn(null);return Tg((()=>{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 Fg("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 Dg=null,Vg=new Set,Ig=new Map,jg=!1,Bg=!1;const Ng={Tab:!0,Escape:!0};function Gg(t,e){for(let n of Vg)n(t,e)}function Ug(t){jg=!0,function(t){return!(t.metaKey||!Og()&&t.altKey||t.ctrlKey||"Control"===t.key||"Shift"===t.key||"Meta"===t.key)}(t)&&(Dg="keyboard",Gg("keyboard",t))}function Wg(t){Dg="pointer","mousedown"!==t.type&&"pointerdown"!==t.type||(jg=!0,Gg("pointer",t))}function Hg(t){var e;(0===(e=t).mozInputSource&&e.isTrusted||(Mg()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType))&&(jg=!0,Dg="virtual")}function $g(t){t.target!==window&&t.target!==document&&(jg||Bg||(Dg="virtual",Gg("virtual",t)),jg=!1,Bg=!1)}function zg(){jg=!1,Bg=!0}function qg(t){if("undefined"==typeof window||Ig.get(Cg(t)))return;const e=Cg(t),n=Ag(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){jg=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ug,!0),n.addEventListener("keyup",Ug,!0),n.addEventListener("click",Hg,!0),e.addEventListener("focus",$g,!0),e.addEventListener("blur",zg,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",Wg,!0),n.addEventListener("pointermove",Wg,!0),n.addEventListener("pointerup",Wg,!0)):(n.addEventListener("mousedown",Wg,!0),n.addEventListener("mousemove",Wg,!0),n.addEventListener("mouseup",Wg,!0)),e.addEventListener("beforeunload",(()=>{Kg(t)}),{once:!0}),Ig.set(e,{focus:r})}const Kg=(t,e)=>{const n=Cg(t),r=Ag(t);e&&r.removeEventListener("DOMContentLoaded",e),Ig.has(n)&&(n.HTMLElement.prototype.focus=Ig.get(n).focus,r.removeEventListener("keydown",Ug,!0),r.removeEventListener("keyup",Ug,!0),r.removeEventListener("click",Hg,!0),n.removeEventListener("focus",$g,!0),n.removeEventListener("blur",zg,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",Wg,!0),r.removeEventListener("pointermove",Wg,!0),r.removeEventListener("pointerup",Wg,!0)):(r.removeEventListener("mousedown",Wg,!0),r.removeEventListener("mousemove",Wg,!0),r.removeEventListener("mouseup",Wg,!0)),Ig.delete(n))};function Yg(){return"pointer"!==Dg}"undefined"!=typeof document&&function(t){const e=Ag(t);let n;"loading"!==e.readyState?qg(t):(n=()=>{qg(t)},e.addEventListener("DOMContentLoaded",n))}();const Qg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Xg(t,e,n){qg(),Fn((()=>{let e=(e,r)=>{(function(t,e,n){var r;const i="undefined"!=typeof window?Cg(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Cg(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Cg(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Cg(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((t=t||(null==n?void 0:n.target)instanceof i&&!Qg.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&&!Ng[n.key])})(!!(null==n?void 0:n.isTextInput),e,r)&&t(Yg())};return Vg.add(e),()=>{Vg.delete(e)}}),e)}let Zg=!1,Jg=0;function ty(){Zg=!0,setTimeout((()=>{Zg=!1}),50)}function ey(t){"touch"===t.pointerType&&ty()}function ny(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",ey):document.addEventListener("touchend",ty),Jg++,()=>{Jg--,Jg>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",ey):document.removeEventListener("touchend",ty))}}function ry(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(ny,[]);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=>{Zg&&"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||Zg||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 iy(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=Dn({isFocused:!1,isFocusVisible:e||Yg()}),[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]);Xg((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=Lg(o),a=jn((t=>{const e=Ag(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=Lg(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 oy=Object.defineProperty,sy=(t,e,n)=>(((t,e,n)=>{e in t?oy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!=typeof e?e+"":e,n),n);let ay=new class{constructor(){sy(this,"current",this.detect()),sy(this,"handoffState","pending"),sy(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 ly(t){return ay.isServer?null:t instanceof Node?t.ownerDocument:null!=t&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}function uy(t){"function"==typeof queueMicrotask?queueMicrotask(t):Promise.resolve().then(t).catch((t=>setTimeout((()=>{throw t}))))}function cy(){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 uy((()=>{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=cy();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 dy(){let[t]=On(cy);return Fn((()=>()=>t.dispose()),[t]),t}let hy=(t,e)=>{ay.isServer?Fn(t,e):Ln(t,e)};function py(t){let e=Dn(t);return hy((()=>{e.current=t}),[t]),e}let fy=function(t){let e=py(t);return Xr.useCallback(((...t)=>e.current(...t)),[e])};function my({disabled:t=!1}={}){let e=Dn(null),[n,r]=On(!1),i=dy(),o=fy((()=>{e.current=null,r(!1),i.dispose()})),s=fy((t=>{if(i.dispose(),null===e.current){e.current=t.currentTarget,r(!0);{let n=ly(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 vy=oe(void 0);function gy(){return Bn(vy)}function yy({value:t,children:e}){return Xr.createElement(vy.Provider,{value:t},e)}function _y(...t){return Array.from(new Set(t.flatMap((t=>"string"==typeof t?t.split(" "):[])))).filter(Boolean).join(" ")}function wy(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,wy),r}var by,xy,Sy=((xy=Sy||{})[xy.None=0]="None",xy[xy.RenderStrategy=1]="RenderStrategy",xy[xy.Static=2]="Static",xy),ky=((by=ky||{})[by.Unmount=0]="Unmount",by[by.Hidden=1]="Hidden",by);function Ey({ourProps:t,theirProps:e,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:Ty;let l=Ay(e,t);if(o)return Py(l,n,r,s,a);let u=null!=i?i:0;if(2&u){let{static:t=!1,...e}=l;if(t)return Py(e,n,r,s,a)}if(1&u){let{unmount:t=!0,...e}=l;return wy(t?0:1,{0:()=>null,1:()=>Py({...e,hidden:!0,style:{display:"none"}},n,r,s,a)})}return Py(l,n,r,s,a)}function Py(t,e={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=My(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(Oy(l)).length>0||Object.keys(Oy(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)=>_y(e(...t),l.className):_y(e,l.className),r=n?{className:n}:{},o=Ay(c.props,Oy(My(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(Oy(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(Oy(l)).concat(Object.keys(Oy(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({},My(l,["ref"]),o!==jt&&u,o!==jt&&d),c)}function Ty(...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 Ay(...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 Cy(...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 Ry(t){var e;return Object.assign(er(t),{displayName:null!=(e=t.displayName)?e:t.name})}function Oy(t){let e=Object.assign({},t);for(let n in e)void 0===e[n]&&delete e[n];return e}function My(t,e=[]){let n=Object.assign({},t);for(let r of e)r in n&&delete n[r];return n}function Fy(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,fy((t=>(o||i(t),null==e?void 0:e(t))))]}function Ly(t){let[e]=On(t);return e}function Dy(t={},e=null,n=[]){for(let[r,i]of Object.entries(t))Iy(n,Vy(e,r),i);return n}function Vy(t,e){return t?t+"["+e+"]":e}function Iy(t,e,n){if(Array.isArray(n))for(let[r,i]of n.entries())Iy(t,Vy(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,""]):Dy(n,e,t)}function jy(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 By=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(By||{});let Ny=Ry((function(t,e){var n;let{features:r=1,...i}=t;return Ey({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"})})),Gy=oe(null);function Uy(t){let[e,n]=On(null);return Xr.createElement(Gy.Provider,{value:{target:e}},t.children,Xr.createElement(Ny,{features:By.Hidden,ref:n}))}function Wy({children:t}){let e=Bn(Gy);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 Hy({data:t,form:e,disabled:n,onReset:r,overrides:i}){let[o,s]=On(null),a=dy();return Fn((()=>{if(r&&o)return a.addEventListener(o,"reset",r)}),[o,e,r]),Xr.createElement(Wy,null,Xr.createElement($y,{setForm:s,formId:e}),Dy(t).map((([t,r])=>Xr.createElement(Ny,{features:By.Hidden,...Oy({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:e,disabled:n,name:t,value:r,...i})}))))}function $y({setForm:t,formId:e}){return Fn((()=>{if(e){let n=document.getElementById(e);n&&t(n)}}),[t,e]),e?null:Xr.createElement(Ny,{features:By.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 qy(){return Bn(zy)}function Ky({id:t,children:e}){return Xr.createElement(zy.Provider,{value:t},e)}function Yy(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 Qy=Symbol();function Xy(...t){let e=Dn(t);Fn((()=>{e.current=t}),[t]);let n=fy((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[Qy])))?void 0:n}let Zy=oe(null);function Jy(){let t=Bn(Zy);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,Jy),t}return t}function t_(){var t,e;return null!=(e=null==(t=Bn(Zy))?void 0:t.value)?e:void 0}function e_(){let[t,e]=On([]);return[t.length>0?t.join(" "):void 0,In((()=>function(t){let n=fy((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(Zy.Provider,{value:r},t.children)}),[e])]}Zy.displayName="DescriptionContext";let n_=Ry((function(t,e){let n=Gn(),r=gy(),{id:i=`headlessui-description-${n}`,...o}=t,s=Jy(),a=Xy(e);hy((()=>s.register(i)),[i,s.register]);let l=r||!1,u=In((()=>({...s.slot,disabled:l})),[s.slot,l]);return Ey({ourProps:{ref:a,...s.props,id:i},theirProps:o,slot:u,defaultTag:"p",name:s.name||"Description"})})),r_=Object.assign(n_,{});var i_,o_=((i_=o_||{}).Space=" ",i_.Enter="Enter",i_.Escape="Escape",i_.Backspace="Backspace",i_.Delete="Delete",i_.ArrowLeft="ArrowLeft",i_.ArrowUp="ArrowUp",i_.ArrowRight="ArrowRight",i_.ArrowDown="ArrowDown",i_.Home="Home",i_.End="End",i_.PageUp="PageUp",i_.PageDown="PageDown",i_.Tab="Tab",i_);let s_=oe(null);function a_(){let t=Bn(s_);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,a_),t}return t}function l_(t){var e,n,r;let i=null!=(n=null==(e=Bn(s_))?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 u_({inherit:t=!1}={}){let e=l_(),[n,r]=On([]),i=t?[e,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,In((()=>function(t){let e=fy((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(s_.Provider,{value:n},t.children)}),[r])]}s_.displayName="LabelContext";let c_=Ry((function(t,e){var n;let r=Gn(),i=a_(),o=qy(),s=gy(),{id:a=`headlessui-label-${r}`,htmlFor:l=(null!=o?o:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...c}=t,d=Xy(e);hy((()=>i.register(a)),[a,i.register]);let h=fy((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),Ey({ourProps:m,theirProps:c,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})})),d_=Object.assign(c_,{});function h_(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 p_(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 hy((()=>{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 f_=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 m_(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 v_(t){return Yr(t.subscribe,t.getSnapshot,t.getSnapshot)}let g_=new f_((()=>m_((()=>[]),{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 y_(t,e){let n=g_.get(e),r=Gn(),i=v_(n);if(hy((()=>{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 __=new Map,w_=new Map;function b_(t){var e;let n=null!=(e=w_.get(t))?e:0;return w_.set(t,n+1),0!==n||(__.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),t.setAttribute("aria-hidden","true"),t.inert=!0),()=>x_(t)}function x_(t){var e;let n=null!=(e=w_.get(t))?e:1;if(1===n?w_.delete(t):w_.set(t,n-1),1!==n)return;let r=__.get(t);r&&(null===r["aria-hidden"]?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r["aria-hidden"]),t.inert=r.inert,__.delete(t))}let S_=["[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(","),k_=["[data-autofocus]"].map((t=>`${t}:not([tabindex='-1'])`)).join(",");var E_,P_,T_,A_=((T_=A_||{})[T_.First=1]="First",T_[T_.Previous=2]="Previous",T_[T_.Next=4]="Next",T_[T_.Last=8]="Last",T_[T_.WrapAround=16]="WrapAround",T_[T_.NoScroll=32]="NoScroll",T_[T_.AutoFocus=64]="AutoFocus",T_),C_=((P_=C_||{})[P_.Error=0]="Error",P_[P_.Overflow=1]="Overflow",P_[P_.Success=2]="Success",P_[P_.Underflow=3]="Underflow",P_),R_=((E_=R_||{})[E_.Previous=-1]="Previous",E_[E_.Next=1]="Next",E_);function O_(t=document.body){return null==t?[]:Array.from(t.querySelectorAll(S_)).sort(((t,e)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER))))}var M_=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(M_||{});function F_(t,e=0){var n;return t!==(null==(n=ly(t))?void 0:n.body)&&wy(e,{0:()=>t.matches(S_),1(){let e=t;for(;null!==e;){if(e.matches(S_))return!0;e=e.parentElement}return!1}})}var L_=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(L_||{});"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 D_=["textarea","input"].join(",");function V_(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 I_(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?V_(t):t:64&e?function(t=document.body){return null==t?[]:Array.from(t.querySelectorAll(k_)).sort(((t,e)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER))))}(t):O_(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,D_))&&n}(a)&&a.select(),2}(O_(),e,{relativeTo:t})}function j_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function B_(){return j_()||/Android/gi.test(window.navigator.userAgent)}function N_(t,e,n,r){let i=py(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 G_=30;function U_(t,e,n){let r=y_(t,"outside-click"),i=py(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!F_(r,M_.Loose)&&-1!==r.tabIndex&&t.preventDefault(),i.current(t,r)}),[i,e]),s=Dn(null);N_(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),N_(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),N_(r,"click",(t=>{B_()||s.current&&(o(t,(()=>s.current)),s.current=null)}),!0);let a=Dn({x:0,y:0});N_(r,"touchstart",(t=>{a.current.x=t.touches[0].clientX,a.current.y=t.touches[0].clientY}),!0),N_(r,"touchend",(t=>{let e=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY;if(!(Math.abs(e-a.current.x)>=G_||Math.abs(n-a.current.y)>=G_))return o(t,(()=>t.target instanceof HTMLElement?t.target:null))}),!0),function(t,e,n,r){let i=py(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 W_(...t){return In((()=>ly(...t)),[...t])}function H_(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 $_(){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 q_=m_((()=>new Map),{PUSH(t,e){var n;let r=null!=(n=this.get(t))?n:{doc:t,count:0,d:cy(),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=[j_()?{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=cy();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)}))}))}}:{},$_(),{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 K_(t,e,n=()=>[document.body]){!function(t,e,n=()=>({containers:[]})){let r=v_(q_),i=e?r.get(e):void 0,o=!!i&&i.count>0;hy((()=>{if(e&&t)return q_.dispatch("PUSH",e,n),()=>q_.dispatch("POP",e,n)}),[t,e])}(y_(t,"scroll-lock"),e,(t=>{var e;return{containers:[...null!=(e=t.containers)?e:[],n]}}))}function Y_(t){return[t.screenX,t.screenY]}q_.subscribe((()=>{let t=q_.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)&&q_.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&q_.dispatch("TEARDOWN",n)}}));var Q_;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"test"===(null==(Q_=null==process?void 0:{})?void 0:Q_.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 X_=(t=>(t[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t))(X_||{});function Z_(t){let e={};for(let n in t)!0===t[n]&&(e[`data-${n}`]="");return e}function J_(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=dy();return hy((()=>{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=cy();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=cy();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 tw(){return"undefined"!=typeof window}function ew(t){return iw(t)?(t.nodeName||"").toLowerCase():"#document"}function nw(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function rw(t){var e;return null==(e=(iw(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function iw(t){return!!tw()&&(t instanceof Node||t instanceof nw(t).Node)}function ow(t){return!!tw()&&(t instanceof Element||t instanceof nw(t).Element)}function sw(t){return!!tw()&&(t instanceof HTMLElement||t instanceof nw(t).HTMLElement)}function aw(t){return!(!tw()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof nw(t).ShadowRoot)}function lw(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=fw(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function uw(t){return["table","td","th"].includes(ew(t))}function cw(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(by){return!1}}))}function dw(t){const e=hw(),n=ow(t)?fw(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 hw(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function pw(t){return["html","body","#document"].includes(ew(t))}function fw(t){return nw(t).getComputedStyle(t)}function mw(t){return ow(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function vw(t){if("html"===ew(t))return t;const e=t.assignedSlot||t.parentNode||aw(t)&&t.host||rw(t);return aw(e)?e.host:e}function gw(t){const e=vw(t);return pw(e)?t.ownerDocument?t.ownerDocument.body:t.body:sw(e)&&lw(e)?e:gw(e)}function yw(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=gw(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),s=nw(i);if(o){const t=_w(s);return e.concat(s,s.visualViewport||[],lw(i)?i:[],t&&n?yw(t):[])}return e.concat(i,yw(i,[],n))}function _w(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const ww=Math.min,bw=Math.max,xw=Math.round,Sw=Math.floor,kw=t=>({x:t,y:t}),Ew={left:"right",right:"left",bottom:"top",top:"bottom"},Pw={start:"end",end:"start"};function Tw(t,e,n){return bw(t,ww(e,n))}function Aw(t,e){return"function"==typeof t?t(e):t}function Cw(t){return t.split("-")[0]}function Rw(t){return t.split("-")[1]}function Ow(t){return"x"===t?"y":"x"}function Mw(t){return"y"===t?"height":"width"}function Fw(t){return["top","bottom"].includes(Cw(t))?"y":"x"}function Lw(t){return Ow(Fw(t))}function Dw(t){return t.replace(/start|end/g,(t=>Pw[t]))}function Vw(t){return t.replace(/left|right|bottom|top/g,(t=>Ew[t]))}function Iw(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 jw(t,e,n){let{reference:r,floating:i}=t;const o=Fw(e),s=Lw(e),a=Mw(s),l=Cw(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(Rw(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function Bw(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}=Aw(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=Iw(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=Iw(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 Nw(t){const e=fw(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=sw(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=xw(n)!==o||xw(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Gw(t){return ow(t)?t:t.contextElement}function Uw(t){const e=Gw(t);if(!sw(e))return kw(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=Nw(e);let s=(o?xw(n.width):n.width)/r,a=(o?xw(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Ww=kw(0);function Hw(t){const e=nw(t);return hw()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Ww}function $w(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),o=Gw(t);let s=kw(1);e&&(r?ow(r)&&(s=Uw(r)):s=Uw(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==nw(t))&&e}(o,n,r)?Hw(o):kw(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=nw(o),e=r&&ow(r)?nw(r):r;let n=t,i=_w(n);for(;i&&r&&e!==n;){const t=Uw(i),e=i.getBoundingClientRect(),r=fw(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=nw(i),i=_w(n)}}return Iw({width:c,height:d,x:l,y:u})}function zw(t,e){const n=mw(t).scrollLeft;return e?e.left+n:$w(rw(t)).left+n}function qw(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=nw(t),r=rw(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=hw();(!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=rw(t),n=mw(t),r=t.ownerDocument.body,i=bw(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=bw(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+zw(t);const a=-n.scrollTop;return"rtl"===fw(r).direction&&(s+=bw(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(rw(t));else if(ow(e))r=function(t,e){const n=$w(t,!0,"fixed"===e),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=sw(t)?Uw(t):kw(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=Hw(t);r={...e,x:e.x-n.x,y:e.y-n.y}}return Iw(r)}function Kw(t,e){const n=vw(t);return!(n===e||!ow(n)||pw(n))&&("fixed"===fw(n).position||Kw(n,e))}function Yw(t,e,n){const r=sw(e),i=rw(e),o="fixed"===n,s=$w(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=kw(0);if(r||!r&&!o)if(("body"!==ew(e)||lw(i))&&(a=mw(e)),r){const t=$w(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 Qw(t){return"static"===fw(t).position}function Xw(t,e){if(!sw(t)||"fixed"===fw(t).position)return null;if(e)return e(t);let n=t.offsetParent;return rw(t)===n&&(n=n.ownerDocument.body),n}function Zw(t,e){const n=nw(t);if(cw(t))return n;if(!sw(t)){let e=vw(t);for(;e&&!pw(e);){if(ow(e)&&!Qw(e))return e;e=vw(e)}return n}let r=Xw(t,e);for(;r&&uw(r)&&Qw(r);)r=Xw(r,e);return r&&pw(r)&&Qw(r)&&!dw(r)?n:r||function(t){let e=vw(t);for(;sw(e)&&!pw(e);){if(dw(e))return e;if(cw(e))return null;e=vw(e)}return null}(t)||n}const Jw={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o="fixed"===i,s=rw(r),a=!!e&&cw(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=kw(1);const c=kw(0),d=sw(r);if((d||!d&&!o)&&(("body"!==ew(r)||lw(s))&&(l=mw(r)),sw(r))){const t=$w(r);u=Uw(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:rw,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[..."clippingAncestors"===n?cw(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=yw(t,[],!1).filter((t=>ow(t)&&"body"!==ew(t))),i=null;const o="fixed"===fw(t).position;let s=o?vw(t):t;for(;ow(s)&&!pw(s);){const e=fw(s),n=dw(s);n||"fixed"!==e.position||(i=null),(o?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||lw(s)&&!n&&Kw(t,s))?r=r.filter((t=>t!==s)):i=e,s=vw(s)}return e.set(t,r),r}(e,this._c):[].concat(n),r],s=o[0],a=o.reduce(((t,n)=>{const r=qw(e,n,i);return t.top=bw(r.top,t.top),t.right=ww(r.right,t.right),t.bottom=ww(r.bottom,t.bottom),t.left=bw(r.left,t.left),t}),qw(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Zw,getElementRects:async function(t){const e=this.getOffsetParent||Zw,n=this.getDimensions,r=await n(t.floating);return{reference:Yw(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}=Nw(t);return{width:e,height:n}},getScale:Uw,isElement:ow,isRTL:function(t){return"rtl"===fw(t).direction}};function tb(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=Gw(t),c=i||o?[...u?yw(u):[],...yw(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=rw(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:-Sw(c)+"px "+-Sw(i.clientWidth-(u+d))+"px "+-Sw(i.clientHeight-(c+h))+"px "+-Sw(u)+"px",threshold:bw(0,ww(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(by){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?$w(t):null;return l&&function e(){const r=$w(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 eb=Bw,nb=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=Cw(n),a=Rw(n),l="y"===Fw(n),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Aw(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}}}}},rb=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}=Aw(t,e),u={x:n,y:r},c=await Bw(e,l),d=Fw(Cw(i)),h=Ow(d);let p=u[h],f=u[d];if(o){const t="y"===h?"bottom":"right";p=Tw(p+c["y"===h?"top":"left"],p,p-c[t])}if(s){const t="y"===d?"bottom":"right";f=Tw(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}}}}}},ib=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}=Aw(t,e);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Cw(i),y=Fw(a),_=Cw(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=h||(_||!m?[Vw(a)]:function(t){const e=Vw(t);return[Dw(t),e,Dw(e)]}(a)),x="none"!==f;!h&&x&&b.push(...function(t,e,n,r){const i=Rw(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[]}}(Cw(t),"start"===n,r);return i&&(o=o.map((t=>t+"-"+i)),e&&(o=o.concat(o.map(Dw)))),o}(a,m,f,w));const S=[a,...b],k=await Bw(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=Rw(t),i=Lw(t),o=Mw(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Vw(s)),[s,Vw(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=Fw(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{}}}},ob=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}=Aw(t,e),c=await Bw(e,u),d=Cw(i),h=Rw(i),p="y"===Fw(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=!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=bw(c.left,0),e=bw(c.right,0),n=bw(c.top,0),r=bw(c.bottom,0);p?k=f-2*(0!==t||0!==e?t+e:bw(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:bw(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}}:{}}}},sb=(t,e,n)=>{const r=new Map,i={platform:Jw,...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}=jw(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}=jw(u,h,l))),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}})(t,e,{...i,platform:o})};var ab="undefined"!=typeof document?Ln:Fn;function lb(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(!lb(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)&&!lb(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function ub(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function cb(t,e){const n=ub(t);return Math.round(e*n)/n}function db(t){const e=Dn(t);return ab((()=>{e.current=t})),e}const hb=(t,e)=>({...nb(t),options:[t,e]}),pb=(t,e)=>({...rb(t),options:[t,e]}),fb=(t,e)=>({...ib(t),options:[t,e]}),mb=(t,e)=>({...ob(t),options:[t,e]}),vb={...Zr},gb=vb.useInsertionEffect||(t=>t());function yb(t){const e=Dn((()=>{}));return gb((()=>{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 _b="undefined"!=typeof document?Ln:Fn;let wb=!1,bb=0;const xb=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bb++;const Sb=vb.useId||function(){const[t,e]=On((()=>wb?xb():void 0));return _b((()=>{null==t&&e(xb())}),[]),Fn((()=>{wb=!0}),[]),t};const kb=oe(null),Eb=oe(null),Pb=()=>{var t;return(null==(t=Bn(kb))?void 0:t.id)||null},Tb=()=>Bn(Eb),Ab="data-floating-ui-focusable";function Cb(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=Sb(),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!=Pb(),[l,u]=On(r.reference),c=yb(((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 Rb(t){void 0===t&&(t={});const{nodeId:e}=t,n=Cb({...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=Tb();_b((()=>{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);lb(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=db(l),T=db(i),A=db(u),C=jn((()=>{if(!x.current||!S.current)return;const t={placement:e,strategy:n,middleware:h};T.current&&(t.platform=T.current),sb(x.current,S.current,t).then((t=>{const e={...t,isPositioned:!1!==A.current};R.current&&!lb(k.current,e)&&(k.current=e,Ur((()=>{d(e)})))}))}),[h,e,n,T,A]);ab((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d((t=>({...t,isPositioned:!1}))))}),[u]);const R=Dn(!1);ab((()=>(R.current=!0,()=>{R.current=!1})),[]),ab((()=>{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=cb(M.floating,c.x),r=cb(M.floating,c.y);return a?{...t,transform:"translate("+e+"px, "+r+"px)",...ub(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=ow(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;l(e),h.refs.setReference(e)}),[h.refs]),f=jn((t=>{(ow(t)||null===t)&&(c.current=t,s(t)),(ow(h.refs.reference.current)||null===h.refs.reference.current||null!==t&&!ow(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 _b((()=>{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 Ob="active",Mb="selected";function Fb(t,e,n){const r=new Map,i="item"===n;let o=t;if(i&&t){const{[Ob]:e,[Mb]:n,...r}=t;o=r}return{..."floating"===n&&{tabIndex:-1,[Ab]:""},...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&&[Ob,Mb].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 Lb(t,e){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:e}}}}const Db=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}=Aw(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 hb(-p.offsetTop-h.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(e)},w=await eb(Lb(_,f.scrollHeight+m+h.clientTop),c),b=await eb(_,{...c,elementContext:"reference"}),x=bw(0,w.top),S=_.y+x,k=xw(bw(0,f.scrollHeight+(v&&y||g?2*m:0)-x-bw(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;Ur((()=>i(t)))}return r&&(r.current=await eb(Lb({..._,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function Vb(t,e){const{open:n,elements:r}=t,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=e,l=yb(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(),Ur((()=>{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)&&Ur((()=>l((t=>t+e))))}requestAnimationFrame((()=>{c.current=t.scrollTop}))}}})),[r.floating,l,o,s]);return In((()=>i?{floating:h}:{}),[i,h])}let Ib=oe({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Ib.displayName="FloatingContext";let jb=oe(null);jb.displayName="PlacementContext";let Bb=4;function Nb({children:t,enabled:e=!0}){let[n,r]=On(null),[i,o]=On(0),s=Dn(null),[a,l]=On(null);!function(t){hy((()=>{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=Gb(null!=(n=null==t?void 0:t.gap)?n:"var(--anchor-gap, 0)",e),s=Gb(null!=(r=null==t?void 0:t.offset)?r:"var(--anchor-offset, 0)",e),a=Gb(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(" ");hy((()=>{u&&o(0)}),[u]);let{refs:g,floatingStyles:y,context:_}=Rb({open:u,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[hb({mainAxis:"selection"===m?0:d,crossAxis:h}),pb({padding:p}),"selection"!==m&&fb({padding:p}),"selection"===m&&f?Db({...f,padding:p,overflowRef:s,offset:i,minItemsVisible:Bb,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(Bb,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,mb({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:tb}),[w=m,b=v]=_.placement.split("-");"selection"===m&&(w="selection");let x=In((()=>({anchor:[w,b].filter(Boolean).join(" ")})),[w,b]),S=Vb(_,{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=>Fb(e,t,"reference")),e),o=jn((e=>Fb(e,t,"floating")),n),s=jn((e=>Fb(e,t,"item")),r);return In((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s})),[i,o,s])}([S]),P=fy((t=>{l(t),g.setFloating(t)}));return Dt(jb.Provider,{value:r},Dt(Ib.Provider,{value:{setFloating:P,setReference:g.setReference,styles:y,getReferenceProps:k,getFloatingProps:E,slot:x}},t))}function Gb(t,e,n=void 0){let r=dy(),i=fy(((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=Wb(t,e);return[i,n=>{let o=Ub(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=Wb(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 hy((()=>{let[n,r]=i(t,e);if(a(n),r)return r(a)}),[t,e]),s}function Ub(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,...Ub(r)]:[n]}return[]}function Wb(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 Hb=oe(null);Hb.displayName="OpenClosedContext";var $b=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))($b||{});function zb(){return Bn(Hb)}function qb({value:t,children:e}){return Xr.createElement(Hb.Provider,{value:t},e)}var Kb,Yb=((Kb=Yb||{})[Kb.First=0]="First",Kb[Kb.Previous=1]="Previous",Kb[Kb.Next=2]="Next",Kb[Kb.Last=3]="Last",Kb[Kb.Specific=4]="Specific",Kb[Kb.Nothing=5]="Nothing",Kb);function Qb(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 Xb(){let t=function(){let t="undefined"==typeof document;return"useSyncExternalStore"in Zr&&(t=>t.useSyncExternalStore)(Zr)((()=>()=>{}),(()=>!1),(()=>!t))}(),[e,n]=On(ay.isHandoffComplete);return e&&!1===ay.isHandoffComplete&&n(!1),Fn((()=>{!0!==e&&n(!0)}),[e]),Fn((()=>ay.handoff()),[]),!t&&e}let Zb=oe(!1);function Jb(t){let e=Bn(Zb),n=Bn(rx),r=W_(t),[i,o]=On((()=>{var t;if(!e&&null!==n)return null!=(t=n.current)?t:null;if(ay.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 tx=jt,ex=Ry((function(t,e){let n=t,r=Dn(null),i=Xy(function(t,e=!0){return Object.assign(t,{[Qy]:e})}((t=>{r.current=t})),e),o=W_(r),s=Jb(r),[a]=On((()=>{var t;return ay.isServer?null:null!=(t=null==o?void 0:o.createElement("div"))?t:null})),l=Bn(ix),u=Xb();return hy((()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))}),[s,a]),hy((()=>{if(a&&l)return l.register(a)}),[l,a]),function(t){let e=fy(t),n=Dn(!1);Fn((()=>(n.current=!1,()=>{n.current=!0,uy((()=>{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(Ey({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:tx,name:"Portal"}),a):null}));let nx=jt,rx=oe(null);let ix=oe(null),ox=Ry((function(t,e){let n=Xy(e),{enabled:r=!0,...i}=t;return r?Xr.createElement(ex,{...i,ref:n}):Ey({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:tx,name:"Portal"})})),sx=Ry((function(t,e){let{target:n,...r}=t,i={ref:Xy(e)};return Xr.createElement(rx.Provider,{value:n},Ey({ourProps:i,theirProps:r,defaultTag:nx,name:"Popover.Group"}))})),ax=Object.assign(ox,{Group:sx});function lx(t){var e;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||(null!=(e=t.as)?e:fx)!==jt||1===Xr.Children.count(t.children)}let ux=oe(null);ux.displayName="TransitionContext";var cx=(t=>(t.Visible="visible",t.Hidden="hidden",t))(cx||{});let dx=oe(null);function hx(t){return"children"in t?hx(t.children):t.current.filter((({el:t})=>null!==t.current)).filter((({state:t})=>"visible"===t)).length>0}function px(t,e){let n=py(t),r=Dn([]),i=function(){let t=Dn(!1);return hy((()=>(t.current=!0,()=>{t.current=!1})),[]),t}(),o=dy(),s=fy(((t,e=ky.Hidden)=>{let s=r.current.findIndex((({el:e})=>e===t));-1!==s&&(wy(e,{[ky.Unmount](){r.current.splice(s,1)},[ky.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var t;!hx(r)&&i.current&&(null==(t=n.current)||t.call(n))})))})),a=fy((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,ky.Unmount)})),l=Dn([]),u=Dn(Promise.resolve()),c=Dn({enter:[],leave:[]}),d=fy(((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=fy(((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])}dx.displayName="NestingContext";let fx=jt,mx=Sy.RenderStrategy;let vx=Ry((function(t,e){let{show:n,appear:r=!1,unmount:i=!0,...o}=t,s=Dn(null),a=Xy(...lx(t)?[s,e]:null===e?[]:[e]);Xb();let l=zb();if(void 0===n&&null!==l&&(n=(l&$b.Open)===$b.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=px((()=>{n||c("hidden")})),[h,p]=On(!0),f=Dn([n]);hy((()=>{!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]);hy((()=>{n?c("visible"):!hx(d)&&null!==s.current&&c("hidden")}),[n,d]);let v={unmount:i},g=fy((()=>{var e;h&&p(!1),null==(e=t.beforeEnter)||e.call(t)})),y=fy((()=>{var e;h&&p(!1),null==(e=t.beforeLeave)||e.call(t)}));return Xr.createElement(dx.Provider,{value:d},Xr.createElement(ux.Provider,{value:m},Ey({ourProps:{...v,as:jt,children:Xr.createElement(gx,{ref:a,...v,...o,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:jt,features:mx,visible:"visible"===u,name:"Transition"})))})),gx=Ry((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=lx(t),b=Xy(...w?[_,e,y]:null===e?[]:[e]),x=null==(n=v.unmount)||n?ky.Unmount:ky.Hidden,{show:S,appear:k,initial:E}=function(){let t=Bn(ux);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(dx);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;hy((()=>C(_)),[C,_]),hy((()=>{if(x===ky.Hidden&&_.current)return S&&"visible"!==P?void T("visible"):wy(P,{hidden:()=>R(_),visible:()=>C(_)})}),[P,_,C,R,S,x]);let O=Xb();hy((()=>{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=px((()=>{L.current||(T("hidden"),R(_))}),A),V=fy((t=>{L.current=!0;let e=t?"enter":"leave";D.onStart(_,e,(t=>{"enter"===t?null==o||o():"leave"===t&&(null==a||a())}))})),I=fy((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&&!hx(D)&&(T("hidden"),R(_))}));Fn((()=>{w&&i||(V(S),I(S))}),[S,w,i]);let j=(()=>!(!i||!w||!O||M))(),[,B]=J_(j,g,S,{start:V,end:I}),N=Oy({ref:b,className:(null==(r=_y(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,...Z_(B)}),G=0;return"visible"===P&&(G|=$b.Open),"hidden"===P&&(G|=$b.Closed),B.enter&&(G|=$b.Opening),B.leave&&(G|=$b.Closing),Xr.createElement(dx.Provider,{value:D},Xr.createElement(qb,{value:G},Ey({ourProps:N,theirProps:v,defaultTag:fx,features:mx,visible:"visible"===P,name:"Transition.Child"})))})),yx=Ry((function(t,e){let n=null!==Bn(ux),r=null!==zb();return Xr.createElement(Xr.Fragment,null,!n&&r?Xr.createElement(vx,{ref:e,...t}):Xr.createElement(gx,{ref:e,...t}))})),_x=Object.assign(vx,{Child:yx,Root:vx});let wx=Ry((function(t,e){let n=`headlessui-control-${Gn()}`,[r,i]=u_(),[o,s]=e_(),a=gy(),{disabled:l=a||!1,...u}=t,c=In((()=>({disabled:l})),[l]);return Xr.createElement(yy,{value:l},Xr.createElement(i,{value:r},Xr.createElement(s,{value:o},Xr.createElement(Ky,{id:n},Ey({ourProps:{ref:e,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...u,children:Xr.createElement(Uy,null,"function"==typeof u.children?u.children(c):u.children)},slot:c,defaultTag:"div",name:"Field"})))))}));let bx=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function xx(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 bx.test(s)&&(s=s.replace(bx,"")),s}function Sx(t){let e=Dn(""),n=Dn("");return fy((()=>{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():xx(e).trim()}return null})).filter(Boolean);if(t.length>0)return t.join(", ")}return xx(t).trim()}(r).trim().toLowerCase();return e.current=i,n.current=o,o}))}var kx=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(kx||{}),Ex=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Ex||{}),Px=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(Px||{}),Tx=(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))(Tx||{});function Ax(t,e=t=>t){let n=null!==t.activeOptionIndex?t.options[t.activeOptionIndex]:null,r=V_(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 Cx={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===Yb.Nothing)return{...a,activeOptionIndex:null};if(e.focus===Yb.Specific)return{...a,activeOptionIndex:t.options.findIndex((t=>t.id===e.id))};if(e.focus===Yb.Previous){let n=t.activeOptionIndex;if(null!==n){let o=t.options[n].dataRef.current.domRef,s=Qb(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===Yb.Next){let n=t.activeOptionIndex;if(null!==n){let r=t.options[n].dataRef.current.domRef,i=Qb(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=Ax(t),u=Qb(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=Ax(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=Ax(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}},Rx=oe(null);function Ox(t){let e=Bn(Rx);if(null===e){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ox),e}return e}Rx.displayName="ListboxActionsContext";let Mx=oe(null);function Fx(t){let e=Bn(Mx);if(null===e){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Fx),e}return e}function Lx(t,e){return wy(e.type,Cx,t,e)}Mx.displayName="ListboxDataContext";let Dx=jt;let Vx=oe(!1),Ix=Sy.RenderStrategy|Sy.Static;let jx=jt;let Bx=Ry((function(t,e){var n;let r=gy(),{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=Xy(e),y=Ly(o),[_=(p?[]:void 0),w]=Fy(i,l,y),[b,x]=Mn(Lx,{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=h_){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=>wy(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]);hy((()=>{b.dataRef.current=T}),[T]),U_(0===T.listboxState,[T.buttonElement,T.optionsElement],((t,e)=>{var n;x({type:1}),F_(e,M_.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=fy((t=>{let e=T.options.find((e=>e.id===t));e&&V(e.dataRef.current.value)})),R=fy((()=>{if(null!==T.activeOptionIndex){let{dataRef:t,id:e}=T.options[T.activeOptionIndex];V(t.current.value),x({type:2,focus:Yb.Specific,id:e})}})),O=fy((()=>x({type:0}))),M=fy((()=>x({type:1}))),F=dy(),L=fy(((t,e,n)=>{F.dispose(),F.microTask((()=>t===Yb.Specific?x({type:2,focus:Yb.Specific,id:e,trigger:n}):x({type:2,focus:t,trigger:n})))})),D=fy(((t,e)=>(x({type:5,id:t,dataRef:e}),()=>x({type:6,id:t})))),V=fy((t=>wy(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=fy((t=>x({type:3,value:t}))),j=fy((()=>x({type:4}))),B=fy((t=>{x({type:7,element:t})})),N=fy((t=>{x({type:8,element:t})})),G=In((()=>({onChange:V,registerOption:D,goToOption:L,closeListbox:M,openListbox:O,selectActiveOption:R,selectOption:C,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[U,W]=u_({inherit:!0}),H={ref:g},$=jn((()=>{if(void 0!==y)return null==w?void 0:w(y)}),[w,y]);return Xr.createElement(W,{value:U,props:{htmlFor:null==(n=T.buttonElement)?void 0:n.id},slot:{open:0===T.listboxState,disabled:d}},Xr.createElement(Nb,null,Xr.createElement(Rx.Provider,{value:G},Xr.createElement(Mx.Provider,{value:T},Xr.createElement(qb,{value:wy(T.listboxState,{0:$b.Open,1:$b.Closed})},null!=a&&null!=_&&Xr.createElement(Hy,{disabled:d,data:{[a]:_},form:s,onReset:$}),Ey({ourProps:H,theirProps:m,slot:A,defaultTag:Dx,name:"Listbox"}))))))})),Nx=Ry((function(t,e){var n;let r=Fx("Listbox.Button"),i=Ox("Listbox.Button"),o=Gn(),s=qy(),{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=Xy(e,Bn(Ib).setReference,i.setButtonElement),p=Bn(Ib).getReferenceProps,f=fy((t=>{switch(t.key){case o_.Enter:jy(t.currentTarget);break;case o_.Space:case o_.ArrowDown:t.preventDefault(),Ur((()=>i.openListbox())),r.value||i.goToOption(Yb.First);break;case o_.ArrowUp:t.preventDefault(),Ur((()=>i.openListbox())),r.value||i.goToOption(Yb.Last)}})),m=fy((t=>{if(t.key===o_.Space)t.preventDefault()})),v=fy((t=>{var e;if(Yy(t.currentTarget))return t.preventDefault();0===r.listboxState?(Ur((()=>i.closeListbox())),null==(e=r.buttonElement)||e.focus({preventScroll:!0})):(t.preventDefault(),i.openListbox())})),g=fy((t=>t.preventDefault())),y=l_([a]),_=t_(),{isFocusVisible:w,focusProps:b}=iy({autoFocus:u}),{isHovered:x,hoverProps:S}=ry({isDisabled:l}),{pressed:k,pressProps:E}=my({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 Ey({mergeRefs:d,ourProps:Cy(p(),{ref:h,id:a,type:H_(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"})})),Gx=d_,Ux=Ry((function(t,e){var n,r;let i=Gn(),{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=Fx("Listbox.Options"),m=Ox("Listbox.Options"),v=W_(f.optionsElement),g=zb(),[y,_]=J_(u,h,null!==g?(g&$b.Open)===$b.Open:0===f.listboxState);!function(t,e,n){let r=py((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=cy();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),K_(!f.__demoMode&&(l&&0===f.listboxState),v),function(t,{allowed:e,disallowed:n}={}){let r=y_(t,"inert-others");hy((()=>{var t,i;if(!r)return;let o=cy();for(let e of null!=(t=null==n?void 0:n())?t:[])e&&o.add(b_(e));let s=null!=(i=null==e?void 0:e())?i:[];for(let e of s){if(!e)continue;let t=ly(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(b_(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(hy((()=>{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=fy((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(jb),n=In((()=>t),[JSON.stringify(t,"undefined"!=typeof HTMLElement?(t,e)=>e instanceof HTMLElement?e.outerHTML:e:void 0)]);hy((()=>{null==e||e(null!=n?n:null)}),[e,n]);let r=Bn(Ib);return In((()=>[r.setFloating,t?r.styles:{}]),[r.setFloating,t,r.styles])}(k),T=function(){let{getFloatingProps:t,slot:e}=Bn(Ib);return jn(((...n)=>Object.assign({},t(...n),{"data-anchor":e.anchor})),[t,e])}(),A=Xy(e,d?E:null,m.setOptionsElement,p),C=dy();Fn((()=>{var t;let e=f.optionsElement;e&&0===f.listboxState&&e!==(null==(t=ly(e))?void 0:t.activeElement)&&(null==e||e.focus({preventScroll:!0}))}),[f.listboxState,f.optionsElement]);let R=fy((t=>{var e,n;switch(C.dispose(),t.key){case o_.Space:if(""!==f.searchQuery)return t.preventDefault(),t.stopPropagation(),m.search(t.key);case o_.Enter:if(t.preventDefault(),t.stopPropagation(),null!==f.activeOptionIndex){let{dataRef:t}=f.options[f.activeOptionIndex];m.onChange(t.current.value)}0===f.mode&&(Ur((()=>m.closeListbox())),null==(e=f.buttonElement)||e.focus({preventScroll:!0}));break;case wy(f.orientation,{vertical:o_.ArrowDown,horizontal:o_.ArrowRight}):return t.preventDefault(),t.stopPropagation(),m.goToOption(Yb.Next);case wy(f.orientation,{vertical:o_.ArrowUp,horizontal:o_.ArrowLeft}):return t.preventDefault(),t.stopPropagation(),m.goToOption(Yb.Previous);case o_.Home:case o_.PageUp:return t.preventDefault(),t.stopPropagation(),m.goToOption(Yb.First);case o_.End:case o_.PageDown:return t.preventDefault(),t.stopPropagation(),m.goToOption(Yb.Last);case o_.Escape:return t.preventDefault(),t.stopPropagation(),Ur((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case o_.Tab:t.preventDefault(),t.stopPropagation(),Ur((()=>m.closeListbox())),I_(f.buttonElement,t.shiftKey?A_.Previous:A_.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=Cy(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":p_(f.buttonElement,!0).width},...Z_(_)});return Xr.createElement(ax,{enabled:!!a&&(t.static||y)},Xr.createElement(Mx.Provider,{value:1===f.mode?f:{...f,isSelected:x}},Ey({ourProps:F,theirProps:c,slot:M,defaultTag:"div",features:Ix,visible:w,name:"Listbox.Options"})))})),Wx=Ry((function(t,e){let n=Gn(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=t,a=!0===Bn(Vx),l=Fx("Listbox.Option"),u=Ox("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===r,d=l.isSelected(o),h=Dn(null),p=Sx(h),f=py({disabled:i,value:o,domRef:h,get textValue(){return p()}}),m=Xy(e,h,(t=>{t?l.listRef.current.set(r,t):l.listRef.current.delete(r)}));hy((()=>{if(!l.__demoMode&&0===l.listboxState&&c&&0!==l.activationTrigger)return cy().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]),hy((()=>{if(!a)return u.registerOption(r,f)}),[f,r,a]);let v=fy((t=>{var e;if(i)return t.preventDefault();u.onChange(o),0===l.mode&&(Ur((()=>u.closeListbox())),null==(e=l.buttonElement)||e.focus({preventScroll:!0}))})),g=fy((()=>{if(i)return u.goToOption(Yb.Nothing);u.goToOption(Yb.Specific,r)})),y=function(){let t=Dn([-1,-1]);return{wasMoved(e){let n=Y_(e);return(t.current[0]!==n[0]||t.current[1]!==n[1])&&(t.current=n,!0)},update(e){t.current=Y_(e)}}}(),_=fy((t=>{y.update(t),!i&&(c||u.goToOption(Yb.Specific,r,0))})),w=fy((t=>{y.wasMoved(t)&&(i||c||u.goToOption(Yb.Specific,r,0))})),b=fy((t=>{y.wasMoved(t)&&(i||c&&u.goToOption(Yb.Nothing))})),x=In((()=>({active:c,focus:c,selected:d,disabled:i,selectedOption:d&&a})),[c,d,i,a]);return!d&&a?null:Ey({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"})})),Hx=Ry((function(t,e){let{options:n,placeholder:r,...i}=t,o={ref:Xy(e)},s=Fx("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(Vx.Provider,{value:!0},Ey({ourProps:o,theirProps:{...i,children:Xr.createElement(Xr.Fragment,null,r&&l?r:n)},slot:a,defaultTag:jx,name:"ListboxSelectedOption"}))})),$x=Object.assign(Bx,{Button:Nx,Label:Gx,Options:Ux,Option:Wx,SelectedOption:Hx}),zx=oe(null);zx.displayName="GroupContext";let qx=jt;let Kx=Ry((function(t,e){var n;let r=Gn(),i=qy(),o=gy(),{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),_=Xy(Dn(null),e,null===v?null:v.setSwitch,y),w=Ly(u),[b,x]=Fy(l,c,null!=w&&w),S=dy(),[k,E]=On(!1),P=fy((()=>{E(!0),null==x||x(!b),S.nextFrame((()=>{E(!1)}))})),T=fy((t=>{if(Yy(t.currentTarget))return t.preventDefault();t.preventDefault(),P()})),A=fy((t=>{t.key===o_.Space?(t.preventDefault(),P()):t.key===o_.Enter&&jy(t.currentTarget)})),C=fy((t=>t.preventDefault())),R=l_(),O=t_(),{isFocusVisible:M,focusProps:F}=iy({autoFocus:f}),{isHovered:L,hoverProps:D}=ry({isDisabled:a}),{pressed:V,pressProps:I}=my({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=Cy({id:s,ref:_,role:"switch",type:H_(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(Hy,{disabled:a,data:{[d]:h||"on"},overrides:{type:"checkbox",checked:b},form:p,onReset:N}),Ey({ourProps:B,theirProps:m,slot:j,defaultTag:"button",name:"Switch"}))})),Yx=function(t){var e;let[n,r]=On(null),[i,o]=u_(),[s,a]=e_(),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},Ey({ourProps:{},theirProps:u,slot:{},defaultTag:qx,name:"Switch.Group"}))))},Qx=d_,Xx=r_,Zx=Object.assign(Kx,{Group:Yx,Label:Qx,Description:Xx});function Jx(t,e){if(void 0===t.inserted[e.name])return t.insert("",e,t.sheet,!0)}function tS(t,e,n){var r=[],i=Ei(t,r,n);return r.length<2?n:i+e(r)}var eS=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},nS=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 tS(e.registered,n,eS(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);Jx(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 Jx(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:tS.bind(null,e.registered,n)}}({key:"css"}),rS=nS.cx,iS=nS.css;const oS=Ms(Nx)`
|
|
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 Gl(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 Ul=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:Ul,!0),Yl=t=>/^0[^.\s]+$/u.test(t);let Ql=Ul;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 Gu={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},Uu={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)||Gu.test(t)||Uu.test(t),parse:t=>Nu.test(t)?Nu.parse(t):Uu.test(t)?Uu.parse(t):Gu.parse(t),transform:t=>pu(t)?t:t.hasOwnProperty("red")?Nu.transform(t):Uu.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(Gl(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 Ul;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),Gc=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Uc=t=>e=>1-t(1-e),Wc=t=>1-Math.sin(Math.acos(t)),Hc=Uc(Wc),$c=Gc(Wc),zc=Ic(.33,1.53,.69,.99),qc=Uc(zc),Kc={linear:Ul,easeIn:jc,easeInOut:Nc,easeOut:Bc,circIn:Wc,circInOut:$c,circOut:Hc,backIn:qc,backInOut:Gc(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=[Gu,Nu,Uu];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===Uu&&(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]||Ul: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=Gl(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(Gl(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 Ul;const{animation:n}=e;n.timeline=t,n.onfinish=null}else this.pendingTimeline=t;return Ul}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=Gl(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(),Gd="data-"+Nd("framerAppearId");function Ud(t){return t.props[Gd]}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=Ud(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}}),Gh=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Uh(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=Gh(),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),Uh((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:()=>Uh((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&&Uh((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=Uh((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(){Uh((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Uh((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){Uh((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};Uh((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(),Uh((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&&(Uh((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=Gn();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,Ul);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 Gp(t,e){return t.min===e.min&&t.max===e.max}function Up(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Wp(t,e){return Up(t.x,e.x)&&Up(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=Ud(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=Gh(),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 Gh();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=Gh();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=Gh();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=Gh();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=Gh();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=Gh(),this.relativeTargetOrigin=Gh(),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=Gh(),this.targetWithTransforms=Gh()),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=Gh(),this.relativeTargetOrigin=Gh(),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=Gh());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=Gh(),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,Gp(l.x,h.x)&&Gp(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d=Gh()),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||Gh();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?Uh((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)&&Uh((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=Gh();Lh(s,n.layoutBox,i.layoutBox);const a=Gh();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:Ul;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=Ul}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=Ul,this.removeListeners=Ul,this.controls=new ap(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ul}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=Ul,this.removeEndListeners=Ul,this.removeAccessibleListeners=Ul,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(){}}}},Gf={layout:{ProjectionNode:Cf,MeasureLayout:bp}},Uf=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(Uf).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[Gd],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(Uf),...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 Gm(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 Um(t,e){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return om({...lm(n)?Om:Mm,preloadedFeatures:t,useRender:Gm(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):Gh()}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=Gh}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(Um({...oh,...Nf,...Rf,...Gf},((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=Gn(),r=Dn(null),i=Dn({width:0,height:0,top:0,left:0}),{nonce:o}=Bn(Uf);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=Gn(),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 Gv=t=>"string"==typeof t,Uv=(t,e,n,r,i)=>Gv(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(Uv(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=>Gv(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;Gv(r.value)&&y&&(t=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Gv(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&&(Gv(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&&Gv(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&&Gv(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)=>Uv(t,l,{...a.mount?s:yv(e)?o:Gv(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({...!Gv(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:Gv(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 Gg=null,Ug=new Set,Wg=new Map,Hg=!1,$g=!1;const zg={Tab:!0,Escape:!0};function qg(t,e){for(let n of Ug)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)&&(Gg="keyboard",qg("keyboard",t))}function Yg(t){Gg="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,Gg="virtual")}function Xg(t){t.target!==window&&t.target!==document&&(Hg||$g||(Gg="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"!==Gg}"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 Ug.add(e),()=>{Ug.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 Gy(t={},e=null,n=[]){for(let[r,i]of Object.entries(t))Wy(n,Uy(e,r),i);return n}function Uy(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,Uy(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,""]):Gy(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}),Gy(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=Gn(),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=Gn(),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=Gn(),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 G_=["textarea","input"].join(",");function U_(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?U_(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,G_))&&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 Gw(t){return t.replace(/start|end/g,(t=>Mw[t]))}function Uw(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?[Uw(a)]:function(t){const e=Uw(t);return[Gw(t),e,Gw(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(Gw)))),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=Uw(s)),[s,Uw(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,Ur((()=>{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 Gb=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;Ur((()=>i(t)))}return r&&(r.current=await ab(Nb({..._,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function Ub(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(),Ur((()=>{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)&&Ur((()=>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?Gb({...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=Ub(_,{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)}),G=0;return"visible"===P&&(G|=Xb.Open),"hidden"===P&&(G|=Xb.Closed),B.enter&&(G|=Xb.Opening),B.leave&&(G|=Xb.Closing),Xr.createElement(gx.Provider,{value:D},Xr.createElement(Jb,{value:G},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-${Gn()}`,[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=U_(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 Gx=jt;let Ux=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})})),G=In((()=>({onChange:V,registerOption:D,goToOption:L,closeListbox:M,openListbox:O,selectActiveOption:R,selectOption:C,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[U,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:U,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:G},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:Gx,name:"Listbox"}))))))})),zx=Vy((function(t,e){var n;let r=Bx("Listbox.Button"),i=Ix("Listbox.Button"),o=Gn(),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(),Ur((()=>i.openListbox())),r.value||i.goToOption(ex.First);break;case d_.ArrowUp:t.preventDefault(),Ur((()=>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?(Ur((()=>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=Gn(),{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&&(Ur((()=>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(),Ur((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case d_.Tab:t.preventDefault(),t.stopPropagation(),Ur((()=>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=Gn(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=t,a=!0===Bn(Ux),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&&(Ur((()=>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(Ux.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=Gn(),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)`
|
|
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
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
|
-
`,
|
|
50
|
-
${{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"
|
|
51
|
-
`,aS=(t,e)=>{var n;return t?(null==(n=e.find((e=>e.key==t)))?void 0:n.displayValue)??"Select":"Select"},lS=(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",uS=er((({label:t,items:e,value:n,className:r,onChange:i,error:o,helperText:s,isMultiSelect:a},l)=>oo("div",{className:r,children:[io($x,{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(sS,{children:t}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[oo(oS,{as:"button",ref:l,hasError:!!o,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a?lS(n,e):aS(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(sl,{css:{height:"1.25rem",width:"1.25rem"},"aria-hidden":"true"})})]}),io(_x,{show:r,leave:rS(iS({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:rS(iS({opacity:"1"})),leaveTo:rS(iS({opacity:"0"})),children:io(Ux,{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(Wx,{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(il,{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})]}))),cS=t=>oo("div",{children:[oo(wx,{children:[io(d_,{as:"p",css:{fontSize:"0.875rem",lineHeight:"1.25rem"},children:io("span",{css:{fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:t.label})}),io(Zx,{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})]}),dS=()=>{const t=function(){let{matches:t}=Bn(Ra),e=t[t.length-1];return e?e.params:{}}(),e=Da(),{createPromotion:n,updatePromotion:r,getAllPromotions:i}=vo(),o=ds(),{isPending:s,error:a,data:l}=Es({queryKey:[nl],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:[nl]})}),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)?`${cl(t)}/entries/${e.contentfulContent.contentId}?focusedField=slug`:void 0}: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:$v(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:$v(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...Pg(t),formState:r});const o=e.current.control;return o._options=t,Lv({subject:o._subjects.state,next:t=>{Ov(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&&!ag(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=Cv(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}}),f=t=>{const e={promotionId:(n=t).id,category:n.category,isEnabled:n.isEnabled};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(jv,{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(tv,{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(jv,{name:"category",control:p,rules:{required:"Please provide a category"},render:({field:t,fieldState:e})=>{var n;return io(uS,{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})}})}),"Edit"===m&&io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(jv,{name:"isEnabled",control:p,render:({field:t})=>io(cS,{label:"Enabled",id:"id",helperText:"A promotion will be shown to users if it is 'Enabled' and Contentful content is available.",...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"})})]})]})}},hS=t=>io($m.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})})}),pS=t=>{const e=Fa(),[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(Zm,{initial:!1,children:oo(za,{location:e,children:[io(Ha,{path:"/",element:io(hS,{direction:n,children:io(dl,{})})}),io(Ha,{path:"/promotion",element:io(hS,{direction:n,children:io(dS,{})})}),io(Ha,{path:"/promotion/:promotionId",element:io(hS,{direction:n,children:io(dS,{})})})]},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:el(),children:oo(Ya,{basename:t.hashRouteBase,children:[io(ao,{}),io("body",{children:io(pS,{...t})})]})})})]})}),"promoted-benefits-admin",["backend-url","access-token"],{shadow:!0})}();
|
|
49
|
+
`,hS=Ms(g_)`
|
|
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}: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}}),f=t=>{const e={promotionId:(n=t).id,category:n.category,isEnabled:n.isEnabled};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})}})}),"Edit"===m&&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})})})]})]})}),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})}();
|