@inploi/plugin-chatbot 3.7.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cdn/index.js CHANGED
@@ -1,5 +1,5 @@
1
- var Cy=Object.defineProperty;var Ay=(Vt,Je,Ie)=>Je in Vt?Cy(Vt,Je,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Vt[Je]=Ie;var rf=(Vt,Je,Ie)=>(Ay(Vt,typeof Je!="symbol"?Je+"":Je,Ie),Ie);(function(){"use strict";var Vt=e=>e,Je=class extends Error{constructor(){super("Not found"),this.name="NotFoundError"}},Ie,V,Zs,Js,Ot,Qs,ea,No,ta,Qt={},na=[],of=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,hr=Array.isArray;function Qe(e,t){for(var n in t)e[n]=t[n];return e}function ra(e){var t=e.parentNode;t&&t.removeChild(e)}function R(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ie.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Pn(e,s,r,o,null)}function Pn(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Zs};return o==null&&V.vnode!=null&&V.vnode(i),i}function oa(){return{current:null}}function ae(e){return e.children}function Pe(e,t){this.props=e,this.context=t}function pr(e,t){if(t==null)return e.__?pr(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?pr(e):null}function ia(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return ia(e)}}function Ro(e){(!e.__d&&(e.__d=!0)&&Ot.push(e)&&!mr.__r++||Qs!==V.debounceRendering)&&((Qs=V.debounceRendering)||ea)(mr)}function mr(){var e,t,n,r,o,i,s,a,c;for(Ot.sort(No);e=Ot.shift();)e.__d&&(t=Ot.length,r=void 0,o=void 0,i=void 0,a=(s=(n=e).__v).__e,(c=n.__P)&&(r=[],o=[],(i=Qe({},s)).__v=s.__v+1,Io(c,s,i,n.__n,c.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??pr(s),s.__h,o),fa(r,s,o),s.__e!=a&&ia(s)),Ot.length>t&&Ot.sort(No));mr.__r=0}function sa(e,t,n,r,o,i,s,a,c,u,d){var l,f,h,p,m,y,x,b,w,M,S=0,I=r&&r.__k||na,N=I.length,C=N,E=t.length;for(n.__k=[],l=0;l<E;l++)(p=n.__k[l]=(p=t[l])==null||typeof p=="boolean"||typeof p=="function"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?Pn(null,p,null,null,p):hr(p)?Pn(ae,{children:p},null,null,null):p.__b>0?Pn(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null&&(p.__=n,p.__b=n.__b+1,(b=sf(p,I,x=l+S,C))===-1?h=Qt:(h=I[b]||Qt,I[b]=void 0,C--),Io(e,p,h,o,i,s,a,c,u,d),m=p.__e,(f=p.ref)&&h.ref!=f&&(h.ref&&Do(h.ref,null,p),d.push(f,p.__c||m,p)),m!=null&&(y==null&&(y=m),M=!(w=h===Qt||h.__v===null)&&b===x,w?b==-1&&S--:b!==x&&(b===x+1?(S++,M=!0):b>x?C>E-x?(S+=b-x,M=!0):S--:S=b<x&&b==x-1?b-x:0),x=l+S,M=M||b==l&&!w,typeof p.type!="function"||b===x&&h.__k!==p.__k?typeof p.type=="function"||M?p.__d!==void 0?(c=p.__d,p.__d=void 0):c=m.nextSibling:c=ca(e,m,c):c=aa(p,c,e),typeof n.type=="function"&&(n.__d=c)));for(n.__e=y,l=N;l--;)I[l]!=null&&(typeof n.type=="function"&&I[l].__e!=null&&I[l].__e==n.__d&&(n.__d=I[l].__e.nextSibling),ha(I[l],I[l]))}function aa(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t=typeof r.type=="function"?aa(r,t,n):ca(n,r.__e,t));return t}function et(e,t){return t=t||[],e==null||typeof e=="boolean"||(hr(e)?e.some(function(n){et(n,t)}):t.push(e)),t}function ca(e,t,n){return n==null||n.parentNode!==e?e.insertBefore(t,null):t==n&&t.parentNode!=null||e.insertBefore(t,n),t.nextSibling}function sf(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&o==c.key&&i===c.type)return a;a++}}return-1}function af(e,t,n,r,o){var i;for(i in n)i==="children"||i==="key"||i in t||vr(e,i,null,n[i],r);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||n[i]===t[i]||vr(e,i,t[i],n[i],r)}function la(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||of.test(t)?n:n+"px"}function vr(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||la(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||la(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?da:ua,i):e.removeEventListener(t,i?da:ua,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function ua(e){return this.l[e.type+!1](V.event?V.event(e):e)}function da(e){return this.l[e.type+!0](V.event?V.event(e):e)}function Io(e,t,n,r,o,i,s,a,c,u){var d,l,f,h,p,m,y,x,b,w,M,S,I,N,C,E=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,a=t.__e=n.__e,t.__h=null,i=[a]),(d=V.__b)&&d(t);try{e:if(typeof E=="function"){if(x=t.props,b=(d=E.contextType)&&r[d.__c],w=d?b?b.props.value:d.__:r,n.__c?y=(l=t.__c=n.__c).__=l.__E:("prototype"in E&&E.prototype.render?t.__c=l=new E(x,w):(t.__c=l=new Pe(x,w),l.constructor=E,l.render=lf),b&&b.sub(l),l.props=x,l.state||(l.state={}),l.context=w,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Qe({},l.__s)),Qe(l.__s,E.getDerivedStateFromProps(x,l.__s))),h=l.props,p=l.state,l.__v=t,f)E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(E.getDerivedStateFromProps==null&&x!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(x,w),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(x,l.__s,w)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=x,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(q){q&&(q.__=t)}),M=0;M<l._sb.length;M++)l.__h.push(l._sb[M]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(x,l.__s,w),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,p,m)})}if(l.context=w,l.props=x,l.__P=e,l.__e=!1,S=V.__r,I=0,"prototype"in E&&E.prototype.render){for(l.state=l.__s,l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),N=0;N<l._sb.length;N++)l.__h.push(l._sb[N]);l._sb=[]}else do l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++I<25);l.state=l.__s,l.getChildContext!=null&&(r=Qe(Qe({},r),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(h,p)),sa(e,hr(C=d!=null&&d.type===ae&&d.key==null?d.props.children:d)?C:[C],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),y&&(l.__E=l.__=null)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=cf(n.__e,t,n,r,o,i,s,c,u);(d=V.diffed)&&d(t)}catch(q){t.__v=null,(c||i!=null)&&(t.__e=a,t.__h=!!c,i[i.indexOf(a)]=null),V.__e(q,t,n)}}function fa(e,t,n){for(var r=0;r<n.length;r++)Do(n[r],n[++r],n[++r]);V.__c&&V.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){V.__e(i,o.__v)}})}function cf(e,t,n,r,o,i,s,a,c){var u,d,l,f=n.props,h=t.props,p=t.type,m=0;if(p==="svg"&&(o=!0),i!=null){for(;m<i.length;m++)if((u=i[m])&&"setAttribute"in u==!!p&&(p?u.localName===p:u.nodeType===3)){e=u,i[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(h);e=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),i=null,a=!1}if(p===null)f===h||a&&e.data===h||(e.data=h);else{if(i=i&&Ie.call(e.childNodes),d=(f=n.props||Qt).dangerouslySetInnerHTML,l=h.dangerouslySetInnerHTML,!a){if(i!=null)for(f={},m=0;m<e.attributes.length;m++)f[e.attributes[m].name]=e.attributes[m].value;(l||d)&&(l&&(d&&l.__html==d.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(af(e,h,f,o,a),l)t.__k=[];else if(sa(e,hr(m=t.props.children)?m:[m],t,n,r,o&&p!=="foreignObject",i,s,i?i[0]:n.__k&&pr(n,0),a,c),i!=null)for(m=i.length;m--;)i[m]!=null&&ra(i[m]);a||("value"in h&&(m=h.value)!==void 0&&(m!==e.value||p==="progress"&&!m||p==="option"&&m!==f.value)&&vr(e,"value",m,f.value,!1),"checked"in h&&(m=h.checked)!==void 0&&m!==e.checked&&vr(e,"checked",m,f.checked,!1))}return e}function Do(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){V.__e(r,n)}}function ha(e,t,n){var r,o;if(V.unmount&&V.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Do(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){V.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ha(r[o],t,n||typeof e.type!="function");n||e.__e==null||ra(e.__e),e.__=e.__e=e.__d=void 0}function lf(e,t,n){return this.constructor(e,n)}function en(e,t,n){var r,o,i,s;V.__&&V.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Io(t,e=(!r&&n||t).__k=R(ae,null,[e]),o||Qt,Qt,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?Ie.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),fa(i,e,s)}function pa(e,t){en(e,t,pa)}function uf(e,t,n){var r,o,i,s,a=Qe({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?Ie.call(arguments,2):n),Pn(e.type,a,r||e.key,o||e.ref,null)}function De(e,t){var n={__c:t="__cC"+ta++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,Ro(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Ie=na.slice,V={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Zs=0,Js=function(e){return e!=null&&e.constructor===void 0},Pe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Qe({},this.state),typeof e=="function"&&(e=e(Qe({},n),this.props)),e&&Qe(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ro(this))},Pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ro(this))},Pe.prototype.render=ae,Ot=[],ea=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,No=function(e,t){return e.__v.__b-t.__v.__b},mr.__r=0,ta=0;var tt,J,Fo,ma,tn=0,va=[],gr=[],ga=V.__b,ba=V.__r,ya=V.diffed,wa=V.__c,_a=V.unmount;function Lt(e,t){V.__h&&V.__h(J,e,tn||t),tn=0;var n=J.__H||(J.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:gr}),n.__[e]}function ce(e){return tn=1,br(Sa,e)}function br(e,t,n){var r=Lt(tt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Sa(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=J,!J.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!i||i.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!i||i.call(this,a,c,u))};J.u=!0;var i=J.shouldComponentUpdate,s=J.componentWillUpdate;J.componentWillUpdate=function(a,c,u){if(this.__e){var d=i;i=void 0,o(a,c,u),i=d}s&&s.call(this,a,c,u)},J.shouldComponentUpdate=o}return r.__N||r.__}function G(e,t){var n=Lt(tt++,3);!V.__s&&Bo(n.__H,t)&&(n.__=e,n.i=t,J.__H.__h.push(n))}function Fe(e,t){var n=Lt(tt++,4);!V.__s&&Bo(n.__H,t)&&(n.__=e,n.i=t,J.__h.push(n))}function U(e){return tn=5,de(function(){return{current:e}},[])}function xa(e,t,n){tn=6,Fe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function de(e,t){var n=Lt(tt++,7);return Bo(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function me(e,t){return tn=8,de(function(){return e},t)}function we(e){var t=J.context[e.__c],n=Lt(tt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(J)),t.props.value):e.__}function ka(e,t){V.useDebugValue&&V.useDebugValue(t?t(e):e)}function df(e){var t=Lt(tt++,10),n=ce();return t.__=e,J.componentDidCatch||(J.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function yr(){var e=Lt(tt++,11);if(!e.__){for(var t=J.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ff(){for(var e;e=va.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(wr),e.__H.__h.forEach(zo),e.__H.__h=[]}catch(t){e.__H.__h=[],V.__e(t,e.__v)}}V.__b=function(e){J=null,ga&&ga(e)},V.__r=function(e){ba&&ba(e),tt=0;var t=(J=e.__c).__H;t&&(Fo===J?(t.__h=[],J.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=gr,n.__N=n.i=void 0})):(t.__h.forEach(wr),t.__h.forEach(zo),t.__h=[],tt=0)),Fo=J},V.diffed=function(e){ya&&ya(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(va.push(t)!==1&&ma===V.requestAnimationFrame||((ma=V.requestAnimationFrame)||hf)(ff)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==gr&&(n.__=n.__V),n.i=void 0,n.__V=gr})),Fo=J=null},V.__c=function(e,t){t.some(function(n){try{n.__h.forEach(wr),n.__h=n.__h.filter(function(r){return!r.__||zo(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],V.__e(r,n.__v)}}),wa&&wa(e,t)},V.unmount=function(e){_a&&_a(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{wr(r)}catch(o){t=o}}),n.__H=void 0,t&&V.__e(t,n.__v))};var $a=typeof requestAnimationFrame=="function";function hf(e){var t,n=function(){clearTimeout(r),$a&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$a&&(t=requestAnimationFrame(n))}function wr(e){var t=J,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),J=t}function zo(e){var t=J;e.__c=e.__(),J=t}function Bo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Sa(e,t){return typeof t=="function"?t(e):t}function _r(){throw new Error("Cycle detected")}var pf=Symbol.for("preact-signals");function xr(){if(ft>1)ft--;else{for(var e,t=!1;En!==void 0;){var n=En;for(En=void 0,jo++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ta(n))try{n.c()}catch(o){t||(e=o,t=!0)}n=r}}if(jo=0,ft--,t)throw e}}function mf(e){if(ft>0)return e();ft++;try{return e()}finally{xr()}}var oe=void 0,En=void 0,ft=0,jo=0,kr=0;function Ma(e){if(oe!==void 0){var t=e.n;if(t===void 0||t.t!==oe)return t={i:0,S:e,p:oe.s,n:void 0,t:oe,e:void 0,x:void 0,r:t},oe.s!==void 0&&(oe.s.n=t),oe.s=t,e.n=t,32&oe.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=oe.s,t.n=void 0,oe.s.n=t,oe.s=t),t}}function ve(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ve.prototype.brand=pf,ve.prototype.h=function(){return!0},ve.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},ve.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},ve.prototype.subscribe=function(e){var t=this;return Uo(function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}})},ve.prototype.valueOf=function(){return this.value},ve.prototype.toString=function(){return this.value+""},ve.prototype.toJSON=function(){return this.value},ve.prototype.peek=function(){return this.v},Object.defineProperty(ve.prototype,"value",{get:function(){var e=Ma(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(oe instanceof ht&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){jo>100&&_r(),this.v=e,this.i++,kr++,ft++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{xr()}}}});function Vn(e){return new ve(e)}function Ta(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ca(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Aa(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function ht(e){ve.call(this,void 0),this.x=e,this.s=void 0,this.g=kr-1,this.f=4}(ht.prototype=new ve).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===kr))return!0;if(this.g=kr,this.f|=1,this.i>0&&!Ta(this))return this.f&=-2,!0;var e=oe;try{Ca(this),oe=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return oe=e,Aa(this),this.f&=-2,!0},ht.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ve.prototype.S.call(this,e)},ht.prototype.U=function(e){if(this.t!==void 0&&(ve.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},ht.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},ht.prototype.peek=function(){if(this.h()||_r(),16&this.f)throw this.v;return this.v},Object.defineProperty(ht.prototype,"value",{get:function(){1&this.f&&_r();var e=Ma(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function vf(e){return new ht(e)}function Pa(e){var t=e.u;if(e.u=void 0,typeof t=="function"){ft++;var n=oe;oe=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Ho(e),r}finally{oe=n,xr()}}}function Ho(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Pa(e)}function gf(e){if(oe!==this)throw new Error("Out-of-order effect");Aa(this),oe=e,this.f&=-2,8&this.f&&Ho(this),xr()}function On(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}On.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},On.prototype.S=function(){1&this.f&&_r(),this.f|=1,this.f&=-9,Pa(this),Ca(this),ft++;var e=oe;return oe=this,gf.bind(this,e)},On.prototype.N=function(){2&this.f||(this.f|=2,this.o=En,En=this)},On.prototype.d=function(){this.f|=8,1&this.f||Ho(this)};function Uo(e){var t=new On(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var Xo;function nn(e,t){V[e]=t.bind(null,V[e]||function(){})}function $r(e){Xo&&Xo(),Xo=e&&e.S()}function Ea(e){var t=this,n=e.data,r=yf(n);r.value=n;var o=de(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Js(o.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},vf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}Ea.displayName="_st",Object.defineProperties(ve.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Ea},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),nn("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var o in r)if(o!=="children"){var i=r[o];i instanceof ve&&(n||(t.__np=n={}),n[o]=i,r[o]=i.peek())}}e(t)}),nn("__r",function(e,t){$r();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(o){var i;return Uo(function(){i=this}),i.c=function(){r.__$f|=1,r.setState({})},i}())),$r(n),e(t)}),nn("__e",function(e,t,n,r){$r(),e(t,n,r)}),nn("diffed",function(e,t){$r();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,o=t.props;if(r){var i=n.U;if(i)for(var s in i){var a=i[s];a!==void 0&&!(s in r)&&(a.d(),i[s]=void 0)}else n.U=i={};for(var c in r){var u=i[c],d=r[c];u===void 0?(u=bf(n,c,d,o),i[c]=u):u.o(d,o)}}}e(t)});function bf(e,t,n,r){var o=t in e&&e.ownerSVGElement===void 0,i=Vn(n);return{o:function(s,a){i.value=s,r=a},d:Uo(function(){var s=i.value.value;r[t]!==s&&(r[t]=s,o?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}nn("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var o in r){var i=r[o];i&&i.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),nn("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),Pe.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function yf(e){return de(function(){return Vn(e)},[])}var wf=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function rn(e,t){if(!e)throw new Error(t)}function Te(){return Te=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},Te.apply(this,arguments)}function Va(e,t){for(var n in t)e[n]=t[n];return e}function qo(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Wo(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Sr(e){this.props=e}function Oa(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:qo(this.props,o)}function r(o){return this.shouldComponentUpdate=n,R(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Sr.prototype=new Pe).isPureReactComponent=!0,Sr.prototype.shouldComponentUpdate=function(e,t){return qo(this.props,e)||qo(this.state,t)};var La=V.__b;V.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),La&&La(e)};var _f=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _e(e){function t(n){var r=Va({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=_f,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Na=function(e,t){return e==null?null:et(et(e).map(t))},je={map:Na,forEach:Na,count:function(e){return e?et(e).length:0},only:function(e){var t=et(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:et},xf=V.__e;V.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}xf(e,t,n,r)};var Ra=V.unmount;function Ia(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Va({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Ia(r,t,n)})),e}function Da(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Da(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function on(){this.__u=0,this.t=null,this.__b=null}function Fa(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ko(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return R(n,i)}return o.displayName="Lazy",o.__f=!0,o}function sn(){this.u=null,this.o=null}V.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ra&&Ra(e)},(on.prototype=new Pe).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Fa(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Da(u,u.__c.__P,u.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.t.pop();)d.forceUpdate()}},c=t.__h===!0;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},on.prototype.componentWillUnmount=function(){this.t=[]},on.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]=Ia(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&R(ae,null,e.fallback);return o&&(o.__h=null),[R(ae,null,t.__a?null:e.children),o]};var za=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function kf(e){return this.getChildContext=function(){return e.context},e.children}function $f(e){var t=this,n=e.i;t.componentWillUnmount=function(){en(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),en(R(kf,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ba(e,t){var n=R($f,{__v:e,i:t});return n.containerInfo=t,n}(sn.prototype=new Pe).__a=function(e){var t=this,n=Fa(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),za(t,e,r)):o()};n?n(i):i()}},sn.prototype.render=function(e){this.u=null,this.o=new Map;var t=et(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},sn.prototype.componentDidUpdate=sn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){za(e,n,t)})};var ja=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Sf=/^(?: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]/,Mf=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Tf=/[A-Z0-9]/g,Cf=typeof document<"u",Af=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ha(e,t,n){return t.__k==null&&(t.textContent=""),en(e,t),typeof n=="function"&&n(),e?e.__c:null}function Ua(e,t,n){return pa(e,t),typeof n=="function"&&n(),e?e.__c:null}Pe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Pe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Xa=V.event;function Pf(){}function Ef(){return this.cancelBubble}function Vf(){return this.defaultPrevented}V.event=function(e){return Xa&&(e=Xa(e)),e.persist=Pf,e.isPropagationStopped=Ef,e.isDefaultPrevented=Vf,e.nativeEvent=e};var Yo,Of={enumerable:!1,configurable:!0,get:function(){return this.class}},qa=V.vnode;V.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Cf&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Af(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Mf.test(i)?i=a:r.indexOf("-")===-1&&Sf.test(i)?i=i.replace(Tf,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=et(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=et(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Of)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=ja,qa&&qa(e)};var Wa=V.__r;V.__r=function(e){Wa&&Wa(e),Yo=e.__c};var Ka=V.diffed;V.diffed=function(e){Ka&&Ka(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Yo=null};var Ya={ReactCurrentDispatcher:{current:{readContext:function(e){return Yo.__n[e.__c].props.value}}}},Lf="17.0.2";function Ga(e){return R.bind(null,e)}function pt(e){return!!e&&e.$$typeof===ja}function mt(e){return pt(e)?uf.apply(null,arguments):e}function Za(e){return!!e.__k&&(en(null,e),!0)}function Ja(e){return e&&(e.base||e.nodeType===1&&e)||null}var Qa=function(e,t){return e(t)},Mr=function(e,t){return e(t)},ec=ae;function Go(e){e()}function tc(e){return e}function nc(){return[!1,Go]}var Tr=Fe;function rc(e,t){var n=t(),r=ce({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Fe(function(){o.__=n,o.v=t,Wo(o.__,t())||i({h:o})},[e,n,t]),G(function(){return Wo(o.__,o.v())||i({h:o}),e(function(){Wo(o.__,o.v())||i({h:o})})},[e]),n}var ze={useState:ce,useId:yr,useReducer:br,useEffect:G,useLayoutEffect:Fe,useInsertionEffect:Tr,useTransition:nc,useDeferredValue:tc,useSyncExternalStore:rc,startTransition:Go,useRef:U,useImperativeHandle:xa,useMemo:de,useCallback:me,useContext:we,useDebugValue:ka,version:"17.0.2",Children:je,render:Ha,hydrate:Ua,unmountComponentAtNode:Za,createPortal:Ba,createElement:R,createContext:De,createFactory:Ga,cloneElement:mt,createRef:oa,Fragment:ae,isValidElement:pt,findDOMNode:Ja,Component:Pe,PureComponent:Sr,memo:Oa,forwardRef:_e,flushSync:Mr,unstable_batchedUpdates:Qa,StrictMode:ec,Suspense:on,SuspenseList:sn,lazy:Ko,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ya};const Nf=Object.freeze(Object.defineProperty({__proto__:null,Children:je,Component:Pe,Fragment:ae,PureComponent:Sr,StrictMode:ec,Suspense:on,SuspenseList:sn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ya,cloneElement:mt,createContext:De,createElement:R,createFactory:Ga,createPortal:Ba,createRef:oa,default:ze,findDOMNode:Ja,flushSync:Mr,forwardRef:_e,hydrate:Ua,isValidElement:pt,lazy:Ko,memo:Oa,render:Ha,startTransition:Go,unmountComponentAtNode:Za,unstable_batchedUpdates:Qa,useCallback:me,useContext:we,useDebugValue:ka,useDeferredValue:tc,useEffect:G,useErrorBoundary:df,useId:yr,useImperativeHandle:xa,useInsertionEffect:Tr,useLayoutEffect:Fe,useMemo:de,useReducer:br,useRef:U,useState:ce,useSyncExternalStore:rc,useTransition:nc,version:Lf},Symbol.toStringTag,{value:"Module"}));function an(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Rf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function oc(...e){return t=>e.forEach(n=>Rf(n,t))}function Ln(...e){return me(oc(...e),e)}function If(e,t=[]){let n=[];function r(i,s){const a=De(s),c=n.length;n=[...n,s];function u(l){const{scope:f,children:h,...p}=l,m=(f==null?void 0:f[e][c])||a,y=de(()=>p,Object.values(p));return R(m.Provider,{value:y},h)}function d(l,f){const h=(f==null?void 0:f[e][c])||a,p=we(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const o=()=>{const i=n.map(s=>De(s));return function(a){const c=(a==null?void 0:a[e])||i;return de(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Df(o,...t)]}function Df(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...a,...l}},{});return de(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Zo=globalThis!=null&&globalThis.document?Fe:()=>{},Ff=Nf["useId".toString()]||(()=>{});let zf=0;function Jo(e){const[t,n]=ce(Ff());return Zo(()=>{e||n(r=>r??String(zf++))},[e]),e||(t?`radix-${t}`:"")}function Nt(e){const t=U(e);return G(()=>{t.current=e}),de(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Bf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=jf({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=Nt(n),c=me(u=>{if(i){const l=typeof u=="function"?u(e):u;l!==e&&a(l)}else o(u)},[i,e,o,a]);return[s,c]}function jf({defaultProp:e,onChange:t}){const n=ce(e),[r]=n,o=U(r),i=Nt(t);return G(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Qo=_e((e,t)=>{const{children:n,...r}=e,o=je.toArray(n),i=o.find(Uf);if(i){const s=i.props.children,a=o.map(c=>c===i?je.count(s)>1?je.only(null):pt(s)?s.props.children:null:c);return R(ei,Te({},r,{ref:t}),pt(s)?mt(s,void 0,a):null)}return R(ei,Te({},r,{ref:t}),n)});Qo.displayName="Slot";const ei=_e((e,t)=>{const{children:n,...r}=e;return pt(n)?mt(n,{...Xf(r,n.props),ref:t?oc(t,n.ref):n.ref}):je.count(n)>1?je.only(null):null});ei.displayName="SlotClone";const Hf=({children:e})=>R(ae,null,e);function Uf(e){return pt(e)&&e.type===Hf}function Xf(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const ti=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=_e((r,o)=>{const{asChild:i,...s}=r,a=i?Qo:t;return G(()=>{window[Symbol.for("radix-ui")]=!0},[]),R(a,Te({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function qf(e,t){e&&Mr(()=>e.dispatchEvent(t))}function Wf(e,t=globalThis==null?void 0:globalThis.document){const n=Nt(e);G(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ni="dismissableLayer.update",Kf="dismissableLayer.pointerDownOutside",Yf="dismissableLayer.focusOutside";let ic;const Gf=De({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zf=_e((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,d=we(Gf),[l,f]=ce(null),h=(n=l==null?void 0:l.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,p]=ce({}),m=Ln(t,C=>f(C)),y=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(x),w=l?y.indexOf(l):-1,M=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,I=Jf(C=>{const E=C.target,q=[...d.branches].some(K=>K.contains(E));!S||q||(i==null||i(C),a==null||a(C),C.defaultPrevented||c==null||c())},h),N=Qf(C=>{const E=C.target;[...d.branches].some(K=>K.contains(E))||(s==null||s(C),a==null||a(C),C.defaultPrevented||c==null||c())},h);return Wf(C=>{w===d.layers.size-1&&(o==null||o(C),!C.defaultPrevented&&c&&(C.preventDefault(),c()))},h),G(()=>{if(l)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ic=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),sc(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ic)}},[l,h,r,d]),G(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),sc())},[l,d]),G(()=>{const C=()=>p({});return document.addEventListener(ni,C),()=>document.removeEventListener(ni,C)},[]),R(ti.div,Te({},u,{ref:m,style:{pointerEvents:M?S?"auto":"none":void 0,...e.style},onFocusCapture:an(e.onFocusCapture,N.onFocusCapture),onBlurCapture:an(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:an(e.onPointerDownCapture,I.onPointerDownCapture)}))});function Jf(e,t=globalThis==null?void 0:globalThis.document){const n=Nt(e),r=U(!1),o=U(()=>{});return G(()=>{const i=a=>{if(a.target&&!r.current){let u=function(){ac(Kf,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Qf(e,t=globalThis==null?void 0:globalThis.document){const n=Nt(e),r=U(!1);return G(()=>{const o=i=>{i.target&&!r.current&&ac(Yf,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function sc(){const e=new CustomEvent(ni);document.dispatchEvent(e)}function ac(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qf(o,i):o.dispatchEvent(i)}const ri="focusScope.autoFocusOnMount",oi="focusScope.autoFocusOnUnmount",cc={bubbles:!1,cancelable:!0},eh=_e((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,c]=ce(null),u=Nt(o),d=Nt(i),l=U(null),f=Ln(t,m=>c(m)),h=U({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;G(()=>{if(r){let m=function(w){if(h.paused||!a)return;const M=w.target;a.contains(M)?l.current=M:vt(l.current,{select:!0})},y=function(w){if(h.paused||!a)return;const M=w.relatedTarget;M!==null&&(a.contains(M)||vt(l.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&vt(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const b=new MutationObserver(x);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),b.disconnect()}}},[r,a,h.paused]),G(()=>{if(a){dc.add(h);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(ri,cc);a.addEventListener(ri,u),a.dispatchEvent(x),x.defaultPrevented||(th(sh(lc(a)),{select:!0}),document.activeElement===m&&vt(a))}return()=>{a.removeEventListener(ri,u),setTimeout(()=>{const x=new CustomEvent(oi,cc);a.addEventListener(oi,d),a.dispatchEvent(x),x.defaultPrevented||vt(m??document.body,{select:!0}),a.removeEventListener(oi,d),dc.remove(h)},0)}}},[a,u,d,h]);const p=me(m=>{if(!n&&!r||h.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(y&&x){const b=m.currentTarget,[w,M]=nh(b);w&&M?!m.shiftKey&&x===M?(m.preventDefault(),n&&vt(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&vt(M,{select:!0})):x===b&&m.preventDefault()}},[n,r,h.paused]);return R(ti.div,Te({tabIndex:-1},s,{ref:f,onKeyDown:p}))});function th(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vt(r,{select:t}),document.activeElement!==n)return}function nh(e){const t=lc(e),n=uc(t,e),r=uc(t.reverse(),e);return[n,r]}function lc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uc(e,t){for(const n of e)if(!rh(n,{upTo:t}))return n}function rh(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function oh(e){return e instanceof HTMLInputElement&&"select"in e}function vt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oh(e)&&t&&e.select()}}const dc=ih();function ih(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fc(e,t),e.unshift(t)},remove(t){var n;e=fc(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function fc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sh(e){return e.filter(t=>t.tagName!=="A")}function ah(e,t){return br((n,r)=>{const o=t[n][r];return o??n},e)}const ii=e=>{const{present:t,children:n}=e,r=ch(t),o=typeof n=="function"?n({present:r.isPresent}):je.only(n),i=Ln(r.ref,o.ref);return typeof n=="function"||r.isPresent?mt(o,{ref:i}):null};ii.displayName="Presence";function ch(e){const[t,n]=ce(),r=U({}),o=U(e),i=U("none"),s=e?"mounted":"unmounted",[a,c]=ah(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return G(()=>{const u=Cr(r.current);i.current=a==="mounted"?u:"none"},[a]),Zo(()=>{const u=r.current,d=o.current;if(d!==e){const f=i.current,h=Cr(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Zo(()=>{if(t){const u=l=>{const h=Cr(r.current).includes(l.animationName);l.target===t&&h&&Mr(()=>c("ANIMATION_END"))},d=l=>{l.target===t&&(i.current=Cr(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:me(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Cr(e){return(e==null?void 0:e.animationName)||"none"}let si=0;function lh(){G(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:hc()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:hc()),si++,()=>{si===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),si--}},[])}function hc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var He=function(){return He=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},He.apply(this,arguments)};function pc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function uh(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ar="right-scroll-bar-position",Pr="width-before-scroll-bar",dh="with-scroll-bars-hidden",fh="--removed-body-scroll-bar-size";function hh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ph(e,t){var n=ce(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function mh(e,t){return ph(t||null,function(n){return e.forEach(function(r){return hh(r,n)})})}function vh(e){return e}function gh(e,t){t===void 0&&(t=vh);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var c=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function bh(e){e===void 0&&(e={});var t=gh(null);return t.options=He({async:!0,ssr:!1},e),t}var mc=function(e){var t=e.sideCar,n=pc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return R(r,He({},n))};mc.isSideCarExport=!0;function yh(e,t){return e.useMedium(t),mc}var vc=bh(),ai=function(){},Er=_e(function(e,t){var n=U(null),r=ce({onScrollCapture:ai,onWheelCapture:ai,onTouchMoveCapture:ai}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,b=pc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=f,M=mh([n,t]),S=He(He({},b),o);return R(ae,null,d&&R(w,{sideCar:vc,removeScrollBar:u,shards:l,noIsolation:h,inert:p,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),s?mt(je.only(a),He(He({},S),{ref:M})):R(x,He({},S,{className:c,ref:M}),a))});Er.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Er.classNames={fullWidth:Pr,zeroRight:Ar};var gc,wh=function(){if(gc)return gc;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _h(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wh();return t&&e.setAttribute("nonce",t),e}function xh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $h=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_h())&&(xh(t,n),kh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sh=function(){var e=$h();return function(t,n){G(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bc=function(){var e=Sh(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Mh={left:0,top:0,right:0,gap:0},ci=function(e){return parseInt(e||"",10)||0},Th=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ci(n),ci(r),ci(o)]},Ch=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Mh;var t=Th(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ah=bc(),Ph=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(dh,` {
1
+ var Mg=Object.defineProperty;var Fg=(ft,Le,$e)=>Le in ft?Mg(ft,Le,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ft[Le]=$e;var Wl=(ft,Le,$e)=>(Fg(ft,typeof Le!="symbol"?Le+"":Le,$e),$e);(function(){"use strict";var ft=e=>e,Le=class extends Error{constructor(){super("Not found"),this.name="NotFoundError"}},$e,V,Fo,Io,pt,Do,No,Hr,Lo,Mt={},Ro=[],Kl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Nn=Array.isArray;function Re(e,t){for(var n in t)e[n]=t[n];return e}function Bo(e){var t=e.parentNode;t&&t.removeChild(e)}function M(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?$e.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return rn(e,s,r,i,null)}function rn(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,__h:null,constructor:void 0,__v:i??++Fo};return i==null&&V.vnode!=null&&V.vnode(o),o}function jo(){return{current:null}}function ee(e){return e.children}function xe(e,t){this.props=e,this.context=t}function Ln(e,t){if(t==null)return e.__?Ln(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ln(e):null}function Uo(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Uo(e)}}function Wr(e){(!e.__d&&(e.__d=!0)&&pt.push(e)&&!Rn.__r++||Do!==V.debounceRendering)&&((Do=V.debounceRendering)||No)(Rn)}function Rn(){var e,t,n,r,i,o,s,a,c;for(pt.sort(Hr);e=pt.shift();)e.__d&&(t=pt.length,r=void 0,i=void 0,o=void 0,a=(s=(n=e).__v).__e,(c=n.__P)&&(r=[],i=[],(o=Re({},s)).__v=s.__v+1,Kr(c,s,o,n.__n,c.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??Ln(s),s.__h,i),Yo(r,s,i),s.__e!=a&&Uo(s)),pt.length>t&&pt.sort(Hr));Rn.__r=0}function zo(e,t,n,r,i,o,s,a,c,u,d){var l,f,h,p,v,b,k,y,_,C,S=0,N=r&&r.__k||Ro,I=N.length,A=I,E=t.length;for(n.__k=[],l=0;l<E;l++)(p=n.__k[l]=(p=t[l])==null||typeof p=="boolean"||typeof p=="function"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?rn(null,p,null,null,p):Nn(p)?rn(ee,{children:p},null,null,null):p.__b>0?rn(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null&&(p.__=n,p.__b=n.__b+1,(y=ql(p,N,k=l+S,A))===-1?h=Mt:(h=N[y]||Mt,N[y]=void 0,A--),Kr(e,p,h,i,o,s,a,c,u,d),v=p.__e,(f=p.ref)&&h.ref!=f&&(h.ref&&qr(h.ref,null,p),d.push(f,p.__c||v,p)),v!=null&&(b==null&&(b=v),C=!(_=h===Mt||h.__v===null)&&y===k,_?y==-1&&S--:y!==k&&(y===k+1?(S++,C=!0):y>k?A>E-k?(S+=y-k,C=!0):S--:S=y<k&&y==k-1?y-k:0),k=l+S,C=C||y==l&&!_,typeof p.type!="function"||y===k&&h.__k!==p.__k?typeof p.type=="function"||C?p.__d!==void 0?(c=p.__d,p.__d=void 0):c=v.nextSibling:c=Wo(e,v,c):c=Ho(p,c,e),typeof n.type=="function"&&(n.__d=c)));for(n.__e=b,l=I;l--;)N[l]!=null&&(typeof n.type=="function"&&N[l].__e!=null&&N[l].__e==n.__d&&(n.__d=N[l].__e.nextSibling),Zo(N[l],N[l]))}function Ho(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t=typeof r.type=="function"?Ho(r,t,n):Wo(n,r.__e,t));return t}function Be(e,t){return t=t||[],e==null||typeof e=="boolean"||(Nn(e)?e.some(function(n){Be(n,t)}):t.push(e)),t}function Wo(e,t,n){return n==null||n.parentNode!==e?e.insertBefore(t,null):t==n&&t.parentNode!=null||e.insertBefore(t,n),t.nextSibling}function ql(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&i==c.key&&o===c.type)return n;if(r>(c!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&i==c.key&&o===c.type)return a;a++}}return-1}function Gl(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||Bn(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||Bn(e,o,t[o],n[o],r)}function Ko(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Kl.test(t)?n:n+"px"}function Bn(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ko(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ko(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Go:qo,o):e.removeEventListener(t,o?Go:qo,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function qo(e){return this.l[e.type+!1](V.event?V.event(e):e)}function Go(e){return this.l[e.type+!0](V.event?V.event(e):e)}function Kr(e,t,n,r,i,o,s,a,c,u){var d,l,f,h,p,v,b,k,y,_,C,S,N,I,A,E=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(d=V.__b)&&d(t);try{e:if(typeof E=="function"){if(k=t.props,y=(d=E.contextType)&&r[d.__c],_=d?y?y.props.value:d.__:r,n.__c?b=(l=t.__c=n.__c).__=l.__E:("prototype"in E&&E.prototype.render?t.__c=l=new E(k,_):(t.__c=l=new xe(k,_),l.constructor=E,l.render=Zl),y&&y.sub(l),l.props=k,l.state||(l.state={}),l.context=_,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Re({},l.__s)),Re(l.__s,E.getDerivedStateFromProps(k,l.__s))),h=l.props,p=l.state,l.__v=t,f)E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(E.getDerivedStateFromProps==null&&k!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(k,_),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(k,l.__s,_)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=k,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(W){W&&(W.__=t)}),C=0;C<l._sb.length;C++)l.__h.push(l._sb[C]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(k,l.__s,_),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,p,v)})}if(l.context=_,l.props=k,l.__P=e,l.__e=!1,S=V.__r,N=0,"prototype"in E&&E.prototype.render){for(l.state=l.__s,l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),I=0;I<l._sb.length;I++)l.__h.push(l._sb[I]);l._sb=[]}else do l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++N<25);l.state=l.__s,l.getChildContext!=null&&(r=Re(Re({},r),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(v=l.getSnapshotBeforeUpdate(h,p)),zo(e,Nn(A=d!=null&&d.type===ee&&d.key==null?d.props.children:d)?A:[A],t,n,r,i,o,s,a,c,u),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),b&&(l.__E=l.__=null)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Yl(n.__e,t,n,r,i,o,s,c,u);(d=V.diffed)&&d(t)}catch(W){t.__v=null,(c||o!=null)&&(t.__e=a,t.__h=!!c,o[o.indexOf(a)]=null),V.__e(W,t,n)}}function Yo(e,t,n){for(var r=0;r<n.length;r++)qr(n[r],n[++r],n[++r]);V.__c&&V.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){V.__e(o,i.__v)}})}function Yl(e,t,n,r,i,o,s,a,c){var u,d,l,f=n.props,h=t.props,p=t.type,v=0;if(p==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((u=o[v])&&"setAttribute"in u==!!p&&(p?u.localName===p:u.nodeType===3)){e=u,o[v]=null;break}}if(e==null){if(p===null)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),o=null,a=!1}if(p===null)f===h||a&&e.data===h||(e.data=h);else{if(o=o&&$e.call(e.childNodes),d=(f=n.props||Mt).dangerouslySetInnerHTML,l=h.dangerouslySetInnerHTML,!a){if(o!=null)for(f={},v=0;v<e.attributes.length;v++)f[e.attributes[v].name]=e.attributes[v].value;(l||d)&&(l&&(d&&l.__html==d.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(Gl(e,h,f,i,a),l)t.__k=[];else if(zo(e,Nn(v=t.props.children)?v:[v],t,n,r,i&&p!=="foreignObject",o,s,o?o[0]:n.__k&&Ln(n,0),a,c),o!=null)for(v=o.length;v--;)o[v]!=null&&Bo(o[v]);a||("value"in h&&(v=h.value)!==void 0&&(v!==e.value||p==="progress"&&!v||p==="option"&&v!==f.value)&&Bn(e,"value",v,f.value,!1),"checked"in h&&(v=h.checked)!==void 0&&v!==e.checked&&Bn(e,"checked",v,f.checked,!1))}return e}function qr(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){V.__e(r,n)}}function Zo(e,t,n){var r,i;if(V.unmount&&V.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||qr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){V.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Zo(r[i],t,n||typeof e.type!="function");n||e.__e==null||Bo(e.__e),e.__=e.__e=e.__d=void 0}function Zl(e,t,n){return this.constructor(e,n)}function Ft(e,t,n){var r,i,o,s;V.__&&V.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],Kr(t,e=(!r&&n||t).__k=M(ee,null,[e]),i||Mt,Mt,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?$e.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),Yo(o,e,s)}function Xo(e,t){Ft(e,t,Xo)}function Xl(e,t,n){var r,i,o,s,a=Re({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?$e.call(arguments,2):n),rn(e.type,a,r||e.key,i||e.ref,null)}function Ae(e,t){var n={__c:t="__cC"+Lo++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(a){a.__e=!0,Wr(a)})},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}$e=Ro.slice,V={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Fo=0,Io=function(e){return e!=null&&e.constructor===void 0},xe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Re({},this.state),typeof e=="function"&&(e=e(Re({},n),this.props)),e&&Re(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Wr(this))},xe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Wr(this))},xe.prototype.render=ee,pt=[],No=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hr=function(e,t){return e.__v.__b-t.__v.__b},Rn.__r=0,Lo=0;var je,K,Gr,Qo,It=0,Jo=[],jn=[],es=V.__b,ts=V.__r,ns=V.diffed,rs=V.__c,is=V.unmount;function ht(e,t){V.__h&&V.__h(K,e,It||t),It=0;var n=K.__H||(K.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:jn}),n.__[e]}function re(e){return It=1,Un(cs,e)}function Un(e,t,n){var r=ht(je++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):cs(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=K,!K.u)){var i=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!o||o.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!o||o.call(this,a,c,u))};K.u=!0;var o=K.shouldComponentUpdate,s=K.componentWillUpdate;K.componentWillUpdate=function(a,c,u){if(this.__e){var d=o;o=void 0,i(a,c,u),o=d}s&&s.call(this,a,c,u)},K.shouldComponentUpdate=i}return r.__N||r.__}function H(e,t){var n=ht(je++,3);!V.__s&&Zr(n.__H,t)&&(n.__=e,n.i=t,K.__H.__h.push(n))}function Pe(e,t){var n=ht(je++,4);!V.__s&&Zr(n.__H,t)&&(n.__=e,n.i=t,K.__h.push(n))}function B(e){return It=5,oe(function(){return{current:e}},[])}function os(e,t,n){It=6,Pe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function oe(e,t){var n=ht(je++,7);return Zr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return It=8,oe(function(){return e},t)}function fe(e){var t=K.context[e.__c],n=ht(je++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(K)),t.props.value):e.__}function ss(e,t){V.useDebugValue&&V.useDebugValue(t?t(e):e)}function Ql(e){var t=ht(je++,10),n=re();return t.__=e,K.componentDidCatch||(K.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function zn(){var e=ht(je++,11);if(!e.__){for(var t=K.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Jl(){for(var e;e=Jo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Hn),e.__H.__h.forEach(Yr),e.__H.__h=[]}catch(t){e.__H.__h=[],V.__e(t,e.__v)}}V.__b=function(e){K=null,es&&es(e)},V.__r=function(e){ts&&ts(e),je=0;var t=(K=e.__c).__H;t&&(Gr===K?(t.__h=[],K.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=jn,n.__N=n.i=void 0})):(t.__h.forEach(Hn),t.__h.forEach(Yr),t.__h=[],je=0)),Gr=K},V.diffed=function(e){ns&&ns(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Jo.push(t)!==1&&Qo===V.requestAnimationFrame||((Qo=V.requestAnimationFrame)||eu)(Jl)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==jn&&(n.__=n.__V),n.i=void 0,n.__V=jn})),Gr=K=null},V.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Hn),n.__h=n.__h.filter(function(r){return!r.__||Yr(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],V.__e(r,n.__v)}}),rs&&rs(e,t)},V.unmount=function(e){is&&is(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Hn(r)}catch(i){t=i}}),n.__H=void 0,t&&V.__e(t,n.__v))};var as=typeof requestAnimationFrame=="function";function eu(e){var t,n=function(){clearTimeout(r),as&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);as&&(t=requestAnimationFrame(n))}function Hn(e){var t=K,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),K=t}function Yr(e){var t=K;e.__c=e.__(),K=t}function Zr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function cs(e,t){return typeof t=="function"?t(e):t}function Wn(){throw new Error("Cycle detected")}var tu=Symbol.for("preact-signals");function Kn(){if(Ye>1)Ye--;else{for(var e,t=!1;on!==void 0;){var n=on;for(on=void 0,Xr++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&us(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(Xr=0,Ye--,t)throw e}}function nu(e){if(Ye>0)return e();Ye++;try{return e()}finally{Kn()}}var J=void 0,on=void 0,Ye=0,Xr=0,qn=0;function ls(e){if(J!==void 0){var t=e.n;if(t===void 0||t.t!==J)return t={i:0,S:e,p:J.s,n:void 0,t:J,e:void 0,x:void 0,r:t},J.s!==void 0&&(J.s.n=t),J.s=t,e.n=t,32&J.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=J.s,t.n=void 0,J.s.n=t,J.s=t),t}}function ce(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ce.prototype.brand=tu,ce.prototype.h=function(){return!0},ce.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},ce.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},ce.prototype.subscribe=function(e){var t=this;return Jr(function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}})},ce.prototype.valueOf=function(){return this.value},ce.prototype.toString=function(){return this.value+""},ce.prototype.toJSON=function(){return this.value},ce.prototype.peek=function(){return this.v},Object.defineProperty(ce.prototype,"value",{get:function(){var e=ls(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(J instanceof Ze&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Xr>100&&Wn(),this.v=e,this.i++,qn++,Ye++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Kn()}}}});function sn(e){return new ce(e)}function us(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ds(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function fs(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Ze(e){ce.call(this,void 0),this.x=e,this.s=void 0,this.g=qn-1,this.f=4}(Ze.prototype=new ce).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===qn))return!0;if(this.g=qn,this.f|=1,this.i>0&&!us(this))return this.f&=-2,!0;var e=J;try{ds(this),J=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return J=e,fs(this),this.f&=-2,!0},Ze.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ce.prototype.S.call(this,e)},Ze.prototype.U=function(e){if(this.t!==void 0&&(ce.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ze.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ze.prototype.peek=function(){if(this.h()||Wn(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ze.prototype,"value",{get:function(){1&this.f&&Wn();var e=ls(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ru(e){return new Ze(e)}function ps(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ye++;var n=J;J=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Qr(e),r}finally{J=n,Kn()}}}function Qr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ps(e)}function iu(e){if(J!==this)throw new Error("Out-of-order effect");fs(this),J=e,this.f&=-2,8&this.f&&Qr(this),Kn()}function an(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}an.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},an.prototype.S=function(){1&this.f&&Wn(),this.f|=1,this.f&=-9,ps(this),ds(this),Ye++;var e=J;return J=this,iu.bind(this,e)},an.prototype.N=function(){2&this.f||(this.f|=2,this.o=on,on=this)},an.prototype.d=function(){this.f|=8,1&this.f||Qr(this)};function Jr(e){var t=new an(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var ei;function Dt(e,t){V[e]=t.bind(null,V[e]||function(){})}function Gn(e){ei&&ei(),ei=e&&e.S()}function hs(e){var t=this,n=e.data,r=su(n);r.value=n;var i=oe(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Io(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},ru(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}hs.displayName="_st",Object.defineProperties(ce.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:hs},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Dt("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof ce&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)}),Dt("__r",function(e,t){Gn();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return Jr(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Gn(n),e(t)}),Dt("__e",function(e,t,n,r){Gn(),e(t,n,r)}),Dt("diffed",function(e,t){Gn();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in r)&&(a.d(),o[s]=void 0)}else n.U=o={};for(var c in r){var u=o[c],d=r[c];u===void 0?(u=ou(n,c,d,i),o[c]=u):u.o(d,i)}}}e(t)});function ou(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,o=sn(n);return{o:function(s,a){o.value=s,r=a},d:Jr(function(){var s=o.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}Dt("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),Dt("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),xe.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function su(e){return oe(function(){return sn(e)},[])}var au=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function Nt(e,t){if(!e)throw new Error(t)}function ti(e,t){return t in e}function be(){return be=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},be.apply(this,arguments)}function ms(e,t){for(var n in t)e[n]=t[n];return e}function ni(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function ri(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Yn(e){this.props=e}function vs(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:ni(this.props,i)}function r(i){return this.shouldComponentUpdate=n,M(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Yn.prototype=new xe).isPureReactComponent=!0,Yn.prototype.shouldComponentUpdate=function(e,t){return ni(this.props,e)||ni(this.state,t)};var gs=V.__b;V.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),gs&&gs(e)};var cu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function pe(e){function t(n){var r=ms({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=cu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ys=function(e,t){return e==null?null:Be(Be(e).map(t))},Te={map:ys,forEach:ys,count:function(e){return e?Be(e).length:0},only:function(e){var t=Be(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Be},lu=V.__e;V.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}lu(e,t,n,r)};var bs=V.unmount;function ws(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ms({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return ws(r,t,n)})),e}function _s(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return _s(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Lt(){this.__u=0,this.t=null,this.__b=null}function xs(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ii(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return M(n,o)}return i.displayName="Lazy",i.__f=!0,i}function Rt(){this.u=null,this.o=null}V.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),bs&&bs(e)},(Lt.prototype=new xe).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=xs(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 u=r.state.__a;r.__v.__k[0]=_s(u,u.__c.__P,u.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.t.pop();)d.forceUpdate()}},c=t.__h===!0;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Lt.prototype.componentWillUnmount=function(){this.t=[]},Lt.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]=ws(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&M(ee,null,e.fallback);return i&&(i.__h=null),[M(ee,null,t.__a?null:e.children),i]};var ks=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function uu(e){return this.getChildContext=function(){return e.context},e.children}function du(e){var t=this,n=e.i;t.componentWillUnmount=function(){Ft(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Ft(M(uu,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ss(e,t){var n=M(du,{__v:e,i:t});return n.containerInfo=t,n}(Rt.prototype=new xe).__a=function(e){var t=this,n=xs(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),ks(t,e,r)):i()};n?n(o):o()}},Rt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Be(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Rt.prototype.componentDidUpdate=Rt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ks(e,n,t)})};var Cs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,fu=/^(?: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]/,pu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,hu=/[A-Z0-9]/g,mu=typeof document<"u",vu=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function $s(e,t,n){return t.__k==null&&(t.textContent=""),Ft(e,t),typeof n=="function"&&n(),e?e.__c:null}function As(e,t,n){return Xo(e,t),typeof n=="function"&&n(),e?e.__c:null}xe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(xe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ps=V.event;function gu(){}function yu(){return this.cancelBubble}function bu(){return this.defaultPrevented}V.event=function(e){return Ps&&(e=Ps(e)),e.persist=gu,e.isPropagationStopped=yu,e.isDefaultPrevented=bu,e.nativeEvent=e};var oi,wu={enumerable:!1,configurable:!0,get:function(){return this.class}},Es=V.vnode;V.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={};for(var o in n){var s=n[o];if(!(o==="value"&&"defaultValue"in n&&s==null||mu&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var a=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===!0?s="":a==="ondoubleclick"?o="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||vu(n.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":pu.test(o)?o=a:r.indexOf("-")===-1&&fu.test(o)?o=o.replace(hu,"-$&").toLowerCase():s===null&&(s=void 0):a=o="oninput",a==="oninput"&&i[o=a]&&(o="oninputCapture"),i[o]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Be(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Be(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",wu)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=Cs,Es&&Es(e)};var Vs=V.__r;V.__r=function(e){Vs&&Vs(e),oi=e.__c};var Ts=V.diffed;V.diffed=function(e){Ts&&Ts(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),oi=null};var Os={ReactCurrentDispatcher:{current:{readContext:function(e){return oi.__n[e.__c].props.value}}}},_u="17.0.2";function Ms(e){return M.bind(null,e)}function Xe(e){return!!e&&e.$$typeof===Cs}function Qe(e){return Xe(e)?Xl.apply(null,arguments):e}function Fs(e){return!!e.__k&&(Ft(null,e),!0)}function Is(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ds=function(e,t){return e(t)},Zn=function(e,t){return e(t)},Ns=ee;function si(e){e()}function Ls(e){return e}function Rs(){return[!1,si]}var Xn=Pe;function Bs(e,t){var n=t(),r=re({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Pe(function(){i.__=n,i.v=t,ri(i.__,t())||o({h:i})},[e,n,t]),H(function(){return ri(i.__,i.v())||o({h:i}),e(function(){ri(i.__,i.v())||o({h:i})})},[e]),n}var Ee={useState:re,useId:zn,useReducer:Un,useEffect:H,useLayoutEffect:Pe,useInsertionEffect:Xn,useTransition:Rs,useDeferredValue:Ls,useSyncExternalStore:Bs,startTransition:si,useRef:B,useImperativeHandle:os,useMemo:oe,useCallback:ae,useContext:fe,useDebugValue:ss,version:"17.0.2",Children:Te,render:$s,hydrate:As,unmountComponentAtNode:Fs,createPortal:Ss,createElement:M,createContext:Ae,createFactory:Ms,cloneElement:Qe,createRef:jo,Fragment:ee,isValidElement:Xe,findDOMNode:Is,Component:xe,PureComponent:Yn,memo:vs,forwardRef:pe,flushSync:Zn,unstable_batchedUpdates:Ds,StrictMode:Ns,Suspense:Lt,SuspenseList:Rt,lazy:ii,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Os};const xu=Object.freeze(Object.defineProperty({__proto__:null,Children:Te,Component:xe,Fragment:ee,PureComponent:Yn,StrictMode:Ns,Suspense:Lt,SuspenseList:Rt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Os,cloneElement:Qe,createContext:Ae,createElement:M,createFactory:Ms,createPortal:Ss,createRef:jo,default:Ee,findDOMNode:Is,flushSync:Zn,forwardRef:pe,hydrate:As,isValidElement:Xe,lazy:ii,memo:vs,render:$s,startTransition:si,unmountComponentAtNode:Fs,unstable_batchedUpdates:Ds,useCallback:ae,useContext:fe,useDebugValue:ss,useDeferredValue:Ls,useEffect:H,useErrorBoundary:Ql,useId:zn,useImperativeHandle:os,useInsertionEffect:Xn,useLayoutEffect:Pe,useMemo:oe,useReducer:Un,useRef:B,useState:re,useSyncExternalStore:Bs,useTransition:Rs,version:_u},Symbol.toStringTag,{value:"Module"}));function Bt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function ku(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function js(...e){return t=>e.forEach(n=>ku(n,t))}function cn(...e){return ae(js(...e),e)}function Su(e,t=[]){let n=[];function r(o,s){const a=Ae(s),c=n.length;n=[...n,s];function u(l){const{scope:f,children:h,...p}=l,v=(f==null?void 0:f[e][c])||a,b=oe(()=>p,Object.values(p));return M(v.Provider,{value:b},h)}function d(l,f){const h=(f==null?void 0:f[e][c])||a,p=fe(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(s=>Ae(s));return function(a){const c=(a==null?void 0:a[e])||o;return oe(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Cu(i,...t)]}function Cu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(o)[`__scope${u}`];return{...a,...l}},{});return oe(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const ai=globalThis!=null&&globalThis.document?Pe:()=>{},$u=xu["useId".toString()]||(()=>{});let Au=0;function ci(e){const[t,n]=re($u());return ai(()=>{e||n(r=>r??String(Au++))},[e]),e||(t?`radix-${t}`:"")}function mt(e){const t=B(e);return H(()=>{t.current=e}),oe(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Pu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Eu({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=mt(n),c=ae(u=>{if(o){const l=typeof u=="function"?u(e):u;l!==e&&a(l)}else i(u)},[o,e,i,a]);return[s,c]}function Eu({defaultProp:e,onChange:t}){const n=re(e),[r]=n,i=B(r),o=mt(t);return H(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const li=pe((e,t)=>{const{children:n,...r}=e,i=Te.toArray(n),o=i.find(Tu);if(o){const s=o.props.children,a=i.map(c=>c===o?Te.count(s)>1?Te.only(null):Xe(s)?s.props.children:null:c);return M(ui,be({},r,{ref:t}),Xe(s)?Qe(s,void 0,a):null)}return M(ui,be({},r,{ref:t}),n)});li.displayName="Slot";const ui=pe((e,t)=>{const{children:n,...r}=e;return Xe(n)?Qe(n,{...Ou(r,n.props),ref:t?js(t,n.ref):n.ref}):Te.count(n)>1?Te.only(null):null});ui.displayName="SlotClone";const Vu=({children:e})=>M(ee,null,e);function Tu(e){return Xe(e)&&e.type===Vu}function Ou(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const di=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=pe((r,i)=>{const{asChild:o,...s}=r,a=o?li:t;return H(()=>{window[Symbol.for("radix-ui")]=!0},[]),M(a,be({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Mu(e,t){e&&Zn(()=>e.dispatchEvent(t))}function Fu(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e);H(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const fi="dismissableLayer.update",Iu="dismissableLayer.pointerDownOutside",Du="dismissableLayer.focusOutside";let Us;const Nu=Ae({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lu=pe((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,d=fe(Nu),[l,f]=re(null),h=(n=l==null?void 0:l.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,p]=re({}),v=cn(t,A=>f(A)),b=Array.from(d.layers),[k]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(k),_=l?b.indexOf(l):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,S=_>=y,N=Ru(A=>{const E=A.target,W=[...d.branches].some(Q=>Q.contains(E));!S||W||(o==null||o(A),a==null||a(A),A.defaultPrevented||c==null||c())},h),I=Bu(A=>{const E=A.target;[...d.branches].some(Q=>Q.contains(E))||(s==null||s(A),a==null||a(A),A.defaultPrevented||c==null||c())},h);return Fu(A=>{_===d.layers.size-1&&(i==null||i(A),!A.defaultPrevented&&c&&(A.preventDefault(),c()))},h),H(()=>{if(l)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Us=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),zs(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Us)}},[l,h,r,d]),H(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),zs())},[l,d]),H(()=>{const A=()=>p({});return document.addEventListener(fi,A),()=>document.removeEventListener(fi,A)},[]),M(di.div,be({},u,{ref:v,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:Bt(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Bt(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Bt(e.onPointerDownCapture,N.onPointerDownCapture)}))});function Ru(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e),r=B(!1),i=B(()=>{});return H(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){Hs(Iu,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Bu(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e),r=B(!1);return H(()=>{const i=o=>{o.target&&!r.current&&Hs(Du,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zs(){const e=new CustomEvent(fi);document.dispatchEvent(e)}function Hs(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Mu(i,o):i.dispatchEvent(o)}const pi="focusScope.autoFocusOnMount",hi="focusScope.autoFocusOnUnmount",Ws={bubbles:!1,cancelable:!0},ju=pe((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,c]=re(null),u=mt(i),d=mt(o),l=B(null),f=cn(t,v=>c(v)),h=B({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;H(()=>{if(r){let v=function(_){if(h.paused||!a)return;const C=_.target;a.contains(C)?l.current=C:Je(l.current,{select:!0})},b=function(_){if(h.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||Je(l.current,{select:!0}))},k=function(_){if(document.activeElement===document.body)for(const S of _)S.removedNodes.length>0&&Je(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const y=new MutationObserver(k);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,h.paused]),H(()=>{if(a){Gs.add(h);const v=document.activeElement;if(!a.contains(v)){const k=new CustomEvent(pi,Ws);a.addEventListener(pi,u),a.dispatchEvent(k),k.defaultPrevented||(Uu(qu(Ks(a)),{select:!0}),document.activeElement===v&&Je(a))}return()=>{a.removeEventListener(pi,u),setTimeout(()=>{const k=new CustomEvent(hi,Ws);a.addEventListener(hi,d),a.dispatchEvent(k),k.defaultPrevented||Je(v??document.body,{select:!0}),a.removeEventListener(hi,d),Gs.remove(h)},0)}}},[a,u,d,h]);const p=ae(v=>{if(!n&&!r||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,k=document.activeElement;if(b&&k){const y=v.currentTarget,[_,C]=zu(y);_&&C?!v.shiftKey&&k===C?(v.preventDefault(),n&&Je(_,{select:!0})):v.shiftKey&&k===_&&(v.preventDefault(),n&&Je(C,{select:!0})):k===y&&v.preventDefault()}},[n,r,h.paused]);return M(di.div,be({tabIndex:-1},s,{ref:f,onKeyDown:p}))});function Uu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Je(r,{select:t}),document.activeElement!==n)return}function zu(e){const t=Ks(e),n=qs(t,e),r=qs(t.reverse(),e);return[n,r]}function Ks(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qs(e,t){for(const n of e)if(!Hu(n,{upTo:t}))return n}function Hu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wu(e){return e instanceof HTMLInputElement&&"select"in e}function Je(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wu(e)&&t&&e.select()}}const Gs=Ku();function Ku(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ys(e,t),e.unshift(t)},remove(t){var n;e=Ys(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Ys(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qu(e){return e.filter(t=>t.tagName!=="A")}function Gu(e,t){return Un((n,r)=>{const i=t[n][r];return i??n},e)}const mi=e=>{const{present:t,children:n}=e,r=Yu(t),i=typeof n=="function"?n({present:r.isPresent}):Te.only(n),o=cn(r.ref,i.ref);return typeof n=="function"||r.isPresent?Qe(i,{ref:o}):null};mi.displayName="Presence";function Yu(e){const[t,n]=re(),r=B({}),i=B(e),o=B("none"),s=e?"mounted":"unmounted",[a,c]=Gu(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return H(()=>{const u=Qn(r.current);o.current=a==="mounted"?u:"none"},[a]),ai(()=>{const u=r.current,d=i.current;if(d!==e){const f=o.current,h=Qn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),ai(()=>{if(t){const u=l=>{const h=Qn(r.current).includes(l.animationName);l.target===t&&h&&Zn(()=>c("ANIMATION_END"))},d=l=>{l.target===t&&(o.current=Qn(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:ae(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Qn(e){return(e==null?void 0:e.animationName)||"none"}let vi=0;function Zu(){H(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Zs()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Zs()),vi++,()=>{vi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),vi--}},[])}function Zs(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Oe=function(){return Oe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Oe.apply(this,arguments)};function Xs(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Xu(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Jn="right-scroll-bar-position",er="width-before-scroll-bar",Qu="with-scroll-bars-hidden",Ju="--removed-body-scroll-bar-size";function ed(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function td(e,t){var n=re(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function nd(e,t){return td(t||null,function(n){return e.forEach(function(r){return ed(r,n)})})}function rd(e){return e}function id(e,t){t===void 0&&(t=rd);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var d=s;s=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return i}function od(e){e===void 0&&(e={});var t=id(null);return t.options=Oe({async:!0,ssr:!1},e),t}var Qs=function(e){var t=e.sideCar,n=Xs(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return M(r,Oe({},n))};Qs.isSideCarExport=!0;function sd(e,t){return e.useMedium(t),Qs}var Js=od(),gi=function(){},tr=pe(function(e,t){var n=B(null),r=re({onScrollCapture:gi,onWheelCapture:gi,onTouchMoveCapture:gi}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,v=e.allowPinchZoom,b=e.as,k=b===void 0?"div":b,y=Xs(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=f,C=nd([n,t]),S=Oe(Oe({},y),i);return M(ee,null,d&&M(_,{sideCar:Js,removeScrollBar:u,shards:l,noIsolation:h,inert:p,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),s?Qe(Te.only(a),Oe(Oe({},S),{ref:C})):M(k,Oe({},S,{className:c,ref:C}),a))});tr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tr.classNames={fullWidth:er,zeroRight:Jn};var ea,ad=function(){if(ea)return ea;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ad();return t&&e.setAttribute("nonce",t),e}function ld(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ud(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=cd())&&(ld(t,n),ud(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fd=function(){var e=dd();return function(t,n){H(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ta=function(){var e=fd(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},pd={left:0,top:0,right:0,gap:0},yi=function(e){return parseInt(e||"",10)||0},hd=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[yi(n),yi(r),yi(i)]},md=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pd;var t=hd(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},vd=ta(),gd=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(Qu,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(a,"px ").concat(r,`;
5
5
  }
@@ -7,8 +7,8 @@ var Cy=Object.defineProperty;var Ay=(Vt,Je,Ie)=>Je in Vt?Cy(Vt,Je,{enumerable:!0
7
7
  overflow: hidden `).concat(r,`;
8
8
  overscroll-behavior: contain;
9
9
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
- padding-left: `.concat(o,`px;
11
- padding-top: `).concat(i,`px;
10
+ padding-left: `.concat(i,`px;
11
+ padding-top: `).concat(o,`px;
12
12
  padding-right: `).concat(s,`px;
13
13
  margin-left:0;
14
14
  margin-top:0;
@@ -16,42 +16,38 @@ var Cy=Object.defineProperty;var Ay=(Vt,Je,Ie)=>Je in Vt?Cy(Vt,Je,{enumerable:!0
16
16
  `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
17
17
  }
18
18
 
19
- .`).concat(Ar,` {
19
+ .`).concat(Jn,` {
20
20
  right: `).concat(a,"px ").concat(r,`;
21
21
  }
22
22
 
23
- .`).concat(Pr,` {
23
+ .`).concat(er,` {
24
24
  margin-right: `).concat(a,"px ").concat(r,`;
25
25
  }
26
26
 
27
- .`).concat(Ar," .").concat(Ar,` {
27
+ .`).concat(Jn," .").concat(Jn,` {
28
28
  right: 0 `).concat(r,`;
29
29
  }
30
30
 
31
- .`).concat(Pr," .").concat(Pr,` {
31
+ .`).concat(er," .").concat(er,` {
32
32
  margin-right: 0 `).concat(r,`;
33
33
  }
34
34
 
35
35
  body {
36
- `).concat(fh,": ").concat(a,`px;
36
+ `).concat(Ju,": ").concat(a,`px;
37
37
  }
38
- `)},Eh=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=de(function(){return Ch(o)},[o]);return R(Ah,{styles:Ph(i,!t,o,n?"":"!important")})},li=!1;if(typeof window<"u")try{var Vr=Object.defineProperty({},"passive",{get:function(){return li=!0,!0}});window.addEventListener("test",Vr,Vr),window.removeEventListener("test",Vr,Vr)}catch{li=!1}var cn=li?{passive:!1}:!1,Vh=function(e){return e.tagName==="TEXTAREA"},yc=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Vh(e)&&n[t]==="visible")},Oh=function(e){return yc(e,"overflowY")},Lh=function(e){return yc(e,"overflowX")},wc=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_c(e,n);if(r){var o=xc(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Nh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Rh=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_c=function(e,t){return e==="v"?Oh(t):Lh(t)},xc=function(e,t){return e==="v"?Nh(t):Rh(t)},Ih=function(e,t){return e==="h"&&t==="rtl"?-1:1},Dh=function(e,t,n,r,o){var i=Ih(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,c=t.contains(a),u=!1,d=s>0,l=0,f=0;do{var h=xc(e,a),p=h[0],m=h[1],y=h[2],x=m-y-i*p;(p||x)&&_c(e,a)&&(l+=x,f+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(o&&l===0||!o&&s>l)||!d&&(o&&f===0||!o&&-s>f))&&(u=!0),u},Or=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kc=function(e){return[e.deltaX,e.deltaY]},$c=function(e){return e&&"current"in e?e.current:e},Fh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zh=function(e){return`
38
+ `)},yd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=oe(function(){return md(i)},[i]);return M(vd,{styles:gd(o,!t,i,n?"":"!important")})},bi=!1;if(typeof window<"u")try{var nr=Object.defineProperty({},"passive",{get:function(){return bi=!0,!0}});window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{bi=!1}var jt=bi?{passive:!1}:!1,bd=function(e){return e.tagName==="TEXTAREA"},na=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bd(e)&&n[t]==="visible")},wd=function(e){return na(e,"overflowY")},_d=function(e){return na(e,"overflowX")},ra=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=ia(e,n);if(r){var i=oa(e,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},xd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},kd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ia=function(e,t){return e==="v"?wd(t):_d(t)},oa=function(e,t){return e==="v"?xd(t):kd(t)},Sd=function(e,t){return e==="h"&&t==="rtl"?-1:1},Cd=function(e,t,n,r,i){var o=Sd(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,c=t.contains(a),u=!1,d=s>0,l=0,f=0;do{var h=oa(e,a),p=h[0],v=h[1],b=h[2],k=v-b-o*p;(p||k)&&ia(e,a)&&(l+=k,f+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(i&&l===0||!i&&s>l)||!d&&(i&&f===0||!i&&-s>f))&&(u=!0),u},rr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sa=function(e){return[e.deltaX,e.deltaY]},aa=function(e){return e&&"current"in e?e.current:e},$d=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ad=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},Bh=0,ln=[];function jh(e){var t=U([]),n=U([0,0]),r=U(),o=ce(Bh++)[0],i=ce(function(){return bc()})[0],s=U(e);G(function(){s.current=e},[e]),G(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=uh([e.lockRef.current],(e.shards||[]).map($c),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=me(function(m,y){if("touches"in m&&m.touches.length===2)return!s.current.allowPinchZoom;var x=Or(m),b=n.current,w="deltaX"in m?m.deltaX:b[0]-x[0],M="deltaY"in m?m.deltaY:b[1]-x[1],S,I=m.target,N=Math.abs(w)>Math.abs(M)?"h":"v";if("touches"in m&&N==="h"&&I.type==="range")return!1;var C=wc(N,I);if(!C)return!0;if(C?S=N:(S=N==="v"?"h":"v",C=wc(N,I)),!C)return!1;if(!r.current&&"changedTouches"in m&&(w||M)&&(r.current=S),!S)return!0;var E=r.current||S;return Dh(E,y,m,E==="h"?w:M,!0)},[]),c=me(function(m){var y=m;if(!(!ln.length||ln[ln.length-1]!==i)){var x="deltaY"in y?kc(y):Or(y),b=t.current.filter(function(S){return S.name===y.type&&S.target===y.target&&Fh(S.delta,x)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var w=(s.current.shards||[]).map($c).filter(Boolean).filter(function(S){return S.contains(y.target)}),M=w.length>0?a(y,w[0]):!s.current.noIsolation;M&&y.cancelable&&y.preventDefault()}}},[]),u=me(function(m,y,x,b){var w={name:m,delta:y,target:x,should:b};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(M){return M!==w})},1)},[]),d=me(function(m){n.current=Or(m),r.current=void 0},[]),l=me(function(m){u(m.type,kc(m),m.target,a(m,e.lockRef.current))},[]),f=me(function(m){u(m.type,Or(m),m.target,a(m,e.lockRef.current))},[]);G(function(){return ln.push(i),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:f}),document.addEventListener("wheel",c,cn),document.addEventListener("touchmove",c,cn),document.addEventListener("touchstart",d,cn),function(){ln=ln.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,cn),document.removeEventListener("touchmove",c,cn),document.removeEventListener("touchstart",d,cn)}},[]);var h=e.removeScrollBar,p=e.inert;return R(ae,null,p?R(i,{styles:zh(o)}):null,h?R(Eh,{gapMode:"margin"}):null)}const Hh=yh(vc,jh);var Sc=_e(function(e,t){return R(Er,He({},e,{ref:t,sideCar:Hh}))});Sc.classNames=Er.classNames;const Uh=Sc;var Xh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},un=new WeakMap,Lr=new WeakMap,Nr={},ui=0,Mc=function(e){return e&&(e.host||Mc(e.parentNode))},qh=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Mc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Wh=function(e,t,n,r){var o=qh(t,Array.isArray(e)?e:[e]);Nr[n]||(Nr[n]=new WeakMap);var i=Nr[n],s=[],a=new Set,c=new Set(o),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};o.forEach(u);var d=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(f){if(a.has(f))d(f);else{var h=f.getAttribute(r),p=h!==null&&h!=="false",m=(un.get(f)||0)+1,y=(i.get(f)||0)+1;un.set(f,m),i.set(f,y),s.push(f),m===1&&p&&Lr.set(f,!0),y===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}})};return d(t),a.clear(),ui++,function(){s.forEach(function(l){var f=un.get(l)-1,h=i.get(l)-1;un.set(l,f),i.set(l,h),f||(Lr.has(l)||l.removeAttribute(r),Lr.delete(l)),h||l.removeAttribute(n)}),ui--,ui||(un=new WeakMap,un=new WeakMap,Lr=new WeakMap,Nr={})}},Kh=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Xh(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Wh(r,o,n,"aria-hidden")):function(){return null}};const Tc="Dialog",[Cc,Ey]=If(Tc),[Yh,dn]=Cc(Tc),Gh=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=U(null),c=U(null),[u=!1,d]=Bf({prop:r,defaultProp:o,onChange:i});return R(Yh,{scope:t,triggerRef:a,contentRef:c,contentId:Jo(),titleId:Jo(),descriptionId:Jo(),open:u,onOpenChange:d,onOpenToggle:me(()=>d(l=>!l),[d]),modal:s},n)},Zh="DialogPortal",[Vy,Ac]=Cc(Zh,{forceMount:void 0}),di="DialogOverlay",Jh=_e((e,t)=>{const n=Ac(di,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=dn(di,e.__scopeDialog);return i.modal?R(ii,{present:r||i.open},R(Qh,Te({},o,{ref:t}))):null}),Qh=_e((e,t)=>{const{__scopeDialog:n,...r}=e,o=dn(di,n);return R(Uh,{as:Qo,allowPinchZoom:!0,shards:[o.contentRef]},R(ti.div,Te({"data-state":Ec(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Nn="DialogContent",ep=_e((e,t)=>{const n=Ac(Nn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=dn(Nn,e.__scopeDialog);return R(ii,{present:r||i.open},i.modal?R(tp,Te({},o,{ref:t})):R(np,Te({},o,{ref:t})))}),tp=_e((e,t)=>{const n=dn(Nn,e.__scopeDialog),r=U(null),o=Ln(t,n.contentRef,r);return G(()=>{const i=r.current;if(i)return Kh(i)},[]),R(Pc,Te({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:an(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:an(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:an(e.onFocusOutside,i=>i.preventDefault())}))}),np=_e((e,t)=>{const n=dn(Nn,e.__scopeDialog),r=U(!1),o=U(!1);return R(Pc,Te({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Pc=_e((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=dn(Nn,n),c=U(null),u=Ln(t,c);return lh(),R(ae,null,R(eh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},R(Zf,Te({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ec(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function Ec(e){return e?"open":"closed"}const rp=Gh,op=Jh,ip=ep,Vc=De({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Rr=De({}),fi=De(null),Ir=typeof document<"u",hi=Ir?Fe:G,pi=De({strict:!1});function sp(e,t,n,r){const{visualElement:o}=we(Rr),i=we(pi),s=we(fi),a=we(Vc).reducedMotion,c=U();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;Tr(()=>{u&&u.update(n,s)});const d=U(!!window.HandoffAppearAnimations);return hi(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),G(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),u}function Oc(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ap(e,t,n){return me(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Oc(n)&&(n.current=r))},[t])}function Rn(e){return typeof e=="string"||Array.isArray(e)}function Dr(e){return typeof e=="object"&&typeof e.start=="function"}const mi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vi=["initial",...mi];function Fr(e){return Dr(e.animate)||vi.some(t=>Rn(e[t]))}function Lc(e){return!!(Fr(e)||e.variants)}function cp(e,t){if(Fr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Rn(n)?n:void 0,animate:Rn(r)?r:void 0}}return e.inherit!==!1?t:{}}function lp(e){const{initial:t,animate:n}=cp(e,we(Rr));return de(()=>({initial:t,animate:n}),[Nc(t),Nc(n)])}function Nc(e){return Array.isArray(e)?e.join(" "):e}const Rc={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"]},In={};for(const e in Rc)In[e]={isEnabled:t=>Rc[e].some(n=>!!t[n])};function gi(e){for(const t in e)In[t]={...In[t],...e[t]}}const Ic=De({}),up=De({}),dp=Symbol.for("motionComponentSymbol");function fp({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&gi(e);function i(a,c){let u;const d={...we(Vc),...a,layoutId:hp(a)},{isStatic:l}=d,f=lp(a),h=r(a,l);if(!l&&Ir){f.visualElement=sp(o,h,d,t);const p=we(up),m=we(pi).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,m,e,p))}return R(Rr.Provider,{value:f},u&&f.visualElement?R(u,{visualElement:f.visualElement,...d}):null,n(o,a,ap(h,f.visualElement,c),h,l,f.visualElement))}const s=_e(i);return s[dp]=o,s}function hp({layoutId:e}){const t=we(Ic).id;return t&&e!==void 0?t+"-"+e:e}function pp(e){function t(r,o={}){return fp(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const mp=["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 bi(e){return typeof e!="string"||e.includes("-")?!1:!!(mp.indexOf(e)>-1||/[A-Z]/.test(e))}const vp={},Dn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rt=new Set(Dn);function Dc(e,{layout:t,layoutId:n}){return Rt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!vp[e]||e==="opacity")}const Ee=e=>!!(e&&e.getVelocity),gp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bp=Dn.length;function yp(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;s<bp;s++){const a=Dn[s];if(e[a]!==void 0){const c=gp[a]||a;i+=`${c}(${e[a]}) `}}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}const Fc=e=>t=>typeof t=="string"&&t.startsWith(e),zc=Fc("--"),yi=Fc("var(--"),wp=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,_p=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fn=(e,t,n)=>Math.min(Math.max(n,e),t),It={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fn={...It,transform:e=>fn(0,1,e)},zr={...It,default:1},zn=e=>Math.round(e*1e5)/1e5,Br=/(-)?([\d]*\.?[\d])+/g,Bc=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,xp=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Bn(e){return typeof e=="string"}const jn=e=>({test:t=>Bn(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gt=jn("deg"),hn=jn("%"),z=jn("px"),kp=jn("vh"),$p=jn("vw"),jc={...hn,parse:e=>hn.parse(e)/100,transform:e=>hn.transform(e*100)},Hc={...It,transform:Math.round},Uc={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,radius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,size:z,top:z,right:z,bottom:z,left:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:zr,scaleX:zr,scaleY:zr,scaleZ:zr,skew:gt,skewX:gt,skewY:gt,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:Fn,originX:jc,originY:jc,originZ:z,zIndex:Hc,fillOpacity:Fn,strokeOpacity:Fn,numOctaves:Hc};function wi(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let c=!1,u=!1,d=!0;for(const l in t){const f=t[l];if(zc(l)){i[l]=f;continue}const h=Uc[l],p=_p(f,h);if(Rt.has(l)){if(c=!0,s[l]=p,!d)continue;f!==(h.default||0)&&(d=!1)}else l.startsWith("origin")?(u=!0,a[l]=p):o[l]=p}if(t.transform||(c||r?o.transform=yp(e.transform,n,d,r):o.transform&&(o.transform="none")),u){const{originX:l="50%",originY:f="50%",originZ:h=0}=a;o.transformOrigin=`${l} ${f} ${h}`}}const _i=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Xc(e,t,n){for(const r in t)!Ee(t[r])&&!Dc(r,n)&&(e[r]=t[r])}function Sp({transformTemplate:e},t,n){return de(()=>{const r=_i();return wi(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Mp(e,t,n){const r=e.style||{},o={};return Xc(o,r,e),Object.assign(o,Sp(e,t,n)),e.transformValues?e.transformValues(o):o}function Tp(e,t,n){const r={},o=Mp(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const Cp=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function jr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Cp.has(e)}let qc=e=>!jr(e);function Ap(e){e&&(qc=t=>t.startsWith("on")?!jr(t):e(t))}try{Ap(require("@emotion/is-prop-valid").default)}catch{}function Pp(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(qc(o)||n===!0&&jr(o)||!t&&!jr(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Wc(e,t,n){return typeof e=="string"?e:z.transform(t+n*e)}function Ep(e,t,n){const r=Wc(t,e.x,e.width),o=Wc(n,e.y,e.height);return`${r} ${o}`}const Vp={offset:"stroke-dashoffset",array:"stroke-dasharray"},Op={offset:"strokeDashoffset",array:"strokeDasharray"};function Lp(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Vp:Op;e[i.offset]=z.transform(-r);const s=z.transform(t),a=z.transform(n);e[i.array]=`${s} ${a}`}function xi(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...u},d,l,f){if(wi(e,u,d,f),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(o!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=Ep(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&Lp(h,s,a,c,!1)}const Kc=()=>({..._i(),attrs:{}}),ki=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Np(e,t,n,r){const o=de(()=>{const i=Kc();return xi(i,t,{enableHardwareAcceleration:!1},ki(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Xc(i,e.style,e),o.style={...i,...o.style}}return o}function Rp(e=!1){return(n,r,o,{latestValues:i},s)=>{const c=(bi(n)?Np:Tp)(r,i,s,n),d={...Pp(r,typeof n=="string",e),...c,ref:o},{children:l}=r,f=de(()=>Ee(l)?l.get():l,[l]);return R(n,{...d,children:f})}}const $i=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Yc(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Gc=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 Zc(e,t,n,r){Yc(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Gc.has(o)?o:$i(o),t.attrs[o])}function Si(e,t){const{style:n}=e,r={};for(const o in n)(Ee(n[o])||t.style&&Ee(t.style[o])||Dc(o,e))&&(r[o]=n[o]);return r}function Jc(e,t){const n=Si(e,t);for(const r in e)if(Ee(e[r])||Ee(t[r])){const o=Dn.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function Mi(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function Qc(e){const t=U(null);return t.current===null&&(t.current=e()),t.current}const Hr=e=>Array.isArray(e),Ip=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Dp=e=>Hr(e)?e[e.length-1]||0:e;function Fp(e){const t=Ee(e)?e.get():e;return Ip(t)?t.toValue():t}function zp({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:Bp(r,o,i,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const el=e=>(t,n)=>{const r=we(Rr),o=we(fi),i=()=>zp(e,t,r,o);return n?i():Qc(i)};function Bp(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Fp(i[f]);let{initial:s,animate:a}=e;const c=Fr(e),u=Lc(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const l=d?a:s;return l&&typeof l!="boolean"&&!Dr(l)&&(Array.isArray(l)?l:[l]).forEach(h=>{const p=Mi(e,h);if(!p)return;const{transitionEnd:m,transition:y,...x}=p;for(const b in x){let w=x[b];if(Array.isArray(w)){const M=d?w.length-1:0;w=w[M]}w!==null&&(o[b]=w)}for(const b in m)o[b]=m[b]}),o}const xe=e=>e;class tl{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function jp(e){let t=new tl,n=new tl,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(c,u=!1,d=!1)=>{const l=d&&o,f=l?t:n;return u&&s.add(c),f.add(c)&&l&&o&&(r=t.order.length),c},cancel:c=>{n.remove(c),s.delete(c)},process:c=>{if(o){i=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u<r;u++){const d=t.order[u];d(c),s.has(d)&&(a.schedule(d),e())}o=!1,i&&(i=!1,a.process(c))}};return a}const Ur=["prepare","read","update","preRender","render","postRender"],Hp=40;function Up(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Ur.reduce((l,f)=>(l[f]=jp(()=>n=!0),l),{}),s=l=>i[l].process(o),a=()=>{const l=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(l-o.timestamp,Hp),1),o.timestamp=l,o.isProcessing=!0,Ur.forEach(s),o.isProcessing=!1,n&&t&&(r=!1,e(a))},c=()=>{n=!0,r=!0,o.isProcessing||e(a)};return{schedule:Ur.reduce((l,f)=>{const h=i[f];return l[f]=(p,m=!1,y=!1)=>(n||c(),h.schedule(p,m,y)),l},{}),cancel:l=>Ur.forEach(f=>i[f].cancel(l)),state:o,steps:i}}const{schedule:ke,cancel:Xr,state:Hn,steps:Oy}=Up(typeof requestAnimationFrame<"u"?requestAnimationFrame:xe,!0),Xp={useVisualState:el({scrapeMotionValuesFromProps:Jc,createRenderState:Kc,onMount:(e,t,{renderState:n,latestValues:r})=>{ke.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ke.render(()=>{xi(n,r,{enableHardwareAcceleration:!1},ki(t.tagName),e.transformTemplate),Zc(t,n)})}})},qp={useVisualState:el({scrapeMotionValuesFromProps:Si,createRenderState:_i})};function Wp(e,{forwardMotionProps:t=!1},n,r){return{...bi(e)?Xp:qp,preloadedFeatures:n,useRender:Rp(t),createVisualElement:r,Component:e}}function Dt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Kp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function nl(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Yp=e=>t=>Kp(t)&&e(t,nl(t));function qr(e,t,n,r){return Dt(e,t,Yp(n),r)}const Gp=(e,t)=>n=>t(e(n)),Ft=(...e)=>e.reduce(Gp);function rl(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const ol=rl("dragHorizontal"),il=rl("dragVertical");function Zp(e){let t=!1;if(e==="y")t=il();else if(e==="x")t=ol();else{const n=ol(),r=il();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function sl(){const e=Zp(!0);return e?(e(),!1):!0}class pn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function al(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(i,s)=>{if(i.type==="touch"||sl())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&ke.update(()=>a[r](i,s))};return qr(e.current,n,o,{passive:!e.getProps()[r]})}class Jp extends pn{mount(){this.unmount=Ft(al(this.node,!0),al(this.node,!1))}unmount(){}}class Qp extends pn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ft(Dt(this.node.current,"focus",()=>this.onFocus()),Dt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const cl=(e,t)=>t?e===t?!0:cl(e,t.parentElement):!1;function Ti(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,nl(n))}class e0 extends pn{constructor(){super(...arguments),this.removeStartListeners=xe,this.removeEndListeners=xe,this.removeAccessibleListeners=xe,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),i=qr(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();ke.update(()=>{cl(this.node.current,a.target)?u&&u(a,c):d&&d(a,c)})},{passive:!(r.onTap||r.onPointerUp)}),s=qr(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Ft(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ti("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&ke.update(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=Dt(this.node.current,"keyup",s),Ti("down",(a,c)=>{this.startPress(a,c)})},n=Dt(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ti("cancel",(i,s)=>this.cancelPress(i,s))},o=Dt(this.node.current,"blur",r);this.removeAccessibleListeners=Ft(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ke.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!sl()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ke.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=qr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Dt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ft(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ci=new WeakMap,Ai=new WeakMap,t0=e=>{const t=Ci.get(e.target);t&&t(e)},n0=e=>{e.forEach(t0)};function r0({root:e,...t}){const n=e||document;Ai.has(n)||Ai.set(n,{});const r=Ai.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(n0,{root:e,...t})),r[o]}function o0(e,t,n){const r=r0(t);return Ci.set(e,n),r.observe(e),()=>{Ci.delete(e),r.unobserve(e)}}const i0={some:0,all:1};class s0 extends pn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:i0[o]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:l}=this.node.getProps(),f=u?d:l;f&&f(c)};return o0(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(a0(t,n))&&this.startObserver()}unmount(){}}function a0({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const c0={inView:{Feature:s0},tap:{Feature:e0},focus:{Feature:Qp},hover:{Feature:Jp}};function ll(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 l0(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function u0(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Wr(e,t,n){const r=e.getProps();return Mi(r,t,n!==void 0?n:r.custom,l0(e),u0(e))}const d0="data-"+$i("framerAppearId");let Un=xe,Ue=xe;process.env.NODE_ENV!=="production"&&(Un=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ue=(e,t)=>{if(!e)throw new Error(t)});const zt=e=>e*1e3,bt=e=>e/1e3,f0={current:!1},ul=e=>Array.isArray(e)&&typeof e[0]=="number";function dl(e){return!!(!e||typeof e=="string"&&fl[e]||ul(e)||Array.isArray(e)&&e.every(dl))}const Xn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,fl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xn([0,.65,.55,1]),circOut:Xn([.55,0,1,.45]),backIn:Xn([.31,.01,.66,-.59]),backOut:Xn([.33,1.53,.69,.99])};function hl(e){if(e)return ul(e)?Xn(e):Array.isArray(e)?e.map(hl):fl[e]}function h0(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:s="loop",ease:a,times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=hl(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}function p0(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const pl=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,m0=1e-7,v0=12;function g0(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=pl(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>m0&&++a<v0);return s}function qn(e,t,n,r){if(e===t&&n===r)return xe;const o=i=>g0(i,0,1,e,n);return i=>i===0||i===1?i:pl(o(i),t,r)}const b0=qn(.42,0,1,1),y0=qn(0,0,.58,1),ml=qn(.42,0,.58,1),w0=e=>Array.isArray(e)&&typeof e[0]!="number",vl=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gl=e=>t=>1-e(1-t),bl=e=>1-Math.sin(Math.acos(e)),yl=gl(bl),_0=vl(yl),wl=qn(.33,1.53,.69,.99),Pi=gl(wl),x0=vl(Pi),_l={linear:xe,easeIn:b0,easeInOut:ml,easeOut:y0,circIn:bl,circInOut:_0,circOut:yl,backIn:Pi,backInOut:x0,backOut:wl,anticipate:e=>(e*=2)<1?.5*Pi(e):.5*(2-Math.pow(2,-10*(e-1)))},xl=e=>{if(Array.isArray(e)){Ue(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return qn(t,n,r,o)}else if(typeof e=="string")return Ue(_l[e]!==void 0,`Invalid easing type '${e}'`),_l[e];return e},Ei=(e,t)=>n=>!!(Bn(n)&&xp.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),kl=(e,t,n)=>r=>{if(!Bn(r))return r;const[o,i,s,a]=r.match(Br);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},k0=e=>fn(0,255,e),Vi={...It,transform:e=>Math.round(k0(e))},Bt={test:Ei("rgb","red"),parse:kl("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vi.transform(e)+", "+Vi.transform(t)+", "+Vi.transform(n)+", "+zn(Fn.transform(r))+")"};function $0(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Oi={test:Ei("#"),parse:$0,transform:Bt.transform},mn={test:Ei("hsl","hue"),parse:kl("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+hn.transform(zn(t))+", "+hn.transform(zn(n))+", "+zn(Fn.transform(r))+")"},Se={test:e=>Bt.test(e)||Oi.test(e)||mn.test(e),parse:e=>Bt.test(e)?Bt.parse(e):mn.test(e)?mn.parse(e):Oi.parse(e),transform:e=>Bn(e)?e:e.hasOwnProperty("red")?Bt.transform(e):mn.transform(e)},Kr=(e,t,n)=>-n*e+n*t+e;function Li(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function S0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;o=Li(c,a,e+1/3),i=Li(c,a,e),s=Li(c,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}const Ni=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},M0=[Oi,Bt,mn],T0=e=>M0.find(t=>t.test(e));function $l(e){const t=T0(e);Ue(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===mn&&(n=S0(n)),n}const Sl=(e,t)=>{const n=$l(e),r=$l(t),o={...n};return i=>(o.red=Ni(n.red,r.red,i),o.green=Ni(n.green,r.green,i),o.blue=Ni(n.blue,r.blue,i),o.alpha=Kr(n.alpha,r.alpha,i),Bt.transform(o))};function C0(e){var t,n;return isNaN(e)&&Bn(e)&&(((t=e.match(Br))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Bc))===null||n===void 0?void 0:n.length)||0)>0}const Ml={regex:wp,countKey:"Vars",token:"${v}",parse:xe},Tl={regex:Bc,countKey:"Colors",token:"${c}",parse:Se.parse},Cl={regex:Br,countKey:"Numbers",token:"${n}",parse:It.parse};function Ri(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function Yr(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ri(n,Ml),Ri(n,Tl),Ri(n,Cl),n}function Al(e){return Yr(e).values}function Pl(e){const{values:t,numColors:n,numVars:r,tokenised:o}=Yr(e),i=t.length;return s=>{let a=o;for(let c=0;c<i;c++)c<r?a=a.replace(Ml.token,s[c]):c<r+n?a=a.replace(Tl.token,Se.transform(s[c])):a=a.replace(Cl.token,zn(s[c]));return a}}const A0=e=>typeof e=="number"?0:e;function P0(e){const t=Al(e);return Pl(e)(t.map(A0))}const vn={test:C0,parse:Al,createTransformer:Pl,getAnimatableNone:P0},El=(e,t)=>n=>`${n>0?t:e}`;function Vl(e,t){return typeof e=="number"?n=>Kr(e,t,n):Se.test(e)?Sl(e,t):e.startsWith("var(")?El(e,t):Ll(e,t)}const Ol=(e,t)=>{const n=[...e],r=n.length,o=e.map((i,s)=>Vl(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}},E0=(e,t)=>{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Vl(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}},Ll=(e,t)=>{const n=vn.createTransformer(t),r=Yr(e),o=Yr(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?Ft(Ol(r.values,o.values),n):(Un(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),El(e,t))},Nl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Rl=(e,t)=>n=>Kr(e,t,n);function V0(e){return typeof e=="number"?Rl:typeof e=="string"?Se.test(e)?Sl:Ll:Array.isArray(e)?Ol:typeof e=="object"?E0:Rl}function O0(e,t,n){const r=[],o=n||V0(e[0]),i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||xe:t;a=Ft(c,a)}r.push(a)}return r}function Il(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ue(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=O0(t,r,o),a=s.length,c=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const l=Nl(e[d],e[d+1],u);return s[d](l)};return n?u=>c(fn(e[0],e[i-1],u)):c}function L0(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Nl(0,t,r);e.push(Kr(n,1,o))}}function N0(e){const t=[0];return L0(t,e.length-1),t}function R0(e,t){return e.map(n=>n*t)}function I0(e,t){return e.map(()=>t||ml).splice(0,e.length-1)}function Gr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=w0(r)?r.map(xl):xl(r),i={done:!1,value:t[0]},s=R0(n&&n.length===t.length?n:N0(t),e),a=Il(s,t,{ease:Array.isArray(o)?o:I0(t,o)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}function Dl(e,t){return t?e*(1e3/t):0}const D0=5;function Fl(e,t,n){const r=Math.max(t-D0,0);return Dl(n-e(r),t-r)}const Ii=.001,F0=.01,zl=10,z0=.05,B0=1;function j0({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Un(e<=zt(zl),"Spring duration must be 10 seconds or less");let s=1-t;s=fn(z0,B0,s),e=fn(F0,zl,bt(e)),s<1?(o=u=>{const d=u*s,l=d*e,f=d-n,h=Di(u,s),p=Math.exp(-l);return Ii-f/h*p},i=u=>{const l=u*s*e,f=l*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-l),m=Di(Math.pow(u,2),s);return(-o(u)+Ii>0?-1:1)*((f-h)*p)/m}):(o=u=>{const d=Math.exp(-u*e),l=(u-n)*e+1;return-Ii+d*l},i=u=>{const d=Math.exp(-u*e),l=(n-u)*(e*e);return d*l});const a=5/e,c=U0(o,i,a);if(e=zt(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const H0=12;function U0(e,t,n){let r=n;for(let o=1;o<H0;o++)r=r-e(r)/t(r);return r}function Di(e,t){return e*Math.sqrt(1-t*t)}const X0=["duration","bounce"],q0=["stiffness","damping","mass"];function Bl(e,t){return t.some(n=>e[n]!==void 0)}function W0(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Bl(e,q0)&&Bl(e,X0)){const n=j0(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function jl({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:c,mass:u,velocity:d,duration:l,isResolvedFromDuration:f}=W0(r),h=d?-bt(d):0,p=c/(2*Math.sqrt(a*u)),m=i-o,y=bt(Math.sqrt(a/u)),x=Math.abs(m)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let b;if(p<1){const w=Di(y,p);b=M=>{const S=Math.exp(-p*y*M);return i-S*((h+p*y*m)/w*Math.sin(w*M)+m*Math.cos(w*M))}}else if(p===1)b=w=>i-Math.exp(-y*w)*(m+(h+y*m)*w);else{const w=y*Math.sqrt(p*p-1);b=M=>{const S=Math.exp(-p*y*M),I=Math.min(w*M,300);return i-S*((h+p*y*m)*Math.sinh(I)+w*m*Math.cosh(I))/w}}return{calculatedDuration:f&&l||null,next:w=>{const M=b(w);if(f)s.done=w>=l;else{let S=h;w!==0&&(p<1?S=Fl(b,w,M):S=0);const I=Math.abs(S)<=n,N=Math.abs(i-M)<=t;s.done=I&&N}return s.value=s.done?i:M,s}}}function Hl({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:c,restDelta:u=.5,restSpeed:d}){const l=e[0],f={done:!1,value:l},h=C=>a!==void 0&&C<a||c!==void 0&&C>c,p=C=>a===void 0?c:c===void 0||Math.abs(a-C)<Math.abs(c-C)?a:c;let m=n*t;const y=l+m,x=s===void 0?y:s(y);x!==y&&(m=x-l);const b=C=>-m*Math.exp(-C/r),w=C=>x+b(C),M=C=>{const E=b(C),q=w(C);f.done=Math.abs(E)<=u,f.value=f.done?x:q};let S,I;const N=C=>{h(f.value)&&(S=C,I=jl({keyframes:[f.value,p(f.value)],velocity:Fl(w,C,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return N(0),{calculatedDuration:null,next:C=>{let E=!1;return!I&&S===void 0&&(E=!0,M(C),N(C)),S!==void 0&&C>S?I.next(C-S):(!E&&M(C),f)}}}const K0=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ke.update(t,!0),stop:()=>Xr(t),now:()=>Hn.isProcessing?Hn.timestamp:performance.now()}},Ul=2e4;function Xl(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ul;)t+=n,r=e.next(t);return t>=Ul?1/0:t}const Y0={decay:Hl,inertia:Hl,tween:Gr,keyframes:Gr,spring:jl};function Zr({autoplay:e=!0,delay:t=0,driver:n=K0,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:d,onUpdate:l,...f}){let h=1,p=!1,m,y;const x=()=>{y=new Promise(Y=>{m=Y})};x();let b;const w=Y0[o]||Gr;let M;w!==Gr&&typeof r[0]!="number"&&(M=Il([0,100],r,{clamp:!1}),r=[0,100]);const S=w({...f,keyframes:r});let I;a==="mirror"&&(I=w({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let N="idle",C=null,E=null,q=null;S.calculatedDuration===null&&i&&(S.calculatedDuration=Xl(S));const{calculatedDuration:K}=S;let j=1/0,B=1/0;K!==null&&(j=K+s,B=j*(i+1)-s);let H=0;const X=Y=>{if(E===null)return;h>0&&(E=Math.min(E,Y)),h<0&&(E=Math.min(Y-B/h,E)),C!==null?H=C:H=Math.round(Y-E)*h;const Re=H-t*(h>=0?1:-1),Pt=h>=0?Re<0:Re>B;H=Math.max(Re,0),N==="finished"&&C===null&&(H=B);let Et=H,Gt=S;if(i){const Zt=H/j;let Jt=Math.floor(Zt),dt=Zt%1;!dt&&Zt>=1&&(dt=1),dt===1&&Jt--,Jt=Math.min(Jt,i+1);const fr=!!(Jt%2);fr&&(a==="reverse"?(dt=1-dt,s&&(dt-=s/j)):a==="mirror"&&(Gt=I));let Oo=fn(0,1,dt);H>B&&(Oo=a==="reverse"&&fr?1:0),Et=Oo*j}const Ge=Pt?{done:!1,value:r[0]}:Gt.next(Et);M&&(Ge.value=M(Ge.value));let{done:Ze}=Ge;!Pt&&K!==null&&(Ze=h>=0?H>=B:H<=0);const Vo=C===null&&(N==="finished"||N==="running"&&Ze);return l&&l(Ge.value),Vo&&Le(),Ge},re=()=>{b&&b.stop(),b=void 0},se=()=>{N="idle",re(),m(),x(),E=q=null},Le=()=>{N="finished",d&&d(),re(),m()},Ne=()=>{if(p)return;b||(b=n(X));const Y=b.now();c&&c(),C!==null?E=Y-C:(!E||N==="finished")&&(E=Y),N==="finished"&&x(),q=E,C=null,N="running",b.start()};e&&Ne();const ut={then(Y,Re){return y.then(Y,Re)},get time(){return bt(H)},set time(Y){Y=zt(Y),H=Y,C!==null||!b||h===0?C=Y:E=b.now()-Y/h},get duration(){const Y=S.calculatedDuration===null?Xl(S):S.calculatedDuration;return bt(Y)},get speed(){return h},set speed(Y){Y===h||!b||(h=Y,ut.time=bt(H))},get state(){return N},play:Ne,pause:()=>{N="paused",C=H},stop:()=>{p=!0,N!=="idle"&&(N="idle",u&&u(),se())},cancel:()=>{q!==null&&X(q),se()},complete:()=>{N="finished"},sample:Y=>(E=0,X(Y))};return ut}function G0(e){let t;return()=>(t===void 0&&(t=e()),t)}const Z0=G0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),J0=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Jr=10,Q0=2e4,em=(e,t)=>t.type==="spring"||e==="backgroundColor"||!dl(t.ease);function tm(e,t,{onUpdate:n,onComplete:r,...o}){if(!(Z0()&&J0.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let s=!1,a,c;const u=()=>{c=new Promise(b=>{a=b})};u();let{keyframes:d,duration:l=300,ease:f,times:h}=o;if(em(t,o)){const b=Zr({...o,repeat:0,delay:0});let w={done:!1,value:d[0]};const M=[];let S=0;for(;!w.done&&S<Q0;)w=b.sample(S),M.push(w.value),S+=Jr;h=void 0,d=M,l=S-Jr,f="linear"}const p=h0(e.owner.current,t,d,{...o,duration:l,ease:f,times:h});o.syncStart&&(p.startTime=Hn.isProcessing?Hn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const m=()=>p.cancel(),y=()=>{ke.update(m),a(),u()};return p.onfinish=()=>{e.set(p0(d,o)),r&&r(),y()},{then(b,w){return c.then(b,w)},attachTimeline(b){return p.timeline=b,p.onfinish=null,xe},get time(){return bt(p.currentTime||0)},set time(b){p.currentTime=zt(b)},get speed(){return p.playbackRate},set speed(b){p.playbackRate=b},get duration(){return bt(l)},play:()=>{s||(p.play(),Xr(m))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:b}=p;if(b){const w=Zr({...o,autoplay:!1});e.setWithVelocity(w.sample(b-Jr).value,w.sample(b).value,Jr)}y()},complete:()=>p.finish(),cancel:y}}function nm({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:xe,pause:xe,stop:xe,then:i=>(i(),Promise.resolve()),cancel:xe,complete:xe});return t?Zr({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const rm={type:"spring",stiffness:500,damping:25,restSpeed:10},om=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),im={type:"keyframes",duration:.8},sm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},am=(e,{keyframes:t})=>t.length>2?im:Rt.has(e)?e.startsWith("scale")?om(t[1]):rm:sm,Fi=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(vn.test(t)||t==="0")&&!t.startsWith("url(")),cm=new Set(["brightness","contrast","saturate","opacity"]);function lm(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Br)||[];if(!r)return e;const o=n.replace(r,"");let i=cm.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const um=/([a-z-]*)\(.*?\)/g,zi={...vn,getAnimatableNone:e=>{const t=e.match(um);return t?t.map(lm).join(" "):e}},dm={...Uc,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:zi,WebkitFilter:zi},Bi=e=>dm[e];function ql(e,t){let n=Bi(e);return n!==zi&&(n=vn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Wl=e=>/^0[^.\s]+$/.test(e);function fm(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Wl(e)}function hm(e,t,n,r){const o=Fi(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const c=[];for(let u=0;u<i.length;u++)i[u]===null&&(i[u]=u===0?s:i[u-1]),fm(i[u])&&c.push(u),typeof i[u]=="string"&&i[u]!=="none"&&i[u]!=="0"&&(a=i[u]);if(o&&c.length&&a)for(let u=0;u<c.length;u++){const d=c[u];i[d]=ql(t,a)}return i}function pm({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}function mm(e,t){return e[t]||e.default||e}const vm=(e,t,n,r={})=>o=>{const i=mm(r,e)||{},s=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-zt(s);const c=hm(t,e,n,i),u=c[0],d=c[c.length-1],l=Fi(e,u),f=Fi(e,d);Un(l===f,`You are trying to animate ${e} from "${u}" to "${d}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${d} via the \`style\` property.`);let h={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:p=>{t.set(p),i.onUpdate&&i.onUpdate(p)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(pm(i)||(h={...h,...am(e,h)}),h.duration&&(h.duration=zt(h.duration)),h.repeatDelay&&(h.repeatDelay=zt(h.repeatDelay)),!l||!f||f0.current||i.type===!1)return nm(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=tm(t,e,h);if(p)return p}return Zr(h)};function Qr(e){return!!(Ee(e)&&e.add)}const Kl=e=>/^\-?\d*\.?\d+$/.test(e);function gm(e,t){e.indexOf(t)===-1&&e.push(t)}function bm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Yl{constructor(){this.subscriptions=[]}add(t){return gm(this.subscriptions,t),()=>bm(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Gl=new Set;function ji(e,t,n){e||Gl.has(t)||(console.warn(t),n&&console.warn(n),Gl.add(t))}const ym=e=>!isNaN(parseFloat(e));class wm{constructor(t,n={}){this.version="10.16.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:i,timestamp:s}=Hn;this.lastUpdated!==s&&(this.timeDelta=i,this.lastUpdated=s,ke.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ke.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=ym(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&ji(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Yl);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Dl(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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 Wn(e,t){return new wm(e,t)}const Zl=e=>t=>t.test(e),Jl=[It,z,hn,gt,$p,kp,{test:e=>e==="auto",parse:e=>e}],Kn=e=>Jl.find(Zl(e)),_m=[...Jl,Se,vn],xm=e=>_m.find(Zl(e));function km(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Wn(n))}function $m(e,t){const n=Wr(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const s in i){const a=Dp(i[s]);km(e,s,a)}}function Sm(e,t,n){var r,o;const i=Object.keys(t).filter(a=>!e.hasValue(a)),s=i.length;if(s)for(let a=0;a<s;a++){const c=i[a],u=t[c];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(o=(r=n[c])!==null&&r!==void 0?r:e.readValue(c))!==null&&o!==void 0?o:t[c]),d!=null&&(typeof d=="string"&&(Kl(d)||Wl(d))?d=parseFloat(d):!xm(d)&&vn.test(u)&&(d=ql(c,u)),e.addValue(c,Wn(d,{owner:e})),n[c]===void 0&&(n[c]=d),d!==null&&e.setBaseTarget(c,d))}}function Mm(e,t){return t?(t[e]||t.default||t).from:void 0}function Tm(e,t,n){const r={};for(const o in e){const i=Mm(o,t);if(i!==void 0)r[o]=i;else{const s=n.getValue(o);s&&(r[o]=s.get())}}return r}function Cm({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ql(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const l in a){const f=e.getValue(l),h=a[l];if(!f||h===void 0||d&&Cm(d,l))continue;const p={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!f.hasAnimated){const y=e.getProps()[d0];y&&(p.elapsed=window.HandoffAppearAnimations(y,l,f,ke),p.syncStart=!0)}f.start(vm(l,f,h,e.shouldReduceMotion&&Rt.has(l)?{type:!1}:p));const m=f.animation;Qr(c)&&(c.add(l),m.then(()=>c.remove(l))),u.push(m)}return s&&Promise.all(u).then(()=>{s&&$m(e,s)}),u}function Hi(e,t,n={}){const r=Wr(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Ql(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:l}=o;return Am(e,t,u+c,d,l,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[c,u]=a==="beforeChildren"?[i,s]:[s,i];return c().then(()=>u())}else return Promise.all([i(),s(n.delay)])}function Am(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(Pm).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Hi(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function Pm(e,t){return e.sortNodePosition(t)}function Em(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Hi(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Hi(e,t,n);else{const o=typeof t=="function"?Wr(e,t,n.custom):t;r=Promise.all(Ql(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Vm=[...mi].reverse(),Om=mi.length;function Lm(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Em(e,n,r)))}function Nm(e){let t=Lm(e);const n=Im();let r=!0;const o=(c,u)=>{const d=Wr(e,u);if(d){const{transition:l,transitionEnd:f,...h}=d;c={...c,...h,...f}}return c};function i(c){t=c(e)}function s(c,u){const d=e.getProps(),l=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},m=1/0;for(let x=0;x<Om;x++){const b=Vm[x],w=n[b],M=d[b]!==void 0?d[b]:l[b],S=Rn(M),I=b===u?w.isActive:null;I===!1&&(m=x);let N=M===l[b]&&M!==d[b]&&S;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),w.protectedKeys={...p},!w.isActive&&I===null||!M&&!w.prevProp||Dr(M)||typeof M=="boolean")continue;const C=Rm(w.prevProp,M);let E=C||b===u&&w.isActive&&!N&&S||x>m&&S;const q=Array.isArray(M)?M:[M];let K=q.reduce(o,{});I===!1&&(K={});const{prevResolvedValues:j={}}=w,B={...j,...K},H=X=>{E=!0,h.delete(X),w.needsAnimating[X]=!0};for(const X in B){const re=K[X],se=j[X];p.hasOwnProperty(X)||(re!==se?Hr(re)&&Hr(se)?!ll(re,se)||C?H(X):w.protectedKeys[X]=!0:re!==void 0?H(X):h.add(X):re!==void 0&&h.has(X)?H(X):w.protectedKeys[X]=!0)}w.prevProp=M,w.prevResolvedValues=K,w.isActive&&(p={...p,...K}),r&&e.blockInitialAnimation&&(E=!1),E&&!N&&f.push(...q.map(X=>({animation:X,options:{type:b,...c}})))}if(h.size){const x={};h.forEach(b=>{const w=e.getBaseTarget(b);w!==void 0&&(x[b]=w)}),f.push({animation:x})}let y=!!f.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function a(c,u,d){var l;if(n[c].isActive===u)return Promise.resolve();(l=e.variantChildren)===null||l===void 0||l.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=s(d,c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n}}function Rm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ll(t,e):!1}function jt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Im(){return{animate:jt(!0),whileInView:jt(),whileHover:jt(),whileTap:jt(),whileDrag:jt(),whileFocus:jt(),exit:jt()}}class Dm extends pn{constructor(t){super(t),t.animationState||(t.animationState=Nm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Dr(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Fm=0;class zm extends pn{constructor(){super(...arguments),this.id=Fm++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Bm={animation:{Feature:Dm},exit:{Feature:zm}},eu=()=>({min:0,max:0}),tu=()=>({x:eu(),y:eu()});function jm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Hm(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}}function Um(e,t){return jm(Hm(e.getBoundingClientRect(),t))}const Xm=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function qm(e){const t=Xm.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const Wm=4;function Ui(e,t,n=1){Ue(n<=Wm,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=qm(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Kl(s)?parseFloat(s):s}else return yi(o)?Ui(o,t,n+1):o}function Km(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const i=o.get();if(!yi(i))return;const s=Ui(i,r);s&&o.set(s)});for(const o in t){const i=t[o];if(!yi(i))continue;const s=Ui(i,r);s&&(t[o]=s,n||(n={}),n[o]===void 0&&(n[o]=i))}return{target:t,transitionEnd:n}}const Ym=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),nu=e=>Ym.has(e),Gm=e=>Object.keys(e).some(nu),eo=e=>e===It||e===z,ru=(e,t)=>parseFloat(e.split(", ")[t]),ou=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return ru(o[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?ru(i[1],e):0}},Zm=new Set(["x","y","z"]),Jm=Dn.filter(e=>!Zm.has(e));function Qm(e){const t=[];return Jm.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const gn={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)};gn.translateX=gn.x,gn.translateY=gn.y;const ev=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:s}=i,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=gn[u](r,i)}),t.render();const c=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=gn[u](c,i)}),e},tv=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(nu);let i=[],s=!1;const a=[];if(o.forEach(c=>{const u=e.getValue(c);if(!e.hasValue(c))return;let d=n[c],l=Kn(d);const f=t[c];let h;if(Hr(f)){const p=f.length,m=f[0]===null?1:0;d=f[m],l=Kn(d);for(let y=m;y<p&&f[y]!==null;y++)h?Ue(Kn(f[y])===h,"All keyframes must be of the same type"):(h=Kn(f[y]),Ue(h===l||eo(l)&&eo(h),"Keyframes must be of the same dimension as the current value"))}else h=Kn(f);if(l!==h)if(eo(l)&&eo(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?t[c]=parseFloat(f):Array.isArray(f)&&h===z&&(t[c]=f.map(parseFloat))}else l!=null&&l.transform&&(h!=null&&h.transform)&&(d===0||f===0)?d===0?u.set(h.transform(d)):t[c]=l.transform(f):(s||(i=Qm(e),s=!0),a.push(c),r[c]=r[c]!==void 0?r[c]:t[c],u.jump(f))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,u=ev(t,e,a);return i.length&&i.forEach(([d,l])=>{e.getValue(d).set(l)}),e.render(),Ir&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function nv(e,t,n,r){return Gm(t)?tv(e,t,n,r):{target:t,transitionEnd:r}}const rv=(e,t,n,r)=>{const o=Km(e,t,r);return t=o.target,r=o.transitionEnd,nv(e,t,n,r)},Xi={current:null},iu={current:!1};function ov(){if(iu.current=!0,!!Ir)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xi.current=e.matches;e.addListener(t),t()}else Xi.current=!1}function iv(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(Ee(i))e.addValue(o,i),Qr(r)&&r.add(o),process.env.NODE_ENV==="development"&&ji(i.version==="10.16.5",`Attempting to mix Framer Motion versions ${i.version} with 10.16.5 may not work as expected.`);else if(Ee(s))e.addValue(o,Wn(i,{owner:e})),Qr(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const a=e.getValue(o);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(o);e.addValue(o,Wn(a!==void 0?a:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const su=new WeakMap,au=Object.keys(In),sv=au.length,cu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],av=vi.length;class cv{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ke.render(this.render,!1,!0);const{latestValues:a,renderState:c}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.isControllingVariants=Fr(n),this.isVariantNode=Lc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const l in d){const f=d[l];a[l]!==void 0&&Ee(f)&&(f.set(a[l],!1),Qr(u)&&u.add(l))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,su.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),iu.current||ov(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xi.current,process.env.NODE_ENV!=="production"&&ji(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){su.delete(this.current),this.projection&&this.projection.unmount(),Xr(this.notifyUpdate),Xr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Rt.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ke.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,i){let s,a;if(process.env.NODE_ENV!=="production"&&o&&r){const c="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Un(!1,c):Ue(!1,c)}for(let c=0;c<sv;c++){const u=au[c],{isEnabled:d,Feature:l,ProjectionNode:f,MeasureLayout:h}=In[u];f&&(s=f),d(n)&&(!this.features[u]&&l&&(this.features[u]=new l(this)),h&&(a=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:u,drag:d,dragConstraints:l,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:!!d||l&&Oc(l),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,layoutScroll:f,layoutRoot:h})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):tu()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<cu.length;r++){const o=cu[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i=t["on"+o];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=iv(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<av;r++){const o=vi[r],i=this.props[o];(Rn(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Wn(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=Mi(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ee(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Yl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class lu extends cv{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},i){let s=Tm(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),s&&(s=o(s))),i){Sm(this,r,s);const a=rv(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function lv(e){return window.getComputedStyle(e)}class uv extends lu{readValueFromInstance(t,n){if(Rt.has(n)){const r=Bi(n);return r&&r.default||0}else{const r=lv(t),o=(zc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Um(t,n)}build(t,n,r,o){wi(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Si(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ee(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){Yc(t,n,r,o)}}class dv extends lu{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Rt.has(n)){const r=Bi(n);return r&&r.default||0}return n=Gc.has(n)?n:$i(n),t.getAttribute(n)}measureInstanceViewportBox(){return tu()}scrapeMotionValuesFromProps(t,n){return Jc(t,n)}build(t,n,r,o){xi(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){Zc(t,n,r,o)}mount(t){this.isSVGTag=ki(t.tagName),super.mount(t)}}const fv=(e,t)=>bi(e)?new dv(t,{enableHardwareAcceleration:!1}):new uv(t,{enableHardwareAcceleration:!0}),to=pp(Wp);function uu(){const e=U(!1);return hi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function hv(){const e=uu(),[t,n]=ce(0),r=me(()=>{e.current&&n(t+1)},[t]);return[me(()=>ke.postRender(r),[r]),t]}class pv extends Pe{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function mv({children:e,isPresent:t}){const n=yr(),r=U(null),o=U({width:0,height:0,top:0,left:0});return Tr(()=>{const{width:i,height:s,top:a,left:c}=o.current;if(t||!r.current||!i||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
41
+ `)},Pd=0,Ut=[];function Ed(e){var t=B([]),n=B([0,0]),r=B(),i=re(Pd++)[0],o=re(function(){return ta()})[0],s=B(e);H(function(){s.current=e},[e]),H(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Xu([e.lockRef.current],(e.shards||[]).map(aa),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=ae(function(v,b){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var k=rr(v),y=n.current,_="deltaX"in v?v.deltaX:y[0]-k[0],C="deltaY"in v?v.deltaY:y[1]-k[1],S,N=v.target,I=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in v&&I==="h"&&N.type==="range")return!1;var A=ra(I,N);if(!A)return!0;if(A?S=I:(S=I==="v"?"h":"v",A=ra(I,N)),!A)return!1;if(!r.current&&"changedTouches"in v&&(_||C)&&(r.current=S),!S)return!0;var E=r.current||S;return Cd(E,b,v,E==="h"?_:C,!0)},[]),c=ae(function(v){var b=v;if(!(!Ut.length||Ut[Ut.length-1]!==o)){var k="deltaY"in b?sa(b):rr(b),y=t.current.filter(function(S){return S.name===b.type&&S.target===b.target&&$d(S.delta,k)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var _=(s.current.shards||[]).map(aa).filter(Boolean).filter(function(S){return S.contains(b.target)}),C=_.length>0?a(b,_[0]):!s.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=ae(function(v,b,k,y){var _={name:v,delta:b,target:k,should:y};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),d=ae(function(v){n.current=rr(v),r.current=void 0},[]),l=ae(function(v){u(v.type,sa(v),v.target,a(v,e.lockRef.current))},[]),f=ae(function(v){u(v.type,rr(v),v.target,a(v,e.lockRef.current))},[]);H(function(){return Ut.push(o),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:f}),document.addEventListener("wheel",c,jt),document.addEventListener("touchmove",c,jt),document.addEventListener("touchstart",d,jt),function(){Ut=Ut.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,jt),document.removeEventListener("touchmove",c,jt),document.removeEventListener("touchstart",d,jt)}},[]);var h=e.removeScrollBar,p=e.inert;return M(ee,null,p?M(o,{styles:Ad(i)}):null,h?M(yd,{gapMode:"margin"}):null)}const Vd=sd(Js,Ed);var ca=pe(function(e,t){return M(tr,Oe({},e,{ref:t,sideCar:Vd}))});ca.classNames=tr.classNames;const Td=ca;var Od=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zt=new WeakMap,ir=new WeakMap,or={},wi=0,la=function(e){return e&&(e.host||la(e.parentNode))},Md=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=la(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Fd=function(e,t,n,r){var i=Md(t,Array.isArray(e)?e:[e]);or[n]||(or[n]=new WeakMap);var o=or[n],s=[],a=new Set,c=new Set(i),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};i.forEach(u);var d=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(f){if(a.has(f))d(f);else{var h=f.getAttribute(r),p=h!==null&&h!=="false",v=(zt.get(f)||0)+1,b=(o.get(f)||0)+1;zt.set(f,v),o.set(f,b),s.push(f),v===1&&p&&ir.set(f,!0),b===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}})};return d(t),a.clear(),wi++,function(){s.forEach(function(l){var f=zt.get(l)-1,h=o.get(l)-1;zt.set(l,f),o.set(l,h),f||(ir.has(l)||l.removeAttribute(r),ir.delete(l)),h||l.removeAttribute(n)}),wi--,wi||(zt=new WeakMap,zt=new WeakMap,ir=new WeakMap,or={})}},Id=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Od(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Fd(r,i,n,"aria-hidden")):function(){return null}};const ua="Dialog",[da,Dg]=Su(ua),[Dd,Ht]=da(ua),Nd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=B(null),c=B(null),[u=!1,d]=Pu({prop:r,defaultProp:i,onChange:o});return M(Dd,{scope:t,triggerRef:a,contentRef:c,contentId:ci(),titleId:ci(),descriptionId:ci(),open:u,onOpenChange:d,onOpenToggle:ae(()=>d(l=>!l),[d]),modal:s},n)},Ld="DialogPortal",[Ng,fa]=da(Ld,{forceMount:void 0}),_i="DialogOverlay",Rd=pe((e,t)=>{const n=fa(_i,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(_i,e.__scopeDialog);return o.modal?M(mi,{present:r||o.open},M(Bd,be({},i,{ref:t}))):null}),Bd=pe((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ht(_i,n);return M(Td,{as:li,allowPinchZoom:!0,shards:[i.contentRef]},M(di.div,be({"data-state":ha(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),ln="DialogContent",jd=pe((e,t)=>{const n=fa(ln,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(ln,e.__scopeDialog);return M(mi,{present:r||o.open},o.modal?M(Ud,be({},i,{ref:t})):M(zd,be({},i,{ref:t})))}),Ud=pe((e,t)=>{const n=Ht(ln,e.__scopeDialog),r=B(null),i=cn(t,n.contentRef,r);return H(()=>{const o=r.current;if(o)return Id(o)},[]),M(pa,be({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bt(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Bt(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Bt(e.onFocusOutside,o=>o.preventDefault())}))}),zd=pe((e,t)=>{const n=Ht(ln,e.__scopeDialog),r=B(!1),i=B(!1);return M(pa,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),pa=pe((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Ht(ln,n),c=B(null),u=cn(t,c);return Zu(),M(ee,null,M(ju,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},M(Lu,be({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ha(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function ha(e){return e?"open":"closed"}const Hd=Nd,Wd=Rd,Kd=jd,ma=Ae({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),sr=Ae({}),xi=Ae(null),ar=typeof document<"u",ki=ar?Pe:H,Si=Ae({strict:!1});function qd(e,t,n,r){const{visualElement:i}=fe(sr),o=fe(Si),s=fe(xi),a=fe(ma).reducedMotion,c=B();r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;Xn(()=>{u&&u.update(n,s)});const d=B(!!window.HandoffAppearAnimations);return ki(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),H(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),u}function va(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Gd(e,t,n){return ae(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):va(n)&&(n.current=r))},[t])}function un(e){return typeof e=="string"||Array.isArray(e)}function cr(e){return typeof e=="object"&&typeof e.start=="function"}const Ci=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$i=["initial",...Ci];function lr(e){return cr(e.animate)||$i.some(t=>un(e[t]))}function ga(e){return!!(lr(e)||e.variants)}function Yd(e,t){if(lr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||un(n)?n:void 0,animate:un(r)?r:void 0}}return e.inherit!==!1?t:{}}function Zd(e){const{initial:t,animate:n}=Yd(e,fe(sr));return oe(()=>({initial:t,animate:n}),[ya(t),ya(n)])}function ya(e){return Array.isArray(e)?e.join(" "):e}const ba={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"]},dn={};for(const e in ba)dn[e]={isEnabled:t=>ba[e].some(n=>!!t[n])};function Ai(e){for(const t in e)dn[t]={...dn[t],...e[t]}}const wa=Ae({}),Xd=Ae({}),Qd=Symbol.for("motionComponentSymbol");function Jd({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Ai(e);function o(a,c){let u;const d={...fe(ma),...a,layoutId:ef(a)},{isStatic:l}=d,f=Zd(a),h=r(a,l);if(!l&&ar){f.visualElement=qd(i,h,d,t);const p=fe(Xd),v=fe(Si).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,v,e,p))}return M(sr.Provider,{value:f},u&&f.visualElement?M(u,{visualElement:f.visualElement,...d}):null,n(i,a,Gd(h,f.visualElement,c),h,l,f.visualElement))}const s=pe(o);return s[Qd]=i,s}function ef({layoutId:e}){const t=fe(wa).id;return t&&e!==void 0?t+"-"+e:e}function tf(e){function t(r,i={}){return Jd(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const nf=["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 Pi(e){return typeof e!="string"||e.includes("-")?!1:!!(nf.indexOf(e)>-1||/[A-Z]/.test(e))}const rf={},fn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vt=new Set(fn);function _a(e,{layout:t,layoutId:n}){return vt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!rf[e]||e==="opacity")}const ke=e=>!!(e&&e.getVelocity),of={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sf=fn.length;function af(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<sf;s++){const a=fn[s];if(e[a]!==void 0){const c=of[a]||a;o+=`${c}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const xa=e=>t=>typeof t=="string"&&t.startsWith(e),ka=xa("--"),Ei=xa("var(--"),cf=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,lf=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wt=(e,t,n)=>Math.min(Math.max(n,e),t),gt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pn={...gt,transform:e=>Wt(0,1,e)},ur={...gt,default:1},hn=e=>Math.round(e*1e5)/1e5,dr=/(-)?([\d]*\.?[\d])+/g,Sa=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,uf=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function mn(e){return typeof e=="string"}const vn=e=>({test:t=>mn(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),et=vn("deg"),Kt=vn("%"),D=vn("px"),df=vn("vh"),ff=vn("vw"),Ca={...Kt,parse:e=>Kt.parse(e)/100,transform:e=>Kt.transform(e*100)},$a={...gt,transform:Math.round},Aa={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,size:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:ur,scaleX:ur,scaleY:ur,scaleZ:ur,skew:et,skewX:et,skewY:et,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:pn,originX:Ca,originY:Ca,originZ:D,zIndex:$a,fillOpacity:pn,strokeOpacity:pn,numOctaves:$a};function Vi(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let c=!1,u=!1,d=!0;for(const l in t){const f=t[l];if(ka(l)){o[l]=f;continue}const h=Aa[l],p=lf(f,h);if(vt.has(l)){if(c=!0,s[l]=p,!d)continue;f!==(h.default||0)&&(d=!1)}else l.startsWith("origin")?(u=!0,a[l]=p):i[l]=p}if(t.transform||(c||r?i.transform=af(e.transform,n,d,r):i.transform&&(i.transform="none")),u){const{originX:l="50%",originY:f="50%",originZ:h=0}=a;i.transformOrigin=`${l} ${f} ${h}`}}const Ti=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pa(e,t,n){for(const r in t)!ke(t[r])&&!_a(r,n)&&(e[r]=t[r])}function pf({transformTemplate:e},t,n){return oe(()=>{const r=Ti();return Vi(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function hf(e,t,n){const r=e.style||{},i={};return Pa(i,r,e),Object.assign(i,pf(e,t,n)),e.transformValues?e.transformValues(i):i}function mf(e,t,n){const r={},i=hf(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const vf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function fr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||vf.has(e)}let Ea=e=>!fr(e);function gf(e){e&&(Ea=t=>t.startsWith("on")?!fr(t):e(t))}try{gf(require("@emotion/is-prop-valid").default)}catch{}function yf(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Ea(i)||n===!0&&fr(i)||!t&&!fr(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Va(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function bf(e,t,n){const r=Va(t,e.x,e.width),i=Va(n,e.y,e.height);return`${r} ${i}`}const wf={offset:"stroke-dashoffset",array:"stroke-dasharray"},_f={offset:"strokeDashoffset",array:"strokeDasharray"};function xf(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?wf:_f;e[o.offset]=D.transform(-r);const s=D.transform(t),a=D.transform(n);e[o.array]=`${s} ${a}`}function Oi(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...u},d,l,f){if(Vi(e,u,d,f),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:v}=e;h.transform&&(v&&(p.transform=h.transform),delete h.transform),v&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=bf(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&xf(h,s,a,c,!1)}const Ta=()=>({...Ti(),attrs:{}}),Mi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function kf(e,t,n,r){const i=oe(()=>{const o=Ta();return Oi(o,t,{enableHardwareAcceleration:!1},Mi(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Pa(o,e.style,e),i.style={...o,...i.style}}return i}function Sf(e=!1){return(n,r,i,{latestValues:o},s)=>{const c=(Pi(n)?kf:mf)(r,o,s,n),d={...yf(r,typeof n=="string",e),...c,ref:i},{children:l}=r,f=oe(()=>ke(l)?l.get():l,[l]);return M(n,{...d,children:f})}}const Fi=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Oa(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 Ma=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 Fa(e,t,n,r){Oa(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Ma.has(i)?i:Fi(i),t.attrs[i])}function Ii(e,t){const{style:n}=e,r={};for(const i in n)(ke(n[i])||t.style&&ke(t.style[i])||_a(i,e))&&(r[i]=n[i]);return r}function Ia(e,t){const n=Ii(e,t);for(const r in e)if(ke(e[r])||ke(t[r])){const i=fn.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function Di(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function Da(e){const t=B(null);return t.current===null&&(t.current=e()),t.current}const pr=e=>Array.isArray(e),Cf=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),$f=e=>pr(e)?e[e.length-1]||0:e;function Af(e){const t=ke(e)?e.get():e;return Cf(t)?t.toValue():t}function Pf({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:Ef(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const Na=e=>(t,n)=>{const r=fe(sr),i=fe(xi),o=()=>Pf(e,t,r,i);return n?o():Da(o)};function Ef(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=Af(o[f]);let{initial:s,animate:a}=e;const c=lr(e),u=ga(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const l=d?a:s;return l&&typeof l!="boolean"&&!cr(l)&&(Array.isArray(l)?l:[l]).forEach(h=>{const p=Di(e,h);if(!p)return;const{transitionEnd:v,transition:b,...k}=p;for(const y in k){let _=k[y];if(Array.isArray(_)){const C=d?_.length-1:0;_=_[C]}_!==null&&(i[y]=_)}for(const y in v)i[y]=v[y]}),i}const he=e=>e;class La{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Vf(e){let t=new La,n=new La,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(c,u=!1,d=!1)=>{const l=d&&i,f=l?t:n;return u&&s.add(c),f.add(c)&&l&&i&&(r=t.order.length),c},cancel:c=>{n.remove(c),s.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u<r;u++){const d=t.order[u];d(c),s.has(d)&&(a.schedule(d),e())}i=!1,o&&(o=!1,a.process(c))}};return a}const hr=["prepare","read","update","preRender","render","postRender"],Tf=40;function Of(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=hr.reduce((l,f)=>(l[f]=Vf(()=>n=!0),l),{}),s=l=>o[l].process(i),a=()=>{const l=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(l-i.timestamp,Tf),1),i.timestamp=l,i.isProcessing=!0,hr.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(a))},c=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:hr.reduce((l,f)=>{const h=o[f];return l[f]=(p,v=!1,b=!1)=>(n||c(),h.schedule(p,v,b)),l},{}),cancel:l=>hr.forEach(f=>o[f].cancel(l)),state:i,steps:o}}const{schedule:me,cancel:mr,state:gn,steps:Lg}=Of(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0),Mf={useVisualState:Na({scrapeMotionValuesFromProps:Ia,createRenderState:Ta,onMount:(e,t,{renderState:n,latestValues:r})=>{me.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),me.render(()=>{Oi(n,r,{enableHardwareAcceleration:!1},Mi(t.tagName),e.transformTemplate),Fa(t,n)})}})},Ff={useVisualState:Na({scrapeMotionValuesFromProps:Ii,createRenderState:Ti})};function If(e,{forwardMotionProps:t=!1},n,r){return{...Pi(e)?Mf:Ff,preloadedFeatures:n,useRender:Sf(t),createVisualElement:r,Component:e}}function yt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Df=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ra(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Nf=e=>t=>Df(t)&&e(t,Ra(t));function vr(e,t,n,r){return yt(e,t,Nf(n),r)}const Lf=(e,t)=>n=>t(e(n)),bt=(...e)=>e.reduce(Lf);function Ba(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const ja=Ba("dragHorizontal"),Ua=Ba("dragVertical");function Rf(e){let t=!1;if(e==="y")t=Ua();else if(e==="x")t=ja();else{const n=ja(),r=Ua();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function za(){const e=Rf(!0);return e?(e(),!1):!0}class qt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ha(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||za())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&me.update(()=>a[r](o,s))};return vr(e.current,n,i,{passive:!e.getProps()[r]})}class Bf extends qt{mount(){this.unmount=bt(Ha(this.node,!0),Ha(this.node,!1))}unmount(){}}class jf extends qt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bt(yt(this.node.current,"focus",()=>this.onFocus()),yt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Wa=(e,t)=>t?e===t?!0:Wa(e,t.parentElement):!1;function Ni(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ra(n))}class Uf extends qt{constructor(){super(...arguments),this.removeStartListeners=he,this.removeEndListeners=he,this.removeAccessibleListeners=he,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=vr(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();me.update(()=>{Wa(this.node.current,a.target)?u&&u(a,c):d&&d(a,c)})},{passive:!(r.onTap||r.onPointerUp)}),s=vr(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=bt(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ni("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&me.update(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=yt(this.node.current,"keyup",s),Ni("down",(a,c)=>{this.startPress(a,c)})},n=yt(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ni("cancel",(o,s)=>this.cancelPress(o,s))},i=yt(this.node.current,"blur",r);this.removeAccessibleListeners=bt(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&me.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!za()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&me.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=vr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=yt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=bt(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Li=new WeakMap,Ri=new WeakMap,zf=e=>{const t=Li.get(e.target);t&&t(e)},Hf=e=>{e.forEach(zf)};function Wf({root:e,...t}){const n=e||document;Ri.has(n)||Ri.set(n,{});const r=Ri.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Hf,{root:e,...t})),r[i]}function Kf(e,t,n){const r=Wf(t);return Li.set(e,n),r.observe(e),()=>{Li.delete(e),r.unobserve(e)}}const qf={some:0,all:1};class Gf extends qt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:qf[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:l}=this.node.getProps(),f=u?d:l;f&&f(c)};return Kf(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Yf(t,n))&&this.startObserver()}unmount(){}}function Yf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Zf={inView:{Feature:Gf},tap:{Feature:Uf},focus:{Feature:jf},hover:{Feature:Bf}};function Ka(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 Xf(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Qf(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function gr(e,t,n){const r=e.getProps();return Di(r,t,n!==void 0?n:r.custom,Xf(e),Qf(e))}const Jf="data-"+Fi("framerAppearId");let yn=he,Me=he;process.env.NODE_ENV!=="production"&&(yn=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Me=(e,t)=>{if(!e)throw new Error(t)});const wt=e=>e*1e3,tt=e=>e/1e3,ep={current:!1},qa=e=>Array.isArray(e)&&typeof e[0]=="number";function Ga(e){return!!(!e||typeof e=="string"&&Ya[e]||qa(e)||Array.isArray(e)&&e.every(Ga))}const bn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ya={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bn([0,.65,.55,1]),circOut:bn([.55,0,1,.45]),backIn:bn([.31,.01,.66,-.59]),backOut:bn([.33,1.53,.69,.99])};function Za(e){if(e)return qa(e)?bn(e):Array.isArray(e)?e.map(Za):Ya[e]}function tp(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=Za(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function np(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Xa=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rp=1e-7,ip=12;function op(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=Xa(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>rp&&++a<ip);return s}function wn(e,t,n,r){if(e===t&&n===r)return he;const i=o=>op(o,0,1,e,n);return o=>o===0||o===1?o:Xa(i(o),t,r)}const sp=wn(.42,0,1,1),ap=wn(0,0,.58,1),Qa=wn(.42,0,.58,1),cp=e=>Array.isArray(e)&&typeof e[0]!="number",Ja=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ec=e=>t=>1-e(1-t),tc=e=>1-Math.sin(Math.acos(e)),nc=ec(tc),lp=Ja(nc),rc=wn(.33,1.53,.69,.99),Bi=ec(rc),up=Ja(Bi),ic={linear:he,easeIn:sp,easeInOut:Qa,easeOut:ap,circIn:tc,circInOut:lp,circOut:nc,backIn:Bi,backInOut:up,backOut:rc,anticipate:e=>(e*=2)<1?.5*Bi(e):.5*(2-Math.pow(2,-10*(e-1)))},oc=e=>{if(Array.isArray(e)){Me(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return wn(t,n,r,i)}else if(typeof e=="string")return Me(ic[e]!==void 0,`Invalid easing type '${e}'`),ic[e];return e},ji=(e,t)=>n=>!!(mn(n)&&uf.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),sc=(e,t,n)=>r=>{if(!mn(r))return r;const[i,o,s,a]=r.match(dr);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},dp=e=>Wt(0,255,e),Ui={...gt,transform:e=>Math.round(dp(e))},_t={test:ji("rgb","red"),parse:sc("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ui.transform(e)+", "+Ui.transform(t)+", "+Ui.transform(n)+", "+hn(pn.transform(r))+")"};function fp(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}}const zi={test:ji("#"),parse:fp,transform:_t.transform},Gt={test:ji("hsl","hue"),parse:sc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kt.transform(hn(t))+", "+Kt.transform(hn(n))+", "+hn(pn.transform(r))+")"},ge={test:e=>_t.test(e)||zi.test(e)||Gt.test(e),parse:e=>_t.test(e)?_t.parse(e):Gt.test(e)?Gt.parse(e):zi.parse(e),transform:e=>mn(e)?e:e.hasOwnProperty("red")?_t.transform(e):Gt.transform(e)},yr=(e,t,n)=>-n*e+n*t+e;function Hi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pp({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=Hi(c,a,e+1/3),o=Hi(c,a,e),s=Hi(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Wi=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},hp=[zi,_t,Gt],mp=e=>hp.find(t=>t.test(e));function ac(e){const t=mp(e);Me(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Gt&&(n=pp(n)),n}const cc=(e,t)=>{const n=ac(e),r=ac(t),i={...n};return o=>(i.red=Wi(n.red,r.red,o),i.green=Wi(n.green,r.green,o),i.blue=Wi(n.blue,r.blue,o),i.alpha=yr(n.alpha,r.alpha,o),_t.transform(i))};function vp(e){var t,n;return isNaN(e)&&mn(e)&&(((t=e.match(dr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Sa))===null||n===void 0?void 0:n.length)||0)>0}const lc={regex:cf,countKey:"Vars",token:"${v}",parse:he},uc={regex:Sa,countKey:"Colors",token:"${c}",parse:ge.parse},dc={regex:dr,countKey:"Numbers",token:"${n}",parse:gt.parse};function Ki(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function br(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ki(n,lc),Ki(n,uc),Ki(n,dc),n}function fc(e){return br(e).values}function pc(e){const{values:t,numColors:n,numVars:r,tokenised:i}=br(e),o=t.length;return s=>{let a=i;for(let c=0;c<o;c++)c<r?a=a.replace(lc.token,s[c]):c<r+n?a=a.replace(uc.token,ge.transform(s[c])):a=a.replace(dc.token,hn(s[c]));return a}}const gp=e=>typeof e=="number"?0:e;function yp(e){const t=fc(e);return pc(e)(t.map(gp))}const Yt={test:vp,parse:fc,createTransformer:pc,getAnimatableNone:yp},hc=(e,t)=>n=>`${n>0?t:e}`;function mc(e,t){return typeof e=="number"?n=>yr(e,t,n):ge.test(e)?cc(e,t):e.startsWith("var(")?hc(e,t):gc(e,t)}const vc=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>mc(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},bp=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=mc(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},gc=(e,t)=>{const n=Yt.createTransformer(t),r=br(e),i=br(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?bt(vc(r.values,i.values),n):(yn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),hc(e,t))},yc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},bc=(e,t)=>n=>yr(e,t,n);function wp(e){return typeof e=="number"?bc:typeof e=="string"?ge.test(e)?cc:gc:Array.isArray(e)?vc:typeof e=="object"?bp:bc}function _p(e,t,n){const r=[],i=n||wp(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||he:t;a=bt(c,a)}r.push(a)}return r}function wc(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Me(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=_p(t,r,i),a=s.length,c=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const l=yc(e[d],e[d+1],u);return s[d](l)};return n?u=>c(Wt(e[0],e[o-1],u)):c}function xp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=yc(0,t,r);e.push(yr(n,1,i))}}function kp(e){const t=[0];return xp(t,e.length-1),t}function Sp(e,t){return e.map(n=>n*t)}function Cp(e,t){return e.map(()=>t||Qa).splice(0,e.length-1)}function wr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=cp(r)?r.map(oc):oc(r),o={done:!1,value:t[0]},s=Sp(n&&n.length===t.length?n:kp(t),e),a=wc(s,t,{ease:Array.isArray(i)?i:Cp(t,i)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}function _c(e,t){return t?e*(1e3/t):0}const $p=5;function xc(e,t,n){const r=Math.max(t-$p,0);return _c(n-e(r),t-r)}const qi=.001,Ap=.01,kc=10,Pp=.05,Ep=1;function Vp({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yn(e<=wt(kc),"Spring duration must be 10 seconds or less");let s=1-t;s=Wt(Pp,Ep,s),e=Wt(Ap,kc,tt(e)),s<1?(i=u=>{const d=u*s,l=d*e,f=d-n,h=Gi(u,s),p=Math.exp(-l);return qi-f/h*p},o=u=>{const l=u*s*e,f=l*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-l),v=Gi(Math.pow(u,2),s);return(-i(u)+qi>0?-1:1)*((f-h)*p)/v}):(i=u=>{const d=Math.exp(-u*e),l=(u-n)*e+1;return-qi+d*l},o=u=>{const d=Math.exp(-u*e),l=(n-u)*(e*e);return d*l});const a=5/e,c=Op(i,o,a);if(e=wt(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const Tp=12;function Op(e,t,n){let r=n;for(let i=1;i<Tp;i++)r=r-e(r)/t(r);return r}function Gi(e,t){return e*Math.sqrt(1-t*t)}const Mp=["duration","bounce"],Fp=["stiffness","damping","mass"];function Sc(e,t){return t.some(n=>e[n]!==void 0)}function Ip(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Sc(e,Fp)&&Sc(e,Mp)){const n=Vp(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Cc({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:c,mass:u,velocity:d,duration:l,isResolvedFromDuration:f}=Ip(r),h=d?-tt(d):0,p=c/(2*Math.sqrt(a*u)),v=o-i,b=tt(Math.sqrt(a/u)),k=Math.abs(v)<5;n||(n=k?.01:2),t||(t=k?.005:.5);let y;if(p<1){const _=Gi(b,p);y=C=>{const S=Math.exp(-p*b*C);return o-S*((h+p*b*v)/_*Math.sin(_*C)+v*Math.cos(_*C))}}else if(p===1)y=_=>o-Math.exp(-b*_)*(v+(h+b*v)*_);else{const _=b*Math.sqrt(p*p-1);y=C=>{const S=Math.exp(-p*b*C),N=Math.min(_*C,300);return o-S*((h+p*b*v)*Math.sinh(N)+_*v*Math.cosh(N))/_}}return{calculatedDuration:f&&l||null,next:_=>{const C=y(_);if(f)s.done=_>=l;else{let S=h;_!==0&&(p<1?S=xc(y,_,C):S=0);const N=Math.abs(S)<=n,I=Math.abs(o-C)<=t;s.done=N&&I}return s.value=s.done?o:C,s}}}function $c({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:u=.5,restSpeed:d}){const l=e[0],f={done:!1,value:l},h=A=>a!==void 0&&A<a||c!==void 0&&A>c,p=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let v=n*t;const b=l+v,k=s===void 0?b:s(b);k!==b&&(v=k-l);const y=A=>-v*Math.exp(-A/r),_=A=>k+y(A),C=A=>{const E=y(A),W=_(A);f.done=Math.abs(E)<=u,f.value=f.done?k:W};let S,N;const I=A=>{h(f.value)&&(S=A,N=Cc({keyframes:[f.value,p(f.value)],velocity:xc(_,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return I(0),{calculatedDuration:null,next:A=>{let E=!1;return!N&&S===void 0&&(E=!0,C(A),I(A)),S!==void 0&&A>S?N.next(A-S):(!E&&C(A),f)}}}const Dp=e=>{const t=({timestamp:n})=>e(n);return{start:()=>me.update(t,!0),stop:()=>mr(t),now:()=>gn.isProcessing?gn.timestamp:performance.now()}},Ac=2e4;function Pc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ac;)t+=n,r=e.next(t);return t>=Ac?1/0:t}const Np={decay:$c,inertia:$c,tween:wr,keyframes:wr,spring:Cc};function _r({autoplay:e=!0,delay:t=0,driver:n=Dp,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:d,onUpdate:l,...f}){let h=1,p=!1,v,b;const k=()=>{b=new Promise(G=>{v=G})};k();let y;const _=Np[i]||wr;let C;_!==wr&&typeof r[0]!="number"&&(C=wc([0,100],r,{clamp:!1}),r=[0,100]);const S=_({...f,keyframes:r});let N;a==="mirror"&&(N=_({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let I="idle",A=null,E=null,W=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=Pc(S));const{calculatedDuration:Q}=S;let j=1/0,L=1/0;Q!==null&&(j=Q+s,L=j*(o+1)-s);let R=0;const U=G=>{if(E===null)return;h>0&&(E=Math.min(E,G)),h<0&&(E=Math.min(G-L/h,E)),A!==null?R=A:R=Math.round(G-E)*h;const dt=R-t*(h>=0?1:-1),Fn=h>=0?dt<0:dt>L;R=Math.max(dt,0),I==="finished"&&A===null&&(R=L);let Br=R,In=S;if(o){const Tt=R/j;let Ot=Math.floor(Tt),Ge=Tt%1;!Ge&&Tt>=1&&(Ge=1),Ge===1&&Ot--,Ot=Math.min(Ot,o+1);const Dn=!!(Ot%2);Dn&&(a==="reverse"?(Ge=1-Ge,s&&(Ge-=s/j)):a==="mirror"&&(In=N));let Ur=Wt(0,1,Ge);R>L&&(Ur=a==="reverse"&&Dn?1:0),Br=Ur*j}const Vt=Fn?{done:!1,value:r[0]}:In.next(Br);C&&(Vt.value=C(Vt.value));let{done:tn}=Vt;!Fn&&Q!==null&&(tn=h>=0?R>=L:R<=0);const jr=A===null&&(I==="finished"||I==="running"&&tn);return l&&l(Vt.value),jr&&qe(),Vt},ne=()=>{y&&y.stop(),y=void 0},de=()=>{I="idle",ne(),v(),k(),E=W=null},qe=()=>{I="finished",d&&d(),ne(),v()},ut=()=>{if(p)return;y||(y=n(U));const G=y.now();c&&c(),A!==null?E=G-A:(!E||I==="finished")&&(E=G),I==="finished"&&k(),W=E,A=null,I="running",y.start()};e&&ut();const Et={then(G,dt){return b.then(G,dt)},get time(){return tt(R)},set time(G){G=wt(G),R=G,A!==null||!y||h===0?A=G:E=y.now()-G/h},get duration(){const G=S.calculatedDuration===null?Pc(S):S.calculatedDuration;return tt(G)},get speed(){return h},set speed(G){G===h||!y||(h=G,Et.time=tt(R))},get state(){return I},play:ut,pause:()=>{I="paused",A=R},stop:()=>{p=!0,I!=="idle"&&(I="idle",u&&u(),de())},cancel:()=>{W!==null&&U(W),de()},complete:()=>{I="finished"},sample:G=>(E=0,U(G))};return Et}function Lp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Rp=Lp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Bp=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),xr=10,jp=2e4,Up=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Ga(t.ease);function zp(e,t,{onUpdate:n,onComplete:r,...i}){if(!(Rp()&&Bp.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,c;const u=()=>{c=new Promise(y=>{a=y})};u();let{keyframes:d,duration:l=300,ease:f,times:h}=i;if(Up(t,i)){const y=_r({...i,repeat:0,delay:0});let _={done:!1,value:d[0]};const C=[];let S=0;for(;!_.done&&S<jp;)_=y.sample(S),C.push(_.value),S+=xr;h=void 0,d=C,l=S-xr,f="linear"}const p=tp(e.owner.current,t,d,{...i,duration:l,ease:f,times:h});i.syncStart&&(p.startTime=gn.isProcessing?gn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const v=()=>p.cancel(),b=()=>{me.update(v),a(),u()};return p.onfinish=()=>{e.set(np(d,i)),r&&r(),b()},{then(y,_){return c.then(y,_)},attachTimeline(y){return p.timeline=y,p.onfinish=null,he},get time(){return tt(p.currentTime||0)},set time(y){p.currentTime=wt(y)},get speed(){return p.playbackRate},set speed(y){p.playbackRate=y},get duration(){return tt(l)},play:()=>{s||(p.play(),mr(v))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:y}=p;if(y){const _=_r({...i,autoplay:!1});e.setWithVelocity(_.sample(y-xr).value,_.sample(y).value,xr)}b()},complete:()=>p.finish(),cancel:b}}function Hp({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:he,pause:he,stop:he,then:o=>(o(),Promise.resolve()),cancel:he,complete:he});return t?_r({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Wp={type:"spring",stiffness:500,damping:25,restSpeed:10},Kp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qp={type:"keyframes",duration:.8},Gp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yp=(e,{keyframes:t})=>t.length>2?qp:vt.has(e)?e.startsWith("scale")?Kp(t[1]):Wp:Gp,Yi=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Yt.test(t)||t==="0")&&!t.startsWith("url(")),Zp=new Set(["brightness","contrast","saturate","opacity"]);function Xp(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(dr)||[];if(!r)return e;const i=n.replace(r,"");let o=Zp.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Qp=/([a-z-]*)\(.*?\)/g,Zi={...Yt,getAnimatableNone:e=>{const t=e.match(Qp);return t?t.map(Xp).join(" "):e}},Jp={...Aa,color:ge,backgroundColor:ge,outlineColor:ge,fill:ge,stroke:ge,borderColor:ge,borderTopColor:ge,borderRightColor:ge,borderBottomColor:ge,borderLeftColor:ge,filter:Zi,WebkitFilter:Zi},Xi=e=>Jp[e];function Ec(e,t){let n=Xi(e);return n!==Zi&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Vc=e=>/^0[^.\s]+$/.test(e);function eh(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Vc(e)}function th(e,t,n,r){const i=Yi(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const c=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),eh(o[u])&&c.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&c.length&&a)for(let u=0;u<c.length;u++){const d=c[u];o[d]=Ec(t,a)}return o}function nh({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}function rh(e,t){return e[t]||e.default||e}const ih=(e,t,n,r={})=>i=>{const o=rh(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-wt(s);const c=th(t,e,n,o),u=c[0],d=c[c.length-1],l=Yi(e,u),f=Yi(e,d);yn(l===f,`You are trying to animate ${e} from "${u}" to "${d}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${d} via the \`style\` property.`);let h={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(nh(o)||(h={...h,...Yp(e,h)}),h.duration&&(h.duration=wt(h.duration)),h.repeatDelay&&(h.repeatDelay=wt(h.repeatDelay)),!l||!f||ep.current||o.type===!1)return Hp(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=zp(t,e,h);if(p)return p}return _r(h)};function kr(e){return!!(ke(e)&&e.add)}const Tc=e=>/^\-?\d*\.?\d+$/.test(e);function oh(e,t){e.indexOf(t)===-1&&e.push(t)}function sh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Oc{constructor(){this.subscriptions=[]}add(t){return oh(this.subscriptions,t),()=>sh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Mc=new Set;function Qi(e,t,n){e||Mc.has(t)||(console.warn(t),n&&console.warn(n),Mc.add(t))}const ah=e=>!isNaN(parseFloat(e));class ch{constructor(t,n={}){this.version="10.16.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=gn;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,me.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>me.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=ah(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&Qi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Oc);const r=this.events[t].add(n);return t==="change"?()=>{r(),me.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?_c(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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 _n(e,t){return new ch(e,t)}const Fc=e=>t=>t.test(e),Ic=[gt,D,Kt,et,ff,df,{test:e=>e==="auto",parse:e=>e}],xn=e=>Ic.find(Fc(e)),lh=[...Ic,ge,Yt],uh=e=>lh.find(Fc(e));function dh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_n(n))}function fh(e,t){const n=gr(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=$f(o[s]);dh(e,s,a)}}function ph(e,t,n){var r,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const c=o[a],u=t[c];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(r=n[c])!==null&&r!==void 0?r:e.readValue(c))!==null&&i!==void 0?i:t[c]),d!=null&&(typeof d=="string"&&(Tc(d)||Vc(d))?d=parseFloat(d):!uh(d)&&Yt.test(u)&&(d=Ec(c,u)),e.addValue(c,_n(d,{owner:e})),n[c]===void 0&&(n[c]=d),d!==null&&e.setBaseTarget(c,d))}}function hh(e,t){return t?(t[e]||t.default||t).from:void 0}function mh(e,t,n){const r={};for(const i in e){const o=hh(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function vh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Dc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const l in a){const f=e.getValue(l),h=a[l];if(!f||h===void 0||d&&vh(d,l))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const b=e.getProps()[Jf];b&&(p.elapsed=window.HandoffAppearAnimations(b,l,f,me),p.syncStart=!0)}f.start(ih(l,f,h,e.shouldReduceMotion&&vt.has(l)?{type:!1}:p));const v=f.animation;kr(c)&&(c.add(l),v.then(()=>c.remove(l))),u.push(v)}return s&&Promise.all(u).then(()=>{s&&fh(e,s)}),u}function Ji(e,t,n={}){const r=gr(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Dc(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:l}=i;return gh(e,t,u+c,d,l,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,s]:[s,o];return c().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function gh(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,c=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(yh).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Ji(u,t,{...o,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function yh(e,t){return e.sortNodePosition(t)}function bh(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Ji(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Ji(e,t,n);else{const i=typeof t=="function"?gr(e,t,n.custom):t;r=Promise.all(Dc(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const wh=[...Ci].reverse(),_h=Ci.length;function xh(e){return t=>Promise.all(t.map(({animation:n,options:r})=>bh(e,n,r)))}function kh(e){let t=xh(e);const n=Ch();let r=!0;const i=(c,u)=>{const d=gr(e,u);if(d){const{transition:l,transitionEnd:f,...h}=d;c={...c,...h,...f}}return c};function o(c){t=c(e)}function s(c,u){const d=e.getProps(),l=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},v=1/0;for(let k=0;k<_h;k++){const y=wh[k],_=n[y],C=d[y]!==void 0?d[y]:l[y],S=un(C),N=y===u?_.isActive:null;N===!1&&(v=k);let I=C===l[y]&&C!==d[y]&&S;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),_.protectedKeys={...p},!_.isActive&&N===null||!C&&!_.prevProp||cr(C)||typeof C=="boolean")continue;const A=Sh(_.prevProp,C);let E=A||y===u&&_.isActive&&!I&&S||k>v&&S;const W=Array.isArray(C)?C:[C];let Q=W.reduce(i,{});N===!1&&(Q={});const{prevResolvedValues:j={}}=_,L={...j,...Q},R=U=>{E=!0,h.delete(U),_.needsAnimating[U]=!0};for(const U in L){const ne=Q[U],de=j[U];p.hasOwnProperty(U)||(ne!==de?pr(ne)&&pr(de)?!Ka(ne,de)||A?R(U):_.protectedKeys[U]=!0:ne!==void 0?R(U):h.add(U):ne!==void 0&&h.has(U)?R(U):_.protectedKeys[U]=!0)}_.prevProp=C,_.prevResolvedValues=Q,_.isActive&&(p={...p,...Q}),r&&e.blockInitialAnimation&&(E=!1),E&&!I&&f.push(...W.map(U=>({animation:U,options:{type:y,...c}})))}if(h.size){const k={};h.forEach(y=>{const _=e.getBaseTarget(y);_!==void 0&&(k[y]=_)}),f.push({animation:k})}let b=!!f.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(f):Promise.resolve()}function a(c,u,d){var l;if(n[c].isActive===u)return Promise.resolve();(l=e.variantChildren)===null||l===void 0||l.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=s(d,c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function Sh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ka(t,e):!1}function xt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ch(){return{animate:xt(!0),whileInView:xt(),whileHover:xt(),whileTap:xt(),whileDrag:xt(),whileFocus:xt(),exit:xt()}}class $h extends qt{constructor(t){super(t),t.animationState||(t.animationState=kh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),cr(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Ah=0;class Ph extends qt{constructor(){super(...arguments),this.id=Ah++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Eh={animation:{Feature:$h},exit:{Feature:Ph}},Nc=()=>({min:0,max:0}),Lc=()=>({x:Nc(),y:Nc()});function Vh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Th(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}}function Oh(e,t){return Vh(Th(e.getBoundingClientRect(),t))}const Mh=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Fh(e){const t=Mh.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const Ih=4;function eo(e,t,n=1){Me(n<=Ih,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=Fh(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return Tc(s)?parseFloat(s):s}else return Ei(i)?eo(i,t,n+1):i}function Dh(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!Ei(o))return;const s=eo(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!Ei(o))continue;const s=eo(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Nh=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Rc=e=>Nh.has(e),Lh=e=>Object.keys(e).some(Rc),Sr=e=>e===gt||e===D,Bc=(e,t)=>parseFloat(e.split(", ")[t]),jc=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Bc(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?Bc(o[1],e):0}},Rh=new Set(["x","y","z"]),Bh=fn.filter(e=>!Rh.has(e));function jh(e){const t=[];return Bh.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Zt={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:jc(4,13),y:jc(5,14)};Zt.translateX=Zt.x,Zt.translateY=Zt.y;const Uh=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=Zt[u](r,o)}),t.render();const c=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=Zt[u](c,o)}),e},zh=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Rc);let o=[],s=!1;const a=[];if(i.forEach(c=>{const u=e.getValue(c);if(!e.hasValue(c))return;let d=n[c],l=xn(d);const f=t[c];let h;if(pr(f)){const p=f.length,v=f[0]===null?1:0;d=f[v],l=xn(d);for(let b=v;b<p&&f[b]!==null;b++)h?Me(xn(f[b])===h,"All keyframes must be of the same type"):(h=xn(f[b]),Me(h===l||Sr(l)&&Sr(h),"Keyframes must be of the same dimension as the current value"))}else h=xn(f);if(l!==h)if(Sr(l)&&Sr(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?t[c]=parseFloat(f):Array.isArray(f)&&h===D&&(t[c]=f.map(parseFloat))}else l!=null&&l.transform&&(h!=null&&h.transform)&&(d===0||f===0)?d===0?u.set(h.transform(d)):t[c]=l.transform(f):(s||(o=jh(e),s=!0),a.push(c),r[c]=r[c]!==void 0?r[c]:t[c],u.jump(f))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,u=Uh(t,e,a);return o.length&&o.forEach(([d,l])=>{e.getValue(d).set(l)}),e.render(),ar&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Hh(e,t,n,r){return Lh(t)?zh(e,t,n,r):{target:t,transitionEnd:r}}const Wh=(e,t,n,r)=>{const i=Dh(e,t,r);return t=i.target,r=i.transitionEnd,Hh(e,t,n,r)},to={current:null},Uc={current:!1};function Kh(){if(Uc.current=!0,!!ar)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>to.current=e.matches;e.addListener(t),t()}else to.current=!1}function qh(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(ke(o))e.addValue(i,o),kr(r)&&r.add(i),process.env.NODE_ENV==="development"&&Qi(o.version==="10.16.5",`Attempting to mix Framer Motion versions ${o.version} with 10.16.5 may not work as expected.`);else if(ke(s))e.addValue(i,_n(o,{owner:e})),kr(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,_n(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const zc=new WeakMap,Hc=Object.keys(dn),Gh=Hc.length,Wc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Yh=$i.length;class Zh{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>me.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=lr(n),this.isVariantNode=ga(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const l in d){const f=d[l];a[l]!==void 0&&ke(f)&&(f.set(a[l],!1),kr(u)&&u.add(l))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,zc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Uc.current||Kh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:to.current,process.env.NODE_ENV!=="production"&&Qi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){zc.delete(this.current),this.projection&&this.projection.unmount(),mr(this.notifyUpdate),mr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=vt.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&me.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const c="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?yn(!1,c):Me(!1,c)}for(let c=0;c<Gh;c++){const u=Hc[c],{isEnabled:d,Feature:l,ProjectionNode:f,MeasureLayout:h}=dn[u];f&&(s=f),d(n)&&(!this.features[u]&&l&&(this.features[u]=new l(this)),h&&(a=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:u,drag:d,dragConstraints:l,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:!!d||l&&va(l),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lc()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Wc.length;r++){const i=Wc[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=qh(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<Yh;r++){const i=$i[r],o=this.props[i];(un(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=_n(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Di(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ke(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Oc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Kc extends Zh{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=mh(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){ph(this,r,s);const a=Wh(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function Xh(e){return window.getComputedStyle(e)}class Qh extends Kc{readValueFromInstance(t,n){if(vt.has(n)){const r=Xi(n);return r&&r.default||0}else{const r=Xh(t),i=(ka(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Oh(t,n)}build(t,n,r,i){Vi(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Ii(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ke(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Oa(t,n,r,i)}}class Jh extends Kc{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(vt.has(n)){const r=Xi(n);return r&&r.default||0}return n=Ma.has(n)?n:Fi(n),t.getAttribute(n)}measureInstanceViewportBox(){return Lc()}scrapeMotionValuesFromProps(t,n){return Ia(t,n)}build(t,n,r,i){Oi(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Fa(t,n,r,i)}mount(t){this.isSVGTag=Mi(t.tagName),super.mount(t)}}const em=(e,t)=>Pi(e)?new Jh(t,{enableHardwareAcceleration:!1}):new Qh(t,{enableHardwareAcceleration:!0}),Cr=tf(If);function qc(){const e=B(!1);return ki(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function tm(){const e=qc(),[t,n]=re(0),r=ae(()=>{e.current&&n(t+1)},[t]);return[ae(()=>me.postRender(r),[r]),t]}class nm extends xe{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function rm({children:e,isPresent:t}){const n=zn(),r=B(null),i=B({width:0,height:0,top:0,left:0});return Xn(()=>{const{width:o,height:s,top:a,left:c}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
42
42
  [data-motion-pop-id="${n}"] {
43
43
  position: absolute !important;
44
- width: ${i}px !important;
44
+ width: ${o}px !important;
45
45
  height: ${s}px !important;
46
46
  top: ${a}px !important;
47
47
  left: ${c}px !important;
48
48
  }
49
- `),()=>{document.head.removeChild(u)}},[t]),R(pv,{isPresent:t,childRef:r,sizeRef:o},mt(e,{ref:r}))}const qi=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Qc(vv),c=yr(),u=de(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:d=>{a.set(d,!0);for(const l of a.values())if(!l)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),i?void 0:[n]);return de(()=>{a.forEach((d,l)=>a.set(l,!1))},[n]),G(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=R(mv,{isPresent:n},e)),R(fi.Provider,{value:u},e)};function vv(){return new Map}function gv(e){return G(()=>()=>e(),[])}const Ht=e=>e.key||"";function bv(e,t){e.forEach(n=>{const r=Ht(n);t.set(r,n)})}function yv(e){const t=[];return je.forEach(e,n=>{pt(n)&&t.push(n)}),t}const Wi=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Ue(!o,"Replace exitBeforeEnter with mode='wait'");const a=we(Ic).forceRender||hv()[0],c=uu(),u=yv(e);let d=u;const l=U(new Map).current,f=U(d),h=U(new Map).current,p=U(!0);if(hi(()=>{p.current=!1,bv(u,h),f.current=d}),gv(()=>{p.current=!0,h.clear(),l.clear()}),p.current)return R(ae,null,d.map(b=>R(qi,{key:Ht(b),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s},b)));d=[...d];const m=f.current.map(Ht),y=u.map(Ht),x=m.length;for(let b=0;b<x;b++){const w=m[b];y.indexOf(w)===-1&&!l.has(w)&&l.set(w,void 0)}return s==="wait"&&l.size&&(d=[]),l.forEach((b,w)=>{if(y.indexOf(w)!==-1)return;const M=h.get(w);if(!M)return;const S=m.indexOf(w);let I=b;if(!I){const N=()=>{l.delete(w);const C=Array.from(h.keys()).filter(E=>!y.includes(E));if(C.forEach(E=>h.delete(E)),f.current=u.filter(E=>{const q=Ht(E);return q===w||C.includes(q)}),!l.size){if(c.current===!1)return;a(),r&&r()}};I=R(qi,{key:Ht(M),isPresent:!1,onExitComplete:N,custom:t,presenceAffectsLayout:i,mode:s},M),l.set(w,I)}d.splice(S,0,I)}),d=d.map(b=>{const w=b.key;return l.has(w)?b:R(qi,{key:Ht(b),isPresent:!0,presenceAffectsLayout:i,mode:s},b)}),process.env.NODE_ENV!=="production"&&s==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),R(ae,null,l.size?d:d.map(b=>mt(b)))};function wv({children:e,features:t,strict:n=!1}){const[,r]=ce(!Ki(t)),o=U(void 0);if(!Ki(t)){const{renderer:i,...s}=t;o.current=i,gi(s)}return G(()=>{Ki(t)&&t().then(({renderer:i,...s})=>{gi(s),o.current=i,r(!0)})},[]),R(pi.Provider,{value:{renderer:o.current,strict:n}},e)}function Ki(e){return typeof e=="function"}const _v={renderer:fv,...Bm,...c0},Ce=Symbol.for("@ts-pattern/matcher"),du=Symbol.for("@ts-pattern/isVariadic"),no="@ts-pattern/anonymous-select-key",Yi=e=>!!(e&&typeof e=="object"),ro=e=>e&&!!e[Ce],ge=(e,t,n)=>{if(ro(e)){const r=e[Ce](),{matched:o,selections:i}=r.match(t);return o&&i&&Object.keys(i).forEach(s=>n(s,i[s])),o}if(Yi(e)){if(!Yi(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],o=[],i=[];for(const s of e.keys()){const a=e[s];ro(a)&&a[du]?i.push(a):i.length?o.push(a):r.push(a)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+o.length)return!1;const s=t.slice(0,r.length),a=o.length===0?[]:t.slice(-o.length),c=t.slice(r.length,o.length===0?1/0:-o.length);return r.every((u,d)=>ge(u,s[d],n))&&o.every((u,d)=>ge(u,a[d],n))&&(i.length===0||ge(i[0],c,n))}return e.length===t.length&&e.every((s,a)=>ge(s,t[a],n))}return Object.keys(e).every(r=>{const o=e[r];return(r in t||ro(i=o)&&i[Ce]().matcherType==="optional")&&ge(o,t[r],n);var i})}return Object.is(t,e)},Ve=e=>{var t,n,r;return Yi(e)?ro(e)?(t=(n=(r=e[Ce]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?Yn(e,Ve):Yn(Object.values(e),Ve):[]},Yn=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function xv(...e){if(e.length===1){const[t]=e;return n=>ge(t,n,()=>{})}if(e.length===2){const[t,n]=e;return ge(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function $e(e){return Object.assign(e,{optional:()=>Zi(e),and:t=>ne(e,t),or:t=>fu(e,t),select:t=>t===void 0?Gn(e):Gn(t,e)})}function Gi(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[du]:!0})}}))(e),{optional:()=>Gi(Zi(e)),select:t=>Gi(t===void 0?Gn(e):Gn(t,e))})}function Zi(e){return $e({[Ce]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return t===void 0?(Ve(e).forEach(o=>r(o,void 0)),{matched:!0,selections:n}):{matched:ge(e,t,r),selections:n}},getSelectionKeys:()=>Ve(e),matcherType:"optional"})})}const kv=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},$v=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function ne(...e){return $e({[Ce]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return{matched:e.every(o=>ge(o,t,r)),selections:n}},getSelectionKeys:()=>Yn(e,Ve),matcherType:"and"})})}function fu(...e){return $e({[Ce]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return Yn(e,Ve).forEach(o=>r(o,void 0)),{matched:e.some(o=>ge(o,t,r)),selections:n}},getSelectionKeys:()=>Yn(e,Ve),matcherType:"or"})})}function W(e){return{[Ce]:()=>({match:t=>({matched:!!e(t)})})}}function Gn(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return $e({[Ce]:()=>({match:r=>{let o={[t??no]:r};return{matched:n===void 0||ge(n,r,(i,s)=>{o[i]=s}),selections:o}},getSelectionKeys:()=>[t??no].concat(n===void 0?[]:Ve(n))})})}function Xe(e){return typeof e=="number"}function Ut(e){return typeof e=="string"}function yt(e){return typeof e=="bigint"}const hu=$e(W(function(e){return!0})),Sv=hu,Xt=e=>Object.assign($e(e),{startsWith:t=>{return Xt(ne(e,(n=t,W(r=>Ut(r)&&r.startsWith(n)))));var n},endsWith:t=>{return Xt(ne(e,(n=t,W(r=>Ut(r)&&r.endsWith(n)))));var n},minLength:t=>Xt(ne(e,(n=>W(r=>Ut(r)&&r.length>=n))(t))),maxLength:t=>Xt(ne(e,(n=>W(r=>Ut(r)&&r.length<=n))(t))),includes:t=>{return Xt(ne(e,(n=t,W(r=>Ut(r)&&r.includes(n)))));var n},regex:t=>{return Xt(ne(e,(n=t,W(r=>Ut(r)&&!!r.match(n)))));var n}}),Mv=Xt(W(Ut)),qe=e=>Object.assign($e(e),{between:(t,n)=>qe(ne(e,((r,o)=>W(i=>Xe(i)&&r<=i&&o>=i))(t,n))),lt:t=>qe(ne(e,(n=>W(r=>Xe(r)&&r<n))(t))),gt:t=>qe(ne(e,(n=>W(r=>Xe(r)&&r>n))(t))),lte:t=>qe(ne(e,(n=>W(r=>Xe(r)&&r<=n))(t))),gte:t=>qe(ne(e,(n=>W(r=>Xe(r)&&r>=n))(t))),int:()=>qe(ne(e,W(t=>Xe(t)&&Number.isInteger(t)))),finite:()=>qe(ne(e,W(t=>Xe(t)&&Number.isFinite(t)))),positive:()=>qe(ne(e,W(t=>Xe(t)&&t>0))),negative:()=>qe(ne(e,W(t=>Xe(t)&&t<0)))}),Tv=qe(W(Xe)),wt=e=>Object.assign($e(e),{between:(t,n)=>wt(ne(e,((r,o)=>W(i=>yt(i)&&r<=i&&o>=i))(t,n))),lt:t=>wt(ne(e,(n=>W(r=>yt(r)&&r<n))(t))),gt:t=>wt(ne(e,(n=>W(r=>yt(r)&&r>n))(t))),lte:t=>wt(ne(e,(n=>W(r=>yt(r)&&r<=n))(t))),gte:t=>wt(ne(e,(n=>W(r=>yt(r)&&r>=n))(t))),positive:()=>wt(ne(e,W(t=>yt(t)&&t>0))),negative:()=>wt(ne(e,W(t=>yt(t)&&t<0)))}),Cv=wt(W(yt)),Av=$e(W(function(e){return typeof e=="boolean"})),Pv=$e(W(function(e){return typeof e=="symbol"})),Ev=$e(W(function(e){return e==null}));var Ae={__proto__:null,matcher:Ce,optional:Zi,array:function(...e){return Gi({[Ce]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const n=e[0];let r={};if(t.length===0)return Ve(n).forEach(i=>{r[i]=[]}),{matched:!0,selections:r};const o=(i,s)=>{r[i]=(r[i]||[]).concat([s])};return{matched:t.every(i=>ge(n,i,o)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Ve(e[0])})})},set:function(...e){return $e({[Ce]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};const r=(i,s)=>{n[i]=(n[i]||[]).concat([s])},o=e[0];return{matched:kv(t,i=>ge(o,i,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ve(e[0])})})},map:function(...e){return $e({[Ce]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(a,c)=>{n[a]=(n[a]||[]).concat([c])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,s]=e;return{matched:$v(t,(a,c)=>{const u=ge(i,c,r),d=ge(s,a,r);return u&&d}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Ve(e[0]),...Ve(e[1])]})})},intersection:ne,union:fu,not:function(e){return $e({[Ce]:()=>({match:t=>({matched:!ge(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:W,select:Gn,any:hu,_:Sv,string:Mv,number:Tv,bigint:Cv,boolean:Av,symbol:Pv,nullish:Ev,instanceOf:function(e){return $e(W(function(t){return n=>n instanceof t}(e)))},shape:function(e){return $e(W(xv(e)))}};const Ji={matched:!1,value:void 0};function nt(e){return new oo(e,Ji)}class oo{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let i=!1,s={};const a=(u,d)=>{i=!0,s[u]=d},c=!r.some(u=>ge(u,this.input,a))||o&&!o(this.input)?Ji:{matched:!0,value:n(i?no in s?s[no]:s:this.input,this.input)};return new oo(this.input,c)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new oo(this.input,r?{matched:!0,value:n(this.input,this.input)}:Ji)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}}const Vv="isdk",Qi=44,Ov={not_in_local_storage:"Application not found in local storage",invalid_end_node:"Unexpected node type to finish flow",no_submissions:"Application ended without any fields submitted",invalid_state:"Invalid state"};function es(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function pu(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=es(n);return(o,i)=>r.then(s=>i(s.transaction(t,o).objectStore(t)))}let ts;function mu(){return ts||(ts=pu("keyval-store","keyval")),ts}function Lv(e,t=mu()){return t("readonly",n=>es(n.get(e)))}function Nv(e,t,n=mu()){return n("readwrite",r=>(r.put(t,e),es(r.transaction)))}const vu=typeof window>"u"?void 0:pu("inploi","applications"),Zn={getApplicationData:async e=>{const t=gu(e);return await Lv(t,vu)},setApplicationData:async e=>{const t=gu(e.application);return await Nv(t,e.data,vu)}},gu=e=>[e.job.id,e.flow.id,e.flow.version].join("/"),rt=Vn("maximised"),ns=Vn(53),_t=Vn({state:"idle"}),Jn=e=>{const{state:t,application:n}=_t.value;if(t!=="loaded")return;rn(n,"No application to update");const r=e(n.data),o={...n,data:r};_t.value={state:t,application:o},Zn.setApplicationData({application:n,data:r})},ee={current$:_t,start:async e=>{const t=await Zn.getApplicationData(e)??bu();_t.value={state:"loaded",application:{...e,data:t,startedAt:new Date}},Zn.setApplicationData({application:e,data:t})},cancel:()=>{_t.value={state:"idle"}},markAsFinished:()=>Jn(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Jn(t=>({...t,currentNodeId:e})),restart:()=>{const{state:e,application:t}=_t.value;if(e!=="loaded")throw new Error("Application cannot be restarted: not in valid state");const n=bu();_t.value={state:e,application:{...t,data:n,startedAt:new Date}},Zn.setApplicationData({application:t,data:n})},addMessage:(e,t)=>{const n={...e,groupId:t};return Jn(r=>({...r,messages:[...r.messages,n]}))},removeLastGroupMessagesById:e=>{var i;const{state:t,application:n}=_t.value;rn(t==="loaded","Application not loaded");const r=[...n.data.messages];let o=r.length-1;for(;o>=0&&r[o]&&((i=r[o])==null?void 0:i.groupId)===e;)r.pop(),o--;n.data.messages=r,Zn.setApplicationData({application:n,data:n.data})},setSubmission:(e,t)=>Jn(n=>{const r={...n.submissions};return t===null?delete r[e]:r[e]=t,{...n,submissions:r}}),setInput:e=>Jn(t=>({...t,currentInput:e}))},bu=()=>({messages:[],submissions:{},currentNodeId:null,isFinished:!1,sequence:0,flowSessionId:crypto.randomUUID()});var Rv=0;function g(e,t,n,r,o,i){var s,a,c={};for(a in t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Rv,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return V.vnode&&V.vnode(u),u}const Iv=({message:e})=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:[g("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[g("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),g("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),g("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),g("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),g("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),g("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),g("path",{d:"M38 56h19"})]}),g("div",{class:"flex flex-col gap-2 text-center",children:[g("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&g("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Dv=e=>g("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[g("title",{children:"Loading"}),g("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),g("g",{id:"s1",transform:"translate(12,0)",children:g("g",{id:"s2",transform:"scale(0,0)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s3",transform:"translate(12,12)",children:g("g",{id:"s4",transform:"scale(1,1)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s5",transform:"translate(12,0)",children:g("g",{id:"s6",transform:"scale(0,0)",children:g("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),g("g",{id:"s7",transform:"translate(12,0)",children:g("g",{id:"s8",transform:"scale(0,0)",children:g("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),yu=()=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:g(Dv,{class:"text-neutral-4 h-8 w-8"})});function wu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=wu(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function xt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=wu(e))&&(r&&(r+=" "),r+=t);return r}const io=({class:e,children:t,...n})=>g("button",{class:xt("touch-hitbox text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-neutral-12/5 active:bg-neutral-12/10 fr relative rounded-full p-2 transition-all",e),...n,children:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),Fv=({children:e})=>{const t=rt.value;return g("header",{class:"ring-neutral-12/5 bg-neutral-1/90 absolute left-0 right-0 top-0 z-20 mx-auto flex h-[var(--header-height)] items-center gap-2 ring-1 backdrop-blur-md backdrop-saturate-150",children:[g("p",{id:"chatbot-header",class:"sr-only",children:e}),g("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t==="minimised"?rt.value="maximised":rt.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:g("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),g("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:rt.value==="minimised"?g(ae,{children:[g(io,{"aria-label":"Maximise job application",onClick:()=>rt.value="maximised",children:g("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),g(io,{"aria-label":"Close application",onClick:ee.cancel,children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):g(ae,{children:[ee.current$.value.state==="loaded"&&g(io,{"aria-label":"Restart",onClick:()=>{ee.restart()},children:[g("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),g("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),g(io,{"aria-label":"Minimise application",onClick:()=>rt.value="minimised",children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]})},zv=Ko(()=>Promise.resolve().then(()=>$y).then(e=>e.JobApplicationContent)),Bv=({children:e})=>g(wv,{features:_v,children:e}),jv={closed:{y:"calc(100% + 1rem)",height:Qi},maximised:{y:0,height:"75vh"},minimised:{y:0,height:Qi}},Hv=({logger:e,apiClient:t,analytics:n})=>{const{state:r,application:o,error:i}=ee.current$.value,s=rt.value,a=r!=="idle"&&s==="maximised",c=U(null);return g(Bv,{children:g(rp,{open:a,modal:a,children:g(Wi,{children:[g(op,{forceMount:!0,asChild:!0,children:a&&g(to.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:"bg-neutral-12/60 fixed inset-0"})},"bg"),g(ip,{forceMount:!0,asChild:!0,children:g(to.div,{ref:c,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-header",variants:jv,initial:"closed",animate:nt({state:r,view:s}).with({state:"idle"},()=>"closed").with({state:Ae.union("loaded","error","loading")},({view:u})=>u).exhaustive(),exit:"closed",style:{"--header-height":`${Qi}px`},class:"selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",children:g("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[g(Fv,{children:o?`Applying for “${o.job.title}” at ${o.company.name}`:"inploi chatbot: "+r}),(()=>{switch(r){case"idle":return null;case"loading":return g(yu,{},"loading");case"loaded":return s!=="maximised"?null:g(on,{fallback:g(yu,{},"loading"),children:g(zv,{analytics:n,currentApplication:o,apiClient:t,logger:e})});case"error":return g(Iv,{message:i});default:wf(r)}})()]})},"content")})]})})})};function Uv(e){return(Array.isArray(e)?e:e.issues).reduce((t,n)=>{if(n.path){if(n.path.every(({key:r})=>typeof r=="string"||typeof r=="number")){const r=n.path.map(({key:o})=>o).join(".");t.nested[r]?t.nested[r].push(n.message):t.nested[r]=[n.message]}}else t.root?t.root.push(n.message):t.root=[n.message];return t},{nested:{}})}var so=class extends Error{constructor(t){super(t[0].message);rf(this,"issues");this.name="ValiError",this.issues=t}};function _u(e,t){return{...e,_parse(n,r){return e._parse(t(n),r)}}}function Qn(e){return{issues:e}}function ot(e){return{output:e}}function Xv(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,path:t.path,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function qv(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function kt(e,t,n,r){if(!t||!t.length||n!=null&&n.skipPipe)return ot(e);let o,i,s=e;for(const a of t){const c=a._parse(s);if(c.issues){o=o||qv(n,r);for(const u of c.issues){const d=Xv(o,u);i?i.push(d):i=[d]}if(o.abortEarly||o.abortPipeEarly)break}else s=c.output}return i?Qn(i):ot(s)}function $t(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function xu(e){return typeof e=="function"?e():e}function er(e,t,n,r){return Qn([{validation:e,message:xu(t),input:n,requirement:r}])}function Wv(e,t,n){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,s]=$t(t,n);return[e,i,s]}const[r,o]=$t(e,t);return[void 0,r,o]}function qt(e,t,n,r,o,i){return{issues:[{reason:t,validation:n,origin:(e==null?void 0:e.origin)||"value",message:xu(r),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Kv(e){return typeof e.default=="function"?e.default():e.default}function Yv(e){return{type:"any",async:!1,pipe:e,_parse(t,n){return kt(t,this.pipe,n,"any")}}}function Gv(e,t,n){const[r="Invalid type",o]=$t(t,n);return{type:"array",async:!1,item:e,message:r,pipe:o,_parse(i,s){if(!Array.isArray(i))return qt(s,"type","array",this.message,i);let a;const c=[];for(let u=0;u<i.length;u++){const d=i[u],l=this.item._parse(d,s);if(l.issues){const f={type:"array",input:i,key:u,value:d};for(const h of l.issues)h.path?h.path.unshift(f):h.path=[f],a==null||a.push(h);if(a||(a=l.issues),s!=null&&s.abortEarly)break}else c.push(l.output)}return a?Qn(a):kt(c,this.pipe,s,"array")}}}function Zv(e,t){const[n="Invalid type",r]=$t(e,t);return{type:"boolean",async:!1,message:n,pipe:r,_parse(o,i){return typeof o!="boolean"?qt(i,"type","boolean",this.message,o):kt(o,this.pipe,i,"boolean")}}}function Jv(e,t){const[n="Invalid type",r]=$t(e,t);return{type:"number",async:!1,message:n,pipe:r,_parse(o,i){return typeof o!="number"||isNaN(o)?qt(i,"type","number",this.message,o):kt(o,this.pipe,i,"number")}}}function bn(e,t,n,r){const[o,i="Invalid type",s]=Wv(t,n,r);let a;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:s,_parse(c,u){if(!c||typeof c!="object")return qt(u,"type","object",this.message,c);a=a||Object.entries(this.entries);let d;const l={};for(const[f,h]of a){const p=c[f],m=h._parse(p,u);if(m.issues){const y={type:"object",input:c,key:f,value:p};for(const x of m.issues)x.path?x.path.unshift(y):x.path=[y],d==null||d.push(x);if(d||(d=m.issues),u!=null&&u.abortEarly)break}else(m.output!==void 0||f in c)&&(l[f]=m.output)}if(this.rest&&!(u!=null&&u.abortEarly&&d)){for(const f in c)if(!(f in this.entries)){const h=c[f],p=this.rest._parse(h,u);if(p.issues){const m={type:"object",input:c,key:f,value:h};for(const y of p.issues)y.path?y.path.unshift(m):y.path=[m],d==null||d.push(y);if(d||(d=p.issues),u!=null&&u.abortEarly)break}else l[f]=p.output}}return d?Qn(d):kt(l,this.pipe,u,"object")}}}function Qv(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(n,r){if(n===void 0){const o=Kv(this);if(o===void 0)return ot(n);n=o}return this.wrapped._parse(n,r)}}}function eg(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(n,r){return this.options.includes(n)?ot(n):qt(r,"type","picklist",this.message,n)}}}function We(e,t){const[n="Invalid type",r]=$t(e,t);return{type:"string",async:!1,message:n,pipe:r,_parse(o,i){return typeof o!="string"?qt(i,"type","string",this.message,o):kt(o,this.pipe,i,"string")}}}function tg(e,t,n,r){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=$t(n,r);return[e,t,s,a]}const[o,i]=$t(t,n);return[We(),e,o,i]}var ng=["__proto__","prototype","constructor"];function rg(e,t,n,r){const[o,i,s="Invalid type",a]=tg(e,t,n,r);return{type:"record",async:!1,key:o,value:i,message:s,pipe:a,_parse(c,u){if(!c||typeof c!="object")return qt(u,"type","record",this.message,c);let d;const l={};for(const[f,h]of Object.entries(c))if(!ng.includes(f)){let p;const m=this.key._parse(f,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(m.issues){p={type:"record",input:c,key:f,value:h};for(const x of m.issues)x.path=[p],d==null||d.push(x);if(d||(d=m.issues),u!=null&&u.abortEarly)break}const y=this.value._parse(h,u);if(y.issues){p=p||{type:"record",input:c,key:f,value:h};for(const x of y.issues)x.path?x.path.unshift(p):x.path=[p],d==null||d.push(x);if(d||(d=y.issues),u!=null&&u.abortEarly)break}!m.issues&&!y.issues&&(l[m.output]=y.output)}return d?Qn(d):kt(l,this.pipe,u,"record")}}}function rs(e,t,n){const r=e._parse(t,n);if(r.issues)throw new so(r.issues);return r.output}async function og(e,t,n){const r=await e._parse(t,n);if(r.issues)throw new so(r.issues);return r.output}function ku(e,t,n){return{...e,_parse(r,o){const i=e._parse(r,o);if(i.issues)return i;const s=t(i.output);return n&&!Array.isArray(n)?n._parse(s,o):kt(s,n,o,typeof s)}}}var ig=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function sg(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:ig,_parse(t){return this.requirement.test(t)?ot(t):er(this.type,this.message,t,this.requirement)}}}function ag(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(n){return n.length>this.requirement?er(this.type,this.message,n,this.requirement):ot(n)}}}function $u(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(n){return n.length<this.requirement?er(this.type,this.message,n,this.requirement):ot(n)}}}function cg(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(n){return this.requirement.test(n)?ot(n):er(this.type,this.message,n,this.requirement)}}}function lg(e="Invalid URL"){return{type:"url",async:!1,message:e,requirement(t){try{return new URL(t),!0}catch{return!1}},_parse(t){return this.requirement(t)?ot(t):er(this.type,this.message,t,this.requirement)}}}const ug=bn({job:bn({id:_u(We(),String),title:We()}),company:bn({name:We(),logo:Qv(We())}),flow:bn({id:_u(We(),String),version:Jv(),nodes:Gv(Yv())})});async function dg({jobId:e,apiClient:t,logger:n}){try{const r=await t.fetch(`/flow/job/${e}`);return{ok:!0,value:rs(ug,r)}}catch(r){return r instanceof so?(n.error(Uv(r).nested),{ok:!1,error:"API error: Invalid application data received"}):r instanceof Je?{ok:!1,error:"Application flow not found."}:r instanceof Error?(n.error(r),{ok:!1,error:r.message}):(n.error(r),{ok:!1,error:"Unknown error"})}}const fg=`#isdk{position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{box-sizing:border-box;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :after{--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: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--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-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk ::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: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--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-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}#isdk .animate-bounce{animation:bounce 1s infinite}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-dashed{border-style:dashed}#isdk .border-neutral-12\\/5{border-color:oklch(var(--i-n-12) / .05)}#isdk .border-neutral-8{--tw-border-opacity: 1;border-color:oklch(var(--i-n-8) / var(--tw-border-opacity))}#isdk .bg-accent-1{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-1) / var(--tw-bg-opacity))}#isdk .bg-accent-7{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-7) / var(--tw-bg-opacity))}#isdk .bg-accent-8\\/5{background-color:oklch(var(--i-a-8) / .05)}#isdk .bg-lowest{--tw-bg-opacity: 1;background-color:hsl(var(--i-lowest) / var(--tw-bg-opacity))}#isdk .bg-neutral-1{--tw-bg-opacity: 1;background-color:oklch(var(--i-n-1) / var(--tw-bg-opacity))}#isdk .bg-neutral-1\\/90{background-color:oklch(var(--i-n-1) / .9)}#isdk .bg-neutral-12\\/60{background-color:oklch(var(--i-n-12) / .6)}#isdk .bg-neutral-2{--tw-bg-opacity: 1;background-color:oklch(var(--i-n-2) / var(--tw-bg-opacity))}#isdk .bg-neutral-2\\/80{background-color:oklch(var(--i-n-2) / .8)}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-12{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .text-accent-9{--tw-text-opacity: 1;color:oklch(var(--i-a-9) / var(--tw-text-opacity))}#isdk .text-error-10{--tw-text-opacity: 1;color:hsl(var(--i-e-10) / var(--tw-text-opacity))}#isdk .text-error-11{--tw-text-opacity: 1;color:hsl(var(--i-e-11) / var(--tw-text-opacity))}#isdk .text-error-9{--tw-text-opacity: 1;color:hsl(var(--i-e-9) / var(--tw-text-opacity))}#isdk .text-lowest{--tw-text-opacity: 1;color:hsl(var(--i-lowest) / var(--tw-text-opacity))}#isdk .text-neutral-10{--tw-text-opacity: 1;color:oklch(var(--i-n-10) / var(--tw-text-opacity))}#isdk .text-neutral-11{--tw-text-opacity: 1;color:oklch(var(--i-n-11) / var(--tw-text-opacity))}#isdk .text-neutral-12{--tw-text-opacity: 1;color:oklch(var(--i-n-12) / var(--tw-text-opacity))}#isdk .text-neutral-4{--tw-text-opacity: 1;color:oklch(var(--i-n-4) / var(--tw-text-opacity))}#isdk .text-neutral-8{--tw-text-opacity: 1;color:oklch(var(--i-n-8) / var(--tw-text-opacity))}#isdk .text-neutral-9{--tw-text-opacity: 1;color:oklch(var(--i-n-9) / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:oklch(var(--i-a-9) / 1)}#isdk .opacity-0{opacity:0}#isdk .opacity-100{opacity:1}#isdk .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(var(--i-a-12) / .03), 0px 6px 4px 0px oklch(var(--i-a-12) / .02), 0px 6px 4px 0px oklch(var(--i-a-12) / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(var(--i-a-12) / .03), 0px 4px 4px 0px oklch(var(--i-a-12) / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-neutral-11\\/\\[\\.08\\]{outline-color:oklch(var(--i-n-11) / .08)}#isdk .outline-neutral-12\\/5{outline-color:oklch(var(--i-n-12) / .05)}#isdk .outline-neutral-3{outline-color:oklch(var(--i-n-3) / 1)}#isdk .outline-neutral-4{outline-color:oklch(var(--i-n-4) / 1)}#isdk .outline-neutral-6{outline-color:oklch(var(--i-n-6) / 1)}#isdk .ring-0{--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);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-1{--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);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-2{--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);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-accent-8\\/20{--tw-ring-color: oklch(var(--i-a-8) / .2)}#isdk .ring-lowest{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--i-lowest) / var(--tw-ring-opacity))}#isdk .ring-neutral-12\\/5{--tw-ring-color: oklch(var(--i-n-12) / .05)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow-\\[0_1\\.5px_white\\]{--tw-drop-shadow: drop-shadow(0 1.5px white);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-9) / 1);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[text-wrap\\:pretty\\]{text-wrap:pretty}#isdk .selection\\:bg-accent-4 *::-moz-selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-accent-4 *::selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .selection\\:text-accent-12 *::selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .selection\\:bg-accent-4::-moz-selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-accent-4::selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .selection\\:text-accent-12::selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-4::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-4) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-4::placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-4) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-5::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-5) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-5::placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-5) / var(--tw-text-opacity))}#isdk .hover\\:bg-neutral-12\\/5:hover{background-color:oklch(var(--i-n-12) / .05)}#isdk .hover\\:text-neutral-12:hover{--tw-text-opacity: 1;color:oklch(var(--i-n-12) / var(--tw-text-opacity))}#isdk .hover\\:ring-accent-8:hover{--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-8) / var(--tw-ring-opacity))}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:oklch(var(--i-a-7) / 1)}#isdk .focus-visible\\:outline-accent-9:focus-visible{outline-color:oklch(var(--i-a-9) / 1)}#isdk .focus-visible\\:ring-4:focus-visible{--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(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .focus-visible\\:ring-accent-7\\/50:focus-visible{--tw-ring-color: oklch(var(--i-a-7) / .5)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:bg-accent-10:active{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-10) / var(--tw-bg-opacity))}#isdk .active\\:bg-accent-2:active{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-2) / var(--tw-bg-opacity))}#isdk .active\\:bg-neutral-12\\/10:active{background-color:oklch(var(--i-n-12) / .1)}#isdk .active\\:text-accent-10:active{--tw-text-opacity: 1;color:oklch(var(--i-a-10) / var(--tw-text-opacity))}#isdk .active\\:text-accent-11:active{--tw-text-opacity: 1;color:oklch(var(--i-a-11) / var(--tw-text-opacity))}#isdk .active\\:text-accent-2:active{--tw-text-opacity: 1;color:oklch(var(--i-a-2) / var(--tw-text-opacity))}#isdk .active\\:text-neutral-12:active{--tw-text-opacity: 1;color:oklch(var(--i-n-12) / var(--tw-text-opacity))}#isdk .active\\:outline-neutral-10:active{outline-color:oklch(var(--i-n-10) / 1)}#isdk .active\\:ring-accent-7:active{--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-7) / var(--tw-ring-opacity))}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-2) / var(--tw-bg-opacity))}#isdk .peer:checked~.peer-checked\\:text-accent-9{--tw-text-opacity: 1;color:oklch(var(--i-a-9) / var(--tw-text-opacity))}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:oklch(var(--i-a-7) / 1)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-4{--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(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-accent-7{--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-7) / var(--tw-ring-opacity))}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-2{--tw-ring-offset-width: 2px}@media (pointer: coarse){#isdk .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}
50
- `,hg=()=>{let e=null;return{getOrCreateChatbotElement:()=>{if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Vv,e=t,t},addStyle:(t,n)=>{const r=document.head,o=document.createElement("style");o.id=n,o.innerHTML=t,r.appendChild(o)}}},Su=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},pg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},mg=e=>Su(pg[e.toLowerCase()],6),vg=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,gg=e=>{let t;return(t=e.match(vg))?Su(parseInt(t[1],16),t[1].length):void 0},St="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",tr=`${St}%`,os=`(?:${St}%|${St})`,bg=`(?:${St}(deg|grad|rad|turn)|${St})`,yn="\\s*,\\s*",yg=new RegExp(`^rgba?\\(\\s*${St}${yn}${St}${yn}${St}\\s*(?:,\\s*${os}\\s*)?\\)$`),wg=new RegExp(`^rgba?\\(\\s*${tr}${yn}${tr}${yn}${tr}\\s*(?:,\\s*${os}\\s*)?\\)$`),_g=e=>{let t={mode:"rgb"},n;if(n=e.match(yg))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(wg))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=n[4]/100:n[5]!==void 0&&(t.alpha=+n[5]),t},nr=(e,t)=>e===void 0?void 0:typeof e!="object"?Pg(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,it=(e="rgb")=>t=>(t=nr(t,e))!==void 0?t.mode===e?t:Ke[t.mode][e]?Ke[t.mode][e](t):e==="rgb"?Ke[t.mode].rgb(t):Ke.rgb[e](Ke[t.mode].rgb(t)):void 0,Ke={},Mu={},ao=[],Tu={},xg=e=>e,Z=e=>(Ke[e.mode]={...Ke[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Ke[t]||(Ke[t]={}),Ke[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=xg)}),Mu[e.mode]=e,(e.parse||[]).forEach(t=>{kg(t,e.mode)}),it(e.mode)),Wt=e=>Mu[e],kg=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Tu[e]=t}else typeof e=="function"&&ao.indexOf(e)<0&&ao.push(e)},is=/[^\x00-\x7F]|[a-zA-Z_]/,$g=/[^\x00-\x7F]|[-\w]/,$={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let F=0;function co(e){let t=e[F],n=e[F+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[F+2]):t==="."?/\d/.test(n):/\d/.test(t)}function ss(e){if(F>=e.length)return!1;let t=e[F];if(is.test(t))return!0;if(t==="-"){if(e.length-F<2)return!1;let n=e[F+1];return!!(n==="-"||is.test(n))}return!1}const Sg={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function rr(e){let t="";if((e[F]==="-"||e[F]==="+")&&(t+=e[F++]),t+=lo(e),e[F]==="."&&/\d/.test(e[F+1])&&(t+=e[F++]+lo(e)),(e[F]==="e"||e[F]==="E")&&((e[F+1]==="-"||e[F+1]==="+")&&/\d/.test(e[F+2])?t+=e[F++]+e[F++]+lo(e):/\d/.test(e[F+1])&&(t+=e[F++]+lo(e))),ss(e)){let n=uo(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:$.Hue,value:t*Sg[n]}:void 0}return e[F]==="%"?(F++,{type:$.Percentage,value:+t}):{type:$.Number,value:+t}}function lo(e){let t="";for(;/\d/.test(e[F]);)t+=e[F++];return t}function uo(e){let t="";for(;F<e.length&&$g.test(e[F]);)t+=e[F++];return t}function Mg(e){let t=uo(e);return e[F]==="("?(F++,{type:$.Function,value:t}):t==="none"?{type:$.None,value:void 0}:{type:$.Ident,value:t}}function Tg(e=""){let t=e.trim(),n=[],r;for(F=0;F<t.length;){if(r=t[F++],r===`
51
- `||r===" "||r===" "){for(;F<t.length&&(t[F]===`
52
- `||t[F]===" "||t[F]===" ");)F++;continue}if(r===",")return;if(r===")"){n.push({type:$.ParenClose});continue}if(r==="+"){if(F--,co(t)){n.push(rr(t));continue}return}if(r==="-"){if(F--,co(t)){n.push(rr(t));continue}if(ss(t)){n.push({type:$.Ident,value:uo(t)});continue}return}if(r==="."){if(F--,co(t)){n.push(rr(t));continue}return}if(r==="/"){for(;F<t.length&&(t[F]===`
53
- `||t[F]===" "||t[F]===" ");)F++;let o;if(co(t)&&(o=rr(t),o.type!==$.Hue)){n.push({type:$.Alpha,value:o});continue}if(ss(t)&&uo(t)==="none"){n.push({type:$.Alpha,value:{type:$.None,value:void 0}});continue}return}if(/\d/.test(r)){F--,n.push(rr(t));continue}if(is.test(r)){F--,n.push(Mg(t));continue}return}return n}function Cg(e){e._i=0;let t=e[e._i++];if(!t||t.type!==$.Function||t.value!=="color"||(t=e[e._i++],t.type!==$.Ident))return;const n=Tu[t.value];if(!n)return;const r={mode:n},o=Cu(e,!1);if(!o)return;const i=Wt(n).channels;for(let s=0,a;s<i.length;s++)a=o[s],a.type!==$.None&&(r[i[s]]=a.type===$.Number?a.value:a.value/100);return r}function Cu(e,t){const n=[];let r;for(;e._i<e.length;){if(r=e[e._i++],r.type===$.None||r.type===$.Number||r.type===$.Alpha||r.type===$.Percentage||t&&r.type===$.Hue){n.push(r);continue}if(r.type===$.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==$.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:$.None,value:void 0}),n.every(o=>o.type!==$.Alpha)?n:void 0}}function Ag(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==$.Function)return;let r=Cu(e,t);if(r)return r.unshift(n.value),r}const Pg=e=>{if(typeof e!="string")return;const t=Tg(e),n=t?Ag(t,!0):void 0;let r,o=0,i=ao.length;for(;o<i;)if((r=ao[o++](e,n))!==void 0)return r;return t?Cg(t):void 0};function Eg(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;const n={mode:"rgb"},[,r,o,i,s]=t;if(!(r.type===$.Hue||o.type===$.Hue||i.type===$.Hue))return r.type!==$.None&&(n.r=r.type===$.Number?r.value/255:r.value/100),o.type!==$.None&&(n.g=o.type===$.Number?o.value/255:o.value/100),i.type!==$.None&&(n.b=i.type===$.Number?i.value/255:i.value/100),s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Vg=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Og=(e,t,n)=>e+n*(t-e),Lg=e=>{let t=[];for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1];r===void 0&&o===void 0?t.push(void 0):r!==void 0&&o!==void 0?t.push([r,o]):t.push(r!==void 0?[r,r]:[o,o])}return t},A=(e=>t=>{let n=Lg(t);return r=>{let o=r*n.length,i=r>=1?n.length-1:Math.max(Math.floor(o),0),s=n[i];return s===void 0?void 0:e(s[0],s[1],o-i)}})(Og),he=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e},wn={mode:"rgb",channels:["r","g","b","alpha"],parse:[Eg,gg,_g,mg,Vg,"srgb"],serialize:"srgb",interpolate:{r:A,g:A,b:A,alpha:{use:A,fixup:he}},gamut:!0},as=e=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Au=e=>{let t=as(e.r),n=as(e.g),r=as(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},cs=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Pu=({x:e,y:t,z:n,alpha:r})=>{let o={mode:"a98",r:cs(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:cs(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:cs(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(o.alpha=r),o},ls=e=>{const t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},_n=({r:e,g:t,b:n,alpha:r})=>{let o={mode:"lrgb",r:ls(e),g:ls(t),b:ls(n)};return r!==void 0&&(o.alpha=r),o},xn=e=>{let{r:t,g:n,b:r,alpha:o}=_n(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return o!==void 0&&(i.alpha=o),i},us=e=>{const t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},kn=({r:e,g:t,b:n,alpha:r},o="rgb")=>{let i={mode:o,r:us(e),g:us(t),b:us(n)};return r!==void 0&&(i.alpha=r),i},$n=({x:e,y:t,z:n,alpha:r})=>{let o=kn({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(o.alpha=r),o},Ng={...wn,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Pu(xn(e)),xyz65:Pu},toMode:{rgb:e=>$n(Au(e)),xyz65:Au}},be=e=>(e=e%360)<0?e+360:e,Rg=(e,t)=>e.map((n,r,o)=>{if(n===void 0)return n;let i=be(n);return r===0||e[r-1]===void 0?i:t(i-be(o[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),st=e=>Rg(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),pe=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ig=Math.PI/180,Dg=180/Math.PI;let Eu=pe[3]*pe[4],Vu=pe[1]*pe[4],Ou=pe[1]*pe[2]-pe[0]*pe[3];const Fg=({r:e,g:t,b:n,alpha:r})=>{let o=(Ou*n+e*Eu-t*Vu)/(Ou+Eu-Vu),i=n-o,s=(pe[4]*(t-o)-pe[2]*i)/pe[3],a={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(i*i+s*s)/(pe[4]*o*(1-o))};return a.s&&(a.h=Math.atan2(s,i)*Dg-120),r!==void 0&&(a.alpha=r),a},zg=({h:e,s:t,l:n,alpha:r})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Ig;let i=t===void 0?0:t*n*(1-n),s=Math.cos(e),a=Math.sin(e);return o.r=n+i*(pe[0]*s+pe[1]*a),o.g=n+i*(pe[2]*s+pe[3]*a),o.b=n+i*(pe[4]*s+pe[5]*a),r!==void 0&&(o.alpha=r),o},fo=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=be(e.h),r=be(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},Bg=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=be(e.h),r=be(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},ho=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=be(e.h),r=be(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},Lu=(e="rgb",t=[1,1,1,0])=>{let n=Wt(e),r=n.channels,o=n.difference,i=it(e);return(s,a)=>{let c=i(s),u=i(a);return Math.sqrt(r.reduce((d,l,f)=>{let h=o[l]?o[l](c,u):c[l]-u[l];return d+(t[f]||0)*Math.pow(isNaN(h)?0:h,2)},0))}},at=e=>{let t=e.reduce((n,r)=>{if(r!==void 0){let o=r*Math.PI/180;n.sin+=Math.sin(o),n.cos+=Math.cos(o)}return n},{sin:0,cos:0});return Math.atan2(t.sin,t.cos)*180/Math.PI},jg={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Fg},toMode:{rgb:zg},interpolate:{h:{use:A,fixup:st},s:A,l:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}},Mt=({l:e,a:t,b:n,alpha:r},o="lch")=>{let i=Math.sqrt(t*t+n*n),s={mode:o,l:e,c:i};return i&&(s.h=be(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(s.alpha=r),s},Tt=({l:e,c:t,h:n,alpha:r},o="lab")=>{let i={mode:o,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Nu=Math.pow(29,3)/Math.pow(3,3),Ru=Math.pow(6,3)/Math.pow(29,3),le={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Sn={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let ds=e=>Math.pow(e,3)>Ru?Math.pow(e,3):(116*e-16)/Nu;const Iu=({l:e,a:t,b:n,alpha:r})=>{let o=(e+16)/116,i=t/500+o,s=o-n/200,a={mode:"xyz65",x:ds(i)*Sn.X,y:ds(o)*Sn.Y,z:ds(s)*Sn.Z};return r!==void 0&&(a.alpha=r),a},po=e=>$n(Iu(e)),fs=e=>e>Ru?Math.cbrt(e):(Nu*e+16)/116,Du=({x:e,y:t,z:n,alpha:r})=>{let o=fs(e/Sn.X),i=fs(t/Sn.Y),s=fs(n/Sn.Z),a={mode:"lab65",l:116*i-16,a:500*(o-i),b:200*(i-s)};return r!==void 0&&(a.alpha=r),a},mo=e=>{let t=Du(xn(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},vo=1,Fu=1,or=26/180*Math.PI,go=Math.cos(or),bo=Math.sin(or),zu=100/Math.log(139/100),hs=({l:e,c:t,h:n,alpha:r})=>{let o={mode:"lab65",l:(Math.exp(e*vo/zu)-1)/.0039};if(n===void 0)o.a=o.b=0;else{let i=(Math.exp(.0435*t*Fu*vo)-1)/.075,s=i*Math.cos(n/180*Math.PI-or),a=i*Math.sin(n/180*Math.PI-or);o.a=s*go-a/.83*bo,o.b=s*bo+a/.83*go}return r!==void 0&&(o.alpha=r),o},ps=({l:e,a:t,b:n,alpha:r})=>{let o=t*go+n*bo,i=.83*(n*go-t*bo),s=Math.sqrt(o*o+i*i),a={mode:"dlch",l:zu/vo*Math.log(1+.0039*e),c:Math.log(1+.075*s)/(.0435*Fu*vo)};return a.c&&(a.h=be((Math.atan2(i,o)+or)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},Bu=e=>hs(Mt(e,"dlch")),ju=e=>Tt(ps(e),"dlab"),Hg={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Bu,rgb:e=>po(Bu(e))},fromMode:{lab65:ju,rgb:e=>ju(mo(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:he}}},Ug={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:hs,dlab:e=>Tt(e,"dlab"),rgb:e=>po(hs(e))},fromMode:{lab65:ps,dlab:e=>Mt(e,"dlch"),rgb:e=>ps(mo(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:A,c:A,h:{use:A,fixup:st},alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}};function Xg({h:e,s:t,i:n,alpha:r}){e=be(e);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1-t)};break;case 1:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1+t*(3/(2-o)-1)),b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n*(1+t*(3/(2-o)-1)),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:i={r:n*(1-t),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1+t*(3/(2-o)-1))};break;case 4:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3/(2-o)-1))};break;case 5:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function qg({r:e,g:t,b:n,alpha:r}){let o=Math.max(e,t,n),i=Math.min(e,t,n),s={mode:"hsi",s:e+t+n===0?0:1-3*i/(e+t+n),i:(e+t+n)/3};return o-i!==0&&(s.h=(o===e?(t-n)/(o-i)+(t<n)*6:o===t?(n-e)/(o-i)+2:(e-t)/(o-i)+4)*60),r!==void 0&&(s.alpha=r),s}const Wg={mode:"hsi",toMode:{rgb:Xg},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:qg},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:st},s:A,i:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}};function Kg({h:e,s:t,l:n,alpha:r}){e=be(e);let o=n+t*(n<.5?n:1-n),i=o-(o-n)*2*Math.abs(e/60%2-1),s;switch(Math.floor(e/60)){case 0:s={r:o,g:i,b:2*n-o};break;case 1:s={r:i,g:o,b:2*n-o};break;case 2:s={r:2*n-o,g:o,b:i};break;case 3:s={r:2*n-o,g:i,b:o};break;case 4:s={r:i,g:2*n-o,b:o};break;case 5:s={r:o,g:2*n-o,b:i};break;default:s={r:2*n-o,g:2*n-o,b:2*n-o}}return s.mode="rgb",r!==void 0&&(s.alpha=r),s}function Yg({r:e,g:t,b:n,alpha:r}){let o=Math.max(e,t,n),i=Math.min(e,t,n),s={mode:"hsl",s:o===i?0:(o-i)/(1-Math.abs(o+i-1)),l:.5*(o+i)};return o-i!==0&&(s.h=(o===e?(t-n)/(o-i)+(t<n)*6:o===t?(n-e)/(o-i)+2:(e-t)/(o-i)+4)*60),r!==void 0&&(s.alpha=r),s}const Gg=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},Zg=new RegExp(`^hsla?\\(\\s*${bg}${yn}${tr}${yn}${tr}\\s*(?:,\\s*${os}\\s*)?\\)$`),Jg=e=>{let t=e.match(Zg);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=Gg(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=t[6]/100:t[7]!==void 0&&(n.alpha=+t[7]),n};function Qg(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const n={mode:"hsl"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Percentage)return;n.h=r.value}if(o.type!==$.None){if(o.type===$.Hue)return;n.s=o.type===$.Number?o.value:o.value/100}if(i.type!==$.None){if(i.type===$.Hue)return;n.l=i.type===$.Number?i.value:i.value/100}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Hu={mode:"hsl",toMode:{rgb:Kg},fromMode:{rgb:Yg},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qg,Jg],serialize:e=>`hsl(${e.h||0} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:st},s:A,l:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}};function Uu({h:e,s:t,v:n,alpha:r}){e=be(e);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n,g:n*(1-t*o),b:n*(1-t)};break;case 1:i={r:n*(1-t*o),g:n,b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n,b:n*(1-t*o)};break;case 3:i={r:n*(1-t),g:n*(1-t*o),b:n};break;case 4:i={r:n*(1-t*o),g:n*(1-t),b:n};break;case 5:i={r:n,g:n*(1-t),b:n*(1-t*o)};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function Xu({r:e,g:t,b:n,alpha:r}){let o=Math.max(e,t,n),i=Math.min(e,t,n),s={mode:"hsv",s:o===0?0:1-i/o,v:o};return o-i!==0&&(s.h=(o===e?(t-n)/(o-i)+(t<n)*6:o===t?(n-e)/(o-i)+2:(e-t)/(o-i)+4)*60),r!==void 0&&(s.alpha=r),s}const qu={mode:"hsv",toMode:{rgb:Uu},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Xu},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:st},s:A,v:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}};function eb({h:e,w:t,b:n,alpha:r}){if(t+n>1){let o=t+n;t/=o,n/=o}return Uu({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function tb(e){let t=Xu(e);if(t===void 0)return;let n={mode:"hwb",w:(1-t.s)*t.v,b:1-t.v};return t.h!==void 0&&(n.h=t.h),t.alpha!==void 0&&(n.alpha=t.alpha),n}function nb(e,t){if(!t||t[0]!=="hwb")return;const n={mode:"hwb"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Percentage)return;n.h=r.value}if(o.type!==$.None){if(o.type===$.Hue)return;n.w=o.type===$.Number?o.value:o.value/100}if(i.type!==$.None){if(i.type===$.Hue)return;n.b=i.type===$.Number?i.value:i.value/100}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const rb={mode:"hwb",toMode:{rgb:eb},fromMode:{rgb:tb},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[nb],serialize:e=>`hwb(${e.h||0} ${e.w*100}% ${e.b*100}%${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:st},w:A,b:A,alpha:{use:A,fixup:he}},difference:{h:Bg},average:{h:at}},ob=.1593017578125,ib=134.03437499999998,sb=.8359375,ab=18.8515625,cb=18.6875,lb=16295499532821565e-27,ms=e=>{let t=Math.pow(e/1e4,ob);return Math.pow((sb+ab*t)/(1+cb*t),ib)||0},vs=e=>Math.max(e*203,0),Wu=({x:e,y:t,z:n,alpha:r})=>{e=vs(e),t=vs(t),n=vs(n);let o=1.15*e-.15*n,i=.66*t+.34*e,s=ms(.41478972*o+.579999*i+.014648*n),a=ms(-.20151*o+1.120649*i+.0531008*n),c=ms(-.0166008*o+.2648*i+.6684799*n),u=(s+a)/2,d={mode:"jab",j:.44*u/(1-.56*u)-lb,a:3.524*s-4.066708*a+.542708*c,b:.199076*s+1.096799*a-1.295875*c};return r!==void 0&&(d.alpha=r),d},ub=.1593017578125,db=134.03437499999998,fb=.8359375,hb=18.8515625,pb=18.6875,Ku=16295499532821565e-27,gs=e=>{let t=Math.pow(e,1/db);return 1e4*Math.pow((fb-t)/(pb*t-hb),1/ub)||0},bs=e=>e/203,Yu=({j:e,a:t,b:n,alpha:r})=>{let o=(e+Ku)/(.44+.56*(e+Ku)),i=gs(o+.13860504*t+.058047316*n),s=gs(o-.13860504*t-.058047316*n),a=gs(o-.096019242*t-.8118919*n),c={mode:"xyz65",x:bs(1.661373024652174*i-.914523081304348*s+.23136208173913045*a),y:bs(-.3250758611844533*i+1.571847026732543*s-.21825383453227928*a),z:bs(-.090982811*i-.31272829*s+1.5227666*a)};return r!==void 0&&(c.alpha=r),c},Gu=e=>{let t=Wu(xn(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Zu=e=>$n(Yu(e)),mb={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Gu,xyz65:Wu},toMode:{rgb:Zu,xyz65:Yu},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:A,a:A,b:A,alpha:{use:A,fixup:he}}},Ju=({j:e,a:t,b:n,alpha:r})=>{let o=Math.sqrt(t*t+n*n),i={mode:"jch",j:e,c:o};return o&&(i.h=be(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},Qu=({j:e,c:t,h:n,alpha:r})=>{let o={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},vb={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Qu,rgb:e=>Zu(Qu(e))},fromMode:{rgb:e=>Ju(Gu(e)),jab:Ju},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:A,fixup:st},c:A,j:A,alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}},yo=Math.pow(29,3)/Math.pow(3,3),ys=Math.pow(6,3)/Math.pow(29,3);let ws=e=>Math.pow(e,3)>ys?Math.pow(e,3):(116*e-16)/yo;const _s=({l:e,a:t,b:n,alpha:r})=>{let o=(e+16)/116,i=t/500+o,s=o-n/200,a={mode:"xyz50",x:ws(i)*le.X,y:ws(o)*le.Y,z:ws(s)*le.Z};return r!==void 0&&(a.alpha=r),a},ir=({x:e,y:t,z:n,alpha:r})=>{let o=kn({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(o.alpha=r),o},ed=e=>ir(_s(e)),sr=e=>{let{r:t,g:n,b:r,alpha:o}=_n(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return o!==void 0&&(i.alpha=o),i},xs=e=>e>ys?Math.cbrt(e):(yo*e+16)/116,ks=({x:e,y:t,z:n,alpha:r})=>{let o=xs(e/le.X),i=xs(t/le.Y),s=xs(n/le.Z),a={mode:"lab",l:116*i-16,a:500*(o-i),b:200*(i-s)};return r!==void 0&&(a.alpha=r),a},td=e=>{let t=ks(sr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function gb(e,t){if(!t||t[0]!=="lab")return;const n={mode:"lab"},[,r,o,i,s]=t;if(!(r.type===$.Hue||o.type===$.Hue||i.type===$.Hue))return r.type!==$.None&&(n.l=r.value),o.type!==$.None&&(n.a=o.type===$.Number?o.value:o.value*125/100),i.type!==$.None&&(n.b=i.type===$.Number?i.value:i.value*125/100),s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const $s={mode:"lab",toMode:{xyz50:_s,rgb:ed},fromMode:{xyz50:ks,rgb:td},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[gb],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:he}}},bb={...$s,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Iu,rgb:po},fromMode:{xyz65:Du,rgb:mo},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function yb(e,t){if(!t||t[0]!=="lch")return;const n={mode:"lch"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Hue)return;n.l=r.value}if(o.type!==$.None&&(n.c=Math.max(0,o.type===$.Number?o.value:o.value*150/100)),i.type!==$.None){if(i.type===$.Percentage)return;n.h=i.value}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Ss={mode:"lch",toMode:{lab:Tt,rgb:e=>ed(Tt(e))},fromMode:{rgb:e=>Mt(td(e)),lab:Mt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[yb],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h||0}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:st},c:A,l:A,alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}},wb={...Ss,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Tt(e,"lab65"),rgb:e=>po(Tt(e,"lab65"))},fromMode:{rgb:e=>Mt(mo(e),"lch65"),lab65:e=>Mt(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},nd=({l:e,u:t,v:n,alpha:r})=>{let o=Math.sqrt(t*t+n*n),i={mode:"lchuv",l:e,c:o};return o&&(i.h=be(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},rd=({l:e,c:t,h:n,alpha:r})=>{let o={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},od=(e,t,n)=>4*e/(e+15*t+3*n),id=(e,t,n)=>9*t/(e+15*t+3*n),_b=od(le.X,le.Y,le.Z),xb=id(le.X,le.Y,le.Z),kb=e=>e<=ys?yo*e:116*Math.cbrt(e)-16,Ms=({x:e,y:t,z:n,alpha:r})=>{let o=kb(t/le.Y),i=od(e,t,n),s=id(e,t,n);!isFinite(i)||!isFinite(s)?o=i=s=0:(i=13*o*(i-_b),s=13*o*(s-xb));let a={mode:"luv",l:o,u:i,v:s};return r!==void 0&&(a.alpha=r),a},$b=(e,t,n)=>4*e/(e+15*t+3*n),Sb=(e,t,n)=>9*t/(e+15*t+3*n),Mb=$b(le.X,le.Y,le.Z),Tb=Sb(le.X,le.Y,le.Z),Ts=({l:e,u:t,v:n,alpha:r})=>{let o=t/(13*e)+Mb,i=n/(13*e)+Tb,s=le.Y*(e<=8?e/yo:Math.pow((e+16)/116,3)),a=s*(9*o)/(4*i),c=s*(12-3*o-20*i)/(4*i),u={mode:"xyz50",x:a,y:s,z:c};return r!==void 0&&(u.alpha=r),u},Cb={mode:"lchuv",toMode:{luv:rd,rgb:e=>ir(Ts(rd(e)))},fromMode:{rgb:e=>nd(Ms(sr(e))),luv:nd},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:A,fixup:st},c:A,l:A,alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}},Ab={...wn,mode:"lrgb",toMode:{rgb:kn},fromMode:{rgb:_n},parse:["srgb-linear"],serialize:"srgb-linear"},Pb={mode:"luv",toMode:{xyz50:Ts,rgb:e=>ir(Ts(e))},fromMode:{xyz50:Ms,rgb:e=>Ms(sr(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:A,u:A,v:A,alpha:{use:A,fixup:he}}},sd=({r:e,g:t,b:n,alpha:r})=>{let o=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*n),s=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*n),a={mode:"oklab",l:.2104542553*o+.793617785*i-.0040720468*s,a:1.9779984951*o-2.428592205*i+.4505937099*s,b:.0259040371*o+.7827717662*i-.808675766*s};return r!==void 0&&(a.alpha=r),a},wo=e=>{let t=sd(_n(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ar=({l:e,a:t,b:n,alpha:r})=>{let o=Math.pow(e*.9999999984505198+.39633779217376786*t+.2158037580607588*n,3),i=Math.pow(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*n,3),s=Math.pow(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*n,3),a={mode:"lrgb",r:4.076741661347994*o-3.307711590408193*i+.230969928729428*s,g:-1.2684380040921763*o+2.6097574006633715*i-.3413193963102197*s,b:-.004196086541837188*o-.7034186144594493*i+1.7076147009309444*s};return r!==void 0&&(a.alpha=r),a},_o=e=>kn(ar(e));function Cs(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function xo(e){const r=1.170873786407767;return(e*e+.206*e)/(r*(e+.03))}function Eb(e,t){let n,r,o,i,s,a,c,u;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,o=.59662641,i=.75515197,s=.56771245,a=4.0767416621,c=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,o=.08285427,i=.1254107,s=.14503204,a=-1.2684380046,c=2.6097574011,u=-.3413193965):(n=1.35733652,r=-.00915799,o=-1.1513021,i=-.50559606,s=.00692167,a=-.0041960863,c=-.7034186147,u=1.707614701);let d=n+r*e+o*t+i*e*e+s*e*t,l=.3963377774*e+.2158037573*t,f=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t;{let p=1+d*l,m=1+d*f,y=1+d*h,x=p*p*p,b=m*m*m,w=y*y*y,M=3*l*p*p,S=3*f*m*m,I=3*h*y*y,N=6*l*l*p,C=6*f*f*m,E=6*h*h*y,q=a*x+c*b+u*w,K=a*M+c*S+u*I,j=a*N+c*C+u*E;d=d-q*K/(K*K-.5*q*j)}return d}function As(e,t){let n=Eb(e,t),r=ar({l:1,a:n*e,b:n*t}),o=Math.cbrt(1/Math.max(r.r,r.g,r.b)),i=o*n;return[o,i]}function Vb(e,t,n,r,o,i=null){i||(i=As(e,t));let s;if((n-o)*i[1]-(i[0]-o)*r<=0)s=i[1]*o/(r*i[0]+i[1]*(o-n));else{s=i[1]*(o-1)/(r*(i[0]-1)+i[1]*(o-n));{let a=n-o,c=r,u=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,l=-.0894841775*e-1.291485548*t,f=a+c*u,h=a+c*d,p=a+c*l;{let m=o*(1-s)+s*n,y=s*r,x=m+y*u,b=m+y*d,w=m+y*l,M=x*x*x,S=b*b*b,I=w*w*w,N=3*f*x*x,C=3*h*b*b,E=3*p*w*w,q=6*f*f*x,K=6*h*h*b,j=6*p*p*w,B=4.0767416621*M-3.3077115913*S+.2309699292*I-1,H=4.0767416621*N-3.3077115913*C+.2309699292*E,X=4.0767416621*q-3.3077115913*K+.2309699292*j,re=H/(H*H-.5*B*X),se=-B*re,Le=-1.2684380046*M+2.6097574011*S-.3413193965*I-1,Ne=-1.2684380046*N+2.6097574011*C-.3413193965*E,ut=-1.2684380046*q+2.6097574011*K-.3413193965*j,Y=Ne/(Ne*Ne-.5*Le*ut),Re=-Le*Y,Pt=-.0041960863*M-.7034186147*S+1.707614701*I-1,Et=-.0041960863*N-.7034186147*C+1.707614701*E,Gt=-.0041960863*q-.7034186147*K+1.707614701*j,Ge=Et/(Et*Et-.5*Pt*Gt),Ze=-Pt*Ge;se=re>=0?se:1e6,Re=Y>=0?Re:1e6,Ze=Ge>=0?Ze:1e6,s+=Math.min(se,Math.min(Re,Ze))}}}return s}function Ps(e,t,n=null){n||(n=As(e,t));let r=n[0],o=n[1];return[o/r,o/(1-r)]}function ad(e,t,n){let r=As(t,n),o=Vb(t,n,e,1,e,r),i=Ps(t,n,r),s=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),a=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),c=o/Math.min(e*i[0],(1-e)*i[1]),u=e*s,d=(1-e)*a,l=.9*c*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(d*d*d*d))));return u=e*.4,d=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(d*d))),l,o]}function cd(e){const t={mode:"okhsl",l:Cs(e.l)};e.alpha!==void 0&&(t.alpha=e.alpha);let n=Math.sqrt(e.a*e.a+e.b*e.b);if(!n)return t.s=0,t;let[r,o,i]=ad(e.l,e.a/n,e.b/n),s;if(n<o){let a=0,c=.8*r,u=1-c/o;s=(n-a)/(c+u*(n-a))*.8}else{let a=o,c=.2*o*o*1.25*1.25/r,u=1-c/(i-o);s=.8+.2*((n-a)/(c+u*(n-a)))}return s&&(t.s=s,t.h=be(Math.atan2(e.b,e.a)*180/Math.PI)),t}function ld(e){let t=xo(e.l);const n={mode:"oklab",l:t};if(e.alpha!==void 0&&(n.alpha=e.alpha),!e.s||e.l===1)return n.a=n.b=0,n;let r=Math.cos(e.h/180*Math.PI),o=Math.sin(e.h/180*Math.PI),[i,s,a]=ad(t,r,o),c,u,d,l;e.s<.8?(c=1.25*e.s,u=0,d=.8*i,l=1-d/s):(c=5*(e.s-.8),u=s,d=.2*s*s*1.25*1.25/i,l=1-d/(a-s));let f=u+c*d/(1-l*c);return n.a=f*r,n.b=f*o,n}const Ob={...Hu,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:cd,rgb:e=>cd(wo(e))},toMode:{oklab:ld,rgb:e=>_o(ld(e))}};function ud(e){let t=Math.sqrt(e.a*e.a+e.b*e.b),n=e.l,r=t?e.a/t:1,o=t?e.b/t:1,[i,s]=Ps(r,o),a=.5,c=1-a/i,u=s/(t+n*s),d=u*n,l=u*t,f=xo(d),h=l*f/d,p=ar({l:f,a:r*h,b:o*h}),m=Math.cbrt(1/Math.max(p.r,p.g,p.b,0));n=n/m,t=t/m*Cs(n)/n,n=Cs(n);const y={mode:"okhsv",s:t?(a+s)*l/(s*a+s*c*l):0,v:n?n/d:0};return y.s&&(y.h=be(Math.atan2(e.b,e.a)*180/Math.PI)),e.alpha!==void 0&&(y.alpha=e.alpha),y}function dd(e){const t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);const n=e.h||0,r=Math.cos(n/180*Math.PI),o=Math.sin(n/180*Math.PI),[i,s]=Ps(r,o),a=.5,c=1-a/i,u=1-e.s*a/(a+s-s*c*e.s),d=e.s*s*a/(a+s-s*c*e.s),l=xo(u),f=d*l/u,h=ar({l,a:r*f,b:o*f}),p=Math.cbrt(1/Math.max(h.r,h.g,h.b,0)),m=xo(e.v*u),y=d*m/u;return t.l=m*p,t.a=y*r*p,t.b=y*o*p,t}const Lb={...qu,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ud,rgb:e=>ud(wo(e))},toMode:{oklab:dd,rgb:e=>_o(dd(e))}};function Nb(e,t){if(!t||t[0]!=="oklab")return;const n={mode:"oklab"},[,r,o,i,s]=t;if(!(r.type===$.Hue||o.type===$.Hue||i.type===$.Hue))return r.type!==$.None&&(n.l=r.type===$.Number?r.value:r.value/100),o.type!==$.None&&(n.a=o.type===$.Number?o.value:o.value*.4/100),i.type!==$.None&&(n.b=i.type===$.Number?i.value:i.value*.4/100),s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Rb={...$s,mode:"oklab",toMode:{lrgb:ar,rgb:_o},fromMode:{lrgb:sd,rgb:wo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Nb],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`};function Ib(e,t){if(!t||t[0]!=="oklch")return;const n={mode:"oklch"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Hue)return;n.l=r.type===$.Number?r.value:r.value/100}if(o.type!==$.None&&(n.c=Math.max(0,o.type===$.Number?o.value:o.value*.4/100)),i.type!==$.None){if(i.type===$.Percentage)return;n.h=i.value}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Db={...Ss,mode:"oklch",toMode:{oklab:e=>Tt(e,"oklab"),rgb:e=>_o(Tt(e,"oklab"))},fromMode:{rgb:e=>Mt(wo(e),"oklch"),oklab:e=>Mt(e,"oklch")},parse:[Ib],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h||0}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},fd=e=>{let{r:t,g:n,b:r,alpha:o}=_n(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return o!==void 0&&(i.alpha=o),i},hd=({x:e,y:t,z:n,alpha:r})=>{let o=kn({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(o.alpha=r),o},Fb={...wn,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>hd(xn(e)),xyz65:hd},toMode:{rgb:e=>$n(fd(e)),xyz65:fd}},Es=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},pd=({x:e,y:t,z:n,alpha:r})=>{let o={mode:"prophoto",r:Es(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:Es(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:Es(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(o.alpha=r),o},Vs=e=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},md=e=>{let t=Vs(e.r),n=Vs(e.g),r=Vs(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},zb={...wn,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:pd,rgb:e=>pd(sr(e))},toMode:{xyz50:md,rgb:e=>ir(md(e))}},vd=1.09929682680944,Bb=.018053968510807,Os=e=>{const t=Math.abs(e);return t>Bb?(Math.sign(e)||1)*(vd*Math.pow(t,.45)-(vd-1)):4.5*e},gd=({x:e,y:t,z:n,alpha:r})=>{let o={mode:"rec2020",r:Os(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Os(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Os(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(o.alpha=r),o},bd=1.09929682680944,jb=.018053968510807,Ls=e=>{let t=Math.abs(e);return t<jb*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+bd-1)/bd,1/.45)},yd=e=>{let t=Ls(e.r),n=Ls(e.g),r=Ls(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},Hb={...wn,mode:"rec2020",fromMode:{xyz65:gd,rgb:e=>gd(xn(e))},toMode:{xyz65:yd,rgb:e=>$n(yd(e))},parse:["rec2020"],serialize:"rec2020"},Kt=.0037930732552754493,wd=Math.cbrt(Kt),Ns=e=>Math.cbrt(e)-wd,Ub=e=>{const{r:t,g:n,b:r,alpha:o}=_n(e),i=Ns(.3*t+.622*n+.078*r+Kt),s=Ns(.23*t+.692*n+.078*r+Kt),a=Ns(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+Kt),c={mode:"xyb",x:(i-s)/2,y:(i+s)/2,b:a-(i+s)/2};return o!==void 0&&(c.alpha=o),c},Rs=e=>Math.pow(e+wd,3),Xb={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:e,y:t,b:n,alpha:r})=>{const o=Rs(e+t)-Kt,i=Rs(t-e)-Kt,s=Rs(n+t)-Kt,a=kn({r:11.031566904639861*o-9.866943908131562*i-.16462299650829934*s,g:-3.2541473810744237*o+4.418770377582723*i-.16462299650829934*s,b:-3.6588512867136815*o+2.7129230459360922*i+1.9459282407775895*s});return r!==void 0&&(a.alpha=r),a}},fromMode:{rgb:Ub},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:A,y:A,b:A,alpha:{use:A,fixup:he}}},qb={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:ir,lab:ks},fromMode:{rgb:sr,lab:_s},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:he}}},Wb={mode:"xyz65",toMode:{rgb:$n,xyz50:e=>{let{x:t,y:n,z:r,alpha:o}=e,i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return o!==void 0&&(i.alpha=o),i}},fromMode:{rgb:xn,xyz50:e=>{let{x:t,y:n,z:r,alpha:o}=e,i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return o!==void 0&&(i.alpha=o),i}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:he}}},Kb={mode:"yiq",toMode:{rgb:({y:e,i:t,q:n,alpha:r})=>{const o={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(o.alpha=r),o}},fromMode:{rgb:({r:e,g:t,b:n,alpha:r})=>{const o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(o.alpha=r),o}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:A,i:A,q:A,alpha:{use:A,fixup:he}}},Yb=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t;((e=4)=>t=>typeof t=="number"?Yb(t,e):t)(2);const Gb=e=>{const t=nr(e);if(!t)return;const n=Wt(t.mode);if(!n.serialize||typeof n.serialize=="string"){let r=`color(${n.serialize||`--${t.mode}`} `;return n.channels.forEach((o,i)=>{o!=="alpha"&&(r+=(i?" ":"")+(t[o]!==void 0?t[o]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(r+=` / ${t.alpha}`),r+")"}if(typeof n.serialize=="function")return n.serialize(t)};it("rgb");const Zb=e=>{const t={mode:e.mode,r:Math.max(0,Math.min(e.r,1)),g:Math.max(0,Math.min(e.g,1)),b:Math.max(0,Math.min(e.b,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},Jb=e=>e!==void 0&&e.r>=0&&e.r<=1&&e.g>=0&&e.g<=1&&e.b>=0&&e.b<=1;function _d(e="rgb"){const{gamut:t}=Wt(e);if(!t)return r=>!0;const n=it(typeof t=="string"?t:e);return r=>Jb(n(r))}function Qb(e="rgb"){const{gamut:t}=Wt(e);if(!t)return i=>nr(i);const n=typeof t=="string"?t:e,r=it(n),o=_d(n);return i=>{const s=nr(i);if(!s)return;const a=r(s);if(o(a))return s;const c=Zb(a);return s.mode===c.mode?c:it(s.mode)(c)}}function e1(e="rgb",t="oklch",n=Lu("oklch"),r=.02){const o=it(e);if(!Wt(e).gamut)return l=>o(l);const i=_d(e),s=Qb(e),a=it(t),{ranges:c}=Wt(t),u=o("white"),d=o("black");return l=>{if(l=nr(l),l===void 0)return;const f={...a(l)};if(f.l>=c.l[1]){const x={...u};return l.alpha!==void 0&&(x.alpha=l.alpha),x}if(f.l<=c.l[0]){const x={...d};return l.alpha!==void 0&&(x.alpha=l.alpha),x}if(i(f))return o(f);let h=0,p=f.c,m=(c.c[1]-c.c[0])/4e3,y=s(f);for(;p-h>m;)f.c=(h+p)*.5,y=s(f),i(f)||n&&r>0&&n(f,y)<=r?h=f.c:p=f.c;return o(i(f)?f:y)}}Z(Ng),Z(jg),Z(Hg),Z(Ug),Z(Wg),Z(Hu),Z(qu),Z(rb),Z(mb),Z(vb),Z($s),Z(bb),Z(Ss),Z(wb),Z(Cb),Z(Ab),Z(Pb),Z(Ob),Z(Lb),Z(Rb),Z(Db),Z(Fb),Z(zb),Z(Hb),Z(wn),Z(Xb),Z(qb),Z(Wb),Z(Kb);const t1=it("oklch"),n1=Object.keys({1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0}),r1={1:{l:97.78,c:.0108},2:{l:93.56,c:.0321},3:{l:88.11,c:.0609},4:{l:82.67,c:.0908},5:{l:74.22,c:.1398},6:{l:64.78,c:.1472},7:{l:57.33,c:.1299},8:{l:46.89,c:.1067},9:{l:39.44,c:.0898},10:{l:32,c:.0726},11:{l:23.78,c:.054},12:{l:15.56,c:.0353}},o1=(e,t=1)=>n=>{const{c:r,l:o}=r1[n],i="oklch("+o+"% "+r*t+" "+e+")",s=t1(e1("p3","oklch",Lu("oklch"),0)(i)),a=Gb(s);if(!a)throw new Error("Could not format color");return a},xd=e=>{const t=o1(e.hue,e.chroma);return Object.fromEntries(n1.map(n=>[n,t(n)]))},i1=e=>e.replace("oklch(","").replace(")",""),s1=e=>`#isdk {
54
- ${e.flatMap(n=>Object.entries(n.colors).map(([r,o])=>`--i-${n.name}-${r}: ${i1(o)};`).join(`
55
- `)).join(`
49
+ `),()=>{document.head.removeChild(u)}},[t]),M(nm,{isPresent:t,childRef:r,sizeRef:i},Qe(e,{ref:r}))}const no=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Da(im),c=zn(),u=oe(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:d=>{a.set(d,!0);for(const l of a.values())if(!l)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),o?void 0:[n]);return oe(()=>{a.forEach((d,l)=>a.set(l,!1))},[n]),H(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=M(rm,{isPresent:n},e)),M(xi.Provider,{value:u},e)};function im(){return new Map}function om(e){return H(()=>()=>e(),[])}const kt=e=>e.key||"";function sm(e,t){e.forEach(n=>{const r=kt(n);t.set(r,n)})}function am(e){const t=[];return Te.forEach(e,n=>{Xe(n)&&t.push(n)}),t}const ro=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Me(!i,"Replace exitBeforeEnter with mode='wait'");const a=fe(wa).forceRender||tm()[0],c=qc(),u=am(e);let d=u;const l=B(new Map).current,f=B(d),h=B(new Map).current,p=B(!0);if(ki(()=>{p.current=!1,sm(u,h),f.current=d}),om(()=>{p.current=!0,h.clear(),l.clear()}),p.current)return M(ee,null,d.map(y=>M(no,{key:kt(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},y)));d=[...d];const v=f.current.map(kt),b=u.map(kt),k=v.length;for(let y=0;y<k;y++){const _=v[y];b.indexOf(_)===-1&&!l.has(_)&&l.set(_,void 0)}return s==="wait"&&l.size&&(d=[]),l.forEach((y,_)=>{if(b.indexOf(_)!==-1)return;const C=h.get(_);if(!C)return;const S=v.indexOf(_);let N=y;if(!N){const I=()=>{l.delete(_);const A=Array.from(h.keys()).filter(E=>!b.includes(E));if(A.forEach(E=>h.delete(E)),f.current=u.filter(E=>{const W=kt(E);return W===_||A.includes(W)}),!l.size){if(c.current===!1)return;a(),r&&r()}};N=M(no,{key:kt(C),isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:o,mode:s},C),l.set(_,N)}d.splice(S,0,N)}),d=d.map(y=>{const _=y.key;return l.has(_)?y:M(no,{key:kt(y),isPresent:!0,presenceAffectsLayout:o,mode:s},y)}),process.env.NODE_ENV!=="production"&&s==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),M(ee,null,l.size?d:d.map(y=>Qe(y)))};function cm({children:e,features:t,strict:n=!1}){const[,r]=re(!io(t)),i=B(void 0);if(!io(t)){const{renderer:o,...s}=t;i.current=o,Ai(s)}return H(()=>{io(t)&&t().then(({renderer:o,...s})=>{Ai(s),i.current=o,r(!0)})},[]),M(Si.Provider,{value:{renderer:i.current,strict:n}},e)}function io(e){return typeof e=="function"}const lm={renderer:em,...Eh,...Zf},we=Symbol.for("@ts-pattern/matcher"),Gc=Symbol.for("@ts-pattern/isVariadic"),$r="@ts-pattern/anonymous-select-key",oo=e=>!!(e&&typeof e=="object"),Ar=e=>e&&!!e[we],le=(e,t,n)=>{if(Ar(e)){const r=e[we](),{matched:i,selections:o}=r.match(t);return i&&o&&Object.keys(o).forEach(s=>n(s,o[s])),i}if(oo(e)){if(!oo(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],i=[],o=[];for(const s of e.keys()){const a=e[s];Ar(a)&&a[Gc]?o.push(a):o.length?i.push(a):r.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+i.length)return!1;const s=t.slice(0,r.length),a=i.length===0?[]:t.slice(-i.length),c=t.slice(r.length,i.length===0?1/0:-i.length);return r.every((u,d)=>le(u,s[d],n))&&i.every((u,d)=>le(u,a[d],n))&&(o.length===0||le(o[0],c,n))}return e.length===t.length&&e.every((s,a)=>le(s,t[a],n))}return Object.keys(e).every(r=>{const i=e[r];return(r in t||Ar(o=i)&&o[we]().matcherType==="optional")&&le(i,t[r],n);var o})}return Object.is(t,e)},Se=e=>{var t,n,r;return oo(e)?Ar(e)?(t=(n=(r=e[we]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?kn(e,Se):kn(Object.values(e),Se):[]},kn=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function um(...e){if(e.length===1){const[t]=e;return n=>le(t,n,()=>{})}if(e.length===2){const[t,n]=e;return le(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ve(e){return Object.assign(e,{optional:()=>ao(e),and:t=>X(e,t),or:t=>Yc(e,t),select:t=>t===void 0?Sn(e):Sn(t,e)})}function so(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Gc]:!0})}}))(e),{optional:()=>so(ao(e)),select:t=>so(t===void 0?Sn(e):Sn(t,e))})}function ao(e){return ve({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return t===void 0?(Se(e).forEach(i=>r(i,void 0)),{matched:!0,selections:n}):{matched:le(e,t,r),selections:n}},getSelectionKeys:()=>Se(e),matcherType:"optional"})})}const dm=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},fm=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function X(...e){return ve({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return{matched:e.every(i=>le(i,t,r)),selections:n}},getSelectionKeys:()=>kn(e,Se),matcherType:"and"})})}function Yc(...e){return ve({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return kn(e,Se).forEach(i=>r(i,void 0)),{matched:e.some(i=>le(i,t,r)),selections:n}},getSelectionKeys:()=>kn(e,Se),matcherType:"or"})})}function z(e){return{[we]:()=>({match:t=>({matched:!!e(t)})})}}function Sn(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ve({[we]:()=>({match:r=>{let i={[t??$r]:r};return{matched:n===void 0||le(n,r,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??$r].concat(n===void 0?[]:Se(n))})})}function Fe(e){return typeof e=="number"}function St(e){return typeof e=="string"}function nt(e){return typeof e=="bigint"}const Zc=ve(z(function(e){return!0})),pm=Zc,Ct=e=>Object.assign(ve(e),{startsWith:t=>{return Ct(X(e,(n=t,z(r=>St(r)&&r.startsWith(n)))));var n},endsWith:t=>{return Ct(X(e,(n=t,z(r=>St(r)&&r.endsWith(n)))));var n},minLength:t=>Ct(X(e,(n=>z(r=>St(r)&&r.length>=n))(t))),maxLength:t=>Ct(X(e,(n=>z(r=>St(r)&&r.length<=n))(t))),includes:t=>{return Ct(X(e,(n=t,z(r=>St(r)&&r.includes(n)))));var n},regex:t=>{return Ct(X(e,(n=t,z(r=>St(r)&&!!r.match(n)))));var n}}),hm=Ct(z(St)),Ie=e=>Object.assign(ve(e),{between:(t,n)=>Ie(X(e,((r,i)=>z(o=>Fe(o)&&r<=o&&i>=o))(t,n))),lt:t=>Ie(X(e,(n=>z(r=>Fe(r)&&r<n))(t))),gt:t=>Ie(X(e,(n=>z(r=>Fe(r)&&r>n))(t))),lte:t=>Ie(X(e,(n=>z(r=>Fe(r)&&r<=n))(t))),gte:t=>Ie(X(e,(n=>z(r=>Fe(r)&&r>=n))(t))),int:()=>Ie(X(e,z(t=>Fe(t)&&Number.isInteger(t)))),finite:()=>Ie(X(e,z(t=>Fe(t)&&Number.isFinite(t)))),positive:()=>Ie(X(e,z(t=>Fe(t)&&t>0))),negative:()=>Ie(X(e,z(t=>Fe(t)&&t<0)))}),mm=Ie(z(Fe)),rt=e=>Object.assign(ve(e),{between:(t,n)=>rt(X(e,((r,i)=>z(o=>nt(o)&&r<=o&&i>=o))(t,n))),lt:t=>rt(X(e,(n=>z(r=>nt(r)&&r<n))(t))),gt:t=>rt(X(e,(n=>z(r=>nt(r)&&r>n))(t))),lte:t=>rt(X(e,(n=>z(r=>nt(r)&&r<=n))(t))),gte:t=>rt(X(e,(n=>z(r=>nt(r)&&r>=n))(t))),positive:()=>rt(X(e,z(t=>nt(t)&&t>0))),negative:()=>rt(X(e,z(t=>nt(t)&&t<0)))}),vm=rt(z(nt)),gm=ve(z(function(e){return typeof e=="boolean"})),ym=ve(z(function(e){return typeof e=="symbol"})),bm=ve(z(function(e){return e==null}));var _e={__proto__:null,matcher:we,optional:ao,array:function(...e){return so({[we]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const n=e[0];let r={};if(t.length===0)return Se(n).forEach(o=>{r[o]=[]}),{matched:!0,selections:r};const i=(o,s)=>{r[o]=(r[o]||[]).concat([s])};return{matched:t.every(o=>le(n,o,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Se(e[0])})})},set:function(...e){return ve({[we]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};const r=(o,s)=>{n[o]=(n[o]||[]).concat([s])},i=e[0];return{matched:dm(t,o=>le(i,o,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Se(e[0])})})},map:function(...e){return ve({[we]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(a,c)=>{n[a]=(n[a]||[]).concat([c])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,s]=e;return{matched:fm(t,(a,c)=>{const u=le(o,c,r),d=le(s,a,r);return u&&d}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Se(e[0]),...Se(e[1])]})})},intersection:X,union:Yc,not:function(e){return ve({[we]:()=>({match:t=>({matched:!le(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:z,select:Sn,any:Zc,_:pm,string:hm,number:mm,bigint:vm,boolean:gm,symbol:ym,nullish:bm,instanceOf:function(e){return ve(z(function(t){return n=>n instanceof t}(e)))},shape:function(e){return ve(z(um(e)))}};const co={matched:!1,value:void 0};function Ue(e){return new Pr(e,co)}class Pr{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,s={};const a=(u,d)=>{o=!0,s[u]=d},c=!r.some(u=>le(u,this.input,a))||i&&!i(this.input)?co:{matched:!0,value:n(o?$r in s?s[$r]:s:this.input,this.input)};return new Pr(this.input,c)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new Pr(this.input,r?{matched:!0,value:n(this.input,this.input)}:co)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}}const Xc="isdk",lo=44,wm={not_in_local_storage:"Application not found in local storage",invalid_end_node:"Unexpected node type to finish flow",no_submissions:"Application ended without any fields submitted",invalid_state:"Invalid state"};function uo(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Qc(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=uo(n);return(i,o)=>r.then(s=>o(s.transaction(t,i).objectStore(t)))}let fo;function Jc(){return fo||(fo=Qc("keyval-store","keyval")),fo}function _m(e,t=Jc()){return t("readonly",n=>uo(n.get(e)))}function xm(e,t,n=Jc()){return n("readwrite",r=>(r.put(t,e),uo(r.transaction)))}const el=typeof window>"u"?void 0:Qc("inploi","applications"),Cn={getApplicationData:async e=>{const t=tl(e);return await _m(t,el)},setApplicationData:async e=>{const t=tl(e.application);return await xm(t,e.data,el)}},tl=e=>[e.job.id,e.flow.id,e.flow.version].join("/"),ze=sn("maximised"),po=sn(53),it=sn({state:"idle"}),$n=e=>{const{state:t,application:n}=it.value;if(t!=="loaded")return;Nt(n,"No application to update");const r=e(n.data),i={...n,data:r};it.value={state:t,application:i},Cn.setApplicationData({application:n,data:r})},Y={current$:it,start:async e=>{const t=await Cn.getApplicationData(e)??nl();it.value={state:"loaded",application:{...e,data:t,startedAt:new Date}},Cn.setApplicationData({application:e,data:t})},cancel:()=>{it.value={state:"idle"}},markAsFinished:()=>$n(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>$n(t=>({...t,currentNodeId:e})),restart:()=>{const{state:e,application:t}=it.value;if(e!=="loaded")throw new Error("Application cannot be restarted: not in valid state");const n=nl();it.value={state:e,application:{...t,data:n,startedAt:new Date}},Cn.setApplicationData({application:t,data:n})},addMessage:(e,t)=>{const n={...e,groupId:t};return $n(r=>({...r,messages:[...r.messages,n]}))},removeLastGroupMessagesById:e=>{var o;const{state:t,application:n}=it.value;Nt(t==="loaded","Application not loaded");const r=[...n.data.messages];let i=r.length-1;for(;i>=0&&r[i]&&((o=r[i])==null?void 0:o.groupId)===e;)r.pop(),i--;n.data.messages=r,Cn.setApplicationData({application:n,data:n.data})},setSubmission:(e,t)=>$n(n=>{const r={...n.submissions};return t===null?delete r[e]:r[e]=t,{...n,submissions:r}}),setInput:e=>$n(t=>({...t,currentInput:e}))},nl=()=>({messages:[],submissions:{},currentNodeId:null,isFinished:!1,sequence:0,flowSessionId:crypto.randomUUID()});var km=0;function g(e,t,n,r,i,o){var s,a,c={};for(a in t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--km,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return V.vnode&&V.vnode(u),u}const Sm=({message:e})=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:[g("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[g("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),g("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),g("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),g("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),g("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),g("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),g("path",{d:"M38 56h19"})]}),g("div",{class:"flex flex-col gap-2 text-center",children:[g("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&g("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Cm=e=>g("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[g("title",{children:"Loading"}),g("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),g("g",{id:"s1",transform:"translate(12,0)",children:g("g",{id:"s2",transform:"scale(0,0)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s3",transform:"translate(12,12)",children:g("g",{id:"s4",transform:"scale(1,1)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s5",transform:"translate(12,0)",children:g("g",{id:"s6",transform:"scale(0,0)",children:g("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),g("g",{id:"s7",transform:"translate(12,0)",children:g("g",{id:"s8",transform:"scale(0,0)",children:g("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),rl=()=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:g(Cm,{class:"text-neutral-6 h-8 w-8"})});function il(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=il(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ot(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=il(e))&&(r&&(r+=" "),r+=t);return r}const Er=({class:e,children:t,...n})=>g("button",{class:ot("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...n,children:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),$m=({children:e})=>{const t=ze.value;return g("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto flex h-[var(--header-height)] items-center gap-2 ring-1 backdrop-blur-md backdrop-saturate-150",children:[g("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),g("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t==="minimised"?ze.value="maximised":ze.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:g("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),g("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:ze.value==="minimised"?g(ee,{children:[g(Er,{"aria-label":"Maximise job application",onClick:()=>ze.value="maximised",children:g("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),g(Er,{"aria-label":"Close application",onClick:Y.cancel,children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):g(ee,{children:[Y.current$.value.state==="loaded"&&g(Er,{"aria-label":"Restart",onClick:()=>{Y.restart()},children:[g("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),g("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),g(Er,{"aria-label":"Minimise application",onClick:()=>ze.value="minimised",children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]})},Am=ii(()=>Promise.resolve().then(()=>Eg).then(e=>e.JobApplicationContent)),Pm=({children:e})=>g(cm,{features:lm,children:e}),Em={closed:{y:"calc(100% + 1rem)",height:lo},maximised:{y:0,height:"75vh"},minimised:{y:0,height:lo}},Vm=({logger:e,apiClient:t,analytics:n})=>{const{state:r,application:i,error:o}=Y.current$.value,s=ze.value,a=r!=="idle"&&s==="maximised",c=B(null);return g(Pm,{children:g(Hd,{open:a,modal:a,children:g(ro,{children:[g(Wd,{forceMount:!0,asChild:!0,children:a&&g(Cr.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:"bg-overlay fixed inset-0"})},"bg"),g(Kd,{forceMount:!0,asChild:!0,children:g(Cr.div,{ref:c,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",variants:Em,initial:"closed",animate:Ue({state:r,view:s}).with({state:"idle"},()=>"closed").with({state:_e.union("loaded","error","loading")},({view:u})=>u).exhaustive(),exit:"closed",style:{"--header-height":`${lo}px`},class:"selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",children:g("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[g($m,{children:i?`Applying for “${i.job.title}” at ${i.company.name}`:"inploi chatbot: "+r}),(()=>{switch(r){case"idle":return null;case"loading":return g(rl,{},"loading");case"loaded":return s!=="maximised"?null:g(Lt,{fallback:g(rl,{},"loading"),children:g(Am,{analytics:n,currentApplication:i,apiClient:t,logger:e})});case"error":return g(Sm,{message:o});default:au(r)}})()]})},"content")})]})})})};function Tm(e){return(Array.isArray(e)?e:e.issues).reduce((t,n)=>{if(n.path){if(n.path.every(({key:r})=>typeof r=="string"||typeof r=="number")){const r=n.path.map(({key:i})=>i).join(".");t.nested[r]?t.nested[r].push(n.message):t.nested[r]=[n.message]}}else t.root?t.root.push(n.message):t.root=[n.message];return t},{nested:{}})}var Vr=class extends Error{constructor(t){super(t[0].message);Wl(this,"issues");this.name="ValiError",this.issues=t}};function ol(e,t){return{...e,_parse(n,r){return e._parse(t(n),r)}}}function An(e){return{issues:e}}function He(e){return{output:e}}function Om(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,path:t.path,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Mm(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function st(e,t,n,r){if(!t||!t.length||n!=null&&n.skipPipe)return He(e);let i,o,s=e;for(const a of t){const c=a._parse(s);if(c.issues){i=i||Mm(n,r);for(const u of c.issues){const d=Om(i,u);o?o.push(d):o=[d]}if(i.abortEarly||i.abortPipeEarly)break}else s=c.output}return o?An(o):He(s)}function at(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function sl(e){return typeof e=="function"?e():e}function Pn(e,t,n,r){return An([{validation:e,message:sl(t),input:n,requirement:r}])}function Fm(e,t,n){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,s]=at(t,n);return[e,o,s]}const[r,i]=at(e,t);return[void 0,r,i]}function $t(e,t,n,r,i,o){return{issues:[{reason:t,validation:n,origin:(e==null?void 0:e.origin)||"value",message:sl(r),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Im(e){return typeof e.default=="function"?e.default():e.default}function Dm(e){return{type:"any",async:!1,pipe:e,_parse(t,n){return st(t,this.pipe,n,"any")}}}function Nm(e,t,n){const[r="Invalid type",i]=at(t,n);return{type:"array",async:!1,item:e,message:r,pipe:i,_parse(o,s){if(!Array.isArray(o))return $t(s,"type","array",this.message,o);let a;const c=[];for(let u=0;u<o.length;u++){const d=o[u],l=this.item._parse(d,s);if(l.issues){const f={type:"array",input:o,key:u,value:d};for(const h of l.issues)h.path?h.path.unshift(f):h.path=[f],a==null||a.push(h);if(a||(a=l.issues),s!=null&&s.abortEarly)break}else c.push(l.output)}return a?An(a):st(c,this.pipe,s,"array")}}}function Lm(e,t){const[n="Invalid type",r]=at(e,t);return{type:"boolean",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="boolean"?$t(o,"type","boolean",this.message,i):st(i,this.pipe,o,"boolean")}}}function Rm(e,t){const[n="Invalid type",r]=at(e,t);return{type:"number",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="number"||isNaN(i)?$t(o,"type","number",this.message,i):st(i,this.pipe,o,"number")}}}function Xt(e,t,n,r){const[i,o="Invalid type",s]=Fm(t,n,r);let a;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:s,_parse(c,u){if(!c||typeof c!="object")return $t(u,"type","object",this.message,c);a=a||Object.entries(this.entries);let d;const l={};for(const[f,h]of a){const p=c[f],v=h._parse(p,u);if(v.issues){const b={type:"object",input:c,key:f,value:p};for(const k of v.issues)k.path?k.path.unshift(b):k.path=[b],d==null||d.push(k);if(d||(d=v.issues),u!=null&&u.abortEarly)break}else(v.output!==void 0||f in c)&&(l[f]=v.output)}if(this.rest&&!(u!=null&&u.abortEarly&&d)){for(const f in c)if(!(f in this.entries)){const h=c[f],p=this.rest._parse(h,u);if(p.issues){const v={type:"object",input:c,key:f,value:h};for(const b of p.issues)b.path?b.path.unshift(v):b.path=[v],d==null||d.push(b);if(d||(d=p.issues),u!=null&&u.abortEarly)break}else l[f]=p.output}}return d?An(d):st(l,this.pipe,u,"object")}}}function Bm(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(n,r){if(n===void 0){const i=Im(this);if(i===void 0)return He(n);n=i}return this.wrapped._parse(n,r)}}}function jm(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(n,r){return this.options.includes(n)?He(n):$t(r,"type","picklist",this.message,n)}}}function De(e,t){const[n="Invalid type",r]=at(e,t);return{type:"string",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="string"?$t(o,"type","string",this.message,i):st(i,this.pipe,o,"string")}}}function Um(e,t,n,r){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=at(n,r);return[e,t,s,a]}const[i,o]=at(t,n);return[De(),e,i,o]}var zm=["__proto__","prototype","constructor"];function Hm(e,t,n,r){const[i,o,s="Invalid type",a]=Um(e,t,n,r);return{type:"record",async:!1,key:i,value:o,message:s,pipe:a,_parse(c,u){if(!c||typeof c!="object")return $t(u,"type","record",this.message,c);let d;const l={};for(const[f,h]of Object.entries(c))if(!zm.includes(f)){let p;const v=this.key._parse(f,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(v.issues){p={type:"record",input:c,key:f,value:h};for(const k of v.issues)k.path=[p],d==null||d.push(k);if(d||(d=v.issues),u!=null&&u.abortEarly)break}const b=this.value._parse(h,u);if(b.issues){p=p||{type:"record",input:c,key:f,value:h};for(const k of b.issues)k.path?k.path.unshift(p):k.path=[p],d==null||d.push(k);if(d||(d=b.issues),u!=null&&u.abortEarly)break}!v.issues&&!b.issues&&(l[v.output]=b.output)}return d?An(d):st(l,this.pipe,u,"record")}}}function ho(e,t,n){const r=e._parse(t,n);if(r.issues)throw new Vr(r.issues);return r.output}async function Wm(e,t,n){const r=await e._parse(t,n);if(r.issues)throw new Vr(r.issues);return r.output}function al(e,t,n){return{...e,_parse(r,i){const o=e._parse(r,i);if(o.issues)return o;const s=t(o.output);return n&&!Array.isArray(n)?n._parse(s,i):st(s,n,i,typeof s)}}}var Km=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function qm(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Km,_parse(t){return this.requirement.test(t)?He(t):Pn(this.type,this.message,t,this.requirement)}}}function Gm(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(n){return n.length>this.requirement?Pn(this.type,this.message,n,this.requirement):He(n)}}}function cl(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(n){return n.length<this.requirement?Pn(this.type,this.message,n,this.requirement):He(n)}}}function Ym(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(n){return this.requirement.test(n)?He(n):Pn(this.type,this.message,n,this.requirement)}}}function Zm(e="Invalid URL"){return{type:"url",async:!1,message:e,requirement(t){try{return new URL(t),!0}catch{return!1}},_parse(t){return this.requirement(t)?He(t):Pn(this.type,this.message,t,this.requirement)}}}const Xm=Xt({job:Xt({id:ol(De(),String),title:De()}),company:Xt({name:De(),logo:Bm(De())}),flow:Xt({id:ol(De(),String),version:Rm(),nodes:Nm(Dm())})});async function Qm({jobId:e,apiClient:t,logger:n}){try{const r=await t.fetch(`/flow/job/${e}`);return{ok:!0,value:ho(Xm,r)}}catch(r){return r instanceof Vr?(n.error(Tm(r).nested),{ok:!1,error:"API error: Invalid application data received"}):r instanceof Le?{ok:!1,error:"Application flow not found."}:r instanceof Error?(n.error(r),{ok:!1,error:r.message}):(n.error(r),{ok:!1,error:"Unknown error"})}}const Jm=`#isdk{position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{box-sizing:border-box;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :after{--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: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--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-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk ::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: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--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-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}#isdk .animate-bounce{animation:bounce 1s infinite}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-dashed{border-style:dashed}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .bg-accent-1{background-color:var(--i-color-a-1)}#isdk .bg-accent-3{background-color:var(--i-color-a-3)}#isdk .bg-accent-9{background-color:var(--i-color-a-9)}#isdk .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}#isdk .bg-lowest{background-color:var(--i-color-lowest)}#isdk .bg-neutral-1{background-color:var(--i-color-n-1)}#isdk .bg-neutral-2{background-color:var(--i-color-n-2)}#isdk .bg-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .opacity-0{opacity:0}#isdk .opacity-100{opacity:1}#isdk .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-accent-4{outline-color:var(--i-color-a-4)}#isdk .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}#isdk .outline-divider{outline-color:var(--i-color-divider)}#isdk .outline-neutral-3{outline-color:var(--i-color-n-3)}#isdk .outline-neutral-6{outline-color:var(--i-color-n-6)}#isdk .ring-0{--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);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-1{--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);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-2{--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);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}#isdk .ring-divider{--tw-ring-color: var(--i-color-divider)}#isdk .ring-lowest{--tw-ring-color: var(--i-color-lowest)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[text-wrap\\:pretty\\]{text-wrap:pretty}#isdk .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}#isdk .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}#isdk .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}#isdk .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:ring-4:focus-visible{--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(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}#isdk .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}#isdk .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}#isdk .active\\:text-accent-10:active{color:var(--i-color-a-10)}#isdk .active\\:text-accent-11:active{color:var(--i-color-a-11)}#isdk .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}#isdk .active\\:outline-neutral-10:active{outline-color:var(--i-color-n-10)}#isdk .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}#isdk .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-4{--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(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-accent-7{--tw-ring-color: var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-2{--tw-ring-offset-width: 2px}@media (pointer: coarse){#isdk .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}
50
+ `,ev=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Xc);if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Xc,t}});var tv=["1","2","3","4","5","6","7","8","9","10","11","12"],nv={light:{1:[98.8,.015],2:[97.8,.018],3:[95.8,.025],4:[92,.04],5:[89,.05],6:[85,.07],7:[80.5,.08],8:[74,.11],9:[60,.22],10:[60.5,.2],11:[50,.19],12:[25,.18]},dark:{1:[19,.015],2:[21,.018],3:[25.5,.055],4:[29.3,.084],5:[33.5,.098],6:[39.05,.107],7:[45,.11],8:[55,.13],9:[60,.22],10:[67,.18],11:[79.3,.12],12:[95,.04]}},rv=(e,t=1,n)=>r=>{const[i,o]=nv[n][r];return"oklch("+i+"% "+o*t+" "+e+")"},mo=e=>{const t=rv(e.hue,e.chroma,e.mode);return Object.fromEntries(tv.map(n=>[e.prefix+n,e.transform(t(n))]))},vo=e=>e,iv=e=>{const t=Object.keys(e).flatMap(n=>{const r=e[n];return typeof r=="object"&&r!==null?Object.keys(r).map(i=>{const o=r[i];return[`${String(n)}.${i}`,o]}):[[n,r]]});return Object.fromEntries(t)},Tr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),go=(e,...t)=>{if(!t.length)return e;const n=t.shift();if(Tr(e)&&Tr(n))for(const r in n){const i=n[r];if(Tr(i)){e[r]||Object.assign(e,{[r]:{}});const o=e[r];Tr(o)&&go(o,i)}else Object.assign(e,{[r]:n[r]})}return go(e,...t)},ov=e=>{function t(n,r){const i=[e.prefix,r.toString().replace(/\./g,"-")].join("");return n==="declaration"?`--${i}`:`var(--${i})`}return t},sv=()=>({core:e=>({semantic:t=>({component:n=>({from:r=>{const{theme:i,getToken:o}=r,s=f=>o("reference",f.toString()),a=e({theme:i}),c=t({theme:i,core:s,raw:{core:a}}),u=n({theme:i,core:s,semantic:s,raw:{core:a,semantic:c}}),d=iv(go(a,c,u)),l=([f,h],p)=>{const v=[p,f].filter(Boolean).join(".");return typeof h=="object"?Object.entries(h).flatMap(b=>l(b,v)):[[r.getToken("declaration",v),h]]};return{values:d,declarations:Object.fromEntries(Object.entries(d).flatMap(f=>l(f))),ref:f=>o("reference",f.toString())}}})})})});const[yo,bo,ll]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],av=sv().core(({theme:e})=>({color:{black:yo,white:bo,lowest:e.mode==="light"?bo:yo,highest:e.mode==="light"?yo:bo,...mo({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:vo}),...mo({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:vo}),...mo({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:vo})},typography:{}})).semantic(({core:e,raw:t,theme:n})=>{const r=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:r("n-8",n.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:ll,"bg-hover":r("n-10",.4),"bg-active":r("n-10",.5)}}}).component(({raw:e,theme:t,semantic:n,core:r})=>{const i=(o,s)=>e.core.color[o].replace(")",` / ${s})`);return{app:{bg:r(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":r(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":n("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":ll,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)}}}),cv=ov({prefix:"i-"}),lv=e=>{const t=av.from({theme:e,getToken:cv}),n=Object.entries(t.declarations).map(([r,i])=>`${r}: ${i};`);return`#isdk {
51
+ ${n.concat(n).join(`
56
52
  `)}
57
- }`,a1=({_internal_domManager:e=hg(),theme:t})=>Vt(({apiClient:n,logger:r,analytics:o})=>{let i=!1;const s=()=>{if(typeof window>"u")return;const a=e.getOrCreateChatbotElement();e.addStyle(fg,"inploi-chatbot-style");const c=s1([{name:"a",colors:xd(t)},{name:"n",colors:xd({hue:t.hue,chroma:.1})}]);e.addStyle(c,"inploi-chatbot-theme"),en(R(Hv,{apiClient:n,logger:r,analytics:o}),a),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;s(),r.info("Chatbot plugin prepared")}catch(a){console.error(a),r.error("Error preparing chatbot plugin",a)}},startApplication:async({jobId:a})=>{if(!(typeof window>"u"))try{ee.cancel(),mf(()=>{rt.value="maximised",ee.current$.value={state:"loading"}}),dg({jobId:a,apiClient:n,logger:r}).then(async c=>{c.ok?ee.start(c.value):ee.current$.value={state:"error",error:c.error}}),i||s()}catch(c){console.error(c),r.error("Error starting application",c)}},closeApplication:async()=>{typeof window>"u"||(r.info("Closing application from an external source"),ee.cancel())}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=a1;const kd=e=>{const t=e.find(n=>n.isHead);if(!t)throw new Error("No head node found");return t},c1=e=>Object.entries(e).reduce((n,[r,o])=>(n[r]=o.value,n),{}),Is=e=>t=>t?t.type===e:!1;class cr extends Error{constructor(){super("Aborted")}}const $d=({node:e,nodes:t,stopWhen:n})=>{if((n==null?void 0:n(e))===!0)return e;const r=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(r)return $d({node:r,nodes:t,stopWhen:n})},l1=({childNode:e,nodes:t})=>{const r=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(a=>a.id===o.branchId);if(!i)return!1;const s=$d({node:i,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(r!=null&&r.nextId)return t.find(o=>o.id===r.nextId)},u1=({flow:e,analytics:t,logger:n,context:r,apiClient:o,getSubmissions:i,chatService:s,onFlowEnd:a,onInterpret:c})=>{const u=new AbortController,d=async(l,f)=>{const h=i();c==null||c(l,f);try{await d1({analytics:t,logger:n,apiClient:o,context:r,node:l,submissions:h,chat:{sendMessage:async p=>s.send({groupId:l.id,message:p,signal:u.signal}),userInput:async p=>s.input({input:p,signal:u.signal})},next:p=>{const m=p?e.find(y=>y.id===p):l1({childNode:l,nodes:e});return m?d(m,l):a==null?void 0:a(l)},end:()=>a==null?void 0:a(l)})}catch(p){if(p instanceof cr)return;throw p}};return{interpret:async l=>{const f=e.find(h=>h.id===l)??kd(e);return d(f)},abort:()=>{u.abort()}}};async function d1(e){return await nt(e).with({node:{type:"text"}},m1).with({node:{type:"image"}},v1).with({node:{type:"question-text"}},g1).with({node:{type:"question-enum"}},y1).with({node:{type:"question-number"}},b1).with({node:{type:"question-boolean"}},w1).with({node:{type:"question-file"}},x1).with({node:{type:"question-address"}},_1).with({node:{type:"end-flow"}},k1).with({node:{type:"if-block"}},p1).with({node:{type:"jump"}},({node:t,next:n})=>n(t.data.targetId)).with({node:{type:"link"}},h1).with({node:{type:"integration-application-submit"}},f1).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function f1({chat:e,next:t,node:n,logger:r,apiClient:o,submissions:i,context:s,analytics:a}){await e.userInput({type:"multiple-choice",key:void 0,config:{options:[{label:"Submit my application",value:"submit"}],maxSelected:1,minSelected:1}});const c=()=>{const d=typeof s.jobId=="string"?s.jobId:void 0,l=typeof s.flowId=="string"?s.flowId:void 0;rn(d),rn(l),d&&a.log({event:"APPLY_COMPLETE",attributionKey:`job_${d}`,properties:{job_id:d,flow_id:l}})};await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const u=await o.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,type:n.data.type,ats:n.data.ats,integration_id:n.data.integrationId,anonymous_id:a.getAnonymousId(),submissions:c1(i||{})})}).catch(d=>d);await nt(u).with({ats_data:{redirect_url:Ae.string}},async d=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const l=a.getAnonymousId(),f=new URL(d.ats_data.redirect_url);l&&!f.searchParams.has("anonymous_id")&&f.searchParams.set("anonymous_id",l),c(),await e.sendMessage({type:"link",href:f.toString(),text:"Finalise application on partner"}),t(n.nextId)}).with({success:!0},async()=>{c(),await e.sendMessage({type:"system",variant:"success",text:"Application submitted"}),t(n.nextId)}).otherwise(async d=>{r.error(d),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(n.id)})}async function h1({chat:e,next:t,node:n}){await e.sendMessage({type:"link",href:n.data.href,text:n.data.cta}),t(n.nextId)}async function p1({submissions:e,next:t,node:n}){const r=$1(n,e)?n.branchId:n.nextId;t(r)}async function m1({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.text}),t(n.nextId)}async function v1({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"image",url:n.data.url,height:n.data.height,width:n.data.width}),t(n.nextId)}async function g1({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const r=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:n.data.format}});r.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.value}),t(n.nextId)}async function b1({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const r=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:"text"}});r.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.value}),t(n.nextId)}async function y1({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const r=await e.userInput({key:n.data.key,type:"multiple-choice",config:n.data});r.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:n.data.options.filter(o=>r.value.includes(o.value)).map(o=>o.label).join(", ")}),t(n.nextId)}async function w1({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const o=(await e.userInput({key:n.data.key,type:"boolean",config:{optional:n.data.optional,labels:{true:n.data.trueLabel,false:n.data.falseLabel}}})).value;o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:{true:n.data.trueLabel,false:n.data.falseLabel}[o]}),t(n.nextId)}async function _1({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:"Address questions are not implemented yet"}),t(n.nextId)}async function x1({node:e,chat:t,next:n}){await t.sendMessage({author:"bot",type:"text",text:e.data.question});const r=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(r.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const o of r.value)await t.sendMessage({author:"user",type:"file",fileName:o.name,fileSizeKb:o.sizeKb});n(e.nextId)}async function k1({chat:e,end:t,node:n}){await e.sendMessage({type:"system",variant:"info",text:n.data.systemMessage}),t()}const Sd=Ae.union(Ae.string,Ae.array(Ae.string),null),$1=(e,t)=>{const n=t==null?void 0:t[e.data.compareKey];return n?nt({...e.data,answer:n}).with({compare:"equals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r===n.value.toString():!1).with({compare:"notEquals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r!==n.value.toString():!1).with({compare:"contains",answer:{value:Sd}},({compareValue:r,answer:o})=>o.value!==null&&o.value.includes(r)).with({compare:"notContains",answer:{value:Sd}},({compareValue:r,answer:o})=>o.value===null||!o.value.includes(r)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},ko=({class:e,...t})=>g("button",{class:xt("bg-accent-7 active:bg-accent-10 active:text-accent-2 text-lowest pointer-coarse:touch-hitbox focus-visible:ring-accent-7/50 flex-shrink-0 rounded-full p-2 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[g("title",{children:"Send"}),g("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),g("path",{d:"M8 4V13"})]})}),$o=({class:e,...t})=>g("button",{class:xt("focus-visible:ring-accent-7/50 text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",e),...t,children:[g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[g("title",{children:"Skip"}),g("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),g("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Ds=()=>{const e=U(null);return G(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Md=["true","false"],S1=eg(Md),M1="answer",T1=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{const r=Ds();return n(),g("form",{noValidate:!0,class:"",onSubmit:o=>{o.preventDefault();const i=nt(o).with({nativeEvent:{submitter:Ae.select(Ae.union(Ae.instanceOf(HTMLButtonElement),Ae.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=rs(S1,i);t(s)},children:[g("div",{class:"flex items-center gap-2 p-2.5",children:Md.map((o,i)=>g("button",{ref:i===0?r:null,type:"submit",name:M1,value:o,class:"bg-lowest ease-expo-out ring-neutral-12/5 text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr duration-snappy block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:g("p",{class:"truncate text-center text-base",children:e.config.labels[o]})}))}),e.config.optional&&g("div",{class:"pb-2",children:g($o,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Fs=({error:e,onAnimationComplete:t})=>(Fe(()=>{e&&t()},[e,t]),e?g("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[g("svg",{class:"text-error-10 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),g("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),g("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),g("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null),C1=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>r.result?t(r.result.toString()):n("No result from reader"),r.onerror=n}),So=e=>nt(e).with(Ae.number.lte(1e3),()=>`${Math.round(e)}KB`).with(Ae.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),A1=e=>e.reduce((t,n)=>t+n.sizeKb,0),P1=Is("file"),Td=3,E1=({file:e,class:t,...n})=>{const r=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${r}$`),"");return g("div",{class:xt("bg-accent-1 outline-neutral-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...n,children:[g("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[g("span",{class:"block truncate",children:o}),g("span",{children:[".",r]})]}),g("p",{"aria-label":"File size",class:"text-neutral-10",children:So(e.sizeKb)})]})},Cd=({class:e,...t})=>g("li",{class:xt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),V1=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var l;const r=(l=ee.current$.value.application)==null?void 0:l.data.submissions[e.key],[o,i]=ce(P1(r)&&r.value!==null?r.value:[]),[s,a]=ce(),c=o.length-Td,u=A1(o),d=Ds();return g("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:f=>(f.preventDefault(),a(void 0),o.length===0?a({type:"required",message:"Please select a file"}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${So(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&o.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(o)),children:[g("div",{class:"flex items-center gap-2",children:[g("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[o.length>0?g(ae,{children:[g("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[o.slice(0,Td).map(f=>{const h=f.name.split(".").pop(),p=f.name.replace(new RegExp(`.${h}$`),"");return g(Cd,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:p}),g("span",{children:[".",h]})]})}),c>0?g(Cd,{children:["+",c," file",c!==1?"s":""]}):null]}),g("p",{class:"text-neutral-11 text-xs",children:[So(u)," ",o.length>1?"total":""]})]}):g("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[g("header",{class:"flex flex-col items-center gap-0",children:[g("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:g("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),g("p",{class:"text-neutral-12 tracking-[-0.01em] dark:text-gray-400",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?g("p",{class:"text-neutral-10 text-xs",children:["(max ",So(e.config.fileSizeLimitKib),")"]}):null]}),g("aside",{class:"flex flex-col items-center gap-2",children:[g("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),g("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(f=>g("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:f.replace(".","")}))})]})]}),g("input",{id:"dropzone-file",onInput:async f=>{rn(f.target instanceof HTMLInputElement);const h=f.target.files?Array.from(f.target.files):[],p=await Promise.allSettled(h.map(async y=>{const x=await C1(y);return{name:y.name,data:x,sizeKb:y.size/1e3}}));if(p.some(({status:y})=>y==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=p.map(y=>y.status==="fulfilled"?y.value:null).filter(Boolean);i(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),g("div",{class:"flex h-full flex-col items-center gap-2",children:[g(ko,{disabled:o.length===0}),e.config.optional&&g($o,{onClick:()=>t(null)})]})]}),s&&g(Fs,{onAnimationComplete:n,error:s})]})};var lr=e=>e.type==="checkbox",Mn=e=>e instanceof Date,Me=e=>e==null;const Ad=e=>typeof e=="object";var fe=e=>!Me(e)&&!Array.isArray(e)&&Ad(e)&&!Mn(e),O1=e=>fe(e)&&e.target?lr(e.target)?e.target.checked:e.target.value:e,L1=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,N1=(e,t)=>e.has(L1(t)),R1=e=>{const t=e.constructor&&e.constructor.prototype;return fe(t)&&t.hasOwnProperty("isPrototypeOf")},zs=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ct(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(!(zs&&(e instanceof Blob||e instanceof FileList))&&(n||fe(e)))if(t=n?[]:{},!n&&!R1(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=ct(e[r]));else return e;return t}var ur=e=>Array.isArray(e)?e.filter(Boolean):[],ie=e=>e===void 0,O=(e,t,n)=>{if(!t||!fe(e))return n;const r=ur(t.split(/[,[\].]+?/)).reduce((o,i)=>Me(o)?o:o[i],e);return ie(r)||r===e?ie(e[t])?n:e[t]:r},Ct=e=>typeof e=="boolean";const Pd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Be={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},lt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ze.createContext(null);var I1=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==Be.all&&(t._proxyFormState[s]=!r||Be.all),n&&(n[s]=!0),e[s]}});return o},Oe=e=>fe(e)&&!Object.keys(e).length,D1=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Oe(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!r||Be.all))},Bs=e=>Array.isArray(e)?e:[e];function F1(e){const t=ze.useRef(e);t.current=e,ze.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ye=e=>typeof e=="string",z1=(e,t,n,r,o)=>Ye(e)?(r&&t.watch.add(e),O(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),O(n,i))):(r&&(t.watchAll=!0),n),js=e=>/^\w*$/.test(e),Ed=e=>ur(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Q(e,t,n){let r=-1;const o=js(t)?[t]:Ed(t),i=o.length,s=i-1;for(;++r<i;){const a=o[r];let c=n;if(r!==s){const u=e[a];c=fe(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}e[a]=c,e=e[a]}return e}var Vd=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},Od=e=>({isOnSubmit:!e||e===Be.onSubmit,isOnBlur:e===Be.onBlur,isOnChange:e===Be.onChange,isOnAll:e===Be.all,isOnTouch:e===Be.onTouched}),Ld=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Mo=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=O(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break}else fe(a)&&Mo(a,t)}}};var B1=(e,t,n)=>{const r=ur(O(e,n));return Q(r,"root",t[n]),Q(e,n,r),e},Hs=e=>e.type==="file",At=e=>typeof e=="function",To=e=>{if(!zs)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Co=e=>Ye(e),Us=e=>e.type==="radio",Ao=e=>e instanceof RegExp;const Nd={value:!1,isValid:!1},Rd={value:!0,isValid:!0};var Id=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ie(e[0].attributes.value)?ie(e[0].value)||e[0].value===""?Rd:{value:e[0].value,isValid:!0}:Rd:Nd}return Nd};const Dd={isValid:!1,value:null};var Fd=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Dd):Dd;function zd(e,t,n="validate"){if(Co(e)||Array.isArray(e)&&e.every(Co)||Ct(e)&&!e)return{type:n,message:Co(e)?e:"",ref:t}}var Tn=e=>fe(e)&&!Ao(e)?e:{value:e,message:""},Bd=async(e,t,n,r,o)=>{const{ref:i,refs:s,required:a,maxLength:c,minLength:u,min:d,max:l,pattern:f,validate:h,name:p,valueAsNumber:m,mount:y,disabled:x}=e._f,b=O(t,p);if(!y||x)return{};const w=s?s[0]:i,M=j=>{r&&w.reportValidity&&(w.setCustomValidity(Ct(j)?"":j||""),w.reportValidity())},S={},I=Us(i),N=lr(i),C=I||N,E=(m||Hs(i))&&ie(i.value)&&ie(b)||To(i)&&i.value===""||b===""||Array.isArray(b)&&!b.length,q=Vd.bind(null,p,n,S),K=(j,B,H,X=lt.maxLength,re=lt.minLength)=>{const se=j?B:H;S[p]={type:j?X:re,message:se,ref:i,...q(j?X:re,se)}};if(o?!Array.isArray(b)||!b.length:a&&(!C&&(E||Me(b))||Ct(b)&&!b||N&&!Id(s).isValid||I&&!Fd(s).isValid)){const{value:j,message:B}=Co(a)?{value:!!a,message:a}:Tn(a);if(j&&(S[p]={type:lt.required,message:B,ref:w,...q(lt.required,B)},!n))return M(B),S}if(!E&&(!Me(d)||!Me(l))){let j,B;const H=Tn(l),X=Tn(d);if(!Me(b)&&!isNaN(b)){const re=i.valueAsNumber||b&&+b;Me(H.value)||(j=re>H.value),Me(X.value)||(B=re<X.value)}else{const re=i.valueAsDate||new Date(b),se=ut=>new Date(new Date().toDateString()+" "+ut),Le=i.type=="time",Ne=i.type=="week";Ye(H.value)&&b&&(j=Le?se(b)>se(H.value):Ne?b>H.value:re>new Date(H.value)),Ye(X.value)&&b&&(B=Le?se(b)<se(X.value):Ne?b<X.value:re<new Date(X.value))}if((j||B)&&(K(!!j,H.message,X.message,lt.max,lt.min),!n))return M(S[p].message),S}if((c||u)&&!E&&(Ye(b)||o&&Array.isArray(b))){const j=Tn(c),B=Tn(u),H=!Me(j.value)&&b.length>+j.value,X=!Me(B.value)&&b.length<+B.value;if((H||X)&&(K(H,j.message,B.message),!n))return M(S[p].message),S}if(f&&!E&&Ye(b)){const{value:j,message:B}=Tn(f);if(Ao(j)&&!b.match(j)&&(S[p]={type:lt.pattern,message:B,ref:i,...q(lt.pattern,B)},!n))return M(B),S}if(h){if(At(h)){const j=await h(b,t),B=zd(j,w);if(B&&(S[p]={...B,...q(lt.validate,B.message)},!n))return M(B.message),S}else if(fe(h)){let j={};for(const B in h){if(!Oe(j)&&!n)break;const H=zd(await h[B](b,t),w,B);H&&(j={...H,...q(B,H.message)},M(H.message),n&&(S[p]=j))}if(!Oe(j)&&(S[p]={ref:w,...j},!n))return S}}return M(!0),S};function j1(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ie(e)?r++:e[t[r++]];return e}function H1(e){for(const t in e)if(e.hasOwnProperty(t)&&!ie(e[t]))return!1;return!0}function ye(e,t){const n=Array.isArray(t)?t:js(t)?[t]:Ed(t),r=n.length===1?e:j1(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(fe(r)&&Oe(r)||Array.isArray(r)&&H1(r))&&ye(e,n.slice(0,-1)),e}function Xs(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Po=e=>Me(e)||!Ad(e);function Yt(e,t){if(Po(e)||Po(t))return e===t;if(Mn(e)&&Mn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const s=t[o];if(Mn(i)&&Mn(s)||fe(i)&&fe(s)||Array.isArray(i)&&Array.isArray(s)?!Yt(i,s):i!==s)return!1}}return!0}var jd=e=>e.type==="select-multiple",U1=e=>Us(e)||lr(e),qs=e=>To(e)&&e.isConnected,Hd=e=>{for(const t in e)if(At(e[t]))return!0;return!1};function Eo(e,t={}){const n=Array.isArray(e);if(fe(e)||n)for(const r in e)Array.isArray(e[r])||fe(e[r])&&!Hd(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Eo(e[r],t[r])):Me(e[r])||(t[r]=!0);return t}function Ud(e,t,n){const r=Array.isArray(e);if(fe(e)||r)for(const o in e)Array.isArray(e[o])||fe(e[o])&&!Hd(e[o])?ie(t)||Po(n[o])?n[o]=Array.isArray(e[o])?Eo(e[o],[]):{...Eo(e[o])}:Ud(e[o],Me(t)?{}:t[o],n[o]):n[o]=!Yt(e[o],t[o]);return n}var Ws=(e,t)=>Ud(e,t,Eo(t)),Xd=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ie(e)?e:t?e===""?NaN:e&&+e:n&&Ye(e)?new Date(e):r?r(e):e;function Ks(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Hs(t)?t.files:Us(t)?Fd(e.refs).value:jd(t)?[...t.selectedOptions].map(({value:n})=>n):lr(t)?Id(e.refs).value:Xd(ie(t.value)?e.ref.value:t.value,e)}var X1=(e,t,n,r)=>{const o={};for(const i of e){const s=O(t,i);s&&Q(o,i,s._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},dr=e=>ie(e)?e:Ao(e)?e.source:fe(e)?Ao(e.value)?e.value.source:e.value:e,q1=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function qd(e,t,n){const r=O(e,n);if(r||js(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=O(t,i),a=O(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:n}}var W1=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,K1=(e,t)=>!ur(O(e,t)).length&&ye(e,t);const Y1={mode:Be.onSubmit,reValidateMode:Be.onChange,shouldFocusError:!0};function G1(e={},t){let n={...Y1,...e},r={submitCount:0,isDirty:!1,isLoading:At(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=fe(n.defaultValues)||fe(n.values)?ct(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:ct(i),a={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const l={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Xs(),array:Xs(),state:Xs()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=Od(n.mode),m=Od(n.reValidateMode),y=n.criteriaMode===Be.all,x=v=>_=>{clearTimeout(d),d=setTimeout(v,_)},b=async v=>{if(l.isValid||v){const _=n.resolver?Oe((await E()).errors):await K(o,!0);_!==r.isValid&&f.state.next({isValid:_})}},w=v=>l.isValidating&&f.state.next({isValidating:v}),M=(v,_=[],k,L,P=!0,T=!0)=>{if(L&&k){if(a.action=!0,T&&Array.isArray(O(o,v))){const D=k(O(o,v),L.argA,L.argB);P&&Q(o,v,D)}if(T&&Array.isArray(O(r.errors,v))){const D=k(O(r.errors,v),L.argA,L.argB);P&&Q(r.errors,v,D),K1(r.errors,v)}if(l.touchedFields&&T&&Array.isArray(O(r.touchedFields,v))){const D=k(O(r.touchedFields,v),L.argA,L.argB);P&&Q(r.touchedFields,v,D)}l.dirtyFields&&(r.dirtyFields=Ws(i,s)),f.state.next({name:v,isDirty:B(v,_),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Q(s,v,_)},S=(v,_)=>{Q(r.errors,v,_),f.state.next({errors:r.errors})},I=(v,_,k,L)=>{const P=O(o,v);if(P){const T=O(s,v,ie(k)?O(i,v):k);ie(T)||L&&L.defaultChecked||_?Q(s,v,_?T:Ks(P._f)):re(v,T),a.mount&&b()}},N=(v,_,k,L,P)=>{let T=!1,D=!1;const te={name:v};if(!k||L){l.isDirty&&(D=r.isDirty,r.isDirty=te.isDirty=B(),T=D!==te.isDirty);const ue=Yt(O(i,v),_);D=O(r.dirtyFields,v),ue?ye(r.dirtyFields,v):Q(r.dirtyFields,v,!0),te.dirtyFields=r.dirtyFields,T=T||l.dirtyFields&&D!==!ue}if(k){const ue=O(r.touchedFields,v);ue||(Q(r.touchedFields,v,k),te.touchedFields=r.touchedFields,T=T||l.touchedFields&&ue!==k)}return T&&P&&f.state.next(te),T?te:{}},C=(v,_,k,L)=>{const P=O(r.errors,v),T=l.isValid&&Ct(_)&&r.isValid!==_;if(e.delayError&&k?(u=x(()=>S(v,k)),u(e.delayError)):(clearTimeout(d),u=null,k?Q(r.errors,v,k):ye(r.errors,v)),(k?!Yt(P,k):P)||!Oe(L)||T){const D={...L,...T&&Ct(_)?{isValid:_}:{},errors:r.errors,name:v};r={...r,...D},f.state.next(D)}w(!1)},E=async v=>n.resolver(s,n.context,X1(v||c.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),q=async v=>{const{errors:_}=await E(v);if(v)for(const k of v){const L=O(_,k);L?Q(r.errors,k,L):ye(r.errors,k)}else r.errors=_;return _},K=async(v,_,k={valid:!0})=>{for(const L in v){const P=v[L];if(P){const{_f:T,...D}=P;if(T){const te=c.array.has(T.name),ue=await Bd(P,s,y,n.shouldUseNativeValidation&&!_,te);if(ue[T.name]&&(k.valid=!1,_))break;!_&&(O(ue,T.name)?te?B1(r.errors,ue,T.name):Q(r.errors,T.name,ue[T.name]):ye(r.errors,T.name))}D&&await K(D,_,k)}}return k.valid},j=()=>{for(const v of c.unMount){const _=O(o,v);_&&(_._f.refs?_._f.refs.every(k=>!qs(k)):!qs(_._f.ref))&&Ze(v)}c.unMount=new Set},B=(v,_)=>(v&&_&&Q(s,v,_),!Yt(Re(),i)),H=(v,_,k)=>z1(v,c,{...a.mount?s:ie(_)?i:Ye(v)?{[v]:_}:_},k,_),X=v=>ur(O(a.mount?s:i,v,e.shouldUnregister?O(i,v,[]):[])),re=(v,_,k={})=>{const L=O(o,v);let P=_;if(L){const T=L._f;T&&(!T.disabled&&Q(s,v,Xd(_,T)),P=To(T.ref)&&Me(_)?"":_,jd(T.ref)?[...T.ref.options].forEach(D=>D.selected=P.includes(D.value)):T.refs?lr(T.ref)?T.refs.length>1?T.refs.forEach(D=>(!D.defaultChecked||!D.disabled)&&(D.checked=Array.isArray(P)?!!P.find(te=>te===D.value):P===D.value)):T.refs[0]&&(T.refs[0].checked=!!P):T.refs.forEach(D=>D.checked=D.value===P):Hs(T.ref)?T.ref.value="":(T.ref.value=P,T.ref.type||f.values.next({name:v,values:{...s}})))}(k.shouldDirty||k.shouldTouch)&&N(v,P,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&Y(v)},se=(v,_,k)=>{for(const L in _){const P=_[L],T=`${v}.${L}`,D=O(o,T);(c.array.has(v)||!Po(P)||D&&!D._f)&&!Mn(P)?se(T,P,k):re(T,P,k)}},Le=(v,_,k={})=>{const L=O(o,v),P=c.array.has(v),T=ct(_);Q(s,v,T),P?(f.array.next({name:v,values:{...s}}),(l.isDirty||l.dirtyFields)&&k.shouldDirty&&f.state.next({name:v,dirtyFields:Ws(i,s),isDirty:B(v,T)})):L&&!L._f&&!Me(T)?se(v,T,k):re(v,T,k),Ld(v,c)&&f.state.next({...r}),f.values.next({name:v,values:{...s}}),!a.mount&&t()},Ne=async v=>{const _=v.target;let k=_.name,L=!0;const P=O(o,k),T=()=>_.type?Ks(P._f):O1(v),D=te=>{L=Number.isNaN(te)||te===O(s,k,te)};if(P){let te,ue;const Lo=T(),An=v.type===Pd.BLUR||v.type===Pd.FOCUS_OUT,Sy=!q1(P._f)&&!n.resolver&&!O(r.errors,k)&&!P._f.deps||W1(An,O(r.touchedFields,k),r.isSubmitted,m,p),Ys=Ld(k,c,An);Q(s,k,Lo),An?(P._f.onBlur&&P._f.onBlur(v),u&&u(0)):P._f.onChange&&P._f.onChange(v);const Gs=N(k,Lo,An,!1),My=!Oe(Gs)||Ys;if(!An&&f.values.next({name:k,type:v.type,values:{...s}}),Sy)return l.isValid&&b(),My&&f.state.next({name:k,...Ys?{}:Gs});if(!An&&Ys&&f.state.next({...r}),w(!0),n.resolver){const{errors:tf}=await E([k]);if(D(Lo),L){const Ty=qd(r.errors,o,k),nf=qd(tf,o,Ty.name||k);te=nf.error,k=nf.name,ue=Oe(tf)}}else te=(await Bd(P,s,y,n.shouldUseNativeValidation))[k],D(Lo),L&&(te?ue=!1:l.isValid&&(ue=await K(o,!0)));L&&(P._f.deps&&Y(P._f.deps),C(k,ue,te,Gs))}},ut=(v,_)=>{if(O(r.errors,_)&&v.focus)return v.focus(),1},Y=async(v,_={})=>{let k,L;const P=Bs(v);if(w(!0),n.resolver){const T=await q(ie(v)?v:P);k=Oe(T),L=v?!P.some(D=>O(T,D)):k}else v?(L=(await Promise.all(P.map(async T=>{const D=O(o,T);return await K(D&&D._f?{[T]:D}:D)}))).every(Boolean),!(!L&&!r.isValid)&&b()):L=k=await K(o);return f.state.next({...!Ye(v)||l.isValid&&k!==r.isValid?{}:{name:v},...n.resolver||!v?{isValid:k}:{},errors:r.errors,isValidating:!1}),_.shouldFocus&&!L&&Mo(o,ut,v?P:c.mount),L},Re=v=>{const _={...i,...a.mount?s:{}};return ie(v)?_:Ye(v)?O(_,v):v.map(k=>O(_,k))},Pt=(v,_)=>({invalid:!!O((_||r).errors,v),isDirty:!!O((_||r).dirtyFields,v),isTouched:!!O((_||r).touchedFields,v),error:O((_||r).errors,v)}),Et=v=>{v&&Bs(v).forEach(_=>ye(r.errors,_)),f.state.next({errors:v?r.errors:{}})},Gt=(v,_,k)=>{const L=(O(o,v,{_f:{}})._f||{}).ref;Q(r.errors,v,{..._,ref:L}),f.state.next({name:v,errors:r.errors,isValid:!1}),k&&k.shouldFocus&&L&&L.focus&&L.focus()},Ge=(v,_)=>At(v)?f.values.subscribe({next:k=>v(H(void 0,_),k)}):H(v,_,!0),Ze=(v,_={})=>{for(const k of v?Bs(v):c.mount)c.mount.delete(k),c.array.delete(k),_.keepValue||(ye(o,k),ye(s,k)),!_.keepError&&ye(r.errors,k),!_.keepDirty&&ye(r.dirtyFields,k),!_.keepTouched&&ye(r.touchedFields,k),!n.shouldUnregister&&!_.keepDefaultValue&&ye(i,k);f.values.next({values:{...s}}),f.state.next({...r,..._.keepDirty?{isDirty:B()}:{}}),!_.keepIsValid&&b()},Vo=({disabled:v,name:_,field:k,fields:L,value:P})=>{if(Ct(v)){const T=v?void 0:ie(P)?Ks(k?k._f:O(L,_)._f):P;Q(s,_,T),N(_,T,!1,!1,!0)}},Zt=(v,_={})=>{let k=O(o,v);const L=Ct(_.disabled);return Q(o,v,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:v}},name:v,mount:!0,..._}}),c.mount.add(v),k?Vo({field:k,disabled:_.disabled,name:v}):I(v,!0,_.value),{...L?{disabled:_.disabled}:{},...n.progressive?{required:!!_.required,min:dr(_.min),max:dr(_.max),minLength:dr(_.minLength),maxLength:dr(_.maxLength),pattern:dr(_.pattern)}:{},name:v,onChange:Ne,onBlur:Ne,ref:P=>{if(P){Zt(v,_),k=O(o,v);const T=ie(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,D=U1(T),te=k._f.refs||[];if(D?te.find(ue=>ue===T):T===k._f.ref)return;Q(o,v,{_f:{...k._f,...D?{refs:[...te.filter(qs),T,...Array.isArray(O(i,v))?[{}]:[]],ref:{type:T.type,name:v}}:{ref:T}}}),I(v,!1,void 0,T)}else k=O(o,v,{}),k._f&&(k._f.mount=!1),(n.shouldUnregister||_.shouldUnregister)&&!(N1(c.array,v)&&a.action)&&c.unMount.add(v)}}},Jt=()=>n.shouldFocusError&&Mo(o,ut,c.mount),dt=v=>{Ct(v)&&(f.state.next({disabled:v}),Mo(o,_=>{_.disabled=v},0,!1))},fr=(v,_)=>async k=>{k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let L=ct(s);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:P,values:T}=await E();r.errors=P,L=T}else await K(o);ye(r.errors,"root"),Oe(r.errors)?(f.state.next({errors:{}}),await v(L,k)):(_&&await _({...r.errors},k),Jt(),setTimeout(Jt)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Oe(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Oo=(v,_={})=>{O(o,v)&&(ie(_.defaultValue)?Le(v,O(i,v)):(Le(v,_.defaultValue),Q(i,v,_.defaultValue)),_.keepTouched||ye(r.touchedFields,v),_.keepDirty||(ye(r.dirtyFields,v),r.isDirty=_.defaultValue?B(v,O(i,v)):B()),_.keepError||(ye(r.errors,v),l.isValid&&b()),f.state.next({...r}))},Qd=(v,_={})=>{const k=v?ct(v):i,L=ct(k),P=v&&!Oe(v)?L:i;if(_.keepDefaultValues||(i=k),!_.keepValues){if(_.keepDirtyValues||h)for(const T of c.mount)O(r.dirtyFields,T)?Q(P,T,O(s,T)):Le(T,O(P,T));else{if(zs&&ie(v))for(const T of c.mount){const D=O(o,T);if(D&&D._f){const te=Array.isArray(D._f.refs)?D._f.refs[0]:D._f.ref;if(To(te)){const ue=te.closest("form");if(ue){ue.reset();break}}}}o={}}s=e.shouldUnregister?_.keepDefaultValues?ct(i):{}:ct(P),f.array.next({values:{...P}}),f.values.next({values:{...P}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!l.isValid||!!_.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:_.keepSubmitCount?r.submitCount:0,isDirty:_.keepDirty?r.isDirty:!!(_.keepDefaultValues&&!Yt(v,i)),isSubmitted:_.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:_.keepDirtyValues?r.dirtyFields:_.keepDefaultValues&&v?Ws(i,v):{},touchedFields:_.keepTouched?r.touchedFields:{},errors:_.keepErrors?r.errors:{},isSubmitSuccessful:_.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ef=(v,_)=>Qd(At(v)?v(s):v,_);return{control:{register:Zt,unregister:Ze,getFieldState:Pt,handleSubmit:fr,setError:Gt,_executeSchema:E,_getWatch:H,_getDirty:B,_updateValid:b,_removeUnmounted:j,_updateFieldArray:M,_updateDisabledField:Vo,_getFieldArray:X,_reset:Qd,_resetDefaultValues:()=>At(n.defaultValues)&&n.defaultValues().then(v=>{ef(v,n.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:v=>{r={...r,...v}},_disableForm:dt,_subjects:f,_proxyFormState:l,get _fields(){return o},get _formValues(){return s},get _state(){return a},set _state(v){a=v},get _defaultValues(){return i},get _names(){return c},set _names(v){c=v},get _formState(){return r},set _formState(v){r=v},get _options(){return n},set _options(v){n={...n,...v}}},trigger:Y,register:Zt,handleSubmit:fr,watch:Ge,setValue:Le,getValues:Re,reset:ef,resetField:Oo,clearErrors:Et,unregister:Ze,setError:Gt,setFocus:(v,_={})=>{const k=O(o,v),L=k&&k._f;if(L){const P=L.refs?L.refs[0]:L.ref;P.focus&&(P.focus(),_.shouldSelect&&P.select())}},getFieldState:Pt}}function Wd(e={}){const t=ze.useRef(),n=ze.useRef(),[r,o]=ze.useState({isDirty:!1,isValidating:!1,isLoading:At(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:At(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...G1(e,()=>o(s=>({...s}))),formState:r});const i=t.current.control;return i._options=e,F1({subject:i._subjects.state,next:s=>{D1(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),ze.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),ze.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),ze.useEffect(()=>{e.values&&!Yt(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values):i._resetDefaultValues()},[e.values,i]),ze.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=I1(r,i),t.current}var Kd=function(e,t,n){if(e&&"reportValidity"in e){var r=O(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Z1=function(e,t){var n=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?Kd(i.ref,o,e):i.refs&&i.refs.forEach(function(s){return Kd(s,o,e)})};for(var r in t.fields)n(r)},J1=function(e,t){t.shouldUseNativeValidation&&Z1(e,t);var n={};for(var r in e){var o=O(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(ey(t.names||Object.keys(e),r)){var s=Object.assign({},Q1(O(n,r)));Q(s,"root",i),Q(n,r,s)}else Q(n,r,i)}return n},Q1=function(e){return Array.isArray(e)?e.filter(Boolean):[]},ey=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},ty=function(e,t){for(var n={};e.issues.length;){var r=e.issues[0];if(r.path){var o=r.path.map(function(a){return a.key}).join(".");if(n[o]||(n[o]={message:r.message,type:r.validation}),t){var i=n[o].types,s=i&&i[r.validation];n[o]=Vd(o,t,n,r.validation,s?[].concat(s,r.message):r.message)}e.issues.shift()}}return n},Yd=function(e,t,n){return n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve(function(s,a){try{var c=function(){function u(l){return{values:n.raw?r:l,errors:{}}}var d=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return n.mode==="sync"?u(rs(e,r,d)):Promise.resolve(og(e,r,d)).then(u)}()}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(s){if(s instanceof so)return{values:{},errors:J1(ty(s,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};const ny=27,ry=12,oy=10,iy=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},sy=Is("multiple-choice"),ay=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Yd(bn({checked:ku(rg(Zv()),n=>Object.entries(n).filter(([r,o])=>o).map(([r,o])=>r),[ag(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),$u(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},cy=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var u,d;const r=e.key?(u=ee.current$.value.application)==null?void 0:u.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:s}}=Wd({defaultValues:{checked:sy(r)?Object.fromEntries(r.value.map(l=>[l,!0])):{}},resolver:ay(e.config)}),a=Ds(),c=e.config.minSelected===1&&e.config.maxSelected===1;return g("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:l=>{c&&iy(l.currentTarget)},onSubmit:i(l=>{const f=l.checked;t(f)}),children:[g("div",{class:"flex items-center gap-1",children:[g("ul",{style:{maxHeight:6.5*ny+5*ry+2*oy},class:xt("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{"justify-center":e.config.options.length===1}),children:e.config.options.map((l,f)=>{const h=`checked.${l.value}`,{ref:p,...m}=o(h);return g("li",{class:"relative",children:[g("input",{autoFocus:f===0,ref:y=>{y&&f===0&&(a.current=y),p(y)},id:h,...m,class:"peer sr-only h-full",type:"checkbox"}),g("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-neutral-12/5 text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 duration-snappy block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",htmlFor:h,children:l.label})]},l.value)})}),g("div",{class:"flex flex-col items-center gap-2",children:[!c&&g(ko,{}),e.config.minSelected===0&&g($o,{type:"button",onClick:()=>t([])})]})]}),g("div",{class:"px-1",children:g(Fs,{onAnimationComplete:n,error:(d=s.checked)==null?void 0:d.root})})]})},Cn={empty:"Please enter some text",email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number",url:"That doesn’t look like a valid URL"},ly=We(Cn.phone,[cg(/^\+?[0-9 -]+$/,Cn.phone)]),uy={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},dy=Is("text"),fy=e=>Yd(bn({text:{email:We(Cn.email,[sg(Cn.email)]),phone:ku(ly,t=>t.replace(/[^0-9]/g,"")),text:We([$u(1,Cn.empty)]),url:We([lg(Cn.url)])}[e.format]})),hy=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var d;const r=e.key?(d=ee.current$.value.application)==null?void 0:d.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:s}}=Wd({defaultValues:{text:dy(r)?r.value:""},resolver:fy(e.config)}),{ref:a,...c}=o("text",{required:!e.config.optional}),u=U();return Fe(()=>{u.current&&(u.current.focus(),u.current.select())},[]),g(ae,{children:g("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(l=>{t(l.text)}),children:[g("div",{class:"flex items-center gap-2",children:[g("div",{class:"relative min-w-0 flex-grow",children:[g("input",{id:"chat-input",...c,...uy[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:l=>{l&&(u.current=l),a(l)},class:"outline-neutral-12/5 ease-expo-out placeholder:text-neutral-5 focus-visible:outline-accent-7 caret-accent-9 duration-snappy w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&g($o,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),g(ko,{})]}),g(Fs,{onAnimationComplete:n,error:s.text})]})})},py=({onSubmit:e,onInputChange:t,input:n})=>{const r=U(null),o=me(()=>{r.current&&(ns.value=r.current.getBoundingClientRect().height)},[]);G(()=>{o(),t(n==null?void 0:n.type)},[n==null?void 0:n.type,t,o]);const i=s=>a=>e({type:s,value:a});return g(to.div,{initial:{height:0},animate:{height:ns.value},exit:{height:0,opacity:0},class:"bg-neutral-2/80 absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",children:g("div",{ref:r,class:"border-neutral-12/5 border-t",children:nt({application:ee,input:n,onHeightChange:o}).with({input:Ae.nullish},()=>g("div",{class:"flex items-center gap-2 p-2.5",children:[g("input",{"aria-hidden":"true",id:"chat-input",class:"outline-neutral-12/5 placeholder:text-neutral-4 focus-visible:outline-accent-9 caret-accent-9 flex-grow rounded-full px-3 py-1 text-base outline outline-2",disabled:!0}),g(ko,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>g(hy,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>g(cy,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"boolean"}},s=>g(T1,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"file"}},s=>g(V1,{onSubmitSuccess:i(s.input.type),...s})).exhaustive()})})},Gd=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Zd=xt,Jd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],l=i==null?void 0:i[u];if(d===null)return null;const f=Gd(d)||Gd(l);return o[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[l,f]=d;return f===void 0||(u[l]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:l,className:f,...h}=d;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...u,l,f]:u},[]);return Zd(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},my=Jd("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink-1 min-w-[2rem] text-md py-2 px-3 rounded-[18px] min-h-[36px] break-words",{variants:{side:{left:"bg-lowest text-neutral-12 shadow-surface-sm outline outline-1 outline-neutral-11/[.08] rounded-bl-md",right:"ml-auto bg-accent-7 text-lowest rounded-br-md bubble-right"},transitionState:{entering:"opacity-0 translate-y-8",entered:"opacity-100 translate-y-0",exiting:"opacity-0 scale-0",exited:""}},defaultVariants:{side:"left"}}),vy={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},gy=({children:e,className:t,transitionState:n,side:r,...o})=>g(to.p,{variants:vy,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:my({className:t,side:r,transitionState:n}),...o,children:e}),by=({className:e,...t})=>g("div",{"aria-label":"Typing…",class:xt("flex gap-1 p-4",e),...t,children:Array.from({length:3},(n,r)=>g("div",{class:"bg-accent-7 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}),yy={bot:"left",user:"right"},wy=Jd("w-full select-none py-2 text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_white]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),_y=({messages:e,isBotTyping:t})=>g("ol",{"aria-label":"Chat messages",class:"flex flex-grow flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[g(Wi,{initial:!1,children:e.map((n,r)=>g("li",{class:"flex",children:nt(n).with({type:"system"},o=>g("p",{class:wy({variant:o.variant}),children:o.text})).with({type:"text",author:Ae.union("bot","user")},o=>g(gy,{side:yy[o.author],children:o.text},r)).with({type:"link"},o=>g("div",{class:"bg-accent-8/5 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",children:g("a",{class:"bg-lowest shadow-surface-sm ring-accent-8/20 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:o.href,children:[o.text,g("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})})).with({type:"image"},o=>g("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:o.url,style:{aspectRatio:o.width/o.height}})).with({type:"file"},o=>g(E1,{class:o.author==="bot"?"":"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).exhaustive()},r))}),g("aside",{"aria-hidden":!0,children:t&&g(by,{})})]}),xy=25,ky=()=>{const e=U(null),[t,n]=ce(!1),[r,o]=ce(()=>()=>{}),i=de(()=>a=>{var c;return(c=e.current)==null?void 0:c.scrollTo({top:e.current.scrollHeight,...a})},[e]),s=de(()=>({send:async({message:a,signal:c,groupId:u})=>{if(await nt(a).with({author:"bot",type:"text"},async d=>{if(c!=null&&c.aborted)throw new cr;n(!0);const l=Math.min(Math.max(20,d.text.length),100)*xy;await new Promise(f=>setTimeout(f,l,{signal:c})),n(!1)}).otherwise(async()=>{}),c!=null&&c.aborted)throw new cr;ee.addMessage(a,u)},input:async({input:a,signal:c})=>{if(c!=null&&c.aborted)throw new cr;return ee.setInput(a),await new Promise(u=>{const d=l=>{if(c!=null&&c.aborted)throw new cr;ee.setInput(void 0),a.key&&(ee.setSubmission,ee.setSubmission(a.key,l)),u(l)};o(()=>d)})}}),[]);return{chatRef:e,chatService:s,isBotTyping:t,onSubmitSuccessFn:r,scrollToEnd:i}},$y=Object.freeze(Object.defineProperty({__proto__:null,JobApplicationContent:({currentApplication:e,logger:t,apiClient:n,analytics:r})=>{const{chatRef:o,chatService:i,isBotTyping:s,onSubmitSuccessFn:a,scrollToEnd:c}=ky(),u=rt.value,d=e.flow,l=e.job;return Fe(()=>{u==="maximised"&&c({behavior:"instant"})},[c,u]),G(()=>{c({behavior:"smooth"})},[e.data.messages,c]),Fe(()=>{const{state:f,application:h}=ee.current$.peek();if(f!=="loaded")throw new Error(Ov.invalid_state);let p=h.data.currentNodeId;if(c({behavior:"instant"}),ee.setInput(void 0),h.data.isFinished)return;p===null?(p=kd(d.nodes).id,ee.setCurrentNodeId(p),r.log({event:"APPLY_START",attributionKey:`job_${l.id}`,properties:{job_id:l.id,flow_id:d.id}})):ee.removeLastGroupMessagesById(p);const{interpret:m,abort:y}=u1({context:{jobId:l.id,flowId:d.id},analytics:r,apiClient:n,logger:t,flow:d.nodes,chatService:i,getSubmissions:()=>{var x;return(x=ee.current$.peek().application)==null?void 0:x.data.submissions},onInterpret:(x,b)=>{const w=ee.current$.peek().application;rn(w),b&&(w.data.sequence=w.data.sequence+1,r.log({event:"FLOW_NODE",attributionKey:`job_${l.id}`,properties:{flow_id:d.id,flow_version:d.version,job_id:l.id,from_node_id:b.id,to_node_id:x.id,sequence:w.data.sequence,flow_session_id:w.data.flowSessionId}})),ee.setCurrentNodeId(x.id)},onFlowEnd:async()=>{ee.markAsFinished()}});return m(p),y},[r,n,i,t,c,d,l.id,e.startedAt]),g(ae,{children:[g("div",{ref:o,className:"hide-scrollbars relative flex max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:ns.value},children:g(Wi,{children:g(_y,{isBotTyping:s,messages:e.data.messages})})}),g(py,{input:e.data.currentInput,onInputChange:()=>c({behavior:"smooth"}),onSubmit:a})]})}},Symbol.toStringTag,{value:"Module"}))})();
53
+ }`},uv=({_internal_domManager:e=ev(),theme:t})=>ft(({apiClient:n,logger:r,analytics:i})=>{let o=!1;const s=()=>{if(typeof window>"u")return;const a=[M("style",{id:"inploi-chatbot-styles"},Jm),M("style",{id:"inploi-chatbot-theme"},lv(t))],c=e.getOrCreateChatbotElement();Ft(M(ee,{},[a,M(Vm,{apiClient:n,logger:r,analytics:i})]),c),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;s(),r.info("Chatbot plugin prepared")}catch(a){console.error(a),r.error("Error preparing chatbot plugin",a)}},startApplication:async({jobId:a})=>{if(!(typeof window>"u"))try{Y.cancel(),nu(()=>{ze.value="maximised",Y.current$.value={state:"loading"}}),Qm({jobId:a,apiClient:n,logger:r}).then(async c=>{c.ok?Y.start(c.value):Y.current$.value={state:"error",error:c.error}}),o||s()}catch(c){console.error(c),r.error("Error starting application",c)}},closeApplication:async()=>{typeof window>"u"||(r.info("Closing application from an external source"),Y.cancel())}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=uv;const En=e=>Ue(e).with(_e.number.lte(1e3),()=>`${Math.round(e)}KB`).with(_e.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),ul=e=>{const t=e.find(n=>n.isHead);if(!t)throw new Error("No head node found");return t},dv=e=>Object.entries(e).reduce((n,[r,i])=>(n[r]=i.value,n),{}),wo=e=>t=>t?t.type===e:!1;class Vn extends Error{constructor(){super("Aborted")}}const dl=({node:e,nodes:t,stopWhen:n})=>{if((n==null?void 0:n(e))===!0)return e;const r=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(r)return dl({node:r,nodes:t,stopWhen:n})},fv=({childNode:e,nodes:t})=>{const r=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(a=>a.id===i.branchId);if(!o)return!1;const s=dl({node:o,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(r!=null&&r.nextId)return t.find(i=>i.id===r.nextId)},pv=({flow:e,analytics:t,logger:n,context:r,apiClient:i,getSubmissions:o,chatService:s,onFlowEnd:a,onInterpret:c})=>{const u=new AbortController,d=async(l,f)=>{const h=o();c==null||c(l,f);try{await hv({analytics:t,logger:n,apiClient:i,context:r,node:l,submissions:h,chat:{sendMessage:async p=>s.send({groupId:l.id,message:p,signal:u.signal}),userInput:async p=>s.input({input:p,signal:u.signal})},next:p=>{const v=p?e.find(b=>b.id===p):fv({childNode:l,nodes:e});return v?d(v,l):a==null?void 0:a(l)},end:()=>a==null?void 0:a(l)})}catch(p){if(p instanceof Vn)return;throw p}};return{interpret:async l=>{const f=e.find(h=>h.id===l)??ul(e);return d(f)},abort:()=>{u.abort()}}};async function hv(e){return await Ue(e).with({node:{type:"text"}},yv).with({node:{type:"image"}},bv).with({node:{type:"question-text"}},wv).with({node:{type:"question-enum"}},xv).with({node:{type:"question-number"}},_v).with({node:{type:"question-boolean"}},kv).with({node:{type:"question-file"}},Av).with({node:{type:"question-address"}},$v).with({node:{type:"end-flow"}},Pv).with({node:{type:"if-block"}},gv).with({node:{type:"jump"}},({node:t,next:n})=>n(t.data.targetId)).with({node:{type:"link"}},vv).with({node:{type:"integration-application-submit"}},mv).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function mv({chat:e,next:t,node:n,logger:r,apiClient:i,submissions:o,context:s,analytics:a}){await e.userInput({type:"multiple-choice",key:void 0,config:{options:[{label:"Submit my application",value:"submit"}],maxSelected:1,minSelected:1}});const c=()=>{const d=typeof s.jobId=="string"?s.jobId:void 0,l=typeof s.flowId=="string"?s.flowId:void 0;Nt(d),Nt(l),d&&a.log({event:"APPLY_COMPLETE",attributionKey:`job_${d}`,properties:{job_id:d,flow_id:l}})};await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const u=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:n.data.integrationId,anonymous_id:a.getAnonymousId(),submissions:dv(o||{})})}).catch(d=>d);await Ue(u).with({ats_data:{redirect_url:_e.string}},async d=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const l=a.getAnonymousId(),f=new URL(d.ats_data.redirect_url);l&&!f.searchParams.has("anonymous_id")&&f.searchParams.set("anonymous_id",l),c(),await e.sendMessage({type:"link",href:f.toString(),text:"Finalise application on partner"}),t(n.nextId)}).with({success:!0},async()=>{c(),await e.sendMessage({type:"system",variant:"success",text:"Application submitted"}),t(n.nextId)}).otherwise(async d=>{r.error(d),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(n.id)})}async function vv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({type:"link",href:n.data.href,text:At(n.data.cta,r)}),t(n.nextId)}async function gv({submissions:e,next:t,node:n}){const r=Ev(n,e)?n.branchId:n.nextId;t(r)}async function yv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.text,r)}),t(n.nextId)}async function bv({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"image",url:n.data.url,height:n.data.height,width:n.data.width}),t(n.nextId)}async function wv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:n.data.format}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(n.nextId)}async function _v({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:"text"}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(n.nextId)}async function xv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"multiple-choice",config:n.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:n.data.options.filter(o=>i.value.includes(o.value)).map(o=>o.label).join(", ")}),t(n.nextId)}async function kv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.question,r)});const o=(await e.userInput({key:n.data.key,type:"boolean",config:{optional:n.data.optional,labels:{true:n.data.trueLabel,false:n.data.falseLabel}}})).value;o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:{true:n.data.trueLabel,false:n.data.falseLabel}[o]}),t(n.nextId)}const Sv=document.createElement("div"),fl={line1:["street_number","floor","room","premise"],line2:["subpremise","street_address","route"],line3:["sublocality","neighborhood"],city:["locality","postal_town"],state:["administrative_area_level_1"],postcode:["postal_code"],country:["country"]},Cv=Object.keys(fl);async function $v({chat:e,next:t,node:n,logger:r}){const{google:i}=window;await e.sendMessage({author:"bot",type:"text",text:n.data.question});const o=async p=>{const v=[{label:"Postcode",key:n.data.keys.postcode,optional:!1,defaultValue:p.postcode},{label:"Line 1",key:n.data.keys.line1,optional:!1,defaultValue:p.line1},{label:"Line 2",key:n.data.keys.line2,optional:!0,defaultValue:p.line2},{label:"Line 3",key:n.data.keys.line3,optional:!0,defaultValue:p.line3},{label:"City",key:n.data.keys.city,optional:!1,defaultValue:p.city},{label:"State/County/Province",key:n.data.keys.state,optional:!0,defaultValue:p.state},{label:"Country",key:n.data.keys.country,optional:!1,defaultValue:p.country}];for(const b of v){await e.sendMessage({author:"bot",type:"text",text:b.label});const{value:k}=await e.userInput({type:"text",key:b.key,config:{format:"text",optional:b.optional,defaultValue:b.defaultValue}});k===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:k})}};if(!ti(window,"google")||!ti(window.google,"maps")||!ti(window.google.maps,"places"))return r.warn("Google maps not available, falling back to manual input."),r.info("If you’d like to use the address autocomplete, please insert the google maps API snippet in your website and make sure it has access to the *places* library."),await o({}),t(n.nextId);const s=new i.maps.places.AutocompleteService,a=new i.maps.places.PlacesService(Sv),{value:c}=await e.userInput({type:"text",key:"_internal-address-search",config:{format:"text",optional:!1,placeholder:"Search for your address"}});if(c===null)return t(n.id);await e.sendMessage({author:"user",type:"text",text:`Search for “${c}”`});const{predictions:u}=await s.getPlacePredictions({input:c}),{value:[d]}=await e.userInput({type:"multiple-choice",key:void 0,config:{options:u.slice(0,4).map(p=>({label:p.description,value:p.place_id})).concat({label:"None of these",value:"none"}),maxSelected:1,minSelected:1}});if(!d||d==="none")return t(n.id);const l=await new Promise((p,v)=>a.getDetails({placeId:d,fields:["address_components"]},(b,k)=>k!==i.maps.places.PlacesServiceStatus.OK?v(k):b===null?v("ZERO_RESULTS"):p({ok:!0,place:b}))).catch(async p=>(r.error("Failed to get address details",p),{ok:!1}));if(l.ok===!1)return await e.sendMessage({type:"system",variant:"error",text:"Failed to get address details"}),await o({}),t(n.id);const f=l.place.address_components,h=f?Cv.reduce((p,v)=>{const b=fl[v],k=f.filter(y=>y.types.some(_=>b.includes(_))).map(y=>y.long_name).join(", ");return k&&(p[v]=k),p},{}):{};return await e.sendMessage({author:"bot",type:"text",text:"Please confirm or adjust your address:"}),await o(h),t(n.nextId)}async function Av({node:e,chat:t,next:n,submissions:r}){await t.sendMessage({author:"bot",type:"text",text:At(e.data.question,r)});const i=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(i.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const o of i.value)await t.sendMessage({author:"user",type:"file",fileName:o.name,fileSizeKb:o.sizeKb});n(e.nextId)}async function Pv({chat:e,end:t,node:n}){await e.sendMessage({type:"system",variant:"info",text:n.data.systemMessage}),t()}const pl=_e.union(_e.string,_e.array(_e.string),null),Ev=(e,t)=>{const n=t==null?void 0:t[e.data.compareKey];return n?Ue({...e.data,answer:n}).with({compare:"equals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r===n.value.toString():!1).with({compare:"notEquals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r!==n.value.toString():!1).with({compare:"contains",answer:{value:pl}},({compareValue:r,answer:i})=>i.value!==null&&i.value.includes(r)).with({compare:"notContains",answer:{value:pl}},({compareValue:r,answer:i})=>i.value===null||!i.value.includes(r)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},At=(e,t)=>{const n=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(n,(r,i,o="")=>{i=i.trim();const s=t==null?void 0:t[i];if(!s)return o;switch(s.type){case"boolean":return s.value==="true"?"true":"false";case"file":return s.value?s.value.map(a=>`${a.name} (${En(a.sizeKb)})`).join(", "):"no files";case"multiple-choice":return s.value.join(", ");default:return s.value||o}})},Or=({class:e,...t})=>g("button",{class:ot("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[g("title",{children:"Send"}),g("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),g("path",{d:"M8 4V13"})]})}),Mr=({class:e,...t})=>g("button",{type:"button",class:ot("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[g("title",{children:"Skip"}),g("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),g("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),_o=()=>{const e=B(null);return H(()=>{var t;(t=e.current)==null||t.focus()},[]),e},hl=["true","false"],Vv=jm(hl),Tv="answer",Ov=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{const r=_o();return n(),g("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const o=Ue(i).with({nativeEvent:{submitter:_e.select(_e.union(_e.instanceOf(HTMLButtonElement),_e.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=ho(Vv,o);t(s)},children:[g("div",{class:"flex items-center gap-2 p-2.5",children:hl.map((i,o)=>g("button",{ref:o===0?r:null,type:"submit",name:Tv,value:i,class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:g("p",{class:"truncate text-center text-base",children:e.config.labels[i]})}))}),e.config.optional&&g("div",{class:"pb-2",children:g(Mr,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},xo=({error:e,onAnimationComplete:t})=>(Pe(()=>{e&&t()},[e,t]),e?g("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[g("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),g("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),g("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),g("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null),Mv=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>r.result?t(r.result.toString()):n("No result from reader"),r.onerror=n}),Fv=e=>e.reduce((t,n)=>t+n.sizeKb,0),Iv=wo("file"),ml=3,Dv=({file:e,class:t,...n})=>{const r=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${r}$`),"");return g("div",{class:ot("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...n,children:[g("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[g("span",{class:"block truncate",children:i}),g("span",{children:[".",r]})]}),g("p",{"aria-label":"File size",class:"text-accent-11",children:En(e.sizeKb)})]})},vl=({class:e,...t})=>g("li",{class:ot("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Nv=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var l;const r=(l=Y.current$.value.application)==null?void 0:l.data.submissions[e.key],[i,o]=re(Iv(r)&&r.value!==null?r.value:[]),[s,a]=re(),c=i.length-ml,u=Fv(i),d=_o();return g("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:f=>(f.preventDefault(),a(void 0),i.length===0?a({type:"required",message:"Please select a file"}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${En(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&i.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(i)),children:[g("div",{class:"flex items-center gap-2",children:[g("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[i.length>0?g(ee,{children:[g("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,ml).map(f=>{const h=f.name.split(".").pop(),p=f.name.replace(new RegExp(`.${h}$`),"");return g(vl,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:p}),g("span",{children:[".",h]})]})}),c>0?g(vl,{children:["+",c," file",c!==1?"s":""]}):null]}),g("p",{class:"text-neutral-11 text-xs",children:[En(u)," ",i.length>1?"total":""]})]}):g("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[g("header",{class:"flex flex-col items-center gap-0",children:[g("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:g("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),g("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?g("p",{class:"text-neutral-10 text-xs",children:["(max ",En(e.config.fileSizeLimitKib),")"]}):null]}),g("aside",{class:"flex flex-col items-center gap-2",children:[g("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),g("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(f=>g("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:f.replace(".","")}))})]})]}),g("input",{id:"dropzone-file",onInput:async f=>{Nt(f.target instanceof HTMLInputElement);const h=f.target.files?Array.from(f.target.files):[],p=await Promise.allSettled(h.map(async b=>{const k=await Mv(b);return{name:b.name,data:k,sizeKb:b.size/1e3}}));if(p.some(({status:b})=>b==="rejected"))return a({type:"invalid",message:"Invalid file"});const v=p.map(b=>b.status==="fulfilled"?b.value:null).filter(Boolean);o(v)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),g("div",{class:"flex h-full flex-col items-center gap-2",children:[g(Or,{disabled:i.length===0}),e.config.optional&&g(Mr,{onClick:()=>t(null)})]})]}),s&&g(xo,{onAnimationComplete:n,error:s})]})};var Tn=e=>e.type==="checkbox",Qt=e=>e instanceof Date,ye=e=>e==null;const gl=e=>typeof e=="object";var se=e=>!ye(e)&&!Array.isArray(e)&&gl(e)&&!Qt(e),Lv=e=>se(e)&&e.target?Tn(e.target)?e.target.checked:e.target.value:e,Rv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bv=(e,t)=>e.has(Rv(t)),jv=e=>{const t=e.constructor&&e.constructor.prototype;return se(t)&&t.hasOwnProperty("isPrototypeOf")},ko=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function We(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(!(ko&&(e instanceof Blob||e instanceof FileList))&&(n||se(e)))if(t=n?[]:{},!n&&!jv(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=We(e[r]));else return e;return t}var On=e=>Array.isArray(e)?e.filter(Boolean):[],te=e=>e===void 0,T=(e,t,n)=>{if(!t||!se(e))return n;const r=On(t.split(/[,[\].]+?/)).reduce((i,o)=>ye(i)?i:i[o],e);return te(r)||r===e?te(e[t])?n:e[t]:r},ct=e=>typeof e=="boolean";const yl={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ve={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ke={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};Ee.createContext(null);var Uv=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Ve.all&&(t._proxyFormState[s]=!r||Ve.all),n&&(n[s]=!0),e[s]}});return i},Ce=e=>se(e)&&!Object.keys(e).length,zv=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Ce(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||Ve.all))},So=e=>Array.isArray(e)?e:[e];function Hv(e){const t=Ee.useRef(e);t.current=e,Ee.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ne=e=>typeof e=="string",Wv=(e,t,n,r,i)=>Ne(e)?(r&&t.watch.add(e),T(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),T(n,o))):(r&&(t.watchAll=!0),n),Co=e=>/^\w*$/.test(e),bl=e=>On(e.replace(/["|']|\]/g,"").split(/\.|\[/));function q(e,t,n){let r=-1;const i=Co(t)?[t]:bl(t),o=i.length,s=o-1;for(;++r<o;){const a=i[r];let c=n;if(r!==s){const u=e[a];c=se(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}e[a]=c,e=e[a]}return e}var wl=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},_l=e=>({isOnSubmit:!e||e===Ve.onSubmit,isOnBlur:e===Ve.onBlur,isOnChange:e===Ve.onChange,isOnAll:e===Ve.all,isOnTouch:e===Ve.onTouched}),xl=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Fr=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=T(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break}else se(a)&&Fr(a,t)}}};var Kv=(e,t,n)=>{const r=On(T(e,n));return q(r,"root",t[n]),q(e,n,r),e},$o=e=>e.type==="file",lt=e=>typeof e=="function",Ir=e=>{if(!ko)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Dr=e=>Ne(e),Ao=e=>e.type==="radio",Nr=e=>e instanceof RegExp;const kl={value:!1,isValid:!1},Sl={value:!0,isValid:!0};var Cl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!te(e[0].attributes.value)?te(e[0].value)||e[0].value===""?Sl:{value:e[0].value,isValid:!0}:Sl:kl}return kl};const $l={isValid:!1,value:null};var Al=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,$l):$l;function Pl(e,t,n="validate"){if(Dr(e)||Array.isArray(e)&&e.every(Dr)||ct(e)&&!e)return{type:n,message:Dr(e)?e:"",ref:t}}var Jt=e=>se(e)&&!Nr(e)?e:{value:e,message:""},El=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:c,minLength:u,min:d,max:l,pattern:f,validate:h,name:p,valueAsNumber:v,mount:b,disabled:k}=e._f,y=T(t,p);if(!b||k)return{};const _=s?s[0]:o,C=j=>{r&&_.reportValidity&&(_.setCustomValidity(ct(j)?"":j||""),_.reportValidity())},S={},N=Ao(o),I=Tn(o),A=N||I,E=(v||$o(o))&&te(o.value)&&te(y)||Ir(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,W=wl.bind(null,p,n,S),Q=(j,L,R,U=Ke.maxLength,ne=Ke.minLength)=>{const de=j?L:R;S[p]={type:j?U:ne,message:de,ref:o,...W(j?U:ne,de)}};if(i?!Array.isArray(y)||!y.length:a&&(!A&&(E||ye(y))||ct(y)&&!y||I&&!Cl(s).isValid||N&&!Al(s).isValid)){const{value:j,message:L}=Dr(a)?{value:!!a,message:a}:Jt(a);if(j&&(S[p]={type:Ke.required,message:L,ref:_,...W(Ke.required,L)},!n))return C(L),S}if(!E&&(!ye(d)||!ye(l))){let j,L;const R=Jt(l),U=Jt(d);if(!ye(y)&&!isNaN(y)){const ne=o.valueAsNumber||y&&+y;ye(R.value)||(j=ne>R.value),ye(U.value)||(L=ne<U.value)}else{const ne=o.valueAsDate||new Date(y),de=Et=>new Date(new Date().toDateString()+" "+Et),qe=o.type=="time",ut=o.type=="week";Ne(R.value)&&y&&(j=qe?de(y)>de(R.value):ut?y>R.value:ne>new Date(R.value)),Ne(U.value)&&y&&(L=qe?de(y)<de(U.value):ut?y<U.value:ne<new Date(U.value))}if((j||L)&&(Q(!!j,R.message,U.message,Ke.max,Ke.min),!n))return C(S[p].message),S}if((c||u)&&!E&&(Ne(y)||i&&Array.isArray(y))){const j=Jt(c),L=Jt(u),R=!ye(j.value)&&y.length>+j.value,U=!ye(L.value)&&y.length<+L.value;if((R||U)&&(Q(R,j.message,L.message),!n))return C(S[p].message),S}if(f&&!E&&Ne(y)){const{value:j,message:L}=Jt(f);if(Nr(j)&&!y.match(j)&&(S[p]={type:Ke.pattern,message:L,ref:o,...W(Ke.pattern,L)},!n))return C(L),S}if(h){if(lt(h)){const j=await h(y,t),L=Pl(j,_);if(L&&(S[p]={...L,...W(Ke.validate,L.message)},!n))return C(L.message),S}else if(se(h)){let j={};for(const L in h){if(!Ce(j)&&!n)break;const R=Pl(await h[L](y,t),_,L);R&&(j={...R,...W(L,R.message)},C(R.message),n&&(S[p]=j))}if(!Ce(j)&&(S[p]={ref:_,...j},!n))return S}}return C(!0),S};function qv(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=te(e)?r++:e[t[r++]];return e}function Gv(e){for(const t in e)if(e.hasOwnProperty(t)&&!te(e[t]))return!1;return!0}function ue(e,t){const n=Array.isArray(t)?t:Co(t)?[t]:bl(t),r=n.length===1?e:qv(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(se(r)&&Ce(r)||Array.isArray(r)&&Gv(r))&&ue(e,n.slice(0,-1)),e}function Po(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Lr=e=>ye(e)||!gl(e);function Pt(e,t){if(Lr(e)||Lr(t))return e===t;if(Qt(e)&&Qt(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 o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Qt(o)&&Qt(s)||se(o)&&se(s)||Array.isArray(o)&&Array.isArray(s)?!Pt(o,s):o!==s)return!1}}return!0}var Vl=e=>e.type==="select-multiple",Yv=e=>Ao(e)||Tn(e),Eo=e=>Ir(e)&&e.isConnected,Tl=e=>{for(const t in e)if(lt(e[t]))return!0;return!1};function Rr(e,t={}){const n=Array.isArray(e);if(se(e)||n)for(const r in e)Array.isArray(e[r])||se(e[r])&&!Tl(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Rr(e[r],t[r])):ye(e[r])||(t[r]=!0);return t}function Ol(e,t,n){const r=Array.isArray(e);if(se(e)||r)for(const i in e)Array.isArray(e[i])||se(e[i])&&!Tl(e[i])?te(t)||Lr(n[i])?n[i]=Array.isArray(e[i])?Rr(e[i],[]):{...Rr(e[i])}:Ol(e[i],ye(t)?{}:t[i],n[i]):n[i]=!Pt(e[i],t[i]);return n}var Vo=(e,t)=>Ol(e,t,Rr(t)),Ml=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>te(e)?e:t?e===""?NaN:e&&+e:n&&Ne(e)?new Date(e):r?r(e):e;function To(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return $o(t)?t.files:Ao(t)?Al(e.refs).value:Vl(t)?[...t.selectedOptions].map(({value:n})=>n):Tn(t)?Cl(e.refs).value:Ml(te(t.value)?e.ref.value:t.value,e)}var Zv=(e,t,n,r)=>{const i={};for(const o of e){const s=T(t,o);s&&q(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Mn=e=>te(e)?e:Nr(e)?e.source:se(e)?Nr(e.value)?e.value.source:e.value:e,Xv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Fl(e,t,n){const r=T(e,n);if(r||Co(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=T(t,o),a=T(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:n}}var Qv=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Jv=(e,t)=>!On(T(e,t)).length&&ue(e,t);const eg={mode:Ve.onSubmit,reValidateMode:Ve.onChange,shouldFocusError:!0};function tg(e={},t){let n={...eg,...e},r={submitCount:0,isDirty:!1,isLoading:lt(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=se(n.defaultValues)||se(n.values)?We(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:We(o),a={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const l={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Po(),array:Po(),state:Po()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=_l(n.mode),v=_l(n.reValidateMode),b=n.criteriaMode===Ve.all,k=m=>w=>{clearTimeout(d),d=setTimeout(m,w)},y=async m=>{if(l.isValid||m){const w=n.resolver?Ce((await E()).errors):await Q(i,!0);w!==r.isValid&&f.state.next({isValid:w})}},_=m=>l.isValidating&&f.state.next({isValidating:m}),C=(m,w=[],x,O,P=!0,$=!0)=>{if(O&&x){if(a.action=!0,$&&Array.isArray(T(i,m))){const F=x(T(i,m),O.argA,O.argB);P&&q(i,m,F)}if($&&Array.isArray(T(r.errors,m))){const F=x(T(r.errors,m),O.argA,O.argB);P&&q(r.errors,m,F),Jv(r.errors,m)}if(l.touchedFields&&$&&Array.isArray(T(r.touchedFields,m))){const F=x(T(r.touchedFields,m),O.argA,O.argB);P&&q(r.touchedFields,m,F)}l.dirtyFields&&(r.dirtyFields=Vo(o,s)),f.state.next({name:m,isDirty:L(m,w),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else q(s,m,w)},S=(m,w)=>{q(r.errors,m,w),f.state.next({errors:r.errors})},N=(m,w,x,O)=>{const P=T(i,m);if(P){const $=T(s,m,te(x)?T(o,m):x);te($)||O&&O.defaultChecked||w?q(s,m,w?$:To(P._f)):ne(m,$),a.mount&&y()}},I=(m,w,x,O,P)=>{let $=!1,F=!1;const Z={name:m};if(!x||O){l.isDirty&&(F=r.isDirty,r.isDirty=Z.isDirty=L(),$=F!==Z.isDirty);const ie=Pt(T(o,m),w);F=T(r.dirtyFields,m),ie?ue(r.dirtyFields,m):q(r.dirtyFields,m,!0),Z.dirtyFields=r.dirtyFields,$=$||l.dirtyFields&&F!==!ie}if(x){const ie=T(r.touchedFields,m);ie||(q(r.touchedFields,m,x),Z.touchedFields=r.touchedFields,$=$||l.touchedFields&&ie!==x)}return $&&P&&f.state.next(Z),$?Z:{}},A=(m,w,x,O)=>{const P=T(r.errors,m),$=l.isValid&&ct(w)&&r.isValid!==w;if(e.delayError&&x?(u=k(()=>S(m,x)),u(e.delayError)):(clearTimeout(d),u=null,x?q(r.errors,m,x):ue(r.errors,m)),(x?!Pt(P,x):P)||!Ce(O)||$){const F={...O,...$&&ct(w)?{isValid:w}:{},errors:r.errors,name:m};r={...r,...F},f.state.next(F)}_(!1)},E=async m=>n.resolver(s,n.context,Zv(m||c.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),W=async m=>{const{errors:w}=await E(m);if(m)for(const x of m){const O=T(w,x);O?q(r.errors,x,O):ue(r.errors,x)}else r.errors=w;return w},Q=async(m,w,x={valid:!0})=>{for(const O in m){const P=m[O];if(P){const{_f:$,...F}=P;if($){const Z=c.array.has($.name),ie=await El(P,s,b,n.shouldUseNativeValidation&&!w,Z);if(ie[$.name]&&(x.valid=!1,w))break;!w&&(T(ie,$.name)?Z?Kv(r.errors,ie,$.name):q(r.errors,$.name,ie[$.name]):ue(r.errors,$.name))}F&&await Q(F,w,x)}}return x.valid},j=()=>{for(const m of c.unMount){const w=T(i,m);w&&(w._f.refs?w._f.refs.every(x=>!Eo(x)):!Eo(w._f.ref))&&tn(m)}c.unMount=new Set},L=(m,w)=>(m&&w&&q(s,m,w),!Pt(dt(),o)),R=(m,w,x)=>Wv(m,c,{...a.mount?s:te(w)?o:Ne(m)?{[m]:w}:w},x,w),U=m=>On(T(a.mount?s:o,m,e.shouldUnregister?T(o,m,[]):[])),ne=(m,w,x={})=>{const O=T(i,m);let P=w;if(O){const $=O._f;$&&(!$.disabled&&q(s,m,Ml(w,$)),P=Ir($.ref)&&ye(w)?"":w,Vl($.ref)?[...$.ref.options].forEach(F=>F.selected=P.includes(F.value)):$.refs?Tn($.ref)?$.refs.length>1?$.refs.forEach(F=>(!F.defaultChecked||!F.disabled)&&(F.checked=Array.isArray(P)?!!P.find(Z=>Z===F.value):P===F.value)):$.refs[0]&&($.refs[0].checked=!!P):$.refs.forEach(F=>F.checked=F.value===P):$o($.ref)?$.ref.value="":($.ref.value=P,$.ref.type||f.values.next({name:m,values:{...s}})))}(x.shouldDirty||x.shouldTouch)&&I(m,P,x.shouldTouch,x.shouldDirty,!0),x.shouldValidate&&G(m)},de=(m,w,x)=>{for(const O in w){const P=w[O],$=`${m}.${O}`,F=T(i,$);(c.array.has(m)||!Lr(P)||F&&!F._f)&&!Qt(P)?de($,P,x):ne($,P,x)}},qe=(m,w,x={})=>{const O=T(i,m),P=c.array.has(m),$=We(w);q(s,m,$),P?(f.array.next({name:m,values:{...s}}),(l.isDirty||l.dirtyFields)&&x.shouldDirty&&f.state.next({name:m,dirtyFields:Vo(o,s),isDirty:L(m,$)})):O&&!O._f&&!ye($)?de(m,$,x):ne(m,$,x),xl(m,c)&&f.state.next({...r}),f.values.next({name:m,values:{...s}}),!a.mount&&t()},ut=async m=>{const w=m.target;let x=w.name,O=!0;const P=T(i,x),$=()=>w.type?To(P._f):Lv(m),F=Z=>{O=Number.isNaN(Z)||Z===T(s,x,Z)};if(P){let Z,ie;const zr=$(),nn=m.type===yl.BLUR||m.type===yl.FOCUS_OUT,Vg=!Xv(P._f)&&!n.resolver&&!T(r.errors,x)&&!P._f.deps||Qv(nn,T(r.touchedFields,x),r.isSubmitted,v,p),Oo=xl(x,c,nn);q(s,x,zr),nn?(P._f.onBlur&&P._f.onBlur(m),u&&u(0)):P._f.onChange&&P._f.onChange(m);const Mo=I(x,zr,nn,!1),Tg=!Ce(Mo)||Oo;if(!nn&&f.values.next({name:x,type:m.type,values:{...s}}),Vg)return l.isValid&&y(),Tg&&f.state.next({name:x,...Oo?{}:Mo});if(!nn&&Oo&&f.state.next({...r}),_(!0),n.resolver){const{errors:zl}=await E([x]);if(F(zr),O){const Og=Fl(r.errors,i,x),Hl=Fl(zl,i,Og.name||x);Z=Hl.error,x=Hl.name,ie=Ce(zl)}}else Z=(await El(P,s,b,n.shouldUseNativeValidation))[x],F(zr),O&&(Z?ie=!1:l.isValid&&(ie=await Q(i,!0)));O&&(P._f.deps&&G(P._f.deps),A(x,ie,Z,Mo))}},Et=(m,w)=>{if(T(r.errors,w)&&m.focus)return m.focus(),1},G=async(m,w={})=>{let x,O;const P=So(m);if(_(!0),n.resolver){const $=await W(te(m)?m:P);x=Ce($),O=m?!P.some(F=>T($,F)):x}else m?(O=(await Promise.all(P.map(async $=>{const F=T(i,$);return await Q(F&&F._f?{[$]:F}:F)}))).every(Boolean),!(!O&&!r.isValid)&&y()):O=x=await Q(i);return f.state.next({...!Ne(m)||l.isValid&&x!==r.isValid?{}:{name:m},...n.resolver||!m?{isValid:x}:{},errors:r.errors,isValidating:!1}),w.shouldFocus&&!O&&Fr(i,Et,m?P:c.mount),O},dt=m=>{const w={...o,...a.mount?s:{}};return te(m)?w:Ne(m)?T(w,m):m.map(x=>T(w,x))},Fn=(m,w)=>({invalid:!!T((w||r).errors,m),isDirty:!!T((w||r).dirtyFields,m),isTouched:!!T((w||r).touchedFields,m),error:T((w||r).errors,m)}),Br=m=>{m&&So(m).forEach(w=>ue(r.errors,w)),f.state.next({errors:m?r.errors:{}})},In=(m,w,x)=>{const O=(T(i,m,{_f:{}})._f||{}).ref;q(r.errors,m,{...w,ref:O}),f.state.next({name:m,errors:r.errors,isValid:!1}),x&&x.shouldFocus&&O&&O.focus&&O.focus()},Vt=(m,w)=>lt(m)?f.values.subscribe({next:x=>m(R(void 0,w),x)}):R(m,w,!0),tn=(m,w={})=>{for(const x of m?So(m):c.mount)c.mount.delete(x),c.array.delete(x),w.keepValue||(ue(i,x),ue(s,x)),!w.keepError&&ue(r.errors,x),!w.keepDirty&&ue(r.dirtyFields,x),!w.keepTouched&&ue(r.touchedFields,x),!n.shouldUnregister&&!w.keepDefaultValue&&ue(o,x);f.values.next({values:{...s}}),f.state.next({...r,...w.keepDirty?{isDirty:L()}:{}}),!w.keepIsValid&&y()},jr=({disabled:m,name:w,field:x,fields:O,value:P})=>{if(ct(m)){const $=m?void 0:te(P)?To(x?x._f:T(O,w)._f):P;q(s,w,$),I(w,$,!1,!1,!0)}},Tt=(m,w={})=>{let x=T(i,m);const O=ct(w.disabled);return q(i,m,{...x||{},_f:{...x&&x._f?x._f:{ref:{name:m}},name:m,mount:!0,...w}}),c.mount.add(m),x?jr({field:x,disabled:w.disabled,name:m}):N(m,!0,w.value),{...O?{disabled:w.disabled}:{},...n.progressive?{required:!!w.required,min:Mn(w.min),max:Mn(w.max),minLength:Mn(w.minLength),maxLength:Mn(w.maxLength),pattern:Mn(w.pattern)}:{},name:m,onChange:ut,onBlur:ut,ref:P=>{if(P){Tt(m,w),x=T(i,m);const $=te(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,F=Yv($),Z=x._f.refs||[];if(F?Z.find(ie=>ie===$):$===x._f.ref)return;q(i,m,{_f:{...x._f,...F?{refs:[...Z.filter(Eo),$,...Array.isArray(T(o,m))?[{}]:[]],ref:{type:$.type,name:m}}:{ref:$}}}),N(m,!1,void 0,$)}else x=T(i,m,{}),x._f&&(x._f.mount=!1),(n.shouldUnregister||w.shouldUnregister)&&!(Bv(c.array,m)&&a.action)&&c.unMount.add(m)}}},Ot=()=>n.shouldFocusError&&Fr(i,Et,c.mount),Ge=m=>{ct(m)&&(f.state.next({disabled:m}),Fr(i,w=>{w.disabled=m},0,!1))},Dn=(m,w)=>async x=>{x&&(x.preventDefault&&x.preventDefault(),x.persist&&x.persist());let O=We(s);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:P,values:$}=await E();r.errors=P,O=$}else await Q(i);ue(r.errors,"root"),Ce(r.errors)?(f.state.next({errors:{}}),await m(O,x)):(w&&await w({...r.errors},x),Ot(),setTimeout(Ot)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ce(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Ur=(m,w={})=>{T(i,m)&&(te(w.defaultValue)?qe(m,T(o,m)):(qe(m,w.defaultValue),q(o,m,w.defaultValue)),w.keepTouched||ue(r.touchedFields,m),w.keepDirty||(ue(r.dirtyFields,m),r.isDirty=w.defaultValue?L(m,T(o,m)):L()),w.keepError||(ue(r.errors,m),l.isValid&&y()),f.state.next({...r}))},jl=(m,w={})=>{const x=m?We(m):o,O=We(x),P=m&&!Ce(m)?O:o;if(w.keepDefaultValues||(o=x),!w.keepValues){if(w.keepDirtyValues||h)for(const $ of c.mount)T(r.dirtyFields,$)?q(P,$,T(s,$)):qe($,T(P,$));else{if(ko&&te(m))for(const $ of c.mount){const F=T(i,$);if(F&&F._f){const Z=Array.isArray(F._f.refs)?F._f.refs[0]:F._f.ref;if(Ir(Z)){const ie=Z.closest("form");if(ie){ie.reset();break}}}}i={}}s=e.shouldUnregister?w.keepDefaultValues?We(o):{}:We(P),f.array.next({values:{...P}}),f.values.next({values:{...P}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!l.isValid||!!w.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:w.keepSubmitCount?r.submitCount:0,isDirty:w.keepDirty?r.isDirty:!!(w.keepDefaultValues&&!Pt(m,o)),isSubmitted:w.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:w.keepDirtyValues?r.dirtyFields:w.keepDefaultValues&&m?Vo(o,m):{},touchedFields:w.keepTouched?r.touchedFields:{},errors:w.keepErrors?r.errors:{},isSubmitSuccessful:w.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ul=(m,w)=>jl(lt(m)?m(s):m,w);return{control:{register:Tt,unregister:tn,getFieldState:Fn,handleSubmit:Dn,setError:In,_executeSchema:E,_getWatch:R,_getDirty:L,_updateValid:y,_removeUnmounted:j,_updateFieldArray:C,_updateDisabledField:jr,_getFieldArray:U,_reset:jl,_resetDefaultValues:()=>lt(n.defaultValues)&&n.defaultValues().then(m=>{Ul(m,n.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:m=>{r={...r,...m}},_disableForm:Ge,_subjects:f,_proxyFormState:l,get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(m){a=m},get _defaultValues(){return o},get _names(){return c},set _names(m){c=m},get _formState(){return r},set _formState(m){r=m},get _options(){return n},set _options(m){n={...n,...m}}},trigger:G,register:Tt,handleSubmit:Dn,watch:Vt,setValue:qe,getValues:dt,reset:Ul,resetField:Ur,clearErrors:Br,unregister:tn,setError:In,setFocus:(m,w={})=>{const x=T(i,m),O=x&&x._f;if(O){const P=O.refs?O.refs[0]:O.ref;P.focus&&(P.focus(),w.shouldSelect&&P.select())}},getFieldState:Fn}}function Il(e={}){const t=Ee.useRef(),n=Ee.useRef(),[r,i]=Ee.useState({isDirty:!1,isValidating:!1,isLoading:lt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:lt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...tg(e,()=>i(s=>({...s}))),formState:r});const o=t.current.control;return o._options=e,Hv({subject:o._subjects.state,next:s=>{zv(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Ee.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Ee.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),Ee.useEffect(()=>{e.values&&!Pt(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values):o._resetDefaultValues()},[e.values,o]),Ee.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()}),t.current.formState=Uv(r,o),t.current}var Dl=function(e,t,n){if(e&&"reportValidity"in e){var r=T(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},ng=function(e,t){var n=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Dl(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return Dl(s,i,e)})};for(var r in t.fields)n(r)},rg=function(e,t){t.shouldUseNativeValidation&&ng(e,t);var n={};for(var r in e){var i=T(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(og(t.names||Object.keys(e),r)){var s=Object.assign({},ig(T(n,r)));q(s,"root",o),q(n,r,s)}else q(n,r,o)}return n},ig=function(e){return Array.isArray(e)?e.filter(Boolean):[]},og=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},sg=function(e,t){for(var n={};e.issues.length;){var r=e.issues[0];if(r.path){var i=r.path.map(function(a){return a.key}).join(".");if(n[i]||(n[i]={message:r.message,type:r.validation}),t){var o=n[i].types,s=o&&o[r.validation];n[i]=wl(i,t,n,r.validation,s?[].concat(s,r.message):r.message)}e.issues.shift()}}return n},Nl=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(s,a){try{var c=function(){function u(l){return{values:n.raw?r:l,errors:{}}}var d=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return n.mode==="sync"?u(ho(e,r,d)):Promise.resolve(Wm(e,r,d)).then(u)}()}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(s){if(s instanceof Vr)return{values:{},errors:rg(sg(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const ag=27,cg=12,lg=10,ug=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},dg=wo("multiple-choice"),fg=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Nl(Xt({checked:al(Hm(Lm()),n=>Object.entries(n).filter(([r,i])=>i).map(([r,i])=>r),[Gm(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),cl(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},pg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var u,d;const r=e.key?(u=Y.current$.value.application)==null?void 0:u.data.submissions[e.key]:void 0,{register:i,handleSubmit:o,formState:{errors:s}}=Il({defaultValues:{checked:dg(r)?Object.fromEntries(r.value.map(l=>[l,!0])):{}},resolver:fg(e.config)}),a=_o(),c=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1;return g("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:l=>{c&&ug(l.currentTarget)},onSubmit:o(l=>{const f=l.checked;t(f)}),children:[g("div",{class:"flex items-center gap-1",children:[g("ul",{style:{maxHeight:6.5*ag+5*cg+2*lg},class:ot("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{"justify-center":e.config.options.length===1}),children:e.config.options.map((l,f)=>{const h=`checked.${l.value}`,{ref:p,...v}=i(h);return g("li",{class:"relative",children:[g("input",{autoFocus:f===0,ref:b=>{b&&f===0&&(a.current=b),p(b)},id:h,...v,class:"peer sr-only h-full",type:"checkbox"}),g("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",htmlFor:h,children:l.label})]},l.value)})}),g("div",{class:"flex flex-col items-center gap-2",children:[!c&&g(Or,{}),e.config.minSelected===0&&g(Mr,{type:"button",onClick:()=>t([])})]})]}),g("div",{class:"px-1",children:g(xo,{onAnimationComplete:n,error:(d=s.checked)==null?void 0:d.root})})]})},en={empty:"Please enter some text",email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number",url:"That doesn’t look like a valid URL"},hg=De(en.phone,[Ym(/^\+?[0-9 -]+$/,en.phone)]),mg={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},vg=wo("text"),gg=e=>Nl(Xt({text:{email:De(en.email,[qm(en.email)]),phone:al(hg,t=>t.replace(/[^0-9]/g,"")),text:De([cl(1,en.empty)]),url:De([Zm(en.url)])}[e.format]})),yg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var l;const r=e.key?(l=Y.current$.value.application)==null?void 0:l.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:o,handleSubmit:s,formState:{errors:a}}=Il({defaultValues:{text:i||(vg(r)?r.value:"")},resolver:gg(e.config)}),{ref:c,...u}=o("text",{required:!e.config.optional}),d=B();return Pe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),g(ee,{children:g("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(f=>{t(f.text)}),children:[g("div",{class:"flex items-center gap-2",children:[g("div",{class:"relative min-w-0 flex-grow",children:[g("input",{id:"chat-input",...u,...mg[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:f=>{f&&(d.current=f),c(f)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&g(Mr,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),g(Or,{})]}),g(xo,{onAnimationComplete:n,error:a.text})]})})},bg=({onSubmit:e,onInputChange:t,input:n})=>{const r=B(null),i=ae(()=>{r.current&&(po.value=r.current.getBoundingClientRect().height)},[]);H(()=>{i(),t(n==null?void 0:n.type)},[n==null?void 0:n.type,t,i]);const o=s=>a=>e({type:s,value:a});return g(Cr.div,{initial:{height:0},animate:{height:po.value},exit:{height:0,opacity:0},class:"bg-statusbar absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",children:g("div",{ref:r,class:"border-divider border-t",children:Ue({application:Y,input:n,onHeightChange:i}).with({input:_e.nullish},()=>g("div",{class:"flex items-center gap-2 p-2.5",children:[g("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),g(Or,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>g(yg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>g(pg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"boolean"}},s=>g(Ov,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"file"}},s=>g(Nv,{onSubmitSuccess:o(s.input.type),...s})).exhaustive()})})},Ll=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Rl=ot,Bl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],l=o==null?void 0:o[u];if(d===null)return null;const f=Ll(d)||Ll(l);return i[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[l,f]=d;return f===void 0||(u[l]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:l,className:f,...h}=d;return Object.entries(h).every(p=>{let[v,b]=p;return Array.isArray(b)?b.includes({...o,...a}[v]):{...o,...a}[v]===b})?[...u,l,f]:u},[]);return Rl(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},wg=Bl("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},transitionState:{entering:"opacity-0 translate-y-8",entered:"opacity-100 translate-y-0",exiting:"opacity-0 scale-0",exited:""}},defaultVariants:{side:"left"}}),_g={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},xg=({children:e,className:t,transitionState:n,side:r,...i})=>g(Cr.p,{variants:_g,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:wg({className:t,side:r,transitionState:n}),...i,children:e}),kg=({className:e,...t})=>g("div",{"aria-label":"Typing…",class:ot("flex gap-1 p-4",e),...t,children:Array.from({length:3},(n,r)=>g("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}),Sg={bot:"left",user:"right"},Cg=Bl("w-full select-none py-2 text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),$g=({messages:e,isBotTyping:t})=>g("ol",{"aria-label":"Chat messages",class:"flex flex-grow flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[g(ro,{initial:!1,children:e.map((n,r)=>g("li",{class:"flex",children:Ue(n).with({type:"system"},i=>g("p",{class:Cg({variant:i.variant}),children:i.text})).with({type:"text",author:_e.union("bot","user")},i=>g(xg,{side:Sg[i.author],children:i.text},r)).with({type:"link"},i=>g("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",children:g("a",{class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:i.href,children:[i.text,g("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})})).with({type:"image"},i=>g("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>g(Dv,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()},r))}),g("aside",{"aria-hidden":!0,children:t&&g(kg,{})})]}),Ag=25,Pg=()=>{const e=B(null),[t,n]=re(!1),[r,i]=re(()=>()=>{}),o=oe(()=>a=>{var c;return(c=e.current)==null?void 0:c.scrollTo({top:e.current.scrollHeight,...a})},[e]),s=oe(()=>({send:async({message:a,signal:c,groupId:u})=>{if(await Ue(a).with({author:"bot",type:"text"},async d=>{if(c!=null&&c.aborted)throw new Vn;n(!0);const l=Math.min(Math.max(20,d.text.length),100)*Ag;await new Promise(f=>setTimeout(f,l,{signal:c})),n(!1)}).otherwise(async()=>{}),c!=null&&c.aborted)throw new Vn;Y.addMessage(a,u)},input:async({input:a,signal:c})=>{if(c!=null&&c.aborted)throw new Vn;return Y.setInput(a),await new Promise(u=>{const d=l=>{if(c!=null&&c.aborted)throw new Vn;Y.setInput(void 0),a.key&&(Y.setSubmission,Y.setSubmission(a.key,l)),u(l)};i(()=>d)})}}),[]);return{chatRef:e,chatService:s,isBotTyping:t,onSubmitSuccessFn:r,scrollToEnd:o}},Eg=Object.freeze(Object.defineProperty({__proto__:null,JobApplicationContent:({currentApplication:e,logger:t,apiClient:n,analytics:r})=>{const{chatRef:i,chatService:o,isBotTyping:s,onSubmitSuccessFn:a,scrollToEnd:c}=Pg(),u=ze.value,d=e.flow,l=e.job;return Pe(()=>{u==="maximised"&&c({behavior:"instant"})},[c,u]),H(()=>{c({behavior:"smooth"})},[e.data.messages,c]),Pe(()=>{const{state:f,application:h}=Y.current$.peek();if(f!=="loaded")throw new Error(wm.invalid_state);let p=h.data.currentNodeId;if(c({behavior:"instant"}),Y.setInput(void 0),h.data.isFinished)return;p===null?(p=ul(d.nodes).id,Y.setCurrentNodeId(p),r.log({event:"APPLY_START",attributionKey:`job_${l.id}`,properties:{job_id:l.id,flow_id:d.id}})):Y.removeLastGroupMessagesById(p);const{interpret:v,abort:b}=pv({context:{jobId:l.id,flowId:d.id},analytics:r,apiClient:n,logger:t,flow:d.nodes,chatService:o,getSubmissions:()=>{var k;return(k=Y.current$.peek().application)==null?void 0:k.data.submissions},onInterpret:(k,y)=>{const _=Y.current$.peek().application;Nt(_),y&&(_.data.sequence=_.data.sequence+1,r.log({event:"FLOW_NODE",attributionKey:`job_${l.id}`,properties:{flow_id:d.id,flow_version:d.version,job_id:l.id,from_node_id:y.id,to_node_id:k.id,sequence:_.data.sequence,flow_session_id:_.data.flowSessionId}})),Y.setCurrentNodeId(k.id)},onFlowEnd:async()=>{Y.markAsFinished()}});return v(p),b},[r,n,o,t,c,d,l.id,e.startedAt]),g(ee,{children:[g("div",{ref:i,className:"hide-scrollbars relative flex max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:po.value},children:g(ro,{children:g($g,{isBotTyping:s,messages:e.data.messages})})}),g(bg,{input:e.data.currentInput,onInputChange:()=>c({behavior:"smooth"}),onSubmit:a})]})}},Symbol.toStringTag,{value:"Module"}))})();