@inploi/plugin-chatbot 3.18.0 → 3.18.1

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,4 +1,4 @@
1
- var nm=Object.defineProperty;var im=(Xe,pe,S)=>pe in Xe?nm(Xe,pe,{enumerable:!0,configurable:!0,writable:!0,value:S}):Xe[pe]=S;var Os=(Xe,pe,S)=>(im(Xe,typeof pe!="symbol"?pe+"":pe,S),S);(function(){"use strict";var Xe=e=>e,pe,S,mi,bi,Qe,gi,yi,zr,_i,ct={},wi=[],As=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Qt=Array.isArray;function Ae(e,t){for(var r in t)e[r]=t[r];return e}function xi(e){var t=e.parentNode;t&&t.removeChild(e)}function N(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?pe.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return It(e,a,n,o,null)}function It(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++mi};return o==null&&S.vnode!=null&&S.vnode(i),i}function ki(){return{current:null}}function G(e){return e.children}function be(e,t){this.props=e,this.context=t}function Jt(e,t){if(t==null)return e.__?Jt(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Jt(e):null}function $i(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return $i(e)}}function Ur(e){(!e.__d&&(e.__d=!0)&&Qe.push(e)&&!er.__r++||gi!==S.debounceRendering)&&((gi=S.debounceRendering)||yi)(er)}function er(){var e,t,r,n,o,i,a,s,l;for(Qe.sort(zr);e=Qe.shift();)e.__d&&(t=Qe.length,n=void 0,o=void 0,i=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],o=[],(i=Ae({},a)).__v=a.__v+1,Hr(l,a,i,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??Jt(a),a.__h,o),Ii(n,a,o),a.__e!=s&&$i(a)),Qe.length>t&&Qe.sort(zr));er.__r=0}function Si(e,t,r,n,o,i,a,s,l,u,f){var c,v,g,m,h,w,k,_,O,I,P=0,U=n&&n.__k||wi,q=U.length,D=q,M=t.length;for(r.__k=[],c=0;c<M;c++)(m=r.__k[c]=(m=t[c])==null||typeof m=="boolean"||typeof m=="function"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?It(null,m,null,null,m):Qt(m)?It(G,{children:m},null,null,null):m.__b>0?It(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=r,m.__b=r.__b+1,(_=Is(m,U,k=c+P,D))===-1?g=ct:(g=U[_]||ct,U[_]=void 0,D--),Hr(e,m,g,o,i,a,s,l,u,f),h=m.__e,(v=m.ref)&&g.ref!=v&&(g.ref&&qr(g.ref,null,m),f.push(v,m.__c||h,m)),h!=null&&(w==null&&(w=h),I=!(O=g===ct||g.__v===null)&&_===k,O?_==-1&&P--:_!==k&&(_===k+1?(P++,I=!0):_>k?D>M-k?(P+=_-k,I=!0):P--:P=_<k&&_==k-1?_-k:0),k=c+P,I=I||_==c&&!O,typeof m.type!="function"||_===k&&g.__k!==m.__k?typeof m.type=="function"||I?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=h.nextSibling:l=Ei(e,h,l):l=Ci(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=w,c=q;c--;)U[c]!=null&&(typeof r.type=="function"&&U[c].__e!=null&&U[c].__e==r.__d&&(r.__d=U[c].__e.nextSibling),Ti(U[c],U[c]))}function Ci(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t=typeof n.type=="function"?Ci(n,t,r):Ei(r,n.__e,t));return t}function Ie(e,t){return t=t||[],e==null||typeof e=="boolean"||(Qt(e)?e.some(function(r){Ie(r,t)}):t.push(e)),t}function Ei(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function Is(e,t,r,n){var o=e.key,i=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&o==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&o==l.key&&i===l.type)return a;a--}if(s<t.length){if((l=t[s])&&o==l.key&&i===l.type)return s;s++}}return-1}function Ts(e,t,r,n,o){var i;for(i in r)i==="children"||i==="key"||i in t||tr(e,i,null,r[i],n);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||tr(e,i,t[i],r[i],n)}function Pi(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||As.test(t)?r:r+"px"}function tr(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Pi(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Pi(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?Ai:Oi,i):e.removeEventListener(t,i?Ai:Oi,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Oi(e){return this.l[e.type+!1](S.event?S.event(e):e)}function Ai(e){return this.l[e.type+!0](S.event?S.event(e):e)}function Hr(e,t,r,n,o,i,a,s,l,u){var f,c,v,g,m,h,w,k,_,O,I,P,U,q,D,M=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=S.__b)&&f(t);try{e:if(typeof M=="function"){if(k=t.props,_=(f=M.contextType)&&n[f.__c],O=f?_?_.props.value:f.__:n,r.__c?w=(c=t.__c=r.__c).__=c.__E:("prototype"in M&&M.prototype.render?t.__c=c=new M(k,O):(t.__c=c=new be(k,O),c.constructor=M,c.render=Ds),_&&_.sub(c),c.props=k,c.state||(c.state={}),c.context=O,c.__n=n,v=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),M.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ae({},c.__s)),Ae(c.__s,M.getDerivedStateFromProps(k,c.__s))),g=c.props,m=c.state,c.__v=t,v)M.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(M.getDerivedStateFromProps==null&&k!==g&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(k,O),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(k,c.__s,O)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=k,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(oe){oe&&(oe.__=t)}),I=0;I<c._sb.length;I++)c.__h.push(c._sb[I]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(k,c.__s,O),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(g,m,h)})}if(c.context=O,c.props=k,c.__P=e,c.__e=!1,P=S.__r,U=0,"prototype"in M&&M.prototype.render){for(c.state=c.__s,c.__d=!1,P&&P(t),f=c.render(c.props,c.state,c.context),q=0;q<c._sb.length;q++)c.__h.push(c._sb[q]);c._sb=[]}else do c.__d=!1,P&&P(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++U<25);c.state=c.__s,c.getChildContext!=null&&(n=Ae(Ae({},n),c.getChildContext())),v||c.getSnapshotBeforeUpdate==null||(h=c.getSnapshotBeforeUpdate(g,m)),Si(e,Qt(D=f!=null&&f.type===G&&f.key==null?f.props.children:f)?D:[D],t,r,n,o,i,a,s,l,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),w&&(c.__E=c.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Ns(r.__e,t,r,n,o,i,a,l,u);(f=S.diffed)&&f(t)}catch(oe){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),S.__e(oe,t,r)}}function Ii(e,t,r){for(var n=0;n<r.length;n++)qr(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function Ns(e,t,r,n,o,i,a,s,l){var u,f,c,v=r.props,g=t.props,m=t.type,h=0;if(m==="svg"&&(o=!0),i!=null){for(;h<i.length;h++)if((u=i[h])&&"setAttribute"in u==!!m&&(m?u.localName===m:u.nodeType===3)){e=u,i[h]=null;break}}if(e==null){if(m===null)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,g.is&&g),i=null,s=!1}if(m===null)v===g||s&&e.data===g||(e.data=g);else{if(i=i&&pe.call(e.childNodes),f=(v=r.props||ct).dangerouslySetInnerHTML,c=g.dangerouslySetInnerHTML,!s){if(i!=null)for(v={},h=0;h<e.attributes.length;h++)v[e.attributes[h].name]=e.attributes[h].value;(c||f)&&(c&&(f&&c.__html==f.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(Ts(e,g,v,o,s),c)t.__k=[];else if(Si(e,Qt(h=t.props.children)?h:[h],t,r,n,o&&m!=="foreignObject",i,a,i?i[0]:r.__k&&Jt(r,0),s,l),i!=null)for(h=i.length;h--;)i[h]!=null&&xi(i[h]);s||("value"in g&&(h=g.value)!==void 0&&(h!==e.value||m==="progress"&&!h||m==="option"&&h!==v.value)&&tr(e,"value",h,v.value,!1),"checked"in g&&(h=g.checked)!==void 0&&h!==e.checked&&tr(e,"checked",h,v.checked,!1))}return e}function qr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function Ti(e,t,r){var n,o;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||qr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){S.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Ti(n[o],t,r||typeof e.type!="function");r||e.__e==null||xi(e.__e),e.__=e.__e=e.__d=void 0}function Ds(e,t,r){return this.constructor(e,r)}function ut(e,t,r){var n,o,i,a;S.__&&S.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],a=[],Hr(t,e=(!n&&r||t).__k=N(G,null,[e]),o||ct,ct,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?pe.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),Ii(i,e,a)}function Ni(e,t){ut(e,t,Ni)}function Ms(e,t,r){var n,o,i,a,s=Ae({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&a!==void 0?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?pe.call(arguments,2):r),It(e.type,s,n||e.key,o||e.ref,null)}function Tt(e,t){var r={__c:t="__cC"+_i++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(function(s){s.__e=!0,Ur(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}pe=wi.slice,S={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},mi=0,bi=function(e){return e!=null&&e.constructor===void 0},be.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ae({},this.state),typeof e=="function"&&(e=e(Ae({},r),this.props)),e&&Ae(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ur(this))},be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ur(this))},be.prototype.render=G,Qe=[],yi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zr=function(e,t){return e.__v.__b-t.__v.__b},er.__r=0,_i=0;var Kr=class extends Error{constructor(t){super(t[0].message);Os(this,"issues");this.name="ValiError",this.issues=t}};function Di(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Nt(e){return{issues:e}}function we(e){return{output:e}}function Fs(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 Ls(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 Re(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return we(e);let o,i,a=e;for(const s of t){const l=s._parse(a);if(l.issues){o=o||Ls(r,n);for(const u of l.issues){const f=Fs(o,u);i?i.push(f):i=[f]}if(o.abortEarly||o.abortPipeEarly)break}else a=l.output}return i?Nt(i):we(a)}function Ve(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function Mi(e){return typeof e=="function"?e():e}function je(e,t,r,n){return Nt([{validation:e,message:Mi(t),input:r,requirement:n}])}function Rs(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,a]=Ve(t,r);return[e,i,a]}const[n,o]=Ve(e,t);return[void 0,n,o]}function Je(e,t,r,n,o,i){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:Mi(n),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Fi(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Re(t,this.pipe,r,"any")}}}function Li(e,t,r){const[n="Invalid type",o]=Ve(t,r);return{type:"array",async:!1,item:e,message:n,pipe:o,_parse(i,a){if(!Array.isArray(i))return Je(a,"type","array",this.message,i);let s;const l=[];for(let u=0;u<i.length;u++){const f=i[u],c=this.item._parse(f,a);if(c.issues){const v={type:"array",input:i,key:u,value:f};for(const g of c.issues)g.path?g.path.unshift(v):g.path=[v],s==null||s.push(g);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Nt(s):Re(l,this.pipe,a,"array")}}}function Vs(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="boolean"?Je(i,"type","boolean",this.message,o):Re(o,this.pipe,i,"boolean")}}}function Wr(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="number"||isNaN(o)?Je(i,"type","number",this.message,o):Re(o,this.pipe,i,"number")}}}function Te(e,t,r,n){const[o,i="Invalid type",a]=Rs(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:a,_parse(l,u){if(!l||typeof l!="object")return Je(u,"type","object",this.message,l);s=s||Object.entries(this.entries);let f;const c={};for(const[v,g]of s){const m=l[v],h=g._parse(m,u);if(h.issues){const w={type:"object",input:l,key:v,value:m};for(const k of h.issues)k.path?k.path.unshift(w):k.path=[w],f==null||f.push(k);if(f||(f=h.issues),u!=null&&u.abortEarly)break}else(h.output!==void 0||v in l)&&(c[v]=h.output)}if(this.rest&&!(u!=null&&u.abortEarly&&f)){for(const v in l)if(!(v in this.entries)){const g=l[v],m=this.rest._parse(g,u);if(m.issues){const h={type:"object",input:l,key:v,value:g};for(const w of m.issues)w.path?w.path.unshift(h):w.path=[h],f==null||f.push(w);if(f||(f=m.issues),u!=null&&u.abortEarly)break}else c[v]=m.output}}return f?Nt(f):Re(c,this.pipe,u,"object")}}}function js(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?we(r):Je(n,"type","picklist",this.message,r)}}}function ge(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="string"?Je(i,"type","string",this.message,o):Re(o,this.pipe,i,"string")}}}function Bs(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=Ve(r,n);return[e,t,a,s]}const[o,i]=Ve(t,r);return[ge(),e,o,i]}var zs=["__proto__","prototype","constructor"];function Ri(e,t,r,n){const[o,i,a="Invalid type",s]=Bs(e,t,r,n);return{type:"record",async:!1,key:o,value:i,message:a,pipe:s,_parse(l,u){if(!l||typeof l!="object")return Je(u,"type","record",this.message,l);let f;const c={};for(const[v,g]of Object.entries(l))if(!zs.includes(v)){let m;const h=this.key._parse(v,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(h.issues){m={type:"record",input:l,key:v,value:g};for(const k of h.issues)k.path=[m],f==null||f.push(k);if(f||(f=h.issues),u!=null&&u.abortEarly)break}const w=this.value._parse(g,u);if(w.issues){m=m||{type:"record",input:l,key:v,value:g};for(const k of w.issues)k.path?k.path.unshift(m):k.path=[m],f==null||f.push(k);if(f||(f=w.issues),u!=null&&u.abortEarly)break}!h.issues&&!w.issues&&(c[h.output]=w.output)}return f?Nt(f):Re(c,this.pipe,u,"record")}}}function Dt(e,t,r){const n=e._parse(t,r);if(n.issues)throw new Kr(n.issues);return n.output}async function Us(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new Kr(n.issues);return n.output}function Vi(e,t,r){return{...e,_parse(n,o){const i=e._parse(n,o);if(i.issues)return i;const a=t(i.output);return r&&!Array.isArray(r)?r._parse(a,o):Re(a,r,o,typeof a)}}}var Hs=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function qs(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?we(r):je(this.type,this.message,r,this.requirement)}}}function Ks(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Hs,_parse(t){return this.requirement.test(t)?we(t):je(this.type,this.message,t,this.requirement)}}}function Mt(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?je(this.type,this.message,r,this.requirement):we(r)}}}function Ws(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?je(this.type,this.message,r,this.requirement):we(r)}}}function ji(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?je(this.type,this.message,r,this.requirement):we(r)}}}function Gs(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?je(this.type,this.message,r,this.requirement):we(r)}}}function Ys(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?we(r):je(this.type,this.message,r,this.requirement)}}}function Zs(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)?we(t):je(this.type,this.message,t,this.requirement)}}}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ue.apply(this,arguments)}var Ne,B,Gr,Bi,dt=0,zi=[],rr=[],Ui=S.__b,Hi=S.__r,qi=S.diffed,Ki=S.__c,Wi=S.unmount;function et(e,t){S.__h&&S.__h(B,e,dt||t),dt=0;var r=B.__H||(B.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:rr}),r.__[e]}function W(e){return dt=1,nr(Qi,e)}function nr(e,t,r){var n=et(Ne++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Qi(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,s);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=B,!B.u)){var o=function(s,l,u){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(v){return v.__c});if(f.every(function(v){return!v.__N}))return!i||i.call(this,s,l,u);var c=!1;return f.forEach(function(v){if(v.__N){var g=v.__[0];v.__=v.__N,v.__N=void 0,g!==v.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!i||i.call(this,s,l,u))};B.u=!0;var i=B.shouldComponentUpdate,a=B.componentWillUpdate;B.componentWillUpdate=function(s,l,u){if(this.__e){var f=i;i=void 0,o(s,l,u),i=f}a&&a.call(this,s,l,u)},B.shouldComponentUpdate=o}return n.__N||n.__}function V(e,t){var r=et(Ne++,3);!S.__s&&Zr(r.__H,t)&&(r.__=e,r.i=t,B.__H.__h.push(r))}function he(e,t){var r=et(Ne++,4);!S.__s&&Zr(r.__H,t)&&(r.__=e,r.i=t,B.__h.push(r))}function L(e){return dt=5,se(function(){return{current:e}},[])}function Gi(e,t,r){dt=6,he(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function se(e,t){var r=et(Ne++,7);return Zr(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ve(e,t){return dt=8,se(function(){return e},t)}function ir(e){var t=B.context[e.__c],r=et(Ne++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(B)),t.props.value):e.__}function Yi(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function Xs(e){var t=et(Ne++,10),r=W();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Zi(){var e=et(Ne++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Qs(){for(var e;e=zi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(or),e.__H.__h.forEach(Yr),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){B=null,Ui&&Ui(e)},S.__r=function(e){Hi&&Hi(e),Ne=0;var t=(B=e.__c).__H;t&&(Gr===B?(t.__h=[],B.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=rr,r.__N=r.i=void 0})):(t.__h.forEach(or),t.__h.forEach(Yr),t.__h=[],Ne=0)),Gr=B},S.diffed=function(e){qi&&qi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(zi.push(t)!==1&&Bi===S.requestAnimationFrame||((Bi=S.requestAnimationFrame)||Js)(Qs)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==rr&&(r.__=r.__V),r.i=void 0,r.__V=rr})),Gr=B=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(or),r.__h=r.__h.filter(function(n){return!n.__||Yr(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),Ki&&Ki(e,t)},S.unmount=function(e){Wi&&Wi(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{or(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var Xi=typeof requestAnimationFrame=="function";function Js(e){var t,r=function(){clearTimeout(n),Xi&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Xi&&(t=requestAnimationFrame(r))}function or(e){var t=B,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),B=t}function Yr(e){var t=B;e.__c=e.__(),B=t}function Zr(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Qi(e,t){return typeof t=="function"?t(e):t}function Ji(e,t){for(var r in t)e[r]=t[r];return e}function Xr(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Qr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ar(e){this.props=e}function eo(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Xr(this.props,o)}function n(o){return this.shouldComponentUpdate=r,N(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ar.prototype=new be).isPureReactComponent=!0,ar.prototype.shouldComponentUpdate=function(e,t){return Xr(this.props,e)||Xr(this.state,t)};var to=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),to&&to(e)};var el=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function le(e){function t(r){var n=Ji({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=el,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ro=function(e,t){return e==null?null:Ie(Ie(e).map(t))},De={map:ro,forEach:ro,count:function(e){return e?Ie(e).length:0},only:function(e){var t=Ie(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ie},tl=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}tl(e,t,r,n)};var no=S.unmount;function io(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Ji({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return io(n,t,r)})),e}function oo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return oo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function ft(){this.__u=0,this.t=null,this.__b=null}function ao(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Jr(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return N(r,i)}return o.displayName="Lazy",o.__f=!0,o}function pt(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),no&&no(e)},(ft.prototype=new be).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=ao(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=oo(u,u.__c.__P,u.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},ft.prototype.componentWillUnmount=function(){this.t=[]},ft.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=io(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&N(G,null,e.fallback);return o&&(o.__h=null),[N(G,null,t.__a?null:e.children),o]};var so=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function rl(e){return this.getChildContext=function(){return e.context},e.children}function nl(e){var t=this,r=e.i;t.componentWillUnmount=function(){ut(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),ut(N(rl,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function lo(e,t){var r=N(nl,{__v:e,i:t});return r.containerInfo=t,r}(pt.prototype=new be).__a=function(e){var t=this,r=ao(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),so(t,e,n)):o()};r?r(i):i()}},pt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ie(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},pt.prototype.componentDidUpdate=pt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){so(e,r,t)})};var co=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,il=/^(?: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]/,ol=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,al=/[A-Z0-9]/g,sl=typeof document<"u",ll=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function uo(e,t,r){return t.__k==null&&(t.textContent=""),ut(e,t),typeof r=="function"&&r(),e?e.__c:null}function fo(e,t,r){return Ni(e,t),typeof r=="function"&&r(),e?e.__c:null}be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var po=S.event;function cl(){}function ul(){return this.cancelBubble}function dl(){return this.defaultPrevented}S.event=function(e){return po&&(e=po(e)),e.persist=cl,e.isPropagationStopped=ul,e.isDefaultPrevented=dl,e.nativeEvent=e};var en,fl={enumerable:!1,configurable:!0,get:function(){return this.class}},ho=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var a=r[i];if(!(i==="value"&&"defaultValue"in r&&a==null||sl&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&a===!0?a="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||ll(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":ol.test(i)?i=s:n.indexOf("-")===-1&&il.test(i)?i=i.replace(al,"-$&").toLowerCase():a===null&&(a=void 0):s=i="oninput",s==="oninput"&&o[i=s]&&(i="oninputCapture"),o[i]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Ie(r.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Ie(r.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",fl)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=co,ho&&ho(e)};var vo=S.__r;S.__r=function(e){vo&&vo(e),en=e.__c};var mo=S.diffed;S.diffed=function(e){mo&&mo(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),en=null};var bo={ReactCurrentDispatcher:{current:{readContext:function(e){return en.__n[e.__c].props.value}}}},pl="17.0.2";function go(e){return N.bind(null,e)}function tt(e){return!!e&&e.$$typeof===co}function ht(e){return tt(e)?Ms.apply(null,arguments):e}function yo(e){return!!e.__k&&(ut(null,e),!0)}function _o(e){return e&&(e.base||e.nodeType===1&&e)||null}var wo=function(e,t){return e(t)},sr=function(e,t){return e(t)},xo=G;function tn(e){e()}function ko(e){return e}function $o(){return[!1,tn]}var So=he;function Co(e,t){var r=t(),n=W({h:{__:r,v:t}}),o=n[0].h,i=n[1];return he(function(){o.__=r,o.v=t,Qr(o.__,t())||i({h:o})},[e,r,t]),V(function(){return Qr(o.__,o.v())||i({h:o}),e(function(){Qr(o.__,o.v())||i({h:o})})},[e]),r}var xe={useState:W,useId:Zi,useReducer:nr,useEffect:V,useLayoutEffect:he,useInsertionEffect:So,useTransition:$o,useDeferredValue:ko,useSyncExternalStore:Co,startTransition:tn,useRef:L,useImperativeHandle:Gi,useMemo:se,useCallback:ve,useContext:ir,useDebugValue:Yi,version:"17.0.2",Children:De,render:uo,hydrate:fo,unmountComponentAtNode:yo,createPortal:lo,createElement:N,createContext:Tt,createFactory:go,cloneElement:ht,createRef:ki,Fragment:G,isValidElement:tt,findDOMNode:_o,Component:be,PureComponent:ar,memo:eo,forwardRef:le,flushSync:sr,unstable_batchedUpdates:wo,StrictMode:xo,Suspense:ft,SuspenseList:pt,lazy:Jr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bo};const hl=Object.freeze(Object.defineProperty({__proto__:null,Children:De,Component:be,Fragment:G,PureComponent:ar,StrictMode:xo,Suspense:ft,SuspenseList:pt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bo,cloneElement:ht,createContext:Tt,createElement:N,createFactory:go,createPortal:lo,createRef:ki,default:xe,findDOMNode:_o,flushSync:sr,forwardRef:le,hydrate:fo,isValidElement:tt,lazy:Jr,memo:eo,render:uo,startTransition:tn,unmountComponentAtNode:yo,unstable_batchedUpdates:wo,useCallback:ve,useContext:ir,useDebugValue:Yi,useDeferredValue:ko,useEffect:V,useErrorBoundary:Xs,useId:Zi,useImperativeHandle:Gi,useInsertionEffect:So,useLayoutEffect:he,useMemo:se,useReducer:nr,useRef:L,useState:W,useSyncExternalStore:Co,useTransition:$o,version:pl},Symbol.toStringTag,{value:"Module"}));function vt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function vl(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Eo(...e){return t=>e.forEach(r=>vl(r,t))}function Ft(...e){return ve(Eo(...e),e)}function ml(e,t=[]){let r=[];function n(i,a){const s=Tt(a),l=r.length;r=[...r,a];function u(c){const{scope:v,children:g,...m}=c,h=(v==null?void 0:v[e][l])||s,w=se(()=>m,Object.values(m));return N(h.Provider,{value:w},g)}function f(c,v){const g=(v==null?void 0:v[e][l])||s,m=ir(g);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>Tt(a));return function(s){const l=(s==null?void 0:s[e])||i;return se(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,bl(o,...t)]}function bl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...s,...c}},{});return se(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const rn=globalThis!=null&&globalThis.document?he:()=>{},gl=hl["useId".toString()]||(()=>{});let yl=0;function nn(e){const[t,r]=W(gl());return rn(()=>{e||r(n=>n??String(yl++))},[e]),e||(t?`radix-${t}`:"")}function rt(e){const t=L(e);return V(()=>{t.current=e}),se(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function _l({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=wl({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=rt(r),l=ve(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&s(c)}else o(u)},[i,e,o,s]);return[a,l]}function wl({defaultProp:e,onChange:t}){const r=W(e),[n]=r,o=L(n),i=rt(t);return V(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const on=le((e,t)=>{const{children:r,...n}=e,o=De.toArray(r),i=o.find(kl);if(i){const a=i.props.children,s=o.map(l=>l===i?De.count(a)>1?De.only(null):tt(a)?a.props.children:null:l);return N(an,ue({},n,{ref:t}),tt(a)?ht(a,void 0,s):null)}return N(an,ue({},n,{ref:t}),r)});on.displayName="Slot";const an=le((e,t)=>{const{children:r,...n}=e;return tt(r)?ht(r,{...$l(n,r.props),ref:t?Eo(t,r.ref):r.ref}):De.count(r)>1?De.only(null):null});an.displayName="SlotClone";const xl=({children:e})=>N(G,null,e);function kl(e){return tt(e)&&e.type===xl}function $l(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const sn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=le((n,o)=>{const{asChild:i,...a}=n,s=i?on:t;return V(()=>{window[Symbol.for("radix-ui")]=!0},[]),N(s,ue({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Sl(e,t){e&&sr(()=>e.dispatchEvent(t))}function Cl(e,t=globalThis==null?void 0:globalThis.document){const r=rt(e);V(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const ln="dismissableLayer.update",El="dismissableLayer.pointerDownOutside",Pl="dismissableLayer.focusOutside";let Po;const Ol=Tt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Al=le((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=ir(Ol),[c,v]=W(null),g=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=W({}),h=Ft(t,D=>v(D)),w=Array.from(f.layers),[k]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),_=w.indexOf(k),O=c?w.indexOf(c):-1,I=f.layersWithOutsidePointerEventsDisabled.size>0,P=O>=_,U=Il(D=>{const M=D.target,oe=[...f.branches].some(te=>te.contains(M));!P||oe||(i==null||i(D),s==null||s(D),D.defaultPrevented||l==null||l())},g),q=Tl(D=>{const M=D.target;[...f.branches].some(te=>te.contains(M))||(a==null||a(D),s==null||s(D),D.defaultPrevented||l==null||l())},g);return Cl(D=>{O===f.layers.size-1&&(o==null||o(D),!D.defaultPrevented&&l&&(D.preventDefault(),l()))},g),V(()=>{if(c)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Po=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(c)),f.layers.add(c),Oo(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Po)}},[c,g,n,f]),V(()=>()=>{c&&(f.layers.delete(c),f.layersWithOutsidePointerEventsDisabled.delete(c),Oo())},[c,f]),V(()=>{const D=()=>m({});return document.addEventListener(ln,D),()=>document.removeEventListener(ln,D)},[]),N(sn.div,ue({},u,{ref:h,style:{pointerEvents:I?P?"auto":"none":void 0,...e.style},onFocusCapture:vt(e.onFocusCapture,q.onFocusCapture),onBlurCapture:vt(e.onBlurCapture,q.onBlurCapture),onPointerDownCapture:vt(e.onPointerDownCapture,U.onPointerDownCapture)}))});function Il(e,t=globalThis==null?void 0:globalThis.document){const r=rt(e),n=L(!1),o=L(()=>{});return V(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Ao(El,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Tl(e,t=globalThis==null?void 0:globalThis.document){const r=rt(e),n=L(!1);return V(()=>{const o=i=>{i.target&&!n.current&&Ao(Pl,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Oo(){const e=new CustomEvent(ln);document.dispatchEvent(e)}function Ao(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Sl(o,i):o.dispatchEvent(i)}const cn="focusScope.autoFocusOnMount",un="focusScope.autoFocusOnUnmount",Io={bubbles:!1,cancelable:!0},Nl=le((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=W(null),u=rt(o),f=rt(i),c=L(null),v=Ft(t,h=>l(h)),g=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V(()=>{if(n){let h=function(O){if(g.paused||!s)return;const I=O.target;s.contains(I)?c.current=I:Be(c.current,{select:!0})},w=function(O){if(g.paused||!s)return;const I=O.relatedTarget;I!==null&&(s.contains(I)||Be(c.current,{select:!0}))},k=function(O){if(document.activeElement===document.body)for(const P of O)P.removedNodes.length>0&&Be(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",w);const _=new MutationObserver(k);return s&&_.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",w),_.disconnect()}}},[n,s,g.paused]),V(()=>{if(s){Do.add(g);const h=document.activeElement;if(!s.contains(h)){const k=new CustomEvent(cn,Io);s.addEventListener(cn,u),s.dispatchEvent(k),k.defaultPrevented||(Dl(Vl(To(s)),{select:!0}),document.activeElement===h&&Be(s))}return()=>{s.removeEventListener(cn,u),setTimeout(()=>{const k=new CustomEvent(un,Io);s.addEventListener(un,f),s.dispatchEvent(k),k.defaultPrevented||Be(h??document.body,{select:!0}),s.removeEventListener(un,f),Do.remove(g)},0)}}},[s,u,f,g]);const m=ve(h=>{if(!r&&!n||g.paused)return;const w=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,k=document.activeElement;if(w&&k){const _=h.currentTarget,[O,I]=Ml(_);O&&I?!h.shiftKey&&k===I?(h.preventDefault(),r&&Be(O,{select:!0})):h.shiftKey&&k===O&&(h.preventDefault(),r&&Be(I,{select:!0})):k===_&&h.preventDefault()}},[r,n,g.paused]);return N(sn.div,ue({tabIndex:-1},a,{ref:v,onKeyDown:m}))});function Dl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Be(n,{select:t}),document.activeElement!==r)return}function Ml(e){const t=To(e),r=No(t,e),n=No(t.reverse(),e);return[r,n]}function To(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function No(e,t){for(const r of e)if(!Fl(r,{upTo:t}))return r}function Fl(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 Ll(e){return e instanceof HTMLInputElement&&"select"in e}function Be(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Ll(e)&&t&&e.select()}}const Do=Rl();function Rl(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Mo(e,t),e.unshift(t)},remove(t){var r;e=Mo(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Mo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Vl(e){return e.filter(t=>t.tagName!=="A")}function jl(e,t){return nr((r,n)=>{const o=t[r][n];return o??r},e)}const dn=e=>{const{present:t,children:r}=e,n=Bl(t),o=typeof r=="function"?r({present:n.isPresent}):De.only(r),i=Ft(n.ref,o.ref);return typeof r=="function"||n.isPresent?ht(o,{ref:i}):null};dn.displayName="Presence";function Bl(e){const[t,r]=W(),n=L({}),o=L(e),i=L("none"),a=e?"mounted":"unmounted",[s,l]=jl(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(()=>{const u=lr(n.current);i.current=s==="mounted"?u:"none"},[s]),rn(()=>{const u=n.current,f=o.current;if(f!==e){const v=i.current,g=lr(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&v!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),rn(()=>{if(t){const u=c=>{const g=lr(n.current).includes(c.animationName);c.target===t&&g&&sr(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(i.current=lr(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:ve(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function lr(e){return(e==null?void 0:e.animationName)||"none"}let fn=0;function zl(){V(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Fo()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Fo()),fn++,()=>{fn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),fn--}},[])}function Fo(){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 Se=function(){return Se=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Se.apply(this,arguments)};function Lo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ul(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var cr="right-scroll-bar-position",ur="width-before-scroll-bar",Hl="with-scroll-bars-hidden",ql="--removed-body-scroll-bar-size";function Kl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Wl(e,t){var r=W(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Gl(e,t){return Wl(t||null,function(r){return e.forEach(function(n){return Kl(n,r)})})}function Yl(e){return e}function Zl(e,t){t===void 0&&(t=Yl);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function Xl(e){e===void 0&&(e={});var t=Zl(null);return t.options=Se({async:!0,ssr:!1},e),t}var Ro=function(e){var t=e.sideCar,r=Lo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return N(n,Se({},r))};Ro.isSideCarExport=!0;function Ql(e,t){return e.useMedium(t),Ro}var Vo=Xl(),pn=function(){},dr=le(function(e,t){var r=L(null),n=W({onScrollCapture:pn,onWheelCapture:pn,onTouchMoveCapture:pn}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,v=e.sideCar,g=e.noIsolation,m=e.inert,h=e.allowPinchZoom,w=e.as,k=w===void 0?"div":w,_=Lo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=v,I=Gl([r,t]),P=Se(Se({},_),o);return N(G,null,f&&N(O,{sideCar:Vo,removeScrollBar:u,shards:c,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!h,lockRef:r}),a?ht(De.only(s),Se(Se({},P),{ref:I})):N(k,Se({},P,{className:l,ref:I}),s))});dr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dr.classNames={fullWidth:ur,zeroRight:cr};var jo,Jl=function(){if(jo)return jo;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ec(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Jl();return t&&e.setAttribute("nonce",t),e}function tc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nc=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ec())&&(tc(t,r),rc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ic=function(){var e=nc();return function(t,r){V(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Bo=function(){var e=ic(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},oc={left:0,top:0,right:0,gap:0},hn=function(e){return parseInt(e||"",10)||0},ac=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[hn(r),hn(n),hn(o)]},sc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return oc;var t=ac(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},lc=Bo(),cc=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
1
+ var nm=Object.defineProperty;var im=(Xe,pe,S)=>pe in Xe?nm(Xe,pe,{enumerable:!0,configurable:!0,writable:!0,value:S}):Xe[pe]=S;var Os=(Xe,pe,S)=>(im(Xe,typeof pe!="symbol"?pe+"":pe,S),S);(function(){"use strict";var Xe=e=>e,pe,S,mi,bi,Qe,gi,yi,zr,_i,ct={},wi=[],As=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Qt=Array.isArray;function Ie(e,t){for(var r in t)e[r]=t[r];return e}function xi(e){var t=e.parentNode;t&&t.removeChild(e)}function N(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?pe.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return It(e,a,n,o,null)}function It(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++mi};return o==null&&S.vnode!=null&&S.vnode(i),i}function ki(){return{current:null}}function G(e){return e.children}function be(e,t){this.props=e,this.context=t}function Jt(e,t){if(t==null)return e.__?Jt(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Jt(e):null}function $i(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return $i(e)}}function Ur(e){(!e.__d&&(e.__d=!0)&&Qe.push(e)&&!er.__r++||gi!==S.debounceRendering)&&((gi=S.debounceRendering)||yi)(er)}function er(){var e,t,r,n,o,i,a,s,l;for(Qe.sort(zr);e=Qe.shift();)e.__d&&(t=Qe.length,n=void 0,o=void 0,i=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],o=[],(i=Ie({},a)).__v=a.__v+1,Hr(l,a,i,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??Jt(a),a.__h,o),Ii(n,a,o),a.__e!=s&&$i(a)),Qe.length>t&&Qe.sort(zr));er.__r=0}function Si(e,t,r,n,o,i,a,s,l,u,f){var c,v,g,m,h,w,k,_,O,I,P=0,U=n&&n.__k||wi,q=U.length,D=q,M=t.length;for(r.__k=[],c=0;c<M;c++)(m=r.__k[c]=(m=t[c])==null||typeof m=="boolean"||typeof m=="function"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?It(null,m,null,null,m):Qt(m)?It(G,{children:m},null,null,null):m.__b>0?It(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=r,m.__b=r.__b+1,(_=Is(m,U,k=c+P,D))===-1?g=ct:(g=U[_]||ct,U[_]=void 0,D--),Hr(e,m,g,o,i,a,s,l,u,f),h=m.__e,(v=m.ref)&&g.ref!=v&&(g.ref&&qr(g.ref,null,m),f.push(v,m.__c||h,m)),h!=null&&(w==null&&(w=h),I=!(O=g===ct||g.__v===null)&&_===k,O?_==-1&&P--:_!==k&&(_===k+1?(P++,I=!0):_>k?D>M-k?(P+=_-k,I=!0):P--:P=_<k&&_==k-1?_-k:0),k=c+P,I=I||_==c&&!O,typeof m.type!="function"||_===k&&g.__k!==m.__k?typeof m.type=="function"||I?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=h.nextSibling:l=Ei(e,h,l):l=Ci(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=w,c=q;c--;)U[c]!=null&&(typeof r.type=="function"&&U[c].__e!=null&&U[c].__e==r.__d&&(r.__d=U[c].__e.nextSibling),Ti(U[c],U[c]))}function Ci(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t=typeof n.type=="function"?Ci(n,t,r):Ei(r,n.__e,t));return t}function Te(e,t){return t=t||[],e==null||typeof e=="boolean"||(Qt(e)?e.some(function(r){Te(r,t)}):t.push(e)),t}function Ei(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function Is(e,t,r,n){var o=e.key,i=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&o==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&o==l.key&&i===l.type)return a;a--}if(s<t.length){if((l=t[s])&&o==l.key&&i===l.type)return s;s++}}return-1}function Ts(e,t,r,n,o){var i;for(i in r)i==="children"||i==="key"||i in t||tr(e,i,null,r[i],n);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||tr(e,i,t[i],r[i],n)}function Pi(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||As.test(t)?r:r+"px"}function tr(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Pi(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Pi(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?Ai:Oi,i):e.removeEventListener(t,i?Ai:Oi,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Oi(e){return this.l[e.type+!1](S.event?S.event(e):e)}function Ai(e){return this.l[e.type+!0](S.event?S.event(e):e)}function Hr(e,t,r,n,o,i,a,s,l,u){var f,c,v,g,m,h,w,k,_,O,I,P,U,q,D,M=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=S.__b)&&f(t);try{e:if(typeof M=="function"){if(k=t.props,_=(f=M.contextType)&&n[f.__c],O=f?_?_.props.value:f.__:n,r.__c?w=(c=t.__c=r.__c).__=c.__E:("prototype"in M&&M.prototype.render?t.__c=c=new M(k,O):(t.__c=c=new be(k,O),c.constructor=M,c.render=Ds),_&&_.sub(c),c.props=k,c.state||(c.state={}),c.context=O,c.__n=n,v=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),M.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ie({},c.__s)),Ie(c.__s,M.getDerivedStateFromProps(k,c.__s))),g=c.props,m=c.state,c.__v=t,v)M.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(M.getDerivedStateFromProps==null&&k!==g&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(k,O),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(k,c.__s,O)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=k,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(oe){oe&&(oe.__=t)}),I=0;I<c._sb.length;I++)c.__h.push(c._sb[I]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(k,c.__s,O),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(g,m,h)})}if(c.context=O,c.props=k,c.__P=e,c.__e=!1,P=S.__r,U=0,"prototype"in M&&M.prototype.render){for(c.state=c.__s,c.__d=!1,P&&P(t),f=c.render(c.props,c.state,c.context),q=0;q<c._sb.length;q++)c.__h.push(c._sb[q]);c._sb=[]}else do c.__d=!1,P&&P(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++U<25);c.state=c.__s,c.getChildContext!=null&&(n=Ie(Ie({},n),c.getChildContext())),v||c.getSnapshotBeforeUpdate==null||(h=c.getSnapshotBeforeUpdate(g,m)),Si(e,Qt(D=f!=null&&f.type===G&&f.key==null?f.props.children:f)?D:[D],t,r,n,o,i,a,s,l,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),w&&(c.__E=c.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Ns(r.__e,t,r,n,o,i,a,l,u);(f=S.diffed)&&f(t)}catch(oe){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),S.__e(oe,t,r)}}function Ii(e,t,r){for(var n=0;n<r.length;n++)qr(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function Ns(e,t,r,n,o,i,a,s,l){var u,f,c,v=r.props,g=t.props,m=t.type,h=0;if(m==="svg"&&(o=!0),i!=null){for(;h<i.length;h++)if((u=i[h])&&"setAttribute"in u==!!m&&(m?u.localName===m:u.nodeType===3)){e=u,i[h]=null;break}}if(e==null){if(m===null)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,g.is&&g),i=null,s=!1}if(m===null)v===g||s&&e.data===g||(e.data=g);else{if(i=i&&pe.call(e.childNodes),f=(v=r.props||ct).dangerouslySetInnerHTML,c=g.dangerouslySetInnerHTML,!s){if(i!=null)for(v={},h=0;h<e.attributes.length;h++)v[e.attributes[h].name]=e.attributes[h].value;(c||f)&&(c&&(f&&c.__html==f.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(Ts(e,g,v,o,s),c)t.__k=[];else if(Si(e,Qt(h=t.props.children)?h:[h],t,r,n,o&&m!=="foreignObject",i,a,i?i[0]:r.__k&&Jt(r,0),s,l),i!=null)for(h=i.length;h--;)i[h]!=null&&xi(i[h]);s||("value"in g&&(h=g.value)!==void 0&&(h!==e.value||m==="progress"&&!h||m==="option"&&h!==v.value)&&tr(e,"value",h,v.value,!1),"checked"in g&&(h=g.checked)!==void 0&&h!==e.checked&&tr(e,"checked",h,v.checked,!1))}return e}function qr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function Ti(e,t,r){var n,o;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||qr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){S.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Ti(n[o],t,r||typeof e.type!="function");r||e.__e==null||xi(e.__e),e.__=e.__e=e.__d=void 0}function Ds(e,t,r){return this.constructor(e,r)}function ut(e,t,r){var n,o,i,a;S.__&&S.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],a=[],Hr(t,e=(!n&&r||t).__k=N(G,null,[e]),o||ct,ct,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?pe.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),Ii(i,e,a)}function Ni(e,t){ut(e,t,Ni)}function Ms(e,t,r){var n,o,i,a,s=Ie({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&a!==void 0?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?pe.call(arguments,2):r),It(e.type,s,n||e.key,o||e.ref,null)}function Tt(e,t){var r={__c:t="__cC"+_i++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(function(s){s.__e=!0,Ur(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}pe=wi.slice,S={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},mi=0,bi=function(e){return e!=null&&e.constructor===void 0},be.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ie({},this.state),typeof e=="function"&&(e=e(Ie({},r),this.props)),e&&Ie(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ur(this))},be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ur(this))},be.prototype.render=G,Qe=[],yi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zr=function(e,t){return e.__v.__b-t.__v.__b},er.__r=0,_i=0;var Kr=class extends Error{constructor(t){super(t[0].message);Os(this,"issues");this.name="ValiError",this.issues=t}};function Di(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Nt(e){return{issues:e}}function we(e){return{output:e}}function Fs(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 Ls(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 Re(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return we(e);let o,i,a=e;for(const s of t){const l=s._parse(a);if(l.issues){o=o||Ls(r,n);for(const u of l.issues){const f=Fs(o,u);i?i.push(f):i=[f]}if(o.abortEarly||o.abortPipeEarly)break}else a=l.output}return i?Nt(i):we(a)}function Ve(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function Mi(e){return typeof e=="function"?e():e}function je(e,t,r,n){return Nt([{validation:e,message:Mi(t),input:r,requirement:n}])}function Rs(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,a]=Ve(t,r);return[e,i,a]}const[n,o]=Ve(e,t);return[void 0,n,o]}function Je(e,t,r,n,o,i){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:Mi(n),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Fi(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Re(t,this.pipe,r,"any")}}}function Li(e,t,r){const[n="Invalid type",o]=Ve(t,r);return{type:"array",async:!1,item:e,message:n,pipe:o,_parse(i,a){if(!Array.isArray(i))return Je(a,"type","array",this.message,i);let s;const l=[];for(let u=0;u<i.length;u++){const f=i[u],c=this.item._parse(f,a);if(c.issues){const v={type:"array",input:i,key:u,value:f};for(const g of c.issues)g.path?g.path.unshift(v):g.path=[v],s==null||s.push(g);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Nt(s):Re(l,this.pipe,a,"array")}}}function Vs(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="boolean"?Je(i,"type","boolean",this.message,o):Re(o,this.pipe,i,"boolean")}}}function Wr(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="number"||isNaN(o)?Je(i,"type","number",this.message,o):Re(o,this.pipe,i,"number")}}}function Ne(e,t,r,n){const[o,i="Invalid type",a]=Rs(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:a,_parse(l,u){if(!l||typeof l!="object")return Je(u,"type","object",this.message,l);s=s||Object.entries(this.entries);let f;const c={};for(const[v,g]of s){const m=l[v],h=g._parse(m,u);if(h.issues){const w={type:"object",input:l,key:v,value:m};for(const k of h.issues)k.path?k.path.unshift(w):k.path=[w],f==null||f.push(k);if(f||(f=h.issues),u!=null&&u.abortEarly)break}else(h.output!==void 0||v in l)&&(c[v]=h.output)}if(this.rest&&!(u!=null&&u.abortEarly&&f)){for(const v in l)if(!(v in this.entries)){const g=l[v],m=this.rest._parse(g,u);if(m.issues){const h={type:"object",input:l,key:v,value:g};for(const w of m.issues)w.path?w.path.unshift(h):w.path=[h],f==null||f.push(w);if(f||(f=m.issues),u!=null&&u.abortEarly)break}else c[v]=m.output}}return f?Nt(f):Re(c,this.pipe,u,"object")}}}function js(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?we(r):Je(n,"type","picklist",this.message,r)}}}function ge(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="string"?Je(i,"type","string",this.message,o):Re(o,this.pipe,i,"string")}}}function Bs(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=Ve(r,n);return[e,t,a,s]}const[o,i]=Ve(t,r);return[ge(),e,o,i]}var zs=["__proto__","prototype","constructor"];function Ri(e,t,r,n){const[o,i,a="Invalid type",s]=Bs(e,t,r,n);return{type:"record",async:!1,key:o,value:i,message:a,pipe:s,_parse(l,u){if(!l||typeof l!="object")return Je(u,"type","record",this.message,l);let f;const c={};for(const[v,g]of Object.entries(l))if(!zs.includes(v)){let m;const h=this.key._parse(v,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(h.issues){m={type:"record",input:l,key:v,value:g};for(const k of h.issues)k.path=[m],f==null||f.push(k);if(f||(f=h.issues),u!=null&&u.abortEarly)break}const w=this.value._parse(g,u);if(w.issues){m=m||{type:"record",input:l,key:v,value:g};for(const k of w.issues)k.path?k.path.unshift(m):k.path=[m],f==null||f.push(k);if(f||(f=w.issues),u!=null&&u.abortEarly)break}!h.issues&&!w.issues&&(c[h.output]=w.output)}return f?Nt(f):Re(c,this.pipe,u,"record")}}}function Dt(e,t,r){const n=e._parse(t,r);if(n.issues)throw new Kr(n.issues);return n.output}async function Us(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new Kr(n.issues);return n.output}function Vi(e,t,r){return{...e,_parse(n,o){const i=e._parse(n,o);if(i.issues)return i;const a=t(i.output);return r&&!Array.isArray(r)?r._parse(a,o):Re(a,r,o,typeof a)}}}var Hs=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function qs(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?we(r):je(this.type,this.message,r,this.requirement)}}}function Ks(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Hs,_parse(t){return this.requirement.test(t)?we(t):je(this.type,this.message,t,this.requirement)}}}function Mt(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?je(this.type,this.message,r,this.requirement):we(r)}}}function Ws(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?je(this.type,this.message,r,this.requirement):we(r)}}}function ji(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?je(this.type,this.message,r,this.requirement):we(r)}}}function Gs(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?je(this.type,this.message,r,this.requirement):we(r)}}}function Ys(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?we(r):je(this.type,this.message,r,this.requirement)}}}function Zs(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)?we(t):je(this.type,this.message,t,this.requirement)}}}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ue.apply(this,arguments)}var De,B,Gr,Bi,dt=0,zi=[],rr=[],Ui=S.__b,Hi=S.__r,qi=S.diffed,Ki=S.__c,Wi=S.unmount;function et(e,t){S.__h&&S.__h(B,e,dt||t),dt=0;var r=B.__H||(B.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:rr}),r.__[e]}function W(e){return dt=1,nr(Qi,e)}function nr(e,t,r){var n=et(De++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Qi(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,s);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=B,!B.u)){var o=function(s,l,u){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(v){return v.__c});if(f.every(function(v){return!v.__N}))return!i||i.call(this,s,l,u);var c=!1;return f.forEach(function(v){if(v.__N){var g=v.__[0];v.__=v.__N,v.__N=void 0,g!==v.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!i||i.call(this,s,l,u))};B.u=!0;var i=B.shouldComponentUpdate,a=B.componentWillUpdate;B.componentWillUpdate=function(s,l,u){if(this.__e){var f=i;i=void 0,o(s,l,u),i=f}a&&a.call(this,s,l,u)},B.shouldComponentUpdate=o}return n.__N||n.__}function V(e,t){var r=et(De++,3);!S.__s&&Zr(r.__H,t)&&(r.__=e,r.i=t,B.__H.__h.push(r))}function he(e,t){var r=et(De++,4);!S.__s&&Zr(r.__H,t)&&(r.__=e,r.i=t,B.__h.push(r))}function L(e){return dt=5,se(function(){return{current:e}},[])}function Gi(e,t,r){dt=6,he(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function se(e,t){var r=et(De++,7);return Zr(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ve(e,t){return dt=8,se(function(){return e},t)}function ir(e){var t=B.context[e.__c],r=et(De++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(B)),t.props.value):e.__}function Yi(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function Xs(e){var t=et(De++,10),r=W();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Zi(){var e=et(De++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Qs(){for(var e;e=zi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(or),e.__H.__h.forEach(Yr),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){B=null,Ui&&Ui(e)},S.__r=function(e){Hi&&Hi(e),De=0;var t=(B=e.__c).__H;t&&(Gr===B?(t.__h=[],B.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=rr,r.__N=r.i=void 0})):(t.__h.forEach(or),t.__h.forEach(Yr),t.__h=[],De=0)),Gr=B},S.diffed=function(e){qi&&qi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(zi.push(t)!==1&&Bi===S.requestAnimationFrame||((Bi=S.requestAnimationFrame)||Js)(Qs)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==rr&&(r.__=r.__V),r.i=void 0,r.__V=rr})),Gr=B=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(or),r.__h=r.__h.filter(function(n){return!n.__||Yr(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),Ki&&Ki(e,t)},S.unmount=function(e){Wi&&Wi(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{or(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var Xi=typeof requestAnimationFrame=="function";function Js(e){var t,r=function(){clearTimeout(n),Xi&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Xi&&(t=requestAnimationFrame(r))}function or(e){var t=B,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),B=t}function Yr(e){var t=B;e.__c=e.__(),B=t}function Zr(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Qi(e,t){return typeof t=="function"?t(e):t}function Ji(e,t){for(var r in t)e[r]=t[r];return e}function Xr(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Qr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ar(e){this.props=e}function eo(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Xr(this.props,o)}function n(o){return this.shouldComponentUpdate=r,N(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ar.prototype=new be).isPureReactComponent=!0,ar.prototype.shouldComponentUpdate=function(e,t){return Xr(this.props,e)||Xr(this.state,t)};var to=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),to&&to(e)};var el=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function le(e){function t(r){var n=Ji({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=el,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ro=function(e,t){return e==null?null:Te(Te(e).map(t))},Me={map:ro,forEach:ro,count:function(e){return e?Te(e).length:0},only:function(e){var t=Te(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Te},tl=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}tl(e,t,r,n)};var no=S.unmount;function io(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Ji({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return io(n,t,r)})),e}function oo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return oo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function ft(){this.__u=0,this.t=null,this.__b=null}function ao(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Jr(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return N(r,i)}return o.displayName="Lazy",o.__f=!0,o}function pt(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),no&&no(e)},(ft.prototype=new be).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=ao(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=oo(u,u.__c.__P,u.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},ft.prototype.componentWillUnmount=function(){this.t=[]},ft.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=io(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&N(G,null,e.fallback);return o&&(o.__h=null),[N(G,null,t.__a?null:e.children),o]};var so=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function rl(e){return this.getChildContext=function(){return e.context},e.children}function nl(e){var t=this,r=e.i;t.componentWillUnmount=function(){ut(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),ut(N(rl,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function lo(e,t){var r=N(nl,{__v:e,i:t});return r.containerInfo=t,r}(pt.prototype=new be).__a=function(e){var t=this,r=ao(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),so(t,e,n)):o()};r?r(i):i()}},pt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Te(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},pt.prototype.componentDidUpdate=pt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){so(e,r,t)})};var co=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,il=/^(?: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]/,ol=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,al=/[A-Z0-9]/g,sl=typeof document<"u",ll=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function uo(e,t,r){return t.__k==null&&(t.textContent=""),ut(e,t),typeof r=="function"&&r(),e?e.__c:null}function fo(e,t,r){return Ni(e,t),typeof r=="function"&&r(),e?e.__c:null}be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var po=S.event;function cl(){}function ul(){return this.cancelBubble}function dl(){return this.defaultPrevented}S.event=function(e){return po&&(e=po(e)),e.persist=cl,e.isPropagationStopped=ul,e.isDefaultPrevented=dl,e.nativeEvent=e};var en,fl={enumerable:!1,configurable:!0,get:function(){return this.class}},ho=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var a=r[i];if(!(i==="value"&&"defaultValue"in r&&a==null||sl&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&a===!0?a="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||ll(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":ol.test(i)?i=s:n.indexOf("-")===-1&&il.test(i)?i=i.replace(al,"-$&").toLowerCase():a===null&&(a=void 0):s=i="oninput",s==="oninput"&&o[i=s]&&(i="oninputCapture"),o[i]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Te(r.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Te(r.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",fl)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=co,ho&&ho(e)};var vo=S.__r;S.__r=function(e){vo&&vo(e),en=e.__c};var mo=S.diffed;S.diffed=function(e){mo&&mo(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),en=null};var bo={ReactCurrentDispatcher:{current:{readContext:function(e){return en.__n[e.__c].props.value}}}},pl="17.0.2";function go(e){return N.bind(null,e)}function tt(e){return!!e&&e.$$typeof===co}function ht(e){return tt(e)?Ms.apply(null,arguments):e}function yo(e){return!!e.__k&&(ut(null,e),!0)}function _o(e){return e&&(e.base||e.nodeType===1&&e)||null}var wo=function(e,t){return e(t)},sr=function(e,t){return e(t)},xo=G;function tn(e){e()}function ko(e){return e}function $o(){return[!1,tn]}var So=he;function Co(e,t){var r=t(),n=W({h:{__:r,v:t}}),o=n[0].h,i=n[1];return he(function(){o.__=r,o.v=t,Qr(o.__,t())||i({h:o})},[e,r,t]),V(function(){return Qr(o.__,o.v())||i({h:o}),e(function(){Qr(o.__,o.v())||i({h:o})})},[e]),r}var xe={useState:W,useId:Zi,useReducer:nr,useEffect:V,useLayoutEffect:he,useInsertionEffect:So,useTransition:$o,useDeferredValue:ko,useSyncExternalStore:Co,startTransition:tn,useRef:L,useImperativeHandle:Gi,useMemo:se,useCallback:ve,useContext:ir,useDebugValue:Yi,version:"17.0.2",Children:Me,render:uo,hydrate:fo,unmountComponentAtNode:yo,createPortal:lo,createElement:N,createContext:Tt,createFactory:go,cloneElement:ht,createRef:ki,Fragment:G,isValidElement:tt,findDOMNode:_o,Component:be,PureComponent:ar,memo:eo,forwardRef:le,flushSync:sr,unstable_batchedUpdates:wo,StrictMode:xo,Suspense:ft,SuspenseList:pt,lazy:Jr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bo};const hl=Object.freeze(Object.defineProperty({__proto__:null,Children:Me,Component:be,Fragment:G,PureComponent:ar,StrictMode:xo,Suspense:ft,SuspenseList:pt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bo,cloneElement:ht,createContext:Tt,createElement:N,createFactory:go,createPortal:lo,createRef:ki,default:xe,findDOMNode:_o,flushSync:sr,forwardRef:le,hydrate:fo,isValidElement:tt,lazy:Jr,memo:eo,render:uo,startTransition:tn,unmountComponentAtNode:yo,unstable_batchedUpdates:wo,useCallback:ve,useContext:ir,useDebugValue:Yi,useDeferredValue:ko,useEffect:V,useErrorBoundary:Xs,useId:Zi,useImperativeHandle:Gi,useInsertionEffect:So,useLayoutEffect:he,useMemo:se,useReducer:nr,useRef:L,useState:W,useSyncExternalStore:Co,useTransition:$o,version:pl},Symbol.toStringTag,{value:"Module"}));function vt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function vl(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Eo(...e){return t=>e.forEach(r=>vl(r,t))}function Ft(...e){return ve(Eo(...e),e)}function ml(e,t=[]){let r=[];function n(i,a){const s=Tt(a),l=r.length;r=[...r,a];function u(c){const{scope:v,children:g,...m}=c,h=(v==null?void 0:v[e][l])||s,w=se(()=>m,Object.values(m));return N(h.Provider,{value:w},g)}function f(c,v){const g=(v==null?void 0:v[e][l])||s,m=ir(g);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>Tt(a));return function(s){const l=(s==null?void 0:s[e])||i;return se(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,bl(o,...t)]}function bl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...s,...c}},{});return se(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const rn=globalThis!=null&&globalThis.document?he:()=>{},gl=hl["useId".toString()]||(()=>{});let yl=0;function nn(e){const[t,r]=W(gl());return rn(()=>{e||r(n=>n??String(yl++))},[e]),e||(t?`radix-${t}`:"")}function rt(e){const t=L(e);return V(()=>{t.current=e}),se(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function _l({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=wl({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=rt(r),l=ve(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&s(c)}else o(u)},[i,e,o,s]);return[a,l]}function wl({defaultProp:e,onChange:t}){const r=W(e),[n]=r,o=L(n),i=rt(t);return V(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const on=le((e,t)=>{const{children:r,...n}=e,o=Me.toArray(r),i=o.find(kl);if(i){const a=i.props.children,s=o.map(l=>l===i?Me.count(a)>1?Me.only(null):tt(a)?a.props.children:null:l);return N(an,ue({},n,{ref:t}),tt(a)?ht(a,void 0,s):null)}return N(an,ue({},n,{ref:t}),r)});on.displayName="Slot";const an=le((e,t)=>{const{children:r,...n}=e;return tt(r)?ht(r,{...$l(n,r.props),ref:t?Eo(t,r.ref):r.ref}):Me.count(r)>1?Me.only(null):null});an.displayName="SlotClone";const xl=({children:e})=>N(G,null,e);function kl(e){return tt(e)&&e.type===xl}function $l(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const sn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=le((n,o)=>{const{asChild:i,...a}=n,s=i?on:t;return V(()=>{window[Symbol.for("radix-ui")]=!0},[]),N(s,ue({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Sl(e,t){e&&sr(()=>e.dispatchEvent(t))}function Cl(e,t=globalThis==null?void 0:globalThis.document){const r=rt(e);V(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const ln="dismissableLayer.update",El="dismissableLayer.pointerDownOutside",Pl="dismissableLayer.focusOutside";let Po;const Ol=Tt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Al=le((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=ir(Ol),[c,v]=W(null),g=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=W({}),h=Ft(t,D=>v(D)),w=Array.from(f.layers),[k]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),_=w.indexOf(k),O=c?w.indexOf(c):-1,I=f.layersWithOutsidePointerEventsDisabled.size>0,P=O>=_,U=Il(D=>{const M=D.target,oe=[...f.branches].some(te=>te.contains(M));!P||oe||(i==null||i(D),s==null||s(D),D.defaultPrevented||l==null||l())},g),q=Tl(D=>{const M=D.target;[...f.branches].some(te=>te.contains(M))||(a==null||a(D),s==null||s(D),D.defaultPrevented||l==null||l())},g);return Cl(D=>{O===f.layers.size-1&&(o==null||o(D),!D.defaultPrevented&&l&&(D.preventDefault(),l()))},g),V(()=>{if(c)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Po=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(c)),f.layers.add(c),Oo(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Po)}},[c,g,n,f]),V(()=>()=>{c&&(f.layers.delete(c),f.layersWithOutsidePointerEventsDisabled.delete(c),Oo())},[c,f]),V(()=>{const D=()=>m({});return document.addEventListener(ln,D),()=>document.removeEventListener(ln,D)},[]),N(sn.div,ue({},u,{ref:h,style:{pointerEvents:I?P?"auto":"none":void 0,...e.style},onFocusCapture:vt(e.onFocusCapture,q.onFocusCapture),onBlurCapture:vt(e.onBlurCapture,q.onBlurCapture),onPointerDownCapture:vt(e.onPointerDownCapture,U.onPointerDownCapture)}))});function Il(e,t=globalThis==null?void 0:globalThis.document){const r=rt(e),n=L(!1),o=L(()=>{});return V(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Ao(El,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Tl(e,t=globalThis==null?void 0:globalThis.document){const r=rt(e),n=L(!1);return V(()=>{const o=i=>{i.target&&!n.current&&Ao(Pl,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Oo(){const e=new CustomEvent(ln);document.dispatchEvent(e)}function Ao(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Sl(o,i):o.dispatchEvent(i)}const cn="focusScope.autoFocusOnMount",un="focusScope.autoFocusOnUnmount",Io={bubbles:!1,cancelable:!0},Nl=le((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=W(null),u=rt(o),f=rt(i),c=L(null),v=Ft(t,h=>l(h)),g=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V(()=>{if(n){let h=function(O){if(g.paused||!s)return;const I=O.target;s.contains(I)?c.current=I:Be(c.current,{select:!0})},w=function(O){if(g.paused||!s)return;const I=O.relatedTarget;I!==null&&(s.contains(I)||Be(c.current,{select:!0}))},k=function(O){if(document.activeElement===document.body)for(const P of O)P.removedNodes.length>0&&Be(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",w);const _=new MutationObserver(k);return s&&_.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",w),_.disconnect()}}},[n,s,g.paused]),V(()=>{if(s){Do.add(g);const h=document.activeElement;if(!s.contains(h)){const k=new CustomEvent(cn,Io);s.addEventListener(cn,u),s.dispatchEvent(k),k.defaultPrevented||(Dl(Vl(To(s)),{select:!0}),document.activeElement===h&&Be(s))}return()=>{s.removeEventListener(cn,u),setTimeout(()=>{const k=new CustomEvent(un,Io);s.addEventListener(un,f),s.dispatchEvent(k),k.defaultPrevented||Be(h??document.body,{select:!0}),s.removeEventListener(un,f),Do.remove(g)},0)}}},[s,u,f,g]);const m=ve(h=>{if(!r&&!n||g.paused)return;const w=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,k=document.activeElement;if(w&&k){const _=h.currentTarget,[O,I]=Ml(_);O&&I?!h.shiftKey&&k===I?(h.preventDefault(),r&&Be(O,{select:!0})):h.shiftKey&&k===O&&(h.preventDefault(),r&&Be(I,{select:!0})):k===_&&h.preventDefault()}},[r,n,g.paused]);return N(sn.div,ue({tabIndex:-1},a,{ref:v,onKeyDown:m}))});function Dl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Be(n,{select:t}),document.activeElement!==r)return}function Ml(e){const t=To(e),r=No(t,e),n=No(t.reverse(),e);return[r,n]}function To(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function No(e,t){for(const r of e)if(!Fl(r,{upTo:t}))return r}function Fl(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 Ll(e){return e instanceof HTMLInputElement&&"select"in e}function Be(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Ll(e)&&t&&e.select()}}const Do=Rl();function Rl(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Mo(e,t),e.unshift(t)},remove(t){var r;e=Mo(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Mo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Vl(e){return e.filter(t=>t.tagName!=="A")}function jl(e,t){return nr((r,n)=>{const o=t[r][n];return o??r},e)}const dn=e=>{const{present:t,children:r}=e,n=Bl(t),o=typeof r=="function"?r({present:n.isPresent}):Me.only(r),i=Ft(n.ref,o.ref);return typeof r=="function"||n.isPresent?ht(o,{ref:i}):null};dn.displayName="Presence";function Bl(e){const[t,r]=W(),n=L({}),o=L(e),i=L("none"),a=e?"mounted":"unmounted",[s,l]=jl(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(()=>{const u=lr(n.current);i.current=s==="mounted"?u:"none"},[s]),rn(()=>{const u=n.current,f=o.current;if(f!==e){const v=i.current,g=lr(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&v!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),rn(()=>{if(t){const u=c=>{const g=lr(n.current).includes(c.animationName);c.target===t&&g&&sr(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(i.current=lr(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:ve(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function lr(e){return(e==null?void 0:e.animationName)||"none"}let fn=0;function zl(){V(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Fo()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Fo()),fn++,()=>{fn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),fn--}},[])}function Fo(){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 Se=function(){return Se=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Se.apply(this,arguments)};function Lo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ul(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var cr="right-scroll-bar-position",ur="width-before-scroll-bar",Hl="with-scroll-bars-hidden",ql="--removed-body-scroll-bar-size";function Kl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Wl(e,t){var r=W(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Gl(e,t){return Wl(t||null,function(r){return e.forEach(function(n){return Kl(n,r)})})}function Yl(e){return e}function Zl(e,t){t===void 0&&(t=Yl);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function Xl(e){e===void 0&&(e={});var t=Zl(null);return t.options=Se({async:!0,ssr:!1},e),t}var Ro=function(e){var t=e.sideCar,r=Lo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return N(n,Se({},r))};Ro.isSideCarExport=!0;function Ql(e,t){return e.useMedium(t),Ro}var Vo=Xl(),pn=function(){},dr=le(function(e,t){var r=L(null),n=W({onScrollCapture:pn,onWheelCapture:pn,onTouchMoveCapture:pn}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,v=e.sideCar,g=e.noIsolation,m=e.inert,h=e.allowPinchZoom,w=e.as,k=w===void 0?"div":w,_=Lo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=v,I=Gl([r,t]),P=Se(Se({},_),o);return N(G,null,f&&N(O,{sideCar:Vo,removeScrollBar:u,shards:c,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!h,lockRef:r}),a?ht(Me.only(s),Se(Se({},P),{ref:I})):N(k,Se({},P,{className:l,ref:I}),s))});dr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dr.classNames={fullWidth:ur,zeroRight:cr};var jo,Jl=function(){if(jo)return jo;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ec(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Jl();return t&&e.setAttribute("nonce",t),e}function tc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nc=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ec())&&(tc(t,r),rc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ic=function(){var e=nc();return function(t,r){V(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Bo=function(){var e=ic(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},oc={left:0,top:0,right:0,gap:0},hn=function(e){return parseInt(e||"",10)||0},ac=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[hn(r),hn(n),hn(o)]},sc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return oc;var t=ac(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},lc=Bo(),cc=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
2
2
  .`.concat(Hl,` {
3
3
  overflow: hidden `).concat(n,`;
4
4
  padding-right: `).concat(s,"px ").concat(n,`;
@@ -38,8 +38,8 @@ var nm=Object.defineProperty;var im=(Xe,pe,S)=>pe in Xe?nm(Xe,pe,{enumerable:!0,
38
38
  `)},uc=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=se(function(){return sc(o)},[o]);return N(lc,{styles:cc(i,!t,o,r?"":"!important")})},vn=!1;if(typeof window<"u")try{var fr=Object.defineProperty({},"passive",{get:function(){return vn=!0,!0}});window.addEventListener("test",fr,fr),window.removeEventListener("test",fr,fr)}catch{vn=!1}var mt=vn?{passive:!1}:!1,dc=function(e){return e.tagName==="TEXTAREA"},zo=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!dc(e)&&r[t]==="visible")},fc=function(e){return zo(e,"overflowY")},pc=function(e){return zo(e,"overflowX")},Uo=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=Ho(e,r);if(n){var o=qo(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},hc=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},vc=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Ho=function(e,t){return e==="v"?fc(t):pc(t)},qo=function(e,t){return e==="v"?hc(t):vc(t)},mc=function(e,t){return e==="h"&&t==="rtl"?-1:1},bc=function(e,t,r,n,o){var i=mc(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),u=!1,f=a>0,c=0,v=0;do{var g=qo(e,s),m=g[0],h=g[1],w=g[2],k=h-w-i*m;(m||k)&&Ho(e,s)&&(c+=k,v+=m),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(o&&c===0||!o&&a>c)||!f&&(o&&v===0||!o&&-a>v))&&(u=!0),u},pr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ko=function(e){return[e.deltaX,e.deltaY]},Wo=function(e){return e&&"current"in e?e.current:e},gc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yc=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},_c=0,bt=[];function wc(e){var t=L([]),r=L([0,0]),n=L(),o=W(_c++)[0],i=W(function(){return Bo()})[0],a=L(e);V(function(){a.current=e},[e]),V(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Ul([e.lockRef.current],(e.shards||[]).map(Wo),!0).filter(Boolean);return h.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ve(function(h,w){if("touches"in h&&h.touches.length===2)return!a.current.allowPinchZoom;var k=pr(h),_=r.current,O="deltaX"in h?h.deltaX:_[0]-k[0],I="deltaY"in h?h.deltaY:_[1]-k[1],P,U=h.target,q=Math.abs(O)>Math.abs(I)?"h":"v";if("touches"in h&&q==="h"&&U.type==="range")return!1;var D=Uo(q,U);if(!D)return!0;if(D?P=q:(P=q==="v"?"h":"v",D=Uo(q,U)),!D)return!1;if(!n.current&&"changedTouches"in h&&(O||I)&&(n.current=P),!P)return!0;var M=n.current||P;return bc(M,w,h,M==="h"?O:I,!0)},[]),l=ve(function(h){var w=h;if(!(!bt.length||bt[bt.length-1]!==i)){var k="deltaY"in w?Ko(w):pr(w),_=t.current.filter(function(P){return P.name===w.type&&P.target===w.target&&gc(P.delta,k)})[0];if(_&&_.should){w.cancelable&&w.preventDefault();return}if(!_){var O=(a.current.shards||[]).map(Wo).filter(Boolean).filter(function(P){return P.contains(w.target)}),I=O.length>0?s(w,O[0]):!a.current.noIsolation;I&&w.cancelable&&w.preventDefault()}}},[]),u=ve(function(h,w,k,_){var O={name:h,delta:w,target:k,should:_};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(I){return I!==O})},1)},[]),f=ve(function(h){r.current=pr(h),n.current=void 0},[]),c=ve(function(h){u(h.type,Ko(h),h.target,s(h,e.lockRef.current))},[]),v=ve(function(h){u(h.type,pr(h),h.target,s(h,e.lockRef.current))},[]);V(function(){return bt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:v}),document.addEventListener("wheel",l,mt),document.addEventListener("touchmove",l,mt),document.addEventListener("touchstart",f,mt),function(){bt=bt.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,mt),document.removeEventListener("touchmove",l,mt),document.removeEventListener("touchstart",f,mt)}},[]);var g=e.removeScrollBar,m=e.inert;return N(G,null,m?N(i,{styles:yc(o)}):null,g?N(uc,{gapMode:"margin"}):null)}const xc=Ql(Vo,wc);var Go=le(function(e,t){return N(dr,Se({},e,{ref:t,sideCar:xc}))});Go.classNames=dr.classNames;const kc=Go;var $c=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gt=new WeakMap,hr=new WeakMap,vr={},mn=0,Yo=function(e){return e&&(e.host||Yo(e.parentNode))},Sc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Yo(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Cc=function(e,t,r,n){var o=Sc(t,Array.isArray(e)?e:[e]);vr[r]||(vr[r]=new WeakMap);var i=vr[r],a=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};o.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(v){if(s.has(v))f(v);else{var g=v.getAttribute(n),m=g!==null&&g!=="false",h=(gt.get(v)||0)+1,w=(i.get(v)||0)+1;gt.set(v,h),i.set(v,w),a.push(v),h===1&&m&&hr.set(v,!0),w===1&&v.setAttribute(r,"true"),m||v.setAttribute(n,"true")}})};return f(t),s.clear(),mn++,function(){a.forEach(function(c){var v=gt.get(c)-1,g=i.get(c)-1;gt.set(c,v),i.set(c,g),v||(hr.has(c)||c.removeAttribute(n),hr.delete(c)),g||c.removeAttribute(r)}),mn--,mn||(gt=new WeakMap,gt=new WeakMap,hr=new WeakMap,vr={})}},Ec=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||$c(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Cc(n,o,r,"aria-hidden")):function(){return null}};const Zo="Dialog",[Xo,am]=ml(Zo),[Pc,yt]=Xo(Zo),Oc=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=L(null),l=L(null),[u=!1,f]=_l({prop:n,defaultProp:o,onChange:i});return N(Pc,{scope:t,triggerRef:s,contentRef:l,contentId:nn(),titleId:nn(),descriptionId:nn(),open:u,onOpenChange:f,onOpenToggle:ve(()=>f(c=>!c),[f]),modal:a},r)},Ac="DialogPortal",[sm,Qo]=Xo(Ac,{forceMount:void 0}),bn="DialogOverlay",Ic=le((e,t)=>{const r=Qo(bn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=yt(bn,e.__scopeDialog);return i.modal?N(dn,{present:n||i.open},N(Tc,ue({},o,{ref:t}))):null}),Tc=le((e,t)=>{const{__scopeDialog:r,...n}=e,o=yt(bn,r);return N(kc,{as:on,allowPinchZoom:!0,shards:[o.contentRef]},N(sn.div,ue({"data-state":ea(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Lt="DialogContent",Nc=le((e,t)=>{const r=Qo(Lt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=yt(Lt,e.__scopeDialog);return N(dn,{present:n||i.open},i.modal?N(Dc,ue({},o,{ref:t})):N(Mc,ue({},o,{ref:t})))}),Dc=le((e,t)=>{const r=yt(Lt,e.__scopeDialog),n=L(null),o=Ft(t,r.contentRef,n);return V(()=>{const i=n.current;if(i)return Ec(i)},[]),N(Jo,ue({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:vt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:vt(e.onFocusOutside,i=>i.preventDefault())}))}),Mc=le((e,t)=>{const r=yt(Lt,e.__scopeDialog),n=L(!1),o=L(!1);return N(Jo,ue({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Jo=le((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=yt(Lt,r),l=L(null),u=Ft(t,l);return zl(),N(G,null,N(Nl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},N(Al,ue({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ea(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function ea(e){return e?"open":"closed"}const Fc=Oc,Lc=Ic,Rc=Nc;function ta(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ta(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ze(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ta(e))&&(n&&(n+=" "),n+=t);return n}const ra=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,na=ze,gn=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return na(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],c=i==null?void 0:i[u];if(f===null)return null;const v=ra(f)||ra(c);return o[u][v]}),s=r&&Object.entries(r).reduce((u,f)=>{let[c,v]=f;return v===void 0||(u[c]=v),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:c,className:v,...g}=f;return Object.entries(g).every(m=>{let[h,w]=m;return Array.isArray(w)?w.includes({...i,...s}[h]):{...i,...s}[h]===w})?[...u,c,v]:u},[]);return na(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},de=Symbol.for("@ts-pattern/matcher"),ia=Symbol.for("@ts-pattern/isVariadic"),mr="@ts-pattern/anonymous-select-key",yn=e=>!!(e&&typeof e=="object"),br=e=>e&&!!e[de],re=(e,t,r)=>{if(br(e)){const n=e[de](),{matched:o,selections:i}=n.match(t);return o&&i&&Object.keys(i).forEach(a=>r(a,i[a])),o}if(yn(e)){if(!yn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],i=[];for(const a of e.keys()){const s=e[a];br(s)&&s[ia]?i.push(s):i.length?o.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+o.length)return!1;const a=t.slice(0,n.length),s=o.length===0?[]:t.slice(-o.length),l=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((u,f)=>re(u,a[f],r))&&o.every((u,f)=>re(u,s[f],r))&&(i.length===0||re(i[0],l,r))}return e.length===t.length&&e.every((a,s)=>re(a,t[s],r))}return Object.keys(e).every(n=>{const o=e[n];return(n in t||br(i=o)&&i[de]().matcherType==="optional")&&re(o,t[n],r);var i})}return Object.is(t,e)},me=e=>{var t,r,n;return yn(e)?br(e)?(t=(r=(n=e[de]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Rt(e,me):Rt(Object.values(e),me):[]},Rt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Vc(...e){if(e.length===1){const[t]=e;return r=>re(t,r,()=>{})}if(e.length===2){const[t,r]=e;return re(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ae(e){return Object.assign(e,{optional:()=>wn(e),and:t=>K(e,t),or:t=>oa(e,t),select:t=>t===void 0?Vt(e):Vt(t,e)})}function _n(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[ia]:!0})}}))(e),{optional:()=>_n(wn(e)),select:t=>_n(t===void 0?Vt(e):Vt(t,e))})}function wn(e){return ae({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return t===void 0?(me(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:re(e,t,n),selections:r}},getSelectionKeys:()=>me(e),matcherType:"optional"})})}const jc=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Bc=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function K(...e){return ae({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:e.every(o=>re(o,t,n)),selections:r}},getSelectionKeys:()=>Rt(e,me),matcherType:"and"})})}function oa(...e){return ae({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return Rt(e,me).forEach(o=>n(o,void 0)),{matched:e.some(o=>re(o,t,n)),selections:r}},getSelectionKeys:()=>Rt(e,me),matcherType:"or"})})}function R(e){return{[de]:()=>({match:t=>({matched:!!e(t)})})}}function Vt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ae({[de]:()=>({match:n=>{let o={[t??mr]:n};return{matched:r===void 0||re(r,n,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[t??mr].concat(r===void 0?[]:me(r))})})}function Ce(e){return typeof e=="number"}function nt(e){return typeof e=="string"}function Ue(e){return typeof e=="bigint"}const aa=ae(R(function(e){return!0})),zc=aa,it=e=>Object.assign(ae(e),{startsWith:t=>{return it(K(e,(r=t,R(n=>nt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return it(K(e,(r=t,R(n=>nt(n)&&n.endsWith(r)))));var r},minLength:t=>it(K(e,(r=>R(n=>nt(n)&&n.length>=r))(t))),maxLength:t=>it(K(e,(r=>R(n=>nt(n)&&n.length<=r))(t))),includes:t=>{return it(K(e,(r=t,R(n=>nt(n)&&n.includes(r)))));var r},regex:t=>{return it(K(e,(r=t,R(n=>nt(n)&&!!n.match(r)))));var r}}),Uc=it(R(nt)),Ee=e=>Object.assign(ae(e),{between:(t,r)=>Ee(K(e,((n,o)=>R(i=>Ce(i)&&n<=i&&o>=i))(t,r))),lt:t=>Ee(K(e,(r=>R(n=>Ce(n)&&n<r))(t))),gt:t=>Ee(K(e,(r=>R(n=>Ce(n)&&n>r))(t))),lte:t=>Ee(K(e,(r=>R(n=>Ce(n)&&n<=r))(t))),gte:t=>Ee(K(e,(r=>R(n=>Ce(n)&&n>=r))(t))),int:()=>Ee(K(e,R(t=>Ce(t)&&Number.isInteger(t)))),finite:()=>Ee(K(e,R(t=>Ce(t)&&Number.isFinite(t)))),positive:()=>Ee(K(e,R(t=>Ce(t)&&t>0))),negative:()=>Ee(K(e,R(t=>Ce(t)&&t<0)))}),Hc=Ee(R(Ce)),He=e=>Object.assign(ae(e),{between:(t,r)=>He(K(e,((n,o)=>R(i=>Ue(i)&&n<=i&&o>=i))(t,r))),lt:t=>He(K(e,(r=>R(n=>Ue(n)&&n<r))(t))),gt:t=>He(K(e,(r=>R(n=>Ue(n)&&n>r))(t))),lte:t=>He(K(e,(r=>R(n=>Ue(n)&&n<=r))(t))),gte:t=>He(K(e,(r=>R(n=>Ue(n)&&n>=r))(t))),positive:()=>He(K(e,R(t=>Ue(t)&&t>0))),negative:()=>He(K(e,R(t=>Ue(t)&&t<0)))}),qc=He(R(Ue)),Kc=ae(R(function(e){return typeof e=="boolean"})),Wc=ae(R(function(e){return typeof e=="symbol"})),Gc=ae(R(function(e){return e==null}));var Me={__proto__:null,matcher:de,optional:wn,array:function(...e){return _n({[de]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return me(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,a)=>{n[i]=(n[i]||[]).concat([a])};return{matched:t.every(i=>re(r,i,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:me(e[0])})})},set:function(...e){return ae({[de]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,a)=>{r[i]=(r[i]||[]).concat([a])},o=e[0];return{matched:jc(t,i=>re(o,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:me(e[0])})})},map:function(...e){return ae({[de]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,a]=e;return{matched:Bc(t,(s,l)=>{const u=re(i,l,n),f=re(a,s,n);return u&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...me(e[0]),...me(e[1])]})})},intersection:K,union:oa,not:function(e){return ae({[de]:()=>({match:t=>({matched:!re(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:R,select:Vt,any:aa,_:zc,string:Uc,number:Hc,bigint:qc,boolean:Kc,symbol:Wc,nullish:Gc,instanceOf:function(e){return ae(R(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ae(R(Vc(e)))}};const xn={matched:!1,value:void 0};function qe(e){return new gr(e,xn)}class gr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,a={};const s=(u,f)=>{i=!0,a[u]=f},l=!n.some(u=>re(u,this.input,s))||o&&!o(this.input)?xn:{matched:!0,value:r(i?mr in a?a[mr]:a:this.input,this.input)};return new gr(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new gr(this.input,n?{matched:!0,value:r(this.input,this.input)}:xn)}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 lm="";function ke(e,t){if(!e)throw new Error(t)}function yr(){throw new Error("Cycle detected")}var Yc=Symbol.for("preact-signals");function kn(){if(_t>1)_t--;else{for(var e,t=!1;jt!==void 0;){var r=jt;for(jt=void 0,$n++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&la(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if($n=0,_t--,t)throw e}}var Y=void 0,jt=void 0,_t=0,$n=0,_r=0;function sa(e){if(Y!==void 0){var t=e.n;if(t===void 0||t.t!==Y)return t={i:0,S:e,p:Y.s,n:void 0,t:Y,e:void 0,x:void 0,r:t},Y.s!==void 0&&(Y.s.n=t),Y.s=t,e.n=t,32&Y.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=Y.s,t.n=void 0,Y.s.n=t,Y.s=t),t}}function ne(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ne.prototype.brand=Yc,ne.prototype.h=function(){return!0},ne.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)},ne.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ne.prototype.subscribe=function(e){var t=this;return Cn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},ne.prototype.valueOf=function(){return this.value},ne.prototype.toString=function(){return this.value+""},ne.prototype.toJSON=function(){return this.value},ne.prototype.peek=function(){return this.v},Object.defineProperty(ne.prototype,"value",{get:function(){var e=sa(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(Y instanceof We&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){$n>100&&yr(),this.v=e,this.i++,_r++,_t++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{kn()}}}});function Ke(e){return new ne(e)}function la(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ca(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ua(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function We(e){ne.call(this,void 0),this.x=e,this.s=void 0,this.g=_r-1,this.f=4}(We.prototype=new ne).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===_r))return!0;if(this.g=_r,this.f|=1,this.i>0&&!la(this))return this.f&=-2,!0;var e=Y;try{ca(this),Y=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Y=e,ua(this),this.f&=-2,!0},We.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)}ne.prototype.S.call(this,e)},We.prototype.U=function(e){if(this.t!==void 0&&(ne.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)}},We.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},We.prototype.peek=function(){if(this.h()||yr(),16&this.f)throw this.v;return this.v},Object.defineProperty(We.prototype,"value",{get:function(){1&this.f&&yr();var e=sa(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Zc(e){return new We(e)}function da(e){var t=e.u;if(e.u=void 0,typeof t=="function"){_t++;var r=Y;Y=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Sn(e),n}finally{Y=r,kn()}}}function Sn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,da(e)}function Xc(e){if(Y!==this)throw new Error("Out-of-order effect");ua(this),Y=e,this.f&=-2,8&this.f&&Sn(this),kn()}function Bt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Bt.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()}},Bt.prototype.S=function(){1&this.f&&yr(),this.f|=1,this.f&=-9,da(this),ca(this),_t++;var e=Y;return Y=this,Xc.bind(this,e)},Bt.prototype.N=function(){2&this.f||(this.f|=2,this.o=jt,jt=this)},Bt.prototype.d=function(){this.f|=8,1&this.f||Sn(this)};function Cn(e){var t=new Bt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var En;function wt(e,t){S[e]=t.bind(null,S[e]||function(){})}function wr(e){En&&En(),En=e&&e.S()}function fa(e){var t=this,r=e.data,n=Jc(r);n.value=r;var o=se(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var a;!bi(o.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},Zc(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}fa.displayName="_st",Object.defineProperties(ne.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:fa},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),wt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof ne&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),wt("__r",function(e,t){wr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Cn(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),wr(r),e(t)}),wt("__e",function(e,t,r,n){wr(),e(t,r,n)}),wt("diffed",function(e,t){wr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var s=i[a];s!==void 0&&!(a in n)&&(s.d(),i[a]=void 0)}else r.U=i={};for(var l in n){var u=i[l],f=n[l];u===void 0?(u=Qc(r,l,f,o),i[l]=u):u.o(f,o)}}}e(t)});function Qc(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=Ke(r);return{o:function(a,s){i.value=a,n=s},d:Cn(function(){var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}wt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),wt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),be.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function Jc(e){return se(function(){return Ke(e)},[])}const Pn=(e,t)=>t.some(r=>e instanceof r);let pa,ha;function eu(){return pa||(pa=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function tu(){return ha||(ha=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const On=new WeakMap,An=new WeakMap,xr=new WeakMap;function ru(e){const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{r(ot(e.result)),o()},a=()=>{n(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",a)});return xr.set(t,e),t}function nu(e){if(On.has(e))return;const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{r(),o()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)});On.set(e,t)}let In={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return On.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ot(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function va(e){In=e(In)}function iu(e){return tu().includes(e)?function(...t){return e.apply(Tn(this),t),ot(this.request)}:function(...t){return ot(e.apply(Tn(this),t))}}function ou(e){return typeof e=="function"?iu(e):(e instanceof IDBTransaction&&nu(e),Pn(e,eu())?new Proxy(e,In):e)}function ot(e){if(e instanceof IDBRequest)return ru(e);if(An.has(e))return An.get(e);const t=ou(e);return t!==e&&(An.set(e,t),xr.set(t,e)),t}const Tn=e=>xr.get(e);function au(e,t,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),s=ot(a);return n&&a.addEventListener("upgradeneeded",l=>{n(ot(a.result),l.oldVersion,l.newVersion,ot(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const su=["get","getKey","getAll","getAllKeys","count"],lu=["put","add","delete","clear"],Nn=new Map;function ma(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Nn.get(t))return Nn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=lu.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||su.includes(r)))return;const i=async function(a,...s){const l=this.transaction(a,o?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),o&&l.done]))[0]};return Nn.set(t,i),i}va(e=>({...e,get:(t,r,n)=>ma(t,r)||e.get(t,r,n),has:(t,r)=>!!ma(t,r)||e.has(t,r)}));const cu=["continue","continuePrimaryKey","advance"],ba={},Dn=new WeakMap,ga=new WeakMap,uu={get(e,t){if(!cu.includes(t))return e[t];let r=ba[t];return r||(r=ba[t]=function(...n){Dn.set(this,ga.get(this)[t](...n))}),r}};async function*du(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,uu);for(ga.set(r,t),xr.set(r,Tn(t));t;)yield r,t=await(Dn.get(r)||t.continue()),Dn.delete(r)}function ya(e,t){return t===Symbol.asyncIterator&&Pn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Pn(e,[IDBIndex,IDBObjectStore])}va(e=>({...e,get(t,r,n){return ya(t,r)?du:e.get(t,r,n)},has(t,r){return ya(t,r)||e.has(t,r)}}));const zt=e=>qe(e).with(Me.number.lte(1e3),()=>`${Math.round(e)}KB`).with(Me.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),_a=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},fu=e=>Object.entries(e).reduce((r,[n,o])=>(r[n]=o.value,r),{}),kr=e=>t=>t?t.type===e:!1;class Ut extends Error{constructor(){super("Aborted")}}function wa(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const xa=e=>typeof e=="string",ka=typeof window>"u"?void 0:au("inploi-chatbot",2,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Ht={getStateData:async(e,t)=>{var n;const r=$a({...e,flowKeys:t});return(n=await ka)==null?void 0:n.get("state",r)},setStateData:wa(async e=>{var r;const t=$a(e);return(r=await ka)==null?void 0:r.put("state",e.data,t)},1e3)},$r=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const o=e.find(u=>u.id===t.nextId);if(o===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,a=e.find(u=>u.id===i),s=t.type.includes("question")?1:0;if(a){const u=s+Math.max($r(e,o,r,n+s).remainingSteps,$r(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const l=s+$r(e,o,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},pu=e=>{const t={},r=e.find(n=>n.isHead);return r&&$r(e,r,(n,o)=>{t[n]=o}),t},$a=e=>[...e.flowKeys,e.id,e.version].join("/"),Ge=Ke({state:"idle"}),qt=e=>{const{state:t,flow:r}=Ge.value;if(t!=="loaded")return;ke(r,"No flow to update");const n=e(r.data);r.data=n,Ge.value={state:t,flow:r},Ht.setStateData(r)},T={current$:Ge,viewState$:Ke("closed"),inputHeight$:Ke(53),startFlow:async({flow:e,context:t,flowKeys:r,title:n})=>{const i={data:await Ht.getStateData(e,r)??Sa(),startedAt:new Date,nodeIdToProgress:pu(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n};Ge.value={state:"loaded",flow:i},Ht.setStateData(i)},cancelCurrentFlow:()=>{Ge.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>qt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>qt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Ge.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Sa();Ge.value={state:e,flow:{...t,data:r,startedAt:new Date}},Ht.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return qt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ge.value;ke(t==="loaded","Application not loaded");const n=r.data.messages.filter(o=>!o.groupId||!e.includes(o.groupId));r.data.messages=n,Ht.setStateData(r)},setSubmission:(e,t)=>qt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>qt(t=>({...t,currentInput:e??null}))},hu=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Sa=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:hu()});var vu=0;function d(e,t,r,n,o,i){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var u={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--vu,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(u),u}const mu=({message:e})=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("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:[d("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"}),d("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"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:[d("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&d("p",{class:"text-neutral-9 text-sm",children:e})]})]}),bu=e=>d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:"Loading"}),d("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)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("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"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("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"})})})]}),Ca=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(bu,{class:"text-neutral-6 h-8 w-8"})}),gu=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Sr=({class:e,children:t,...r})=>d("button",{class:ze("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),...r,children:d("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})}),yu=()=>{if(T.current$.value.state!=="loaded")return null;const e=T.current$.value.flow.nodeIdToProgress,t=T.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:gu(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},_u=({children:e})=>{const t=T.viewState$;return d(G,{children:d("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:[d("div",{class:"flex h-[var(--header-height)] gap-2",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?d(G,{children:[d(Sr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:d("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),d(Sr,{"aria-label":"Close application",onClick:T.cancelCurrentFlow,children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):d(G,{children:[T.current$.value.state==="loaded"&&d(Sr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[d("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"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(Sr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),d(yu,{})]})})},wu=Jr(()=>Promise.resolve().then(()=>Yv).then(e=>e.ChatbotBody)),xu=gn("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",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),ku=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:o,error:i}=T.current$.value,a=T.viewState$.value,s=n!=="idle"&&a==="maximised",l=L(null);return d(Fc,{open:s,modal:s,children:[d(Lc,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0"}),d(Rc,{forceMount:!0,asChild:!0,children:d("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:xu({view:a}),children:d("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[d(_u,{children:o==null?void 0:o.title}),qe({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>d(Ca,{},"loading")).with({state:"loaded"},()=>d(ft,{fallback:d(Ca,{},"loading"),children:d(wu,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>d(mu,{message:i})).exhaustive()]})})})]})},Mn=Te({id:Di(ge(),String),version:Wr(),build:Wr(),nodes:Li(Fi())}),$u=Te({flow:Mn}),Su=Te({company:Te({name:ge()}),flow:Mn,job:Te({id:Di(ge(),String),title:ge()})}),Cu=Te({flow:Mn,title:ge(),flowKeys:Li(ge()),context:Ri(ge(),Fi())}),Eu=`#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%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){#isdk{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}#isdk{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;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 .pointer-events-none{pointer-events:none}#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 .bottom-2\\.5{bottom:.625rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .right-3{right:.75rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .mt-auto{margin-top: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-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#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-24{width:6rem}#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-full{--tw-translate-y: 100%;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}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%);height:var(--header-height)}to{transform:translateY(0);height:var(--content-height)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.16,1,.3,1)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#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-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#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-neutral-3{background-color:var(--i-color-n-3)}#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 .bg-none{background-image:none}#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 .px-5{padding-left:1.25rem;padding-right:1.25rem}#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-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#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-3{padding-top:.75rem}#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-right{text-align:right}#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 .font-medium{font-weight:500}#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-3{line-height:.75rem}#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 .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-none{outline:2px solid transparent;outline-offset:2px}#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 .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#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-\\[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-blur-xl{--tw-backdrop-blur: blur(24px);-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 .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#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 .will-change-\\[height\\]{will-change:height}#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 .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}#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 .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}#isdk .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px 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 .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px 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 .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#isdk .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}#isdk .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}#isdk .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}#isdk .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}#isdk .focus-visible\\:outline-2:focus-visible{outline-width:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}#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\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}#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\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-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-8:active{outline-color:var(--i-color-n-8)}#isdk .active\\:ring-2:active{--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 .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#isdk .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}#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-9{--tw-ring-color: var(--i-color-a-9)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}@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}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}
41
+ `)},_c=0,bt=[];function wc(e){var t=L([]),r=L([0,0]),n=L(),o=W(_c++)[0],i=W(function(){return Bo()})[0],a=L(e);V(function(){a.current=e},[e]),V(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Ul([e.lockRef.current],(e.shards||[]).map(Wo),!0).filter(Boolean);return h.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ve(function(h,w){if("touches"in h&&h.touches.length===2)return!a.current.allowPinchZoom;var k=pr(h),_=r.current,O="deltaX"in h?h.deltaX:_[0]-k[0],I="deltaY"in h?h.deltaY:_[1]-k[1],P,U=h.target,q=Math.abs(O)>Math.abs(I)?"h":"v";if("touches"in h&&q==="h"&&U.type==="range")return!1;var D=Uo(q,U);if(!D)return!0;if(D?P=q:(P=q==="v"?"h":"v",D=Uo(q,U)),!D)return!1;if(!n.current&&"changedTouches"in h&&(O||I)&&(n.current=P),!P)return!0;var M=n.current||P;return bc(M,w,h,M==="h"?O:I,!0)},[]),l=ve(function(h){var w=h;if(!(!bt.length||bt[bt.length-1]!==i)){var k="deltaY"in w?Ko(w):pr(w),_=t.current.filter(function(P){return P.name===w.type&&P.target===w.target&&gc(P.delta,k)})[0];if(_&&_.should){w.cancelable&&w.preventDefault();return}if(!_){var O=(a.current.shards||[]).map(Wo).filter(Boolean).filter(function(P){return P.contains(w.target)}),I=O.length>0?s(w,O[0]):!a.current.noIsolation;I&&w.cancelable&&w.preventDefault()}}},[]),u=ve(function(h,w,k,_){var O={name:h,delta:w,target:k,should:_};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(I){return I!==O})},1)},[]),f=ve(function(h){r.current=pr(h),n.current=void 0},[]),c=ve(function(h){u(h.type,Ko(h),h.target,s(h,e.lockRef.current))},[]),v=ve(function(h){u(h.type,pr(h),h.target,s(h,e.lockRef.current))},[]);V(function(){return bt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:v}),document.addEventListener("wheel",l,mt),document.addEventListener("touchmove",l,mt),document.addEventListener("touchstart",f,mt),function(){bt=bt.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,mt),document.removeEventListener("touchmove",l,mt),document.removeEventListener("touchstart",f,mt)}},[]);var g=e.removeScrollBar,m=e.inert;return N(G,null,m?N(i,{styles:yc(o)}):null,g?N(uc,{gapMode:"margin"}):null)}const xc=Ql(Vo,wc);var Go=le(function(e,t){return N(dr,Se({},e,{ref:t,sideCar:xc}))});Go.classNames=dr.classNames;const kc=Go;var $c=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gt=new WeakMap,hr=new WeakMap,vr={},mn=0,Yo=function(e){return e&&(e.host||Yo(e.parentNode))},Sc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Yo(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Cc=function(e,t,r,n){var o=Sc(t,Array.isArray(e)?e:[e]);vr[r]||(vr[r]=new WeakMap);var i=vr[r],a=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};o.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(v){if(s.has(v))f(v);else{var g=v.getAttribute(n),m=g!==null&&g!=="false",h=(gt.get(v)||0)+1,w=(i.get(v)||0)+1;gt.set(v,h),i.set(v,w),a.push(v),h===1&&m&&hr.set(v,!0),w===1&&v.setAttribute(r,"true"),m||v.setAttribute(n,"true")}})};return f(t),s.clear(),mn++,function(){a.forEach(function(c){var v=gt.get(c)-1,g=i.get(c)-1;gt.set(c,v),i.set(c,g),v||(hr.has(c)||c.removeAttribute(n),hr.delete(c)),g||c.removeAttribute(r)}),mn--,mn||(gt=new WeakMap,gt=new WeakMap,hr=new WeakMap,vr={})}},Ec=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||$c(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Cc(n,o,r,"aria-hidden")):function(){return null}};const Zo="Dialog",[Xo,am]=ml(Zo),[Pc,yt]=Xo(Zo),Oc=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=L(null),l=L(null),[u=!1,f]=_l({prop:n,defaultProp:o,onChange:i});return N(Pc,{scope:t,triggerRef:s,contentRef:l,contentId:nn(),titleId:nn(),descriptionId:nn(),open:u,onOpenChange:f,onOpenToggle:ve(()=>f(c=>!c),[f]),modal:a},r)},Ac="DialogPortal",[sm,Qo]=Xo(Ac,{forceMount:void 0}),bn="DialogOverlay",Ic=le((e,t)=>{const r=Qo(bn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=yt(bn,e.__scopeDialog);return i.modal?N(dn,{present:n||i.open},N(Tc,ue({},o,{ref:t}))):null}),Tc=le((e,t)=>{const{__scopeDialog:r,...n}=e,o=yt(bn,r);return N(kc,{as:on,allowPinchZoom:!0,shards:[o.contentRef]},N(sn.div,ue({"data-state":ea(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Lt="DialogContent",Nc=le((e,t)=>{const r=Qo(Lt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=yt(Lt,e.__scopeDialog);return N(dn,{present:n||i.open},i.modal?N(Dc,ue({},o,{ref:t})):N(Mc,ue({},o,{ref:t})))}),Dc=le((e,t)=>{const r=yt(Lt,e.__scopeDialog),n=L(null),o=Ft(t,r.contentRef,n);return V(()=>{const i=n.current;if(i)return Ec(i)},[]),N(Jo,ue({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:vt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:vt(e.onFocusOutside,i=>i.preventDefault())}))}),Mc=le((e,t)=>{const r=yt(Lt,e.__scopeDialog),n=L(!1),o=L(!1);return N(Jo,ue({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Jo=le((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=yt(Lt,r),l=L(null),u=Ft(t,l);return zl(),N(G,null,N(Nl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},N(Al,ue({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ea(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function ea(e){return e?"open":"closed"}const Fc=Oc,Lc=Ic,Rc=Nc;function ta(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ta(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ze(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ta(e))&&(n&&(n+=" "),n+=t);return n}const ra=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,na=ze,gn=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return na(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],c=i==null?void 0:i[u];if(f===null)return null;const v=ra(f)||ra(c);return o[u][v]}),s=r&&Object.entries(r).reduce((u,f)=>{let[c,v]=f;return v===void 0||(u[c]=v),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:c,className:v,...g}=f;return Object.entries(g).every(m=>{let[h,w]=m;return Array.isArray(w)?w.includes({...i,...s}[h]):{...i,...s}[h]===w})?[...u,c,v]:u},[]);return na(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},de=Symbol.for("@ts-pattern/matcher"),ia=Symbol.for("@ts-pattern/isVariadic"),mr="@ts-pattern/anonymous-select-key",yn=e=>!!(e&&typeof e=="object"),br=e=>e&&!!e[de],re=(e,t,r)=>{if(br(e)){const n=e[de](),{matched:o,selections:i}=n.match(t);return o&&i&&Object.keys(i).forEach(a=>r(a,i[a])),o}if(yn(e)){if(!yn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],i=[];for(const a of e.keys()){const s=e[a];br(s)&&s[ia]?i.push(s):i.length?o.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+o.length)return!1;const a=t.slice(0,n.length),s=o.length===0?[]:t.slice(-o.length),l=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((u,f)=>re(u,a[f],r))&&o.every((u,f)=>re(u,s[f],r))&&(i.length===0||re(i[0],l,r))}return e.length===t.length&&e.every((a,s)=>re(a,t[s],r))}return Object.keys(e).every(n=>{const o=e[n];return(n in t||br(i=o)&&i[de]().matcherType==="optional")&&re(o,t[n],r);var i})}return Object.is(t,e)},me=e=>{var t,r,n;return yn(e)?br(e)?(t=(r=(n=e[de]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Rt(e,me):Rt(Object.values(e),me):[]},Rt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Vc(...e){if(e.length===1){const[t]=e;return r=>re(t,r,()=>{})}if(e.length===2){const[t,r]=e;return re(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ae(e){return Object.assign(e,{optional:()=>wn(e),and:t=>K(e,t),or:t=>oa(e,t),select:t=>t===void 0?Vt(e):Vt(t,e)})}function _n(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[ia]:!0})}}))(e),{optional:()=>_n(wn(e)),select:t=>_n(t===void 0?Vt(e):Vt(t,e))})}function wn(e){return ae({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return t===void 0?(me(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:re(e,t,n),selections:r}},getSelectionKeys:()=>me(e),matcherType:"optional"})})}const jc=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Bc=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function K(...e){return ae({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:e.every(o=>re(o,t,n)),selections:r}},getSelectionKeys:()=>Rt(e,me),matcherType:"and"})})}function oa(...e){return ae({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return Rt(e,me).forEach(o=>n(o,void 0)),{matched:e.some(o=>re(o,t,n)),selections:r}},getSelectionKeys:()=>Rt(e,me),matcherType:"or"})})}function R(e){return{[de]:()=>({match:t=>({matched:!!e(t)})})}}function Vt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ae({[de]:()=>({match:n=>{let o={[t??mr]:n};return{matched:r===void 0||re(r,n,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[t??mr].concat(r===void 0?[]:me(r))})})}function Ce(e){return typeof e=="number"}function nt(e){return typeof e=="string"}function Ue(e){return typeof e=="bigint"}const aa=ae(R(function(e){return!0})),zc=aa,it=e=>Object.assign(ae(e),{startsWith:t=>{return it(K(e,(r=t,R(n=>nt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return it(K(e,(r=t,R(n=>nt(n)&&n.endsWith(r)))));var r},minLength:t=>it(K(e,(r=>R(n=>nt(n)&&n.length>=r))(t))),maxLength:t=>it(K(e,(r=>R(n=>nt(n)&&n.length<=r))(t))),includes:t=>{return it(K(e,(r=t,R(n=>nt(n)&&n.includes(r)))));var r},regex:t=>{return it(K(e,(r=t,R(n=>nt(n)&&!!n.match(r)))));var r}}),Uc=it(R(nt)),Ee=e=>Object.assign(ae(e),{between:(t,r)=>Ee(K(e,((n,o)=>R(i=>Ce(i)&&n<=i&&o>=i))(t,r))),lt:t=>Ee(K(e,(r=>R(n=>Ce(n)&&n<r))(t))),gt:t=>Ee(K(e,(r=>R(n=>Ce(n)&&n>r))(t))),lte:t=>Ee(K(e,(r=>R(n=>Ce(n)&&n<=r))(t))),gte:t=>Ee(K(e,(r=>R(n=>Ce(n)&&n>=r))(t))),int:()=>Ee(K(e,R(t=>Ce(t)&&Number.isInteger(t)))),finite:()=>Ee(K(e,R(t=>Ce(t)&&Number.isFinite(t)))),positive:()=>Ee(K(e,R(t=>Ce(t)&&t>0))),negative:()=>Ee(K(e,R(t=>Ce(t)&&t<0)))}),Hc=Ee(R(Ce)),He=e=>Object.assign(ae(e),{between:(t,r)=>He(K(e,((n,o)=>R(i=>Ue(i)&&n<=i&&o>=i))(t,r))),lt:t=>He(K(e,(r=>R(n=>Ue(n)&&n<r))(t))),gt:t=>He(K(e,(r=>R(n=>Ue(n)&&n>r))(t))),lte:t=>He(K(e,(r=>R(n=>Ue(n)&&n<=r))(t))),gte:t=>He(K(e,(r=>R(n=>Ue(n)&&n>=r))(t))),positive:()=>He(K(e,R(t=>Ue(t)&&t>0))),negative:()=>He(K(e,R(t=>Ue(t)&&t<0)))}),qc=He(R(Ue)),Kc=ae(R(function(e){return typeof e=="boolean"})),Wc=ae(R(function(e){return typeof e=="symbol"})),Gc=ae(R(function(e){return e==null}));var Pe={__proto__:null,matcher:de,optional:wn,array:function(...e){return _n({[de]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return me(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,a)=>{n[i]=(n[i]||[]).concat([a])};return{matched:t.every(i=>re(r,i,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:me(e[0])})})},set:function(...e){return ae({[de]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,a)=>{r[i]=(r[i]||[]).concat([a])},o=e[0];return{matched:jc(t,i=>re(o,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:me(e[0])})})},map:function(...e){return ae({[de]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,a]=e;return{matched:Bc(t,(s,l)=>{const u=re(i,l,n),f=re(a,s,n);return u&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...me(e[0]),...me(e[1])]})})},intersection:K,union:oa,not:function(e){return ae({[de]:()=>({match:t=>({matched:!re(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:R,select:Vt,any:aa,_:zc,string:Uc,number:Hc,bigint:qc,boolean:Kc,symbol:Wc,nullish:Gc,instanceOf:function(e){return ae(R(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ae(R(Vc(e)))}};const xn={matched:!1,value:void 0};function qe(e){return new gr(e,xn)}class gr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,a={};const s=(u,f)=>{i=!0,a[u]=f},l=!n.some(u=>re(u,this.input,s))||o&&!o(this.input)?xn:{matched:!0,value:r(i?mr in a?a[mr]:a:this.input,this.input)};return new gr(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new gr(this.input,n?{matched:!0,value:r(this.input,this.input)}:xn)}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 lm="";function ke(e,t){if(!e)throw new Error(t)}function yr(){throw new Error("Cycle detected")}var Yc=Symbol.for("preact-signals");function kn(){if(_t>1)_t--;else{for(var e,t=!1;jt!==void 0;){var r=jt;for(jt=void 0,$n++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&la(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if($n=0,_t--,t)throw e}}var Y=void 0,jt=void 0,_t=0,$n=0,_r=0;function sa(e){if(Y!==void 0){var t=e.n;if(t===void 0||t.t!==Y)return t={i:0,S:e,p:Y.s,n:void 0,t:Y,e:void 0,x:void 0,r:t},Y.s!==void 0&&(Y.s.n=t),Y.s=t,e.n=t,32&Y.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=Y.s,t.n=void 0,Y.s.n=t,Y.s=t),t}}function ne(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ne.prototype.brand=Yc,ne.prototype.h=function(){return!0},ne.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)},ne.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ne.prototype.subscribe=function(e){var t=this;return Cn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},ne.prototype.valueOf=function(){return this.value},ne.prototype.toString=function(){return this.value+""},ne.prototype.toJSON=function(){return this.value},ne.prototype.peek=function(){return this.v},Object.defineProperty(ne.prototype,"value",{get:function(){var e=sa(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(Y instanceof We&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){$n>100&&yr(),this.v=e,this.i++,_r++,_t++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{kn()}}}});function Ke(e){return new ne(e)}function la(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ca(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ua(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function We(e){ne.call(this,void 0),this.x=e,this.s=void 0,this.g=_r-1,this.f=4}(We.prototype=new ne).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===_r))return!0;if(this.g=_r,this.f|=1,this.i>0&&!la(this))return this.f&=-2,!0;var e=Y;try{ca(this),Y=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Y=e,ua(this),this.f&=-2,!0},We.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)}ne.prototype.S.call(this,e)},We.prototype.U=function(e){if(this.t!==void 0&&(ne.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)}},We.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},We.prototype.peek=function(){if(this.h()||yr(),16&this.f)throw this.v;return this.v},Object.defineProperty(We.prototype,"value",{get:function(){1&this.f&&yr();var e=sa(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Zc(e){return new We(e)}function da(e){var t=e.u;if(e.u=void 0,typeof t=="function"){_t++;var r=Y;Y=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Sn(e),n}finally{Y=r,kn()}}}function Sn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,da(e)}function Xc(e){if(Y!==this)throw new Error("Out-of-order effect");ua(this),Y=e,this.f&=-2,8&this.f&&Sn(this),kn()}function Bt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Bt.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()}},Bt.prototype.S=function(){1&this.f&&yr(),this.f|=1,this.f&=-9,da(this),ca(this),_t++;var e=Y;return Y=this,Xc.bind(this,e)},Bt.prototype.N=function(){2&this.f||(this.f|=2,this.o=jt,jt=this)},Bt.prototype.d=function(){this.f|=8,1&this.f||Sn(this)};function Cn(e){var t=new Bt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var En;function wt(e,t){S[e]=t.bind(null,S[e]||function(){})}function wr(e){En&&En(),En=e&&e.S()}function fa(e){var t=this,r=e.data,n=Jc(r);n.value=r;var o=se(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var a;!bi(o.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},Zc(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}fa.displayName="_st",Object.defineProperties(ne.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:fa},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),wt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof ne&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),wt("__r",function(e,t){wr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Cn(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),wr(r),e(t)}),wt("__e",function(e,t,r,n){wr(),e(t,r,n)}),wt("diffed",function(e,t){wr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var s=i[a];s!==void 0&&!(a in n)&&(s.d(),i[a]=void 0)}else r.U=i={};for(var l in n){var u=i[l],f=n[l];u===void 0?(u=Qc(r,l,f,o),i[l]=u):u.o(f,o)}}}e(t)});function Qc(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=Ke(r);return{o:function(a,s){i.value=a,n=s},d:Cn(function(){var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}wt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),wt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),be.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function Jc(e){return se(function(){return Ke(e)},[])}const Pn=(e,t)=>t.some(r=>e instanceof r);let pa,ha;function eu(){return pa||(pa=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function tu(){return ha||(ha=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const On=new WeakMap,An=new WeakMap,xr=new WeakMap;function ru(e){const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{r(ot(e.result)),o()},a=()=>{n(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",a)});return xr.set(t,e),t}function nu(e){if(On.has(e))return;const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{r(),o()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)});On.set(e,t)}let In={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return On.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ot(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function va(e){In=e(In)}function iu(e){return tu().includes(e)?function(...t){return e.apply(Tn(this),t),ot(this.request)}:function(...t){return ot(e.apply(Tn(this),t))}}function ou(e){return typeof e=="function"?iu(e):(e instanceof IDBTransaction&&nu(e),Pn(e,eu())?new Proxy(e,In):e)}function ot(e){if(e instanceof IDBRequest)return ru(e);if(An.has(e))return An.get(e);const t=ou(e);return t!==e&&(An.set(e,t),xr.set(t,e)),t}const Tn=e=>xr.get(e);function au(e,t,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),s=ot(a);return n&&a.addEventListener("upgradeneeded",l=>{n(ot(a.result),l.oldVersion,l.newVersion,ot(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const su=["get","getKey","getAll","getAllKeys","count"],lu=["put","add","delete","clear"],Nn=new Map;function ma(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Nn.get(t))return Nn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=lu.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||su.includes(r)))return;const i=async function(a,...s){const l=this.transaction(a,o?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),o&&l.done]))[0]};return Nn.set(t,i),i}va(e=>({...e,get:(t,r,n)=>ma(t,r)||e.get(t,r,n),has:(t,r)=>!!ma(t,r)||e.has(t,r)}));const cu=["continue","continuePrimaryKey","advance"],ba={},Dn=new WeakMap,ga=new WeakMap,uu={get(e,t){if(!cu.includes(t))return e[t];let r=ba[t];return r||(r=ba[t]=function(...n){Dn.set(this,ga.get(this)[t](...n))}),r}};async function*du(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,uu);for(ga.set(r,t),xr.set(r,Tn(t));t;)yield r,t=await(Dn.get(r)||t.continue()),Dn.delete(r)}function ya(e,t){return t===Symbol.asyncIterator&&Pn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Pn(e,[IDBIndex,IDBObjectStore])}va(e=>({...e,get(t,r,n){return ya(t,r)?du:e.get(t,r,n)},has(t,r){return ya(t,r)||e.has(t,r)}}));const zt=e=>qe(e).with(Pe.number.lte(1e3),()=>`${Math.round(e)}KB`).with(Pe.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),_a=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},fu=e=>Object.entries(e).reduce((r,[n,o])=>(r[n]=o.value,r),{}),kr=e=>t=>t?t.type===e:!1;class Ut extends Error{constructor(){super("Aborted")}}function wa(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const xa=e=>typeof e=="string",ka=typeof window>"u"?void 0:au("inploi-chatbot",2,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Ht={getStateData:async(e,t)=>{var n;const r=$a({...e,flowKeys:t});return(n=await ka)==null?void 0:n.get("state",r)},setStateData:wa(async e=>{var r;const t=$a(e);return(r=await ka)==null?void 0:r.put("state",e.data,t)},1e3)},$r=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const o=e.find(u=>u.id===t.nextId);if(o===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,a=e.find(u=>u.id===i),s=t.type.includes("question")?1:0;if(a){const u=s+Math.max($r(e,o,r,n+s).remainingSteps,$r(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const l=s+$r(e,o,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},pu=e=>{const t={},r=e.find(n=>n.isHead);return r&&$r(e,r,(n,o)=>{t[n]=o}),t},$a=e=>[...e.flowKeys,e.id,e.version].join("/"),Ge=Ke({state:"idle"}),qt=e=>{const{state:t,flow:r}=Ge.value;if(t!=="loaded")return;ke(r,"No flow to update");const n=e(r.data);r.data=n,Ge.value={state:t,flow:r},Ht.setStateData(r)},T={current$:Ge,viewState$:Ke("closed"),inputHeight$:Ke(53),startFlow:async({flow:e,context:t,flowKeys:r,title:n})=>{const i={data:await Ht.getStateData(e,r)??Sa(),startedAt:new Date,nodeIdToProgress:pu(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n};Ge.value={state:"loaded",flow:i},Ht.setStateData(i)},cancelCurrentFlow:()=>{Ge.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>qt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>qt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Ge.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Sa();Ge.value={state:e,flow:{...t,data:r,startedAt:new Date}},Ht.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return qt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ge.value;ke(t==="loaded","Application not loaded");const n=r.data.messages.filter(o=>!o.groupId||!e.includes(o.groupId));r.data.messages=n,Ht.setStateData(r)},setSubmission:(e,t)=>qt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>qt(t=>({...t,currentInput:e??null}))},hu=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Sa=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:hu()});var vu=0;function d(e,t,r,n,o,i){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var u={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--vu,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(u),u}const mu=({message:e})=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("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:[d("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"}),d("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"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:[d("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&d("p",{class:"text-neutral-9 text-sm",children:e})]})]}),bu=e=>d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:"Loading"}),d("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)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("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"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("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"})})})]}),Ca=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(bu,{class:"text-neutral-6 h-8 w-8"})}),gu=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Sr=({class:e,children:t,...r})=>d("button",{class:ze("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),...r,children:d("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})}),yu=()=>{if(T.current$.value.state!=="loaded")return null;const e=T.current$.value.flow.nodeIdToProgress,t=T.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:gu(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},_u=({children:e})=>{const t=T.viewState$;return d(G,{children:d("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:[d("div",{class:"flex h-[var(--header-height)] gap-2",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?d(G,{children:[d(Sr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:d("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),d(Sr,{"aria-label":"Close application",onClick:T.cancelCurrentFlow,children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):d(G,{children:[T.current$.value.state==="loaded"&&d(Sr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[d("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"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(Sr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),d(yu,{})]})})},wu=Jr(()=>Promise.resolve().then(()=>Yv).then(e=>e.ChatbotBody)),xu=gn("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",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),ku=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:o,error:i}=T.current$.value,a=T.viewState$.value,s=n!=="idle"&&a==="maximised",l=L(null);return d(Fc,{open:s,modal:s,children:[d(Lc,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0"}),d(Rc,{forceMount:!0,asChild:!0,children:d("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:xu({view:a}),children:d("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[d(_u,{children:o==null?void 0:o.title}),qe({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>d(Ca,{},"loading")).with({state:"loaded"},()=>d(ft,{fallback:d(Ca,{},"loading"),children:d(wu,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>d(mu,{message:i})).exhaustive()]})})})]})},Mn=Ne({id:Di(ge(),String),version:Wr(),build:Wr(),nodes:Li(Fi())}),$u=Ne({flow:Mn}),Su=Ne({company:Ne({name:ge()}),flow:Mn,job:Ne({id:Di(ge(),String),title:ge()})}),Cu=Ne({flow:Mn,title:ge(),flowKeys:Li(ge()),context:Ri(ge(),Fi())}),Eu=`#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%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){#isdk{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}#isdk{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;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 .pointer-events-none{pointer-events:none}#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 .bottom-2\\.5{bottom:.625rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .right-3{right:.75rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .mt-auto{margin-top: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-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#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-24{width:6rem}#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-full{--tw-translate-y: 100%;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}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%);height:var(--header-height)}to{transform:translateY(0);height:var(--content-height)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.16,1,.3,1)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#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-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#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-neutral-3{background-color:var(--i-color-n-3)}#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 .bg-none{background-image:none}#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 .px-5{padding-left:1.25rem;padding-right:1.25rem}#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-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#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-3{padding-top:.75rem}#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-right{text-align:right}#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 .font-medium{font-weight:500}#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-3{line-height:.75rem}#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 .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-none{outline:2px solid transparent;outline-offset:2px}#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 .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#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-\\[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-blur-xl{--tw-backdrop-blur: blur(24px);-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 .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#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 .will-change-\\[height\\]{will-change:height}#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 .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}#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 .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}#isdk .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px 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 .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px 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 .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#isdk .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}#isdk .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}#isdk .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}#isdk .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}#isdk .focus-visible\\:outline-2:focus-visible{outline-width:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}#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\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}#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\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-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-8:active{outline-color:var(--i-color-n-8)}#isdk .active\\:ring-2:active{--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 .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#isdk .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}#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-9{--tw-ring-color: var(--i-color-a-9)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}@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}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}
42
42
  `,Ea="isdk",Pu={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"},Ou=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Ea);if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Ea,t}});var Au=["1","2","3","4","5","6","7","8","9","10","11","12"],Iu={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:[56,.23],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]}},Tu=(e,t=1,r)=>n=>{const[o,i]=Iu[r][n];return"oklch("+o+"% "+i*t+" "+e+")"},Fn=e=>{const t=Tu(e.hue,e.chroma,e.mode);return Object.fromEntries(Au.map(r=>[e.prefix+r,e.transform(t(r))]))},Ln=e=>e,Nu=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(o=>{const i=n[o];return[`${String(r)}.${o}`,i]}):[[r,n]]});return Object.fromEntries(t)},Cr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Rn=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Cr(e)&&Cr(r))for(const n in r){const o=r[n];if(Cr(o)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];Cr(i)&&Rn(i,o)}else Object.assign(e,{[n]:r[n]})}return Rn(e,...t)},Du=e=>{function t(r,n){const o=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${o}`:`var(--${o})`}return t},Mu=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:o,getToken:i}=n,a=v=>i("reference",v.toString()),s=e({theme:o}),l=t({theme:o,core:a,raw:{core:s}}),u=r({theme:o,core:a,semantic:a,raw:{core:s,semantic:l}}),f=Nu(Rn(s,l,u)),c=([v,g],m)=>{const h=[m,v].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(w=>c(w,h)):[[n.getToken("declaration",h),g]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(v=>c(v))),ref:v=>i("reference",v.toString())}}})})})});const[Vn,jn,Pa]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Fu=Mu().core(({theme:e})=>({color:{black:Vn,white:jn,lowest:e.mode==="light"?jn:Vn,highest:e.mode==="light"?Vn:jn,...Fn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Ln}),...Fn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Ln}),...Fn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Ln})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(o,i)=>t.core.color[o].replace(")",` / ${i})`);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:n("n-8",r.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:Pa,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const o=(i,a)=>e.core.color[i].replace(")",` / ${a})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:o("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":o("a-9",.05)},"status-bar":{bg:o("n-2",.8),"bg-button":Pa,"bg-button-hover":o("n-10",.4),"bg-button-active":o("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Lu=Du({prefix:"i-"}),Ru=e=>{const t=Fu.from({theme:e,getToken:Lu}),r=Object.entries(t.declarations).map(([n,o])=>`${n}: ${o};`);return`#isdk {
43
43
  ${r.concat(r).join(`
44
44
  `)}
45
- }`},Vu=({_internal_domManager:e=Ou(),theme:t})=>Xe(({apiClient:r,logger:n,analytics:o})=>{let i=!1;const a=()=>{if(typeof window>"u")return;const s=[N("style",{id:"inploi-chatbot-styles"},Eu),N("style",{id:"inploi-chatbot-theme"},Ru(t))],l=e.getOrCreateChatbotElement();ut(N(G,{},[s,N(ku,{apiClient:r,logger:n,analytics:o})]),l),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async s=>r.fetch(`/flow/job/${s}`).then(l=>{const u=Dt(Su,l);return{context:{job_id:u.job.id,flow_id:u.flow.id,flow_version:u.flow.version},flow:u.flow,title:`Applying for “${u.job.title}”`,flowKeys:[u.job.id]}}),fetchFlowById:async s=>r.fetch(`/flow/id/${s}`).then(l=>{const u=Dt($u,l);return{flow:u.flow,context:{flow_id:u.flow.id,flow_version:u.flow.version},title:"Chatbot",flowKeys:[]}}),open:async s=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",i||a(),s instanceof Promise?(T.current$.value={state:"loading"},s.then(async l=>{const u=Dt(Cu,l);T.startFlow(u)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";T.current$.value={state:"error",error:u}})):T.startFlow(s)}catch(l){n.error("Error starting flow",l)}},startApplication:void 0,closeApplication:void 0,close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),n.info("Closed flow from an external source"))}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Vu;var Er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ju=Array.isArray,Bn=ju,Bu=typeof Er=="object"&&Er&&Er.Object===Object&&Er,zu=Bu,Uu=zu,Hu=typeof self=="object"&&self&&self.Object===Object&&self,qu=Uu||Hu||Function("return this")(),zn=qu,Ku=zn,Wu=Ku.Symbol,Un=Wu,Aa=Un,Ia=Object.prototype,Gu=Ia.hasOwnProperty,Yu=Ia.toString,Kt=Aa?Aa.toStringTag:void 0;function Zu(e){var t=Gu.call(e,Kt),r=e[Kt];try{e[Kt]=void 0;var n=!0}catch{}var o=Yu.call(e);return n&&(t?e[Kt]=r:delete e[Kt]),o}var Xu=Zu,Qu=Object.prototype,Ju=Qu.toString;function ed(e){return Ju.call(e)}var td=ed,Ta=Un,rd=Xu,nd=td,id="[object Null]",od="[object Undefined]",Na=Ta?Ta.toStringTag:void 0;function ad(e){return e==null?e===void 0?od:id:Na&&Na in Object(e)?rd(e):nd(e)}var Da=ad;function sd(e){return e!=null&&typeof e=="object"}var ld=sd,cd=Da,ud=ld,dd="[object Symbol]";function fd(e){return typeof e=="symbol"||ud(e)&&cd(e)==dd}var Hn=fd,pd=Bn,hd=Hn,vd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,md=/^\w*$/;function bd(e,t){if(pd(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||hd(e)?!0:md.test(e)||!vd.test(e)||t!=null&&e in Object(t)}var gd=bd;function yd(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ma=yd,_d=Da,wd=Ma,xd="[object AsyncFunction]",kd="[object Function]",$d="[object GeneratorFunction]",Sd="[object Proxy]";function Cd(e){if(!wd(e))return!1;var t=_d(e);return t==kd||t==$d||t==xd||t==Sd}var Ed=Cd,Pd=zn,Od=Pd["__core-js_shared__"],Ad=Od,qn=Ad,Fa=function(){var e=/[^.]+$/.exec(qn&&qn.keys&&qn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Id(e){return!!Fa&&Fa in e}var Td=Id,Nd=Function.prototype,Dd=Nd.toString;function Md(e){if(e!=null){try{return Dd.call(e)}catch{}try{return e+""}catch{}}return""}var Fd=Md,Ld=Ed,Rd=Td,Vd=Ma,jd=Fd,Bd=/[\\^$.*+?()[\]{}|]/g,zd=/^\[object .+?Constructor\]$/,Ud=Function.prototype,Hd=Object.prototype,qd=Ud.toString,Kd=Hd.hasOwnProperty,Wd=RegExp("^"+qd.call(Kd).replace(Bd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gd(e){if(!Vd(e)||Rd(e))return!1;var t=Ld(e)?Wd:zd;return t.test(jd(e))}var Yd=Gd;function Zd(e,t){return e==null?void 0:e[t]}var Xd=Zd,Qd=Yd,Jd=Xd;function ef(e,t){var r=Jd(e,t);return Qd(r)?r:void 0}var La=ef,tf=La,rf=tf(Object,"create"),Pr=rf,Ra=Pr;function nf(){this.__data__=Ra?Ra(null):{},this.size=0}var of=nf;function af(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sf=af,lf=Pr,cf="__lodash_hash_undefined__",uf=Object.prototype,df=uf.hasOwnProperty;function ff(e){var t=this.__data__;if(lf){var r=t[e];return r===cf?void 0:r}return df.call(t,e)?t[e]:void 0}var pf=ff,hf=Pr,vf=Object.prototype,mf=vf.hasOwnProperty;function bf(e){var t=this.__data__;return hf?t[e]!==void 0:mf.call(t,e)}var gf=bf,yf=Pr,_f="__lodash_hash_undefined__";function wf(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yf&&t===void 0?_f:t,this}var xf=wf,kf=of,$f=sf,Sf=pf,Cf=gf,Ef=xf;function xt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xt.prototype.clear=kf,xt.prototype.delete=$f,xt.prototype.get=Sf,xt.prototype.has=Cf,xt.prototype.set=Ef;var Pf=xt;function Of(){this.__data__=[],this.size=0}var Af=Of;function If(e,t){return e===t||e!==e&&t!==t}var Tf=If,Nf=Tf;function Df(e,t){for(var r=e.length;r--;)if(Nf(e[r][0],t))return r;return-1}var Or=Df,Mf=Or,Ff=Array.prototype,Lf=Ff.splice;function Rf(e){var t=this.__data__,r=Mf(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Lf.call(t,r,1),--this.size,!0}var Vf=Rf,jf=Or;function Bf(e){var t=this.__data__,r=jf(t,e);return r<0?void 0:t[r][1]}var zf=Bf,Uf=Or;function Hf(e){return Uf(this.__data__,e)>-1}var qf=Hf,Kf=Or;function Wf(e,t){var r=this.__data__,n=Kf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Gf=Wf,Yf=Af,Zf=Vf,Xf=zf,Qf=qf,Jf=Gf;function kt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}kt.prototype.clear=Yf,kt.prototype.delete=Zf,kt.prototype.get=Xf,kt.prototype.has=Qf,kt.prototype.set=Jf;var ep=kt,tp=La,rp=zn,np=tp(rp,"Map"),ip=np,Va=Pf,op=ep,ap=ip;function sp(){this.size=0,this.__data__={hash:new Va,map:new(ap||op),string:new Va}}var lp=sp;function cp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var up=cp,dp=up;function fp(e,t){var r=e.__data__;return dp(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ar=fp,pp=Ar;function hp(e){var t=pp(this,e).delete(e);return this.size-=t?1:0,t}var vp=hp,mp=Ar;function bp(e){return mp(this,e).get(e)}var gp=bp,yp=Ar;function _p(e){return yp(this,e).has(e)}var wp=_p,xp=Ar;function kp(e,t){var r=xp(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var $p=kp,Sp=lp,Cp=vp,Ep=gp,Pp=wp,Op=$p;function $t(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}$t.prototype.clear=Sp,$t.prototype.delete=Cp,$t.prototype.get=Ep,$t.prototype.has=Pp,$t.prototype.set=Op;var Ap=$t,ja=Ap,Ip="Expected a function";function Kn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ip);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Kn.Cache||ja),r}Kn.Cache=ja;var Tp=Kn,Np=Tp,Dp=500;function Mp(e){var t=Np(e,function(n){return r.size===Dp&&r.clear(),n}),r=t.cache;return t}var Fp=Mp,Lp=Fp,Rp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vp=/\\(\\)?/g,jp=Lp(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Rp,function(r,n,o,i){t.push(o?i.replace(Vp,"$1"):n||r)}),t}),Bp=jp;function zp(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Up=zp,Ba=Un,Hp=Up,qp=Bn,Kp=Hn,Wp=1/0,za=Ba?Ba.prototype:void 0,Ua=za?za.toString:void 0;function Ha(e){if(typeof e=="string")return e;if(qp(e))return Hp(e,Ha)+"";if(Kp(e))return Ua?Ua.call(e):"";var t=e+"";return t=="0"&&1/e==-Wp?"-0":t}var Gp=Ha,Yp=Gp;function Zp(e){return e==null?"":Yp(e)}var Xp=Zp,Qp=Bn,Jp=gd,eh=Bp,th=Xp;function rh(e,t){return Qp(e)?e:Jp(e,t)?[e]:eh(th(e))}var nh=rh,ih=Hn,oh=1/0;function ah(e){if(typeof e=="string"||ih(e))return e;var t=e+"";return t=="0"&&1/e==-oh?"-0":t}var sh=ah,lh=nh,ch=sh;function uh(e,t){t=lh(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[ch(t[r++])];return r&&r==n?e:void 0}var dh=uh,fh=dh;function ph(e,t,r){var n=e==null?void 0:fh(e,t);return n===void 0?r:n}var hh=ph;const Wn=Oa(hh),Wt=(e,t)=>{const[r,...n]=e.data.compareKey.split(".");if(!r)return!1;const o=t==null?void 0:t[r];if(!o)return!1;switch(o.type){case"address":{const i=Wn(o.value,n.join("."));switch(e.data.compare){case"equals":return i===e.data.compareValue;case"contains":return i?i.includes(e.data.compareValue):!1;case"notEquals":return i!==e.data.compareValue;case"notContains":return i?!i.includes(e.data.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const i=Wn(o.value,n.join(".")),a={...e,data:{...e.data,compareKey:"_temp"}};switch(typeof i){case"boolean":return Wt(a,{_temp:{value:i,type:"boolean"}});case"string":return Wt(a,{_temp:{value:i,type:"string"}});case"number":return Wt(a,{_temp:{value:i,type:"number"}});case"object":return Array.isArray(i)&&i.every(xa)?Wt(a,{_temp:{value:i,type:"enum"}}):!1}break}case"boolean":{const i=e.data.compareValue==="true";switch(e.data.compare){case"equals":return o.value===i;case"notEquals":return o.value!==i}break}case"string":switch(e.data.compare){case"equals":return o.value===e.data.compareValue;case"contains":return o.value?o.value.includes(e.data.compareValue):!1;case"notEquals":return o.value!==e.data.compareValue;case"notContains":return o.value?!o.value.includes(e.data.compareValue):!0}break;case"number":{try{const i=Number(e.data.compareValue);switch(e.data.compare){case"equals":return o.value===i;case"notEquals":return o.value!==i;case"greaterThan":return o.value>i;case"greaterThanOrEqualTo":return o.value>=i;case"lessThan":return o.value<i;case"lessThanOrEqualTo":return o.value<=i}}catch{return console.error(`Failed to parse number in if-block ${e.id}`,o.value),!1}break}case"enum":switch(e.data.compare){case"equals":return o.value.length===1&&o.value[0]===e.data.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.data.compareValue;case"contains":return o.value.includes(e.data.compareValue);case"notContains":return!o.value.includes(e.data.compareValue)}break}return!1},qa=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(n)return qa({node:n,nodes:t,stopWhen:r})},vh=({childNode:e,nodes:t})=>{const n=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(s=>s.id===o.branchId);if(!i)return!1;const a=qa({node:i,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(o=>o.id===n.nextId)},mh=({flow:e,analytics:t,logger:r,context:n,apiClient:o,getSubmissions:i,chatService:a,onFlowEnd:s,onInterpret:l})=>{let u=new AbortController;const f=async(c,v)=>{const g=i();l==null||l(c,v);try{await bh({analytics:t,logger:r,apiClient:o,context:n,node:c,submissions:g,chat:{sendMessage:async m=>a.send({groupId:c.id,message:m,signal:u.signal}),userInput:async m=>a.input({input:m,signal:u.signal}),addToSubmissions:a.addToSubmissions},next:m=>{const h=m?e.find(w=>w.id===m):vh({childNode:c,nodes:e});return h?f(h,c):s==null?void 0:s(c)},end:()=>s==null?void 0:s(c)})}catch(m){if(m instanceof Ut)return;throw m}};return{interpret:async c=>{const v=e.find(g=>g.id===c)??_a(e);return f(v)},undo:c=>{let v=1;const g=e.find(h=>h.id===c[c.length-1]);for(let h=c.length-2;h>0;h--){const w=c[h],k=e.find(_=>_.id===w);if(!k||(v++,k.type.startsWith("question-")))break}u.abort(),u=new AbortController;const m=e.find(h=>h.id===c[c.length-v]);return ke(m,"Undo failed: new start node not found"),f(m,g),{removed:v}},abort:()=>{u.abort()}}};async function bh(e){return await qe(e).with({node:{type:"text"}},wh).with({node:{type:"image"}},xh).with({node:{type:"question-text"}},kh).with({node:{type:"question-enum"}},Sh).with({node:{type:"question-number"}},$h).with({node:{type:"question-boolean"}},Ch).with({node:{type:"question-file"}},Ph).with({node:{type:"question-address"}},Eh).with({node:{type:"end-flow"}},Oh).with({node:{type:"if-block"}},_h).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},yh).with({node:{type:"integration-application-submit"}},gh).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function gh({chat:e,next:t,node:r,logger:n,apiClient:o,submissions:i,context:a,analytics:s}){const l=async u=>{u!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"system",variant:"info",text:"Submitting…"});const{anonymous_id:f,session_id:c}=s.getSessionInfo(),v=await o.fetch("/flow/submit",{method:"POST",body:JSON.stringify({...a,integration_id:r.data.integrationId,anonymous_id:f,session_id:c,submissions:fu(i||{})})}).catch(g=>g);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:v}),await qe(v).with({ats_data:{redirect_url:Me.string}},async g=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const m=new URL(g.ats_data.redirect_url);f&&!m.searchParams.has("anonymous_id")&&m.searchParams.set("anonymous_id",f),await e.sendMessage({type:"link",href:m.toString(),text:"Complete submission"}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).otherwise(async g=>{n.error(g),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await l(!1)})};await l(r.data.skipConfirmation)}async function yh({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({type:"link",href:r.data.href,text:at(r.data.cta,n)}),t(r.nextId)}async function _h({submissions:e,next:t,node:r}){t(Wt(r,e)?r.branchId:r.nextId)}async function wh({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.text,n)}),t(r.nextId)}async function xh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function kh({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value}),t(r.nextId)}async function $h({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Sh({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(i=>o.value.includes(i.value)).map(i=>i.label).join(", ")}),t(r.nextId)}async function Ch({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Eh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const o=Object.values(n.value).filter(i=>i&&i.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:o})}return t(r.nextId)}async function Ph({node:e,chat:t,next:r,submissions:n}){await t.sendMessage({author:"bot",type:"text",text:at(e.data.question,n)});const o=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(o===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const i of o.value)await t.sendMessage({author:"user",type:"file",fileName:i.name,fileSizeKb:i.sizeKb});r(e.nextId)}async function Oh({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const at=(e,t)=>{const r=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(r,(n,o,i="")=>{const[a,...s]=o.trim().split("."),l=t==null?void 0:t[a];if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${zt(u.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const u=Wn(l.value,s.join("."));switch(typeof u){case"boolean":return u===!0?"true":"false";case"string":return u;case"number":return u.toString();case"object":if(Array.isArray(u)&&u.every(xa))return u.join(", ")}break}}return i})};function Gn(e,t,r){var n,o,i,a,s;t==null&&(t=100);function l(){var f=Date.now()-a;f<t&&f>=0?n=setTimeout(l,t-f):(n=null,r||(s=e.apply(i,o),i=o=null))}var u=function(){i=this,o=arguments,a=Date.now();var f=r&&!n;return n||(n=setTimeout(l,t)),f&&(s=e.apply(i,o),i=o=null),s};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},u}Gn.debounce=Gn;var Ah=Gn;const Ka=Oa(Ah);function Ih(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=W({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=L({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,c=L(!1);V(()=>(c.current=!0,()=>void(c.current=!1)));const[v,g,m]=se(()=>{const _=()=>{if(!l.current.element)return;const{left:O,top:I,width:P,height:U,bottom:q,right:D,x:M,y:oe}=l.current.element.getBoundingClientRect(),te={left:O,top:I,width:P,height:U,bottom:q,right:D,x:M,y:oe};l.current.element instanceof HTMLElement&&o&&(te.height=l.current.element.offsetHeight,te.width=l.current.element.offsetWidth),Object.freeze(te),c.current&&!Mh(l.current.lastBounds,te)&&s(l.current.lastBounds=te)};return[_,f?Ka(_,f):_,u?Ka(_,u):_]},[s,o,u,f]);function h(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",m,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function w(){l.current.element&&(l.current.resizeObserver=new i(m),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",m,{capture:!0,passive:!0})))}const k=_=>{!_||_===l.current.element||(h(),l.current.element=_,l.current.scrollContainers=Wa(_),w())};return Nh(m,!!r),Th(g),V(()=>{h(),w()},[r,m,g]),V(()=>h,[]),[k,a,v]}function Th(e){V(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Nh(e,t){V(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Wa(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Wa(e.parentElement)]}const Dh=["x","y","top","bottom","left","right","width","height"],Mh=(e,t)=>Dh.every(r=>e[r]===t[r]),St=({class:e,...t})=>d("button",{class:ze("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:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:"Send"}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})}),Fh=25,Yn=Ke({instant:()=>{},smooth:()=>{}}),Z={onSubmitSuccessFn$:Ke(()=>{}),isBotTyping$:Ke(!1),scrollToEnd:{instant:()=>Yn.value.instant(),smooth:()=>Yn.value.smooth()}},Lh=()=>{const e=L(null);he(()=>{Yn.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*1.5&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=se(()=>({addToSubmissions:(n,o)=>T.setSubmission(n,o),send:async({message:n,signal:o,groupId:i})=>{if(await qe(n).with({author:"bot",type:"text"},async a=>{if(o!=null&&o.aborted)throw new Ut;Z.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*Fh;await new Promise(l=>setTimeout(l,s,{signal:o})),Z.isBotTyping$.value=!1}).otherwise(async()=>{}),o!=null&&o.aborted)throw new Ut;T.addMessage(n,i)},input:({input:n,signal:o})=>{if(o!=null&&o.aborted)throw new Ut;return T.setInput(n),new Promise(i=>{const a=s=>{if(o!=null&&o.aborted)throw new Ut;T.setInput(void 0),n.key&&T.setSubmission(n.key,s),i(s)};Z.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},Ct=({class:e,...t})=>d("button",{type:"button",class:ze("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:[d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:"Skip"}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Ga=["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Caribbean Netherlands","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Cook Islands","Costa Rica","Croatia","Cuba","Curaçao","Cyprus","Czechia","Côte d'Ivoire","Democratic Republic of the Congo","Denmark","Djibouti","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Falkland Islands (Islas Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern and Antarctic Lands","Gabon","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macao","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar (Burma)","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Rwanda","Réunion","Saint Barthélemy","Saint Helena, Ascension and Tristan da Cunha","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Sweden","Switzerland","Syria","São Tomé and Príncipe","Taiwan","Tajikistan","Tanzania","Thailand","The Bahamas","The Gambia","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkmenistan","Turks and Caicos Islands","Tuvalu","Türkiye","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe","Åland Islands"],Ya={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"]},Ir=Object.keys(Ya),Rh=e=>Ir.reduce((t,r)=>{const n=Ya[r],o=e.filter(i=>i.types.some(a=>n.includes(a))).map(i=>i.long_name).join(", ");return o&&(t[r]=o),t},{}),Vh=document.createElement("div"),jh=()=>se(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(Vh);return{enabled:!0,getPredictions:async n=>{const{predictions:o}=await t.getPlacePredictions({input:n,language:"en"});return o.map(i=>({label:i.description,value:i.place_id}))},getPlaceDetails:async n=>await new Promise((i,a)=>r.getDetails({placeId:n,fields:["address_components"],language:"en"},(s,l)=>l!==e.maps.places.PlacesServiceStatus.OK?a(l):s===null?a("ZERO_RESULTS"):i({ok:!0,place:s}))).catch(async i=>(console.error("Failed to get address details",i),{ok:!1}))}},[]),Zn=e=>d("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:"Back"})]}),Xn={label:"Fill in manually",value:""},Bh=({input:e,onSubmitSuccess:t})=>{const[r,n]=W(""),[o,i]=W(),[a,s]=W([]),[l,u]=W(),{enabled:f,getPredictions:c,getPlaceDetails:v}=jh(),[g,m]=W(f?"query":"manual"),h=se(()=>wa(w=>{ke(f,"Query state should not be enabled if Google Places isn't available"),n(w),w===""&&s([]),!(w.length<3)&&c(w).then(k=>{s(k)})},500),[f,c]);switch(V(()=>{if(f&&!(l===void 0||l===""))return v(l).then(w=>{if(!w.ok||!w.place.address_components){i({});return}const k=Rh(w.place.address_components);i(k),m("details")}),()=>{i(void 0)}},[l,v,f]),g){case"query":return ke(f,"Query state should not be enabled if Google Places isn't available"),d(zh,{input:e,onSkip:()=>t(null),onAddressSelect:w=>{u(w),m("loading")},onInputChange:h,suggestions:a,query:r});case"loading":return d(Qn,{input:e,onSubmitSuccess:t,addressFields:{},actions:d(Zn,{onClick:()=>{u(void 0),m("query")}})});case"details":return ke(o!==void 0),d(Qn,{input:e,onSubmitSuccess:t,addressFields:o,actions:d(Zn,{onClick:()=>{u(void 0),m("query")}})});case"manual":return d(Qn,{input:e,onSubmitSuccess:t,addressFields:{},actions:f?d(Zn,{onClick:()=>{u(void 0),m("query")}}):void 0})}},zh=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:o,onInputChange:i})=>{const a=L(null);return he(()=>{a.current&&(a.current.focus(),a.current.select())},[]),d(G,{children:[d("form",{noValidate:!0,onSubmit:s=>{s.preventDefault()},class:"flex flex-col justify-end gap-1 p-2.5",children:[d("input",{onChange:s=>{i(s.currentTarget.value)},ref:a,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,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||"Search an address",defaultValue:o}),e.config.optional&&d(Ct,{class:"absolute right-3",onClick:t})]}),d("ul",{children:[r.map(s=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(s.value)},children:[d("span",{class:"flex-grow",children:s.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(Xn.value)},children:d("span",{class:"flex-grow",children:Xn.label})})},Xn.label)]})]})},Uh={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},Qn=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const o=L(null);return he(()=>{if(o.current){const i=o.current.querySelector("input");i&&(i.focus(),i.select())}},[]),d("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:i=>{const a=new FormData(i.currentTarget),s=Object.fromEntries(a.entries());t({type:"address",value:s})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:o,children:Ir.map((i,a)=>{const s=`isdk_${i}`,l=n.config.keys[i];return l?d(G,{children:[d("label",{for:s,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:Uh[i]}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[i==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:l,id:s,defaultValue:e[i],required:!0,children:[e.country&&!Ga.includes(e.country)?d("option",{value:e[i],children:e[i]}):d("option",{value:"",children:"Select a country"}),Ga.map(u=>d("option",{value:u,children:u},u))]}),d("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:a===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:l,id:s,defaultValue:e[i],required:!0}),a!==Ir.length-1&&d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),a===Ir.length-1&&d("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),d("div",{class:"flex w-full flex-1 ",children:[d("div",{class:"flex-grow",children:r}),d(St,{class:"flex items-center justify-center"})]})]})},Jn=()=>{const e=L(null);return V(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Za=["true","false"],Hh=js(Za),qh="answer",Kh=({input:e,onSubmitSuccess:t})=>{const r=Jn();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const o=qe(n).with({nativeEvent:{submitter:Me.select(Me.union(Me.instanceOf(HTMLButtonElement),Me.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),i=Dt(Hh,o);t({type:"boolean",value:i==="true"})},children:[d("div",{class:"flex items-center gap-2 p-2.5",children:Za.map((n,o)=>d("button",{ref:o===0?r:null,type:"submit",name:qh,value:n,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:d("p",{class:"truncate text-center text-base",children:e.config.labels[n]})}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(Ct,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Tr=({error:e})=>e?d("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[d("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null,Wh=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),Gh=e=>e.reduce((t,r)=>t+r.sizeKb,0),Yh=kr("file"),Xa=3,Zh=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${n}$`),"");return d("div",{class:ze("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"block truncate",children:o}),d("span",{children:[".",n]})]}),d("p",{"aria-label":"File size",class:"text-accent-11",children:zt(e.sizeKb)})]})},Qa=({class:e,...t})=>d("li",{class:ze("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Ja=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Xh=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(Ja(n.name).toLowerCase()))},Qh=(e,t)=>{const r=Ja(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},Jh=({input:e,onSubmitSuccess:t})=>{var f;const r=(f=T.current$.value.flow)==null?void 0:f.data.submissions[e.key],[n,o]=W(Yh(r)?r.value:[]),[i,a]=W(),s=n.length-Xa,l=Gh(n),u=Jn();return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:c=>(c.preventDefault(),a(void 0),n.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!Xh({allowedExtensions:e.config.extensions,files:n})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${zt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?a({type:"invalid",message:"Only one file is allowed"}):t({type:"file",value:n})),children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:u,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:[n.length>0?d(G,{children:[d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,Xa).map(c=>{const v=c.name.split(".").pop(),g=c.name.replace(new RegExp(`.${v}$`),"");return d(Qa,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:g}),d("span",{children:[".",v]})]})}),s>0?d(Qa,{children:["+",s," file",s!==1?"s":""]}):null]}),d("p",{class:"text-neutral-11 text-xs",children:[zt(l)," ",n.length>1?"total":""]})]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("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:d("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"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-10 text-xs",children:["(max ",zt(e.config.fileSizeLimitKib),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>d("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:c.replace(".","")}))})]})]}),d("input",{id:"dropzone-file",onInput:async c=>{ke(c.target instanceof HTMLInputElement);const v=c.target.files?Array.from(c.target.files):[],g=await Promise.allSettled(v.map(async h=>{const w=await Wh(h);return{name:Qh(h.name,42),data:w,sizeKb:h.size/1e3}}));if(g.some(({status:h})=>h==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=g.map(h=>h.status==="fulfilled"?h.value:null).filter(Boolean);o(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(St,{disabled:n.length===0}),e.config.optional&&d(Ct,{onClick:()=>t(null)})]})]}),d(Tr,{error:i})]})};var Gt=e=>e.type==="checkbox",Et=e=>e instanceof Date,ce=e=>e==null;const es=e=>typeof e=="object";var ee=e=>!ce(e)&&!Array.isArray(e)&&es(e)&&!Et(e),ev=e=>ee(e)&&e.target?Gt(e.target)?e.target.checked:e.target.value:e,tv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rv=(e,t)=>e.has(tv(t)),nv=e=>{const t=e.constructor&&e.constructor.prototype;return ee(t)&&t.hasOwnProperty("isPrototypeOf")},ei=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Fe(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ei&&(e instanceof Blob||e instanceof FileList))&&(r||ee(e)))if(t=r?[]:{},!r&&!nv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Fe(e[n]));else return e;return t}var Yt=e=>Array.isArray(e)?e.filter(Boolean):[],X=e=>e===void 0,C=(e,t,r)=>{if(!t||!ee(e))return r;const n=Yt(t.split(/[,[\].]+?/)).reduce((o,i)=>ce(o)?o:o[i],e);return X(n)||n===e?X(e[t])?r:e[t]:n},Ye=e=>typeof e=="boolean";const ts={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Le={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};xe.createContext(null);var iv=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==$e.all&&(t._proxyFormState[a]=!n||$e.all),r&&(r[a]=!0),e[a]}});return o},ye=e=>ee(e)&&!Object.keys(e).length,ov=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return ye(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!n||$e.all))},ti=e=>Array.isArray(e)?e:[e];function av(e){const t=xe.useRef(e);t.current=e,xe.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Pe=e=>typeof e=="string",sv=(e,t,r,n,o)=>Pe(e)?(n&&t.watch.add(e),C(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),C(r,i))):(n&&(t.watchAll=!0),r),ri=e=>/^\w*$/.test(e),rs=e=>Yt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function z(e,t,r){let n=-1;const o=ri(t)?[t]:rs(t),i=o.length,a=i-1;for(;++n<i;){const s=o[n];let l=r;if(n!==a){const u=e[s];l=ee(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var ns=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},is=e=>({isOnSubmit:!e||e===$e.onSubmit,isOnBlur:e===$e.onBlur,isOnChange:e===$e.onChange,isOnAll:e===$e.all,isOnTouch:e===$e.onTouched}),os=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Nr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=C(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else ee(s)&&Nr(s,t)}}};var lv=(e,t,r)=>{const n=Yt(C(e,r));return z(n,"root",t[r]),z(e,r,n),e},ni=e=>e.type==="file",Ze=e=>typeof e=="function",Dr=e=>{if(!ei)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Mr=e=>Pe(e),ii=e=>e.type==="radio",Fr=e=>e instanceof RegExp;const as={value:!1,isValid:!1},ss={value:!0,isValid:!0};var ls=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!X(e[0].attributes.value)?X(e[0].value)||e[0].value===""?ss:{value:e[0].value,isValid:!0}:ss:as}return as};const cs={isValid:!1,value:null};var us=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,cs):cs;function ds(e,t,r="validate"){if(Mr(e)||Array.isArray(e)&&e.every(Mr)||Ye(e)&&!e)return{type:r,message:Mr(e)?e:"",ref:t}}var Pt=e=>ee(e)&&!Fr(e)?e:{value:e,message:""},fs=async(e,t,r,n,o)=>{const{ref:i,refs:a,required:s,maxLength:l,minLength:u,min:f,max:c,pattern:v,validate:g,name:m,valueAsNumber:h,mount:w,disabled:k}=e._f,_=C(t,m);if(!w||k)return{};const O=a?a[0]:i,I=j=>{n&&O.reportValidity&&(O.setCustomValidity(Ye(j)?"":j||""),O.reportValidity())},P={},U=ii(i),q=Gt(i),D=U||q,M=(h||ni(i))&&X(i.value)&&X(_)||Dr(i)&&i.value===""||_===""||Array.isArray(_)&&!_.length,oe=ns.bind(null,m,r,P),te=(j,F,Q,fe=Le.maxLength,_e=Le.minLength)=>{const Oe=j?F:Q;P[m]={type:j?fe:_e,message:Oe,ref:i,...oe(j?fe:_e,Oe)}};if(o?!Array.isArray(_)||!_.length:s&&(!D&&(M||ce(_))||Ye(_)&&!_||q&&!ls(a).isValid||U&&!us(a).isValid)){const{value:j,message:F}=Mr(s)?{value:!!s,message:s}:Pt(s);if(j&&(P[m]={type:Le.required,message:F,ref:O,...oe(Le.required,F)},!r))return I(F),P}if(!M&&(!ce(f)||!ce(c))){let j,F;const Q=Pt(c),fe=Pt(f);if(!ce(_)&&!isNaN(_)){const _e=i.valueAsNumber||_&&+_;ce(Q.value)||(j=_e>Q.value),ce(fe.value)||(F=_e<fe.value)}else{const _e=i.valueAsDate||new Date(_),Oe=jr=>new Date(new Date().toDateString()+" "+jr),lt=i.type=="time",Xt=i.type=="week";Pe(Q.value)&&_&&(j=lt?Oe(_)>Oe(Q.value):Xt?_>Q.value:_e>new Date(Q.value)),Pe(fe.value)&&_&&(F=lt?Oe(_)<Oe(fe.value):Xt?_<fe.value:_e<new Date(fe.value))}if((j||F)&&(te(!!j,Q.message,fe.message,Le.max,Le.min),!r))return I(P[m].message),P}if((l||u)&&!M&&(Pe(_)||o&&Array.isArray(_))){const j=Pt(l),F=Pt(u),Q=!ce(j.value)&&_.length>+j.value,fe=!ce(F.value)&&_.length<+F.value;if((Q||fe)&&(te(Q,j.message,F.message),!r))return I(P[m].message),P}if(v&&!M&&Pe(_)){const{value:j,message:F}=Pt(v);if(Fr(j)&&!_.match(j)&&(P[m]={type:Le.pattern,message:F,ref:i,...oe(Le.pattern,F)},!r))return I(F),P}if(g){if(Ze(g)){const j=await g(_,t),F=ds(j,O);if(F&&(P[m]={...F,...oe(Le.validate,F.message)},!r))return I(F.message),P}else if(ee(g)){let j={};for(const F in g){if(!ye(j)&&!r)break;const Q=ds(await g[F](_,t),O,F);Q&&(j={...Q,...oe(F,Q.message)},I(Q.message),r&&(P[m]=j))}if(!ye(j)&&(P[m]={ref:O,...j},!r))return P}}return I(!0),P};function cv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=X(e)?n++:e[t[n++]];return e}function uv(e){for(const t in e)if(e.hasOwnProperty(t)&&!X(e[t]))return!1;return!0}function ie(e,t){const r=Array.isArray(t)?t:ri(t)?[t]:rs(t),n=r.length===1?e:cv(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(ee(n)&&ye(n)||Array.isArray(n)&&uv(n))&&ie(e,r.slice(0,-1)),e}function oi(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Lr=e=>ce(e)||!es(e);function st(e,t){if(Lr(e)||Lr(t))return e===t;if(Et(e)&&Et(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Et(i)&&Et(a)||ee(i)&&ee(a)||Array.isArray(i)&&Array.isArray(a)?!st(i,a):i!==a)return!1}}return!0}var ps=e=>e.type==="select-multiple",dv=e=>ii(e)||Gt(e),ai=e=>Dr(e)&&e.isConnected,hs=e=>{for(const t in e)if(Ze(e[t]))return!0;return!1};function Rr(e,t={}){const r=Array.isArray(e);if(ee(e)||r)for(const n in e)Array.isArray(e[n])||ee(e[n])&&!hs(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Rr(e[n],t[n])):ce(e[n])||(t[n]=!0);return t}function vs(e,t,r){const n=Array.isArray(e);if(ee(e)||n)for(const o in e)Array.isArray(e[o])||ee(e[o])&&!hs(e[o])?X(t)||Lr(r[o])?r[o]=Array.isArray(e[o])?Rr(e[o],[]):{...Rr(e[o])}:vs(e[o],ce(t)?{}:t[o],r[o]):r[o]=!st(e[o],t[o]);return r}var si=(e,t)=>vs(e,t,Rr(t)),ms=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>X(e)?e:t?e===""?NaN:e&&+e:r&&Pe(e)?new Date(e):n?n(e):e;function li(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return ni(t)?t.files:ii(t)?us(e.refs).value:ps(t)?[...t.selectedOptions].map(({value:r})=>r):Gt(t)?ls(e.refs).value:ms(X(t.value)?e.ref.value:t.value,e)}var fv=(e,t,r,n)=>{const o={};for(const i of e){const a=C(t,i);a&&z(o,i,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Zt=e=>X(e)?e:Fr(e)?e.source:ee(e)?Fr(e.value)?e.value.source:e.value:e,pv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function bs(e,t,r){const n=C(e,r);if(n||ri(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),a=C(t,i),s=C(e,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:r}}var hv=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,vv=(e,t)=>!Yt(C(e,t)).length&&ie(e,t);const mv={mode:$e.onSubmit,reValidateMode:$e.onChange,shouldFocusError:!0};function bv(e={},t){let r={...mv,...e},n={submitCount:0,isDirty:!1,isLoading:Ze(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=ee(r.defaultValues)||ee(r.values)?Fe(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:Fe(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,f=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:oi(),array:oi(),state:oi()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,m=is(r.mode),h=is(r.reValidateMode),w=r.criteriaMode===$e.all,k=p=>b=>{clearTimeout(f),f=setTimeout(p,b)},_=async p=>{if(c.isValid||p){const b=r.resolver?ye((await M()).errors):await te(o,!0);b!==n.isValid&&v.state.next({isValid:b})}},O=p=>c.isValidating&&v.state.next({isValidating:p}),I=(p,b=[],y,E,$=!0,x=!0)=>{if(E&&y){if(s.action=!0,x&&Array.isArray(C(o,p))){const A=y(C(o,p),E.argA,E.argB);$&&z(o,p,A)}if(x&&Array.isArray(C(n.errors,p))){const A=y(C(n.errors,p),E.argA,E.argB);$&&z(n.errors,p,A),vv(n.errors,p)}if(c.touchedFields&&x&&Array.isArray(C(n.touchedFields,p))){const A=y(C(n.touchedFields,p),E.argA,E.argB);$&&z(n.touchedFields,p,A)}c.dirtyFields&&(n.dirtyFields=si(i,a)),v.state.next({name:p,isDirty:F(p,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else z(a,p,b)},P=(p,b)=>{z(n.errors,p,b),v.state.next({errors:n.errors})},U=(p,b,y,E)=>{const $=C(o,p);if($){const x=C(a,p,X(y)?C(i,p):y);X(x)||E&&E.defaultChecked||b?z(a,p,b?x:li($._f)):_e(p,x),s.mount&&_()}},q=(p,b,y,E,$)=>{let x=!1,A=!1;const H={name:p};if(!y||E){c.isDirty&&(A=n.isDirty,n.isDirty=H.isDirty=F(),x=A!==H.isDirty);const J=st(C(i,p),b);A=C(n.dirtyFields,p),J?ie(n.dirtyFields,p):z(n.dirtyFields,p,!0),H.dirtyFields=n.dirtyFields,x=x||c.dirtyFields&&A!==!J}if(y){const J=C(n.touchedFields,p);J||(z(n.touchedFields,p,y),H.touchedFields=n.touchedFields,x=x||c.touchedFields&&J!==y)}return x&&$&&v.state.next(H),x?H:{}},D=(p,b,y,E)=>{const $=C(n.errors,p),x=c.isValid&&Ye(b)&&n.isValid!==b;if(e.delayError&&y?(u=k(()=>P(p,y)),u(e.delayError)):(clearTimeout(f),u=null,y?z(n.errors,p,y):ie(n.errors,p)),(y?!st($,y):$)||!ye(E)||x){const A={...E,...x&&Ye(b)?{isValid:b}:{},errors:n.errors,name:p};n={...n,...A},v.state.next(A)}O(!1)},M=async p=>r.resolver(a,r.context,fv(p||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),oe=async p=>{const{errors:b}=await M(p);if(p)for(const y of p){const E=C(b,y);E?z(n.errors,y,E):ie(n.errors,y)}else n.errors=b;return b},te=async(p,b,y={valid:!0})=>{for(const E in p){const $=p[E];if($){const{_f:x,...A}=$;if(x){const H=l.array.has(x.name),J=await fs($,a,w,r.shouldUseNativeValidation&&!b,H);if(J[x.name]&&(y.valid=!1,b))break;!b&&(C(J,x.name)?H?lv(n.errors,J,x.name):z(n.errors,x.name,J[x.name]):ie(n.errors,x.name))}A&&await te(A,b,y)}}return y.valid},j=()=>{for(const p of l.unMount){const b=C(o,p);b&&(b._f.refs?b._f.refs.every(y=>!ai(y)):!ai(b._f.ref))&&fi(p)}l.unMount=new Set},F=(p,b)=>(p&&b&&z(a,p,b),!st(ys(),i)),Q=(p,b,y)=>sv(p,l,{...s.mount?a:X(b)?i:Pe(p)?{[p]:b}:b},y,b),fe=p=>Yt(C(s.mount?a:i,p,e.shouldUnregister?C(i,p,[]):[])),_e=(p,b,y={})=>{const E=C(o,p);let $=b;if(E){const x=E._f;x&&(!x.disabled&&z(a,p,ms(b,x)),$=Dr(x.ref)&&ce(b)?"":b,ps(x.ref)?[...x.ref.options].forEach(A=>A.selected=$.includes(A.value)):x.refs?Gt(x.ref)?x.refs.length>1?x.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(H=>H===A.value):$===A.value)):x.refs[0]&&(x.refs[0].checked=!!$):x.refs.forEach(A=>A.checked=A.value===$):ni(x.ref)?x.ref.value="":(x.ref.value=$,x.ref.type||v.values.next({name:p,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&q(p,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&di(p)},Oe=(p,b,y)=>{for(const E in b){const $=b[E],x=`${p}.${E}`,A=C(o,x);(l.array.has(p)||!Lr($)||A&&!A._f)&&!Et($)?Oe(x,$,y):_e(x,$,y)}},lt=(p,b,y={})=>{const E=C(o,p),$=l.array.has(p),x=Fe(b);z(a,p,x),$?(v.array.next({name:p,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&v.state.next({name:p,dirtyFields:si(i,a),isDirty:F(p,x)})):E&&!E._f&&!ce(x)?Oe(p,x,y):_e(p,x,y),os(p,l)&&v.state.next({...n}),v.values.next({name:p,values:{...a}}),!s.mount&&t()},Xt=async p=>{const b=p.target;let y=b.name,E=!0;const $=C(o,y),x=()=>b.type?li($._f):ev(p),A=H=>{E=Number.isNaN(H)||H===C(a,y,H)};if($){let H,J;const Br=x(),At=p.type===ts.BLUR||p.type===ts.FOCUS_OUT,em=!pv($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||hv(At,C(n.touchedFields,y),n.isSubmitted,h,m),hi=os(y,l,At);z(a,y,Br),At?($._f.onBlur&&$._f.onBlur(p),u&&u(0)):$._f.onChange&&$._f.onChange(p);const vi=q(y,Br,At,!1),tm=!ye(vi)||hi;if(!At&&v.values.next({name:y,type:p.type,values:{...a}}),em)return c.isValid&&_(),tm&&v.state.next({name:y,...hi?{}:vi});if(!At&&hi&&v.state.next({...n}),O(!0),r.resolver){const{errors:Es}=await M([y]);if(A(Br),E){const rm=bs(n.errors,o,y),Ps=bs(Es,o,rm.name||y);H=Ps.error,y=Ps.name,J=ye(Es)}}else H=(await fs($,a,w,r.shouldUseNativeValidation))[y],A(Br),E&&(H?J=!1:c.isValid&&(J=await te(o,!0)));E&&($._f.deps&&di($._f.deps),D(y,J,H,vi))}},jr=(p,b)=>{if(C(n.errors,b)&&p.focus)return p.focus(),1},di=async(p,b={})=>{let y,E;const $=ti(p);if(O(!0),r.resolver){const x=await oe(X(p)?p:$);y=ye(x),E=p?!$.some(A=>C(x,A)):y}else p?(E=(await Promise.all($.map(async x=>{const A=C(o,x);return await te(A&&A._f?{[x]:A}:A)}))).every(Boolean),!(!E&&!n.isValid)&&_()):E=y=await te(o);return v.state.next({...!Pe(p)||c.isValid&&y!==n.isValid?{}:{name:p},...r.resolver||!p?{isValid:y}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!E&&Nr(o,jr,p?$:l.mount),E},ys=p=>{const b={...i,...s.mount?a:{}};return X(p)?b:Pe(p)?C(b,p):p.map(y=>C(b,y))},_s=(p,b)=>({invalid:!!C((b||n).errors,p),isDirty:!!C((b||n).dirtyFields,p),isTouched:!!C((b||n).touchedFields,p),error:C((b||n).errors,p)}),Zv=p=>{p&&ti(p).forEach(b=>ie(n.errors,b)),v.state.next({errors:p?n.errors:{}})},ws=(p,b,y)=>{const E=(C(o,p,{_f:{}})._f||{}).ref;z(n.errors,p,{...b,ref:E}),v.state.next({name:p,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},Xv=(p,b)=>Ze(p)?v.values.subscribe({next:y=>p(Q(void 0,b),y)}):Q(p,b,!0),fi=(p,b={})=>{for(const y of p?ti(p):l.mount)l.mount.delete(y),l.array.delete(y),b.keepValue||(ie(o,y),ie(a,y)),!b.keepError&&ie(n.errors,y),!b.keepDirty&&ie(n.dirtyFields,y),!b.keepTouched&&ie(n.touchedFields,y),!r.shouldUnregister&&!b.keepDefaultValue&&ie(i,y);v.values.next({values:{...a}}),v.state.next({...n,...b.keepDirty?{isDirty:F()}:{}}),!b.keepIsValid&&_()},xs=({disabled:p,name:b,field:y,fields:E,value:$})=>{if(Ye(p)){const x=p?void 0:X($)?li(y?y._f:C(E,b)._f):$;z(a,b,x),q(b,x,!1,!1,!0)}},pi=(p,b={})=>{let y=C(o,p);const E=Ye(b.disabled);return z(o,p,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:p}},name:p,mount:!0,...b}}),l.mount.add(p),y?xs({field:y,disabled:b.disabled,name:p}):U(p,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Zt(b.min),max:Zt(b.max),minLength:Zt(b.minLength),maxLength:Zt(b.maxLength),pattern:Zt(b.pattern)}:{},name:p,onChange:Xt,onBlur:Xt,ref:$=>{if($){pi(p,b),y=C(o,p);const x=X($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=dv(x),H=y._f.refs||[];if(A?H.find(J=>J===x):x===y._f.ref)return;z(o,p,{_f:{...y._f,...A?{refs:[...H.filter(ai),x,...Array.isArray(C(i,p))?[{}]:[]],ref:{type:x.type,name:p}}:{ref:x}}}),U(p,!1,void 0,x)}else y=C(o,p,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(rv(l.array,p)&&s.action)&&l.unMount.add(p)}}},ks=()=>r.shouldFocusError&&Nr(o,jr,l.mount),Qv=p=>{Ye(p)&&(v.state.next({disabled:p}),Nr(o,b=>{b.disabled=p},0,!1))},$s=(p,b)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=Fe(a);if(v.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:x}=await M();n.errors=$,E=x}else await te(o);ie(n.errors,"root"),ye(n.errors)?(v.state.next({errors:{}}),await p(E,y)):(b&&await b({...n.errors},y),ks(),setTimeout(ks)),v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ye(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Jv=(p,b={})=>{C(o,p)&&(X(b.defaultValue)?lt(p,C(i,p)):(lt(p,b.defaultValue),z(i,p,b.defaultValue)),b.keepTouched||ie(n.touchedFields,p),b.keepDirty||(ie(n.dirtyFields,p),n.isDirty=b.defaultValue?F(p,C(i,p)):F()),b.keepError||(ie(n.errors,p),c.isValid&&_()),v.state.next({...n}))},Ss=(p,b={})=>{const y=p?Fe(p):i,E=Fe(y),$=p&&!ye(p)?E:i;if(b.keepDefaultValues||(i=y),!b.keepValues){if(b.keepDirtyValues||g)for(const x of l.mount)C(n.dirtyFields,x)?z($,x,C(a,x)):lt(x,C($,x));else{if(ei&&X(p))for(const x of l.mount){const A=C(o,x);if(A&&A._f){const H=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Dr(H)){const J=H.closest("form");if(J){J.reset();break}}}}o={}}a=e.shouldUnregister?b.keepDefaultValues?Fe(i):{}:Fe($),v.array.next({values:{...$}}),v.values.next({values:{...$}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!c.isValid||!!b.keepIsValid,s.watch=!!e.shouldUnregister,v.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!st(p,i)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&p?si(i,p):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Cs=(p,b)=>Ss(Ze(p)?p(a):p,b);return{control:{register:pi,unregister:fi,getFieldState:_s,handleSubmit:$s,setError:ws,_executeSchema:M,_getWatch:Q,_getDirty:F,_updateValid:_,_removeUnmounted:j,_updateFieldArray:I,_updateDisabledField:xs,_getFieldArray:fe,_reset:Ss,_resetDefaultValues:()=>Ze(r.defaultValues)&&r.defaultValues().then(p=>{Cs(p,r.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:p=>{n={...n,...p}},_disableForm:Qv,_subjects:v,_proxyFormState:c,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(p){s=p},get _defaultValues(){return i},get _names(){return l},set _names(p){l=p},get _formState(){return n},set _formState(p){n=p},get _options(){return r},set _options(p){r={...r,...p}}},trigger:di,register:pi,handleSubmit:$s,watch:Xv,setValue:lt,getValues:ys,reset:Cs,resetField:Jv,clearErrors:Zv,unregister:fi,setError:ws,setFocus:(p,b={})=>{const y=C(o,p),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),b.shouldSelect&&$.select())}},getFieldState:_s}}function ci(e={}){const t=xe.useRef(),r=xe.useRef(),[n,o]=xe.useState({isDirty:!1,isValidating:!1,isLoading:Ze(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Ze(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...bv(e,()=>o(a=>({...a}))),formState:n});const i=t.current.control;return i._options=e,av({subject:i._subjects.state,next:a=>{ov(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),xe.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),xe.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),xe.useEffect(()=>{e.values&&!st(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),xe.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=iv(n,i),t.current}var gs=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},gv=function(e,t){var r=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?gs(i.ref,o,e):i.refs&&i.refs.forEach(function(a){return gs(a,o,e)})};for(var n in t.fields)r(n)},yv=function(e,t){t.shouldUseNativeValidation&&gv(e,t);var r={};for(var n in e){var o=C(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(wv(t.names||Object.keys(e),n)){var a=Object.assign({},_v(C(r,n)));z(a,"root",i),z(r,n,a)}else z(r,n,i)}return r},_v=function(e){return Array.isArray(e)?e.filter(Boolean):[]},wv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},xv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var o=n.path.map(function(s){return s.key}).join(".");if(r[o]||(r[o]={message:n.message,type:n.validation}),t){var i=r[o].types,a=i&&i[n.validation];r[o]=ns(o,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},ui=function(e,t,r){return r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(a,s){try{var l=function(){function u(c){return{values:r.raw?n:c,errors:{}}}var f=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(Dt(e,n,f)):Promise.resolve(Us(e,n,f)).then(u)}()}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof Kr)return{values:{},errors:yv(xv(a,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};const kv=27,$v=12,Sv=10,Cv=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},Ev=kr("enum"),Pv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return ui(Te({checked:Vi(Ri(Vs()),r=>Object.entries(r).filter(([n,o])=>o).map(([n,o])=>n),[Mt(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),ji(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Ov=({input:e,onSubmitSuccess:t})=>{var l,u;const r=e.key?(l=T.current$.value.flow)==null?void 0:l.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{checked:n?{}:Ev(r)?Object.fromEntries(r.value.map(f=>[f,!0])):{}},resolver:Pv(e.config)}),s=Jn();return d("form",{noValidate:!0,class:"pr-2.5",onChange:f=>{n&&Cv(f.currentTarget)},onSubmit:i(f=>{const c=f.checked;t({type:"enum",value:c})}),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*kv+5*$v+2*Sv},class:ze("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((f,c)=>{const v=`checked.${f.value}`,{ref:g,...m}=o(v);return d("li",{class:"relative",children:[d("input",{autoFocus:c===0,ref:h=>{h&&c===0&&(s.current=h),g(h)},id:v,...m,class:"peer sr-only h-full",type:"checkbox"}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:v,children:f.label})]},f.value)})}),d("div",{class:"flex flex-col items-center gap-2",children:[!n&&d(St,{}),e.config.minSelected===0&&d(Ct,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(Tr,{error:(u=a.checked)==null?void 0:u.root})})]})},Av=kr("number"),Vr={number:()=>"Please enter a valid number",min:e=>`Please enter a number greater than or equal to ${e}`,max:e=>`Please enter a number less than or equal to ${e}`,decimalCases:e=>`Please enter a number with at most ${e} decimal cases`},Iv=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return ui(Te({number:Wr(Vr.number(),[Gs(t,Vr.min(t)),Ws(r,Vr.max(r)),qs(o=>o===Number(o.toFixed(n)),Vr.decimalCases(n))])}))},Tv=({input:e,onSubmitSuccess:t})=>{var f;const r=e.config.defaultValue,n=e.key?(f=T.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{number:r?Number(r):Av(n)?n.value:void 0},resolver:Iv(e.config)}),{ref:s,...l}=o("number",{required:!e.config.optional,valueAsNumber:!0}),u=L();return he(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},type:"text",min:e.config.min,max:e.config.max,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest [type=number:-webkit-inner-spin-button] w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all [-webkit-outer-spin-button:none]",placeholder:e.config.placeholder}),e.config.optional&&d(Ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(St,{})]}),d(Tr,{error:a.number})]})},Nv=({input:e,onSubmitSuccess:t})=>d("div",{class:"flex flex-col items-center py-3",children:d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})})}),Ot={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"},Dv=ge(Ot.phone,[Ys(/^\+?[0-9 -]+$/,Ot.phone)]),Mv={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Fv=kr("string"),Lv=e=>{const t=`Please enter no more than ${e.maxChars} characters`;return ui(Te({text:{email:ge(Ot.email,[Ks(Ot.email),Mt(e.maxChars??1/0,t)]),phone:Vi(Dv,r=>r.replace(/[^0-9]/g,""),[Mt(e.maxChars??1/0,t)]),text:ge([ji(1,Ot.empty),Mt(e.maxChars??1/0,t)]),url:ge([Zs(Ot.url),Mt(e.maxChars??1/0,t)])}[e.format]}))},Rv=({input:e,onSubmitSuccess:t})=>{var f;const r=e.key?(f=T.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{text:n||(Fv(r)?r.value:"")},resolver:Lv(e.config)}),{ref:s,...l}=o("text",{required:!e.config.optional}),u=L();return he(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{t({type:"string",value:c.text})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{id:"chat-input",...l,...Mv[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},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&&d(Ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(St,{})]}),d(Tr,{error:a.text})]})},Vv=()=>{var o;const e=(o=T.current$.value.flow)==null?void 0:o.data.currentInput,[t,r]=Ih(),n=L(null);return T.inputHeight$.value=r.height,V(()=>{const i=n.current;if(i)return i.addEventListener("transitionstart",Z.scrollToEnd.smooth),i.addEventListener("transitioncancel",Z.scrollToEnd.smooth),i.addEventListener("transitionend",Z.scrollToEnd.smooth),()=>{i.removeEventListener("transitionstart",Z.scrollToEnd.smooth),i.removeEventListener("transitioncancel",Z.scrollToEnd.smooth),i.removeEventListener("transitionend",Z.scrollToEnd.smooth)}},[]),d("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:d("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:qe({input:e}).with({input:Me.nullish},()=>d("div",{class:"flex items-center gap-2 p-2.5",children:[d("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}),d(St,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},i=>d(Rv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"multiple-choice"}},i=>d(Ov,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"boolean"}},i=>d(Kh,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"file"}},i=>d(Jh,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"submit"}},i=>d(Nv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"address"}},i=>d(Bh,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"number"}},i=>d(Tv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).exhaustive()})})},jv=gn("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 relative",{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"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Bv=({children:e,className:t,animate:r,side:n,...o})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:jv({className:t,side:n,animate:r}),...o,children:e}),zv=({className:e,...t})=>(V(()=>{Z.scrollToEnd.smooth()}),d("div",{"aria-hidden":!0,children:Z.isBotTyping$.value===!0?d("div",{"aria-label":"Typing…",class:ze("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),Uv={bot:"left",user:"right"},Hv=gn("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]"}}}),qv=({lastSentMessageFooter:e})=>{var r;const t=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return V(()=>{Z.scrollToEnd.smooth()},[t.length]),d("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,o)=>d(G,{children:d("li",{class:"flex",children:qe(n).with({type:"system"},i=>d("p",{class:Hv({variant:i.variant}),children:i.text})).with({type:"text",author:Me.union("bot","user")},i=>{const a=i.author==="user"&&!t.slice(o+1).some(l=>l.type==="text"&&l.author==="user"),s=o===t.length-1;return d(Bv,{animate:s,side:Uv[i.author],children:[i.text,a?e:null]},o)}).with({type:"link"},i=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("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,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("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=>d("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=>d(Zh,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()})},o)),d(zv,{},"typing")]})},Kv=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=T.current$.value;ke(n,"Flow is required to exist to show chatbot body");const o=T.viewState$.value,{chatRef:i,chatService:a}=Lh(),[s,l]=W();return he(()=>{o==="maximised"&&Z.scrollToEnd.instant()},[o]),he(()=>{const{state:u,flow:f}=T.current$.peek();if(u!=="loaded")throw new Error(Pu.invalid_state);let c=f.data.nodeHistory.at(-1);if(Z.scrollToEnd.instant(),T.setInput(void 0),f.data.isFinished)return;c===void 0?(c=_a(n.nodes).id,T.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:f.data.flowSessionId,flow_build:n.build},customProperties:n.context})):T.removeMessagesSentByNodeIds([c]);const{interpret:v,abort:g,undo:m}=mh({context:n.context,analytics:r,apiClient:t,logger:e,flow:n.nodes,chatService:a,getSubmissions:()=>{var h;return(h=T.current$.peek().flow)==null?void 0:h.data.submissions},onInterpret:(h,w)=>{const k=T.current$.peek().flow;ke(k),w&&(k.data.sequence=k.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:w.id,flow_build:n.build,to_node_id:h.id,sequence:k.data.sequence,flow_session_id:k.data.flowSessionId},customProperties:n.context})),T.setCurrentNodeId(h.id)},onFlowEnd:async()=>{T.markAsFinished();const h=T.current$.peek().flow;ke(h),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:h.data.flowSessionId,flow_build:n.build},customProperties:n.context})}});return l(()=>m),v(c),g},[r,t,a,e,n]),d(G,{children:[d("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:T.inputHeight$.value},children:d(qv,{lastSentMessageFooter:n.data.isFinished||!s?null:d(Gv,{undoFn:s})})}),d(Vv,{})]})},Wv=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],Gv=({undoFn:e})=>d("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:d("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=T.current$.peek();ke(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(T.removeMessagesSentByNodeIds(n),T.setInput(void 0),n.pop(),n.map(o=>t.nodes.find(i=>i.id===o)).filter(Boolean).flatMap(Wv).forEach(o=>delete t.data.submissions[o]),T.current$.value={...T.current$.value})},children:"Undo"})}),Yv=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Kv},Symbol.toStringTag,{value:"Module"}))})();
45
+ }`},Vu=({_internal_domManager:e=Ou(),theme:t})=>Xe(({apiClient:r,logger:n,analytics:o})=>{let i=!1;const a=()=>{if(typeof window>"u")return;const s=[N("style",{id:"inploi-chatbot-styles"},Eu),N("style",{id:"inploi-chatbot-theme"},Ru(t))],l=e.getOrCreateChatbotElement();ut(N(G,{},[s,N(ku,{apiClient:r,logger:n,analytics:o})]),l),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async s=>r.fetch(`/flow/job/${s}`).then(l=>{const u=Dt(Su,l);return{context:{job_id:u.job.id,flow_id:u.flow.id,flow_version:u.flow.version},flow:u.flow,title:`Applying for “${u.job.title}”`,flowKeys:[u.job.id]}}),fetchFlowById:async s=>r.fetch(`/flow/id/${s}`).then(l=>{const u=Dt($u,l);return{flow:u.flow,context:{flow_id:u.flow.id,flow_version:u.flow.version},title:"Chatbot",flowKeys:[]}}),open:async s=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",i||a(),s instanceof Promise?(T.current$.value={state:"loading"},s.then(async l=>{const u=Dt(Cu,l);T.startFlow(u)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";T.current$.value={state:"error",error:u}})):T.startFlow(s)}catch(l){n.error("Error starting flow",l)}},startApplication:void 0,closeApplication:void 0,close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),n.info("Closed flow from an external source"))}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Vu;var Er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ju=Array.isArray,Bn=ju,Bu=typeof Er=="object"&&Er&&Er.Object===Object&&Er,zu=Bu,Uu=zu,Hu=typeof self=="object"&&self&&self.Object===Object&&self,qu=Uu||Hu||Function("return this")(),zn=qu,Ku=zn,Wu=Ku.Symbol,Un=Wu,Aa=Un,Ia=Object.prototype,Gu=Ia.hasOwnProperty,Yu=Ia.toString,Kt=Aa?Aa.toStringTag:void 0;function Zu(e){var t=Gu.call(e,Kt),r=e[Kt];try{e[Kt]=void 0;var n=!0}catch{}var o=Yu.call(e);return n&&(t?e[Kt]=r:delete e[Kt]),o}var Xu=Zu,Qu=Object.prototype,Ju=Qu.toString;function ed(e){return Ju.call(e)}var td=ed,Ta=Un,rd=Xu,nd=td,id="[object Null]",od="[object Undefined]",Na=Ta?Ta.toStringTag:void 0;function ad(e){return e==null?e===void 0?od:id:Na&&Na in Object(e)?rd(e):nd(e)}var Da=ad;function sd(e){return e!=null&&typeof e=="object"}var ld=sd,cd=Da,ud=ld,dd="[object Symbol]";function fd(e){return typeof e=="symbol"||ud(e)&&cd(e)==dd}var Hn=fd,pd=Bn,hd=Hn,vd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,md=/^\w*$/;function bd(e,t){if(pd(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||hd(e)?!0:md.test(e)||!vd.test(e)||t!=null&&e in Object(t)}var gd=bd;function yd(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ma=yd,_d=Da,wd=Ma,xd="[object AsyncFunction]",kd="[object Function]",$d="[object GeneratorFunction]",Sd="[object Proxy]";function Cd(e){if(!wd(e))return!1;var t=_d(e);return t==kd||t==$d||t==xd||t==Sd}var Ed=Cd,Pd=zn,Od=Pd["__core-js_shared__"],Ad=Od,qn=Ad,Fa=function(){var e=/[^.]+$/.exec(qn&&qn.keys&&qn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Id(e){return!!Fa&&Fa in e}var Td=Id,Nd=Function.prototype,Dd=Nd.toString;function Md(e){if(e!=null){try{return Dd.call(e)}catch{}try{return e+""}catch{}}return""}var Fd=Md,Ld=Ed,Rd=Td,Vd=Ma,jd=Fd,Bd=/[\\^$.*+?()[\]{}|]/g,zd=/^\[object .+?Constructor\]$/,Ud=Function.prototype,Hd=Object.prototype,qd=Ud.toString,Kd=Hd.hasOwnProperty,Wd=RegExp("^"+qd.call(Kd).replace(Bd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gd(e){if(!Vd(e)||Rd(e))return!1;var t=Ld(e)?Wd:zd;return t.test(jd(e))}var Yd=Gd;function Zd(e,t){return e==null?void 0:e[t]}var Xd=Zd,Qd=Yd,Jd=Xd;function ef(e,t){var r=Jd(e,t);return Qd(r)?r:void 0}var La=ef,tf=La,rf=tf(Object,"create"),Pr=rf,Ra=Pr;function nf(){this.__data__=Ra?Ra(null):{},this.size=0}var of=nf;function af(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sf=af,lf=Pr,cf="__lodash_hash_undefined__",uf=Object.prototype,df=uf.hasOwnProperty;function ff(e){var t=this.__data__;if(lf){var r=t[e];return r===cf?void 0:r}return df.call(t,e)?t[e]:void 0}var pf=ff,hf=Pr,vf=Object.prototype,mf=vf.hasOwnProperty;function bf(e){var t=this.__data__;return hf?t[e]!==void 0:mf.call(t,e)}var gf=bf,yf=Pr,_f="__lodash_hash_undefined__";function wf(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yf&&t===void 0?_f:t,this}var xf=wf,kf=of,$f=sf,Sf=pf,Cf=gf,Ef=xf;function xt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xt.prototype.clear=kf,xt.prototype.delete=$f,xt.prototype.get=Sf,xt.prototype.has=Cf,xt.prototype.set=Ef;var Pf=xt;function Of(){this.__data__=[],this.size=0}var Af=Of;function If(e,t){return e===t||e!==e&&t!==t}var Tf=If,Nf=Tf;function Df(e,t){for(var r=e.length;r--;)if(Nf(e[r][0],t))return r;return-1}var Or=Df,Mf=Or,Ff=Array.prototype,Lf=Ff.splice;function Rf(e){var t=this.__data__,r=Mf(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Lf.call(t,r,1),--this.size,!0}var Vf=Rf,jf=Or;function Bf(e){var t=this.__data__,r=jf(t,e);return r<0?void 0:t[r][1]}var zf=Bf,Uf=Or;function Hf(e){return Uf(this.__data__,e)>-1}var qf=Hf,Kf=Or;function Wf(e,t){var r=this.__data__,n=Kf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Gf=Wf,Yf=Af,Zf=Vf,Xf=zf,Qf=qf,Jf=Gf;function kt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}kt.prototype.clear=Yf,kt.prototype.delete=Zf,kt.prototype.get=Xf,kt.prototype.has=Qf,kt.prototype.set=Jf;var ep=kt,tp=La,rp=zn,np=tp(rp,"Map"),ip=np,Va=Pf,op=ep,ap=ip;function sp(){this.size=0,this.__data__={hash:new Va,map:new(ap||op),string:new Va}}var lp=sp;function cp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var up=cp,dp=up;function fp(e,t){var r=e.__data__;return dp(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ar=fp,pp=Ar;function hp(e){var t=pp(this,e).delete(e);return this.size-=t?1:0,t}var vp=hp,mp=Ar;function bp(e){return mp(this,e).get(e)}var gp=bp,yp=Ar;function _p(e){return yp(this,e).has(e)}var wp=_p,xp=Ar;function kp(e,t){var r=xp(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var $p=kp,Sp=lp,Cp=vp,Ep=gp,Pp=wp,Op=$p;function $t(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}$t.prototype.clear=Sp,$t.prototype.delete=Cp,$t.prototype.get=Ep,$t.prototype.has=Pp,$t.prototype.set=Op;var Ap=$t,ja=Ap,Ip="Expected a function";function Kn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ip);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Kn.Cache||ja),r}Kn.Cache=ja;var Tp=Kn,Np=Tp,Dp=500;function Mp(e){var t=Np(e,function(n){return r.size===Dp&&r.clear(),n}),r=t.cache;return t}var Fp=Mp,Lp=Fp,Rp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vp=/\\(\\)?/g,jp=Lp(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Rp,function(r,n,o,i){t.push(o?i.replace(Vp,"$1"):n||r)}),t}),Bp=jp;function zp(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Up=zp,Ba=Un,Hp=Up,qp=Bn,Kp=Hn,Wp=1/0,za=Ba?Ba.prototype:void 0,Ua=za?za.toString:void 0;function Ha(e){if(typeof e=="string")return e;if(qp(e))return Hp(e,Ha)+"";if(Kp(e))return Ua?Ua.call(e):"";var t=e+"";return t=="0"&&1/e==-Wp?"-0":t}var Gp=Ha,Yp=Gp;function Zp(e){return e==null?"":Yp(e)}var Xp=Zp,Qp=Bn,Jp=gd,eh=Bp,th=Xp;function rh(e,t){return Qp(e)?e:Jp(e,t)?[e]:eh(th(e))}var nh=rh,ih=Hn,oh=1/0;function ah(e){if(typeof e=="string"||ih(e))return e;var t=e+"";return t=="0"&&1/e==-oh?"-0":t}var sh=ah,lh=nh,ch=sh;function uh(e,t){t=lh(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[ch(t[r++])];return r&&r==n?e:void 0}var dh=uh,fh=dh;function ph(e,t,r){var n=e==null?void 0:fh(e,t);return n===void 0?r:n}var hh=ph;const Wn=Oa(hh),Wt=(e,t)=>{const[r,...n]=e.data.compareKey.split(".");if(!r)return!1;const o=t==null?void 0:t[r];if(!o)return!1;switch(o.type){case"address":{const i=Wn(o.value,n.join("."));switch(e.data.compare){case"equals":return i===e.data.compareValue;case"contains":return i?i.includes(e.data.compareValue):!1;case"notEquals":return i!==e.data.compareValue;case"notContains":return i?!i.includes(e.data.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const i=Wn(o.value,n.join(".")),a={...e,data:{...e.data,compareKey:"_temp"}};switch(typeof i){case"boolean":return Wt(a,{_temp:{value:i,type:"boolean"}});case"string":return Wt(a,{_temp:{value:i,type:"string"}});case"number":return Wt(a,{_temp:{value:i,type:"number"}});case"object":return Array.isArray(i)&&i.every(xa)?Wt(a,{_temp:{value:i,type:"enum"}}):!1}break}case"boolean":{const i=e.data.compareValue==="true";switch(e.data.compare){case"equals":return o.value===i;case"notEquals":return o.value!==i}break}case"string":switch(e.data.compare){case"equals":return o.value===e.data.compareValue;case"contains":return o.value?o.value.includes(e.data.compareValue):!1;case"notEquals":return o.value!==e.data.compareValue;case"notContains":return o.value?!o.value.includes(e.data.compareValue):!0}break;case"number":{try{const i=Number(e.data.compareValue);switch(e.data.compare){case"equals":return o.value===i;case"notEquals":return o.value!==i;case"greaterThan":return o.value>i;case"greaterThanOrEqualTo":return o.value>=i;case"lessThan":return o.value<i;case"lessThanOrEqualTo":return o.value<=i}}catch{return console.error(`Failed to parse number in if-block ${e.id}`,o.value),!1}break}case"enum":switch(e.data.compare){case"equals":return o.value.length===1&&o.value[0]===e.data.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.data.compareValue;case"contains":return o.value.includes(e.data.compareValue);case"notContains":return!o.value.includes(e.data.compareValue)}break}return!1},qa=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(n)return qa({node:n,nodes:t,stopWhen:r})},vh=({childNode:e,nodes:t})=>{const n=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(s=>s.id===o.branchId);if(!i)return!1;const a=qa({node:i,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(o=>o.id===n.nextId)},mh=({flow:e,analytics:t,logger:r,context:n,apiClient:o,getSubmissions:i,chatService:a,onFlowEnd:s,onInterpret:l})=>{let u=new AbortController;const f=async(c,v)=>{const g=i();l==null||l(c,v);try{await bh({analytics:t,logger:r,apiClient:o,context:n,node:c,submissions:g,chat:{sendMessage:async m=>a.send({groupId:c.id,message:m,signal:u.signal}),userInput:async m=>a.input({input:m,signal:u.signal}),addToSubmissions:a.addToSubmissions},next:m=>{const h=m?e.find(w=>w.id===m):vh({childNode:c,nodes:e});return h?f(h,c):s==null?void 0:s(c)},end:()=>s==null?void 0:s(c)})}catch(m){if(m instanceof Ut)return;throw m}};return{interpret:async c=>{const v=e.find(g=>g.id===c)??_a(e);return f(v)},undo:c=>{let v=1;const g=e.find(h=>h.id===c[c.length-1]);for(let h=c.length-2;h>0;h--){const w=c[h],k=e.find(_=>_.id===w);if(!k||(v++,k.type.startsWith("question-")))break}u.abort(),u=new AbortController;const m=e.find(h=>h.id===c[c.length-v]);return ke(m,"Undo failed: new start node not found"),f(m,g),{removed:v}},abort:()=>{u.abort()}}};async function bh(e){return await qe(e).with({node:{type:"text"}},wh).with({node:{type:"image"}},xh).with({node:{type:"question-text"}},kh).with({node:{type:"question-enum"}},Sh).with({node:{type:"question-number"}},$h).with({node:{type:"question-boolean"}},Ch).with({node:{type:"question-file"}},Ph).with({node:{type:"question-address"}},Eh).with({node:{type:"end-flow"}},Oh).with({node:{type:"if-block"}},_h).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},yh).with({node:{type:"integration-application-submit"}},gh).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function gh({chat:e,next:t,node:r,logger:n,apiClient:o,submissions:i,context:a,analytics:s}){const l=async u=>{u!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"system",variant:"info",text:"Submitting…"});const{anonymous_id:f,session_id:c}=s.getSessionInfo(),v=await o.fetch("/flow/submit",{method:"POST",body:JSON.stringify({...a,integration_id:r.data.integrationId,anonymous_id:f,session_id:c,submissions:fu(i||{})})}).catch(g=>g);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:v}),await qe(v).with({ats_data:{redirect_url:Pe.string}},async g=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const m=new URL(g.ats_data.redirect_url);f&&!m.searchParams.has("anonymous_id")&&m.searchParams.set("anonymous_id",f),await e.sendMessage({type:"link",href:m.toString(),text:"Complete submission"}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with({sucess:!1,ats_data:{message:Pe.string}},async g=>{n.error(g.ats_data),await e.sendMessage({type:"system",variant:"error",text:g.ats_data.message}),await l(!1)}).otherwise(async g=>{n.error(g),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await l(!1)})};await l(r.data.skipConfirmation)}async function yh({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({type:"link",href:r.data.href,text:at(r.data.cta,n)}),t(r.nextId)}async function _h({submissions:e,next:t,node:r}){t(Wt(r,e)?r.branchId:r.nextId)}async function wh({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.text,n)}),t(r.nextId)}async function xh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function kh({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value}),t(r.nextId)}async function $h({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Sh({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(i=>o.value.includes(i.value)).map(i=>i.label).join(", ")}),t(r.nextId)}async function Ch({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:at(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Eh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const o=Object.values(n.value).filter(i=>i&&i.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:o})}return t(r.nextId)}async function Ph({node:e,chat:t,next:r,submissions:n}){await t.sendMessage({author:"bot",type:"text",text:at(e.data.question,n)});const o=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(o===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const i of o.value)await t.sendMessage({author:"user",type:"file",fileName:i.name,fileSizeKb:i.sizeKb});r(e.nextId)}async function Oh({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const at=(e,t)=>{const r=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(r,(n,o,i="")=>{const[a,...s]=o.trim().split("."),l=t==null?void 0:t[a];if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${zt(u.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const u=Wn(l.value,s.join("."));switch(typeof u){case"boolean":return u===!0?"true":"false";case"string":return u;case"number":return u.toString();case"object":if(Array.isArray(u)&&u.every(xa))return u.join(", ")}break}}return i})};function Gn(e,t,r){var n,o,i,a,s;t==null&&(t=100);function l(){var f=Date.now()-a;f<t&&f>=0?n=setTimeout(l,t-f):(n=null,r||(s=e.apply(i,o),i=o=null))}var u=function(){i=this,o=arguments,a=Date.now();var f=r&&!n;return n||(n=setTimeout(l,t)),f&&(s=e.apply(i,o),i=o=null),s};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},u}Gn.debounce=Gn;var Ah=Gn;const Ka=Oa(Ah);function Ih(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=W({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=L({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,c=L(!1);V(()=>(c.current=!0,()=>void(c.current=!1)));const[v,g,m]=se(()=>{const _=()=>{if(!l.current.element)return;const{left:O,top:I,width:P,height:U,bottom:q,right:D,x:M,y:oe}=l.current.element.getBoundingClientRect(),te={left:O,top:I,width:P,height:U,bottom:q,right:D,x:M,y:oe};l.current.element instanceof HTMLElement&&o&&(te.height=l.current.element.offsetHeight,te.width=l.current.element.offsetWidth),Object.freeze(te),c.current&&!Mh(l.current.lastBounds,te)&&s(l.current.lastBounds=te)};return[_,f?Ka(_,f):_,u?Ka(_,u):_]},[s,o,u,f]);function h(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",m,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function w(){l.current.element&&(l.current.resizeObserver=new i(m),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",m,{capture:!0,passive:!0})))}const k=_=>{!_||_===l.current.element||(h(),l.current.element=_,l.current.scrollContainers=Wa(_),w())};return Nh(m,!!r),Th(g),V(()=>{h(),w()},[r,m,g]),V(()=>h,[]),[k,a,v]}function Th(e){V(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Nh(e,t){V(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Wa(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Wa(e.parentElement)]}const Dh=["x","y","top","bottom","left","right","width","height"],Mh=(e,t)=>Dh.every(r=>e[r]===t[r]),St=({class:e,...t})=>d("button",{class:ze("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:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:"Send"}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})}),Fh=25,Yn=Ke({instant:()=>{},smooth:()=>{}}),Z={onSubmitSuccessFn$:Ke(()=>{}),isBotTyping$:Ke(!1),scrollToEnd:{instant:()=>Yn.value.instant(),smooth:()=>Yn.value.smooth()}},Lh=()=>{const e=L(null);he(()=>{Yn.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*1.5&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=se(()=>({addToSubmissions:(n,o)=>T.setSubmission(n,o),send:async({message:n,signal:o,groupId:i})=>{if(await qe(n).with({author:"bot",type:"text"},async a=>{if(o!=null&&o.aborted)throw new Ut;Z.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*Fh;await new Promise(l=>setTimeout(l,s,{signal:o})),Z.isBotTyping$.value=!1}).otherwise(async()=>{}),o!=null&&o.aborted)throw new Ut;T.addMessage(n,i)},input:({input:n,signal:o})=>{if(o!=null&&o.aborted)throw new Ut;return T.setInput(n),new Promise(i=>{const a=s=>{if(o!=null&&o.aborted)throw new Ut;T.setInput(void 0),n.key&&T.setSubmission(n.key,s),i(s)};Z.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},Ct=({class:e,...t})=>d("button",{type:"button",class:ze("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:[d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:"Skip"}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Ga=["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Caribbean Netherlands","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Cook Islands","Costa Rica","Croatia","Cuba","Curaçao","Cyprus","Czechia","Côte d'Ivoire","Democratic Republic of the Congo","Denmark","Djibouti","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Falkland Islands (Islas Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern and Antarctic Lands","Gabon","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macao","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar (Burma)","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Rwanda","Réunion","Saint Barthélemy","Saint Helena, Ascension and Tristan da Cunha","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Sweden","Switzerland","Syria","São Tomé and Príncipe","Taiwan","Tajikistan","Tanzania","Thailand","The Bahamas","The Gambia","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkmenistan","Turks and Caicos Islands","Tuvalu","Türkiye","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe","Åland Islands"],Ya={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"]},Ir=Object.keys(Ya),Rh=e=>Ir.reduce((t,r)=>{const n=Ya[r],o=e.filter(i=>i.types.some(a=>n.includes(a))).map(i=>i.long_name).join(", ");return o&&(t[r]=o),t},{}),Vh=document.createElement("div"),jh=()=>se(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(Vh);return{enabled:!0,getPredictions:async n=>{const{predictions:o}=await t.getPlacePredictions({input:n,language:"en"});return o.map(i=>({label:i.description,value:i.place_id}))},getPlaceDetails:async n=>await new Promise((i,a)=>r.getDetails({placeId:n,fields:["address_components"],language:"en"},(s,l)=>l!==e.maps.places.PlacesServiceStatus.OK?a(l):s===null?a("ZERO_RESULTS"):i({ok:!0,place:s}))).catch(async i=>(console.error("Failed to get address details",i),{ok:!1}))}},[]),Zn=e=>d("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:"Back"})]}),Xn={label:"Fill in manually",value:""},Bh=({input:e,onSubmitSuccess:t})=>{const[r,n]=W(""),[o,i]=W(),[a,s]=W([]),[l,u]=W(),{enabled:f,getPredictions:c,getPlaceDetails:v}=jh(),[g,m]=W(f?"query":"manual"),h=se(()=>wa(w=>{ke(f,"Query state should not be enabled if Google Places isn't available"),n(w),w===""&&s([]),!(w.length<3)&&c(w).then(k=>{s(k)})},500),[f,c]);switch(V(()=>{if(f&&!(l===void 0||l===""))return v(l).then(w=>{if(!w.ok||!w.place.address_components){i({});return}const k=Rh(w.place.address_components);i(k),m("details")}),()=>{i(void 0)}},[l,v,f]),g){case"query":return ke(f,"Query state should not be enabled if Google Places isn't available"),d(zh,{input:e,onSkip:()=>t(null),onAddressSelect:w=>{u(w),m("loading")},onInputChange:h,suggestions:a,query:r});case"loading":return d(Qn,{input:e,onSubmitSuccess:t,addressFields:{},actions:d(Zn,{onClick:()=>{u(void 0),m("query")}})});case"details":return ke(o!==void 0),d(Qn,{input:e,onSubmitSuccess:t,addressFields:o,actions:d(Zn,{onClick:()=>{u(void 0),m("query")}})});case"manual":return d(Qn,{input:e,onSubmitSuccess:t,addressFields:{},actions:f?d(Zn,{onClick:()=>{u(void 0),m("query")}}):void 0})}},zh=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:o,onInputChange:i})=>{const a=L(null);return he(()=>{a.current&&(a.current.focus(),a.current.select())},[]),d(G,{children:[d("form",{noValidate:!0,onSubmit:s=>{s.preventDefault()},class:"flex flex-col justify-end gap-1 p-2.5",children:[d("input",{onChange:s=>{i(s.currentTarget.value)},ref:a,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,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||"Search an address",defaultValue:o}),e.config.optional&&d(Ct,{class:"absolute right-3",onClick:t})]}),d("ul",{children:[r.map(s=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(s.value)},children:[d("span",{class:"flex-grow",children:s.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(Xn.value)},children:d("span",{class:"flex-grow",children:Xn.label})})},Xn.label)]})]})},Uh={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},Qn=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const o=L(null);return he(()=>{if(o.current){const i=o.current.querySelector("input");i&&(i.focus(),i.select())}},[]),d("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:i=>{const a=new FormData(i.currentTarget),s=Object.fromEntries(a.entries());t({type:"address",value:s})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:o,children:Ir.map((i,a)=>{const s=`isdk_${i}`,l=n.config.keys[i];return l?d(G,{children:[d("label",{for:s,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:Uh[i]}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[i==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:l,id:s,defaultValue:e[i],required:!0,children:[e.country&&!Ga.includes(e.country)?d("option",{value:e[i],children:e[i]}):d("option",{value:"",children:"Select a country"}),Ga.map(u=>d("option",{value:u,children:u},u))]}),d("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:a===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:l,id:s,defaultValue:e[i],required:!0}),a!==Ir.length-1&&d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),a===Ir.length-1&&d("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),d("div",{class:"flex w-full flex-1 ",children:[d("div",{class:"flex-grow",children:r}),d(St,{class:"flex items-center justify-center"})]})]})},Jn=()=>{const e=L(null);return V(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Za=["true","false"],Hh=js(Za),qh="answer",Kh=({input:e,onSubmitSuccess:t})=>{const r=Jn();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const o=qe(n).with({nativeEvent:{submitter:Pe.select(Pe.union(Pe.instanceOf(HTMLButtonElement),Pe.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),i=Dt(Hh,o);t({type:"boolean",value:i==="true"})},children:[d("div",{class:"flex items-center gap-2 p-2.5",children:Za.map((n,o)=>d("button",{ref:o===0?r:null,type:"submit",name:qh,value:n,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:d("p",{class:"truncate text-center text-base",children:e.config.labels[n]})}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(Ct,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Tr=({error:e})=>e?d("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[d("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null,Wh=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),Gh=e=>e.reduce((t,r)=>t+r.sizeKb,0),Yh=kr("file"),Xa=3,Zh=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${n}$`),"");return d("div",{class:ze("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"block truncate",children:o}),d("span",{children:[".",n]})]}),d("p",{"aria-label":"File size",class:"text-accent-11",children:zt(e.sizeKb)})]})},Qa=({class:e,...t})=>d("li",{class:ze("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Ja=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Xh=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(Ja(n.name).toLowerCase()))},Qh=(e,t)=>{const r=Ja(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},Jh=({input:e,onSubmitSuccess:t})=>{var f;const r=(f=T.current$.value.flow)==null?void 0:f.data.submissions[e.key],[n,o]=W(Yh(r)?r.value:[]),[i,a]=W(),s=n.length-Xa,l=Gh(n),u=Jn();return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:c=>(c.preventDefault(),a(void 0),n.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!Xh({allowedExtensions:e.config.extensions,files:n})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${zt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?a({type:"invalid",message:"Only one file is allowed"}):t({type:"file",value:n})),children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:u,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:[n.length>0?d(G,{children:[d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,Xa).map(c=>{const v=c.name.split(".").pop(),g=c.name.replace(new RegExp(`.${v}$`),"");return d(Qa,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:g}),d("span",{children:[".",v]})]})}),s>0?d(Qa,{children:["+",s," file",s!==1?"s":""]}):null]}),d("p",{class:"text-neutral-11 text-xs",children:[zt(l)," ",n.length>1?"total":""]})]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("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:d("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"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-10 text-xs",children:["(max ",zt(e.config.fileSizeLimitKib),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>d("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:c.replace(".","")}))})]})]}),d("input",{id:"dropzone-file",onInput:async c=>{ke(c.target instanceof HTMLInputElement);const v=c.target.files?Array.from(c.target.files):[],g=await Promise.allSettled(v.map(async h=>{const w=await Wh(h);return{name:Qh(h.name,42),data:w,sizeKb:h.size/1e3}}));if(g.some(({status:h})=>h==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=g.map(h=>h.status==="fulfilled"?h.value:null).filter(Boolean);o(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(St,{disabled:n.length===0}),e.config.optional&&d(Ct,{onClick:()=>t(null)})]})]}),d(Tr,{error:i})]})};var Gt=e=>e.type==="checkbox",Et=e=>e instanceof Date,ce=e=>e==null;const es=e=>typeof e=="object";var ee=e=>!ce(e)&&!Array.isArray(e)&&es(e)&&!Et(e),ev=e=>ee(e)&&e.target?Gt(e.target)?e.target.checked:e.target.value:e,tv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rv=(e,t)=>e.has(tv(t)),nv=e=>{const t=e.constructor&&e.constructor.prototype;return ee(t)&&t.hasOwnProperty("isPrototypeOf")},ei=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Fe(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ei&&(e instanceof Blob||e instanceof FileList))&&(r||ee(e)))if(t=r?[]:{},!r&&!nv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Fe(e[n]));else return e;return t}var Yt=e=>Array.isArray(e)?e.filter(Boolean):[],X=e=>e===void 0,C=(e,t,r)=>{if(!t||!ee(e))return r;const n=Yt(t.split(/[,[\].]+?/)).reduce((o,i)=>ce(o)?o:o[i],e);return X(n)||n===e?X(e[t])?r:e[t]:n},Ye=e=>typeof e=="boolean";const ts={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Le={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};xe.createContext(null);var iv=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==$e.all&&(t._proxyFormState[a]=!n||$e.all),r&&(r[a]=!0),e[a]}});return o},ye=e=>ee(e)&&!Object.keys(e).length,ov=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return ye(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!n||$e.all))},ti=e=>Array.isArray(e)?e:[e];function av(e){const t=xe.useRef(e);t.current=e,xe.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Oe=e=>typeof e=="string",sv=(e,t,r,n,o)=>Oe(e)?(n&&t.watch.add(e),C(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),C(r,i))):(n&&(t.watchAll=!0),r),ri=e=>/^\w*$/.test(e),rs=e=>Yt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function z(e,t,r){let n=-1;const o=ri(t)?[t]:rs(t),i=o.length,a=i-1;for(;++n<i;){const s=o[n];let l=r;if(n!==a){const u=e[s];l=ee(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var ns=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},is=e=>({isOnSubmit:!e||e===$e.onSubmit,isOnBlur:e===$e.onBlur,isOnChange:e===$e.onChange,isOnAll:e===$e.all,isOnTouch:e===$e.onTouched}),os=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Nr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=C(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else ee(s)&&Nr(s,t)}}};var lv=(e,t,r)=>{const n=Yt(C(e,r));return z(n,"root",t[r]),z(e,r,n),e},ni=e=>e.type==="file",Ze=e=>typeof e=="function",Dr=e=>{if(!ei)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Mr=e=>Oe(e),ii=e=>e.type==="radio",Fr=e=>e instanceof RegExp;const as={value:!1,isValid:!1},ss={value:!0,isValid:!0};var ls=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!X(e[0].attributes.value)?X(e[0].value)||e[0].value===""?ss:{value:e[0].value,isValid:!0}:ss:as}return as};const cs={isValid:!1,value:null};var us=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,cs):cs;function ds(e,t,r="validate"){if(Mr(e)||Array.isArray(e)&&e.every(Mr)||Ye(e)&&!e)return{type:r,message:Mr(e)?e:"",ref:t}}var Pt=e=>ee(e)&&!Fr(e)?e:{value:e,message:""},fs=async(e,t,r,n,o)=>{const{ref:i,refs:a,required:s,maxLength:l,minLength:u,min:f,max:c,pattern:v,validate:g,name:m,valueAsNumber:h,mount:w,disabled:k}=e._f,_=C(t,m);if(!w||k)return{};const O=a?a[0]:i,I=j=>{n&&O.reportValidity&&(O.setCustomValidity(Ye(j)?"":j||""),O.reportValidity())},P={},U=ii(i),q=Gt(i),D=U||q,M=(h||ni(i))&&X(i.value)&&X(_)||Dr(i)&&i.value===""||_===""||Array.isArray(_)&&!_.length,oe=ns.bind(null,m,r,P),te=(j,F,Q,fe=Le.maxLength,_e=Le.minLength)=>{const Ae=j?F:Q;P[m]={type:j?fe:_e,message:Ae,ref:i,...oe(j?fe:_e,Ae)}};if(o?!Array.isArray(_)||!_.length:s&&(!D&&(M||ce(_))||Ye(_)&&!_||q&&!ls(a).isValid||U&&!us(a).isValid)){const{value:j,message:F}=Mr(s)?{value:!!s,message:s}:Pt(s);if(j&&(P[m]={type:Le.required,message:F,ref:O,...oe(Le.required,F)},!r))return I(F),P}if(!M&&(!ce(f)||!ce(c))){let j,F;const Q=Pt(c),fe=Pt(f);if(!ce(_)&&!isNaN(_)){const _e=i.valueAsNumber||_&&+_;ce(Q.value)||(j=_e>Q.value),ce(fe.value)||(F=_e<fe.value)}else{const _e=i.valueAsDate||new Date(_),Ae=jr=>new Date(new Date().toDateString()+" "+jr),lt=i.type=="time",Xt=i.type=="week";Oe(Q.value)&&_&&(j=lt?Ae(_)>Ae(Q.value):Xt?_>Q.value:_e>new Date(Q.value)),Oe(fe.value)&&_&&(F=lt?Ae(_)<Ae(fe.value):Xt?_<fe.value:_e<new Date(fe.value))}if((j||F)&&(te(!!j,Q.message,fe.message,Le.max,Le.min),!r))return I(P[m].message),P}if((l||u)&&!M&&(Oe(_)||o&&Array.isArray(_))){const j=Pt(l),F=Pt(u),Q=!ce(j.value)&&_.length>+j.value,fe=!ce(F.value)&&_.length<+F.value;if((Q||fe)&&(te(Q,j.message,F.message),!r))return I(P[m].message),P}if(v&&!M&&Oe(_)){const{value:j,message:F}=Pt(v);if(Fr(j)&&!_.match(j)&&(P[m]={type:Le.pattern,message:F,ref:i,...oe(Le.pattern,F)},!r))return I(F),P}if(g){if(Ze(g)){const j=await g(_,t),F=ds(j,O);if(F&&(P[m]={...F,...oe(Le.validate,F.message)},!r))return I(F.message),P}else if(ee(g)){let j={};for(const F in g){if(!ye(j)&&!r)break;const Q=ds(await g[F](_,t),O,F);Q&&(j={...Q,...oe(F,Q.message)},I(Q.message),r&&(P[m]=j))}if(!ye(j)&&(P[m]={ref:O,...j},!r))return P}}return I(!0),P};function cv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=X(e)?n++:e[t[n++]];return e}function uv(e){for(const t in e)if(e.hasOwnProperty(t)&&!X(e[t]))return!1;return!0}function ie(e,t){const r=Array.isArray(t)?t:ri(t)?[t]:rs(t),n=r.length===1?e:cv(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(ee(n)&&ye(n)||Array.isArray(n)&&uv(n))&&ie(e,r.slice(0,-1)),e}function oi(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Lr=e=>ce(e)||!es(e);function st(e,t){if(Lr(e)||Lr(t))return e===t;if(Et(e)&&Et(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Et(i)&&Et(a)||ee(i)&&ee(a)||Array.isArray(i)&&Array.isArray(a)?!st(i,a):i!==a)return!1}}return!0}var ps=e=>e.type==="select-multiple",dv=e=>ii(e)||Gt(e),ai=e=>Dr(e)&&e.isConnected,hs=e=>{for(const t in e)if(Ze(e[t]))return!0;return!1};function Rr(e,t={}){const r=Array.isArray(e);if(ee(e)||r)for(const n in e)Array.isArray(e[n])||ee(e[n])&&!hs(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Rr(e[n],t[n])):ce(e[n])||(t[n]=!0);return t}function vs(e,t,r){const n=Array.isArray(e);if(ee(e)||n)for(const o in e)Array.isArray(e[o])||ee(e[o])&&!hs(e[o])?X(t)||Lr(r[o])?r[o]=Array.isArray(e[o])?Rr(e[o],[]):{...Rr(e[o])}:vs(e[o],ce(t)?{}:t[o],r[o]):r[o]=!st(e[o],t[o]);return r}var si=(e,t)=>vs(e,t,Rr(t)),ms=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>X(e)?e:t?e===""?NaN:e&&+e:r&&Oe(e)?new Date(e):n?n(e):e;function li(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return ni(t)?t.files:ii(t)?us(e.refs).value:ps(t)?[...t.selectedOptions].map(({value:r})=>r):Gt(t)?ls(e.refs).value:ms(X(t.value)?e.ref.value:t.value,e)}var fv=(e,t,r,n)=>{const o={};for(const i of e){const a=C(t,i);a&&z(o,i,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Zt=e=>X(e)?e:Fr(e)?e.source:ee(e)?Fr(e.value)?e.value.source:e.value:e,pv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function bs(e,t,r){const n=C(e,r);if(n||ri(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),a=C(t,i),s=C(e,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:r}}var hv=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,vv=(e,t)=>!Yt(C(e,t)).length&&ie(e,t);const mv={mode:$e.onSubmit,reValidateMode:$e.onChange,shouldFocusError:!0};function bv(e={},t){let r={...mv,...e},n={submitCount:0,isDirty:!1,isLoading:Ze(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=ee(r.defaultValues)||ee(r.values)?Fe(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:Fe(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,f=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:oi(),array:oi(),state:oi()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,m=is(r.mode),h=is(r.reValidateMode),w=r.criteriaMode===$e.all,k=p=>b=>{clearTimeout(f),f=setTimeout(p,b)},_=async p=>{if(c.isValid||p){const b=r.resolver?ye((await M()).errors):await te(o,!0);b!==n.isValid&&v.state.next({isValid:b})}},O=p=>c.isValidating&&v.state.next({isValidating:p}),I=(p,b=[],y,E,$=!0,x=!0)=>{if(E&&y){if(s.action=!0,x&&Array.isArray(C(o,p))){const A=y(C(o,p),E.argA,E.argB);$&&z(o,p,A)}if(x&&Array.isArray(C(n.errors,p))){const A=y(C(n.errors,p),E.argA,E.argB);$&&z(n.errors,p,A),vv(n.errors,p)}if(c.touchedFields&&x&&Array.isArray(C(n.touchedFields,p))){const A=y(C(n.touchedFields,p),E.argA,E.argB);$&&z(n.touchedFields,p,A)}c.dirtyFields&&(n.dirtyFields=si(i,a)),v.state.next({name:p,isDirty:F(p,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else z(a,p,b)},P=(p,b)=>{z(n.errors,p,b),v.state.next({errors:n.errors})},U=(p,b,y,E)=>{const $=C(o,p);if($){const x=C(a,p,X(y)?C(i,p):y);X(x)||E&&E.defaultChecked||b?z(a,p,b?x:li($._f)):_e(p,x),s.mount&&_()}},q=(p,b,y,E,$)=>{let x=!1,A=!1;const H={name:p};if(!y||E){c.isDirty&&(A=n.isDirty,n.isDirty=H.isDirty=F(),x=A!==H.isDirty);const J=st(C(i,p),b);A=C(n.dirtyFields,p),J?ie(n.dirtyFields,p):z(n.dirtyFields,p,!0),H.dirtyFields=n.dirtyFields,x=x||c.dirtyFields&&A!==!J}if(y){const J=C(n.touchedFields,p);J||(z(n.touchedFields,p,y),H.touchedFields=n.touchedFields,x=x||c.touchedFields&&J!==y)}return x&&$&&v.state.next(H),x?H:{}},D=(p,b,y,E)=>{const $=C(n.errors,p),x=c.isValid&&Ye(b)&&n.isValid!==b;if(e.delayError&&y?(u=k(()=>P(p,y)),u(e.delayError)):(clearTimeout(f),u=null,y?z(n.errors,p,y):ie(n.errors,p)),(y?!st($,y):$)||!ye(E)||x){const A={...E,...x&&Ye(b)?{isValid:b}:{},errors:n.errors,name:p};n={...n,...A},v.state.next(A)}O(!1)},M=async p=>r.resolver(a,r.context,fv(p||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),oe=async p=>{const{errors:b}=await M(p);if(p)for(const y of p){const E=C(b,y);E?z(n.errors,y,E):ie(n.errors,y)}else n.errors=b;return b},te=async(p,b,y={valid:!0})=>{for(const E in p){const $=p[E];if($){const{_f:x,...A}=$;if(x){const H=l.array.has(x.name),J=await fs($,a,w,r.shouldUseNativeValidation&&!b,H);if(J[x.name]&&(y.valid=!1,b))break;!b&&(C(J,x.name)?H?lv(n.errors,J,x.name):z(n.errors,x.name,J[x.name]):ie(n.errors,x.name))}A&&await te(A,b,y)}}return y.valid},j=()=>{for(const p of l.unMount){const b=C(o,p);b&&(b._f.refs?b._f.refs.every(y=>!ai(y)):!ai(b._f.ref))&&fi(p)}l.unMount=new Set},F=(p,b)=>(p&&b&&z(a,p,b),!st(ys(),i)),Q=(p,b,y)=>sv(p,l,{...s.mount?a:X(b)?i:Oe(p)?{[p]:b}:b},y,b),fe=p=>Yt(C(s.mount?a:i,p,e.shouldUnregister?C(i,p,[]):[])),_e=(p,b,y={})=>{const E=C(o,p);let $=b;if(E){const x=E._f;x&&(!x.disabled&&z(a,p,ms(b,x)),$=Dr(x.ref)&&ce(b)?"":b,ps(x.ref)?[...x.ref.options].forEach(A=>A.selected=$.includes(A.value)):x.refs?Gt(x.ref)?x.refs.length>1?x.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(H=>H===A.value):$===A.value)):x.refs[0]&&(x.refs[0].checked=!!$):x.refs.forEach(A=>A.checked=A.value===$):ni(x.ref)?x.ref.value="":(x.ref.value=$,x.ref.type||v.values.next({name:p,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&q(p,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&di(p)},Ae=(p,b,y)=>{for(const E in b){const $=b[E],x=`${p}.${E}`,A=C(o,x);(l.array.has(p)||!Lr($)||A&&!A._f)&&!Et($)?Ae(x,$,y):_e(x,$,y)}},lt=(p,b,y={})=>{const E=C(o,p),$=l.array.has(p),x=Fe(b);z(a,p,x),$?(v.array.next({name:p,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&v.state.next({name:p,dirtyFields:si(i,a),isDirty:F(p,x)})):E&&!E._f&&!ce(x)?Ae(p,x,y):_e(p,x,y),os(p,l)&&v.state.next({...n}),v.values.next({name:p,values:{...a}}),!s.mount&&t()},Xt=async p=>{const b=p.target;let y=b.name,E=!0;const $=C(o,y),x=()=>b.type?li($._f):ev(p),A=H=>{E=Number.isNaN(H)||H===C(a,y,H)};if($){let H,J;const Br=x(),At=p.type===ts.BLUR||p.type===ts.FOCUS_OUT,em=!pv($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||hv(At,C(n.touchedFields,y),n.isSubmitted,h,m),hi=os(y,l,At);z(a,y,Br),At?($._f.onBlur&&$._f.onBlur(p),u&&u(0)):$._f.onChange&&$._f.onChange(p);const vi=q(y,Br,At,!1),tm=!ye(vi)||hi;if(!At&&v.values.next({name:y,type:p.type,values:{...a}}),em)return c.isValid&&_(),tm&&v.state.next({name:y,...hi?{}:vi});if(!At&&hi&&v.state.next({...n}),O(!0),r.resolver){const{errors:Es}=await M([y]);if(A(Br),E){const rm=bs(n.errors,o,y),Ps=bs(Es,o,rm.name||y);H=Ps.error,y=Ps.name,J=ye(Es)}}else H=(await fs($,a,w,r.shouldUseNativeValidation))[y],A(Br),E&&(H?J=!1:c.isValid&&(J=await te(o,!0)));E&&($._f.deps&&di($._f.deps),D(y,J,H,vi))}},jr=(p,b)=>{if(C(n.errors,b)&&p.focus)return p.focus(),1},di=async(p,b={})=>{let y,E;const $=ti(p);if(O(!0),r.resolver){const x=await oe(X(p)?p:$);y=ye(x),E=p?!$.some(A=>C(x,A)):y}else p?(E=(await Promise.all($.map(async x=>{const A=C(o,x);return await te(A&&A._f?{[x]:A}:A)}))).every(Boolean),!(!E&&!n.isValid)&&_()):E=y=await te(o);return v.state.next({...!Oe(p)||c.isValid&&y!==n.isValid?{}:{name:p},...r.resolver||!p?{isValid:y}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!E&&Nr(o,jr,p?$:l.mount),E},ys=p=>{const b={...i,...s.mount?a:{}};return X(p)?b:Oe(p)?C(b,p):p.map(y=>C(b,y))},_s=(p,b)=>({invalid:!!C((b||n).errors,p),isDirty:!!C((b||n).dirtyFields,p),isTouched:!!C((b||n).touchedFields,p),error:C((b||n).errors,p)}),Zv=p=>{p&&ti(p).forEach(b=>ie(n.errors,b)),v.state.next({errors:p?n.errors:{}})},ws=(p,b,y)=>{const E=(C(o,p,{_f:{}})._f||{}).ref;z(n.errors,p,{...b,ref:E}),v.state.next({name:p,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},Xv=(p,b)=>Ze(p)?v.values.subscribe({next:y=>p(Q(void 0,b),y)}):Q(p,b,!0),fi=(p,b={})=>{for(const y of p?ti(p):l.mount)l.mount.delete(y),l.array.delete(y),b.keepValue||(ie(o,y),ie(a,y)),!b.keepError&&ie(n.errors,y),!b.keepDirty&&ie(n.dirtyFields,y),!b.keepTouched&&ie(n.touchedFields,y),!r.shouldUnregister&&!b.keepDefaultValue&&ie(i,y);v.values.next({values:{...a}}),v.state.next({...n,...b.keepDirty?{isDirty:F()}:{}}),!b.keepIsValid&&_()},xs=({disabled:p,name:b,field:y,fields:E,value:$})=>{if(Ye(p)){const x=p?void 0:X($)?li(y?y._f:C(E,b)._f):$;z(a,b,x),q(b,x,!1,!1,!0)}},pi=(p,b={})=>{let y=C(o,p);const E=Ye(b.disabled);return z(o,p,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:p}},name:p,mount:!0,...b}}),l.mount.add(p),y?xs({field:y,disabled:b.disabled,name:p}):U(p,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Zt(b.min),max:Zt(b.max),minLength:Zt(b.minLength),maxLength:Zt(b.maxLength),pattern:Zt(b.pattern)}:{},name:p,onChange:Xt,onBlur:Xt,ref:$=>{if($){pi(p,b),y=C(o,p);const x=X($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=dv(x),H=y._f.refs||[];if(A?H.find(J=>J===x):x===y._f.ref)return;z(o,p,{_f:{...y._f,...A?{refs:[...H.filter(ai),x,...Array.isArray(C(i,p))?[{}]:[]],ref:{type:x.type,name:p}}:{ref:x}}}),U(p,!1,void 0,x)}else y=C(o,p,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(rv(l.array,p)&&s.action)&&l.unMount.add(p)}}},ks=()=>r.shouldFocusError&&Nr(o,jr,l.mount),Qv=p=>{Ye(p)&&(v.state.next({disabled:p}),Nr(o,b=>{b.disabled=p},0,!1))},$s=(p,b)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=Fe(a);if(v.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:x}=await M();n.errors=$,E=x}else await te(o);ie(n.errors,"root"),ye(n.errors)?(v.state.next({errors:{}}),await p(E,y)):(b&&await b({...n.errors},y),ks(),setTimeout(ks)),v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ye(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Jv=(p,b={})=>{C(o,p)&&(X(b.defaultValue)?lt(p,C(i,p)):(lt(p,b.defaultValue),z(i,p,b.defaultValue)),b.keepTouched||ie(n.touchedFields,p),b.keepDirty||(ie(n.dirtyFields,p),n.isDirty=b.defaultValue?F(p,C(i,p)):F()),b.keepError||(ie(n.errors,p),c.isValid&&_()),v.state.next({...n}))},Ss=(p,b={})=>{const y=p?Fe(p):i,E=Fe(y),$=p&&!ye(p)?E:i;if(b.keepDefaultValues||(i=y),!b.keepValues){if(b.keepDirtyValues||g)for(const x of l.mount)C(n.dirtyFields,x)?z($,x,C(a,x)):lt(x,C($,x));else{if(ei&&X(p))for(const x of l.mount){const A=C(o,x);if(A&&A._f){const H=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Dr(H)){const J=H.closest("form");if(J){J.reset();break}}}}o={}}a=e.shouldUnregister?b.keepDefaultValues?Fe(i):{}:Fe($),v.array.next({values:{...$}}),v.values.next({values:{...$}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!c.isValid||!!b.keepIsValid,s.watch=!!e.shouldUnregister,v.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!st(p,i)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&p?si(i,p):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Cs=(p,b)=>Ss(Ze(p)?p(a):p,b);return{control:{register:pi,unregister:fi,getFieldState:_s,handleSubmit:$s,setError:ws,_executeSchema:M,_getWatch:Q,_getDirty:F,_updateValid:_,_removeUnmounted:j,_updateFieldArray:I,_updateDisabledField:xs,_getFieldArray:fe,_reset:Ss,_resetDefaultValues:()=>Ze(r.defaultValues)&&r.defaultValues().then(p=>{Cs(p,r.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:p=>{n={...n,...p}},_disableForm:Qv,_subjects:v,_proxyFormState:c,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(p){s=p},get _defaultValues(){return i},get _names(){return l},set _names(p){l=p},get _formState(){return n},set _formState(p){n=p},get _options(){return r},set _options(p){r={...r,...p}}},trigger:di,register:pi,handleSubmit:$s,watch:Xv,setValue:lt,getValues:ys,reset:Cs,resetField:Jv,clearErrors:Zv,unregister:fi,setError:ws,setFocus:(p,b={})=>{const y=C(o,p),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),b.shouldSelect&&$.select())}},getFieldState:_s}}function ci(e={}){const t=xe.useRef(),r=xe.useRef(),[n,o]=xe.useState({isDirty:!1,isValidating:!1,isLoading:Ze(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Ze(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...bv(e,()=>o(a=>({...a}))),formState:n});const i=t.current.control;return i._options=e,av({subject:i._subjects.state,next:a=>{ov(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),xe.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),xe.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),xe.useEffect(()=>{e.values&&!st(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),xe.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=iv(n,i),t.current}var gs=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},gv=function(e,t){var r=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?gs(i.ref,o,e):i.refs&&i.refs.forEach(function(a){return gs(a,o,e)})};for(var n in t.fields)r(n)},yv=function(e,t){t.shouldUseNativeValidation&&gv(e,t);var r={};for(var n in e){var o=C(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(wv(t.names||Object.keys(e),n)){var a=Object.assign({},_v(C(r,n)));z(a,"root",i),z(r,n,a)}else z(r,n,i)}return r},_v=function(e){return Array.isArray(e)?e.filter(Boolean):[]},wv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},xv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var o=n.path.map(function(s){return s.key}).join(".");if(r[o]||(r[o]={message:n.message,type:n.validation}),t){var i=r[o].types,a=i&&i[n.validation];r[o]=ns(o,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},ui=function(e,t,r){return r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(a,s){try{var l=function(){function u(c){return{values:r.raw?n:c,errors:{}}}var f=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(Dt(e,n,f)):Promise.resolve(Us(e,n,f)).then(u)}()}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof Kr)return{values:{},errors:yv(xv(a,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};const kv=27,$v=12,Sv=10,Cv=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},Ev=kr("enum"),Pv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return ui(Ne({checked:Vi(Ri(Vs()),r=>Object.entries(r).filter(([n,o])=>o).map(([n,o])=>n),[Mt(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),ji(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Ov=({input:e,onSubmitSuccess:t})=>{var l,u;const r=e.key?(l=T.current$.value.flow)==null?void 0:l.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{checked:n?{}:Ev(r)?Object.fromEntries(r.value.map(f=>[f,!0])):{}},resolver:Pv(e.config)}),s=Jn();return d("form",{noValidate:!0,class:"pr-2.5",onChange:f=>{n&&Cv(f.currentTarget)},onSubmit:i(f=>{const c=f.checked;t({type:"enum",value:c})}),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*kv+5*$v+2*Sv},class:ze("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((f,c)=>{const v=`checked.${f.value}`,{ref:g,...m}=o(v);return d("li",{class:"relative",children:[d("input",{autoFocus:c===0,ref:h=>{h&&c===0&&(s.current=h),g(h)},id:v,...m,class:"peer sr-only h-full",type:"checkbox"}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:v,children:f.label})]},f.value)})}),d("div",{class:"flex flex-col items-center gap-2",children:[!n&&d(St,{}),e.config.minSelected===0&&d(Ct,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(Tr,{error:(u=a.checked)==null?void 0:u.root})})]})},Av=kr("number"),Vr={number:()=>"Please enter a valid number",min:e=>`Please enter a number greater than or equal to ${e}`,max:e=>`Please enter a number less than or equal to ${e}`,decimalCases:e=>`Please enter a number with at most ${e} decimal cases`},Iv=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return ui(Ne({number:Wr(Vr.number(),[Gs(t,Vr.min(t)),Ws(r,Vr.max(r)),qs(o=>o===Number(o.toFixed(n)),Vr.decimalCases(n))])}))},Tv=({input:e,onSubmitSuccess:t})=>{var f;const r=e.config.defaultValue,n=e.key?(f=T.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{number:r?Number(r):Av(n)?n.value:void 0},resolver:Iv(e.config)}),{ref:s,...l}=o("number",{required:!e.config.optional,valueAsNumber:!0}),u=L();return he(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},type:"text",min:e.config.min,max:e.config.max,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest [type=number:-webkit-inner-spin-button] w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all [-webkit-outer-spin-button:none]",placeholder:e.config.placeholder}),e.config.optional&&d(Ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(St,{})]}),d(Tr,{error:a.number})]})},Nv=({input:e,onSubmitSuccess:t})=>d("div",{class:"flex flex-col items-center py-3",children:d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})})}),Ot={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"},Dv=ge(Ot.phone,[Ys(/^\+?[0-9 -]+$/,Ot.phone)]),Mv={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Fv=kr("string"),Lv=e=>{const t=`Please enter no more than ${e.maxChars} characters`;return ui(Ne({text:{email:ge(Ot.email,[Ks(Ot.email),Mt(e.maxChars??1/0,t)]),phone:Vi(Dv,r=>r.replace(/[^0-9]/g,""),[Mt(e.maxChars??1/0,t)]),text:ge([ji(1,Ot.empty),Mt(e.maxChars??1/0,t)]),url:ge([Zs(Ot.url),Mt(e.maxChars??1/0,t)])}[e.format]}))},Rv=({input:e,onSubmitSuccess:t})=>{var f;const r=e.key?(f=T.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{text:n||(Fv(r)?r.value:"")},resolver:Lv(e.config)}),{ref:s,...l}=o("text",{required:!e.config.optional}),u=L();return he(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{t({type:"string",value:c.text})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{id:"chat-input",...l,...Mv[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},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&&d(Ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(St,{})]}),d(Tr,{error:a.text})]})},Vv=()=>{var o;const e=(o=T.current$.value.flow)==null?void 0:o.data.currentInput,[t,r]=Ih(),n=L(null);return T.inputHeight$.value=r.height,V(()=>{const i=n.current;if(i)return i.addEventListener("transitionstart",Z.scrollToEnd.smooth),i.addEventListener("transitioncancel",Z.scrollToEnd.smooth),i.addEventListener("transitionend",Z.scrollToEnd.smooth),()=>{i.removeEventListener("transitionstart",Z.scrollToEnd.smooth),i.removeEventListener("transitioncancel",Z.scrollToEnd.smooth),i.removeEventListener("transitionend",Z.scrollToEnd.smooth)}},[]),d("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:d("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:qe({input:e}).with({input:Pe.nullish},()=>d("div",{class:"flex items-center gap-2 p-2.5",children:[d("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}),d(St,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},i=>d(Rv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"multiple-choice"}},i=>d(Ov,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"boolean"}},i=>d(Kh,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"file"}},i=>d(Jh,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"submit"}},i=>d(Nv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"address"}},i=>d(Bh,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"number"}},i=>d(Tv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).exhaustive()})})},jv=gn("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 relative",{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"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Bv=({children:e,className:t,animate:r,side:n,...o})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:jv({className:t,side:n,animate:r}),...o,children:e}),zv=({className:e,...t})=>(V(()=>{Z.scrollToEnd.smooth()}),d("div",{"aria-hidden":!0,children:Z.isBotTyping$.value===!0?d("div",{"aria-label":"Typing…",class:ze("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),Uv={bot:"left",user:"right"},Hv=gn("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]"}}}),qv=({lastSentMessageFooter:e})=>{var r;const t=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return V(()=>{Z.scrollToEnd.smooth()},[t.length]),d("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,o)=>d(G,{children:d("li",{class:"flex",children:qe(n).with({type:"system"},i=>d("p",{class:Hv({variant:i.variant}),children:i.text})).with({type:"text",author:Pe.union("bot","user")},i=>{const a=i.author==="user"&&!t.slice(o+1).some(l=>l.type==="text"&&l.author==="user"),s=o===t.length-1;return d(Bv,{animate:s,side:Uv[i.author],children:[i.text,a?e:null]},o)}).with({type:"link"},i=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("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,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("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=>d("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=>d(Zh,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()})},o)),d(zv,{},"typing")]})},Kv=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=T.current$.value;ke(n,"Flow is required to exist to show chatbot body");const o=T.viewState$.value,{chatRef:i,chatService:a}=Lh(),[s,l]=W();return he(()=>{o==="maximised"&&Z.scrollToEnd.instant()},[o]),he(()=>{const{state:u,flow:f}=T.current$.peek();if(u!=="loaded")throw new Error(Pu.invalid_state);let c=f.data.nodeHistory.at(-1);if(Z.scrollToEnd.instant(),T.setInput(void 0),f.data.isFinished)return;c===void 0?(c=_a(n.nodes).id,T.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:f.data.flowSessionId,flow_build:n.build},customProperties:n.context})):T.removeMessagesSentByNodeIds([c]);const{interpret:v,abort:g,undo:m}=mh({context:n.context,analytics:r,apiClient:t,logger:e,flow:n.nodes,chatService:a,getSubmissions:()=>{var h;return(h=T.current$.peek().flow)==null?void 0:h.data.submissions},onInterpret:(h,w)=>{const k=T.current$.peek().flow;ke(k),w&&(k.data.sequence=k.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:w.id,flow_build:n.build,to_node_id:h.id,sequence:k.data.sequence,flow_session_id:k.data.flowSessionId},customProperties:n.context})),T.setCurrentNodeId(h.id)},onFlowEnd:async()=>{T.markAsFinished();const h=T.current$.peek().flow;ke(h),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:h.data.flowSessionId,flow_build:n.build},customProperties:n.context})}});return l(()=>m),v(c),g},[r,t,a,e,n]),d(G,{children:[d("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:T.inputHeight$.value},children:d(qv,{lastSentMessageFooter:n.data.isFinished||!s?null:d(Gv,{undoFn:s})})}),d(Vv,{})]})},Wv=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],Gv=({undoFn:e})=>d("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:d("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=T.current$.peek();ke(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(T.removeMessagesSentByNodeIds(n),T.setInput(void 0),n.pop(),n.map(o=>t.nodes.find(i=>i.id===o)).filter(Boolean).flatMap(Wv).forEach(o=>delete t.data.submissions[o]),T.current$.value={...T.current$.value})},children:"Undo"})}),Yv=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Kv},Symbol.toStringTag,{value:"Module"}))})();