@inploi/plugin-chatbot 3.27.1 → 3.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cdn/index.js CHANGED
@@ -1,5 +1,5 @@
1
- var Dm=Object.defineProperty;var Nm=(Je,be,Pe)=>be in Je?Dm(Je,be,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Je[be]=Pe;var Us=(Je,be,Pe)=>(Nm(Je,typeof be!="symbol"?be+"":be,Pe),Pe);(function(){"use strict";var Je=e=>e,be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hs=Array.isArray,Wr=Hs,qs=typeof be=="object"&&be&&be.Object===Object&&be,Ks=qs,Ws=Ks,Gs=typeof self=="object"&&self&&self.Object===Object&&self,Ys=Ws||Gs||Function("return this")(),Gr=Ys,Zs=Gr,Xs=Zs.Symbol,Yr=Xs,_o=Yr,wo=Object.prototype,Qs=wo.hasOwnProperty,Js=wo.toString,It=_o?_o.toStringTag:void 0;function el(e){var t=Qs.call(e,It),r=e[It];try{e[It]=void 0;var n=!0}catch{}var i=Js.call(e);return n&&(t?e[It]=r:delete e[It]),i}var tl=el,rl=Object.prototype,nl=rl.toString;function ol(e){return nl.call(e)}var il=ol,xo=Yr,al=tl,sl=il,ll="[object Null]",cl="[object Undefined]",ko=xo?xo.toStringTag:void 0;function ul(e){return e==null?e===void 0?cl:ll:ko&&ko in Object(e)?al(e):sl(e)}var $o=ul;function dl(e){return e!=null&&typeof e=="object"}var fl=dl,hl=$o,pl=fl,vl="[object Symbol]";function ml(e){return typeof e=="symbol"||pl(e)&&hl(e)==vl}var Zr=ml,gl=Wr,bl=Zr,yl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_l=/^\w*$/;function wl(e,t){if(gl(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||bl(e)?!0:_l.test(e)||!yl.test(e)||t!=null&&e in Object(t)}var xl=wl;function kl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var So=kl,$l=$o,Sl=So,Cl="[object AsyncFunction]",El="[object Function]",Ol="[object GeneratorFunction]",Al="[object Proxy]";function Tl(e){if(!Sl(e))return!1;var t=$l(e);return t==El||t==Ol||t==Cl||t==Al}var Il=Tl,Pl=Gr,Dl=Pl["__core-js_shared__"],Nl=Dl,Xr=Nl,Co=function(){var e=/[^.]+$/.exec(Xr&&Xr.keys&&Xr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ml(e){return!!Co&&Co in e}var Fl=Ml,Ll=Function.prototype,Rl=Ll.toString;function jl(e){if(e!=null){try{return Rl.call(e)}catch{}try{return e+""}catch{}}return""}var Vl=jl,Bl=Il,zl=Fl,Ul=So,Hl=Vl,ql=/[\\^$.*+?()[\]{}|]/g,Kl=/^\[object .+?Constructor\]$/,Wl=Function.prototype,Gl=Object.prototype,Yl=Wl.toString,Zl=Gl.hasOwnProperty,Xl=RegExp("^"+Yl.call(Zl).replace(ql,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ql(e){if(!Ul(e)||zl(e))return!1;var t=Bl(e)?Xl:Kl;return t.test(Hl(e))}var Jl=Ql;function ec(e,t){return e==null?void 0:e[t]}var tc=ec,rc=Jl,nc=tc;function oc(e,t){var r=nc(e,t);return rc(r)?r:void 0}var Eo=oc,ic=Eo,ac=ic(Object,"create"),er=ac,Oo=er;function sc(){this.__data__=Oo?Oo(null):{},this.size=0}var lc=sc;function cc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var uc=cc,dc=er,fc="__lodash_hash_undefined__",hc=Object.prototype,pc=hc.hasOwnProperty;function vc(e){var t=this.__data__;if(dc){var r=t[e];return r===fc?void 0:r}return pc.call(t,e)?t[e]:void 0}var mc=vc,gc=er,bc=Object.prototype,yc=bc.hasOwnProperty;function _c(e){var t=this.__data__;return gc?t[e]!==void 0:yc.call(t,e)}var wc=_c,xc=er,kc="__lodash_hash_undefined__";function $c(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=xc&&t===void 0?kc:t,this}var Sc=$c,Cc=lc,Ec=uc,Oc=mc,Ac=wc,Tc=Sc;function ft(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])}}ft.prototype.clear=Cc,ft.prototype.delete=Ec,ft.prototype.get=Oc,ft.prototype.has=Ac,ft.prototype.set=Tc;var Ic=ft;function Pc(){this.__data__=[],this.size=0}var Dc=Pc;function Nc(e,t){return e===t||e!==e&&t!==t}var Mc=Nc,Fc=Mc;function Lc(e,t){for(var r=e.length;r--;)if(Fc(e[r][0],t))return r;return-1}var tr=Lc,Rc=tr,jc=Array.prototype,Vc=jc.splice;function Bc(e){var t=this.__data__,r=Rc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Vc.call(t,r,1),--this.size,!0}var zc=Bc,Uc=tr;function Hc(e){var t=this.__data__,r=Uc(t,e);return r<0?void 0:t[r][1]}var qc=Hc,Kc=tr;function Wc(e){return Kc(this.__data__,e)>-1}var Gc=Wc,Yc=tr;function Zc(e,t){var r=this.__data__,n=Yc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Xc=Zc,Qc=Dc,Jc=zc,eu=qc,tu=Gc,ru=Xc;function ht(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])}}ht.prototype.clear=Qc,ht.prototype.delete=Jc,ht.prototype.get=eu,ht.prototype.has=tu,ht.prototype.set=ru;var nu=ht,ou=Eo,iu=Gr,au=ou(iu,"Map"),su=au,Ao=Ic,lu=nu,cu=su;function uu(){this.size=0,this.__data__={hash:new Ao,map:new(cu||lu),string:new Ao}}var du=uu;function fu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var hu=fu,pu=hu;function vu(e,t){var r=e.__data__;return pu(t)?r[typeof t=="string"?"string":"hash"]:r.map}var rr=vu,mu=rr;function gu(e){var t=mu(this,e).delete(e);return this.size-=t?1:0,t}var bu=gu,yu=rr;function _u(e){return yu(this,e).get(e)}var wu=_u,xu=rr;function ku(e){return xu(this,e).has(e)}var $u=ku,Su=rr;function Cu(e,t){var r=Su(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Eu=Cu,Ou=du,Au=bu,Tu=wu,Iu=$u,Pu=Eu;function pt(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])}}pt.prototype.clear=Ou,pt.prototype.delete=Au,pt.prototype.get=Tu,pt.prototype.has=Iu,pt.prototype.set=Pu;var Du=pt,To=Du,Nu="Expected a function";function Qr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Nu);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Qr.Cache||To),r}Qr.Cache=To;var Mu=Qr,Fu=Mu,Lu=500;function Ru(e){var t=Fu(e,function(n){return r.size===Lu&&r.clear(),n}),r=t.cache;return t}var ju=Ru,Vu=ju,Bu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zu=/\\(\\)?/g,Uu=Vu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Bu,function(r,n,i,o){t.push(i?o.replace(zu,"$1"):n||r)}),t}),Hu=Uu;function qu(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Ku=qu,Io=Yr,Wu=Ku,Gu=Wr,Yu=Zr,Zu=1/0,Po=Io?Io.prototype:void 0,Do=Po?Po.toString:void 0;function No(e){if(typeof e=="string")return e;if(Gu(e))return Wu(e,No)+"";if(Yu(e))return Do?Do.call(e):"";var t=e+"";return t=="0"&&1/e==-Zu?"-0":t}var Xu=No,Qu=Xu;function Ju(e){return e==null?"":Qu(e)}var ed=Ju,td=Wr,rd=xl,nd=Hu,od=ed;function id(e,t){return td(e)?e:rd(e,t)?[e]:nd(od(e))}var ad=id,sd=Zr,ld=1/0;function cd(e){if(typeof e=="string"||sd(e))return e;var t=e+"";return t=="0"&&1/e==-ld?"-0":t}var ud=cd,dd=ad,fd=ud;function hd(e,t){t=dd(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[fd(t[r++])];return r&&r==n?e:void 0}var pd=hd,vd=pd;function md(e,t,r){var n=e==null?void 0:vd(e,t);return n===void 0?r:n}var gd=md;const Pt=Pe(gd);var Dt,S,Mo,Fo,et,Lo,Ro,Jr,jo,vt={},Vo=[],bd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nr=Array.isArray;function De(e,t){for(var r in t)e[r]=t[r];return e}function Bo(e){var t=e.parentNode;t&&t.removeChild(e)}function D(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Dt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Nt(e,a,n,i,null)}function Nt(e,t,r,n,i){var o={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:i??++Mo};return i==null&&S.vnode!=null&&S.vnode(o),o}function zo(){return{current:null}}function Y(e){return e.children}function ye(e,t){this.props=e,this.context=t}function or(e,t){if(t==null)return e.__?or(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"?or(e):null}function Uo(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 Uo(e)}}function en(e){(!e.__d&&(e.__d=!0)&&et.push(e)&&!ir.__r++||Lo!==S.debounceRendering)&&((Lo=S.debounceRendering)||Ro)(ir)}function ir(){var e,t,r,n,i,o,a,s,l;for(et.sort(Jr);e=et.shift();)e.__d&&(t=et.length,n=void 0,i=void 0,o=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(o=De({},a)).__v=a.__v+1,tn(l,a,o,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??or(a),a.__h,i),Zo(n,a,i),a.__e!=s&&Uo(a)),et.length>t&&et.sort(Jr));ir.__r=0}function Ho(e,t,r,n,i,o,a,s,l,d,f){var c,p,m,g,v,_,x,w,O,T,A=0,H=n&&n.__k||Vo,K=H.length,N=K,M=t.length;for(r.__k=[],c=0;c<M;c++)(g=r.__k[c]=(g=t[c])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?Nt(null,g,null,null,g):nr(g)?Nt(Y,{children:g},null,null,null):g.__b>0?Nt(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(w=yd(g,H,x=c+A,N))===-1?m=vt:(m=H[w]||vt,H[w]=void 0,N--),tn(e,g,m,i,o,a,s,l,d,f),v=g.__e,(p=g.ref)&&m.ref!=p&&(m.ref&&rn(m.ref,null,g),f.push(p,g.__c||v,g)),v!=null&&(_==null&&(_=v),T=!(O=m===vt||m.__v===null)&&w===x,O?w==-1&&A--:w!==x&&(w===x+1?(A++,T=!0):w>x?N>M-x?(A+=w-x,T=!0):A--:A=w<x&&w==x-1?w-x:0),x=c+A,T=T||w==c&&!O,typeof g.type!="function"||w===x&&m.__k!==g.__k?typeof g.type=="function"||T?g.__d!==void 0?(l=g.__d,g.__d=void 0):l=v.nextSibling:l=Ko(e,v,l):l=qo(g,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,c=K;c--;)H[c]!=null&&(typeof r.type=="function"&&H[c].__e!=null&&H[c].__e==r.__d&&(r.__d=H[c].__e.nextSibling),Xo(H[c],H[c]))}function qo(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t=typeof n.type=="function"?qo(n,t,r):Ko(r,n.__e,t));return t}function Ne(e,t){return t=t||[],e==null||typeof e=="boolean"||(nr(e)?e.some(function(r){Ne(r,t)}):t.push(e)),t}function Ko(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 yd(e,t,r,n){var i=e.key,o=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&o===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&i==l.key&&o===l.type)return a;a--}if(s<t.length){if((l=t[s])&&i==l.key&&o===l.type)return s;s++}}return-1}function _d(e,t,r,n,i){var o;for(o in r)o==="children"||o==="key"||o in t||ar(e,o,null,r[o],n);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||r[o]===t[o]||ar(e,o,t[o],r[o],n)}function Wo(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||bd.test(t)?r:r+"px"}function ar(e,t,r,n,i){var o;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||Wo(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Wo(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n||e.addEventListener(t,o?Yo:Go,o):e.removeEventListener(t,o?Yo:Go,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Go(e){return this.l[e.type+!1](S.event?S.event(e):e)}function Yo(e){return this.l[e.type+!0](S.event?S.event(e):e)}function tn(e,t,r,n,i,o,a,s,l,d){var f,c,p,m,g,v,_,x,w,O,T,A,H,K,N,M=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,o=[s]),(f=S.__b)&&f(t);try{e:if(typeof M=="function"){if(x=t.props,w=(f=M.contextType)&&n[f.__c],O=f?w?w.props.value:f.__:n,r.__c?_=(c=t.__c=r.__c).__=c.__E:("prototype"in M&&M.prototype.render?t.__c=c=new M(x,O):(t.__c=c=new ye(x,O),c.constructor=M,c.render=xd),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=O,c.__n=n,p=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),M.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=De({},c.__s)),De(c.__s,M.getDerivedStateFromProps(x,c.__s))),m=c.props,g=c.state,c.__v=t,p)M.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(M.getDerivedStateFromProps==null&&x!==m&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,O),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,O)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(se){se&&(se.__=t)}),T=0;T<c._sb.length;T++)c.__h.push(c._sb[T]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,O),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(m,g,v)})}if(c.context=O,c.props=x,c.__P=e,c.__e=!1,A=S.__r,H=0,"prototype"in M&&M.prototype.render){for(c.state=c.__s,c.__d=!1,A&&A(t),f=c.render(c.props,c.state,c.context),K=0;K<c._sb.length;K++)c.__h.push(c._sb[K]);c._sb=[]}else do c.__d=!1,A&&A(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++H<25);c.state=c.__s,c.getChildContext!=null&&(n=De(De({},n),c.getChildContext())),p||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(m,g)),Ho(e,nr(N=f!=null&&f.type===Y&&f.key==null?f.props.children:f)?N:[N],t,r,n,i,o,a,s,l,d),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),_&&(c.__E=c.__=null)}else o==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=wd(r.__e,t,r,n,i,o,a,l,d);(f=S.diffed)&&f(t)}catch(se){t.__v=null,(l||o!=null)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),S.__e(se,t,r)}}function Zo(e,t,r){for(var n=0;n<r.length;n++)rn(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){S.__e(o,i.__v)}})}function wd(e,t,r,n,i,o,a,s,l){var d,f,c,p=r.props,m=t.props,g=t.type,v=0;if(g==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((d=o[v])&&"setAttribute"in d==!!g&&(g?d.localName===g:d.nodeType===3)){e=d,o[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(m);e=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,m.is&&m),o=null,s=!1}if(g===null)p===m||s&&e.data===m||(e.data=m);else{if(o=o&&Dt.call(e.childNodes),f=(p=r.props||vt).dangerouslySetInnerHTML,c=m.dangerouslySetInnerHTML,!s){if(o!=null)for(p={},v=0;v<e.attributes.length;v++)p[e.attributes[v].name]=e.attributes[v].value;(c||f)&&(c&&(f&&c.__html==f.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(_d(e,m,p,i,s),c)t.__k=[];else if(Ho(e,nr(v=t.props.children)?v:[v],t,r,n,i&&g!=="foreignObject",o,a,o?o[0]:r.__k&&or(r,0),s,l),o!=null)for(v=o.length;v--;)o[v]!=null&&Bo(o[v]);s||("value"in m&&(v=m.value)!==void 0&&(v!==e.value||g==="progress"&&!v||g==="option"&&v!==p.value)&&ar(e,"value",v,p.value,!1),"checked"in m&&(v=m.checked)!==void 0&&v!==e.checked&&ar(e,"checked",v,p.checked,!1))}return e}function rn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function Xo(e,t,r){var n,i;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||rn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){S.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Xo(n[i],t,r||typeof e.type!="function");r||e.__e==null||Bo(e.__e),e.__=e.__e=e.__d=void 0}function xd(e,t,r){return this.constructor(e,r)}function mt(e,t,r){var n,i,o,a;S.__&&S.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],a=[],tn(t,e=(!n&&r||t).__k=D(Y,null,[e]),i||vt,vt,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?Dt.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,a),Zo(o,e,a)}function Qo(e,t){mt(e,t,Qo)}function kd(e,t,r){var n,i,o,a,s=De({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o]===void 0&&a!==void 0?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?Dt.call(arguments,2):r),Nt(e.type,s,n||e.key,i||e.ref,null)}function Mt(e,t){var r={__c:t="__cC"+jo++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(s){s.__e=!0,en(s)})},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Dt=Vo.slice,S={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Mo=0,Fo=function(e){return e!=null&&e.constructor===void 0},ye.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=De({},this.state),typeof e=="function"&&(e=e(De({},r),this.props)),e&&De(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),en(this))},ye.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),en(this))},ye.prototype.render=Y,et=[],Ro=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Jr=function(e,t){return e.__v.__b-t.__v.__b},ir.__r=0,jo=0;var nn=class extends Error{constructor(t){super(t[0].message);Us(this,"issues");this.name="ValiError",this.issues=t}};function Jo(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Ft(e){return{issues:e}}function ce(e){return{output:e}}function $d(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 Sd(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 Be(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return ce(e);let i,o,a=e;for(const s of t){const l=s._parse(a);if(l.issues){i=i||Sd(r,n);for(const d of l.issues){const f=$d(i,d);o?o.push(f):o=[f]}if(i.abortEarly||i.abortPipeEarly)break}else a=l.output}return o?Ft(o):ce(a)}function ze(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function ei(e){return typeof e=="function"?e():e}function Ue(e,t,r,n){return Ft([{validation:e,message:ei(t),input:r,requirement:n}])}function Cd(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,a]=ze(t,r);return[e,o,a]}const[n,i]=ze(e,t);return[void 0,n,i]}function Me(e,t,r,n,i,o){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:ei(n),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function ti(e){return typeof e.default=="function"?e.default():e.default}function Ed(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Be(t,this.pipe,r,"any")}}}function Od(e,t,r){const[n="Invalid type",i]=ze(t,r);return{type:"array",async:!1,item:e,message:n,pipe:i,_parse(o,a){if(!Array.isArray(o))return Me(a,"type","array",this.message,o);let s;const l=[];for(let d=0;d<o.length;d++){const f=o[d],c=this.item._parse(f,a);if(c.issues){const p={type:"array",input:o,key:d,value:f};for(const m of c.issues)m.path?m.path.unshift(p):m.path=[p],s==null||s.push(m);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Ft(s):Be(l,this.pipe,a,"array")}}}function ri(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="boolean"?Me(o,"type","boolean",this.message,i):Be(i,this.pipe,o,"boolean")}}}function ni(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?Me(n,"type","literal",this.message,r):ce(r)}}}function Ad(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const i=ti(this);if(i===void 0)return ce(r);r=i}return this.wrapped._parse(r,n)}}}function on(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="number"||isNaN(i)?Me(o,"type","number",this.message,i):Be(i,this.pipe,o,"number")}}}function Ce(e,t,r,n){const[i,o="Invalid type",a]=Cd(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:a,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","object",this.message,l);s=s||Object.entries(this.entries);let f;const c={};for(const[p,m]of s){const g=l[p],v=m._parse(g,d);if(v.issues){const _={type:"object",input:l,key:p,value:g};for(const x of v.issues)x.path?x.path.unshift(_):x.path=[_],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}else(v.output!==void 0||p in l)&&(c[p]=v.output)}if(this.rest&&!(d!=null&&d.abortEarly&&f)){for(const p in l)if(!(p in this.entries)){const m=l[p],g=this.rest._parse(m,d);if(g.issues){const v={type:"object",input:l,key:p,value:m};for(const _ of g.issues)_.path?_.path.unshift(v):_.path=[v],f==null||f.push(_);if(f||(f=g.issues),d!=null&&d.abortEarly)break}else c[p]=g.output}}return f?Ft(f):Be(c,this.pipe,d,"object")}}}function Td(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const i=ti(this);if(i===void 0)return ce(r);r=i}return this.wrapped._parse(r,n)}}}function Id(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?ce(r):Me(n,"type","picklist",this.message,r)}}}function xe(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="string"?Me(o,"type","string",this.message,i):Be(i,this.pipe,o,"string")}}}function Pd(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=ze(r,n);return[e,t,a,s]}const[i,o]=ze(t,r);return[xe(),e,i,o]}var Dd=["__proto__","prototype","constructor"];function oi(e,t,r,n){const[i,o,a="Invalid type",s]=Pd(e,t,r,n);return{type:"record",async:!1,key:i,value:o,message:a,pipe:s,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","record",this.message,l);let f;const c={};for(const[p,m]of Object.entries(l))if(!Dd.includes(p)){let g;const v=this.key._parse(p,{origin:"key",abortEarly:d==null?void 0:d.abortEarly,abortPipeEarly:d==null?void 0:d.abortPipeEarly,skipPipe:d==null?void 0:d.skipPipe});if(v.issues){g={type:"record",input:l,key:p,value:m};for(const x of v.issues)x.path=[g],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}const _=this.value._parse(m,d);if(_.issues){g=g||{type:"record",input:l,key:p,value:m};for(const x of _.issues)x.path?x.path.unshift(g):x.path=[g],f==null||f.push(x);if(f||(f=_.issues),d!=null&&d.abortEarly)break}!v.issues&&!_.issues&&(c[v.output]=_.output)}return f?Ft(f):Be(c,this.pipe,d,"record")}}}function Nd(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let i,o;for(const a of this.options){const s=a._parse(r,n);if(s.issues)if(i)for(const l of s.issues)i.push(l);else i=s.issues;else{o=[s.output];break}}return o?ce(o[0]):Me(n,"type","union",this.message,r,i)}}}function sr(e,t,r){const n=e._parse(t,r);if(n.issues)throw new nn(n.issues);return n.output}async function Md(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new nn(n.issues);return n.output}function ii(e,t,r){return{...e,_parse(n,i){const o=e._parse(n,i);if(o.issues)return o;const a=t(o.output);return r&&!Array.isArray(r)?r._parse(a,i):Be(a,r,i,typeof a)}}}var Fd=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Ld(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Rd(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Fd,_parse(t){return this.requirement.test(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function lr(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function jd(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function cr(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Vd(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function ai(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Bd(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)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function de(){return de=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},de.apply(this,arguments)}var Fe,z,an,si,gt=0,li=[],ur=[],ci=S.__b,ui=S.__r,di=S.diffed,fi=S.__c,hi=S.unmount;function tt(e,t){S.__h&&S.__h(z,e,gt||t),gt=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:ur}),r.__[e]}function W(e){return gt=1,dr(bi,e)}function dr(e,t,r){var n=tt(Fe++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):bi(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],d=n.t(l,s);l!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=z,!z.u)){var i=function(s,l,d){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(p){return p.__c});if(f.every(function(p){return!p.__N}))return!o||o.call(this,s,l,d);var c=!1;return f.forEach(function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!o||o.call(this,s,l,d))};z.u=!0;var o=z.shouldComponentUpdate,a=z.componentWillUpdate;z.componentWillUpdate=function(s,l,d){if(this.__e){var f=o;o=void 0,i(s,l,d),o=f}a&&a.call(this,s,l,d)},z.shouldComponentUpdate=i}return n.__N||n.__}function j(e,t){var r=tt(Fe++,3);!S.__s&&ln(r.__H,t)&&(r.__=e,r.i=t,z.__H.__h.push(r))}function fe(e,t){var r=tt(Fe++,4);!S.__s&&ln(r.__H,t)&&(r.__=e,r.i=t,z.__h.push(r))}function F(e){return gt=5,he(function(){return{current:e}},[])}function pi(e,t,r){gt=6,fe(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 he(e,t){var r=tt(Fe++,7);return ln(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function me(e,t){return gt=8,he(function(){return e},t)}function fr(e){var t=z.context[e.__c],r=tt(Fe++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(z)),t.props.value):e.__}function vi(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function zd(e){var t=tt(Fe++,10),r=W();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(n,i){t.__&&t.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function mi(){var e=tt(Fe++,11);if(!e.__){for(var t=z.__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 Ud(){for(var e;e=li.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(hr),e.__H.__h.forEach(sn),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){z=null,ci&&ci(e)},S.__r=function(e){ui&&ui(e),Fe=0;var t=(z=e.__c).__H;t&&(an===z?(t.__h=[],z.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=ur,r.__N=r.i=void 0})):(t.__h.forEach(hr),t.__h.forEach(sn),t.__h=[],Fe=0)),an=z},S.diffed=function(e){di&&di(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(li.push(t)!==1&&si===S.requestAnimationFrame||((si=S.requestAnimationFrame)||Hd)(Ud)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==ur&&(r.__=r.__V),r.i=void 0,r.__V=ur})),an=z=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(hr),r.__h=r.__h.filter(function(n){return!n.__||sn(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],S.__e(n,r.__v)}}),fi&&fi(e,t)},S.unmount=function(e){hi&&hi(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{hr(n)}catch(i){t=i}}),r.__H=void 0,t&&S.__e(t,r.__v))};var gi=typeof requestAnimationFrame=="function";function Hd(e){var t,r=function(){clearTimeout(n),gi&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);gi&&(t=requestAnimationFrame(r))}function hr(e){var t=z,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),z=t}function sn(e){var t=z;e.__c=e.__(),z=t}function ln(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function bi(e,t){return typeof t=="function"?t(e):t}function yi(e,t){for(var r in t)e[r]=t[r];return e}function cn(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 un(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function pr(e){this.props=e}function _i(e,t){function r(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:cn(this.props,i)}function n(i){return this.shouldComponentUpdate=r,D(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(pr.prototype=new ye).isPureReactComponent=!0,pr.prototype.shouldComponentUpdate=function(e,t){return cn(this.props,e)||cn(this.state,t)};var wi=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),wi&&wi(e)};var qd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ne(e){function t(r){var n=yi({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=qd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var xi=function(e,t){return e==null?null:Ne(Ne(e).map(t))},Le={map:xi,forEach:xi,count:function(e){return e?Ne(e).length:0},only:function(e){var t=Ne(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ne},Kd=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}Kd(e,t,r,n)};var ki=S.unmount;function $i(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=yi({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return $i(n,t,r)})),e}function Si(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Si(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 bt(){this.__u=0,this.t=null,this.__b=null}function Ci(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function dn(e){var t,r,n;function i(o){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return D(r,o)}return i.displayName="Lazy",i.__f=!0,i}function yt(){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),ki&&ki(e)},(bt.prototype=new ye).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Ci(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var d=n.state.__a;n.__v.__k[0]=Si(d,d.__c.__P,d.__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)},bt.prototype.componentWillUnmount=function(){this.t=[]},bt.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]=$i(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&D(Y,null,e.fallback);return i&&(i.__h=null),[D(Y,null,t.__a?null:e.children),i]};var Ei=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 Wd(e){return this.getChildContext=function(){return e.context},e.children}function Gd(e){var t=this,r=e.i;t.componentWillUnmount=function(){mt(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,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),mt(D(Wd,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Oi(e,t){var r=D(Gd,{__v:e,i:t});return r.containerInfo=t,r}(yt.prototype=new ye).__a=function(e){var t=this,r=Ci(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),Ei(t,e,n)):i()};r?r(o):o()}},yt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ne(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},yt.prototype.componentDidUpdate=yt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ei(e,r,t)})};var Ai=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Yd=/^(?: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]/,Zd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Xd=/[A-Z0-9]/g,Qd=typeof document<"u",Jd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ti(e,t,r){return t.__k==null&&(t.textContent=""),mt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Ii(e,t,r){return Qo(e,t),typeof r=="function"&&r(),e?e.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ye.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Pi=S.event;function ef(){}function tf(){return this.cancelBubble}function rf(){return this.defaultPrevented}S.event=function(e){return Pi&&(e=Pi(e)),e.persist=ef,e.isPropagationStopped=tf,e.isDefaultPrevented=rf,e.nativeEvent=e};var fn,nf={enumerable:!1,configurable:!0,get:function(){return this.class}},Di=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var o in r){var a=r[o];if(!(o==="value"&&"defaultValue"in r&&a==null||Qd&&o==="children"&&n==="noscript"||o==="class"||o==="className")){var s=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&a===!0?a="":s==="ondoubleclick"?o="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Jd(r.type)?s==="onfocus"?o="onfocusin":s==="onblur"?o="onfocusout":Zd.test(o)?o=s:n.indexOf("-")===-1&&Yd.test(o)?o=o.replace(Xd,"-$&").toLowerCase():a===null&&(a=void 0):s=o="oninput",s==="oninput"&&i[o=s]&&(o="oninputCapture"),i[o]=a}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Ne(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=Ne(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",nf)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Ai,Di&&Di(e)};var Ni=S.__r;S.__r=function(e){Ni&&Ni(e),fn=e.__c};var Mi=S.diffed;S.diffed=function(e){Mi&&Mi(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),fn=null};var Fi={ReactCurrentDispatcher:{current:{readContext:function(e){return fn.__n[e.__c].props.value}}}},of="17.0.2";function Li(e){return D.bind(null,e)}function rt(e){return!!e&&e.$$typeof===Ai}function _t(e){return rt(e)?kd.apply(null,arguments):e}function Ri(e){return!!e.__k&&(mt(null,e),!0)}function ji(e){return e&&(e.base||e.nodeType===1&&e)||null}var Vi=function(e,t){return e(t)},vr=function(e,t){return e(t)},Bi=Y;function hn(e){e()}function zi(e){return e}function Ui(){return[!1,hn]}var Hi=fe;function qi(e,t){var r=t(),n=W({h:{__:r,v:t}}),i=n[0].h,o=n[1];return fe(function(){i.__=r,i.v=t,un(i.__,t())||o({h:i})},[e,r,t]),j(function(){return un(i.__,i.v())||o({h:i}),e(function(){un(i.__,i.v())||o({h:i})})},[e]),r}var ke={useState:W,useId:mi,useReducer:dr,useEffect:j,useLayoutEffect:fe,useInsertionEffect:Hi,useTransition:Ui,useDeferredValue:zi,useSyncExternalStore:qi,startTransition:hn,useRef:F,useImperativeHandle:pi,useMemo:he,useCallback:me,useContext:fr,useDebugValue:vi,version:"17.0.2",Children:Le,render:Ti,hydrate:Ii,unmountComponentAtNode:Ri,createPortal:Oi,createElement:D,createContext:Mt,createFactory:Li,cloneElement:_t,createRef:zo,Fragment:Y,isValidElement:rt,findDOMNode:ji,Component:ye,PureComponent:pr,memo:_i,forwardRef:ne,flushSync:vr,unstable_batchedUpdates:Vi,StrictMode:Bi,Suspense:bt,SuspenseList:yt,lazy:dn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fi};const af=Object.freeze(Object.defineProperty({__proto__:null,Children:Le,Component:ye,Fragment:Y,PureComponent:pr,StrictMode:Bi,Suspense:bt,SuspenseList:yt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fi,cloneElement:_t,createContext:Mt,createElement:D,createFactory:Li,createPortal:Oi,createRef:zo,default:ke,findDOMNode:ji,flushSync:vr,forwardRef:ne,hydrate:Ii,isValidElement:rt,lazy:dn,memo:_i,render:Ti,startTransition:hn,unmountComponentAtNode:Ri,unstable_batchedUpdates:Vi,useCallback:me,useContext:fr,useDebugValue:vi,useDeferredValue:zi,useEffect:j,useErrorBoundary:zd,useId:mi,useImperativeHandle:pi,useInsertionEffect:Hi,useLayoutEffect:fe,useMemo:he,useReducer:dr,useRef:F,useState:W,useSyncExternalStore:qi,useTransition:Ui,version:of},Symbol.toStringTag,{value:"Module"}));function wt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function sf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ki(...e){return t=>e.forEach(r=>sf(r,t))}function Lt(...e){return me(Ki(...e),e)}function lf(e,t=[]){let r=[];function n(o,a){const s=Mt(a),l=r.length;r=[...r,a];function d(c){const{scope:p,children:m,...g}=c,v=(p==null?void 0:p[e][l])||s,_=he(()=>g,Object.values(g));return D(v.Provider,{value:_},m)}function f(c,p){const m=(p==null?void 0:p[e][l])||s,g=fr(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${o}\``)}return d.displayName=o+"Provider",[d,f]}const i=()=>{const o=r.map(a=>Mt(a));return function(s){const l=(s==null?void 0:s[e])||o;return he(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,cf(i,...t)]}function cf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((s,{useScope:l,scopeName:d})=>{const c=l(o)[`__scope${d}`];return{...s,...c}},{});return he(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const pn=globalThis!=null&&globalThis.document?fe:()=>{},uf=af["useId".toString()]||(()=>{});let df=0;function vn(e){const[t,r]=W(uf());return pn(()=>{e||r(n=>n??String(df++))},[e]),e||(t?`radix-${t}`:"")}function nt(e){const t=F(e);return j(()=>{t.current=e}),he(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function ff({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=hf({defaultProp:t,onChange:r}),o=e!==void 0,a=o?e:n,s=nt(r),l=me(d=>{if(o){const c=typeof d=="function"?d(e):d;c!==e&&s(c)}else i(d)},[o,e,i,s]);return[a,l]}function hf({defaultProp:e,onChange:t}){const r=W(e),[n]=r,i=F(n),o=nt(t);return j(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}const mn=ne((e,t)=>{const{children:r,...n}=e,i=Le.toArray(r),o=i.find(vf);if(o){const a=o.props.children,s=i.map(l=>l===o?Le.count(a)>1?Le.only(null):rt(a)?a.props.children:null:l);return D(gn,de({},n,{ref:t}),rt(a)?_t(a,void 0,s):null)}return D(gn,de({},n,{ref:t}),r)});mn.displayName="Slot";const gn=ne((e,t)=>{const{children:r,...n}=e;return rt(r)?_t(r,{...mf(n,r.props),ref:t?Ki(t,r.ref):r.ref}):Le.count(r)>1?Le.only(null):null});gn.displayName="SlotClone";const pf=({children:e})=>D(Y,null,e);function vf(e){return rt(e)&&e.type===pf}function mf(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...s)=>{o(...s),i(...s)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}const bn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=ne((n,i)=>{const{asChild:o,...a}=n,s=o?mn:t;return j(()=>{window[Symbol.for("radix-ui")]=!0},[]),D(s,de({},a,{ref:i}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gf(e,t){e&&vr(()=>e.dispatchEvent(t))}function bf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e);j(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const yn="dismissableLayer.update",yf="dismissableLayer.pointerDownOutside",_f="dismissableLayer.focusOutside";let Wi;const wf=Mt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xf=ne((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...d}=e,f=fr(wf),[c,p]=W(null),m=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=W({}),v=Lt(t,N=>p(N)),_=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=_.indexOf(x),O=c?_.indexOf(c):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,A=O>=w,H=kf(N=>{const M=N.target,se=[...f.branches].some(re=>re.contains(M));!A||se||(o==null||o(N),s==null||s(N),N.defaultPrevented||l==null||l())},m),K=$f(N=>{const M=N.target;[...f.branches].some(re=>re.contains(M))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},m);return bf(N=>{O===f.layers.size-1&&(i==null||i(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},m),j(()=>{if(c)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Wi=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(c)),f.layers.add(c),Gi(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Wi)}},[c,m,n,f]),j(()=>()=>{c&&(f.layers.delete(c),f.layersWithOutsidePointerEventsDisabled.delete(c),Gi())},[c,f]),j(()=>{const N=()=>g({});return document.addEventListener(yn,N),()=>document.removeEventListener(yn,N)},[]),D(bn.div,de({},d,{ref:v,style:{pointerEvents:T?A?"auto":"none":void 0,...e.style},onFocusCapture:wt(e.onFocusCapture,K.onFocusCapture),onBlurCapture:wt(e.onBlurCapture,K.onBlurCapture),onPointerDownCapture:wt(e.onPointerDownCapture,H.onPointerDownCapture)}))});function kf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=F(!1),i=F(()=>{});return j(()=>{const o=s=>{if(s.target&&!n.current){let d=function(){Yi(yf,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function $f(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=F(!1);return j(()=>{const i=o=>{o.target&&!n.current&&Yi(_f,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Gi(){const e=new CustomEvent(yn);document.dispatchEvent(e)}function Yi(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?gf(i,o):i.dispatchEvent(o)}const _n="focusScope.autoFocusOnMount",wn="focusScope.autoFocusOnUnmount",Zi={bubbles:!1,cancelable:!0},Sf=ne((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=W(null),d=nt(i),f=nt(o),c=F(null),p=Lt(t,v=>l(v)),m=F({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j(()=>{if(n){let v=function(O){if(m.paused||!s)return;const T=O.target;s.contains(T)?c.current=T:He(c.current,{select:!0})},_=function(O){if(m.paused||!s)return;const T=O.relatedTarget;T!==null&&(s.contains(T)||He(c.current,{select:!0}))},x=function(O){if(document.activeElement===document.body)for(const A of O)A.removedNodes.length>0&&He(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const w=new MutationObserver(x);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),w.disconnect()}}},[n,s,m.paused]),j(()=>{if(s){Ji.add(m);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(_n,Zi);s.addEventListener(_n,d),s.dispatchEvent(x),x.defaultPrevented||(Cf(If(Xi(s)),{select:!0}),document.activeElement===v&&He(s))}return()=>{s.removeEventListener(_n,d),setTimeout(()=>{const x=new CustomEvent(wn,Zi);s.addEventListener(wn,f),s.dispatchEvent(x),x.defaultPrevented||He(v??document.body,{select:!0}),s.removeEventListener(wn,f),Ji.remove(m)},0)}}},[s,d,f,m]);const g=me(v=>{if(!r&&!n||m.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(_&&x){const w=v.currentTarget,[O,T]=Ef(w);O&&T?!v.shiftKey&&x===T?(v.preventDefault(),r&&He(O,{select:!0})):v.shiftKey&&x===O&&(v.preventDefault(),r&&He(T,{select:!0})):x===w&&v.preventDefault()}},[r,n,m.paused]);return D(bn.div,de({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function Cf(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(He(n,{select:t}),document.activeElement!==r)return}function Ef(e){const t=Xi(e),r=Qi(t,e),n=Qi(t.reverse(),e);return[r,n]}function Xi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Qi(e,t){for(const r of e)if(!Of(r,{upTo:t}))return r}function Of(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 Af(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Af(e)&&t&&e.select()}}const Ji=Tf();function Tf(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ea(e,t),e.unshift(t)},remove(t){var r;e=ea(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function ea(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function If(e){return e.filter(t=>t.tagName!=="A")}function Pf(e,t){return dr((r,n)=>{const i=t[r][n];return i??r},e)}const xn=e=>{const{present:t,children:r}=e,n=Df(t),i=typeof r=="function"?r({present:n.isPresent}):Le.only(r),o=Lt(n.ref,i.ref);return typeof r=="function"||n.isPresent?_t(i,{ref:o}):null};xn.displayName="Presence";function Df(e){const[t,r]=W(),n=F({}),i=F(e),o=F("none"),a=e?"mounted":"unmounted",[s,l]=Pf(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j(()=>{const d=mr(n.current);o.current=s==="mounted"?d:"none"},[s]),pn(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,m=mr(d);e?l("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),pn(()=>{if(t){const d=c=>{const m=mr(n.current).includes(c.animationName);c.target===t&&m&&vr(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(o.current=mr(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:me(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function mr(e){return(e==null?void 0:e.animationName)||"none"}let kn=0;function Nf(){j(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:ta()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:ta()),kn++,()=>{kn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),kn--}},[])}function ta(){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 Ee=function(){return Ee=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ee.apply(this,arguments)};function ra(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Mf(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var gr="right-scroll-bar-position",br="width-before-scroll-bar",Ff="with-scroll-bars-hidden",Lf="--removed-body-scroll-bar-size";function Rf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jf(e,t){var r=W(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}function Vf(e,t){return jf(t||null,function(r){return e.forEach(function(n){return Rf(n,r)})})}function Bf(e){return e}function zf(e,t){t===void 0&&(t=Bf);var r=[],n=!1,i={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(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(s){return o(s)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(o),a=r}var l=function(){var f=a;a=[],f.forEach(o)},d=function(){return Promise.resolve().then(l)};d(),r={push:function(f){a.push(f),d()},filter:function(f){return a=a.filter(f),r}}}};return i}function Uf(e){e===void 0&&(e={});var t=zf(null);return t.options=Ee({async:!0,ssr:!1},e),t}var na=function(e){var t=e.sideCar,r=ra(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 D(n,Ee({},r))};na.isSideCarExport=!0;function Hf(e,t){return e.useMedium(t),na}var oa=Uf(),$n=function(){},yr=ne(function(e,t){var r=F(null),n=W({onScrollCapture:$n,onWheelCapture:$n,onTouchMoveCapture:$n}),i=n[0],o=n[1],a=e.forwardProps,s=e.children,l=e.className,d=e.removeScrollBar,f=e.enabled,c=e.shards,p=e.sideCar,m=e.noIsolation,g=e.inert,v=e.allowPinchZoom,_=e.as,x=_===void 0?"div":_,w=ra(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=p,T=Vf([r,t]),A=Ee(Ee({},w),i);return D(Y,null,f&&D(O,{sideCar:oa,removeScrollBar:d,shards:c,noIsolation:m,inert:g,setCallbacks:o,allowPinchZoom:!!v,lockRef:r}),a?_t(Le.only(s),Ee(Ee({},A),{ref:T})):D(x,Ee({},A,{className:l,ref:T}),s))});yr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},yr.classNames={fullWidth:br,zeroRight:gr};var ia,qf=function(){if(ia)return ia;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Kf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qf();return t&&e.setAttribute("nonce",t),e}function Wf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Gf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yf=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Kf())&&(Wf(t,r),Gf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Zf=function(){var e=Yf();return function(t,r){j(function(){return e.add(t),function(){e.remove()}},[t&&r])}},aa=function(){var e=Zf(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},Xf={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},Qf=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(r),Sn(n),Sn(i)]},Jf=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xf;var t=Qf(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])}},eh=aa(),th=function(e,t,r,n){var i=e.left,o=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
2
- .`.concat(Ff,` {
1
+ var Mm=Object.defineProperty;var Fm=(Je,be,Ie)=>be in Je?Mm(Je,be,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Je[be]=Ie;var qs=(Je,be,Ie)=>(Fm(Je,typeof be!="symbol"?be+"":be,Ie),Ie);(function(){"use strict";var Je=e=>e,be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ks=Array.isArray,Wr=Ks,Ws=typeof be=="object"&&be&&be.Object===Object&&be,Gs=Ws,Ys=Gs,Xs=typeof self=="object"&&self&&self.Object===Object&&self,Zs=Ys||Xs||Function("return this")(),Gr=Zs,Qs=Gr,Js=Qs.Symbol,Yr=Js,xo=Yr,ko=Object.prototype,el=ko.hasOwnProperty,tl=ko.toString,At=xo?xo.toStringTag:void 0;function rl(e){var t=el.call(e,At),r=e[At];try{e[At]=void 0;var n=!0}catch{}var i=tl.call(e);return n&&(t?e[At]=r:delete e[At]),i}var nl=rl,ol=Object.prototype,il=ol.toString;function al(e){return il.call(e)}var sl=al,$o=Yr,ll=nl,cl=sl,ul="[object Null]",dl="[object Undefined]",So=$o?$o.toStringTag:void 0;function fl(e){return e==null?e===void 0?dl:ul:So&&So in Object(e)?ll(e):cl(e)}var Co=fl;function pl(e){return e!=null&&typeof e=="object"}var hl=pl,vl=Co,ml=hl,gl="[object Symbol]";function bl(e){return typeof e=="symbol"||ml(e)&&vl(e)==gl}var Xr=bl,yl=Wr,wl=Xr,_l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xl=/^\w*$/;function kl(e,t){if(yl(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||wl(e)?!0:xl.test(e)||!_l.test(e)||t!=null&&e in Object(t)}var $l=kl;function Sl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Eo=Sl,Cl=Co,El=Eo,Ol="[object AsyncFunction]",Tl="[object Function]",Pl="[object GeneratorFunction]",Al="[object Proxy]";function Il(e){if(!El(e))return!1;var t=Cl(e);return t==Tl||t==Pl||t==Ol||t==Al}var Nl=Il,Dl=Gr,Ml=Dl["__core-js_shared__"],Fl=Ml,Zr=Fl,Oo=function(){var e=/[^.]+$/.exec(Zr&&Zr.keys&&Zr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ll(e){return!!Oo&&Oo in e}var Rl=Ll,jl=Function.prototype,Vl=jl.toString;function Bl(e){if(e!=null){try{return Vl.call(e)}catch{}try{return e+""}catch{}}return""}var zl=Bl,Ul=Nl,Hl=Rl,ql=Eo,Kl=zl,Wl=/[\\^$.*+?()[\]{}|]/g,Gl=/^\[object .+?Constructor\]$/,Yl=Function.prototype,Xl=Object.prototype,Zl=Yl.toString,Ql=Xl.hasOwnProperty,Jl=RegExp("^"+Zl.call(Ql).replace(Wl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ec(e){if(!ql(e)||Hl(e))return!1;var t=Ul(e)?Jl:Gl;return t.test(Kl(e))}var tc=ec;function rc(e,t){return e==null?void 0:e[t]}var nc=rc,oc=tc,ic=nc;function ac(e,t){var r=ic(e,t);return oc(r)?r:void 0}var To=ac,sc=To,lc=sc(Object,"create"),er=lc,Po=er;function cc(){this.__data__=Po?Po(null):{},this.size=0}var uc=cc;function dc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fc=dc,pc=er,hc="__lodash_hash_undefined__",vc=Object.prototype,mc=vc.hasOwnProperty;function gc(e){var t=this.__data__;if(pc){var r=t[e];return r===hc?void 0:r}return mc.call(t,e)?t[e]:void 0}var bc=gc,yc=er,wc=Object.prototype,_c=wc.hasOwnProperty;function xc(e){var t=this.__data__;return yc?t[e]!==void 0:_c.call(t,e)}var kc=xc,$c=er,Sc="__lodash_hash_undefined__";function Cc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=$c&&t===void 0?Sc:t,this}var Ec=Cc,Oc=uc,Tc=fc,Pc=bc,Ac=kc,Ic=Ec;function ft(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])}}ft.prototype.clear=Oc,ft.prototype.delete=Tc,ft.prototype.get=Pc,ft.prototype.has=Ac,ft.prototype.set=Ic;var Nc=ft;function Dc(){this.__data__=[],this.size=0}var Mc=Dc;function Fc(e,t){return e===t||e!==e&&t!==t}var Lc=Fc,Rc=Lc;function jc(e,t){for(var r=e.length;r--;)if(Rc(e[r][0],t))return r;return-1}var tr=jc,Vc=tr,Bc=Array.prototype,zc=Bc.splice;function Uc(e){var t=this.__data__,r=Vc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zc.call(t,r,1),--this.size,!0}var Hc=Uc,qc=tr;function Kc(e){var t=this.__data__,r=qc(t,e);return r<0?void 0:t[r][1]}var Wc=Kc,Gc=tr;function Yc(e){return Gc(this.__data__,e)>-1}var Xc=Yc,Zc=tr;function Qc(e,t){var r=this.__data__,n=Zc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Jc=Qc,eu=Mc,tu=Hc,ru=Wc,nu=Xc,ou=Jc;function pt(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])}}pt.prototype.clear=eu,pt.prototype.delete=tu,pt.prototype.get=ru,pt.prototype.has=nu,pt.prototype.set=ou;var iu=pt,au=To,su=Gr,lu=au(su,"Map"),cu=lu,Ao=Nc,uu=iu,du=cu;function fu(){this.size=0,this.__data__={hash:new Ao,map:new(du||uu),string:new Ao}}var pu=fu;function hu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var vu=hu,mu=vu;function gu(e,t){var r=e.__data__;return mu(t)?r[typeof t=="string"?"string":"hash"]:r.map}var rr=gu,bu=rr;function yu(e){var t=bu(this,e).delete(e);return this.size-=t?1:0,t}var wu=yu,_u=rr;function xu(e){return _u(this,e).get(e)}var ku=xu,$u=rr;function Su(e){return $u(this,e).has(e)}var Cu=Su,Eu=rr;function Ou(e,t){var r=Eu(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Tu=Ou,Pu=pu,Au=wu,Iu=ku,Nu=Cu,Du=Tu;function ht(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])}}ht.prototype.clear=Pu,ht.prototype.delete=Au,ht.prototype.get=Iu,ht.prototype.has=Nu,ht.prototype.set=Du;var Mu=ht,Io=Mu,Fu="Expected a function";function Qr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Fu);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Qr.Cache||Io),r}Qr.Cache=Io;var Lu=Qr,Ru=Lu,ju=500;function Vu(e){var t=Ru(e,function(n){return r.size===ju&&r.clear(),n}),r=t.cache;return t}var Bu=Vu,zu=Bu,Uu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hu=/\\(\\)?/g,qu=zu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Uu,function(r,n,i,o){t.push(i?o.replace(Hu,"$1"):n||r)}),t}),Ku=qu;function Wu(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Gu=Wu,No=Yr,Yu=Gu,Xu=Wr,Zu=Xr,Qu=1/0,Do=No?No.prototype:void 0,Mo=Do?Do.toString:void 0;function Fo(e){if(typeof e=="string")return e;if(Xu(e))return Yu(e,Fo)+"";if(Zu(e))return Mo?Mo.call(e):"";var t=e+"";return t=="0"&&1/e==-Qu?"-0":t}var Ju=Fo,ed=Ju;function td(e){return e==null?"":ed(e)}var rd=td,nd=Wr,od=$l,id=Ku,ad=rd;function sd(e,t){return nd(e)?e:od(e,t)?[e]:id(ad(e))}var ld=sd,cd=Xr,ud=1/0;function dd(e){if(typeof e=="string"||cd(e))return e;var t=e+"";return t=="0"&&1/e==-ud?"-0":t}var fd=dd,pd=ld,hd=fd;function vd(e,t){t=pd(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hd(t[r++])];return r&&r==n?e:void 0}var md=vd,gd=md;function bd(e,t,r){var n=e==null?void 0:gd(e,t);return n===void 0?r:n}var yd=bd;const It=Ie(yd);var Nt,S,Lo,Ro,et,jo,Vo,Jr,Bo,vt={},zo=[],wd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nr=Array.isArray;function Ne(e,t){for(var r in t)e[r]=t[r];return e}function Uo(e){var t=e.parentNode;t&&t.removeChild(e)}function N(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Nt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Dt(e,a,n,i,null)}function Dt(e,t,r,n,i){var o={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:i??++Lo};return i==null&&S.vnode!=null&&S.vnode(o),o}function Ho(){return{current:null}}function Y(e){return e.children}function ye(e,t){this.props=e,this.context=t}function or(e,t){if(t==null)return e.__?or(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"?or(e):null}function qo(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 qo(e)}}function en(e){(!e.__d&&(e.__d=!0)&&et.push(e)&&!ir.__r++||jo!==S.debounceRendering)&&((jo=S.debounceRendering)||Vo)(ir)}function ir(){var e,t,r,n,i,o,a,s,l;for(et.sort(Jr);e=et.shift();)e.__d&&(t=et.length,n=void 0,i=void 0,o=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(o=Ne({},a)).__v=a.__v+1,tn(l,a,o,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??or(a),a.__h,i),Qo(n,a,i),a.__e!=s&&qo(a)),et.length>t&&et.sort(Jr));ir.__r=0}function Ko(e,t,r,n,i,o,a,s,l,d,f){var c,h,g,m,v,w,x,_,O,P,T=0,H=n&&n.__k||zo,K=H.length,D=K,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"?Dt(null,m,null,null,m):nr(m)?Dt(Y,{children:m},null,null,null):m.__b>0?Dt(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=r,m.__b=r.__b+1,(_=_d(m,H,x=c+T,D))===-1?g=vt:(g=H[_]||vt,H[_]=void 0,D--),tn(e,m,g,i,o,a,s,l,d,f),v=m.__e,(h=m.ref)&&g.ref!=h&&(g.ref&&rn(g.ref,null,m),f.push(h,m.__c||v,m)),v!=null&&(w==null&&(w=v),P=!(O=g===vt||g.__v===null)&&_===x,O?_==-1&&T--:_!==x&&(_===x+1?(T++,P=!0):_>x?D>M-x?(T+=_-x,P=!0):T--:T=_<x&&_==x-1?_-x:0),x=c+T,P=P||_==c&&!O,typeof m.type!="function"||_===x&&g.__k!==m.__k?typeof m.type=="function"||P?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=v.nextSibling:l=Go(e,v,l):l=Wo(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=w,c=K;c--;)H[c]!=null&&(typeof r.type=="function"&&H[c].__e!=null&&H[c].__e==r.__d&&(r.__d=H[c].__e.nextSibling),Jo(H[c],H[c]))}function Wo(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t=typeof n.type=="function"?Wo(n,t,r):Go(r,n.__e,t));return t}function De(e,t){return t=t||[],e==null||typeof e=="boolean"||(nr(e)?e.some(function(r){De(r,t)}):t.push(e)),t}function Go(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 _d(e,t,r,n){var i=e.key,o=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&o===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&i==l.key&&o===l.type)return a;a--}if(s<t.length){if((l=t[s])&&i==l.key&&o===l.type)return s;s++}}return-1}function xd(e,t,r,n,i){var o;for(o in r)o==="children"||o==="key"||o in t||ar(e,o,null,r[o],n);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||r[o]===t[o]||ar(e,o,t[o],r[o],n)}function Yo(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||wd.test(t)?r:r+"px"}function ar(e,t,r,n,i){var o;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||Yo(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Yo(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n||e.addEventListener(t,o?Zo:Xo,o):e.removeEventListener(t,o?Zo:Xo,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Xo(e){return this.l[e.type+!1](S.event?S.event(e):e)}function Zo(e){return this.l[e.type+!0](S.event?S.event(e):e)}function tn(e,t,r,n,i,o,a,s,l,d){var f,c,h,g,m,v,w,x,_,O,P,T,H,K,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,o=[s]),(f=S.__b)&&f(t);try{e:if(typeof M=="function"){if(x=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(x,O):(t.__c=c=new ye(x,O),c.constructor=M,c.render=$d),_&&_.sub(c),c.props=x,c.state||(c.state={}),c.context=O,c.__n=n,h=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),M.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ne({},c.__s)),Ne(c.__s,M.getDerivedStateFromProps(x,c.__s))),g=c.props,m=c.state,c.__v=t,h)M.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(M.getDerivedStateFromProps==null&&x!==g&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,O),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,O)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(se){se&&(se.__=t)}),P=0;P<c._sb.length;P++)c.__h.push(c._sb[P]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,O),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(g,m,v)})}if(c.context=O,c.props=x,c.__P=e,c.__e=!1,T=S.__r,H=0,"prototype"in M&&M.prototype.render){for(c.state=c.__s,c.__d=!1,T&&T(t),f=c.render(c.props,c.state,c.context),K=0;K<c._sb.length;K++)c.__h.push(c._sb[K]);c._sb=[]}else do c.__d=!1,T&&T(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++H<25);c.state=c.__s,c.getChildContext!=null&&(n=Ne(Ne({},n),c.getChildContext())),h||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(g,m)),Ko(e,nr(D=f!=null&&f.type===Y&&f.key==null?f.props.children:f)?D:[D],t,r,n,i,o,a,s,l,d),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),w&&(c.__E=c.__=null)}else o==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=kd(r.__e,t,r,n,i,o,a,l,d);(f=S.diffed)&&f(t)}catch(se){t.__v=null,(l||o!=null)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),S.__e(se,t,r)}}function Qo(e,t,r){for(var n=0;n<r.length;n++)rn(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){S.__e(o,i.__v)}})}function kd(e,t,r,n,i,o,a,s,l){var d,f,c,h=r.props,g=t.props,m=t.type,v=0;if(m==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((d=o[v])&&"setAttribute"in d==!!m&&(m?d.localName===m:d.nodeType===3)){e=d,o[v]=null;break}}if(e==null){if(m===null)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,g.is&&g),o=null,s=!1}if(m===null)h===g||s&&e.data===g||(e.data=g);else{if(o=o&&Nt.call(e.childNodes),f=(h=r.props||vt).dangerouslySetInnerHTML,c=g.dangerouslySetInnerHTML,!s){if(o!=null)for(h={},v=0;v<e.attributes.length;v++)h[e.attributes[v].name]=e.attributes[v].value;(c||f)&&(c&&(f&&c.__html==f.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(xd(e,g,h,i,s),c)t.__k=[];else if(Ko(e,nr(v=t.props.children)?v:[v],t,r,n,i&&m!=="foreignObject",o,a,o?o[0]:r.__k&&or(r,0),s,l),o!=null)for(v=o.length;v--;)o[v]!=null&&Uo(o[v]);s||("value"in g&&(v=g.value)!==void 0&&(v!==e.value||m==="progress"&&!v||m==="option"&&v!==h.value)&&ar(e,"value",v,h.value,!1),"checked"in g&&(v=g.checked)!==void 0&&v!==e.checked&&ar(e,"checked",v,h.checked,!1))}return e}function rn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function Jo(e,t,r){var n,i;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||rn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){S.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Jo(n[i],t,r||typeof e.type!="function");r||e.__e==null||Uo(e.__e),e.__=e.__e=e.__d=void 0}function $d(e,t,r){return this.constructor(e,r)}function mt(e,t,r){var n,i,o,a;S.__&&S.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],a=[],tn(t,e=(!n&&r||t).__k=N(Y,null,[e]),i||vt,vt,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?Nt.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,a),Qo(o,e,a)}function ei(e,t){mt(e,t,ei)}function Sd(e,t,r){var n,i,o,a,s=Ne({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o]===void 0&&a!==void 0?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?Nt.call(arguments,2):r),Dt(e.type,s,n||e.key,i||e.ref,null)}function Mt(e,t){var r={__c:t="__cC"+Bo++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(s){s.__e=!0,en(s)})},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Nt=zo.slice,S={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Lo=0,Ro=function(e){return e!=null&&e.constructor===void 0},ye.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ne({},this.state),typeof e=="function"&&(e=e(Ne({},r),this.props)),e&&Ne(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),en(this))},ye.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),en(this))},ye.prototype.render=Y,et=[],Vo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Jr=function(e,t){return e.__v.__b-t.__v.__b},ir.__r=0,Bo=0;var nn=class extends Error{constructor(t){super(t[0].message);qs(this,"issues");this.name="ValiError",this.issues=t}};function ti(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Ft(e){return{issues:e}}function ce(e){return{output:e}}function Cd(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 Ed(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 Be(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return ce(e);let i,o,a=e;for(const s of t){const l=s._parse(a);if(l.issues){i=i||Ed(r,n);for(const d of l.issues){const f=Cd(i,d);o?o.push(f):o=[f]}if(i.abortEarly||i.abortPipeEarly)break}else a=l.output}return o?Ft(o):ce(a)}function ze(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function ri(e){return typeof e=="function"?e():e}function Ue(e,t,r,n){return Ft([{validation:e,message:ri(t),input:r,requirement:n}])}function Od(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,a]=ze(t,r);return[e,o,a]}const[n,i]=ze(e,t);return[void 0,n,i]}function Me(e,t,r,n,i,o){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:ri(n),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function ni(e){return typeof e.default=="function"?e.default():e.default}function Td(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Be(t,this.pipe,r,"any")}}}function Pd(e,t,r){const[n="Invalid type",i]=ze(t,r);return{type:"array",async:!1,item:e,message:n,pipe:i,_parse(o,a){if(!Array.isArray(o))return Me(a,"type","array",this.message,o);let s;const l=[];for(let d=0;d<o.length;d++){const f=o[d],c=this.item._parse(f,a);if(c.issues){const h={type:"array",input:o,key:d,value:f};for(const g of c.issues)g.path?g.path.unshift(h):g.path=[h],s==null||s.push(g);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Ft(s):Be(l,this.pipe,a,"array")}}}function oi(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="boolean"?Me(o,"type","boolean",this.message,i):Be(i,this.pipe,o,"boolean")}}}function ii(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?Me(n,"type","literal",this.message,r):ce(r)}}}function Ad(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const i=ni(this);if(i===void 0)return ce(r);r=i}return this.wrapped._parse(r,n)}}}function on(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="number"||isNaN(i)?Me(o,"type","number",this.message,i):Be(i,this.pipe,o,"number")}}}function Ce(e,t,r,n){const[i,o="Invalid type",a]=Od(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:a,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","object",this.message,l);s=s||Object.entries(this.entries);let f;const c={};for(const[h,g]of s){const m=l[h],v=g._parse(m,d);if(v.issues){const w={type:"object",input:l,key:h,value:m};for(const x of v.issues)x.path?x.path.unshift(w):x.path=[w],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}else(v.output!==void 0||h in l)&&(c[h]=v.output)}if(this.rest&&!(d!=null&&d.abortEarly&&f)){for(const h in l)if(!(h in this.entries)){const g=l[h],m=this.rest._parse(g,d);if(m.issues){const v={type:"object",input:l,key:h,value:g};for(const w of m.issues)w.path?w.path.unshift(v):w.path=[v],f==null||f.push(w);if(f||(f=m.issues),d!=null&&d.abortEarly)break}else c[h]=m.output}}return f?Ft(f):Be(c,this.pipe,d,"object")}}}function Id(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const i=ni(this);if(i===void 0)return ce(r);r=i}return this.wrapped._parse(r,n)}}}function Nd(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?ce(r):Me(n,"type","picklist",this.message,r)}}}function xe(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="string"?Me(o,"type","string",this.message,i):Be(i,this.pipe,o,"string")}}}function Dd(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=ze(r,n);return[e,t,a,s]}const[i,o]=ze(t,r);return[xe(),e,i,o]}var Md=["__proto__","prototype","constructor"];function ai(e,t,r,n){const[i,o,a="Invalid type",s]=Dd(e,t,r,n);return{type:"record",async:!1,key:i,value:o,message:a,pipe:s,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","record",this.message,l);let f;const c={};for(const[h,g]of Object.entries(l))if(!Md.includes(h)){let m;const v=this.key._parse(h,{origin:"key",abortEarly:d==null?void 0:d.abortEarly,abortPipeEarly:d==null?void 0:d.abortPipeEarly,skipPipe:d==null?void 0:d.skipPipe});if(v.issues){m={type:"record",input:l,key:h,value:g};for(const x of v.issues)x.path=[m],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}const w=this.value._parse(g,d);if(w.issues){m=m||{type:"record",input:l,key:h,value:g};for(const x of w.issues)x.path?x.path.unshift(m):x.path=[m],f==null||f.push(x);if(f||(f=w.issues),d!=null&&d.abortEarly)break}!v.issues&&!w.issues&&(c[v.output]=w.output)}return f?Ft(f):Be(c,this.pipe,d,"record")}}}function Fd(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let i,o;for(const a of this.options){const s=a._parse(r,n);if(s.issues)if(i)for(const l of s.issues)i.push(l);else i=s.issues;else{o=[s.output];break}}return o?ce(o[0]):Me(n,"type","union",this.message,r,i)}}}function sr(e,t,r){const n=e._parse(t,r);if(n.issues)throw new nn(n.issues);return n.output}async function Ld(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new nn(n.issues);return n.output}function si(e,t,r){return{...e,_parse(n,i){const o=e._parse(n,i);if(o.issues)return o;const a=t(o.output);return r&&!Array.isArray(r)?r._parse(a,i):Be(a,r,i,typeof a)}}}var Rd=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function jd(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Vd(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Rd,_parse(t){return this.requirement.test(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function lr(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Bd(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function cr(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function zd(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function li(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Ud(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)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function de(){return de=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},de.apply(this,arguments)}var Fe,z,an,ci,gt=0,ui=[],ur=[],di=S.__b,fi=S.__r,pi=S.diffed,hi=S.__c,vi=S.unmount;function tt(e,t){S.__h&&S.__h(z,e,gt||t),gt=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:ur}),r.__[e]}function W(e){return gt=1,dr(wi,e)}function dr(e,t,r){var n=tt(Fe++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):wi(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],d=n.t(l,s);l!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=z,!z.u)){var i=function(s,l,d){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!o||o.call(this,s,l,d);var c=!1;return f.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!o||o.call(this,s,l,d))};z.u=!0;var o=z.shouldComponentUpdate,a=z.componentWillUpdate;z.componentWillUpdate=function(s,l,d){if(this.__e){var f=o;o=void 0,i(s,l,d),o=f}a&&a.call(this,s,l,d)},z.shouldComponentUpdate=i}return n.__N||n.__}function j(e,t){var r=tt(Fe++,3);!S.__s&&ln(r.__H,t)&&(r.__=e,r.i=t,z.__H.__h.push(r))}function fe(e,t){var r=tt(Fe++,4);!S.__s&&ln(r.__H,t)&&(r.__=e,r.i=t,z.__h.push(r))}function F(e){return gt=5,pe(function(){return{current:e}},[])}function mi(e,t,r){gt=6,fe(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 pe(e,t){var r=tt(Fe++,7);return ln(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function me(e,t){return gt=8,pe(function(){return e},t)}function fr(e){var t=z.context[e.__c],r=tt(Fe++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(z)),t.props.value):e.__}function gi(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function Hd(e){var t=tt(Fe++,10),r=W();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(n,i){t.__&&t.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function bi(){var e=tt(Fe++,11);if(!e.__){for(var t=z.__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 qd(){for(var e;e=ui.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pr),e.__H.__h.forEach(sn),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){z=null,di&&di(e)},S.__r=function(e){fi&&fi(e),Fe=0;var t=(z=e.__c).__H;t&&(an===z?(t.__h=[],z.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=ur,r.__N=r.i=void 0})):(t.__h.forEach(pr),t.__h.forEach(sn),t.__h=[],Fe=0)),an=z},S.diffed=function(e){pi&&pi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ui.push(t)!==1&&ci===S.requestAnimationFrame||((ci=S.requestAnimationFrame)||Kd)(qd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==ur&&(r.__=r.__V),r.i=void 0,r.__V=ur})),an=z=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(pr),r.__h=r.__h.filter(function(n){return!n.__||sn(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],S.__e(n,r.__v)}}),hi&&hi(e,t)},S.unmount=function(e){vi&&vi(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{pr(n)}catch(i){t=i}}),r.__H=void 0,t&&S.__e(t,r.__v))};var yi=typeof requestAnimationFrame=="function";function Kd(e){var t,r=function(){clearTimeout(n),yi&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);yi&&(t=requestAnimationFrame(r))}function pr(e){var t=z,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),z=t}function sn(e){var t=z;e.__c=e.__(),z=t}function ln(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function wi(e,t){return typeof t=="function"?t(e):t}function _i(e,t){for(var r in t)e[r]=t[r];return e}function cn(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 un(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function hr(e){this.props=e}function xi(e,t){function r(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:cn(this.props,i)}function n(i){return this.shouldComponentUpdate=r,N(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(hr.prototype=new ye).isPureReactComponent=!0,hr.prototype.shouldComponentUpdate=function(e,t){return cn(this.props,e)||cn(this.state,t)};var ki=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ki&&ki(e)};var Wd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ne(e){function t(r){var n=_i({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Wd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $i=function(e,t){return e==null?null:De(De(e).map(t))},Le={map:$i,forEach:$i,count:function(e){return e?De(e).length:0},only:function(e){var t=De(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:De},Gd=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}Gd(e,t,r,n)};var Si=S.unmount;function Ci(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=_i({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Ci(n,t,r)})),e}function Ei(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Ei(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 bt(){this.__u=0,this.t=null,this.__b=null}function Oi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function dn(e){var t,r,n;function i(o){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,o)}return i.displayName="Lazy",i.__f=!0,i}function yt(){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),Si&&Si(e)},(bt.prototype=new ye).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Oi(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var d=n.state.__a;n.__v.__k[0]=Ei(d,d.__c.__P,d.__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)},bt.prototype.componentWillUnmount=function(){this.t=[]},bt.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]=Ci(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&N(Y,null,e.fallback);return i&&(i.__h=null),[N(Y,null,t.__a?null:e.children),i]};var Ti=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 Yd(e){return this.getChildContext=function(){return e.context},e.children}function Xd(e){var t=this,r=e.i;t.componentWillUnmount=function(){mt(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,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),mt(N(Yd,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Pi(e,t){var r=N(Xd,{__v:e,i:t});return r.containerInfo=t,r}(yt.prototype=new ye).__a=function(e){var t=this,r=Oi(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),Ti(t,e,n)):i()};r?r(o):o()}},yt.prototype.render=function(e){this.u=null,this.o=new Map;var t=De(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},yt.prototype.componentDidUpdate=yt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ti(e,r,t)})};var Ai=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Zd=/^(?: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]/,Qd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Jd=/[A-Z0-9]/g,ef=typeof document<"u",tf=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ii(e,t,r){return t.__k==null&&(t.textContent=""),mt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Ni(e,t,r){return ei(e,t),typeof r=="function"&&r(),e?e.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ye.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Di=S.event;function rf(){}function nf(){return this.cancelBubble}function of(){return this.defaultPrevented}S.event=function(e){return Di&&(e=Di(e)),e.persist=rf,e.isPropagationStopped=nf,e.isDefaultPrevented=of,e.nativeEvent=e};var fn,af={enumerable:!1,configurable:!0,get:function(){return this.class}},Mi=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var o in r){var a=r[o];if(!(o==="value"&&"defaultValue"in r&&a==null||ef&&o==="children"&&n==="noscript"||o==="class"||o==="className")){var s=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&a===!0?a="":s==="ondoubleclick"?o="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||tf(r.type)?s==="onfocus"?o="onfocusin":s==="onblur"?o="onfocusout":Qd.test(o)?o=s:n.indexOf("-")===-1&&Zd.test(o)?o=o.replace(Jd,"-$&").toLowerCase():a===null&&(a=void 0):s=o="oninput",s==="oninput"&&i[o=s]&&(o="oninputCapture"),i[o]=a}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=De(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=De(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",af)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Ai,Mi&&Mi(e)};var Fi=S.__r;S.__r=function(e){Fi&&Fi(e),fn=e.__c};var Li=S.diffed;S.diffed=function(e){Li&&Li(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),fn=null};var Ri={ReactCurrentDispatcher:{current:{readContext:function(e){return fn.__n[e.__c].props.value}}}},sf="17.0.2";function ji(e){return N.bind(null,e)}function rt(e){return!!e&&e.$$typeof===Ai}function wt(e){return rt(e)?Sd.apply(null,arguments):e}function Vi(e){return!!e.__k&&(mt(null,e),!0)}function Bi(e){return e&&(e.base||e.nodeType===1&&e)||null}var zi=function(e,t){return e(t)},vr=function(e,t){return e(t)},Ui=Y;function pn(e){e()}function Hi(e){return e}function qi(){return[!1,pn]}var Ki=fe;function Wi(e,t){var r=t(),n=W({h:{__:r,v:t}}),i=n[0].h,o=n[1];return fe(function(){i.__=r,i.v=t,un(i.__,t())||o({h:i})},[e,r,t]),j(function(){return un(i.__,i.v())||o({h:i}),e(function(){un(i.__,i.v())||o({h:i})})},[e]),r}var ke={useState:W,useId:bi,useReducer:dr,useEffect:j,useLayoutEffect:fe,useInsertionEffect:Ki,useTransition:qi,useDeferredValue:Hi,useSyncExternalStore:Wi,startTransition:pn,useRef:F,useImperativeHandle:mi,useMemo:pe,useCallback:me,useContext:fr,useDebugValue:gi,version:"17.0.2",Children:Le,render:Ii,hydrate:Ni,unmountComponentAtNode:Vi,createPortal:Pi,createElement:N,createContext:Mt,createFactory:ji,cloneElement:wt,createRef:Ho,Fragment:Y,isValidElement:rt,findDOMNode:Bi,Component:ye,PureComponent:hr,memo:xi,forwardRef:ne,flushSync:vr,unstable_batchedUpdates:zi,StrictMode:Ui,Suspense:bt,SuspenseList:yt,lazy:dn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ri};const lf=Object.freeze(Object.defineProperty({__proto__:null,Children:Le,Component:ye,Fragment:Y,PureComponent:hr,StrictMode:Ui,Suspense:bt,SuspenseList:yt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ri,cloneElement:wt,createContext:Mt,createElement:N,createFactory:ji,createPortal:Pi,createRef:Ho,default:ke,findDOMNode:Bi,flushSync:vr,forwardRef:ne,hydrate:Ni,isValidElement:rt,lazy:dn,memo:xi,render:Ii,startTransition:pn,unmountComponentAtNode:Vi,unstable_batchedUpdates:zi,useCallback:me,useContext:fr,useDebugValue:gi,useDeferredValue:Hi,useEffect:j,useErrorBoundary:Hd,useId:bi,useImperativeHandle:mi,useInsertionEffect:Ki,useLayoutEffect:fe,useMemo:pe,useReducer:dr,useRef:F,useState:W,useSyncExternalStore:Wi,useTransition:qi,version:sf},Symbol.toStringTag,{value:"Module"}));function _t(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function cf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Gi(...e){return t=>e.forEach(r=>cf(r,t))}function Lt(...e){return me(Gi(...e),e)}function uf(e,t=[]){let r=[];function n(o,a){const s=Mt(a),l=r.length;r=[...r,a];function d(c){const{scope:h,children:g,...m}=c,v=(h==null?void 0:h[e][l])||s,w=pe(()=>m,Object.values(m));return N(v.Provider,{value:w},g)}function f(c,h){const g=(h==null?void 0:h[e][l])||s,m=fr(g);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${o}\``)}return d.displayName=o+"Provider",[d,f]}const i=()=>{const o=r.map(a=>Mt(a));return function(s){const l=(s==null?void 0:s[e])||o;return pe(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,df(i,...t)]}function df(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((s,{useScope:l,scopeName:d})=>{const c=l(o)[`__scope${d}`];return{...s,...c}},{});return pe(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const hn=globalThis!=null&&globalThis.document?fe:()=>{},ff=lf["useId".toString()]||(()=>{});let pf=0;function vn(e){const[t,r]=W(ff());return hn(()=>{e||r(n=>n??String(pf++))},[e]),e||(t?`radix-${t}`:"")}function nt(e){const t=F(e);return j(()=>{t.current=e}),pe(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function hf({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=vf({defaultProp:t,onChange:r}),o=e!==void 0,a=o?e:n,s=nt(r),l=me(d=>{if(o){const c=typeof d=="function"?d(e):d;c!==e&&s(c)}else i(d)},[o,e,i,s]);return[a,l]}function vf({defaultProp:e,onChange:t}){const r=W(e),[n]=r,i=F(n),o=nt(t);return j(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}const mn=ne((e,t)=>{const{children:r,...n}=e,i=Le.toArray(r),o=i.find(gf);if(o){const a=o.props.children,s=i.map(l=>l===o?Le.count(a)>1?Le.only(null):rt(a)?a.props.children:null:l);return N(gn,de({},n,{ref:t}),rt(a)?wt(a,void 0,s):null)}return N(gn,de({},n,{ref:t}),r)});mn.displayName="Slot";const gn=ne((e,t)=>{const{children:r,...n}=e;return rt(r)?wt(r,{...bf(n,r.props),ref:t?Gi(t,r.ref):r.ref}):Le.count(r)>1?Le.only(null):null});gn.displayName="SlotClone";const mf=({children:e})=>N(Y,null,e);function gf(e){return rt(e)&&e.type===mf}function bf(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...s)=>{o(...s),i(...s)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}const bn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=ne((n,i)=>{const{asChild:o,...a}=n,s=o?mn:t;return j(()=>{window[Symbol.for("radix-ui")]=!0},[]),N(s,de({},a,{ref:i}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function yf(e,t){e&&vr(()=>e.dispatchEvent(t))}function wf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e);j(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const yn="dismissableLayer.update",_f="dismissableLayer.pointerDownOutside",xf="dismissableLayer.focusOutside";let Yi;const kf=Mt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$f=ne((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...d}=e,f=fr(kf),[c,h]=W(null),g=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=W({}),v=Lt(t,D=>h(D)),w=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),_=w.indexOf(x),O=c?w.indexOf(c):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,T=O>=_,H=Sf(D=>{const M=D.target,se=[...f.branches].some(re=>re.contains(M));!T||se||(o==null||o(D),s==null||s(D),D.defaultPrevented||l==null||l())},g),K=Cf(D=>{const M=D.target;[...f.branches].some(re=>re.contains(M))||(a==null||a(D),s==null||s(D),D.defaultPrevented||l==null||l())},g);return wf(D=>{O===f.layers.size-1&&(i==null||i(D),!D.defaultPrevented&&l&&(D.preventDefault(),l()))},g),j(()=>{if(c)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Yi=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(c)),f.layers.add(c),Xi(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Yi)}},[c,g,n,f]),j(()=>()=>{c&&(f.layers.delete(c),f.layersWithOutsidePointerEventsDisabled.delete(c),Xi())},[c,f]),j(()=>{const D=()=>m({});return document.addEventListener(yn,D),()=>document.removeEventListener(yn,D)},[]),N(bn.div,de({},d,{ref:v,style:{pointerEvents:P?T?"auto":"none":void 0,...e.style},onFocusCapture:_t(e.onFocusCapture,K.onFocusCapture),onBlurCapture:_t(e.onBlurCapture,K.onBlurCapture),onPointerDownCapture:_t(e.onPointerDownCapture,H.onPointerDownCapture)}))});function Sf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=F(!1),i=F(()=>{});return j(()=>{const o=s=>{if(s.target&&!n.current){let d=function(){Zi(_f,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Cf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=F(!1);return j(()=>{const i=o=>{o.target&&!n.current&&Zi(xf,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Xi(){const e=new CustomEvent(yn);document.dispatchEvent(e)}function Zi(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?yf(i,o):i.dispatchEvent(o)}const wn="focusScope.autoFocusOnMount",_n="focusScope.autoFocusOnUnmount",Qi={bubbles:!1,cancelable:!0},Ef=ne((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=W(null),d=nt(i),f=nt(o),c=F(null),h=Lt(t,v=>l(v)),g=F({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j(()=>{if(n){let v=function(O){if(g.paused||!s)return;const P=O.target;s.contains(P)?c.current=P:He(c.current,{select:!0})},w=function(O){if(g.paused||!s)return;const P=O.relatedTarget;P!==null&&(s.contains(P)||He(c.current,{select:!0}))},x=function(O){if(document.activeElement===document.body)for(const T of O)T.removedNodes.length>0&&He(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",w);const _=new MutationObserver(x);return s&&_.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),_.disconnect()}}},[n,s,g.paused]),j(()=>{if(s){ta.add(g);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(wn,Qi);s.addEventListener(wn,d),s.dispatchEvent(x),x.defaultPrevented||(Of(Nf(Ji(s)),{select:!0}),document.activeElement===v&&He(s))}return()=>{s.removeEventListener(wn,d),setTimeout(()=>{const x=new CustomEvent(_n,Qi);s.addEventListener(_n,f),s.dispatchEvent(x),x.defaultPrevented||He(v??document.body,{select:!0}),s.removeEventListener(_n,f),ta.remove(g)},0)}}},[s,d,f,g]);const m=me(v=>{if(!r&&!n||g.paused)return;const w=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(w&&x){const _=v.currentTarget,[O,P]=Tf(_);O&&P?!v.shiftKey&&x===P?(v.preventDefault(),r&&He(O,{select:!0})):v.shiftKey&&x===O&&(v.preventDefault(),r&&He(P,{select:!0})):x===_&&v.preventDefault()}},[r,n,g.paused]);return N(bn.div,de({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function Of(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(He(n,{select:t}),document.activeElement!==r)return}function Tf(e){const t=Ji(e),r=ea(t,e),n=ea(t.reverse(),e);return[r,n]}function Ji(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ea(e,t){for(const r of e)if(!Pf(r,{upTo:t}))return r}function Pf(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 Af(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Af(e)&&t&&e.select()}}const ta=If();function If(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ra(e,t),e.unshift(t)},remove(t){var r;e=ra(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function ra(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Nf(e){return e.filter(t=>t.tagName!=="A")}function Df(e,t){return dr((r,n)=>{const i=t[r][n];return i??r},e)}const xn=e=>{const{present:t,children:r}=e,n=Mf(t),i=typeof r=="function"?r({present:n.isPresent}):Le.only(r),o=Lt(n.ref,i.ref);return typeof r=="function"||n.isPresent?wt(i,{ref:o}):null};xn.displayName="Presence";function Mf(e){const[t,r]=W(),n=F({}),i=F(e),o=F("none"),a=e?"mounted":"unmounted",[s,l]=Df(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j(()=>{const d=mr(n.current);o.current=s==="mounted"?d:"none"},[s]),hn(()=>{const d=n.current,f=i.current;if(f!==e){const h=o.current,g=mr(d);e?l("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),hn(()=>{if(t){const d=c=>{const g=mr(n.current).includes(c.animationName);c.target===t&&g&&vr(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(o.current=mr(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:me(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function mr(e){return(e==null?void 0:e.animationName)||"none"}let kn=0;function Ff(){j(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:na()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:na()),kn++,()=>{kn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),kn--}},[])}function na(){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 Ee=function(){return Ee=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ee.apply(this,arguments)};function oa(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Lf(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var gr="right-scroll-bar-position",br="width-before-scroll-bar",Rf="with-scroll-bars-hidden",jf="--removed-body-scroll-bar-size";function Vf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Bf(e,t){var r=W(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}function zf(e,t){return Bf(t||null,function(r){return e.forEach(function(n){return Vf(n,r)})})}function Uf(e){return e}function Hf(e,t){t===void 0&&(t=Uf);var r=[],n=!1,i={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(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(s){return o(s)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(o),a=r}var l=function(){var f=a;a=[],f.forEach(o)},d=function(){return Promise.resolve().then(l)};d(),r={push:function(f){a.push(f),d()},filter:function(f){return a=a.filter(f),r}}}};return i}function qf(e){e===void 0&&(e={});var t=Hf(null);return t.options=Ee({async:!0,ssr:!1},e),t}var ia=function(e){var t=e.sideCar,r=oa(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,Ee({},r))};ia.isSideCarExport=!0;function Kf(e,t){return e.useMedium(t),ia}var aa=qf(),$n=function(){},yr=ne(function(e,t){var r=F(null),n=W({onScrollCapture:$n,onWheelCapture:$n,onTouchMoveCapture:$n}),i=n[0],o=n[1],a=e.forwardProps,s=e.children,l=e.className,d=e.removeScrollBar,f=e.enabled,c=e.shards,h=e.sideCar,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,_=oa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=h,P=zf([r,t]),T=Ee(Ee({},_),i);return N(Y,null,f&&N(O,{sideCar:aa,removeScrollBar:d,shards:c,noIsolation:g,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:r}),a?wt(Le.only(s),Ee(Ee({},T),{ref:P})):N(x,Ee({},T,{className:l,ref:P}),s))});yr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},yr.classNames={fullWidth:br,zeroRight:gr};var sa,Wf=function(){if(sa)return sa;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Gf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wf();return t&&e.setAttribute("nonce",t),e}function Yf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Xf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Zf=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Gf())&&(Yf(t,r),Xf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qf=function(){var e=Zf();return function(t,r){j(function(){return e.add(t),function(){e.remove()}},[t&&r])}},la=function(){var e=Qf(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},Jf={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},ep=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(r),Sn(n),Sn(i)]},tp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jf;var t=ep(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])}},rp=la(),np=function(e,t,r,n){var i=e.left,o=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
2
+ .`.concat(Rf,` {
3
3
  overflow: hidden `).concat(n,`;
4
4
  padding-right: `).concat(s,"px ").concat(n,`;
5
5
  }
@@ -33,13 +33,13 @@ var Dm=Object.defineProperty;var Nm=(Je,be,Pe)=>be in Je?Dm(Je,be,{enumerable:!0
33
33
  }
34
34
 
35
35
  body {
36
- `).concat(Lf,": ").concat(s,`px;
36
+ `).concat(jf,": ").concat(s,`px;
37
37
  }
38
- `)},rh=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n,o=he(function(){return Jf(i)},[i]);return D(eh,{styles:th(o,!t,i,r?"":"!important")})},Cn=!1;if(typeof window<"u")try{var _r=Object.defineProperty({},"passive",{get:function(){return Cn=!0,!0}});window.addEventListener("test",_r,_r),window.removeEventListener("test",_r,_r)}catch{Cn=!1}var xt=Cn?{passive:!1}:!1,nh=function(e){return e.tagName==="TEXTAREA"},sa=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!nh(e)&&r[t]==="visible")},oh=function(e){return sa(e,"overflowY")},ih=function(e){return sa(e,"overflowX")},la=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=ca(e,r);if(n){var i=ua(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},ah=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},sh=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},ca=function(e,t){return e==="v"?oh(t):ih(t)},ua=function(e,t){return e==="v"?ah(t):sh(t)},lh=function(e,t){return e==="h"&&t==="rtl"?-1:1},ch=function(e,t,r,n,i){var o=lh(e,window.getComputedStyle(t).direction),a=o*n,s=r.target,l=t.contains(s),d=!1,f=a>0,c=0,p=0;do{var m=ua(e,s),g=m[0],v=m[1],_=m[2],x=v-_-o*g;(g||x)&&ca(e,s)&&(c+=x,p+=g),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(i&&c===0||!i&&a>c)||!f&&(i&&p===0||!i&&-a>p))&&(d=!0),d},wr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},da=function(e){return[e.deltaX,e.deltaY]},fa=function(e){return e&&"current"in e?e.current:e},uh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dh=function(e){return`
38
+ `)},op=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n,o=pe(function(){return tp(i)},[i]);return N(rp,{styles:np(o,!t,i,r?"":"!important")})},Cn=!1;if(typeof window<"u")try{var wr=Object.defineProperty({},"passive",{get:function(){return Cn=!0,!0}});window.addEventListener("test",wr,wr),window.removeEventListener("test",wr,wr)}catch{Cn=!1}var xt=Cn?{passive:!1}:!1,ip=function(e){return e.tagName==="TEXTAREA"},ca=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ip(e)&&r[t]==="visible")},ap=function(e){return ca(e,"overflowY")},sp=function(e){return ca(e,"overflowX")},ua=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=da(e,r);if(n){var i=fa(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},lp=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},cp=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},da=function(e,t){return e==="v"?ap(t):sp(t)},fa=function(e,t){return e==="v"?lp(t):cp(t)},up=function(e,t){return e==="h"&&t==="rtl"?-1:1},dp=function(e,t,r,n,i){var o=up(e,window.getComputedStyle(t).direction),a=o*n,s=r.target,l=t.contains(s),d=!1,f=a>0,c=0,h=0;do{var g=fa(e,s),m=g[0],v=g[1],w=g[2],x=v-w-o*m;(m||x)&&da(e,s)&&(c+=x,h+=m),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(i&&c===0||!i&&a>c)||!f&&(i&&h===0||!i&&-a>h))&&(d=!0),d},_r=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pa=function(e){return[e.deltaX,e.deltaY]},ha=function(e){return e&&"current"in e?e.current:e},fp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pp=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},fh=0,kt=[];function hh(e){var t=F([]),r=F([0,0]),n=F(),i=W(fh++)[0],o=W(function(){return aa()})[0],a=F(e);j(function(){a.current=e},[e]),j(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Mf([e.lockRef.current],(e.shards||[]).map(fa),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=me(function(v,_){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=wr(v),w=r.current,O="deltaX"in v?v.deltaX:w[0]-x[0],T="deltaY"in v?v.deltaY:w[1]-x[1],A,H=v.target,K=Math.abs(O)>Math.abs(T)?"h":"v";if("touches"in v&&K==="h"&&H.type==="range")return!1;var N=la(K,H);if(!N)return!0;if(N?A=K:(A=K==="v"?"h":"v",N=la(K,H)),!N)return!1;if(!n.current&&"changedTouches"in v&&(O||T)&&(n.current=A),!A)return!0;var M=n.current||A;return ch(M,_,v,M==="h"?O:T,!0)},[]),l=me(function(v){var _=v;if(!(!kt.length||kt[kt.length-1]!==o)){var x="deltaY"in _?da(_):wr(_),w=t.current.filter(function(A){return A.name===_.type&&A.target===_.target&&uh(A.delta,x)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var O=(a.current.shards||[]).map(fa).filter(Boolean).filter(function(A){return A.contains(_.target)}),T=O.length>0?s(_,O[0]):!a.current.noIsolation;T&&_.cancelable&&_.preventDefault()}}},[]),d=me(function(v,_,x,w){var O={name:v,delta:_,target:x,should:w};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(T){return T!==O})},1)},[]),f=me(function(v){r.current=wr(v),n.current=void 0},[]),c=me(function(v){d(v.type,da(v),v.target,s(v,e.lockRef.current))},[]),p=me(function(v){d(v.type,wr(v),v.target,s(v,e.lockRef.current))},[]);j(function(){return kt.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,xt),document.addEventListener("touchmove",l,xt),document.addEventListener("touchstart",f,xt),function(){kt=kt.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,xt),document.removeEventListener("touchmove",l,xt),document.removeEventListener("touchstart",f,xt)}},[]);var m=e.removeScrollBar,g=e.inert;return D(Y,null,g?D(o,{styles:dh(i)}):null,m?D(rh,{gapMode:"margin"}):null)}const ph=Hf(oa,hh);var ha=ne(function(e,t){return D(yr,Ee({},e,{ref:t,sideCar:ph}))});ha.classNames=yr.classNames;const vh=ha;var mh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,xr=new WeakMap,kr={},En=0,pa=function(e){return e&&(e.host||pa(e.parentNode))},gh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=pa(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})},bh=function(e,t,r,n){var i=gh(t,Array.isArray(e)?e:[e]);kr[r]||(kr[r]=new WeakMap);var o=kr[r],a=[],s=new Set,l=new Set(i),d=function(c){!c||s.has(c)||(s.add(c),d(c.parentNode))};i.forEach(d);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(s.has(p))f(p);else{var m=p.getAttribute(n),g=m!==null&&m!=="false",v=($t.get(p)||0)+1,_=(o.get(p)||0)+1;$t.set(p,v),o.set(p,_),a.push(p),v===1&&g&&xr.set(p,!0),_===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}})};return f(t),s.clear(),En++,function(){a.forEach(function(c){var p=$t.get(c)-1,m=o.get(c)-1;$t.set(c,p),o.set(c,m),p||(xr.has(c)||c.removeAttribute(n),xr.delete(c)),m||c.removeAttribute(r)}),En--,En||($t=new WeakMap,$t=new WeakMap,xr=new WeakMap,kr={})}},yh=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||mh(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),bh(n,i,r,"aria-hidden")):function(){return null}};const va="Dialog",[ma,Fm]=lf(va),[_h,St]=ma(va),wh=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=F(null),l=F(null),[d=!1,f]=ff({prop:n,defaultProp:i,onChange:o});return D(_h,{scope:t,triggerRef:s,contentRef:l,contentId:vn(),titleId:vn(),descriptionId:vn(),open:d,onOpenChange:f,onOpenToggle:me(()=>f(c=>!c),[f]),modal:a},r)},xh="DialogPortal",[Lm,ga]=ma(xh,{forceMount:void 0}),On="DialogOverlay",kh=ne((e,t)=>{const r=ga(On,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=St(On,e.__scopeDialog);return o.modal?D(xn,{present:n||o.open},D($h,de({},i,{ref:t}))):null}),$h=ne((e,t)=>{const{__scopeDialog:r,...n}=e,i=St(On,r);return D(vh,{as:mn,allowPinchZoom:!0,shards:[i.contentRef]},D(bn.div,de({"data-state":ya(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Rt="DialogContent",Sh=ne((e,t)=>{const r=ga(Rt,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=St(Rt,e.__scopeDialog);return D(xn,{present:n||o.open},o.modal?D(Ch,de({},i,{ref:t})):D(Eh,de({},i,{ref:t})))}),Ch=ne((e,t)=>{const r=St(Rt,e.__scopeDialog),n=F(null),i=Lt(t,r.contentRef,n);return j(()=>{const o=n.current;if(o)return yh(o)},[]),D(ba,de({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:wt(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:wt(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:wt(e.onFocusOutside,o=>o.preventDefault())}))}),Eh=ne((e,t)=>{const r=St(Rt,e.__scopeDialog),n=F(!1),i=F(!1);return D(ba,de({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,o),!o.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),o.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:o=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),ba=ne((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=St(Rt,r),l=F(null),d=Lt(t,l);return Nf(),D(Y,null,D(Sf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o},D(xf,de({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ya(s.open)},a,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function ya(e){return e?"open":"closed"}const Oh=wh,Ah=kh,Th=Sh;function _a(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=_a(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ot(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=_a(e))&&(n&&(n+=" "),n+=t);return n}const wa=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,xa=ot,$r=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return xa(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(d=>{const f=r==null?void 0:r[d],c=o==null?void 0:o[d];if(f===null)return null;const p=wa(f)||wa(c);return i[d][p]}),s=r&&Object.entries(r).reduce((d,f)=>{let[c,p]=f;return p===void 0||(d[c]=p),d},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:c,className:p,...m}=f;return Object.entries(m).every(g=>{let[v,_]=g;return Array.isArray(_)?_.includes({...o,...s}[v]):{...o,...s}[v]===_})?[...d,c,p]:d},[]);return xa(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},pe=Symbol.for("@ts-pattern/matcher"),ka=Symbol.for("@ts-pattern/isVariadic"),Sr="@ts-pattern/anonymous-select-key",An=e=>!!(e&&typeof e=="object"),Cr=e=>e&&!!e[pe],oe=(e,t,r)=>{if(Cr(e)){const n=e[pe](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(a=>r(a,o[a])),i}if(An(e)){if(!An(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(const a of e.keys()){const s=e[a];Cr(s)&&s[ka]?o.push(s):o.length?i.push(s):n.push(s)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const a=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((d,f)=>oe(d,a[f],r))&&i.every((d,f)=>oe(d,s[f],r))&&(o.length===0||oe(o[0],l,r))}return e.length===t.length&&e.every((a,s)=>oe(a,t[s],r))}return Object.keys(e).every(n=>{const i=e[n];return(n in t||Cr(o=i)&&o[pe]().matcherType==="optional")&&oe(i,t[n],r);var o})}return Object.is(t,e)},ge=e=>{var t,r,n;return An(e)?Cr(e)?(t=(r=(n=e[pe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?jt(e,ge):jt(Object.values(e),ge):[]},jt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Ih(...e){if(e.length===1){const[t]=e;return r=>oe(t,r,()=>{})}if(e.length===2){const[t,r]=e;return oe(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function le(e){return Object.assign(e,{optional:()=>In(e),and:t=>G(e,t),or:t=>$a(e,t),select:t=>t===void 0?Vt(e):Vt(t,e)})}function Tn(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[ka]:!0})}}))(e),{optional:()=>Tn(In(e)),select:t=>Tn(t===void 0?Vt(e):Vt(t,e))})}function In(e){return le({[pe]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return t===void 0?(ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:oe(e,t,n),selections:r}},getSelectionKeys:()=>ge(e),matcherType:"optional"})})}const Ph=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Dh=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function G(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return{matched:e.every(i=>oe(i,t,n)),selections:r}},getSelectionKeys:()=>jt(e,ge),matcherType:"and"})})}function $a(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return jt(e,ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>oe(i,t,n)),selections:r}},getSelectionKeys:()=>jt(e,ge),matcherType:"or"})})}function R(e){return{[pe]:()=>({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 le({[pe]:()=>({match:n=>{let i={[t??Sr]:n};return{matched:r===void 0||oe(r,n,(o,a)=>{i[o]=a}),selections:i}},getSelectionKeys:()=>[t??Sr].concat(r===void 0?[]:ge(r))})})}function Oe(e){return typeof e=="number"}function it(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}const Sa=le(R(function(e){return!0})),Nh=Sa,at=e=>Object.assign(le(e),{startsWith:t=>{return at(G(e,(r=t,R(n=>it(n)&&n.startsWith(r)))));var r},endsWith:t=>{return at(G(e,(r=t,R(n=>it(n)&&n.endsWith(r)))));var r},minLength:t=>at(G(e,(r=>R(n=>it(n)&&n.length>=r))(t))),maxLength:t=>at(G(e,(r=>R(n=>it(n)&&n.length<=r))(t))),includes:t=>{return at(G(e,(r=t,R(n=>it(n)&&n.includes(r)))));var r},regex:t=>{return at(G(e,(r=t,R(n=>it(n)&&!!n.match(r)))));var r}}),Mh=at(R(it)),Ae=e=>Object.assign(le(e),{between:(t,r)=>Ae(G(e,((n,i)=>R(o=>Oe(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ae(G(e,(r=>R(n=>Oe(n)&&n<r))(t))),gt:t=>Ae(G(e,(r=>R(n=>Oe(n)&&n>r))(t))),lte:t=>Ae(G(e,(r=>R(n=>Oe(n)&&n<=r))(t))),gte:t=>Ae(G(e,(r=>R(n=>Oe(n)&&n>=r))(t))),int:()=>Ae(G(e,R(t=>Oe(t)&&Number.isInteger(t)))),finite:()=>Ae(G(e,R(t=>Oe(t)&&Number.isFinite(t)))),positive:()=>Ae(G(e,R(t=>Oe(t)&&t>0))),negative:()=>Ae(G(e,R(t=>Oe(t)&&t<0)))}),Fh=Ae(R(Oe)),Ke=e=>Object.assign(le(e),{between:(t,r)=>Ke(G(e,((n,i)=>R(o=>qe(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ke(G(e,(r=>R(n=>qe(n)&&n<r))(t))),gt:t=>Ke(G(e,(r=>R(n=>qe(n)&&n>r))(t))),lte:t=>Ke(G(e,(r=>R(n=>qe(n)&&n<=r))(t))),gte:t=>Ke(G(e,(r=>R(n=>qe(n)&&n>=r))(t))),positive:()=>Ke(G(e,R(t=>qe(t)&&t>0))),negative:()=>Ke(G(e,R(t=>qe(t)&&t<0)))}),Lh=Ke(R(qe)),Rh=le(R(function(e){return typeof e=="boolean"})),jh=le(R(function(e){return typeof e=="symbol"})),Vh=le(R(function(e){return e==null}));var B={__proto__:null,matcher:pe,optional:In,array:function(...e){return Tn({[pe]:()=>({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 ge(r).forEach(o=>{n[o]=[]}),{matched:!0,selections:n};const i=(o,a)=>{n[o]=(n[o]||[]).concat([a])};return{matched:t.every(o=>oe(r,o,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},set:function(...e){return le({[pe]:()=>({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=(o,a)=>{r[o]=(r[o]||[]).concat([a])},i=e[0];return{matched:Ph(t,o=>oe(i,o,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},map:function(...e){return le({[pe]:()=>({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 i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,a]=e;return{matched:Dh(t,(s,l)=>{const d=oe(o,l,n),f=oe(a,s,n);return d&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ge(e[0]),...ge(e[1])]})})},intersection:G,union:$a,not:function(e){return le({[pe]:()=>({match:t=>({matched:!oe(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:R,select:Vt,any:Sa,_:Nh,string:Mh,number:Fh,bigint:Lh,boolean:Rh,symbol:jh,nullish:Vh,instanceOf:function(e){return le(R(function(t){return r=>r instanceof t}(e)))},shape:function(e){return le(R(Ih(e)))}};const Pn={matched:!1,value:void 0};function Re(e){return new Er(e,Pn)}class Er{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 i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,a={};const s=(d,f)=>{o=!0,a[d]=f},l=!n.some(d=>oe(d,this.input,s))||i&&!i(this.input)?Pn:{matched:!0,value:r(o?Sr in a?a[Sr]:a:this.input,this.input)};return new Er(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Er(this.input,n?{matched:!0,value:r(this.input,this.input)}:Pn)}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 Rm="";function $e(e,t){if(!e)throw new Error(t)}function Or(){throw new Error("Cycle detected")}var Bh=Symbol.for("preact-signals");function Dn(){if(Ct>1)Ct--;else{for(var e,t=!1;Bt!==void 0;){var r=Bt;for(Bt=void 0,Nn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Ea(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Nn=0,Ct--,t)throw e}}var X=void 0,Bt=void 0,Ct=0,Nn=0,Ar=0;function Ca(e){if(X!==void 0){var t=e.n;if(t===void 0||t.t!==X)return t={i:0,S:e,p:X.s,n:void 0,t:X,e:void 0,x:void 0,r:t},X.s!==void 0&&(X.s.n=t),X.s=t,e.n=t,32&X.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=X.s,t.n=void 0,X.s.n=t,X.s=t),t}}function ie(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ie.prototype.brand=Bh,ie.prototype.h=function(){return!0},ie.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)},ie.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)}},ie.prototype.subscribe=function(e){var t=this;return Fn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},ie.prototype.valueOf=function(){return this.value},ie.prototype.toString=function(){return this.value+""},ie.prototype.toJSON=function(){return this.value},ie.prototype.peek=function(){return this.v},Object.defineProperty(ie.prototype,"value",{get:function(){var e=Ca(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(X instanceof Ge&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Nn>100&&Or(),this.v=e,this.i++,Ar++,Ct++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Dn()}}}});function We(e){return new ie(e)}function Ea(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 Oa(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 Aa(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 Ge(e){ie.call(this,void 0),this.x=e,this.s=void 0,this.g=Ar-1,this.f=4}(Ge.prototype=new ie).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ar))return!0;if(this.g=Ar,this.f|=1,this.i>0&&!Ea(this))return this.f&=-2,!0;var e=X;try{Oa(this),X=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 X=e,Aa(this),this.f&=-2,!0},Ge.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)}ie.prototype.S.call(this,e)},Ge.prototype.U=function(e){if(this.t!==void 0&&(ie.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)}},Ge.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ge.prototype.peek=function(){if(this.h()||Or(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ge.prototype,"value",{get:function(){1&this.f&&Or();var e=Ca(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function zh(e){return new Ge(e)}function Ta(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ct++;var r=X;X=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Mn(e),n}finally{X=r,Dn()}}}function Mn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ta(e)}function Uh(e){if(X!==this)throw new Error("Out-of-order effect");Aa(this),X=e,this.f&=-2,8&this.f&&Mn(this),Dn()}function zt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}zt.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()}},zt.prototype.S=function(){1&this.f&&Or(),this.f|=1,this.f&=-9,Ta(this),Oa(this),Ct++;var e=X;return X=this,Uh.bind(this,e)},zt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Bt,Bt=this)},zt.prototype.d=function(){this.f|=8,1&this.f||Mn(this)};function Fn(e){var t=new zt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Ln;function Et(e,t){S[e]=t.bind(null,S[e]||function(){})}function Tr(e){Ln&&Ln(),Ln=e&&e.S()}function Ia(e){var t=this,r=e.data,n=qh(r);n.value=r;var i=he(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Fo(i.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},zh(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return i.value}Ia.displayName="_st",Object.defineProperties(ie.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Ia},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Et("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof ie&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)}),Et("__r",function(e,t){Tr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return Fn(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Tr(r),e(t)}),Et("__e",function(e,t,r,n){Tr(),e(t,r,n)}),Et("diffed",function(e,t){Tr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var a in o){var s=o[a];s!==void 0&&!(a in n)&&(s.d(),o[a]=void 0)}else r.U=o={};for(var l in n){var d=o[l],f=n[l];d===void 0?(d=Hh(r,l,f,i),o[l]=d):d.o(f,i)}}}e(t)});function Hh(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=We(r);return{o:function(a,s){o.value=a,n=s},d:Fn(function(){var a=o.value.value;n[t]!==a&&(n[t]=a,i?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}Et("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 i in n){var o=n[i];o&&o.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),Et("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ye.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 i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function qh(e){return he(function(){return We(e)},[])}const Rn=(e,t)=>t.some(r=>e instanceof r);let Pa,Da;function Kh(){return Pa||(Pa=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Wh(){return Da||(Da=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const jn=new WeakMap,Vn=new WeakMap,Ir=new WeakMap;function Gh(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{r(st(e.result)),i()},a=()=>{n(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return Ir.set(t,e),t}function Yh(e){if(jn.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{r(),i()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});jn.set(e,t)}let Bn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return jn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return st(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 Na(e){Bn=e(Bn)}function Zh(e){return Wh().includes(e)?function(...t){return e.apply(zn(this),t),st(this.request)}:function(...t){return st(e.apply(zn(this),t))}}function Xh(e){return typeof e=="function"?Zh(e):(e instanceof IDBTransaction&&Yh(e),Rn(e,Kh())?new Proxy(e,Bn):e)}function st(e){if(e instanceof IDBRequest)return Gh(e);if(Vn.has(e))return Vn.get(e);const t=Xh(e);return t!==e&&(Vn.set(e,t),Ir.set(t,e)),t}const zn=e=>Ir.get(e);function Qh(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),s=st(a);return n&&a.addEventListener("upgradeneeded",l=>{n(st(a.result),l.oldVersion,l.newVersion,st(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const Jh=["get","getKey","getAll","getAllKeys","count"],ep=["put","add","delete","clear"],Un=new Map;function Ma(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Un.get(t))return Un.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=ep.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||Jh.includes(r)))return;const o=async function(a,...s){const l=this.transaction(a,i?"readwrite":"readonly");let d=l.store;return n&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),i&&l.done]))[0]};return Un.set(t,o),o}Na(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 tp=["continue","continuePrimaryKey","advance"],Fa={},Hn=new WeakMap,La=new WeakMap,rp={get(e,t){if(!tp.includes(t))return e[t];let r=Fa[t];return r||(r=Fa[t]=function(...n){Hn.set(this,La.get(this)[t](...n))}),r}};async function*np(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,rp);for(La.set(r,t),Ir.set(r,zn(t));t;)yield r,t=await(Hn.get(r)||t.continue()),Hn.delete(r)}function Ra(e,t){return t===Symbol.asyncIterator&&Rn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Rn(e,[IDBIndex,IDBObjectStore])}Na(e=>({...e,get(t,r,n){return Ra(t,r)?np:e.get(t,r,n)},has(t,r){return Ra(t,r)||e.has(t,r)}}));const Ut=e=>Re(e).with(B.number.lte(1e3),()=>`${Math.round(e)}KB`).with(B.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),ja=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},op=e=>Object.entries(e).reduce((r,[n,i])=>(r[n]=i.value,r),{}),Ht=e=>t=>t?t.type===e:!1;class qt extends Error{constructor(){super("Aborted")}}function ip(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const Va=e=>typeof e=="string",ap=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ba=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:ap()}),sp=e=>Re(e).with({nativeEvent:{submitter:B.select(B.union(B.instanceOf(HTMLButtonElement),B.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),za=typeof window>"u"?void 0:Qh("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Kt={getStateData:async(e,t)=>{var n;const r=Ua({...e,flowKeys:t});return(n=await za)==null?void 0:n.get("state",r)},setStateData:ip(async e=>{var r;const t=Ua(e);return(r=await za)==null?void 0:r.put("state",e.data,t)},1e3)},Pr=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(d=>d.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const o=t.type==="if-block"?t.branchId:void 0,a=e.find(d=>d.id===o),s=t.type.includes("question")?1:0;if(a){const d=s+Math.max(Pr(e,i,r,n+s).remainingSteps,Pr(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:d}),{stepsMade:n,remainingSteps:d}}const l=s+Pr(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},lp=e=>{const t={},r=e.find(n=>n.isHead);return r&&Pr(e,r,(n,i)=>{t[n]=i}),t},Ua=e=>[...e.flowKeys,e.id,e.version].join("/"),Ye=We({state:"idle"}),Wt=e=>{const{state:t,flow:r}=Ye.value;if(t!=="loaded")return;$e(r,"No flow to update");const n=e(r.data);r.data=n,Ye.value={state:t,flow:r},Kt.setStateData(r)},P={current$:Ye,viewState$:We("closed"),inputHeight$:We(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:i,job:o})=>{const s={data:await Kt.getStateData(e,r)??Ba(),startedAt:new Date,nodeIdToProgress:lp(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:i,job:o};Ye.value={state:"loaded",flow:s},Kt.setStateData(s)},cancelCurrentFlow:()=>{Ye.value={state:"idle"},P.viewState$.value="closed"},markAsFinished:()=>Wt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Wt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Ye.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ba();Ye.value={state:e,flow:{...t,data:r,startedAt:new Date}},Kt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Wt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ye.value;$e(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,Kt.setStateData(r)},setSubmission:(e,t)=>Wt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Wt(t=>({...t,currentInput:e??null}))};var cp=0;function u(e,t,r,n,i,o){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var d={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:--cp,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(d),d}const up=({message:e})=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:[u("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:[u("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"}),u("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"}),u("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),u("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),u("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),u("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),u("path",{d:"M38 56h19"})]}),u("div",{class:"flex flex-col gap-2 text-center",children:[u("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&u("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Ha=e=>u("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[u("title",{children:"Loading"}),u("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)}}"}),u("g",{id:"s1",transform:"translate(12,0)",children:u("g",{id:"s2",transform:"scale(0,0)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s3",transform:"translate(12,12)",children:u("g",{id:"s4",transform:"scale(1,1)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s5",transform:"translate(12,0)",children:u("g",{id:"s6",transform:"scale(0,0)",children:u("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"})})}),u("g",{id:"s7",transform:"translate(12,0)",children:u("g",{id:"s8",transform:"scale(0,0)",children:u("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"})})})]}),qa=()=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(Ha,{class:"text-neutral-6 h-8 w-8"})}),dp=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)}%`},Dr=({class:e,children:t,...r})=>u("button",{class:ot("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:u("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})}),fp=()=>{if(P.current$.value.state!=="loaded")return null;const e=P.current$.value.flow.nodeIdToProgress,t=P.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 u("div",{class:"bg-accent-3",children:u("div",{style:{width:dp(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},hp=({children:e})=>{const t=P.viewState$;return u(Y,{children:u("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:[u("div",{class:"flex h-[var(--header-height)] gap-2",children:[u("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),u("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:u("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),u("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?u(Y,{children:[u(Dr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:u("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),u(Dr,{"aria-label":"Close application",onClick:P.cancelCurrentFlow,children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):u(Y,{children:[P.current$.value.state==="loaded"&&u(Dr,{"aria-label":"Restart",onClick:()=>{P.restart()},children:[u("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"}),u("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),u(Dr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),u(fp,{})]})})},pp=dn(()=>Promise.resolve().then(()=>Sm).then(e=>e.ChatbotBody)),vp=$r("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"}}}),mp=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:i,error:o}=P.current$.value,a=P.viewState$.value,s=n!=="idle"&&a==="maximised",l=F(null);return u(Oh,{open:s,modal:s,children:[u(Ah,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0 isolate"}),u(Th,{forceMount:!0,asChild:!0,children:u("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:vp({view:a}),children:u("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[u(hp,{children:i==null?void 0:i.title}),Re({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>u(qa,{},"loading")).with({state:"loaded"},()=>u(bt,{fallback:u(qa,{},"loading"),children:u(pp,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>u(up,{message:o})).exhaustive()]})})})]})},Ka=Ce({id:Jo(xe(),String),version:on(),build:on(),nodes:Od(Ed()),context_schema:Td(Ad(oi(xe(),Ce({required:ri(),type:Nd([ni("string"),ni("number")])}))))}),gp=Ce({flow:Ka}),bp=Ce({company:Ce({name:xe()}),flow:Ka,job:Ce({id:Jo(xe(),String),title:xe()})}),yp=`#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 em{font-style:italic}#isdk strong{font-weight:700}#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 .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-12{width:3rem}#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 .text-ellipsis{text-overflow:ellipsis}#isdk .whitespace-nowrap{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-2{padding-top:.5rem}#isdk .pt-2\\.5{padding-top:.625rem}#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-10{color:var(--i-color-a-10)}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .opacity-0{opacity:0}#isdk .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 .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}#isdk .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}#isdk .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}#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-accent-11:hover{color:var(--i-color-a-11)}#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
- `,Wa="isdk",_p={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"},wp=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Wa);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Wa,t}});var xp=["1","2","3","4","5","6","7","8","9","10","11","12"],kp={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]}},$p=(e,t=1,r)=>n=>{const[i,o]=kp[r][n];return"oklch("+i+"% "+o*t+" "+e+")"},qn=e=>{const t=$p(e.hue,e.chroma,e.mode);return Object.fromEntries(xp.map(r=>[e.prefix+r,e.transform(t(r))]))},Kn=e=>e,Sp=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(i=>{const o=n[i];return[`${String(r)}.${i}`,o]}):[[r,n]]});return Object.fromEntries(t)},Nr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Wn=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Nr(e)&&Nr(r))for(const n in r){const i=r[n];if(Nr(i)){e[n]||Object.assign(e,{[n]:{}});const o=e[n];Nr(o)&&Wn(o,i)}else Object.assign(e,{[n]:r[n]})}return Wn(e,...t)},Cp=e=>{function t(r,n){const i=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return t},Ep=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:i,getToken:o}=n,a=p=>o("reference",p.toString()),s=e({theme:i}),l=t({theme:i,core:a,raw:{core:s}}),d=r({theme:i,core:a,semantic:a,raw:{core:s,semantic:l}}),f=Sp(Wn(s,l,d)),c=([p,m],g)=>{const v=[g,p].filter(Boolean).join(".");return typeof m=="object"?Object.entries(m).flatMap(_=>c(_,v)):[[n.getToken("declaration",v),m]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(p=>c(p))),ref:p=>o("reference",p.toString())}}})})})});const[Gn,Yn,Ga]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Op=Ep().core(({theme:e})=>({color:{black:Gn,white:Yn,lowest:e.mode==="light"?Yn:Gn,highest:e.mode==="light"?Gn:Yn,...qn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Kn}),...qn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Kn}),...qn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Kn})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider: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:Ga,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const i=(o,a)=>e.core.color[o].replace(")",` / ${a})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":Ga,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Ap=Cp({prefix:"i-"}),Tp=e=>{const t=Op.from({theme:e,getToken:Ap}),r=Object.entries(t.declarations).map(([n,i])=>`${n}: ${i};`);return`#isdk {
41
+ `)},hp=0,kt=[];function vp(e){var t=F([]),r=F([0,0]),n=F(),i=W(hp++)[0],o=W(function(){return la()})[0],a=F(e);j(function(){a.current=e},[e]),j(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Lf([e.lockRef.current],(e.shards||[]).map(ha),!0).filter(Boolean);return v.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=me(function(v,w){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=_r(v),_=r.current,O="deltaX"in v?v.deltaX:_[0]-x[0],P="deltaY"in v?v.deltaY:_[1]-x[1],T,H=v.target,K=Math.abs(O)>Math.abs(P)?"h":"v";if("touches"in v&&K==="h"&&H.type==="range")return!1;var D=ua(K,H);if(!D)return!0;if(D?T=K:(T=K==="v"?"h":"v",D=ua(K,H)),!D)return!1;if(!n.current&&"changedTouches"in v&&(O||P)&&(n.current=T),!T)return!0;var M=n.current||T;return dp(M,w,v,M==="h"?O:P,!0)},[]),l=me(function(v){var w=v;if(!(!kt.length||kt[kt.length-1]!==o)){var x="deltaY"in w?pa(w):_r(w),_=t.current.filter(function(T){return T.name===w.type&&T.target===w.target&&fp(T.delta,x)})[0];if(_&&_.should){w.cancelable&&w.preventDefault();return}if(!_){var O=(a.current.shards||[]).map(ha).filter(Boolean).filter(function(T){return T.contains(w.target)}),P=O.length>0?s(w,O[0]):!a.current.noIsolation;P&&w.cancelable&&w.preventDefault()}}},[]),d=me(function(v,w,x,_){var O={name:v,delta:w,target:x,should:_};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(P){return P!==O})},1)},[]),f=me(function(v){r.current=_r(v),n.current=void 0},[]),c=me(function(v){d(v.type,pa(v),v.target,s(v,e.lockRef.current))},[]),h=me(function(v){d(v.type,_r(v),v.target,s(v,e.lockRef.current))},[]);j(function(){return kt.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,xt),document.addEventListener("touchmove",l,xt),document.addEventListener("touchstart",f,xt),function(){kt=kt.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,xt),document.removeEventListener("touchmove",l,xt),document.removeEventListener("touchstart",f,xt)}},[]);var g=e.removeScrollBar,m=e.inert;return N(Y,null,m?N(o,{styles:pp(i)}):null,g?N(op,{gapMode:"margin"}):null)}const mp=Kf(aa,vp);var va=ne(function(e,t){return N(yr,Ee({},e,{ref:t,sideCar:mp}))});va.classNames=yr.classNames;const gp=va;var bp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,xr=new WeakMap,kr={},En=0,ma=function(e){return e&&(e.host||ma(e.parentNode))},yp=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ma(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})},wp=function(e,t,r,n){var i=yp(t,Array.isArray(e)?e:[e]);kr[r]||(kr[r]=new WeakMap);var o=kr[r],a=[],s=new Set,l=new Set(i),d=function(c){!c||s.has(c)||(s.add(c),d(c.parentNode))};i.forEach(d);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(s.has(h))f(h);else{var g=h.getAttribute(n),m=g!==null&&g!=="false",v=($t.get(h)||0)+1,w=(o.get(h)||0)+1;$t.set(h,v),o.set(h,w),a.push(h),v===1&&m&&xr.set(h,!0),w===1&&h.setAttribute(r,"true"),m||h.setAttribute(n,"true")}})};return f(t),s.clear(),En++,function(){a.forEach(function(c){var h=$t.get(c)-1,g=o.get(c)-1;$t.set(c,h),o.set(c,g),h||(xr.has(c)||c.removeAttribute(n),xr.delete(c)),g||c.removeAttribute(r)}),En--,En||($t=new WeakMap,$t=new WeakMap,xr=new WeakMap,kr={})}},_p=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||bp(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),wp(n,i,r,"aria-hidden")):function(){return null}};const ga="Dialog",[ba,Rm]=uf(ga),[xp,St]=ba(ga),kp=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=F(null),l=F(null),[d=!1,f]=hf({prop:n,defaultProp:i,onChange:o});return N(xp,{scope:t,triggerRef:s,contentRef:l,contentId:vn(),titleId:vn(),descriptionId:vn(),open:d,onOpenChange:f,onOpenToggle:me(()=>f(c=>!c),[f]),modal:a},r)},$p="DialogPortal",[jm,ya]=ba($p,{forceMount:void 0}),On="DialogOverlay",Sp=ne((e,t)=>{const r=ya(On,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=St(On,e.__scopeDialog);return o.modal?N(xn,{present:n||o.open},N(Cp,de({},i,{ref:t}))):null}),Cp=ne((e,t)=>{const{__scopeDialog:r,...n}=e,i=St(On,r);return N(gp,{as:mn,allowPinchZoom:!0,shards:[i.contentRef]},N(bn.div,de({"data-state":_a(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Rt="DialogContent",Ep=ne((e,t)=>{const r=ya(Rt,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=St(Rt,e.__scopeDialog);return N(xn,{present:n||o.open},o.modal?N(Op,de({},i,{ref:t})):N(Tp,de({},i,{ref:t})))}),Op=ne((e,t)=>{const r=St(Rt,e.__scopeDialog),n=F(null),i=Lt(t,r.contentRef,n);return j(()=>{const o=n.current;if(o)return _p(o)},[]),N(wa,de({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_t(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:_t(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:_t(e.onFocusOutside,o=>o.preventDefault())}))}),Tp=ne((e,t)=>{const r=St(Rt,e.__scopeDialog),n=F(!1),i=F(!1);return N(wa,de({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,o),!o.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),o.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:o=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),wa=ne((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=St(Rt,r),l=F(null),d=Lt(t,l);return Ff(),N(Y,null,N(Ef,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o},N($f,de({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":_a(s.open)},a,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function _a(e){return e?"open":"closed"}const Pp=kp,Ap=Sp,Ip=Ep;function xa(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=xa(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ot(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=xa(e))&&(n&&(n+=" "),n+=t);return n}const ka=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,$a=ot,$r=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return $a(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(d=>{const f=r==null?void 0:r[d],c=o==null?void 0:o[d];if(f===null)return null;const h=ka(f)||ka(c);return i[d][h]}),s=r&&Object.entries(r).reduce((d,f)=>{let[c,h]=f;return h===void 0||(d[c]=h),d},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:c,className:h,...g}=f;return Object.entries(g).every(m=>{let[v,w]=m;return Array.isArray(w)?w.includes({...o,...s}[v]):{...o,...s}[v]===w})?[...d,c,h]:d},[]);return $a(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},he=Symbol.for("@ts-pattern/matcher"),Sa=Symbol.for("@ts-pattern/isVariadic"),Sr="@ts-pattern/anonymous-select-key",Tn=e=>!!(e&&typeof e=="object"),Cr=e=>e&&!!e[he],oe=(e,t,r)=>{if(Cr(e)){const n=e[he](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(a=>r(a,o[a])),i}if(Tn(e)){if(!Tn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(const a of e.keys()){const s=e[a];Cr(s)&&s[Sa]?o.push(s):o.length?i.push(s):n.push(s)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const a=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((d,f)=>oe(d,a[f],r))&&i.every((d,f)=>oe(d,s[f],r))&&(o.length===0||oe(o[0],l,r))}return e.length===t.length&&e.every((a,s)=>oe(a,t[s],r))}return Object.keys(e).every(n=>{const i=e[n];return(n in t||Cr(o=i)&&o[he]().matcherType==="optional")&&oe(i,t[n],r);var o})}return Object.is(t,e)},ge=e=>{var t,r,n;return Tn(e)?Cr(e)?(t=(r=(n=e[he]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?jt(e,ge):jt(Object.values(e),ge):[]},jt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Np(...e){if(e.length===1){const[t]=e;return r=>oe(t,r,()=>{})}if(e.length===2){const[t,r]=e;return oe(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function le(e){return Object.assign(e,{optional:()=>An(e),and:t=>G(e,t),or:t=>Ca(e,t),select:t=>t===void 0?Vt(e):Vt(t,e)})}function Pn(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Sa]:!0})}}))(e),{optional:()=>Pn(An(e)),select:t=>Pn(t===void 0?Vt(e):Vt(t,e))})}function An(e){return le({[he]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return t===void 0?(ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:oe(e,t,n),selections:r}},getSelectionKeys:()=>ge(e),matcherType:"optional"})})}const Dp=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Mp=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function G(...e){return le({[he]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return{matched:e.every(i=>oe(i,t,n)),selections:r}},getSelectionKeys:()=>jt(e,ge),matcherType:"and"})})}function Ca(...e){return le({[he]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return jt(e,ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>oe(i,t,n)),selections:r}},getSelectionKeys:()=>jt(e,ge),matcherType:"or"})})}function R(e){return{[he]:()=>({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 le({[he]:()=>({match:n=>{let i={[t??Sr]:n};return{matched:r===void 0||oe(r,n,(o,a)=>{i[o]=a}),selections:i}},getSelectionKeys:()=>[t??Sr].concat(r===void 0?[]:ge(r))})})}function Oe(e){return typeof e=="number"}function it(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}const Ea=le(R(function(e){return!0})),Fp=Ea,at=e=>Object.assign(le(e),{startsWith:t=>{return at(G(e,(r=t,R(n=>it(n)&&n.startsWith(r)))));var r},endsWith:t=>{return at(G(e,(r=t,R(n=>it(n)&&n.endsWith(r)))));var r},minLength:t=>at(G(e,(r=>R(n=>it(n)&&n.length>=r))(t))),maxLength:t=>at(G(e,(r=>R(n=>it(n)&&n.length<=r))(t))),includes:t=>{return at(G(e,(r=t,R(n=>it(n)&&n.includes(r)))));var r},regex:t=>{return at(G(e,(r=t,R(n=>it(n)&&!!n.match(r)))));var r}}),Lp=at(R(it)),Te=e=>Object.assign(le(e),{between:(t,r)=>Te(G(e,((n,i)=>R(o=>Oe(o)&&n<=o&&i>=o))(t,r))),lt:t=>Te(G(e,(r=>R(n=>Oe(n)&&n<r))(t))),gt:t=>Te(G(e,(r=>R(n=>Oe(n)&&n>r))(t))),lte:t=>Te(G(e,(r=>R(n=>Oe(n)&&n<=r))(t))),gte:t=>Te(G(e,(r=>R(n=>Oe(n)&&n>=r))(t))),int:()=>Te(G(e,R(t=>Oe(t)&&Number.isInteger(t)))),finite:()=>Te(G(e,R(t=>Oe(t)&&Number.isFinite(t)))),positive:()=>Te(G(e,R(t=>Oe(t)&&t>0))),negative:()=>Te(G(e,R(t=>Oe(t)&&t<0)))}),Rp=Te(R(Oe)),Ke=e=>Object.assign(le(e),{between:(t,r)=>Ke(G(e,((n,i)=>R(o=>qe(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ke(G(e,(r=>R(n=>qe(n)&&n<r))(t))),gt:t=>Ke(G(e,(r=>R(n=>qe(n)&&n>r))(t))),lte:t=>Ke(G(e,(r=>R(n=>qe(n)&&n<=r))(t))),gte:t=>Ke(G(e,(r=>R(n=>qe(n)&&n>=r))(t))),positive:()=>Ke(G(e,R(t=>qe(t)&&t>0))),negative:()=>Ke(G(e,R(t=>qe(t)&&t<0)))}),jp=Ke(R(qe)),Vp=le(R(function(e){return typeof e=="boolean"})),Bp=le(R(function(e){return typeof e=="symbol"})),zp=le(R(function(e){return e==null}));var B={__proto__:null,matcher:he,optional:An,array:function(...e){return Pn({[he]:()=>({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 ge(r).forEach(o=>{n[o]=[]}),{matched:!0,selections:n};const i=(o,a)=>{n[o]=(n[o]||[]).concat([a])};return{matched:t.every(o=>oe(r,o,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},set:function(...e){return le({[he]:()=>({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=(o,a)=>{r[o]=(r[o]||[]).concat([a])},i=e[0];return{matched:Dp(t,o=>oe(i,o,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},map:function(...e){return le({[he]:()=>({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 i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,a]=e;return{matched:Mp(t,(s,l)=>{const d=oe(o,l,n),f=oe(a,s,n);return d&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ge(e[0]),...ge(e[1])]})})},intersection:G,union:Ca,not:function(e){return le({[he]:()=>({match:t=>({matched:!oe(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:R,select:Vt,any:Ea,_:Fp,string:Lp,number:Rp,bigint:jp,boolean:Vp,symbol:Bp,nullish:zp,instanceOf:function(e){return le(R(function(t){return r=>r instanceof t}(e)))},shape:function(e){return le(R(Np(e)))}};const In={matched:!1,value:void 0};function Re(e){return new Er(e,In)}class Er{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 i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,a={};const s=(d,f)=>{o=!0,a[d]=f},l=!n.some(d=>oe(d,this.input,s))||i&&!i(this.input)?In:{matched:!0,value:r(o?Sr in a?a[Sr]:a:this.input,this.input)};return new Er(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Er(this.input,n?{matched:!0,value:r(this.input,this.input)}:In)}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 Vm="";function $e(e,t){if(!e)throw new Error(t)}function Or(){throw new Error("Cycle detected")}var Up=Symbol.for("preact-signals");function Nn(){if(Ct>1)Ct--;else{for(var e,t=!1;Bt!==void 0;){var r=Bt;for(Bt=void 0,Dn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Ta(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Dn=0,Ct--,t)throw e}}var Z=void 0,Bt=void 0,Ct=0,Dn=0,Tr=0;function Oa(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.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=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function ie(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ie.prototype.brand=Up,ie.prototype.h=function(){return!0},ie.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)},ie.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)}},ie.prototype.subscribe=function(e){var t=this;return Fn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},ie.prototype.valueOf=function(){return this.value},ie.prototype.toString=function(){return this.value+""},ie.prototype.toJSON=function(){return this.value},ie.prototype.peek=function(){return this.v},Object.defineProperty(ie.prototype,"value",{get:function(){var e=Oa(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(Z instanceof Ge&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Dn>100&&Or(),this.v=e,this.i++,Tr++,Ct++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Nn()}}}});function We(e){return new ie(e)}function Ta(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Pa(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 Aa(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 Ge(e){ie.call(this,void 0),this.x=e,this.s=void 0,this.g=Tr-1,this.f=4}(Ge.prototype=new ie).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Tr))return!0;if(this.g=Tr,this.f|=1,this.i>0&&!Ta(this))return this.f&=-2,!0;var e=Z;try{Pa(this),Z=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 Z=e,Aa(this),this.f&=-2,!0},Ge.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)}ie.prototype.S.call(this,e)},Ge.prototype.U=function(e){if(this.t!==void 0&&(ie.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)}},Ge.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ge.prototype.peek=function(){if(this.h()||Or(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ge.prototype,"value",{get:function(){1&this.f&&Or();var e=Oa(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Hp(e){return new Ge(e)}function Ia(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ct++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Mn(e),n}finally{Z=r,Nn()}}}function Mn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ia(e)}function qp(e){if(Z!==this)throw new Error("Out-of-order effect");Aa(this),Z=e,this.f&=-2,8&this.f&&Mn(this),Nn()}function zt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}zt.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()}},zt.prototype.S=function(){1&this.f&&Or(),this.f|=1,this.f&=-9,Ia(this),Pa(this),Ct++;var e=Z;return Z=this,qp.bind(this,e)},zt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Bt,Bt=this)},zt.prototype.d=function(){this.f|=8,1&this.f||Mn(this)};function Fn(e){var t=new zt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Ln;function Et(e,t){S[e]=t.bind(null,S[e]||function(){})}function Pr(e){Ln&&Ln(),Ln=e&&e.S()}function Na(e){var t=this,r=e.data,n=Wp(r);n.value=r;var i=pe(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Ro(i.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},Hp(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return i.value}Na.displayName="_st",Object.defineProperties(ie.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Na},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Et("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof ie&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)}),Et("__r",function(e,t){Pr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return Fn(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Pr(r),e(t)}),Et("__e",function(e,t,r,n){Pr(),e(t,r,n)}),Et("diffed",function(e,t){Pr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var a in o){var s=o[a];s!==void 0&&!(a in n)&&(s.d(),o[a]=void 0)}else r.U=o={};for(var l in n){var d=o[l],f=n[l];d===void 0?(d=Kp(r,l,f,i),o[l]=d):d.o(f,i)}}}e(t)});function Kp(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=We(r);return{o:function(a,s){o.value=a,n=s},d:Fn(function(){var a=o.value.value;n[t]!==a&&(n[t]=a,i?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}Et("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 i in n){var o=n[i];o&&o.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),Et("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ye.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 i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function Wp(e){return pe(function(){return We(e)},[])}const Rn=(e,t)=>t.some(r=>e instanceof r);let Da,Ma;function Gp(){return Da||(Da=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Yp(){return Ma||(Ma=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const jn=new WeakMap,Vn=new WeakMap,Ar=new WeakMap;function Xp(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{r(st(e.result)),i()},a=()=>{n(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return Ar.set(t,e),t}function Zp(e){if(jn.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{r(),i()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});jn.set(e,t)}let Bn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return jn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return st(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 Fa(e){Bn=e(Bn)}function Qp(e){return Yp().includes(e)?function(...t){return e.apply(zn(this),t),st(this.request)}:function(...t){return st(e.apply(zn(this),t))}}function Jp(e){return typeof e=="function"?Qp(e):(e instanceof IDBTransaction&&Zp(e),Rn(e,Gp())?new Proxy(e,Bn):e)}function st(e){if(e instanceof IDBRequest)return Xp(e);if(Vn.has(e))return Vn.get(e);const t=Jp(e);return t!==e&&(Vn.set(e,t),Ar.set(t,e)),t}const zn=e=>Ar.get(e);function eh(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),s=st(a);return n&&a.addEventListener("upgradeneeded",l=>{n(st(a.result),l.oldVersion,l.newVersion,st(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const th=["get","getKey","getAll","getAllKeys","count"],rh=["put","add","delete","clear"],Un=new Map;function La(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Un.get(t))return Un.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=rh.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||th.includes(r)))return;const o=async function(a,...s){const l=this.transaction(a,i?"readwrite":"readonly");let d=l.store;return n&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),i&&l.done]))[0]};return Un.set(t,o),o}Fa(e=>({...e,get:(t,r,n)=>La(t,r)||e.get(t,r,n),has:(t,r)=>!!La(t,r)||e.has(t,r)}));const nh=["continue","continuePrimaryKey","advance"],Ra={},Hn=new WeakMap,ja=new WeakMap,oh={get(e,t){if(!nh.includes(t))return e[t];let r=Ra[t];return r||(r=Ra[t]=function(...n){Hn.set(this,ja.get(this)[t](...n))}),r}};async function*ih(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,oh);for(ja.set(r,t),Ar.set(r,zn(t));t;)yield r,t=await(Hn.get(r)||t.continue()),Hn.delete(r)}function Va(e,t){return t===Symbol.asyncIterator&&Rn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Rn(e,[IDBIndex,IDBObjectStore])}Fa(e=>({...e,get(t,r,n){return Va(t,r)?ih:e.get(t,r,n)},has(t,r){return Va(t,r)||e.has(t,r)}}));const Ut=e=>Re(e).with(B.number.lte(1e3),()=>`${Math.round(e)}KB`).with(B.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Ba=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},ah=e=>Object.entries(e).reduce((r,[n,i])=>(r[n]=i.value,r),{}),Ht=e=>t=>t?t.type===e:!1;class qt extends Error{constructor(){super("Aborted")}}function sh(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const za=e=>typeof e=="string",lh=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ua=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:lh()}),ch=e=>Re(e).with({nativeEvent:{submitter:B.select(B.union(B.instanceOf(HTMLButtonElement),B.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Ha=typeof window>"u"?void 0:eh("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Kt={getStateData:async(e,t)=>{var n;const r=qa({...e,flowKeys:t});return(n=await Ha)==null?void 0:n.get("state",r)},setStateData:sh(async e=>{var r;const t=qa(e);return(r=await Ha)==null?void 0:r.put("state",e.data,t)},1e3)},Ir=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(d=>d.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const o=t.type==="if-block"?t.branchId:void 0,a=e.find(d=>d.id===o),s=t.type.includes("question")?1:0;if(a){const d=s+Math.max(Ir(e,i,r,n+s).remainingSteps,Ir(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:d}),{stepsMade:n,remainingSteps:d}}const l=s+Ir(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},uh=e=>{const t={},r=e.find(n=>n.isHead);return r&&Ir(e,r,(n,i)=>{t[n]=i}),t},qa=e=>[...e.flowKeys,e.id,e.version].join("/"),Ye=We({state:"idle"}),Wt=e=>{const{state:t,flow:r}=Ye.value;if(t!=="loaded")return;$e(r,"No flow to update");const n=e(r.data);r.data=n,Ye.value={state:t,flow:r},Kt.setStateData(r)},I={current$:Ye,viewState$:We("closed"),inputHeight$:We(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:i,job:o})=>{const s={data:await Kt.getStateData(e,r)??Ua(),startedAt:new Date,nodeIdToProgress:uh(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:i,job:o};Ye.value={state:"loaded",flow:s},Kt.setStateData(s)},cancelCurrentFlow:()=>{Ye.value={state:"idle"},I.viewState$.value="closed"},markAsFinished:()=>Wt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Wt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Ye.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ua();Ye.value={state:e,flow:{...t,data:r,startedAt:new Date}},Kt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Wt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ye.value;$e(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,Kt.setStateData(r)},setSubmission:(e,t)=>Wt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Wt(t=>({...t,currentInput:e??null}))};var dh=0;function u(e,t,r,n,i,o){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var d={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:--dh,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(d),d}const fh=({message:e})=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:[u("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:[u("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"}),u("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"}),u("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),u("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),u("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),u("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),u("path",{d:"M38 56h19"})]}),u("div",{class:"flex flex-col gap-2 text-center",children:[u("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&u("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Ka=e=>u("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[u("title",{children:"Loading"}),u("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)}}"}),u("g",{id:"s1",transform:"translate(12,0)",children:u("g",{id:"s2",transform:"scale(0,0)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s3",transform:"translate(12,12)",children:u("g",{id:"s4",transform:"scale(1,1)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s5",transform:"translate(12,0)",children:u("g",{id:"s6",transform:"scale(0,0)",children:u("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"})})}),u("g",{id:"s7",transform:"translate(12,0)",children:u("g",{id:"s8",transform:"scale(0,0)",children:u("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"})})})]}),Wa=()=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(Ka,{class:"text-neutral-6 h-8 w-8"})}),ph=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)}%`},Nr=({class:e,children:t,...r})=>u("button",{class:ot("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:u("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})}),hh=()=>{if(I.current$.value.state!=="loaded")return null;const e=I.current$.value.flow.nodeIdToProgress,t=I.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 u("div",{class:"bg-accent-3",children:u("div",{style:{width:ph(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},vh=({children:e})=>{const t=I.viewState$;return u(Y,{children:u("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:[u("div",{class:"flex h-[var(--header-height)] gap-2",children:[u("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),u("button",{tabIndex:-1,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1",onTouchStart:qn,children:u("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),u("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?u(Y,{children:[u(Nr,{class:"view-switch",onTouchStart:qn,"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:u("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),u(Nr,{"aria-label":"Close application",onClick:I.cancelCurrentFlow,children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):u(Y,{children:[I.current$.value.state==="loaded"&&u(Nr,{"aria-label":"Restart",onClick:()=>{I.restart()},children:[u("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"}),u("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),u(Nr,{class:"view-switch",onTouchStart:qn,"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),u(hh,{})]})})};function qn(){}const mh=dn(()=>Promise.resolve().then(()=>Em).then(e=>e.ChatbotBody)),gh=$r("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 [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),bh=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:i,error:o}=I.current$.value,a=I.viewState$.value,s=n!=="idle"&&a==="maximised",l=F(null);return u(Pp,{open:s,modal:s,children:[u(Ap,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0 isolate"}),u(Ip,{forceMount:!0,asChild:!0,children:u("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:gh({view:a}),children:u("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[u(vh,{children:i==null?void 0:i.title}),Re({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>u(Wa,{},"loading")).with({state:"loaded"},()=>u(bt,{fallback:u(Wa,{},"loading"),children:u(mh,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>u(fh,{message:o})).exhaustive()]})})})]})},Ga=Ce({id:ti(xe(),String),version:on(),build:on(),nodes:Pd(Td()),context_schema:Id(Ad(ai(xe(),Ce({required:oi(),type:Fd([ii("string"),ii("number")])}))))}),yh=Ce({flow:Ga}),wh=Ce({company:Ce({name:xe()}),flow:Ga,job:Ce({id:ti(xe(),String),title:xe()})}),_h=`#isdk{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;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 em{font-style:italic}#isdk strong{font-weight:700}#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 .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%) scaleX(.7)}to{transform:translateY(0)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(.82)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}#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 .text-ellipsis{text-overflow:ellipsis}#isdk .whitespace-nowrap{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-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}#isdk .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}#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-2{padding-top:.5rem}#isdk .pt-2\\.5{padding-top:.625rem}#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-10{color:var(--i-color-a-10)}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .opacity-0{opacity:0}#isdk .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 .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}#isdk .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}#isdk .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}#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\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}#isdk .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}#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)}#isdk .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;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))}
42
+ `,Ya="isdk",xh={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"},kh=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Ya);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Ya,t}});var $h=["1","2","3","4","5","6","7","8","9","10","11","12"],Sh={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]}},Ch=(e,t=1,r)=>n=>{const[i,o]=Sh[r][n];return"oklch("+i+"% "+o*t+" "+e+")"},Kn=e=>{const t=Ch(e.hue,e.chroma,e.mode);return Object.fromEntries($h.map(r=>[e.prefix+r,e.transform(t(r))]))},Wn=e=>e,Eh=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(i=>{const o=n[i];return[`${String(r)}.${i}`,o]}):[[r,n]]});return Object.fromEntries(t)},Dr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Gn=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Dr(e)&&Dr(r))for(const n in r){const i=r[n];if(Dr(i)){e[n]||Object.assign(e,{[n]:{}});const o=e[n];Dr(o)&&Gn(o,i)}else Object.assign(e,{[n]:r[n]})}return Gn(e,...t)},Oh=e=>{function t(r,n){const i=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return t},Th=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:i,getToken:o}=n,a=h=>o("reference",h.toString()),s=e({theme:i}),l=t({theme:i,core:a,raw:{core:s}}),d=r({theme:i,core:a,semantic:a,raw:{core:s,semantic:l}}),f=Eh(Gn(s,l,d)),c=([h,g],m)=>{const v=[m,h].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(w=>c(w,v)):[[n.getToken("declaration",v),g]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(h=>c(h))),ref:h=>o("reference",h.toString())}}})})})});const[Yn,Xn,Xa]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Ph=Th().core(({theme:e})=>({color:{black:Yn,white:Xn,lowest:e.mode==="light"?Xn:Yn,highest:e.mode==="light"?Yn:Xn,...Kn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Wn}),...Kn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Wn}),...Kn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Wn})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider: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:Xa,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const i=(o,a)=>e.core.color[o].replace(")",` / ${a})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":Xa,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Ah=Oh({prefix:"i-"}),Ih=e=>{const t=Ph.from({theme:e,getToken:Ah}),r=Object.entries(t.declarations).map(([n,i])=>`${n}: ${i};`);return`#isdk {
43
43
  ${r.concat(r).join(`
44
44
  `)}
45
- }`},Ya=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const i=t[n];if(!i)continue;const o=Pt(e,n,null);if(i.required&&o===null){const a=`Configuration error in context: ${n} is required`;throw r.error(a),new Error(a)}switch(i.type){case"number":if(typeof o!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof o!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}},Ip=({_internal_domManager:e=wp(),theme:t})=>Je(({apiClient:r,logger:n,analytics:i})=>{let o=!1;const a=()=>{if(typeof window>"u")return;const s=[D("style",{id:"inploi-chatbot-styles"},yp),D("style",{id:"inploi-chatbot-theme"},Tp(t))],l=e.getOrCreateChatbotElement();mt(D(Y,{},[s,D(mp,{apiClient:r,logger:n,analytics:i})]),l),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async(s,l)=>r.fetch(`/flow/job/${s}`).then(d=>{const f=sr(bp,d);return{flow:f.flow,title:`Applying for “${f.job.title}”`,flowKeys:[f.job.id,...(l==null?void 0:l.flowKeys)??[]],job:{id:f.job.id,id_type:"external"},...l}}),fetchFlowById:async(s,l)=>r.fetch(`/flow/id/${s}`).then(d=>{var c;const f=sr(gp,d);return{flow:f.flow,title:"Chatbot",flowKeys:(l==null?void 0:l.flowKeys)??[],...l,analytics:{customProperties:{flow_id:f.flow.id,flow_version:f.flow.version,...(c=l==null?void 0:l.analytics)==null?void 0:c.customProperties}}}}),open:async s=>{if(!(typeof window>"u"))try{P.cancelCurrentFlow(),P.viewState$.value="maximised",o||a(),s instanceof Promise?(P.current$.value={state:"loading"},s.then(async l=>{Ya({context:l.context||{},schema:l.flow.context_schema,logger:n}),P.startFlow(l)}).catch(l=>{const d=l instanceof Error?l.message:"An error occurred";P.current$.value={state:"error",error:d}})):(Ya({context:s.context||{},schema:s.flow.context_schema,logger:n}),P.startFlow(s))}catch(l){n.error("Error starting flow",l)}},close:async()=>{typeof window>"u"||(P.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=Ip;const Gt=(e,{context:t,submissions:r})=>{const[n,...i]=e.data.compareKey.split(".");if(!n)return!1;const o=Xa({context:t,key:n,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{const a=Pt(o.value,i.join("."));switch(e.data.compare){case"equals":return a===e.data.compareValue;case"contains":return a?a.includes(e.data.compareValue):!1;case"notEquals":return a!==e.data.compareValue;case"notContains":return a?!a.includes(e.data.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const a=Pt(o.value,i.join(".")),s={...e,data:{...e.data,compareKey:"_temp"}};switch(typeof a){case"boolean":return Gt(s,{submissions:{_temp:{value:a,type:"boolean"}},context:t});case"string":return Gt(s,{submissions:{_temp:{value:a,type:"string"}},context:t});case"number":return Gt(s,{submissions:{_temp:{value:a,type:"number"}},context:t});case"object":return Array.isArray(a)&&a.every(Va)?Gt(s,{submissions:{_temp:{value:a,type:"enum"}},context:t}):!1}break}case"boolean":{const a=e.data.compareValue==="true";switch(e.data.compare){case"equals":return o.value===a;case"notEquals":return o.value!==a}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 a=Number(e.data.compareValue);switch(e.data.compare){case"equals":return o.value===a;case"notEquals":return o.value!==a;case"greaterThan":return o.value>a;case"greaterThanOrEqualTo":return o.value>=a;case"lessThan":return o.value<a;case"lessThanOrEqualTo":return o.value<=a}}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},Pp=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Ze=(e,{context:t,submissions:r})=>e.replace(Pp,(n,i,o="")=>{const[a,...s]=i.trim().split("."),l=Xa({key:a,path:s,submissions:r,context:t});if(!l)return o;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Ut(d.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():o;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const d=Pt(l.value,s.join("."));switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(Va))return d.join(", ")}break}}return o}),Za=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return Za({node:n,nodes:t,stopWhen:r})},Dp=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(s=>s.id===i.branchId);if(!o)return!1;const a=Za({node:o,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},Np=({flow:e,analytics:t,logger:r,context:n,apiClient:i,getSubmissions:o,chatService:a,onFlowEnd:s,onInterpret:l})=>{let d=new AbortController;const f={...t.service,log:p=>t.service.log({...p,customProperties:{...p.customProperties,...t.customProperties}})},c=async(p,m)=>{const g=o();l==null||l(p,m);try{await Mp({flow:e,analytics:f,logger:r,apiClient:i,context:n,node:p,submissions:g,chat:{sendMessage:async v=>a.send({groupId:p.id,message:v,signal:d.signal}),userInput:async v=>a.input({input:v,signal:d.signal}),addToSubmissions:a.addToSubmissions},next:v=>{const _=v?e.nodes.find(x=>x.id===v):Dp({childNode:p,nodes:e.nodes});return _?c(_,p):s==null?void 0:s(p)},end:()=>s==null?void 0:s(p)})}catch(v){if(v instanceof qt)return;throw v}};return{interpret:async p=>{const m=e.nodes.find(g=>g.id===p)??ja(e.nodes);return c(m)},undo:p=>{let m=1;const g=e.nodes.find(_=>_.id===p[p.length-1]);for(let _=p.length-2;_>0;_--){const x=p[_],w=e.nodes.find(O=>O.id===x);if(!w||(m++,w.type.startsWith("question-")))break}d.abort(),d=new AbortController;const v=e.nodes.find(_=>_.id===p[p.length-m]);return $e(v,"Undo failed: new start node not found"),c(v,g),{removed:m}},abort:()=>{d.abort()}}};async function Mp(e){return await Re(e).with({node:{type:"text"}},jp).with({node:{type:"image"}},Vp).with({node:{type:"question-text"}},Bp).with({node:{type:"question-enum"}},Up).with({node:{type:"question-number"}},zp).with({node:{type:"question-boolean"}},Hp).with({node:{type:"question-file"}},Kp).with({node:{type:"question-address"}},qp).with({node:{type:"end-flow"}},Wp).with({node:{type:"if-block"}},Rp).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},Lp).with({node:{type:"integration-application-submit"}},Fp).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function Fp({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:o,analytics:a,flow:s}){const l=async d=>{d!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:f,session_id:c}=a.getSessionInfo(),p=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:f,session_id:c,job:s.job,submissions:op(o||{})})}).catch(m=>m);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:p}),Re(p).with({integration_response:B.select(B.union({service:B.optional(B.string),status:B.number,data:B.any},{service:B.optional(B.string),status:B.number,error:{message:B.string,data:B.any}}))},m=>{a.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:m.service??"INVALID_SERVICE",response:{status:m.status,payload:"data"in m?m.data:m.error.data??null},job:s.job}})}).otherwise(()=>{}),await Re(p).with(B.union({ats_data:B.select("redirect",{redirect_url:B.string})},{integration_response:{data:B.select("redirect",{redirect_url:B.string})}}),async m=>{if(m.redirect===void 0)return;await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const g=new URL(m.redirect.redirect_url);f&&!g.searchParams.has("anonymous_id")&&g.searchParams.set("anonymous_id",f),await e.sendMessage({type:"link",href:g.toString(),text:"Complete submission",onClick:()=>{if(!c){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}a.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:c,flow_version:s.version,href:g.toString(),job:s.job}})}}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with(B.union({success:!1,ats_data:B.select("error",{message:B.string})},{integration_response:{error:B.select("error",{message:B.string})}}),async m=>{var g;n.error(m.error),await e.sendMessage({type:"system",variant:"error",text:((g=m.error)==null?void 0:g.message)||"Failed to submit"}),await l(!1)}).otherwise(async m=>{n.error(m),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await l(!1)})};await l(r.data.skipConfirmation)}async function Lp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({type:"link",href:Ze(r.data.href,{submissions:n,context:i}),text:Ze(r.data.cta,{submissions:n,context:i})}),t(r.nextId)}async function Rp({submissions:e,next:t,node:r,context:n}){t(Gt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function jp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function Vp({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 Bp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:i})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,maxChars:r.data.maxChars,minChars:r.data.minChars}}):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,minChars:r.data.minChars}});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 zp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:i})});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 Up({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:i})});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(a=>o.value.includes(a.value)).map(a=>a.label).join(", ")}),t(r.nextId)}async function Hp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:i})});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 qp({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 i=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:i})}return t(r.nextId)}async function Kp({node:e,chat:t,next:r,submissions:n,context:i}){await t.sendMessage({author:"bot",type:"text",text:Ze(e.data.question,{submissions:n,context:i})});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 a of o.value)await t.sendMessage({author:"user",type:"file",fileName:a.name,fileSizeKb:a.sizeKb});r(e.nextId)}async function Wp({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const Xa=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const i=Pt(n,t.join("."));switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r==null?void 0:r[e]};function Zn(e,t,r){var n,i,o,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(o,i),o=i=null))}var d=function(){o=this,i=arguments,a=Date.now();var f=r&&!n;return n||(n=setTimeout(l,t)),f&&(s=e.apply(o,i),o=i=null),s};return d.clear=function(){n&&(clearTimeout(n),n=null)},d.flush=function(){n&&(s=e.apply(o,i),o=i=null,clearTimeout(n),n=null)},d}Zn.debounce=Zn;var Gp=Zn;const Qa=Pe(Gp);function Yp(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const o=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)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=F({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),d=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,c=F(!1);j(()=>(c.current=!0,()=>void(c.current=!1)));const[p,m,g]=he(()=>{const w=()=>{if(!l.current.element)return;const{left:O,top:T,width:A,height:H,bottom:K,right:N,x:M,y:se}=l.current.element.getBoundingClientRect(),re={left:O,top:T,width:A,height:H,bottom:K,right:N,x:M,y:se};l.current.element instanceof HTMLElement&&i&&(re.height=l.current.element.offsetHeight,re.width=l.current.element.offsetWidth),Object.freeze(re),c.current&&!Jp(l.current.lastBounds,re)&&s(l.current.lastBounds=re)};return[w,f?Qa(w,f):w,d?Qa(w,d):w]},[s,i,d,f]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",g,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new o(g),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",g,{capture:!0,passive:!0})))}const x=w=>{!w||w===l.current.element||(v(),l.current.element=w,l.current.scrollContainers=Ja(w),_())};return Xp(g,!!r),Zp(m),j(()=>{v(),_()},[r,g,m]),j(()=>v,[]),[x,a,p]}function Zp(e){j(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Xp(e,t){j(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Ja(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...Ja(e.parentElement)]}const Qp=["x","y","top","bottom","left","right","width","height"],Jp=(e,t)=>Qp.every(r=>e[r]===t[r]),lt=({class:e,...t})=>u("button",{class:ot("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[u("title",{children:"Send"}),u("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),u("path",{d:"M8 4V13"})]})}),ev=25,Xn=We({instant:()=>{},smooth:()=>{}}),Z={onSubmitSuccessFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>Xn.value.instant(),smooth:()=>Xn.value.smooth()}},tv=()=>{const e=F(null);fe(()=>{Xn.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*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=he(()=>({addToSubmissions:(n,i)=>P.setSubmission(n,i),send:async({message:n,signal:i,groupId:o})=>{if(await Re(n).with({author:"bot",type:"text"},async a=>{if(i!=null&&i.aborted)throw new qt;Z.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*ev;await new Promise(l=>setTimeout(l,s,{signal:i})),Z.isBotTyping$.value=!1}).otherwise(async()=>{}),i!=null&&i.aborted)throw new qt;P.addMessage(n,o)},input:({input:n,signal:i})=>{if(i!=null&&i.aborted)throw new qt;return P.setInput(n),new Promise(o=>{const a=s=>{if(i!=null&&i.aborted)throw new qt;P.setInput(void 0),n.key&&P.setSubmission(n.key,s),o(s)};Z.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},ct=({class:e,...t})=>u("button",{type:"button",class:ot("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[u("title",{children:"Skip"}),u("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),u("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),es={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1",Andorra:"376",Angola:"244",Anguilla:"1",Antarctica:"672","Antigua and Barbuda":"1",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"260",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1",Guadeloupe:"590",Guam:"1",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509","Heard Island and McDonald Islands":"334",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"352","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"852","North Macedonia":"389","Northern Mariana Islands":"1",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1","Saint Lucia":"1","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"293",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"},ts={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"]},Mr=Object.keys(ts),rv=e=>Mr.reduce((t,r)=>{const n=ts[r],i=e.filter(o=>o.types.some(a=>n.includes(a))).map(o=>o.long_name).join(", ");return i&&(t[r]=i),t},{}),nv=document.createElement("div"),ov=()=>he(()=>{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(nv);return{enabled:!0,getPredictions:async n=>{const{predictions:i}=await t.getPlacePredictions({input:n,language:"en"});return i.map(o=>({label:o.description,value:o.place_id}))},getPlaceDetails:async n=>await new Promise((o,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"):o({ok:!0,place:s}))).catch(async o=>(console.error("Failed to get address details",o),{ok:!1}))}},[]),Qn=e=>u("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:[u("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:u("path",{d:"M10 3L5 8L10 13"})}),u("span",{children:"Back"})]}),Jn={label:"Fill in manually",value:""},iv=({input:e,onSubmitSuccess:t})=>{const[r,n]=W(""),[i,o]=W(),[a,s]=W([]),[l,d]=W(),{enabled:f,getPredictions:c,getPlaceDetails:p}=ov(),[m,g]=W(f?"query":"manual"),v=_=>{$e(f,"Query state should not be enabled if Google Places isn't available"),n(_),_===""&&s([]),c(_).then(x=>{s(x)})};switch(j(()=>{if(f&&!(l===void 0||l===""))return p(l).then(_=>{if(!_.ok||!_.place.address_components){o({});return}const x=rv(_.place.address_components);o(x),g("details")}),()=>{o(void 0)}},[l,p,f]),m){case"query":return $e(f,"Query state should not be enabled if Google Places isn't available"),u(av,{input:e,onSkip:()=>t(null),onAddressSelect:_=>{d(_),g("loading")},onAddressSearch:_=>{v(_)},suggestions:a,query:r});case"loading":return u(eo,{input:e,onSubmitSuccess:t,addressFields:{},actions:u(Qn,{onClick:()=>{d(void 0),g("query")}})});case"details":return $e(i!==void 0),u(eo,{input:e,onSubmitSuccess:t,addressFields:i,actions:u(Qn,{onClick:()=>{d(void 0),g("query")}})});case"manual":return u(eo,{input:e,onSubmitSuccess:t,addressFields:{},actions:f?u(Qn,{onClick:()=>{d(void 0),g("query")}}):void 0})}},av=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:i,onAddressSearch:o})=>{const a=F(null);return fe(()=>{a.current&&(a.current.focus(),a.current.select())},[]),u(Y,{children:[u("form",{noValidate:!0,onSubmit:s=>{s.preventDefault();const d=new FormData(s.currentTarget).get("address");typeof d=="string"&&o(d)},class:"flex gap-1 p-2.5",children:[u("div",{class:"group relative flex-1",children:[u("input",{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||"Type and search for places...",defaultValue:i}),u("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[u("circle",{cx:"7",cy:"7",r:"4"}),u("path",{d:"M10 10L13 13"})]}),u("span",{class:"sr-only",children:"Search"})]})})]}),e.config.optional&&u(ct,{class:"",onClick:t})]}),u("ul",{children:[r.map(s=>u("li",{children:u("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:[u("span",{class:"flex-grow",children:s.label}),u("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:u("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),u("li",{children:u("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(Jn.value)},children:u("span",{class:"flex-grow",children:Jn.label})})},Jn.label)]})]})},sv={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},eo=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const i=F(null);fe(()=>{if(i.current){const a=i.current.querySelector("input");a&&(a.focus(),a.select())}},[]);const o=Object.keys(es);return u("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:a=>{const s=new FormData(a.currentTarget),l=Object.fromEntries(s.entries());t({type:"address",value:l})},children:[u("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:i,children:Mr.map((a,s)=>{const l=`isdk_${a}`,d=n.config.keys[a];return d?u(Y,{children:[u("label",{for:l,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:sv[a]}),u("div",{class:"flex flex-col items-stretch gap-1.5",children:[a==="country"?u("div",{class:"relative",children:[u("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:d,id:l,defaultValue:e[a],required:!0,children:[e.country&&!o.includes(e.country)?u("option",{value:e[a],children:e[a]}):u("option",{value:"",children:"Select a country"}),o.map(f=>u("option",{value:f,children:f},f))]}),u("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:u("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):u("input",{autoFocus:s===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:d,id:l,defaultValue:e[a],required:!0}),s!==Mr.length-1&&u("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),s===Mr.length-1&&u("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),u("div",{class:"flex w-full flex-1 ",children:[u("div",{class:"flex-grow",children:r}),u(lt,{class:"flex items-center justify-center"})]})]})},to=()=>{const e=F(null);return j(()=>{var t;(t=e.current)==null||t.focus()},[]),e},rs=["true","false"],lv=Id(rs),cv="answer",ns="flex items-center gap-2 p-2.5",os=ne(({label:e,...t},r)=>u("button",{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 w-full overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:u("p",{class:"truncate text-center text-base",children:e})})),uv=({input:e,onSubmitSuccess:t})=>{const r=to();return u("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=sp(n).value,o=sr(lv,i);t({type:"boolean",value:o==="true"})},children:[u("ul",{class:ns,children:rs.map((n,i)=>u("li",{class:"flex-1",children:u(os,{ref:i===0?r:null,type:"submit",name:cv,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&u("div",{class:"px-2 pb-2",children:u(ct,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Yt=({error:e})=>!e||!e.message?null:u("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[u("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),u("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),u("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),u("p",{class:"truncate pr-1 text-sm",children:e.message})]}),dv=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}),fv=e=>e.reduce((t,r)=>t+r.sizeKb,0),hv=Ht("file"),is=3,pv=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return u("div",{class:ot("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[u("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[u("span",{class:"block truncate",children:i}),u("span",{children:[".",n]})]}),u("p",{"aria-label":"File size",class:"text-accent-11",children:Ut(e.sizeKb)})]})},as=({class:e,...t})=>u("li",{class:ot("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),ss=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},vv=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(ss(n.name).toLowerCase()))},mv=(e,t)=>{const r=ss(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},gv=({input:e,onSubmitSuccess:t})=>{var f;const r=(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key],[n,i]=W(hv(r)?r.value:[]),[o,a]=W(),s=n.length-is,l=fv(n),d=to();return u("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&&!vv({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 ${Ut(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:[u("div",{class:"flex items-center gap-2",children:[u("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?u(Y,{children:[u("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,is).map(c=>{const p=c.name.split(".").pop(),m=c.name.replace(new RegExp(`.${p}$`),"");return u(as,{class:"flex overflow-hidden",children:[u("span",{class:"block truncate",children:m}),u("span",{children:[".",p]})]})}),s>0?u(as,{children:["+",s," file",s!==1?"s":""]}):null]}),u("p",{class:"text-neutral-11 text-xs",children:[Ut(l)," ",n.length>1?"total":""]})]}):u("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[u("header",{class:"flex flex-col items-center gap-0",children:[u("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:u("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"})}),u("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?u("p",{class:"text-neutral-10 text-xs",children:["(max ",Ut(e.config.fileSizeLimitKib),")"]}):null]}),u("aside",{class:"flex flex-col items-center gap-2",children:[u("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),u("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>u("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(".","")}))})]})]}),u("input",{id:"dropzone-file",onInput:async c=>{$e(c.target instanceof HTMLInputElement);const p=c.target.files?Array.from(c.target.files):[],m=await Promise.allSettled(p.map(async v=>{const _=await dv(v);return{name:mv(v.name,42),data:_,sizeKb:v.size/1e3}}));if(m.some(({status:v})=>v==="rejected"))return a({type:"invalid",message:"Invalid file"});const g=m.map(v=>v.status==="fulfilled"?v.value:null).filter(Boolean);i(g)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),u("div",{class:"flex h-full flex-col items-center gap-2",children:[u(lt,{disabled:n.length===0}),e.config.optional&&u(ct,{onClick:()=>t(null)})]})]}),u(Yt,{error:o})]})};var Zt=e=>e.type==="checkbox",Ot=e=>e instanceof Date,ue=e=>e==null;const ls=e=>typeof e=="object";var te=e=>!ue(e)&&!Array.isArray(e)&&ls(e)&&!Ot(e),bv=e=>te(e)&&e.target?Zt(e.target)?e.target.checked:e.target.value:e,yv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,_v=(e,t)=>e.has(yv(t)),wv=e=>{const t=e.constructor&&e.constructor.prototype;return te(t)&&t.hasOwnProperty("isPrototypeOf")},ro=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(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(!(ro&&(e instanceof Blob||e instanceof FileList))&&(r||te(e)))if(t=r?[]:{},!r&&!wv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=je(e[n]));else return e;return t}var Xt=e=>Array.isArray(e)?e.filter(Boolean):[],Q=e=>e===void 0,C=(e,t,r)=>{if(!t||!te(e))return r;const n=Xt(t.split(/[,[\].]+?/)).reduce((i,o)=>ue(i)?i:i[o],e);return Q(n)||n===e?Q(e[t])?r:e[t]:n},Xe=e=>typeof e=="boolean";const cs={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Se={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ve={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ke.createContext(null);var xv=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Se.all&&(t._proxyFormState[a]=!n||Se.all),r&&(r[a]=!0),e[a]}});return i},_e=e=>te(e)&&!Object.keys(e).length,kv=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return _e(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||Se.all))},no=e=>Array.isArray(e)?e:[e];function $v(e){const t=ke.useRef(e);t.current=e,ke.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Te=e=>typeof e=="string",Sv=(e,t,r,n,i)=>Te(e)?(n&&t.watch.add(e),C(r,e,i)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),C(r,o))):(n&&(t.watchAll=!0),r),oo=e=>/^\w*$/.test(e),us=e=>Xt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function U(e,t,r){let n=-1;const i=oo(t)?[t]:us(t),o=i.length,a=o-1;for(;++n<o;){const s=i[n];let l=r;if(n!==a){const d=e[s];l=te(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var ds=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},fs=e=>({isOnSubmit:!e||e===Se.onSubmit,isOnBlur:e===Se.onBlur,isOnChange:e===Se.onChange,isOnAll:e===Se.all,isOnTouch:e===Se.onTouched}),hs=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Fr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const o=C(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else te(s)&&Fr(s,t)}}};var Cv=(e,t,r)=>{const n=Xt(C(e,r));return U(n,"root",t[r]),U(e,r,n),e},io=e=>e.type==="file",Qe=e=>typeof e=="function",Lr=e=>{if(!ro)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Rr=e=>Te(e),ao=e=>e.type==="radio",jr=e=>e instanceof RegExp;const ps={value:!1,isValid:!1},vs={value:!0,isValid:!0};var ms=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&&!Q(e[0].attributes.value)?Q(e[0].value)||e[0].value===""?vs:{value:e[0].value,isValid:!0}:vs:ps}return ps};const gs={isValid:!1,value:null};var bs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,gs):gs;function ys(e,t,r="validate"){if(Rr(e)||Array.isArray(e)&&e.every(Rr)||Xe(e)&&!e)return{type:r,message:Rr(e)?e:"",ref:t}}var At=e=>te(e)&&!jr(e)?e:{value:e,message:""},_s=async(e,t,r,n,i)=>{const{ref:o,refs:a,required:s,maxLength:l,minLength:d,min:f,max:c,pattern:p,validate:m,name:g,valueAsNumber:v,mount:_,disabled:x}=e._f,w=C(t,g);if(!_||x)return{};const O=a?a[0]:o,T=V=>{n&&O.reportValidity&&(O.setCustomValidity(Xe(V)?"":V||""),O.reportValidity())},A={},H=ao(o),K=Zt(o),N=H||K,M=(v||io(o))&&Q(o.value)&&Q(w)||Lr(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,se=ds.bind(null,g,r,A),re=(V,L,J,ve=Ve.maxLength,we=Ve.minLength)=>{const Ie=V?L:J;A[g]={type:V?ve:we,message:Ie,ref:o,...se(V?ve:we,Ie)}};if(i?!Array.isArray(w)||!w.length:s&&(!N&&(M||ue(w))||Xe(w)&&!w||K&&!ms(a).isValid||H&&!bs(a).isValid)){const{value:V,message:L}=Rr(s)?{value:!!s,message:s}:At(s);if(V&&(A[g]={type:Ve.required,message:L,ref:O,...se(Ve.required,L)},!r))return T(L),A}if(!M&&(!ue(f)||!ue(c))){let V,L;const J=At(c),ve=At(f);if(!ue(w)&&!isNaN(w)){const we=o.valueAsNumber||w&&+w;ue(J.value)||(V=we>J.value),ue(ve.value)||(L=we<ve.value)}else{const we=o.valueAsDate||new Date(w),Ie=qr=>new Date(new Date().toDateString()+" "+qr),dt=o.type=="time",Jt=o.type=="week";Te(J.value)&&w&&(V=dt?Ie(w)>Ie(J.value):Jt?w>J.value:we>new Date(J.value)),Te(ve.value)&&w&&(L=dt?Ie(w)<Ie(ve.value):Jt?w<ve.value:we<new Date(ve.value))}if((V||L)&&(re(!!V,J.message,ve.message,Ve.max,Ve.min),!r))return T(A[g].message),A}if((l||d)&&!M&&(Te(w)||i&&Array.isArray(w))){const V=At(l),L=At(d),J=!ue(V.value)&&w.length>+V.value,ve=!ue(L.value)&&w.length<+L.value;if((J||ve)&&(re(J,V.message,L.message),!r))return T(A[g].message),A}if(p&&!M&&Te(w)){const{value:V,message:L}=At(p);if(jr(V)&&!w.match(V)&&(A[g]={type:Ve.pattern,message:L,ref:o,...se(Ve.pattern,L)},!r))return T(L),A}if(m){if(Qe(m)){const V=await m(w,t),L=ys(V,O);if(L&&(A[g]={...L,...se(Ve.validate,L.message)},!r))return T(L.message),A}else if(te(m)){let V={};for(const L in m){if(!_e(V)&&!r)break;const J=ys(await m[L](w,t),O,L);J&&(V={...J,...se(L,J.message)},T(J.message),r&&(A[g]=V))}if(!_e(V)&&(A[g]={ref:O,...V},!r))return A}}return T(!0),A};function Ev(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Q(e)?n++:e[t[n++]];return e}function Ov(e){for(const t in e)if(e.hasOwnProperty(t)&&!Q(e[t]))return!1;return!0}function ae(e,t){const r=Array.isArray(t)?t:oo(t)?[t]:us(t),n=r.length===1?e:Ev(e,r),i=r.length-1,o=r[i];return n&&delete n[o],i!==0&&(te(n)&&_e(n)||Array.isArray(n)&&Ov(n))&&ae(e,r.slice(0,-1)),e}function so(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Vr=e=>ue(e)||!ls(e);function ut(e,t){if(Vr(e)||Vr(t))return e===t;if(Ot(e)&&Ot(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const o=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const a=t[i];if(Ot(o)&&Ot(a)||te(o)&&te(a)||Array.isArray(o)&&Array.isArray(a)?!ut(o,a):o!==a)return!1}}return!0}var ws=e=>e.type==="select-multiple",Av=e=>ao(e)||Zt(e),lo=e=>Lr(e)&&e.isConnected,xs=e=>{for(const t in e)if(Qe(e[t]))return!0;return!1};function Br(e,t={}){const r=Array.isArray(e);if(te(e)||r)for(const n in e)Array.isArray(e[n])||te(e[n])&&!xs(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Br(e[n],t[n])):ue(e[n])||(t[n]=!0);return t}function ks(e,t,r){const n=Array.isArray(e);if(te(e)||n)for(const i in e)Array.isArray(e[i])||te(e[i])&&!xs(e[i])?Q(t)||Vr(r[i])?r[i]=Array.isArray(e[i])?Br(e[i],[]):{...Br(e[i])}:ks(e[i],ue(t)?{}:t[i],r[i]):r[i]=!ut(e[i],t[i]);return r}var co=(e,t)=>ks(e,t,Br(t)),$s=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Q(e)?e:t?e===""?NaN:e&&+e:r&&Te(e)?new Date(e):n?n(e):e;function uo(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return io(t)?t.files:ao(t)?bs(e.refs).value:ws(t)?[...t.selectedOptions].map(({value:r})=>r):Zt(t)?ms(e.refs).value:$s(Q(t.value)?e.ref.value:t.value,e)}var Tv=(e,t,r,n)=>{const i={};for(const o of e){const a=C(t,o);a&&U(i,o,a._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Qt=e=>Q(e)?e:jr(e)?e.source:te(e)?jr(e.value)?e.value.source:e.value:e,Iv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ss(e,t,r){const n=C(e,r);if(n||oo(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const o=i.join("."),a=C(t,o),s=C(e,o);if(a&&!Array.isArray(a)&&r!==o)return{name:r};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:r}}var Pv=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Dv=(e,t)=>!Xt(C(e,t)).length&&ae(e,t);const Nv={mode:Se.onSubmit,reValidateMode:Se.onChange,shouldFocusError:!0};function Mv(e={},t){let r={...Nv,...e},n={submitCount:0,isDirty:!1,isLoading:Qe(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=te(r.defaultValues)||te(r.values)?je(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:je(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:so(),array:so(),state:so()},m=e.resetOptions&&e.resetOptions.keepDirtyValues,g=fs(r.mode),v=fs(r.reValidateMode),_=r.criteriaMode===Se.all,x=h=>b=>{clearTimeout(f),f=setTimeout(h,b)},w=async h=>{if(c.isValid||h){const b=r.resolver?_e((await M()).errors):await re(i,!0);b!==n.isValid&&p.state.next({isValid:b})}},O=h=>c.isValidating&&p.state.next({isValidating:h}),T=(h,b=[],y,E,$=!0,k=!0)=>{if(E&&y){if(s.action=!0,k&&Array.isArray(C(i,h))){const I=y(C(i,h),E.argA,E.argB);$&&U(i,h,I)}if(k&&Array.isArray(C(n.errors,h))){const I=y(C(n.errors,h),E.argA,E.argB);$&&U(n.errors,h,I),Dv(n.errors,h)}if(c.touchedFields&&k&&Array.isArray(C(n.touchedFields,h))){const I=y(C(n.touchedFields,h),E.argA,E.argB);$&&U(n.touchedFields,h,I)}c.dirtyFields&&(n.dirtyFields=co(o,a)),p.state.next({name:h,isDirty:L(h,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else U(a,h,b)},A=(h,b)=>{U(n.errors,h,b),p.state.next({errors:n.errors})},H=(h,b,y,E)=>{const $=C(i,h);if($){const k=C(a,h,Q(y)?C(o,h):y);Q(k)||E&&E.defaultChecked||b?U(a,h,b?k:uo($._f)):we(h,k),s.mount&&w()}},K=(h,b,y,E,$)=>{let k=!1,I=!1;const q={name:h};if(!y||E){c.isDirty&&(I=n.isDirty,n.isDirty=q.isDirty=L(),k=I!==q.isDirty);const ee=ut(C(o,h),b);I=C(n.dirtyFields,h),ee?ae(n.dirtyFields,h):U(n.dirtyFields,h,!0),q.dirtyFields=n.dirtyFields,k=k||c.dirtyFields&&I!==!ee}if(y){const ee=C(n.touchedFields,h);ee||(U(n.touchedFields,h,y),q.touchedFields=n.touchedFields,k=k||c.touchedFields&&ee!==y)}return k&&$&&p.state.next(q),k?q:{}},N=(h,b,y,E)=>{const $=C(n.errors,h),k=c.isValid&&Xe(b)&&n.isValid!==b;if(e.delayError&&y?(d=x(()=>A(h,y)),d(e.delayError)):(clearTimeout(f),d=null,y?U(n.errors,h,y):ae(n.errors,h)),(y?!ut($,y):$)||!_e(E)||k){const I={...E,...k&&Xe(b)?{isValid:b}:{},errors:n.errors,name:h};n={...n,...I},p.state.next(I)}O(!1)},M=async h=>r.resolver(a,r.context,Tv(h||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),se=async h=>{const{errors:b}=await M(h);if(h)for(const y of h){const E=C(b,y);E?U(n.errors,y,E):ae(n.errors,y)}else n.errors=b;return b},re=async(h,b,y={valid:!0})=>{for(const E in h){const $=h[E];if($){const{_f:k,...I}=$;if(k){const q=l.array.has(k.name),ee=await _s($,a,_,r.shouldUseNativeValidation&&!b,q);if(ee[k.name]&&(y.valid=!1,b))break;!b&&(C(ee,k.name)?q?Cv(n.errors,ee,k.name):U(n.errors,k.name,ee[k.name]):ae(n.errors,k.name))}I&&await re(I,b,y)}}return y.valid},V=()=>{for(const h of l.unMount){const b=C(i,h);b&&(b._f.refs?b._f.refs.every(y=>!lo(y)):!lo(b._f.ref))&&mo(h)}l.unMount=new Set},L=(h,b)=>(h&&b&&U(a,h,b),!ut(Ds(),o)),J=(h,b,y)=>Sv(h,l,{...s.mount?a:Q(b)?o:Te(h)?{[h]:b}:b},y,b),ve=h=>Xt(C(s.mount?a:o,h,e.shouldUnregister?C(o,h,[]):[])),we=(h,b,y={})=>{const E=C(i,h);let $=b;if(E){const k=E._f;k&&(!k.disabled&&U(a,h,$s(b,k)),$=Lr(k.ref)&&ue(b)?"":b,ws(k.ref)?[...k.ref.options].forEach(I=>I.selected=$.includes(I.value)):k.refs?Zt(k.ref)?k.refs.length>1?k.refs.forEach(I=>(!I.defaultChecked||!I.disabled)&&(I.checked=Array.isArray($)?!!$.find(q=>q===I.value):$===I.value)):k.refs[0]&&(k.refs[0].checked=!!$):k.refs.forEach(I=>I.checked=I.value===$):io(k.ref)?k.ref.value="":(k.ref.value=$,k.ref.type||p.values.next({name:h,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&K(h,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&vo(h)},Ie=(h,b,y)=>{for(const E in b){const $=b[E],k=`${h}.${E}`,I=C(i,k);(l.array.has(h)||!Vr($)||I&&!I._f)&&!Ot($)?Ie(k,$,y):we(k,$,y)}},dt=(h,b,y={})=>{const E=C(i,h),$=l.array.has(h),k=je(b);U(a,h,k),$?(p.array.next({name:h,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&p.state.next({name:h,dirtyFields:co(o,a),isDirty:L(h,k)})):E&&!E._f&&!ue(k)?Ie(h,k,y):we(h,k,y),hs(h,l)&&p.state.next({...n}),p.values.next({name:h,values:{...a}}),!s.mount&&t()},Jt=async h=>{const b=h.target;let y=b.name,E=!0;const $=C(i,y),k=()=>b.type?uo($._f):bv(h),I=q=>{E=Number.isNaN(q)||q===C(a,y,q)};if($){let q,ee;const Kr=k(),Tt=h.type===cs.BLUR||h.type===cs.FOCUS_OUT,Tm=!Iv($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||Pv(Tt,C(n.touchedFields,y),n.isSubmitted,v,g),bo=hs(y,l,Tt);U(a,y,Kr),Tt?($._f.onBlur&&$._f.onBlur(h),d&&d(0)):$._f.onChange&&$._f.onChange(h);const yo=K(y,Kr,Tt,!1),Im=!_e(yo)||bo;if(!Tt&&p.values.next({name:y,type:h.type,values:{...a}}),Tm)return c.isValid&&w(),Im&&p.state.next({name:y,...bo?{}:yo});if(!Tt&&bo&&p.state.next({...n}),O(!0),r.resolver){const{errors:Bs}=await M([y]);if(I(Kr),E){const Pm=Ss(n.errors,i,y),zs=Ss(Bs,i,Pm.name||y);q=zs.error,y=zs.name,ee=_e(Bs)}}else q=(await _s($,a,_,r.shouldUseNativeValidation))[y],I(Kr),E&&(q?ee=!1:c.isValid&&(ee=await re(i,!0)));E&&($._f.deps&&vo($._f.deps),N(y,ee,q,yo))}},qr=(h,b)=>{if(C(n.errors,b)&&h.focus)return h.focus(),1},vo=async(h,b={})=>{let y,E;const $=no(h);if(O(!0),r.resolver){const k=await se(Q(h)?h:$);y=_e(k),E=h?!$.some(I=>C(k,I)):y}else h?(E=(await Promise.all($.map(async k=>{const I=C(i,k);return await re(I&&I._f?{[k]:I}:I)}))).every(Boolean),!(!E&&!n.isValid)&&w()):E=y=await re(i);return p.state.next({...!Te(h)||c.isValid&&y!==n.isValid?{}:{name:h},...r.resolver||!h?{isValid:y}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!E&&Fr(i,qr,h?$:l.mount),E},Ds=h=>{const b={...o,...s.mount?a:{}};return Q(h)?b:Te(h)?C(b,h):h.map(y=>C(b,y))},Ns=(h,b)=>({invalid:!!C((b||n).errors,h),isDirty:!!C((b||n).dirtyFields,h),isTouched:!!C((b||n).touchedFields,h),error:C((b||n).errors,h)}),Cm=h=>{h&&no(h).forEach(b=>ae(n.errors,b)),p.state.next({errors:h?n.errors:{}})},Ms=(h,b,y)=>{const E=(C(i,h,{_f:{}})._f||{}).ref;U(n.errors,h,{...b,ref:E}),p.state.next({name:h,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},Em=(h,b)=>Qe(h)?p.values.subscribe({next:y=>h(J(void 0,b),y)}):J(h,b,!0),mo=(h,b={})=>{for(const y of h?no(h):l.mount)l.mount.delete(y),l.array.delete(y),b.keepValue||(ae(i,y),ae(a,y)),!b.keepError&&ae(n.errors,y),!b.keepDirty&&ae(n.dirtyFields,y),!b.keepTouched&&ae(n.touchedFields,y),!r.shouldUnregister&&!b.keepDefaultValue&&ae(o,y);p.values.next({values:{...a}}),p.state.next({...n,...b.keepDirty?{isDirty:L()}:{}}),!b.keepIsValid&&w()},Fs=({disabled:h,name:b,field:y,fields:E,value:$})=>{if(Xe(h)){const k=h?void 0:Q($)?uo(y?y._f:C(E,b)._f):$;U(a,b,k),K(b,k,!1,!1,!0)}},go=(h,b={})=>{let y=C(i,h);const E=Xe(b.disabled);return U(i,h,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:h}},name:h,mount:!0,...b}}),l.mount.add(h),y?Fs({field:y,disabled:b.disabled,name:h}):H(h,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Qt(b.min),max:Qt(b.max),minLength:Qt(b.minLength),maxLength:Qt(b.maxLength),pattern:Qt(b.pattern)}:{},name:h,onChange:Jt,onBlur:Jt,ref:$=>{if($){go(h,b),y=C(i,h);const k=Q($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,I=Av(k),q=y._f.refs||[];if(I?q.find(ee=>ee===k):k===y._f.ref)return;U(i,h,{_f:{...y._f,...I?{refs:[...q.filter(lo),k,...Array.isArray(C(o,h))?[{}]:[]],ref:{type:k.type,name:h}}:{ref:k}}}),H(h,!1,void 0,k)}else y=C(i,h,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(_v(l.array,h)&&s.action)&&l.unMount.add(h)}}},Ls=()=>r.shouldFocusError&&Fr(i,qr,l.mount),Om=h=>{Xe(h)&&(p.state.next({disabled:h}),Fr(i,b=>{b.disabled=h},0,!1))},Rs=(h,b)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=je(a);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:k}=await M();n.errors=$,E=k}else await re(i);ae(n.errors,"root"),_e(n.errors)?(p.state.next({errors:{}}),await h(E,y)):(b&&await b({...n.errors},y),Ls(),setTimeout(Ls)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_e(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Am=(h,b={})=>{C(i,h)&&(Q(b.defaultValue)?dt(h,C(o,h)):(dt(h,b.defaultValue),U(o,h,b.defaultValue)),b.keepTouched||ae(n.touchedFields,h),b.keepDirty||(ae(n.dirtyFields,h),n.isDirty=b.defaultValue?L(h,C(o,h)):L()),b.keepError||(ae(n.errors,h),c.isValid&&w()),p.state.next({...n}))},js=(h,b={})=>{const y=h?je(h):o,E=je(y),$=h&&!_e(h)?E:o;if(b.keepDefaultValues||(o=y),!b.keepValues){if(b.keepDirtyValues||m)for(const k of l.mount)C(n.dirtyFields,k)?U($,k,C(a,k)):dt(k,C($,k));else{if(ro&&Q(h))for(const k of l.mount){const I=C(i,k);if(I&&I._f){const q=Array.isArray(I._f.refs)?I._f.refs[0]:I._f.ref;if(Lr(q)){const ee=q.closest("form");if(ee){ee.reset();break}}}}i={}}a=e.shouldUnregister?b.keepDefaultValues?je(o):{}:je($),p.array.next({values:{...$}}),p.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,p.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!ut(h,o)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&h?co(o,h):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Vs=(h,b)=>js(Qe(h)?h(a):h,b);return{control:{register:go,unregister:mo,getFieldState:Ns,handleSubmit:Rs,setError:Ms,_executeSchema:M,_getWatch:J,_getDirty:L,_updateValid:w,_removeUnmounted:V,_updateFieldArray:T,_updateDisabledField:Fs,_getFieldArray:ve,_reset:js,_resetDefaultValues:()=>Qe(r.defaultValues)&&r.defaultValues().then(h=>{Vs(h,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:h=>{n={...n,...h}},_disableForm:Om,_subjects:p,_proxyFormState:c,get _fields(){return i},get _formValues(){return a},get _state(){return s},set _state(h){s=h},get _defaultValues(){return o},get _names(){return l},set _names(h){l=h},get _formState(){return n},set _formState(h){n=h},get _options(){return r},set _options(h){r={...r,...h}}},trigger:vo,register:go,handleSubmit:Rs,watch:Em,setValue:dt,getValues:Ds,reset:Vs,resetField:Am,clearErrors:Cm,unregister:mo,setError:Ms,setFocus:(h,b={})=>{const y=C(i,h),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),b.shouldSelect&&$.select())}},getFieldState:Ns}}function zr(e={}){const t=ke.useRef(),r=ke.useRef(),[n,i]=ke.useState({isDirty:!1,isValidating:!1,isLoading:Qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Qe(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Mv(e,()=>i(a=>({...a}))),formState:n});const o=t.current.control;return o._options=e,$v({subject:o._subjects.state,next:a=>{kv(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),ke.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),ke.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==n.isDirty&&o._subjects.state.next({isDirty:a})}},[o,n.isDirty]),ke.useEffect(()=>{e.values&&!ut(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values):o._resetDefaultValues()},[e.values,o]),ke.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=xv(n,o),t.current}var Cs=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Fv=function(e,t){var r=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Cs(o.ref,i,e):o.refs&&o.refs.forEach(function(a){return Cs(a,i,e)})};for(var n in t.fields)r(n)},Lv=function(e,t){t.shouldUseNativeValidation&&Fv(e,t);var r={};for(var n in e){var i=C(t.fields,n),o=Object.assign(e[n]||{},{ref:i&&i.ref});if(jv(t.names||Object.keys(e),n)){var a=Object.assign({},Rv(C(r,n)));U(a,"root",o),U(r,n,a)}else U(r,n,o)}return r},Rv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},jv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},Vv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var i=n.path.map(function(s){return s.key}).join(".");if(r[i]||(r[i]={message:n.message,type:n.validation}),t){var o=r[i].types,a=o&&o[n.validation];r[i]=ds(i,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},Ur=function(e,t,r){return r===void 0&&(r={}),function(n,i,o){try{return Promise.resolve(function(a,s){try{var l=function(){function d(c){return{values:r.raw?n:c,errors:{}}}var f=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?d(sr(e,n,f)):Promise.resolve(Md(e,n,f)).then(d)}()}catch(d){return s(d)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof nn)return{values:{},errors:Lv(Vv(a,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}};const Es=27,Os=12,As=10,Bv=Ht("enum"),zv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Ur(Ce({checked:ii(oi(ri()),r=>Object.entries(r).filter(([n,i])=>i).map(([n,i])=>n),[lr(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),cr(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Uv=ne(({option:e,...t},r)=>u(Y,{children:[u("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),u("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:t.id,children:e.label})]})),Ts=$r("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:ns}}}),Hv=({input:e,onSubmitSuccess:t})=>{var d,f;const r=e.key?(d=P.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,i=n&&e.config.options.length===2,{register:o,handleSubmit:a,formState:{errors:s}}=zr({defaultValues:{checked:n?{}:Bv(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:zv(e.config)}),l=to();return i?u("ul",{style:{maxHeight:6.5*Es+5*Os+2*As},class:Ts({variant:"booleanLike"}),children:e.config.options.map((c,p)=>u("li",{class:"flex-1",children:u(os,{type:"submit",ref:m=>{m&&p===0&&(l.current=m)},label:c.label,value:"true",onClick:()=>t({type:"enum",value:[c.value]})})},c.value))}):u("form",{noValidate:!0,onSubmit:c=>a(p=>{const m=p.checked;t({type:"enum",value:m})})(c),children:[u("div",{class:"flex items-center gap-1",children:[u("ul",{style:{maxHeight:6.5*Es+5*Os+2*As},class:Ts({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((c,p)=>{const m=`checked.${c.value}`,{ref:g,...v}=o(m);return u("li",{class:"relative",children:u(Uv,{option:c,autoFocus:p===0,ref:_=>{_&&p===0&&(l.current=_),g(_)},id:m,...v,onClick:n?()=>t({type:"enum",value:[c.value]}):void 0})},c.value)})}),u("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:u(lt,{}),e.config.minSelected===0&&u(ct,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),u("div",{class:"px-1",children:u(Yt,{error:(f=s.checked)==null?void 0:f.root})})]})},qv=Ht("number"),Hr={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`},Kv=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Ur(Ce({number:on(Hr.number(),[Vd(t,Hr.min(t)),jd(r,Hr.max(r)),Ld(i=>i===Number(i.toFixed(n)),Hr.decimalCases(n))])}))},Wv=({input:e,onSubmitSuccess:t})=>{var f;const r=e.config.defaultValue,n=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,{register:i,handleSubmit:o,formState:{errors:a}}=zr({defaultValues:{number:r?Number(r):qv(n)?n.value:void 0},resolver:Kv(e.config)}),{ref:s,...l}=i("number",{required:!e.config.optional,valueAsNumber:!0}),d=F();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-grow",children:[u("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.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&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Yt,{error:a.number})]})},Gv="44",fo="That doesn’t look like a valid phone number",Is=e=>({min:`The phone number needs to be at least ${e.minChars} digits long.`,max:`The phone number can't be longer than ${e.maxChars} digits.`}),Yv=Ht("string"),Zv=xe(fo,[ai(/^\+?[0-9 -]+$/,fo)]),Xv=xe("Please select a country code",[ai(/^\+?[0-9 -]+$/,fo)]),Qv=()=>Ur(Ce({text:ii(Zv,e=>e.replace(/[^0-9]/g,""),[]),countryCode:Xv})),Jv=({input:e,onSubmitSuccess:t})=>{var g;const r=e.key?(g=P.current$.value.flow)==null?void 0:g.data.submissions[e.key]:void 0,n=e.config.defaultValue,[i,o]=W(),{register:a,handleSubmit:s,formState:{errors:l},watch:d}=zr({defaultValues:{text:n||(Yv(r)?r.value:""),countryCode:Gv},resolver:Qv()}),{ref:f,...c}=a("text",{required:!e.config.optional}),p=F(),m=d("countryCode");return fe(()=>{p.current&&(p.current.focus(),p.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(v=>{if(o(void 0),v.text.length+v.countryCode.length>(e.config.maxChars||1/0))return o(Is(e.config).max);if(v.text.length+v.countryCode.length<(e.config.minChars||0))return o(Is(e.config).min);t({type:"string",value:m+v.text})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[u("label",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus-within:bg-neutral-5 focus-within:outline-accent-7 relative flex h-full w-12 appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-lg border-solid bg-transparent bg-none py-1.5 text-center text-base transition-colors focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[u("span",{children:["+",m]}),u("select",{...a("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(es).map(([v,_])=>u("option",{value:_,children:[v," (+",_,")"]},v))})]}),u("input",{...c,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:v=>{v&&(p.current=v),f(v)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest flex-1 rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Yt,{error:l.text||l.countryCode||{message:i}})]})},em=({input:e,onSubmitSuccess:t})=>u("div",{class:"flex flex-col items-center py-3",children:u("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:u("span",{class:"flex items-center gap-1.5",children:[u("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),u("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:[u("path",{d:"M4 8L8 4L12 8"}),u("path",{d:"M8 4V13"})]})]})})}),ho={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"},tm={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},rm=Ht("string"),nm=e=>{const t={maxLength:`Please enter no more than ${e.maxChars??999} characters`,minLength:`Please enter ${e.minChars??1} or more characters`};return Ur(Ce({text:{email:xe(ho.email,[Rd(ho.email),cr(e.minChars??1,t.minLength),lr(e.maxChars??1/0,t.maxLength)]),text:xe([cr(e.minChars??1,t.minLength),lr(e.maxChars??1/0,t.maxLength)]),url:xe([Bd(ho.url),cr(e.minChars??1,t.minLength),lr(e.maxChars??1/0,t.maxLength)])}[e.format]}))},om=({input:e,onSubmitSuccess:t})=>{var f;const r=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:i,handleSubmit:o,formState:{errors:a}}=zr({defaultValues:{text:n||(rm(r)?r.value:"")},resolver:nm(e.config)}),{ref:s,...l}=i("text",{required:!e.config.optional}),d=F();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(c=>{t({type:"string",value:c.text})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-1",children:[u("input",{id:"chat-input",...l,...tm[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.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&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Yt,{error:a.text})]})},im=()=>{var i;const e=(i=P.current$.value.flow)==null?void 0:i.data.currentInput,[t,r]=Yp(),n=F(null);return P.inputHeight$.value=r.height,j(()=>{const o=n.current;if(o)return o.addEventListener("transitionstart",Z.scrollToEnd.smooth),o.addEventListener("transitioncancel",Z.scrollToEnd.smooth),o.addEventListener("transitionend",Z.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",Z.scrollToEnd.smooth),o.removeEventListener("transitioncancel",Z.scrollToEnd.smooth),o.removeEventListener("transitionend",Z.scrollToEnd.smooth)}},[]),u("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:u("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:Re({input:e}).with({input:B.nullish},()=>u("div",{class:"flex items-center gap-2 p-2.5",children:[u("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}),u(lt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},o=>u(om,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...o})).with({input:{type:"phone"}},o=>u(Jv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...o})).with({input:{type:"multiple-choice"}},o=>u(Hv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...o})).with({input:{type:"boolean"}},o=>u(uv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...o})).with({input:{type:"file"}},o=>u(gv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...o})).with({input:{type:"submit"}},o=>u(em,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...o})).with({input:{type:"address"}},o=>u(iv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...o})).with({input:{type:"number"}},o=>u(Wv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...o})).exhaustive()})})};var am=function(e){return e instanceof RegExp},sm=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Ps=function(e){return typeof e=="string"},lm=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function cm(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!Ps(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;am(o)||(o=new RegExp("("+sm(o)+")","gi"));for(var a=e.split(o),s=1,l=a.length;s<l;s+=2){if(a[s]===void 0||a[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=a[s].length,n+=a[s-1].length,a[s]=r(a[s],s,n),n+=i}return a}var um=function(t,r,n){return Array.isArray(t)||(t=[t]),lm(t.map(function(i){return Ps(i)?cm(i,r,n):i}))};const po=Pe(um),dm=/(https?:\/\/[^\s]+)/g,fm=/_(.*?)_/g,hm=/\*\*(.*?)\*\*/g,pm=e=>{const t=po(e,dm,(i,o)=>u("a",{class:"text-accent-10 hover:text-accent-11 no-underline",href:i,children:i},i+o)),r=po(t,fm,(i,o)=>u("em",{children:i},i+o));return po(r,hm,(i,o)=>u("strong",{children:i},i+o))},vm=$r("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"}}),mm=({children:e,className:t,animate:r,side:n,...i})=>u("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:vm({className:t,side:n,animate:r}),...i,children:e}),gm=({message:e})=>u("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:u("a",{onClick:e.onClick,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:e.href,children:[e.text,u("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("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"})})]})}),bm=({className:e,...t})=>(j(()=>{Z.scrollToEnd.smooth()}),u("div",{"aria-hidden":!0,children:Z.isBotTyping$.value===!0?u("div",{"aria-label":"Typing…",class:ot("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>u("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),ym={bot:"left",user:"right"},_m=$r("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]"}}}),wm=({lastSentMessageFooter:e})=>{var r;const t=((r=P.current$.value.flow)==null?void 0:r.data.messages)??[];return j(()=>{Z.scrollToEnd.smooth()},[t.length]),u("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,i)=>u(Y,{children:u("li",{class:"flex",children:Re(n).with({type:"system"},o=>u("p",{class:_m({variant:o.variant}),children:o.text})).with({type:"text",author:B.union("bot","user")},o=>{const a=o.author==="user"&&!t.slice(i+1).some(l=>l.type==="text"&&l.author==="user"),s=i===t.length-1;return u(mm,{animate:s,side:ym[o.author],children:[pm(o.text),a?e:null]},i)}).with({type:"link"},o=>u(gm,{message:o})).with({type:"image"},o=>u("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:o.url,style:{aspectRatio:o.width/o.height}})).with({type:"file"},o=>u(pv,{class:o.author==="bot"?void 0:"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).with({type:"loading"},o=>{const a=t[t.length-1];return!(o===a)||Z.isBotTyping$.value?null:u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(Ha,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),u(bm,{},"typing")]})},xm=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=P.current$.value;$e(n,"Flow is required to exist to show chatbot body");const i=P.viewState$.value,{chatRef:o,chatService:a}=tv(),[s,l]=W();return fe(()=>{i==="maximised"&&Z.scrollToEnd.instant()},[i]),fe(()=>{var v,_;const{state:d,flow:f}=P.current$.peek();if(d!=="loaded")throw new Error(_p.invalid_state);let c=f.data.nodeHistory.at(-1);if(Z.scrollToEnd.instant(),P.setInput(void 0),f.data.isFinished)return;c===void 0?(c=ja(n.nodes).id,P.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,job:n.job},customProperties:(v=n.analytics)==null?void 0:v.customProperties})):P.removeMessagesSentByNodeIds([c]);const{interpret:p,abort:m,undo:g}=Np({context:n.context,analytics:{service:r,customProperties:(_=n.analytics)==null?void 0:_.customProperties},apiClient:t,logger:e,flow:n,chatService:a,getSubmissions:()=>{var x;return(x=P.current$.peek().flow)==null?void 0:x.data.submissions},onInterpret:(x,w)=>{var T;const O=P.current$.peek().flow;$e(O),w&&(O.data.sequence=O.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:x.id,sequence:O.data.sequence,flow_session_id:O.data.flowSessionId,job:n.job},customProperties:(T=n.analytics)==null?void 0:T.customProperties})),P.setCurrentNodeId(x.id)},onFlowEnd:async()=>{var w;P.markAsFinished();const x=P.current$.peek().flow;$e(x),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:x.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(w=n.analytics)==null?void 0:w.customProperties})}});return l(()=>g),p(c),m},[r,t,a,e,n]),u(Y,{children:[u("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:P.inputHeight$.value},children:u(wm,{lastSentMessageFooter:n.data.isFinished||!s?null:u($m,{undoFn:s})})}),u(im,{})]})},km=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"):[],$m=({undoFn:e})=>u("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:u("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}=P.current$.peek();$e(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(P.removeMessagesSentByNodeIds(n),P.setInput(void 0),n.pop(),n.map(i=>t.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(km).forEach(i=>delete t.data.submissions[i]),P.current$.value={...P.current$.value})},children:"Undo"})}),Sm=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:xm},Symbol.toStringTag,{value:"Module"}))})();
45
+ }`},Za=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const i=t[n];if(!i)continue;const o=It(e,n,null);if(i.required&&o===null){const a=`Configuration error in context: ${n} is required`;throw r.error(a),new Error(a)}switch(i.type){case"number":if(typeof o!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof o!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}},Nh=({_internal_domManager:e=kh(),theme:t})=>Je(({apiClient:r,logger:n,analytics:i})=>{let o=!1;const a=()=>{if(typeof window>"u")return;const s=[N("style",{id:"inploi-chatbot-styles"},_h),N("style",{id:"inploi-chatbot-theme"},Ih(t))],l=e.getOrCreateChatbotElement();mt(N(Y,{},[s,N(bh,{apiClient:r,logger:n,analytics:i})]),l),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async(s,l)=>r.fetch(`/flow/job/${s}`).then(d=>{const f=sr(wh,d);return{flow:f.flow,title:`Applying for “${f.job.title}”`,flowKeys:[f.job.id,...(l==null?void 0:l.flowKeys)??[]],job:{id:f.job.id,id_type:"external"},...l}}),fetchFlowById:async(s,l)=>r.fetch(`/flow/id/${s}`).then(d=>{var c;const f=sr(yh,d);return{flow:f.flow,title:"Chatbot",flowKeys:(l==null?void 0:l.flowKeys)??[],...l,analytics:{customProperties:{flow_id:f.flow.id,flow_version:f.flow.version,...(c=l==null?void 0:l.analytics)==null?void 0:c.customProperties}}}}),open:async s=>{if(!(typeof window>"u"))try{I.cancelCurrentFlow(),I.viewState$.value="maximised",o||a(),s instanceof Promise?(I.current$.value={state:"loading"},s.then(async l=>{Za({context:l.context||{},schema:l.flow.context_schema,logger:n}),I.startFlow(l)}).catch(l=>{const d=l instanceof Error?l.message:"An error occurred";I.current$.value={state:"error",error:d}})):(Za({context:s.context||{},schema:s.flow.context_schema,logger:n}),I.startFlow(s))}catch(l){n.error("Error starting flow",l)}},close:async()=>{typeof window>"u"||(I.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=Nh;const Gt=(e,{context:t,submissions:r})=>{const[n,...i]=e.data.compareKey.split(".");if(!n)return!1;const o=Ja({context:t,key:n,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{const a=It(o.value,i.join("."));switch(e.data.compare){case"equals":return a===e.data.compareValue;case"contains":return a?a.includes(e.data.compareValue):!1;case"notEquals":return a!==e.data.compareValue;case"notContains":return a?!a.includes(e.data.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const a=It(o.value,i.join(".")),s={...e,data:{...e.data,compareKey:"_temp"}};switch(typeof a){case"boolean":return Gt(s,{submissions:{_temp:{value:a,type:"boolean"}},context:t});case"string":return Gt(s,{submissions:{_temp:{value:a,type:"string"}},context:t});case"number":return Gt(s,{submissions:{_temp:{value:a,type:"number"}},context:t});case"object":return Array.isArray(a)&&a.every(za)?Gt(s,{submissions:{_temp:{value:a,type:"enum"}},context:t}):!1}break}case"boolean":{const a=e.data.compareValue==="true";switch(e.data.compare){case"equals":return o.value===a;case"notEquals":return o.value!==a}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 a=Number(e.data.compareValue);switch(e.data.compare){case"equals":return o.value===a;case"notEquals":return o.value!==a;case"greaterThan":return o.value>a;case"greaterThanOrEqualTo":return o.value>=a;case"lessThan":return o.value<a;case"lessThanOrEqualTo":return o.value<=a}}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},Dh=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Xe=(e,{context:t,submissions:r})=>e.replace(Dh,(n,i,o="")=>{const[a,...s]=i.trim().split("."),l=Ja({key:a,path:s,submissions:r,context:t});if(!l)return o;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Ut(d.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():o;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const d=It(l.value,s.join("."));switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(za))return d.join(", ")}break}}return o}),Qa=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return Qa({node:n,nodes:t,stopWhen:r})},Mh=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(s=>s.id===i.branchId);if(!o)return!1;const a=Qa({node:o,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},Fh=({flow:e,analytics:t,logger:r,context:n,apiClient:i,getSubmissions:o,chatService:a,onFlowEnd:s,onInterpret:l})=>{let d=new AbortController;const f={...t.service,log:h=>t.service.log({...h,customProperties:{...h.customProperties,...t.customProperties}})},c=async(h,g)=>{const m=o();l==null||l(h,g);try{await Lh({flow:e,analytics:f,logger:r,apiClient:i,context:n,node:h,submissions:m,chat:{sendMessage:async v=>a.send({groupId:h.id,message:v,signal:d.signal}),userInput:async v=>a.input({input:v,signal:d.signal}),addToSubmissions:a.addToSubmissions},next:v=>{const w=v?e.nodes.find(x=>x.id===v):Mh({childNode:h,nodes:e.nodes});return w?c(w,h):s==null?void 0:s(h)},end:()=>s==null?void 0:s(h)})}catch(v){if(v instanceof qt)return;throw v}};return{interpret:async h=>{const g=e.nodes.find(m=>m.id===h)??Ba(e.nodes);return c(g)},undo:h=>{let g=1;const m=e.nodes.find(w=>w.id===h[h.length-1]);for(let w=h.length-2;w>0;w--){const x=h[w],_=e.nodes.find(O=>O.id===x);if(!_||(g++,_.type.startsWith("question-")))break}d.abort(),d=new AbortController;const v=e.nodes.find(w=>w.id===h[h.length-g]);return $e(v,"Undo failed: new start node not found"),c(v,m),{removed:g}},abort:()=>{d.abort()}}};async function Lh(e){return await Re(e).with({node:{type:"text"}},Bh).with({node:{type:"image"}},zh).with({node:{type:"question-text"}},Uh).with({node:{type:"question-enum"}},qh).with({node:{type:"question-number"}},Hh).with({node:{type:"question-boolean"}},Kh).with({node:{type:"question-file"}},Gh).with({node:{type:"question-address"}},Wh).with({node:{type:"end-flow"}},Yh).with({node:{type:"if-block"}},Vh).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},jh).with({node:{type:"integration-application-submit"}},Rh).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function Rh({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:o,analytics:a,flow:s}){const l=async d=>{d!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:f,session_id:c}=a.getSessionInfo(),h=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:f,session_id:c,job:s.job,submissions:ah(o||{})})}).catch(g=>g);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:h}),Re(h).with({integration_response:B.select(B.union({service:B.optional(B.string),status:B.number,data:B.any},{service:B.optional(B.string),status:B.number,error:{message:B.string,data:B.any}}))},g=>{a.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:g.service??"INVALID_SERVICE",response:{status:g.status,payload:"data"in g?g.data:g.error.data??null},job:s.job}})}).otherwise(()=>{}),await Re(h).with(B.union({ats_data:B.select("redirect",{redirect_url:B.string})},{integration_response:{data:B.select("redirect",{redirect_url:B.string})}}),async g=>{if(g.redirect===void 0)return;await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const m=new URL(g.redirect.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",onClick:()=>{if(!c){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}a.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:c,flow_version:s.version,href:m.toString(),job:s.job}})}}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with(B.union({success:!1,ats_data:B.select("error",{message:B.string})},{integration_response:{error:B.select("error",{message:B.string})}}),async g=>{var m;n.error(g.error),await e.sendMessage({type:"system",variant:"error",text:((m=g.error)==null?void 0:m.message)||"Failed to submit"}),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 jh({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({type:"link",href:Xe(r.data.href,{submissions:n,context:i}),text:Xe(r.data.cta,{submissions:n,context:i})}),t(r.nextId)}async function Vh({submissions:e,next:t,node:r,context:n}){t(Gt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Bh({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Xe(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function zh({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 Uh({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Xe(r.data.question,{submissions:n,context:i})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,maxChars:r.data.maxChars,minChars:r.data.minChars}}):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,minChars:r.data.minChars}});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 Hh({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Xe(r.data.question,{submissions:n,context:i})});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 qh({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Xe(r.data.question,{submissions:n,context:i})});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(a=>o.value.includes(a.value)).map(a=>a.label).join(", ")}),t(r.nextId)}async function Kh({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Xe(r.data.question,{submissions:n,context:i})});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 Wh({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 i=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:i})}return t(r.nextId)}async function Gh({node:e,chat:t,next:r,submissions:n,context:i}){await t.sendMessage({author:"bot",type:"text",text:Xe(e.data.question,{submissions:n,context:i})});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 a of o.value)await t.sendMessage({author:"user",type:"file",fileName:a.name,fileSizeKb:a.sizeKb});r(e.nextId)}async function Yh({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const Ja=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const i=It(n,t.join("."));switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r==null?void 0:r[e]};function Zn(e,t,r){var n,i,o,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(o,i),o=i=null))}var d=function(){o=this,i=arguments,a=Date.now();var f=r&&!n;return n||(n=setTimeout(l,t)),f&&(s=e.apply(o,i),o=i=null),s};return d.clear=function(){n&&(clearTimeout(n),n=null)},d.flush=function(){n&&(s=e.apply(o,i),o=i=null,clearTimeout(n),n=null)},d}Zn.debounce=Zn;var Xh=Zn;const es=Ie(Xh);function Zh(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const o=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)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=F({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),d=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,c=F(!1);j(()=>(c.current=!0,()=>void(c.current=!1)));const[h,g,m]=pe(()=>{const _=()=>{if(!l.current.element)return;const{left:O,top:P,width:T,height:H,bottom:K,right:D,x:M,y:se}=l.current.element.getBoundingClientRect(),re={left:O,top:P,width:T,height:H,bottom:K,right:D,x:M,y:se};l.current.element instanceof HTMLElement&&i&&(re.height=l.current.element.offsetHeight,re.width=l.current.element.offsetWidth),Object.freeze(re),c.current&&!tv(l.current.lastBounds,re)&&s(l.current.lastBounds=re)};return[_,f?es(_,f):_,d?es(_,d):_]},[s,i,d,f]);function v(){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 o(m),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",m,{capture:!0,passive:!0})))}const x=_=>{!_||_===l.current.element||(v(),l.current.element=_,l.current.scrollContainers=ts(_),w())};return Jh(m,!!r),Qh(g),j(()=>{v(),w()},[r,m,g]),j(()=>v,[]),[x,a,h]}function Qh(e){j(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Jh(e,t){j(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function ts(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...ts(e.parentElement)]}const ev=["x","y","top","bottom","left","right","width","height"],tv=(e,t)=>ev.every(r=>e[r]===t[r]),lt=({class:e,...t})=>u("button",{class:ot("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[u("title",{children:"Send"}),u("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),u("path",{d:"M8 4V13"})]})}),rv=25,Qn=We({instant:()=>{},smooth:()=>{}}),X={onSubmitSuccessFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>Qn.value.instant(),smooth:()=>Qn.value.smooth()}},nv=()=>{const e=F(null);fe(()=>{Qn.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*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=pe(()=>({addToSubmissions:(n,i)=>I.setSubmission(n,i),send:async({message:n,signal:i,groupId:o})=>{if(await Re(n).with({author:"bot",type:"text"},async a=>{if(i!=null&&i.aborted)throw new qt;X.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*rv;await new Promise(l=>setTimeout(l,s,{signal:i})),X.isBotTyping$.value=!1}).otherwise(async()=>{}),i!=null&&i.aborted)throw new qt;I.addMessage(n,o)},input:({input:n,signal:i})=>{if(i!=null&&i.aborted)throw new qt;return I.setInput(n),new Promise(o=>{const a=s=>{if(i!=null&&i.aborted)throw new qt;I.setInput(void 0),n.key&&I.setSubmission(n.key,s),o(s)};X.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},ct=({class:e,...t})=>u("button",{type:"button",class:ot("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[u("title",{children:"Skip"}),u("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),u("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Jn={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"260",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"352","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"852","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"293",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"},rs={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"]},Mr=Object.keys(rs),ov=e=>Mr.reduce((t,r)=>{const n=rs[r],i=e.filter(o=>o.types.some(a=>n.includes(a))).map(o=>o.long_name).join(", ");return i&&(t[r]=i),t},{}),iv=document.createElement("div"),av=()=>pe(()=>{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(iv);return{enabled:!0,getPredictions:async n=>{const{predictions:i}=await t.getPlacePredictions({input:n,language:"en"});return i.map(o=>({label:o.description,value:o.place_id}))},getPlaceDetails:async n=>await new Promise((o,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"):o({ok:!0,place:s}))).catch(async o=>(console.error("Failed to get address details",o),{ok:!1}))}},[]),eo=e=>u("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:[u("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:u("path",{d:"M10 3L5 8L10 13"})}),u("span",{children:"Back"})]}),to={label:"Fill in manually",value:""},sv=({input:e,onSubmitSuccess:t})=>{const[r,n]=W(""),[i,o]=W(),[a,s]=W([]),[l,d]=W(),{enabled:f,getPredictions:c,getPlaceDetails:h}=av(),[g,m]=W(f?"query":"manual"),v=w=>{$e(f,"Query state should not be enabled if Google Places isn't available"),n(w),w===""&&s([]),c(w).then(x=>{s(x)})};switch(j(()=>{if(f&&!(l===void 0||l===""))return h(l).then(w=>{if(!w.ok||!w.place.address_components){o({});return}const x=ov(w.place.address_components);o(x),m("details")}),()=>{o(void 0)}},[l,h,f]),g){case"query":return $e(f,"Query state should not be enabled if Google Places isn't available"),u(lv,{input:e,onSkip:()=>t(null),onAddressSelect:w=>{d(w),m("loading")},onAddressSearch:w=>{v(w)},suggestions:a,query:r});case"loading":return u(ro,{input:e,onSubmitSuccess:t,addressFields:{},actions:u(eo,{onClick:()=>{d(void 0),m("query")}})});case"details":return $e(i!==void 0),u(ro,{input:e,onSubmitSuccess:t,addressFields:i,actions:u(eo,{onClick:()=>{d(void 0),m("query")}})});case"manual":return u(ro,{input:e,onSubmitSuccess:t,addressFields:{},actions:f?u(eo,{onClick:()=>{d(void 0),m("query")}}):void 0})}},lv=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:i,onAddressSearch:o})=>{const a=F(null);return fe(()=>{a.current&&(a.current.focus(),a.current.select())},[]),u(Y,{children:[u("form",{noValidate:!0,onSubmit:s=>{s.preventDefault();const d=new FormData(s.currentTarget).get("address");typeof d=="string"&&o(d)},class:"flex gap-1 p-2.5",children:[u("div",{class:"group relative flex-1",children:[u("input",{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||"Type and search for places...",defaultValue:i}),u("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[u("circle",{cx:"7",cy:"7",r:"4"}),u("path",{d:"M10 10L13 13"})]}),u("span",{class:"sr-only",children:"Search"})]})})]}),e.config.optional&&u(ct,{class:"",onClick:t})]}),u("ul",{children:[r.map(s=>u("li",{children:u("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:[u("span",{class:"flex-grow",children:s.label}),u("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:u("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),u("li",{children:u("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(to.value)},children:u("span",{class:"flex-grow",children:to.label})})},to.label)]})]})},cv={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},ro=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const i=F(null);fe(()=>{if(i.current){const a=i.current.querySelector("input");a&&(a.focus(),a.select())}},[]);const o=Object.keys(Jn);return u("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:a=>{const s=new FormData(a.currentTarget),l=Object.fromEntries(s.entries());t({type:"address",value:l})},children:[u("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:i,children:Mr.map((a,s)=>{const l=`isdk_${a}`,d=n.config.keys[a];return d?u(Y,{children:[u("label",{for:l,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:cv[a]}),u("div",{class:"flex flex-col items-stretch gap-1.5",children:[a==="country"?u("div",{class:"relative",children:[u("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:d,id:l,defaultValue:e[a],required:!0,children:[e.country&&!o.includes(e.country)?u("option",{value:e[a],children:e[a]}):u("option",{value:"",children:"Select a country"}),o.map(f=>u("option",{value:f,children:f},f))]}),u("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:u("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):u("input",{autoFocus:s===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:d,id:l,defaultValue:e[a],required:!0}),s!==Mr.length-1&&u("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),s===Mr.length-1&&u("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),u("div",{class:"flex w-full flex-1 ",children:[u("div",{class:"flex-grow",children:r}),u(lt,{class:"flex items-center justify-center"})]})]})},no=()=>{const e=F(null);return j(()=>{var t;(t=e.current)==null||t.focus()},[]),e},ns=["true","false"],uv=Nd(ns),dv="answer",os="flex items-center gap-2 p-2.5",is=ne(({label:e,...t},r)=>u("button",{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 w-full overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:u("p",{class:"truncate text-center text-base",children:e})})),fv=({input:e,onSubmitSuccess:t})=>{const r=no();return u("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=ch(n).value,o=sr(uv,i);t({type:"boolean",value:o==="true"})},children:[u("ul",{class:os,children:ns.map((n,i)=>u("li",{class:"flex-1",children:u(is,{ref:i===0?r:null,type:"submit",name:dv,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&u("div",{class:"px-2 pb-2",children:u(ct,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Yt=({error:e})=>!e||!e.message?null:u("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[u("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),u("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),u("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),u("p",{class:"truncate pr-1 text-sm",children:e.message})]}),pv=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}),hv=e=>e.reduce((t,r)=>t+r.sizeKb,0),vv=Ht("file"),as=3,mv=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return u("div",{class:ot("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[u("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[u("span",{class:"block truncate",children:i}),u("span",{children:[".",n]})]}),u("p",{"aria-label":"File size",class:"text-accent-11",children:Ut(e.sizeKb)})]})},ss=({class:e,...t})=>u("li",{class:ot("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),ls=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},gv=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(ls(n.name).toLowerCase()))},bv=(e,t)=>{const r=ls(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},yv=({input:e,onSubmitSuccess:t})=>{var f;const r=(f=I.current$.value.flow)==null?void 0:f.data.submissions[e.key],[n,i]=W(vv(r)?r.value:[]),[o,a]=W(),s=n.length-as,l=hv(n),d=no();return u("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&&!gv({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 ${Ut(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:[u("div",{class:"flex items-center gap-2",children:[u("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?u(Y,{children:[u("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,as).map(c=>{const h=c.name.split(".").pop(),g=c.name.replace(new RegExp(`.${h}$`),"");return u(ss,{class:"flex overflow-hidden",children:[u("span",{class:"block truncate",children:g}),u("span",{children:[".",h]})]})}),s>0?u(ss,{children:["+",s," file",s!==1?"s":""]}):null]}),u("p",{class:"text-neutral-11 text-xs",children:[Ut(l)," ",n.length>1?"total":""]})]}):u("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[u("header",{class:"flex flex-col items-center gap-0",children:[u("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:u("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"})}),u("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?u("p",{class:"text-neutral-10 text-xs",children:["(max ",Ut(e.config.fileSizeLimitKib),")"]}):null]}),u("aside",{class:"flex flex-col items-center gap-2",children:[u("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),u("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>u("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(".","")}))})]})]}),u("input",{id:"dropzone-file",onInput:async c=>{$e(c.target instanceof HTMLInputElement);const h=c.target.files?Array.from(c.target.files):[],g=await Promise.allSettled(h.map(async v=>{const w=await pv(v);return{name:bv(v.name,42),data:w,sizeKb:v.size/1e3}}));if(g.some(({status:v})=>v==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=g.map(v=>v.status==="fulfilled"?v.value:null).filter(Boolean);i(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),u("div",{class:"flex h-full flex-col items-center gap-2",children:[u(lt,{disabled:n.length===0}),e.config.optional&&u(ct,{onClick:()=>t(null)})]})]}),u(Yt,{error:o})]})};var Xt=e=>e.type==="checkbox",Ot=e=>e instanceof Date,ue=e=>e==null;const cs=e=>typeof e=="object";var te=e=>!ue(e)&&!Array.isArray(e)&&cs(e)&&!Ot(e),wv=e=>te(e)&&e.target?Xt(e.target)?e.target.checked:e.target.value:e,_v=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,xv=(e,t)=>e.has(_v(t)),kv=e=>{const t=e.constructor&&e.constructor.prototype;return te(t)&&t.hasOwnProperty("isPrototypeOf")},oo=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(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(!(oo&&(e instanceof Blob||e instanceof FileList))&&(r||te(e)))if(t=r?[]:{},!r&&!kv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=je(e[n]));else return e;return t}var Zt=e=>Array.isArray(e)?e.filter(Boolean):[],Q=e=>e===void 0,C=(e,t,r)=>{if(!t||!te(e))return r;const n=Zt(t.split(/[,[\].]+?/)).reduce((i,o)=>ue(i)?i:i[o],e);return Q(n)||n===e?Q(e[t])?r:e[t]:n},Ze=e=>typeof e=="boolean";const us={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Se={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ve={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ke.createContext(null);var $v=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Se.all&&(t._proxyFormState[a]=!n||Se.all),r&&(r[a]=!0),e[a]}});return i},we=e=>te(e)&&!Object.keys(e).length,Sv=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return we(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||Se.all))},io=e=>Array.isArray(e)?e:[e];function Cv(e){const t=ke.useRef(e);t.current=e,ke.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",Ev=(e,t,r,n,i)=>Pe(e)?(n&&t.watch.add(e),C(r,e,i)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),C(r,o))):(n&&(t.watchAll=!0),r),ao=e=>/^\w*$/.test(e),ds=e=>Zt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function U(e,t,r){let n=-1;const i=ao(t)?[t]:ds(t),o=i.length,a=o-1;for(;++n<o;){const s=i[n];let l=r;if(n!==a){const d=e[s];l=te(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var fs=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},ps=e=>({isOnSubmit:!e||e===Se.onSubmit,isOnBlur:e===Se.onBlur,isOnChange:e===Se.onChange,isOnAll:e===Se.all,isOnTouch:e===Se.onTouched}),hs=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Fr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const o=C(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else te(s)&&Fr(s,t)}}};var Ov=(e,t,r)=>{const n=Zt(C(e,r));return U(n,"root",t[r]),U(e,r,n),e},so=e=>e.type==="file",Qe=e=>typeof e=="function",Lr=e=>{if(!oo)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Rr=e=>Pe(e),lo=e=>e.type==="radio",jr=e=>e instanceof RegExp;const vs={value:!1,isValid:!1},ms={value:!0,isValid:!0};var gs=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&&!Q(e[0].attributes.value)?Q(e[0].value)||e[0].value===""?ms:{value:e[0].value,isValid:!0}:ms:vs}return vs};const bs={isValid:!1,value:null};var ys=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,bs):bs;function ws(e,t,r="validate"){if(Rr(e)||Array.isArray(e)&&e.every(Rr)||Ze(e)&&!e)return{type:r,message:Rr(e)?e:"",ref:t}}var Tt=e=>te(e)&&!jr(e)?e:{value:e,message:""},_s=async(e,t,r,n,i)=>{const{ref:o,refs:a,required:s,maxLength:l,minLength:d,min:f,max:c,pattern:h,validate:g,name:m,valueAsNumber:v,mount:w,disabled:x}=e._f,_=C(t,m);if(!w||x)return{};const O=a?a[0]:o,P=V=>{n&&O.reportValidity&&(O.setCustomValidity(Ze(V)?"":V||""),O.reportValidity())},T={},H=lo(o),K=Xt(o),D=H||K,M=(v||so(o))&&Q(o.value)&&Q(_)||Lr(o)&&o.value===""||_===""||Array.isArray(_)&&!_.length,se=fs.bind(null,m,r,T),re=(V,L,J,ve=Ve.maxLength,_e=Ve.minLength)=>{const Ae=V?L:J;T[m]={type:V?ve:_e,message:Ae,ref:o,...se(V?ve:_e,Ae)}};if(i?!Array.isArray(_)||!_.length:s&&(!D&&(M||ue(_))||Ze(_)&&!_||K&&!gs(a).isValid||H&&!ys(a).isValid)){const{value:V,message:L}=Rr(s)?{value:!!s,message:s}:Tt(s);if(V&&(T[m]={type:Ve.required,message:L,ref:O,...se(Ve.required,L)},!r))return P(L),T}if(!M&&(!ue(f)||!ue(c))){let V,L;const J=Tt(c),ve=Tt(f);if(!ue(_)&&!isNaN(_)){const _e=o.valueAsNumber||_&&+_;ue(J.value)||(V=_e>J.value),ue(ve.value)||(L=_e<ve.value)}else{const _e=o.valueAsDate||new Date(_),Ae=qr=>new Date(new Date().toDateString()+" "+qr),dt=o.type=="time",Jt=o.type=="week";Pe(J.value)&&_&&(V=dt?Ae(_)>Ae(J.value):Jt?_>J.value:_e>new Date(J.value)),Pe(ve.value)&&_&&(L=dt?Ae(_)<Ae(ve.value):Jt?_<ve.value:_e<new Date(ve.value))}if((V||L)&&(re(!!V,J.message,ve.message,Ve.max,Ve.min),!r))return P(T[m].message),T}if((l||d)&&!M&&(Pe(_)||i&&Array.isArray(_))){const V=Tt(l),L=Tt(d),J=!ue(V.value)&&_.length>+V.value,ve=!ue(L.value)&&_.length<+L.value;if((J||ve)&&(re(J,V.message,L.message),!r))return P(T[m].message),T}if(h&&!M&&Pe(_)){const{value:V,message:L}=Tt(h);if(jr(V)&&!_.match(V)&&(T[m]={type:Ve.pattern,message:L,ref:o,...se(Ve.pattern,L)},!r))return P(L),T}if(g){if(Qe(g)){const V=await g(_,t),L=ws(V,O);if(L&&(T[m]={...L,...se(Ve.validate,L.message)},!r))return P(L.message),T}else if(te(g)){let V={};for(const L in g){if(!we(V)&&!r)break;const J=ws(await g[L](_,t),O,L);J&&(V={...J,...se(L,J.message)},P(J.message),r&&(T[m]=V))}if(!we(V)&&(T[m]={ref:O,...V},!r))return T}}return P(!0),T};function Tv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Q(e)?n++:e[t[n++]];return e}function Pv(e){for(const t in e)if(e.hasOwnProperty(t)&&!Q(e[t]))return!1;return!0}function ae(e,t){const r=Array.isArray(t)?t:ao(t)?[t]:ds(t),n=r.length===1?e:Tv(e,r),i=r.length-1,o=r[i];return n&&delete n[o],i!==0&&(te(n)&&we(n)||Array.isArray(n)&&Pv(n))&&ae(e,r.slice(0,-1)),e}function co(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Vr=e=>ue(e)||!cs(e);function ut(e,t){if(Vr(e)||Vr(t))return e===t;if(Ot(e)&&Ot(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const o=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const a=t[i];if(Ot(o)&&Ot(a)||te(o)&&te(a)||Array.isArray(o)&&Array.isArray(a)?!ut(o,a):o!==a)return!1}}return!0}var xs=e=>e.type==="select-multiple",Av=e=>lo(e)||Xt(e),uo=e=>Lr(e)&&e.isConnected,ks=e=>{for(const t in e)if(Qe(e[t]))return!0;return!1};function Br(e,t={}){const r=Array.isArray(e);if(te(e)||r)for(const n in e)Array.isArray(e[n])||te(e[n])&&!ks(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Br(e[n],t[n])):ue(e[n])||(t[n]=!0);return t}function $s(e,t,r){const n=Array.isArray(e);if(te(e)||n)for(const i in e)Array.isArray(e[i])||te(e[i])&&!ks(e[i])?Q(t)||Vr(r[i])?r[i]=Array.isArray(e[i])?Br(e[i],[]):{...Br(e[i])}:$s(e[i],ue(t)?{}:t[i],r[i]):r[i]=!ut(e[i],t[i]);return r}var fo=(e,t)=>$s(e,t,Br(t)),Ss=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Q(e)?e:t?e===""?NaN:e&&+e:r&&Pe(e)?new Date(e):n?n(e):e;function po(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return so(t)?t.files:lo(t)?ys(e.refs).value:xs(t)?[...t.selectedOptions].map(({value:r})=>r):Xt(t)?gs(e.refs).value:Ss(Q(t.value)?e.ref.value:t.value,e)}var Iv=(e,t,r,n)=>{const i={};for(const o of e){const a=C(t,o);a&&U(i,o,a._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Qt=e=>Q(e)?e:jr(e)?e.source:te(e)?jr(e.value)?e.value.source:e.value:e,Nv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Cs(e,t,r){const n=C(e,r);if(n||ao(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const o=i.join("."),a=C(t,o),s=C(e,o);if(a&&!Array.isArray(a)&&r!==o)return{name:r};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:r}}var Dv=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Mv=(e,t)=>!Zt(C(e,t)).length&&ae(e,t);const Fv={mode:Se.onSubmit,reValidateMode:Se.onChange,shouldFocusError:!0};function Lv(e={},t){let r={...Fv,...e},n={submitCount:0,isDirty:!1,isLoading:Qe(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=te(r.defaultValues)||te(r.values)?je(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:je(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:co(),array:co(),state:co()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,m=ps(r.mode),v=ps(r.reValidateMode),w=r.criteriaMode===Se.all,x=p=>b=>{clearTimeout(f),f=setTimeout(p,b)},_=async p=>{if(c.isValid||p){const b=r.resolver?we((await M()).errors):await re(i,!0);b!==n.isValid&&h.state.next({isValid:b})}},O=p=>c.isValidating&&h.state.next({isValidating:p}),P=(p,b=[],y,E,$=!0,k=!0)=>{if(E&&y){if(s.action=!0,k&&Array.isArray(C(i,p))){const A=y(C(i,p),E.argA,E.argB);$&&U(i,p,A)}if(k&&Array.isArray(C(n.errors,p))){const A=y(C(n.errors,p),E.argA,E.argB);$&&U(n.errors,p,A),Mv(n.errors,p)}if(c.touchedFields&&k&&Array.isArray(C(n.touchedFields,p))){const A=y(C(n.touchedFields,p),E.argA,E.argB);$&&U(n.touchedFields,p,A)}c.dirtyFields&&(n.dirtyFields=fo(o,a)),h.state.next({name:p,isDirty:L(p,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else U(a,p,b)},T=(p,b)=>{U(n.errors,p,b),h.state.next({errors:n.errors})},H=(p,b,y,E)=>{const $=C(i,p);if($){const k=C(a,p,Q(y)?C(o,p):y);Q(k)||E&&E.defaultChecked||b?U(a,p,b?k:po($._f)):_e(p,k),s.mount&&_()}},K=(p,b,y,E,$)=>{let k=!1,A=!1;const q={name:p};if(!y||E){c.isDirty&&(A=n.isDirty,n.isDirty=q.isDirty=L(),k=A!==q.isDirty);const ee=ut(C(o,p),b);A=C(n.dirtyFields,p),ee?ae(n.dirtyFields,p):U(n.dirtyFields,p,!0),q.dirtyFields=n.dirtyFields,k=k||c.dirtyFields&&A!==!ee}if(y){const ee=C(n.touchedFields,p);ee||(U(n.touchedFields,p,y),q.touchedFields=n.touchedFields,k=k||c.touchedFields&&ee!==y)}return k&&$&&h.state.next(q),k?q:{}},D=(p,b,y,E)=>{const $=C(n.errors,p),k=c.isValid&&Ze(b)&&n.isValid!==b;if(e.delayError&&y?(d=x(()=>T(p,y)),d(e.delayError)):(clearTimeout(f),d=null,y?U(n.errors,p,y):ae(n.errors,p)),(y?!ut($,y):$)||!we(E)||k){const A={...E,...k&&Ze(b)?{isValid:b}:{},errors:n.errors,name:p};n={...n,...A},h.state.next(A)}O(!1)},M=async p=>r.resolver(a,r.context,Iv(p||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),se=async p=>{const{errors:b}=await M(p);if(p)for(const y of p){const E=C(b,y);E?U(n.errors,y,E):ae(n.errors,y)}else n.errors=b;return b},re=async(p,b,y={valid:!0})=>{for(const E in p){const $=p[E];if($){const{_f:k,...A}=$;if(k){const q=l.array.has(k.name),ee=await _s($,a,w,r.shouldUseNativeValidation&&!b,q);if(ee[k.name]&&(y.valid=!1,b))break;!b&&(C(ee,k.name)?q?Ov(n.errors,ee,k.name):U(n.errors,k.name,ee[k.name]):ae(n.errors,k.name))}A&&await re(A,b,y)}}return y.valid},V=()=>{for(const p of l.unMount){const b=C(i,p);b&&(b._f.refs?b._f.refs.every(y=>!uo(y)):!uo(b._f.ref))&&bo(p)}l.unMount=new Set},L=(p,b)=>(p&&b&&U(a,p,b),!ut(Ms(),o)),J=(p,b,y)=>Ev(p,l,{...s.mount?a:Q(b)?o:Pe(p)?{[p]:b}:b},y,b),ve=p=>Zt(C(s.mount?a:o,p,e.shouldUnregister?C(o,p,[]):[])),_e=(p,b,y={})=>{const E=C(i,p);let $=b;if(E){const k=E._f;k&&(!k.disabled&&U(a,p,Ss(b,k)),$=Lr(k.ref)&&ue(b)?"":b,xs(k.ref)?[...k.ref.options].forEach(A=>A.selected=$.includes(A.value)):k.refs?Xt(k.ref)?k.refs.length>1?k.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(q=>q===A.value):$===A.value)):k.refs[0]&&(k.refs[0].checked=!!$):k.refs.forEach(A=>A.checked=A.value===$):so(k.ref)?k.ref.value="":(k.ref.value=$,k.ref.type||h.values.next({name:p,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&K(p,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&go(p)},Ae=(p,b,y)=>{for(const E in b){const $=b[E],k=`${p}.${E}`,A=C(i,k);(l.array.has(p)||!Vr($)||A&&!A._f)&&!Ot($)?Ae(k,$,y):_e(k,$,y)}},dt=(p,b,y={})=>{const E=C(i,p),$=l.array.has(p),k=je(b);U(a,p,k),$?(h.array.next({name:p,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&h.state.next({name:p,dirtyFields:fo(o,a),isDirty:L(p,k)})):E&&!E._f&&!ue(k)?Ae(p,k,y):_e(p,k,y),hs(p,l)&&h.state.next({...n}),h.values.next({name:p,values:{...a}}),!s.mount&&t()},Jt=async p=>{const b=p.target;let y=b.name,E=!0;const $=C(i,y),k=()=>b.type?po($._f):wv(p),A=q=>{E=Number.isNaN(q)||q===C(a,y,q)};if($){let q,ee;const Kr=k(),Pt=p.type===us.BLUR||p.type===us.FOCUS_OUT,Im=!Nv($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||Dv(Pt,C(n.touchedFields,y),n.isSubmitted,v,m),wo=hs(y,l,Pt);U(a,y,Kr),Pt?($._f.onBlur&&$._f.onBlur(p),d&&d(0)):$._f.onChange&&$._f.onChange(p);const _o=K(y,Kr,Pt,!1),Nm=!we(_o)||wo;if(!Pt&&h.values.next({name:y,type:p.type,values:{...a}}),Im)return c.isValid&&_(),Nm&&h.state.next({name:y,...wo?{}:_o});if(!Pt&&wo&&h.state.next({...n}),O(!0),r.resolver){const{errors:Us}=await M([y]);if(A(Kr),E){const Dm=Cs(n.errors,i,y),Hs=Cs(Us,i,Dm.name||y);q=Hs.error,y=Hs.name,ee=we(Us)}}else q=(await _s($,a,w,r.shouldUseNativeValidation))[y],A(Kr),E&&(q?ee=!1:c.isValid&&(ee=await re(i,!0)));E&&($._f.deps&&go($._f.deps),D(y,ee,q,_o))}},qr=(p,b)=>{if(C(n.errors,b)&&p.focus)return p.focus(),1},go=async(p,b={})=>{let y,E;const $=io(p);if(O(!0),r.resolver){const k=await se(Q(p)?p:$);y=we(k),E=p?!$.some(A=>C(k,A)):y}else p?(E=(await Promise.all($.map(async k=>{const A=C(i,k);return await re(A&&A._f?{[k]:A}:A)}))).every(Boolean),!(!E&&!n.isValid)&&_()):E=y=await re(i);return h.state.next({...!Pe(p)||c.isValid&&y!==n.isValid?{}:{name:p},...r.resolver||!p?{isValid:y}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!E&&Fr(i,qr,p?$:l.mount),E},Ms=p=>{const b={...o,...s.mount?a:{}};return Q(p)?b:Pe(p)?C(b,p):p.map(y=>C(b,y))},Fs=(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)}),Om=p=>{p&&io(p).forEach(b=>ae(n.errors,b)),h.state.next({errors:p?n.errors:{}})},Ls=(p,b,y)=>{const E=(C(i,p,{_f:{}})._f||{}).ref;U(n.errors,p,{...b,ref:E}),h.state.next({name:p,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},Tm=(p,b)=>Qe(p)?h.values.subscribe({next:y=>p(J(void 0,b),y)}):J(p,b,!0),bo=(p,b={})=>{for(const y of p?io(p):l.mount)l.mount.delete(y),l.array.delete(y),b.keepValue||(ae(i,y),ae(a,y)),!b.keepError&&ae(n.errors,y),!b.keepDirty&&ae(n.dirtyFields,y),!b.keepTouched&&ae(n.touchedFields,y),!r.shouldUnregister&&!b.keepDefaultValue&&ae(o,y);h.values.next({values:{...a}}),h.state.next({...n,...b.keepDirty?{isDirty:L()}:{}}),!b.keepIsValid&&_()},Rs=({disabled:p,name:b,field:y,fields:E,value:$})=>{if(Ze(p)){const k=p?void 0:Q($)?po(y?y._f:C(E,b)._f):$;U(a,b,k),K(b,k,!1,!1,!0)}},yo=(p,b={})=>{let y=C(i,p);const E=Ze(b.disabled);return U(i,p,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:p}},name:p,mount:!0,...b}}),l.mount.add(p),y?Rs({field:y,disabled:b.disabled,name:p}):H(p,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Qt(b.min),max:Qt(b.max),minLength:Qt(b.minLength),maxLength:Qt(b.maxLength),pattern:Qt(b.pattern)}:{},name:p,onChange:Jt,onBlur:Jt,ref:$=>{if($){yo(p,b),y=C(i,p);const k=Q($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=Av(k),q=y._f.refs||[];if(A?q.find(ee=>ee===k):k===y._f.ref)return;U(i,p,{_f:{...y._f,...A?{refs:[...q.filter(uo),k,...Array.isArray(C(o,p))?[{}]:[]],ref:{type:k.type,name:p}}:{ref:k}}}),H(p,!1,void 0,k)}else y=C(i,p,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(xv(l.array,p)&&s.action)&&l.unMount.add(p)}}},js=()=>r.shouldFocusError&&Fr(i,qr,l.mount),Pm=p=>{Ze(p)&&(h.state.next({disabled:p}),Fr(i,b=>{b.disabled=p},0,!1))},Vs=(p,b)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=je(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:k}=await M();n.errors=$,E=k}else await re(i);ae(n.errors,"root"),we(n.errors)?(h.state.next({errors:{}}),await p(E,y)):(b&&await b({...n.errors},y),js(),setTimeout(js)),h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:we(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Am=(p,b={})=>{C(i,p)&&(Q(b.defaultValue)?dt(p,C(o,p)):(dt(p,b.defaultValue),U(o,p,b.defaultValue)),b.keepTouched||ae(n.touchedFields,p),b.keepDirty||(ae(n.dirtyFields,p),n.isDirty=b.defaultValue?L(p,C(o,p)):L()),b.keepError||(ae(n.errors,p),c.isValid&&_()),h.state.next({...n}))},Bs=(p,b={})=>{const y=p?je(p):o,E=je(y),$=p&&!we(p)?E:o;if(b.keepDefaultValues||(o=y),!b.keepValues){if(b.keepDirtyValues||g)for(const k of l.mount)C(n.dirtyFields,k)?U($,k,C(a,k)):dt(k,C($,k));else{if(oo&&Q(p))for(const k of l.mount){const A=C(i,k);if(A&&A._f){const q=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Lr(q)){const ee=q.closest("form");if(ee){ee.reset();break}}}}i={}}a=e.shouldUnregister?b.keepDefaultValues?je(o):{}:je($),h.array.next({values:{...$}}),h.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,h.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!ut(p,o)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&p?fo(o,p):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},zs=(p,b)=>Bs(Qe(p)?p(a):p,b);return{control:{register:yo,unregister:bo,getFieldState:Fs,handleSubmit:Vs,setError:Ls,_executeSchema:M,_getWatch:J,_getDirty:L,_updateValid:_,_removeUnmounted:V,_updateFieldArray:P,_updateDisabledField:Rs,_getFieldArray:ve,_reset:Bs,_resetDefaultValues:()=>Qe(r.defaultValues)&&r.defaultValues().then(p=>{zs(p,r.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:p=>{n={...n,...p}},_disableForm:Pm,_subjects:h,_proxyFormState:c,get _fields(){return i},get _formValues(){return a},get _state(){return s},set _state(p){s=p},get _defaultValues(){return o},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:go,register:yo,handleSubmit:Vs,watch:Tm,setValue:dt,getValues:Ms,reset:zs,resetField:Am,clearErrors:Om,unregister:bo,setError:Ls,setFocus:(p,b={})=>{const y=C(i,p),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),b.shouldSelect&&$.select())}},getFieldState:Fs}}function zr(e={}){const t=ke.useRef(),r=ke.useRef(),[n,i]=ke.useState({isDirty:!1,isValidating:!1,isLoading:Qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Qe(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Lv(e,()=>i(a=>({...a}))),formState:n});const o=t.current.control;return o._options=e,Cv({subject:o._subjects.state,next:a=>{Sv(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),ke.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),ke.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==n.isDirty&&o._subjects.state.next({isDirty:a})}},[o,n.isDirty]),ke.useEffect(()=>{e.values&&!ut(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values):o._resetDefaultValues()},[e.values,o]),ke.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=$v(n,o),t.current}var Es=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Rv=function(e,t){var r=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Es(o.ref,i,e):o.refs&&o.refs.forEach(function(a){return Es(a,i,e)})};for(var n in t.fields)r(n)},jv=function(e,t){t.shouldUseNativeValidation&&Rv(e,t);var r={};for(var n in e){var i=C(t.fields,n),o=Object.assign(e[n]||{},{ref:i&&i.ref});if(Bv(t.names||Object.keys(e),n)){var a=Object.assign({},Vv(C(r,n)));U(a,"root",o),U(r,n,a)}else U(r,n,o)}return r},Vv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Bv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},zv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var i=n.path.map(function(s){return s.key}).join(".");if(r[i]||(r[i]={message:n.message,type:n.validation}),t){var o=r[i].types,a=o&&o[n.validation];r[i]=fs(i,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},Ur=function(e,t,r){return r===void 0&&(r={}),function(n,i,o){try{return Promise.resolve(function(a,s){try{var l=function(){function d(c){return{values:r.raw?n:c,errors:{}}}var f=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?d(sr(e,n,f)):Promise.resolve(Ld(e,n,f)).then(d)}()}catch(d){return s(d)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof nn)return{values:{},errors:jv(zv(a,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}};const Os=27,Ts=12,Ps=10,Uv=Ht("enum"),Hv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Ur(Ce({checked:si(ai(oi()),r=>Object.entries(r).filter(([n,i])=>i).map(([n,i])=>n),[lr(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),cr(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},qv=ne(({option:e,...t},r)=>u(Y,{children:[u("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),u("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:t.id,children:e.label})]})),As=$r("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:os}}}),Kv=({input:e,onSubmitSuccess:t})=>{var d,f;const r=e.key?(d=I.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,i=n&&e.config.options.length===2,{register:o,handleSubmit:a,formState:{errors:s}}=zr({defaultValues:{checked:n?{}:Uv(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:Hv(e.config)}),l=no();return i?u("ul",{style:{maxHeight:6.5*Os+5*Ts+2*Ps},class:As({variant:"booleanLike"}),children:e.config.options.map((c,h)=>u("li",{class:"flex-1",children:u(is,{type:"submit",ref:g=>{g&&h===0&&(l.current=g)},label:c.label,value:"true",onClick:()=>t({type:"enum",value:[c.value]})})},c.value))}):u("form",{noValidate:!0,onSubmit:c=>a(h=>{const g=h.checked;t({type:"enum",value:g})})(c),children:[u("div",{class:"flex items-center gap-1",children:[u("ul",{style:{maxHeight:6.5*Os+5*Ts+2*Ps},class:As({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((c,h)=>{const g=`checked.${c.value}`,{ref:m,...v}=o(g);return u("li",{class:"relative",children:u(qv,{option:c,autoFocus:h===0,ref:w=>{w&&h===0&&(l.current=w),m(w)},id:g,...v,onClick:n?()=>t({type:"enum",value:[c.value]}):void 0})},c.value)})}),u("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:u(lt,{}),e.config.minSelected===0&&u(ct,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),u("div",{class:"px-1",children:u(Yt,{error:(f=s.checked)==null?void 0:f.root})})]})},Wv=Ht("number"),Hr={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`},Gv=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Ur(Ce({number:on(Hr.number(),[zd(t,Hr.min(t)),Bd(r,Hr.max(r)),jd(i=>i===Number(i.toFixed(n)),Hr.decimalCases(n))])}))},Yv=({input:e,onSubmitSuccess:t})=>{var f;const r=e.config.defaultValue,n=e.key?(f=I.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,{register:i,handleSubmit:o,formState:{errors:a}}=zr({defaultValues:{number:r?Number(r):Wv(n)?n.value:void 0},resolver:Gv(e.config)}),{ref:s,...l}=i("number",{required:!e.config.optional,valueAsNumber:!0}),d=F();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-grow",children:[u("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.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&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Yt,{error:a.number})]})},Is=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(Jn).find(i=>e.startsWith(i[1])),r=t?t[1]:"",n=e.replace(r,"");return/^\d+$/.test(n)?{countryCode:r,phoneNumber:n}:{countryCode:"",phoneNumber:""}},Xv="44",ho="That doesn’t look like a valid phone number",Ns=e=>({min:`The phone number needs to be at least ${e.minChars} digits long.`,max:`The phone number can't be longer than ${e.maxChars} digits.`}),Zv=Ht("string"),Qv=xe(ho,[li(/^\+?[0-9 -]+$/,ho)]),Jv=xe("Please select a country code",[li(/^\+?[0-9 -]+$/,ho)]),em=()=>Ur(Ce({countryCode:Jv,phoneNumber:si(Qv,e=>e.replace(/[^0-9]/g,""),[])})),tm=({input:e,onSubmitSuccess:t})=>{var g;const r=e.key?(g=I.current$.value.flow)==null?void 0:g.data.submissions[e.key]:void 0,[n,i]=W(),{register:o,handleSubmit:a,formState:{errors:s},watch:l}=zr({defaultValues:e.config.defaultValue?Is(e.config.defaultValue):Zv(r)?Is(r.value):{countryCode:Xv,phoneNumber:""},resolver:em()}),{ref:d,...f}=o("phoneNumber",{required:!e.config.optional}),c=F(),h=l("countryCode");return fe(()=>{c.current&&(c.current.focus(),c.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:a(m=>{const v=m.phoneNumber.replace(/[^0-9]/g,""),w=m.countryCode.replace(/[^0-9]/g,"");if(i(void 0),v.length+w.length>(e.config.maxChars||1/0))return i(Ns(e.config).max);if(v.length+w.length<(e.config.minChars||0))return i(Ns(e.config).min);t({type:"string",value:h+m.phoneNumber})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[u("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[u("span",{children:["+",h]}),u("select",{...o("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Jn).map(([m,v])=>u("option",{value:v,children:[m," (+",v,")"]},m))})]}),u("input",{...f,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:m=>{m&&(c.current=m),d(m)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest flex-1 rounded-r-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Yt,{error:s.countryCode||s.phoneNumber||{message:n}})]})},rm=({input:e,onSubmitSuccess:t})=>u("div",{class:"flex flex-col items-center py-3",children:u("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:u("span",{class:"flex items-center gap-1.5",children:[u("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),u("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:[u("path",{d:"M4 8L8 4L12 8"}),u("path",{d:"M8 4V13"})]})]})})}),vo={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"},nm={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},om=Ht("string"),im=e=>{const t={maxLength:`Please enter no more than ${e.maxChars??999} characters`,minLength:`Please enter ${e.minChars??1} or more characters`};return Ur(Ce({text:{email:xe(vo.email,[Vd(vo.email),cr(e.minChars??1,t.minLength),lr(e.maxChars??1/0,t.maxLength)]),text:xe([cr(e.minChars??1,t.minLength),lr(e.maxChars??1/0,t.maxLength)]),url:xe([Ud(vo.url),cr(e.minChars??1,t.minLength),lr(e.maxChars??1/0,t.maxLength)])}[e.format]}))},am=({input:e,onSubmitSuccess:t})=>{var f;const r=e.key?(f=I.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:i,handleSubmit:o,formState:{errors:a}}=zr({defaultValues:{text:n||(om(r)?r.value:"")},resolver:im(e.config)}),{ref:s,...l}=i("text",{required:!e.config.optional}),d=F();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(c=>{t({type:"string",value:c.text})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-1",children:[u("input",{id:"chat-input",...l,...nm[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.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&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Yt,{error:a.text})]})},sm=()=>{var i;const e=(i=I.current$.value.flow)==null?void 0:i.data.currentInput,[t,r]=Zh(),n=F(null);return I.inputHeight$.value=r.height,j(()=>{const o=n.current;if(o)return o.addEventListener("transitionstart",X.scrollToEnd.smooth),o.addEventListener("transitioncancel",X.scrollToEnd.smooth),o.addEventListener("transitionend",X.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",X.scrollToEnd.smooth),o.removeEventListener("transitioncancel",X.scrollToEnd.smooth),o.removeEventListener("transitionend",X.scrollToEnd.smooth)}},[]),u("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:u("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:Re({input:e}).with({input:B.nullish},()=>u("div",{class:"flex items-center gap-2 p-2.5",children:[u("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}),u(lt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},o=>u(am,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"phone"}},o=>u(tm,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"multiple-choice"}},o=>u(Kv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"boolean"}},o=>u(fv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"file"}},o=>u(yv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"submit"}},o=>u(rm,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"address"}},o=>u(sv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"number"}},o=>u(Yv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).exhaustive()})})};var lm=function(e){return e instanceof RegExp},cm=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Ds=function(e){return typeof e=="string"},um=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function dm(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!Ds(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;lm(o)||(o=new RegExp("("+cm(o)+")","gi"));for(var a=e.split(o),s=1,l=a.length;s<l;s+=2){if(a[s]===void 0||a[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=a[s].length,n+=a[s-1].length,a[s]=r(a[s],s,n),n+=i}return a}var fm=function(t,r,n){return Array.isArray(t)||(t=[t]),um(t.map(function(i){return Ds(i)?dm(i,r,n):i}))};const mo=Ie(fm),pm=/(https?:\/\/[^\s]+)/g,hm=/_(.*?)_/g,vm=/\*\*(.*?)\*\*/g,mm=e=>{const t=mo(e,pm,(i,o)=>u("a",{class:"text-accent-10 hover:text-accent-11 no-underline",href:i,children:i},i+o)),r=mo(t,hm,(i,o)=>u("em",{children:i},i+o));return mo(r,vm,(i,o)=>u("strong",{children:i},i+o))},gm=$r("select-text 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"}}),bm=({children:e,className:t,animate:r,side:n,...i})=>u("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:gm({className:t,side:n,animate:r}),...i,children:e}),ym=({message:e})=>u("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:u("a",{onClick:e.onClick,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:e.href,children:[e.text,u("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("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"})})]})}),wm=({className:e,...t})=>(j(()=>{X.scrollToEnd.smooth()}),u("div",{"aria-hidden":!0,children:X.isBotTyping$.value===!0?u("div",{"aria-label":"Typing…",class:ot("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>u("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),_m={bot:"left",user:"right"},xm=$r("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]"}}}),km=({lastSentMessageFooter:e})=>{var r;const t=((r=I.current$.value.flow)==null?void 0:r.data.messages)??[];return j(()=>{X.scrollToEnd.smooth()},[t.length]),u("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,i)=>u(Y,{children:u("li",{class:"flex",children:Re(n).with({type:"system"},o=>u("p",{class:xm({variant:o.variant}),children:o.text})).with({type:"text",author:B.union("bot","user")},o=>{const a=o.author==="user"&&!t.slice(i+1).some(l=>l.type==="text"&&l.author==="user"),s=i===t.length-1;return u(bm,{animate:s,side:_m[o.author],children:[mm(o.text),a?e:null]},i)}).with({type:"link"},o=>u(ym,{message:o})).with({type:"image"},o=>u("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:o.url,style:{aspectRatio:o.width/o.height}})).with({type:"file"},o=>u(mv,{class:o.author==="bot"?void 0:"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).with({type:"loading"},o=>{const a=t[t.length-1];return!(o===a)||X.isBotTyping$.value?null:u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(Ka,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),u(wm,{},"typing")]})},$m=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=I.current$.value;$e(n,"Flow is required to exist to show chatbot body");const i=I.viewState$.value,{chatRef:o,chatService:a}=nv(),[s,l]=W();return fe(()=>{i==="maximised"&&X.scrollToEnd.instant()},[i]),fe(()=>{var v,w;const{state:d,flow:f}=I.current$.peek();if(d!=="loaded")throw new Error(xh.invalid_state);let c=f.data.nodeHistory.at(-1);if(X.scrollToEnd.instant(),I.setInput(void 0),f.data.isFinished)return;c===void 0?(c=Ba(n.nodes).id,I.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,job:n.job},customProperties:(v=n.analytics)==null?void 0:v.customProperties})):I.removeMessagesSentByNodeIds([c]);const{interpret:h,abort:g,undo:m}=Fh({context:n.context,analytics:{service:r,customProperties:(w=n.analytics)==null?void 0:w.customProperties},apiClient:t,logger:e,flow:n,chatService:a,getSubmissions:()=>{var x;return(x=I.current$.peek().flow)==null?void 0:x.data.submissions},onInterpret:(x,_)=>{var P;const O=I.current$.peek().flow;$e(O),_&&(O.data.sequence=O.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:_.id,flow_build:n.build,to_node_id:x.id,sequence:O.data.sequence,flow_session_id:O.data.flowSessionId,job:n.job},customProperties:(P=n.analytics)==null?void 0:P.customProperties})),I.setCurrentNodeId(x.id)},onFlowEnd:async()=>{var _;I.markAsFinished();const x=I.current$.peek().flow;$e(x),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:x.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(_=n.analytics)==null?void 0:_.customProperties})}});return l(()=>m),h(c),g},[r,t,a,e,n]),u(Y,{children:[u("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:I.inputHeight$.value},children:u(km,{lastSentMessageFooter:n.data.isFinished||!s?null:u(Cm,{undoFn:s})})}),u(sm,{})]})},Sm=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"):[],Cm=({undoFn:e})=>u("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:u("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}=I.current$.peek();$e(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(I.removeMessagesSentByNodeIds(n),I.setInput(void 0),n.pop(),n.map(i=>t.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(Sm).forEach(i=>delete t.data.submissions[i]),I.current$.value={...I.current$.value})},children:"Undo"})}),Em=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:$m},Symbol.toStringTag,{value:"Module"}))})();