@flarehr/promoted-benefits-admin 1.4.56527 → 1.4.56952

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +10 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),__accessCheck=(e,t,n)=>t.has(e)||__typeError("Cannot "+n),__privateGet=(e,t,n)=>(__accessCheck(e,t,"read from private field"),n?n.call(e):t.get(e)),__privateAdd=(e,t,n)=>t.has(e)?__typeError("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),__privateSet=(e,t,n,r)=>(__accessCheck(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),__privateMethod=(e,t,n)=>(__accessCheck(e,t,"access private method"),n),__privateWrapper=(e,t,n,r)=>({set _(r){__privateSet(e,t,r,n)},get _(){return __privateGet(e,t,r)}});!function(){"use strict";var e,t,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,b,w,x,S,k,E,P,T,A,C,R,O,F,M,L,D,V,I,j,B,N,U,G,W,H,$,z,q,K,Y,Q,X,Z,J,ee,te,ne,re,ie,oe,se,ae,le,ue,ce,de,he,pe,fe,me,ve,ge,ye,_e,be,we,xe,Se,ke,Ee,Pe,Te,Ae,Ce={},Re=[],Oe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function Me(e,t){for(var n in t)e[n]=t[n];return e}function Le(e){var t=e.parentNode;t&&t.removeChild(e)}function De(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return Ve(e,s,r,i,null)}function Ve(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++be:i,__i:-1,__u:0};return null==i&&null!=_e.vnode&&_e.vnode(o),o}function Ie(){return{current:null}}function je(e){return e.children}function Be(e,t){this.props=e,this.context=t}function Ne(e,t){if(null==t)return e.__?Ne(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Ne(e):null}function Ue(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Ue(e)}}function Ge(e){(!e.__d&&(e.__d=!0)&&we.push(e)&&!We.__r++||xe!==_e.debounceRendering)&&((xe=_e.debounceRendering)||Se)(We)}function We(){var e,t,n,r,i,o,s,a;for(we.sort(ke);e=we.shift();)e.__d&&(t=we.length,r=void 0,o=(i=(n=e).__v).__e,s=[],a=[],n.__P&&((r=Me({},i)).__v=i.__v+1,_e.vnode&&_e.vnode(r),Xe(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,null==o?Ne(i):o,!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Ze(s,r,a),r.__e!=o&&Ue(r)),we.length>t&&we.sort(ke));We.__r=0}function He(e,t,n,r,i,o,s,a,l,u,c){var d,h,p,f,m,v=r&&r.__k||Re,g=t.length;for(n.__d=l,function(e,t,n){var r,i,o,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)s=r+d,null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Ve(null,i,null,null,null):Fe(i)?Ve(je,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Ve(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=qe(i,n,s,c),i.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:a>s?c>l-s?d+=a-s:d--:a<s&&(a==s-d?d-=a-s:d++),a!==r+d&&(i.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Ne(o)),et(o,o,!1),n[s]=null,c--);if(c)for(r=0;r<u;r++)null!=(o=n[r])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Ne(o)),et(o,o))}(n,t,v),l=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?Ce:v[p.__i]||Ce,p.__i=d,Xe(e,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Je(h.ref,null,p),c.push(p.ref,p.__c||f,p)),null==m&&null!=f&&(m=f),65536&p.__u||h.__k===p.__k?l=$e(p,l,e):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:f&&(l=f.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=m}function $e(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=$e(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Ne(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function ze(e,t){return t=t||[],null==e||"boolean"==typeof e||(Fe(e)?e.some((function(e){ze(e,t)})):t.push(e)),t}function qe(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&i==l.key&&o===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a++}}return-1}function Ke(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Oe.test(t)?n:n+"px"}function Ye(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ke(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ke(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Ee,e.addEventListener(t,o?Te:Pe,o)):e.removeEventListener(t,o?Te:Pe,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function Qe(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=Ee++;else if(t.t<n.u)return;return n(_e.event?_e.event(t):t)}}}function Xe(e,t,n,r,i,o,s,a,l,u){var c,d,h,p,f,m,v,g,y,_,b,w,x,S,k,E,P=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(c=_e.__b)&&c(t);e:if("function"==typeof P)try{if(g=t.props,y="prototype"in P&&P.prototype.render,_=(c=P.contextType)&&r[c.__c],b=c?_?_.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:(y?t.__c=d=new P(g,b):(t.__c=d=new Be(g,b),d.constructor=P,d.render=tt),_&&_.sub(d),d.props=g,d.state||(d.state={}),d.context=b,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),y&&null==d.__s&&(d.__s=d.state),y&&null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Me({},d.__s)),Me(d.__s,P.getDerivedStateFromProps(g,d.__s))),p=d.props,f=d.state,d.__v=t,h)y&&null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),y&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(y&&null==P.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,b)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),w=0;w<d._sb.length;w++)d.__h.push(d._sb[w]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,b),y&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,m)}))}if(d.context=b,d.props=g,d.__P=e,d.__e=!1,x=_e.__r,S=0,y){for(d.state=d.__s,d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(r=Me(Me({},r),d.getChildContext())),y&&!h&&null!=d.getSnapshotBeforeUpdate&&(m=d.getSnapshotBeforeUpdate(p,f)),He(e,Fe(E=null!=c&&c.type===je&&null==c.key?c.props.children:c)?E:[E],t,n,r,i,o,s,a,l,u),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(T){if(t.__v=null,l||null!=o){for(t.__u|=l?160:32;a&&8===a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else t.__e=n.__e,t.__k=n.__k;_e.__e(T,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a,l){var u,c,d,h,p,f,m,v=n.props,g=t.props,y=t.type;if("svg"===y?i="http://www.w3.org/2000/svg":"math"===y?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!y&&(y?p.localName===y:3===p.nodeType)){e=p,o[u]=null;break}if(null==e){if(null===y)return document.createTextNode(g);e=document.createElementNS(i,y,g.is&&g),o=null,a=!1}if(null===y)v===g||a&&e.data===g||(e.data=g);else{if(o=o&&ye.call(e.childNodes),v=n.props||Ce,!a&&null!=o)for(v={},u=0;u<e.attributes.length;u++)v[(p=e.attributes[u]).name]=p.value;for(u in v)if(p=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)d=p;else if("key"!==u&&!(u in g)){if("value"==u&&"defaultValue"in g||"checked"==u&&"defaultChecked"in g)continue;Ye(e,u,null,p,i)}for(u in g)p=g[u],"children"==u?h=p:"dangerouslySetInnerHTML"==u?c=p:"value"==u?f=p:"checked"==u?m=p:"key"===u||a&&"function"!=typeof p||v[u]===p||Ye(e,u,p,v[u],i);if(c)a||d&&(c.__html===d.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),He(e,Fe(h)?h:[h],t,n,r,"foreignObject"===y?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ne(n,0),a,l),null!=o)for(u=o.length;u--;)null!=o[u]&&Le(o[u]);a||(u="value",void 0!==f&&(f!==e[u]||"progress"===y&&!f||"option"===y&&f!==v[u])&&Ye(e,u,f,v[u],i),u="checked",void 0!==m&&m!==e[u]&&Ye(e,u,m,v[u],i))}return e}(n.__e,t,n,r,i,o,s,l,u);(c=_e.diffed)&&c(t)}function Ze(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Je(n[r],n[++r],n[++r]);_e.__c&&_e.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(n){_e.__e(n,t.__v)}}))}function Je(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(i){_e.__e(i,n)}}function et(e,t,n){var r,i;if(_e.unmount&&_e.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Je(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){_e.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&et(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Le(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function tt(e,t,n){return this.constructor(e,n)}function nt(e,t,n){var r,i,o,s;_e.__&&_e.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],s=[],Xe(t,e=(!r&&n||t).__k=De(je,null,[e]),i||Ce,Ce,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?ye.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),Ze(o,e,s)}function rt(e,t){nt(e,t,rt)}function it(e,t,n){var r,i,o,s,a=Me({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?ye.call(arguments,2):n),Ve(e.type,a,r||e.key,i||e.ref,null)}function ot(e,t){var n={__c:t="__cC"+Ae++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Ge(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}function st(){return(st=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}ye=Re.slice,_e={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},be=0,Be.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Me({},this.state),"function"==typeof e&&(e=e(Me({},n),this.props)),e&&Me(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Ge(this))},Be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ge(this))},Be.prototype.render=je,we=[],Se="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ke=function(e,t){return e.__v.__b-t.__v.__b},We.__r=0,Ee=0,Pe=Qe(!1),Te=Qe(!0),Ae=0;var at=["context","children"];function lt(e){return this.getChildContext=function(){return e.context},it(e.children,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,at))}function ut(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=De(lt,st({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[ct(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=e(a[o],null),u=a[o].slot;u?i[u]=De(pt,{name:u},l):r[o]=l}var c=n?De(pt,null,r):r;return De(n||t.nodeName.toLowerCase(),i,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?rt:nt)(this._vdom,this._root)}function ct(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function dt(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[ct(e)]=n,this._vdom=it(this._vdom,r),nt(this._vdom,this._root)}}function ht(){nt(this._vdom=null,this._root)}function pt(e,t){var n=this;return De("slot",st({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}var ft=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(Gy){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),mt="-ms-",vt="-moz-",gt="-webkit-",yt="comm",_t="rule",bt="decl",wt="@keyframes",xt=Math.abs,St=String.fromCharCode,kt=Object.assign;function Et(e){return e.trim()}function Pt(e,t,n){return e.replace(t,n)}function Tt(e,t){return e.indexOf(t)}function At(e,t){return 0|e.charCodeAt(t)}function Ct(e,t,n){return e.slice(t,n)}function Rt(e){return e.length}function Ot(e){return e.length}function Ft(e,t){return t.push(e),e}var Mt=1,Lt=1,Dt=0,Vt=0,It=0,jt="";function Bt(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Mt,column:Lt,length:s,return:""}}function Nt(e,t){return kt(Bt("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ut(){return It=Vt<Dt?At(jt,Vt++):0,Lt++,10===It&&(Lt=1,Mt++),It}function Gt(){return At(jt,Vt)}function Wt(){return Vt}function Ht(e,t){return Ct(jt,e,t)}function $t(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zt(e){return Mt=Lt=1,Dt=Rt(jt=e),Vt=0,[]}function qt(e){return jt="",e}function Kt(e){return Et(Ht(Vt-1,Xt(91===e?e+2:40===e?e+1:e)))}function Yt(e){for(;(It=Gt())&&It<33;)Ut();return $t(e)>2||$t(It)>3?"":" "}function Qt(e,t){for(;--t&&Ut()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return Ht(e,Wt()+(t<6&&32==Gt()&&32==Ut()))}function Xt(e){for(;Ut();)switch(It){case e:return Vt;case 34:case 39:34!==e&&39!==e&&Xt(It);break;case 40:41===e&&Xt(e);break;case 92:Ut()}return Vt}function Zt(e,t){for(;Ut()&&e+It!==57&&(e+It!==84||47!==Gt()););return"/*"+Ht(t,Vt-1)+"*"+St(47===e?e:Ut())}function Jt(e){for(;!$t(Gt());)Ut();return Ht(e,Vt)}function en(e){return qt(tn("",null,null,null,[""],e=zt(e),0,[0],e))}function tn(e,t,n,r,i,o,s,a,l){for(var u=0,c=0,d=s,h=0,p=0,f=0,m=1,v=1,g=1,y=0,_="",b=i,w=o,x=r,S=_;v;)switch(f=y,y=Ut()){case 40:if(108!=f&&58==At(S,d-1)){-1!=Tt(S+=Pt(Kt(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=Kt(y);break;case 9:case 10:case 13:case 32:S+=Yt(f);break;case 92:S+=Qt(Wt()-1,7);continue;case 47:switch(Gt()){case 42:case 47:Ft(rn(Zt(Ut(),Wt()),t,n),l);break;default:S+="/"}break;case 123*m:a[u++]=Rt(S)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(S=Pt(S,/\f/g,"")),p>0&&Rt(S)-d&&Ft(p>32?on(S+";",r,n,d-1):on(Pt(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Ft(x=nn(S,t,n,u,c,i,a,_,b=[],w=[],d),o),123===y)if(0===c)tn(S,t,x,x,b,o,d,a,w);else switch(99===h&&110===At(S,3)?100:h){case 100:case 108:case 109:case 115:tn(e,x,x,r&&Ft(nn(e,x,x,0,0,i,a,_,i,b=[],d),w),i,w,d,a,r?b:w);break;default:tn(S,x,x,x,[""],w,0,a,w)}}u=c=p=0,m=g=1,_=S="",d=s;break;case 58:d=1+Rt(S),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(It=Vt>0?At(jt,--Vt):0,Lt--,10===It&&(Lt=1,Mt--),It))continue;switch(S+=St(y),y*m){case 38:g=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(Rt(S)-1)*g,g=1;break;case 64:45===Gt()&&(S+=Kt(Ut())),h=Gt(),c=d=Rt(_=S+=Jt(Wt())),y++;break;case 45:45===f&&2==Rt(S)&&(m=0)}}return o}function nn(e,t,n,r,i,o,s,a,l,u,c){for(var d=i-1,h=0===i?o:[""],p=Ot(h),f=0,m=0,v=0;f<r;++f)for(var g=0,y=Ct(e,d+1,d=xt(m=s[f])),_=e;g<p;++g)(_=Et(m>0?h[g]+" "+y:Pt(y,/&\f/g,h[g])))&&(l[v++]=_);return Bt(e,t,n,0===i?_t:a,l,u,c)}function rn(e,t,n){return Bt(e,t,n,yt,St(It),Ct(e,2,-2),0)}function on(e,t,n,r){return Bt(e,t,n,bt,Ct(e,0,r),Ct(e,r+1,-1),r)}function sn(e,t){for(var n="",r=Ot(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function an(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case bt:return e.return=e.return||e.value;case yt:return"";case wt:return e.return=e.value+"{"+sn(e.children,r)+"}";case _t:e.value=e.props.join(",")}return Rt(n=sn(e.children,r))?e.return=e.value+"{"+n+"}":""}function ln(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var un=function(e,t,n){for(var r=0,i=0;r=i,i=Gt(),38===r&&12===i&&(t[n]=1),!$t(i);)Ut();return Ht(e,Vt)},cn=function(e,t){return qt(function(e,t){var n=-1,r=44;do{switch($t(r)){case 0:38===r&&12===Gt()&&(t[n]=1),e[n]+=un(Vt-1,t,n);break;case 2:e[n]+=Kt(r);break;case 4:if(44===r){e[++n]=58===Gt()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=St(r)}}while(r=Ut());return e}(zt(e),t))},dn=new WeakMap,hn=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||dn.get(n))&&!r){dn.set(e,!0);for(var i=[],o=cn(t,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},pn=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function fn(e,t){switch(function(e,t){return 45^At(e,0)?(((t<<2^At(e,0))<<2^At(e,1))<<2^At(e,2))<<2^At(e,3):0}(e,t)){case 5103:return gt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return gt+e+vt+e+mt+e+e;case 6828:case 4268:return gt+e+mt+e+e;case 6165:return gt+e+mt+"flex-"+e+e;case 5187:return gt+e+Pt(e,/(\w+).+(:[^]+)/,gt+"box-$1$2"+mt+"flex-$1$2")+e;case 5443:return gt+e+mt+"flex-item-"+Pt(e,/flex-|-self/,"")+e;case 4675:return gt+e+mt+"flex-line-pack"+Pt(e,/align-content|flex-|-self/,"")+e;case 5548:return gt+e+mt+Pt(e,"shrink","negative")+e;case 5292:return gt+e+mt+Pt(e,"basis","preferred-size")+e;case 6060:return gt+"box-"+Pt(e,"-grow","")+gt+e+mt+Pt(e,"grow","positive")+e;case 4554:return gt+Pt(e,/([^-])(transform)/g,"$1"+gt+"$2")+e;case 6187:return Pt(Pt(Pt(e,/(zoom-|grab)/,gt+"$1"),/(image-set)/,gt+"$1"),e,"")+e;case 5495:case 3959:return Pt(e,/(image-set\([^]*)/,gt+"$1$`$1");case 4968:return Pt(Pt(e,/(.+:)(flex-)?(.*)/,gt+"box-pack:$3"+mt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gt+e+e;case 4095:case 3583:case 4068:case 2532:return Pt(e,/(.+)-inline(.+)/,gt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Rt(e)-1-t>6)switch(At(e,t+1)){case 109:if(45!==At(e,t+4))break;case 102:return Pt(e,/(.+:)(.+)-([^]+)/,"$1"+gt+"$2-$3$1"+vt+(108==At(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Tt(e,"stretch")?fn(Pt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==At(e,t+1))break;case 6444:switch(At(e,Rt(e)-3-(~Tt(e,"!important")&&10))){case 107:return Pt(e,":",":"+gt)+e;case 101:return Pt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gt+(45===At(e,14)?"inline-":"")+"box$3$1"+gt+"$2$3$1"+mt+"$2box$3")+e}break;case 5936:switch(At(e,t+11)){case 114:return gt+e+mt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gt+e+mt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gt+e+mt+Pt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gt+e+mt+e+e}return e}var mn,vn,gn,yn,_n=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case bt:e.return=fn(e.value,e.length);break;case wt:return sn([Nt(e,{value:Pt(e.value,"@","@"+gt)})],r);case _t:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return sn([Nt(e,{props:[Pt(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return sn([Nt(e,{props:[Pt(t,/:(plac\w+)/,":"+gt+"input-$1")]}),Nt(e,{props:[Pt(t,/:(plac\w+)/,":-moz-$1")]}),Nt(e,{props:[Pt(t,/:(plac\w+)/,mt+"input-$1")]})],r)}return""}))}}],bn=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,o=e.stylisPlugins||_n,s={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,u,c,d,h=[an,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(u=[hn,pn].concat(o,h),c=Ot(u),function(e,t,n,r){for(var i="",o=0;o<c;o++)i+=u[o](e,t,n,r)||"";return i});i=function(e,t,n,r){l=n,sn(en(e?e+"{"+t.styles+"}":t.styles),p),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new ft({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(a),f},wn=0,xn=[],Sn=_e,kn=Sn.__b,En=Sn.__r,Pn=Sn.diffed,Tn=Sn.__c,An=Sn.unmount,Cn=Sn.__;function Rn(e,t){Sn.__h&&Sn.__h(vn,e,wn||t),wn=0;var n=vn.__H||(vn.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function On(e){return wn=1,Fn(Kn,e)}function Fn(e,t,n){var r=Rn(mn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Kn(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=vn,!vn.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};vn.u=!0;var o=vn.shouldComponentUpdate,s=vn.componentWillUpdate;vn.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},vn.shouldComponentUpdate=i}return r.__N||r.__}function Mn(e,t){var n=Rn(mn++,3);!Sn.__s&&qn(n.__H,t)&&(n.__=e,n.i=t,vn.__H.__h.push(n))}function Ln(e,t){var n=Rn(mn++,4);!Sn.__s&&qn(n.__H,t)&&(n.__=e,n.i=t,vn.__h.push(n))}function Dn(e){return wn=5,In((function(){return{current:e}}),[])}function Vn(e,t,n){wn=6,Ln((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function In(e,t){var n=Rn(mn++,7);return qn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function jn(e,t){return wn=8,In((function(){return e}),t)}function Bn(e){var t=vn.context[e.__c],n=Rn(mn++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(vn)),t.props.value):e.__}function Nn(e,t){Sn.useDebugValue&&Sn.useDebugValue(t?t(e):e)}function Un(){var e=Rn(mn++,11);if(!e.__){for(var t=vn.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Gn(){for(var e;e=xn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach($n),e.__H.__h.forEach(zn),e.__H.__h=[]}catch(z_){e.__H.__h=[],Sn.__e(z_,e.__v)}}Sn.__b=function(e){vn=null,kn&&kn(e)},Sn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Cn&&Cn(e,t)},Sn.__r=function(e){En&&En(e),mn=0;var t=(vn=e.__c).__H;t&&(gn===vn?(t.__h=[],vn.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach($n),t.__h.forEach(zn),t.__h=[],mn=0)),gn=vn},Sn.diffed=function(e){Pn&&Pn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==xn.push(t)&&yn===Sn.requestAnimationFrame||((yn=Sn.requestAnimationFrame)||Hn)(Gn)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),gn=vn=null},Sn.__c=function(e,t){t.some((function(e){try{e.__h.forEach($n),e.__h=e.__h.filter((function(e){return!e.__||zn(e)}))}catch(E_){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Sn.__e(E_,e.__v)}})),Tn&&Tn(e,t)},Sn.unmount=function(e){An&&An(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{$n(e)}catch(n){t=n}})),n.__H=void 0,t&&Sn.__e(t,n.__v))};var Wn="function"==typeof requestAnimationFrame;function Hn(e){var t,n=function(){clearTimeout(r),Wn&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Wn&&(t=requestAnimationFrame(n))}function $n(e){var t=vn,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),vn=t}function zn(e){var t=vn;e.__c=e.__(),vn=t}function qn(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Kn(e,t){return"function"==typeof t?t(e):t}function Yn(e,t){for(var n in t)e[n]=t[n];return e}function Qn(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Xn(e,t){this.props=e,this.context=t}function Zn(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Qn(this.props,e)}function r(t){return this.shouldComponentUpdate=n,De(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Xn.prototype=new Be).isPureReactComponent=!0,Xn.prototype.shouldComponentUpdate=function(e,t){return Qn(this.props,e)||Qn(this.state,t)};var Jn=_e.__b;_e.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Jn&&Jn(e)};var er="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function tr(e){function t(t){var n=Yn({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=er,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var nr=function(e,t){return null==e?null:ze(ze(e).map(t))},rr={map:nr,forEach:nr,count:function(e){return e?ze(e).length:0},only:function(e){var t=ze(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:ze},ir=_e.__e;_e.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);ir(e,t,n,r)};var or=_e.unmount;function sr(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Yn({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return sr(e,t,n)}))),e}function ar(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return ar(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function lr(){this.__u=0,this.t=null,this.__b=null}function ur(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function cr(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return De(n,i)}return i.displayName="Lazy",i.__f=!0,i}function dr(){this.u=null,this.o=null}_e.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),or&&or(e)},(lr.prototype=new Be).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=ur(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=ar(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},lr.prototype.componentWillUnmount=function(){this.t=[]},lr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=sr(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&De(je,null,e.fallback);return i&&(i.__u&=-33),[De(je,null,t.__a?null:e.children),i]};var hr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function pr(e){return this.getChildContext=function(){return e.context},e.children}function fr(e){var t=this,n=e.i;t.componentWillUnmount=function(){nt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),nt(De(pr,{context:t.context},e.__v),t.l)}function mr(e,t){var n=De(fr,{__v:e,i:t});return n.containerInfo=t,n}(dr.prototype=new Be).__a=function(e){var t=this,n=ur(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),hr(t,e,r)):i()};n?n(o):o()}},dr.prototype.render=function(e){this.u=null,this.o=new Map;var t=ze(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},dr.prototype.componentDidUpdate=dr.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){hr(e,n,t)}))};var vr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,gr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,yr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,_r=/[A-Z0-9]/g,br="undefined"!=typeof document,wr=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function xr(e,t,n){return null==t.__k&&(t.textContent=""),nt(e,t),"function"==typeof n&&n(),e?e.__c:null}function Sr(e,t,n){return rt(e,t),"function"==typeof n&&n(),e?e.__c:null}Be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(Be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var kr=_e.event;function Er(){}function Pr(){return this.cancelBubble}function Tr(){return this.defaultPrevented}_e.event=function(e){return kr&&(e=kr(e)),e.persist=Er,e.isPropagationStopped=Pr,e.isDefaultPrevented=Tr,e.nativeEvent=e};var Ar,Cr={enumerable:!1,configurable:!0,get:function(){return this.class}},Rr=_e.vnode;_e.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},i=-1===n.indexOf("-");for(var o in t){var s=t[o];if(!("value"===o&&"defaultValue"in t&&null==s||br&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===s?s="":"translate"===a&&"no"===s?s=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||wr(t.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":yr.test(o)&&(o=a):a=o="oninput":i&&gr.test(o)?o=o.replace(_r,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=ze(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=ze(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Cr)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=vr,Rr&&Rr(e)};var Or=_e.__r;_e.__r=function(e){Or&&Or(e),Ar=e.__c};var Fr=_e.diffed;_e.diffed=function(e){Fr&&Fr(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Ar=null};var Mr={ReactCurrentDispatcher:{current:{readContext:function(e){return Ar.__n[e.__c].props.value},useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Mn,useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Fn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr}}};function Lr(e){return De.bind(null,e)}function Dr(e){return!!e&&e.$$typeof===vr}function Vr(e){return Dr(e)&&e.type===je}function Ir(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function jr(e){return Dr(e)?it.apply(null,arguments):e}function Br(e){return!!e.__k&&(nt(null,e),!0)}function Nr(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ur=function(e,t){return e(t)},Gr=function(e,t){return e(t)},Wr=je;function Hr(e){e()}function $r(e){return e}function zr(){return[!1,Hr]}var qr=Ln,Kr=Dr;function Yr(e,t){var n=t(),r=On({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Ln((function(){i.__=n,i.v=t,Qr(i)&&o({h:i})}),[e,n,t]),Mn((function(){return Qr(i)&&o({h:i}),e((function(){Qr(i)&&o({h:i})}))}),[e]),n}function Qr(e){var t,n,r=e.v,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(s){return!0}}var Xr={useState:On,useId:Un,useReducer:Fn,useEffect:Mn,useLayoutEffect:Ln,useInsertionEffect:qr,useTransition:zr,useDeferredValue:$r,useSyncExternalStore:Yr,startTransition:Hr,useRef:Dn,useImperativeHandle:Vn,useMemo:In,useCallback:jn,useContext:Bn,useDebugValue:Nn,version:"17.0.2",Children:rr,render:xr,hydrate:Sr,unmountComponentAtNode:Br,createPortal:mr,createElement:De,createContext:ot,createFactory:Lr,cloneElement:jr,createRef:Ie,Fragment:je,isValidElement:Dr,isElement:Kr,isFragment:Vr,isMemo:Ir,findDOMNode:Nr,Component:Be,PureComponent:Xn,memo:Zn,forwardRef:tr,flushSync:Gr,unstable_batchedUpdates:Ur,StrictMode:Wr,Suspense:lr,SuspenseList:dr,lazy:cr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mr};const Zr=Object.freeze(Object.defineProperty({__proto__:null,Children:rr,Component:Be,Fragment:je,PureComponent:Xn,StrictMode:Wr,Suspense:lr,SuspenseList:dr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mr,cloneElement:jr,createContext:ot,createElement:De,createFactory:Lr,createPortal:mr,createRef:Ie,default:Xr,findDOMNode:Nr,flushSync:Gr,forwardRef:tr,hydrate:Sr,isElement:Kr,isFragment:Vr,isMemo:Ir,isValidElement:Dr,lazy:cr,memo:Zn,render:xr,startTransition:Hr,unmountComponentAtNode:Br,unstable_batchedUpdates:Ur,useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Mn,useErrorBoundary:function(e){var t=Rn(mn++,10),n=On();return t.__=e,vn.componentDidCatch||(vn.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Fn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jr.apply(null,arguments)}var ei={exports:{}},ti={},ni="function"==typeof Symbol&&Symbol.for,ri=ni?Symbol.for("react.element"):60103,ii=ni?Symbol.for("react.portal"):60106,oi=ni?Symbol.for("react.fragment"):60107,si=ni?Symbol.for("react.strict_mode"):60108,ai=ni?Symbol.for("react.profiler"):60114,li=ni?Symbol.for("react.provider"):60109,ui=ni?Symbol.for("react.context"):60110,ci=ni?Symbol.for("react.async_mode"):60111,di=ni?Symbol.for("react.concurrent_mode"):60111,hi=ni?Symbol.for("react.forward_ref"):60112,pi=ni?Symbol.for("react.suspense"):60113,fi=ni?Symbol.for("react.suspense_list"):60120,mi=ni?Symbol.for("react.memo"):60115,vi=ni?Symbol.for("react.lazy"):60116,gi=ni?Symbol.for("react.block"):60121,yi=ni?Symbol.for("react.fundamental"):60117,_i=ni?Symbol.for("react.responder"):60118,bi=ni?Symbol.for("react.scope"):60119;function wi(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ri:switch(e=e.type){case ci:case di:case oi:case ai:case si:case pi:return e;default:switch(e=e&&e.$$typeof){case ui:case hi:case vi:case mi:case li:return e;default:return t}}case ii:return t}}}function xi(e){return wi(e)===di}ti.AsyncMode=ci,ti.ConcurrentMode=di,ti.ContextConsumer=ui,ti.ContextProvider=li,ti.Element=ri,ti.ForwardRef=hi,ti.Fragment=oi,ti.Lazy=vi,ti.Memo=mi,ti.Portal=ii,ti.Profiler=ai,ti.StrictMode=si,ti.Suspense=pi,ti.isAsyncMode=function(e){return xi(e)||wi(e)===ci},ti.isConcurrentMode=xi,ti.isContextConsumer=function(e){return wi(e)===ui},ti.isContextProvider=function(e){return wi(e)===li},ti.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ri},ti.isForwardRef=function(e){return wi(e)===hi},ti.isFragment=function(e){return wi(e)===oi},ti.isLazy=function(e){return wi(e)===vi},ti.isMemo=function(e){return wi(e)===mi},ti.isPortal=function(e){return wi(e)===ii},ti.isProfiler=function(e){return wi(e)===ai},ti.isStrictMode=function(e){return wi(e)===si},ti.isSuspense=function(e){return wi(e)===pi},ti.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===oi||e===di||e===ai||e===si||e===pi||e===fi||"object"==typeof e&&null!==e&&(e.$$typeof===vi||e.$$typeof===mi||e.$$typeof===li||e.$$typeof===ui||e.$$typeof===hi||e.$$typeof===yi||e.$$typeof===_i||e.$$typeof===bi||e.$$typeof===gi)},ti.typeOf=wi,ei.exports=ti;var Si=ei.exports,ki={};ki[Si.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ki[Si.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Ei(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Pi=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ti=function(e,t,n){Pi(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var Ai={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ci=!1,Ri=/[A-Z]|^ms/g,Oi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Fi=function(e){return 45===e.charCodeAt(1)},Mi=function(e){return null!=e&&"boolean"!=typeof e},Li=ln((function(e){return Fi(e)?e:e.replace(Ri,"-$&").toLowerCase()})),Di=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Oi,(function(e,t,n){return ji={name:t,styles:n,next:ji},t}))}return 1===Ai[e]||Fi(e)||"number"!=typeof t||0===t?t:t+"px"},Vi="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ii(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return ji={name:i.name,styles:i.styles,next:ji},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)ji={name:s.name,styles:s.styles,next:ji},s=s.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ii(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":Mi(a)&&(r+=Li(o)+":"+Di(o,a)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&Ci)throw new Error(Vi);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=Ii(e,t,s);switch(o){case"animation":case"animationName":r+=Li(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<s.length;u++)Mi(s[u])&&(r+=Li(o)+":"+Di(o,s[u])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var a=ji,l=n(e);return ji=a,Ii(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var ji,Bi=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function Ni(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";ji=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=Ii(n,t,o)):i+=o[0];for(var s=1;s<e.length;s++){if(i+=Ii(n,t,e[s]),r)i+=o[s]}Bi.lastIndex=0;for(var a,l="";null!==(a=Bi.exec(i));)l+="-"+a[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:ji}}var Ui=!!Zr.useInsertionEffect&&Zr.useInsertionEffect,Gi=Ui||function(e){return e()},Wi=Ui||Ln,Hi=ot("undefined"!=typeof HTMLElement?bn({key:"css"}):null),$i=Hi.Provider,zi=function(e){return tr((function(t,n){var r=Bn(Hi);return e(t,r,n)}))},qi=ot({}),Ki={}.hasOwnProperty,Yi="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Qi=function(e,t){var n={};for(var r in t)Ki.call(t,r)&&(n[r]=t[r]);return n[Yi]=e,n},Xi=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Pi(t,n,r),Gi((function(){return Ti(t,n,r)})),null},Zi=zi((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Yi],o=[r],s="";"string"==typeof e.className?s=Ei(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var a=Ni(o,void 0,Bn(qi));s+=t.key+"-"+a.name;var l={};for(var u in e)Ki.call(e,u)&&"css"!==u&&u!==Yi&&(l[u]=e[u]);return l.className=s,n&&(l.ref=n),De(je,null,De(Xi,{cache:t,serialized:a,isStringTag:"string"==typeof i}),De(i,l))})),Ji=zi((function(e,t){var n=Ni([e.styles],void 0,Bn(qi)),r=Dn();return Wi((function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,s=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==s&&(o=!0,s.setAttribute("data-emotion",e),i.hydrate([s])),r.current=[i,o],function(){i.flush()}}),[t]),Wi((function(){var e=r.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Ti(t,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}t.insert("",n,i,!1)}}),[t,n.name]),null}));function eo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ni(t)}var to=0;function no(e,t,n,r,i,o){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)"ref"==a?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--to,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return _e.vnode&&_e.vnode(u),u}var ro=je;function io(e,t,n){return Ki.call(t,"css")?no(Zi,Qi(e,t),n):no(e,t,n)}function oo(e,t,n){return Ki.call(t,"css")?no(Zi,Qi(e,t),n):no(e,t,n)}const so=eo({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},":host":{"--fl-color-primary-900":"#000563","--fl-color-primary-800":"#031495","--fl-color-primary-700":"#1033c6","--fl-color-primary-600":"#2e66f7","--fl-color-primary-500":"#5786f8","--fl-color-primary-400":"#88abfa","--fl-color-primary-300":"#b5cbfb","--fl-color-primary-200":"#d6e2fc","--fl-color-primary-100":"#eaf0fe","--fl-color-primary-50":"#f2f6ff","--kit-font-family":"Inter, 'Source Sans Pro', sans-serif",fontFamily:"Inter, 'Source Sans Pro', sans-serif"}}),ao=()=>oo(je,{children:[io(Ji,{styles:eo`
1
+ var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),__accessCheck=(e,t,n)=>t.has(e)||__typeError("Cannot "+n),__privateGet=(e,t,n)=>(__accessCheck(e,t,"read from private field"),n?n.call(e):t.get(e)),__privateAdd=(e,t,n)=>t.has(e)?__typeError("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),__privateSet=(e,t,n,r)=>(__accessCheck(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),__privateMethod=(e,t,n)=>(__accessCheck(e,t,"access private method"),n),__privateWrapper=(e,t,n,r)=>({set _(r){__privateSet(e,t,r,n)},get _(){return __privateGet(e,t,r)}});!function(){"use strict";var e,t,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,b,w,x,S,k,E,P,T,A,C,R,O,F,M,L,D,V,I,j,B,N,U,G,W,H,$,z,q,K,Y,Q,X,Z,J,ee,te,ne,re,ie,oe,se,ae,le,ue,ce,de,he,pe,fe,me,ve,ge,ye,_e,be,we,xe,Se,ke,Ee,Pe,Te,Ae,Ce={},Re=[],Oe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function Me(e,t){for(var n in t)e[n]=t[n];return e}function Le(e){var t=e.parentNode;t&&t.removeChild(e)}function De(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return Ve(e,s,r,i,null)}function Ve(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++be:i,__i:-1,__u:0};return null==i&&null!=_e.vnode&&_e.vnode(o),o}function Ie(){return{current:null}}function je(e){return e.children}function Be(e,t){this.props=e,this.context=t}function Ne(e,t){if(null==t)return e.__?Ne(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Ne(e):null}function Ue(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Ue(e)}}function Ge(e){(!e.__d&&(e.__d=!0)&&we.push(e)&&!We.__r++||xe!==_e.debounceRendering)&&((xe=_e.debounceRendering)||Se)(We)}function We(){var e,t,n,r,i,o,s,a;for(we.sort(ke);e=we.shift();)e.__d&&(t=we.length,r=void 0,o=(i=(n=e).__v).__e,s=[],a=[],n.__P&&((r=Me({},i)).__v=i.__v+1,_e.vnode&&_e.vnode(r),Xe(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,null==o?Ne(i):o,!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Ze(s,r,a),r.__e!=o&&Ue(r)),we.length>t&&we.sort(ke));We.__r=0}function He(e,t,n,r,i,o,s,a,l,u,c){var d,h,p,f,m,v=r&&r.__k||Re,g=t.length;for(n.__d=l,function(e,t,n){var r,i,o,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)s=r+d,null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Ve(null,i,null,null,null):Fe(i)?Ve(je,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Ve(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=qe(i,n,s,c),i.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:a>s?c>l-s?d+=a-s:d--:a<s&&(a==s-d?d-=a-s:d++),a!==r+d&&(i.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Ne(o)),et(o,o,!1),n[s]=null,c--);if(c)for(r=0;r<u;r++)null!=(o=n[r])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Ne(o)),et(o,o))}(n,t,v),l=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?Ce:v[p.__i]||Ce,p.__i=d,Xe(e,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Je(h.ref,null,p),c.push(p.ref,p.__c||f,p)),null==m&&null!=f&&(m=f),65536&p.__u||h.__k===p.__k?l=$e(p,l,e):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:f&&(l=f.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=m}function $e(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=$e(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Ne(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function ze(e,t){return t=t||[],null==e||"boolean"==typeof e||(Fe(e)?e.some((function(e){ze(e,t)})):t.push(e)),t}function qe(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&i==l.key&&o===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a++}}return-1}function Ke(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Oe.test(t)?n:n+"px"}function Ye(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ke(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ke(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Ee,e.addEventListener(t,o?Te:Pe,o)):e.removeEventListener(t,o?Te:Pe,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function Qe(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=Ee++;else if(t.t<n.u)return;return n(_e.event?_e.event(t):t)}}}function Xe(e,t,n,r,i,o,s,a,l,u){var c,d,h,p,f,m,v,g,y,_,b,w,x,S,k,E,P=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(c=_e.__b)&&c(t);e:if("function"==typeof P)try{if(g=t.props,y="prototype"in P&&P.prototype.render,_=(c=P.contextType)&&r[c.__c],b=c?_?_.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:(y?t.__c=d=new P(g,b):(t.__c=d=new Be(g,b),d.constructor=P,d.render=tt),_&&_.sub(d),d.props=g,d.state||(d.state={}),d.context=b,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),y&&null==d.__s&&(d.__s=d.state),y&&null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Me({},d.__s)),Me(d.__s,P.getDerivedStateFromProps(g,d.__s))),p=d.props,f=d.state,d.__v=t,h)y&&null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),y&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(y&&null==P.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,b)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),w=0;w<d._sb.length;w++)d.__h.push(d._sb[w]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,b),y&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,m)}))}if(d.context=b,d.props=g,d.__P=e,d.__e=!1,x=_e.__r,S=0,y){for(d.state=d.__s,d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(r=Me(Me({},r),d.getChildContext())),y&&!h&&null!=d.getSnapshotBeforeUpdate&&(m=d.getSnapshotBeforeUpdate(p,f)),He(e,Fe(E=null!=c&&c.type===je&&null==c.key?c.props.children:c)?E:[E],t,n,r,i,o,s,a,l,u),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(T){if(t.__v=null,l||null!=o){for(t.__u|=l?160:32;a&&8===a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else t.__e=n.__e,t.__k=n.__k;_e.__e(T,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a,l){var u,c,d,h,p,f,m,v=n.props,g=t.props,y=t.type;if("svg"===y?i="http://www.w3.org/2000/svg":"math"===y?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!y&&(y?p.localName===y:3===p.nodeType)){e=p,o[u]=null;break}if(null==e){if(null===y)return document.createTextNode(g);e=document.createElementNS(i,y,g.is&&g),o=null,a=!1}if(null===y)v===g||a&&e.data===g||(e.data=g);else{if(o=o&&ye.call(e.childNodes),v=n.props||Ce,!a&&null!=o)for(v={},u=0;u<e.attributes.length;u++)v[(p=e.attributes[u]).name]=p.value;for(u in v)if(p=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)d=p;else if("key"!==u&&!(u in g)){if("value"==u&&"defaultValue"in g||"checked"==u&&"defaultChecked"in g)continue;Ye(e,u,null,p,i)}for(u in g)p=g[u],"children"==u?h=p:"dangerouslySetInnerHTML"==u?c=p:"value"==u?f=p:"checked"==u?m=p:"key"===u||a&&"function"!=typeof p||v[u]===p||Ye(e,u,p,v[u],i);if(c)a||d&&(c.__html===d.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),He(e,Fe(h)?h:[h],t,n,r,"foreignObject"===y?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ne(n,0),a,l),null!=o)for(u=o.length;u--;)null!=o[u]&&Le(o[u]);a||(u="value",void 0!==f&&(f!==e[u]||"progress"===y&&!f||"option"===y&&f!==v[u])&&Ye(e,u,f,v[u],i),u="checked",void 0!==m&&m!==e[u]&&Ye(e,u,m,v[u],i))}return e}(n.__e,t,n,r,i,o,s,l,u);(c=_e.diffed)&&c(t)}function Ze(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Je(n[r],n[++r],n[++r]);_e.__c&&_e.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(n){_e.__e(n,t.__v)}}))}function Je(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(i){_e.__e(i,n)}}function et(e,t,n){var r,i;if(_e.unmount&&_e.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Je(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){_e.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&et(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Le(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function tt(e,t,n){return this.constructor(e,n)}function nt(e,t,n){var r,i,o,s;_e.__&&_e.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],s=[],Xe(t,e=(!r&&n||t).__k=De(je,null,[e]),i||Ce,Ce,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?ye.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),Ze(o,e,s)}function rt(e,t){nt(e,t,rt)}function it(e,t,n){var r,i,o,s,a=Me({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?ye.call(arguments,2):n),Ve(e.type,a,r||e.key,i||e.ref,null)}function ot(e,t){var n={__c:t="__cC"+Ae++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Ge(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}function st(){return(st=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}ye=Re.slice,_e={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},be=0,Be.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Me({},this.state),"function"==typeof e&&(e=e(Me({},n),this.props)),e&&Me(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Ge(this))},Be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ge(this))},Be.prototype.render=je,we=[],Se="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ke=function(e,t){return e.__v.__b-t.__v.__b},We.__r=0,Ee=0,Pe=Qe(!1),Te=Qe(!0),Ae=0;var at=["context","children"];function lt(e){return this.getChildContext=function(){return e.context},it(e.children,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,at))}function ut(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=De(lt,st({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[ct(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=e(a[o],null),u=a[o].slot;u?i[u]=De(pt,{name:u},l):r[o]=l}var c=n?De(pt,null,r):r;return De(n||t.nodeName.toLowerCase(),i,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?rt:nt)(this._vdom,this._root)}function ct(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function dt(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[ct(e)]=n,this._vdom=it(this._vdom,r),nt(this._vdom,this._root)}}function ht(){nt(this._vdom=null,this._root)}function pt(e,t){var n=this;return De("slot",st({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}var ft=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch($y){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),mt="-ms-",vt="-moz-",gt="-webkit-",yt="comm",_t="rule",bt="decl",wt="@keyframes",xt=Math.abs,St=String.fromCharCode,kt=Object.assign;function Et(e){return e.trim()}function Pt(e,t,n){return e.replace(t,n)}function Tt(e,t){return e.indexOf(t)}function At(e,t){return 0|e.charCodeAt(t)}function Ct(e,t,n){return e.slice(t,n)}function Rt(e){return e.length}function Ot(e){return e.length}function Ft(e,t){return t.push(e),e}var Mt=1,Lt=1,Dt=0,Vt=0,It=0,jt="";function Bt(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Mt,column:Lt,length:s,return:""}}function Nt(e,t){return kt(Bt("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ut(){return It=Vt<Dt?At(jt,Vt++):0,Lt++,10===It&&(Lt=1,Mt++),It}function Gt(){return At(jt,Vt)}function Wt(){return Vt}function Ht(e,t){return Ct(jt,e,t)}function $t(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zt(e){return Mt=Lt=1,Dt=Rt(jt=e),Vt=0,[]}function qt(e){return jt="",e}function Kt(e){return Et(Ht(Vt-1,Xt(91===e?e+2:40===e?e+1:e)))}function Yt(e){for(;(It=Gt())&&It<33;)Ut();return $t(e)>2||$t(It)>3?"":" "}function Qt(e,t){for(;--t&&Ut()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return Ht(e,Wt()+(t<6&&32==Gt()&&32==Ut()))}function Xt(e){for(;Ut();)switch(It){case e:return Vt;case 34:case 39:34!==e&&39!==e&&Xt(It);break;case 40:41===e&&Xt(e);break;case 92:Ut()}return Vt}function Zt(e,t){for(;Ut()&&e+It!==57&&(e+It!==84||47!==Gt()););return"/*"+Ht(t,Vt-1)+"*"+St(47===e?e:Ut())}function Jt(e){for(;!$t(Gt());)Ut();return Ht(e,Vt)}function en(e){return qt(tn("",null,null,null,[""],e=zt(e),0,[0],e))}function tn(e,t,n,r,i,o,s,a,l){for(var u=0,c=0,d=s,h=0,p=0,f=0,m=1,v=1,g=1,y=0,_="",b=i,w=o,x=r,S=_;v;)switch(f=y,y=Ut()){case 40:if(108!=f&&58==At(S,d-1)){-1!=Tt(S+=Pt(Kt(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=Kt(y);break;case 9:case 10:case 13:case 32:S+=Yt(f);break;case 92:S+=Qt(Wt()-1,7);continue;case 47:switch(Gt()){case 42:case 47:Ft(rn(Zt(Ut(),Wt()),t,n),l);break;default:S+="/"}break;case 123*m:a[u++]=Rt(S)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(S=Pt(S,/\f/g,"")),p>0&&Rt(S)-d&&Ft(p>32?on(S+";",r,n,d-1):on(Pt(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Ft(x=nn(S,t,n,u,c,i,a,_,b=[],w=[],d),o),123===y)if(0===c)tn(S,t,x,x,b,o,d,a,w);else switch(99===h&&110===At(S,3)?100:h){case 100:case 108:case 109:case 115:tn(e,x,x,r&&Ft(nn(e,x,x,0,0,i,a,_,i,b=[],d),w),i,w,d,a,r?b:w);break;default:tn(S,x,x,x,[""],w,0,a,w)}}u=c=p=0,m=g=1,_=S="",d=s;break;case 58:d=1+Rt(S),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(It=Vt>0?At(jt,--Vt):0,Lt--,10===It&&(Lt=1,Mt--),It))continue;switch(S+=St(y),y*m){case 38:g=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(Rt(S)-1)*g,g=1;break;case 64:45===Gt()&&(S+=Kt(Ut())),h=Gt(),c=d=Rt(_=S+=Jt(Wt())),y++;break;case 45:45===f&&2==Rt(S)&&(m=0)}}return o}function nn(e,t,n,r,i,o,s,a,l,u,c){for(var d=i-1,h=0===i?o:[""],p=Ot(h),f=0,m=0,v=0;f<r;++f)for(var g=0,y=Ct(e,d+1,d=xt(m=s[f])),_=e;g<p;++g)(_=Et(m>0?h[g]+" "+y:Pt(y,/&\f/g,h[g])))&&(l[v++]=_);return Bt(e,t,n,0===i?_t:a,l,u,c)}function rn(e,t,n){return Bt(e,t,n,yt,St(It),Ct(e,2,-2),0)}function on(e,t,n,r){return Bt(e,t,n,bt,Ct(e,0,r),Ct(e,r+1,-1),r)}function sn(e,t){for(var n="",r=Ot(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function an(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case bt:return e.return=e.return||e.value;case yt:return"";case wt:return e.return=e.value+"{"+sn(e.children,r)+"}";case _t:e.value=e.props.join(",")}return Rt(n=sn(e.children,r))?e.return=e.value+"{"+n+"}":""}function ln(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var un=function(e,t,n){for(var r=0,i=0;r=i,i=Gt(),38===r&&12===i&&(t[n]=1),!$t(i);)Ut();return Ht(e,Vt)},cn=function(e,t){return qt(function(e,t){var n=-1,r=44;do{switch($t(r)){case 0:38===r&&12===Gt()&&(t[n]=1),e[n]+=un(Vt-1,t,n);break;case 2:e[n]+=Kt(r);break;case 4:if(44===r){e[++n]=58===Gt()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=St(r)}}while(r=Ut());return e}(zt(e),t))},dn=new WeakMap,hn=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||dn.get(n))&&!r){dn.set(e,!0);for(var i=[],o=cn(t,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},pn=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function fn(e,t){switch(function(e,t){return 45^At(e,0)?(((t<<2^At(e,0))<<2^At(e,1))<<2^At(e,2))<<2^At(e,3):0}(e,t)){case 5103:return gt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return gt+e+vt+e+mt+e+e;case 6828:case 4268:return gt+e+mt+e+e;case 6165:return gt+e+mt+"flex-"+e+e;case 5187:return gt+e+Pt(e,/(\w+).+(:[^]+)/,gt+"box-$1$2"+mt+"flex-$1$2")+e;case 5443:return gt+e+mt+"flex-item-"+Pt(e,/flex-|-self/,"")+e;case 4675:return gt+e+mt+"flex-line-pack"+Pt(e,/align-content|flex-|-self/,"")+e;case 5548:return gt+e+mt+Pt(e,"shrink","negative")+e;case 5292:return gt+e+mt+Pt(e,"basis","preferred-size")+e;case 6060:return gt+"box-"+Pt(e,"-grow","")+gt+e+mt+Pt(e,"grow","positive")+e;case 4554:return gt+Pt(e,/([^-])(transform)/g,"$1"+gt+"$2")+e;case 6187:return Pt(Pt(Pt(e,/(zoom-|grab)/,gt+"$1"),/(image-set)/,gt+"$1"),e,"")+e;case 5495:case 3959:return Pt(e,/(image-set\([^]*)/,gt+"$1$`$1");case 4968:return Pt(Pt(e,/(.+:)(flex-)?(.*)/,gt+"box-pack:$3"+mt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gt+e+e;case 4095:case 3583:case 4068:case 2532:return Pt(e,/(.+)-inline(.+)/,gt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Rt(e)-1-t>6)switch(At(e,t+1)){case 109:if(45!==At(e,t+4))break;case 102:return Pt(e,/(.+:)(.+)-([^]+)/,"$1"+gt+"$2-$3$1"+vt+(108==At(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Tt(e,"stretch")?fn(Pt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==At(e,t+1))break;case 6444:switch(At(e,Rt(e)-3-(~Tt(e,"!important")&&10))){case 107:return Pt(e,":",":"+gt)+e;case 101:return Pt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gt+(45===At(e,14)?"inline-":"")+"box$3$1"+gt+"$2$3$1"+mt+"$2box$3")+e}break;case 5936:switch(At(e,t+11)){case 114:return gt+e+mt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gt+e+mt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gt+e+mt+Pt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gt+e+mt+e+e}return e}var mn,vn,gn,yn,_n=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case bt:e.return=fn(e.value,e.length);break;case wt:return sn([Nt(e,{value:Pt(e.value,"@","@"+gt)})],r);case _t:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return sn([Nt(e,{props:[Pt(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return sn([Nt(e,{props:[Pt(t,/:(plac\w+)/,":"+gt+"input-$1")]}),Nt(e,{props:[Pt(t,/:(plac\w+)/,":-moz-$1")]}),Nt(e,{props:[Pt(t,/:(plac\w+)/,mt+"input-$1")]})],r)}return""}))}}],bn=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,o=e.stylisPlugins||_n,s={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,u,c,d,h=[an,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(u=[hn,pn].concat(o,h),c=Ot(u),function(e,t,n,r){for(var i="",o=0;o<c;o++)i+=u[o](e,t,n,r)||"";return i});i=function(e,t,n,r){l=n,sn(en(e?e+"{"+t.styles+"}":t.styles),p),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new ft({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(a),f},wn=0,xn=[],Sn=_e,kn=Sn.__b,En=Sn.__r,Pn=Sn.diffed,Tn=Sn.__c,An=Sn.unmount,Cn=Sn.__;function Rn(e,t){Sn.__h&&Sn.__h(vn,e,wn||t),wn=0;var n=vn.__H||(vn.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function On(e){return wn=1,Fn(Kn,e)}function Fn(e,t,n){var r=Rn(mn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Kn(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=vn,!vn.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};vn.u=!0;var o=vn.shouldComponentUpdate,s=vn.componentWillUpdate;vn.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},vn.shouldComponentUpdate=i}return r.__N||r.__}function Mn(e,t){var n=Rn(mn++,3);!Sn.__s&&qn(n.__H,t)&&(n.__=e,n.i=t,vn.__H.__h.push(n))}function Ln(e,t){var n=Rn(mn++,4);!Sn.__s&&qn(n.__H,t)&&(n.__=e,n.i=t,vn.__h.push(n))}function Dn(e){return wn=5,In((function(){return{current:e}}),[])}function Vn(e,t,n){wn=6,Ln((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function In(e,t){var n=Rn(mn++,7);return qn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function jn(e,t){return wn=8,In((function(){return e}),t)}function Bn(e){var t=vn.context[e.__c],n=Rn(mn++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(vn)),t.props.value):e.__}function Nn(e,t){Sn.useDebugValue&&Sn.useDebugValue(t?t(e):e)}function Un(){var e=Rn(mn++,11);if(!e.__){for(var t=vn.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Gn(){for(var e;e=xn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach($n),e.__H.__h.forEach(zn),e.__H.__h=[]}catch(Y_){e.__H.__h=[],Sn.__e(Y_,e.__v)}}Sn.__b=function(e){vn=null,kn&&kn(e)},Sn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Cn&&Cn(e,t)},Sn.__r=function(e){En&&En(e),mn=0;var t=(vn=e.__c).__H;t&&(gn===vn?(t.__h=[],vn.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach($n),t.__h.forEach(zn),t.__h=[],mn=0)),gn=vn},Sn.diffed=function(e){Pn&&Pn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==xn.push(t)&&yn===Sn.requestAnimationFrame||((yn=Sn.requestAnimationFrame)||Hn)(Gn)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),gn=vn=null},Sn.__c=function(e,t){t.some((function(e){try{e.__h.forEach($n),e.__h=e.__h.filter((function(e){return!e.__||zn(e)}))}catch(A_){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Sn.__e(A_,e.__v)}})),Tn&&Tn(e,t)},Sn.unmount=function(e){An&&An(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{$n(e)}catch(n){t=n}})),n.__H=void 0,t&&Sn.__e(t,n.__v))};var Wn="function"==typeof requestAnimationFrame;function Hn(e){var t,n=function(){clearTimeout(r),Wn&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Wn&&(t=requestAnimationFrame(n))}function $n(e){var t=vn,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),vn=t}function zn(e){var t=vn;e.__c=e.__(),vn=t}function qn(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Kn(e,t){return"function"==typeof t?t(e):t}function Yn(e,t){for(var n in t)e[n]=t[n];return e}function Qn(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Xn(e,t){this.props=e,this.context=t}function Zn(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Qn(this.props,e)}function r(t){return this.shouldComponentUpdate=n,De(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Xn.prototype=new Be).isPureReactComponent=!0,Xn.prototype.shouldComponentUpdate=function(e,t){return Qn(this.props,e)||Qn(this.state,t)};var Jn=_e.__b;_e.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Jn&&Jn(e)};var er="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function tr(e){function t(t){var n=Yn({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=er,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var nr=function(e,t){return null==e?null:ze(ze(e).map(t))},rr={map:nr,forEach:nr,count:function(e){return e?ze(e).length:0},only:function(e){var t=ze(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:ze},ir=_e.__e;_e.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);ir(e,t,n,r)};var or=_e.unmount;function sr(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Yn({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return sr(e,t,n)}))),e}function ar(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return ar(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function lr(){this.__u=0,this.t=null,this.__b=null}function ur(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function cr(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return De(n,i)}return i.displayName="Lazy",i.__f=!0,i}function dr(){this.u=null,this.o=null}_e.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),or&&or(e)},(lr.prototype=new Be).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=ur(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=ar(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},lr.prototype.componentWillUnmount=function(){this.t=[]},lr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=sr(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&De(je,null,e.fallback);return i&&(i.__u&=-33),[De(je,null,t.__a?null:e.children),i]};var hr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function pr(e){return this.getChildContext=function(){return e.context},e.children}function fr(e){var t=this,n=e.i;t.componentWillUnmount=function(){nt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),nt(De(pr,{context:t.context},e.__v),t.l)}function mr(e,t){var n=De(fr,{__v:e,i:t});return n.containerInfo=t,n}(dr.prototype=new Be).__a=function(e){var t=this,n=ur(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),hr(t,e,r)):i()};n?n(o):o()}},dr.prototype.render=function(e){this.u=null,this.o=new Map;var t=ze(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},dr.prototype.componentDidUpdate=dr.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){hr(e,n,t)}))};var vr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,gr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,yr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,_r=/[A-Z0-9]/g,br="undefined"!=typeof document,wr=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function xr(e,t,n){return null==t.__k&&(t.textContent=""),nt(e,t),"function"==typeof n&&n(),e?e.__c:null}function Sr(e,t,n){return rt(e,t),"function"==typeof n&&n(),e?e.__c:null}Be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(Be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var kr=_e.event;function Er(){}function Pr(){return this.cancelBubble}function Tr(){return this.defaultPrevented}_e.event=function(e){return kr&&(e=kr(e)),e.persist=Er,e.isPropagationStopped=Pr,e.isDefaultPrevented=Tr,e.nativeEvent=e};var Ar,Cr={enumerable:!1,configurable:!0,get:function(){return this.class}},Rr=_e.vnode;_e.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},i=-1===n.indexOf("-");for(var o in t){var s=t[o];if(!("value"===o&&"defaultValue"in t&&null==s||br&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===s?s="":"translate"===a&&"no"===s?s=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||wr(t.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":yr.test(o)&&(o=a):a=o="oninput":i&&gr.test(o)?o=o.replace(_r,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=ze(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=ze(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Cr)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=vr,Rr&&Rr(e)};var Or=_e.__r;_e.__r=function(e){Or&&Or(e),Ar=e.__c};var Fr=_e.diffed;_e.diffed=function(e){Fr&&Fr(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Ar=null};var Mr={ReactCurrentDispatcher:{current:{readContext:function(e){return Ar.__n[e.__c].props.value},useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Mn,useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Fn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr}}};function Lr(e){return De.bind(null,e)}function Dr(e){return!!e&&e.$$typeof===vr}function Vr(e){return Dr(e)&&e.type===je}function Ir(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function jr(e){return Dr(e)?it.apply(null,arguments):e}function Br(e){return!!e.__k&&(nt(null,e),!0)}function Nr(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ur=function(e,t){return e(t)},Gr=function(e,t){return e(t)},Wr=je;function Hr(e){e()}function $r(e){return e}function zr(){return[!1,Hr]}var qr=Ln,Kr=Dr;function Yr(e,t){var n=t(),r=On({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Ln((function(){i.__=n,i.v=t,Qr(i)&&o({h:i})}),[e,n,t]),Mn((function(){return Qr(i)&&o({h:i}),e((function(){Qr(i)&&o({h:i})}))}),[e]),n}function Qr(e){var t,n,r=e.v,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(s){return!0}}var Xr={useState:On,useId:Un,useReducer:Fn,useEffect:Mn,useLayoutEffect:Ln,useInsertionEffect:qr,useTransition:zr,useDeferredValue:$r,useSyncExternalStore:Yr,startTransition:Hr,useRef:Dn,useImperativeHandle:Vn,useMemo:In,useCallback:jn,useContext:Bn,useDebugValue:Nn,version:"17.0.2",Children:rr,render:xr,hydrate:Sr,unmountComponentAtNode:Br,createPortal:mr,createElement:De,createContext:ot,createFactory:Lr,cloneElement:jr,createRef:Ie,Fragment:je,isValidElement:Dr,isElement:Kr,isFragment:Vr,isMemo:Ir,findDOMNode:Nr,Component:Be,PureComponent:Xn,memo:Zn,forwardRef:tr,flushSync:Gr,unstable_batchedUpdates:Ur,StrictMode:Wr,Suspense:lr,SuspenseList:dr,lazy:cr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mr};const Zr=Object.freeze(Object.defineProperty({__proto__:null,Children:rr,Component:Be,Fragment:je,PureComponent:Xn,StrictMode:Wr,Suspense:lr,SuspenseList:dr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mr,cloneElement:jr,createContext:ot,createElement:De,createFactory:Lr,createPortal:mr,createRef:Ie,default:Xr,findDOMNode:Nr,flushSync:Gr,forwardRef:tr,hydrate:Sr,isElement:Kr,isFragment:Vr,isMemo:Ir,isValidElement:Dr,lazy:cr,memo:Zn,render:xr,startTransition:Hr,unmountComponentAtNode:Br,unstable_batchedUpdates:Ur,useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Mn,useErrorBoundary:function(e){var t=Rn(mn++,10),n=On();return t.__=e,vn.componentDidCatch||(vn.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Fn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jr.apply(null,arguments)}var ei={exports:{}},ti={},ni="function"==typeof Symbol&&Symbol.for,ri=ni?Symbol.for("react.element"):60103,ii=ni?Symbol.for("react.portal"):60106,oi=ni?Symbol.for("react.fragment"):60107,si=ni?Symbol.for("react.strict_mode"):60108,ai=ni?Symbol.for("react.profiler"):60114,li=ni?Symbol.for("react.provider"):60109,ui=ni?Symbol.for("react.context"):60110,ci=ni?Symbol.for("react.async_mode"):60111,di=ni?Symbol.for("react.concurrent_mode"):60111,hi=ni?Symbol.for("react.forward_ref"):60112,pi=ni?Symbol.for("react.suspense"):60113,fi=ni?Symbol.for("react.suspense_list"):60120,mi=ni?Symbol.for("react.memo"):60115,vi=ni?Symbol.for("react.lazy"):60116,gi=ni?Symbol.for("react.block"):60121,yi=ni?Symbol.for("react.fundamental"):60117,_i=ni?Symbol.for("react.responder"):60118,bi=ni?Symbol.for("react.scope"):60119;function wi(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ri:switch(e=e.type){case ci:case di:case oi:case ai:case si:case pi:return e;default:switch(e=e&&e.$$typeof){case ui:case hi:case vi:case mi:case li:return e;default:return t}}case ii:return t}}}function xi(e){return wi(e)===di}ti.AsyncMode=ci,ti.ConcurrentMode=di,ti.ContextConsumer=ui,ti.ContextProvider=li,ti.Element=ri,ti.ForwardRef=hi,ti.Fragment=oi,ti.Lazy=vi,ti.Memo=mi,ti.Portal=ii,ti.Profiler=ai,ti.StrictMode=si,ti.Suspense=pi,ti.isAsyncMode=function(e){return xi(e)||wi(e)===ci},ti.isConcurrentMode=xi,ti.isContextConsumer=function(e){return wi(e)===ui},ti.isContextProvider=function(e){return wi(e)===li},ti.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ri},ti.isForwardRef=function(e){return wi(e)===hi},ti.isFragment=function(e){return wi(e)===oi},ti.isLazy=function(e){return wi(e)===vi},ti.isMemo=function(e){return wi(e)===mi},ti.isPortal=function(e){return wi(e)===ii},ti.isProfiler=function(e){return wi(e)===ai},ti.isStrictMode=function(e){return wi(e)===si},ti.isSuspense=function(e){return wi(e)===pi},ti.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===oi||e===di||e===ai||e===si||e===pi||e===fi||"object"==typeof e&&null!==e&&(e.$$typeof===vi||e.$$typeof===mi||e.$$typeof===li||e.$$typeof===ui||e.$$typeof===hi||e.$$typeof===yi||e.$$typeof===_i||e.$$typeof===bi||e.$$typeof===gi)},ti.typeOf=wi,ei.exports=ti;var Si=ei.exports,ki={};ki[Si.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ki[Si.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Ei(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Pi=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ti=function(e,t,n){Pi(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var Ai={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ci=!1,Ri=/[A-Z]|^ms/g,Oi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Fi=function(e){return 45===e.charCodeAt(1)},Mi=function(e){return null!=e&&"boolean"!=typeof e},Li=ln((function(e){return Fi(e)?e:e.replace(Ri,"-$&").toLowerCase()})),Di=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Oi,(function(e,t,n){return ji={name:t,styles:n,next:ji},t}))}return 1===Ai[e]||Fi(e)||"number"!=typeof t||0===t?t:t+"px"},Vi="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ii(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return ji={name:i.name,styles:i.styles,next:ji},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)ji={name:s.name,styles:s.styles,next:ji},s=s.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ii(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":Mi(a)&&(r+=Li(o)+":"+Di(o,a)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&Ci)throw new Error(Vi);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=Ii(e,t,s);switch(o){case"animation":case"animationName":r+=Li(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<s.length;u++)Mi(s[u])&&(r+=Li(o)+":"+Di(o,s[u])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var a=ji,l=n(e);return ji=a,Ii(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var ji,Bi=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function Ni(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";ji=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=Ii(n,t,o)):i+=o[0];for(var s=1;s<e.length;s++){if(i+=Ii(n,t,e[s]),r)i+=o[s]}Bi.lastIndex=0;for(var a,l="";null!==(a=Bi.exec(i));)l+="-"+a[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:ji}}var Ui=!!Zr.useInsertionEffect&&Zr.useInsertionEffect,Gi=Ui||function(e){return e()},Wi=Ui||Ln,Hi=ot("undefined"!=typeof HTMLElement?bn({key:"css"}):null),$i=Hi.Provider,zi=function(e){return tr((function(t,n){var r=Bn(Hi);return e(t,r,n)}))},qi=ot({}),Ki={}.hasOwnProperty,Yi="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Qi=function(e,t){var n={};for(var r in t)Ki.call(t,r)&&(n[r]=t[r]);return n[Yi]=e,n},Xi=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Pi(t,n,r),Gi((function(){return Ti(t,n,r)})),null},Zi=zi((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Yi],o=[r],s="";"string"==typeof e.className?s=Ei(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var a=Ni(o,void 0,Bn(qi));s+=t.key+"-"+a.name;var l={};for(var u in e)Ki.call(e,u)&&"css"!==u&&u!==Yi&&(l[u]=e[u]);return l.className=s,n&&(l.ref=n),De(je,null,De(Xi,{cache:t,serialized:a,isStringTag:"string"==typeof i}),De(i,l))})),Ji=zi((function(e,t){var n=Ni([e.styles],void 0,Bn(qi)),r=Dn();return Wi((function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,s=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==s&&(o=!0,s.setAttribute("data-emotion",e),i.hydrate([s])),r.current=[i,o],function(){i.flush()}}),[t]),Wi((function(){var e=r.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Ti(t,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}t.insert("",n,i,!1)}}),[t,n.name]),null}));function eo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ni(t)}var to=0;function no(e,t,n,r,i,o){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)"ref"==a?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--to,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return _e.vnode&&_e.vnode(u),u}var ro=je;function io(e,t,n){return Ki.call(t,"css")?no(Zi,Qi(e,t),n):no(e,t,n)}function oo(e,t,n){return Ki.call(t,"css")?no(Zi,Qi(e,t),n):no(e,t,n)}const so=eo({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},":host":{"--fl-color-primary-900":"#000563","--fl-color-primary-800":"#031495","--fl-color-primary-700":"#1033c6","--fl-color-primary-600":"#2e66f7","--fl-color-primary-500":"#5786f8","--fl-color-primary-400":"#88abfa","--fl-color-primary-300":"#b5cbfb","--fl-color-primary-200":"#d6e2fc","--fl-color-primary-100":"#eaf0fe","--fl-color-primary-50":"#f2f6ff","--kit-font-family":"Inter, 'Source Sans Pro', sans-serif",fontFamily:"Inter, 'Source Sans Pro', sans-serif"}}),ao=()=>oo(je,{children:[io(Ji,{styles:eo`
2
2
  ${{"*, ::before, ::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"#e5e7eb","--tw-border-spacing-x":"0","--tw-border-spacing-y":"0","--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-scroll-snap-strictness":"proximity","--tw-gradient-from-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-via-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-to-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"rgb(59 130 246 / 0.5)","--tw-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-drop-shadow":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-opacity":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-size":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-layout":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-paint":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-style":"var(--tw-empty,/*!*/ /*!*/)"},"::before, ::after":{"--tw-content":"''"},"html, :host":{lineHeight:"1.5",WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:"4",fontFamily:'Inter, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',fontFeatureSettings:" normal",fontVariationSettings:" normal",WebkitTapHighlightColor:"transparent"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1, h2, h3, h4, h5, h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b, strong":{fontWeight:"bolder"},"code, kbd, samp, pre":{fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontFeatureSettings:" normal",fontVariationSettings:" normal",fontSize:"1em"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button, input, optgroup, select, textarea":{fontFamily:"inherit",fontFeatureSettings:"inherit",fontVariationSettings:"inherit",fontSize:"100%",fontWeight:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",margin:"0",padding:"0"},"button, select":{textTransform:"none"},"button, input:where([type='button']), input:where([type='reset']), input:where([type='submit'])":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button, ::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol, ul, menu":{listStyle:"none",margin:"0",padding:"0"},dialog:{padding:"0"},textarea:{resize:"vertical"},"input::placeholder, textarea::placeholder":{opacity:"1",color:"#9ca3af"},'button, [role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img, svg, video, canvas, audio, iframe, embed, object":{display:"block",verticalAlign:"middle"},"img, video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"},"::backdrop":{"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0","--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-scroll-snap-strictness":"proximity","--tw-gradient-from-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-via-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-to-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"rgb(59 130 246 / 0.5)","--tw-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-drop-shadow":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-opacity":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-size":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-layout":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-paint":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-style":"var(--tw-empty,/*!*/ /*!*/)"},"[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select":{appearance:"none",backgroundColor:"#fff",borderColor:"#6b7280",borderWidth:"1px",borderRadius:"0px",paddingTop:"0.5rem",paddingRight:"0.75rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 0 #0000"},"[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"#2563eb","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)",borderColor:"#2563eb"},"input::placeholder,textarea::placeholder":{color:"#6b7280",opacity:"1"},"::-webkit-datetime-edit-fields-wrapper":{padding:"0"},"::-webkit-date-and-time-value":{minHeight:"1.5em",textAlign:"inherit"},"::-webkit-datetime-edit":{display:"inline-flex"},"::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field":{paddingTop:"0",paddingBottom:"0"},select:{backgroundImage:"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\")",backgroundPosition:"right 0.5rem center",backgroundRepeat:"no-repeat",backgroundSize:"1.5em 1.5em",paddingRight:"2.5rem",printColorAdjust:"exact"},'[multiple],[size]:where(select:not([size="1"]))':{backgroundImage:"initial",backgroundPosition:"initial",backgroundRepeat:"unset",backgroundSize:"initial",paddingRight:"0.75rem",printColorAdjust:"unset"},"[type='checkbox'],[type='radio']":{appearance:"none",padding:"0",printColorAdjust:"exact",display:"inline-block",verticalAlign:"middle",backgroundOrigin:"border-box",userSelect:"none",flexShrink:"0",height:"1rem",width:"1rem",color:"#2563eb",backgroundColor:"#fff",borderColor:"#6b7280",borderWidth:"1px","--tw-shadow":"0 0 #0000"},"[type='checkbox']":{borderRadius:"0px"},"[type='radio']":{borderRadius:"100%"},"[type='checkbox']:focus,[type='radio']:focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":"#2563eb","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"},"[type='checkbox']:checked,[type='radio']:checked":{borderColor:"transparent",backgroundColor:"currentColor",backgroundSize:"100% 100%",backgroundPosition:"center",backgroundRepeat:"no-repeat"},"[type='checkbox']:checked":{backgroundImage:"url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")"},"@media (forced-colors: active)":{"[type='checkbox']:checked":{appearance:"auto"},"[type='radio']:checked":{appearance:"auto"},"[type='checkbox']:indeterminate":{appearance:"auto"}},"[type='radio']:checked":{backgroundImage:"url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")"},"[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus":{borderColor:"transparent",backgroundColor:"currentColor"},"[type='checkbox']:indeterminate":{backgroundImage:"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\")",borderColor:"transparent",backgroundColor:"currentColor",backgroundSize:"100% 100%",backgroundPosition:"center",backgroundRepeat:"no-repeat"},"[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus":{borderColor:"transparent",backgroundColor:"currentColor"},"[type='file']":{background:"unset",borderColor:"inherit",borderWidth:"0",borderRadius:"0",padding:"0",fontSize:"unset",lineHeight:"inherit"},"[type='file']:focus":{outline:"1px auto -webkit-focus-ring-color"}}}
3
- `}),io(Ji,{styles:so})]});let lo;const uo=()=>Bn(lo);class co extends Error{constructor(e,t){super(e),__publicField(this,"response"),this.response=t}}const ho=async(e,t,n,r)=>{await po(e,t,n,r,!0)},po=async(e,t,n,r,i)=>{const o=await fetch(e,{method:n,body:r?JSON.stringify(r):void 0,headers:{"content-type":"application/json","x-app-version":"1.4.56527",authorization:`Bearer ${t}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!o.ok)throw new co(`[API Error] Status: ${o.statusText}. Response: ${await o.text()}`,o);return i?{}:await o.json()},fo=()=>{const e=uo();return{getAllPromotions:In((()=>{return t=e.backend,async()=>{const e=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`);return po(e,t.accessToken,"GET")};var t}),[e.backend]),createPromotion:In((()=>{return t=e.backend,async e=>{const n=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`);return ho(n,t.accessToken,"POST",e)};var t}),[e.backend]),updatePromotion:In((()=>{return t=e.backend,e=>async n=>{const r=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion/${e}`);return ho(r,t.accessToken,"PUT",n)};var t}),[e.backend])}};var mo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vo="undefined"==typeof window||"Deno"in globalThis;function go(){}function yo(e){return"number"==typeof e&&e>=0&&e!==1/0}function _o(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bo(e,t){return"function"==typeof e?e(t):e}function wo(e,t){return"function"==typeof e?e(t):e}function xo(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s)if(r){if(t.queryHash!==ko(s,t.options))return!1}else if(!Po(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function So(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Eo(t.options.mutationKey)!==Eo(o))return!1}else if(!Po(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function ko(e,t){return((null==t?void 0:t.queryKeyHashFn)||Eo)(e)}function Eo(e){return JSON.stringify(e,((e,t)=>Ro(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function Po(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!Po(e[n],t[n]))))}function To(e,t){if(e===t)return e;const n=Co(e)&&Co(t);if(n||Ro(e)&&Ro(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let l=0;for(let u=0;u<s;u++){const i=n?u:o[u];(!n&&r.includes(i)||n)&&void 0===e[i]&&void 0===t[i]?(a[i]=void 0,l++):(a[i]=To(e[i],t[i]),a[i]===e[i]&&void 0!==e[i]&&l++)}return i===s&&l===i?e:a}return t}function Ao(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Co(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ro(e){if(!Oo(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Oo(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Oo(e){return"[object Object]"===Object.prototype.toString.call(e)}function Fo(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?To(e,t):t}function Mo(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Lo(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Do=Symbol();function Vo(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==Do?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var Io=new(r=class extends mo{constructor(){super(),__privateAdd(this,e),__privateAdd(this,t),__privateAdd(this,n),__privateSet(this,n,(e=>{if(!vo&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){__privateGet(this,t)||this.setEventListener(__privateGet(this,n))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,t))||e.call(this),__privateSet(this,t,void 0))}setEventListener(e){var r;__privateSet(this,n,e),null==(r=__privateGet(this,t))||r.call(this),__privateSet(this,t,e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})))}setFocused(t){__privateGet(this,e)!==t&&(__privateSet(this,e,t),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var t;return"boolean"==typeof __privateGet(this,e)?__privateGet(this,e):"hidden"!==(null==(t=globalThis.document)?void 0:t.visibilityState)}},e=new WeakMap,t=new WeakMap,n=new WeakMap,r),jo=new(a=class extends mo{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,s),__privateSet(this,s,(e=>{if(!vo&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}))}onSubscribe(){__privateGet(this,o)||this.setEventListener(__privateGet(this,s))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,void 0))}setEventListener(e){var t;__privateSet(this,s,e),null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,e(this.setOnline.bind(this)))}setOnline(e){__privateGet(this,i)!==e&&(__privateSet(this,i,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,s=new WeakMap,a);function Bo(e){return Math.min(1e3*2**e,3e4)}function No(e){return"online"!==(e??"online")||jo.isOnline()}var Uo=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function Go(e){return e instanceof Uo}function Wo(e){let t,n,r,i=!1,o=0,s=!1;const a=new Promise(((e,t)=>{n=e,r=t})),l=()=>Io.isFocused()&&("always"===e.networkMode||jo.isOnline())&&e.canRun(),u=()=>No(e.networkMode)&&e.canRun(),c=r=>{var i;s||(s=!0,null==(i=e.onSuccess)||i.call(e,r),null==t||t(),n(r))},d=n=>{var i;s||(s=!0,null==(i=e.onError)||i.call(e,n),null==t||t(),r(n))},h=()=>new Promise((n=>{var r;t=e=>{(s||l())&&n(e)},null==(r=e.onPause)||r.call(e)})).then((()=>{var n;t=void 0,s||null==(n=e.onContinue)||n.call(e)})),p=()=>{if(s)return;let t;const n=0===o?e.initialPromise:void 0;try{t=n??e.fn()}catch(r){t=Promise.reject(r)}Promise.resolve(t).then(c).catch((t=>{var n;if(s)return;const r=e.retry??(vo?0:3),a=e.retryDelay??Bo,u="function"==typeof a?a(o,t):a,c=!0===r||"number"==typeof r&&o<r||"function"==typeof r&&r(o,t);var f;!i&&c?(o++,null==(n=e.onFail)||n.call(e,o,t),(f=u,new Promise((e=>{setTimeout(e,f)}))).then((()=>l()?void 0:h())).then((()=>{i?d(t):p()}))):d(t)}))};return{promise:a,cancel:t=>{var n;s||(d(new Uo(t)),null==(n=e.abort)||n.call(e))},continue:()=>(null==t||t(),a),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:u,start:()=>(u()?p():h().then(p),a)}}var Ho=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0);const o=r=>{t?e.push(r):i((()=>{n(r)}))};return{batch:o=>{let s;t++;try{s=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return s},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),$o=(u=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yo(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vo?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,u),zo=(y=class extends $o{constructor(e){super(),__privateAdd(this,v),__privateAdd(this,c),__privateAdd(this,d),__privateAdd(this,h),__privateAdd(this,p),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,e.defaultOptions),this.setOptions(e.options),this.observers=[],__privateSet(this,h,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,__privateSet(this,c,function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=e.state??__privateGet(this,c),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null==(e=__privateGet(this,p))?void 0:e.promise}setOptions(e){this.options={...__privateGet(this,f),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,h).remove(this)}setData(e,t){const n=Fo(this.state.data,e,this.options);return __privateMethod(this,v,g).call(this,{data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){__privateMethod(this,v,g).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,n;const r=null==(t=__privateGet(this,p))?void 0:t.promise;return null==(n=__privateGet(this,p))||n.cancel(e),r?r.then(go).catch(go):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,c))}isActive(){return this.observers.some((e=>!1!==wo(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!_o(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,p))||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,p))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),__privateGet(this,h).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(__privateGet(this,p)&&(__privateGet(this,m)?__privateGet(this,p).cancel({revert:!0}):__privateGet(this,p).cancelRetry()),this.scheduleGc()),__privateGet(this,h).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(e,t){var n,r,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,p))return __privateGet(this,p).continueRetry(),__privateGet(this,p).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=new AbortController,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},a={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=Vo(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return s(n),__privateSet(this,m,!1),this.options.persister?this.options.persister(e,n,this):e(n)}};s(a),null==(n=this.options.behavior)||n.onFetch(a,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(r=a.fetchOptions)?void 0:r.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=a.fetchOptions)?void 0:i.meta});const l=e=>{var t,n,r,i;Go(e)&&e.silent||__privateMethod(this,v,g).call(this,{type:"error",error:e}),Go(e)||(null==(n=(t=__privateGet(this,h).config).onError)||n.call(t,e,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return __privateSet(this,p,Wo({initialPromise:null==t?void 0:t.initialPromise,fn:a.fetchFn,abort:o.abort.bind(o),onSuccess:e=>{var t,n,r,i;if(void 0!==e){try{this.setData(e)}catch(o){return void l(o)}null==(n=(t=__privateGet(this,h).config).onSuccess)||n.call(t,e,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(e,t)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),__privateGet(this,p).start()}},c=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...qo(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return Go(n)&&n.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Ho.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),__privateGet(this,h).notify({query:this,type:"updated",action:e})}))},y);function qo(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:No(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var Ko=(b=class extends mo{constructor(e={}){super(),__privateAdd(this,_),this.config=e,__privateSet(this,_,new Map)}build(e,t,n){const r=t.queryKey,i=t.queryHash??ko(r,t);let o=this.get(i);return o||(o=new zo({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){__privateGet(this,_).has(e.queryHash)||(__privateGet(this,_).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=__privateGet(this,_).get(e.queryHash);t&&(e.destroy(),t===e&&__privateGet(this,_).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ho.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return __privateGet(this,_).get(e)}getAll(){return[...__privateGet(this,_).values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>xo(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>xo(e,t))):t}notify(e){Ho.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){Ho.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){Ho.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},_=new WeakMap,b),Yo=(P=class extends $o{constructor(e){super(),__privateAdd(this,k),__privateAdd(this,w),__privateAdd(this,x),__privateAdd(this,S),this.mutationId=e.mutationId,__privateSet(this,x,e.mutationCache),__privateSet(this,w,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){__privateGet(this,w).includes(e)||(__privateGet(this,w).push(e),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){__privateSet(this,w,__privateGet(this,w).filter((t=>t!==e))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){__privateGet(this,w).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var e;return(null==(e=__privateGet(this,S))?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var t,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,b;__privateSet(this,S,Wo({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{__privateMethod(this,k,E).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,k,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,k,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const w="pending"===this.state.status,P=!__privateGet(this,S).canStart();try{if(!w){__privateMethod(this,k,E).call(this,{type:"pending",variables:e,isPaused:P}),await(null==(n=(t=__privateGet(this,x).config).onMutate)?void 0:n.call(t,e,this));const o=await(null==(i=(r=this.options).onMutate)?void 0:i.call(r,e));o!==this.state.context&&__privateMethod(this,k,E).call(this,{type:"pending",context:o,variables:e,isPaused:P})}const p=await __privateGet(this,S).start();return await(null==(s=(o=__privateGet(this,x).config).onSuccess)?void 0:s.call(o,p,e,this.state.context,this)),await(null==(l=(a=this.options).onSuccess)?void 0:l.call(a,p,e,this.state.context)),await(null==(c=(u=__privateGet(this,x).config).onSettled)?void 0:c.call(u,p,null,this.state.variables,this.state.context,this)),await(null==(h=(d=this.options).onSettled)?void 0:h.call(d,p,null,e,this.state.context)),__privateMethod(this,k,E).call(this,{type:"success",data:p}),p}catch(T){try{throw await(null==(f=(p=__privateGet(this,x).config).onError)?void 0:f.call(p,T,e,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,e,this.state.context)),await(null==(y=(g=__privateGet(this,x).config).onSettled)?void 0:y.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(b=(_=this.options).onSettled)?void 0:b.call(_,void 0,T,e,this.state.context)),T}finally{__privateMethod(this,k,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},w=new WeakMap,x=new WeakMap,S=new WeakMap,k=new WeakSet,E=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),Ho.batch((()=>{__privateGet(this,w).forEach((t=>{t.onMutationUpdate(e)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:e})}))},P);var Qo=(C=class extends mo{constructor(e={}){super(),__privateAdd(this,T),__privateAdd(this,A),this.config=e,__privateSet(this,T,new Map),__privateSet(this,A,Date.now())}build(e,t,n){const r=new Yo({mutationCache:this,mutationId:++__privateWrapper(this,A)._,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=Xo(e),n=__privateGet(this,T).get(t)??[];n.push(e),__privateGet(this,T).set(t,n),this.notify({type:"added",mutation:e})}remove(e){var t;const n=Xo(e);if(__privateGet(this,T).has(n)){const r=null==(t=__privateGet(this,T).get(n))?void 0:t.filter((t=>t!==e));r&&(0===r.length?__privateGet(this,T).delete(n):__privateGet(this,T).set(n,r))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const n=null==(t=__privateGet(this,T).get(Xo(e)))?void 0:t.find((e=>"pending"===e.state.status));return!n||n===e}runNext(e){var t;const n=null==(t=__privateGet(this,T).get(Xo(e)))?void 0:t.find((t=>t!==e&&t.state.isPaused));return(null==n?void 0:n.continue())??Promise.resolve()}clear(){Ho.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>So(t,e)))}findAll(e={}){return this.getAll().filter((t=>So(e,t)))}notify(e){Ho.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return Ho.batch((()=>Promise.all(e.map((e=>e.continue().catch(go))))))}},T=new WeakMap,A=new WeakMap,C);function Xo(e){var t;return(null==(t=e.options.scope)?void 0:t.id)??String(e.mutationId)}function Zo(e){return{onFetch:(t,n)=>{var r,i,o,s,a;const l=t.options,u=null==(o=null==(i=null==(r=t.fetchOptions)?void 0:r.meta)?void 0:i.fetchMore)?void 0:o.direction,c=(null==(s=t.state.data)?void 0:s.pages)||[],d=(null==(a=t.state.data)?void 0:a.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const f=async()=>{let n=!1;const r=Vo(t.options,t.fetchOptions),i=async(e,i,o)=>{if(n)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const s={queryKey:t.queryKey,pageParam:i,direction:o?"backward":"forward",meta:t.options.meta};var a;a=s,Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",(()=>{n=!0})),t.signal)});const l=await r(s),{maxPages:u}=t.options,c=o?Lo:Mo;return{pages:c(e.pages,l,u),pageParams:c(e.pageParams,i,u)}};if(u&&c.length){const e="backward"===u,t={pages:c,pageParams:d},n=(e?es:Jo)(l,t);h=await i(t,n,e)}else{const t=e??c.length;do{const e=0===p?d[0]??l.initialPageParam:Jo(l,h);if(p>0&&null==e)break;h=await i(h,e),p++}while(p<t)}return h};t.options.persister?t.fetchFn=()=>{var e,r;return null==(r=(e=t.options).persister)?void 0:r.call(e,f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function Jo(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function es(e,{pages:t,pageParams:n}){var r;return t.length>0?null==(r=e.getPreviousPageParam)?void 0:r.call(e,t[0],t,n[0],n):void 0}var ts=(j=class{constructor(e={}){__privateAdd(this,R),__privateAdd(this,O),__privateAdd(this,F),__privateAdd(this,M),__privateAdd(this,L),__privateAdd(this,D),__privateAdd(this,V),__privateAdd(this,I),__privateSet(this,R,e.queryCache||new Ko),__privateSet(this,O,e.mutationCache||new Qo),__privateSet(this,F,e.defaultOptions||{}),__privateSet(this,M,new Map),__privateSet(this,L,new Map),__privateSet(this,D,0)}mount(){__privateWrapper(this,D)._++,1===__privateGet(this,D)&&(__privateSet(this,V,Io.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,R).onFocus())}))),__privateSet(this,I,jo.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,R).onOnline())}))))}unmount(){var e,t;__privateWrapper(this,D)._--,0===__privateGet(this,D)&&(null==(e=__privateGet(this,V))||e.call(this),__privateSet(this,V,void 0),null==(t=__privateGet(this,I))||t.call(this),__privateSet(this,I,void 0))}isFetching(e){return __privateGet(this,R).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return __privateGet(this,O).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,R).get(n.queryHash))?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=__privateGet(this,R).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(bo(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return __privateGet(this,R).findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=__privateGet(this,R).get(r.queryHash),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,R).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ho.batch((()=>__privateGet(this,R).findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,R).get(n.queryHash))?void 0:t.state}removeQueries(e){const t=__privateGet(this,R);Ho.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=__privateGet(this,R),r={type:"active",...e};return Ho.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(r,t))))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Ho.batch((()=>__privateGet(this,R).findAll(e).map((e=>e.cancel(n)))));return Promise.all(r).then(go).catch(go)}invalidateQueries(e={},t={}){return Ho.batch((()=>{if(__privateGet(this,R).findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)}))}refetchQueries(e={},t){const n={...t,cancelRefetch:(null==t?void 0:t.cancelRefetch)??!0},r=Ho.batch((()=>__privateGet(this,R).findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(go)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(r).then(go)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=__privateGet(this,R).build(this,t);return n.isStaleByTime(bo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(go).catch(go)}fetchInfiniteQuery(e){return e.behavior=Zo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(go).catch(go)}ensureInfiniteQueryData(e){return e.behavior=Zo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jo.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,R)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,F)}setDefaultOptions(e){__privateSet(this,F,e)}setQueryDefaults(e,t){__privateGet(this,M).set(Eo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...__privateGet(this,M).values()];let n={};return t.forEach((t=>{Po(e,t.queryKey)&&(n={...n,...t.defaultOptions})})),n}setMutationDefaults(e,t){__privateGet(this,L).set(Eo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...__privateGet(this,L).values()];let n={};return t.forEach((t=>{Po(e,t.mutationKey)&&(n={...n,...t.defaultOptions})})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...__privateGet(this,F).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ko(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===Do&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...__privateGet(this,F).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){__privateGet(this,R).clear(),__privateGet(this,O).clear()}},R=new WeakMap,O=new WeakMap,F=new WeakMap,M=new WeakMap,L=new WeakMap,D=new WeakMap,V=new WeakMap,I=new WeakMap,j),ns=(ue=class extends mo{constructor(e,t){super(),__privateAdd(this,J),__privateAdd(this,B),__privateAdd(this,N),__privateAdd(this,U),__privateAdd(this,G),__privateAdd(this,W),__privateAdd(this,H),__privateAdd(this,$),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,Y),__privateAdd(this,Q),__privateAdd(this,X),__privateAdd(this,Z,new Set),this.options=t,__privateSet(this,B,e),__privateSet(this,$,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,N).addObserver(this),rs(__privateGet(this,N),this.options)?__privateMethod(this,J,ee).call(this):this.updateResult(),__privateMethod(this,J,ie).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return is(__privateGet(this,N),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return is(__privateGet(this,N),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,J,oe).call(this),__privateMethod(this,J,se).call(this),__privateGet(this,N).removeObserver(this)}setOptions(e,t){const n=this.options,r=__privateGet(this,N);if(this.options=__privateGet(this,B).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof wo(this.options.enabled,__privateGet(this,N)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,J,ae).call(this),__privateGet(this,N).setOptions(this.options),n._defaulted&&!Ao(this.options,n)&&__privateGet(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,N),observer:this});const i=this.hasListeners();i&&os(__privateGet(this,N),r,this.options,n)&&__privateMethod(this,J,ee).call(this),this.updateResult(t),!i||__privateGet(this,N)===r&&wo(this.options.enabled,__privateGet(this,N))===wo(n.enabled,__privateGet(this,N))&&bo(this.options.staleTime,__privateGet(this,N))===bo(n.staleTime,__privateGet(this,N))||__privateMethod(this,J,te).call(this);const o=__privateMethod(this,J,ne).call(this);!i||__privateGet(this,N)===r&&wo(this.options.enabled,__privateGet(this,N))===wo(n.enabled,__privateGet(this,N))&&o===__privateGet(this,X)||__privateMethod(this,J,re).call(this,o)}getOptimisticResult(e){const t=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),e),n=this.createResult(t,e);return function(e,t){if(!Ao(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(__privateSet(this,G,n),__privateSet(this,H,this.options),__privateSet(this,W,__privateGet(this,N).state)),n}getCurrentResult(){return __privateGet(this,G)}trackResult(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),null==t||t(r),e[r])})})),n}trackProp(e){__privateGet(this,Z).add(e)}getCurrentQuery(){return __privateGet(this,N)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=__privateGet(this,B).defaultQueryOptions(e),n=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){return __privateMethod(this,J,ee).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,G))))}createResult(e,t){var n;const r=__privateGet(this,N),i=this.options,o=__privateGet(this,G),s=__privateGet(this,W),a=__privateGet(this,H),l=e!==r?e.state:__privateGet(this,U),{state:u}=e;let c,d={...u},h=!1;if(t._optimisticResults){const n=this.hasListeners(),o=!n&&rs(e,t),s=n&&os(e,r,t,i);(o||s)&&(d={...d,...qo(u.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:f,status:m}=d;if(t.select&&void 0!==d.data)if(o&&d.data===(null==s?void 0:s.data)&&t.select===__privateGet(this,z))c=__privateGet(this,q);else try{__privateSet(this,z,t.select),c=t.select(d.data),c=Fo(null==o?void 0:o.data,c,t),__privateSet(this,q,c),__privateSet(this,$,null)}catch(w){__privateSet(this,$,w)}else c=d.data;if(void 0!==t.placeholderData&&void 0===c&&"pending"===m){let e;if((null==o?void 0:o.isPlaceholderData)&&t.placeholderData===(null==a?void 0:a.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(null==(n=__privateGet(this,K))?void 0:n.state.data,__privateGet(this,K)):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),__privateSet(this,$,null)}catch(w){__privateSet(this,$,w)}void 0!==e&&(m="success",c=Fo(null==o?void 0:o.data,e,t),h=!0)}__privateGet(this,$)&&(p=__privateGet(this,$),c=__privateGet(this,q),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,y="error"===m,_=g&&v,b=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&&!b,isPaused:"paused"===d.fetchStatus,isPlaceholderData:h,isRefetchError:y&&b,isStale:ss(e,t),refetch:this.refetch}}updateResult(e){const t=__privateGet(this,G),n=this.createResult(__privateGet(this,N),this.options);if(__privateSet(this,W,__privateGet(this,N).state),__privateSet(this,H,this.options),void 0!==__privateGet(this,W).data&&__privateSet(this,K,__privateGet(this,N)),Ao(n,t))return;__privateSet(this,G,n);const r={};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!__privateGet(this,Z).size)return!0;const r=new Set(n??__privateGet(this,Z));return this.options.throwOnError&&r.add("error"),Object.keys(__privateGet(this,G)).some((e=>{const n=e;return __privateGet(this,G)[n]!==t[n]&&r.has(n)}))})()&&(r.listeners=!0),__privateMethod(this,J,le).call(this,{...r,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,J,ie).call(this)}},B=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,$=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,Y=new WeakMap,Q=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakSet,ee=function(e){__privateMethod(this,J,ae).call(this);let t=__privateGet(this,N).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(go)),t},te=function(){__privateMethod(this,J,oe).call(this);const e=bo(this.options.staleTime,__privateGet(this,N));if(vo||__privateGet(this,G).isStale||!yo(e))return;const t=_o(__privateGet(this,G).dataUpdatedAt,e);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,G).isStale||this.updateResult()}),t+1))},ne=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,N)):this.options.refetchInterval)??!1},re=function(e){__privateMethod(this,J,se).call(this),__privateSet(this,X,e),!vo&&!1!==wo(this.options.enabled,__privateGet(this,N))&&yo(__privateGet(this,X))&&0!==__privateGet(this,X)&&__privateSet(this,Q,setInterval((()=>{(this.options.refetchIntervalInBackground||Io.isFocused())&&__privateMethod(this,J,ee).call(this)}),__privateGet(this,X)))},ie=function(){__privateMethod(this,J,te).call(this),__privateMethod(this,J,re).call(this,__privateMethod(this,J,ne).call(this))},oe=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},se=function(){__privateGet(this,Q)&&(clearInterval(__privateGet(this,Q)),__privateSet(this,Q,void 0))},ae=function(){const e=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),this.options);if(e===__privateGet(this,N))return;const t=__privateGet(this,N);__privateSet(this,N,e),__privateSet(this,U,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))},le=function(e){Ho.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(__privateGet(this,G))})),__privateGet(this,B).getQueryCache().notify({query:__privateGet(this,N),type:"observerResultsUpdated"})}))},ue);function rs(e,t){return function(e,t){return!1!==wo(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&is(e,t,t.refetchOnMount)}function is(e,t,n){if(!1!==wo(t.enabled,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&ss(e,t)}return!1}function os(e,t,n,r){return(e!==t||!1===wo(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&ss(e,n)}function ss(e,t){return!1!==wo(t.enabled,e)&&e.isStaleByTime(bo(t.staleTime,e))}var as=(ge=class extends mo{constructor(e,t){super(),__privateAdd(this,fe),__privateAdd(this,ce),__privateAdd(this,de),__privateAdd(this,he),__privateAdd(this,pe),__privateSet(this,ce,e),this.setOptions(t),this.bindMethods(),__privateMethod(this,fe,me).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=__privateGet(this,ce).defaultMutationOptions(e),Ao(this.options,n)||__privateGet(this,ce).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,he),observer:this}),(null==n?void 0:n.mutationKey)&&this.options.mutationKey&&Eo(n.mutationKey)!==Eo(this.options.mutationKey)?this.reset():"pending"===(null==(t=__privateGet(this,he))?void 0:t.state.status)&&__privateGet(this,he).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||null==(e=__privateGet(this,he))||e.removeObserver(this)}onMutationUpdate(e){__privateMethod(this,fe,me).call(this),__privateMethod(this,fe,ve).call(this,e)}getCurrentResult(){return __privateGet(this,de)}reset(){var e;null==(e=__privateGet(this,he))||e.removeObserver(this),__privateSet(this,he,void 0),__privateMethod(this,fe,me).call(this),__privateMethod(this,fe,ve).call(this)}mutate(e,t){var n;return __privateSet(this,pe,t),null==(n=__privateGet(this,he))||n.removeObserver(this),__privateSet(this,he,__privateGet(this,ce).getMutationCache().build(__privateGet(this,ce),this.options)),__privateGet(this,he).addObserver(this),__privateGet(this,he).execute(e)}},ce=new WeakMap,de=new WeakMap,he=new WeakMap,pe=new WeakMap,fe=new WeakSet,me=function(){var e;const t=(null==(e=__privateGet(this,he))?void 0:e.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,de,{...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset})},ve=function(e){Ho.batch((()=>{var t,n,r,i,o,s,a,l;if(__privateGet(this,pe)&&this.hasListeners()){const u=__privateGet(this,de).variables,c=__privateGet(this,de).context;"success"===(null==e?void 0:e.type)?(null==(n=(t=__privateGet(this,pe)).onSuccess)||n.call(t,e.data,u,c),null==(i=(r=__privateGet(this,pe)).onSettled)||i.call(r,e.data,null,u,c)):"error"===(null==e?void 0:e.type)&&(null==(s=(o=__privateGet(this,pe)).onError)||s.call(o,e.error,u,c),null==(l=(a=__privateGet(this,pe)).onSettled)||l.call(a,void 0,e.error,u,c))}this.listeners.forEach((e=>{e(__privateGet(this,de))}))}))},ge),ls=ot(void 0),us=e=>{const t=Bn(ls);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},cs=({client:e,children:t})=>(Mn((()=>(e.mount(),()=>{e.unmount()})),[e]),no(ls.Provider,{value:e,children:t})),ds=ot(!1),hs=()=>Bn(ds);ds.Provider;var ps=ot(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),fs=()=>Bn(ps);function ms(e,t){return"function"==typeof e?e(...t):!!e}function vs(){}var gs=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},ys=e=>{Mn((()=>{e.clearReset()}),[e])},_s=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&ms(n,[e.error,r]),bs=e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},ws=(e,t)=>(null==e?void 0:e.suspense)&&t.isPending,xs=(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()}));function Ss(e,t){return function(e,t){var n,r,i,o;const s=us(),a=hs(),l=fs(),u=s.defaultQueryOptions(e);null==(r=null==(n=s.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||r.call(n,u),u._optimisticResults=a?"isRestoring":"optimistic",bs(u),gs(u,l),ys(l);const[c]=On((()=>new t(s,u))),d=c.getOptimisticResult(u);if(Yr(jn((e=>{const t=a?()=>{}:c.subscribe(Ho.batchCalls(e));return c.updateResult(),t}),[c,a]),(()=>c.getCurrentResult())),Mn((()=>{c.setOptions(u,{listeners:!1})}),[u,c]),ws(u,d))throw xs(u,c,l);if(_s({result:d,errorResetBoundary:l,throwOnError:u.throwOnError,query:s.getQueryCache().get(u.queryHash)}))throw d.error;return null==(o=null==(i=s.getDefaultOptions().queries)?void 0:i._experimental_afterQuery)||o.call(i,u,d),u.notifyOnChangeProps?d:c.trackResult(d)}(e,ns)}var ks=/^((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)-.*))$/,Es=ln((function(e){return ks.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Ps=function(e){return"theme"!==e},Ts=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Es:Ps},As=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Cs=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Pi(t,n,r),Gi((function(){return Ti(t,n,r)})),null},Rs=function e(t,n){var r,i,o=t.__emotion_real===t,s=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var a=As(t,n,o),l=a||Ts(s),u=!l("as");return function(){var c=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,p=1;p<h;p++)d.push(c[p],c[0][p])}var f=zi((function(e,t,n){var r=u&&e.as||s,o="",c=[],h=e;if(null==e.theme){for(var p in h={},e)h[p]=e[p];h.theme=Bn(qi)}"string"==typeof e.className?o=Ei(t.registered,c,e.className):null!=e.className&&(o=e.className+" ");var f=Ni(d.concat(c),t.registered,h);o+=t.key+"-"+f.name,void 0!==i&&(o+=" "+i);var m=u&&void 0===a?Ts(r):l,v={};for(var g in e)u&&"as"===g||m(g)&&(v[g]=e[g]);return v.className=o,n&&(v.ref=n),De(je,null,De(Cs,{cache:t,serialized:f,isStringTag:"string"==typeof r}),De(r,v))}));return f.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",f.defaultProps=t.defaultProps,f.__emotion_real=f,f.__emotion_base=s,f.__emotion_styles=d,f.__emotion_forwardProp=a,Object.defineProperty(f,"toString",{value:function(){return"."+i}}),f.withComponent=function(t,r){return e(t,Jr({},n,r,{shouldForwardProp:As(f,r,!0)})).apply(void 0,d)},f}}.bind();function Os({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Rs[e]=Rs(e)}));const Fs=tr(Os);function Ms({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Ls=tr(Ms),Ds=Rs.td`
3
+ `}),io(Ji,{styles:so})]});let lo;const uo=()=>Bn(lo);class co extends Error{constructor(e,t){super(e),__publicField(this,"response"),this.response=t}}const ho=async(e,t,n,r)=>{await po(e,t,n,r,!0)},po=async(e,t,n,r,i)=>{const o=await fetch(e,{method:n,body:r?JSON.stringify(r):void 0,headers:{"content-type":"application/json","x-app-version":"1.4.56952",authorization:`Bearer ${t}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!o.ok)throw new co(`[API Error] Status: ${o.statusText}. Response: ${await o.text()}`,o);return i?{}:await o.json()},fo=()=>{const e=uo();return{getAllPromotions:In((()=>{return t=e.backend,async()=>{const e=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`);return po(e,t.accessToken,"GET")};var t}),[e.backend]),createPromotion:In((()=>{return t=e.backend,async e=>{const n=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`);return ho(n,t.accessToken,"POST",e)};var t}),[e.backend]),updatePromotion:In((()=>{return t=e.backend,e=>async n=>{const r=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion/${e}`);return ho(r,t.accessToken,"PUT",n)};var t}),[e.backend])}};var mo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vo="undefined"==typeof window||"Deno"in globalThis;function go(){}function yo(e){return"number"==typeof e&&e>=0&&e!==1/0}function _o(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bo(e,t){return"function"==typeof e?e(t):e}function wo(e,t){return"function"==typeof e?e(t):e}function xo(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s)if(r){if(t.queryHash!==ko(s,t.options))return!1}else if(!Po(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function So(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Eo(t.options.mutationKey)!==Eo(o))return!1}else if(!Po(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function ko(e,t){return((null==t?void 0:t.queryKeyHashFn)||Eo)(e)}function Eo(e){return JSON.stringify(e,((e,t)=>Ro(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function Po(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!Po(e[n],t[n]))))}function To(e,t){if(e===t)return e;const n=Co(e)&&Co(t);if(n||Ro(e)&&Ro(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let l=0;for(let u=0;u<s;u++){const i=n?u:o[u];(!n&&r.includes(i)||n)&&void 0===e[i]&&void 0===t[i]?(a[i]=void 0,l++):(a[i]=To(e[i],t[i]),a[i]===e[i]&&void 0!==e[i]&&l++)}return i===s&&l===i?e:a}return t}function Ao(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Co(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ro(e){if(!Oo(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Oo(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Oo(e){return"[object Object]"===Object.prototype.toString.call(e)}function Fo(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?To(e,t):t}function Mo(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Lo(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Do=Symbol();function Vo(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==Do?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var Io=new(r=class extends mo{constructor(){super(),__privateAdd(this,e),__privateAdd(this,t),__privateAdd(this,n),__privateSet(this,n,(e=>{if(!vo&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){__privateGet(this,t)||this.setEventListener(__privateGet(this,n))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,t))||e.call(this),__privateSet(this,t,void 0))}setEventListener(e){var r;__privateSet(this,n,e),null==(r=__privateGet(this,t))||r.call(this),__privateSet(this,t,e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})))}setFocused(t){__privateGet(this,e)!==t&&(__privateSet(this,e,t),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var t;return"boolean"==typeof __privateGet(this,e)?__privateGet(this,e):"hidden"!==(null==(t=globalThis.document)?void 0:t.visibilityState)}},e=new WeakMap,t=new WeakMap,n=new WeakMap,r),jo=new(a=class extends mo{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,s),__privateSet(this,s,(e=>{if(!vo&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}))}onSubscribe(){__privateGet(this,o)||this.setEventListener(__privateGet(this,s))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,void 0))}setEventListener(e){var t;__privateSet(this,s,e),null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,e(this.setOnline.bind(this)))}setOnline(e){__privateGet(this,i)!==e&&(__privateSet(this,i,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,s=new WeakMap,a);function Bo(e){return Math.min(1e3*2**e,3e4)}function No(e){return"online"!==(e??"online")||jo.isOnline()}var Uo=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function Go(e){return e instanceof Uo}function Wo(e){let t,n,r,i=!1,o=0,s=!1;const a=new Promise(((e,t)=>{n=e,r=t})),l=()=>Io.isFocused()&&("always"===e.networkMode||jo.isOnline())&&e.canRun(),u=()=>No(e.networkMode)&&e.canRun(),c=r=>{var i;s||(s=!0,null==(i=e.onSuccess)||i.call(e,r),null==t||t(),n(r))},d=n=>{var i;s||(s=!0,null==(i=e.onError)||i.call(e,n),null==t||t(),r(n))},h=()=>new Promise((n=>{var r;t=e=>{(s||l())&&n(e)},null==(r=e.onPause)||r.call(e)})).then((()=>{var n;t=void 0,s||null==(n=e.onContinue)||n.call(e)})),p=()=>{if(s)return;let t;const n=0===o?e.initialPromise:void 0;try{t=n??e.fn()}catch(r){t=Promise.reject(r)}Promise.resolve(t).then(c).catch((t=>{var n;if(s)return;const r=e.retry??(vo?0:3),a=e.retryDelay??Bo,u="function"==typeof a?a(o,t):a,c=!0===r||"number"==typeof r&&o<r||"function"==typeof r&&r(o,t);var f;!i&&c?(o++,null==(n=e.onFail)||n.call(e,o,t),(f=u,new Promise((e=>{setTimeout(e,f)}))).then((()=>l()?void 0:h())).then((()=>{i?d(t):p()}))):d(t)}))};return{promise:a,cancel:t=>{var n;s||(d(new Uo(t)),null==(n=e.abort)||n.call(e))},continue:()=>(null==t||t(),a),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:u,start:()=>(u()?p():h().then(p),a)}}var Ho=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0);const o=r=>{t?e.push(r):i((()=>{n(r)}))};return{batch:o=>{let s;t++;try{s=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return s},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),$o=(u=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yo(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vo?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,u),zo=(y=class extends $o{constructor(e){super(),__privateAdd(this,v),__privateAdd(this,c),__privateAdd(this,d),__privateAdd(this,h),__privateAdd(this,p),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,e.defaultOptions),this.setOptions(e.options),this.observers=[],__privateSet(this,h,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,__privateSet(this,c,function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=e.state??__privateGet(this,c),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null==(e=__privateGet(this,p))?void 0:e.promise}setOptions(e){this.options={...__privateGet(this,f),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,h).remove(this)}setData(e,t){const n=Fo(this.state.data,e,this.options);return __privateMethod(this,v,g).call(this,{data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){__privateMethod(this,v,g).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,n;const r=null==(t=__privateGet(this,p))?void 0:t.promise;return null==(n=__privateGet(this,p))||n.cancel(e),r?r.then(go).catch(go):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,c))}isActive(){return this.observers.some((e=>!1!==wo(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!_o(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,p))||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,p))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),__privateGet(this,h).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(__privateGet(this,p)&&(__privateGet(this,m)?__privateGet(this,p).cancel({revert:!0}):__privateGet(this,p).cancelRetry()),this.scheduleGc()),__privateGet(this,h).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(e,t){var n,r,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,p))return __privateGet(this,p).continueRetry(),__privateGet(this,p).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=new AbortController,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},a={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=Vo(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return s(n),__privateSet(this,m,!1),this.options.persister?this.options.persister(e,n,this):e(n)}};s(a),null==(n=this.options.behavior)||n.onFetch(a,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(r=a.fetchOptions)?void 0:r.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=a.fetchOptions)?void 0:i.meta});const l=e=>{var t,n,r,i;Go(e)&&e.silent||__privateMethod(this,v,g).call(this,{type:"error",error:e}),Go(e)||(null==(n=(t=__privateGet(this,h).config).onError)||n.call(t,e,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return __privateSet(this,p,Wo({initialPromise:null==t?void 0:t.initialPromise,fn:a.fetchFn,abort:o.abort.bind(o),onSuccess:e=>{var t,n,r,i;if(void 0!==e){try{this.setData(e)}catch(o){return void l(o)}null==(n=(t=__privateGet(this,h).config).onSuccess)||n.call(t,e,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(e,t)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),__privateGet(this,p).start()}},c=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...qo(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return Go(n)&&n.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Ho.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),__privateGet(this,h).notify({query:this,type:"updated",action:e})}))},y);function qo(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:No(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var Ko=(b=class extends mo{constructor(e={}){super(),__privateAdd(this,_),this.config=e,__privateSet(this,_,new Map)}build(e,t,n){const r=t.queryKey,i=t.queryHash??ko(r,t);let o=this.get(i);return o||(o=new zo({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){__privateGet(this,_).has(e.queryHash)||(__privateGet(this,_).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=__privateGet(this,_).get(e.queryHash);t&&(e.destroy(),t===e&&__privateGet(this,_).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ho.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return __privateGet(this,_).get(e)}getAll(){return[...__privateGet(this,_).values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>xo(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>xo(e,t))):t}notify(e){Ho.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){Ho.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){Ho.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},_=new WeakMap,b),Yo=(P=class extends $o{constructor(e){super(),__privateAdd(this,k),__privateAdd(this,w),__privateAdd(this,x),__privateAdd(this,S),this.mutationId=e.mutationId,__privateSet(this,x,e.mutationCache),__privateSet(this,w,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){__privateGet(this,w).includes(e)||(__privateGet(this,w).push(e),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){__privateSet(this,w,__privateGet(this,w).filter((t=>t!==e))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){__privateGet(this,w).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var e;return(null==(e=__privateGet(this,S))?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var t,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,b;__privateSet(this,S,Wo({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{__privateMethod(this,k,E).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,k,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,k,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const w="pending"===this.state.status,P=!__privateGet(this,S).canStart();try{if(!w){__privateMethod(this,k,E).call(this,{type:"pending",variables:e,isPaused:P}),await(null==(n=(t=__privateGet(this,x).config).onMutate)?void 0:n.call(t,e,this));const o=await(null==(i=(r=this.options).onMutate)?void 0:i.call(r,e));o!==this.state.context&&__privateMethod(this,k,E).call(this,{type:"pending",context:o,variables:e,isPaused:P})}const p=await __privateGet(this,S).start();return await(null==(s=(o=__privateGet(this,x).config).onSuccess)?void 0:s.call(o,p,e,this.state.context,this)),await(null==(l=(a=this.options).onSuccess)?void 0:l.call(a,p,e,this.state.context)),await(null==(c=(u=__privateGet(this,x).config).onSettled)?void 0:c.call(u,p,null,this.state.variables,this.state.context,this)),await(null==(h=(d=this.options).onSettled)?void 0:h.call(d,p,null,e,this.state.context)),__privateMethod(this,k,E).call(this,{type:"success",data:p}),p}catch(T){try{throw await(null==(f=(p=__privateGet(this,x).config).onError)?void 0:f.call(p,T,e,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,e,this.state.context)),await(null==(y=(g=__privateGet(this,x).config).onSettled)?void 0:y.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(b=(_=this.options).onSettled)?void 0:b.call(_,void 0,T,e,this.state.context)),T}finally{__privateMethod(this,k,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},w=new WeakMap,x=new WeakMap,S=new WeakMap,k=new WeakSet,E=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),Ho.batch((()=>{__privateGet(this,w).forEach((t=>{t.onMutationUpdate(e)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:e})}))},P);var Qo=(C=class extends mo{constructor(e={}){super(),__privateAdd(this,T),__privateAdd(this,A),this.config=e,__privateSet(this,T,new Map),__privateSet(this,A,Date.now())}build(e,t,n){const r=new Yo({mutationCache:this,mutationId:++__privateWrapper(this,A)._,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=Xo(e),n=__privateGet(this,T).get(t)??[];n.push(e),__privateGet(this,T).set(t,n),this.notify({type:"added",mutation:e})}remove(e){var t;const n=Xo(e);if(__privateGet(this,T).has(n)){const r=null==(t=__privateGet(this,T).get(n))?void 0:t.filter((t=>t!==e));r&&(0===r.length?__privateGet(this,T).delete(n):__privateGet(this,T).set(n,r))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const n=null==(t=__privateGet(this,T).get(Xo(e)))?void 0:t.find((e=>"pending"===e.state.status));return!n||n===e}runNext(e){var t;const n=null==(t=__privateGet(this,T).get(Xo(e)))?void 0:t.find((t=>t!==e&&t.state.isPaused));return(null==n?void 0:n.continue())??Promise.resolve()}clear(){Ho.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>So(t,e)))}findAll(e={}){return this.getAll().filter((t=>So(e,t)))}notify(e){Ho.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return Ho.batch((()=>Promise.all(e.map((e=>e.continue().catch(go))))))}},T=new WeakMap,A=new WeakMap,C);function Xo(e){var t;return(null==(t=e.options.scope)?void 0:t.id)??String(e.mutationId)}function Zo(e){return{onFetch:(t,n)=>{var r,i,o,s,a;const l=t.options,u=null==(o=null==(i=null==(r=t.fetchOptions)?void 0:r.meta)?void 0:i.fetchMore)?void 0:o.direction,c=(null==(s=t.state.data)?void 0:s.pages)||[],d=(null==(a=t.state.data)?void 0:a.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const f=async()=>{let n=!1;const r=Vo(t.options,t.fetchOptions),i=async(e,i,o)=>{if(n)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const s={queryKey:t.queryKey,pageParam:i,direction:o?"backward":"forward",meta:t.options.meta};var a;a=s,Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",(()=>{n=!0})),t.signal)});const l=await r(s),{maxPages:u}=t.options,c=o?Lo:Mo;return{pages:c(e.pages,l,u),pageParams:c(e.pageParams,i,u)}};if(u&&c.length){const e="backward"===u,t={pages:c,pageParams:d},n=(e?es:Jo)(l,t);h=await i(t,n,e)}else{const t=e??c.length;do{const e=0===p?d[0]??l.initialPageParam:Jo(l,h);if(p>0&&null==e)break;h=await i(h,e),p++}while(p<t)}return h};t.options.persister?t.fetchFn=()=>{var e,r;return null==(r=(e=t.options).persister)?void 0:r.call(e,f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function Jo(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function es(e,{pages:t,pageParams:n}){var r;return t.length>0?null==(r=e.getPreviousPageParam)?void 0:r.call(e,t[0],t,n[0],n):void 0}var ts=(j=class{constructor(e={}){__privateAdd(this,R),__privateAdd(this,O),__privateAdd(this,F),__privateAdd(this,M),__privateAdd(this,L),__privateAdd(this,D),__privateAdd(this,V),__privateAdd(this,I),__privateSet(this,R,e.queryCache||new Ko),__privateSet(this,O,e.mutationCache||new Qo),__privateSet(this,F,e.defaultOptions||{}),__privateSet(this,M,new Map),__privateSet(this,L,new Map),__privateSet(this,D,0)}mount(){__privateWrapper(this,D)._++,1===__privateGet(this,D)&&(__privateSet(this,V,Io.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,R).onFocus())}))),__privateSet(this,I,jo.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,R).onOnline())}))))}unmount(){var e,t;__privateWrapper(this,D)._--,0===__privateGet(this,D)&&(null==(e=__privateGet(this,V))||e.call(this),__privateSet(this,V,void 0),null==(t=__privateGet(this,I))||t.call(this),__privateSet(this,I,void 0))}isFetching(e){return __privateGet(this,R).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return __privateGet(this,O).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,R).get(n.queryHash))?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=__privateGet(this,R).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(bo(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return __privateGet(this,R).findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=__privateGet(this,R).get(r.queryHash),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,R).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ho.batch((()=>__privateGet(this,R).findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,R).get(n.queryHash))?void 0:t.state}removeQueries(e){const t=__privateGet(this,R);Ho.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=__privateGet(this,R),r={type:"active",...e};return Ho.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(r,t))))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Ho.batch((()=>__privateGet(this,R).findAll(e).map((e=>e.cancel(n)))));return Promise.all(r).then(go).catch(go)}invalidateQueries(e={},t={}){return Ho.batch((()=>{if(__privateGet(this,R).findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)}))}refetchQueries(e={},t){const n={...t,cancelRefetch:(null==t?void 0:t.cancelRefetch)??!0},r=Ho.batch((()=>__privateGet(this,R).findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(go)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(r).then(go)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=__privateGet(this,R).build(this,t);return n.isStaleByTime(bo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(go).catch(go)}fetchInfiniteQuery(e){return e.behavior=Zo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(go).catch(go)}ensureInfiniteQueryData(e){return e.behavior=Zo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jo.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,R)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,F)}setDefaultOptions(e){__privateSet(this,F,e)}setQueryDefaults(e,t){__privateGet(this,M).set(Eo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...__privateGet(this,M).values()];let n={};return t.forEach((t=>{Po(e,t.queryKey)&&(n={...n,...t.defaultOptions})})),n}setMutationDefaults(e,t){__privateGet(this,L).set(Eo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...__privateGet(this,L).values()];let n={};return t.forEach((t=>{Po(e,t.mutationKey)&&(n={...n,...t.defaultOptions})})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...__privateGet(this,F).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ko(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===Do&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...__privateGet(this,F).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){__privateGet(this,R).clear(),__privateGet(this,O).clear()}},R=new WeakMap,O=new WeakMap,F=new WeakMap,M=new WeakMap,L=new WeakMap,D=new WeakMap,V=new WeakMap,I=new WeakMap,j),ns=(ue=class extends mo{constructor(e,t){super(),__privateAdd(this,J),__privateAdd(this,B),__privateAdd(this,N),__privateAdd(this,U),__privateAdd(this,G),__privateAdd(this,W),__privateAdd(this,H),__privateAdd(this,$),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,Y),__privateAdd(this,Q),__privateAdd(this,X),__privateAdd(this,Z,new Set),this.options=t,__privateSet(this,B,e),__privateSet(this,$,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,N).addObserver(this),rs(__privateGet(this,N),this.options)?__privateMethod(this,J,ee).call(this):this.updateResult(),__privateMethod(this,J,ie).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return is(__privateGet(this,N),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return is(__privateGet(this,N),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,J,oe).call(this),__privateMethod(this,J,se).call(this),__privateGet(this,N).removeObserver(this)}setOptions(e,t){const n=this.options,r=__privateGet(this,N);if(this.options=__privateGet(this,B).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof wo(this.options.enabled,__privateGet(this,N)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,J,ae).call(this),__privateGet(this,N).setOptions(this.options),n._defaulted&&!Ao(this.options,n)&&__privateGet(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,N),observer:this});const i=this.hasListeners();i&&os(__privateGet(this,N),r,this.options,n)&&__privateMethod(this,J,ee).call(this),this.updateResult(t),!i||__privateGet(this,N)===r&&wo(this.options.enabled,__privateGet(this,N))===wo(n.enabled,__privateGet(this,N))&&bo(this.options.staleTime,__privateGet(this,N))===bo(n.staleTime,__privateGet(this,N))||__privateMethod(this,J,te).call(this);const o=__privateMethod(this,J,ne).call(this);!i||__privateGet(this,N)===r&&wo(this.options.enabled,__privateGet(this,N))===wo(n.enabled,__privateGet(this,N))&&o===__privateGet(this,X)||__privateMethod(this,J,re).call(this,o)}getOptimisticResult(e){const t=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),e),n=this.createResult(t,e);return function(e,t){if(!Ao(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(__privateSet(this,G,n),__privateSet(this,H,this.options),__privateSet(this,W,__privateGet(this,N).state)),n}getCurrentResult(){return __privateGet(this,G)}trackResult(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),null==t||t(r),e[r])})})),n}trackProp(e){__privateGet(this,Z).add(e)}getCurrentQuery(){return __privateGet(this,N)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=__privateGet(this,B).defaultQueryOptions(e),n=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){return __privateMethod(this,J,ee).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,G))))}createResult(e,t){var n;const r=__privateGet(this,N),i=this.options,o=__privateGet(this,G),s=__privateGet(this,W),a=__privateGet(this,H),l=e!==r?e.state:__privateGet(this,U),{state:u}=e;let c,d={...u},h=!1;if(t._optimisticResults){const n=this.hasListeners(),o=!n&&rs(e,t),s=n&&os(e,r,t,i);(o||s)&&(d={...d,...qo(u.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:f,status:m}=d;if(t.select&&void 0!==d.data)if(o&&d.data===(null==s?void 0:s.data)&&t.select===__privateGet(this,z))c=__privateGet(this,q);else try{__privateSet(this,z,t.select),c=t.select(d.data),c=Fo(null==o?void 0:o.data,c,t),__privateSet(this,q,c),__privateSet(this,$,null)}catch(w){__privateSet(this,$,w)}else c=d.data;if(void 0!==t.placeholderData&&void 0===c&&"pending"===m){let e;if((null==o?void 0:o.isPlaceholderData)&&t.placeholderData===(null==a?void 0:a.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(null==(n=__privateGet(this,K))?void 0:n.state.data,__privateGet(this,K)):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),__privateSet(this,$,null)}catch(w){__privateSet(this,$,w)}void 0!==e&&(m="success",c=Fo(null==o?void 0:o.data,e,t),h=!0)}__privateGet(this,$)&&(p=__privateGet(this,$),c=__privateGet(this,q),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,y="error"===m,_=g&&v,b=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&&!b,isPaused:"paused"===d.fetchStatus,isPlaceholderData:h,isRefetchError:y&&b,isStale:ss(e,t),refetch:this.refetch}}updateResult(e){const t=__privateGet(this,G),n=this.createResult(__privateGet(this,N),this.options);if(__privateSet(this,W,__privateGet(this,N).state),__privateSet(this,H,this.options),void 0!==__privateGet(this,W).data&&__privateSet(this,K,__privateGet(this,N)),Ao(n,t))return;__privateSet(this,G,n);const r={};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!__privateGet(this,Z).size)return!0;const r=new Set(n??__privateGet(this,Z));return this.options.throwOnError&&r.add("error"),Object.keys(__privateGet(this,G)).some((e=>{const n=e;return __privateGet(this,G)[n]!==t[n]&&r.has(n)}))})()&&(r.listeners=!0),__privateMethod(this,J,le).call(this,{...r,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,J,ie).call(this)}},B=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,$=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,Y=new WeakMap,Q=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakSet,ee=function(e){__privateMethod(this,J,ae).call(this);let t=__privateGet(this,N).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(go)),t},te=function(){__privateMethod(this,J,oe).call(this);const e=bo(this.options.staleTime,__privateGet(this,N));if(vo||__privateGet(this,G).isStale||!yo(e))return;const t=_o(__privateGet(this,G).dataUpdatedAt,e);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,G).isStale||this.updateResult()}),t+1))},ne=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,N)):this.options.refetchInterval)??!1},re=function(e){__privateMethod(this,J,se).call(this),__privateSet(this,X,e),!vo&&!1!==wo(this.options.enabled,__privateGet(this,N))&&yo(__privateGet(this,X))&&0!==__privateGet(this,X)&&__privateSet(this,Q,setInterval((()=>{(this.options.refetchIntervalInBackground||Io.isFocused())&&__privateMethod(this,J,ee).call(this)}),__privateGet(this,X)))},ie=function(){__privateMethod(this,J,te).call(this),__privateMethod(this,J,re).call(this,__privateMethod(this,J,ne).call(this))},oe=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},se=function(){__privateGet(this,Q)&&(clearInterval(__privateGet(this,Q)),__privateSet(this,Q,void 0))},ae=function(){const e=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),this.options);if(e===__privateGet(this,N))return;const t=__privateGet(this,N);__privateSet(this,N,e),__privateSet(this,U,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))},le=function(e){Ho.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(__privateGet(this,G))})),__privateGet(this,B).getQueryCache().notify({query:__privateGet(this,N),type:"observerResultsUpdated"})}))},ue);function rs(e,t){return function(e,t){return!1!==wo(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&is(e,t,t.refetchOnMount)}function is(e,t,n){if(!1!==wo(t.enabled,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&ss(e,t)}return!1}function os(e,t,n,r){return(e!==t||!1===wo(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&ss(e,n)}function ss(e,t){return!1!==wo(t.enabled,e)&&e.isStaleByTime(bo(t.staleTime,e))}var as=(ge=class extends mo{constructor(e,t){super(),__privateAdd(this,fe),__privateAdd(this,ce),__privateAdd(this,de),__privateAdd(this,he),__privateAdd(this,pe),__privateSet(this,ce,e),this.setOptions(t),this.bindMethods(),__privateMethod(this,fe,me).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=__privateGet(this,ce).defaultMutationOptions(e),Ao(this.options,n)||__privateGet(this,ce).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,he),observer:this}),(null==n?void 0:n.mutationKey)&&this.options.mutationKey&&Eo(n.mutationKey)!==Eo(this.options.mutationKey)?this.reset():"pending"===(null==(t=__privateGet(this,he))?void 0:t.state.status)&&__privateGet(this,he).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||null==(e=__privateGet(this,he))||e.removeObserver(this)}onMutationUpdate(e){__privateMethod(this,fe,me).call(this),__privateMethod(this,fe,ve).call(this,e)}getCurrentResult(){return __privateGet(this,de)}reset(){var e;null==(e=__privateGet(this,he))||e.removeObserver(this),__privateSet(this,he,void 0),__privateMethod(this,fe,me).call(this),__privateMethod(this,fe,ve).call(this)}mutate(e,t){var n;return __privateSet(this,pe,t),null==(n=__privateGet(this,he))||n.removeObserver(this),__privateSet(this,he,__privateGet(this,ce).getMutationCache().build(__privateGet(this,ce),this.options)),__privateGet(this,he).addObserver(this),__privateGet(this,he).execute(e)}},ce=new WeakMap,de=new WeakMap,he=new WeakMap,pe=new WeakMap,fe=new WeakSet,me=function(){var e;const t=(null==(e=__privateGet(this,he))?void 0:e.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,de,{...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset})},ve=function(e){Ho.batch((()=>{var t,n,r,i,o,s,a,l;if(__privateGet(this,pe)&&this.hasListeners()){const u=__privateGet(this,de).variables,c=__privateGet(this,de).context;"success"===(null==e?void 0:e.type)?(null==(n=(t=__privateGet(this,pe)).onSuccess)||n.call(t,e.data,u,c),null==(i=(r=__privateGet(this,pe)).onSettled)||i.call(r,e.data,null,u,c)):"error"===(null==e?void 0:e.type)&&(null==(s=(o=__privateGet(this,pe)).onError)||s.call(o,e.error,u,c),null==(l=(a=__privateGet(this,pe)).onSettled)||l.call(a,void 0,e.error,u,c))}this.listeners.forEach((e=>{e(__privateGet(this,de))}))}))},ge),ls=ot(void 0),us=e=>{const t=Bn(ls);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},cs=({client:e,children:t})=>(Mn((()=>(e.mount(),()=>{e.unmount()})),[e]),no(ls.Provider,{value:e,children:t})),ds=ot(!1),hs=()=>Bn(ds);ds.Provider;var ps=ot(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),fs=()=>Bn(ps);function ms(e,t){return"function"==typeof e?e(...t):!!e}function vs(){}var gs=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},ys=e=>{Mn((()=>{e.clearReset()}),[e])},_s=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&ms(n,[e.error,r]),bs=e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},ws=(e,t)=>(null==e?void 0:e.suspense)&&t.isPending,xs=(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()}));function Ss(e,t){return function(e,t){var n,r,i,o;const s=us(),a=hs(),l=fs(),u=s.defaultQueryOptions(e);null==(r=null==(n=s.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||r.call(n,u),u._optimisticResults=a?"isRestoring":"optimistic",bs(u),gs(u,l),ys(l);const[c]=On((()=>new t(s,u))),d=c.getOptimisticResult(u);if(Yr(jn((e=>{const t=a?()=>{}:c.subscribe(Ho.batchCalls(e));return c.updateResult(),t}),[c,a]),(()=>c.getCurrentResult())),Mn((()=>{c.setOptions(u,{listeners:!1})}),[u,c]),ws(u,d))throw xs(u,c,l);if(_s({result:d,errorResetBoundary:l,throwOnError:u.throwOnError,query:s.getQueryCache().get(u.queryHash)}))throw d.error;return null==(o=null==(i=s.getDefaultOptions().queries)?void 0:i._experimental_afterQuery)||o.call(i,u,d),u.notifyOnChangeProps?d:c.trackResult(d)}(e,ns)}var ks=/^((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)-.*))$/,Es=ln((function(e){return ks.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Ps=function(e){return"theme"!==e},Ts=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Es:Ps},As=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Cs=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Pi(t,n,r),Gi((function(){return Ti(t,n,r)})),null},Rs=function e(t,n){var r,i,o=t.__emotion_real===t,s=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var a=As(t,n,o),l=a||Ts(s),u=!l("as");return function(){var c=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,p=1;p<h;p++)d.push(c[p],c[0][p])}var f=zi((function(e,t,n){var r=u&&e.as||s,o="",c=[],h=e;if(null==e.theme){for(var p in h={},e)h[p]=e[p];h.theme=Bn(qi)}"string"==typeof e.className?o=Ei(t.registered,c,e.className):null!=e.className&&(o=e.className+" ");var f=Ni(d.concat(c),t.registered,h);o+=t.key+"-"+f.name,void 0!==i&&(o+=" "+i);var m=u&&void 0===a?Ts(r):l,v={};for(var g in e)u&&"as"===g||m(g)&&(v[g]=e[g]);return v.className=o,n&&(v.ref=n),De(je,null,De(Cs,{cache:t,serialized:f,isStringTag:"string"==typeof r}),De(r,v))}));return f.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",f.defaultProps=t.defaultProps,f.__emotion_real=f,f.__emotion_base=s,f.__emotion_styles=d,f.__emotion_forwardProp=a,Object.defineProperty(f,"toString",{value:function(){return"."+i}}),f.withComponent=function(t,r){return e(t,Jr({},n,r,{shouldForwardProp:As(f,r,!0)})).apply(void 0,d)},f}}.bind();function Os({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Rs[e]=Rs(e)}));const Fs=tr(Os);function Ms({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Ls=tr(Ms),Ds=Rs.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=Rs.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))"}}
@@ -12,7 +12,7 @@ var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNor
12
12
  ${({hasError:e})=>e?{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(252 165 165 / var(--tw-ring-opacity))",":focus":{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity))"}}:{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(209 213 219 / var(--tw-ring-opacity))",":focus":{"--tw-ring-color":"var(--fl-color-primary-600)"}}}
13
13
  `;function Hs({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const $s=tr(Hs);function zs({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const qs=tr(zs),Ks=tr((({label:e,id:t,type:n,icon:r,placeholder:i,setPlaceholderOnFocus:o,value:s,className:a,onChange:l,onBlur:u,error:c,helperText:d,disabled:h,remove:p},f)=>oo("div",{className:a,children:[e&&io("label",{htmlFor:t,css:{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[r&&io("span",{css:{position:"absolute",marginLeft:"0.5rem",marginTop:"0.5rem"},children:r}),oo("div",{css:{marginTop:"0.5rem",display:"flex",alignItems:"center"},children:[io(Ws,{type:n,value:s,name:t,id:t,placeholder:i,onChange:e=>{const t=e;t.target instanceof HTMLInputElement&&l(t.target.value.trim())},onBlur:e=>{const t=e;t.target instanceof HTMLInputElement&&u&&u(t.target.value.trim())},onFocus:()=>{i&&o&&!(null==s?void 0:s.trim())&&l(i)},hasError:!!c,ref:f,disabled:h,prefix:!!r}),p&&oo("button",{type:"button",children:[io(qs,{css:{marginLeft:"0.5rem",height:"1.25rem",width:"1.25rem"},onClick:()=>p()})," "]})]})]}),c&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:c}),d&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:d})]})));function Ys({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const Qs=tr(Ys);function Xs({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M10 17a.75.75 0 0 1-.75-.75V5.612L5.29 9.77a.75.75 0 0 1-1.08-1.04l5.25-5.5a.75.75 0 0 1 1.08 0l5.25 5.5a.75.75 0 1 1-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0 1 10 17Z",clipRule:"evenodd"}))}const Zs=tr(Xs);function Js({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const ea=tr(Js);function ta({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const na=tr(ta);function ra({title:e,titleId:t,...n},r){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?De("title",{id:t},e):null,De("path",{d:"m5.433 13.917 1.262-3.155A4 4 0 0 1 7.58 9.42l6.92-6.918a2.121 2.121 0 0 1 3 3l-6.92 6.918c-.383.383-.84.685-1.343.886l-3.154 1.262a.5.5 0 0 1-.65-.65Z"}),De("path",{d:"M3.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0 0 10 3H4.75A2.75 2.75 0 0 0 2 5.75v9.5A2.75 2.75 0 0 0 4.75 18h9.5A2.75 2.75 0 0 0 17 15.25V10a.75.75 0 0 0-1.5 0v5.25c0 .69-.56 1.25-1.25 1.25h-9.5c-.69 0-1.25-.56-1.25-1.25v-9.5Z"}))}const ia=tr(ra),oa=Rs.button({marginRight:"1rem",display:"inline-flex",alignItems:"center",borderRadius:"0.375rem",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},(e=>e.className),(({isActive:e})=>e&&{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))"})),sa=e=>{const[t,n]=On(),[r,i]=On([]),[o,s]=On(e.columns[0]),[a,l]=On("asc"),u=In((()=>o?[...e.data].sort(((e,t)=>{const n=o.sort?o.sort(e[o.field],t[o.field]):e[o.field].localeCompare(t[o.field]);return"desc"===a?-1*n:n})):e.data),[e.data,o,a]),c=In((()=>{const e=r.reduce(((e,t)=>e.filter(t.filterFunction)),u);return t?e.filter((e=>e.id.toLowerCase().includes(t.toLowerCase()))):e}),[u,t,r]),d=In((()=>e.columns.filter((e=>e.filters&&e.filters.length>0)).length>0),[e.columns]),h=(e,t)=>{const n={name:e.name,filterFunction:n=>e.predicate(n[t.field])},o=r.filter((e=>e.name!==n.name));return()=>o.length<r.length?i([...o]):i([...o,n])};return io(ro,{children:oo("div",{css:{paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[oo("div",{css:{"@media (min-width: 640px)":{display:"flex",alignItems:"center"}},children:[oo("div",{css:{"@media (min-width: 640px)":{flex:"1 1 auto"}},children:[io("h1",{css:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.title}),e.subtitle&&io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"},children:e.subtitle}),io(Ks,{css:{marginTop:"0.5rem",maxWidth:"20rem"},label:"",icon:io(Ls,{css:{height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))"}}),placeholder:"Search...",id:"search",type:"text",onChange:e=>n(e)})]}),e.addButton&&io("div",{css:{marginTop:"1rem","@media (min-width: 640px)":{marginLeft:"4rem",marginTop:"0px",flex:"none"}},children:io("button",{type:"button",onClick:e.addButton.onClick,css:{display:"block",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:e.addButton.text})})]}),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:[d&&io("thead",{children:io("tr",{children:oo("td",{css:{padding:"1rem"},colspan:e.columns.length,children:[io(oa,{onClick:()=>i([]),isActive:0==r.length,children:"All"}),e.columns.map((e=>{var t;return null==(t=e.filters)?void 0:t.map((t=>io(oa,{onClick:h(t,e),isActive:!!r.find((e=>e.name===t.name)),children:t.name},t.name)))}))]})})}),io("thead",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},children:io("tr",{children:e.columns.map((e=>io("th",{scope:"col",css:{paddingTop:"0.875rem",paddingBottom:"0.875rem",paddingLeft:"1rem",paddingRight:"0.75rem",textAlign:"left",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:oo("button",{disabled:!e.isSortable,onClick:()=>(e=>{o===e?l("asc"===a?"desc":"asc"):(s(e),l("asc"))})(e),css:{display:"inline-flex"},children:[io("span",{children:e.name}),oo("span",{css:{marginLeft:"0.5rem"},children:[o===e&&"asc"===a&&io(Qs,{css:{height:"1.25rem",width:"1.25rem"}}),o===e&&"desc"===a&&io(Zs,{css:{height:"1.25rem",width:"1.25rem"}}),o!==e&&io("svg",{css:{height:"1.25rem",width:"1.25rem"}})]})]})},e.field)))})}),io("tbody",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-divide-opacity))"},"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))"},children:c.map(((t,n)=>io("tr",{children:e.columns.map(((e,r)=>io(je,{children:Gs(t.id,t[e.field],e.type)},`${t[e.field]}-${n}-${r}`)))},`${t[e.columns[0].field]}-${n}`)))})]})})})})})]})})};
14
14
  /**
15
- * @remix-run/router v1.19.2
15
+ * @remix-run/router v1.23.2
16
16
  *
17
17
  * Copyright (c) Remix Software Inc.
18
18
  *
@@ -21,9 +21,9 @@ var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNor
21
21
  *
22
22
  * @license MIT
23
23
  */
24
- function aa(){return aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aa.apply(this,arguments)}var la,ua;(ua=la||(la={})).Pop="POP",ua.Push="PUSH",ua.Replace="REPLACE";const ca="popstate";function da(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=la.Pop,l=null,u=c();null==u&&(u=0,s.replaceState(aa({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=la.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:a,location:m.location,delta:t})}function h(e,t){a=la.Push;let r=ma(m.location,e,t);n&&n(r,e),u=c()+1;let d=fa(r,u),h=m.createHref(r);try{s.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(h)}o&&l&&l({action:a,location:m.location,delta:1})}function p(e,t){a=la.Replace;let r=ma(m.location,e,t);n&&n(r,e),u=c();let i=fa(r,u),d=m.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:m.location,delta:0})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:va(e);return n=n.replace(/ $/,"%20"),ha(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(ca,d),l=e,()=>{i.removeEventListener(ca,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:p,go:e=>s.go(e)};return m}((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=ga(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),ma("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:va(t))}),(function(e,t){pa("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function ha(e,t){if(!1===e||null==e)throw new Error(t)}function pa(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(Gy){}}}function fa(e,t){return{usr:e.state,key:e.key,idx:t}}function ma(e,t,n,r){return void 0===n&&(n=null),aa({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?ga(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function va(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function ga(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var ya,_a;function ba(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let i="string"==typeof t?ga(t):t,o=La(i.pathname||"/",n);if(null==o)return null;let s=wa(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(s);let a=null;for(let l=0;null==a&&l<s.length;++l){let e=Ma(o);a=Oa(s[l],e,r)}return a}(e,t,n,!1)}function wa(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(ha(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=Ia([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(ha(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),wa(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:Ra(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of xa(e.path))i(e,t,r);else i(e,t)})),t}function xa(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=xa(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}(_a=ya||(ya={})).data="data",_a.deferred="deferred",_a.redirect="redirect",_a.error="error";const Sa=/^:[\w-]+$/,ka=3,Ea=2,Pa=1,Ta=10,Aa=-2,Ca=e=>"*"===e;function Ra(e,t){let n=e.split("/"),r=n.length;return n.some(Ca)&&(r+=Aa),t&&(r+=Ea),n.filter((e=>!Ca(e))).reduce(((e,t)=>e+(Sa.test(t)?ka:""===t?Pa:Ta)),r)}function Oa(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let e=r[a],l=a===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=Fa({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=Fa({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:Ia([o,c.pathname]),pathnameBase:ja(Ia([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=Ia([o,c.pathnameBase]))}return s}function Fa(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);pa("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function Ma(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return pa(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function La(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Da(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Va(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=ga(e):(i=aa({},e),ha(!i.pathname||!i.pathname.includes("?"),Da("?","pathname","search",i)),ha(!i.pathname||!i.pathname.includes("#"),Da("#","pathname","hash",i)),ha(!i.search||!i.search.includes("#"),Da("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?ga(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:Ba(r),hash:Na(i)}}(i,o),u=a&&"/"!==a&&a.endsWith("/"),c=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const Ia=e=>e.join("/").replace(/\/\/+/g,"/"),ja=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ba=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Na=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";const Ua=["post","put","patch","delete"];new Set(Ua);const Ga=["get",...Ua];
24
+ function aa(){return aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aa.apply(this,arguments)}var la,ua;(ua=la||(la={})).Pop="POP",ua.Push="PUSH",ua.Replace="REPLACE";const ca="popstate";function da(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=la.Pop,l=null,u=c();null==u&&(u=0,s.replaceState(aa({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=la.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:a,location:m.location,delta:t})}function h(e,t){a=la.Push;let r=ma(m.location,e,t);n&&n(r,e),u=c()+1;let d=fa(r,u),h=m.createHref(r);try{s.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(h)}o&&l&&l({action:a,location:m.location,delta:1})}function p(e,t){a=la.Replace;let r=ma(m.location,e,t);n&&n(r,e),u=c();let i=fa(r,u),d=m.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:m.location,delta:0})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:va(e);return n=n.replace(/ $/,"%20"),ha(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(ca,d),l=e,()=>{i.removeEventListener(ca,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:p,go:e=>s.go(e)};return m}((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=ga(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),ma("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:va(t))}),(function(e,t){pa("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function ha(e,t){if(!1===e||null==e)throw new Error(t)}function pa(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch($y){}}}function fa(e,t){return{usr:e.state,key:e.key,idx:t}}function ma(e,t,n,r){return void 0===n&&(n=null),aa({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?ga(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function va(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function ga(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var ya,_a;function ba(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let i="string"==typeof t?ga(t):t,o=La(i.pathname||"/",n);if(null==o)return null;let s=wa(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(s);let a=null;for(let l=0;null==a&&l<s.length;++l){let e=Ma(o);a=Oa(s[l],e,r)}return a}(e,t,n,!1)}function wa(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(ha(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=Na([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(ha(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),wa(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:Ra(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of xa(e.path))i(e,t,r);else i(e,t)})),t}function xa(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=xa(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}(_a=ya||(ya={})).data="data",_a.deferred="deferred",_a.redirect="redirect",_a.error="error";const Sa=/^:[\w-]+$/,ka=3,Ea=2,Pa=1,Ta=10,Aa=-2,Ca=e=>"*"===e;function Ra(e,t){let n=e.split("/"),r=n.length;return n.some(Ca)&&(r+=Aa),t&&(r+=Ea),n.filter((e=>!Ca(e))).reduce(((e,t)=>e+(Sa.test(t)?ka:""===t?Pa:Ta)),r)}function Oa(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let e=r[a],l=a===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=Fa({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=Fa({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:Na([o,c.pathname]),pathnameBase:Ua(Na([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=Na([o,c.pathnameBase]))}return s}function Fa(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);pa("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function Ma(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return pa(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function La(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}const Da=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Va=e=>Da.test(e);function Ia(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function ja(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Ba(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=ga(e):(i=aa({},e),ha(!i.pathname||!i.pathname.includes("?"),ja("?","pathname","search",i)),ha(!i.pathname||!i.pathname.includes("#"),ja("#","pathname","hash",i)),ha(!i.search||!i.search.includes("#"),ja("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let n,{pathname:r,search:i="",hash:o=""}="string"==typeof e?ga(e):e;if(r)if(Va(r))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),pa(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+r)}n=r.startsWith("/")?Ia(r.substring(1),"/"):Ia(r,t)}else n=t;return{pathname:n,search:Ga(i),hash:Wa(o)}}(i,o),u=a&&"/"!==a&&a.endsWith("/"),c=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const Na=e=>e.join("/").replace(/\/\/+/g,"/"),Ua=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ga=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Wa=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";const Ha=["post","put","patch","delete"];new Set(Ha);const $a=["get",...Ha];
25
25
  /**
26
- * React Router v6.26.2
26
+ * React Router v6.30.3
27
27
  *
28
28
  * Copyright (c) Remix Software Inc.
29
29
  *
@@ -32,9 +32,9 @@ function aa(){return aa=Object.assign?Object.assign.bind():function(e){for(var t
32
32
  *
33
33
  * @license MIT
34
34
  */
35
- function Wa(){return Wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wa.apply(this,arguments)}new Set(Ga);const Ha=ot(null),$a=ot(null),za=ot(null),qa=ot(null),Ka=ot({outlet:null,matches:[],isDataRoute:!1}),Ya=ot(null);function Qa(){return null!=Bn(qa)}function Xa(){return Qa()||ha(!1),Bn(qa).location}function Za(e){Bn(za).static||Ln(e)}function Ja(){let{isDataRoute:e}=Bn(Ka);return e?function(){let{router:e}=function(){let e=Bn(Ha);return e||ha(!1),e}(ol.UseNavigateStable),t=al(sl.UseNavigateStable),n=Dn(!1);return Za((()=>{n.current=!0})),jn((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Wa({fromRouteId:t},i)))}),[e,t])}():function(){Qa()||ha(!1);let e=Bn(Ha),{basename:t,future:n,navigator:r}=Bn(za),{matches:i}=Bn(Ka),{pathname:o}=Xa(),s=JSON.stringify(function(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}(i,n.v7_relativeSplatPath)),a=Dn(!1);return Za((()=>{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=Va(n,JSON.parse(s),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Ia([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}),[t,r,s,o,e])}()}function el(e,t){return function(e,t,n,r){Qa()||ha(!1);let{navigator:i}=Bn(za),{matches:o}=Bn(Ka),s=o[o.length-1],a=s?s.params:{};!s||s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u,c=Xa();if(t){var d;let e="string"==typeof t?ga(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||ha(!1),u=e}else u=c;let h=u.pathname||"/",p=h;if("/"!==l){let e=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=ba(e,{pathname:p}),m=function(e,t,n,r){var i;void 0===t&&(t=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let s=e,a=null==(i=n)?void 0:i.errors;if(null!=a){let e=s.findIndex((e=>e.route.id&&void 0!==(null==a?void 0:a[e.route.id])));e>=0||ha(!1),s=s.slice(0,Math.min(s.length,e+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<s.length;c++){let e=s[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=c),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){l=!0,s=u>=0?s.slice(0,u+1):[s[0]];break}}}return s.reduceRight(((e,r,i)=>{let o,c=!1,d=null,h=null;n&&(o=a&&r.route.id?a[r.route.id]:void 0,d=r.route.errorElement||nl,l&&(u<0&&0===i?(c=!0,h=null):u===i&&(c=!0,h=r.route.hydrateFallbackElement||null)));let p=t.concat(s.slice(0,i+1)),f=()=>{let t;return t=o?d:c?h:r.route.Component?De(r.route.Component,null):r.route.element?r.route.element:e,De(il,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?De(rl,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):f()}),null)}(f&&f.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:Ia([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Ia([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n,r);if(t&&m)return De(qa.Provider,{value:{location:Wa({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:la.Pop}},m);return m}(e,t)}function tl(){let e=function(){var e;let t=Bn(Ya),n=function(){let e=Bn($a);return e||ha(!1),e}(sl.UseRouteError),r=al(sl.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return De(je,null,De("h2",null,"Unexpected Application Error!"),De("h3",{style:{fontStyle:"italic"}},t),n?De("pre",{style:r},n):null,null)}const nl=De(tl,null);class rl extends Be{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?De(Ka.Provider,{value:this.props.routeContext},De(Ya.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function il(e){let{routeContext:t,match:n,children:r}=e,i=Bn(Ha);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),De(Ka.Provider,{value:t},r)}var ol=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ol||{}),sl=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(sl||{});function al(e){let t=function(){let e=Bn(Ka);return e||ha(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||ha(!1),n.route.id}function ll(e){ha(!1)}function ul(e){let{basename:t="/",children:n=null,location:r,navigationType:i=la.Pop,navigator:o,static:s=!1,future:a}=e;Qa()&&ha(!1);let l=t.replace(/^\/*/,"/"),u=In((()=>({basename:l,navigator:o,static:s,future:Wa({v7_relativeSplatPath:!1},a)})),[l,a,o,s]);"string"==typeof r&&(r=ga(r));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,m=In((()=>{let e=La(c,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:i}}),[l,c,d,h,p,f,i]);return null==m?null:De(za.Provider,{value:u},De(qa.Provider,{children:n,value:m}))}function cl(e){let{children:t,location:n}=e;return el(dl(t),n)}function dl(e,t){void 0===t&&(t=[]);let n=[];return rr.forEach(e,((e,r)=>{if(!Dr(e))return;let i=[...t,r];if(e.type===je)return void n.push.apply(n,dl(e.props.children,i));e.type!==ll&&ha(!1),e.props.index&&e.props.children&&ha(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=dl(e.props.children,i)),n.push(o)})),n}
35
+ function za(){return za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},za.apply(this,arguments)}new Set($a);const qa=ot(null),Ka=ot(null),Ya=ot(null),Qa=ot(null),Xa=ot({outlet:null,matches:[],isDataRoute:!1}),Za=ot(null);function Ja(){return null!=Bn(Qa)}function el(){return Ja()||ha(!1),Bn(Qa).location}function tl(e){Bn(Ya).static||Ln(e)}function nl(){let{isDataRoute:e}=Bn(Xa);return e?function(){let{router:e}=function(){let e=Bn(qa);return e||ha(!1),e}(ll.UseNavigateStable),t=cl(ul.UseNavigateStable),n=Dn(!1);return tl((()=>{n.current=!0})),jn((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,za({fromRouteId:t},i)))}),[e,t])}():function(){Ja()||ha(!1);let e=Bn(qa),{basename:t,future:n,navigator:r}=Bn(Ya),{matches:i}=Bn(Xa),{pathname:o}=el(),s=JSON.stringify(function(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}(i,n.v7_relativeSplatPath)),a=Dn(!1);return tl((()=>{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=Ba(n,JSON.parse(s),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Na([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}),[t,r,s,o,e])}()}function rl(e,t){return function(e,t,n,r){Ja()||ha(!1);let{navigator:i}=Bn(Ya),{matches:o}=Bn(Xa),s=o[o.length-1],a=s?s.params:{};!s||s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u,c=el();if(t){var d;let e="string"==typeof t?ga(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||ha(!1),u=e}else u=c;let h=u.pathname||"/",p=h;if("/"!==l){let e=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=ba(e,{pathname:p}),m=function(e,t,n,r){var i;void 0===t&&(t=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let s=e,a=null==(i=n)?void 0:i.errors;if(null!=a){let e=s.findIndex((e=>e.route.id&&void 0!==(null==a?void 0:a[e.route.id])));e>=0||ha(!1),s=s.slice(0,Math.min(s.length,e+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<s.length;c++){let e=s[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=c),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){l=!0,s=u>=0?s.slice(0,u+1):[s[0]];break}}}return s.reduceRight(((e,r,i)=>{let o,c=!1,d=null,h=null;n&&(o=a&&r.route.id?a[r.route.id]:void 0,d=r.route.errorElement||ol,l&&(u<0&&0===i?(c=!0,h=null):u===i&&(c=!0,h=r.route.hydrateFallbackElement||null)));let p=t.concat(s.slice(0,i+1)),f=()=>{let t;return t=o?d:c?h:r.route.Component?De(r.route.Component,null):r.route.element?r.route.element:e,De(al,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?De(sl,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):f()}),null)}(f&&f.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:Na([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Na([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n,r);if(t&&m)return De(Qa.Provider,{value:{location:za({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:la.Pop}},m);return m}(e,t)}function il(){let e=function(){var e;let t=Bn(Za),n=function(){let e=Bn(Ka);return e||ha(!1),e}(ul.UseRouteError),r=cl(ul.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return De(je,null,De("h2",null,"Unexpected Application Error!"),De("h3",{style:{fontStyle:"italic"}},t),n?De("pre",{style:r},n):null,null)}const ol=De(il,null);class sl extends Be{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?De(Xa.Provider,{value:this.props.routeContext},De(Za.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function al(e){let{routeContext:t,match:n,children:r}=e,i=Bn(qa);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),De(Xa.Provider,{value:t},r)}var ll=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ll||{}),ul=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ul||{});function cl(e){let t=function(){let e=Bn(Xa);return e||ha(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||ha(!1),n.route.id}function dl(e){ha(!1)}function hl(e){let{basename:t="/",children:n=null,location:r,navigationType:i=la.Pop,navigator:o,static:s=!1,future:a}=e;Ja()&&ha(!1);let l=t.replace(/^\/*/,"/"),u=In((()=>({basename:l,navigator:o,static:s,future:za({v7_relativeSplatPath:!1},a)})),[l,a,o,s]);"string"==typeof r&&(r=ga(r));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,m=In((()=>{let e=La(c,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:i}}),[l,c,d,h,p,f,i]);return null==m?null:De(Ya.Provider,{value:u},De(Qa.Provider,{children:n,value:m}))}function pl(e){let{children:t,location:n}=e;return rl(fl(t),n)}function fl(e,t){void 0===t&&(t=[]);let n=[];return rr.forEach(e,((e,r)=>{if(!Dr(e))return;let i=[...t,r];if(e.type===je)return void n.push.apply(n,fl(e.props.children,i));e.type!==dl&&ha(!1),e.props.index&&e.props.children&&ha(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=fl(e.props.children,i)),n.push(o)})),n}
36
36
  /**
37
- * React Router DOM v6.26.2
37
+ * React Router DOM v6.30.3
38
38
  *
39
39
  * Copyright (c) Remix Software Inc.
40
40
  *
@@ -42,10 +42,10 @@ function Wa(){return Wa=Object.assign?Object.assign.bind():function(e){for(var t
42
42
  * LICENSE.md file in the root directory of this source tree.
43
43
  *
44
44
  * @license MIT
45
- */new Promise((()=>{}));try{window.__reactRouterVersion="6"}catch(Gy){}const hl=Zr.startTransition;function pl(e){let{basename:t,children:n,future:r,window:i}=e,o=Dn();null==o.current&&(o.current=da({window:i,v5Compat:!0}));let s=o.current,[a,l]=On({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=jn((e=>{u&&hl?hl((()=>l(e))):l(e)}),[l,u]);return Ln((()=>s.listen(c)),[s,c]),De(ul,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var fl,ml,vl,gl;let yl;(ml=fl||(fl={})).UseScrollRestoration="useScrollRestoration",ml.UseSubmit="useSubmit",ml.UseSubmitFetcher="useSubmitFetcher",ml.UseFetcher="useFetcher",ml.useViewTransitionState="useViewTransitionState",(gl=vl||(vl={})).UseFetcher="useFetcher",gl.UseFetchers="useFetchers",gl.UseScrollRestoration="useScrollRestoration";const _l=()=>{if(yl)return yl;return yl=new ts({defaultOptions:{queries:{retry:(e,t)=>{var n;return t instanceof co&&![401,403].includes((null==(n=t.response)?void 0:n.status)||0)}}}}),yl},bl="getAllPromotions",wl=/^https:\/\/([A-Za-z]+)-partner/,xl=e=>{switch((e=>{if(e.startsWith("http://localhost"))return"local";const t=e.toLowerCase().match(wl);return t&&t.length>1?t[1]:"prod"})(e.url)){case"local":case"autodev":case"test":return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/staging/";default:return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/master/"}},Sl=()=>{const{getAllPromotions:e}=fo(),t=Ja(),{isPending:n,error:r,data:i}=Ss({queryKey:[bl],queryFn:e}),o=uo(),s=In((()=>{return e=o.backend,((null==(t=i)?void 0:t.data)||[]).map((t=>{var n,r;return{id:t.id,category:t.category.title,promotionStatus:t.status,contentfulUrl:(null==(n=t.contentfulContent)?void 0:n.contentId)?`${xl(e)}entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,audiences:null==(r=t.audiences)?void 0:r.sort().join(", "),updatedAt:t.updatedAt,edit:"Edit"}})).sort(((e,t)=>new Date(t.updatedAt).valueOf()-new Date(e.updatedAt).valueOf()));var e,t}),[o.backend,i]),a=In((()=>[{name:"Id",field:"id",isSortable:!0},{name:"Category",field:"category",isSortable:!0},{name:"Status",field:"promotionStatus",isSortable:!0,type:{kind:"status",styleOverrides:{Enabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-color":"rgb(22 163 74 / 0.2)"},Disabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-color":"rgb(220 38 38 / 0.2)"}}},filters:[{name:"Enabled",predicate:e=>"Enabled"===e},{name:"Disabled",predicate:e=>"Disabled"===e}]},{name:"Contentful",field:"contentfulUrl",isSortable:!0,sort:e=>e?-1:1,type:{kind:"link"},filters:[{name:"Linked",predicate:e=>!!e},{name:"Unlinked",predicate:e=>!e}]},{name:"Audiences",field:"audiences",isSortable:!0,type:{kind:"list"},filters:[{name:"Audiences",predicate:e=>!!e}]},{name:"Updated",field:"updatedAt",isSortable:!0,sort:(e,t)=>new Date(t).valueOf()-new Date(e).valueOf(),type:{kind:"date"}},{name:"Edit",field:"edit",isSortable:!1,type:{kind:"button",onClick:e=>t(`/promotion/${e}`),children:io(ia,{alt:"edit","data-testid":"edit",css:{height:"1.25rem",width:"1.25rem",":hover":{fill:"var(--fl-color-primary-600)"}}})}}]),[t]);switch(!0){case n:return io(ro,{children:"Loading..."});case!!r:return oo(ro,{children:["An error has occurred: ",r.message]});case!!i:return io(sa,{columns:a,data:s,title:"Promotions",subtitle:"A list of currently configured promoted benefits",addButton:{onClick:()=>t("/promotion"),text:"Add New Promotion"}});default:return io(ro,{children:"No data returned from backend"})}};function kl(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function El(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const Pl=e=>Array.isArray(e);function Tl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Al(e){return"string"==typeof e||Array.isArray(e)}function Cl(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Rl(e,t,n,r){if("function"==typeof t){const[i,o]=Cl(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=Cl(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function Ol(e,t,n){const r=e.getProps();return Rl(r,t,void 0!==n?n:r.custom,e)}const Fl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ml=["initial",...Fl],Ll=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Dl=new Set(Ll),Vl=e=>1e3*e,Il=e=>e/1e3,jl={type:"spring",stiffness:500,damping:25,restSpeed:10},Bl={type:"keyframes",duration:.8},Nl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ul=(e,{keyframes:t})=>t.length>2?Bl:Dl.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:jl:Nl;function Gl(e,t){return e[t]||e.default||e}const Wl=!1,Hl=e=>null!==e;function $l(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Hl),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}const zl=e=>e;const ql=["read","resolveKeyframes","update","preRender","render","postRender"];function Kl(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=ql.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,i=!1,s=!1)=>{const a=s&&r?t:n;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,r?i=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,l.process(e)))}};return l}(o),e)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:h}=s,p=()=>{const o=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:ql.reduce(((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(p)),a.schedule(t,o,s)),t}),{}),cancel:e=>{for(let t=0;t<ql.length;t++)s[ql[t]].cancel(e)},state:i,steps:s}}const{schedule:Yl,cancel:Ql,state:Xl,steps:Zl}=Kl("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:zl,!0),Jl=e=>/^0[^.\s]+$/u.test(e);let eu=zl;const tu=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),nu=e=>t=>"string"==typeof t&&t.startsWith(e),ru=nu("--"),iu=nu("var(--"),ou=e=>!!iu(e)&&su.test(e.split("/*")[0].trim()),su=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,au=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lu(e,t,n=1){const[r,i]=function(e){const t=au.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${null!=n?n:r}`,i]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return tu(e)?parseFloat(e):e}return ou(i)?lu(i,t,n+1):i}const uu=(e,t,n)=>n>t?t:n<e?e:n,cu={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},du={...cu,transform:e=>uu(0,1,e)},hu={...cu,default:1},pu=e=>Math.round(1e5*e)/1e5,fu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,mu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,vu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function gu(e){return"string"==typeof e}const yu=e=>({test:t=>gu(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),_u=yu("deg"),bu=yu("%"),wu=yu("px"),xu=yu("vh"),Su=yu("vw"),ku={...bu,parse:e=>bu.parse(e)/100,transform:e=>bu.transform(100*e)},Eu=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Pu=e=>e===cu||e===wu,Tu=(e,t)=>parseFloat(e.split(", ")[t]),Au=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Tu(i[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?Tu(t[1],e):0}},Cu=new Set(["x","y","z"]),Ru=Ll.filter((e=>!Cu.has(e)));const Ou={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Au(4,13),y:Au(5,14)};Ou.translateX=Ou.x,Ou.translateY=Ou.y;const Fu=e=>t=>t.test(e),Mu=[cu,wu,bu,_u,Su,xu,{test:e=>"auto"===e,parse:e=>e}],Lu=e=>Mu.find(Fu(e)),Du=new Set;let Vu=!1,Iu=!1;function ju(){if(Iu){const e=Array.from(Du).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return Ru.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Iu=!1,Vu=!1,Du.forEach((e=>e.complete())),Du.clear()}function Bu(){Du.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Iu=!0)}))}class Nu{constructor(e,t,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Du.add(this),Vu||(Vu=!0,Yl.read(Bu),Yl.resolveKeyframes(ju))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(null===e[i])if(0===i){const i=null==r?void 0:r.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Du.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Du.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Uu=(e,t)=>n=>Boolean(gu(n)&&vu.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Gu=(e,t,n)=>r=>{if(!gu(r))return r;const[i,o,s,a]=r.match(fu);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Wu={...cu,transform:e=>Math.round((e=>uu(0,255,e))(e))},Hu={test:Uu("rgb","red"),parse:Gu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Wu.transform(e)+", "+Wu.transform(t)+", "+Wu.transform(n)+", "+pu(du.transform(r))+")"};const $u={test:Uu("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:Hu.transform},zu={test:Uu("hsl","hue"),parse:Gu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+bu.transform(pu(t))+", "+bu.transform(pu(n))+", "+pu(du.transform(r))+")"},qu={test:e=>Hu.test(e)||$u.test(e)||zu.test(e),parse:e=>Hu.test(e)?Hu.parse(e):zu.test(e)?zu.parse(e):$u.parse(e),transform:e=>gu(e)?e:e.hasOwnProperty("red")?Hu.transform(e):zu.transform(e)};const Ku="number",Yu="color",Qu="var",Xu="var(",Zu="${}",Ju=/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 ec(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(Ju,(e=>(qu.test(e)?(r.color.push(o),i.push(Yu),n.push(qu.parse(e))):e.startsWith(Xu)?(r.var.push(o),i.push(Qu),n.push(e)):(r.number.push(o),i.push(Ku),n.push(parseFloat(e))),++o,Zu))).split(Zu);return{values:n,split:s,indexes:r,types:i}}function tc(e){return ec(e).values}function nc(e){const{split:t,types:n}=ec(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){const t=n[o];i+=t===Ku?pu(e[o]):t===Yu?qu.transform(e[o]):e[o]}return i}}const rc=e=>"number"==typeof e?0:e;const ic={test:function(e){var t,n;return isNaN(e)&&gu(e)&&((null===(t=e.match(fu))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(mu))||void 0===n?void 0:n.length)||0)>0},parse:tc,createTransformer:nc,getAnimatableNone:function(e){const t=tc(e);return nc(e)(t.map(rc))}},oc=new Set(["brightness","contrast","saturate","opacity"]);function sc(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(fu)||[];if(!r)return e;const i=n.replace(r,"");let o=oc.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const ac=/\b([a-z-]*)\(.*?\)/gu,lc={...ic,getAnimatableNone:e=>{const t=e.match(ac);return t?t.map(sc).join(" "):e}},uc={...cu,transform:Math.round},cc={borderWidth:wu,borderTopWidth:wu,borderRightWidth:wu,borderBottomWidth:wu,borderLeftWidth:wu,borderRadius:wu,radius:wu,borderTopLeftRadius:wu,borderTopRightRadius:wu,borderBottomRightRadius:wu,borderBottomLeftRadius:wu,width:wu,maxWidth:wu,height:wu,maxHeight:wu,size:wu,top:wu,right:wu,bottom:wu,left:wu,padding:wu,paddingTop:wu,paddingRight:wu,paddingBottom:wu,paddingLeft:wu,margin:wu,marginTop:wu,marginRight:wu,marginBottom:wu,marginLeft:wu,rotate:_u,rotateX:_u,rotateY:_u,rotateZ:_u,scale:hu,scaleX:hu,scaleY:hu,scaleZ:hu,skew:_u,skewX:_u,skewY:_u,distance:wu,translateX:wu,translateY:wu,translateZ:wu,x:wu,y:wu,z:wu,perspective:wu,transformPerspective:wu,opacity:du,originX:ku,originY:ku,originZ:wu,zIndex:uc,backgroundPositionX:wu,backgroundPositionY:wu,fillOpacity:du,strokeOpacity:du,numOctaves:uc},dc={...cc,color:qu,backgroundColor:qu,outlineColor:qu,fill:qu,stroke:qu,borderColor:qu,borderTopColor:qu,borderRightColor:qu,borderBottomColor:qu,borderLeftColor:qu,filter:lc,WebkitFilter:lc},hc=e=>dc[e];function pc(e,t){let n=hc(e);return n!==lc&&(n=ic),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fc=new Set(["auto","none","0"]);class mc extends Nu{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),ou(n))){const r=lu(n,t.current);void 0!==r&&(e[a]=r),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Eu.has(n)||2!==e.length)return;const[r,i]=e,o=Lu(r),s=Lu(i);if(o!==s)if(Pu(o)&&Pu(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let i=0;i<e.length;i++)("number"==typeof(r=e[i])?0===r:null===r||"none"===r||"0"===r||Jl(r))&&n.push(i);var r;n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!fc.has(t)&&ec(t).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=pc(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ou[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Ou[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function vc(e){let t;return()=>(void 0===t&&(t=e()),t)}let gc;function yc(){gc=void 0}const _c={now:()=>(void 0===gc&&_c.set(Xl.isProcessing||Wl?Xl.timestamp:performance.now()),gc),set:e=>{gc=e,queueMicrotask(yc)}},bc=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ic.test(e)&&"0"!==e||e.startsWith("url(")));class wc{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=_c.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Bu(),ju()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=_c.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=bc(i,t),a=bc(o,t);return!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,i)){if(!o)return null==a||a($l(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(e,t);!1!==u&&(this._resolved={keyframes:e,finalKeyframe:t,...u},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function xc(e,t){return t?e*(1e3/t):0}const Sc=5;function kc(e,t,n){const r=Math.max(t-Sc,0);return xc(n-e(r),t-r)}const Ec=.001,Pc=.01,Tc=10,Ac=.05,Cc=1;function Rc({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,s=1-t;s=uu(Ac,Cc,s),e=uu(Pc,Tc,Il(e)),s<1?(i=t=>{const r=t*s,i=r*e,o=r-n,a=Fc(t,s),l=Math.exp(-i);return Ec-o/a*l},o=t=>{const r=t*s*e,o=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Fc(Math.pow(t,2),s);return(-i(t)+Ec>0?-1:1)*((o-a)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-Ec,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let i=1;i<Oc;i++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=Vl(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const Oc=12;function Fc(e,t){return e*Math.sqrt(1-t*t)}const Mc=["duration","bounce"],Lc=["stiffness","damping","mass"];function Dc(e,t){return t.some((t=>void 0!==e[t]))}function Vc({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Dc(e,Lc)&&Dc(e,Mc)){const n=Rc(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-Il(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(a*u)),m=o-i,v=Il(Math.sqrt(a/u)),g=Math.abs(m)<5;let y;if(n||(n=g?.01:2),t||(t=g?.005:.5),f<1){const e=Fc(v,f);y=t=>{const n=Math.exp(-f*v*t);return o-n*((p+f*v*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===f)y=e=>o-Math.exp(-v*e)*(m+(p+v*m)*e);else{const e=v*Math.sqrt(f*f-1);y=t=>{const n=Math.exp(-f*v*t),r=Math.min(e*t,300);return o-n*((p+f*v*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:h&&c||null,next:e=>{const r=y(e);if(h)s.done=e>=c;else{let i=0;f<1&&(i=0===e?Vl(p):kc(y,e,r));const a=Math.abs(i)<=n,l=Math.abs(o-r)<=t;s.done=a&&l}return s.value=s.done?o:r,s}}}function Ic({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let f=n*t;const m=d+f,v=void 0===s?m:s(m);v!==m&&(f=v-d);const g=e=>-f*Math.exp(-e/r),y=e=>v+g(e),_=e=>{const t=g(e),n=y(e);h.done=Math.abs(t)<=u,h.value=h.done?v:n};let b,w;const x=e=>{var t;(t=h.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(b=e,w=Vc({keyframes:[h.value,p(h.value)],velocity:kc(y,e,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,_(e),x(e)),void 0!==b&&e>=b?w.next(e-b):(!t&&_(e),h)}}}const jc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Bc=1e-7,Nc=12;function Uc(e,t,n,r){if(e===t&&n===r)return zl;const i=t=>function(e,t,n,r,i){let o,s,a=0;do{s=t+(n-t)/2,o=jc(s,r,i)-e,o>0?n=s:t=s}while(Math.abs(o)>Bc&&++a<Nc);return s}(t,0,1,e,n);return e=>0===e||1===e?e:jc(i(e),t,r)}const Gc=Uc(.42,0,1,1),Wc=Uc(0,0,.58,1),Hc=Uc(.42,0,.58,1),$c=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zc=e=>t=>1-e(1-t),qc=e=>1-Math.sin(Math.acos(e)),Kc=zc(qc),Yc=$c(qc),Qc=Uc(.33,1.53,.69,.99),Xc=zc(Qc),Zc={linear:zl,easeIn:Gc,easeInOut:Hc,easeOut:Wc,circIn:qc,circInOut:Yc,circOut:Kc,backIn:Xc,backInOut:$c(Xc),backOut:Qc,anticipate:e=>(e*=2)<1?.5*Xc(e):.5*(2-Math.pow(2,-10*(e-1)))},Jc=e=>{if(Array.isArray(e)){eu(4===e.length);const[t,n,r,i]=e;return Uc(t,n,r,i)}return"string"==typeof e?(eu(void 0!==Zc[e]),Zc[e]):e},ed=(e,t)=>n=>t(e(n)),td=(...e)=>e.reduce(ed),nd=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},rd=(e,t,n)=>e+(t-e)*n;function id(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function od(e,t){return n=>n>0?t:e}const sd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ad=[$u,Hu,zu];function ld(e){const t=(n=e,ad.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===zu&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=id(a,r,e+1/3),o=id(a,r,e),s=id(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(r)),r}const ud=(e,t)=>{const n=ld(e),r=ld(t);if(!n||!r)return od(e,t);const i={...n};return e=>(i.red=sd(n.red,r.red,e),i.green=sd(n.green,r.green,e),i.blue=sd(n.blue,r.blue,e),i.alpha=rd(n.alpha,r.alpha,e),Hu.transform(i))},cd=new Set(["none","hidden"]);function dd(e,t){return n=>rd(e,t,n)}function hd(e){return"number"==typeof e?dd:"string"==typeof e?ou(e)?od:qu.test(e)?ud:md:Array.isArray(e)?pd:"object"==typeof e?qu.test(e)?ud:fd:od}function pd(e,t){const n=[...e],r=n.length,i=e.map(((e,n)=>hd(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function fd(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=hd(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const md=(e,t)=>{const n=ic.createTransformer(t),r=ec(e),i=ec(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?cd.has(e)&&!i.values.length||cd.has(t)&&!r.values.length?function(e,t){return cd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):td(pd(function(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][i[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[o]=l,i[s]++}return r}(r,i),i.values),n):od(e,t)};function vd(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return rd(e,t,n);return hd(e)(e,t)}function gd(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(eu(o===t.length),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||vd,o=e.length-1;for(let s=0;s<o;s++){let n=i(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||zl:t;n=td(e,n)}r.push(n)}return r}(t,r,i),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=nd(e[n],e[n+1],t);return s[n](r)};return n?t=>l(uu(e[0],e[o-1],t)):l}function yd(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=nd(0,t,r);e.push(rd(n,1,i))}}(t,e.length-1),t}function _d({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Jc):Jc(r),o={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:yd(t),e),a=gd(s,t,{ease:Array.isArray(i)?i:(l=t,u=i,l.map((()=>u||Hc)).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}const bd=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Yl.update(t,!0),stop:()=>Ql(t),now:()=>Xl.isProcessing?Xl.timestamp:_c.now()}},wd={decay:Ic,inertia:Ic,tween:_d,keyframes:_d,spring:Vc},xd=e=>e/100;class Sd extends wc{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||Nu;this.resolver=new o(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=this.options,s=wd[t]||_d;let a,l;s!==_d&&"number"!=typeof e[0]&&(a=td(xd,vd(e[0],e[1])),e=[0,100]);const u=s({...this.options,keyframes:e});"mirror"===i&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(u));const{calculatedDuration:c}=u,d=c+r;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,_=i;if(h){const e=Math.min(this.currentTime,u)/c;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1);Boolean(t%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(_=o)),y=uu(0,1,n)*c}const b=g?{done:!1,value:a[0]}:_.next(y);s&&(b.value=s(b.value));let{done:w}=b;g||null===l||(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return x&&void 0!==r&&(b.value=$l(a,this.options,r)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:e}=this;return e?Il(e.calculatedDuration):0}get time(){return Il(this.currentTime)}set time(e){e=Vl(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Il(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=bd,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const kd=new Set(["opacity","clipPath","filter","transform"]),Ed=e=>Array.isArray(e)&&"number"==typeof e[0];function Pd(e){return Boolean(!e||"string"==typeof e&&e in Ad||Ed(e)||Array.isArray(e)&&e.every(Pd))}const Td=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ad={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Td([0,.65,.55,1]),circOut:Td([.55,0,1,.45]),backIn:Td([.31,.01,.66,-.59]),backOut:Td([.33,1.53,.69,.99])};function Cd(e){return Rd(e)||Ad.easeOut}function Rd(e){return e?Ed(e)?Td(e):Array.isArray(e)?e.map(Cd):Ad[e]:void 0}const Od=vc((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class Fd extends wc{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new mc(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:i,ease:o,type:s,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(c=this.options).type||!Pd(c.ease)){const{onComplete:t,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(e,t){const n=new Sd({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<2e4;)r=n.sample(o),i.push(r.value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(e,u);1===(e=c.keyframes).length&&(e[1]=e[0]),r=c.duration,i=c.times,o=c.ease,s="keyframes"}var c;const d=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Rd(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,e,{...this.options,duration:r,times:i,ease:o});return d.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:n}=this.options;a.set($l(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:s,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Il(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Il(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Vl(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return zl;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return zl}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:i,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...u}=this.options,c=new Sd({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),d=Vl(this.time);e.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;return Od()&&n&&kd.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}}const Md=vc((()=>void 0!==window.ScrollTimeline));class Ld{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){const t=this.animations.map((t=>{if(!Md()||!t.attachTimeline)return t.pause(),function(e,t){let n;const r=()=>{const{currentTime:r}=t,i=(null===r?0:r.value)/100;n!==i&&e(i),n=i};return Yl.update(r,!0),()=>Ql(r)}((e=>{t.time=t.duration*e}),e);t.attachTimeline(e)}));return()=>{t.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Dd=(e,t,n,r={},i,o,s)=>a=>{const l=Gl(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c-=Vl(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:o?void 0:i};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(d={...d,...Ul(e,d)}),d.duration&&(d.duration=Vl(d.duration)),d.repeatDelay&&(d.repeatDelay=Vl(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(h=!0)),h&&!o&&void 0!==t.get()){const e=$l(d.keyframes,l);if(void 0!==e)return Yl.update((()=>{d.onUpdate(e),d.onComplete()})),new Ld([])}return!o&&Fd.supports(d)?new Fd(d):new Sd(d)},Vd=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Id=e=>Pl(e)?e[e.length-1]||0:e;function jd(e,t){-1===e.indexOf(t)&&e.push(t)}function Bd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Nd{constructor(){this.subscriptions=[]}add(e){return jd(this.subscriptions,e),()=>Bd(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Ud{constructor(e,t={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=_c.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=_c.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Nd);const n=this.events[e].add(t);return"change"===e?()=>{n(),Yl.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=_c.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return xc(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gd(e,t){return new Ud(e,t)}function Wd(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gd(n))}const Hd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),$d="data-"+Hd("framerAppearId");function zd(e){return e.props[$d]}function qd(e){return Dl.has(e)?"transform":kd.has(e)?Hd(e):void 0}class Kd extends Ud{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const t=qd(e);if(!t)return;const n=this.counts.get(t)||0;this.counts.set(t,n+1),0===n&&(this.output.push(t),this.update());let r=!1;return()=>{if(r)return;r=!0;const e=this.counts.get(t)-1;this.counts.set(t,e),0===e&&(Bd(this.output,t),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const Yd=e=>Boolean(e&&e.getVelocity);function Qd(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");return r||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(r=new Kd("auto"),e.addValue("willChange",r)),i=r,Boolean(Yd(i)&&i.add)?r.add(t):void 0;var i}function Xd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Zd(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const t=e.getValue(d,null!==(o=e.latestValues[d])&&void 0!==o?o:null),r=l[d];if(void 0===r||c&&Xd(c,d))continue;const i={delay:n,...Gl(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const t=zd(e);if(t){const e=window.MotionHandoffAnimation(t,d,Yl);null!==e&&(i.startTime=e,a=!0)}}t.start(Dd(d,t,r,e.shouldReduceMotion&&Dl.has(d)?{type:!1}:i,e,a,Qd(e,d)));const h=t.animation;h&&u.push(h)}return a&&Promise.all(u).then((()=>{Yl.update((()=>{a&&function(e,t){const n=Ol(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o)Wd(e,s,Id(o[s]))}(e,a)}))})),u}function Jd(e,t,n={}){var r;const i=Ol(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Zd(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(eh).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(Jd(e,t,{...o,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function eh(e,t){return e.sortNodePosition(t)}const th=[...Fl].reverse(),nh=Fl.length;function rh(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map((t=>Jd(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=Jd(e,t,n);else{const i="function"==typeof t?Ol(e,t,n.custom):t;r=Promise.all(Zd(e,i,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function ih(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Tl(t,e)}function oh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sh(){return{animate:oh(!0),whileInView:oh(),whileHover:oh(),whileTap:oh(),whileDrag:oh(),whileFocus:oh(),exit:oh()}}class ah{constructor(e){this.isMounted=!1,this.node=e}update(){}}let lh=0;const uh={animation:{Feature:class extends ah{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=rh(e),n=sh(),r=!0;const i=t=>(n,r)=>{var i;const o=Ol(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function o(o){const s=e.getProps(),a=e.getVariantContext(!0)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<nh;t++){const h=th[t],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=Al(f),v=h===o?p.isActive:null;!1===v&&(d=t);let g=f===a[h]&&f!==s[h]&&m;if(g&&r&&e.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===v||!f&&!p.prevProp||El(f)||"boolean"==typeof f)continue;let y=ih(p.prevProp,f)||h===o&&p.isActive&&!g&&m||t>d&&m,_=!1;const b=Array.isArray(f)?f:[f];let w=b.reduce(i(h),{});!1===v&&(w={});const{prevResolvedValues:x={}}=p,S={...x,...w},k=t=>{y=!0,u.has(t)&&(_=!0,u.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=w[e],n=x[e];if(c.hasOwnProperty(e))continue;let r=!1;r=Pl(t)&&Pl(n)?!Tl(t,n):t!==n,r?null!=t?k(e):u.add(e):void 0!==t&&u.has(e)?k(e):p.protectedKeys[e]=!0}p.prevProp=f,p.prevResolvedValues=w,p.isActive&&(c={...c,...w}),r&&e.blockInitialAnimation&&(y=!1),!y||g&&!_||l.push(...b.map((e=>({animation:e,options:{type:h}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=sh(),r=!0}}}(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();El(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends ah{constructor(){super(...arguments),this.id=lh++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},ch=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function dh(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const hh=e=>t=>ch(t)&&e(t,dh(t));function ph(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function fh(e,t,n,r){return ph(e,t,hh(n),r)}const mh=(e,t)=>Math.abs(e-t);class vh{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=_h(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=mh(e.x,t.x),r=mh(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=Xl;this.history.push({...r,timestamp:i});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=gh(t,this.transformPagePoint),Yl.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=_h("pointercancel"===e.type?this.lastMoveEventInfo:gh(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!ch(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const o=gh(dh(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=Xl;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,_h(o,this.history)),this.removeListeners=td(fh(this.contextWindow,"pointermove",this.handlePointerMove),fh(this.contextWindow,"pointerup",this.handlePointerUp),fh(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ql(this.updatePoint)}}function gh(e,t){return t?{point:t(e.point)}:e}function yh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _h({point:e},t){return{point:e,delta:yh(e,wh(t)),offset:yh(e,bh(t)),velocity:xh(t,.1)}}function bh(e){return e[0]}function wh(e){return e[e.length-1]}function xh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=wh(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Vl(t)));)n--;if(!r)return{x:0,y:0};const o=Il(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 Sh(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const kh=Sh("dragHorizontal"),Eh=Sh("dragVertical");function Ph(e){let t=!1;if("y"===e)t=Eh();else if("x"===e)t=kh();else{const e=kh(),n=Eh();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Th(){const e=Ph(!0);return!e||(e(),!1)}function Ah(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const Ch=.9999,Rh=1.0001,Oh=-.01,Fh=.01;function Mh(e){return e.max-e.min}function Lh(e,t,n,r=.5){e.origin=r,e.originPoint=rd(t.min,t.max,e.origin),e.scale=Mh(n)/Mh(t),e.translate=rd(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ch&&e.scale<=Rh||isNaN(e.scale))&&(e.scale=1),(e.translate>=Oh&&e.translate<=Fh||isNaN(e.translate))&&(e.translate=0)}function Dh(e,t,n,r){Lh(e.x,t.x,n.x,r?r.originX:void 0),Lh(e.y,t.y,n.y,r?r.originY:void 0)}function Vh(e,t,n){e.min=n.min+t.min,e.max=e.min+Mh(t)}function Ih(e,t,n){e.min=t.min-n.min,e.max=e.min+Mh(t)}function jh(e,t,n){Ih(e.x,t.x,n.x),Ih(e.y,t.y,n.y)}function Bh(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Nh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Uh=.35;function Gh(e,t,n){return{min:Wh(e,t),max:Wh(e,n)}}function Wh(e,t){return"number"==typeof e?e:e[t]||0}const Hh=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),$h=()=>({x:{min:0,max:0},y:{min:0,max:0}});function zh(e){return[e("x"),e("y")]}function qh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Kh(e){return void 0===e||1===e}function Yh({scale:e,scaleX:t,scaleY:n}){return!Kh(e)||!Kh(t)||!Kh(n)}function Qh(e){return Yh(e)||Xh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Xh(e){return Zh(e.x)||Zh(e.y)}function Zh(e){return e&&"0%"!==e}function Jh(e,t,n){return n+t*(e-n)}function ep(e,t,n,r,i){return void 0!==i&&(e=Jh(e,i,r)),Jh(e,n,r)+t}function tp(e,t=0,n=1,r,i){e.min=ep(e.min,t,n,r,i),e.max=ep(e.max,t,n,r,i)}function np(e,{x:t,y:n}){tp(e.x,t.translate,t.scale,t.originPoint),tp(e.y,n.translate,n.scale,n.originPoint)}const rp=.999999999999,ip=1.0000000000001;function op(e,t){e.min=e.min+t,e.max=e.max+t}function sp(e,t,n,r,i=.5){tp(e,t,n,rd(e.min,e.max,i),r)}function ap(e,t){sp(e.x,t.x,t.scaleX,t.scale,t.originX),sp(e.y,t.y,t.scaleY,t.scale,t.originY)}function lp(e,t){return qh(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const up=({current:e})=>e?e.ownerDocument.defaultView:null,cp=new WeakMap;class dp{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$h(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new vh(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(dh(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();if(r&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ph(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),zh((e=>{let t=this.getAxisMotionValue(e).get()||0;if(bu.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Mh(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Yl.postRender((()=>o(e,t))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=Qd(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>zh((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:up(this.visualElement)})}stop(e,t){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Yl.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!hp(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?rd(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?rd(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&Ah(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Bh(e.x,n,i),y:Bh(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Uh){return!1===e?e=0:!0===e&&(e=Uh),{x:Gh(e,"left","right"),y:Gh(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&zh((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ah(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=lp(e,n),{scroll:i}=t;return i&&(op(r.x,i.offset.x),op(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Nh(e.x,t.x),y:Nh(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=qh(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=zh((s=>{if(!hp(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(Dd(e,n,0,t,this.visualElement,!1,Qd(this.visualElement,e)))}stopAnimation(){zh((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){zh((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){zh((t=>{const{drag:n}=this.getProps();if(!hp(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-rd(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ah(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};zh((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Mh(e),i=Mh(t);return i>r?n=nd(t.min,t.max-r,e.min):r>i&&(n=nd(e.min,e.max-i,t.min)),uu(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),zh((t=>{if(!hp(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(rd(i,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;cp.set(this.visualElement,this);const e=fh(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Ah(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Yl.read(t);const i=ph(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(zh((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Uh,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function hp(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const pp=e=>(t,n)=>{e&&Yl.postRender((()=>e(t,n)))};const fp=ot(null);const mp=ot({}),vp=ot({}),gp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function yp(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _p={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!wu.test(e))return e;e=parseFloat(e)}return`${yp(e,t.target.x)}% ${yp(e,t.target.y)}%`}},bp={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ic.parse(e);if(i.length>5)return r;const o=ic.createTransformer(e),s="number"!=typeof i[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=rd(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}},wp={};const{schedule:xp,cancel:Sp}=Kl(queueMicrotask,!1);class kp extends Be{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;var o;o=Pp,Object.assign(wp,o),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),gp.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Yl.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),xp.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ep(e){const[t,n]=function(){const e=Bn(fp);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=Un();Mn((()=>r(i)),[]);const o=jn((()=>n&&n(i)),[i,n]);return!t&&n?[!1,o]:[!0]}(),r=Bn(mp);return no(kp,{...e,layoutGroup:r,switchLayoutGroup:Bn(vp),isPresent:t,safeToRemove:n})}const Pp={borderRadius:{..._p,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_p,borderTopRightRadius:_p,borderBottomLeftRadius:_p,borderBottomRightRadius:_p,boxShadow:bp},Tp=["TopLeft","TopRight","BottomLeft","BottomRight"],Ap=Tp.length,Cp=e=>"string"==typeof e?parseFloat(e):e,Rp=e=>"number"==typeof e||wu.test(e);function Op(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Fp=Lp(0,.5,Kc),Mp=Lp(.5,.95,zl);function Lp(e,t,n){return r=>r<e?0:r>t?1:n(nd(e,t,r))}function Dp(e,t){e.min=t.min,e.max=t.max}function Vp(e,t){Dp(e.x,t.x),Dp(e.y,t.y)}function Ip(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function jp(e,t,n,r,i){return e=Jh(e-=t,1/n,r),void 0!==i&&(e=Jh(e,1/i,r)),e}function Bp(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){bu.test(t)&&(t=parseFloat(t),t=rd(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=rd(o.min,o.max,r);e===o&&(a-=t),e.min=jp(e.min,t,n,a,i),e.max=jp(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}const Np=["x","scaleX","originX"],Up=["y","scaleY","originY"];function Gp(e,t,n,r){Bp(e.x,t,Np,n?n.x:void 0,r?r.x:void 0),Bp(e.y,t,Up,n?n.y:void 0,r?r.y:void 0)}function Wp(e){return 0===e.translate&&1===e.scale}function Hp(e){return Wp(e.x)&&Wp(e.y)}function $p(e,t){return e.min===t.min&&e.max===t.max}function zp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qp(e,t){return zp(e.x,t.x)&&zp(e.y,t.y)}function Kp(e){return Mh(e.x)/Mh(e.y)}function Yp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Qp{constructor(){this.members=[]}add(e){jd(this.members,e),e.scheduleRender()}remove(e){if(Bd(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Xp=(e,t)=>e.depth-t.depth;class Zp{constructor(){this.children=[],this.isDirty=!1}add(e){jd(this.children,e),this.isDirty=!0}remove(e){Bd(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Xp),this.isDirty=!1,this.children.forEach(e)}}function Jp(e){const t=Yd(e)?e.get():e;return Vd(t)?t.toValue():t}const ef={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},tf="undefined"!=typeof window&&void 0!==window.MotionDebug,nf=["","X","Y","Z"],rf={visibility:"hidden"};let of=0;function sf(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function af(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zd(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Yl,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&af(r)}function lf({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=of++,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,tf&&(ef.totalNodes=ef.resolvedTargetDeltas=ef.recalculatedProjection=0),this.nodes.forEach(df),this.nodes.forEach(yf),this.nodes.forEach(_f),this.nodes.forEach(hf),tf&&window.MotionDebug.record(ef)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Zp)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Nd),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:i,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=_c.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ql(r),e(o-t))};return Yl.read(r,!0),()=>Ql(r)}(r,250),gp.hasAnimatedSinceResize&&(gp.hasAnimatedSinceResize=!1,this.nodes.forEach(gf))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||Ef,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!qp(this.targetLayout,r)||n,u=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,u);const t={...Gl(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||gf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ql(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(bf),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&af(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ff);this.isUpdating||this.nodes.forEach(mf),this.isUpdating=!1,this.nodes.forEach(vf),this.nodes.forEach(uf),this.nodes.forEach(cf),this.clearAllSnapshots();const e=_c.now();Xl.delta=uu(0,1e3/60,e-Xl.timestamp),Xl.timestamp=e,Xl.isProcessing=!0,Zl.update.process(Xl),Zl.preRender.process(Xl),Zl.render.process(Xl),Xl.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pf),this.sharedNodes.forEach(wf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Yl.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Yl.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$h(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Hp(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||Qh(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Af((r=n).x),Af(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return $h();const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(Rf))){const{scroll:e}=this.root;e&&(op(n.x,e.offset.x),op(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=$h();if(Vp(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:i,options:o}=t;t!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&Vp(n,e),op(n.x,i.offset.x),op(n.y,i.offset.y))}return n}applyTransform(e,t=!1){const n=$h();Vp(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&ap(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Qh(e.latestValues)&&ap(n,e.latestValues)}return Qh(this.latestValues)&&ap(n,this.latestValues),n}removeTransform(e){const t=$h();Vp(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Qh(e.latestValues))continue;Yh(e.latestValues)&&e.updateSnapshot();const r=$h();Vp(r,e.measurePageBox()),Gp(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Qh(this.latestValues)&&Gp(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xl.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=Xl.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$h(),this.relativeTargetOrigin=$h(),jh(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Vp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=$h(),this.targetWithTransforms=$h()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Vh(s.x,a.x,l.x),Vh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Vp(this.target,this.layout.layoutBox),np(this.target,this.targetDelta)):Vp(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$h(),this.relativeTargetOrigin=$h(),jh(this.relativeTargetOrigin,this.target,e.target),Vp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}tf&&ef.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Yh(this.parent.latestValues)&&!Xh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Xl.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;Vp(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let o,s;t.x=t.y=1;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ap(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,np(e,s)),r&&Qh(o.latestValues)&&ap(e,o.latestValues))}t.x<ip&&t.x>rp&&(t.x=1),t.y<ip&&t.y>rp&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=$h());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Ip(this.prevProjectionDelta.x,this.projectionDelta.x),Ip(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Dh(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&Yp(this.projectionDelta.x,this.prevProjectionDelta.x)&&Yp(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),tf&&ef.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Hh(),this.projectionDelta=Hh(),this.projectionDeltaWithTransform=Hh()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=Hh();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=$h(),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(kf));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,p,f,m,v;xf(o.x,e.x,n),xf(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jh(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,m=s,v=n,Sf(p.x,f.x,m.x,v),Sf(p.y,f.y,m.y,v),d&&(l=this.relativeTarget,h=d,$p(l.x,h.x)&&$p(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d=$h()),Vp(d,this.relativeTarget)),a&&(this.animationValues=i,function(e,t,n,r,i,o){i?(e.opacity=rd(0,void 0!==n.opacity?n.opacity:1,Fp(r)),e.opacityExit=rd(void 0!==t.opacity?t.opacity:1,0,Mp(r))):o&&(e.opacity=rd(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<Ap;s++){const i=`border${Tp[s]}Radius`;let o=Op(t,i),a=Op(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Rp(o)===Rp(a)?(e[i]=Math.max(rd(Cp(o),Cp(a),r),0),(bu.test(a)||bu.test(o))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=rd(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ql(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Yl.update((()=>{gp.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Yd(e)?e:Gd(e);return r.start(Dd("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Cf(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||$h();const t=Mh(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Mh(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Vp(t,n),ap(t,i),Dh(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Qp);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&sf("z",e,r,this.animationValues);for(let i=0;i<nf.length;i++)sf(`rotate${nf[i]}`,e,r,this.animationValues),sf(`skew${nf[i]}`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return rf;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Jp(null==e?void 0:e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Jp(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Qh(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),i&&(r.transform=i(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?r.opacity=o===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const u in wp){if(void 0===s[u])continue;const{correct:e,applyTo:t}=wp[u],n="none"===r.transform?s[u]:e(s[u],o);if(t){const e=t.length;for(let i=0;i<e;i++)r[t[i]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=o===this?Jp(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(ff),this.root.sharedNodes.clear()}}}function uf(e){e.updateLayout()}function cf(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?zh((e=>{const r=o?n.measuredBox[e]:n.layoutBox[e],i=Mh(r);r.min=t[e].min,r.max=r.min+i})):Cf(i,n.layoutBox,t)&&zh((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=Mh(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=Hh();Dh(s,t,n.layoutBox);const a=Hh();o?Dh(a,e.applyTransform(r,!0),n.measuredBox):Dh(a,t,n.layoutBox);const l=!Hp(s);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s=$h();jh(s,n.layoutBox,i.layoutBox);const a=$h();jh(a,t,o.layoutBox),qp(s,a)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function df(e){tf&&ef.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function hf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pf(e){e.clearSnapshot()}function ff(e){e.clearMeasurements()}function mf(e){e.isLayoutDirty=!1}function vf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function gf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yf(e){e.resolveTargetDelta()}function _f(e){e.calcProjection()}function bf(e){e.resetSkewAndRotation()}function wf(e){e.removeLeadSnapshot()}function xf(e,t,n){e.translate=rd(t.translate,0,n),e.scale=rd(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Sf(e,t,n,r){e.min=rd(t.min,n.min,r),e.max=rd(t.max,n.max,r)}function kf(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Ef={duration:.45,ease:[.4,0,.1,1]},Pf=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Tf=Pf("applewebkit/")&&!Pf("chrome/")?Math.round:zl;function Af(e){e.min=Tf(e.min),e.max=Tf(e.max)}function Cf(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Kp(t),i=Kp(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function Rf(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Of=lf({attachResizeListener:(e,t)=>ph(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ff={current:void 0},Mf=lf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ff.current){const e=new Of({});e.mount(window),e.setOptions({layoutScroll:!0}),Ff.current=e}return Ff.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Lf={pan:{Feature:class extends ah{constructor(){super(...arguments),this.removePointerDownListener=zl}onPointerDown(e){this.session=new vh(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:up(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:pp(e),onStart:pp(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Yl.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=fh(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ah{constructor(e){super(e),this.removeGroupControls=zl,this.removeListeners=zl,this.controls=new dp(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||zl}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Mf,MeasureLayout:Ep}};function Df(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return fh(e.current,n,((n,i)=>{if("touch"===n.pointerType||Th())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const s=o[r];s&&Yl.postRender((()=>s(n,i)))}),{passive:!e.getProps()[r]})}const Vf=(e,t)=>!!t&&(e===t||Vf(e,t.parentElement));function If(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,dh(n))}const jf=new WeakMap,Bf=new WeakMap,Nf=e=>{const t=jf.get(e.target);t&&t(e)},Uf=e=>{e.forEach(Nf)};function Gf(e,t,n){const r=function({root:e,...t}){const n=e||document;Bf.has(n)||Bf.set(n,{});const r=Bf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Uf,{root:e,...t})),r[i]}(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}const Wf={some:0,all:1};const Hf={inView:{Feature:class extends ah{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Wf[r]};return Gf(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ah{constructor(){super(...arguments),this.removeStartListeners=zl,this.removeEndListeners=zl,this.removeAccessibleListeners=zl,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=fh(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||Vf(this.node.current,e.target)?n:r;o&&Yl.update((()=>o(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),i=fh(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=td(r,i),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=ph(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=ph(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&If("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Yl.postRender((()=>n(e,t)))}))})),If("down",((e,t)=>{this.startPress(e,t)}))})),t=ph(this.node.current,"blur",(()=>{this.isPressing&&If("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=td(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Yl.postRender((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Th()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Yl.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=fh(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=ph(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=td(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ah{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(Gy){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=td(ph(this.node.current,"focus",(()=>this.onFocus())),ph(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends ah{mount(){this.unmount=td(Df(this.node,!0),Df(this.node,!1))}unmount(){}}}},$f={layout:{ProjectionNode:Mf,MeasureLayout:Ep}},zf=ot({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),qf=ot({}),Kf="undefined"!=typeof window,Yf=Kf?Ln:Mn,Qf=ot({strict:!1});let Xf=!1;function Zf(e,t,n,r,i){var o;const{visualElement:s}=Bn(qf),a=Bn(Qf),l=Bn(fp),u=Bn(zf).reducedMotion,c=Dn();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const d=c.current,h=Bn(vp);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:em(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Ah(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(c.current,n,i,h),qr((()=>{d&&d.update(n,l)}));const p=n[$d],f=Dn(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return Yf((()=>{d&&(d.updateFeatures(),xp.render(d.render),f.current&&d.animationState&&d.animationState.animateChanges())})),Mn((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current=!1,Xf||(Xf=!0,queueMicrotask(Jf)))})),d}function Jf(){window.MotionHandoffIsComplete=!0}function em(e){if(e)return!1!==e.options.allowProjection?e.projection:em(e.parent)}function tm(e,t,n){return jn((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Ah(n)&&(n.current=r))}),[t])}function nm(e){return El(e.animate)||Ml.some((t=>Al(e[t])))}function rm(e){return Boolean(nm(e)||e.variants)}function im(e){const{initial:t,animate:n}=function(e,t){if(nm(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Al(t)?t:void 0,animate:Al(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,Bn(qf));return In((()=>({initial:t,animate:n})),[om(t),om(n)])}function om(e){return Array.isArray(e)?e.join(" "):e}const sm={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"]},am={};for(const IS in sm)am[IS]={isEnabled:e=>sm[IS].some((t=>!!e[t]))};const lm=Symbol.for("motionComponentSymbol");function um({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&function(e){for(const t in e)am[t]={...am[t],...e[t]}}(e);const o=tr((function(e,o){let s;const a={...Bn(zf),...e,layoutId:cm(e)},{isStatic:l}=a,u=im(e),c=r(e,l);if(!l&&Kf){Bn(Qf).strict;const e=function(e){const{drag:t,layout:n}=am;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(a);s=e.MeasureLayout,u.visualElement=Zf(i,c,a,t,e.ProjectionNode)}return no(qf.Provider,{value:u,children:[s&&u.visualElement?no(s,{visualElement:u.visualElement,...a}):null,n(i,e,tm(c,u.visualElement,o),c,l,u.visualElement)]})}));return o[lm]=i,o}function cm({layoutId:e}){const t=Bn(mp).id;return t&&void 0!==e?t+"-"+e:e}const dm=["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 hm(e){return"string"==typeof e&&!e.includes("-")&&!!(dm.indexOf(e)>-1||/[A-Z]/u.test(e))}function pm(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const fm=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 mm(e,t,n,r){pm(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(fm.has(i)?i:Hd(i),t.attrs[i])}function vm(e,{layout:t,layoutId:n}){return Dl.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!wp[e]||"opacity"===e)}function gm(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(Yd(i[s])||t.style&&Yd(t.style[s])||vm(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(o[s]=i[s]);return n&&i&&"string"==typeof i.willChange&&(n.applyWillChange=!1),o}function ym(e,t,n){const r=gm(e,t,n);for(const i in e)if(Yd(e[i])||Yd(t[i])){r[-1!==Ll.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}function _m(e){const t=Dn(null);return null===t.current&&(t.current=e()),t.current}const bm=e=>(t,n)=>{const r=Bn(qf),i=Bn(fp),o=()=>function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,s,a){const l={latestValues:Sm(i,o,s,!a&&e,t),renderState:n()};return r&&(l.mount=e=>r(i,e,l)),l}(e,t,r,i,n);return n?o():_m(o)};function wm(e,t){const n=qd(t);n&&jd(e,n)}function xm(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const t=Rl(e,r[i]);if(t){const{transitionEnd:e,transition:r,...i}=t;n(i,e)}}}function Sm(e,t,n,r,i){var o;const s={},a=[],l=r&&void 0===(null===(o=e.style)||void 0===o?void 0:o.willChange),u=i(e,{});for(const v in u)s[v]=Jp(u[v]);let{initial:c,animate:d}=e;const h=nm(e),p=rm(e);t&&p&&!h&&!1!==e.inherit&&(void 0===c&&(c=t.initial),void 0===d&&(d=t.animate));let f=!!n&&!1===n.initial;f=f||!1===c;const m=f?d:c;return m&&"boolean"!=typeof m&&!El(m)&&xm(e,m,((e,t)=>{for(const n in e){let t=e[n];if(Array.isArray(t)){t=t[f?t.length-1:0]}null!==t&&(s[n]=t)}for(const n in t)s[n]=t[n]})),l&&(d&&!1!==c&&!El(d)&&xm(e,d,(e=>{for(const t in e)wm(a,t)})),a.length&&(s.willChange=a.join(","))),s}const km=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Em=()=>({...km(),attrs:{}}),Pm=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Tm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Am=Ll.length;function Cm(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(Dl.has(l))s=!0;else if(ru(l))i[l]=e;else{const t=Pm(e,cc[l]);l.startsWith("origin")?(a=!0,o[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<Am;o++){const s=Ll[o],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=Pm(a,cc[s]);l||(i=!1,r+=`${Tm[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function Rm(e,t,n){return"string"==typeof e?e:wu.transform(t+n*e)}const Om={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fm={offset:"strokeDashoffset",array:"strokeDasharray"};function Mm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(Cm(e,u,d),c)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:f}=e;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Rm(t,e.x,e.width)} ${Rm(n,e.y,e.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Om:Fm;e[o.offset]=wu.transform(-r);const s=wu.transform(t),a=wu.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Lm=e=>"string"==typeof e&&"svg"===e.toLowerCase(),Dm={useVisualState:bm({scrapeMotionValuesFromProps:ym,createRenderState:Em,onMount:(e,t,{renderState:n,latestValues:r})=>{Yl.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(Gy){n.dimensions={x:0,y:0,width:0,height:0}}})),Yl.render((()=>{Mm(n,r,Lm(t.tagName),e.transformTemplate),mm(t,n)}))}})},Vm={useVisualState:bm({applyWillChange:!0,scrapeMotionValuesFromProps:gm,createRenderState:km})};function Im(e,t,n){for(const r in t)Yd(t[r])||vm(r,n)||(e[r]=t[r])}function jm(e,t){const n={};return Im(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return In((()=>{const n=km();return Cm(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function Bm(e,t){const n={},r=jm(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Nm=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 Um(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Nm.has(e)}let Gm=e=>!Um(e);try{(Wm=require("@emotion/is-prop-valid").default)&&(Gm=e=>e.startsWith("on")?!Um(e):Wm(e))}catch(VS){}var Wm;function Hm(e,t,n,r){const i=In((()=>{const n=Em();return Mm(n,t,Lm(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Im(t,e.style,e),i.style={...t,...i.style}}return i}function $m(e=!1){return(t,n,r,{latestValues:i},o)=>{const s=(hm(t)?Hm:Bm)(n,i,o,t),a=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Gm(i)||!0===n&&Um(i)||!t&&!Um(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),l=t!==je?{...a,...s,ref:r}:{},{children:u}=n;return De(t,{...l,children:In((()=>Yd(u)?u.get():u),[u])})}}function zm(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return um({...hm(n)?Dm:Vm,preloadedFeatures:e,useRender:$m(r),createVisualElement:t,Component:n})}}const qm={current:null},Km={current:!1};const Ym=new WeakMap,Qm=[...Mu,qu,ic],Xm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Zm=Ml.length;class Jm{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Nu,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,Yl.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=nm(t),this.isVariantNode=rm(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const d in c){const e=c[d];void 0!==a[d]&&Yd(e)&&e.set(a[d],!1)}}mount(e){this.current=e,Ym.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Km.current||function(){if(Km.current=!0,Kf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qm.current=e.matches;e.addListener(t),t()}else qm.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||qm.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ym.delete(this.current),this.projection&&this.projection.unmount(),Ql(this.notifyUpdate),Ql(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Dl.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Yl.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),i(),o&&o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in am){const t=am[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$h()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<Xm.length;n++){const t=Xm[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Yd(i))e.addValue(r,i);else if(Yd(o))e.addValue(r,Gd(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,Gd(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let n=0;n<Zm;n++){const e=Ml[n],r=this.props[e];(Al(r)||!1===r)&&(t[e]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Gd(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var i;return null!=r&&("string"==typeof r&&(tu(r)||Jl(r))?r=parseFloat(r):(i=r,!Qm.find(Fu(i))&&ic.test(t)&&(r=pc(e,t))),this.setBaseTarget(e,Yd(r)?r.get():r)),Yd(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=Rl(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||Yd(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new Nd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class ev extends Jm{constructor(){super(...arguments),this.KeyframeResolver=mc}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class tv extends ev{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=pm}readValueFromInstance(e,t){if(Dl.has(t)){const e=hc(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=(ru(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return lp(e,t)}build(e,t,n){Cm(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return gm(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Yd(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class nv extends ev{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$h}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Dl.has(t)){const e=hc(t);return e&&e.default||0}return t=fm.has(t)?t:Hd(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ym(e,t,n)}build(e,t,n){Mm(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){mm(e,t,0,r)}mount(e){this.isSVGTag=Lm(e.tagName),super.mount(e)}}const rv=kl(zm({...uh,...Hf,...Lf,...$f},((e,t)=>hm(e)?new nv(t):new tv(t,{allowProjection:e!==je}))));class iv extends Be{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function ov({children:e,isPresent:t}){const n=Un(),r=Dn(null),i=Dn({width:0,height:0,top:0,left:0}),{nonce:o}=Bn(zf);return qr((()=>{const{width:e,height:s,top:a,left:l}=i.current;if(t||!r.current||!e||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return o&&(u.nonce=o),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[t]),no(iv,{isPresent:t,childRef:r,sizeRef:i,children:jr(e,{ref:r})})}const sv=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=_m(av),l=Un(),u=In((()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:e=>{a.set(e,!0);for(const t of a.values())if(!t)return;r&&r()},register:e=>(a.set(e,!1),()=>a.delete(e))})),o?[Math.random()]:[n]);return In((()=>{a.forEach(((e,t)=>a.set(t,!1)))}),[n]),Mn((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(e=no(ov,{isPresent:n,children:e})),no(fp.Provider,{value:u,children:e})};function av(){return new Map}const lv=e=>e.key||"";function uv(e){const t=[];return rr.forEach(e,(e=>{Dr(e)&&t.push(e)})),t}const cv=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=In((()=>uv(e)),[e]),l=a.map(lv),u=Dn(!0),c=Dn(a),d=_m((()=>new Map)),[h,p]=On(a),[f,m]=On(a);Yf((()=>{u.current=!1,c.current=a;for(let e=0;e<f.length;e++){const t=lv(f[e]);l.includes(t)?d.delete(t):!0!==d.get(t)&&d.set(t,!1)}}),[f,l.length,l.join("-")]);const v=[];if(a!==h){let e=[...a];for(let t=0;t<f.length;t++){const n=f[t],r=lv(n);l.includes(r)||(e.splice(t,0,n),v.push(n))}return"wait"===s&&v.length&&(e=v),m(uv(e)),void p(a)}const{forceRender:g}=Bn(mp);return no(je,{children:f.map((e=>{const t=lv(e),h=a===f||l.includes(t);return no(sv,{isPresent:h,initial:!(u.current&&!r)&&void 0,custom:h?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:h?void 0:()=>{if(!d.has(t))return;d.set(t,!0);let e=!0;d.forEach((t=>{t||(e=!1)})),e&&(null==g||g(),m(c.current),i&&i())},children:e},t)}))})};var dv=e=>"checkbox"===e.type,hv=e=>e instanceof Date,pv=e=>null==e;const fv=e=>"object"==typeof e;var mv=e=>!pv(e)&&!Array.isArray(e)&&fv(e)&&!hv(e),vv=e=>mv(e)&&e.target?dv(e.target)?e.target.checked:e.target.value:e,gv=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),yv=e=>{const t=e.constructor&&e.constructor.prototype;return mv(t)&&t.hasOwnProperty("isPrototypeOf")},_v="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function bv(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(_v&&(e instanceof Blob||e instanceof FileList)||!n&&!mv(e))return e;if(t=n?[]:{},n||yv(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=bv(e[n]));else t=e}return t}var wv=e=>Array.isArray(e)?e.filter(Boolean):[],xv=e=>void 0===e,Sv=(e,t,n)=>{if(!t||!mv(e))return n;const r=wv(t.split(/[,[\].]+?/)).reduce(((e,t)=>pv(e)?e:e[t]),e);return xv(r)||r===e?xv(e[t])?n:e[t]:r},kv=e=>"boolean"==typeof e,Ev=e=>/^\w*$/.test(e),Pv=e=>wv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Tv=(e,t,n)=>{let r=-1;const i=Ev(t)?[t]:Pv(t),o=i.length,s=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==s){const n=e[t];o=mv(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t)return;e[t]=o,e=e[t]}return e};const Av={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Cv={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Rv="max",Ov="min",Fv="maxLength",Mv="minLength",Lv="pattern",Dv="required",Vv="validate",Iv=Xr.createContext(null),jv=()=>Xr.useContext(Iv),Bv=e=>{const{children:t,...n}=e;return Xr.createElement(Iv.Provider,{value:n},t)};var Nv=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Cv.all&&(t._proxyFormState[i]=!r||Cv.all),n&&(n[i]=!0),e[i]}});return i},Uv=e=>mv(e)&&!Object.keys(e).length,Gv=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Uv(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!r||Cv.all)))},Wv=e=>Array.isArray(e)?e:[e],Hv=(e,t,n)=>!e||!t||e===t||Wv(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function $v(e){const t=Xr.useRef(e);t.current=e,Xr.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var zv=e=>"string"==typeof e,qv=(e,t,n,r,i)=>zv(e)?(r&&t.watch.add(e),Sv(n,e,i)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),Sv(n,e)))):(r&&(t.watchAll=!0),n);function Kv(e){const t=jv(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,s=gv(i._names.array,n),a=function(e){const t=jv(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:s}=e||{},a=Xr.useRef(r);a.current=r,$v({disabled:o,subject:n._subjects.values,next:e=>{Hv(a.current,e.name,s)&&u(bv(qv(a.current,n._names,e.values||n._formValues,!1,i)))}});const[l,u]=Xr.useState(n._getWatch(r,i));return Xr.useEffect((()=>n._removeUnmounted())),l}({control:i,name:n,defaultValue:Sv(i._formValues,n,Sv(i._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=jv(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[s,a]=Xr.useState(n._formState),l=Xr.useRef(!0),u=Xr.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=Xr.useRef(i);return c.current=i,$v({disabled:r,next:e=>l.current&&Hv(c.current,e.name,o)&&Gv(e,u.current,n._updateFormState)&&a({...n._formState,...e}),subject:n._subjects.state}),Xr.useEffect((()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1})),[n]),Nv(s,n,u.current,!1)}({control:i,name:n,exact:!0}),u=Xr.useRef(i.register(n,{...e.rules,value:a,...kv(e.disabled)?{disabled:e.disabled}:{}}));return Xr.useEffect((()=>{const e=i._options.shouldUnregister||o,t=(e,t)=>{const n=Sv(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=bv(Sv(i._options.defaultValues,n));Tv(i._defaultValues,n,e),xv(Sv(i._formValues,n))&&Tv(i._formValues,n,e)}return()=>{(s?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}}),[n,i,s,o]),Xr.useEffect((()=>{Sv(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:Sv(i._fields,n)._f.value})}),[r,n,i]),{field:{name:n,value:a,...kv(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Xr.useCallback((e=>u.current.onChange({target:{value:vv(e),name:n},type:Av.CHANGE})),[n]),onBlur:Xr.useCallback((()=>u.current.onBlur({target:{value:Sv(i._formValues,n),name:n},type:Av.BLUR})),[n,i]),ref:Xr.useCallback((e=>{const t=Sv(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Sv(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Sv(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Sv(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Sv(l.validatingFields,n)},error:{enumerable:!0,get:()=>Sv(l.errors,n)}})}}const Yv=e=>e.render(Kv(e));var Qv=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Xv=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)}))},Zv=(e,t,n={})=>n.shouldFocus||xv(n.shouldFocus)?n.focusName||`${e}.${xv(n.focusIndex)?t:n.focusIndex}.`:"",Jv=e=>({isOnSubmit:!e||e===Cv.onSubmit,isOnBlur:e===Cv.onBlur,isOnChange:e===Cv.onChange,isOnAll:e===Cv.all,isOnTouch:e===Cv.onTouched}),eg=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const tg=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=Sv(e,i);if(n){const{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(tg(o,t))break}else if(mv(o)&&tg(o,t))break}}};var ng=(e,t,n)=>{const r=Wv(Sv(e,n));return Tv(r,"root",t[n]),Tv(e,n,r),e},rg=e=>"file"===e.type,ig=e=>"function"==typeof e,og=e=>{if(!_v)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},sg=e=>zv(e),ag=e=>"radio"===e.type,lg=e=>e instanceof RegExp;const ug={value:!1,isValid:!1},cg={value:!0,isValid:!0};var dg=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!xv(e[0].attributes.value)?xv(e[0].value)||""===e[0].value?cg:{value:e[0].value,isValid:!0}:cg:ug}return ug};const hg={isValid:!1,value:null};var pg=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),hg):hg;function fg(e,t,n="validate"){if(sg(e)||Array.isArray(e)&&e.every(sg)||kv(e)&&!e)return{type:n,message:sg(e)?e:"",ref:t}}var mg=e=>mv(e)&&!lg(e)?e:{value:e,message:""},vg=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:c,max:d,pattern:h,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=e._f,y=Sv(t,f);if(!v||g)return{};const _=s?s[0]:o,b=e=>{r&&_.reportValidity&&(_.setCustomValidity(kv(e)?"":e||""),_.reportValidity())},w={},x=ag(o),S=dv(o),k=x||S,E=(m||rg(o))&&xv(o.value)&&xv(y)||og(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,P=Qv.bind(null,f,n,w),T=(e,t,n,r=Fv,i=Mv)=>{const s=e?t:n;w[f]={type:e?r:i,message:s,ref:o,...P(e?r:i,s)}};if(i?!Array.isArray(y)||!y.length:a&&(!k&&(E||pv(y))||kv(y)&&!y||S&&!dg(s).isValid||x&&!pg(s).isValid)){const{value:e,message:t}=sg(a)?{value:!!a,message:a}:mg(a);if(e&&(w[f]={type:Dv,message:t,ref:_,...P(Dv,t)},!n))return b(t),w}if(!(E||pv(c)&&pv(d))){let e,t;const r=mg(d),i=mg(c);if(pv(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;zv(r.value)&&y&&(e=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),zv(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);pv(r.value)||(e=n>r.value),pv(i.value)||(t=n<i.value)}if((e||t)&&(T(!!e,r.message,i.message,Rv,Ov),!n))return b(w[f].message),w}if((l||u)&&!E&&(zv(y)||i&&Array.isArray(y))){const e=mg(l),t=mg(u),r=!pv(e.value)&&y.length>+e.value,i=!pv(t.value)&&y.length<+t.value;if((r||i)&&(T(r,e.message,t.message),!n))return b(w[f].message),w}if(h&&!E&&zv(y)){const{value:e,message:t}=mg(h);if(lg(e)&&!y.match(e)&&(w[f]={type:Lv,message:t,ref:o,...P(Lv,t)},!n))return b(t),w}if(p)if(ig(p)){const e=fg(await p(y,t),_);if(e&&(w[f]={...e,...P(Vv,e.message)},!n))return b(e.message),w}else if(mv(p)){let e={};for(const r in p){if(!Uv(e)&&!n)break;const i=fg(await p[r](y,t),_,r);i&&(e={...i,...P(r,i.message)},b(i.message),n&&(w[f]=e))}if(!Uv(e)&&(w[f]={ref:_,...e},!n))return w}return b(!0),w},gg=(e,t)=>[...e,...Wv(t)],yg=e=>Array.isArray(e)?e.map((()=>{})):void 0;function _g(e,t,n){return[...e.slice(0,t),...Wv(n),...e.slice(t)]}var bg=(e,t,n)=>Array.isArray(e)?(xv(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],wg=(e,t)=>[...Wv(t),...Wv(e)];var xg=(e,t)=>xv(t)?[]:function(e,t){let n=0;const r=[...e];for(const i of t)r.splice(i-n,1),n++;return wv(r).length?r:[]}(e,Wv(t).sort(((e,t)=>e-t))),Sg=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function kg(e,t){const n=Array.isArray(t)?t:Ev(t)?[t]:Pv(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=xv(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(mv(r)&&Uv(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!xv(e[t]))return!1;return!0}(r))&&kg(e,n.slice(0,-1)),e}var Eg=(e,t,n)=>(e[t]=n,e);var Pg=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},Tg=e=>pv(e)||!fv(e);function Ag(e,t){if(Tg(e)||Tg(t))return e===t;if(hv(e)&&hv(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(hv(n)&&hv(e)||mv(n)&&mv(e)||Array.isArray(n)&&Array.isArray(e)?!Ag(n,e):n!==e)return!1}}return!0}var Cg=e=>"select-multiple"===e.type,Rg=e=>ag(e)||dv(e),Og=e=>og(e)&&e.isConnected,Fg=e=>{for(const t in e)if(ig(e[t]))return!0;return!1};function Mg(e,t={}){const n=Array.isArray(e);if(mv(e)||n)for(const r in e)Array.isArray(e[r])||mv(e[r])&&!Fg(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Mg(e[r],t[r])):pv(e[r])||(t[r]=!0);return t}function Lg(e,t,n){const r=Array.isArray(e);if(mv(e)||r)for(const i in e)Array.isArray(e[i])||mv(e[i])&&!Fg(e[i])?xv(t)||Tg(n[i])?n[i]=Array.isArray(e[i])?Mg(e[i],[]):{...Mg(e[i])}:Lg(e[i],pv(t)?{}:t[i],n[i]):n[i]=!Ag(e[i],t[i]);return n}var Dg=(e,t)=>Lg(e,t,Mg(t)),Vg=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>xv(e)?e:t?""===e?NaN:e?+e:e:n&&zv(e)?new Date(e):r?r(e):e;function Ig(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return rg(t)?t.files:ag(t)?pg(e.refs).value:Cg(t)?[...t.selectedOptions].map((({value:e})=>e)):dv(t)?dg(e.refs).value:Vg(xv(t.value)?e.ref.value:t.value,e)}var jg=(e,t,n,r)=>{const i={};for(const o of e){const e=Sv(t,o);e&&Tv(i,o,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Bg=e=>xv(e)?e:lg(e)?e.source:mv(e)?lg(e.value)?e.value.source:e.value:e;const Ng="AsyncFunction";var Ug=e=>!(e&&e.validate||!(ig(e.validate)&&e.validate.constructor.name===Ng||mv(e.validate)&&Object.values(e.validate).find((e=>e.constructor.name===Ng)))),Gg=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Wg(e,t,n){const r=Sv(e,n);if(r||Ev(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=Sv(t,r),s=Sv(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}var Hg=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e),$g=(e,t)=>!wv(Sv(e,t)).length&&kg(e,t);const zg={mode:Cv.onSubmit,reValidateMode:Cv.onChange,shouldFocusError:!0};function qg(e={}){let t,n={...zg,...e},r={submitCount:0,isDirty:!1,isLoading:ig(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(mv(n.defaultValues)||mv(n.values))&&bv(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:bv(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:Pg(),array:Pg(),state:Pg()},h=Jv(n.mode),p=Jv(n.reValidateMode),f=n.criteriaMode===Cv.all,m=async e=>{if(c.isValid||e){const e=n.resolver?Uv((await b()).errors):await w(i,!0);e!==r.isValid&&d.state.next({isValid:e})}},v=(e,t)=>{(c.isValidating||c.validatingFields)&&((e||Array.from(l.mount)).forEach((e=>{e&&(t?Tv(r.validatingFields,e,t):kg(r.validatingFields,e))})),d.state.next({validatingFields:r.validatingFields,isValidating:!Uv(r.validatingFields)}))},g=(e,t,n,r)=>{const l=Sv(i,e);if(l){const i=Sv(s,e,xv(n)?Sv(o,e):n);xv(i)||r&&r.defaultChecked||t?Tv(s,e,t?i:Ig(l._f)):k(e,i),a.mount&&m()}},y=(e,t,n,s,a)=>{let l=!1,u=!1;const h={name:e},p=!!(Sv(i,e)&&Sv(i,e)._f&&Sv(i,e)._f.disabled);if(!n||s){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=x(),l=u!==h.isDirty);const n=p||Ag(Sv(o,e),t);u=!(p||!Sv(r.dirtyFields,e)),n||p?kg(r.dirtyFields,e):Tv(r.dirtyFields,e,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!n}if(n){const t=Sv(r.touchedFields,e);t||(Tv(r.touchedFields,e,n),h.touchedFields=r.touchedFields,l=l||c.touchedFields&&t!==n)}return l&&a&&d.state.next(h),l?h:{}},_=(n,i,o,s)=>{const a=Sv(r.errors,n),l=c.isValid&&kv(i)&&r.isValid!==i;var h;if(e.delayError&&o?(h=()=>((e,t)=>{Tv(r.errors,e,t),d.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(u),u=setTimeout(h,e)},t(e.delayError)):(clearTimeout(u),t=null,o?Tv(r.errors,n,o):kg(r.errors,n)),(o?!Ag(a,o):a)||!Uv(s)||l){const e={...s,...l&&kv(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}},b=async e=>{v(e,!0);const t=await n.resolver(s,n.context,jg(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return v(e),t},w=async(e,t,i={valid:!0})=>{for(const o in e){const a=e[o];if(a){const{_f:e,...u}=a;if(e){const u=l.array.has(e.name),d=a._f&&Ug(a._f);d&&c.validatingFields&&v([o],!0);const h=await vg(a,s,f,n.shouldUseNativeValidation&&!t,u);if(d&&c.validatingFields&&v([o]),h[e.name]&&(i.valid=!1,t))break;!t&&(Sv(h,e.name)?u?ng(r.errors,h,e.name):Tv(r.errors,e.name,h[e.name]):kg(r.errors,e.name))}!Uv(u)&&await w(u,t,i)}}return i.valid},x=(e,t)=>(e&&t&&Tv(s,e,t),!Ag(R(),o)),S=(e,t,n)=>qv(e,l,{...a.mount?s:xv(t)?o:zv(e)?{[e]:t}:t},n,t),k=(e,t,n={})=>{const r=Sv(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&Tv(s,e,Vg(t,n)),o=og(n.ref)&&pv(t)?"":t,Cg(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?dv(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):rg(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.values.next({name:e,values:{...s}})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&C(e)},E=(e,t,n)=>{for(const r in t){const o=t[r],s=`${e}.${r}`,a=Sv(i,s);!l.array.has(e)&&Tg(o)&&(!a||a._f)||hv(o)?k(s,o,n):E(s,o,n)}},P=(e,t,n={})=>{const u=Sv(i,e),h=l.array.has(e),p=bv(t);Tv(s,e,p),h?(d.array.next({name:e,values:{...s}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:e,dirtyFields:Dg(o,s),isDirty:x(e,p)})):!u||u._f||pv(p)?k(e,p,n):E(e,p,n),eg(e,l)&&d.state.next({...r}),d.values.next({name:a.mount?e:void 0,values:{...s}})},T=async o=>{a.mount=!0;const u=o.target;let g=u.name,x=!0;const S=Sv(i,g),k=e=>{x=Number.isNaN(e)||Ag(e,Sv(s,g,e))};if(S){let a,E;const P=u.type?Ig(S._f):vv(o),T=o.type===Av.BLUR||o.type===Av.FOCUS_OUT,A=!Gg(S._f)&&!n.resolver&&!Sv(r.errors,g)&&!S._f.deps||Hg(T,Sv(r.touchedFields,g),r.isSubmitted,p,h),R=eg(g,l,T);Tv(s,g,P),T?(S._f.onBlur&&S._f.onBlur(o),t&&t(0)):S._f.onChange&&S._f.onChange(o);const O=y(g,P,T,!1),F=!Uv(O)||R;if(!T&&d.values.next({name:g,type:o.type,values:{...s}}),A)return c.isValid&&("onBlur"===e.mode?T&&m():m()),F&&d.state.next({name:g,...R?{}:O});if(!T&&R&&d.state.next({...r}),n.resolver){const{errors:e}=await b([g]);if(k(P),x){const t=Wg(r.errors,i,g),n=Wg(e,i,t.name||g);a=n.error,g=n.name,E=Uv(e)}}else v([g],!0),a=(await vg(S,s,f,n.shouldUseNativeValidation))[g],v([g]),k(P),x&&(a?E=!1:c.isValid&&(E=await w(i,!0)));x&&(S._f.deps&&C(S._f.deps),_(g,E,a,O))}},A=(e,t)=>{if(Sv(r.errors,t)&&e.focus)return e.focus(),1},C=async(e,t={})=>{let o,s;const a=Wv(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(e)for(const n of e){const e=Sv(t,n);e?Tv(r.errors,n,e):kg(r.errors,n)}else r.errors=t;return t})(xv(e)?e:a);o=Uv(t),s=e?!a.some((e=>Sv(t,e))):o}else e?(s=(await Promise.all(a.map((async e=>{const t=Sv(i,e);return await w(t&&t._f?{[e]:t}:t)})))).every(Boolean),(s||r.isValid)&&m()):s=o=await w(i);return d.state.next({...!zv(e)||c.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!s&&tg(i,A,e?a:l.mount),s},R=e=>{const t={...a.mount?s:o};return xv(e)?t:zv(e)?Sv(t,e):e.map((e=>Sv(t,e)))},O=(e,t)=>({invalid:!!Sv((t||r).errors,e),isDirty:!!Sv((t||r).dirtyFields,e),error:Sv((t||r).errors,e),isValidating:!!Sv(r.validatingFields,e),isTouched:!!Sv((t||r).touchedFields,e)}),F=(e,t,n)=>{const o=(Sv(i,e,{_f:{}})._f||{}).ref,s=Sv(r.errors,e)||{},{ref:a,message:l,type:u,...c}=s;Tv(r.errors,e,{...c,...t,ref:o}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},M=(e,t={})=>{for(const a of e?Wv(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(kg(i,a),kg(s,a)),!t.keepError&&kg(r.errors,a),!t.keepDirty&&kg(r.dirtyFields,a),!t.keepTouched&&kg(r.touchedFields,a),!t.keepIsValidating&&kg(r.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&kg(o,a);d.values.next({values:{...s}}),d.state.next({...r,...t.keepDirty?{isDirty:x()}:{}}),!t.keepIsValid&&m()},L=({disabled:e,name:t,field:n,fields:r,value:i})=>{if(kv(e)&&a.mount||e){const o=e?void 0:xv(i)?Ig(n?n._f:Sv(r,t)._f):i;Tv(s,t,o),y(t,o,!1,!1,!0)}},D=(t,r={})=>{let s=Sv(i,t);const u=kv(r.disabled)||kv(e.disabled);return Tv(i,t,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:t}},name:t,mount:!0,...r}}),l.mount.add(t),s?L({field:s,disabled:kv(r.disabled)?r.disabled:e.disabled,name:t,value:r.value}):g(t,!0,r.value),{...u?{disabled:r.disabled||e.disabled}:{},...n.progressive?{required:!!r.required,min:Bg(r.min),max:Bg(r.max),minLength:Bg(r.minLength),maxLength:Bg(r.maxLength),pattern:Bg(r.pattern)}:{},name:t,onChange:T,onBlur:T,ref:e=>{if(e){D(t,r),s=Sv(i,t);const n=xv(e.value)&&e.querySelectorAll&&e.querySelectorAll("input,select,textarea")[0]||e,a=Rg(n),l=s._f.refs||[];if(a?l.find((e=>e===n)):n===s._f.ref)return;Tv(i,t,{_f:{...s._f,...a?{refs:[...l.filter(Og),n,...Array.isArray(Sv(o,t))?[{}]:[]],ref:{type:n.type,name:t}}:{ref:n}}}),g(t,!1,void 0,n)}else s=Sv(i,t,{}),s._f&&(s._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!gv(l.array,t)||!a.action)&&l.unMount.add(t)}}},V=()=>n.shouldFocusError&&tg(i,A,l.mount),I=(e,t)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=bv(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();r.errors=e,l=t}else await w(i);if(kg(r.errors,"root"),Uv(r.errors)){d.state.next({errors:{}});try{await e(l,o)}catch(u){a=u}}else t&&await t({...r.errors},o),V(),setTimeout(V);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Uv(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(t,n={})=>{const u=t?bv(t):o,h=bv(u),p=Uv(t),f=p?o:h;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)Sv(r.dirtyFields,e)?Tv(f,e,Sv(s,e)):P(e,Sv(f,e));else{if(_v&&xv(t))for(const e of l.mount){const t=Sv(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(og(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}s=e.shouldUnregister?n.keepDefaultValues?bv(o):{}:bv(f),d.array.next({values:{...f}}),d.values.next({values:{...f}})}l={mount:n.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!n.keepIsValid||!!n.keepDirtyValues,a.watch=!!e.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||Ag(t,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&s?Dg(o,s):r.dirtyFields:n.keepDefaultValues&&t?Dg(o,t):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(e,t)=>j(ig(e)?e(s):e,t);return{control:{register:D,unregister:M,getFieldState:O,handleSubmit:I,setError:F,_executeSchema:b,_getWatch:S,_getDirty:x,_updateValid:m,_removeUnmounted:()=>{for(const e of l.unMount){const t=Sv(i,e);t&&(t._f.refs?t._f.refs.every((e=>!Og(e))):!Og(t._f.ref))&&M(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,h=!0)=>{if(l&&n){if(a.action=!0,h&&Array.isArray(Sv(i,e))){const t=n(Sv(i,e),l.argA,l.argB);u&&Tv(i,e,t)}if(h&&Array.isArray(Sv(r.errors,e))){const t=n(Sv(r.errors,e),l.argA,l.argB);u&&Tv(r.errors,e,t),$g(r.errors,e)}if(c.touchedFields&&h&&Array.isArray(Sv(r.touchedFields,e))){const t=n(Sv(r.touchedFields,e),l.argA,l.argB);u&&Tv(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=Dg(o,s)),d.state.next({name:e,isDirty:x(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Tv(s,e,t)},_updateDisabledField:L,_getFieldArray:t=>wv(Sv(a.mount?s:o,t,e.shouldUnregister?Sv(o,t,[]):[])),_reset:j,_resetDefaultValues:()=>ig(n.defaultValues)&&n.defaultValues().then((e=>{B(e,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{kv(e)&&(d.state.next({disabled:e}),tg(i,((t,n)=>{const r=Sv(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:e=>{r.errors=e,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(e){a=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:C,register:D,handleSubmit:I,watch:(e,t)=>ig(e)?d.values.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:P,getValues:R,reset:B,resetField:(e,t={})=>{Sv(i,e)&&(xv(t.defaultValue)?P(e,bv(Sv(o,e))):(P(e,t.defaultValue),Tv(o,e,bv(t.defaultValue))),t.keepTouched||kg(r.touchedFields,e),t.keepDirty||(kg(r.dirtyFields,e),r.isDirty=t.defaultValue?x(e,bv(Sv(o,e))):x()),t.keepError||(kg(r.errors,e),c.isValid&&m()),d.state.next({...r}))},clearErrors:e=>{e&&Wv(e).forEach((e=>kg(r.errors,e))),d.state.next({errors:e?r.errors:{}})},unregister:M,setError:F,setFocus:(e,t={})=>{const n=Sv(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:O}}const Kg="undefined"!=typeof document?Xr.useLayoutEffect:()=>{};const Yg=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Qg=e=>{if(e&&"window"in e&&e.window===e)return e;return Yg(e).defaultView||window};function Xg(e){let t=null;return()=>(null==t&&(t=e()),t)}const Zg=Xg((function(){return e=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform);var e,t})),Jg=Xg((function(){return e=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent));var e,t}));class ey{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function ty(e){let t=Dn({isFocused:!1,observer:null});Kg((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=Dn(null);return Kg((()=>{t.current=e}),[e]),jn(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return jn((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,i=e=>{t.current.isFocused=!1,r.disabled&&n(new ey("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}let ny=null,ry=new Set,iy=new Map,oy=!1,sy=!1;const ay={Tab:!0,Escape:!0};function ly(e,t){for(let n of ry)n(e,t)}function uy(e){oy=!0,function(e){return!(e.metaKey||!Zg()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(ny="keyboard",ly("keyboard",e))}function cy(e){ny="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(oy=!0,ly("pointer",e))}function dy(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Jg()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(oy=!0,ny="virtual")}function hy(e){e.target!==window&&e.target!==document&&(oy||sy||(ny="virtual",ly("virtual",e)),oy=!1,sy=!1)}function py(){oy=!1,sy=!0}function fy(e){if("undefined"==typeof window||iy.get(Qg(e)))return;const t=Qg(e),n=Yg(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){oy=!0,r.apply(this,arguments)},n.addEventListener("keydown",uy,!0),n.addEventListener("keyup",uy,!0),n.addEventListener("click",dy,!0),t.addEventListener("focus",hy,!0),t.addEventListener("blur",py,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",cy,!0),n.addEventListener("pointermove",cy,!0),n.addEventListener("pointerup",cy,!0)):(n.addEventListener("mousedown",cy,!0),n.addEventListener("mousemove",cy,!0),n.addEventListener("mouseup",cy,!0)),t.addEventListener("beforeunload",(()=>{my(e)}),{once:!0}),iy.set(t,{focus:r})}const my=(e,t)=>{const n=Qg(e),r=Yg(e);t&&r.removeEventListener("DOMContentLoaded",t),iy.has(n)&&(n.HTMLElement.prototype.focus=iy.get(n).focus,r.removeEventListener("keydown",uy,!0),r.removeEventListener("keyup",uy,!0),r.removeEventListener("click",dy,!0),n.removeEventListener("focus",hy,!0),n.removeEventListener("blur",py,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",cy,!0),r.removeEventListener("pointermove",cy,!0),r.removeEventListener("pointerup",cy,!0)):(r.removeEventListener("mousedown",cy,!0),r.removeEventListener("mousemove",cy,!0),r.removeEventListener("mouseup",cy,!0)),iy.delete(n))};function vy(){return"pointer"!==ny}"undefined"!=typeof document&&function(e){const t=Yg(e);let n;"loading"!==t.readyState?fy(e):(n=()=>{fy(e)},t.addEventListener("DOMContentLoaded",n))}();const gy=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yy(e,t,n){fy(),Mn((()=>{let t=(t,r)=>{(function(e,t,n){var r;const i="undefined"!=typeof window?Qg(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Qg(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Qg(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Qg(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof i&&!gy.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof o||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===t&&n instanceof a&&!ay[n.key])})(!!(null==n?void 0:n.isTextInput),t,r)&&e(vy())};return ry.add(t),()=>{ry.delete(t)}}),t)}let _y=!1,by=0;function wy(){_y=!0,setTimeout((()=>{_y=!1}),50)}function xy(e){"touch"===e.pointerType&&wy()}function Sy(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",xy):document.addEventListener("touchend",wy),by++,()=>{by--,by>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",xy):document.removeEventListener("touchend",wy))}}function ky(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,s]=On(!1),a=Dn({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Mn(Sy,[]);let{hoverProps:l,triggerHoverEnd:u}=In((()=>{let e=(e,r)=>{if(a.pointerType=r,i||"touch"===r||a.isHovered||!e.currentTarget.contains(e.target))return;a.isHovered=!0;let o=e.currentTarget;a.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),s(!0)},o=(e,t)=>{if(a.pointerType="",a.target=null,"touch"===t||!a.isHovered)return;a.isHovered=!1;let i=e.currentTarget;r&&r({type:"hoverend",target:i,pointerType:t}),n&&n(!1),s(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{_y&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{a.ignoreEmulatedMouseEvents||_y||e(t,"mouse"),a.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[t,n,r,i,a]);return Mn((()=>{i&&u({currentTarget:a.target},a.pointerType)}),[i]),{hoverProps:l,isHovered:o}}function Ey(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=Dn({isFocused:!1,isFocusVisible:t||vy()}),[o,s]=On(!1),[a,l]=On((()=>i.current.isFocused&&i.current.isFocusVisible)),u=jn((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),c=jn((e=>{i.current.isFocused=e,s(e),u()}),[u]);yy((e=>{i.current.isFocusVisible=e,u()}),[],{isTextInput:n});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=jn((e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0}),[r,i]),s=ty(o),a=jn((e=>{const t=Yg(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),s(e))}),[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?a:void 0,onBlur:t||!r&&!i?void 0:o}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=Dn({isFocusWithin:!1}),s=jn((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,o]),a=ty(s),l=jn((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(r&&r(e),i&&i(!0),o.current.isFocusWithin=!0,a(e))}),[r,i,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:a,focusProps:r?h:d}}var Py=Object.defineProperty,Ty=(e,t,n)=>(((e,t,n)=>{t in e?Py(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let Ay=new class{constructor(){Ty(this,"current",this.detect()),Ty(this,"handoffState","pending"),Ty(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function Cy(e){return Ay.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Ry(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Oy(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add((()=>e.removeEventListener(n,r,i)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return Ry((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=Oy();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Fy(){let[e]=On(Oy);return Mn((()=>()=>e.dispose()),[e]),e}let My=(e,t)=>{Ay.isServer?Mn(e,t):Ln(e,t)};function Ly(e){let t=Dn(e);return My((()=>{t.current=e}),[e]),t}let Dy=function(e){let t=Ly(e);return Xr.useCallback(((...e)=>t.current(...e)),[t])};function Vy({disabled:e=!1}={}){let t=Dn(null),[n,r]=On(!1),i=Fy(),o=Dy((()=>{t.current=null,r(!1),i.dispose()})),s=Dy((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,r(!0);{let n=Cy(e.currentTarget);i.addEventListener(n,"pointerup",o,!1),i.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);r(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",o,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}let Iy=ot(void 0);function jy(){return Bn(Iy)}function By({value:e,children:t}){return Xr.createElement(Iy.Provider,{value:e},t)}function Ny(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function Uy(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Uy),r}var Gy,Wy,Hy=((Wy=Hy||{})[Wy.None=0]="None",Wy[Wy.RenderStrategy=1]="RenderStrategy",Wy[Wy.Static=2]="Static",Wy),$y=((Gy=$y||{})[Gy.Unmount=0]="Unmount",Gy[Gy.Hidden=1]="Hidden",Gy);function zy({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:Ky;let l=Yy(t,e);if(o)return qy(l,n,r,s,a);let u=null!=i?i:0;if(2&u){let{static:e=!1,...t}=l;if(e)return qy(t,n,r,s,a)}if(1&u){let{unmount:e=!0,...t}=l;return Uy(e?0:1,{0:()=>null,1:()=>qy({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return qy(l,n,r,s,a)}function qy(e,t={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=Jy(e,["unmount","static"]),u=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof s?s(t):s;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=n.join(" ");for(let e of n)d[`data-${e}`]=""}}if(o===je&&(Object.keys(Zy(l)).length>0||Object.keys(Zy(d)).length>0)){if(Dr(c)&&!(Array.isArray(c)&&c.length>1)){let e=c.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>Ny(t(...e),l.className):Ny(t,l.className),r=n?{className:n}:{},o=Yy(c.props,Zy(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(Zy(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(Zy(l)).concat(Object.keys(Zy(d))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return De(o,Object.assign({},Jy(l,["ref"]),o!==je&&u,o!==je&&d),c)}function Ky(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Yy(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let r in n)Object.assign(t,{[r](e,...t){let i=n[r];for(let n of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Qy(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let r in n)Object.assign(t,{[r](...e){let t=n[r];for(let n of t)null==n||n(...e)}});return t}function Xy(e){var t;return Object.assign(tr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Zy(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function Jy(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function e_(e,t,n){let[r,i]=On(n),o=void 0!==e,s=Dn(o),a=Dn(!1),l=Dn(!1);return!o||s.current||a.current?!o&&s.current&&!l.current&&(l.current=!0,s.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,s.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?e:r,Dy((e=>(o||i(e),null==t?void 0:t(e))))]}function t_(e){let[t]=On(e);return t}function n_(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))i_(n,r_(t,r),i);return n}function r_(e,t){return e?e+"["+t+"]":t}function i_(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())i_(e,r_(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):n_(n,t,e)}function o_(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}}var s_=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(s_||{});let a_=Xy((function(e,t){var n;let{features:r=1,...i}=e;return zy({ourProps:{ref:t,"aria-hidden":!(2&~r)||(null!=(n=i["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}},theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})})),l_=ot(null);function u_(e){let[t,n]=On(null);return Xr.createElement(l_.Provider,{value:{target:t}},e.children,Xr.createElement(a_,{features:s_.Hidden,ref:n}))}function c_({children:e}){let t=Bn(l_);if(!t)return Xr.createElement(Xr.Fragment,null,e);let{target:n}=t;return n?mr(Xr.createElement(Xr.Fragment,null,e),n):null}function d_({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[o,s]=On(null),a=Fy();return Mn((()=>{if(r&&o)return a.addEventListener(o,"reset",r)}),[o,t,r]),Xr.createElement(c_,null,Xr.createElement(h_,{setForm:s,formId:t}),n_(e).map((([e,r])=>Xr.createElement(a_,{features:s_.Hidden,...Zy({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...i})}))))}function h_({setForm:e,formId:t}){return Mn((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:Xr.createElement(a_,{features:s_.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}let p_=ot(void 0);function f_(){return Bn(p_)}function m_({id:e,children:t}){return Xr.createElement(p_.Provider,{value:e},t)}function v_(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}let g_=Symbol();function y_(...e){let t=Dn(e);Mn((()=>{t.current=e}),[e]);let n=Dy((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[g_])))?void 0:n}let __=ot(null);function b_(){let e=Bn(__);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,b_),e}return e}function w_(){var e,t;return null!=(t=null==(e=Bn(__))?void 0:e.value)?t:void 0}function x_(){let[e,t]=On([]);return[e.length>0?e.join(" "):void 0,In((()=>function(e){let n=Dy((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),r=In((()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value})),[n,e.slot,e.name,e.props,e.value]);return Xr.createElement(__.Provider,{value:r},e.children)}),[t])]}__.displayName="DescriptionContext";let S_=Xy((function(e,t){let n=Un(),r=jy(),{id:i=`headlessui-description-${n}`,...o}=e,s=b_(),a=y_(t);My((()=>s.register(i)),[i,s.register]);let l=r||!1,u=In((()=>({...s.slot,disabled:l})),[s.slot,l]);return zy({ourProps:{ref:a,...s.props,id:i},theirProps:o,slot:u,defaultTag:"p",name:s.name||"Description"})})),k_=Object.assign(S_,{});var E_,P_=((E_=P_||{}).Space=" ",E_.Enter="Enter",E_.Escape="Escape",E_.Backspace="Backspace",E_.Delete="Delete",E_.ArrowLeft="ArrowLeft",E_.ArrowUp="ArrowUp",E_.ArrowRight="ArrowRight",E_.ArrowDown="ArrowDown",E_.Home="Home",E_.End="End",E_.PageUp="PageUp",E_.PageDown="PageDown",E_.Tab="Tab",E_);let T_=ot(null);function A_(){let e=Bn(T_);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,A_),e}return e}function C_(e){var t,n,r;let i=null!=(n=null==(t=Bn(T_))?void 0:t.value)?n:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function R_({inherit:e=!1}={}){let t=C_(),[n,r]=On([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,In((()=>function(e){let t=Dy((e=>(r((t=>[...t,e])),()=>r((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=In((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return Xr.createElement(T_.Provider,{value:n},e.children)}),[r])]}T_.displayName="LabelContext";let O_=Xy((function(e,t){var n;let r=Un(),i=A_(),o=f_(),s=jy(),{id:a=`headlessui-label-${r}`,htmlFor:l=(null!=o?o:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...c}=e,d=y_(t);My((()=>i.register(a)),[a,i.register]);let h=Dy((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),p=s||!1,f=In((()=>({...i.slot,disabled:p})),[i.slot,p]),m={ref:d,...i.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),zy({ourProps:m,theirProps:c,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})})),F_=Object.assign(O_,{});function M_(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function L_(e,t=!1){let[n,r]=Fn((()=>({})),{}),i=In((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return My((()=>{if(!e)return;let t=new ResizeObserver(r);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}let D_=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function V_(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...i){let o=t[e].call(n,...i);o&&(n=o,r.forEach((e=>e())))}}}function I_(e){return Yr(e.subscribe,e.getSnapshot,e.getSnapshot)}let j_=new D_((()=>V_((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function B_(e,t){let n=j_.get(t),r=Un(),i=I_(n);if(My((()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)}),[n,e]),!e)return!1;let o=i.indexOf(r),s=i.length;return-1===o&&(o=s,s+=1),o===s-1}let N_=new Map,U_=new Map;function G_(e){var t;let n=null!=(t=U_.get(e))?t:0;return U_.set(e,n+1),0!==n||(N_.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>W_(e)}function W_(e){var t;let n=null!=(t=U_.get(e))?t:1;if(1===n?U_.delete(e):U_.set(e,n-1),1!==n)return;let r=N_.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,N_.delete(e))}let H_=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),$_=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var z_,q_,K_,Y_=((K_=Y_||{})[K_.First=1]="First",K_[K_.Previous=2]="Previous",K_[K_.Next=4]="Next",K_[K_.Last=8]="Last",K_[K_.WrapAround=16]="WrapAround",K_[K_.NoScroll=32]="NoScroll",K_[K_.AutoFocus=64]="AutoFocus",K_),Q_=((q_=Q_||{})[q_.Error=0]="Error",q_[q_.Overflow=1]="Overflow",q_[q_.Success=2]="Success",q_[q_.Underflow=3]="Underflow",q_),X_=((z_=X_||{})[z_.Previous=-1]="Previous",z_[z_.Next=1]="Next",z_);function Z_(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(H_)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var J_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(J_||{});function eb(e,t=0){var n;return e!==(null==(n=Cy(e))?void 0:n.body)&&Uy(t,{0:()=>e.matches(H_),1(){let t=e;for(;null!==t;){if(t.matches(H_))return!0;t=t.parentElement}return!1}})}var tb=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(tb||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let nb=["textarea","input"].join(",");function rb(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function ib(e,t){return function(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?rb(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll($_)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):Z_(e);i.length>0&&s.length>1&&(s=s.filter((e=>!i.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),r=null!=r?r:o.activeElement;let a,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,s.indexOf(r))-1;if(4&t)return Math.max(0,s.indexOf(r))+1;if(8&t)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},d=0,h=s.length;do{if(d>=h||d+h<=0)return 0;let e=u+d;if(16&t)e=(e+h)%h;else{if(e<0)return 3;if(e>=h)return 1}a=s[e],null==a||a.focus(c),d+=l}while(a!==o.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,nb))&&n}(a)&&a.select(),2}(Z_(),t,{relativeTo:e})}function ob(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function sb(){return ob()||/Android/gi.test(window.navigator.userAgent)}function ab(e,t,n,r){let i=Ly(n);Mn((()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}const lb=30;function ub(e,t,n){let r=B_(e,"outside-click"),i=Ly(n),o=jn((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!eb(r,J_.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i,t]),s=Dn(null);ab(r,"pointerdown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),ab(r,"mousedown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),ab(r,"click",(e=>{sb()||s.current&&(o(e,(()=>s.current)),s.current=null)}),!0);let a=Dn({x:0,y:0});ab(r,"touchstart",(e=>{a.current.x=e.touches[0].clientX,a.current.y=e.touches[0].clientY}),!0),ab(r,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-a.current.x)>=lb||Math.abs(n-a.current.y)>=lb))return o(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,r){let i=Ly(n);Mn((()=>{if(e)return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}(r,"blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function cb(...e){return In((()=>Cy(...e)),[...e])}function db(e,t){return In((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function hb(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=null!=(n=t.defaultView)?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`)}}}function pb(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let fb=V_((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:Oy(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:pb(n)},i=[ob()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=Oy();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),s=e.querySelector(i);s&&!r(s)&&(o=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},hb(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(r))),i.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function mb(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=I_(fb),i=t?r.get(t):void 0,o=!!i&&i.count>0;My((()=>{if(t&&e)return fb.dispatch("PUSH",t,n),()=>fb.dispatch("POP",t,n)}),[e,t])}(B_(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}function vb(e){return[e.screenX,e.screenY]}fb.subscribe((()=>{let e=fb.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&fb.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&fb.dispatch("TEARDOWN",n)}}));var gb;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"test"===(null==(gb=null==process?void 0:{})?void 0:gb.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 yb=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(yb||{});function _b(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function bb(e,t,n,r){let[i,o]=On(n),{hasFlag:s,addFlag:a,removeFlag:l}=function(e=0){let[t,n]=On(e),r=jn((e=>n(e)),[t]),i=jn((e=>n((t=>t|e))),[t]),o=jn((e=>(t&e)===e),[t]),s=jn((e=>n((t=>t&~e))),[n]),a=jn((e=>n((t=>t^e))),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(e&&i?3:0),u=Dn(!1),c=Dn(!1),d=Fy();return My((()=>{var i;if(e)return n&&o(!0),t?(null==(i=null==r?void 0:r.start)||i.call(r,n),function(e,{prepare:t,run:n,done:r,inFlight:i}){let o=Oy();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{n(),o.requestAnimationFrame((()=>{o.add(function(e,t){var n,r;let i=Oy();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),i.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,r))}))})),o.dispose}(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){c.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var e;c.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(u.current=!1,l(7),n||o(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})):void(n&&a(3))}),[e,n,t,d]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function wb(){return"undefined"!=typeof window}function xb(e){return Eb(e)?(e.nodeName||"").toLowerCase():"#document"}function Sb(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function kb(e){var t;return null==(t=(Eb(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Eb(e){return!!wb()&&(e instanceof Node||e instanceof Sb(e).Node)}function Pb(e){return!!wb()&&(e instanceof Element||e instanceof Sb(e).Element)}function Tb(e){return!!wb()&&(e instanceof HTMLElement||e instanceof Sb(e).HTMLElement)}function Ab(e){return!(!wb()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Sb(e).ShadowRoot)}function Cb(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Db(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Rb(e){return["table","td","th"].includes(xb(e))}function Ob(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(Gy){return!1}}))}function Fb(e){const t=Mb(),n=Pb(e)?Db(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Mb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Lb(e){return["html","body","#document"].includes(xb(e))}function Db(e){return Sb(e).getComputedStyle(e)}function Vb(e){return Pb(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ib(e){if("html"===xb(e))return e;const t=e.assignedSlot||e.parentNode||Ab(e)&&e.host||kb(e);return Ab(t)?t.host:t}function jb(e){const t=Ib(e);return Lb(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tb(t)&&Cb(t)?t:jb(t)}function Bb(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=jb(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=Sb(i);if(o){const e=Nb(s);return t.concat(s,s.visualViewport||[],Cb(i)?i:[],e&&n?Bb(e):[])}return t.concat(i,Bb(i,[],n))}function Nb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ub=Math.min,Gb=Math.max,Wb=Math.round,Hb=Math.floor,$b=e=>({x:e,y:e}),zb={left:"right",right:"left",bottom:"top",top:"bottom"},qb={start:"end",end:"start"};function Kb(e,t,n){return Gb(e,Ub(t,n))}function Yb(e,t){return"function"==typeof e?e(t):e}function Qb(e){return e.split("-")[0]}function Xb(e){return e.split("-")[1]}function Zb(e){return"x"===e?"y":"x"}function Jb(e){return"y"===e?"height":"width"}function ew(e){return["top","bottom"].includes(Qb(e))?"y":"x"}function tw(e){return Zb(ew(e))}function nw(e){return e.replace(/start|end/g,(e=>qb[e]))}function rw(e){return e.replace(/left|right|bottom|top/g,(e=>zb[e]))}function iw(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ow(e,t,n){let{reference:r,floating:i}=e;const o=ew(t),s=tw(t),a=Jb(s),l=Qb(t),u="y"===o,c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Xb(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function sw(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Yb(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[h?"floating"===d?"reference":"floating":d],v=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},b=iw(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-b.top+f.top)/_.y,bottom:(b.bottom-v.bottom+f.bottom)/_.y,left:(v.left-b.left+f.left)/_.x,right:(b.right-v.right+f.right)/_.x}}function aw(e){const t=Db(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Tb(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Wb(n)!==o||Wb(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function lw(e){return Pb(e)?e:e.contextElement}function uw(e){const t=lw(e);if(!Tb(t))return $b(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=aw(t);let s=(o?Wb(n.width):n.width)/r,a=(o?Wb(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const cw=$b(0);function dw(e){const t=Sb(e);return Mb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:cw}function hw(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=lw(e);let s=$b(1);t&&(r?Pb(r)&&(s=uw(r)):s=uw(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Sb(e))&&t}(o,n,r)?dw(o):$b(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const e=Sb(o),t=r&&Pb(r)?Sb(r):r;let n=e,i=Nb(n);for(;i&&r&&t!==n;){const e=uw(i),t=i.getBoundingClientRect(),r=Db(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=o,u+=s,n=Sb(i),i=Nb(n)}}return iw({width:c,height:d,x:l,y:u})}function pw(e,t){const n=Vb(e).scrollLeft;return t?t.left+n:hw(kb(e)).left+n}function fw(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Sb(e),r=kb(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const e=Mb();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=kb(e),n=Vb(e),r=e.ownerDocument.body,i=Gb(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Gb(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+pw(e);const a=-n.scrollTop;return"rtl"===Db(r).direction&&(s+=Gb(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(kb(e));else if(Pb(t))r=function(e,t){const n=hw(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Tb(e)?uw(e):$b(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=dw(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return iw(r)}function mw(e,t){const n=Ib(e);return!(n===t||!Pb(n)||Lb(n))&&("fixed"===Db(n).position||mw(n,t))}function vw(e,t,n){const r=Tb(t),i=kb(t),o="fixed"===n,s=hw(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=$b(0);if(r||!r&&!o)if(("body"!==xb(t)||Cb(i))&&(a=Vb(t)),r){const e=hw(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=pw(i));let u=0,c=0;if(i&&!r&&!o){const e=i.getBoundingClientRect();c=e.top+a.scrollTop,u=e.left+a.scrollLeft-pw(i,e)}return{x:s.left+a.scrollLeft-l.x-u,y:s.top+a.scrollTop-l.y-c,width:s.width,height:s.height}}function gw(e){return"static"===Db(e).position}function yw(e,t){if(!Tb(e)||"fixed"===Db(e).position)return null;if(t)return t(e);let n=e.offsetParent;return kb(e)===n&&(n=n.ownerDocument.body),n}function _w(e,t){const n=Sb(e);if(Ob(e))return n;if(!Tb(e)){let t=Ib(e);for(;t&&!Lb(t);){if(Pb(t)&&!gw(t))return t;t=Ib(t)}return n}let r=yw(e,t);for(;r&&Rb(r)&&gw(r);)r=yw(r,t);return r&&Lb(r)&&gw(r)&&!Fb(r)?n:r||function(e){let t=Ib(e);for(;Tb(t)&&!Lb(t);){if(Fb(t))return t;if(Ob(t))return null;t=Ib(t)}return null}(e)||n}const bw={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,s=kb(r),a=!!t&&Ob(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=$b(1);const c=$b(0),d=Tb(r);if((d||!d&&!o)&&(("body"!==xb(r)||Cb(s))&&(l=Vb(r)),Tb(r))){const e=hw(r);u=uw(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:kb,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?Ob(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Bb(e,[],!1).filter((e=>Pb(e)&&"body"!==xb(e))),i=null;const o="fixed"===Db(e).position;let s=o?Ib(e):e;for(;Pb(s)&&!Lb(s);){const t=Db(s),n=Fb(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||Cb(s)&&!n&&mw(e,s))?r=r.filter((e=>e!==s)):i=t,s=Ib(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=o[0],a=o.reduce(((e,n)=>{const r=fw(t,n,i);return e.top=Gb(r.top,e.top),e.right=Ub(r.right,e.right),e.bottom=Ub(r.bottom,e.bottom),e.left=Gb(r.left,e.left),e}),fw(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:_w,getElementRects:async function(e){const t=this.getOffsetParent||_w,n=this.getDimensions,r=await n(e.floating);return{reference:vw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=aw(e);return{width:t,height:n}},getScale:uw,isElement:Pb,isRTL:function(e){return"rtl"===Db(e).direction}};function ww(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=lw(e),c=i||o?[...u?Bb(u):[],...Bb(t)]:[];c.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=u&&a?function(e,t){let n,r=null;const i=kb(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const{left:u,top:c,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p={rootMargin:-Hb(c)+"px "+-Hb(i.clientWidth-(u+d))+"px "+-Hb(i.clientHeight-(c+h))+"px "+-Hb(u)+"px",threshold:Gb(0,Ub(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}f=!1}try{r=new IntersectionObserver(m,{...p,root:i.ownerDocument})}catch(Gy){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),o}(u,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),u&&!l&&f.observe(u),f.observe(t));let m=l?hw(e):null;return l&&function t(){const r=hw(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const xw=sw,Sw=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Qb(n),a=Xb(n),l="y"===ew(n),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Yb(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},kw=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Yb(e,t),u={x:n,y:r},c=await sw(t,l),d=ew(Qb(i)),h=Zb(d);let p=u[h],f=u[d];if(o){const e="y"===h?"bottom":"right";p=Kb(p+c["y"===h?"top":"left"],p,p-c[e])}if(s){const e="y"===d?"bottom":"right";f=Kb(f+c["y"===d?"top":"left"],f,f-c[e])}const m=a.fn({...t,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},Ew=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=Yb(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Qb(i),y=ew(a),_=Qb(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(u.floating)),w=h||(_||!m?[rw(a)]:function(e){const t=rw(e);return[nw(e),t,nw(t)]}(a)),x="none"!==f;!h&&x&&w.push(...function(e,t,n,r){const i=Xb(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}(Qb(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(nw)))),o}(a,m,f,b));const S=[a,...w],k=await sw(t,v),E=[];let P=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&E.push(k[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Xb(e),i=tw(e),o=Jb(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=rw(s)),[s,rw(s)]}(i,s,b);E.push(k[e[0]],k[e[1]])}if(P=[...P,{placement:i,overflows:E}],!E.every((e=>e<=0))){var T,A;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(A=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var C;const e=null==(C=P.filter((e=>{if(x){const t=ew(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},Pw=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Yb(e,t),c=await sw(t,u),d=Qb(i),h=Xb(i),p="y"===ew(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,b=Ub(m-c[v],y),w=Ub(f-c[g],_),x=!t.middlewareData.shift;let S=b,k=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=_),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=y),x&&!h){const e=Gb(c.left,0),t=Gb(c.right,0),n=Gb(c.top,0),r=Gb(c.bottom,0);p?k=f-2*(0!==e||0!==t?e+t:Gb(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:Gb(c.top,c.bottom))}await l({...t,availableWidth:k,availableHeight:S});const E=await s.getDimensions(a.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Tw=(e,t,n)=>{const r=new Map,i={platform:bw,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=ow(u,r,l),h=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:n,fn:o}=a[m],{x:v,y:g,data:y,reset:_}=await o({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=v?v:c,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(h=_.placement),_.rects&&(u=!0===_.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):_.rects),({x:c,y:d}=ow(u,h,l))),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}})(e,t,{...i,platform:o})};var Aw="undefined"!=typeof document?Ln:Mn;function Cw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Cw(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!Cw(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Rw(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ow(e,t){const n=Rw(e);return Math.round(t*n)/n}function Fw(e){const t=Dn(e);return Aw((()=>{t.current=e})),t}const Mw=(e,t)=>({...Sw(e),options:[e,t]}),Lw=(e,t)=>({...kw(e),options:[e,t]}),Dw=(e,t)=>({...Ew(e),options:[e,t]}),Vw=(e,t)=>({...Pw(e),options:[e,t]}),Iw={...Zr},jw=Iw.useInsertionEffect||(e=>e());function Bw(e){const t=Dn((()=>{}));return jw((()=>{t.current=e})),jn((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var Nw="undefined"!=typeof document?Ln:Mn;let Uw=!1,Gw=0;const Ww=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Gw++;const Hw=Iw.useId||function(){const[e,t]=On((()=>Uw?Ww():void 0));return Nw((()=>{null==e&&t(Ww())}),[]),Mn((()=>{Uw=!0}),[]),e};const $w=ot(null),zw=ot(null),qw=()=>{var e;return(null==(e=Bn($w))?void 0:e.id)||null},Kw=()=>Bn(zw),Yw="data-floating-ui-focusable";function Qw(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Hw(),o=Dn({}),[s]=On((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),a=null!=qw(),[l,u]=On(r.reference),c=Bw(((e,t,r)=>{o.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)})),d=In((()=>({setPositionReference:u})),[]),h=In((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return In((()=>({dataRef:o,open:t,onOpenChange:c,elements:h,events:s,floatingId:i,refs:d})),[t,c,h,s,i,d])}function Xw(e){void 0===e&&(e={});const{nodeId:t}=e,n=Qw({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,s]=On(null),[a,l]=On(null),u=(null==i?void 0:i.reference)||o,c=Dn(null),d=Kw();Nw((()=>{u&&(c.current=u)}),[u]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=On({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=On(r);Cw(h,r)||p(r);const[f,m]=On(null),[v,g]=On(null),y=jn((e=>{e!==x.current&&(x.current=e,m(e))}),[]),_=jn((e=>{e!==S.current&&(S.current=e,g(e))}),[]),b=o||f,w=s||v,x=Dn(null),S=Dn(null),k=Dn(c),E=null!=l,P=Fw(l),T=Fw(i),A=Fw(u),C=jn((()=>{if(!x.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};T.current&&(e.platform=T.current),Tw(x.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};R.current&&!Cw(k.current,t)&&(k.current=t,Gr((()=>{d(t)})))}))}),[h,t,n,T,A]);Aw((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const R=Dn(!1);Aw((()=>(R.current=!0,()=>{R.current=!1})),[]),Aw((()=>{if(b&&(x.current=b),w&&(S.current=w),b&&w){if(P.current)return P.current(b,w,C);C()}}),[b,w,C,P,E]);const O=In((()=>({reference:x,floating:S,setReference:y,setFloating:_})),[y,_]),F=In((()=>({reference:b,floating:w})),[b,w]),M=In((()=>{const e={position:n,left:0,top:0};if(!F.floating)return e;const t=Ow(F.floating,c.x),r=Ow(F.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Rw(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,F.floating,c.x,c.y]);return In((()=>({...c,update:C,refs:O,elements:F,floatingStyles:M})),[c,C,O,F,M])}({...e,elements:{...i,...a&&{reference:a}}}),p=jn((e=>{const t=Pb(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),f=jn((e=>{(Pb(e)||null===e)&&(c.current=e,s(e)),(Pb(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!Pb(e))&&h.refs.setReference(e)}),[h.refs]),m=In((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:c})),[h.refs,f,p]),v=In((()=>({...h.elements,domReference:u})),[h.elements,u]),g=In((()=>({...h,...r,refs:m,elements:v,nodeId:t})),[h,m,v,t,r]);return Nw((()=>{r.dataRef.current.floatingContext=g;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=g)})),In((()=>({...h,context:g,refs:m,elements:v})),[h,m,v,g])}const Zw="active",Jw="selected";function ex(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[Zw]:t,[Jw]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[Yw]:""},...o,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,o]=t;var s;i&&[Zw,Jw].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(s=r.get(n))||s.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}function tx(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const nx=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Yb(e,t),{rects:d,elements:{floating:h}}=t,p=n.current[s],f=(null==u?void 0:u.current)||h,m=h.clientTop||f.clientTop,v=0!==h.clientTop,g=0!==f.clientTop,y=h===f;if(!p)return{};const _={...t,...await Mw(-p.offsetTop-h.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(t)},b=await xw(tx(_,f.scrollHeight+m+h.clientTop),c),w=await xw(_,{...c,elementContext:"reference"}),x=Gb(0,b.top),S=_.y+x,k=Wb(Gb(0,f.scrollHeight+(v&&y||g?2*m:0)-x-Gb(0,b.bottom)));if(f.style.maxHeight=k+"px",f.scrollTop=x,i){const e=f.scrollHeight>f.offsetHeight&&f.offsetHeight<p.offsetHeight*a-1||w.top>=-l||w.bottom>=-l;Gr((()=>i(e)))}return r&&(r.current=await xw(tx({..._,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function rx(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=t,l=Bw(a),u=Dn(!1),c=Dn(null),d=Dn(null);Mn((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const n=e.deltaY,r=o.current.top>=-.5,i=o.current.bottom>=-.5,s=t.scrollHeight-t.clientHeight,a=n<0?-1:1,u=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),Gr((()=>{l((e=>e+Math[u](n,s*a)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==s?void 0:s.current)||r.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{c.current=t.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{c.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,r.floating,o,s,l]);const h=In((()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const e=(null==s?void 0:s.current)||r.floating;if(o.current&&e&&u.current){if(null!==c.current){const t=e.scrollTop-c.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&Gr((()=>l((e=>e+t))))}requestAnimationFrame((()=>{c.current=e.scrollTop}))}}})),[r.floating,l,o,s]);return In((()=>i?{floating:h}:{}),[i,h])}let ix=ot({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ix.displayName="FloatingContext";let ox=ot(null);ox.displayName="PlacementContext";let sx=4;function ax({children:e,enabled:t=!0}){let[n,r]=On(null),[i,o]=On(0),s=Dn(null),[a,l]=On(null);!function(e){My((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(a);let u=t&&null!==n&&null!==a,{to:c="bottom",gap:d=0,offset:h=0,padding:p=0,inner:f}=function(e,t){var n,r,i;let o=lx(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=lx(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=lx(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:a}}(n,a),[m,v="center"]=c.split(" ");My((()=>{u&&o(0)}),[u]);let{refs:g,floatingStyles:y,context:_}=Xw({open:u,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[Mw({mainAxis:"selection"===m?0:d,crossAxis:h}),Lw({padding:p}),"selection"!==m&&Dw({padding:p}),"selection"===m&&f?nx({...f,padding:p,overflowRef:s,offset:i,minItemsVisible:sx,referenceOverflowThreshold:p,onFallbackChange(e){var t,n;if(!e)return;let r=_.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,s=Math.min(sx,r.childElementCount),a=0,l=0;for(let o of null!=(n=null==(t=_.elements.floating)?void 0:t.childNodes)?n:[])if(o instanceof HTMLElement){let e=o.offsetTop,t=e+o.clientHeight+i,n=r.scrollTop,u=n+r.clientHeight;if(!(e>=n&&t<=u)){l=Math.max(0,Math.min(t,u)-Math.max(e,n)),a=o.clientHeight;break}s--}s>=1&&o((e=>{let t=a*s-l+i;return e>=t?e:t}))}}):null,Vw({padding:p,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:ww}),[b=m,w=v]=_.placement.split("-");"selection"===m&&(b="selection");let x=In((()=>({anchor:[b,w].filter(Boolean).join(" ")})),[b,w]),S=rx(_,{overflowRef:s,onChange:o}),{getReferenceProps:k,getFloatingProps:E}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),i=jn((t=>ex(t,e,"reference")),t),o=jn((t=>ex(t,e,"floating")),n),s=jn((t=>ex(t,e,"item")),r);return In((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s})),[i,o,s])}([S]),P=Dy((e=>{l(e),g.setFloating(e)}));return De(ox.Provider,{value:r},De(ix.Provider,{value:{setFloating:P,setReference:g.setReference,styles:y,getReferenceProps:k,getFloatingProps:E,slot:x}},e))}function lx(e,t,n=void 0){let r=Fy(),i=Dy(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let i=cx(e,t);return[i,n=>{let o=ux(e);{let s=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));r.requestAnimationFrame((function a(){r.nextFrame(a);let l=!1;for(let[e,n]of o.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let u=cx(e,t);i!==u&&(n(u),i=u)}))}return r.dispose}]}return[n,null]})),o=In((()=>i(e,t)[0]),[e,t]),[s=o,a]=On();return My((()=>{let[n,r]=i(e,t);if(a(n),r)return r(a)}),[e,t]),s}function ux(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...ux(r)]:[n]}return[]}function cx(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}let dx=ot(null);dx.displayName="OpenClosedContext";var hx=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(hx||{});function px(){return Bn(dx)}function fx({value:e,children:t}){return Xr.createElement(dx.Provider,{value:e},t)}var mx,vx=((mx=vx||{})[mx.First=0]="First",mx[mx.Previous=1]="Previous",mx[mx.Next=2]="Next",mx[mx.Last=3]="Last",mx[mx.Specific=4]="Specific",mx[mx.Nothing=5]="Nothing",mx);function gx(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function yx(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Zr&&(e=>e.useSyncExternalStore)(Zr)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=On(Ay.isHandoffComplete);return t&&!1===Ay.isHandoffComplete&&n(!1),Mn((()=>{!0!==t&&n(!0)}),[t]),Mn((()=>Ay.handoff()),[]),!e&&t}let _x=ot(!1);function bx(e){let t=Bn(_x),n=Bn(kx),r=cb(e),[i,o]=On((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e: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 Mn((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),Mn((()=>{t||null!==n&&o(n.current)}),[n,o,t]),i}let wx=je,xx=Xy((function(e,t){let n=e,r=Dn(null),i=y_(function(e,t=!0){return Object.assign(e,{[g_]:t})}((e=>{r.current=e})),t),o=cb(r),s=bx(r),[a]=On((()=>{var e;return Ay.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=Bn(Ex),u=yx();return My((()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))}),[s,a]),My((()=>{if(a&&l)return l.register(a)}),[l,a]),function(e){let t=Dy(e),n=Dn(!1);Mn((()=>(n.current=!1,()=>{n.current=!0,Ry((()=>{n.current&&t()}))})),[t])}((()=>{var e;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s)))})),u&&s&&a?mr(zy({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:wx,name:"Portal"}),a):null}));let Sx=je,kx=ot(null);let Ex=ot(null),Px=Xy((function(e,t){let n=y_(t),{enabled:r=!0,...i}=e;return r?Xr.createElement(xx,{...i,ref:n}):zy({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:wx,name:"Portal"})})),Tx=Xy((function(e,t){let{target:n,...r}=e,i={ref:y_(t)};return Xr.createElement(kx.Provider,{value:n},zy({ourProps:i,theirProps:r,defaultTag:Sx,name:"Popover.Group"}))})),Ax=Object.assign(Px,{Group:Tx});function Cx(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:Dx)!==je||1===Xr.Children.count(e.children)}let Rx=ot(null);Rx.displayName="TransitionContext";var Ox=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ox||{});let Fx=ot(null);function Mx(e){return"children"in e?Mx(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Lx(e,t){let n=Ly(e),r=Dn([]),i=function(){let e=Dn(!1);return My((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),o=Fy(),s=Dy(((e,t=$y.Hidden)=>{let s=r.current.findIndex((({el:t})=>t===e));-1!==s&&(Uy(t,{[$y.Unmount](){r.current.splice(s,1)},[$y.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var e;!Mx(r)&&i.current&&(null==(e=n.current)||e.call(n))})))})),a=Dy((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>s(e,$y.Unmount)})),l=Dn([]),u=Dn(Promise.resolve()),c=Dn({enter:[],leave:[]}),d=Dy(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(c.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?u.current=u.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),h=Dy(((e,t,n)=>{Promise.all(c.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return In((()=>({children:r,register:a,unregister:s,onStart:d,onStop:h,wait:u,chains:c})),[a,s,r,d,h,c,u])}Fx.displayName="NestingContext";let Dx=je,Vx=Hy.RenderStrategy;let Ix=Xy((function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,s=Dn(null),a=y_(...Cx(e)?[s,t]:null===t?[]:[t]);yx();let l=px();if(void 0===n&&null!==l&&(n=(l&hx.Open)===hx.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=Lx((()=>{n||c("hidden")})),[h,p]=On(!0),f=Dn([n]);My((()=>{!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]);My((()=>{n?c("visible"):!Mx(d)&&null!==s.current&&c("hidden")}),[n,d]);let v={unmount:i},g=Dy((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),y=Dy((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return Xr.createElement(Fx.Provider,{value:d},Xr.createElement(Rx.Provider,{value:m},zy({ourProps:{...v,as:je,children:Xr.createElement(jx,{ref:a,...v,...o,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:je,features:Vx,visible:"visible"===u,name:"Transition"})))})),jx=Xy((function(e,t){var n,r;let{transition:i=!0,beforeEnter:o,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:d,entered:h,leave:p,leaveFrom:f,leaveTo:m,...v}=e,[g,y]=On(null),_=Dn(null),b=Cx(e),w=y_(...b?[_,t,y]:null===t?[]:[t]),x=null==(n=v.unmount)||n?$y.Unmount:$y.Hidden,{show:S,appear:k,initial:E}=function(){let e=Bn(Rx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[P,T]=On(S?"visible":"hidden"),A=function(){let e=Bn(Fx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:C,unregister:R}=A;My((()=>C(_)),[C,_]),My((()=>{if(x===$y.Hidden&&_.current)return S&&"visible"!==P?void T("visible"):Uy(P,{hidden:()=>R(_),visible:()=>C(_)})}),[P,_,C,R,S,x]);let O=yx();My((()=>{if(b&&O&&"visible"===P&&null===_.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[_,P,O,b]);let F=E&&!k,M=k&&S&&E,L=Dn(!1),D=Lx((()=>{L.current||(T("hidden"),R(_))}),A),V=Dy((e=>{L.current=!0;let t=e?"enter":"leave";D.onStart(_,t,(e=>{"enter"===e?null==o||o():"leave"===e&&(null==a||a())}))})),I=Dy((e=>{let t=e?"enter":"leave";L.current=!1,D.onStop(_,t,(e=>{"enter"===e?null==s||s():"leave"===e&&(null==l||l())})),"leave"===t&&!Mx(D)&&(T("hidden"),R(_))}));Mn((()=>{b&&i||(V(S),I(S))}),[S,b,i]);let j=(()=>!(!i||!b||!O||F))(),[,B]=bb(j,g,S,{start:V,end:I}),N=Zy({ref:w,className:(null==(r=Ny(v.className,M&&u,M&&c,B.enter&&u,B.enter&&B.closed&&c,B.enter&&!B.closed&&d,B.leave&&p,B.leave&&!B.closed&&f,B.leave&&B.closed&&m,!B.transition&&S&&h))?void 0:r.trim())||void 0,..._b(B)}),U=0;return"visible"===P&&(U|=hx.Open),"hidden"===P&&(U|=hx.Closed),B.enter&&(U|=hx.Opening),B.leave&&(U|=hx.Closing),Xr.createElement(Fx.Provider,{value:D},Xr.createElement(fx,{value:U},zy({ourProps:N,theirProps:v,defaultTag:Dx,features:Vx,visible:"visible"===P,name:"Transition.Child"})))})),Bx=Xy((function(e,t){let n=null!==Bn(Rx),r=null!==px();return Xr.createElement(Xr.Fragment,null,!n&&r?Xr.createElement(Ix,{ref:t,...e}):Xr.createElement(jx,{ref:t,...e}))})),Nx=Object.assign(Ix,{Child:Bx,Root:Ix});let Ux=Xy((function(e,t){let n=`headlessui-control-${Un()}`,[r,i]=R_(),[o,s]=x_(),a=jy(),{disabled:l=a||!1,...u}=e,c=In((()=>({disabled:l})),[l]);return Xr.createElement(By,{value:l},Xr.createElement(i,{value:r},Xr.createElement(s,{value:o},Xr.createElement(m_,{id:n},zy({ourProps:{ref:t,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...u,children:Xr.createElement(u_,null,"function"==typeof u.children?u.children(c):u.children)},slot:c,defaultTag:"div",name:"Field"})))))}));let Gx=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Wx(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?null!=(n=i.innerText)?n:"":r;return Gx.test(s)&&(s=s.replace(Gx,"")),s}function Hx(e){let t=Dn(""),n=Dn("");return Dy((()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():Wx(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return Wx(e).trim()}(r).trim().toLowerCase();return t.current=i,n.current=o,o}))}var $x=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($x||{}),zx=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(zx||{}),qx=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(qx||{}),Kx=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(Kx||{});function Yx(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=rb(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Qx={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex((e=>n(e.dataRef.current.value)));return-1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,i,o,s;if(e.dataRef.current.disabled||1===e.listboxState)return e;let a={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===vx.Nothing)return{...a,activeOptionIndex:null};if(t.focus===vx.Specific)return{...a,activeOptionIndex:e.options.findIndex((e=>e.id===t.id))};if(t.focus===vx.Previous){let n=e.activeOptionIndex;if(null!==n){let o=e.options[n].dataRef.current.domRef,s=gx(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.options[s].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.previousElementSibling)===t.current||null===(null==(i=t.current)?void 0:i.previousElementSibling))return{...a,activeOptionIndex:s}}}}else if(t.focus===vx.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,i=gx(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.options[i].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.nextElementSibling)===t.current||null===(null==(s=t.current)?void 0:s.nextElementSibling))return{...a,activeOptionIndex:i}}}}let l=Yx(e),u=gx(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=i?e.options.indexOf(i):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Yx(e,(e=>[...e,n]));return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Yx(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},Xx=ot(null);function Zx(e){let t=Bn(Xx);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Zx),t}return t}Xx.displayName="ListboxActionsContext";let Jx=ot(null);function eS(e){let t=Bn(Jx);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eS),t}return t}function tS(e,t){return Uy(t.type,Qx,e,t)}Jx.displayName="ListboxDataContext";let nS=je;let rS=ot(!1),iS=Hy.RenderStrategy|Hy.Static;let oS=je;let sS=Xy((function(e,t){var n;let r=jy(),{value:i,defaultValue:o,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:d=r||!1,horizontal:h=!1,multiple:p=!1,__demoMode:f=!1,...m}=e;const v=h?"horizontal":"vertical";let g=y_(t),y=t_(o),[_=(p?[]:void 0),b]=e_(i,l,y),[w,x]=Fn(tS,{dataRef:{current:null},listboxState:f?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:f}),S=Dn({static:!1,hold:!1}),k=Dn(new Map),E=function(e=M_){return jn(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(u),P=jn((e=>Uy(T.mode,{1:()=>_.some((t=>E(t,e))),0:()=>E(_,e)})),[_]),T=In((()=>({...w,value:_,disabled:d,invalid:c,mode:p?1:0,orientation:v,compare:E,isSelected:P,optionsPropsRef:S,listRef:k})),[_,d,c,p,w,k]);My((()=>{w.dataRef.current=T}),[T]),ub(0===T.listboxState,[T.buttonElement,T.optionsElement],((e,t)=>{var n;x({type:1}),eb(t,J_.Loose)||(e.preventDefault(),null==(n=T.buttonElement)||n.focus())}));let A=In((()=>({open:0===T.listboxState,disabled:d,invalid:c,value:_})),[T,d,_,c]),C=Dy((e=>{let t=T.options.find((t=>t.id===e));t&&V(t.dataRef.current.value)})),R=Dy((()=>{if(null!==T.activeOptionIndex){let{dataRef:e,id:t}=T.options[T.activeOptionIndex];V(e.current.value),x({type:2,focus:vx.Specific,id:t})}})),O=Dy((()=>x({type:0}))),F=Dy((()=>x({type:1}))),M=Fy(),L=Dy(((e,t,n)=>{M.dispose(),M.microTask((()=>e===vx.Specific?x({type:2,focus:vx.Specific,id:t,trigger:n}):x({type:2,focus:e,trigger:n})))})),D=Dy(((e,t)=>(x({type:5,id:e,dataRef:t}),()=>x({type:6,id:e})))),V=Dy((e=>Uy(T.mode,{0:()=>null==b?void 0:b(e),1(){let t=T.value.slice(),n=t.findIndex((t=>E(t,e)));return-1===n?t.push(e):t.splice(n,1),null==b?void 0:b(t)}}))),I=Dy((e=>x({type:3,value:e}))),j=Dy((()=>x({type:4}))),B=Dy((e=>{x({type:7,element:e})})),N=Dy((e=>{x({type:8,element:e})})),U=In((()=>({onChange:V,registerOption:D,goToOption:L,closeListbox:F,openListbox:O,selectActiveOption:R,selectOption:C,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[G,W]=R_({inherit:!0}),H={ref:g},$=jn((()=>{if(void 0!==y)return null==b?void 0:b(y)}),[b,y]);return Xr.createElement(W,{value:G,props:{htmlFor:null==(n=T.buttonElement)?void 0:n.id},slot:{open:0===T.listboxState,disabled:d}},Xr.createElement(ax,null,Xr.createElement(Xx.Provider,{value:U},Xr.createElement(Jx.Provider,{value:T},Xr.createElement(fx,{value:Uy(T.listboxState,{0:hx.Open,1:hx.Closed})},null!=a&&null!=_&&Xr.createElement(d_,{disabled:d,data:{[a]:_},form:s,onReset:$}),zy({ourProps:H,theirProps:m,slot:A,defaultTag:nS,name:"Listbox"}))))))})),aS=Xy((function(e,t){var n;let r=eS("Listbox.Button"),i=Zx("Listbox.Button"),o=Un(),s=f_(),{id:a=s||`headlessui-listbox-button-${o}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...c}=e,d=function(){let e=Dn([]),t=jn((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}(),h=y_(t,Bn(ix).setReference,i.setButtonElement),p=Bn(ix).getReferenceProps,f=Dy((e=>{switch(e.key){case P_.Enter:o_(e.currentTarget);break;case P_.Space:case P_.ArrowDown:e.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(vx.First);break;case P_.ArrowUp:e.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(vx.Last)}})),m=Dy((e=>{if(e.key===P_.Space)e.preventDefault()})),v=Dy((e=>{var t;if(v_(e.currentTarget))return e.preventDefault();0===r.listboxState?(Gr((()=>i.closeListbox())),null==(t=r.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),i.openListbox())})),g=Dy((e=>e.preventDefault())),y=C_([a]),_=w_(),{isFocusVisible:b,focusProps:w}=Ey({autoFocus:u}),{isHovered:x,hoverProps:S}=ky({isDisabled:l}),{pressed:k,pressProps:E}=Vy({disabled:l}),P=In((()=>({open:0===r.listboxState,active:k||0===r.listboxState,disabled:l,invalid:r.invalid,value:r.value,hover:x,focus:b,autofocus:u})),[r.listboxState,r.value,l,x,b,k,r.invalid,u]);return zy({mergeRefs:d,ourProps:Qy(p(),{ref:h,id:a,type:db(e,r.buttonElement),"aria-haspopup":"listbox","aria-controls":null==(n=r.optionsElement)?void 0:n.id,"aria-expanded":0===r.listboxState,"aria-labelledby":y,"aria-describedby":_,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:m,onKeyPress:g,onClick:v},w,S,E),theirProps:c,slot:P,defaultTag:"button",name:"Listbox.Button"})})),lS=F_,uS=Xy((function(e,t){var n,r;let i=Un(),{id:o=`headlessui-listbox-options-${i}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,d=function(e){return In((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(s),[h,p]=On(null);d&&(a=!0);let f=eS("Listbox.Options"),m=Zx("Listbox.Options"),v=cb(f.optionsElement),g=px(),[y,_]=bb(u,h,null!==g?(g&hx.Open)===hx.Open:0===f.listboxState);!function(e,t,n){let r=Ly((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));Mn((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let i=Oy();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}return()=>i.dispose()}),[t,r,e])}(y,f.buttonElement,m.closeListbox),mb(!f.__demoMode&&(l&&0===f.listboxState),v),function(e,{allowed:t,disallowed:n}={}){let r=B_(e,"inert-others");My((()=>{var e,i;if(!r)return;let o=Oy();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&o.add(G_(t));let s=null!=(i=null==t?void 0:t())?i:[];for(let t of s){if(!t)continue;let e=Cy(t);if(!e)continue;let n=t.parentElement;for(;n&&n!==e.body;){for(let e of n.children)s.some((t=>e.contains(t)))||o.add(G_(e));n=n.parentElement}}return o.dispose}),[r,t,n])}(!f.__demoMode&&(l&&0===f.listboxState),{allowed:jn((()=>[f.buttonElement,f.optionsElement]),[f.buttonElement,f.optionsElement])});let b=!function(e,t){let n=Dn({left:0,top:0});if(My((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(n.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}(0!==f.listboxState,f.buttonElement)&&y,w=function(e,t){let[n,r]=On(t);return!e&&n!==t&&r(t),e?n:t}(y&&1===f.listboxState,f.value),x=Dy((e=>f.compare(w,e))),S=In((()=>{var e;if(null==d||null==(e=null==d?void 0:d.to)||!e.includes("selection"))return null;let t=f.options.findIndex((e=>x(e.dataRef.current.value)));return-1===t&&(t=0),t}),[d,f.options]),k=(()=>{if(null==d)return;if(null===S)return{...d,inner:void 0};let e=Array.from(f.listRef.current.values());return{...d,inner:{listRef:{current:e},index:S}}})(),[E,P]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=Bn(ox),n=In((()=>e),[JSON.stringify(e,"undefined"!=typeof HTMLElement?(e,t)=>t instanceof HTMLElement?t.outerHTML:t:void 0)]);My((()=>{null==t||t(null!=n?n:null)}),[t,n]);let r=Bn(ix);return In((()=>[r.setFloating,e?r.styles:{}]),[r.setFloating,e,r.styles])}(k),T=function(){let{getFloatingProps:e,slot:t}=Bn(ix);return jn(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),A=y_(t,d?E:null,m.setOptionsElement,p),C=Fy();Mn((()=>{var e;let t=f.optionsElement;t&&0===f.listboxState&&t!==(null==(e=Cy(t))?void 0:e.activeElement)&&(null==t||t.focus({preventScroll:!0}))}),[f.listboxState,f.optionsElement]);let R=Dy((e=>{var t,n;switch(C.dispose(),e.key){case P_.Space:if(""!==f.searchQuery)return e.preventDefault(),e.stopPropagation(),m.search(e.key);case P_.Enter:if(e.preventDefault(),e.stopPropagation(),null!==f.activeOptionIndex){let{dataRef:e}=f.options[f.activeOptionIndex];m.onChange(e.current.value)}0===f.mode&&(Gr((()=>m.closeListbox())),null==(t=f.buttonElement)||t.focus({preventScroll:!0}));break;case Uy(f.orientation,{vertical:P_.ArrowDown,horizontal:P_.ArrowRight}):return e.preventDefault(),e.stopPropagation(),m.goToOption(vx.Next);case Uy(f.orientation,{vertical:P_.ArrowUp,horizontal:P_.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),m.goToOption(vx.Previous);case P_.Home:case P_.PageUp:return e.preventDefault(),e.stopPropagation(),m.goToOption(vx.First);case P_.End:case P_.PageDown:return e.preventDefault(),e.stopPropagation(),m.goToOption(vx.Last);case P_.Escape:return e.preventDefault(),e.stopPropagation(),Gr((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case P_.Tab:e.preventDefault(),e.stopPropagation(),Gr((()=>m.closeListbox())),ib(f.buttonElement,e.shiftKey?Y_.Previous:Y_.Next);break;default:1===e.key.length&&(m.search(e.key),C.setTimeout((()=>m.clearSearch()),350))}})),O=null==(n=f.buttonElement)?void 0:n.id,F=In((()=>({open:0===f.listboxState})),[f.listboxState]),M=Qy(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":L_(f.buttonElement,!0).width},..._b(_)});return Xr.createElement(Ax,{enabled:!!a&&(e.static||y)},Xr.createElement(Jx.Provider,{value:1===f.mode?f:{...f,isSelected:x}},zy({ourProps:M,theirProps:c,slot:F,defaultTag:"div",features:iS,visible:b,name:"Listbox.Options"})))})),cS=Xy((function(e,t){let n=Un(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=e,a=!0===Bn(rS),l=eS("Listbox.Option"),u=Zx("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===r,d=l.isSelected(o),h=Dn(null),p=Hx(h),f=Ly({disabled:i,value:o,domRef:h,get textValue(){return p()}}),m=y_(t,h,(e=>{e?l.listRef.current.set(r,e):l.listRef.current.delete(r)}));My((()=>{if(!l.__demoMode&&0===l.listboxState&&c&&0!==l.activationTrigger)return Oy().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=h.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),My((()=>{if(!a)return u.registerOption(r,f)}),[f,r,a]);let v=Dy((e=>{var t;if(i)return e.preventDefault();u.onChange(o),0===l.mode&&(Gr((()=>u.closeListbox())),null==(t=l.buttonElement)||t.focus({preventScroll:!0}))})),g=Dy((()=>{if(i)return u.goToOption(vx.Nothing);u.goToOption(vx.Specific,r)})),y=function(){let e=Dn([-1,-1]);return{wasMoved(t){let n=vb(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=vb(t)}}}(),_=Dy((e=>{y.update(e),!i&&(c||u.goToOption(vx.Specific,r,0))})),b=Dy((e=>{y.wasMoved(e)&&(i||c||u.goToOption(vx.Specific,r,0))})),w=Dy((e=>{y.wasMoved(e)&&(i||c&&u.goToOption(vx.Nothing))})),x=In((()=>({active:c,focus:c,selected:d,disabled:i,selectedOption:d&&a})),[c,d,i,a]);return!d&&a?null:zy({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:b,onMouseMove:b,onPointerLeave:w,onMouseLeave:w},theirProps:s,slot:x,defaultTag:"div",name:"Listbox.Option"})})),dS=Xy((function(e,t){let{options:n,placeholder:r,...i}=e,o={ref:y_(t)},s=eS("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(rS.Provider,{value:!0},zy({ourProps:o,theirProps:{...i,children:Xr.createElement(Xr.Fragment,null,r&&l?r:n)},slot:a,defaultTag:oS,name:"ListboxSelectedOption"}))})),hS=Object.assign(sS,{Button:aS,Label:lS,Options:uS,Option:cS,SelectedOption:dS}),pS=ot(null);pS.displayName="GroupContext";let fS=je;let mS=Xy((function(e,t){var n;let r=Un(),i=f_(),o=jy(),{id:s=i||`headlessui-switch-${r}`,disabled:a=o||!1,checked:l,defaultChecked:u,onChange:c,name:d,value:h,form:p,autoFocus:f=!1,...m}=e,v=Bn(pS),[g,y]=On(null),_=y_(Dn(null),t,null===v?null:v.setSwitch,y),b=t_(u),[w,x]=e_(l,c,null!=b&&b),S=Fy(),[k,E]=On(!1),P=Dy((()=>{E(!0),null==x||x(!w),S.nextFrame((()=>{E(!1)}))})),T=Dy((e=>{if(v_(e.currentTarget))return e.preventDefault();e.preventDefault(),P()})),A=Dy((e=>{e.key===P_.Space?(e.preventDefault(),P()):e.key===P_.Enter&&o_(e.currentTarget)})),C=Dy((e=>e.preventDefault())),R=C_(),O=w_(),{isFocusVisible:F,focusProps:M}=Ey({autoFocus:f}),{isHovered:L,hoverProps:D}=ky({isDisabled:a}),{pressed:V,pressProps:I}=Vy({disabled:a}),j=In((()=>({checked:w,disabled:a,hover:L,focus:F,active:V,autofocus:f,changing:k})),[w,L,F,V,a,k,f]),B=Qy({id:s,ref:_,role:"switch",type:db(e,g),tabIndex:-1===e.tabIndex?0:null!=(n=e.tabIndex)?n:0,"aria-checked":w,"aria-labelledby":R,"aria-describedby":O,disabled:a||void 0,autoFocus:f,onClick:T,onKeyUp:A,onKeyPress:C},M,D,I),N=jn((()=>{if(void 0!==b)return null==x?void 0:x(b)}),[x,b]);return Xr.createElement(Xr.Fragment,null,null!=d&&Xr.createElement(d_,{disabled:a,data:{[d]:h||"on"},overrides:{type:"checkbox",checked:w},form:p,onReset:N}),zy({ourProps:B,theirProps:m,slot:j,defaultTag:"button",name:"Switch"}))})),vS=function(e){var t;let[n,r]=On(null),[i,o]=R_(),[s,a]=x_(),l=In((()=>({switch:n,setSwitch:r})),[n,r]),u=e;return Xr.createElement(a,{name:"Switch.Description",value:s},Xr.createElement(o,{name:"Switch.Label",value:i,props:{htmlFor:null==(t=l.switch)?void 0:t.id,onClick(e){n&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},Xr.createElement(pS.Provider,{value:l},zy({ourProps:{},theirProps:u,slot:{},defaultTag:fS,name:"Switch.Group"}))))},gS=F_,yS=k_,_S=Object.assign(mS,{Group:vS,Label:gS,Description:yS});function bS(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function wS(e,t,n){var r=[],i=Ei(e,r,n);return r.length<2?n:i+t(r)}var xS=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=e(i);else for(var s in o="",i)i[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},SS=function(e){var t=bn(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ni(n,t.registered,void 0);return Ti(t,i,!1),t.key+"-"+i.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return wS(t.registered,n,xS(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ni(n,t.registered);bS(t,i)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ni(n,t.registered),o="animation-"+i.name;return bS(t,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Ei.bind(null,t.registered),merge:wS.bind(null,t.registered,n)}}({key:"css"}),kS=SS.cx,ES=SS.css;const PS=Rs(aS)`
45
+ */new Promise((()=>{}));try{window.__reactRouterVersion="6"}catch($y){}const ml=Zr.startTransition;function vl(e){let{basename:t,children:n,future:r,window:i}=e,o=Dn();null==o.current&&(o.current=da({window:i,v5Compat:!0}));let s=o.current,[a,l]=On({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=jn((e=>{u&&ml?ml((()=>l(e))):l(e)}),[l,u]);return Ln((()=>s.listen(c)),[s,c]),Mn((()=>{return null==(e=r)||e.v7_startTransition,void(null==e||e.v7_relativeSplatPath);var e}),[r]),De(hl,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var gl,yl,_l,bl;let wl;(yl=gl||(gl={})).UseScrollRestoration="useScrollRestoration",yl.UseSubmit="useSubmit",yl.UseSubmitFetcher="useSubmitFetcher",yl.UseFetcher="useFetcher",yl.useViewTransitionState="useViewTransitionState",(bl=_l||(_l={})).UseFetcher="useFetcher",bl.UseFetchers="useFetchers",bl.UseScrollRestoration="useScrollRestoration";const xl=()=>{if(wl)return wl;return wl=new ts({defaultOptions:{queries:{retry:(e,t)=>{var n;return t instanceof co&&![401,403].includes((null==(n=t.response)?void 0:n.status)||0)}}}}),wl},Sl="getAllPromotions",kl=/^https:\/\/([A-Za-z]+)-partner/,El=e=>{switch((e=>{if(e.startsWith("http://localhost"))return"local";const t=e.toLowerCase().match(kl);return t&&t.length>1?t[1]:"prod"})(e.url)){case"local":case"autodev":case"test":return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/staging/";default:return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/master/"}},Pl=()=>{const{getAllPromotions:e}=fo(),t=nl(),{isPending:n,error:r,data:i}=Ss({queryKey:[Sl],queryFn:e}),o=uo(),s=In((()=>{return e=o.backend,((null==(t=i)?void 0:t.data)||[]).map((t=>{var n,r;return{id:t.id,category:t.category.title,promotionStatus:t.status,contentfulUrl:(null==(n=t.contentfulContent)?void 0:n.contentId)?`${El(e)}entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,audiences:null==(r=t.audiences)?void 0:r.sort().join(", "),updatedAt:t.updatedAt,edit:"Edit"}})).sort(((e,t)=>new Date(t.updatedAt).valueOf()-new Date(e.updatedAt).valueOf()));var e,t}),[o.backend,i]),a=In((()=>[{name:"Id",field:"id",isSortable:!0},{name:"Category",field:"category",isSortable:!0},{name:"Status",field:"promotionStatus",isSortable:!0,type:{kind:"status",styleOverrides:{Enabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-color":"rgb(22 163 74 / 0.2)"},Disabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-color":"rgb(220 38 38 / 0.2)"}}},filters:[{name:"Enabled",predicate:e=>"Enabled"===e},{name:"Disabled",predicate:e=>"Disabled"===e}]},{name:"Contentful",field:"contentfulUrl",isSortable:!0,sort:e=>e?-1:1,type:{kind:"link"},filters:[{name:"Linked",predicate:e=>!!e},{name:"Unlinked",predicate:e=>!e}]},{name:"Audiences",field:"audiences",isSortable:!0,type:{kind:"list"},filters:[{name:"Audiences",predicate:e=>!!e}]},{name:"Updated",field:"updatedAt",isSortable:!0,sort:(e,t)=>new Date(t).valueOf()-new Date(e).valueOf(),type:{kind:"date"}},{name:"Edit",field:"edit",isSortable:!1,type:{kind:"button",onClick:e=>t(`/promotion/${e}`),children:io(ia,{alt:"edit","data-testid":"edit",css:{height:"1.25rem",width:"1.25rem",":hover":{fill:"var(--fl-color-primary-600)"}}})}}]),[t]);switch(!0){case n:return io(ro,{children:"Loading..."});case!!r:return oo(ro,{children:["An error has occurred: ",r.message]});case!!i:return io(sa,{columns:a,data:s,title:"Promotions",subtitle:"A list of currently configured promoted benefits",addButton:{onClick:()=>t("/promotion"),text:"Add New Promotion"}});default:return io(ro,{children:"No data returned from backend"})}};function Tl(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Al(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const Cl=e=>Array.isArray(e);function Rl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Ol(e){return"string"==typeof e||Array.isArray(e)}function Fl(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Ml(e,t,n,r){if("function"==typeof t){const[i,o]=Fl(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=Fl(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function Ll(e,t,n){const r=e.getProps();return Ml(r,t,void 0!==n?n:r.custom,e)}const Dl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vl=["initial",...Dl],Il=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jl=new Set(Il),Bl=e=>1e3*e,Nl=e=>e/1e3,Ul={type:"spring",stiffness:500,damping:25,restSpeed:10},Gl={type:"keyframes",duration:.8},Wl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Hl=(e,{keyframes:t})=>t.length>2?Gl:jl.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Ul:Wl;function $l(e,t){return e[t]||e.default||e}const zl=!1,ql=e=>null!==e;function Kl(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(ql),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}const Yl=e=>e;const Ql=["read","resolveKeyframes","update","preRender","render","postRender"];function Xl(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Ql.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,i=!1,s=!1)=>{const a=s&&r?t:n;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,r?i=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,l.process(e)))}};return l}(o),e)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:h}=s,p=()=>{const o=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:Ql.reduce(((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(p)),a.schedule(t,o,s)),t}),{}),cancel:e=>{for(let t=0;t<Ql.length;t++)s[Ql[t]].cancel(e)},state:i,steps:s}}const{schedule:Zl,cancel:Jl,state:eu,steps:tu}=Xl("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Yl,!0),nu=e=>/^0[^.\s]+$/u.test(e);let ru=Yl;const iu=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ou=e=>t=>"string"==typeof t&&t.startsWith(e),su=ou("--"),au=ou("var(--"),lu=e=>!!au(e)&&uu.test(e.split("/*")[0].trim()),uu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,cu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function du(e,t,n=1){const[r,i]=function(e){const t=cu.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${null!=n?n:r}`,i]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return iu(e)?parseFloat(e):e}return lu(i)?du(i,t,n+1):i}const hu=(e,t,n)=>n>t?t:n<e?e:n,pu={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},fu={...pu,transform:e=>hu(0,1,e)},mu={...pu,default:1},vu=e=>Math.round(1e5*e)/1e5,gu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,yu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,_u=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function bu(e){return"string"==typeof e}const wu=e=>({test:t=>bu(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),xu=wu("deg"),Su=wu("%"),ku=wu("px"),Eu=wu("vh"),Pu=wu("vw"),Tu={...Su,parse:e=>Su.parse(e)/100,transform:e=>Su.transform(100*e)},Au=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Cu=e=>e===pu||e===ku,Ru=(e,t)=>parseFloat(e.split(", ")[t]),Ou=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Ru(i[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?Ru(t[1],e):0}},Fu=new Set(["x","y","z"]),Mu=Il.filter((e=>!Fu.has(e)));const Lu={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ou(4,13),y:Ou(5,14)};Lu.translateX=Lu.x,Lu.translateY=Lu.y;const Du=e=>t=>t.test(e),Vu=[pu,ku,Su,xu,Pu,Eu,{test:e=>"auto"===e,parse:e=>e}],Iu=e=>Vu.find(Du(e)),ju=new Set;let Bu=!1,Nu=!1;function Uu(){if(Nu){const e=Array.from(ju).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return Mu.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Nu=!1,Bu=!1,ju.forEach((e=>e.complete())),ju.clear()}function Gu(){ju.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Nu=!0)}))}class Wu{constructor(e,t,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ju.add(this),Bu||(Bu=!0,Zl.read(Gu),Zl.resolveKeyframes(Uu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(null===e[i])if(0===i){const i=null==r?void 0:r.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ju.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ju.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Hu=(e,t)=>n=>Boolean(bu(n)&&_u.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),$u=(e,t,n)=>r=>{if(!bu(r))return r;const[i,o,s,a]=r.match(gu);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},zu={...pu,transform:e=>Math.round((e=>hu(0,255,e))(e))},qu={test:Hu("rgb","red"),parse:$u("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+zu.transform(e)+", "+zu.transform(t)+", "+zu.transform(n)+", "+vu(fu.transform(r))+")"};const Ku={test:Hu("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:qu.transform},Yu={test:Hu("hsl","hue"),parse:$u("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Su.transform(vu(t))+", "+Su.transform(vu(n))+", "+vu(fu.transform(r))+")"},Qu={test:e=>qu.test(e)||Ku.test(e)||Yu.test(e),parse:e=>qu.test(e)?qu.parse(e):Yu.test(e)?Yu.parse(e):Ku.parse(e),transform:e=>bu(e)?e:e.hasOwnProperty("red")?qu.transform(e):Yu.transform(e)};const Xu="number",Zu="color",Ju="var",ec="var(",tc="${}",nc=/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 rc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(nc,(e=>(Qu.test(e)?(r.color.push(o),i.push(Zu),n.push(Qu.parse(e))):e.startsWith(ec)?(r.var.push(o),i.push(Ju),n.push(e)):(r.number.push(o),i.push(Xu),n.push(parseFloat(e))),++o,tc))).split(tc);return{values:n,split:s,indexes:r,types:i}}function ic(e){return rc(e).values}function oc(e){const{split:t,types:n}=rc(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){const t=n[o];i+=t===Xu?vu(e[o]):t===Zu?Qu.transform(e[o]):e[o]}return i}}const sc=e=>"number"==typeof e?0:e;const ac={test:function(e){var t,n;return isNaN(e)&&bu(e)&&((null===(t=e.match(gu))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(yu))||void 0===n?void 0:n.length)||0)>0},parse:ic,createTransformer:oc,getAnimatableNone:function(e){const t=ic(e);return oc(e)(t.map(sc))}},lc=new Set(["brightness","contrast","saturate","opacity"]);function uc(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(gu)||[];if(!r)return e;const i=n.replace(r,"");let o=lc.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const cc=/\b([a-z-]*)\(.*?\)/gu,dc={...ac,getAnimatableNone:e=>{const t=e.match(cc);return t?t.map(uc).join(" "):e}},hc={...pu,transform:Math.round},pc={borderWidth:ku,borderTopWidth:ku,borderRightWidth:ku,borderBottomWidth:ku,borderLeftWidth:ku,borderRadius:ku,radius:ku,borderTopLeftRadius:ku,borderTopRightRadius:ku,borderBottomRightRadius:ku,borderBottomLeftRadius:ku,width:ku,maxWidth:ku,height:ku,maxHeight:ku,size:ku,top:ku,right:ku,bottom:ku,left:ku,padding:ku,paddingTop:ku,paddingRight:ku,paddingBottom:ku,paddingLeft:ku,margin:ku,marginTop:ku,marginRight:ku,marginBottom:ku,marginLeft:ku,rotate:xu,rotateX:xu,rotateY:xu,rotateZ:xu,scale:mu,scaleX:mu,scaleY:mu,scaleZ:mu,skew:xu,skewX:xu,skewY:xu,distance:ku,translateX:ku,translateY:ku,translateZ:ku,x:ku,y:ku,z:ku,perspective:ku,transformPerspective:ku,opacity:fu,originX:Tu,originY:Tu,originZ:ku,zIndex:hc,backgroundPositionX:ku,backgroundPositionY:ku,fillOpacity:fu,strokeOpacity:fu,numOctaves:hc},fc={...pc,color:Qu,backgroundColor:Qu,outlineColor:Qu,fill:Qu,stroke:Qu,borderColor:Qu,borderTopColor:Qu,borderRightColor:Qu,borderBottomColor:Qu,borderLeftColor:Qu,filter:dc,WebkitFilter:dc},mc=e=>fc[e];function vc(e,t){let n=mc(e);return n!==dc&&(n=ac),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const gc=new Set(["auto","none","0"]);class yc extends Wu{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),lu(n))){const r=du(n,t.current);void 0!==r&&(e[a]=r),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Au.has(n)||2!==e.length)return;const[r,i]=e,o=Iu(r),s=Iu(i);if(o!==s)if(Cu(o)&&Cu(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let i=0;i<e.length;i++)("number"==typeof(r=e[i])?0===r:null===r||"none"===r||"0"===r||nu(r))&&n.push(i);var r;n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!gc.has(t)&&rc(t).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=vc(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Lu[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Lu[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function _c(e){let t;return()=>(void 0===t&&(t=e()),t)}let bc;function wc(){bc=void 0}const xc={now:()=>(void 0===bc&&xc.set(eu.isProcessing||zl?eu.timestamp:performance.now()),bc),set:e=>{bc=e,queueMicrotask(wc)}},Sc=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ac.test(e)&&"0"!==e||e.startsWith("url(")));class kc{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=xc.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Gu(),Uu()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=xc.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=Sc(i,t),a=Sc(o,t);return!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,i)){if(!o)return null==a||a(Kl(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(e,t);!1!==u&&(this._resolved={keyframes:e,finalKeyframe:t,...u},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function Ec(e,t){return t?e*(1e3/t):0}const Pc=5;function Tc(e,t,n){const r=Math.max(t-Pc,0);return Ec(n-e(r),t-r)}const Ac=.001,Cc=.01,Rc=10,Oc=.05,Fc=1;function Mc({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,s=1-t;s=hu(Oc,Fc,s),e=hu(Cc,Rc,Nl(e)),s<1?(i=t=>{const r=t*s,i=r*e,o=r-n,a=Dc(t,s),l=Math.exp(-i);return Ac-o/a*l},o=t=>{const r=t*s*e,o=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Dc(Math.pow(t,2),s);return(-i(t)+Ac>0?-1:1)*((o-a)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-Ac,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let i=1;i<Lc;i++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=Bl(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const Lc=12;function Dc(e,t){return e*Math.sqrt(1-t*t)}const Vc=["duration","bounce"],Ic=["stiffness","damping","mass"];function jc(e,t){return t.some((t=>void 0!==e[t]))}function Bc({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!jc(e,Ic)&&jc(e,Vc)){const n=Mc(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-Nl(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(a*u)),m=o-i,v=Nl(Math.sqrt(a/u)),g=Math.abs(m)<5;let y;if(n||(n=g?.01:2),t||(t=g?.005:.5),f<1){const e=Dc(v,f);y=t=>{const n=Math.exp(-f*v*t);return o-n*((p+f*v*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===f)y=e=>o-Math.exp(-v*e)*(m+(p+v*m)*e);else{const e=v*Math.sqrt(f*f-1);y=t=>{const n=Math.exp(-f*v*t),r=Math.min(e*t,300);return o-n*((p+f*v*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:h&&c||null,next:e=>{const r=y(e);if(h)s.done=e>=c;else{let i=0;f<1&&(i=0===e?Bl(p):Tc(y,e,r));const a=Math.abs(i)<=n,l=Math.abs(o-r)<=t;s.done=a&&l}return s.value=s.done?o:r,s}}}function Nc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let f=n*t;const m=d+f,v=void 0===s?m:s(m);v!==m&&(f=v-d);const g=e=>-f*Math.exp(-e/r),y=e=>v+g(e),_=e=>{const t=g(e),n=y(e);h.done=Math.abs(t)<=u,h.value=h.done?v:n};let b,w;const x=e=>{var t;(t=h.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(b=e,w=Bc({keyframes:[h.value,p(h.value)],velocity:Tc(y,e,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,_(e),x(e)),void 0!==b&&e>=b?w.next(e-b):(!t&&_(e),h)}}}const Uc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Gc=1e-7,Wc=12;function Hc(e,t,n,r){if(e===t&&n===r)return Yl;const i=t=>function(e,t,n,r,i){let o,s,a=0;do{s=t+(n-t)/2,o=Uc(s,r,i)-e,o>0?n=s:t=s}while(Math.abs(o)>Gc&&++a<Wc);return s}(t,0,1,e,n);return e=>0===e||1===e?e:Uc(i(e),t,r)}const $c=Hc(.42,0,1,1),zc=Hc(0,0,.58,1),qc=Hc(.42,0,.58,1),Kc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yc=e=>t=>1-e(1-t),Qc=e=>1-Math.sin(Math.acos(e)),Xc=Yc(Qc),Zc=Kc(Qc),Jc=Hc(.33,1.53,.69,.99),ed=Yc(Jc),td={linear:Yl,easeIn:$c,easeInOut:qc,easeOut:zc,circIn:Qc,circInOut:Zc,circOut:Xc,backIn:ed,backInOut:Kc(ed),backOut:Jc,anticipate:e=>(e*=2)<1?.5*ed(e):.5*(2-Math.pow(2,-10*(e-1)))},nd=e=>{if(Array.isArray(e)){ru(4===e.length);const[t,n,r,i]=e;return Hc(t,n,r,i)}return"string"==typeof e?(ru(void 0!==td[e]),td[e]):e},rd=(e,t)=>n=>t(e(n)),id=(...e)=>e.reduce(rd),od=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},sd=(e,t,n)=>e+(t-e)*n;function ad(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ld(e,t){return n=>n>0?t:e}const ud=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},cd=[Ku,qu,Yu];function dd(e){const t=(n=e,cd.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Yu&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=ad(a,r,e+1/3),o=ad(a,r,e),s=ad(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(r)),r}const hd=(e,t)=>{const n=dd(e),r=dd(t);if(!n||!r)return ld(e,t);const i={...n};return e=>(i.red=ud(n.red,r.red,e),i.green=ud(n.green,r.green,e),i.blue=ud(n.blue,r.blue,e),i.alpha=sd(n.alpha,r.alpha,e),qu.transform(i))},pd=new Set(["none","hidden"]);function fd(e,t){return n=>sd(e,t,n)}function md(e){return"number"==typeof e?fd:"string"==typeof e?lu(e)?ld:Qu.test(e)?hd:yd:Array.isArray(e)?vd:"object"==typeof e?Qu.test(e)?hd:gd:ld}function vd(e,t){const n=[...e],r=n.length,i=e.map(((e,n)=>md(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function gd(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=md(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const yd=(e,t)=>{const n=ac.createTransformer(t),r=rc(e),i=rc(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?pd.has(e)&&!i.values.length||pd.has(t)&&!r.values.length?function(e,t){return pd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):id(vd(function(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][i[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[o]=l,i[s]++}return r}(r,i),i.values),n):ld(e,t)};function _d(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return sd(e,t,n);return md(e)(e,t)}function bd(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(ru(o===t.length),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||_d,o=e.length-1;for(let s=0;s<o;s++){let n=i(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||Yl:t;n=id(e,n)}r.push(n)}return r}(t,r,i),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=od(e[n],e[n+1],t);return s[n](r)};return n?t=>l(hu(e[0],e[o-1],t)):l}function wd(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=od(0,t,r);e.push(sd(n,1,i))}}(t,e.length-1),t}function xd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(nd):nd(r),o={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:wd(t),e),a=bd(s,t,{ease:Array.isArray(i)?i:(l=t,u=i,l.map((()=>u||qc)).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}const Sd=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Zl.update(t,!0),stop:()=>Jl(t),now:()=>eu.isProcessing?eu.timestamp:xc.now()}},kd={decay:Nc,inertia:Nc,tween:xd,keyframes:xd,spring:Bc},Ed=e=>e/100;class Pd extends kc{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||Wu;this.resolver=new o(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=this.options,s=kd[t]||xd;let a,l;s!==xd&&"number"!=typeof e[0]&&(a=id(Ed,_d(e[0],e[1])),e=[0,100]);const u=s({...this.options,keyframes:e});"mirror"===i&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(u));const{calculatedDuration:c}=u,d=c+r;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,_=i;if(h){const e=Math.min(this.currentTime,u)/c;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1);Boolean(t%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(_=o)),y=hu(0,1,n)*c}const b=g?{done:!1,value:a[0]}:_.next(y);s&&(b.value=s(b.value));let{done:w}=b;g||null===l||(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return x&&void 0!==r&&(b.value=Kl(a,this.options,r)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:e}=this;return e?Nl(e.calculatedDuration):0}get time(){return Nl(this.currentTime)}set time(e){e=Bl(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Nl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=Sd,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Td=new Set(["opacity","clipPath","filter","transform"]),Ad=e=>Array.isArray(e)&&"number"==typeof e[0];function Cd(e){return Boolean(!e||"string"==typeof e&&e in Od||Ad(e)||Array.isArray(e)&&e.every(Cd))}const Rd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Od={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rd([0,.65,.55,1]),circOut:Rd([.55,0,1,.45]),backIn:Rd([.31,.01,.66,-.59]),backOut:Rd([.33,1.53,.69,.99])};function Fd(e){return Md(e)||Od.easeOut}function Md(e){return e?Ad(e)?Rd(e):Array.isArray(e)?e.map(Fd):Od[e]:void 0}const Ld=_c((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class Dd extends kc{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new yc(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:i,ease:o,type:s,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(c=this.options).type||!Cd(c.ease)){const{onComplete:t,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(e,t){const n=new Pd({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<2e4;)r=n.sample(o),i.push(r.value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(e,u);1===(e=c.keyframes).length&&(e[1]=e[0]),r=c.duration,i=c.times,o=c.ease,s="keyframes"}var c;const d=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Md(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,e,{...this.options,duration:r,times:i,ease:o});return d.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:n}=this.options;a.set(Kl(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:s,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Nl(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Nl(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Bl(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Yl;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Yl}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:i,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...u}=this.options,c=new Pd({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),d=Bl(this.time);e.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;return Ld()&&n&&Td.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}}const Vd=_c((()=>void 0!==window.ScrollTimeline));class Id{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){const t=this.animations.map((t=>{if(!Vd()||!t.attachTimeline)return t.pause(),function(e,t){let n;const r=()=>{const{currentTime:r}=t,i=(null===r?0:r.value)/100;n!==i&&e(i),n=i};return Zl.update(r,!0),()=>Jl(r)}((e=>{t.time=t.duration*e}),e);t.attachTimeline(e)}));return()=>{t.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const jd=(e,t,n,r={},i,o,s)=>a=>{const l=$l(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c-=Bl(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:o?void 0:i};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(d={...d,...Hl(e,d)}),d.duration&&(d.duration=Bl(d.duration)),d.repeatDelay&&(d.repeatDelay=Bl(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(h=!0)),h&&!o&&void 0!==t.get()){const e=Kl(d.keyframes,l);if(void 0!==e)return Zl.update((()=>{d.onUpdate(e),d.onComplete()})),new Id([])}return!o&&Dd.supports(d)?new Dd(d):new Pd(d)},Bd=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Nd=e=>Cl(e)?e[e.length-1]||0:e;function Ud(e,t){-1===e.indexOf(t)&&e.push(t)}function Gd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Wd{constructor(){this.subscriptions=[]}add(e){return Ud(this.subscriptions,e),()=>Gd(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Hd{constructor(e,t={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=xc.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=xc.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Wd);const n=this.events[e].add(t);return"change"===e?()=>{n(),Zl.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=xc.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ec(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $d(e,t){return new Hd(e,t)}function zd(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$d(n))}const qd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Kd="data-"+qd("framerAppearId");function Yd(e){return e.props[Kd]}function Qd(e){return jl.has(e)?"transform":Td.has(e)?qd(e):void 0}class Xd extends Hd{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const t=Qd(e);if(!t)return;const n=this.counts.get(t)||0;this.counts.set(t,n+1),0===n&&(this.output.push(t),this.update());let r=!1;return()=>{if(r)return;r=!0;const e=this.counts.get(t)-1;this.counts.set(t,e),0===e&&(Gd(this.output,t),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const Zd=e=>Boolean(e&&e.getVelocity);function Jd(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");return r||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(r=new Xd("auto"),e.addValue("willChange",r)),i=r,Boolean(Zd(i)&&i.add)?r.add(t):void 0;var i}function eh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function th(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const t=e.getValue(d,null!==(o=e.latestValues[d])&&void 0!==o?o:null),r=l[d];if(void 0===r||c&&eh(c,d))continue;const i={delay:n,...$l(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const t=Yd(e);if(t){const e=window.MotionHandoffAnimation(t,d,Zl);null!==e&&(i.startTime=e,a=!0)}}t.start(jd(d,t,r,e.shouldReduceMotion&&jl.has(d)?{type:!1}:i,e,a,Jd(e,d)));const h=t.animation;h&&u.push(h)}return a&&Promise.all(u).then((()=>{Zl.update((()=>{a&&function(e,t){const n=Ll(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o)zd(e,s,Nd(o[s]))}(e,a)}))})),u}function nh(e,t,n={}){var r;const i=Ll(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(th(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(rh).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(nh(e,t,{...o,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function rh(e,t){return e.sortNodePosition(t)}const ih=[...Dl].reverse(),oh=Dl.length;function sh(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map((t=>nh(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=nh(e,t,n);else{const i="function"==typeof t?Ll(e,t,n.custom):t;r=Promise.all(th(e,i,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function ah(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Rl(t,e)}function lh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function uh(){return{animate:lh(!0),whileInView:lh(),whileHover:lh(),whileTap:lh(),whileDrag:lh(),whileFocus:lh(),exit:lh()}}class ch{constructor(e){this.isMounted=!1,this.node=e}update(){}}let dh=0;const hh={animation:{Feature:class extends ch{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=sh(e),n=uh(),r=!0;const i=t=>(n,r)=>{var i;const o=Ll(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function o(o){const s=e.getProps(),a=e.getVariantContext(!0)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<oh;t++){const h=ih[t],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=Ol(f),v=h===o?p.isActive:null;!1===v&&(d=t);let g=f===a[h]&&f!==s[h]&&m;if(g&&r&&e.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===v||!f&&!p.prevProp||Al(f)||"boolean"==typeof f)continue;let y=ah(p.prevProp,f)||h===o&&p.isActive&&!g&&m||t>d&&m,_=!1;const b=Array.isArray(f)?f:[f];let w=b.reduce(i(h),{});!1===v&&(w={});const{prevResolvedValues:x={}}=p,S={...x,...w},k=t=>{y=!0,u.has(t)&&(_=!0,u.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=w[e],n=x[e];if(c.hasOwnProperty(e))continue;let r=!1;r=Cl(t)&&Cl(n)?!Rl(t,n):t!==n,r?null!=t?k(e):u.add(e):void 0!==t&&u.has(e)?k(e):p.protectedKeys[e]=!0}p.prevProp=f,p.prevResolvedValues=w,p.isActive&&(c={...c,...w}),r&&e.blockInitialAnimation&&(y=!1),!y||g&&!_||l.push(...b.map((e=>({animation:e,options:{type:h}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=uh(),r=!0}}}(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Al(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends ch{constructor(){super(...arguments),this.id=dh++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},ph=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function fh(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const mh=e=>t=>ph(t)&&e(t,fh(t));function vh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gh(e,t,n,r){return vh(e,t,mh(n),r)}const yh=(e,t)=>Math.abs(e-t);class _h{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=xh(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=yh(e.x,t.x),r=yh(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=eu;this.history.push({...r,timestamp:i});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=bh(t,this.transformPagePoint),Zl.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=xh("pointercancel"===e.type?this.lastMoveEventInfo:bh(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!ph(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const o=bh(fh(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=eu;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,xh(o,this.history)),this.removeListeners=id(gh(this.contextWindow,"pointermove",this.handlePointerMove),gh(this.contextWindow,"pointerup",this.handlePointerUp),gh(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Jl(this.updatePoint)}}function bh(e,t){return t?{point:t(e.point)}:e}function wh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xh({point:e},t){return{point:e,delta:wh(e,kh(t)),offset:wh(e,Sh(t)),velocity:Eh(t,.1)}}function Sh(e){return e[0]}function kh(e){return e[e.length-1]}function Eh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=kh(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Bl(t)));)n--;if(!r)return{x:0,y:0};const o=Nl(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 Ph(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const Th=Ph("dragHorizontal"),Ah=Ph("dragVertical");function Ch(e){let t=!1;if("y"===e)t=Ah();else if("x"===e)t=Th();else{const e=Th(),n=Ah();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Rh(){const e=Ch(!0);return!e||(e(),!1)}function Oh(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const Fh=.9999,Mh=1.0001,Lh=-.01,Dh=.01;function Vh(e){return e.max-e.min}function Ih(e,t,n,r=.5){e.origin=r,e.originPoint=sd(t.min,t.max,e.origin),e.scale=Vh(n)/Vh(t),e.translate=sd(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Fh&&e.scale<=Mh||isNaN(e.scale))&&(e.scale=1),(e.translate>=Lh&&e.translate<=Dh||isNaN(e.translate))&&(e.translate=0)}function jh(e,t,n,r){Ih(e.x,t.x,n.x,r?r.originX:void 0),Ih(e.y,t.y,n.y,r?r.originY:void 0)}function Bh(e,t,n){e.min=n.min+t.min,e.max=e.min+Vh(t)}function Nh(e,t,n){e.min=t.min-n.min,e.max=e.min+Vh(t)}function Uh(e,t,n){Nh(e.x,t.x,n.x),Nh(e.y,t.y,n.y)}function Gh(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Wh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Hh=.35;function $h(e,t,n){return{min:zh(e,t),max:zh(e,n)}}function zh(e,t){return"number"==typeof e?e:e[t]||0}const qh=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Kh=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Yh(e){return[e("x"),e("y")]}function Qh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Xh(e){return void 0===e||1===e}function Zh({scale:e,scaleX:t,scaleY:n}){return!Xh(e)||!Xh(t)||!Xh(n)}function Jh(e){return Zh(e)||ep(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ep(e){return tp(e.x)||tp(e.y)}function tp(e){return e&&"0%"!==e}function np(e,t,n){return n+t*(e-n)}function rp(e,t,n,r,i){return void 0!==i&&(e=np(e,i,r)),np(e,n,r)+t}function ip(e,t=0,n=1,r,i){e.min=rp(e.min,t,n,r,i),e.max=rp(e.max,t,n,r,i)}function op(e,{x:t,y:n}){ip(e.x,t.translate,t.scale,t.originPoint),ip(e.y,n.translate,n.scale,n.originPoint)}const sp=.999999999999,ap=1.0000000000001;function lp(e,t){e.min=e.min+t,e.max=e.max+t}function up(e,t,n,r,i=.5){ip(e,t,n,sd(e.min,e.max,i),r)}function cp(e,t){up(e.x,t.x,t.scaleX,t.scale,t.originX),up(e.y,t.y,t.scaleY,t.scale,t.originY)}function dp(e,t){return Qh(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const hp=({current:e})=>e?e.ownerDocument.defaultView:null,pp=new WeakMap;class fp{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Kh(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new _h(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(fh(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();if(r&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ch(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),Yh((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Su.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Vh(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Zl.postRender((()=>o(e,t))),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:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>Yh((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:hp(this.visualElement)})}stop(e,t){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Zl.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!mp(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?sd(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?sd(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&Oh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Gh(e.x,n,i),y:Gh(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Hh){return!1===e?e=0:!0===e&&(e=Hh),{x:$h(e,"left","right"),y:$h(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Yh((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Oh(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=dp(e,n),{scroll:i}=t;return i&&(lp(r.x,i.offset.x),lp(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Wh(e.x,t.x),y:Wh(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=Qh(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Yh((s=>{if(!mp(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(jd(e,n,0,t,this.visualElement,!1,Jd(this.visualElement,e)))}stopAnimation(){Yh((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){Yh((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Yh((t=>{const{drag:n}=this.getProps();if(!mp(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-sd(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Oh(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Yh((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Vh(e),i=Vh(t);return i>r?n=od(t.min,t.max-r,e.min):r>i&&(n=od(e.min,e.max-i,t.min)),hu(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Yh((t=>{if(!mp(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(sd(i,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;pp.set(this.visualElement,this);const e=gh(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Oh(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Zl.read(t);const i=vh(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Yh((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Hh,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function mp(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const vp=e=>(t,n)=>{e&&Zl.postRender((()=>e(t,n)))};const gp=ot(null);const yp=ot({}),_p=ot({}),bp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wp(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xp={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!ku.test(e))return e;e=parseFloat(e)}return`${wp(e,t.target.x)}% ${wp(e,t.target.y)}%`}},Sp={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ac.parse(e);if(i.length>5)return r;const o=ac.createTransformer(e),s="number"!=typeof i[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=sd(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}},kp={};const{schedule:Ep,cancel:Pp}=Xl(queueMicrotask,!1);class Tp extends Be{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;var o;o=Cp,Object.assign(kp,o),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),bp.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Zl.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ep.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ap(e){const[t,n]=function(){const e=Bn(gp);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=Un();Mn((()=>r(i)),[]);const o=jn((()=>n&&n(i)),[i,n]);return!t&&n?[!1,o]:[!0]}(),r=Bn(yp);return no(Tp,{...e,layoutGroup:r,switchLayoutGroup:Bn(_p),isPresent:t,safeToRemove:n})}const Cp={borderRadius:{...xp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xp,borderTopRightRadius:xp,borderBottomLeftRadius:xp,borderBottomRightRadius:xp,boxShadow:Sp},Rp=["TopLeft","TopRight","BottomLeft","BottomRight"],Op=Rp.length,Fp=e=>"string"==typeof e?parseFloat(e):e,Mp=e=>"number"==typeof e||ku.test(e);function Lp(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Dp=Ip(0,.5,Xc),Vp=Ip(.5,.95,Yl);function Ip(e,t,n){return r=>r<e?0:r>t?1:n(od(e,t,r))}function jp(e,t){e.min=t.min,e.max=t.max}function Bp(e,t){jp(e.x,t.x),jp(e.y,t.y)}function Np(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Up(e,t,n,r,i){return e=np(e-=t,1/n,r),void 0!==i&&(e=np(e,1/i,r)),e}function Gp(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){Su.test(t)&&(t=parseFloat(t),t=sd(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=sd(o.min,o.max,r);e===o&&(a-=t),e.min=Up(e.min,t,n,a,i),e.max=Up(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}const Wp=["x","scaleX","originX"],Hp=["y","scaleY","originY"];function $p(e,t,n,r){Gp(e.x,t,Wp,n?n.x:void 0,r?r.x:void 0),Gp(e.y,t,Hp,n?n.y:void 0,r?r.y:void 0)}function zp(e){return 0===e.translate&&1===e.scale}function qp(e){return zp(e.x)&&zp(e.y)}function Kp(e,t){return e.min===t.min&&e.max===t.max}function Yp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Qp(e,t){return Yp(e.x,t.x)&&Yp(e.y,t.y)}function Xp(e){return Vh(e.x)/Vh(e.y)}function Zp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Jp{constructor(){this.members=[]}add(e){Ud(this.members,e),e.scheduleRender()}remove(e){if(Gd(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ef=(e,t)=>e.depth-t.depth;class tf{constructor(){this.children=[],this.isDirty=!1}add(e){Ud(this.children,e),this.isDirty=!0}remove(e){Gd(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ef),this.isDirty=!1,this.children.forEach(e)}}function nf(e){const t=Zd(e)?e.get():e;return Bd(t)?t.toValue():t}const rf={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},of="undefined"!=typeof window&&void 0!==window.MotionDebug,sf=["","X","Y","Z"],af={visibility:"hidden"};let lf=0;function uf(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function cf(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Yd(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Zl,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&cf(r)}function df({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=lf++,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,of&&(rf.totalNodes=rf.resolvedTargetDeltas=rf.recalculatedProjection=0),this.nodes.forEach(ff),this.nodes.forEach(wf),this.nodes.forEach(xf),this.nodes.forEach(mf),of&&window.MotionDebug.record(rf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new tf)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Wd),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:i,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=xc.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Jl(r),e(o-t))};return Zl.read(r,!0),()=>Jl(r)}(r,250),bp.hasAnimatedSinceResize&&(bp.hasAnimatedSinceResize=!1,this.nodes.forEach(bf))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||Af,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Qp(this.targetLayout,r)||n,u=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,u);const t={...$l(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||bf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,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(Sf),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(gf);this.isUpdating||this.nodes.forEach(yf),this.isUpdating=!1,this.nodes.forEach(_f),this.nodes.forEach(hf),this.nodes.forEach(pf),this.clearAllSnapshots();const e=xc.now();eu.delta=hu(0,1e3/60,e-eu.timestamp),eu.timestamp=e,eu.isProcessing=!0,tu.update.process(eu),tu.preRender.process(eu),tu.render.process(eu),eu.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ep.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vf),this.sharedNodes.forEach(kf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Zl.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Zl.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Kh(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!qp(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||Jh(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Of((r=n).x),Of(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return Kh();const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(Mf))){const{scroll:e}=this.root;e&&(lp(n.x,e.offset.x),lp(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=Kh();if(Bp(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:i,options:o}=t;t!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&Bp(n,e),lp(n.x,i.offset.x),lp(n.y,i.offset.y))}return n}applyTransform(e,t=!1){const n=Kh();Bp(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&cp(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Jh(e.latestValues)&&cp(n,e.latestValues)}return Jh(this.latestValues)&&cp(n,this.latestValues),n}removeTransform(e){const t=Kh();Bp(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Jh(e.latestValues))continue;Zh(e.latestValues)&&e.updateSnapshot();const r=Kh();Bp(r,e.measurePageBox()),$p(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Jh(this.latestValues)&&$p(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eu.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=eu.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Kh(),this.relativeTargetOrigin=Kh(),Uh(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Bp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Kh(),this.targetWithTransforms=Kh()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Bh(s.x,a.x,l.x),Bh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Bp(this.target,this.layout.layoutBox),op(this.target,this.targetDelta)):Bp(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Kh(),this.relativeTargetOrigin=Kh(),Uh(this.relativeTargetOrigin,this.target,e.target),Bp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}of&&rf.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Zh(this.parent.latestValues)&&!ep(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===eu.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;Bp(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let o,s;t.x=t.y=1;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&cp(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,op(e,s)),r&&Jh(o.latestValues)&&cp(e,o.latestValues))}t.x<ap&&t.x>sp&&(t.x=1),t.y<ap&&t.y>sp&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=Kh());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Np(this.prevProjectionDelta.x,this.projectionDelta.x),Np(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),jh(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&Zp(this.projectionDelta.x,this.prevProjectionDelta.x)&&Zp(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),of&&rf.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=qh(),this.projectionDelta=qh(),this.projectionDeltaWithTransform=qh()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=qh();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=Kh(),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(Tf));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,p,f,m,v;Ef(o.x,e.x,n),Ef(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Uh(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,m=s,v=n,Pf(p.x,f.x,m.x,v),Pf(p.y,f.y,m.y,v),d&&(l=this.relativeTarget,h=d,Kp(l.x,h.x)&&Kp(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d=Kh()),Bp(d,this.relativeTarget)),a&&(this.animationValues=i,function(e,t,n,r,i,o){i?(e.opacity=sd(0,void 0!==n.opacity?n.opacity:1,Dp(r)),e.opacityExit=sd(void 0!==t.opacity?t.opacity:1,0,Vp(r))):o&&(e.opacity=sd(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<Op;s++){const i=`border${Rp[s]}Radius`;let o=Lp(t,i),a=Lp(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Mp(o)===Mp(a)?(e[i]=Math.max(sd(Fp(o),Fp(a),r),0),(Su.test(a)||Su.test(o))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=sd(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Jl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Zl.update((()=>{bp.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Zd(e)?e:$d(e);return r.start(jd("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Ff(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Kh();const t=Vh(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Vh(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Bp(t,n),cp(t,i),jh(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Jp);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&uf("z",e,r,this.animationValues);for(let i=0;i<sf.length;i++)uf(`rotate${sf[i]}`,e,r,this.animationValues),uf(`skew${sf[i]}`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return af;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=nf(null==e?void 0:e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=nf(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Jh(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),i&&(r.transform=i(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?r.opacity=o===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const u in kp){if(void 0===s[u])continue;const{correct:e,applyTo:t}=kp[u],n="none"===r.transform?s[u]:e(s[u],o);if(t){const e=t.length;for(let i=0;i<e;i++)r[t[i]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=o===this?nf(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(gf),this.root.sharedNodes.clear()}}}function hf(e){e.updateLayout()}function pf(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?Yh((e=>{const r=o?n.measuredBox[e]:n.layoutBox[e],i=Vh(r);r.min=t[e].min,r.max=r.min+i})):Ff(i,n.layoutBox,t)&&Yh((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=Vh(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=qh();jh(s,t,n.layoutBox);const a=qh();o?jh(a,e.applyTransform(r,!0),n.measuredBox):jh(a,t,n.layoutBox);const l=!qp(s);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s=Kh();Uh(s,n.layoutBox,i.layoutBox);const a=Kh();Uh(a,t,o.layoutBox),Qp(s,a)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function ff(e){of&&rf.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function mf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vf(e){e.clearSnapshot()}function gf(e){e.clearMeasurements()}function yf(e){e.isLayoutDirty=!1}function _f(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function bf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wf(e){e.resolveTargetDelta()}function xf(e){e.calcProjection()}function Sf(e){e.resetSkewAndRotation()}function kf(e){e.removeLeadSnapshot()}function Ef(e,t,n){e.translate=sd(t.translate,0,n),e.scale=sd(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Pf(e,t,n,r){e.min=sd(t.min,n.min,r),e.max=sd(t.max,n.max,r)}function Tf(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Af={duration:.45,ease:[.4,0,.1,1]},Cf=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rf=Cf("applewebkit/")&&!Cf("chrome/")?Math.round:Yl;function Of(e){e.min=Rf(e.min),e.max=Rf(e.max)}function Ff(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Xp(t),i=Xp(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function Mf(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Lf=df({attachResizeListener:(e,t)=>vh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Df={current:void 0},Vf=df({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Df.current){const e=new Lf({});e.mount(window),e.setOptions({layoutScroll:!0}),Df.current=e}return Df.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),If={pan:{Feature:class extends ch{constructor(){super(...arguments),this.removePointerDownListener=Yl}onPointerDown(e){this.session=new _h(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hp(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:vp(e),onStart:vp(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Zl.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=gh(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ch{constructor(e){super(e),this.removeGroupControls=Yl,this.removeListeners=Yl,this.controls=new fp(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yl}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Vf,MeasureLayout:Ap}};function jf(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return gh(e.current,n,((n,i)=>{if("touch"===n.pointerType||Rh())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const s=o[r];s&&Zl.postRender((()=>s(n,i)))}),{passive:!e.getProps()[r]})}const Bf=(e,t)=>!!t&&(e===t||Bf(e,t.parentElement));function Nf(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,fh(n))}const Uf=new WeakMap,Gf=new WeakMap,Wf=e=>{const t=Uf.get(e.target);t&&t(e)},Hf=e=>{e.forEach(Wf)};function $f(e,t,n){const r=function({root:e,...t}){const n=e||document;Gf.has(n)||Gf.set(n,{});const r=Gf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Hf,{root:e,...t})),r[i]}(t);return Uf.set(e,n),r.observe(e),()=>{Uf.delete(e),r.unobserve(e)}}const zf={some:0,all:1};const qf={inView:{Feature:class extends ch{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:zf[r]};return $f(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ch{constructor(){super(...arguments),this.removeStartListeners=Yl,this.removeEndListeners=Yl,this.removeAccessibleListeners=Yl,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=gh(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||Bf(this.node.current,e.target)?n:r;o&&Zl.update((()=>o(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),i=gh(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=id(r,i),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=vh(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=vh(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&Nf("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Zl.postRender((()=>n(e,t)))}))})),Nf("down",((e,t)=>{this.startPress(e,t)}))})),t=vh(this.node.current,"blur",(()=>{this.isPressing&&Nf("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=id(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Zl.postRender((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Rh()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Zl.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=gh(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=vh(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=id(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ch{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch($y){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=id(vh(this.node.current,"focus",(()=>this.onFocus())),vh(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends ch{mount(){this.unmount=id(jf(this.node,!0),jf(this.node,!1))}unmount(){}}}},Kf={layout:{ProjectionNode:Vf,MeasureLayout:Ap}},Yf=ot({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Qf=ot({}),Xf="undefined"!=typeof window,Zf=Xf?Ln:Mn,Jf=ot({strict:!1});let em=!1;function tm(e,t,n,r,i){var o;const{visualElement:s}=Bn(Qf),a=Bn(Jf),l=Bn(gp),u=Bn(Yf).reducedMotion,c=Dn();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const d=c.current,h=Bn(_p);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:rm(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Oh(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(c.current,n,i,h),qr((()=>{d&&d.update(n,l)}));const p=n[Kd],f=Dn(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return Zf((()=>{d&&(d.updateFeatures(),Ep.render(d.render),f.current&&d.animationState&&d.animationState.animateChanges())})),Mn((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current=!1,em||(em=!0,queueMicrotask(nm)))})),d}function nm(){window.MotionHandoffIsComplete=!0}function rm(e){if(e)return!1!==e.options.allowProjection?e.projection:rm(e.parent)}function im(e,t,n){return jn((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Oh(n)&&(n.current=r))}),[t])}function om(e){return Al(e.animate)||Vl.some((t=>Ol(e[t])))}function sm(e){return Boolean(om(e)||e.variants)}function am(e){const{initial:t,animate:n}=function(e,t){if(om(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Ol(t)?t:void 0,animate:Ol(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,Bn(Qf));return In((()=>({initial:t,animate:n})),[lm(t),lm(n)])}function lm(e){return Array.isArray(e)?e.join(" "):e}const um={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"]},cm={};for(const NS in um)cm[NS]={isEnabled:e=>um[NS].some((t=>!!e[t]))};const dm=Symbol.for("motionComponentSymbol");function hm({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&function(e){for(const t in e)cm[t]={...cm[t],...e[t]}}(e);const o=tr((function(e,o){let s;const a={...Bn(Yf),...e,layoutId:pm(e)},{isStatic:l}=a,u=am(e),c=r(e,l);if(!l&&Xf){Bn(Jf).strict;const e=function(e){const{drag:t,layout:n}=cm;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(a);s=e.MeasureLayout,u.visualElement=tm(i,c,a,t,e.ProjectionNode)}return no(Qf.Provider,{value:u,children:[s&&u.visualElement?no(s,{visualElement:u.visualElement,...a}):null,n(i,e,im(c,u.visualElement,o),c,l,u.visualElement)]})}));return o[dm]=i,o}function pm({layoutId:e}){const t=Bn(yp).id;return t&&void 0!==e?t+"-"+e:e}const fm=["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 mm(e){return"string"==typeof e&&!e.includes("-")&&!!(fm.indexOf(e)>-1||/[A-Z]/u.test(e))}function vm(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const gm=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 ym(e,t,n,r){vm(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(gm.has(i)?i:qd(i),t.attrs[i])}function _m(e,{layout:t,layoutId:n}){return jl.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!kp[e]||"opacity"===e)}function bm(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(Zd(i[s])||t.style&&Zd(t.style[s])||_m(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(o[s]=i[s]);return n&&i&&"string"==typeof i.willChange&&(n.applyWillChange=!1),o}function wm(e,t,n){const r=bm(e,t,n);for(const i in e)if(Zd(e[i])||Zd(t[i])){r[-1!==Il.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}function xm(e){const t=Dn(null);return null===t.current&&(t.current=e()),t.current}const Sm=e=>(t,n)=>{const r=Bn(Qf),i=Bn(gp),o=()=>function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,s,a){const l={latestValues:Pm(i,o,s,!a&&e,t),renderState:n()};return r&&(l.mount=e=>r(i,e,l)),l}(e,t,r,i,n);return n?o():xm(o)};function km(e,t){const n=Qd(t);n&&Ud(e,n)}function Em(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const t=Ml(e,r[i]);if(t){const{transitionEnd:e,transition:r,...i}=t;n(i,e)}}}function Pm(e,t,n,r,i){var o;const s={},a=[],l=r&&void 0===(null===(o=e.style)||void 0===o?void 0:o.willChange),u=i(e,{});for(const v in u)s[v]=nf(u[v]);let{initial:c,animate:d}=e;const h=om(e),p=sm(e);t&&p&&!h&&!1!==e.inherit&&(void 0===c&&(c=t.initial),void 0===d&&(d=t.animate));let f=!!n&&!1===n.initial;f=f||!1===c;const m=f?d:c;return m&&"boolean"!=typeof m&&!Al(m)&&Em(e,m,((e,t)=>{for(const n in e){let t=e[n];if(Array.isArray(t)){t=t[f?t.length-1:0]}null!==t&&(s[n]=t)}for(const n in t)s[n]=t[n]})),l&&(d&&!1!==c&&!Al(d)&&Em(e,d,(e=>{for(const t in e)km(a,t)})),a.length&&(s.willChange=a.join(","))),s}const Tm=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Am=()=>({...Tm(),attrs:{}}),Cm=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Rm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Om=Il.length;function Fm(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(jl.has(l))s=!0;else if(su(l))i[l]=e;else{const t=Cm(e,pc[l]);l.startsWith("origin")?(a=!0,o[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<Om;o++){const s=Il[o],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=Cm(a,pc[s]);l||(i=!1,r+=`${Rm[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function Mm(e,t,n){return"string"==typeof e?e:ku.transform(t+n*e)}const Lm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Dm={offset:"strokeDashoffset",array:"strokeDasharray"};function Vm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(Fm(e,u,d),c)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:f}=e;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Mm(t,e.x,e.width)} ${Mm(n,e.y,e.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Lm:Dm;e[o.offset]=ku.transform(-r);const s=ku.transform(t),a=ku.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Im=e=>"string"==typeof e&&"svg"===e.toLowerCase(),jm={useVisualState:Sm({scrapeMotionValuesFromProps:wm,createRenderState:Am,onMount:(e,t,{renderState:n,latestValues:r})=>{Zl.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch($y){n.dimensions={x:0,y:0,width:0,height:0}}})),Zl.render((()=>{Vm(n,r,Im(t.tagName),e.transformTemplate),ym(t,n)}))}})},Bm={useVisualState:Sm({applyWillChange:!0,scrapeMotionValuesFromProps:bm,createRenderState:Tm})};function Nm(e,t,n){for(const r in t)Zd(t[r])||_m(r,n)||(e[r]=t[r])}function Um(e,t){const n={};return Nm(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return In((()=>{const n=Tm();return Fm(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function Gm(e,t){const n={},r=Um(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Wm=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 Hm(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Wm.has(e)}let $m=e=>!Hm(e);try{(zm=require("@emotion/is-prop-valid").default)&&($m=e=>e.startsWith("on")?!Hm(e):zm(e))}catch(BS){}var zm;function qm(e,t,n,r){const i=In((()=>{const n=Am();return Vm(n,t,Im(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Nm(t,e.style,e),i.style={...t,...i.style}}return i}function Km(e=!1){return(t,n,r,{latestValues:i},o)=>{const s=(mm(t)?qm:Gm)(n,i,o,t),a=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||($m(i)||!0===n&&Hm(i)||!t&&!Hm(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),l=t!==je?{...a,...s,ref:r}:{},{children:u}=n;return De(t,{...l,children:In((()=>Zd(u)?u.get():u),[u])})}}function Ym(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return hm({...mm(n)?jm:Bm,preloadedFeatures:e,useRender:Km(r),createVisualElement:t,Component:n})}}const Qm={current:null},Xm={current:!1};const Zm=new WeakMap,Jm=[...Vu,Qu,ac],ev=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tv=Vl.length;class nv{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Wu,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,Zl.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=om(t),this.isVariantNode=sm(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const d in c){const e=c[d];void 0!==a[d]&&Zd(e)&&e.set(a[d],!1)}}mount(e){this.current=e,Zm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Xm.current||function(){if(Xm.current=!0,Xf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Qm.current=e.matches;e.addListener(t),t()}else Qm.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Qm.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Zm.delete(this.current),this.projection&&this.projection.unmount(),Jl(this.notifyUpdate),Jl(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=jl.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Zl.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),i(),o&&o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in cm){const t=cm[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Kh()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<ev.length;n++){const t=ev[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Zd(i))e.addValue(r,i);else if(Zd(o))e.addValue(r,$d(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,$d(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let n=0;n<tv;n++){const e=Vl[n],r=this.props[e];(Ol(r)||!1===r)&&(t[e]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=$d(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var i;return null!=r&&("string"==typeof r&&(iu(r)||nu(r))?r=parseFloat(r):(i=r,!Jm.find(Du(i))&&ac.test(t)&&(r=vc(e,t))),this.setBaseTarget(e,Zd(r)?r.get():r)),Zd(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=Ml(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||Zd(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new Wd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class rv extends nv{constructor(){super(...arguments),this.KeyframeResolver=yc}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class iv extends rv{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=vm}readValueFromInstance(e,t){if(jl.has(t)){const e=mc(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=(su(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return dp(e,t)}build(e,t,n){Fm(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return bm(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Zd(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class ov extends rv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Kh}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(jl.has(t)){const e=mc(t);return e&&e.default||0}return t=gm.has(t)?t:qd(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return wm(e,t,n)}build(e,t,n){Vm(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){ym(e,t,0,r)}mount(e){this.isSVGTag=Im(e.tagName),super.mount(e)}}const sv=Tl(Ym({...hh,...qf,...If,...Kf},((e,t)=>mm(e)?new ov(t):new iv(t,{allowProjection:e!==je}))));class av extends Be{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function lv({children:e,isPresent:t}){const n=Un(),r=Dn(null),i=Dn({width:0,height:0,top:0,left:0}),{nonce:o}=Bn(Yf);return qr((()=>{const{width:e,height:s,top:a,left:l}=i.current;if(t||!r.current||!e||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return o&&(u.nonce=o),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[t]),no(av,{isPresent:t,childRef:r,sizeRef:i,children:jr(e,{ref:r})})}const uv=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=xm(cv),l=Un(),u=In((()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:e=>{a.set(e,!0);for(const t of a.values())if(!t)return;r&&r()},register:e=>(a.set(e,!1),()=>a.delete(e))})),o?[Math.random()]:[n]);return In((()=>{a.forEach(((e,t)=>a.set(t,!1)))}),[n]),Mn((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(e=no(lv,{isPresent:n,children:e})),no(gp.Provider,{value:u,children:e})};function cv(){return new Map}const dv=e=>e.key||"";function hv(e){const t=[];return rr.forEach(e,(e=>{Dr(e)&&t.push(e)})),t}const pv=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=In((()=>hv(e)),[e]),l=a.map(dv),u=Dn(!0),c=Dn(a),d=xm((()=>new Map)),[h,p]=On(a),[f,m]=On(a);Zf((()=>{u.current=!1,c.current=a;for(let e=0;e<f.length;e++){const t=dv(f[e]);l.includes(t)?d.delete(t):!0!==d.get(t)&&d.set(t,!1)}}),[f,l.length,l.join("-")]);const v=[];if(a!==h){let e=[...a];for(let t=0;t<f.length;t++){const n=f[t],r=dv(n);l.includes(r)||(e.splice(t,0,n),v.push(n))}return"wait"===s&&v.length&&(e=v),m(hv(e)),void p(a)}const{forceRender:g}=Bn(yp);return no(je,{children:f.map((e=>{const t=dv(e),h=a===f||l.includes(t);return no(uv,{isPresent:h,initial:!(u.current&&!r)&&void 0,custom:h?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:h?void 0:()=>{if(!d.has(t))return;d.set(t,!0);let e=!0;d.forEach((t=>{t||(e=!1)})),e&&(null==g||g(),m(c.current),i&&i())},children:e},t)}))})};var fv=e=>"checkbox"===e.type,mv=e=>e instanceof Date,vv=e=>null==e;const gv=e=>"object"==typeof e;var yv=e=>!vv(e)&&!Array.isArray(e)&&gv(e)&&!mv(e),_v=e=>yv(e)&&e.target?fv(e.target)?e.target.checked:e.target.value:e,bv=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),wv=e=>{const t=e.constructor&&e.constructor.prototype;return yv(t)&&t.hasOwnProperty("isPrototypeOf")},xv="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Sv(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(xv&&(e instanceof Blob||e instanceof FileList)||!n&&!yv(e))return e;if(t=n?[]:{},n||wv(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=Sv(e[n]));else t=e}return t}var kv=e=>Array.isArray(e)?e.filter(Boolean):[],Ev=e=>void 0===e,Pv=(e,t,n)=>{if(!t||!yv(e))return n;const r=kv(t.split(/[,[\].]+?/)).reduce(((e,t)=>vv(e)?e:e[t]),e);return Ev(r)||r===e?Ev(e[t])?n:e[t]:r},Tv=e=>"boolean"==typeof e,Av=e=>/^\w*$/.test(e),Cv=e=>kv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Rv=(e,t,n)=>{let r=-1;const i=Av(t)?[t]:Cv(t),o=i.length,s=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==s){const n=e[t];o=yv(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t)return;e[t]=o,e=e[t]}return e};const Ov={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Fv={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Mv="max",Lv="min",Dv="maxLength",Vv="minLength",Iv="pattern",jv="required",Bv="validate",Nv=Xr.createContext(null),Uv=()=>Xr.useContext(Nv),Gv=e=>{const{children:t,...n}=e;return Xr.createElement(Nv.Provider,{value:n},t)};var Wv=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Fv.all&&(t._proxyFormState[i]=!r||Fv.all),n&&(n[i]=!0),e[i]}});return i},Hv=e=>yv(e)&&!Object.keys(e).length,$v=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Hv(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!r||Fv.all)))},zv=e=>Array.isArray(e)?e:[e],qv=(e,t,n)=>!e||!t||e===t||zv(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function Kv(e){const t=Xr.useRef(e);t.current=e,Xr.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var Yv=e=>"string"==typeof e,Qv=(e,t,n,r,i)=>Yv(e)?(r&&t.watch.add(e),Pv(n,e,i)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),Pv(n,e)))):(r&&(t.watchAll=!0),n);function Xv(e){const t=Uv(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,s=bv(i._names.array,n),a=function(e){const t=Uv(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:s}=e||{},a=Xr.useRef(r);a.current=r,Kv({disabled:o,subject:n._subjects.values,next:e=>{qv(a.current,e.name,s)&&u(Sv(Qv(a.current,n._names,e.values||n._formValues,!1,i)))}});const[l,u]=Xr.useState(n._getWatch(r,i));return Xr.useEffect((()=>n._removeUnmounted())),l}({control:i,name:n,defaultValue:Pv(i._formValues,n,Pv(i._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=Uv(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[s,a]=Xr.useState(n._formState),l=Xr.useRef(!0),u=Xr.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=Xr.useRef(i);return c.current=i,Kv({disabled:r,next:e=>l.current&&qv(c.current,e.name,o)&&$v(e,u.current,n._updateFormState)&&a({...n._formState,...e}),subject:n._subjects.state}),Xr.useEffect((()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1})),[n]),Wv(s,n,u.current,!1)}({control:i,name:n,exact:!0}),u=Xr.useRef(i.register(n,{...e.rules,value:a,...Tv(e.disabled)?{disabled:e.disabled}:{}}));return Xr.useEffect((()=>{const e=i._options.shouldUnregister||o,t=(e,t)=>{const n=Pv(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=Sv(Pv(i._options.defaultValues,n));Rv(i._defaultValues,n,e),Ev(Pv(i._formValues,n))&&Rv(i._formValues,n,e)}return()=>{(s?e&&!i._state.action:e)?i.unregister(n):t(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,...Tv(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Xr.useCallback((e=>u.current.onChange({target:{value:_v(e),name:n},type:Ov.CHANGE})),[n]),onBlur:Xr.useCallback((()=>u.current.onBlur({target:{value:Pv(i._formValues,n),name:n},type:Ov.BLUR})),[n,i]),ref:Xr.useCallback((e=>{const t=Pv(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!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 Zv=e=>e.render(Xv(e));var Jv=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},eg=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)}))},tg=(e,t,n={})=>n.shouldFocus||Ev(n.shouldFocus)?n.focusName||`${e}.${Ev(n.focusIndex)?t:n.focusIndex}.`:"",ng=e=>({isOnSubmit:!e||e===Fv.onSubmit,isOnBlur:e===Fv.onBlur,isOnChange:e===Fv.onChange,isOnAll:e===Fv.all,isOnTouch:e===Fv.onTouched}),rg=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const ig=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=Pv(e,i);if(n){const{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(ig(o,t))break}else if(yv(o)&&ig(o,t))break}}};var og=(e,t,n)=>{const r=zv(Pv(e,n));return Rv(r,"root",t[n]),Rv(e,n,r),e},sg=e=>"file"===e.type,ag=e=>"function"==typeof e,lg=e=>{if(!xv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ug=e=>Yv(e),cg=e=>"radio"===e.type,dg=e=>e instanceof RegExp;const hg={value:!1,isValid:!1},pg={value:!0,isValid:!0};var fg=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ev(e[0].attributes.value)?Ev(e[0].value)||""===e[0].value?pg:{value:e[0].value,isValid:!0}:pg:hg}return hg};const mg={isValid:!1,value:null};var vg=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),mg):mg;function gg(e,t,n="validate"){if(ug(e)||Array.isArray(e)&&e.every(ug)||Tv(e)&&!e)return{type:n,message:ug(e)?e:"",ref:t}}var yg=e=>yv(e)&&!dg(e)?e:{value:e,message:""},_g=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:c,max:d,pattern:h,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=e._f,y=Pv(t,f);if(!v||g)return{};const _=s?s[0]:o,b=e=>{r&&_.reportValidity&&(_.setCustomValidity(Tv(e)?"":e||""),_.reportValidity())},w={},x=cg(o),S=fv(o),k=x||S,E=(m||sg(o))&&Ev(o.value)&&Ev(y)||lg(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,P=Jv.bind(null,f,n,w),T=(e,t,n,r=Dv,i=Vv)=>{const s=e?t:n;w[f]={type:e?r:i,message:s,ref:o,...P(e?r:i,s)}};if(i?!Array.isArray(y)||!y.length:a&&(!k&&(E||vv(y))||Tv(y)&&!y||S&&!fg(s).isValid||x&&!vg(s).isValid)){const{value:e,message:t}=ug(a)?{value:!!a,message:a}:yg(a);if(e&&(w[f]={type:jv,message:t,ref:_,...P(jv,t)},!n))return b(t),w}if(!(E||vv(c)&&vv(d))){let e,t;const r=yg(d),i=yg(c);if(vv(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Yv(r.value)&&y&&(e=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Yv(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);vv(r.value)||(e=n>r.value),vv(i.value)||(t=n<i.value)}if((e||t)&&(T(!!e,r.message,i.message,Mv,Lv),!n))return b(w[f].message),w}if((l||u)&&!E&&(Yv(y)||i&&Array.isArray(y))){const e=yg(l),t=yg(u),r=!vv(e.value)&&y.length>+e.value,i=!vv(t.value)&&y.length<+t.value;if((r||i)&&(T(r,e.message,t.message),!n))return b(w[f].message),w}if(h&&!E&&Yv(y)){const{value:e,message:t}=yg(h);if(dg(e)&&!y.match(e)&&(w[f]={type:Iv,message:t,ref:o,...P(Iv,t)},!n))return b(t),w}if(p)if(ag(p)){const e=gg(await p(y,t),_);if(e&&(w[f]={...e,...P(Bv,e.message)},!n))return b(e.message),w}else if(yv(p)){let e={};for(const r in p){if(!Hv(e)&&!n)break;const i=gg(await p[r](y,t),_,r);i&&(e={...i,...P(r,i.message)},b(i.message),n&&(w[f]=e))}if(!Hv(e)&&(w[f]={ref:_,...e},!n))return w}return b(!0),w},bg=(e,t)=>[...e,...zv(t)],wg=e=>Array.isArray(e)?e.map((()=>{})):void 0;function xg(e,t,n){return[...e.slice(0,t),...zv(n),...e.slice(t)]}var Sg=(e,t,n)=>Array.isArray(e)?(Ev(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],kg=(e,t)=>[...zv(t),...zv(e)];var Eg=(e,t)=>Ev(t)?[]:function(e,t){let n=0;const r=[...e];for(const i of t)r.splice(i-n,1),n++;return kv(r).length?r:[]}(e,zv(t).sort(((e,t)=>e-t))),Pg=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function Tg(e,t){const n=Array.isArray(t)?t:Av(t)?[t]:Cv(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ev(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(yv(r)&&Hv(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ev(e[t]))return!1;return!0}(r))&&Tg(e,n.slice(0,-1)),e}var Ag=(e,t,n)=>(e[t]=n,e);var Cg=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},Rg=e=>vv(e)||!gv(e);function Og(e,t){if(Rg(e)||Rg(t))return e===t;if(mv(e)&&mv(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(mv(n)&&mv(e)||yv(n)&&yv(e)||Array.isArray(n)&&Array.isArray(e)?!Og(n,e):n!==e)return!1}}return!0}var Fg=e=>"select-multiple"===e.type,Mg=e=>cg(e)||fv(e),Lg=e=>lg(e)&&e.isConnected,Dg=e=>{for(const t in e)if(ag(e[t]))return!0;return!1};function Vg(e,t={}){const n=Array.isArray(e);if(yv(e)||n)for(const r in e)Array.isArray(e[r])||yv(e[r])&&!Dg(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Vg(e[r],t[r])):vv(e[r])||(t[r]=!0);return t}function Ig(e,t,n){const r=Array.isArray(e);if(yv(e)||r)for(const i in e)Array.isArray(e[i])||yv(e[i])&&!Dg(e[i])?Ev(t)||Rg(n[i])?n[i]=Array.isArray(e[i])?Vg(e[i],[]):{...Vg(e[i])}:Ig(e[i],vv(t)?{}:t[i],n[i]):n[i]=!Og(e[i],t[i]);return n}var jg=(e,t)=>Ig(e,t,Vg(t)),Bg=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ev(e)?e:t?""===e?NaN:e?+e:e:n&&Yv(e)?new Date(e):r?r(e):e;function Ng(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return sg(t)?t.files:cg(t)?vg(e.refs).value:Fg(t)?[...t.selectedOptions].map((({value:e})=>e)):fv(t)?fg(e.refs).value:Bg(Ev(t.value)?e.ref.value:t.value,e)}var Ug=(e,t,n,r)=>{const i={};for(const o of e){const e=Pv(t,o);e&&Rv(i,o,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Gg=e=>Ev(e)?e:dg(e)?e.source:yv(e)?dg(e.value)?e.value.source:e.value:e;const Wg="AsyncFunction";var Hg=e=>!(e&&e.validate||!(ag(e.validate)&&e.validate.constructor.name===Wg||yv(e.validate)&&Object.values(e.validate).find((e=>e.constructor.name===Wg)))),$g=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function zg(e,t,n){const r=Pv(e,n);if(r||Av(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=Pv(t,r),s=Pv(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}var qg=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e),Kg=(e,t)=>!kv(Pv(e,t)).length&&Tg(e,t);const Yg={mode:Fv.onSubmit,reValidateMode:Fv.onChange,shouldFocusError:!0};function Qg(e={}){let t,n={...Yg,...e},r={submitCount:0,isDirty:!1,isLoading:ag(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(yv(n.defaultValues)||yv(n.values))&&Sv(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:Sv(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:Cg(),array:Cg(),state:Cg()},h=ng(n.mode),p=ng(n.reValidateMode),f=n.criteriaMode===Fv.all,m=async e=>{if(c.isValid||e){const e=n.resolver?Hv((await b()).errors):await w(i,!0);e!==r.isValid&&d.state.next({isValid:e})}},v=(e,t)=>{(c.isValidating||c.validatingFields)&&((e||Array.from(l.mount)).forEach((e=>{e&&(t?Rv(r.validatingFields,e,t):Tg(r.validatingFields,e))})),d.state.next({validatingFields:r.validatingFields,isValidating:!Hv(r.validatingFields)}))},g=(e,t,n,r)=>{const l=Pv(i,e);if(l){const i=Pv(s,e,Ev(n)?Pv(o,e):n);Ev(i)||r&&r.defaultChecked||t?Rv(s,e,t?i:Ng(l._f)):k(e,i),a.mount&&m()}},y=(e,t,n,s,a)=>{let l=!1,u=!1;const h={name:e},p=!!(Pv(i,e)&&Pv(i,e)._f&&Pv(i,e)._f.disabled);if(!n||s){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=x(),l=u!==h.isDirty);const n=p||Og(Pv(o,e),t);u=!(p||!Pv(r.dirtyFields,e)),n||p?Tg(r.dirtyFields,e):Rv(r.dirtyFields,e,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!n}if(n){const t=Pv(r.touchedFields,e);t||(Rv(r.touchedFields,e,n),h.touchedFields=r.touchedFields,l=l||c.touchedFields&&t!==n)}return l&&a&&d.state.next(h),l?h:{}},_=(n,i,o,s)=>{const a=Pv(r.errors,n),l=c.isValid&&Tv(i)&&r.isValid!==i;var h;if(e.delayError&&o?(h=()=>((e,t)=>{Rv(r.errors,e,t),d.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(u),u=setTimeout(h,e)},t(e.delayError)):(clearTimeout(u),t=null,o?Rv(r.errors,n,o):Tg(r.errors,n)),(o?!Og(a,o):a)||!Hv(s)||l){const e={...s,...l&&Tv(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}},b=async e=>{v(e,!0);const t=await n.resolver(s,n.context,Ug(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return v(e),t},w=async(e,t,i={valid:!0})=>{for(const o in e){const a=e[o];if(a){const{_f:e,...u}=a;if(e){const u=l.array.has(e.name),d=a._f&&Hg(a._f);d&&c.validatingFields&&v([o],!0);const h=await _g(a,s,f,n.shouldUseNativeValidation&&!t,u);if(d&&c.validatingFields&&v([o]),h[e.name]&&(i.valid=!1,t))break;!t&&(Pv(h,e.name)?u?og(r.errors,h,e.name):Rv(r.errors,e.name,h[e.name]):Tg(r.errors,e.name))}!Hv(u)&&await w(u,t,i)}}return i.valid},x=(e,t)=>(e&&t&&Rv(s,e,t),!Og(R(),o)),S=(e,t,n)=>Qv(e,l,{...a.mount?s:Ev(t)?o:Yv(e)?{[e]:t}:t},n,t),k=(e,t,n={})=>{const r=Pv(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&Rv(s,e,Bg(t,n)),o=lg(n.ref)&&vv(t)?"":t,Fg(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?fv(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):sg(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.values.next({name:e,values:{...s}})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&C(e)},E=(e,t,n)=>{for(const r in t){const o=t[r],s=`${e}.${r}`,a=Pv(i,s);!l.array.has(e)&&Rg(o)&&(!a||a._f)||mv(o)?k(s,o,n):E(s,o,n)}},P=(e,t,n={})=>{const u=Pv(i,e),h=l.array.has(e),p=Sv(t);Rv(s,e,p),h?(d.array.next({name:e,values:{...s}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:e,dirtyFields:jg(o,s),isDirty:x(e,p)})):!u||u._f||vv(p)?k(e,p,n):E(e,p,n),rg(e,l)&&d.state.next({...r}),d.values.next({name:a.mount?e:void 0,values:{...s}})},T=async o=>{a.mount=!0;const u=o.target;let g=u.name,x=!0;const S=Pv(i,g),k=e=>{x=Number.isNaN(e)||Og(e,Pv(s,g,e))};if(S){let a,E;const P=u.type?Ng(S._f):_v(o),T=o.type===Ov.BLUR||o.type===Ov.FOCUS_OUT,A=!$g(S._f)&&!n.resolver&&!Pv(r.errors,g)&&!S._f.deps||qg(T,Pv(r.touchedFields,g),r.isSubmitted,p,h),R=rg(g,l,T);Rv(s,g,P),T?(S._f.onBlur&&S._f.onBlur(o),t&&t(0)):S._f.onChange&&S._f.onChange(o);const O=y(g,P,T,!1),F=!Hv(O)||R;if(!T&&d.values.next({name:g,type:o.type,values:{...s}}),A)return c.isValid&&("onBlur"===e.mode?T&&m():m()),F&&d.state.next({name:g,...R?{}:O});if(!T&&R&&d.state.next({...r}),n.resolver){const{errors:e}=await b([g]);if(k(P),x){const t=zg(r.errors,i,g),n=zg(e,i,t.name||g);a=n.error,g=n.name,E=Hv(e)}}else v([g],!0),a=(await _g(S,s,f,n.shouldUseNativeValidation))[g],v([g]),k(P),x&&(a?E=!1:c.isValid&&(E=await w(i,!0)));x&&(S._f.deps&&C(S._f.deps),_(g,E,a,O))}},A=(e,t)=>{if(Pv(r.errors,t)&&e.focus)return e.focus(),1},C=async(e,t={})=>{let o,s;const a=zv(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(e)for(const n of e){const e=Pv(t,n);e?Rv(r.errors,n,e):Tg(r.errors,n)}else r.errors=t;return t})(Ev(e)?e:a);o=Hv(t),s=e?!a.some((e=>Pv(t,e))):o}else e?(s=(await Promise.all(a.map((async e=>{const t=Pv(i,e);return await w(t&&t._f?{[e]:t}:t)})))).every(Boolean),(s||r.isValid)&&m()):s=o=await w(i);return d.state.next({...!Yv(e)||c.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!s&&ig(i,A,e?a:l.mount),s},R=e=>{const t={...a.mount?s:o};return Ev(e)?t:Yv(e)?Pv(t,e):e.map((e=>Pv(t,e)))},O=(e,t)=>({invalid:!!Pv((t||r).errors,e),isDirty:!!Pv((t||r).dirtyFields,e),error:Pv((t||r).errors,e),isValidating:!!Pv(r.validatingFields,e),isTouched:!!Pv((t||r).touchedFields,e)}),F=(e,t,n)=>{const o=(Pv(i,e,{_f:{}})._f||{}).ref,s=Pv(r.errors,e)||{},{ref:a,message:l,type:u,...c}=s;Rv(r.errors,e,{...c,...t,ref:o}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},M=(e,t={})=>{for(const a of e?zv(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(Tg(i,a),Tg(s,a)),!t.keepError&&Tg(r.errors,a),!t.keepDirty&&Tg(r.dirtyFields,a),!t.keepTouched&&Tg(r.touchedFields,a),!t.keepIsValidating&&Tg(r.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&Tg(o,a);d.values.next({values:{...s}}),d.state.next({...r,...t.keepDirty?{isDirty:x()}:{}}),!t.keepIsValid&&m()},L=({disabled:e,name:t,field:n,fields:r,value:i})=>{if(Tv(e)&&a.mount||e){const o=e?void 0:Ev(i)?Ng(n?n._f:Pv(r,t)._f):i;Rv(s,t,o),y(t,o,!1,!1,!0)}},D=(t,r={})=>{let s=Pv(i,t);const u=Tv(r.disabled)||Tv(e.disabled);return Rv(i,t,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:t}},name:t,mount:!0,...r}}),l.mount.add(t),s?L({field:s,disabled:Tv(r.disabled)?r.disabled:e.disabled,name:t,value:r.value}):g(t,!0,r.value),{...u?{disabled:r.disabled||e.disabled}:{},...n.progressive?{required:!!r.required,min:Gg(r.min),max:Gg(r.max),minLength:Gg(r.minLength),maxLength:Gg(r.maxLength),pattern:Gg(r.pattern)}:{},name:t,onChange:T,onBlur:T,ref:e=>{if(e){D(t,r),s=Pv(i,t);const n=Ev(e.value)&&e.querySelectorAll&&e.querySelectorAll("input,select,textarea")[0]||e,a=Mg(n),l=s._f.refs||[];if(a?l.find((e=>e===n)):n===s._f.ref)return;Rv(i,t,{_f:{...s._f,...a?{refs:[...l.filter(Lg),n,...Array.isArray(Pv(o,t))?[{}]:[]],ref:{type:n.type,name:t}}:{ref:n}}}),g(t,!1,void 0,n)}else s=Pv(i,t,{}),s._f&&(s._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!bv(l.array,t)||!a.action)&&l.unMount.add(t)}}},V=()=>n.shouldFocusError&&ig(i,A,l.mount),I=(e,t)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=Sv(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();r.errors=e,l=t}else await w(i);if(Tg(r.errors,"root"),Hv(r.errors)){d.state.next({errors:{}});try{await e(l,o)}catch(u){a=u}}else t&&await t({...r.errors},o),V(),setTimeout(V);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Hv(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(t,n={})=>{const u=t?Sv(t):o,h=Sv(u),p=Hv(t),f=p?o:h;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)Pv(r.dirtyFields,e)?Rv(f,e,Pv(s,e)):P(e,Pv(f,e));else{if(xv&&Ev(t))for(const e of l.mount){const t=Pv(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(lg(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}s=e.shouldUnregister?n.keepDefaultValues?Sv(o):{}:Sv(f),d.array.next({values:{...f}}),d.values.next({values:{...f}})}l={mount:n.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!n.keepIsValid||!!n.keepDirtyValues,a.watch=!!e.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||Og(t,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&s?jg(o,s):r.dirtyFields:n.keepDefaultValues&&t?jg(o,t):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(e,t)=>j(ag(e)?e(s):e,t);return{control:{register:D,unregister:M,getFieldState:O,handleSubmit:I,setError:F,_executeSchema:b,_getWatch:S,_getDirty:x,_updateValid:m,_removeUnmounted:()=>{for(const e of l.unMount){const t=Pv(i,e);t&&(t._f.refs?t._f.refs.every((e=>!Lg(e))):!Lg(t._f.ref))&&M(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,h=!0)=>{if(l&&n){if(a.action=!0,h&&Array.isArray(Pv(i,e))){const t=n(Pv(i,e),l.argA,l.argB);u&&Rv(i,e,t)}if(h&&Array.isArray(Pv(r.errors,e))){const t=n(Pv(r.errors,e),l.argA,l.argB);u&&Rv(r.errors,e,t),Kg(r.errors,e)}if(c.touchedFields&&h&&Array.isArray(Pv(r.touchedFields,e))){const t=n(Pv(r.touchedFields,e),l.argA,l.argB);u&&Rv(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=jg(o,s)),d.state.next({name:e,isDirty:x(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Rv(s,e,t)},_updateDisabledField:L,_getFieldArray:t=>kv(Pv(a.mount?s:o,t,e.shouldUnregister?Pv(o,t,[]):[])),_reset:j,_resetDefaultValues:()=>ag(n.defaultValues)&&n.defaultValues().then((e=>{B(e,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{Tv(e)&&(d.state.next({disabled:e}),ig(i,((t,n)=>{const r=Pv(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:e=>{r.errors=e,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(e){a=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:C,register:D,handleSubmit:I,watch:(e,t)=>ag(e)?d.values.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:P,getValues:R,reset:B,resetField:(e,t={})=>{Pv(i,e)&&(Ev(t.defaultValue)?P(e,Sv(Pv(o,e))):(P(e,t.defaultValue),Rv(o,e,Sv(t.defaultValue))),t.keepTouched||Tg(r.touchedFields,e),t.keepDirty||(Tg(r.dirtyFields,e),r.isDirty=t.defaultValue?x(e,Sv(Pv(o,e))):x()),t.keepError||(Tg(r.errors,e),c.isValid&&m()),d.state.next({...r}))},clearErrors:e=>{e&&zv(e).forEach((e=>Tg(r.errors,e))),d.state.next({errors:e?r.errors:{}})},unregister:M,setError:F,setFocus:(e,t={})=>{const n=Pv(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:O}}const Xg="undefined"!=typeof document?Xr.useLayoutEffect:()=>{};const Zg=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Jg=e=>{if(e&&"window"in e&&e.window===e)return e;return Zg(e).defaultView||window};function ey(e){let t=null;return()=>(null==t&&(t=e()),t)}const ty=ey((function(){return e=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform);var e,t})),ny=ey((function(){return e=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent));var e,t}));class ry{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function iy(e){let t=Dn({isFocused:!1,observer:null});Xg((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=Dn(null);return Xg((()=>{t.current=e}),[e]),jn(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return jn((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,i=e=>{t.current.isFocused=!1,r.disabled&&n(new ry("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}let oy=null,sy=new Set,ay=new Map,ly=!1,uy=!1;const cy={Tab:!0,Escape:!0};function dy(e,t){for(let n of sy)n(e,t)}function hy(e){ly=!0,function(e){return!(e.metaKey||!ty()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(oy="keyboard",dy("keyboard",e))}function py(e){oy="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(ly=!0,dy("pointer",e))}function fy(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(ny()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(ly=!0,oy="virtual")}function my(e){e.target!==window&&e.target!==document&&(ly||uy||(oy="virtual",dy("virtual",e)),ly=!1,uy=!1)}function vy(){ly=!1,uy=!0}function gy(e){if("undefined"==typeof window||ay.get(Jg(e)))return;const t=Jg(e),n=Zg(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ly=!0,r.apply(this,arguments)},n.addEventListener("keydown",hy,!0),n.addEventListener("keyup",hy,!0),n.addEventListener("click",fy,!0),t.addEventListener("focus",my,!0),t.addEventListener("blur",vy,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",py,!0),n.addEventListener("pointermove",py,!0),n.addEventListener("pointerup",py,!0)):(n.addEventListener("mousedown",py,!0),n.addEventListener("mousemove",py,!0),n.addEventListener("mouseup",py,!0)),t.addEventListener("beforeunload",(()=>{yy(e)}),{once:!0}),ay.set(t,{focus:r})}const yy=(e,t)=>{const n=Jg(e),r=Zg(e);t&&r.removeEventListener("DOMContentLoaded",t),ay.has(n)&&(n.HTMLElement.prototype.focus=ay.get(n).focus,r.removeEventListener("keydown",hy,!0),r.removeEventListener("keyup",hy,!0),r.removeEventListener("click",fy,!0),n.removeEventListener("focus",my,!0),n.removeEventListener("blur",vy,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",py,!0),r.removeEventListener("pointermove",py,!0),r.removeEventListener("pointerup",py,!0)):(r.removeEventListener("mousedown",py,!0),r.removeEventListener("mousemove",py,!0),r.removeEventListener("mouseup",py,!0)),ay.delete(n))};function _y(){return"pointer"!==oy}"undefined"!=typeof document&&function(e){const t=Zg(e);let n;"loading"!==t.readyState?gy(e):(n=()=>{gy(e)},t.addEventListener("DOMContentLoaded",n))}();const by=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function wy(e,t,n){gy(),Mn((()=>{let t=(t,r)=>{(function(e,t,n){var r;const i="undefined"!=typeof window?Jg(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Jg(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Jg(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Jg(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof i&&!by.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof o||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===t&&n instanceof a&&!cy[n.key])})(!!(null==n?void 0:n.isTextInput),t,r)&&e(_y())};return sy.add(t),()=>{sy.delete(t)}}),t)}let xy=!1,Sy=0;function ky(){xy=!0,setTimeout((()=>{xy=!1}),50)}function Ey(e){"touch"===e.pointerType&&ky()}function Py(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",Ey):document.addEventListener("touchend",ky),Sy++,()=>{Sy--,Sy>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",Ey):document.removeEventListener("touchend",ky))}}function Ty(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,s]=On(!1),a=Dn({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Mn(Py,[]);let{hoverProps:l,triggerHoverEnd:u}=In((()=>{let e=(e,r)=>{if(a.pointerType=r,i||"touch"===r||a.isHovered||!e.currentTarget.contains(e.target))return;a.isHovered=!0;let o=e.currentTarget;a.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),s(!0)},o=(e,t)=>{if(a.pointerType="",a.target=null,"touch"===t||!a.isHovered)return;a.isHovered=!1;let i=e.currentTarget;r&&r({type:"hoverend",target:i,pointerType:t}),n&&n(!1),s(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{xy&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{a.ignoreEmulatedMouseEvents||xy||e(t,"mouse"),a.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[t,n,r,i,a]);return Mn((()=>{i&&u({currentTarget:a.target},a.pointerType)}),[i]),{hoverProps:l,isHovered:o}}function Ay(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=Dn({isFocused:!1,isFocusVisible:t||_y()}),[o,s]=On(!1),[a,l]=On((()=>i.current.isFocused&&i.current.isFocusVisible)),u=jn((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),c=jn((e=>{i.current.isFocused=e,s(e),u()}),[u]);wy((e=>{i.current.isFocusVisible=e,u()}),[],{isTextInput:n});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=jn((e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0}),[r,i]),s=iy(o),a=jn((e=>{const t=Zg(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),s(e))}),[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?a:void 0,onBlur:t||!r&&!i?void 0:o}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=Dn({isFocusWithin:!1}),s=jn((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,o]),a=iy(s),l=jn((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(r&&r(e),i&&i(!0),o.current.isFocusWithin=!0,a(e))}),[r,i,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:a,focusProps:r?h:d}}var Cy=Object.defineProperty,Ry=(e,t,n)=>(((e,t,n)=>{t in e?Cy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let Oy=new class{constructor(){Ry(this,"current",this.detect()),Ry(this,"handoffState","pending"),Ry(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function Fy(e){return Oy.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function My(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Ly(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add((()=>e.removeEventListener(n,r,i)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return My((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=Ly();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Dy(){let[e]=On(Ly);return Mn((()=>()=>e.dispose()),[e]),e}let Vy=(e,t)=>{Oy.isServer?Mn(e,t):Ln(e,t)};function Iy(e){let t=Dn(e);return Vy((()=>{t.current=e}),[e]),t}let jy=function(e){let t=Iy(e);return Xr.useCallback(((...e)=>t.current(...e)),[t])};function By({disabled:e=!1}={}){let t=Dn(null),[n,r]=On(!1),i=Dy(),o=jy((()=>{t.current=null,r(!1),i.dispose()})),s=jy((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,r(!0);{let n=Fy(e.currentTarget);i.addEventListener(n,"pointerup",o,!1),i.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);r(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",o,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}let Ny=ot(void 0);function Uy(){return Bn(Ny)}function Gy({value:e,children:t}){return Xr.createElement(Ny.Provider,{value:e},t)}function Wy(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function Hy(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Hy),r}var $y,zy,qy=((zy=qy||{})[zy.None=0]="None",zy[zy.RenderStrategy=1]="RenderStrategy",zy[zy.Static=2]="Static",zy),Ky=(($y=Ky||{})[$y.Unmount=0]="Unmount",$y[$y.Hidden=1]="Hidden",$y);function Yy({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:Xy;let l=Zy(t,e);if(o)return Qy(l,n,r,s,a);let u=null!=i?i:0;if(2&u){let{static:e=!1,...t}=l;if(e)return Qy(t,n,r,s,a)}if(1&u){let{unmount:e=!0,...t}=l;return Hy(e?0:1,{0:()=>null,1:()=>Qy({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return Qy(l,n,r,s,a)}function Qy(e,t={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=n_(e,["unmount","static"]),u=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof s?s(t):s;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=n.join(" ");for(let e of n)d[`data-${e}`]=""}}if(o===je&&(Object.keys(t_(l)).length>0||Object.keys(t_(d)).length>0)){if(Dr(c)&&!(Array.isArray(c)&&c.length>1)){let e=c.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>Wy(t(...e),l.className):Wy(t,l.className),r=n?{className:n}:{},o=Zy(c.props,t_(n_(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(t_(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(t_(l)).concat(Object.keys(t_(d))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return De(o,Object.assign({},n_(l,["ref"]),o!==je&&u,o!==je&&d),c)}function Xy(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Zy(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let r in n)Object.assign(t,{[r](e,...t){let i=n[r];for(let n of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Jy(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let r in n)Object.assign(t,{[r](...e){let t=n[r];for(let n of t)null==n||n(...e)}});return t}function e_(e){var t;return Object.assign(tr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function t_(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function n_(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function r_(e,t,n){let[r,i]=On(n),o=void 0!==e,s=Dn(o),a=Dn(!1),l=Dn(!1);return!o||s.current||a.current?!o&&s.current&&!l.current&&(l.current=!0,s.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,s.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?e:r,jy((e=>(o||i(e),null==t?void 0:t(e))))]}function i_(e){let[t]=On(e);return t}function o_(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))a_(n,s_(t,r),i);return n}function s_(e,t){return e?e+"["+t+"]":t}function a_(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())a_(e,s_(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):o_(n,t,e)}function l_(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}}var u_=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(u_||{});let c_=e_((function(e,t){var n;let{features:r=1,...i}=e;return Yy({ourProps:{ref:t,"aria-hidden":!(2&~r)||(null!=(n=i["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}},theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})})),d_=ot(null);function h_(e){let[t,n]=On(null);return Xr.createElement(d_.Provider,{value:{target:t}},e.children,Xr.createElement(c_,{features:u_.Hidden,ref:n}))}function p_({children:e}){let t=Bn(d_);if(!t)return Xr.createElement(Xr.Fragment,null,e);let{target:n}=t;return n?mr(Xr.createElement(Xr.Fragment,null,e),n):null}function f_({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[o,s]=On(null),a=Dy();return Mn((()=>{if(r&&o)return a.addEventListener(o,"reset",r)}),[o,t,r]),Xr.createElement(p_,null,Xr.createElement(m_,{setForm:s,formId:t}),o_(e).map((([e,r])=>Xr.createElement(c_,{features:u_.Hidden,...t_({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...i})}))))}function m_({setForm:e,formId:t}){return Mn((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:Xr.createElement(c_,{features:u_.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}let v_=ot(void 0);function g_(){return Bn(v_)}function y_({id:e,children:t}){return Xr.createElement(v_.Provider,{value:e},t)}function __(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}let b_=Symbol();function w_(...e){let t=Dn(e);Mn((()=>{t.current=e}),[e]);let n=jy((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[b_])))?void 0:n}let x_=ot(null);function S_(){let e=Bn(x_);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,S_),e}return e}function k_(){var e,t;return null!=(t=null==(e=Bn(x_))?void 0:e.value)?t:void 0}function E_(){let[e,t]=On([]);return[e.length>0?e.join(" "):void 0,In((()=>function(e){let n=jy((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),r=In((()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value})),[n,e.slot,e.name,e.props,e.value]);return Xr.createElement(x_.Provider,{value:r},e.children)}),[t])]}x_.displayName="DescriptionContext";let P_=e_((function(e,t){let n=Un(),r=Uy(),{id:i=`headlessui-description-${n}`,...o}=e,s=S_(),a=w_(t);Vy((()=>s.register(i)),[i,s.register]);let l=r||!1,u=In((()=>({...s.slot,disabled:l})),[s.slot,l]);return Yy({ourProps:{ref:a,...s.props,id:i},theirProps:o,slot:u,defaultTag:"p",name:s.name||"Description"})})),T_=Object.assign(P_,{});var A_,C_=((A_=C_||{}).Space=" ",A_.Enter="Enter",A_.Escape="Escape",A_.Backspace="Backspace",A_.Delete="Delete",A_.ArrowLeft="ArrowLeft",A_.ArrowUp="ArrowUp",A_.ArrowRight="ArrowRight",A_.ArrowDown="ArrowDown",A_.Home="Home",A_.End="End",A_.PageUp="PageUp",A_.PageDown="PageDown",A_.Tab="Tab",A_);let R_=ot(null);function O_(){let e=Bn(R_);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,O_),e}return e}function F_(e){var t,n,r;let i=null!=(n=null==(t=Bn(R_))?void 0:t.value)?n:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function M_({inherit:e=!1}={}){let t=F_(),[n,r]=On([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,In((()=>function(e){let t=jy((e=>(r((t=>[...t,e])),()=>r((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=In((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return Xr.createElement(R_.Provider,{value:n},e.children)}),[r])]}R_.displayName="LabelContext";let L_=e_((function(e,t){var n;let r=Un(),i=O_(),o=g_(),s=Uy(),{id:a=`headlessui-label-${r}`,htmlFor:l=(null!=o?o:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...c}=e,d=w_(t);Vy((()=>i.register(a)),[a,i.register]);let h=jy((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),p=s||!1,f=In((()=>({...i.slot,disabled:p})),[i.slot,p]),m={ref:d,...i.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),Yy({ourProps:m,theirProps:c,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})})),D_=Object.assign(L_,{});function V_(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function I_(e,t=!1){let[n,r]=Fn((()=>({})),{}),i=In((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return Vy((()=>{if(!e)return;let t=new ResizeObserver(r);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}let j_=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function B_(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...i){let o=t[e].call(n,...i);o&&(n=o,r.forEach((e=>e())))}}}function N_(e){return Yr(e.subscribe,e.getSnapshot,e.getSnapshot)}let U_=new j_((()=>B_((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function G_(e,t){let n=U_.get(t),r=Un(),i=N_(n);if(Vy((()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)}),[n,e]),!e)return!1;let o=i.indexOf(r),s=i.length;return-1===o&&(o=s,s+=1),o===s-1}let W_=new Map,H_=new Map;function $_(e){var t;let n=null!=(t=H_.get(e))?t:0;return H_.set(e,n+1),0!==n||(W_.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>z_(e)}function z_(e){var t;let n=null!=(t=H_.get(e))?t:1;if(1===n?H_.delete(e):H_.set(e,n-1),1!==n)return;let r=W_.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,W_.delete(e))}let q_=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),K_=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var Y_,Q_,X_,Z_=((X_=Z_||{})[X_.First=1]="First",X_[X_.Previous=2]="Previous",X_[X_.Next=4]="Next",X_[X_.Last=8]="Last",X_[X_.WrapAround=16]="WrapAround",X_[X_.NoScroll=32]="NoScroll",X_[X_.AutoFocus=64]="AutoFocus",X_),J_=((Q_=J_||{})[Q_.Error=0]="Error",Q_[Q_.Overflow=1]="Overflow",Q_[Q_.Success=2]="Success",Q_[Q_.Underflow=3]="Underflow",Q_),eb=((Y_=eb||{})[Y_.Previous=-1]="Previous",Y_[Y_.Next=1]="Next",Y_);function tb(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(q_)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var nb=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(nb||{});function rb(e,t=0){var n;return e!==(null==(n=Fy(e))?void 0:n.body)&&Hy(t,{0:()=>e.matches(q_),1(){let t=e;for(;null!==t;){if(t.matches(q_))return!0;t=t.parentElement}return!1}})}var ib=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ib||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let ob=["textarea","input"].join(",");function sb(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function ab(e,t){return function(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?sb(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(K_)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):tb(e);i.length>0&&s.length>1&&(s=s.filter((e=>!i.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),r=null!=r?r:o.activeElement;let a,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,s.indexOf(r))-1;if(4&t)return Math.max(0,s.indexOf(r))+1;if(8&t)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},d=0,h=s.length;do{if(d>=h||d+h<=0)return 0;let e=u+d;if(16&t)e=(e+h)%h;else{if(e<0)return 3;if(e>=h)return 1}a=s[e],null==a||a.focus(c),d+=l}while(a!==o.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,ob))&&n}(a)&&a.select(),2}(tb(),t,{relativeTo:e})}function lb(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ub(){return lb()||/Android/gi.test(window.navigator.userAgent)}function cb(e,t,n,r){let i=Iy(n);Mn((()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}const db=30;function hb(e,t,n){let r=G_(e,"outside-click"),i=Iy(n),o=jn((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!rb(r,nb.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i,t]),s=Dn(null);cb(r,"pointerdown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),cb(r,"mousedown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),cb(r,"click",(e=>{ub()||s.current&&(o(e,(()=>s.current)),s.current=null)}),!0);let a=Dn({x:0,y:0});cb(r,"touchstart",(e=>{a.current.x=e.touches[0].clientX,a.current.y=e.touches[0].clientY}),!0),cb(r,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-a.current.x)>=db||Math.abs(n-a.current.y)>=db))return o(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,r){let i=Iy(n);Mn((()=>{if(e)return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}(r,"blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function pb(...e){return In((()=>Fy(...e)),[...e])}function fb(e,t){return In((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function mb(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=null!=(n=t.defaultView)?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`)}}}function vb(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let gb=B_((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:Ly(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:vb(n)},i=[lb()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=Ly();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),s=e.querySelector(i);s&&!r(s)&&(o=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},mb(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(r))),i.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function yb(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=N_(gb),i=t?r.get(t):void 0,o=!!i&&i.count>0;Vy((()=>{if(t&&e)return gb.dispatch("PUSH",t,n),()=>gb.dispatch("POP",t,n)}),[e,t])}(G_(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}function _b(e){return[e.screenX,e.screenY]}gb.subscribe((()=>{let e=gb.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&gb.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&gb.dispatch("TEARDOWN",n)}}));var bb;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"test"===(null==(bb=null==process?void 0:{})?void 0:bb.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 wb=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(wb||{});function xb(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function Sb(e,t,n,r){let[i,o]=On(n),{hasFlag:s,addFlag:a,removeFlag:l}=function(e=0){let[t,n]=On(e),r=jn((e=>n(e)),[t]),i=jn((e=>n((t=>t|e))),[t]),o=jn((e=>(t&e)===e),[t]),s=jn((e=>n((t=>t&~e))),[n]),a=jn((e=>n((t=>t^e))),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(e&&i?3:0),u=Dn(!1),c=Dn(!1),d=Dy();return Vy((()=>{var i;if(e)return n&&o(!0),t?(null==(i=null==r?void 0:r.start)||i.call(r,n),function(e,{prepare:t,run:n,done:r,inFlight:i}){let o=Ly();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{n(),o.requestAnimationFrame((()=>{o.add(function(e,t){var n,r;let i=Ly();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),i.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,r))}))})),o.dispose}(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){c.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var e;c.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(u.current=!1,l(7),n||o(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})):void(n&&a(3))}),[e,n,t,d]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function kb(){return"undefined"!=typeof window}function Eb(e){return Ab(e)?(e.nodeName||"").toLowerCase():"#document"}function Pb(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Tb(e){var t;return null==(t=(Ab(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ab(e){return!!kb()&&(e instanceof Node||e instanceof Pb(e).Node)}function Cb(e){return!!kb()&&(e instanceof Element||e instanceof Pb(e).Element)}function Rb(e){return!!kb()&&(e instanceof HTMLElement||e instanceof Pb(e).HTMLElement)}function Ob(e){return!(!kb()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Pb(e).ShadowRoot)}function Fb(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=jb(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Mb(e){return["table","td","th"].includes(Eb(e))}function Lb(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch($y){return!1}}))}function Db(e){const t=Vb(),n=Cb(e)?jb(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Vb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ib(e){return["html","body","#document"].includes(Eb(e))}function jb(e){return Pb(e).getComputedStyle(e)}function Bb(e){return Cb(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nb(e){if("html"===Eb(e))return e;const t=e.assignedSlot||e.parentNode||Ob(e)&&e.host||Tb(e);return Ob(t)?t.host:t}function Ub(e){const t=Nb(e);return Ib(t)?e.ownerDocument?e.ownerDocument.body:e.body:Rb(t)&&Fb(t)?t:Ub(t)}function Gb(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=Ub(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=Pb(i);if(o){const e=Wb(s);return t.concat(s,s.visualViewport||[],Fb(i)?i:[],e&&n?Gb(e):[])}return t.concat(i,Gb(i,[],n))}function Wb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Hb=Math.min,$b=Math.max,zb=Math.round,qb=Math.floor,Kb=e=>({x:e,y:e}),Yb={left:"right",right:"left",bottom:"top",top:"bottom"},Qb={start:"end",end:"start"};function Xb(e,t,n){return $b(e,Hb(t,n))}function Zb(e,t){return"function"==typeof e?e(t):e}function Jb(e){return e.split("-")[0]}function ew(e){return e.split("-")[1]}function tw(e){return"x"===e?"y":"x"}function nw(e){return"y"===e?"height":"width"}function rw(e){return["top","bottom"].includes(Jb(e))?"y":"x"}function iw(e){return tw(rw(e))}function ow(e){return e.replace(/start|end/g,(e=>Qb[e]))}function sw(e){return e.replace(/left|right|bottom|top/g,(e=>Yb[e]))}function aw(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function lw(e,t,n){let{reference:r,floating:i}=e;const o=rw(t),s=iw(t),a=nw(s),l=Jb(t),u="y"===o,c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ew(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function uw(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Zb(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[h?"floating"===d?"reference":"floating":d],v=aw(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},b=aw(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-b.top+f.top)/_.y,bottom:(b.bottom-v.bottom+f.bottom)/_.y,left:(v.left-b.left+f.left)/_.x,right:(b.right-v.right+f.right)/_.x}}function cw(e){const t=jb(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Rb(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=zb(n)!==o||zb(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function dw(e){return Cb(e)?e:e.contextElement}function hw(e){const t=dw(e);if(!Rb(t))return Kb(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=cw(t);let s=(o?zb(n.width):n.width)/r,a=(o?zb(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const pw=Kb(0);function fw(e){const t=Pb(e);return Vb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:pw}function mw(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=dw(e);let s=Kb(1);t&&(r?Cb(r)&&(s=hw(r)):s=hw(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Pb(e))&&t}(o,n,r)?fw(o):Kb(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const e=Pb(o),t=r&&Cb(r)?Pb(r):r;let n=e,i=Wb(n);for(;i&&r&&t!==n;){const e=hw(i),t=i.getBoundingClientRect(),r=jb(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=o,u+=s,n=Pb(i),i=Wb(n)}}return aw({width:c,height:d,x:l,y:u})}function vw(e,t){const n=Bb(e).scrollLeft;return t?t.left+n:mw(Tb(e)).left+n}function gw(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Pb(e),r=Tb(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const e=Vb();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Tb(e),n=Bb(e),r=e.ownerDocument.body,i=$b(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=$b(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vw(e);const a=-n.scrollTop;return"rtl"===jb(r).direction&&(s+=$b(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(Tb(e));else if(Cb(t))r=function(e,t){const n=mw(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Rb(e)?hw(e):Kb(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=fw(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return aw(r)}function yw(e,t){const n=Nb(e);return!(n===t||!Cb(n)||Ib(n))&&("fixed"===jb(n).position||yw(n,t))}function _w(e,t,n){const r=Rb(t),i=Tb(t),o="fixed"===n,s=mw(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Kb(0);if(r||!r&&!o)if(("body"!==Eb(t)||Fb(i))&&(a=Bb(t)),r){const e=mw(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=vw(i));let u=0,c=0;if(i&&!r&&!o){const e=i.getBoundingClientRect();c=e.top+a.scrollTop,u=e.left+a.scrollLeft-vw(i,e)}return{x:s.left+a.scrollLeft-l.x-u,y:s.top+a.scrollTop-l.y-c,width:s.width,height:s.height}}function bw(e){return"static"===jb(e).position}function ww(e,t){if(!Rb(e)||"fixed"===jb(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Tb(e)===n&&(n=n.ownerDocument.body),n}function xw(e,t){const n=Pb(e);if(Lb(e))return n;if(!Rb(e)){let t=Nb(e);for(;t&&!Ib(t);){if(Cb(t)&&!bw(t))return t;t=Nb(t)}return n}let r=ww(e,t);for(;r&&Mb(r)&&bw(r);)r=ww(r,t);return r&&Ib(r)&&bw(r)&&!Db(r)?n:r||function(e){let t=Nb(e);for(;Rb(t)&&!Ib(t);){if(Db(t))return t;if(Lb(t))return null;t=Nb(t)}return null}(e)||n}const Sw={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,s=Tb(r),a=!!t&&Lb(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Kb(1);const c=Kb(0),d=Rb(r);if((d||!d&&!o)&&(("body"!==Eb(r)||Fb(s))&&(l=Bb(r)),Rb(r))){const e=mw(r);u=hw(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:Tb,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?Lb(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Gb(e,[],!1).filter((e=>Cb(e)&&"body"!==Eb(e))),i=null;const o="fixed"===jb(e).position;let s=o?Nb(e):e;for(;Cb(s)&&!Ib(s);){const t=jb(s),n=Db(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||Fb(s)&&!n&&yw(e,s))?r=r.filter((e=>e!==s)):i=t,s=Nb(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=o[0],a=o.reduce(((e,n)=>{const r=gw(t,n,i);return e.top=$b(r.top,e.top),e.right=Hb(r.right,e.right),e.bottom=Hb(r.bottom,e.bottom),e.left=$b(r.left,e.left),e}),gw(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:xw,getElementRects:async function(e){const t=this.getOffsetParent||xw,n=this.getDimensions,r=await n(e.floating);return{reference:_w(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=cw(e);return{width:t,height:n}},getScale:hw,isElement:Cb,isRTL:function(e){return"rtl"===jb(e).direction}};function kw(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=dw(e),c=i||o?[...u?Gb(u):[],...Gb(t)]:[];c.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=u&&a?function(e,t){let n,r=null;const i=Tb(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const{left:u,top:c,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p={rootMargin:-qb(c)+"px "+-qb(i.clientWidth-(u+d))+"px "+-qb(i.clientHeight-(c+h))+"px "+-qb(u)+"px",threshold:$b(0,Hb(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}f=!1}try{r=new IntersectionObserver(m,{...p,root:i.ownerDocument})}catch($y){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),o}(u,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),u&&!l&&f.observe(u),f.observe(t));let m=l?mw(e):null;return l&&function t(){const r=mw(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const Ew=uw,Pw=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Jb(n),a=ew(n),l="y"===rw(n),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Zb(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},Tw=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Zb(e,t),u={x:n,y:r},c=await uw(t,l),d=rw(Jb(i)),h=tw(d);let p=u[h],f=u[d];if(o){const e="y"===h?"bottom":"right";p=Xb(p+c["y"===h?"top":"left"],p,p-c[e])}if(s){const e="y"===d?"bottom":"right";f=Xb(f+c["y"===d?"top":"left"],f,f-c[e])}const m=a.fn({...t,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},Aw=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=Zb(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Jb(i),y=rw(a),_=Jb(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(u.floating)),w=h||(_||!m?[sw(a)]:function(e){const t=sw(e);return[ow(e),t,ow(t)]}(a)),x="none"!==f;!h&&x&&w.push(...function(e,t,n,r){const i=ew(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}(Jb(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(ow)))),o}(a,m,f,b));const S=[a,...w],k=await uw(t,v),E=[];let P=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&E.push(k[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=ew(e),i=iw(e),o=nw(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=sw(s)),[s,sw(s)]}(i,s,b);E.push(k[e[0]],k[e[1]])}if(P=[...P,{placement:i,overflows:E}],!E.every((e=>e<=0))){var T,A;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(A=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var C;const e=null==(C=P.filter((e=>{if(x){const t=rw(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},Cw=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Zb(e,t),c=await uw(t,u),d=Jb(i),h=ew(i),p="y"===rw(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,b=Hb(m-c[v],y),w=Hb(f-c[g],_),x=!t.middlewareData.shift;let S=b,k=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=_),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=y),x&&!h){const e=$b(c.left,0),t=$b(c.right,0),n=$b(c.top,0),r=$b(c.bottom,0);p?k=f-2*(0!==e||0!==t?e+t:$b(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:$b(c.top,c.bottom))}await l({...t,availableWidth:k,availableHeight:S});const E=await s.getDimensions(a.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Rw=(e,t,n)=>{const r=new Map,i={platform:Sw,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=lw(u,r,l),h=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:n,fn:o}=a[m],{x:v,y:g,data:y,reset:_}=await o({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=v?v:c,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(h=_.placement),_.rects&&(u=!0===_.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):_.rects),({x:c,y:d}=lw(u,h,l))),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}})(e,t,{...i,platform:o})};var Ow="undefined"!=typeof document?Ln:Mn;function Fw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Fw(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!Fw(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Mw(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lw(e,t){const n=Mw(e);return Math.round(t*n)/n}function Dw(e){const t=Dn(e);return Ow((()=>{t.current=e})),t}const Vw=(e,t)=>({...Pw(e),options:[e,t]}),Iw=(e,t)=>({...Tw(e),options:[e,t]}),jw=(e,t)=>({...Aw(e),options:[e,t]}),Bw=(e,t)=>({...Cw(e),options:[e,t]}),Nw={...Zr},Uw=Nw.useInsertionEffect||(e=>e());function Gw(e){const t=Dn((()=>{}));return Uw((()=>{t.current=e})),jn((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var Ww="undefined"!=typeof document?Ln:Mn;let Hw=!1,$w=0;const zw=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+$w++;const qw=Nw.useId||function(){const[e,t]=On((()=>Hw?zw():void 0));return Ww((()=>{null==e&&t(zw())}),[]),Mn((()=>{Hw=!0}),[]),e};const Kw=ot(null),Yw=ot(null),Qw=()=>{var e;return(null==(e=Bn(Kw))?void 0:e.id)||null},Xw=()=>Bn(Yw),Zw="data-floating-ui-focusable";function Jw(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=qw(),o=Dn({}),[s]=On((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),a=null!=Qw(),[l,u]=On(r.reference),c=Gw(((e,t,r)=>{o.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)})),d=In((()=>({setPositionReference:u})),[]),h=In((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return In((()=>({dataRef:o,open:t,onOpenChange:c,elements:h,events:s,floatingId:i,refs:d})),[t,c,h,s,i,d])}function ex(e){void 0===e&&(e={});const{nodeId:t}=e,n=Jw({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,s]=On(null),[a,l]=On(null),u=(null==i?void 0:i.reference)||o,c=Dn(null),d=Xw();Ww((()=>{u&&(c.current=u)}),[u]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=On({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=On(r);Fw(h,r)||p(r);const[f,m]=On(null),[v,g]=On(null),y=jn((e=>{e!==x.current&&(x.current=e,m(e))}),[]),_=jn((e=>{e!==S.current&&(S.current=e,g(e))}),[]),b=o||f,w=s||v,x=Dn(null),S=Dn(null),k=Dn(c),E=null!=l,P=Dw(l),T=Dw(i),A=Dw(u),C=jn((()=>{if(!x.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};T.current&&(e.platform=T.current),Rw(x.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};R.current&&!Fw(k.current,t)&&(k.current=t,Gr((()=>{d(t)})))}))}),[h,t,n,T,A]);Ow((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const R=Dn(!1);Ow((()=>(R.current=!0,()=>{R.current=!1})),[]),Ow((()=>{if(b&&(x.current=b),w&&(S.current=w),b&&w){if(P.current)return P.current(b,w,C);C()}}),[b,w,C,P,E]);const O=In((()=>({reference:x,floating:S,setReference:y,setFloating:_})),[y,_]),F=In((()=>({reference:b,floating:w})),[b,w]),M=In((()=>{const e={position:n,left:0,top:0};if(!F.floating)return e;const t=Lw(F.floating,c.x),r=Lw(F.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Mw(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,F.floating,c.x,c.y]);return In((()=>({...c,update:C,refs:O,elements:F,floatingStyles:M})),[c,C,O,F,M])}({...e,elements:{...i,...a&&{reference:a}}}),p=jn((e=>{const t=Cb(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),f=jn((e=>{(Cb(e)||null===e)&&(c.current=e,s(e)),(Cb(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!Cb(e))&&h.refs.setReference(e)}),[h.refs]),m=In((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:c})),[h.refs,f,p]),v=In((()=>({...h.elements,domReference:u})),[h.elements,u]),g=In((()=>({...h,...r,refs:m,elements:v,nodeId:t})),[h,m,v,t,r]);return Ww((()=>{r.dataRef.current.floatingContext=g;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=g)})),In((()=>({...h,context:g,refs:m,elements:v})),[h,m,v,g])}const tx="active",nx="selected";function rx(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[tx]:t,[nx]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[Zw]:""},...o,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,o]=t;var s;i&&[tx,nx].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(s=r.get(n))||s.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}function ix(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const ox=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Zb(e,t),{rects:d,elements:{floating:h}}=t,p=n.current[s],f=(null==u?void 0:u.current)||h,m=h.clientTop||f.clientTop,v=0!==h.clientTop,g=0!==f.clientTop,y=h===f;if(!p)return{};const _={...t,...await Vw(-p.offsetTop-h.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(t)},b=await Ew(ix(_,f.scrollHeight+m+h.clientTop),c),w=await Ew(_,{...c,elementContext:"reference"}),x=$b(0,b.top),S=_.y+x,k=zb($b(0,f.scrollHeight+(v&&y||g?2*m:0)-x-$b(0,b.bottom)));if(f.style.maxHeight=k+"px",f.scrollTop=x,i){const e=f.scrollHeight>f.offsetHeight&&f.offsetHeight<p.offsetHeight*a-1||w.top>=-l||w.bottom>=-l;Gr((()=>i(e)))}return r&&(r.current=await Ew(ix({..._,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function sx(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=t,l=Gw(a),u=Dn(!1),c=Dn(null),d=Dn(null);Mn((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const n=e.deltaY,r=o.current.top>=-.5,i=o.current.bottom>=-.5,s=t.scrollHeight-t.clientHeight,a=n<0?-1:1,u=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),Gr((()=>{l((e=>e+Math[u](n,s*a)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==s?void 0:s.current)||r.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{c.current=t.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{c.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,r.floating,o,s,l]);const h=In((()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const e=(null==s?void 0:s.current)||r.floating;if(o.current&&e&&u.current){if(null!==c.current){const t=e.scrollTop-c.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&Gr((()=>l((e=>e+t))))}requestAnimationFrame((()=>{c.current=e.scrollTop}))}}})),[r.floating,l,o,s]);return In((()=>i?{floating:h}:{}),[i,h])}let ax=ot({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ax.displayName="FloatingContext";let lx=ot(null);lx.displayName="PlacementContext";let ux=4;function cx({children:e,enabled:t=!0}){let[n,r]=On(null),[i,o]=On(0),s=Dn(null),[a,l]=On(null);!function(e){Vy((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(a);let u=t&&null!==n&&null!==a,{to:c="bottom",gap:d=0,offset:h=0,padding:p=0,inner:f}=function(e,t){var n,r,i;let o=dx(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=dx(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=dx(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:a}}(n,a),[m,v="center"]=c.split(" ");Vy((()=>{u&&o(0)}),[u]);let{refs:g,floatingStyles:y,context:_}=ex({open:u,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[Vw({mainAxis:"selection"===m?0:d,crossAxis:h}),Iw({padding:p}),"selection"!==m&&jw({padding:p}),"selection"===m&&f?ox({...f,padding:p,overflowRef:s,offset:i,minItemsVisible:ux,referenceOverflowThreshold:p,onFallbackChange(e){var t,n;if(!e)return;let r=_.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,s=Math.min(ux,r.childElementCount),a=0,l=0;for(let o of null!=(n=null==(t=_.elements.floating)?void 0:t.childNodes)?n:[])if(o instanceof HTMLElement){let e=o.offsetTop,t=e+o.clientHeight+i,n=r.scrollTop,u=n+r.clientHeight;if(!(e>=n&&t<=u)){l=Math.max(0,Math.min(t,u)-Math.max(e,n)),a=o.clientHeight;break}s--}s>=1&&o((e=>{let t=a*s-l+i;return e>=t?e:t}))}}):null,Bw({padding:p,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:kw}),[b=m,w=v]=_.placement.split("-");"selection"===m&&(b="selection");let x=In((()=>({anchor:[b,w].filter(Boolean).join(" ")})),[b,w]),S=sx(_,{overflowRef:s,onChange:o}),{getReferenceProps:k,getFloatingProps:E}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),i=jn((t=>rx(t,e,"reference")),t),o=jn((t=>rx(t,e,"floating")),n),s=jn((t=>rx(t,e,"item")),r);return In((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s})),[i,o,s])}([S]),P=jy((e=>{l(e),g.setFloating(e)}));return De(lx.Provider,{value:r},De(ax.Provider,{value:{setFloating:P,setReference:g.setReference,styles:y,getReferenceProps:k,getFloatingProps:E,slot:x}},e))}function dx(e,t,n=void 0){let r=Dy(),i=jy(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let i=px(e,t);return[i,n=>{let o=hx(e);{let s=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));r.requestAnimationFrame((function a(){r.nextFrame(a);let l=!1;for(let[e,n]of o.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let u=px(e,t);i!==u&&(n(u),i=u)}))}return r.dispose}]}return[n,null]})),o=In((()=>i(e,t)[0]),[e,t]),[s=o,a]=On();return Vy((()=>{let[n,r]=i(e,t);if(a(n),r)return r(a)}),[e,t]),s}function hx(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...hx(r)]:[n]}return[]}function px(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}let fx=ot(null);fx.displayName="OpenClosedContext";var mx=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(mx||{});function vx(){return Bn(fx)}function gx({value:e,children:t}){return Xr.createElement(fx.Provider,{value:e},t)}var yx,_x=((yx=_x||{})[yx.First=0]="First",yx[yx.Previous=1]="Previous",yx[yx.Next=2]="Next",yx[yx.Last=3]="Last",yx[yx.Specific=4]="Specific",yx[yx.Nothing=5]="Nothing",yx);function bx(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function wx(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Zr&&(e=>e.useSyncExternalStore)(Zr)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=On(Oy.isHandoffComplete);return t&&!1===Oy.isHandoffComplete&&n(!1),Mn((()=>{!0!==t&&n(!0)}),[t]),Mn((()=>Oy.handoff()),[]),!e&&t}let xx=ot(!1);function Sx(e){let t=Bn(xx),n=Bn(Tx),r=pb(e),[i,o]=On((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e:null;if(Oy.isServer)return null;let i=null==r?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)}));return Mn((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),Mn((()=>{t||null!==n&&o(n.current)}),[n,o,t]),i}let kx=je,Ex=e_((function(e,t){let n=e,r=Dn(null),i=w_(function(e,t=!0){return Object.assign(e,{[b_]:t})}((e=>{r.current=e})),t),o=pb(r),s=Sx(r),[a]=On((()=>{var e;return Oy.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=Bn(Ax),u=wx();return Vy((()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))}),[s,a]),Vy((()=>{if(a&&l)return l.register(a)}),[l,a]),function(e){let t=jy(e),n=Dn(!1);Mn((()=>(n.current=!1,()=>{n.current=!0,My((()=>{n.current&&t()}))})),[t])}((()=>{var e;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s)))})),u&&s&&a?mr(Yy({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:kx,name:"Portal"}),a):null}));let Px=je,Tx=ot(null);let Ax=ot(null),Cx=e_((function(e,t){let n=w_(t),{enabled:r=!0,...i}=e;return r?Xr.createElement(Ex,{...i,ref:n}):Yy({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:kx,name:"Portal"})})),Rx=e_((function(e,t){let{target:n,...r}=e,i={ref:w_(t)};return Xr.createElement(Tx.Provider,{value:n},Yy({ourProps:i,theirProps:r,defaultTag:Px,name:"Popover.Group"}))})),Ox=Object.assign(Cx,{Group:Rx});function Fx(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:jx)!==je||1===Xr.Children.count(e.children)}let Mx=ot(null);Mx.displayName="TransitionContext";var Lx=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Lx||{});let Dx=ot(null);function Vx(e){return"children"in e?Vx(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Ix(e,t){let n=Iy(e),r=Dn([]),i=function(){let e=Dn(!1);return Vy((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),o=Dy(),s=jy(((e,t=Ky.Hidden)=>{let s=r.current.findIndex((({el:t})=>t===e));-1!==s&&(Hy(t,{[Ky.Unmount](){r.current.splice(s,1)},[Ky.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var e;!Vx(r)&&i.current&&(null==(e=n.current)||e.call(n))})))})),a=jy((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>s(e,Ky.Unmount)})),l=Dn([]),u=Dn(Promise.resolve()),c=Dn({enter:[],leave:[]}),d=jy(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(c.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?u.current=u.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),h=jy(((e,t,n)=>{Promise.all(c.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return In((()=>({children:r,register:a,unregister:s,onStart:d,onStop:h,wait:u,chains:c})),[a,s,r,d,h,c,u])}Dx.displayName="NestingContext";let jx=je,Bx=qy.RenderStrategy;let Nx=e_((function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,s=Dn(null),a=w_(...Fx(e)?[s,t]:null===t?[]:[t]);wx();let l=vx();if(void 0===n&&null!==l&&(n=(l&mx.Open)===mx.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=Ix((()=>{n||c("hidden")})),[h,p]=On(!0),f=Dn([n]);Vy((()=>{!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]);Vy((()=>{n?c("visible"):!Vx(d)&&null!==s.current&&c("hidden")}),[n,d]);let v={unmount:i},g=jy((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),y=jy((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return Xr.createElement(Dx.Provider,{value:d},Xr.createElement(Mx.Provider,{value:m},Yy({ourProps:{...v,as:je,children:Xr.createElement(Ux,{ref:a,...v,...o,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:je,features:Bx,visible:"visible"===u,name:"Transition"})))})),Ux=e_((function(e,t){var n,r;let{transition:i=!0,beforeEnter:o,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:d,entered:h,leave:p,leaveFrom:f,leaveTo:m,...v}=e,[g,y]=On(null),_=Dn(null),b=Fx(e),w=w_(...b?[_,t,y]:null===t?[]:[t]),x=null==(n=v.unmount)||n?Ky.Unmount:Ky.Hidden,{show:S,appear:k,initial:E}=function(){let e=Bn(Mx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[P,T]=On(S?"visible":"hidden"),A=function(){let e=Bn(Dx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:C,unregister:R}=A;Vy((()=>C(_)),[C,_]),Vy((()=>{if(x===Ky.Hidden&&_.current)return S&&"visible"!==P?void T("visible"):Hy(P,{hidden:()=>R(_),visible:()=>C(_)})}),[P,_,C,R,S,x]);let O=wx();Vy((()=>{if(b&&O&&"visible"===P&&null===_.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[_,P,O,b]);let F=E&&!k,M=k&&S&&E,L=Dn(!1),D=Ix((()=>{L.current||(T("hidden"),R(_))}),A),V=jy((e=>{L.current=!0;let t=e?"enter":"leave";D.onStart(_,t,(e=>{"enter"===e?null==o||o():"leave"===e&&(null==a||a())}))})),I=jy((e=>{let t=e?"enter":"leave";L.current=!1,D.onStop(_,t,(e=>{"enter"===e?null==s||s():"leave"===e&&(null==l||l())})),"leave"===t&&!Vx(D)&&(T("hidden"),R(_))}));Mn((()=>{b&&i||(V(S),I(S))}),[S,b,i]);let j=(()=>!(!i||!b||!O||F))(),[,B]=Sb(j,g,S,{start:V,end:I}),N=t_({ref:w,className:(null==(r=Wy(v.className,M&&u,M&&c,B.enter&&u,B.enter&&B.closed&&c,B.enter&&!B.closed&&d,B.leave&&p,B.leave&&!B.closed&&f,B.leave&&B.closed&&m,!B.transition&&S&&h))?void 0:r.trim())||void 0,...xb(B)}),U=0;return"visible"===P&&(U|=mx.Open),"hidden"===P&&(U|=mx.Closed),B.enter&&(U|=mx.Opening),B.leave&&(U|=mx.Closing),Xr.createElement(Dx.Provider,{value:D},Xr.createElement(gx,{value:U},Yy({ourProps:N,theirProps:v,defaultTag:jx,features:Bx,visible:"visible"===P,name:"Transition.Child"})))})),Gx=e_((function(e,t){let n=null!==Bn(Mx),r=null!==vx();return Xr.createElement(Xr.Fragment,null,!n&&r?Xr.createElement(Nx,{ref:t,...e}):Xr.createElement(Ux,{ref:t,...e}))})),Wx=Object.assign(Nx,{Child:Gx,Root:Nx});let Hx=e_((function(e,t){let n=`headlessui-control-${Un()}`,[r,i]=M_(),[o,s]=E_(),a=Uy(),{disabled:l=a||!1,...u}=e,c=In((()=>({disabled:l})),[l]);return Xr.createElement(Gy,{value:l},Xr.createElement(i,{value:r},Xr.createElement(s,{value:o},Xr.createElement(y_,{id:n},Yy({ourProps:{ref:t,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...u,children:Xr.createElement(h_,null,"function"==typeof u.children?u.children(c):u.children)},slot:c,defaultTag:"div",name:"Field"})))))}));let $x=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function zx(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?null!=(n=i.innerText)?n:"":r;return $x.test(s)&&(s=s.replace($x,"")),s}function qx(e){let t=Dn(""),n=Dn("");return jy((()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():zx(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return zx(e).trim()}(r).trim().toLowerCase();return t.current=i,n.current=o,o}))}var Kx=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Kx||{}),Yx=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Yx||{}),Qx=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Qx||{}),Xx=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(Xx||{});function Zx(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=sb(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Jx={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex((e=>n(e.dataRef.current.value)));return-1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,i,o,s;if(e.dataRef.current.disabled||1===e.listboxState)return e;let a={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===_x.Nothing)return{...a,activeOptionIndex:null};if(t.focus===_x.Specific)return{...a,activeOptionIndex:e.options.findIndex((e=>e.id===t.id))};if(t.focus===_x.Previous){let n=e.activeOptionIndex;if(null!==n){let o=e.options[n].dataRef.current.domRef,s=bx(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.options[s].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.previousElementSibling)===t.current||null===(null==(i=t.current)?void 0:i.previousElementSibling))return{...a,activeOptionIndex:s}}}}else if(t.focus===_x.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,i=bx(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.options[i].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.nextElementSibling)===t.current||null===(null==(s=t.current)?void 0:s.nextElementSibling))return{...a,activeOptionIndex:i}}}}let l=Zx(e),u=bx(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=i?e.options.indexOf(i):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Zx(e,(e=>[...e,n]));return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Zx(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},eS=ot(null);function tS(e){let t=Bn(eS);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,tS),t}return t}eS.displayName="ListboxActionsContext";let nS=ot(null);function rS(e){let t=Bn(nS);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,rS),t}return t}function iS(e,t){return Hy(t.type,Jx,e,t)}nS.displayName="ListboxDataContext";let oS=je;let sS=ot(!1),aS=qy.RenderStrategy|qy.Static;let lS=je;let uS=e_((function(e,t){var n;let r=Uy(),{value:i,defaultValue:o,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:d=r||!1,horizontal:h=!1,multiple:p=!1,__demoMode:f=!1,...m}=e;const v=h?"horizontal":"vertical";let g=w_(t),y=i_(o),[_=(p?[]:void 0),b]=r_(i,l,y),[w,x]=Fn(iS,{dataRef:{current:null},listboxState:f?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:f}),S=Dn({static:!1,hold:!1}),k=Dn(new Map),E=function(e=V_){return jn(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(u),P=jn((e=>Hy(T.mode,{1:()=>_.some((t=>E(t,e))),0:()=>E(_,e)})),[_]),T=In((()=>({...w,value:_,disabled:d,invalid:c,mode:p?1:0,orientation:v,compare:E,isSelected:P,optionsPropsRef:S,listRef:k})),[_,d,c,p,w,k]);Vy((()=>{w.dataRef.current=T}),[T]),hb(0===T.listboxState,[T.buttonElement,T.optionsElement],((e,t)=>{var n;x({type:1}),rb(t,nb.Loose)||(e.preventDefault(),null==(n=T.buttonElement)||n.focus())}));let A=In((()=>({open:0===T.listboxState,disabled:d,invalid:c,value:_})),[T,d,_,c]),C=jy((e=>{let t=T.options.find((t=>t.id===e));t&&V(t.dataRef.current.value)})),R=jy((()=>{if(null!==T.activeOptionIndex){let{dataRef:e,id:t}=T.options[T.activeOptionIndex];V(e.current.value),x({type:2,focus:_x.Specific,id:t})}})),O=jy((()=>x({type:0}))),F=jy((()=>x({type:1}))),M=Dy(),L=jy(((e,t,n)=>{M.dispose(),M.microTask((()=>e===_x.Specific?x({type:2,focus:_x.Specific,id:t,trigger:n}):x({type:2,focus:e,trigger:n})))})),D=jy(((e,t)=>(x({type:5,id:e,dataRef:t}),()=>x({type:6,id:e})))),V=jy((e=>Hy(T.mode,{0:()=>null==b?void 0:b(e),1(){let t=T.value.slice(),n=t.findIndex((t=>E(t,e)));return-1===n?t.push(e):t.splice(n,1),null==b?void 0:b(t)}}))),I=jy((e=>x({type:3,value:e}))),j=jy((()=>x({type:4}))),B=jy((e=>{x({type:7,element:e})})),N=jy((e=>{x({type:8,element:e})})),U=In((()=>({onChange:V,registerOption:D,goToOption:L,closeListbox:F,openListbox:O,selectActiveOption:R,selectOption:C,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[G,W]=M_({inherit:!0}),H={ref:g},$=jn((()=>{if(void 0!==y)return null==b?void 0:b(y)}),[b,y]);return Xr.createElement(W,{value:G,props:{htmlFor:null==(n=T.buttonElement)?void 0:n.id},slot:{open:0===T.listboxState,disabled:d}},Xr.createElement(cx,null,Xr.createElement(eS.Provider,{value:U},Xr.createElement(nS.Provider,{value:T},Xr.createElement(gx,{value:Hy(T.listboxState,{0:mx.Open,1:mx.Closed})},null!=a&&null!=_&&Xr.createElement(f_,{disabled:d,data:{[a]:_},form:s,onReset:$}),Yy({ourProps:H,theirProps:m,slot:A,defaultTag:oS,name:"Listbox"}))))))})),cS=e_((function(e,t){var n;let r=rS("Listbox.Button"),i=tS("Listbox.Button"),o=Un(),s=g_(),{id:a=s||`headlessui-listbox-button-${o}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...c}=e,d=function(){let e=Dn([]),t=jn((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}(),h=w_(t,Bn(ax).setReference,i.setButtonElement),p=Bn(ax).getReferenceProps,f=jy((e=>{switch(e.key){case C_.Enter:l_(e.currentTarget);break;case C_.Space:case C_.ArrowDown:e.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(_x.First);break;case C_.ArrowUp:e.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(_x.Last)}})),m=jy((e=>{if(e.key===C_.Space)e.preventDefault()})),v=jy((e=>{var t;if(__(e.currentTarget))return e.preventDefault();0===r.listboxState?(Gr((()=>i.closeListbox())),null==(t=r.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),i.openListbox())})),g=jy((e=>e.preventDefault())),y=F_([a]),_=k_(),{isFocusVisible:b,focusProps:w}=Ay({autoFocus:u}),{isHovered:x,hoverProps:S}=Ty({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:b,autofocus:u})),[r.listboxState,r.value,l,x,b,k,r.invalid,u]);return Yy({mergeRefs:d,ourProps:Jy(p(),{ref:h,id:a,type:fb(e,r.buttonElement),"aria-haspopup":"listbox","aria-controls":null==(n=r.optionsElement)?void 0:n.id,"aria-expanded":0===r.listboxState,"aria-labelledby":y,"aria-describedby":_,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:m,onKeyPress:g,onClick:v},w,S,E),theirProps:c,slot:P,defaultTag:"button",name:"Listbox.Button"})})),dS=D_,hS=e_((function(e,t){var n,r;let i=Un(),{id:o=`headlessui-listbox-options-${i}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,d=function(e){return In((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(s),[h,p]=On(null);d&&(a=!0);let f=rS("Listbox.Options"),m=tS("Listbox.Options"),v=pb(f.optionsElement),g=vx(),[y,_]=Sb(u,h,null!==g?(g&mx.Open)===mx.Open:0===f.listboxState);!function(e,t,n){let r=Iy((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));Mn((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let i=Ly();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}return()=>i.dispose()}),[t,r,e])}(y,f.buttonElement,m.closeListbox),yb(!f.__demoMode&&(l&&0===f.listboxState),v),function(e,{allowed:t,disallowed:n}={}){let r=G_(e,"inert-others");Vy((()=>{var e,i;if(!r)return;let o=Ly();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&o.add($_(t));let s=null!=(i=null==t?void 0:t())?i:[];for(let t of s){if(!t)continue;let e=Fy(t);if(!e)continue;let n=t.parentElement;for(;n&&n!==e.body;){for(let e of n.children)s.some((t=>e.contains(t)))||o.add($_(e));n=n.parentElement}}return o.dispose}),[r,t,n])}(!f.__demoMode&&(l&&0===f.listboxState),{allowed:jn((()=>[f.buttonElement,f.optionsElement]),[f.buttonElement,f.optionsElement])});let b=!function(e,t){let n=Dn({left:0,top:0});if(Vy((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(n.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}(0!==f.listboxState,f.buttonElement)&&y,w=function(e,t){let[n,r]=On(t);return!e&&n!==t&&r(t),e?n:t}(y&&1===f.listboxState,f.value),x=jy((e=>f.compare(w,e))),S=In((()=>{var e;if(null==d||null==(e=null==d?void 0:d.to)||!e.includes("selection"))return null;let t=f.options.findIndex((e=>x(e.dataRef.current.value)));return-1===t&&(t=0),t}),[d,f.options]),k=(()=>{if(null==d)return;if(null===S)return{...d,inner:void 0};let e=Array.from(f.listRef.current.values());return{...d,inner:{listRef:{current:e},index:S}}})(),[E,P]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=Bn(lx),n=In((()=>e),[JSON.stringify(e,"undefined"!=typeof HTMLElement?(e,t)=>t instanceof HTMLElement?t.outerHTML:t:void 0)]);Vy((()=>{null==t||t(null!=n?n:null)}),[t,n]);let r=Bn(ax);return In((()=>[r.setFloating,e?r.styles:{}]),[r.setFloating,e,r.styles])}(k),T=function(){let{getFloatingProps:e,slot:t}=Bn(ax);return jn(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),A=w_(t,d?E:null,m.setOptionsElement,p),C=Dy();Mn((()=>{var e;let t=f.optionsElement;t&&0===f.listboxState&&t!==(null==(e=Fy(t))?void 0:e.activeElement)&&(null==t||t.focus({preventScroll:!0}))}),[f.listboxState,f.optionsElement]);let R=jy((e=>{var t,n;switch(C.dispose(),e.key){case C_.Space:if(""!==f.searchQuery)return e.preventDefault(),e.stopPropagation(),m.search(e.key);case C_.Enter:if(e.preventDefault(),e.stopPropagation(),null!==f.activeOptionIndex){let{dataRef:e}=f.options[f.activeOptionIndex];m.onChange(e.current.value)}0===f.mode&&(Gr((()=>m.closeListbox())),null==(t=f.buttonElement)||t.focus({preventScroll:!0}));break;case Hy(f.orientation,{vertical:C_.ArrowDown,horizontal:C_.ArrowRight}):return e.preventDefault(),e.stopPropagation(),m.goToOption(_x.Next);case Hy(f.orientation,{vertical:C_.ArrowUp,horizontal:C_.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),m.goToOption(_x.Previous);case C_.Home:case C_.PageUp:return e.preventDefault(),e.stopPropagation(),m.goToOption(_x.First);case C_.End:case C_.PageDown:return e.preventDefault(),e.stopPropagation(),m.goToOption(_x.Last);case C_.Escape:return e.preventDefault(),e.stopPropagation(),Gr((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case C_.Tab:e.preventDefault(),e.stopPropagation(),Gr((()=>m.closeListbox())),ab(f.buttonElement,e.shiftKey?Z_.Previous:Z_.Next);break;default:1===e.key.length&&(m.search(e.key),C.setTimeout((()=>m.clearSearch()),350))}})),O=null==(n=f.buttonElement)?void 0:n.id,F=In((()=>({open:0===f.listboxState})),[f.listboxState]),M=Jy(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":I_(f.buttonElement,!0).width},...xb(_)});return Xr.createElement(Ox,{enabled:!!a&&(e.static||y)},Xr.createElement(nS.Provider,{value:1===f.mode?f:{...f,isSelected:x}},Yy({ourProps:M,theirProps:c,slot:F,defaultTag:"div",features:aS,visible:b,name:"Listbox.Options"})))})),pS=e_((function(e,t){let n=Un(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=e,a=!0===Bn(sS),l=rS("Listbox.Option"),u=tS("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===r,d=l.isSelected(o),h=Dn(null),p=qx(h),f=Iy({disabled:i,value:o,domRef:h,get textValue(){return p()}}),m=w_(t,h,(e=>{e?l.listRef.current.set(r,e):l.listRef.current.delete(r)}));Vy((()=>{if(!l.__demoMode&&0===l.listboxState&&c&&0!==l.activationTrigger)return Ly().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=h.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),Vy((()=>{if(!a)return u.registerOption(r,f)}),[f,r,a]);let v=jy((e=>{var t;if(i)return e.preventDefault();u.onChange(o),0===l.mode&&(Gr((()=>u.closeListbox())),null==(t=l.buttonElement)||t.focus({preventScroll:!0}))})),g=jy((()=>{if(i)return u.goToOption(_x.Nothing);u.goToOption(_x.Specific,r)})),y=function(){let e=Dn([-1,-1]);return{wasMoved(t){let n=_b(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=_b(t)}}}(),_=jy((e=>{y.update(e),!i&&(c||u.goToOption(_x.Specific,r,0))})),b=jy((e=>{y.wasMoved(e)&&(i||c||u.goToOption(_x.Specific,r,0))})),w=jy((e=>{y.wasMoved(e)&&(i||c&&u.goToOption(_x.Nothing))})),x=In((()=>({active:c,focus:c,selected:d,disabled:i,selectedOption:d&&a})),[c,d,i,a]);return!d&&a?null:Yy({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:b,onMouseMove:b,onPointerLeave:w,onMouseLeave:w},theirProps:s,slot:x,defaultTag:"div",name:"Listbox.Option"})})),fS=e_((function(e,t){let{options:n,placeholder:r,...i}=e,o={ref:w_(t)},s=rS("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(sS.Provider,{value:!0},Yy({ourProps:o,theirProps:{...i,children:Xr.createElement(Xr.Fragment,null,r&&l?r:n)},slot:a,defaultTag:lS,name:"ListboxSelectedOption"}))})),mS=Object.assign(uS,{Button:cS,Label:dS,Options:hS,Option:pS,SelectedOption:fS}),vS=ot(null);vS.displayName="GroupContext";let gS=je;let yS=e_((function(e,t){var n;let r=Un(),i=g_(),o=Uy(),{id:s=i||`headlessui-switch-${r}`,disabled:a=o||!1,checked:l,defaultChecked:u,onChange:c,name:d,value:h,form:p,autoFocus:f=!1,...m}=e,v=Bn(vS),[g,y]=On(null),_=w_(Dn(null),t,null===v?null:v.setSwitch,y),b=i_(u),[w,x]=r_(l,c,null!=b&&b),S=Dy(),[k,E]=On(!1),P=jy((()=>{E(!0),null==x||x(!w),S.nextFrame((()=>{E(!1)}))})),T=jy((e=>{if(__(e.currentTarget))return e.preventDefault();e.preventDefault(),P()})),A=jy((e=>{e.key===C_.Space?(e.preventDefault(),P()):e.key===C_.Enter&&l_(e.currentTarget)})),C=jy((e=>e.preventDefault())),R=F_(),O=k_(),{isFocusVisible:F,focusProps:M}=Ay({autoFocus:f}),{isHovered:L,hoverProps:D}=Ty({isDisabled:a}),{pressed:V,pressProps:I}=By({disabled:a}),j=In((()=>({checked:w,disabled:a,hover:L,focus:F,active:V,autofocus:f,changing:k})),[w,L,F,V,a,k,f]),B=Jy({id:s,ref:_,role:"switch",type:fb(e,g),tabIndex:-1===e.tabIndex?0:null!=(n=e.tabIndex)?n:0,"aria-checked":w,"aria-labelledby":R,"aria-describedby":O,disabled:a||void 0,autoFocus:f,onClick:T,onKeyUp:A,onKeyPress:C},M,D,I),N=jn((()=>{if(void 0!==b)return null==x?void 0:x(b)}),[x,b]);return Xr.createElement(Xr.Fragment,null,null!=d&&Xr.createElement(f_,{disabled:a,data:{[d]:h||"on"},overrides:{type:"checkbox",checked:w},form:p,onReset:N}),Yy({ourProps:B,theirProps:m,slot:j,defaultTag:"button",name:"Switch"}))})),_S=function(e){var t;let[n,r]=On(null),[i,o]=M_(),[s,a]=E_(),l=In((()=>({switch:n,setSwitch:r})),[n,r]),u=e;return Xr.createElement(a,{name:"Switch.Description",value:s},Xr.createElement(o,{name:"Switch.Label",value:i,props:{htmlFor:null==(t=l.switch)?void 0:t.id,onClick(e){n&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},Xr.createElement(vS.Provider,{value:l},Yy({ourProps:{},theirProps:u,slot:{},defaultTag:gS,name:"Switch.Group"}))))},bS=D_,wS=T_,xS=Object.assign(yS,{Group:_S,Label:bS,Description:wS});function SS(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function kS(e,t,n){var r=[],i=Ei(e,r,n);return r.length<2?n:i+t(r)}var ES=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=e(i);else for(var s in o="",i)i[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},PS=function(e){var t=bn(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ni(n,t.registered,void 0);return Ti(t,i,!1),t.key+"-"+i.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return kS(t.registered,n,ES(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ni(n,t.registered);SS(t,i)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ni(n,t.registered),o="animation-"+i.name;return SS(t,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Ei.bind(null,t.registered),merge:kS.bind(null,t.registered,n)}}({key:"css"}),TS=PS.cx,AS=PS.css;const CS=Rs(cS)`
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:e})=>e?{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(252 165 165 / var(--tw-ring-opacity))",":focus":{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity))"}}:{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(209 213 219 / var(--tw-ring-opacity))",":focus":{"--tw-ring-color":"var(--fl-color-primary-600)"}}}
49
- `,TS=Rs(F_)`
49
+ `,RS=Rs(D_)`
50
50
  ${{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}}
51
- `,AS=(e,t)=>{var n;return e?(null==(n=t.find((t=>t.key==e)))?void 0:n.displayValue)??"Select":"Select"},CS=(e,t)=>e&&Array.isArray(e)&&0!==e.length?e.map((e=>{var n;return null==(n=t.find((t=>t.key==e)))?void 0:n.displayValue})).join(", "):"Select",RS=tr((({label:e,items:t,value:n,className:r,onChange:i,error:o,helperText:s,isMultiSelect:a},l)=>oo("div",{className:r,children:[io(hS,{value:n||(a?[]:""),onChange:e=>{if(a){const n=e,r=e.findIndex((e=>{var n;return null==(n=t.find((t=>t.key==e)))?void 0:n.isReset}));0===r&&n.length>1?i([...n.slice(1)]):i(r>-1?[n[r]]:e)}else i(e)},multiple:a,children:({open:r})=>oo(ro,{children:[io(TS,{children:e}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[oo(PS,{as:"button",ref:l,hasError:!!o,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a?CS(n,t):AS(n,t)}),io("span",{css:{pointerEvents:"none",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"#4b5563",paddingRight:"0.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:io(na,{css:{height:"1.25rem",width:"1.25rem"},"aria-hidden":"true"})})]}),io(Nx,{show:r,leave:kS(ES({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:kS(ES({opacity:"1"})),leaveTo:kS(ES({opacity:"0"})),children:io(uS,{css:{position:"absolute",zIndex:"10",marginTop:"0.25rem",maxHeight:"15rem",width:"100%",overflow:"auto",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.25rem"}},children:t.map((e=>oo(cS,{className:"group",css:{position:"relative",cursor:"default",userSelect:"none",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",paddingRight:"2.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","&[data-active]":{backgroundColor:"var(--fl-color-primary-600)","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},"&[data-selected]":{fontWeight:"600"}},value:e.key,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.displayValue}),io("span",{css:{visibility:"hidden",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingRight:"0.75rem",".group[data-selected] &":{visibility:"visible"},".group[data-active] &":{fill:"#fff"}},children:io(ea,{css:{height:"1.25rem",width:"1.25rem",fill:"inherit"},"aria-hidden":"true"})})]},e.key)))})})]})]})}),o&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:o}),s&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:s})]}))),OS=e=>oo("div",{children:[oo(Ux,{children:[io(F_,{as:"p",css:{fontSize:"0.875rem",lineHeight:"1.25rem"},children:io("span",{css:{fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.label})}),io(_S,{checked:e.value,onChange:e.onChange,className:"group",css:{position:"relative",marginTop:"0.5rem",display:"inline-flex",height:"1.5rem",width:"2.75rem",flexShrink:"0",cursor:"pointer",borderRadius:"9999px",borderWidth:"2px",borderColor:"transparent","--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(79 70 229 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px"},"&[data-checked]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}},children:io("span",{"aria-hidden":"true",css:{pointerEvents:"none",display:"inline-block",height:"1.25rem",width:"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",".group[data-checked] &":{"--tw-translate-x":"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}}})})]}),e.helperText&&io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:e.helperText})]}),FS=tr((({},e)=>{const{control:t,formState:{errors:n}}=jv(),{fields:r,append:i,remove:o}=function(e){const t=jv(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o}=e,[s,a]=Xr.useState(n._getFieldArray(r)),l=Xr.useRef(n._getFieldArray(r).map(Xv)),u=Xr.useRef(s),c=Xr.useRef(r),d=Xr.useRef(!1);c.current=r,u.current=s,n._names.array.add(r),e.rules&&n.register(r,e.rules),$v({next:({values:e,name:t})=>{if(t===c.current||!t){const t=Sv(e,c.current);Array.isArray(t)&&(a(t),l.current=t.map(Xv))}},subject:n._subjects.array});const h=Xr.useCallback((e=>{d.current=!0,n._updateFieldArray(r,e)}),[n,r]);return Xr.useEffect((()=>{if(n._state.action=!1,eg(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Jv(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then((e=>{const t=Sv(e.errors,r),i=Sv(n._formState.errors,r);(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type)&&(t?Tv(n._formState.errors,r,t):kg(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=Sv(n._fields,r);!e||!e._f||Jv(n._options.reValidateMode).isOnSubmit&&Jv(n._options.mode).isOnSubmit||vg(e,n._formValues,n._options.criteriaMode===Cv.all,n._options.shouldUseNativeValidation,!0).then((e=>!Uv(e)&&n._subjects.state.next({errors:ng(n._formState.errors,e,r)})))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&tg(n._fields,((e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1})),n._names.focus="",n._updateValid(),d.current=!1}),[s,r,n]),Xr.useEffect((()=>(!Sv(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||o)&&n.unregister(r)})),[r,n,i,o]),{swap:Xr.useCallback(((e,t)=>{const i=n._getFieldArray(r);Sg(i,e,t),Sg(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,Sg,{argA:e,argB:t},!1)}),[h,r,n]),move:Xr.useCallback(((e,t)=>{const i=n._getFieldArray(r);bg(i,e,t),bg(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,bg,{argA:e,argB:t},!1)}),[h,r,n]),prepend:Xr.useCallback(((e,t)=>{const i=Wv(bv(e)),o=wg(n._getFieldArray(r),i);n._names.focus=Zv(r,0,t),l.current=wg(l.current,i.map(Xv)),h(o),a(o),n._updateFieldArray(r,o,wg,{argA:yg(e)})}),[h,r,n]),append:Xr.useCallback(((e,t)=>{const i=Wv(bv(e)),o=gg(n._getFieldArray(r),i);n._names.focus=Zv(r,o.length-1,t),l.current=gg(l.current,i.map(Xv)),h(o),a(o),n._updateFieldArray(r,o,gg,{argA:yg(e)})}),[h,r,n]),remove:Xr.useCallback((e=>{const t=xg(n._getFieldArray(r),e);l.current=xg(l.current,e),h(t),a(t),n._updateFieldArray(r,t,xg,{argA:e})}),[h,r,n]),insert:Xr.useCallback(((e,t,i)=>{const o=Wv(bv(t)),s=_g(n._getFieldArray(r),e,o);n._names.focus=Zv(r,e,i),l.current=_g(l.current,e,o.map(Xv)),h(s),a(s),n._updateFieldArray(r,s,_g,{argA:e,argB:yg(t)})}),[h,r,n]),update:Xr.useCallback(((e,t)=>{const i=bv(t),o=Eg(n._getFieldArray(r),e,i);l.current=[...o].map(((t,n)=>t&&n!==e?l.current[n]:Xv())),h(o),a([...o]),n._updateFieldArray(r,o,Eg,{argA:e,argB:i},!0,!1)}),[h,r,n]),replace:Xr.useCallback((e=>{const t=Wv(bv(e));l.current=t.map(Xv),h([...t]),a([...t]),n._updateFieldArray(r,[...t],(e=>e),{},!0,!1)}),[h,r,n]),fields:Xr.useMemo((()=>s.map(((e,t)=>({...e,[i]:l.current[t]||Xv()})))),[s,i])}}({control:t,name:"audiences"});return oo("div",{children:[io("label",{htmlFor:"audiences",css:{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Audience"}),io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:"This should be the same as the audience key in segment"}),r.map(((i,s)=>io("div",{css:{marginBottom:"0.5rem"},children:io(Yv,{name:`audiences.${s}`,control:t,rules:{pattern:{value:/^[a-z0-9_]+$/,message:"Audience must be lowercase and can only contain letters, numbers and underscores."}},render:({field:t,fieldState:i})=>{var a;return io(Ks,{id:`audience-${s}`,type:"text",error:(null==n?void 0:n.audiences)?null==(a=null==n?void 0:n.audiences[s])?void 0:a.message:"",...t,ref:e,disabled:s!==r.length-1||!i.isDirty&&!!t.value,remove:()=>o(s)})}})},i.id))),oo("button",{css:{marginTop:"0.25rem",display:"flex",fontSize:"0.875rem",lineHeight:"1.25rem"},type:"button",onClick:()=>i(""),children:[io($s,{css:{marginTop:"auto",marginBottom:"auto",height:"1rem"}})," Add Audience"]})]})})),MS=()=>{const e=function(){let{matches:e}=Bn(Ka),t=e[e.length-1];return t?t.params:{}}(),t=Ja(),{createPromotion:n,updatePromotion:r,getAllPromotions:i}=fo(),o=us(),{isPending:s,error:a,data:l}=Ss({queryKey:[bl],queryFn:i}),u=function(e){const t=us(),[n]=On((()=>new as(t,e)));Mn((()=>{n.setOptions(e)}),[n,e]);const r=Yr(jn((e=>n.subscribe(Ho.batchCalls(e))),[n]),(()=>n.getCurrentResult())),i=jn(((e,t)=>{n.mutate(e,t).catch(vs)}),[n]);if(r.error&&ms(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}({mutationFn:e.promotionId?r(e.promotionId):n,onSuccess:()=>o.invalidateQueries({queryKey:[bl]})}),c=uo(),d=In((()=>((e,t)=>{var n;return t?{id:t.id,category:t.category.title,promotionStatus:"Enabled"===t.status,contentfulUrl:(null==(n=t.contentfulContent)?void 0:n.contentId)?`${xl(e)}/entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,ignoreAudiencesIfUserNotFound:t.ignoreAudiencesIfUserNotFound??!1,audiences:t.audiences}:void 0})(c.backend,null==l?void 0:l.data.find((t=>t.id===e.promotionId)))),[c.backend,null==l?void 0:l.data,e.promotionId]),h=function(e={}){const t=Xr.useRef(),n=Xr.useRef(),[r,i]=Xr.useState({isDirty:!1,isValidating:!1,isLoading:ig(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ig(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...qg(e),formState:r});const o=t.current.control;return o._options=e,$v({subject:o._subjects.state,next:e=>{Gv(e,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Xr.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),Xr.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==r.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,r.isDirty]),Xr.useEffect((()=>{e.values&&!Ag(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),Xr.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),Xr.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),Xr.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=Nv(r,o),t.current}({mode:"onBlur",values:{id:e.promotionId||"",category:(null==d?void 0:d.category)||"",isEnabled:(null==d?void 0:d.promotionStatus)||!1,ignoreAudiencesIfUserNotFound:(null==d?void 0:d.ignoreAudiencesIfUserNotFound)||!1,audiences:(null==d?void 0:d.audiences)||[]}}),p=h.control,f=e=>{const t={promotionId:(n=e).id,category:n.category,isEnabled:n.isEnabled,ignoreAudiencesIfUserNotFound:n.ignoreAudiencesIfUserNotFound,audiences:n.audiences};var n;u.mutate(t)};Mn((()=>{u.isSuccess&&t("/")}),[t,u]);const m=e.promotionId?"Edit":"Add";switch(!0){case"Edit"===m&&s:return io("div",{children:"Loading..."});case"Edit"===m&&!!a:return oo("div",{children:[io("p",{children:a.message}),io("button",{css:{marginTop:"1rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},onClick:()=>t("/"),children:"Back"})]});default:return oo("div",{css:{display:"flex",gap:"2rem",paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[io("div",{css:{marginTop:"1rem",verticalAlign:"top"},children:io("button",{onClick:()=>t("/"),children:"<"})}),io(Bv,{...h,children:oo("form",{onSubmit:h.handleSubmit(f),children:[io("div",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"0",marginTop:"calc(3rem * calc(1 - var(--tw-space-y-reverse)))",marginBottom:"calc(3rem * var(--tw-space-y-reverse))"}},children:oo("div",{css:{borderBottomWidth:"1px",borderColor:"rgb(17 24 39 / 0.1)",paddingBottom:"3rem"},children:[oo("h2",{css:{fontSize:"1rem",lineHeight:"1.75rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:[m," Promotion"]}),oo("p",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:[m," a promoted benefit"]}),oo("div",{css:{marginTop:"2.5rem",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",columnGap:"1.5rem",rowGap:"2rem","@media (min-width: 640px)":{gridTemplateColumns:"repeat(6, minmax(0, 1fr))"}},children:[io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Yv,{name:"id",control:p,rules:{required:"Please provide an ID",pattern:{value:/^[a-z0-9\\-]+$/i,message:"Id must be lowercase and can only contain letters, numbers and hyphens."}},render:({field:e,fieldState:t})=>{var n;return io(Ks,{label:"Promotion Id",id:"id",type:"text",disabled:"Edit"==m,helperText:"This should be the same as the contentful slug",error:null==(n=t.error)?void 0:n.message,...e})}})}),"Edit"===m&&d&&oo("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:[io("label",{css:{marginBottom:"0.5rem",display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Contentful"}),d.contentfulUrl?oo("a",{href:d.contentfulUrl,target:"_blank",rel:"noopener noreferrer",css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:[io("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),io(Fs,{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(Yv,{name:"category",control:p,rules:{required:"Please provide a category"},render:({field:e,fieldState:t})=>{var n;return io(RS,{items:[{key:"cars",displayValue:"Cars"},{key:"health",displayValue:"Health"},{key:"energy",displayValue:"Energy"},{key:"everyday",displayValue:"Everyday"},{key:"savingsAccount",displayValue:"Savings Account"},{key:"homeLoan",displayValue:"Home Loan"}],label:"Category",error:null==(n=t.error)?void 0:n.message,...e})}})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Yv,{name:"isEnabled",control:p,render:({field:e})=>io(OS,{label:"Enabled",id:"id",helperText:"A promotion will be shown to users if it is 'Enabled' and Contentful content is available.",...e})})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Yv,{name:"ignoreAudiencesIfUserNotFound",control:p,render:({field:e})=>io(OS,{label:"Ignore audiences if user does not exist",id:"id",helperText:"Show this promotion to a user even if they do not exist in Segment, regardless of the configured audiences.",...e})})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(FS,{})})]})]})}),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"})})]})})]})}},LS=e=>io(rv.div,{css:{position:"absolute",bottom:"0px",left:"0px",right:"0px",top:"0px"},initial:{x:"forward"===e.direction?"100%":"-100%"},animate:{x:"0"},exit:{x:"forward"===e.direction?"-100%":"100%"},transition:{duration:.5,type:"spring"},children:io("div",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:io("div",{css:{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 640px)":{padding:"1.5rem"}},children:e.children})})}),DS=e=>{const t=Xa(),[n,r]=On("forward");var i;return i={backend:{url:e.backendUrl,accessToken:e.accessToken}},lo=ot({...i,backend:{url:i.backend.url.replace(/\/?$/,""),accessToken:i.backend.accessToken}}),Mn((()=>{if("/"===t.pathname)r("forward");else r("backward")}),[t.pathname]),io("div",{class:"mx-auto max-w-7xl sm:px-6 lg:px-8 relative",children:io(cv,{initial:!1,children:oo(cl,{location:t,children:[io(ll,{path:"/",element:io(LS,{direction:n,children:io(Sl,{})})}),io(ll,{path:"/promotion",element:io(LS,{direction:n,children:io(MS,{})})}),io(ll,{path:"/promotion/:promotionId",element:io(LS,{direction:n,children:io(MS,{})})})]},t.pathname)})})};!function(e,t,n,r){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=ut,i.prototype.attributeChangedCallback=dt,i.prototype.disconnectedCallback=ht,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,n.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t,i)}((e=>{const t=Dn(null),{EmotionProvider:n}=((e,t)=>{const[n,r]=On();return Mn((()=>{if(t&&t.current){const n=t=>{document.getElementsByTagName(e).length>0?t():requestAnimationFrame((()=>n(t)))};n((()=>{r(bn({container:t.current,key:e}))}))}}),[e,t]),{EmotionProvider:({children:e})=>n?io($i,{value:n,children:e}):io(ro,{})}})("promoted-benefits-admin",t);return oo(ro,{children:[io("head",{ref:t}),io(n,{children:io(cs,{client:_l(),children:oo(pl,{basename:e.hashRouteBase,children:[io(ao,{}),io("body",{children:io(DS,{...e})})]})})})]})}),"promoted-benefits-admin",["backend-url","access-token"],{shadow:!0})}();
51
+ `,OS=(e,t)=>{var n;return e?(null==(n=t.find((t=>t.key==e)))?void 0:n.displayValue)??"Select":"Select"},FS=(e,t)=>e&&Array.isArray(e)&&0!==e.length?e.map((e=>{var n;return null==(n=t.find((t=>t.key==e)))?void 0:n.displayValue})).join(", "):"Select",MS=tr((({label:e,items:t,value:n,className:r,onChange:i,error:o,helperText:s,isMultiSelect:a},l)=>oo("div",{className:r,children:[io(mS,{value:n||(a?[]:""),onChange:e=>{if(a){const n=e,r=e.findIndex((e=>{var n;return null==(n=t.find((t=>t.key==e)))?void 0:n.isReset}));0===r&&n.length>1?i([...n.slice(1)]):i(r>-1?[n[r]]:e)}else i(e)},multiple:a,children:({open:r})=>oo(ro,{children:[io(RS,{children:e}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[oo(CS,{as:"button",ref:l,hasError:!!o,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a?FS(n,t):OS(n,t)}),io("span",{css:{pointerEvents:"none",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"#4b5563",paddingRight:"0.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:io(na,{css:{height:"1.25rem",width:"1.25rem"},"aria-hidden":"true"})})]}),io(Wx,{show:r,leave:TS(AS({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:TS(AS({opacity:"1"})),leaveTo:TS(AS({opacity:"0"})),children:io(hS,{css:{position:"absolute",zIndex:"10",marginTop:"0.25rem",maxHeight:"15rem",width:"100%",overflow:"auto",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.25rem"}},children:t.map((e=>oo(pS,{className:"group",css:{position:"relative",cursor:"default",userSelect:"none",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",paddingRight:"2.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","&[data-active]":{backgroundColor:"var(--fl-color-primary-600)","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},"&[data-selected]":{fontWeight:"600"}},value:e.key,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.displayValue}),io("span",{css:{visibility:"hidden",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingRight:"0.75rem",".group[data-selected] &":{visibility:"visible"},".group[data-active] &":{fill:"#fff"}},children:io(ea,{css:{height:"1.25rem",width:"1.25rem",fill:"inherit"},"aria-hidden":"true"})})]},e.key)))})})]})]})}),o&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:o}),s&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:s})]}))),LS=e=>oo("div",{children:[oo(Hx,{children:[io(D_,{as:"p",css:{fontSize:"0.875rem",lineHeight:"1.25rem"},children:io("span",{css:{fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.label})}),io(xS,{checked:e.value,onChange:e.onChange,className:"group",css:{position:"relative",marginTop:"0.5rem",display:"inline-flex",height:"1.5rem",width:"2.75rem",flexShrink:"0",cursor:"pointer",borderRadius:"9999px",borderWidth:"2px",borderColor:"transparent","--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(79 70 229 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px"},"&[data-checked]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}},children:io("span",{"aria-hidden":"true",css:{pointerEvents:"none",display:"inline-block",height:"1.25rem",width:"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",".group[data-checked] &":{"--tw-translate-x":"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}}})})]}),e.helperText&&io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:e.helperText})]}),DS=tr((({},e)=>{const{control:t,formState:{errors:n}}=Uv(),{fields:r,append:i,remove:o}=function(e){const t=Uv(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o}=e,[s,a]=Xr.useState(n._getFieldArray(r)),l=Xr.useRef(n._getFieldArray(r).map(eg)),u=Xr.useRef(s),c=Xr.useRef(r),d=Xr.useRef(!1);c.current=r,u.current=s,n._names.array.add(r),e.rules&&n.register(r,e.rules),Kv({next:({values:e,name:t})=>{if(t===c.current||!t){const t=Pv(e,c.current);Array.isArray(t)&&(a(t),l.current=t.map(eg))}},subject:n._subjects.array});const h=Xr.useCallback((e=>{d.current=!0,n._updateFieldArray(r,e)}),[n,r]);return Xr.useEffect((()=>{if(n._state.action=!1,rg(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!ng(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then((e=>{const t=Pv(e.errors,r),i=Pv(n._formState.errors,r);(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type)&&(t?Rv(n._formState.errors,r,t):Tg(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=Pv(n._fields,r);!e||!e._f||ng(n._options.reValidateMode).isOnSubmit&&ng(n._options.mode).isOnSubmit||_g(e,n._formValues,n._options.criteriaMode===Fv.all,n._options.shouldUseNativeValidation,!0).then((e=>!Hv(e)&&n._subjects.state.next({errors:og(n._formState.errors,e,r)})))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&ig(n._fields,((e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1})),n._names.focus="",n._updateValid(),d.current=!1}),[s,r,n]),Xr.useEffect((()=>(!Pv(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||o)&&n.unregister(r)})),[r,n,i,o]),{swap:Xr.useCallback(((e,t)=>{const i=n._getFieldArray(r);Pg(i,e,t),Pg(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,Pg,{argA:e,argB:t},!1)}),[h,r,n]),move:Xr.useCallback(((e,t)=>{const i=n._getFieldArray(r);Sg(i,e,t),Sg(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,Sg,{argA:e,argB:t},!1)}),[h,r,n]),prepend:Xr.useCallback(((e,t)=>{const i=zv(Sv(e)),o=kg(n._getFieldArray(r),i);n._names.focus=tg(r,0,t),l.current=kg(l.current,i.map(eg)),h(o),a(o),n._updateFieldArray(r,o,kg,{argA:wg(e)})}),[h,r,n]),append:Xr.useCallback(((e,t)=>{const i=zv(Sv(e)),o=bg(n._getFieldArray(r),i);n._names.focus=tg(r,o.length-1,t),l.current=bg(l.current,i.map(eg)),h(o),a(o),n._updateFieldArray(r,o,bg,{argA:wg(e)})}),[h,r,n]),remove:Xr.useCallback((e=>{const t=Eg(n._getFieldArray(r),e);l.current=Eg(l.current,e),h(t),a(t),n._updateFieldArray(r,t,Eg,{argA:e})}),[h,r,n]),insert:Xr.useCallback(((e,t,i)=>{const o=zv(Sv(t)),s=xg(n._getFieldArray(r),e,o);n._names.focus=tg(r,e,i),l.current=xg(l.current,e,o.map(eg)),h(s),a(s),n._updateFieldArray(r,s,xg,{argA:e,argB:wg(t)})}),[h,r,n]),update:Xr.useCallback(((e,t)=>{const i=Sv(t),o=Ag(n._getFieldArray(r),e,i);l.current=[...o].map(((t,n)=>t&&n!==e?l.current[n]:eg())),h(o),a([...o]),n._updateFieldArray(r,o,Ag,{argA:e,argB:i},!0,!1)}),[h,r,n]),replace:Xr.useCallback((e=>{const t=zv(Sv(e));l.current=t.map(eg),h([...t]),a([...t]),n._updateFieldArray(r,[...t],(e=>e),{},!0,!1)}),[h,r,n]),fields:Xr.useMemo((()=>s.map(((e,t)=>({...e,[i]:l.current[t]||eg()})))),[s,i])}}({control:t,name:"audiences"});return oo("div",{children:[io("label",{htmlFor:"audiences",css:{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Audience"}),io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:"This should be the same as the audience key in segment"}),r.map(((i,s)=>io("div",{css:{marginBottom:"0.5rem"},children:io(Zv,{name:`audiences.${s}`,control:t,rules:{pattern:{value:/^[a-z0-9_]+$/,message:"Audience must be lowercase and can only contain letters, numbers and underscores."}},render:({field:t,fieldState:i})=>{var a;return io(Ks,{id:`audience-${s}`,type:"text",error:(null==n?void 0:n.audiences)?null==(a=null==n?void 0:n.audiences[s])?void 0:a.message:"",...t,ref:e,disabled:s!==r.length-1||!i.isDirty&&!!t.value,remove:()=>o(s)})}})},i.id))),oo("button",{css:{marginTop:"0.25rem",display:"flex",fontSize:"0.875rem",lineHeight:"1.25rem"},type:"button",onClick:()=>i(""),children:[io($s,{css:{marginTop:"auto",marginBottom:"auto",height:"1rem"}})," Add Audience"]})]})})),VS=()=>{const e=function(){let{matches:e}=Bn(Xa),t=e[e.length-1];return t?t.params:{}}(),t=nl(),{createPromotion:n,updatePromotion:r,getAllPromotions:i}=fo(),o=us(),{isPending:s,error:a,data:l}=Ss({queryKey:[Sl],queryFn:i}),u=function(e){const t=us(),[n]=On((()=>new as(t,e)));Mn((()=>{n.setOptions(e)}),[n,e]);const r=Yr(jn((e=>n.subscribe(Ho.batchCalls(e))),[n]),(()=>n.getCurrentResult())),i=jn(((e,t)=>{n.mutate(e,t).catch(vs)}),[n]);if(r.error&&ms(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}({mutationFn:e.promotionId?r(e.promotionId):n,onSuccess:()=>o.invalidateQueries({queryKey:[Sl]})}),c=uo(),d=In((()=>((e,t)=>{var n;return t?{id:t.id,category:t.category.title,promotionStatus:"Enabled"===t.status,contentfulUrl:(null==(n=t.contentfulContent)?void 0:n.contentId)?`${El(e)}/entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,ignoreAudiencesIfUserNotFound:t.ignoreAudiencesIfUserNotFound??!1,audiences:t.audiences}:void 0})(c.backend,null==l?void 0:l.data.find((t=>t.id===e.promotionId)))),[c.backend,null==l?void 0:l.data,e.promotionId]),h=function(e={}){const t=Xr.useRef(),n=Xr.useRef(),[r,i]=Xr.useState({isDirty:!1,isValidating:!1,isLoading:ag(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ag(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Qg(e),formState:r});const o=t.current.control;return o._options=e,Kv({subject:o._subjects.state,next:e=>{$v(e,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Xr.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),Xr.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==r.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,r.isDirty]),Xr.useEffect((()=>{e.values&&!Og(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),Xr.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),Xr.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),Xr.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=Wv(r,o),t.current}({mode:"onBlur",values:{id:e.promotionId||"",category:(null==d?void 0:d.category)||"",isEnabled:(null==d?void 0:d.promotionStatus)||!1,ignoreAudiencesIfUserNotFound:(null==d?void 0:d.ignoreAudiencesIfUserNotFound)||!1,audiences:(null==d?void 0:d.audiences)||[]}}),p=h.control,f=e=>{const t={promotionId:(n=e).id,category:n.category,isEnabled:n.isEnabled,ignoreAudiencesIfUserNotFound:n.ignoreAudiencesIfUserNotFound,audiences:n.audiences};var n;u.mutate(t)};Mn((()=>{u.isSuccess&&t("/")}),[t,u]);const m=e.promotionId?"Edit":"Add";switch(!0){case"Edit"===m&&s:return io("div",{children:"Loading..."});case"Edit"===m&&!!a:return oo("div",{children:[io("p",{children:a.message}),io("button",{css:{marginTop:"1rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},onClick:()=>t("/"),children:"Back"})]});default:return oo("div",{css:{display:"flex",gap:"2rem",paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[io("div",{css:{marginTop:"1rem",verticalAlign:"top"},children:io("button",{onClick:()=>t("/"),children:"<"})}),io(Gv,{...h,children:oo("form",{onSubmit:h.handleSubmit(f),children:[io("div",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"0",marginTop:"calc(3rem * calc(1 - var(--tw-space-y-reverse)))",marginBottom:"calc(3rem * var(--tw-space-y-reverse))"}},children:oo("div",{css:{borderBottomWidth:"1px",borderColor:"rgb(17 24 39 / 0.1)",paddingBottom:"3rem"},children:[oo("h2",{css:{fontSize:"1rem",lineHeight:"1.75rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:[m," Promotion"]}),oo("p",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:[m," a promoted benefit"]}),oo("div",{css:{marginTop:"2.5rem",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",columnGap:"1.5rem",rowGap:"2rem","@media (min-width: 640px)":{gridTemplateColumns:"repeat(6, minmax(0, 1fr))"}},children:[io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Zv,{name:"id",control:p,rules:{required:"Please provide an ID",pattern:{value:/^[a-z0-9\\-]+$/i,message:"Id must be lowercase and can only contain letters, numbers and hyphens."}},render:({field:e,fieldState:t})=>{var n;return io(Ks,{label:"Promotion Id",id:"id",type:"text",disabled:"Edit"==m,helperText:"This should be the same as the contentful slug",error:null==(n=t.error)?void 0:n.message,...e})}})}),"Edit"===m&&d&&oo("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:[io("label",{css:{marginBottom:"0.5rem",display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Contentful"}),d.contentfulUrl?oo("a",{href:d.contentfulUrl,target:"_blank",rel:"noopener noreferrer",css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:[io("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),io(Fs,{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(Zv,{name:"category",control:p,rules:{required:"Please provide a category"},render:({field:e,fieldState:t})=>{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=t.error)?void 0:n.message,...e})}})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Zv,{name:"isEnabled",control:p,render:({field:e})=>io(LS,{label:"Enabled",id:"id",helperText:"A promotion will be shown to users if it is 'Enabled' and Contentful content is available.",...e})})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Zv,{name:"ignoreAudiencesIfUserNotFound",control:p,render:({field:e})=>io(LS,{label:"Ignore audiences if user does not exist",id:"id",helperText:"Show this promotion to a user even if they do not exist in Segment, regardless of the configured audiences.",...e})})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(DS,{})})]})]})}),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"})})]})})]})}},IS=e=>io(sv.div,{css:{position:"absolute",bottom:"0px",left:"0px",right:"0px",top:"0px"},initial:{x:"forward"===e.direction?"100%":"-100%"},animate:{x:"0"},exit:{x:"forward"===e.direction?"-100%":"100%"},transition:{duration:.5,type:"spring"},children:io("div",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:io("div",{css:{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 640px)":{padding:"1.5rem"}},children:e.children})})}),jS=e=>{const t=el(),[n,r]=On("forward");var i;return i={backend:{url:e.backendUrl,accessToken:e.accessToken}},lo=ot({...i,backend:{url:i.backend.url.replace(/\/?$/,""),accessToken:i.backend.accessToken}}),Mn((()=>{if("/"===t.pathname)r("forward");else r("backward")}),[t.pathname]),io("div",{class:"mx-auto max-w-7xl sm:px-6 lg:px-8 relative",children:io(pv,{initial:!1,children:oo(pl,{location:t,children:[io(dl,{path:"/",element:io(IS,{direction:n,children:io(Pl,{})})}),io(dl,{path:"/promotion",element:io(IS,{direction:n,children:io(VS,{})})}),io(dl,{path:"/promotion/:promotionId",element:io(IS,{direction:n,children:io(VS,{})})})]},t.pathname)})})};!function(e,t,n,r){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=ut,i.prototype.attributeChangedCallback=dt,i.prototype.disconnectedCallback=ht,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,n.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t,i)}((e=>{const t=Dn(null),{EmotionProvider:n}=((e,t)=>{const[n,r]=On();return Mn((()=>{if(t&&t.current){const n=t=>{document.getElementsByTagName(e).length>0?t():requestAnimationFrame((()=>n(t)))};n((()=>{r(bn({container:t.current,key:e}))}))}}),[e,t]),{EmotionProvider:({children:e})=>n?io($i,{value:n,children:e}):io(ro,{})}})("promoted-benefits-admin",t);return oo(ro,{children:[io("head",{ref:t}),io(n,{children:io(cs,{client:xl(),children:oo(vl,{basename:e.hashRouteBase,children:[io(ao,{}),io("body",{children:io(jS,{...e})})]})})})]})}),"promoted-benefits-admin",["backend-url","access-token"],{shadow:!0})}();