@inploi/plugin-chatbot 3.10.1 → 3.11.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 Dg=Object.defineProperty;var Ng=(ft,Le,$e)=>Le in ft?Dg(ft,Le,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ft[Le]=$e;var Kl=(ft,Le,$e)=>(Ng(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=[],ql=/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=Gl(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 Gl(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 Yl(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"||ql.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=Xl),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=Zl(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 Zl(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(Yl(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 Xl(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 Ql(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 Jl(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 eu(){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)||tu)(eu)),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 tu(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 nu=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 ru(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=nu,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 iu(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 ou(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,ou.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=au(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({}))},iu(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=su(n,c,d,i),o[c]=u):u.o(d,i)}}}e(t)});function su(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 au(e){return oe(function(){return sn(e)},[])}var cu=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 lu=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=lu,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},uu=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)}uu(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 du(e){return this.getChildContext=function(){return e.context},e.children}function fu(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(du,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ss(e,t){var n=M(fu,{__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,pu=/^(?: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]/,hu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,mu=/[A-Z0-9]/g,vu=typeof document<"u",gu=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 yu(){}function bu(){return this.cancelBubble}function wu(){return this.defaultPrevented}V.event=function(e){return Ps&&(e=Ps(e)),e.persist=yu,e.isPropagationStopped=bu,e.isDefaultPrevented=wu,e.nativeEvent=e};var oi,_u={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||vu&&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"||gu(n.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":hu.test(o)?o=a:r.indexOf("-")===-1&&pu.test(o)?o=o.replace(mu,"-$&").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",_u)):(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}}}},xu="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)?Ql.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 ku=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:Jl,useId:zn,useImperativeHandle:os,useInsertionEffect:Xn,useLayoutEffect:Pe,useMemo:oe,useReducer:Un,useRef:B,useState:re,useSyncExternalStore:Bs,useTransition:Rs,version:xu},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 Su(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function js(...e){return t=>e.forEach(n=>Su(n,t))}function cn(...e){return ae(js(...e),e)}function Cu(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,$u(i,...t)]}function $u(...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:()=>{},Au=ku["useId".toString()]||(()=>{});let Pu=0;function ci(e){const[t,n]=re(Au());return ai(()=>{e||n(r=>r??String(Pu++))},[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 Eu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Vu({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 Vu({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(Ou);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,{...Mu(r,n.props),ref:t?js(t,n.ref):n.ref}):Te.count(n)>1?Te.only(null):null});ui.displayName="SlotClone";const Tu=({children:e})=>M(ee,null,e);function Ou(e){return Xe(e)&&e.type===Tu}function Mu(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 Fu(e,t){e&&Zn(()=>e.dispatchEvent(t))}function Iu(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",Du="dismissableLayer.pointerDownOutside",Nu="dismissableLayer.focusOutside";let Us;const Lu=Ae({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ru=pe((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,d=fe(Lu),[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=Bu(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=ju(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 Iu(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 Bu(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(Du,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 ju(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(Nu,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?Fu(i,o):i.dispatchEvent(o)}const pi="focusScope.autoFocusOnMount",hi="focusScope.autoFocusOnUnmount",Ws={bubbles:!1,cancelable:!0},Uu=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||(zu(Gu(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]=Hu(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 zu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Je(r,{select:t}),document.activeElement!==n)return}function Hu(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(!Wu(n,{upTo:t}))return n}function Wu(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 Ku(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&&Ku(e)&&t&&e.select()}}const Gs=qu();function qu(){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 Gu(e){return e.filter(t=>t.tagName!=="A")}function Yu(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=Zu(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 Zu(e){const[t,n]=re(),r=B({}),i=B(e),o=B("none"),s=e?"mounted":"unmounted",[a,c]=Yu(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 Xu(){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 Qu(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",Ju="with-scroll-bars-hidden",ed="--removed-body-scroll-bar-size";function td(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nd(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 rd(e,t){return nd(t||null,function(n){return e.forEach(function(r){return td(r,n)})})}function id(e){return e}function od(e,t){t===void 0&&(t=id);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 sd(e){e===void 0&&(e={});var t=od(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 ad(e,t){return e.useMedium(t),Qs}var Js=sd(),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=rd([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,cd=function(){if(ea)return ea;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ld(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cd();return t&&e.setAttribute("nonce",t),e}function ud(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var fd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ld())&&(ud(t,n),dd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pd=function(){var e=fd();return function(t,n){H(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ta=function(){var e=pd(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},hd={left:0,top:0,right:0,gap:0},yi=function(e){return parseInt(e||"",10)||0},md=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)]},vd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return hd;var t=md(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])}},gd=ta(),yd=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(Ju,` {
1
+ var Bg=Object.defineProperty;var jg=(ft,Le,$e)=>Le in ft?Bg(ft,Le,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ft[Le]=$e;var ql=(ft,Le,$e)=>(jg(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,Io,Do,pt,No,Lo,Wr,Ro,Mt={},Bo=[],Gl=/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 jo(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??++Io};return i==null&&V.vnode!=null&&V.vnode(o),o}function Uo(){return{current:null}}function J(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 zo(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 zo(e)}}function Kr(e){(!e.__d&&(e.__d=!0)&&pt.push(e)&&!Rn.__r++||No!==V.debounceRendering)&&((No=V.debounceRendering)||Lo)(Rn)}function Rn(){var e,t,n,r,i,o,s,a,c;for(pt.sort(Wr);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,qr(c,s,o,n.__n,c.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??Ln(s),s.__h,i),Zo(r,s,i),s.__e!=a&&zo(s)),pt.length>t&&pt.sort(Wr));Rn.__r=0}function Ho(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||Bo,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(J,{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=Yl(p,N,k=l+S,A))===-1?h=Mt:(h=N[y]||Mt,N[y]=void 0,A--),qr(e,p,h,i,o,s,a,c,u,d),v=p.__e,(f=p.ref)&&h.ref!=f&&(h.ref&&Gr(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=Ko(e,v,c):c=Wo(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),Xo(N[l],N[l]))}function Wo(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"?Wo(r,t,n):Ko(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 Ko(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 Yl(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 Zl(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 qo(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Gl.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||qo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||qo(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?Yo:Go,o):e.removeEventListener(t,o?Yo:Go,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 Go(e){return this.l[e.type+!1](V.event?V.event(e):e)}function Yo(e){return this.l[e.type+!0](V.event?V.event(e):e)}function qr(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=Ql),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(K){K&&(K.__=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)),Ho(e,Nn(A=d!=null&&d.type===J&&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=Xl(n.__e,t,n,r,i,o,s,c,u);(d=V.diffed)&&d(t)}catch(K){t.__v=null,(c||o!=null)&&(t.__e=a,t.__h=!!c,o[o.indexOf(a)]=null),V.__e(K,t,n)}}function Zo(e,t,n){for(var r=0;r<n.length;r++)Gr(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 Xl(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(Zl(e,h,f,i,a),l)t.__k=[];else if(Ho(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&&jo(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 Gr(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){V.__e(r,n)}}function Xo(e,t,n){var r,i;if(V.unmount&&V.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Gr(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]&&Xo(r[i],t,n||typeof e.type!="function");n||e.__e==null||jo(e.__e),e.__=e.__e=e.__d=void 0}function Ql(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=[],qr(t,e=(!r&&n||t).__k=M(J,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),Zo(o,e,s)}function Qo(e,t){Ft(e,t,Qo)}function Jl(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"+Ro++,__: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,Kr(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=Bo.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}},Io=0,Do=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),Kr(this))},xe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Kr(this))},xe.prototype.render=J,pt=[],Lo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wr=function(e,t){return e.__v.__b-t.__v.__b},Rn.__r=0,Ro=0;var je,q,Yr,Jo,It=0,es=[],jn=[],ts=V.__b,ns=V.__r,rs=V.diffed,is=V.__c,os=V.unmount;function ht(e,t){V.__h&&V.__h(q,e,It||t),It=0;var n=q.__H||(q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:jn}),n.__[e]}function re(e){return It=1,Un(ls,e)}function Un(e,t,n){var r=ht(je++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ls(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=q,!q.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))};q.u=!0;var o=q.shouldComponentUpdate,s=q.componentWillUpdate;q.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)},q.shouldComponentUpdate=i}return r.__N||r.__}function H(e,t){var n=ht(je++,3);!V.__s&&Xr(n.__H,t)&&(n.__=e,n.i=t,q.__H.__h.push(n))}function Pe(e,t){var n=ht(je++,4);!V.__s&&Xr(n.__H,t)&&(n.__=e,n.i=t,q.__h.push(n))}function B(e){return It=5,oe(function(){return{current:e}},[])}function ss(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 Xr(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=q.context[e.__c],n=ht(je++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(q)),t.props.value):e.__}function as(e,t){V.useDebugValue&&V.useDebugValue(t?t(e):e)}function eu(e){var t=ht(je++,10),n=re();return t.__=e,q.componentDidCatch||(q.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=q.__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 tu(){for(var e;e=es.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Hn),e.__H.__h.forEach(Zr),e.__H.__h=[]}catch(t){e.__H.__h=[],V.__e(t,e.__v)}}V.__b=function(e){q=null,ts&&ts(e)},V.__r=function(e){ns&&ns(e),je=0;var t=(q=e.__c).__H;t&&(Yr===q?(t.__h=[],q.__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(Zr),t.__h=[],je=0)),Yr=q},V.diffed=function(e){rs&&rs(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(es.push(t)!==1&&Jo===V.requestAnimationFrame||((Jo=V.requestAnimationFrame)||nu)(tu)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==jn&&(n.__=n.__V),n.i=void 0,n.__V=jn})),Yr=q=null},V.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Hn),n.__h=n.__h.filter(function(r){return!r.__||Zr(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],V.__e(r,n.__v)}}),is&&is(e,t)},V.unmount=function(e){os&&os(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 cs=typeof requestAnimationFrame=="function";function nu(e){var t,n=function(){clearTimeout(r),cs&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);cs&&(t=requestAnimationFrame(n))}function Hn(e){var t=q,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),q=t}function Zr(e){var t=q;e.__c=e.__(),q=t}function Xr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ls(e,t){return typeof t=="function"?t(e):t}function Wn(){throw new Error("Cycle detected")}var ru=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,Qr++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&ds(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(Qr=0,Ye--,t)throw e}}function iu(e){if(Ye>0)return e();Ye++;try{return e()}finally{Kn()}}var ee=void 0,on=void 0,Ye=0,Qr=0,qn=0;function us(e){if(ee!==void 0){var t=e.n;if(t===void 0||t.t!==ee)return t={i:0,S:e,p:ee.s,n:void 0,t:ee,e:void 0,x:void 0,r:t},ee.s!==void 0&&(ee.s.n=t),ee.s=t,e.n=t,32&ee.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=ee.s,t.n=void 0,ee.s.n=t,ee.s=t),t}}function ce(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ce.prototype.brand=ru,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 ei(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=us(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(ee instanceof Ze&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Qr>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 ds(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 fs(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 ps(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&&!ds(this))return this.f&=-2,!0;var e=ee;try{fs(this),ee=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 ee=e,ps(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=us(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ou(e){return new Ze(e)}function hs(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ye++;var n=ee;ee=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Jr(e),r}finally{ee=n,Kn()}}}function Jr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,hs(e)}function su(e){if(ee!==this)throw new Error("Out-of-order effect");ps(this),ee=e,this.f&=-2,8&this.f&&Jr(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,hs(this),fs(this),Ye++;var e=ee;return ee=this,su.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||Jr(this)};function ei(e){var t=new an(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var ti;function Dt(e,t){V[e]=t.bind(null,V[e]||function(){})}function Gn(e){ti&&ti(),ti=e&&e.S()}function ms(e){var t=this,n=e.data,r=cu(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;!Do(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},ou(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}ms.displayName="_st",Object.defineProperties(ce.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ms},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 ei(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=au(n,c,d,i),o[c]=u):u.o(d,i)}}}e(t)});function au(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:ei(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 cu(e){return oe(function(){return sn(e)},[])}var lu=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function Nt(e,t){if(!e)throw new Error(t)}function ni(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 vs(e,t){for(var n in t)e[n]=t[n];return e}function ri(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 ii(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Yn(e){this.props=e}function gs(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:ri(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 ri(this.props,e)||ri(this.state,t)};var ys=V.__b;V.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ys&&ys(e)};var uu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function pe(e){function t(n){var r=vs({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=uu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var bs=function(e,t){return e==null?null:Be(Be(e).map(t))},Te={map:bs,forEach:bs,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},du=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)}du(e,t,n,r)};var ws=V.unmount;function _s(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=vs({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return _s(r,t,n)})),e}function xs(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return xs(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 ks(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function oi(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),ws&&ws(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=ks(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]=xs(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]=_s(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&M(J,null,e.fallback);return i&&(i.__h=null),[M(J,null,t.__a?null:e.children),i]};var Ss=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 fu(e){return this.getChildContext=function(){return e.context},e.children}function pu(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(fu,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Cs(e,t){var n=M(pu,{__v:e,i:t});return n.containerInfo=t,n}(Rt.prototype=new xe).__a=function(e){var t=this,n=ks(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Ss(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){Ss(e,n,t)})};var $s=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,hu=/^(?: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]/,mu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,vu=/[A-Z0-9]/g,gu=typeof document<"u",yu=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function As(e,t,n){return t.__k==null&&(t.textContent=""),Ft(e,t),typeof n=="function"&&n(),e?e.__c:null}function Ps(e,t,n){return Qo(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 Es=V.event;function bu(){}function wu(){return this.cancelBubble}function _u(){return this.defaultPrevented}V.event=function(e){return Es&&(e=Es(e)),e.persist=bu,e.isPropagationStopped=wu,e.isDefaultPrevented=_u,e.nativeEvent=e};var si,xu={enumerable:!1,configurable:!0,get:function(){return this.class}},Vs=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||gu&&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"||yu(n.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":mu.test(o)?o=a:r.indexOf("-")===-1&&hu.test(o)?o=o.replace(vu,"-$&").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",xu)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=$s,Vs&&Vs(e)};var Ts=V.__r;V.__r=function(e){Ts&&Ts(e),si=e.__c};var Os=V.diffed;V.diffed=function(e){Os&&Os(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),si=null};var Ms={ReactCurrentDispatcher:{current:{readContext:function(e){return si.__n[e.__c].props.value}}}},ku="17.0.2";function Fs(e){return M.bind(null,e)}function Xe(e){return!!e&&e.$$typeof===$s}function Qe(e){return Xe(e)?Jl.apply(null,arguments):e}function Is(e){return!!e.__k&&(Ft(null,e),!0)}function Ds(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ns=function(e,t){return e(t)},Zn=function(e,t){return e(t)},Ls=J;function ai(e){e()}function Rs(e){return e}function Bs(){return[!1,ai]}var Xn=Pe;function js(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,ii(i.__,t())||o({h:i})},[e,n,t]),H(function(){return ii(i.__,i.v())||o({h:i}),e(function(){ii(i.__,i.v())||o({h:i})})},[e]),n}var Ee={useState:re,useId:zn,useReducer:Un,useEffect:H,useLayoutEffect:Pe,useInsertionEffect:Xn,useTransition:Bs,useDeferredValue:Rs,useSyncExternalStore:js,startTransition:ai,useRef:B,useImperativeHandle:ss,useMemo:oe,useCallback:ae,useContext:fe,useDebugValue:as,version:"17.0.2",Children:Te,render:As,hydrate:Ps,unmountComponentAtNode:Is,createPortal:Cs,createElement:M,createContext:Ae,createFactory:Fs,cloneElement:Qe,createRef:Uo,Fragment:J,isValidElement:Xe,findDOMNode:Ds,Component:xe,PureComponent:Yn,memo:gs,forwardRef:pe,flushSync:Zn,unstable_batchedUpdates:Ns,StrictMode:Ls,Suspense:Lt,SuspenseList:Rt,lazy:oi,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ms};const Su=Object.freeze(Object.defineProperty({__proto__:null,Children:Te,Component:xe,Fragment:J,PureComponent:Yn,StrictMode:Ls,Suspense:Lt,SuspenseList:Rt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ms,cloneElement:Qe,createContext:Ae,createElement:M,createFactory:Fs,createPortal:Cs,createRef:Uo,default:Ee,findDOMNode:Ds,flushSync:Zn,forwardRef:pe,hydrate:Ps,isValidElement:Xe,lazy:oi,memo:gs,render:As,startTransition:ai,unmountComponentAtNode:Is,unstable_batchedUpdates:Ns,useCallback:ae,useContext:fe,useDebugValue:as,useDeferredValue:Rs,useEffect:H,useErrorBoundary:eu,useId:zn,useImperativeHandle:ss,useInsertionEffect:Xn,useLayoutEffect:Pe,useMemo:oe,useReducer:Un,useRef:B,useState:re,useSyncExternalStore:js,useTransition:Bs,version:ku},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 Cu(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Us(...e){return t=>e.forEach(n=>Cu(n,t))}function cn(...e){return ae(Us(...e),e)}function $u(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,Au(i,...t)]}function Au(...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 ci=globalThis!=null&&globalThis.document?Pe:()=>{},Pu=Su["useId".toString()]||(()=>{});let Eu=0;function li(e){const[t,n]=re(Pu());return ci(()=>{e||n(r=>r??String(Eu++))},[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 Vu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Tu({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 Tu({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 ui=pe((e,t)=>{const{children:n,...r}=e,i=Te.toArray(n),o=i.find(Mu);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(di,be({},r,{ref:t}),Xe(s)?Qe(s,void 0,a):null)}return M(di,be({},r,{ref:t}),n)});ui.displayName="Slot";const di=pe((e,t)=>{const{children:n,...r}=e;return Xe(n)?Qe(n,{...Fu(r,n.props),ref:t?Us(t,n.ref):n.ref}):Te.count(n)>1?Te.only(null):null});di.displayName="SlotClone";const Ou=({children:e})=>M(J,null,e);function Mu(e){return Xe(e)&&e.type===Ou}function Fu(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 fi=["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?ui:t;return H(()=>{window[Symbol.for("radix-ui")]=!0},[]),M(a,be({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Iu(e,t){e&&Zn(()=>e.dispatchEvent(t))}function Du(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 pi="dismissableLayer.update",Nu="dismissableLayer.pointerDownOutside",Lu="dismissableLayer.focusOutside";let zs;const Ru=Ae({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bu=pe((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,d=fe(Ru),[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=ju(A=>{const E=A.target,K=[...d.branches].some(Q=>Q.contains(E));!S||K||(o==null||o(A),a==null||a(A),A.defaultPrevented||c==null||c())},h),I=Uu(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 Du(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&&(zs=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),Hs(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=zs)}},[l,h,r,d]),H(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),Hs())},[l,d]),H(()=>{const A=()=>p({});return document.addEventListener(pi,A),()=>document.removeEventListener(pi,A)},[]),M(fi.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 ju(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(){Ws(Nu,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 Uu(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e),r=B(!1);return H(()=>{const i=o=>{o.target&&!r.current&&Ws(Lu,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 Hs(){const e=new CustomEvent(pi);document.dispatchEvent(e)}function Ws(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?Iu(i,o):i.dispatchEvent(o)}const hi="focusScope.autoFocusOnMount",mi="focusScope.autoFocusOnUnmount",Ks={bubbles:!1,cancelable:!0},zu=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){Ys.add(h);const v=document.activeElement;if(!a.contains(v)){const k=new CustomEvent(hi,Ks);a.addEventListener(hi,u),a.dispatchEvent(k),k.defaultPrevented||(Hu(Yu(qs(a)),{select:!0}),document.activeElement===v&&Je(a))}return()=>{a.removeEventListener(hi,u),setTimeout(()=>{const k=new CustomEvent(mi,Ks);a.addEventListener(mi,d),a.dispatchEvent(k),k.defaultPrevented||Je(v??document.body,{select:!0}),a.removeEventListener(mi,d),Ys.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]=Wu(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(fi.div,be({tabIndex:-1},s,{ref:f,onKeyDown:p}))});function Hu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Je(r,{select:t}),document.activeElement!==n)return}function Wu(e){const t=qs(e),n=Gs(t,e),r=Gs(t.reverse(),e);return[n,r]}function qs(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 Gs(e,t){for(const n of e)if(!Ku(n,{upTo:t}))return n}function Ku(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 qu(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&&qu(e)&&t&&e.select()}}const Ys=Gu();function Gu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Zs(e,t),e.unshift(t)},remove(t){var n;e=Zs(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Zs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yu(e){return e.filter(t=>t.tagName!=="A")}function Zu(e,t){return Un((n,r)=>{const i=t[n][r];return i??n},e)}const vi=e=>{const{present:t,children:n}=e,r=Xu(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};vi.displayName="Presence";function Xu(e){const[t,n]=re(),r=B({}),i=B(e),o=B("none"),s=e?"mounted":"unmounted",[a,c]=Zu(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]),ci(()=>{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]),ci(()=>{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 gi=0;function Qu(){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:Xs()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Xs()),gi++,()=>{gi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),gi--}},[])}function Xs(){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 Qs(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 Ju(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",ed="with-scroll-bars-hidden",td="--removed-body-scroll-bar-size";function nd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function rd(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 id(e,t){return rd(t||null,function(n){return e.forEach(function(r){return nd(r,n)})})}function od(e){return e}function sd(e,t){t===void 0&&(t=od);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 ad(e){e===void 0&&(e={});var t=sd(null);return t.options=Oe({async:!0,ssr:!1},e),t}var Js=function(e){var t=e.sideCar,n=Qs(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))};Js.isSideCarExport=!0;function cd(e,t){return e.useMedium(t),Js}var ea=ad(),yi=function(){},tr=pe(function(e,t){var n=B(null),r=re({onScrollCapture:yi,onWheelCapture:yi,onTouchMoveCapture:yi}),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=Qs(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=f,C=id([n,t]),S=Oe(Oe({},y),i);return M(J,null,d&&M(_,{sideCar:ea,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 ta,ld=function(){if(ta)return ta;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ud(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ld();return t&&e.setAttribute("nonce",t),e}function dd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ud())&&(dd(t,n),fd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hd=function(){var e=pd();return function(t,n){H(function(){return e.add(t),function(){e.remove()}},[t&&n])}},na=function(){var e=hd(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},md={left:0,top:0,right:0,gap:0},bi=function(e){return parseInt(e||"",10)||0},vd=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[bi(n),bi(r),bi(i)]},gd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return md;var t=vd(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])}},yd=na(),bd=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(ed,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(a,"px ").concat(r,`;
5
5
  }
@@ -33,12 +33,12 @@ var Dg=Object.defineProperty;var Ng=(ft,Le,$e)=>Le in ft?Dg(ft,Le,{enumerable:!0
33
33
  }
34
34
 
35
35
  body {
36
- `).concat(ed,": ").concat(a,`px;
36
+ `).concat(td,": ").concat(a,`px;
37
37
  }
38
- `)},bd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=oe(function(){return vd(i)},[i]);return M(gd,{styles:yd(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,wd=function(e){return e.tagName==="TEXTAREA"},na=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!wd(e)&&n[t]==="visible")},_d=function(e){return na(e,"overflowY")},xd=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},kd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Sd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ia=function(e,t){return e==="v"?_d(t):xd(t)},oa=function(e,t){return e==="v"?kd(t):Sd(t)},Cd=function(e,t){return e==="h"&&t==="rtl"?-1:1},$d=function(e,t,n,r,i){var o=Cd(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},Ad=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pd=function(e){return`
38
+ `)},wd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=oe(function(){return gd(i)},[i]);return M(yd,{styles:bd(o,!t,i,n?"":"!important")})},wi=!1;if(typeof window<"u")try{var nr=Object.defineProperty({},"passive",{get:function(){return wi=!0,!0}});window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{wi=!1}var jt=wi?{passive:!1}:!1,_d=function(e){return e.tagName==="TEXTAREA"},ra=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_d(e)&&n[t]==="visible")},xd=function(e){return ra(e,"overflowY")},kd=function(e){return ra(e,"overflowX")},ia=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=oa(e,n);if(r){var i=sa(e,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Sd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Cd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},oa=function(e,t){return e==="v"?xd(t):kd(t)},sa=function(e,t){return e==="v"?Sd(t):Cd(t)},$d=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ad=function(e,t,n,r,i){var o=$d(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=sa(e,a),p=h[0],v=h[1],b=h[2],k=v-b-o*p;(p||k)&&oa(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]},aa=function(e){return[e.deltaX,e.deltaY]},ca=function(e){return e&&"current"in e?e.current:e},Pd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ed=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},Ed=0,Ut=[];function Vd(e){var t=B([]),n=B([0,0]),r=B(),i=re(Ed++)[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=Qu([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 $d(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&&Ad(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:Pd(i)}):null,h?M(bd,{gapMode:"margin"}):null)}const Td=ad(Js,Vd);var ca=pe(function(e,t){return M(tr,Oe({},e,{ref:t,sideCar:Td}))});ca.classNames=tr.classNames;const Od=ca;var Md=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))},Fd=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})},Id=function(e,t,n,r){var i=Fd(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={})}},Dd=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Md(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Id(r,i,n,"aria-hidden")):function(){return null}};const ua="Dialog",[da,Rg]=Cu(ua),[Nd,Ht]=da(ua),Ld=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]=Eu({prop:r,defaultProp:i,onChange:o});return M(Nd,{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)},Rd="DialogPortal",[Bg,fa]=da(Rd,{forceMount:void 0}),_i="DialogOverlay",Bd=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(jd,be({},i,{ref:t}))):null}),jd=pe((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ht(_i,n);return M(Od,{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",Ud=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(zd,be({},i,{ref:t})):M(Hd,be({},i,{ref:t})))}),zd=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 Dd(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())}))}),Hd=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 Xu(),M(ee,null,M(Uu,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},M(Ru,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 Wd=Ld,Kd=Bd,qd=Ud,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 Gd(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 Yd(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 Zd(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 Xd(e){const{initial:t,animate:n}=Zd(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({}),Qd=Ae({}),Jd=Symbol.for("motionComponentSymbol");function ef({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:tf(a)},{isStatic:l}=d,f=Xd(a),h=r(a,l);if(!l&&ar){f.visualElement=Gd(i,h,d,t);const p=fe(Qd),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,Yd(h,f.visualElement,c),h,l,f.visualElement))}const s=pe(o);return s[Jd]=i,s}function tf({layoutId:e}){const t=fe(wa).id;return t&&e!==void 0?t+"-"+e:e}function nf(e){function t(r,i={}){return ef(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 rf=["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:!!(rf.indexOf(e)>-1||/[A-Z]/.test(e))}const of={},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)&&(!!of[e]||e==="opacity")}const ke=e=>!!(e&&e.getVelocity),sf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},af=fn.length;function cf(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<af;s++){const a=fn[s];if(e[a]!==void 0){const c=sf[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(--"),lf=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,uf=(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,df=/^(#[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"),ff=vn("vh"),pf=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=uf(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=cf(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 hf({transformTemplate:e},t,n){return oe(()=>{const r=Ti();return Vi(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function mf(e,t,n){const r=e.style||{},i={};return Pa(i,r,e),Object.assign(i,hf(e,t,n)),e.transformValues?e.transformValues(i):i}function vf(e,t,n){const r={},i=mf(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 gf=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")||gf.has(e)}let Ea=e=>!fr(e);function yf(e){e&&(Ea=t=>t.startsWith("on")?!fr(t):e(t))}try{yf(require("@emotion/is-prop-valid").default)}catch{}function bf(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 wf(e,t,n){const r=Va(t,e.x,e.width),i=Va(n,e.y,e.height);return`${r} ${i}`}const _f={offset:"stroke-dashoffset",array:"stroke-dasharray"},xf={offset:"strokeDashoffset",array:"strokeDasharray"};function kf(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?_f:xf;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=wf(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&&kf(h,s,a,c,!1)}const Ta=()=>({...Ti(),attrs:{}}),Mi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Sf(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 Cf(e=!1){return(n,r,i,{latestValues:o},s)=>{const c=(Pi(n)?Sf:vf)(r,o,s,n),d={...bf(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),$f=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Af=e=>pr(e)?e[e.length-1]||0:e;function Pf(e){const t=ke(e)?e.get():e;return $f(t)?t.toValue():t}function Ef({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:Vf(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=()=>Ef(e,t,r,i);return n?o():Da(o)};function Vf(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=Pf(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 Tf(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"],Of=40;function Mf(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=hr.reduce((l,f)=>(l[f]=Tf(()=>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,Of),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:jg}=Mf(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0),Ff={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)})}})},If={useVisualState:Na({scrapeMotionValuesFromProps:Ii,createRenderState:Ti})};function Df(e,{forwardMotionProps:t=!1},n,r){return{...Pi(e)?Ff:If,preloadedFeatures:n,useRender:Cf(t),createVisualElement:r,Component:e}}function yt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Nf=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 Lf=e=>t=>Nf(t)&&e(t,Ra(t));function vr(e,t,n,r){return yt(e,t,Lf(n),r)}const Rf=(e,t)=>n=>t(e(n)),bt=(...e)=>e.reduce(Rf);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 Bf(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=Bf(!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 jf extends qt{mount(){this.unmount=bt(Ha(this.node,!0),Ha(this.node,!1))}unmount(){}}class Uf 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 zf 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,Hf=e=>{const t=Li.get(e.target);t&&t(e)},Wf=e=>{e.forEach(Hf)};function Kf({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(Wf,{root:e,...t})),r[i]}function qf(e,t,n){const r=Kf(t);return Li.set(e,n),r.observe(e),()=>{Li.delete(e),r.unobserve(e)}}const Gf={some:0,all:1};class Yf 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:Gf[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 qf(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(Zf(t,n))&&this.startObserver()}unmount(){}}function Zf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Xf={inView:{Feature:Yf},tap:{Feature:zf},focus:{Feature:Uf},hover:{Feature:jf}};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 Qf(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Jf(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,Qf(e),Jf(e))}const ep="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,tp={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 np(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 rp(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,ip=1e-7,op=12;function sp(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)>ip&&++a<op);return s}function wn(e,t,n,r){if(e===t&&n===r)return he;const i=o=>sp(o,0,1,e,n);return o=>o===0||o===1?o:Xa(i(o),t,r)}const ap=wn(.42,0,1,1),cp=wn(0,0,.58,1),Qa=wn(.42,0,.58,1),lp=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),up=Ja(nc),rc=wn(.33,1.53,.69,.99),Bi=ec(rc),dp=Ja(Bi),ic={linear:he,easeIn:ap,easeInOut:Qa,easeOut:cp,circIn:tc,circInOut:up,circOut:nc,backIn:Bi,backInOut:dp,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)&&df.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}},fp=e=>Wt(0,255,e),Ui={...gt,transform:e=>Math.round(fp(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 pp(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:pp,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 hp({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))},mp=[zi,_t,Gt],vp=e=>mp.find(t=>t.test(e));function ac(e){const t=vp(e);Me(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Gt&&(n=hp(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 gp(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:lf,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 yp=e=>typeof e=="number"?0:e;function bp(e){const t=fc(e);return pc(e)(t.map(yp))}const Yt={test:gp,parse:fc,createTransformer:pc,getAnimatableNone:bp},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}},wp=(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 _p(e){return typeof e=="number"?bc:typeof e=="string"?ge.test(e)?cc:gc:Array.isArray(e)?vc:typeof e=="object"?wp:bc}function xp(e,t,n){const r=[],i=n||_p(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=xp(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 kp(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 Sp(e){const t=[0];return kp(t,e.length-1),t}function Cp(e,t){return e.map(n=>n*t)}function $p(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=lp(r)?r.map(oc):oc(r),o={done:!1,value:t[0]},s=Cp(n&&n.length===t.length?n:Sp(t),e),a=wc(s,t,{ease:Array.isArray(i)?i:$p(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 Ap=5;function xc(e,t,n){const r=Math.max(t-Ap,0);return _c(n-e(r),t-r)}const qi=.001,Pp=.01,kc=10,Ep=.05,Vp=1;function Tp({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(Ep,Vp,s),e=Wt(Pp,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=Mp(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 Op=12;function Mp(e,t,n){let r=n;for(let i=1;i<Op;i++)r=r-e(r)/t(r);return r}function Gi(e,t){return e*Math.sqrt(1-t*t)}const Fp=["duration","bounce"],Ip=["stiffness","damping","mass"];function Sc(e,t){return t.some(n=>e[n]!==void 0)}function Dp(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Sc(e,Ip)&&Sc(e,Fp)){const n=Tp(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}=Dp(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 Np=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 Lp={decay:$c,inertia:$c,tween:wr,keyframes:wr,spring:Cc};function _r({autoplay:e=!0,delay:t=0,driver:n=Np,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 _=Lp[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 Rp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bp=Rp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),jp=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),xr=10,Up=2e4,zp=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Ga(t.ease);function Hp(e,t,{onUpdate:n,onComplete:r,...i}){if(!(Bp()&&jp.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(zp(t,i)){const y=_r({...i,repeat:0,delay:0});let _={done:!1,value:d[0]};const C=[];let S=0;for(;!_.done&&S<Up;)_=y.sample(S),C.push(_.value),S+=xr;h=void 0,d=C,l=S-xr,f="linear"}const p=np(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(rp(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 Wp({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 Kp={type:"spring",stiffness:500,damping:25,restSpeed:10},qp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gp={type:"keyframes",duration:.8},Yp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zp=(e,{keyframes:t})=>t.length>2?Gp:vt.has(e)?e.startsWith("scale")?qp(t[1]):Kp:Yp,Yi=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Yt.test(t)||t==="0")&&!t.startsWith("url(")),Xp=new Set(["brightness","contrast","saturate","opacity"]);function Qp(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=Xp.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Jp=/([a-z-]*)\(.*?\)/g,Zi={...Yt,getAnimatableNone:e=>{const t=e.match(Jp);return t?t.map(Qp).join(" "):e}},eh={...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=>eh[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 th(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Vc(e)}function nh(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]),th(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 rh({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 ih(e,t){return e[t]||e.default||e}const oh=(e,t,n,r={})=>i=>{const o=ih(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-wt(s);const c=nh(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(rh(o)||(h={...h,...Zp(e,h)}),h.duration&&(h.duration=wt(h.duration)),h.repeatDelay&&(h.repeatDelay=wt(h.repeatDelay)),!l||!f||tp.current||o.type===!1)return Wp(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=Hp(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 sh(e,t){e.indexOf(t)===-1&&e.push(t)}function ah(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Oc{constructor(){this.subscriptions=[]}add(t){return sh(this.subscriptions,t),()=>ah(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 ch=e=>!isNaN(parseFloat(e));class lh{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=ch(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 lh(e,t)}const Fc=e=>t=>t.test(e),Ic=[gt,D,Kt,et,pf,ff,{test:e=>e==="auto",parse:e=>e}],xn=e=>Ic.find(Fc(e)),uh=[...Ic,ge,Yt],dh=e=>uh.find(Fc(e));function fh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_n(n))}function ph(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=Af(o[s]);fh(e,s,a)}}function hh(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):!dh(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 mh(e,t){return t?(t[e]||t.default||t).from:void 0}function vh(e,t,n){const r={};for(const i in e){const o=mh(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function gh({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&&gh(d,l))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const b=e.getProps()[ep];b&&(p.elapsed=window.HandoffAppearAnimations(b,l,f,me),p.syncStart=!0)}f.start(oh(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&&ph(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 yh(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 yh(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(bh).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 bh(e,t){return e.sortNodePosition(t)}function wh(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 _h=[...Ci].reverse(),xh=Ci.length;function kh(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wh(e,n,r)))}function Sh(e){let t=kh(e);const n=$h();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<xh;k++){const y=_h[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=Ch(_.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 Ch(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 $h(){return{animate:xt(!0),whileInView:xt(),whileHover:xt(),whileTap:xt(),whileDrag:xt(),whileFocus:xt(),exit:xt()}}class Ah extends qt{constructor(t){super(t),t.animationState||(t.animationState=Sh(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 Ph=0;class Eh extends qt{constructor(){super(...arguments),this.id=Ph++}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 Vh={animation:{Feature:Ah},exit:{Feature:Eh}},Nc=()=>({min:0,max:0}),Lc=()=>({x:Nc(),y:Nc()});function Th({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oh(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 Mh(e,t){return Th(Oh(e.getBoundingClientRect(),t))}const Fh=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Ih(e){const t=Fh.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const Dh=4;function eo(e,t,n=1){Me(n<=Dh,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=Ih(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 Nh(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 Lh=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Rc=e=>Lh.has(e),Rh=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}},Bh=new Set(["x","y","z"]),jh=fn.filter(e=>!Bh.has(e));function Uh(e){const t=[];return jh.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 zh=(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},Hh=(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=Uh(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=zh(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 Wh(e,t,n,r){return Rh(t)?Hh(e,t,n,r):{target:t,transitionEnd:r}}const Kh=(e,t,n,r)=>{const i=Nh(e,t,r);return t=i.target,r=i.transitionEnd,Wh(e,t,n,r)},to={current:null},Uc={current:!1};function qh(){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 Gh(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),Yh=Hc.length,Wc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Zh=$i.length;class Xh{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||qh(),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<Yh;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=Gh(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<Zh;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 Xh{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=vh(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){hh(this,r,s);const a=Kh(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function Qh(e){return window.getComputedStyle(e)}class Jh extends Kc{readValueFromInstance(t,n){if(vt.has(n)){const r=Xi(n);return r&&r.default||0}else{const r=Qh(t),i=(ka(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Mh(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 em 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 tm=(e,t)=>Pi(e)?new em(t,{enableHardwareAcceleration:!1}):new Jh(t,{enableHardwareAcceleration:!0}),Cr=nf(Df);function qc(){const e=B(!1);return ki(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function nm(){const e=qc(),[t,n]=re(0),r=ae(()=>{e.current&&n(t+1)},[t]);return[ae(()=>me.postRender(r),[r]),t]}class rm 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 im({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(`
41
+ `)},Vd=0,Ut=[];function Td(e){var t=B([]),n=B([0,0]),r=B(),i=re(Vd++)[0],o=re(function(){return na()})[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=Ju([e.lockRef.current],(e.shards||[]).map(ca),!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=ia(I,N);if(!A)return!0;if(A?S=I:(S=I==="v"?"h":"v",A=ia(I,N)),!A)return!1;if(!r.current&&"changedTouches"in v&&(_||C)&&(r.current=S),!S)return!0;var E=r.current||S;return Ad(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?aa(b):rr(b),y=t.current.filter(function(S){return S.name===b.type&&S.target===b.target&&Pd(S.delta,k)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var _=(s.current.shards||[]).map(ca).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,aa(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(J,null,p?M(o,{styles:Ed(i)}):null,h?M(wd,{gapMode:"margin"}):null)}const Od=cd(ea,Td);var la=pe(function(e,t){return M(tr,Oe({},e,{ref:t,sideCar:Od}))});la.classNames=tr.classNames;const Md=la;var Fd=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={},_i=0,ua=function(e){return e&&(e.host||ua(e.parentNode))},Id=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ua(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})},Dd=function(e,t,n,r){var i=Id(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(),_i++,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)}),_i--,_i||(zt=new WeakMap,zt=new WeakMap,ir=new WeakMap,or={})}},Nd=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Fd(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Dd(r,i,n,"aria-hidden")):function(){return null}};const da="Dialog",[fa,zg]=$u(da),[Ld,Ht]=fa(da),Rd=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]=Vu({prop:r,defaultProp:i,onChange:o});return M(Ld,{scope:t,triggerRef:a,contentRef:c,contentId:li(),titleId:li(),descriptionId:li(),open:u,onOpenChange:d,onOpenToggle:ae(()=>d(l=>!l),[d]),modal:s},n)},Bd="DialogPortal",[Hg,pa]=fa(Bd,{forceMount:void 0}),xi="DialogOverlay",jd=pe((e,t)=>{const n=pa(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(xi,e.__scopeDialog);return o.modal?M(vi,{present:r||o.open},M(Ud,be({},i,{ref:t}))):null}),Ud=pe((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ht(xi,n);return M(Md,{as:ui,allowPinchZoom:!0,shards:[i.contentRef]},M(fi.div,be({"data-state":ma(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),ln="DialogContent",zd=pe((e,t)=>{const n=pa(ln,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(ln,e.__scopeDialog);return M(vi,{present:r||o.open},o.modal?M(Hd,be({},i,{ref:t})):M(Wd,be({},i,{ref:t})))}),Hd=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 Nd(o)},[]),M(ha,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())}))}),Wd=pe((e,t)=>{const n=Ht(ln,e.__scopeDialog),r=B(!1),i=B(!1);return M(ha,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()}}))}),ha=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 Qu(),M(J,null,M(zu,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},M(Bu,be({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ma(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function ma(e){return e?"open":"closed"}const Kd=Rd,qd=jd,Gd=zd,va=Ae({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),sr=Ae({}),ki=Ae(null),ar=typeof document<"u",Si=ar?Pe:H,Ci=Ae({strict:!1});function Yd(e,t,n,r){const{visualElement:i}=fe(sr),o=fe(Ci),s=fe(ki),a=fe(va).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 Si(()=>{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 ga(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Zd(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):ga(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 $i=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ai=["initial",...$i];function lr(e){return cr(e.animate)||Ai.some(t=>un(e[t]))}function ya(e){return!!(lr(e)||e.variants)}function Xd(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 Qd(e){const{initial:t,animate:n}=Xd(e,fe(sr));return oe(()=>({initial:t,animate:n}),[ba(t),ba(n)])}function ba(e){return Array.isArray(e)?e.join(" "):e}const wa={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 wa)dn[e]={isEnabled:t=>wa[e].some(n=>!!t[n])};function Pi(e){for(const t in e)dn[t]={...dn[t],...e[t]}}const _a=Ae({}),Jd=Ae({}),ef=Symbol.for("motionComponentSymbol");function tf({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Pi(e);function o(a,c){let u;const d={...fe(va),...a,layoutId:nf(a)},{isStatic:l}=d,f=Qd(a),h=r(a,l);if(!l&&ar){f.visualElement=Yd(i,h,d,t);const p=fe(Jd),v=fe(Ci).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,Zd(h,f.visualElement,c),h,l,f.visualElement))}const s=pe(o);return s[ef]=i,s}function nf({layoutId:e}){const t=fe(_a).id;return t&&e!==void 0?t+"-"+e:e}function rf(e){function t(r,i={}){return tf(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 of=["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 Ei(e){return typeof e!="string"||e.includes("-")?!1:!!(of.indexOf(e)>-1||/[A-Z]/.test(e))}const sf={},fn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vt=new Set(fn);function xa(e,{layout:t,layoutId:n}){return vt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!sf[e]||e==="opacity")}const ke=e=>!!(e&&e.getVelocity),af={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cf=fn.length;function lf(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<cf;s++){const a=fn[s];if(e[a]!==void 0){const c=af[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 ka=e=>t=>typeof t=="string"&&t.startsWith(e),Sa=ka("--"),Vi=ka("var(--"),uf=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,df=(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,Ca=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ff=/^(#[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"),pf=vn("vh"),hf=vn("vw"),$a={...Kt,parse:e=>Kt.parse(e)/100,transform:e=>Kt.transform(e*100)},Aa={...gt,transform:Math.round},Pa={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:$a,originY:$a,originZ:D,zIndex:Aa,fillOpacity:pn,strokeOpacity:pn,numOctaves:Aa};function Ti(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(Sa(l)){o[l]=f;continue}const h=Pa[l],p=df(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=lf(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 Oi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ea(e,t,n){for(const r in t)!ke(t[r])&&!xa(r,n)&&(e[r]=t[r])}function mf({transformTemplate:e},t,n){return oe(()=>{const r=Oi();return Ti(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function vf(e,t,n){const r=e.style||{},i={};return Ea(i,r,e),Object.assign(i,mf(e,t,n)),e.transformValues?e.transformValues(i):i}function gf(e,t,n){const r={},i=vf(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 yf=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")||yf.has(e)}let Va=e=>!fr(e);function bf(e){e&&(Va=t=>t.startsWith("on")?!fr(t):e(t))}try{bf(require("@emotion/is-prop-valid").default)}catch{}function wf(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Va(i)||n===!0&&fr(i)||!t&&!fr(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Ta(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function _f(e,t,n){const r=Ta(t,e.x,e.width),i=Ta(n,e.y,e.height);return`${r} ${i}`}const xf={offset:"stroke-dashoffset",array:"stroke-dasharray"},kf={offset:"strokeDashoffset",array:"strokeDasharray"};function Sf(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?xf:kf;e[o.offset]=D.transform(-r);const s=D.transform(t),a=D.transform(n);e[o.array]=`${s} ${a}`}function Mi(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...u},d,l,f){if(Ti(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=_f(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&&Sf(h,s,a,c,!1)}const Oa=()=>({...Oi(),attrs:{}}),Fi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Cf(e,t,n,r){const i=oe(()=>{const o=Oa();return Mi(o,t,{enableHardwareAcceleration:!1},Fi(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Ea(o,e.style,e),i.style={...o,...i.style}}return i}function $f(e=!1){return(n,r,i,{latestValues:o},s)=>{const c=(Ei(n)?Cf:gf)(r,o,s,n),d={...wf(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 Ii=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Ma(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 Fa=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 Ia(e,t,n,r){Ma(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Fa.has(i)?i:Ii(i),t.attrs[i])}function Di(e,t){const{style:n}=e,r={};for(const i in n)(ke(n[i])||t.style&&ke(t.style[i])||xa(i,e))&&(r[i]=n[i]);return r}function Da(e,t){const n=Di(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 Ni(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 Na(e){const t=B(null);return t.current===null&&(t.current=e()),t.current}const pr=e=>Array.isArray(e),Af=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Pf=e=>pr(e)?e[e.length-1]||0:e;function Ef(e){const t=ke(e)?e.get():e;return Af(t)?t.toValue():t}function Vf({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:Tf(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const La=e=>(t,n)=>{const r=fe(sr),i=fe(ki),o=()=>Vf(e,t,r,i);return n?o():Na(o)};function Tf(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=Ef(o[f]);let{initial:s,animate:a}=e;const c=lr(e),u=ya(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=Ni(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 Ra{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 Of(e){let t=new Ra,n=new Ra,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"],Mf=40;function Ff(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=hr.reduce((l,f)=>(l[f]=Of(()=>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,Mf),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:Wg}=Ff(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0),If={useVisualState:La({scrapeMotionValuesFromProps:Da,createRenderState:Oa,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(()=>{Mi(n,r,{enableHardwareAcceleration:!1},Fi(t.tagName),e.transformTemplate),Ia(t,n)})}})},Df={useVisualState:La({scrapeMotionValuesFromProps:Di,createRenderState:Oi})};function Nf(e,{forwardMotionProps:t=!1},n,r){return{...Ei(e)?If:Df,preloadedFeatures:n,useRender:$f(t),createVisualElement:r,Component:e}}function yt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Lf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ba(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Rf=e=>t=>Lf(t)&&e(t,Ba(t));function vr(e,t,n,r){return yt(e,t,Rf(n),r)}const Bf=(e,t)=>n=>t(e(n)),bt=(...e)=>e.reduce(Bf);function ja(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Ua=ja("dragHorizontal"),za=ja("dragVertical");function jf(e){let t=!1;if(e==="y")t=za();else if(e==="x")t=Ua();else{const n=Ua(),r=za();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Ha(){const e=jf(!0);return e?(e(),!1):!0}class qt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Wa(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||Ha())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 Uf extends qt{mount(){this.unmount=bt(Wa(this.node,!0),Wa(this.node,!1))}unmount(){}}class zf 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 Ka=(e,t)=>t?e===t?!0:Ka(e,t.parentElement):!1;function Li(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ba(n))}class Hf 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(()=>{Ka(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()||Li("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),Li("down",(a,c)=>{this.startPress(a,c)})},n=yt(this.node.current,"keydown",t),r=()=>{this.isPressing&&Li("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),!Ha()}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 Ri=new WeakMap,Bi=new WeakMap,Wf=e=>{const t=Ri.get(e.target);t&&t(e)},Kf=e=>{e.forEach(Wf)};function qf({root:e,...t}){const n=e||document;Bi.has(n)||Bi.set(n,{});const r=Bi.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Kf,{root:e,...t})),r[i]}function Gf(e,t,n){const r=qf(t);return Ri.set(e,n),r.observe(e),()=>{Ri.delete(e),r.unobserve(e)}}const Yf={some:0,all:1};class Zf 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:Yf[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 Gf(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(Xf(t,n))&&this.startObserver()}unmount(){}}function Xf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Qf={inView:{Feature:Zf},tap:{Feature:Hf},focus:{Feature:zf},hover:{Feature:Uf}};function qa(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 Jf(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function ep(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function gr(e,t,n){const r=e.getProps();return Ni(r,t,n!==void 0?n:r.custom,Jf(e),ep(e))}const tp="data-"+Ii("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,np={current:!1},Ga=e=>Array.isArray(e)&&typeof e[0]=="number";function Ya(e){return!!(!e||typeof e=="string"&&Za[e]||Ga(e)||Array.isArray(e)&&e.every(Ya))}const bn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Za={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 Xa(e){if(e)return Ga(e)?bn(e):Array.isArray(e)?e.map(Xa):Za[e]}function rp(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=Xa(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 ip(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Qa=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,op=1e-7,sp=12;function ap(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=Qa(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>op&&++a<sp);return s}function wn(e,t,n,r){if(e===t&&n===r)return he;const i=o=>ap(o,0,1,e,n);return o=>o===0||o===1?o:Qa(i(o),t,r)}const cp=wn(.42,0,1,1),lp=wn(0,0,.58,1),Ja=wn(.42,0,.58,1),up=e=>Array.isArray(e)&&typeof e[0]!="number",ec=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tc=e=>t=>1-e(1-t),nc=e=>1-Math.sin(Math.acos(e)),rc=tc(nc),dp=ec(rc),ic=wn(.33,1.53,.69,.99),ji=tc(ic),fp=ec(ji),oc={linear:he,easeIn:cp,easeInOut:Ja,easeOut:lp,circIn:nc,circInOut:dp,circOut:rc,backIn:ji,backInOut:fp,backOut:ic,anticipate:e=>(e*=2)<1?.5*ji(e):.5*(2-Math.pow(2,-10*(e-1)))},sc=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(oc[e]!==void 0,`Invalid easing type '${e}'`),oc[e];return e},Ui=(e,t)=>n=>!!(mn(n)&&ff.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),ac=(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}},pp=e=>Wt(0,255,e),zi={...gt,transform:e=>Math.round(pp(e))},_t={test:Ui("rgb","red"),parse:ac("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+zi.transform(e)+", "+zi.transform(t)+", "+zi.transform(n)+", "+hn(pn.transform(r))+")"};function hp(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 Hi={test:Ui("#"),parse:hp,transform:_t.transform},Gt={test:Ui("hsl","hue"),parse:ac("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)||Hi.test(e)||Gt.test(e),parse:e=>_t.test(e)?_t.parse(e):Gt.test(e)?Gt.parse(e):Hi.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 Wi(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 mp({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=Wi(c,a,e+1/3),o=Wi(c,a,e),s=Wi(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Ki=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},vp=[Hi,_t,Gt],gp=e=>vp.find(t=>t.test(e));function cc(e){const t=gp(e);Me(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Gt&&(n=mp(n)),n}const lc=(e,t)=>{const n=cc(e),r=cc(t),i={...n};return o=>(i.red=Ki(n.red,r.red,o),i.green=Ki(n.green,r.green,o),i.blue=Ki(n.blue,r.blue,o),i.alpha=yr(n.alpha,r.alpha,o),_t.transform(i))};function yp(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(Ca))===null||n===void 0?void 0:n.length)||0)>0}const uc={regex:uf,countKey:"Vars",token:"${v}",parse:he},dc={regex:Ca,countKey:"Colors",token:"${c}",parse:ge.parse},fc={regex:dr,countKey:"Numbers",token:"${n}",parse:gt.parse};function qi(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(--")&&qi(n,uc),qi(n,dc),qi(n,fc),n}function pc(e){return br(e).values}function hc(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(uc.token,s[c]):c<r+n?a=a.replace(dc.token,ge.transform(s[c])):a=a.replace(fc.token,hn(s[c]));return a}}const bp=e=>typeof e=="number"?0:e;function wp(e){const t=pc(e);return hc(e)(t.map(bp))}const Yt={test:yp,parse:pc,createTransformer:hc,getAnimatableNone:wp},mc=(e,t)=>n=>`${n>0?t:e}`;function vc(e,t){return typeof e=="number"?n=>yr(e,t,n):ge.test(e)?lc(e,t):e.startsWith("var(")?mc(e,t):yc(e,t)}const gc=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>vc(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},_p=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=vc(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},yc=(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(gc(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.`),mc(e,t))},bc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wc=(e,t)=>n=>yr(e,t,n);function xp(e){return typeof e=="number"?wc:typeof e=="string"?ge.test(e)?lc:yc:Array.isArray(e)?gc:typeof e=="object"?_p:wc}function kp(e,t,n){const r=[],i=n||xp(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 _c(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=kp(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=bc(e[d],e[d+1],u);return s[d](l)};return n?u=>c(Wt(e[0],e[o-1],u)):c}function Sp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=bc(0,t,r);e.push(yr(n,1,i))}}function Cp(e){const t=[0];return Sp(t,e.length-1),t}function $p(e,t){return e.map(n=>n*t)}function Ap(e,t){return e.map(()=>t||Ja).splice(0,e.length-1)}function wr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=up(r)?r.map(sc):sc(r),o={done:!1,value:t[0]},s=$p(n&&n.length===t.length?n:Cp(t),e),a=_c(s,t,{ease:Array.isArray(i)?i:Ap(t,i)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}function xc(e,t){return t?e*(1e3/t):0}const Pp=5;function kc(e,t,n){const r=Math.max(t-Pp,0);return xc(n-e(r),t-r)}const Gi=.001,Ep=.01,Sc=10,Vp=.05,Tp=1;function Op({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yn(e<=wt(Sc),"Spring duration must be 10 seconds or less");let s=1-t;s=Wt(Vp,Tp,s),e=Wt(Ep,Sc,tt(e)),s<1?(i=u=>{const d=u*s,l=d*e,f=d-n,h=Yi(u,s),p=Math.exp(-l);return Gi-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=Yi(Math.pow(u,2),s);return(-i(u)+Gi>0?-1:1)*((f-h)*p)/v}):(i=u=>{const d=Math.exp(-u*e),l=(u-n)*e+1;return-Gi+d*l},o=u=>{const d=Math.exp(-u*e),l=(n-u)*(e*e);return d*l});const a=5/e,c=Fp(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 Mp=12;function Fp(e,t,n){let r=n;for(let i=1;i<Mp;i++)r=r-e(r)/t(r);return r}function Yi(e,t){return e*Math.sqrt(1-t*t)}const Ip=["duration","bounce"],Dp=["stiffness","damping","mass"];function Cc(e,t){return t.some(n=>e[n]!==void 0)}function Np(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Cc(e,Dp)&&Cc(e,Ip)){const n=Op(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function $c({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}=Np(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 _=Yi(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=kc(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 Ac({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),K=_(A);f.done=Math.abs(E)<=u,f.value=f.done?k:K};let S,N;const I=A=>{h(f.value)&&(S=A,N=$c({keyframes:[f.value,p(f.value)],velocity:kc(_,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 Lp=e=>{const t=({timestamp:n})=>e(n);return{start:()=>me.update(t,!0),stop:()=>mr(t),now:()=>gn.isProcessing?gn.timestamp:performance.now()}},Pc=2e4;function Ec(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Pc;)t+=n,r=e.next(t);return t>=Pc?1/0:t}const Rp={decay:Ac,inertia:Ac,tween:wr,keyframes:wr,spring:$c};function _r({autoplay:e=!0,delay:t=0,driver:n=Lp,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(Y=>{v=Y})};k();let y;const _=Rp[i]||wr;let C;_!==wr&&typeof r[0]!="number"&&(C=_c([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,K=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=Ec(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=Y=>{if(E===null)return;h>0&&(E=Math.min(E,Y)),h<0&&(E=Math.min(Y-L/h,E)),A!==null?R=A:R=Math.round(Y-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 jr=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 zr=Wt(0,1,Ge);R>L&&(zr=a==="reverse"&&Dn?1:0),jr=zr*j}const Vt=Fn?{done:!1,value:r[0]}:In.next(jr);C&&(Vt.value=C(Vt.value));let{done:tn}=Vt;!Fn&&Q!==null&&(tn=h>=0?R>=L:R<=0);const Ur=A===null&&(I==="finished"||I==="running"&&tn);return l&&l(Vt.value),Ur&&qe(),Vt},ne=()=>{y&&y.stop(),y=void 0},de=()=>{I="idle",ne(),v(),k(),E=K=null},qe=()=>{I="finished",d&&d(),ne(),v()},ut=()=>{if(p)return;y||(y=n(U));const Y=y.now();c&&c(),A!==null?E=Y-A:(!E||I==="finished")&&(E=Y),I==="finished"&&k(),K=E,A=null,I="running",y.start()};e&&ut();const Et={then(Y,dt){return b.then(Y,dt)},get time(){return tt(R)},set time(Y){Y=wt(Y),R=Y,A!==null||!y||h===0?A=Y:E=y.now()-Y/h},get duration(){const Y=S.calculatedDuration===null?Ec(S):S.calculatedDuration;return tt(Y)},get speed(){return h},set speed(Y){Y===h||!y||(h=Y,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:()=>{K!==null&&U(K),de()},complete:()=>{I="finished"},sample:Y=>(E=0,U(Y))};return Et}function Bp(e){let t;return()=>(t===void 0&&(t=e()),t)}const jp=Bp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Up=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),xr=10,zp=2e4,Hp=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Ya(t.ease);function Wp(e,t,{onUpdate:n,onComplete:r,...i}){if(!(jp()&&Up.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(Hp(t,i)){const y=_r({...i,repeat:0,delay:0});let _={done:!1,value:d[0]};const C=[];let S=0;for(;!_.done&&S<zp;)_=y.sample(S),C.push(_.value),S+=xr;h=void 0,d=C,l=S-xr,f="linear"}const p=rp(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(ip(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 Kp({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 qp={type:"spring",stiffness:500,damping:25,restSpeed:10},Gp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Yp={type:"keyframes",duration:.8},Zp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xp=(e,{keyframes:t})=>t.length>2?Yp:vt.has(e)?e.startsWith("scale")?Gp(t[1]):qp:Zp,Zi=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Yt.test(t)||t==="0")&&!t.startsWith("url(")),Qp=new Set(["brightness","contrast","saturate","opacity"]);function Jp(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=Qp.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const eh=/([a-z-]*)\(.*?\)/g,Xi={...Yt,getAnimatableNone:e=>{const t=e.match(eh);return t?t.map(Jp).join(" "):e}},th={...Pa,color:ge,backgroundColor:ge,outlineColor:ge,fill:ge,stroke:ge,borderColor:ge,borderTopColor:ge,borderRightColor:ge,borderBottomColor:ge,borderLeftColor:ge,filter:Xi,WebkitFilter:Xi},Qi=e=>th[e];function Vc(e,t){let n=Qi(e);return n!==Xi&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Tc=e=>/^0[^.\s]+$/.test(e);function nh(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Tc(e)}function rh(e,t,n,r){const i=Zi(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]),nh(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]=Vc(t,a)}return o}function ih({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 oh(e,t){return e[t]||e.default||e}const sh=(e,t,n,r={})=>i=>{const o=oh(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-wt(s);const c=rh(t,e,n,o),u=c[0],d=c[c.length-1],l=Zi(e,u),f=Zi(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(ih(o)||(h={...h,...Xp(e,h)}),h.duration&&(h.duration=wt(h.duration)),h.repeatDelay&&(h.repeatDelay=wt(h.repeatDelay)),!l||!f||np.current||o.type===!1)return Kp(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=Wp(t,e,h);if(p)return p}return _r(h)};function kr(e){return!!(ke(e)&&e.add)}const Oc=e=>/^\-?\d*\.?\d+$/.test(e);function ah(e,t){e.indexOf(t)===-1&&e.push(t)}function ch(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Mc{constructor(){this.subscriptions=[]}add(t){return ah(this.subscriptions,t),()=>ch(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 Fc=new Set;function Ji(e,t,n){e||Fc.has(t)||(console.warn(t),n&&console.warn(n),Fc.add(t))}const lh=e=>!isNaN(parseFloat(e));class uh{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=lh(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 Mc);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?xc(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 uh(e,t)}const Ic=e=>t=>t.test(e),Dc=[gt,D,Kt,et,hf,pf,{test:e=>e==="auto",parse:e=>e}],xn=e=>Dc.find(Ic(e)),dh=[...Dc,ge,Yt],fh=e=>dh.find(Ic(e));function ph(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_n(n))}function hh(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=Pf(o[s]);ph(e,s,a)}}function mh(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"&&(Oc(d)||Tc(d))?d=parseFloat(d):!fh(d)&&Yt.test(u)&&(d=Vc(c,u)),e.addValue(c,_n(d,{owner:e})),n[c]===void 0&&(n[c]=d),d!==null&&e.setBaseTarget(c,d))}}function vh(e,t){return t?(t[e]||t.default||t).from:void 0}function gh(e,t,n){const r={};for(const i in e){const o=vh(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function yh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nc(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&&yh(d,l))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const b=e.getProps()[tp];b&&(p.elapsed=window.HandoffAppearAnimations(b,l,f,me),p.syncStart=!0)}f.start(sh(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&&hh(e,s)}),u}function eo(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(Nc(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:l}=i;return bh(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 bh(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(wh).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(eo(u,t,{...o,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function wh(e,t){return e.sortNodePosition(t)}function _h(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>eo(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=eo(e,t,n);else{const i=typeof t=="function"?gr(e,t,n.custom):t;r=Promise.all(Nc(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const xh=[...$i].reverse(),kh=$i.length;function Sh(e){return t=>Promise.all(t.map(({animation:n,options:r})=>_h(e,n,r)))}function Ch(e){let t=Sh(e);const n=Ah();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<kh;k++){const y=xh[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=$h(_.prevProp,C);let E=A||y===u&&_.isActive&&!I&&S||k>v&&S;const K=Array.isArray(C)?C:[C];let Q=K.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)?!qa(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(...K.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 $h(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qa(t,e):!1}function xt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ah(){return{animate:xt(!0),whileInView:xt(),whileHover:xt(),whileTap:xt(),whileDrag:xt(),whileFocus:xt(),exit:xt()}}class Ph extends qt{constructor(t){super(t),t.animationState||(t.animationState=Ch(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 Eh=0;class Vh extends qt{constructor(){super(...arguments),this.id=Eh++}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 Th={animation:{Feature:Ph},exit:{Feature:Vh}},Lc=()=>({min:0,max:0}),Rc=()=>({x:Lc(),y:Lc()});function Oh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Mh(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 Fh(e,t){return Oh(Mh(e.getBoundingClientRect(),t))}const Ih=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Dh(e){const t=Ih.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const Nh=4;function to(e,t,n=1){Me(n<=Nh,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=Dh(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return Oc(s)?parseFloat(s):s}else return Vi(i)?to(i,t,n+1):i}function Lh(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(!Vi(o))return;const s=to(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!Vi(o))continue;const s=to(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Rh=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Bc=e=>Rh.has(e),Bh=e=>Object.keys(e).some(Bc),Sr=e=>e===gt||e===D,jc=(e,t)=>parseFloat(e.split(", ")[t]),Uc=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return jc(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?jc(o[1],e):0}},jh=new Set(["x","y","z"]),Uh=fn.filter(e=>!jh.has(e));function zh(e){const t=[];return Uh.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:Uc(4,13),y:Uc(5,14)};Zt.translateX=Zt.x,Zt.translateY=Zt.y;const Hh=(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},Wh=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Bc);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=zh(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=Hh(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 Kh(e,t,n,r){return Bh(t)?Wh(e,t,n,r):{target:t,transitionEnd:r}}const qh=(e,t,n,r)=>{const i=Lh(e,t,r);return t=i.target,r=i.transitionEnd,Kh(e,t,n,r)},no={current:null},zc={current:!1};function Gh(){if(zc.current=!0,!!ar)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>no.current=e.matches;e.addListener(t),t()}else no.current=!1}function Yh(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"&&Ji(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 Hc=new WeakMap,Wc=Object.keys(dn),Zh=Wc.length,Kc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Xh=Ai.length;class Qh{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=ya(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,Hc.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)),zc.current||Gh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:no.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(){Hc.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<Zh;c++){const u=Wc[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&&ga(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):Rc()}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<Kc.length;r++){const i=Kc[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=Yh(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<Xh;r++){const i=Ai[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=Ni(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 Mc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class qc extends Qh{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=gh(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){mh(this,r,s);const a=qh(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function Jh(e){return window.getComputedStyle(e)}class em extends qc{readValueFromInstance(t,n){if(vt.has(n)){const r=Qi(n);return r&&r.default||0}else{const r=Jh(t),i=(Sa(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Fh(t,n)}build(t,n,r,i){Ti(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Di(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){Ma(t,n,r,i)}}class tm extends qc{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(vt.has(n)){const r=Qi(n);return r&&r.default||0}return n=Fa.has(n)?n:Ii(n),t.getAttribute(n)}measureInstanceViewportBox(){return Rc()}scrapeMotionValuesFromProps(t,n){return Da(t,n)}build(t,n,r,i){Mi(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Ia(t,n,r,i)}mount(t){this.isSVGTag=Fi(t.tagName),super.mount(t)}}const nm=(e,t)=>Ei(e)?new tm(t,{enableHardwareAcceleration:!1}):new em(t,{enableHardwareAcceleration:!0}),Cr=rf(Nf);function Gc(){const e=B(!1);return Si(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function rm(){const e=Gc(),[t,n]=re(0),r=ae(()=>{e.current&&n(t+1)},[t]);return[ae(()=>me.postRender(r),[r]),t]}class im 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 om({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
44
  width: ${o}px !important;
@@ -46,8 +46,8 @@ var Dg=Object.defineProperty;var Ng=(ft,Le,$e)=>Le in ft?Dg(ft,Le,{enumerable:!0
46
46
  top: ${a}px !important;
47
47
  left: ${c}px !important;
48
48
  }
49
- `),()=>{document.head.removeChild(u)}},[t]),M(rm,{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(om),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(im,{isPresent:n},e)),M(xi.Provider,{value:u},e)};function om(){return new Map}function sm(e){return H(()=>()=>e(),[])}const kt=e=>e.key||"";function am(e,t){e.forEach(n=>{const r=kt(n);t.set(r,n)})}function cm(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||nm()[0],c=qc(),u=cm(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,am(u,h),f.current=d}),sm(()=>{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 lm({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 um={renderer:tm,...Vh,...Xf},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 dm(...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 fm=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},pm=(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})),hm=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}}),mm=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)))}),vm=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)))}),gm=rt(z(nt)),ym=ve(z(function(e){return typeof e=="boolean"})),bm=ve(z(function(e){return typeof e=="symbol"})),wm=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:fm(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:pm(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,_:hm,string:mm,number:vm,bigint:gm,boolean:ym,symbol:bm,nullish:wm,instanceOf:function(e){return ve(z(function(t){return n=>n instanceof t}(e)))},shape:function(e){return ve(z(dm(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,_m={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 xm(e,t=Jc()){return t("readonly",n=>uo(n.get(e)))}function km(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 xm(t,el)},setApplicationData:async e=>{const t=tl(e.application);return await km(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}))},Sm=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),nl=()=>({messages:[],submissions:{},currentNodeId:null,isFinished:!1,sequence:0,flowSessionId:Sm()});var Cm=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:--Cm,__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 $m=({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})]})]}),Am=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(Am,{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})}),Pm=({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")]})})]})},Em=ii(()=>Promise.resolve().then(()=>Og).then(e=>e.JobApplicationContent)),Vm=({children:e})=>g(lm,{features:um,children:e}),Tm={closed:{y:"calc(100% + 1rem)",height:lo},maximised:{y:0,height:"75vh"},minimised:{y:0,height:lo}},Om=({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(Vm,{children:g(Wd,{open:a,modal:a,children:g(ro,{children:[g(Kd,{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(qd,{forceMount:!0,asChild:!0,children:g(Cr.div,{ref:c,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",variants:Tm,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(Pm,{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(Em,{analytics:n,currentApplication:i,apiClient:t,logger:e})});case"error":return g($m,{message:o});default:cu(r)}})()]})},"content")})]})})})};function Mm(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);Kl(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 Fm(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 Im(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||Im(n,r);for(const u of c.issues){const d=Fm(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 Dm(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 Nm(e){return typeof e.default=="function"?e.default():e.default}function Lm(e){return{type:"any",async:!1,pipe:e,_parse(t,n){return st(t,this.pipe,n,"any")}}}function Rm(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 Bm(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 jm(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]=Dm(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 Um(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(n,r){if(n===void 0){const i=Nm(this);if(i===void 0)return He(n);n=i}return this.wrapped._parse(n,r)}}}function zm(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 Hm(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 Wm=["__proto__","prototype","constructor"];function Km(e,t,n,r){const[i,o,s="Invalid type",a]=Hm(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(!Wm.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 qm(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 Gm=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Ym(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Gm,_parse(t){return this.requirement.test(t)?He(t):Pn(this.type,this.message,t,this.requirement)}}}function Zm(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 Xm(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 Qm(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 Jm=Xt({job:Xt({id:ol(De(),String),title:De()}),company:Xt({name:De(),logo:Um(De())}),flow:Xt({id:ol(De(),String),version:jm(),nodes:Rm(Lm())})});async function ev({jobId:e,apiClient:t,logger:n}){try{const r=await t.fetch(`/flow/job/${e}`);return{ok:!0,value:ho(Jm,r)}}catch(r){return r instanceof Vr?(n.error(Mm(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 tv=`#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-none{flex:none}#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 .text-wrap-balance{text-wrap:balance}#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
- `,nv=()=>({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 rv=["1","2","3","4","5","6","7","8","9","10","11","12"],iv={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]}},ov=(e,t=1,n)=>r=>{const[i,o]=iv[n][r];return"oklch("+i+"% "+o*t+" "+e+")"},mo=e=>{const t=ov(e.hue,e.chroma,e.mode);return Object.fromEntries(rv.map(n=>[e.prefix+n,e.transform(t(n))]))},vo=e=>e,sv=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)},av=e=>{function t(n,r){const i=[e.prefix,r.toString().replace(/\./g,"-")].join("");return n==="declaration"?`--${i}`:`var(--${i})`}return t},cv=()=>({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=sv(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"],lv=cv().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)}}}),uv=av({prefix:"i-"}),dv=e=>{const t=lv.from({theme:e,getToken:uv}),n=Object.entries(t.declarations).map(([r,i])=>`${r}: ${i};`);return`#isdk {
49
+ `),()=>{document.head.removeChild(u)}},[t]),M(im,{isPresent:t,childRef:r,sizeRef:i},Qe(e,{ref:r}))}const ro=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Na(sm),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(om,{isPresent:n},e)),M(ki.Provider,{value:u},e)};function sm(){return new Map}function am(e){return H(()=>()=>e(),[])}const kt=e=>e.key||"";function cm(e,t){e.forEach(n=>{const r=kt(n);t.set(r,n)})}function lm(e){const t=[];return Te.forEach(e,n=>{Xe(n)&&t.push(n)}),t}const io=({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(_a).forceRender||rm()[0],c=Gc(),u=lm(e);let d=u;const l=B(new Map).current,f=B(d),h=B(new Map).current,p=B(!0);if(Si(()=>{p.current=!1,cm(u,h),f.current=d}),am(()=>{p.current=!0,h.clear(),l.clear()}),p.current)return M(J,null,d.map(y=>M(ro,{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 K=kt(E);return K===_||A.includes(K)}),!l.size){if(c.current===!1)return;a(),r&&r()}};N=M(ro,{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(ro,{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(J,null,l.size?d:d.map(y=>Qe(y)))};function um({children:e,features:t,strict:n=!1}){const[,r]=re(!oo(t)),i=B(void 0);if(!oo(t)){const{renderer:o,...s}=t;i.current=o,Pi(s)}return H(()=>{oo(t)&&t().then(({renderer:o,...s})=>{Pi(s),i.current=o,r(!0)})},[]),M(Ci.Provider,{value:{renderer:i.current,strict:n}},e)}function oo(e){return typeof e=="function"}const dm={renderer:nm,...Th,...Qf},we=Symbol.for("@ts-pattern/matcher"),Yc=Symbol.for("@ts-pattern/isVariadic"),$r="@ts-pattern/anonymous-select-key",so=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(so(e)){if(!so(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[Yc]?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 so(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 fm(...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:()=>co(e),and:t=>X(e,t),or:t=>Zc(e,t),select:t=>t===void 0?Sn(e):Sn(t,e)})}function ao(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Yc]:!0})}}))(e),{optional:()=>ao(co(e)),select:t=>ao(t===void 0?Sn(e):Sn(t,e))})}function co(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 pm=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},hm=(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 Zc(...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 Xc=ve(z(function(e){return!0})),mm=Xc,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}}),vm=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)))}),gm=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)))}),ym=rt(z(nt)),bm=ve(z(function(e){return typeof e=="boolean"})),wm=ve(z(function(e){return typeof e=="symbol"})),_m=ve(z(function(e){return e==null}));var _e={__proto__:null,matcher:we,optional:co,array:function(...e){return ao({[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:pm(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:hm(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:Zc,not:function(e){return ve({[we]:()=>({match:t=>({matched:!le(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:z,select:Sn,any:Xc,_:mm,string:vm,number:gm,bigint:ym,boolean:bm,symbol:wm,nullish:_m,instanceOf:function(e){return ve(z(function(t){return n=>n instanceof t}(e)))},shape:function(e){return ve(z(fm(e)))}};const lo={matched:!1,value:void 0};function Ue(e){return new Pr(e,lo)}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)?lo:{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)}:lo)}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 Qc="isdk",uo=44,xm={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 fo(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Jc(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=fo(n);return(i,o)=>r.then(s=>o(s.transaction(t,i).objectStore(t)))}let po;function el(){return po||(po=Jc("keyval-store","keyval")),po}function km(e,t=el()){return t("readonly",n=>fo(n.get(e)))}function Sm(e,t,n=el()){return n("readwrite",r=>(r.put(t,e),fo(r.transaction)))}const tl=typeof window>"u"?void 0:Jc("inploi","applications"),Cn={getApplicationData:async e=>{const t=nl(e);return await km(t,tl)},setApplicationData:async e=>{const t=nl(e.application);return await Sm(t,e.data,tl)}},Er=(e,t,n,r=0)=>{if(!t.nextId)return n(t.id,{stepsMade:r,remainingSteps:0}),{stepsMade:r,remainingSteps:0};const i=e.find(u=>u.id===t.nextId);if(i===void 0)return{stepsMade:r,remainingSteps:0};const o=t.type==="if-block"?t.branchId:void 0,s=e.find(u=>u.id===o),a=t.type.includes("question")?1:0;if(s){const u=a+Math.max(Er(e,i,n,r+a).remainingSteps,Er(e,s,n,r+a).remainingSteps);return n(t.id,{stepsMade:r,remainingSteps:u}),{stepsMade:r,remainingSteps:u}}const c=a+Er(e,i,n,r+a).remainingSteps;return n(t.id,{stepsMade:r,remainingSteps:c}),{stepsMade:r,remainingSteps:c}},Cm=e=>{const t={},n=e.find(r=>r.isHead);return n&&Er(e,n,(r,i)=>{t[r]=i}),t},nl=e=>[e.job.id,e.flow.id,e.flow.version].join("/"),ze=sn("maximised"),ho=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})},W={current$:it,start:async e=>{const t=await Cn.getApplicationData(e)??rl(),n=Cm(e.flow.nodes);it.value={state:"loaded",application:{...e,data:t,startedAt:new Date,nodeIdToProgress:n}},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=rl();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}))},$m=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),rl=()=>({messages:[],submissions:{},currentNodeId:null,isFinished:!1,sequence:0,flowSessionId:$m()});var Am=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:--Am,__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 Pm=({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})]})]}),Em=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"})})})]}),il=()=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:g(Em,{class:"text-neutral-6 h-8 w-8"})});function ol(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=ol(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=ol(e))&&(r&&(r+=" "),r+=t);return r}const Vm=e=>{const n=e/100,r=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-n,r))*100)}%`},Vr=({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})}),Tm=()=>{if(W.current$.value.state!=="loaded")return null;const e=W.current$.value.application.nodeIdToProgress,t=W.current$.value.application.data.currentNodeId;if(t===null)return null;const n=e[t];if(n===void 0)return null;const r=100*(n.stepsMade/(n.remainingSteps+n.stepsMade));return g("div",{style:{width:Vm(r)},class:"bg-accent-8 h-[2px] transition-all duration-1000"})},Om=({children:e})=>{const t=ze.value;return g(J,{children:g("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[g("div",{class:"flex h-[var(--header-height)] gap-2",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(J,{children:[g(Vr,{"aria-label":"Maximise job application",onClick:()=>ze.value="maximised",children:g("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),g(Vr,{"aria-label":"Close application",onClick:W.cancel,children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):g(J,{children:[W.current$.value.state==="loaded"&&g(Vr,{"aria-label":"Restart",onClick:()=>{W.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(Vr,{"aria-label":"Minimise application",onClick:()=>ze.value="minimised",children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),g(Tm,{})]})})},Mm=oi(()=>Promise.resolve().then(()=>Dg).then(e=>e.JobApplicationContent)),Fm=({children:e})=>g(um,{features:dm,children:e}),Im={closed:{y:"calc(100% + 1rem)",height:uo},maximised:{y:0,height:"75vh"},minimised:{y:0,height:uo}},Dm=({logger:e,apiClient:t,analytics:n})=>{const{state:r,application:i,error:o}=W.current$.value,s=ze.value,a=r!=="idle"&&s==="maximised",c=B(null);return g(Fm,{children:g(Kd,{open:a,modal:a,children:g(io,{children:[g(qd,{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(Gd,{forceMount:!0,asChild:!0,children:g(Cr.div,{ref:c,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",variants:Im,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":`${uo}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(Om,{children:i?`Applying for “${i.job.title}” at ${i.company.name}`:"inploi chatbot: "+r}),(()=>{switch(r){case"idle":return null;case"loading":return g(il,{},"loading");case"loaded":return s!=="maximised"?null:g(Lt,{fallback:g(il,{},"loading"),children:g(Mm,{analytics:n,currentApplication:i,apiClient:t,logger:e})});case"error":return g(Pm,{message:o});default:lu(r)}})()]})},"content")})]})})})};function Nm(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 Tr=class extends Error{constructor(t){super(t[0].message);ql(this,"issues");this.name="ValiError",this.issues=t}};function sl(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 Lm(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 Rm(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||Rm(n,r);for(const u of c.issues){const d=Lm(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 al(e){return typeof e=="function"?e():e}function Pn(e,t,n,r){return An([{validation:e,message:al(t),input:n,requirement:r}])}function Bm(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:al(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 jm(e){return typeof e.default=="function"?e.default():e.default}function Um(e){return{type:"any",async:!1,pipe:e,_parse(t,n){return st(t,this.pipe,n,"any")}}}function zm(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 Hm(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 Wm(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]=Bm(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 Km(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(n,r){if(n===void 0){const i=jm(this);if(i===void 0)return He(n);n=i}return this.wrapped._parse(n,r)}}}function qm(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 Gm(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 Ym=["__proto__","prototype","constructor"];function Zm(e,t,n,r){const[i,o,s="Invalid type",a]=Gm(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(!Ym.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 mo(e,t,n){const r=e._parse(t,n);if(r.issues)throw new Tr(r.issues);return r.output}async function Xm(e,t,n){const r=await e._parse(t,n);if(r.issues)throw new Tr(r.issues);return r.output}function cl(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 Qm=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Jm(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Qm,_parse(t){return this.requirement.test(t)?He(t):Pn(this.type,this.message,t,this.requirement)}}}function ev(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 ll(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 tv(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 nv(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 rv=Xt({job:Xt({id:sl(De(),String),title:De()}),company:Xt({name:De(),logo:Km(De())}),flow:Xt({id:sl(De(),String),version:Wm(),nodes:zm(Um())})});async function iv({jobId:e,apiClient:t,logger:n}){try{const r=await t.fetch(`/flow/job/${e}`);return{ok:!0,value:mo(rv,r)}}catch(r){return r instanceof Tr?(n.error(Nm(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 ov=`#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-\\[2px\\]{height:2px}#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-none{flex:none}#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-8{background-color:var(--i-color-a-8)}#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 .duration-1000{transition-duration:1s}#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 .text-wrap-balance{text-wrap:balance}#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
+ `,sv=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Qc);if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Qc,t}});var av=["1","2","3","4","5","6","7","8","9","10","11","12"],cv={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]}},lv=(e,t=1,n)=>r=>{const[i,o]=cv[n][r];return"oklch("+i+"% "+o*t+" "+e+")"},vo=e=>{const t=lv(e.hue,e.chroma,e.mode);return Object.fromEntries(av.map(n=>[e.prefix+n,e.transform(t(n))]))},go=e=>e,uv=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)},Or=e=>!!e&&typeof e=="object"&&!Array.isArray(e),yo=(e,...t)=>{if(!t.length)return e;const n=t.shift();if(Or(e)&&Or(n))for(const r in n){const i=n[r];if(Or(i)){e[r]||Object.assign(e,{[r]:{}});const o=e[r];Or(o)&&yo(o,i)}else Object.assign(e,{[r]:n[r]})}return yo(e,...t)},dv=e=>{function t(n,r){const i=[e.prefix,r.toString().replace(/\./g,"-")].join("");return n==="declaration"?`--${i}`:`var(--${i})`}return t},fv=()=>({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=uv(yo(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[bo,wo,ul]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],pv=fv().core(({theme:e})=>({color:{black:bo,white:wo,lowest:e.mode==="light"?wo:bo,highest:e.mode==="light"?bo:wo,...vo({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:go}),...vo({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:go}),...vo({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:go})},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:ul,"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":ul,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)}}}),hv=dv({prefix:"i-"}),mv=e=>{const t=pv.from({theme:e,getToken:hv}),n=Object.entries(t.declarations).map(([r,i])=>`${r}: ${i};`);return`#isdk {
51
51
  ${n.concat(n).join(`
52
52
  `)}
53
- }`},fv=({_internal_domManager:e=nv(),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"},tv),M("style",{id:"inploi-chatbot-theme"},dv(t))],c=e.getOrCreateChatbotElement();Ft(M(ee,{},[a,M(Om,{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(),ru(()=>{ze.value="maximised",Y.current$.value={state:"loading"}}),ev({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=fv;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},pv=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})},hv=({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)},mv=({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 vv({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):hv({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 vv(e){return await Ue(e).with({node:{type:"text"}},wv).with({node:{type:"image"}},_v).with({node:{type:"question-text"}},xv).with({node:{type:"question-enum"}},Sv).with({node:{type:"question-number"}},kv).with({node:{type:"question-boolean"}},Cv).with({node:{type:"question-file"}},Pv).with({node:{type:"question-address"}},Av).with({node:{type:"end-flow"}},Ev).with({node:{type:"if-block"}},bv).with({node:{type:"jump"}},({node:t,next:n})=>n(t.data.targetId)).with({node:{type:"link"}},yv).with({node:{type:"integration-application-submit"}},gv).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function gv({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 f=typeof s.jobId=="string"?s.jobId:void 0,h=typeof s.flowId=="string"?s.flowId:void 0;Nt(f),Nt(h),f&&a.log({event:"APPLY_COMPLETE",attributionKey:`job_${f}`,properties:{job_id:f,flow_id:h}})};await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const{anonymous_id:u,session_id:d}=a.getSessionInfo(),l=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:n.data.integrationId,anonymous_id:u,session_id:d,submissions:pv(o||{})})}).catch(f=>f);await Ue(l).with({ats_data:{redirect_url:_e.string}},async f=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const h=new URL(f.ats_data.redirect_url);u&&!h.searchParams.has("anonymous_id")&&h.searchParams.set("anonymous_id",u),c(),await e.sendMessage({type:"link",href:h.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 f=>{r.error(f),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(n.id)})}async function yv({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 bv({submissions:e,next:t,node:n}){const r=Vv(n,e)?n.branchId:n.nextId;t(r)}async function wv({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 _v({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 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:"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 kv({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 Sv({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 Cv({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 $v=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"]},pl=Object.keys(fl);async function Av({chat:e,next:t,node:n,logger:r}){if(pl.every(p=>n.data.keys[p]===null))return t(n.nextId);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){if(b.key===null)continue;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($v),{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?pl.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 Pv({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 Ev({chat:e,end:t,node:n}){await e.sendMessage({type:"system",variant:"info",text:n.data.systemMessage}),t()}const hl=_e.union(_e.string,_e.array(_e.string),null),Vv=(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:hl}},({compareValue:r,answer:i})=>i.value!==null&&i.value.includes(r)).with({compare:"notContains",answer:{value:hl}},({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},ml=["true","false"],Tv=zm(ml),Ov="answer",Mv=({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(Tv,o);t(s)},children:[g("div",{class:"flex items-center gap-2 p-2.5",children:ml.map((i,o)=>g("button",{ref:o===0?r:null,type:"submit",name:Ov,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:"px-2 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),Fv=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}),Iv=e=>e.reduce((t,n)=>t+n.sizeKb,0),Dv=wo("file"),vl=3,Nv=({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)})]})},gl=({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}),Lv=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Rv=({allowedExtensions:e,files:t})=>{const n=e.map(r=>r.toLowerCase());return t.every(r=>n.includes(Lv(r.name).toLowerCase()))},Bv=({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(Dv(r)&&r.value!==null?r.value:[]),[s,a]=re(),c=i.length-vl,u=Iv(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.extensions.length>0&&!Rv({allowedExtensions:e.config.extensions,files:i})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):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,vl).map(f=>{const h=f.name.split(".").pop(),p=f.name.replace(new RegExp(`.${h}$`),"");return g(gl,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:p}),g("span",{children:[".",h]})]})}),c>0?g(gl,{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 Fv(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 yl=e=>typeof e=="object";var se=e=>!ye(e)&&!Array.isArray(e)&&yl(e)&&!Qt(e),jv=e=>se(e)&&e.target?Tn(e.target)?e.target.checked:e.target.value:e,Uv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,zv=(e,t)=>e.has(Uv(t)),Hv=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&&!Hv(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 bl={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 Wv=(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,Kv=(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 qv(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",Gv=(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),wl=e=>On(e.replace(/["|']|\]/g,"").split(/\.|\[/));function q(e,t,n){let r=-1;const i=Co(t)?[t]:wl(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 _l=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},xl=e=>({isOnSubmit:!e||e===Ve.onSubmit,isOnBlur:e===Ve.onBlur,isOnChange:e===Ve.onChange,isOnAll:e===Ve.all,isOnTouch:e===Ve.onTouched}),kl=(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 Yv=(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 Sl={value:!1,isValid:!1},Cl={value:!0,isValid:!0};var $l=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===""?Cl:{value:e[0].value,isValid:!0}:Cl:Sl}return Sl};const Al={isValid:!1,value:null};var Pl=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Al):Al;function El(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:""},Vl=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=_l.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&&!$l(s).isValid||N&&!Pl(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=El(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=El(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 Zv(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 Xv(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]:wl(t),r=n.length===1?e:Zv(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(se(r)&&Ce(r)||Array.isArray(r)&&Xv(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)||!yl(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 Tl=e=>e.type==="select-multiple",Qv=e=>Ao(e)||Tn(e),Eo=e=>Ir(e)&&e.isConnected,Ol=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])&&!Ol(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Rr(e[r],t[r])):ye(e[r])||(t[r]=!0);return t}function Ml(e,t,n){const r=Array.isArray(e);if(se(e)||r)for(const i in e)Array.isArray(e[i])||se(e[i])&&!Ol(e[i])?te(t)||Lr(n[i])?n[i]=Array.isArray(e[i])?Rr(e[i],[]):{...Rr(e[i])}:Ml(e[i],ye(t)?{}:t[i],n[i]):n[i]=!Pt(e[i],t[i]);return n}var Vo=(e,t)=>Ml(e,t,Rr(t)),Fl=(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)?Pl(e.refs).value:Tl(t)?[...t.selectedOptions].map(({value:n})=>n):Tn(t)?$l(e.refs).value:Fl(te(t.value)?e.ref.value:t.value,e)}var Jv=(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,eg=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Il(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 tg=(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,ng=(e,t)=>!On(T(e,t)).length&&ue(e,t);const rg={mode:Ve.onSubmit,reValidateMode:Ve.onChange,shouldFocusError:!0};function ig(e={},t){let n={...rg,...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=xl(n.mode),v=xl(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),ng(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,Jv(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 Vl(P,s,b,n.shouldUseNativeValidation&&!w,Z);if(ie[$.name]&&(x.valid=!1,w))break;!w&&(T(ie,$.name)?Z?Yv(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)=>Gv(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,Fl(w,$)),P=Ir($.ref)&&ye(w)?"":w,Tl($.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),kl(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):jv(m),F=Z=>{O=Number.isNaN(Z)||Z===T(s,x,Z)};if(P){let Z,ie;const zr=$(),nn=m.type===bl.BLUR||m.type===bl.FOCUS_OUT,Mg=!eg(P._f)&&!n.resolver&&!T(r.errors,x)&&!P._f.deps||tg(nn,T(r.touchedFields,x),r.isSubmitted,v,p),Oo=kl(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),Fg=!Ce(Mo)||Oo;if(!nn&&f.values.next({name:x,type:m.type,values:{...s}}),Mg)return l.isValid&&y(),Fg&&f.state.next({name:x,...Oo?{}:Mo});if(!nn&&Oo&&f.state.next({...r}),_(!0),n.resolver){const{errors:Hl}=await E([x]);if(F(zr),O){const Ig=Il(r.errors,i,x),Wl=Il(Hl,i,Ig.name||x);Z=Wl.error,x=Wl.name,ie=Ce(Hl)}}else Z=(await Vl(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=Qv($),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)&&!(zv(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}))},Ul=(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})},zl=(m,w)=>Ul(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:Ul,_resetDefaultValues:()=>lt(n.defaultValues)&&n.defaultValues().then(m=>{zl(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:zl,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 Dl(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={...ig(e,()=>i(s=>({...s}))),formState:r});const o=t.current.control;return o._options=e,qv({subject:o._subjects.state,next:s=>{Kv(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=Wv(r,o),t.current}var Nl=function(e,t,n){if(e&&"reportValidity"in e){var r=T(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},og=function(e,t){var n=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Nl(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return Nl(s,i,e)})};for(var r in t.fields)n(r)},sg=function(e,t){t.shouldUseNativeValidation&&og(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(cg(t.names||Object.keys(e),r)){var s=Object.assign({},ag(T(n,r)));q(s,"root",o),q(n,r,s)}else q(n,r,o)}return n},ag=function(e){return Array.isArray(e)?e.filter(Boolean):[]},cg=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},lg=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]=_l(i,t,n,r.validation,s?[].concat(s,r.message):r.message)}e.issues.shift()}}return n},Ll=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(qm(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:sg(lg(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const ug=27,dg=12,fg=10,pg=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},hg=wo("multiple-choice"),mg=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Ll(Xt({checked:al(Km(Bm()),n=>Object.entries(n).filter(([r,i])=>i).map(([r,i])=>r),[Zm(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":""}`)])}))},vg=({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}}=Dl({defaultValues:{checked:hg(r)?Object.fromEntries(r.value.map(l=>[l,!0])):{}},resolver:mg(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&&pg(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*ug+5*dg+2*fg},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"},gg=De(en.phone,[Xm(/^\+?[0-9 -]+$/,en.phone)]),yg={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},bg=wo("text"),wg=e=>Ll(Xt({text:{email:De(en.email,[Ym(en.email)]),phone:al(gg,t=>t.replace(/[^0-9]/g,"")),text:De([cl(1,en.empty)]),url:De([Qm(en.url)])}[e.format]})),_g=({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}}=Dl({defaultValues:{text:i||(bg(r)?r.value:"")},resolver:wg(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,...yg[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})]})})},xg=({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(_g,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>g(vg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"boolean"}},s=>g(Mv,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"file"}},s=>g(Bv,{onSubmitSuccess:o(s.input.type),...s})).exhaustive()})})},Rl=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Bl=ot,jl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Bl(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=Rl(d)||Rl(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 Bl(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},kg=jl("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"}}),Sg={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},Cg=({children:e,className:t,transitionState:n,side:r,...i})=>g(Cr.p,{variants:Sg,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:kg({className:t,side:r,transitionState:n}),...i,children:e}),$g=({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`}}))}),Ag={bot:"left",user:"right"},Pg=jl("w-full select-none py-2 text-wrap-balance 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]"}}}),Eg=({messages:e,isBotTyping:t})=>g("ol",{"aria-label":"Chat messages",class:"flex 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:Pg({variant:i.variant}),children:i.text})).with({type:"text",author:_e.union("bot","user")},i=>g(Cg,{side:Ag[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 px-2 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 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center 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",{class:"flex-none",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(Nv,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()},r))}),g("aside",{"aria-hidden":!0,children:t&&g($g,{})})]}),Vg=25,Tg=()=>{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)*Vg;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}},Og=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}=Tg(),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(_m.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}=mv({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(Eg,{isBotTyping:s,messages:e.data.messages})})}),g(xg,{input:e.data.currentInput,onInputChange:()=>c({behavior:"smooth"}),onSubmit:a})]})}},Symbol.toStringTag,{value:"Module"}))})();
53
+ }`},vv=({_internal_domManager:e=sv(),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"},ov),M("style",{id:"inploi-chatbot-theme"},mv(t))],c=e.getOrCreateChatbotElement();Ft(M(J,{},[a,M(Dm,{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{W.cancel(),iu(()=>{ze.value="maximised",W.current$.value={state:"loading"}}),iv({jobId:a,apiClient:n,logger:r}).then(async c=>{c.ok?W.start(c.value):W.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"),W.cancel())}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=vv;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`),dl=e=>{const t=e.find(n=>n.isHead);if(!t)throw new Error("No head node found");return t},gv=e=>Object.entries(e).reduce((n,[r,i])=>(n[r]=i.value,n),{}),_o=e=>t=>t?t.type===e:!1;class Vn extends Error{constructor(){super("Aborted")}}const fl=({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 fl({node:r,nodes:t,stopWhen:n})},yv=({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=fl({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)},bv=({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 wv({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):yv({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)??dl(e);return d(f)},abort:()=>{u.abort()}}};async function wv(e){return await Ue(e).with({node:{type:"text"}},Sv).with({node:{type:"image"}},Cv).with({node:{type:"question-text"}},$v).with({node:{type:"question-enum"}},Pv).with({node:{type:"question-number"}},Av).with({node:{type:"question-boolean"}},Ev).with({node:{type:"question-file"}},Ov).with({node:{type:"question-address"}},Tv).with({node:{type:"end-flow"}},Mv).with({node:{type:"if-block"}},kv).with({node:{type:"jump"}},({node:t,next:n})=>n(t.data.targetId)).with({node:{type:"link"}},xv).with({node:{type:"integration-application-submit"}},_v).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function _v({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 f=typeof s.jobId=="string"?s.jobId:void 0,h=typeof s.flowId=="string"?s.flowId:void 0;Nt(f),Nt(h),f&&a.log({event:"APPLY_COMPLETE",attributionKey:`job_${f}`,properties:{job_id:f,flow_id:h}})};await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const{anonymous_id:u,session_id:d}=a.getSessionInfo(),l=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:n.data.integrationId,anonymous_id:u,session_id:d,submissions:gv(o||{})})}).catch(f=>f);await Ue(l).with({ats_data:{redirect_url:_e.string}},async f=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const h=new URL(f.ats_data.redirect_url);u&&!h.searchParams.has("anonymous_id")&&h.searchParams.set("anonymous_id",u),c(),await e.sendMessage({type:"link",href:h.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 f=>{r.error(f),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(n.id)})}async function xv({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 kv({submissions:e,next:t,node:n}){const r=Fv(n,e)?n.branchId:n.nextId;t(r)}async function Sv({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 Cv({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 $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: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 Av({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 Pv({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 Ev({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 Vv=document.createElement("div"),pl={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"]},hl=Object.keys(pl);async function Tv({chat:e,next:t,node:n,logger:r}){if(hl.every(p=>n.data.keys[p]===null))return t(n.nextId);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){if(b.key===null)continue;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(!ni(window,"google")||!ni(window.google,"maps")||!ni(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(Vv),{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?hl.reduce((p,v)=>{const b=pl[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 Ov({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 Mv({chat:e,end:t,node:n}){await e.sendMessage({type:"system",variant:"info",text:n.data.systemMessage}),t()}const ml=_e.union(_e.string,_e.array(_e.string),null),Fv=(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:ml}},({compareValue:r,answer:i})=>i.value!==null&&i.value.includes(r)).with({compare:"notContains",answer:{value:ml}},({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}})},Mr=({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"})]})}),Fr=({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"]}),xo=()=>{const e=B(null);return H(()=>{var t;(t=e.current)==null||t.focus()},[]),e},vl=["true","false"],Iv=qm(vl),Dv="answer",Nv=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{const r=xo();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=mo(Iv,o);t(s)},children:[g("div",{class:"flex items-center gap-2 p-2.5",children:vl.map((i,o)=>g("button",{ref:o===0?r:null,type:"submit",name:Dv,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:"px-2 pb-2",children:g(Fr,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},ko=({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),Lv=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}),Rv=e=>e.reduce((t,n)=>t+n.sizeKb,0),Bv=_o("file"),gl=3,jv=({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)})]})},yl=({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}),Uv=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},zv=({allowedExtensions:e,files:t})=>{const n=e.map(r=>r.toLowerCase());return t.every(r=>n.includes(Uv(r.name).toLowerCase()))},Hv=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var l;const r=(l=W.current$.value.application)==null?void 0:l.data.submissions[e.key],[i,o]=re(Bv(r)&&r.value!==null?r.value:[]),[s,a]=re(),c=i.length-gl,u=Rv(i),d=xo();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.extensions.length>0&&!zv({allowedExtensions:e.config.extensions,files:i})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):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(J,{children:[g("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,gl).map(f=>{const h=f.name.split(".").pop(),p=f.name.replace(new RegExp(`.${h}$`),"");return g(yl,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:p}),g("span",{children:[".",h]})]})}),c>0?g(yl,{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 Lv(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(Mr,{disabled:i.length===0}),e.config.optional&&g(Fr,{onClick:()=>t(null)})]})]}),s&&g(ko,{onAnimationComplete:n,error:s})]})};var Tn=e=>e.type==="checkbox",Qt=e=>e instanceof Date,ye=e=>e==null;const bl=e=>typeof e=="object";var se=e=>!ye(e)&&!Array.isArray(e)&&bl(e)&&!Qt(e),Wv=e=>se(e)&&e.target?Tn(e.target)?e.target.checked:e.target.value:e,Kv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,qv=(e,t)=>e.has(Kv(t)),Gv=e=>{const t=e.constructor&&e.constructor.prototype;return se(t)&&t.hasOwnProperty("isPrototypeOf")},So=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(!(So&&(e instanceof Blob||e instanceof FileList))&&(n||se(e)))if(t=n?[]:{},!n&&!Gv(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 wl={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 Yv=(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))},Co=e=>Array.isArray(e)?e:[e];function Xv(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",Qv=(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),$o=e=>/^\w*$/.test(e),_l=e=>On(e.replace(/["|']|\]/g,"").split(/\.|\[/));function G(e,t,n){let r=-1;const i=$o(t)?[t]:_l(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 xl=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},kl=e=>({isOnSubmit:!e||e===Ve.onSubmit,isOnBlur:e===Ve.onBlur,isOnChange:e===Ve.onChange,isOnAll:e===Ve.all,isOnTouch:e===Ve.onTouched}),Sl=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ir=(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)&&Ir(a,t)}}};var Jv=(e,t,n)=>{const r=On(T(e,n));return G(r,"root",t[n]),G(e,n,r),e},Ao=e=>e.type==="file",lt=e=>typeof e=="function",Dr=e=>{if(!So)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Nr=e=>Ne(e),Po=e=>e.type==="radio",Lr=e=>e instanceof RegExp;const Cl={value:!1,isValid:!1},$l={value:!0,isValid:!0};var Al=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===""?$l:{value:e[0].value,isValid:!0}:$l:Cl}return Cl};const Pl={isValid:!1,value:null};var El=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Pl):Pl;function Vl(e,t,n="validate"){if(Nr(e)||Array.isArray(e)&&e.every(Nr)||ct(e)&&!e)return{type:n,message:Nr(e)?e:"",ref:t}}var Jt=e=>se(e)&&!Lr(e)?e:{value:e,message:""},Tl=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=Po(o),I=Tn(o),A=N||I,E=(v||Ao(o))&&te(o.value)&&te(y)||Dr(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,K=xl.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,...K(j?U:ne,de)}};if(i?!Array.isArray(y)||!y.length:a&&(!A&&(E||ye(y))||ct(y)&&!y||I&&!Al(s).isValid||N&&!El(s).isValid)){const{value:j,message:L}=Nr(a)?{value:!!a,message:a}:Jt(a);if(j&&(S[p]={type:Ke.required,message:L,ref:_,...K(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(Lr(j)&&!y.match(j)&&(S[p]={type:Ke.pattern,message:L,ref:o,...K(Ke.pattern,L)},!n))return C(L),S}if(h){if(lt(h)){const j=await h(y,t),L=Vl(j,_);if(L&&(S[p]={...L,...K(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=Vl(await h[L](y,t),_,L);R&&(j={...R,...K(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 eg(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 tg(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:$o(t)?[t]:_l(t),r=n.length===1?e:eg(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(se(r)&&Ce(r)||Array.isArray(r)&&tg(r))&&ue(e,n.slice(0,-1)),e}function Eo(){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 Rr=e=>ye(e)||!bl(e);function Pt(e,t){if(Rr(e)||Rr(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 Ol=e=>e.type==="select-multiple",ng=e=>Po(e)||Tn(e),Vo=e=>Dr(e)&&e.isConnected,Ml=e=>{for(const t in e)if(lt(e[t]))return!0;return!1};function Br(e,t={}){const n=Array.isArray(e);if(se(e)||n)for(const r in e)Array.isArray(e[r])||se(e[r])&&!Ml(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Br(e[r],t[r])):ye(e[r])||(t[r]=!0);return t}function Fl(e,t,n){const r=Array.isArray(e);if(se(e)||r)for(const i in e)Array.isArray(e[i])||se(e[i])&&!Ml(e[i])?te(t)||Rr(n[i])?n[i]=Array.isArray(e[i])?Br(e[i],[]):{...Br(e[i])}:Fl(e[i],ye(t)?{}:t[i],n[i]):n[i]=!Pt(e[i],t[i]);return n}var To=(e,t)=>Fl(e,t,Br(t)),Il=(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 Oo(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Ao(t)?t.files:Po(t)?El(e.refs).value:Ol(t)?[...t.selectedOptions].map(({value:n})=>n):Tn(t)?Al(e.refs).value:Il(te(t.value)?e.ref.value:t.value,e)}var rg=(e,t,n,r)=>{const i={};for(const o of e){const s=T(t,o);s&&G(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Mn=e=>te(e)?e:Lr(e)?e.source:se(e)?Lr(e.value)?e.value.source:e.value:e,ig=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Dl(e,t,n){const r=T(e,n);if(r||$o(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 og=(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,sg=(e,t)=>!On(T(e,t)).length&&ue(e,t);const ag={mode:Ve.onSubmit,reValidateMode:Ve.onChange,shouldFocusError:!0};function cg(e={},t){let n={...ag,...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:Eo(),array:Eo(),state:Eo()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=kl(n.mode),v=kl(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&&G(i,m,F)}if($&&Array.isArray(T(r.errors,m))){const F=x(T(r.errors,m),O.argA,O.argB);P&&G(r.errors,m,F),sg(r.errors,m)}if(l.touchedFields&&$&&Array.isArray(T(r.touchedFields,m))){const F=x(T(r.touchedFields,m),O.argA,O.argB);P&&G(r.touchedFields,m,F)}l.dirtyFields&&(r.dirtyFields=To(o,s)),f.state.next({name:m,isDirty:L(m,w),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else G(s,m,w)},S=(m,w)=>{G(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?G(s,m,w?$:Oo(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):G(r.dirtyFields,m,!0),Z.dirtyFields=r.dirtyFields,$=$||l.dirtyFields&&F!==!ie}if(x){const ie=T(r.touchedFields,m);ie||(G(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?G(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,rg(m||c.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),K=async m=>{const{errors:w}=await E(m);if(m)for(const x of m){const O=T(w,x);O?G(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 Tl(P,s,b,n.shouldUseNativeValidation&&!w,Z);if(ie[$.name]&&(x.valid=!1,w))break;!w&&(T(ie,$.name)?Z?Jv(r.errors,ie,$.name):G(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=>!Vo(x)):!Vo(w._f.ref))&&tn(m)}c.unMount=new Set},L=(m,w)=>(m&&w&&G(s,m,w),!Pt(dt(),o)),R=(m,w,x)=>Qv(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&&G(s,m,Il(w,$)),P=Dr($.ref)&&ye(w)?"":w,Ol($.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):Ao($.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&&Y(m)},de=(m,w,x)=>{for(const O in w){const P=w[O],$=`${m}.${O}`,F=T(i,$);(c.array.has(m)||!Rr(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);G(s,m,$),P?(f.array.next({name:m,values:{...s}}),(l.isDirty||l.dirtyFields)&&x.shouldDirty&&f.state.next({name:m,dirtyFields:To(o,s),isDirty:L(m,$)})):O&&!O._f&&!ye($)?de(m,$,x):ne(m,$,x),Sl(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?Oo(P._f):Wv(m),F=Z=>{O=Number.isNaN(Z)||Z===T(s,x,Z)};if(P){let Z,ie;const Hr=$(),nn=m.type===wl.BLUR||m.type===wl.FOCUS_OUT,Ng=!ig(P._f)&&!n.resolver&&!T(r.errors,x)&&!P._f.deps||og(nn,T(r.touchedFields,x),r.isSubmitted,v,p),Mo=Sl(x,c,nn);G(s,x,Hr),nn?(P._f.onBlur&&P._f.onBlur(m),u&&u(0)):P._f.onChange&&P._f.onChange(m);const Fo=I(x,Hr,nn,!1),Lg=!Ce(Fo)||Mo;if(!nn&&f.values.next({name:x,type:m.type,values:{...s}}),Ng)return l.isValid&&y(),Lg&&f.state.next({name:x,...Mo?{}:Fo});if(!nn&&Mo&&f.state.next({...r}),_(!0),n.resolver){const{errors:Wl}=await E([x]);if(F(Hr),O){const Rg=Dl(r.errors,i,x),Kl=Dl(Wl,i,Rg.name||x);Z=Kl.error,x=Kl.name,ie=Ce(Wl)}}else Z=(await Tl(P,s,b,n.shouldUseNativeValidation))[x],F(Hr),O&&(Z?ie=!1:l.isValid&&(ie=await Q(i,!0)));O&&(P._f.deps&&Y(P._f.deps),A(x,ie,Z,Fo))}},Et=(m,w)=>{if(T(r.errors,w)&&m.focus)return m.focus(),1},Y=async(m,w={})=>{let x,O;const P=Co(m);if(_(!0),n.resolver){const $=await K(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&&Ir(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)}),jr=m=>{m&&Co(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;G(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?Co(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()},Ur=({disabled:m,name:w,field:x,fields:O,value:P})=>{if(ct(m)){const $=m?void 0:te(P)?Oo(x?x._f:T(O,w)._f):P;G(s,w,$),I(w,$,!1,!1,!0)}},Tt=(m,w={})=>{let x=T(i,m);const O=ct(w.disabled);return G(i,m,{...x||{},_f:{...x&&x._f?x._f:{ref:{name:m}},name:m,mount:!0,...w}}),c.mount.add(m),x?Ur({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=ng($),Z=x._f.refs||[];if(F?Z.find(ie=>ie===$):$===x._f.ref)return;G(i,m,{_f:{...x._f,...F?{refs:[...Z.filter(Vo),$,...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)&&!(qv(c.array,m)&&a.action)&&c.unMount.add(m)}}},Ot=()=>n.shouldFocusError&&Ir(i,Et,c.mount),Ge=m=>{ct(m)&&(f.state.next({disabled:m}),Ir(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})},zr=(m,w={})=>{T(i,m)&&(te(w.defaultValue)?qe(m,T(o,m)):(qe(m,w.defaultValue),G(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}))},zl=(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,$)?G(P,$,T(s,$)):qe($,T(P,$));else{if(So&&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(Dr(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?To(o,m):{},touchedFields:w.keepTouched?r.touchedFields:{},errors:w.keepErrors?r.errors:{},isSubmitSuccessful:w.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Hl=(m,w)=>zl(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:Ur,_getFieldArray:U,_reset:zl,_resetDefaultValues:()=>lt(n.defaultValues)&&n.defaultValues().then(m=>{Hl(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:Y,register:Tt,handleSubmit:Dn,watch:Vt,setValue:qe,getValues:dt,reset:Hl,resetField:zr,clearErrors:jr,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 Nl(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={...cg(e,()=>i(s=>({...s}))),formState:r});const o=t.current.control;return o._options=e,Xv({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=Yv(r,o),t.current}var Ll=function(e,t,n){if(e&&"reportValidity"in e){var r=T(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},lg=function(e,t){var n=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Ll(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return Ll(s,i,e)})};for(var r in t.fields)n(r)},ug=function(e,t){t.shouldUseNativeValidation&&lg(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(fg(t.names||Object.keys(e),r)){var s=Object.assign({},dg(T(n,r)));G(s,"root",o),G(n,r,s)}else G(n,r,o)}return n},dg=function(e){return Array.isArray(e)?e.filter(Boolean):[]},fg=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},pg=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]=xl(i,t,n,r.validation,s?[].concat(s,r.message):r.message)}e.issues.shift()}}return n},Rl=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(mo(e,r,d)):Promise.resolve(Xm(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 Tr)return{values:{},errors:ug(pg(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const hg=27,mg=12,vg=10,gg=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},yg=_o("multiple-choice"),bg=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Rl(Xt({checked:cl(Zm(Hm()),n=>Object.entries(n).filter(([r,i])=>i).map(([r,i])=>r),[ev(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),ll(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},wg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var u,d;const r=e.key?(u=W.current$.value.application)==null?void 0:u.data.submissions[e.key]:void 0,{register:i,handleSubmit:o,formState:{errors:s}}=Nl({defaultValues:{checked:yg(r)?Object.fromEntries(r.value.map(l=>[l,!0])):{}},resolver:bg(e.config)}),a=xo(),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&&gg(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*hg+5*mg+2*vg},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(Mr,{}),e.config.minSelected===0&&g(Fr,{type:"button",onClick:()=>t([])})]})]}),g("div",{class:"px-1",children:g(ko,{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"},_g=De(en.phone,[tv(/^\+?[0-9 -]+$/,en.phone)]),xg={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},kg=_o("text"),Sg=e=>Rl(Xt({text:{email:De(en.email,[Jm(en.email)]),phone:cl(_g,t=>t.replace(/[^0-9]/g,"")),text:De([ll(1,en.empty)]),url:De([nv(en.url)])}[e.format]})),Cg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var l;const r=e.key?(l=W.current$.value.application)==null?void 0:l.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:o,handleSubmit:s,formState:{errors:a}}=Nl({defaultValues:{text:i||(kg(r)?r.value:"")},resolver:Sg(e.config)}),{ref:c,...u}=o("text",{required:!e.config.optional}),d=B();return Pe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),g(J,{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,...xg[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(Fr,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),g(Mr,{})]}),g(ko,{onAnimationComplete:n,error:a.text})]})})},$g=({onSubmit:e,onInputChange:t,input:n})=>{const r=B(null),i=ae(()=>{r.current&&(ho.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:ho.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:W,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(Mr,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>g(Cg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>g(wg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"boolean"}},s=>g(Nv,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"file"}},s=>g(Hv,{onSubmitSuccess:o(s.input.type),...s})).exhaustive()})})},Bl=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,jl=ot,Ul=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return jl(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=Bl(d)||Bl(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 jl(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},Ag=Ul("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"}}),Pg={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},Eg=({children:e,className:t,transitionState:n,side:r,...i})=>g(Cr.p,{variants:Pg,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:Ag({className:t,side:r,transitionState:n}),...i,children:e}),Vg=({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`}}))}),Tg={bot:"left",user:"right"},Og=Ul("w-full select-none py-2 text-wrap-balance 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]"}}}),Mg=({messages:e,isBotTyping:t})=>g("ol",{"aria-label":"Chat messages",class:"flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[g(io,{initial:!1,children:e.map((n,r)=>g("li",{class:"flex",children:Ue(n).with({type:"system"},i=>g("p",{class:Og({variant:i.variant}),children:i.text})).with({type:"text",author:_e.union("bot","user")},i=>g(Eg,{side:Tg[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 px-2 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 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center 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",{class:"flex-none",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(jv,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()},r))}),g("aside",{"aria-hidden":!0,children:t&&g(Vg,{})})]}),Fg=25,Ig=()=>{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)*Fg;await new Promise(f=>setTimeout(f,l,{signal:c})),n(!1)}).otherwise(async()=>{}),c!=null&&c.aborted)throw new Vn;W.addMessage(a,u)},input:async({input:a,signal:c})=>{if(c!=null&&c.aborted)throw new Vn;return W.setInput(a),await new Promise(u=>{const d=l=>{if(c!=null&&c.aborted)throw new Vn;W.setInput(void 0),a.key&&(W.setSubmission,W.setSubmission(a.key,l)),u(l)};i(()=>d)})}}),[]);return{chatRef:e,chatService:s,isBotTyping:t,onSubmitSuccessFn:r,scrollToEnd:o}},Dg=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}=Ig(),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}=W.current$.peek();if(f!=="loaded")throw new Error(xm.invalid_state);let p=h.data.currentNodeId;if(c({behavior:"instant"}),W.setInput(void 0),h.data.isFinished)return;p===null?(p=dl(d.nodes).id,W.setCurrentNodeId(p),r.log({event:"APPLY_START",attributionKey:`job_${l.id}`,properties:{job_id:l.id,flow_id:d.id}})):W.removeLastGroupMessagesById(p);const{interpret:v,abort:b}=bv({context:{jobId:l.id,flowId:d.id},analytics:r,apiClient:n,logger:t,flow:d.nodes,chatService:o,getSubmissions:()=>{var k;return(k=W.current$.peek().application)==null?void 0:k.data.submissions},onInterpret:(k,y)=>{const _=W.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}})),W.setCurrentNodeId(k.id)},onFlowEnd:async()=>{W.markAsFinished()}});return v(p),b},[r,n,o,t,c,d,l.id,e.startedAt]),g(J,{children:[g("div",{ref:i,className:"hide-scrollbars relative flex max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:ho.value},children:g(io,{children:g(Mg,{isBotTyping:s,messages:e.data.messages})})}),g($g,{input:e.data.currentInput,onInputChange:()=>c({behavior:"smooth"}),onSubmit:a})]})}},Symbol.toStringTag,{value:"Module"}))})();