@inploi/plugin-chatbot 4.1.3 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +2 -2
- package/dist/chatbot-body-51ed15c6.cjs +1 -0
- package/dist/{chatbot-body-87199b8f.js → chatbot-body-c294edef.js} +187 -201
- package/dist/{index-6f98abfb.cjs → index-9944cf27.cjs} +1 -1
- package/dist/{index-c974e995.js → index-e35a0d9d.js} +1 -1
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +1 -1
- package/dist/chatbot-body-0b71f113.cjs +0 -1
package/cdn/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var _p=Object.defineProperty;var yp=(Wt,gt,Tt)=>gt in Wt?_p(Wt,gt,{enumerable:!0,configurable:!0,writable:!0,value:Tt}):Wt[gt]=Tt;var xo=(Wt,gt,Tt)=>(yp(Wt,typeof gt!="symbol"?gt+"":gt,Tt),Tt);(function(){"use strict";var Wt=t=>t,gt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ko=Array.isArray,Sr=ko,So=typeof gt=="object"&>&>.Object===Object&>,Co=So,$o=Co,Eo=typeof self=="object"&&self&&self.Object===Object&&self,Io=$o||Eo||Function("return this")(),Cr=Io,To=Cr,Ao=To.Symbol,$r=Ao,Ta=$r,Aa=Object.prototype,Mo=Aa.hasOwnProperty,No=Aa.toString,me=Ta?Ta.toStringTag:void 0;function Po(t){var e=Mo.call(t,me),r=t[me];try{t[me]=void 0;var a=!0}catch{}var n=No.call(t);return a&&(e?t[me]=r:delete t[me]),n}var Oo=Po,Fo=Object.prototype,Do=Fo.toString;function Lo(t){return Do.call(t)}var Vo=Lo,Ma=$r,jo=Oo,zo=Vo,Ro="[object Null]",Bo="[object Undefined]",Na=Ma?Ma.toStringTag:void 0;function Uo(t){return t==null?t===void 0?Bo:Ro:Na&&Na in Object(t)?jo(t):zo(t)}var Pa=Uo;function Ho(t){return t!=null&&typeof t=="object"}var qo=Ho,Ko=Pa,Go=qo,Wo="[object Symbol]";function Yo(t){return typeof t=="symbol"||Go(t)&&Ko(t)==Wo}var Er=Yo,Xo=Sr,Jo=Er,Zo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qo=/^\w*$/;function ts(t,e){if(Xo(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Jo(t)?!0:Qo.test(t)||!Zo.test(t)||e!=null&&t in Object(e)}var es=ts;function rs(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Oa=rs,as=Pa,ns=Oa,is="[object AsyncFunction]",os="[object Function]",ss="[object GeneratorFunction]",ls="[object Proxy]";function cs(t){if(!ns(t))return!1;var e=as(t);return e==os||e==ss||e==is||e==ls}var us=cs,ds=Cr,fs=ds["__core-js_shared__"],hs=fs,Ir=hs,Fa=function(){var t=/[^.]+$/.exec(Ir&&Ir.keys&&Ir.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ps(t){return!!Fa&&Fa in t}var gs=ps,bs=Function.prototype,vs=bs.toString;function ws(t){if(t!=null){try{return vs.call(t)}catch{}try{return t+""}catch{}}return""}var ms=ws,_s=us,ys=gs,xs=Oa,ks=ms,Ss=/[\\^$.*+?()[\]{}|]/g,Cs=/^\[object .+?Constructor\]$/,$s=Function.prototype,Es=Object.prototype,Is=$s.toString,Ts=Es.hasOwnProperty,As=RegExp("^"+Is.call(Ts).replace(Ss,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ms(t){if(!xs(t)||ys(t))return!1;var e=_s(t)?As:Cs;return e.test(ks(t))}var Ns=Ms;function Ps(t,e){return t==null?void 0:t[e]}var Os=Ps,Fs=Ns,Ds=Os;function Ls(t,e){var r=Ds(t,e);return Fs(r)?r:void 0}var Da=Ls,Vs=Da,js=Vs(Object,"create"),qe=js,La=qe;function zs(){this.__data__=La?La(null):{},this.size=0}var Rs=zs;function Bs(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Us=Bs,Hs=qe,qs="__lodash_hash_undefined__",Ks=Object.prototype,Gs=Ks.hasOwnProperty;function Ws(t){var e=this.__data__;if(Hs){var r=e[t];return r===qs?void 0:r}return Gs.call(e,t)?e[t]:void 0}var Ys=Ws,Xs=qe,Js=Object.prototype,Zs=Js.hasOwnProperty;function Qs(t){var e=this.__data__;return Xs?e[t]!==void 0:Zs.call(e,t)}var tl=Qs,el=qe,rl="__lodash_hash_undefined__";function al(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=el&&e===void 0?rl:e,this}var nl=al,il=Rs,ol=Us,sl=Ys,ll=tl,cl=nl;function ie(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}ie.prototype.clear=il,ie.prototype.delete=ol,ie.prototype.get=sl,ie.prototype.has=ll,ie.prototype.set=cl;var ul=ie;function dl(){this.__data__=[],this.size=0}var fl=dl;function hl(t,e){return t===e||t!==t&&e!==e}var pl=hl,gl=pl;function bl(t,e){for(var r=t.length;r--;)if(gl(t[r][0],e))return r;return-1}var Ke=bl,vl=Ke,wl=Array.prototype,ml=wl.splice;function _l(t){var e=this.__data__,r=vl(e,t);if(r<0)return!1;var a=e.length-1;return r==a?e.pop():ml.call(e,r,1),--this.size,!0}var yl=_l,xl=Ke;function kl(t){var e=this.__data__,r=xl(e,t);return r<0?void 0:e[r][1]}var Sl=kl,Cl=Ke;function $l(t){return Cl(this.__data__,t)>-1}var El=$l,Il=Ke;function Tl(t,e){var r=this.__data__,a=Il(r,t);return a<0?(++this.size,r.push([t,e])):r[a][1]=e,this}var Al=Tl,Ml=fl,Nl=yl,Pl=Sl,Ol=El,Fl=Al;function oe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}oe.prototype.clear=Ml,oe.prototype.delete=Nl,oe.prototype.get=Pl,oe.prototype.has=Ol,oe.prototype.set=Fl;var Dl=oe,Ll=Da,Vl=Cr,jl=Ll(Vl,"Map"),zl=jl,Va=ul,Rl=Dl,Bl=zl;function Ul(){this.size=0,this.__data__={hash:new Va,map:new(Bl||Rl),string:new Va}}var Hl=Ul;function ql(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Kl=ql,Gl=Kl;function Wl(t,e){var r=t.__data__;return Gl(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ge=Wl,Yl=Ge;function Xl(t){var e=Yl(this,t).delete(t);return this.size-=e?1:0,e}var Jl=Xl,Zl=Ge;function Ql(t){return Zl(this,t).get(t)}var tc=Ql,ec=Ge;function rc(t){return ec(this,t).has(t)}var ac=rc,nc=Ge;function ic(t,e){var r=nc(this,t),a=r.size;return r.set(t,e),this.size+=r.size==a?0:1,this}var oc=ic,sc=Hl,lc=Jl,cc=tc,uc=ac,dc=oc;function se(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}se.prototype.clear=sc,se.prototype.delete=lc,se.prototype.get=cc,se.prototype.has=uc,se.prototype.set=dc;var fc=se,ja=fc,hc="Expected a function";function Tr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(hc);var r=function(){var a=arguments,n=e?e.apply(this,a):a[0],i=r.cache;if(i.has(n))return i.get(n);var o=t.apply(this,a);return r.cache=i.set(n,o)||i,o};return r.cache=new(Tr.Cache||ja),r}Tr.Cache=ja;var pc=Tr,gc=pc,bc=500;function vc(t){var e=gc(t,function(a){return r.size===bc&&r.clear(),a}),r=e.cache;return e}var wc=vc,mc=wc,_c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yc=/\\(\\)?/g,xc=mc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(_c,function(r,a,n,i){e.push(n?i.replace(yc,"$1"):a||r)}),e}),kc=xc;function Sc(t,e){for(var r=-1,a=t==null?0:t.length,n=Array(a);++r<a;)n[r]=e(t[r],r,t);return n}var Cc=Sc,za=$r,$c=Cc,Ec=Sr,Ic=Er,Tc=1/0,Ra=za?za.prototype:void 0,Ba=Ra?Ra.toString:void 0;function Ua(t){if(typeof t=="string")return t;if(Ec(t))return $c(t,Ua)+"";if(Ic(t))return Ba?Ba.call(t):"";var e=t+"";return e=="0"&&1/t==-Tc?"-0":e}var Ac=Ua,Mc=Ac;function Nc(t){return t==null?"":Mc(t)}var Pc=Nc,Oc=Sr,Fc=es,Dc=kc,Lc=Pc;function Vc(t,e){return Oc(t)?t:Fc(t,e)?[t]:Dc(Lc(t))}var jc=Vc,zc=Er,Rc=1/0;function Bc(t){if(typeof t=="string"||zc(t))return t;var e=t+"";return e=="0"&&1/t==-Rc?"-0":e}var Uc=Bc,Hc=jc,qc=Uc;function Kc(t,e){e=Hc(e,t);for(var r=0,a=e.length;t!=null&&r<a;)t=t[qc(e[r++])];return r&&r==a?t:void 0}var Gc=Kc,Wc=Gc;function Yc(t,e,r){var a=t==null?void 0:Wc(t,e);return a===void 0?r:a}var Xc=Yc;const _e=Tt(Xc);var ye,C,Ha,qa,Yt,Ka,Ga,Ar,Wa,le={},Ya=[],Jc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,We=Array.isArray;function At(t,e){for(var r in e)t[r]=e[r];return t}function Xa(t){var e=t.parentNode;e&&e.removeChild(t)}function ut(t,e,r){var a,n,i,o={};for(i in e)i=="key"?a=e[i]:i=="ref"?n=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?ye.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return xe(t,o,a,n,null)}function xe(t,e,r,a,n){var i={type:t,props:e,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++Ha};return n==null&&C.vnode!=null&&C.vnode(i),i}function Zc(){return{current:null}}function W(t){return t.children}function mt(t,e){this.props=t,this.context=e}function Ye(t,e){if(e==null)return t.__?Ye(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Ye(t):null}function Ja(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return Ja(t)}}function Mr(t){(!t.__d&&(t.__d=!0)&&Yt.push(t)&&!Xe.__r++||Ka!==C.debounceRendering)&&((Ka=C.debounceRendering)||Ga)(Xe)}function Xe(){var t,e,r,a,n,i,o,s,c;for(Yt.sort(Ar);t=Yt.shift();)t.__d&&(e=Yt.length,a=void 0,n=void 0,i=void 0,s=(o=(r=t).__v).__e,(c=r.__P)&&(a=[],n=[],(i=At({},o)).__v=o.__v+1,Nr(c,o,i,r.__n,c.ownerSVGElement!==void 0,o.__h!=null?[s]:null,a,s??Ye(o),o.__h,n),nn(a,o,n),o.__e!=s&&Ja(o)),Yt.length>e&&Yt.sort(Ar));Xe.__r=0}function Za(t,e,r,a,n,i,o,s,c,d,h){var u,p,v,g,_,k,y,m,M,F,N=0,H=a&&a.__k||Ya,et=H.length,pt=et,L=e.length;for(r.__k=[],u=0;u<L;u++)(g=r.__k[u]=(g=e[u])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?xe(null,g,null,null,g):We(g)?xe(W,{children:g},null,null,null):g.__b>0?xe(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(m=Qc(g,H,y=u+N,pt))===-1?v=le:(v=H[m]||le,H[m]=void 0,pt--),Nr(t,g,v,n,i,o,s,c,d,h),_=g.__e,(p=g.ref)&&v.ref!=p&&(v.ref&&Pr(v.ref,null,g),h.push(p,g.__c||_,g)),_!=null&&(k==null&&(k=_),F=!(M=v===le||v.__v===null)&&m===y,M?m==-1&&N--:m!==y&&(m===y+1?(N++,F=!0):m>y?pt>L-y?(N+=m-y,F=!0):N--:N=m<y&&m==y-1?m-y:0),y=u+N,F=F||m==u&&!M,typeof g.type!="function"||m===y&&v.__k!==g.__k?typeof g.type=="function"||F?g.__d!==void 0?(c=g.__d,g.__d=void 0):c=_.nextSibling:c=tn(t,_,c):c=Qa(g,c,t),typeof r.type=="function"&&(r.__d=c)));for(r.__e=k,u=et;u--;)H[u]!=null&&(typeof r.type=="function"&&H[u].__e!=null&&H[u].__e==r.__d&&(r.__d=H[u].__e.nextSibling),on(H[u],H[u]))}function Qa(t,e,r){for(var a,n=t.__k,i=0;n&&i<n.length;i++)(a=n[i])&&(a.__=t,e=typeof a.type=="function"?Qa(a,e,r):tn(r,a.__e,e));return e}function Mt(t,e){return e=e||[],t==null||typeof t=="boolean"||(We(t)?t.some(function(r){Mt(r,e)}):e.push(t)),e}function tn(t,e,r){return r==null||r.parentNode!==t?t.insertBefore(e,null):e==r&&e.parentNode!=null||t.insertBefore(e,r),e.nextSibling}function Qc(t,e,r,a){var n=t.key,i=t.type,o=r-1,s=r+1,c=e[r];if(c===null||c&&n==c.key&&i===c.type)return r;if(a>(c!=null?1:0))for(;o>=0||s<e.length;){if(o>=0){if((c=e[o])&&n==c.key&&i===c.type)return o;o--}if(s<e.length){if((c=e[s])&&n==c.key&&i===c.type)return s;s++}}return-1}function tu(t,e,r,a,n){var i;for(i in r)i==="children"||i==="key"||i in e||Je(t,i,null,r[i],a);for(i in e)n&&typeof e[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===e[i]||Je(t,i,e[i],r[i],a)}function en(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Jc.test(e)?r:r+"px"}function Je(t,e,r,a,n){var i;t:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof a=="string"&&(t.style.cssText=a=""),a)for(e in a)r&&e in r||en(t.style,e,"");if(r)for(e in r)a&&r[e]===a[e]||en(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?a||t.addEventListener(e,i?an:rn,i):t.removeEventListener(e,i?an:rn,i);else if(e!=="dangerouslySetInnerHTML"){if(n)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,r))}}function rn(t){return this.l[t.type+!1](C.event?C.event(t):t)}function an(t){return this.l[t.type+!0](C.event?C.event(t):t)}function Nr(t,e,r,a,n,i,o,s,c,d){var h,u,p,v,g,_,k,y,m,M,F,N,H,et,pt,L=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(c=r.__h,s=e.__e=r.__e,e.__h=null,i=[s]),(h=C.__b)&&h(e);try{t:if(typeof L=="function"){if(y=e.props,m=(h=L.contextType)&&a[h.__c],M=h?m?m.props.value:h.__:a,r.__c?k=(u=e.__c=r.__c).__=u.__E:("prototype"in L&&L.prototype.render?e.__c=u=new L(y,M):(e.__c=u=new mt(y,M),u.constructor=L,u.render=ru),m&&m.sub(u),u.props=y,u.state||(u.state={}),u.context=M,u.__n=a,p=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),L.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=At({},u.__s)),At(u.__s,L.getDerivedStateFromProps(y,u.__s))),v=u.props,g=u.state,u.__v=e,p)L.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(L.getDerivedStateFromProps==null&&y!==v&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,M),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,M)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(u.props=y,u.state=u.__s,u.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(lt){lt&&(lt.__=e)}),F=0;F<u._sb.length;F++)u.__h.push(u._sb[F]);u._sb=[],u.__h.length&&o.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,M),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(v,g,_)})}if(u.context=M,u.props=y,u.__P=t,u.__e=!1,N=C.__r,H=0,"prototype"in L&&L.prototype.render){for(u.state=u.__s,u.__d=!1,N&&N(e),h=u.render(u.props,u.state,u.context),et=0;et<u._sb.length;et++)u.__h.push(u._sb[et]);u._sb=[]}else do u.__d=!1,N&&N(e),h=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++H<25);u.state=u.__s,u.getChildContext!=null&&(a=At(At({},a),u.getChildContext())),p||u.getSnapshotBeforeUpdate==null||(_=u.getSnapshotBeforeUpdate(v,g)),Za(t,We(pt=h!=null&&h.type===W&&h.key==null?h.props.children:h)?pt:[pt],e,r,a,n,i,o,s,c,d),u.base=e.__e,e.__h=null,u.__h.length&&o.push(u),k&&(u.__E=u.__=null)}else i==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=eu(r.__e,e,r,a,n,i,o,c,d);(h=C.diffed)&&h(e)}catch(lt){e.__v=null,(c||i!=null)&&(e.__e=s,e.__h=!!c,i[i.indexOf(s)]=null),C.__e(lt,e,r)}}function nn(t,e,r){for(var a=0;a<r.length;a++)Pr(r[a],r[++a],r[++a]);C.__c&&C.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(i){i.call(n)})}catch(i){C.__e(i,n.__v)}})}function eu(t,e,r,a,n,i,o,s,c){var d,h,u,p=r.props,v=e.props,g=e.type,_=0;if(g==="svg"&&(n=!0),i!=null){for(;_<i.length;_++)if((d=i[_])&&"setAttribute"in d==!!g&&(g?d.localName===g:d.nodeType===3)){t=d,i[_]=null;break}}if(t==null){if(g===null)return document.createTextNode(v);t=n?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,v.is&&v),i=null,s=!1}if(g===null)p===v||s&&t.data===v||(t.data=v);else{if(i=i&&ye.call(t.childNodes),h=(p=r.props||le).dangerouslySetInnerHTML,u=v.dangerouslySetInnerHTML,!s){if(i!=null)for(p={},_=0;_<t.attributes.length;_++)p[t.attributes[_].name]=t.attributes[_].value;(u||h)&&(u&&(h&&u.__html==h.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(tu(t,v,p,n,s),u)e.__k=[];else if(Za(t,We(_=e.props.children)?_:[_],e,r,a,n&&g!=="foreignObject",i,o,i?i[0]:r.__k&&Ye(r,0),s,c),i!=null)for(_=i.length;_--;)i[_]!=null&&Xa(i[_]);s||("value"in v&&(_=v.value)!==void 0&&(_!==t.value||g==="progress"&&!_||g==="option"&&_!==p.value)&&Je(t,"value",_,p.value,!1),"checked"in v&&(_=v.checked)!==void 0&&_!==t.checked&&Je(t,"checked",_,p.checked,!1))}return t}function Pr(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(a){C.__e(a,r)}}function on(t,e,r){var a,n;if(C.unmount&&C.unmount(t),(a=t.ref)&&(a.current&&a.current!==t.__e||Pr(a,null,e)),(a=t.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){C.__e(i,e)}a.base=a.__P=null,t.__c=void 0}if(a=t.__k)for(n=0;n<a.length;n++)a[n]&&on(a[n],e,r||typeof t.type!="function");r||t.__e==null||Xa(t.__e),t.__=t.__e=t.__d=void 0}function ru(t,e,r){return this.constructor(t,r)}function ce(t,e,r){var a,n,i,o;C.__&&C.__(t,e),n=(a=typeof r=="function")?null:r&&r.__k||e.__k,i=[],o=[],Nr(e,t=(!a&&r||e).__k=ut(W,null,[t]),n||le,le,e.ownerSVGElement!==void 0,!a&&r?[r]:n?null:e.firstChild?ye.call(e.childNodes):null,i,!a&&r?r:n?n.__e:e.firstChild,a,o),nn(i,t,o)}function sn(t,e){ce(t,e,sn)}function au(t,e,r){var a,n,i,o,s=At({},t.props);for(i in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)i=="key"?a=e[i]:i=="ref"?n=e[i]:s[i]=e[i]===void 0&&o!==void 0?o[i]:e[i];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):r),xe(t.type,s,a||t.key,n||t.ref,null)}function ln(t,e){var r={__c:e="__cC"+Wa++,__:t,Consumer:function(a,n){return a.children(n)},Provider:function(a){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,Mr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),a.children}};return r.Provider.__=r.Consumer.contextType=r}ye=Ya.slice,C={__e:function(t,e,r,a){for(var n,i,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(t)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(t,a||{}),o=n.__d),o)return n.__E=n}catch(s){t=s}throw t}},Ha=0,qa=function(t){return t!=null&&t.constructor===void 0},mt.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=At({},this.state),typeof t=="function"&&(t=t(At({},r),this.props)),t&&At(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Mr(this))},mt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Mr(this))},mt.prototype.render=W,Yt=[],Ga=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(t,e){return t.__v.__b-e.__v.__b},Xe.__r=0,Wa=0;var Ze=class extends Error{constructor(e){super(e[0].message);xo(this,"issues");this.name="ValiError",this.issues=e}};function cn(t,e){return{...t,_parse(r,a){return t._parse(e(r),a)}}}function ke(t){return{issues:t}}function rt(t){return{output:t}}function nu(t,e){return{reason:t==null?void 0:t.reason,validation:e.validation,origin:(t==null?void 0:t.origin)||"value",message:e.message,input:e.input,path:e.path,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly,skipPipe:t==null?void 0:t.skipPipe}}function iu(t,e){return{reason:e,origin:t==null?void 0:t.origin,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly,skipPipe:t==null?void 0:t.skipPipe}}function Lt(t,e,r,a){if(!e||!e.length||r!=null&&r.skipPipe)return rt(t);let n,i,o=t;for(const s of e){const c=s._parse(o);if(c.issues){n=n||iu(r,a);for(const d of c.issues){const h=nu(n,d);i?i.push(h):i=[h]}if(n.abortEarly||n.abortPipeEarly)break}else o=c.output}return i?ke(i):rt(o)}function Vt(t,e){return Array.isArray(t)?[void 0,t]:[t,e]}function un(t){return typeof t=="function"?t():t}function jt(t,e,r,a){return ke([{validation:t,message:un(e),input:r,requirement:a}])}function dn(t,e,r){if(!t||typeof t=="object"&&!Array.isArray(t)){const[i,o]=Vt(e,r);return[t,i,o]}const[a,n]=Vt(t,e);return[void 0,a,n]}function Nt(t,e,r,a,n,i){return{issues:[{reason:e,validation:r,origin:(t==null?void 0:t.origin)||"value",message:un(a),input:n,issues:i,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly,skipPipe:t==null?void 0:t.skipPipe}]}}function fn(t){return typeof t.default=="function"?t.default():t.default}function ou(t){return{type:"any",async:!1,pipe:t,_parse(e,r){return Lt(e,this.pipe,r,"any")}}}function hn(t,e,r){const[a="Invalid type",n]=Vt(e,r);return{type:"array",async:!1,item:t,message:a,pipe:n,_parse(i,o){if(!Array.isArray(i))return Nt(o,"type","array",this.message,i);let s;const c=[];for(let d=0;d<i.length;d++){const h=i[d],u=this.item._parse(h,o);if(u.issues){const p={type:"array",input:i,key:d,value:h};for(const v of u.issues)v.path?v.path.unshift(p):v.path=[p],s==null||s.push(v);if(s||(s=u.issues),o!=null&&o.abortEarly)break}else c.push(u.output)}return s?ke(s):Lt(c,this.pipe,o,"array")}}}function pn(t,e){const[r="Invalid type",a]=Vt(t,e);return{type:"boolean",async:!1,message:r,pipe:a,_parse(n,i){return typeof n!="boolean"?Nt(i,"type","boolean",this.message,n):Lt(n,this.pipe,i,"boolean")}}}function gn(t,e="Invalid type"){return{type:"literal",async:!1,literal:t,message:e,_parse(r,a){return r!==this.literal?Nt(a,"type","literal",this.message,r):rt(r)}}}function su(t,e){return{type:"nullable",async:!1,wrapped:t,default:e,_parse(r,a){if(r===null){const n=fn(this);if(n===void 0)return rt(r);r=n}return this.wrapped._parse(r,a)}}}function Or(t,e){const[r="Invalid type",a]=Vt(t,e);return{type:"number",async:!1,message:r,pipe:a,_parse(n,i){return typeof n!="number"||isNaN(n)?Nt(i,"type","number",this.message,n):Lt(n,this.pipe,i,"number")}}}function at(t,e,r,a){const[n,i="Invalid type",o]=dn(e,r,a);let s;return{type:"object",async:!1,entries:t,rest:n,message:i,pipe:o,_parse(c,d){if(!c||typeof c!="object")return Nt(d,"type","object",this.message,c);s=s||Object.entries(this.entries);let h;const u={};for(const[p,v]of s){const g=c[p],_=v._parse(g,d);if(_.issues){const k={type:"object",input:c,key:p,value:g};for(const y of _.issues)y.path?y.path.unshift(k):y.path=[k],h==null||h.push(y);if(h||(h=_.issues),d!=null&&d.abortEarly)break}else(_.output!==void 0||p in c)&&(u[p]=_.output)}if(this.rest&&!(d!=null&&d.abortEarly&&h)){for(const p in c)if(!(p in this.entries)){const v=c[p],g=this.rest._parse(v,d);if(g.issues){const _={type:"object",input:c,key:p,value:v};for(const k of g.issues)k.path?k.path.unshift(_):k.path=[_],h==null||h.push(k);if(h||(h=g.issues),d!=null&&d.abortEarly)break}else u[p]=g.output}}return h?ke(h):Lt(u,this.pipe,d,"object")}}}function Se(t,e){return{type:"optional",async:!1,wrapped:t,default:e,_parse(r,a){if(r===void 0){const n=fn(this);if(n===void 0)return rt(r);r=n}return this.wrapped._parse(r,a)}}}function lu(t,e="Invalid type"){return{type:"picklist",async:!1,options:t,message:e,_parse(r,a){return this.options.includes(r)?rt(r):Nt(a,"type","picklist",this.message,r)}}}function Z(t,e){const[r="Invalid type",a]=Vt(t,e);return{type:"string",async:!1,message:r,pipe:a,_parse(n,i){return typeof n!="string"?Nt(i,"type","string",this.message,n):Lt(n,this.pipe,i,"string")}}}function cu(t,e,r,a){if(typeof e=="object"&&!Array.isArray(e)){const[o,s]=Vt(r,a);return[t,e,o,s]}const[n,i]=Vt(e,r);return[Z(),t,n,i]}var uu=["__proto__","prototype","constructor"];function bn(t,e,r,a){const[n,i,o="Invalid type",s]=cu(t,e,r,a);return{type:"record",async:!1,key:n,value:i,message:o,pipe:s,_parse(c,d){if(!c||typeof c!="object")return Nt(d,"type","record",this.message,c);let h;const u={};for(const[p,v]of Object.entries(c))if(!uu.includes(p)){let g;const _=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(_.issues){g={type:"record",input:c,key:p,value:v};for(const y of _.issues)y.path=[g],h==null||h.push(y);if(h||(h=_.issues),d!=null&&d.abortEarly)break}const k=this.value._parse(v,d);if(k.issues){g=g||{type:"record",input:c,key:p,value:v};for(const y of k.issues)y.path?y.path.unshift(g):y.path=[g],h==null||h.push(y);if(h||(h=k.issues),d!=null&&d.abortEarly)break}!_.issues&&!k.issues&&(u[_.output]=k.output)}return h?ke(h):Lt(u,this.pipe,d,"record")}}}function du(t,e="Invalid type"){return{type:"union",async:!1,options:t,message:e,_parse(r,a){let n,i;for(const o of this.options){const s=o._parse(r,a);if(s.issues)if(n)for(const c of s.issues)n.push(c);else n=s.issues;else{i=[s.output];break}}return i?rt(i[0]):Nt(a,"type","union",this.message,r,n)}}}function Qe(t,e,r){const a=t._parse(e,r);if(a.issues)throw new Ze(a.issues);return a.output}async function fu(t,e,r){const a=await t._parse(e,r);if(a.issues)throw new Ze(a.issues);return a.output}function hu(t,e,r,a){const[n,i,o]=dn(e,r,a);return at(Object.entries(t.entries).reduce((s,[c,d])=>({...s,[c]:Se(d)}),{}),n,i,o)}function pu(t,e,r){const a=t._parse(e,r);return a.issues?{success:!1,error:new Ze(a.issues),issues:a.issues}:{success:!0,data:a.output,output:a.output}}function vn(t,e,r){return{...t,_parse(a,n){const i=t._parse(a,n);if(i.issues)return i;const o=e(i.output);return r&&!Array.isArray(r)?r._parse(o,n):Lt(o,r,n,typeof o)}}}var gu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function bu(t,e="Invalid input"){return{type:"custom",async:!1,message:e,requirement:t,_parse(r){return this.requirement(r)?rt(r):jt(this.type,this.message,r,this.requirement)}}}function vu(t="Invalid email"){return{type:"email",async:!1,message:t,requirement:gu,_parse(e){return this.requirement.test(e)?rt(e):jt(this.type,this.message,e,this.requirement)}}}function tr(t,e="Invalid length"){return{type:"max_length",async:!1,message:e,requirement:t,_parse(r){return r.length>this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function wu(t,e="Invalid value"){return{type:"max_value",async:!1,message:e,requirement:t,_parse(r){return r>this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function Ce(t,e="Invalid length"){return{type:"min_length",async:!1,message:e,requirement:t,_parse(r){return r.length<this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function mu(t,e="Invalid value"){return{type:"min_value",async:!1,message:e,requirement:t,_parse(r){return r<this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function _u(t,e="Invalid regex"){return{type:"regex",async:!1,message:e,requirement:t,_parse(r){return this.requirement.test(r)?rt(r):jt(this.type,this.message,r,this.requirement)}}}function yu(t="Invalid URL"){return{type:"url",async:!1,message:t,requirement(e){try{return new URL(e),!0}catch{return!1}},_parse(e){return this.requirement(e)?rt(e):jt(this.type,this.message,e,this.requirement)}}}function wn(t){var e,r,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=wn(t[e]))&&(a&&(a+=" "),a+=r);else for(e in t)t[e]&&(a&&(a+=" "),a+=e);return a}function Xt(){for(var t,e,r=0,a="";r<arguments.length;)(t=arguments[r++])&&(e=wn(t))&&(a&&(a+=" "),a+=e);return a}const mn=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,_n=Xt,$e=(t,e)=>r=>{var a;if((e==null?void 0:e.variants)==null)return _n(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:i}=e,o=Object.keys(n).map(d=>{const h=r==null?void 0:r[d],u=i==null?void 0:i[d];if(h===null)return null;const p=mn(h)||mn(u);return n[d][p]}),s=r&&Object.entries(r).reduce((d,h)=>{let[u,p]=h;return p===void 0||(d[u]=p),d},{}),c=e==null||(a=e.compoundVariants)===null||a===void 0?void 0:a.reduce((d,h)=>{let{class:u,className:p,...v}=h;return Object.entries(v).every(g=>{let[_,k]=g;return Array.isArray(k)?k.includes({...i,...s}[_]):{...i,...s}[_]===k})?[...d,u,p]:d},[]);return _n(t,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};var zt,z,Fr,yn,ue=0,xn=[],er=[],kn=C.__b,Sn=C.__r,Cn=C.diffed,$n=C.__c,En=C.unmount;function de(t,e){C.__h&&C.__h(z,t,ue||e),ue=0;var r=z.__H||(z.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:er}),r.__[t]}function bt(t){return ue=1,In(Mn,t)}function In(t,e,r){var a=de(zt++,2);if(a.t=t,!a.__c&&(a.__=[r?r(e):Mn(void 0,e),function(s){var c=a.__N?a.__N[0]:a.__[0],d=a.t(c,s);c!==d&&(a.__N=[d,a.__[1]],a.__c.setState({}))}],a.__c=z,!z.u)){var n=function(s,c,d){if(!a.__c.__H)return!0;var h=a.__c.__H.__.filter(function(p){return p.__c});if(h.every(function(p){return!p.__N}))return!i||i.call(this,s,c,d);var u=!1;return h.forEach(function(p){if(p.__N){var v=p.__[0];p.__=p.__N,p.__N=void 0,v!==p.__[0]&&(u=!0)}}),!(!u&&a.__c.props===s)&&(!i||i.call(this,s,c,d))};z.u=!0;var i=z.shouldComponentUpdate,o=z.componentWillUpdate;z.componentWillUpdate=function(s,c,d){if(this.__e){var h=i;i=void 0,n(s,c,d),i=h}o&&o.call(this,s,c,d)},z.shouldComponentUpdate=n}return a.__N||a.__}function _t(t,e){var r=de(zt++,3);!C.__s&&Lr(r.__H,e)&&(r.__=t,r.i=e,z.__H.__h.push(r))}function dt(t,e){var r=de(zt++,4);!C.__s&&Lr(r.__H,e)&&(r.__=t,r.i=e,z.__h.push(r))}function ft(t){return ue=5,Pt(function(){return{current:t}},[])}function xu(t,e,r){ue=6,dt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},r==null?r:r.concat(t))}function Pt(t,e){var r=de(zt++,7);return Lr(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function ku(t,e){return ue=8,Pt(function(){return t},e)}function Tn(t){var e=z.context[t.__c],r=de(zt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(z)),e.props.value):t.__}function Su(t,e){C.useDebugValue&&C.useDebugValue(e?e(t):t)}function Cu(){var t=de(zt++,11);if(!t.__){for(var e=z.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function $u(){for(var t;t=xn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(rr),t.__H.__h.forEach(Dr),t.__H.__h=[]}catch(e){t.__H.__h=[],C.__e(e,t.__v)}}C.__b=function(t){z=null,kn&&kn(t)},C.__r=function(t){Sn&&Sn(t),zt=0;var e=(z=t.__c).__H;e&&(Fr===z?(e.__h=[],z.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=er,r.__N=r.i=void 0})):(e.__h.forEach(rr),e.__h.forEach(Dr),e.__h=[],zt=0)),Fr=z},C.diffed=function(t){Cn&&Cn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(xn.push(e)!==1&&yn===C.requestAnimationFrame||((yn=C.requestAnimationFrame)||Eu)($u)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==er&&(r.__=r.__V),r.i=void 0,r.__V=er})),Fr=z=null},C.__c=function(t,e){e.some(function(r){try{r.__h.forEach(rr),r.__h=r.__h.filter(function(a){return!a.__||Dr(a)})}catch(a){e.some(function(n){n.__h&&(n.__h=[])}),e=[],C.__e(a,r.__v)}}),$n&&$n(t,e)},C.unmount=function(t){En&&En(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(a){try{rr(a)}catch(n){e=n}}),r.__H=void 0,e&&C.__e(e,r.__v))};var An=typeof requestAnimationFrame=="function";function Eu(t){var e,r=function(){clearTimeout(a),An&&cancelAnimationFrame(e),setTimeout(t)},a=setTimeout(r,100);An&&(e=requestAnimationFrame(r))}function rr(t){var e=z,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),z=e}function Dr(t){var e=z;t.__c=t.__(),z=e}function Lr(t,e){return!t||t.length!==e.length||e.some(function(r,a){return r!==t[a]})}function Mn(t,e){return typeof e=="function"?e(t):e}function Nn(t,e){for(var r in e)t[r]=e[r];return t}function Vr(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var a in e)if(a!=="__source"&&t[a]!==e[a])return!0;return!1}function jr(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function zr(t){this.props=t}function Iu(t,e){function r(n){var i=this.props.ref,o=i==n.ref;return!o&&i&&(i.call?i(null):i.current=null),e?!e(this.props,n)||!o:Vr(this.props,n)}function a(n){return this.shouldComponentUpdate=r,ut(t,n)}return a.displayName="Memo("+(t.displayName||t.name)+")",a.prototype.isReactComponent=!0,a.__f=!0,a}(zr.prototype=new mt).isPureReactComponent=!0,zr.prototype.shouldComponentUpdate=function(t,e){return Vr(this.props,t)||Vr(this.state,e)};var Pn=C.__b;C.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Pn&&Pn(t)};var Tu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(t){function e(r){var a=Nn({},r);return delete a.ref,t(a,r.ref||null)}return e.$$typeof=Tu,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var On=function(t,e){return t==null?null:Mt(Mt(t).map(e))},Au={map:On,forEach:On,count:function(t){return t?Mt(t).length:0},only:function(t){var e=Mt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Mt},Mu=C.__e;C.__e=function(t,e,r,a){if(t.then){for(var n,i=e;i=i.__;)if((n=i.__c)&&n.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e)}Mu(t,e,r,a)};var Fn=C.unmount;function Dn(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(a){typeof a.__c=="function"&&a.__c()}),t.__c.__H=null),(t=Nn({},t)).__c!=null&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(a){return Dn(a,e,r)})),t}function Ln(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(a){return Ln(a,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function Ee(){this.__u=0,this.t=null,this.__b=null}function Vn(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function jn(t){var e,r,a;function n(i){if(e||(e=t()).then(function(o){r=o.default||o},function(o){a=o}),a)throw a;if(!r)throw e;return ut(r,i)}return n.displayName="Lazy",n.__f=!0,n}function Ie(){this.u=null,this.o=null}C.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Fn&&Fn(t)},(Ee.prototype=new mt).__c=function(t,e){var r=e.__c,a=this;a.t==null&&(a.t=[]),a.t.push(r);var n=Vn(a.__v),i=!1,o=function(){i||(i=!0,r.__R=null,n?n(s):s())};r.__R=o;var s=function(){if(!--a.__u){if(a.state.__a){var d=a.state.__a;a.__v.__k[0]=Ln(d,d.__c.__P,d.__c.__O)}var h;for(a.setState({__a:a.__b=null});h=a.t.pop();)h.forceUpdate()}},c=e.__h===!0;a.__u++||c||a.setState({__a:a.__b=a.__v.__k[0]}),t.then(o,o)},Ee.prototype.componentWillUnmount=function(){this.t=[]},Ee.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),a=this.__v.__k[0].__c;this.__v.__k[0]=Dn(this.__b,r,a.__O=a.__P)}this.__b=null}var n=e.__a&&ut(W,null,t.fallback);return n&&(n.__h=null),[ut(W,null,e.__a?null:t.children),n]};var zn=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Nu(t){return this.getChildContext=function(){return t.context},t.children}function Pu(t){var e=this,r=t.i;e.componentWillUnmount=function(){ce(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(a){this.childNodes.push(a),e.i.appendChild(a)},insertBefore:function(a,n){this.childNodes.push(a),e.i.appendChild(a)},removeChild:function(a){this.childNodes.splice(this.childNodes.indexOf(a)>>>1,1),e.i.removeChild(a)}}),ce(ut(Nu,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Ou(t,e){var r=ut(Pu,{__v:t,i:e});return r.containerInfo=e,r}(Ie.prototype=new mt).__a=function(t){var e=this,r=Vn(e.__v),a=e.o.get(t);return a[0]++,function(n){var i=function(){e.props.revealOrder?(a.push(n),zn(e,t,a)):n()};r?r(i):i()}},Ie.prototype.render=function(t){this.u=null,this.o=new Map;var e=Mt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},Ie.prototype.componentDidUpdate=Ie.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){zn(t,r,e)})};var Rn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Fu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Du=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Lu=/[A-Z0-9]/g,Vu=typeof document<"u",ju=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function zu(t,e,r){return e.__k==null&&(e.textContent=""),ce(t,e),typeof r=="function"&&r(),t?t.__c:null}function Ru(t,e,r){return sn(t,e),typeof r=="function"&&r(),t?t.__c:null}mt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(mt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Bn=C.event;function Bu(){}function Uu(){return this.cancelBubble}function Hu(){return this.defaultPrevented}C.event=function(t){return Bn&&(t=Bn(t)),t.persist=Bu,t.isPropagationStopped=Uu,t.isDefaultPrevented=Hu,t.nativeEvent=t};var Br,qu={enumerable:!1,configurable:!0,get:function(){return this.class}},Un=C.vnode;C.vnode=function(t){typeof t.type=="string"&&function(e){var r=e.props,a=e.type,n={};for(var i in r){var o=r[i];if(!(i==="value"&&"defaultValue"in r&&o==null||Vu&&i==="children"&&a==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||a!=="input"&&a!=="textarea"||ju(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Du.test(i)?i=s:a.indexOf("-")===-1&&Fu.test(i)?i=i.replace(Lu,"-$&").toLowerCase():o===null&&(o=void 0):s=i="oninput",s==="oninput"&&n[i=s]&&(i="oninputCapture"),n[i]=o}}a=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Mt(r.children).forEach(function(c){c.props.selected=n.value.indexOf(c.props.value)!=-1})),a=="select"&&n.defaultValue!=null&&(n.value=Mt(r.children).forEach(function(c){c.props.selected=n.multiple?n.defaultValue.indexOf(c.props.value)!=-1:n.defaultValue==c.props.value})),r.class&&!r.className?(n.class=r.class,Object.defineProperty(n,"className",qu)):(r.className&&!r.class||r.class&&r.className)&&(n.class=n.className=r.className),e.props=n}(t),t.$$typeof=Rn,Un&&Un(t)};var Hn=C.__r;C.__r=function(t){Hn&&Hn(t),Br=t.__c};var qn=C.diffed;C.diffed=function(t){qn&&qn(t);var e=t.props,r=t.__e;r!=null&&t.type==="textarea"&&"value"in e&&e.value!==r.value&&(r.value=e.value==null?"":e.value),Br=null};var Ku={ReactCurrentDispatcher:{current:{readContext:function(t){return Br.__n[t.__c].props.value}}}};function Gu(t){return ut.bind(null,t)}function Kn(t){return!!t&&t.$$typeof===Rn}function Wu(t){return Kn(t)?au.apply(null,arguments):t}function Yu(t){return!!t.__k&&(ce(null,t),!0)}function Xu(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ju=function(t,e){return t(e)},Zu=function(t,e){return t(e)},Qu=W;function Gn(t){t()}function td(t){return t}function ed(){return[!1,Gn]}var rd=dt;function ad(t,e){var r=e(),a=bt({h:{__:r,v:e}}),n=a[0].h,i=a[1];return dt(function(){n.__=r,n.v=e,jr(n.__,e())||i({h:n})},[t,r,e]),_t(function(){return jr(n.__,n.v())||i({h:n}),t(function(){jr(n.__,n.v())||i({h:n})})},[t]),r}var kt={useState:bt,useId:Cu,useReducer:In,useEffect:_t,useLayoutEffect:dt,useInsertionEffect:rd,useTransition:ed,useDeferredValue:td,useSyncExternalStore:ad,startTransition:Gn,useRef:ft,useImperativeHandle:xu,useMemo:Pt,useCallback:ku,useContext:Tn,useDebugValue:Su,version:"17.0.2",Children:Au,render:zu,hydrate:Ru,unmountComponentAtNode:Yu,createPortal:Ou,createElement:ut,createContext:ln,createFactory:Gu,cloneElement:Wu,createRef:Zc,Fragment:W,isValidElement:Kn,findDOMNode:Xu,Component:mt,PureComponent:zr,memo:Iu,forwardRef:Rr,flushSync:Zu,unstable_batchedUpdates:Ju,StrictMode:Qu,Suspense:Ee,SuspenseList:Ie,lazy:jn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ku};const st=Symbol.for("@ts-pattern/matcher"),Wn=Symbol.for("@ts-pattern/isVariadic"),ar="@ts-pattern/anonymous-select-key",Ur=t=>!!(t&&typeof t=="object"),nr=t=>t&&!!t[st],Y=(t,e,r)=>{if(nr(t)){const a=t[st](),{matched:n,selections:i}=a.match(e);return n&&i&&Object.keys(i).forEach(o=>r(o,i[o])),n}if(Ur(t)){if(!Ur(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let a=[],n=[],i=[];for(const o of t.keys()){const s=t[o];nr(s)&&s[Wn]?i.push(s):i.length?n.push(s):a.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<a.length+n.length)return!1;const o=e.slice(0,a.length),s=n.length===0?[]:e.slice(-n.length),c=e.slice(a.length,n.length===0?1/0:-n.length);return a.every((d,h)=>Y(d,o[h],r))&&n.every((d,h)=>Y(d,s[h],r))&&(i.length===0||Y(i[0],c,r))}return t.length===e.length&&t.every((o,s)=>Y(o,e[s],r))}return Object.keys(t).every(a=>{const n=t[a];return(a in e||nr(i=n)&&i[st]().matcherType==="optional")&&Y(n,e[a],r);var i})}return Object.is(e,t)},ht=t=>{var e,r,a;return Ur(t)?nr(t)?(e=(r=(a=t[st]()).getSelectionKeys)==null?void 0:r.call(a))!=null?e:[]:Array.isArray(t)?Te(t,ht):Te(Object.values(t),ht):[]},Te=(t,e)=>t.reduce((r,a)=>r.concat(e(a)),[]);function nd(...t){if(t.length===1){const[e]=t;return r=>Y(e,r,()=>{})}if(t.length===2){const[e,r]=t;return Y(e,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function Q(t){return Object.assign(t,{optional:()=>qr(t),and:e=>R(t,e),or:e=>Yn(t,e),select:e=>e===void 0?Ae(t):Ae(e,t)})}function Hr(t){return Object.assign((e=>Object.assign(e,{*[Symbol.iterator](){yield Object.assign(e,{[Wn]:!0})}}))(t),{optional:()=>Hr(qr(t)),select:e=>Hr(e===void 0?Ae(t):Ae(e,t))})}function qr(t){return Q({[st]:()=>({match:e=>{let r={};const a=(n,i)=>{r[n]=i};return e===void 0?(ht(t).forEach(n=>a(n,void 0)),{matched:!0,selections:r}):{matched:Y(t,e,a),selections:r}},getSelectionKeys:()=>ht(t),matcherType:"optional"})})}const id=(t,e)=>{for(const r of t)if(!e(r))return!1;return!0},od=(t,e)=>{for(const[r,a]of t.entries())if(!e(a,r))return!1;return!0};function R(...t){return Q({[st]:()=>({match:e=>{let r={};const a=(n,i)=>{r[n]=i};return{matched:t.every(n=>Y(n,e,a)),selections:r}},getSelectionKeys:()=>Te(t,ht),matcherType:"and"})})}function Yn(...t){return Q({[st]:()=>({match:e=>{let r={};const a=(n,i)=>{r[n]=i};return Te(t,ht).forEach(n=>a(n,void 0)),{matched:t.some(n=>Y(n,e,a)),selections:r}},getSelectionKeys:()=>Te(t,ht),matcherType:"or"})})}function O(t){return{[st]:()=>({match:e=>({matched:!!t(e)})})}}function Ae(...t){const e=typeof t[0]=="string"?t[0]:void 0,r=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return Q({[st]:()=>({match:a=>{let n={[e??ar]:a};return{matched:r===void 0||Y(r,a,(i,o)=>{n[i]=o}),selections:n}},getSelectionKeys:()=>[e??ar].concat(r===void 0?[]:ht(r))})})}function St(t){return typeof t=="number"}function Jt(t){return typeof t=="string"}function Rt(t){return typeof t=="bigint"}const Xn=Q(O(function(t){return!0})),sd=Xn,Zt=t=>Object.assign(Q(t),{startsWith:e=>{return Zt(R(t,(r=e,O(a=>Jt(a)&&a.startsWith(r)))));var r},endsWith:e=>{return Zt(R(t,(r=e,O(a=>Jt(a)&&a.endsWith(r)))));var r},minLength:e=>Zt(R(t,(r=>O(a=>Jt(a)&&a.length>=r))(e))),maxLength:e=>Zt(R(t,(r=>O(a=>Jt(a)&&a.length<=r))(e))),includes:e=>{return Zt(R(t,(r=e,O(a=>Jt(a)&&a.includes(r)))));var r},regex:e=>{return Zt(R(t,(r=e,O(a=>Jt(a)&&!!a.match(r)))));var r}}),ld=Zt(O(Jt)),Ct=t=>Object.assign(Q(t),{between:(e,r)=>Ct(R(t,((a,n)=>O(i=>St(i)&&a<=i&&n>=i))(e,r))),lt:e=>Ct(R(t,(r=>O(a=>St(a)&&a<r))(e))),gt:e=>Ct(R(t,(r=>O(a=>St(a)&&a>r))(e))),lte:e=>Ct(R(t,(r=>O(a=>St(a)&&a<=r))(e))),gte:e=>Ct(R(t,(r=>O(a=>St(a)&&a>=r))(e))),int:()=>Ct(R(t,O(e=>St(e)&&Number.isInteger(e)))),finite:()=>Ct(R(t,O(e=>St(e)&&Number.isFinite(e)))),positive:()=>Ct(R(t,O(e=>St(e)&&e>0))),negative:()=>Ct(R(t,O(e=>St(e)&&e<0)))}),cd=Ct(O(St)),Bt=t=>Object.assign(Q(t),{between:(e,r)=>Bt(R(t,((a,n)=>O(i=>Rt(i)&&a<=i&&n>=i))(e,r))),lt:e=>Bt(R(t,(r=>O(a=>Rt(a)&&a<r))(e))),gt:e=>Bt(R(t,(r=>O(a=>Rt(a)&&a>r))(e))),lte:e=>Bt(R(t,(r=>O(a=>Rt(a)&&a<=r))(e))),gte:e=>Bt(R(t,(r=>O(a=>Rt(a)&&a>=r))(e))),positive:()=>Bt(R(t,O(e=>Rt(e)&&e>0))),negative:()=>Bt(R(t,O(e=>Rt(e)&&e<0)))}),ud=Bt(O(Rt)),dd=Q(O(function(t){return typeof t=="boolean"})),fd=Q(O(function(t){return typeof t=="symbol"})),hd=Q(O(function(t){return t==null}));var A={__proto__:null,matcher:st,optional:qr,array:function(...t){return Hr({[st]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const r=t[0];let a={};if(e.length===0)return ht(r).forEach(i=>{a[i]=[]}),{matched:!0,selections:a};const n=(i,o)=>{a[i]=(a[i]||[]).concat([o])};return{matched:e.every(i=>Y(r,i,n)),selections:a}},getSelectionKeys:()=>t.length===0?[]:ht(t[0])})})},set:function(...t){return Q({[st]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};if(t.length===0)return{matched:!0};const a=(i,o)=>{r[i]=(r[i]||[]).concat([o])},n=t[0];return{matched:id(e,i=>Y(n,i,a)),selections:r}},getSelectionKeys:()=>t.length===0?[]:ht(t[0])})})},map:function(...t){return Q({[st]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};const a=(s,c)=>{r[s]=(r[s]||[]).concat([c])};if(t.length===0)return{matched:!0};var n;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=t[0])==null?void 0:n.toString()}`);const[i,o]=t;return{matched:od(e,(s,c)=>{const d=Y(i,c,a),h=Y(o,s,a);return d&&h}),selections:r}},getSelectionKeys:()=>t.length===0?[]:[...ht(t[0]),...ht(t[1])]})})},intersection:R,union:Yn,not:function(t){return Q({[st]:()=>({match:e=>({matched:!Y(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:O,select:Ae,any:Xn,_:sd,string:ld,number:cd,bigint:ud,boolean:dd,symbol:fd,nullish:hd,instanceOf:function(t){return Q(O(function(e){return r=>r instanceof e}(t)))},shape:function(t){return Q(O(nd(t)))}};const Kr={matched:!1,value:void 0};function Qt(t){return new ir(t,Kr)}class ir{constructor(e,r){this.input=void 0,this.state=void 0,this.input=e,this.state=r}with(...e){if(this.state.matched)return this;const r=e[e.length-1],a=[e[0]];let n;e.length===3&&typeof e[1]=="function"?n=e[1]:e.length>2&&a.push(...e.slice(1,e.length-1));let i=!1,o={};const s=(d,h)=>{i=!0,o[d]=h},c=!a.some(d=>Y(d,this.input,s))||n&&!n(this.input)?Kr:{matched:!0,value:r(i?ar in o?o[ar]:o:this.input,this.input)};return new ir(this.input,c)}when(e,r){if(this.state.matched)return this;const a=!!e(this.input);return new ir(this.input,a?{matched:!0,value:r(this.input,this.input)}:Kr)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let e;try{e=JSON.stringify(this.input)}catch{e=this.input}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}run(){return this.exhaustive()}returnType(){return this}}var pd=["other","few","many","two","one","zero"],Jn=({terms:t,overrides:e,locale:r})=>{const a=new Intl.PluralRules(r);function n(i,o){const s=(e==null?void 0:e[i])??t[i];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(c,d)=>{var h;return((h=o==null?void 0:o[d])==null?void 0:h.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${i.toString()}”`);let c=a.select(o.count);if(!(c in s)){const d=pd.find(h=>h in s);if(!d)throw new Error(`Missing plural rule for translation key “${i.toString()}”`);c=d}return s[c].replace(/{{(\w+)}}/g,(d,h)=>{var u;return((u=o==null?void 0:o[h])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${i.toString()}”.`)}}return n},gd=0;function l(t,e,r,a,n,i){var o,s,c={};for(s in e)s=="ref"?o=e[s]:c[s]=e[s];var d={type:t,props:c,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--gd,__source:n,__self:i};if(typeof t=="function"&&(o=t.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return C.vnode&&C.vnode(d),d}var Zn=ln(null),bd=t=>({TranslationProvider:({terms:e,children:r,locale:a})=>{const n=Pt(()=>(console.log("instantiating"),Jn({locale:a,terms:t,overrides:e})),[e,a]);return l(Zn.Provider,{value:{t:n,locale:a},children:r})},useTranslation:()=>{const e=Tn(Zn);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:r})=>Jn({terms:t,overrides:e,locale:r})});const{TranslationProvider:vd,useTranslation:nt,createTFunction:wd}=bd({error_heading:"Something unexpected happened",undo:"Undo",send:"Send",skip:"Skip",skipped:"Skipped",submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",maximize:"Maximise",minimize:"Minimise",close_application:"Close application",applying_for:"Applying for “{{title}}”",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"}}),xp="";function yt(t,e){if(!t)throw new Error(e)}function or(){throw new Error("Cycle detected")}var md=Symbol.for("preact-signals");function Gr(){if(fe>1)fe--;else{for(var t,e=!1;Me!==void 0;){var r=Me;for(Me=void 0,Wr++;r!==void 0;){var a=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ti(r))try{r.c()}catch(n){e||(t=n,e=!0)}r=a}}if(Wr=0,fe--,e)throw t}}var B=void 0,Me=void 0,fe=0,Wr=0,sr=0;function Qn(t){if(B!==void 0){var e=t.n;if(e===void 0||e.t!==B)return e={i:0,S:t,p:B.s,n:void 0,t:B,e:void 0,x:void 0,r:e},B.s!==void 0&&(B.s.n=e),B.s=e,t.n=e,32&B.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=B.s,e.n=void 0,B.s.n=e,B.s=e),e}}function X(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}X.prototype.brand=md,X.prototype.h=function(){return!0},X.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)},X.prototype.U=function(t){if(this.t!==void 0){var e=t.e,r=t.x;e!==void 0&&(e.x=r,t.e=void 0),r!==void 0&&(r.e=e,t.x=void 0),t===this.t&&(this.t=r)}},X.prototype.subscribe=function(t){var e=this;return Xr(function(){var r=e.value,a=32&this.f;this.f&=-33;try{t(r)}finally{this.f|=a}})},X.prototype.valueOf=function(){return this.value},X.prototype.toString=function(){return this.value+""},X.prototype.toJSON=function(){return this.value},X.prototype.peek=function(){return this.v},Object.defineProperty(X.prototype,"value",{get:function(){var t=Qn(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(B instanceof Ht&&function(){throw new Error("Computed cannot have side-effects")}(),t!==this.v){Wr>100&&or(),this.v=t,this.i++,sr++,fe++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Gr()}}}});function Ut(t){return new X(t)}function ti(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function ei(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function ri(t){for(var e=t.s,r=void 0;e!==void 0;){var a=e.p;e.i===-1?(e.S.U(e),a!==void 0&&(a.n=e.n),e.n!==void 0&&(e.n.p=a)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=a}t.s=r}function Ht(t){X.call(this,void 0),this.x=t,this.s=void 0,this.g=sr-1,this.f=4}(Ht.prototype=new X).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===sr))return!0;if(this.g=sr,this.f|=1,this.i>0&&!ti(this))return this.f&=-2,!0;var t=B;try{ei(this),B=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return B=t,ri(this),this.f&=-2,!0},Ht.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}X.prototype.S.call(this,t)},Ht.prototype.U=function(t){if(this.t!==void 0&&(X.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Ht.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Ht.prototype.peek=function(){if(this.h()||or(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ht.prototype,"value",{get:function(){1&this.f&&or();var t=Qn(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function _d(t){return new Ht(t)}function ai(t){var e=t.u;if(t.u=void 0,typeof e=="function"){fe++;var r=B;B=void 0;try{e()}catch(a){throw t.f&=-2,t.f|=8,Yr(t),a}finally{B=r,Gr()}}}function Yr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ai(t)}function yd(t){if(B!==this)throw new Error("Out-of-order effect");ri(this),B=t,this.f&=-2,8&this.f&&Yr(this),Gr()}function Ne(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ne.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Ne.prototype.S=function(){1&this.f&&or(),this.f|=1,this.f&=-9,ai(this),ei(this),fe++;var t=B;return B=this,yd.bind(this,t)},Ne.prototype.N=function(){2&this.f||(this.f|=2,this.o=Me,Me=this)},Ne.prototype.d=function(){this.f|=8,1&this.f||Yr(this)};function Xr(t){var e=new Ne(t);try{e.c()}catch(r){throw e.d(),r}return e.d.bind(e)}var Jr;function he(t,e){C[t]=e.bind(null,C[t]||function(){})}function lr(t){Jr&&Jr(),Jr=t&&t.S()}function ni(t){var e=this,r=t.data,a=kd(r);a.value=r;var n=Pt(function(){for(var i=e.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return e.__$u.c=function(){var o;!qa(n.peek())&&((o=e.base)==null?void 0:o.nodeType)===3?e.base.data=n.peek():(e.__$f|=1,e.setState({}))},_d(function(){var o=a.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}ni.displayName="_st",Object.defineProperties(X.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ni},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),he("__b",function(t,e){if(typeof e.type=="string"){var r,a=e.props;for(var n in a)if(n!=="children"){var i=a[n];i instanceof X&&(r||(e.__np=r={}),r[n]=i,a[n]=i.peek())}}t(e)}),he("__r",function(t,e){lr();var r,a=e.__c;a&&(a.__$f&=-2,(r=a.__$u)===void 0&&(a.__$u=r=function(n){var i;return Xr(function(){i=this}),i.c=function(){a.__$f|=1,a.setState({})},i}())),lr(r),t(e)}),he("__e",function(t,e,r,a){lr(),t(e,r,a)}),he("diffed",function(t,e){lr();var r;if(typeof e.type=="string"&&(r=e.__e)){var a=e.__np,n=e.props;if(a){var i=r.U;if(i)for(var o in i){var s=i[o];s!==void 0&&!(o in a)&&(s.d(),i[o]=void 0)}else r.U=i={};for(var c in a){var d=i[c],h=a[c];d===void 0?(d=xd(r,c,h,n),i[c]=d):d.o(h,n)}}}t(e)});function xd(t,e,r,a){var n=e in t&&t.ownerSVGElement===void 0,i=Ut(r);return{o:function(o,s){i.value=o,a=s},d:Xr(function(){var o=i.value.value;a[e]!==o&&(a[e]=o,n?t[e]=o:o?t.setAttribute(e,o):t.removeAttribute(e))})}}he("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__e;if(r){var a=r.U;if(a){r.U=void 0;for(var n in a){var i=a[n];i&&i.d()}}}}else{var o=e.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}t(e)}),he("__h",function(t,e,r,a){(a<3||a===9)&&(e.__$f|=2),t(e,r,a)}),mt.prototype.shouldComponentUpdate=function(t,e){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var a in e)return!0;for(var n in t)if(n!=="__source"&&t[n]!==this.props[n])return!0;for(var i in this.props)if(!(i in t))return!0;return!1};function kd(t){return Pt(function(){return Ut(t)},[])}const Zr=(t,e)=>e.some(r=>t instanceof r);let ii,oi;function Sd(){return ii||(ii=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Cd(){return oi||(oi=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Qr=new WeakMap,ta=new WeakMap,cr=new WeakMap;function $d(t){const e=new Promise((r,a)=>{const n=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(te(t.result)),n()},o=()=>{a(t.error),n()};t.addEventListener("success",i),t.addEventListener("error",o)});return cr.set(e,t),e}function Ed(t){if(Qr.has(t))return;const e=new Promise((r,a)=>{const n=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),n()},o=()=>{a(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});Qr.set(t,e)}let ea={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Qr.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return te(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function si(t){ea=t(ea)}function Id(t){return Cd().includes(t)?function(...e){return t.apply(ra(this),e),te(this.request)}:function(...e){return te(t.apply(ra(this),e))}}function Td(t){return typeof t=="function"?Id(t):(t instanceof IDBTransaction&&Ed(t),Zr(t,Sd())?new Proxy(t,ea):t)}function te(t){if(t instanceof IDBRequest)return $d(t);if(ta.has(t))return ta.get(t);const e=Td(t);return e!==t&&(ta.set(t,e),cr.set(e,t)),e}const ra=t=>cr.get(t);function Ad(t,e,{blocked:r,upgrade:a,blocking:n,terminated:i}={}){const o=indexedDB.open(t,e),s=te(o);return a&&o.addEventListener("upgradeneeded",c=>{a(te(o.result),c.oldVersion,c.newVersion,te(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),s.then(c=>{i&&c.addEventListener("close",()=>i()),n&&c.addEventListener("versionchange",d=>n(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const Md=["get","getKey","getAll","getAllKeys","count"],Nd=["put","add","delete","clear"],aa=new Map;function li(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(aa.get(e))return aa.get(e);const r=e.replace(/FromIndex$/,""),a=e!==r,n=Nd.includes(r);if(!(r in(a?IDBIndex:IDBObjectStore).prototype)||!(n||Md.includes(r)))return;const i=async function(o,...s){const c=this.transaction(o,n?"readwrite":"readonly");let d=c.store;return a&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),n&&c.done]))[0]};return aa.set(e,i),i}si(t=>({...t,get:(e,r,a)=>li(e,r)||t.get(e,r,a),has:(e,r)=>!!li(e,r)||t.has(e,r)}));const Pd=["continue","continuePrimaryKey","advance"],ci={},na=new WeakMap,ui=new WeakMap,Od={get(t,e){if(!Pd.includes(e))return t[e];let r=ci[e];return r||(r=ci[e]=function(...a){na.set(this,ui.get(this)[e](...a))}),r}};async function*Fd(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const r=new Proxy(e,Od);for(ui.set(r,e),cr.set(r,ra(e));e;)yield r,e=await(na.get(r)||e.continue()),na.delete(r)}function di(t,e){return e===Symbol.asyncIterator&&Zr(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Zr(t,[IDBIndex,IDBObjectStore])}si(t=>({...t,get(e,r,a){return di(e,r)?Fd:t.get(e,r,a)},has(e,r){return di(e,r)||t.has(e,r)}}));const Pe=t=>Qt(t).with(A.number.lte(1e3),()=>`${Math.round(t)}KB`).with(A.number.lt(1e3*10),()=>`${(t/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(t/1e3)}MB`),fi=t=>{const e=t.find(r=>r.isHead);if(!e)throw new Error("No head node found");return e},Dd=t=>Object.entries(t).reduce((r,[a,n])=>(r[a]=n.value,r),{}),pe=t=>e=>e?e.type===t:!1;class Oe extends Error{constructor(){super("Aborted")}}function Ld(t,e=300){let r;return(...a)=>{clearTimeout(r),r=setTimeout(()=>{t.apply(this,a)},e)}}const hi=t=>typeof t=="string",Vd=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),pi=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Vd()}),jd=t=>Qt(t).with({nativeEvent:{submitter:A.select(A.union(A.instanceOf(HTMLButtonElement),A.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),gi=typeof window>"u"?void 0:Ad("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}}),Fe={getStateData:async(t,e)=>{var a;const r=bi({...t,flowKeys:e});return(a=await gi)==null?void 0:a.get("state",r)},setStateData:Ld(async t=>{var r;const e=bi(t);return(r=await gi)==null?void 0:r.put("state",t.data,e)},1e3)},ur=(t,e,r,a=0)=>{if(!e.nextId)return r(e.id,{stepsMade:a,remainingSteps:0}),{stepsMade:a,remainingSteps:0};const n=t.find(d=>d.id===e.nextId);if(n===void 0)return{stepsMade:a,remainingSteps:0};const i=e.type==="if-block"?e.branchId:void 0,o=t.find(d=>d.id===i),s=e.type.includes("question")?1:0;if(o){const d=s+Math.max(ur(t,n,r,a+s).remainingSteps,ur(t,o,r,a+s).remainingSteps);return r(e.id,{stepsMade:a,remainingSteps:d}),{stepsMade:a,remainingSteps:d}}const c=s+ur(t,n,r,a+s).remainingSteps;return r(e.id,{stepsMade:a,remainingSteps:c}),{stepsMade:a,remainingSteps:c}},zd=t=>{const e={},r=t.find(a=>a.isHead);return r&&ur(t,r,(a,n)=>{e[a]=n}),e},bi=t=>[...t.flowKeys,t.id,t.version].join("/"),qt=Ut({state:"idle"}),De=t=>{const{state:e,flow:r}=qt.value;if(e!=="loaded")return;yt(r,"No flow to update");const a=t(r.data);r.data=a,qt.value={state:e,flow:r},Fe.setStateData(r)},T={current$:qt,viewState$:Ut("closed"),inputHeight$:Ut(53),startFlow:async({flow:t,context:e={},flowKeys:r,title:a,analytics:n,job:i})=>{const s={data:await Fe.getStateData(t,r)??pi(),startedAt:new Date,nodeIdToProgress:zd(t.nodes),flowKeys:r,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:e,title:a,analytics:n,job:i};qt.value={state:"loaded",flow:s},Fe.setStateData(s)},cancelCurrentFlow:()=>{qt.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>De(t=>({...t,isFinished:!0})),setCurrentNodeId:t=>De(e=>(e.nodeHistory.push(t),e)),restart:()=>{const{state:t,flow:e}=qt.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=pi();qt.value={state:t,flow:{...e,data:r,startedAt:new Date}},Fe.setStateData(e)},addMessage:(t,e)=>{const r={...t,groupId:e};return De(a=>(a.messages.push(r),a))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:r}=qt.value;yt(e==="loaded","Application not loaded");const a=r.data.messages.filter(n=>!n.groupId||!t.includes(n.groupId));r.data.messages=a,Fe.setStateData(r)},setSubmission:(t,e)=>De(r=>(e===null?delete r.submissions[t]:r.submissions[t]=e,r)),setInput:t=>De(e=>({...e,currentInput:t??null}))},Rd=({message:t})=>{const{t:e}=nt();return l("div",{class:"flex flex-grow flex-col items-center justify-center",children:[l("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:[l("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"}),l("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"}),l("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),l("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),l("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),l("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),l("path",{d:"M38 56h19"})]}),l("div",{class:"flex flex-col gap-2 text-center",children:[l("p",{class:"text-error-11 font-bold",children:e("error_heading")}),t&&l("p",{class:"text-neutral-9 text-sm",children:t})]})]})},vi=t=>l("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[l("title",{children:"Loading"}),l("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)}}"}),l("g",{id:"s1",transform:"translate(12,0)",children:l("g",{id:"s2",transform:"scale(0,0)",children:l("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),l("g",{id:"s3",transform:"translate(12,12)",children:l("g",{id:"s4",transform:"scale(1,1)",children:l("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),l("g",{id:"s5",transform:"translate(12,0)",children:l("g",{id:"s6",transform:"scale(0,0)",children:l("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"})})}),l("g",{id:"s7",transform:"translate(12,0)",children:l("g",{id:"s8",transform:"scale(0,0)",children:l("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"})})})]}),wi=()=>l("div",{class:"flex flex-grow flex-col items-center justify-center",children:l(vi,{class:"text-neutral-6 h-8 w-8"})}),Bd=t=>{const r=t/100,a=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,a))*100)}%`},dr=({class:t,children:e,...r})=>l("button",{class:Xt("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",t),...r,children:l("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:e})}),Ud=()=>{if(T.current$.value.state!=="loaded")return null;const t=T.current$.value.flow.nodeIdToProgress,e=T.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const r=t[e];if(r===void 0)return null;const a=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return l("div",{class:"bg-accent-3",children:l("div",{style:{width:Bd(a)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Hd=({children:t,params:e})=>{const{t:r}=nt(),a=T.viewState$;return l(W,{children:l("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:[l("div",{class:"flex h-[var(--header-height)] gap-2",children:[l("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),l("button",{tabIndex:-1,onClick:()=>{a.value==="minimised"?a.value="maximised":a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1",onTouchStart:ia,children:l("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),l("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?l("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header"}):null,a.value==="minimised"?l(W,{children:[l(dr,{class:"view-switch",onTouchStart:ia,"aria-label":r("maximize"),onClick:()=>a.value="maximised",children:l("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),l(dr,{"aria-label":r("close_application"),onClick:T.cancelCurrentFlow,children:l("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):l(W,{children:[T.current$.value.state==="loaded"&&l(dr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[l("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"}),l("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),l(dr,{class:"view-switch",onTouchStart:ia,"aria-label":r("minimize"),onClick:()=>a.value="minimised",children:l("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]})]}),l(Ud,{})]})})};function ia(){}const qd=jn(()=>Promise.resolve().then(()=>fp).then(t=>t.ChatbotBody)),mi=$e("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"}}}),_i="outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",Kd=({open:t,...e})=>{const r=ft(null);return dt(()=>{const a=r.current;a&&(t?a.showModal():a.close())},[t]),l("dialog",{ref:r,...e})},Gd=({logger:t,apiClient:e,analytics:r,params:a})=>{const{state:n,flow:i,error:o}=T.current$.value,s=T.viewState$.value,c=n!=="idle"&&s==="maximised",d=ft(null),h=l(Hd,{params:a,children:i==null?void 0:i.title});return l(vd,{terms:a.terms,locale:void 0,children:[l(Kd,{open:c,onClose:()=>T.viewState$.value="minimised",children:l("div",{ref:d,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:mi({view:"maximised"}),children:l("div",{class:_i,children:[h,Qt({state:n,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>l(wi,{},"loading")).with({state:"loaded"},()=>l(Ee,{fallback:l(wi,{},"loading"),children:l(qd,{analytics:r,apiClient:e,logger:t})})).with({state:"error"},()=>l(Rd,{message:o})).exhaustive()]})})}),s==="minimised"?l("div",{class:mi({view:"minimised",class:"z-100 isolate"}),children:l("div",{class:_i,children:h})}):null]})},yi=at({id:cn(Z(),String),version:Or(),build:Or(),nodes:hn(ou()),context_schema:Se(su(bn(Z(),at({required:pn(),type:du([gn("string"),gn("number")])}))))}),Wd=at({flow:yi}),Yd=at({company:at({name:Z()}),flow:yi,job:at({id:cn(Z(),String),title:Z()})}),Xd=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-moz-user-select:none;-webkit-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){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :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: }[data-widget=inploi-chatbot] ::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: }[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .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}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-2{bottom:.5rem}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:.625rem}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-2{left:.5rem}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-2{right:.5rem}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:.25rem}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .h-1{height:.25rem}[data-widget=inploi-chatbot] .h-1\\.5{height:.375rem}[data-widget=inploi-chatbot] .h-16{height:4rem}[data-widget=inploi-chatbot] .h-4{height:1rem}[data-widget=inploi-chatbot] .h-48{height:12rem}[data-widget=inploi-chatbot] .h-8{height:2rem}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 1rem)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 1rem)}[data-widget=inploi-chatbot] .w-1{width:.25rem}[data-widget=inploi-chatbot] .w-1\\.5{width:.375rem}[data-widget=inploi-chatbot] .w-16{width:4rem}[data-widget=inploi-chatbot] .w-24{width:6rem}[data-widget=inploi-chatbot] .w-4{width:1rem}[data-widget=inploi-chatbot] .w-64{width:16rem}[data-widget=inploi-chatbot] .w-8{width:2rem}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:2rem}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .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))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;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))}[data-widget=inploi-chatbot] .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)}}[data-widget=inploi-chatbot] .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}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .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)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-moz-user-select:none;-webkit-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-moz-user-select:text;-webkit-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .appearance-none{-moz-appearance:none;-webkit-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:.25rem}[data-widget=inploi-chatbot] .gap-1\\.5{gap:.375rem}[data-widget=inploi-chatbot] .gap-2{gap:.5rem}[data-widget=inploi-chatbot] .gap-2\\.5{gap:.625rem}[data-widget=inploi-chatbot] .gap-3{gap:.75rem}[data-widget=inploi-chatbot] .gap-4{gap:1rem}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overflow-y-scroll{overflow-y:scroll}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:.25rem}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:1rem}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:1.5rem}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:.5rem}[data-widget=inploi-chatbot] .rounded-md{border-radius:.375rem}[data-widget=inploi-chatbot] .rounded-xl{border-radius:.75rem}[data-widget=inploi-chatbot] .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:.375rem}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:.375rem}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:.25rem}[data-widget=inploi-chatbot] .p-1\\.5{padding:.375rem}[data-widget=inploi-chatbot] .p-10{padding:2.5rem}[data-widget=inploi-chatbot] .p-11{padding:2.75rem}[data-widget=inploi-chatbot] .p-12{padding:3rem}[data-widget=inploi-chatbot] .p-2{padding:.5rem}[data-widget=inploi-chatbot] .p-2\\.5{padding:.625rem}[data-widget=inploi-chatbot] .p-3{padding:.75rem}[data-widget=inploi-chatbot] .p-4{padding:1rem}[data-widget=inploi-chatbot] .p-5{padding:1.25rem}[data-widget=inploi-chatbot] .p-6{padding:1.5rem}[data-widget=inploi-chatbot] .p-7{padding:1.75rem}[data-widget=inploi-chatbot] .p-8{padding:2rem}[data-widget=inploi-chatbot] .p-9{padding:2.25rem}[data-widget=inploi-chatbot] .px-1{padding-left:.25rem;padding-right:.25rem}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:.375rem;padding-right:.375rem}[data-widget=inploi-chatbot] .px-2{padding-left:.5rem;padding-right:.5rem}[data-widget=inploi-chatbot] .px-2\\.5{padding-left:.625rem;padding-right:.625rem}[data-widget=inploi-chatbot] .px-3{padding-left:.75rem;padding-right:.75rem}[data-widget=inploi-chatbot] .px-4{padding-left:1rem;padding-right:1rem}[data-widget=inploi-chatbot] .px-5{padding-left:1.25rem;padding-right:1.25rem}[data-widget=inploi-chatbot] .py-0{padding-top:0;padding-bottom:0}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}[data-widget=inploi-chatbot] .py-1{padding-top:.25rem;padding-bottom:.25rem}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-widget=inploi-chatbot] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}[data-widget=inploi-chatbot] .py-3{padding-top:.75rem;padding-bottom:.75rem}[data-widget=inploi-chatbot] .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:.5rem}[data-widget=inploi-chatbot] .pb-6{padding-bottom:1.5rem}[data-widget=inploi-chatbot] .pl-1{padding-left:.25rem}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:.375rem}[data-widget=inploi-chatbot] .pl-2{padding-left:.5rem}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:.625rem}[data-widget=inploi-chatbot] .pl-3{padding-left:.75rem}[data-widget=inploi-chatbot] .pl-4{padding-left:1rem}[data-widget=inploi-chatbot] .pr-1{padding-right:.25rem}[data-widget=inploi-chatbot] .pr-16{padding-right:4rem}[data-widget=inploi-chatbot] .pr-2{padding-right:.5rem}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:.625rem}[data-widget=inploi-chatbot] .pr-3{padding-right:.75rem}[data-widget=inploi-chatbot] .pr-4{padding-right:1rem}[data-widget=inploi-chatbot] .pt-2{padding-top:.5rem}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:.625rem}[data-widget=inploi-chatbot] .pt-3{padding-top:.75rem}[data-widget=inploi-chatbot] .pt-5{padding-top:1.25rem}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:1rem;line-height:1.5rem}[data-widget=inploi-chatbot] .text-sm{font-size:.875rem;line-height:1.25rem}[data-widget=inploi-chatbot] .text-xs{font-size:.75rem;line-height:1rem}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .leading-3{line-height:.75rem}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}[data-widget=inploi-chatbot] .text-accent-1{color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-interactive-copy{color:var(--i-interactive-copy)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-neutral-8{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .text-neutral-9{color:var(--i-color-n-9)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 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)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .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}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .duration-700{transition-duration:.7s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[height\\]{will-change:height}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .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}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--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)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--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)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;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))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--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)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--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)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;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))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;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))}@media (pointer: coarse){[data-widget=inploi-chatbot] .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}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .\\[\\&\\: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))}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}
|
|
1
|
+
var _p=Object.defineProperty;var yp=(Wt,gt,Tt)=>gt in Wt?_p(Wt,gt,{enumerable:!0,configurable:!0,writable:!0,value:Tt}):Wt[gt]=Tt;var xo=(Wt,gt,Tt)=>(yp(Wt,typeof gt!="symbol"?gt+"":gt,Tt),Tt);(function(){"use strict";var Wt=t=>t,gt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ko=Array.isArray,Sr=ko,So=typeof gt=="object"&>&>.Object===Object&>,Co=So,$o=Co,Eo=typeof self=="object"&&self&&self.Object===Object&&self,Io=$o||Eo||Function("return this")(),Cr=Io,To=Cr,Ao=To.Symbol,$r=Ao,Ta=$r,Aa=Object.prototype,Mo=Aa.hasOwnProperty,No=Aa.toString,me=Ta?Ta.toStringTag:void 0;function Po(t){var e=Mo.call(t,me),r=t[me];try{t[me]=void 0;var a=!0}catch{}var n=No.call(t);return a&&(e?t[me]=r:delete t[me]),n}var Oo=Po,Fo=Object.prototype,Do=Fo.toString;function Lo(t){return Do.call(t)}var Vo=Lo,Ma=$r,jo=Oo,zo=Vo,Ro="[object Null]",Bo="[object Undefined]",Na=Ma?Ma.toStringTag:void 0;function Uo(t){return t==null?t===void 0?Bo:Ro:Na&&Na in Object(t)?jo(t):zo(t)}var Pa=Uo;function Ho(t){return t!=null&&typeof t=="object"}var qo=Ho,Ko=Pa,Go=qo,Wo="[object Symbol]";function Yo(t){return typeof t=="symbol"||Go(t)&&Ko(t)==Wo}var Er=Yo,Xo=Sr,Jo=Er,Zo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qo=/^\w*$/;function ts(t,e){if(Xo(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Jo(t)?!0:Qo.test(t)||!Zo.test(t)||e!=null&&t in Object(e)}var es=ts;function rs(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Oa=rs,as=Pa,ns=Oa,is="[object AsyncFunction]",os="[object Function]",ss="[object GeneratorFunction]",ls="[object Proxy]";function cs(t){if(!ns(t))return!1;var e=as(t);return e==os||e==ss||e==is||e==ls}var us=cs,ds=Cr,fs=ds["__core-js_shared__"],hs=fs,Ir=hs,Fa=function(){var t=/[^.]+$/.exec(Ir&&Ir.keys&&Ir.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ps(t){return!!Fa&&Fa in t}var gs=ps,bs=Function.prototype,vs=bs.toString;function ws(t){if(t!=null){try{return vs.call(t)}catch{}try{return t+""}catch{}}return""}var ms=ws,_s=us,ys=gs,xs=Oa,ks=ms,Ss=/[\\^$.*+?()[\]{}|]/g,Cs=/^\[object .+?Constructor\]$/,$s=Function.prototype,Es=Object.prototype,Is=$s.toString,Ts=Es.hasOwnProperty,As=RegExp("^"+Is.call(Ts).replace(Ss,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ms(t){if(!xs(t)||ys(t))return!1;var e=_s(t)?As:Cs;return e.test(ks(t))}var Ns=Ms;function Ps(t,e){return t==null?void 0:t[e]}var Os=Ps,Fs=Ns,Ds=Os;function Ls(t,e){var r=Ds(t,e);return Fs(r)?r:void 0}var Da=Ls,Vs=Da,js=Vs(Object,"create"),qe=js,La=qe;function zs(){this.__data__=La?La(null):{},this.size=0}var Rs=zs;function Bs(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Us=Bs,Hs=qe,qs="__lodash_hash_undefined__",Ks=Object.prototype,Gs=Ks.hasOwnProperty;function Ws(t){var e=this.__data__;if(Hs){var r=e[t];return r===qs?void 0:r}return Gs.call(e,t)?e[t]:void 0}var Ys=Ws,Xs=qe,Js=Object.prototype,Zs=Js.hasOwnProperty;function Qs(t){var e=this.__data__;return Xs?e[t]!==void 0:Zs.call(e,t)}var tl=Qs,el=qe,rl="__lodash_hash_undefined__";function al(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=el&&e===void 0?rl:e,this}var nl=al,il=Rs,ol=Us,sl=Ys,ll=tl,cl=nl;function ie(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}ie.prototype.clear=il,ie.prototype.delete=ol,ie.prototype.get=sl,ie.prototype.has=ll,ie.prototype.set=cl;var ul=ie;function dl(){this.__data__=[],this.size=0}var fl=dl;function hl(t,e){return t===e||t!==t&&e!==e}var pl=hl,gl=pl;function bl(t,e){for(var r=t.length;r--;)if(gl(t[r][0],e))return r;return-1}var Ke=bl,vl=Ke,wl=Array.prototype,ml=wl.splice;function _l(t){var e=this.__data__,r=vl(e,t);if(r<0)return!1;var a=e.length-1;return r==a?e.pop():ml.call(e,r,1),--this.size,!0}var yl=_l,xl=Ke;function kl(t){var e=this.__data__,r=xl(e,t);return r<0?void 0:e[r][1]}var Sl=kl,Cl=Ke;function $l(t){return Cl(this.__data__,t)>-1}var El=$l,Il=Ke;function Tl(t,e){var r=this.__data__,a=Il(r,t);return a<0?(++this.size,r.push([t,e])):r[a][1]=e,this}var Al=Tl,Ml=fl,Nl=yl,Pl=Sl,Ol=El,Fl=Al;function oe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}oe.prototype.clear=Ml,oe.prototype.delete=Nl,oe.prototype.get=Pl,oe.prototype.has=Ol,oe.prototype.set=Fl;var Dl=oe,Ll=Da,Vl=Cr,jl=Ll(Vl,"Map"),zl=jl,Va=ul,Rl=Dl,Bl=zl;function Ul(){this.size=0,this.__data__={hash:new Va,map:new(Bl||Rl),string:new Va}}var Hl=Ul;function ql(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Kl=ql,Gl=Kl;function Wl(t,e){var r=t.__data__;return Gl(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ge=Wl,Yl=Ge;function Xl(t){var e=Yl(this,t).delete(t);return this.size-=e?1:0,e}var Jl=Xl,Zl=Ge;function Ql(t){return Zl(this,t).get(t)}var tc=Ql,ec=Ge;function rc(t){return ec(this,t).has(t)}var ac=rc,nc=Ge;function ic(t,e){var r=nc(this,t),a=r.size;return r.set(t,e),this.size+=r.size==a?0:1,this}var oc=ic,sc=Hl,lc=Jl,cc=tc,uc=ac,dc=oc;function se(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}se.prototype.clear=sc,se.prototype.delete=lc,se.prototype.get=cc,se.prototype.has=uc,se.prototype.set=dc;var fc=se,ja=fc,hc="Expected a function";function Tr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(hc);var r=function(){var a=arguments,n=e?e.apply(this,a):a[0],i=r.cache;if(i.has(n))return i.get(n);var o=t.apply(this,a);return r.cache=i.set(n,o)||i,o};return r.cache=new(Tr.Cache||ja),r}Tr.Cache=ja;var pc=Tr,gc=pc,bc=500;function vc(t){var e=gc(t,function(a){return r.size===bc&&r.clear(),a}),r=e.cache;return e}var wc=vc,mc=wc,_c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yc=/\\(\\)?/g,xc=mc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(_c,function(r,a,n,i){e.push(n?i.replace(yc,"$1"):a||r)}),e}),kc=xc;function Sc(t,e){for(var r=-1,a=t==null?0:t.length,n=Array(a);++r<a;)n[r]=e(t[r],r,t);return n}var Cc=Sc,za=$r,$c=Cc,Ec=Sr,Ic=Er,Tc=1/0,Ra=za?za.prototype:void 0,Ba=Ra?Ra.toString:void 0;function Ua(t){if(typeof t=="string")return t;if(Ec(t))return $c(t,Ua)+"";if(Ic(t))return Ba?Ba.call(t):"";var e=t+"";return e=="0"&&1/t==-Tc?"-0":e}var Ac=Ua,Mc=Ac;function Nc(t){return t==null?"":Mc(t)}var Pc=Nc,Oc=Sr,Fc=es,Dc=kc,Lc=Pc;function Vc(t,e){return Oc(t)?t:Fc(t,e)?[t]:Dc(Lc(t))}var jc=Vc,zc=Er,Rc=1/0;function Bc(t){if(typeof t=="string"||zc(t))return t;var e=t+"";return e=="0"&&1/t==-Rc?"-0":e}var Uc=Bc,Hc=jc,qc=Uc;function Kc(t,e){e=Hc(e,t);for(var r=0,a=e.length;t!=null&&r<a;)t=t[qc(e[r++])];return r&&r==a?t:void 0}var Gc=Kc,Wc=Gc;function Yc(t,e,r){var a=t==null?void 0:Wc(t,e);return a===void 0?r:a}var Xc=Yc;const _e=Tt(Xc);var ye,C,Ha,qa,Yt,Ka,Ga,Ar,Wa,le={},Ya=[],Jc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,We=Array.isArray;function At(t,e){for(var r in e)t[r]=e[r];return t}function Xa(t){var e=t.parentNode;e&&e.removeChild(t)}function ut(t,e,r){var a,n,i,o={};for(i in e)i=="key"?a=e[i]:i=="ref"?n=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?ye.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return xe(t,o,a,n,null)}function xe(t,e,r,a,n){var i={type:t,props:e,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++Ha};return n==null&&C.vnode!=null&&C.vnode(i),i}function Zc(){return{current:null}}function W(t){return t.children}function mt(t,e){this.props=t,this.context=e}function Ye(t,e){if(e==null)return t.__?Ye(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Ye(t):null}function Ja(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return Ja(t)}}function Mr(t){(!t.__d&&(t.__d=!0)&&Yt.push(t)&&!Xe.__r++||Ka!==C.debounceRendering)&&((Ka=C.debounceRendering)||Ga)(Xe)}function Xe(){var t,e,r,a,n,i,o,s,c;for(Yt.sort(Ar);t=Yt.shift();)t.__d&&(e=Yt.length,a=void 0,n=void 0,i=void 0,s=(o=(r=t).__v).__e,(c=r.__P)&&(a=[],n=[],(i=At({},o)).__v=o.__v+1,Nr(c,o,i,r.__n,c.ownerSVGElement!==void 0,o.__h!=null?[s]:null,a,s??Ye(o),o.__h,n),nn(a,o,n),o.__e!=s&&Ja(o)),Yt.length>e&&Yt.sort(Ar));Xe.__r=0}function Za(t,e,r,a,n,i,o,s,c,d,h){var u,p,v,g,_,k,y,m,A,O,M=0,H=a&&a.__k||Ya,et=H.length,pt=et,L=e.length;for(r.__k=[],u=0;u<L;u++)(g=r.__k[u]=(g=e[u])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?xe(null,g,null,null,g):We(g)?xe(W,{children:g},null,null,null):g.__b>0?xe(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(m=Qc(g,H,y=u+M,pt))===-1?v=le:(v=H[m]||le,H[m]=void 0,pt--),Nr(t,g,v,n,i,o,s,c,d,h),_=g.__e,(p=g.ref)&&v.ref!=p&&(v.ref&&Pr(v.ref,null,g),h.push(p,g.__c||_,g)),_!=null&&(k==null&&(k=_),O=!(A=v===le||v.__v===null)&&m===y,A?m==-1&&M--:m!==y&&(m===y+1?(M++,O=!0):m>y?pt>L-y?(M+=m-y,O=!0):M--:M=m<y&&m==y-1?m-y:0),y=u+M,O=O||m==u&&!A,typeof g.type!="function"||m===y&&v.__k!==g.__k?typeof g.type=="function"||O?g.__d!==void 0?(c=g.__d,g.__d=void 0):c=_.nextSibling:c=tn(t,_,c):c=Qa(g,c,t),typeof r.type=="function"&&(r.__d=c)));for(r.__e=k,u=et;u--;)H[u]!=null&&(typeof r.type=="function"&&H[u].__e!=null&&H[u].__e==r.__d&&(r.__d=H[u].__e.nextSibling),on(H[u],H[u]))}function Qa(t,e,r){for(var a,n=t.__k,i=0;n&&i<n.length;i++)(a=n[i])&&(a.__=t,e=typeof a.type=="function"?Qa(a,e,r):tn(r,a.__e,e));return e}function Mt(t,e){return e=e||[],t==null||typeof t=="boolean"||(We(t)?t.some(function(r){Mt(r,e)}):e.push(t)),e}function tn(t,e,r){return r==null||r.parentNode!==t?t.insertBefore(e,null):e==r&&e.parentNode!=null||t.insertBefore(e,r),e.nextSibling}function Qc(t,e,r,a){var n=t.key,i=t.type,o=r-1,s=r+1,c=e[r];if(c===null||c&&n==c.key&&i===c.type)return r;if(a>(c!=null?1:0))for(;o>=0||s<e.length;){if(o>=0){if((c=e[o])&&n==c.key&&i===c.type)return o;o--}if(s<e.length){if((c=e[s])&&n==c.key&&i===c.type)return s;s++}}return-1}function tu(t,e,r,a,n){var i;for(i in r)i==="children"||i==="key"||i in e||Je(t,i,null,r[i],a);for(i in e)n&&typeof e[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===e[i]||Je(t,i,e[i],r[i],a)}function en(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Jc.test(e)?r:r+"px"}function Je(t,e,r,a,n){var i;t:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof a=="string"&&(t.style.cssText=a=""),a)for(e in a)r&&e in r||en(t.style,e,"");if(r)for(e in r)a&&r[e]===a[e]||en(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?a||t.addEventListener(e,i?an:rn,i):t.removeEventListener(e,i?an:rn,i);else if(e!=="dangerouslySetInnerHTML"){if(n)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,r))}}function rn(t){return this.l[t.type+!1](C.event?C.event(t):t)}function an(t){return this.l[t.type+!0](C.event?C.event(t):t)}function Nr(t,e,r,a,n,i,o,s,c,d){var h,u,p,v,g,_,k,y,m,A,O,M,H,et,pt,L=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(c=r.__h,s=e.__e=r.__e,e.__h=null,i=[s]),(h=C.__b)&&h(e);try{t:if(typeof L=="function"){if(y=e.props,m=(h=L.contextType)&&a[h.__c],A=h?m?m.props.value:h.__:a,r.__c?k=(u=e.__c=r.__c).__=u.__E:("prototype"in L&&L.prototype.render?e.__c=u=new L(y,A):(e.__c=u=new mt(y,A),u.constructor=L,u.render=ru),m&&m.sub(u),u.props=y,u.state||(u.state={}),u.context=A,u.__n=a,p=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),L.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=At({},u.__s)),At(u.__s,L.getDerivedStateFromProps(y,u.__s))),v=u.props,g=u.state,u.__v=e,p)L.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(L.getDerivedStateFromProps==null&&y!==v&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,A),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,A)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(u.props=y,u.state=u.__s,u.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(lt){lt&&(lt.__=e)}),O=0;O<u._sb.length;O++)u.__h.push(u._sb[O]);u._sb=[],u.__h.length&&o.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,A),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(v,g,_)})}if(u.context=A,u.props=y,u.__P=t,u.__e=!1,M=C.__r,H=0,"prototype"in L&&L.prototype.render){for(u.state=u.__s,u.__d=!1,M&&M(e),h=u.render(u.props,u.state,u.context),et=0;et<u._sb.length;et++)u.__h.push(u._sb[et]);u._sb=[]}else do u.__d=!1,M&&M(e),h=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++H<25);u.state=u.__s,u.getChildContext!=null&&(a=At(At({},a),u.getChildContext())),p||u.getSnapshotBeforeUpdate==null||(_=u.getSnapshotBeforeUpdate(v,g)),Za(t,We(pt=h!=null&&h.type===W&&h.key==null?h.props.children:h)?pt:[pt],e,r,a,n,i,o,s,c,d),u.base=e.__e,e.__h=null,u.__h.length&&o.push(u),k&&(u.__E=u.__=null)}else i==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=eu(r.__e,e,r,a,n,i,o,c,d);(h=C.diffed)&&h(e)}catch(lt){e.__v=null,(c||i!=null)&&(e.__e=s,e.__h=!!c,i[i.indexOf(s)]=null),C.__e(lt,e,r)}}function nn(t,e,r){for(var a=0;a<r.length;a++)Pr(r[a],r[++a],r[++a]);C.__c&&C.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(i){i.call(n)})}catch(i){C.__e(i,n.__v)}})}function eu(t,e,r,a,n,i,o,s,c){var d,h,u,p=r.props,v=e.props,g=e.type,_=0;if(g==="svg"&&(n=!0),i!=null){for(;_<i.length;_++)if((d=i[_])&&"setAttribute"in d==!!g&&(g?d.localName===g:d.nodeType===3)){t=d,i[_]=null;break}}if(t==null){if(g===null)return document.createTextNode(v);t=n?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,v.is&&v),i=null,s=!1}if(g===null)p===v||s&&t.data===v||(t.data=v);else{if(i=i&&ye.call(t.childNodes),h=(p=r.props||le).dangerouslySetInnerHTML,u=v.dangerouslySetInnerHTML,!s){if(i!=null)for(p={},_=0;_<t.attributes.length;_++)p[t.attributes[_].name]=t.attributes[_].value;(u||h)&&(u&&(h&&u.__html==h.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(tu(t,v,p,n,s),u)e.__k=[];else if(Za(t,We(_=e.props.children)?_:[_],e,r,a,n&&g!=="foreignObject",i,o,i?i[0]:r.__k&&Ye(r,0),s,c),i!=null)for(_=i.length;_--;)i[_]!=null&&Xa(i[_]);s||("value"in v&&(_=v.value)!==void 0&&(_!==t.value||g==="progress"&&!_||g==="option"&&_!==p.value)&&Je(t,"value",_,p.value,!1),"checked"in v&&(_=v.checked)!==void 0&&_!==t.checked&&Je(t,"checked",_,p.checked,!1))}return t}function Pr(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(a){C.__e(a,r)}}function on(t,e,r){var a,n;if(C.unmount&&C.unmount(t),(a=t.ref)&&(a.current&&a.current!==t.__e||Pr(a,null,e)),(a=t.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){C.__e(i,e)}a.base=a.__P=null,t.__c=void 0}if(a=t.__k)for(n=0;n<a.length;n++)a[n]&&on(a[n],e,r||typeof t.type!="function");r||t.__e==null||Xa(t.__e),t.__=t.__e=t.__d=void 0}function ru(t,e,r){return this.constructor(t,r)}function ce(t,e,r){var a,n,i,o;C.__&&C.__(t,e),n=(a=typeof r=="function")?null:r&&r.__k||e.__k,i=[],o=[],Nr(e,t=(!a&&r||e).__k=ut(W,null,[t]),n||le,le,e.ownerSVGElement!==void 0,!a&&r?[r]:n?null:e.firstChild?ye.call(e.childNodes):null,i,!a&&r?r:n?n.__e:e.firstChild,a,o),nn(i,t,o)}function sn(t,e){ce(t,e,sn)}function au(t,e,r){var a,n,i,o,s=At({},t.props);for(i in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)i=="key"?a=e[i]:i=="ref"?n=e[i]:s[i]=e[i]===void 0&&o!==void 0?o[i]:e[i];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):r),xe(t.type,s,a||t.key,n||t.ref,null)}function ln(t,e){var r={__c:e="__cC"+Wa++,__:t,Consumer:function(a,n){return a.children(n)},Provider:function(a){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,Mr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),a.children}};return r.Provider.__=r.Consumer.contextType=r}ye=Ya.slice,C={__e:function(t,e,r,a){for(var n,i,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(t)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(t,a||{}),o=n.__d),o)return n.__E=n}catch(s){t=s}throw t}},Ha=0,qa=function(t){return t!=null&&t.constructor===void 0},mt.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=At({},this.state),typeof t=="function"&&(t=t(At({},r),this.props)),t&&At(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Mr(this))},mt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Mr(this))},mt.prototype.render=W,Yt=[],Ga=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(t,e){return t.__v.__b-e.__v.__b},Xe.__r=0,Wa=0;var Ze=class extends Error{constructor(e){super(e[0].message);xo(this,"issues");this.name="ValiError",this.issues=e}};function cn(t,e){return{...t,_parse(r,a){return t._parse(e(r),a)}}}function ke(t){return{issues:t}}function rt(t){return{output:t}}function nu(t,e){return{reason:t==null?void 0:t.reason,validation:e.validation,origin:(t==null?void 0:t.origin)||"value",message:e.message,input:e.input,path:e.path,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly,skipPipe:t==null?void 0:t.skipPipe}}function iu(t,e){return{reason:e,origin:t==null?void 0:t.origin,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly,skipPipe:t==null?void 0:t.skipPipe}}function Lt(t,e,r,a){if(!e||!e.length||r!=null&&r.skipPipe)return rt(t);let n,i,o=t;for(const s of e){const c=s._parse(o);if(c.issues){n=n||iu(r,a);for(const d of c.issues){const h=nu(n,d);i?i.push(h):i=[h]}if(n.abortEarly||n.abortPipeEarly)break}else o=c.output}return i?ke(i):rt(o)}function Vt(t,e){return Array.isArray(t)?[void 0,t]:[t,e]}function un(t){return typeof t=="function"?t():t}function jt(t,e,r,a){return ke([{validation:t,message:un(e),input:r,requirement:a}])}function dn(t,e,r){if(!t||typeof t=="object"&&!Array.isArray(t)){const[i,o]=Vt(e,r);return[t,i,o]}const[a,n]=Vt(t,e);return[void 0,a,n]}function Nt(t,e,r,a,n,i){return{issues:[{reason:e,validation:r,origin:(t==null?void 0:t.origin)||"value",message:un(a),input:n,issues:i,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly,skipPipe:t==null?void 0:t.skipPipe}]}}function fn(t){return typeof t.default=="function"?t.default():t.default}function ou(t){return{type:"any",async:!1,pipe:t,_parse(e,r){return Lt(e,this.pipe,r,"any")}}}function hn(t,e,r){const[a="Invalid type",n]=Vt(e,r);return{type:"array",async:!1,item:t,message:a,pipe:n,_parse(i,o){if(!Array.isArray(i))return Nt(o,"type","array",this.message,i);let s;const c=[];for(let d=0;d<i.length;d++){const h=i[d],u=this.item._parse(h,o);if(u.issues){const p={type:"array",input:i,key:d,value:h};for(const v of u.issues)v.path?v.path.unshift(p):v.path=[p],s==null||s.push(v);if(s||(s=u.issues),o!=null&&o.abortEarly)break}else c.push(u.output)}return s?ke(s):Lt(c,this.pipe,o,"array")}}}function pn(t,e){const[r="Invalid type",a]=Vt(t,e);return{type:"boolean",async:!1,message:r,pipe:a,_parse(n,i){return typeof n!="boolean"?Nt(i,"type","boolean",this.message,n):Lt(n,this.pipe,i,"boolean")}}}function gn(t,e="Invalid type"){return{type:"literal",async:!1,literal:t,message:e,_parse(r,a){return r!==this.literal?Nt(a,"type","literal",this.message,r):rt(r)}}}function su(t,e){return{type:"nullable",async:!1,wrapped:t,default:e,_parse(r,a){if(r===null){const n=fn(this);if(n===void 0)return rt(r);r=n}return this.wrapped._parse(r,a)}}}function Or(t,e){const[r="Invalid type",a]=Vt(t,e);return{type:"number",async:!1,message:r,pipe:a,_parse(n,i){return typeof n!="number"||isNaN(n)?Nt(i,"type","number",this.message,n):Lt(n,this.pipe,i,"number")}}}function at(t,e,r,a){const[n,i="Invalid type",o]=dn(e,r,a);let s;return{type:"object",async:!1,entries:t,rest:n,message:i,pipe:o,_parse(c,d){if(!c||typeof c!="object")return Nt(d,"type","object",this.message,c);s=s||Object.entries(this.entries);let h;const u={};for(const[p,v]of s){const g=c[p],_=v._parse(g,d);if(_.issues){const k={type:"object",input:c,key:p,value:g};for(const y of _.issues)y.path?y.path.unshift(k):y.path=[k],h==null||h.push(y);if(h||(h=_.issues),d!=null&&d.abortEarly)break}else(_.output!==void 0||p in c)&&(u[p]=_.output)}if(this.rest&&!(d!=null&&d.abortEarly&&h)){for(const p in c)if(!(p in this.entries)){const v=c[p],g=this.rest._parse(v,d);if(g.issues){const _={type:"object",input:c,key:p,value:v};for(const k of g.issues)k.path?k.path.unshift(_):k.path=[_],h==null||h.push(k);if(h||(h=g.issues),d!=null&&d.abortEarly)break}else u[p]=g.output}}return h?ke(h):Lt(u,this.pipe,d,"object")}}}function Se(t,e){return{type:"optional",async:!1,wrapped:t,default:e,_parse(r,a){if(r===void 0){const n=fn(this);if(n===void 0)return rt(r);r=n}return this.wrapped._parse(r,a)}}}function lu(t,e="Invalid type"){return{type:"picklist",async:!1,options:t,message:e,_parse(r,a){return this.options.includes(r)?rt(r):Nt(a,"type","picklist",this.message,r)}}}function Z(t,e){const[r="Invalid type",a]=Vt(t,e);return{type:"string",async:!1,message:r,pipe:a,_parse(n,i){return typeof n!="string"?Nt(i,"type","string",this.message,n):Lt(n,this.pipe,i,"string")}}}function cu(t,e,r,a){if(typeof e=="object"&&!Array.isArray(e)){const[o,s]=Vt(r,a);return[t,e,o,s]}const[n,i]=Vt(e,r);return[Z(),t,n,i]}var uu=["__proto__","prototype","constructor"];function bn(t,e,r,a){const[n,i,o="Invalid type",s]=cu(t,e,r,a);return{type:"record",async:!1,key:n,value:i,message:o,pipe:s,_parse(c,d){if(!c||typeof c!="object")return Nt(d,"type","record",this.message,c);let h;const u={};for(const[p,v]of Object.entries(c))if(!uu.includes(p)){let g;const _=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(_.issues){g={type:"record",input:c,key:p,value:v};for(const y of _.issues)y.path=[g],h==null||h.push(y);if(h||(h=_.issues),d!=null&&d.abortEarly)break}const k=this.value._parse(v,d);if(k.issues){g=g||{type:"record",input:c,key:p,value:v};for(const y of k.issues)y.path?y.path.unshift(g):y.path=[g],h==null||h.push(y);if(h||(h=k.issues),d!=null&&d.abortEarly)break}!_.issues&&!k.issues&&(u[_.output]=k.output)}return h?ke(h):Lt(u,this.pipe,d,"record")}}}function du(t,e="Invalid type"){return{type:"union",async:!1,options:t,message:e,_parse(r,a){let n,i;for(const o of this.options){const s=o._parse(r,a);if(s.issues)if(n)for(const c of s.issues)n.push(c);else n=s.issues;else{i=[s.output];break}}return i?rt(i[0]):Nt(a,"type","union",this.message,r,n)}}}function Qe(t,e,r){const a=t._parse(e,r);if(a.issues)throw new Ze(a.issues);return a.output}async function fu(t,e,r){const a=await t._parse(e,r);if(a.issues)throw new Ze(a.issues);return a.output}function hu(t,e,r,a){const[n,i,o]=dn(e,r,a);return at(Object.entries(t.entries).reduce((s,[c,d])=>({...s,[c]:Se(d)}),{}),n,i,o)}function pu(t,e,r){const a=t._parse(e,r);return a.issues?{success:!1,error:new Ze(a.issues),issues:a.issues}:{success:!0,data:a.output,output:a.output}}function vn(t,e,r){return{...t,_parse(a,n){const i=t._parse(a,n);if(i.issues)return i;const o=e(i.output);return r&&!Array.isArray(r)?r._parse(o,n):Lt(o,r,n,typeof o)}}}var gu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function bu(t,e="Invalid input"){return{type:"custom",async:!1,message:e,requirement:t,_parse(r){return this.requirement(r)?rt(r):jt(this.type,this.message,r,this.requirement)}}}function vu(t="Invalid email"){return{type:"email",async:!1,message:t,requirement:gu,_parse(e){return this.requirement.test(e)?rt(e):jt(this.type,this.message,e,this.requirement)}}}function tr(t,e="Invalid length"){return{type:"max_length",async:!1,message:e,requirement:t,_parse(r){return r.length>this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function wu(t,e="Invalid value"){return{type:"max_value",async:!1,message:e,requirement:t,_parse(r){return r>this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function Ce(t,e="Invalid length"){return{type:"min_length",async:!1,message:e,requirement:t,_parse(r){return r.length<this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function mu(t,e="Invalid value"){return{type:"min_value",async:!1,message:e,requirement:t,_parse(r){return r<this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function _u(t,e="Invalid regex"){return{type:"regex",async:!1,message:e,requirement:t,_parse(r){return this.requirement.test(r)?rt(r):jt(this.type,this.message,r,this.requirement)}}}function yu(t="Invalid URL"){return{type:"url",async:!1,message:t,requirement(e){try{return new URL(e),!0}catch{return!1}},_parse(e){return this.requirement(e)?rt(e):jt(this.type,this.message,e,this.requirement)}}}function wn(t){var e,r,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=wn(t[e]))&&(a&&(a+=" "),a+=r);else for(e in t)t[e]&&(a&&(a+=" "),a+=e);return a}function Xt(){for(var t,e,r=0,a="";r<arguments.length;)(t=arguments[r++])&&(e=wn(t))&&(a&&(a+=" "),a+=e);return a}const mn=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,_n=Xt,$e=(t,e)=>r=>{var a;if((e==null?void 0:e.variants)==null)return _n(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:i}=e,o=Object.keys(n).map(d=>{const h=r==null?void 0:r[d],u=i==null?void 0:i[d];if(h===null)return null;const p=mn(h)||mn(u);return n[d][p]}),s=r&&Object.entries(r).reduce((d,h)=>{let[u,p]=h;return p===void 0||(d[u]=p),d},{}),c=e==null||(a=e.compoundVariants)===null||a===void 0?void 0:a.reduce((d,h)=>{let{class:u,className:p,...v}=h;return Object.entries(v).every(g=>{let[_,k]=g;return Array.isArray(k)?k.includes({...i,...s}[_]):{...i,...s}[_]===k})?[...d,u,p]:d},[]);return _n(t,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};var zt,z,Fr,yn,ue=0,xn=[],er=[],kn=C.__b,Sn=C.__r,Cn=C.diffed,$n=C.__c,En=C.unmount;function de(t,e){C.__h&&C.__h(z,t,ue||e),ue=0;var r=z.__H||(z.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:er}),r.__[t]}function bt(t){return ue=1,In(Mn,t)}function In(t,e,r){var a=de(zt++,2);if(a.t=t,!a.__c&&(a.__=[r?r(e):Mn(void 0,e),function(s){var c=a.__N?a.__N[0]:a.__[0],d=a.t(c,s);c!==d&&(a.__N=[d,a.__[1]],a.__c.setState({}))}],a.__c=z,!z.u)){var n=function(s,c,d){if(!a.__c.__H)return!0;var h=a.__c.__H.__.filter(function(p){return p.__c});if(h.every(function(p){return!p.__N}))return!i||i.call(this,s,c,d);var u=!1;return h.forEach(function(p){if(p.__N){var v=p.__[0];p.__=p.__N,p.__N=void 0,v!==p.__[0]&&(u=!0)}}),!(!u&&a.__c.props===s)&&(!i||i.call(this,s,c,d))};z.u=!0;var i=z.shouldComponentUpdate,o=z.componentWillUpdate;z.componentWillUpdate=function(s,c,d){if(this.__e){var h=i;i=void 0,n(s,c,d),i=h}o&&o.call(this,s,c,d)},z.shouldComponentUpdate=n}return a.__N||a.__}function _t(t,e){var r=de(zt++,3);!C.__s&&Lr(r.__H,e)&&(r.__=t,r.i=e,z.__H.__h.push(r))}function dt(t,e){var r=de(zt++,4);!C.__s&&Lr(r.__H,e)&&(r.__=t,r.i=e,z.__h.push(r))}function ft(t){return ue=5,Pt(function(){return{current:t}},[])}function xu(t,e,r){ue=6,dt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},r==null?r:r.concat(t))}function Pt(t,e){var r=de(zt++,7);return Lr(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function ku(t,e){return ue=8,Pt(function(){return t},e)}function Tn(t){var e=z.context[t.__c],r=de(zt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(z)),e.props.value):t.__}function Su(t,e){C.useDebugValue&&C.useDebugValue(e?e(t):t)}function Cu(){var t=de(zt++,11);if(!t.__){for(var e=z.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function $u(){for(var t;t=xn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(rr),t.__H.__h.forEach(Dr),t.__H.__h=[]}catch(e){t.__H.__h=[],C.__e(e,t.__v)}}C.__b=function(t){z=null,kn&&kn(t)},C.__r=function(t){Sn&&Sn(t),zt=0;var e=(z=t.__c).__H;e&&(Fr===z?(e.__h=[],z.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=er,r.__N=r.i=void 0})):(e.__h.forEach(rr),e.__h.forEach(Dr),e.__h=[],zt=0)),Fr=z},C.diffed=function(t){Cn&&Cn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(xn.push(e)!==1&&yn===C.requestAnimationFrame||((yn=C.requestAnimationFrame)||Eu)($u)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==er&&(r.__=r.__V),r.i=void 0,r.__V=er})),Fr=z=null},C.__c=function(t,e){e.some(function(r){try{r.__h.forEach(rr),r.__h=r.__h.filter(function(a){return!a.__||Dr(a)})}catch(a){e.some(function(n){n.__h&&(n.__h=[])}),e=[],C.__e(a,r.__v)}}),$n&&$n(t,e)},C.unmount=function(t){En&&En(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(a){try{rr(a)}catch(n){e=n}}),r.__H=void 0,e&&C.__e(e,r.__v))};var An=typeof requestAnimationFrame=="function";function Eu(t){var e,r=function(){clearTimeout(a),An&&cancelAnimationFrame(e),setTimeout(t)},a=setTimeout(r,100);An&&(e=requestAnimationFrame(r))}function rr(t){var e=z,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),z=e}function Dr(t){var e=z;t.__c=t.__(),z=e}function Lr(t,e){return!t||t.length!==e.length||e.some(function(r,a){return r!==t[a]})}function Mn(t,e){return typeof e=="function"?e(t):e}function Nn(t,e){for(var r in e)t[r]=e[r];return t}function Vr(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var a in e)if(a!=="__source"&&t[a]!==e[a])return!0;return!1}function jr(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function zr(t){this.props=t}function Iu(t,e){function r(n){var i=this.props.ref,o=i==n.ref;return!o&&i&&(i.call?i(null):i.current=null),e?!e(this.props,n)||!o:Vr(this.props,n)}function a(n){return this.shouldComponentUpdate=r,ut(t,n)}return a.displayName="Memo("+(t.displayName||t.name)+")",a.prototype.isReactComponent=!0,a.__f=!0,a}(zr.prototype=new mt).isPureReactComponent=!0,zr.prototype.shouldComponentUpdate=function(t,e){return Vr(this.props,t)||Vr(this.state,e)};var Pn=C.__b;C.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Pn&&Pn(t)};var Tu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(t){function e(r){var a=Nn({},r);return delete a.ref,t(a,r.ref||null)}return e.$$typeof=Tu,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var On=function(t,e){return t==null?null:Mt(Mt(t).map(e))},Au={map:On,forEach:On,count:function(t){return t?Mt(t).length:0},only:function(t){var e=Mt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Mt},Mu=C.__e;C.__e=function(t,e,r,a){if(t.then){for(var n,i=e;i=i.__;)if((n=i.__c)&&n.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e)}Mu(t,e,r,a)};var Fn=C.unmount;function Dn(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(a){typeof a.__c=="function"&&a.__c()}),t.__c.__H=null),(t=Nn({},t)).__c!=null&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(a){return Dn(a,e,r)})),t}function Ln(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(a){return Ln(a,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function Ee(){this.__u=0,this.t=null,this.__b=null}function Vn(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function jn(t){var e,r,a;function n(i){if(e||(e=t()).then(function(o){r=o.default||o},function(o){a=o}),a)throw a;if(!r)throw e;return ut(r,i)}return n.displayName="Lazy",n.__f=!0,n}function Ie(){this.u=null,this.o=null}C.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Fn&&Fn(t)},(Ee.prototype=new mt).__c=function(t,e){var r=e.__c,a=this;a.t==null&&(a.t=[]),a.t.push(r);var n=Vn(a.__v),i=!1,o=function(){i||(i=!0,r.__R=null,n?n(s):s())};r.__R=o;var s=function(){if(!--a.__u){if(a.state.__a){var d=a.state.__a;a.__v.__k[0]=Ln(d,d.__c.__P,d.__c.__O)}var h;for(a.setState({__a:a.__b=null});h=a.t.pop();)h.forceUpdate()}},c=e.__h===!0;a.__u++||c||a.setState({__a:a.__b=a.__v.__k[0]}),t.then(o,o)},Ee.prototype.componentWillUnmount=function(){this.t=[]},Ee.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),a=this.__v.__k[0].__c;this.__v.__k[0]=Dn(this.__b,r,a.__O=a.__P)}this.__b=null}var n=e.__a&&ut(W,null,t.fallback);return n&&(n.__h=null),[ut(W,null,e.__a?null:t.children),n]};var zn=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Nu(t){return this.getChildContext=function(){return t.context},t.children}function Pu(t){var e=this,r=t.i;e.componentWillUnmount=function(){ce(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(a){this.childNodes.push(a),e.i.appendChild(a)},insertBefore:function(a,n){this.childNodes.push(a),e.i.appendChild(a)},removeChild:function(a){this.childNodes.splice(this.childNodes.indexOf(a)>>>1,1),e.i.removeChild(a)}}),ce(ut(Nu,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Ou(t,e){var r=ut(Pu,{__v:t,i:e});return r.containerInfo=e,r}(Ie.prototype=new mt).__a=function(t){var e=this,r=Vn(e.__v),a=e.o.get(t);return a[0]++,function(n){var i=function(){e.props.revealOrder?(a.push(n),zn(e,t,a)):n()};r?r(i):i()}},Ie.prototype.render=function(t){this.u=null,this.o=new Map;var e=Mt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},Ie.prototype.componentDidUpdate=Ie.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){zn(t,r,e)})};var Rn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Fu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Du=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Lu=/[A-Z0-9]/g,Vu=typeof document<"u",ju=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function zu(t,e,r){return e.__k==null&&(e.textContent=""),ce(t,e),typeof r=="function"&&r(),t?t.__c:null}function Ru(t,e,r){return sn(t,e),typeof r=="function"&&r(),t?t.__c:null}mt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(mt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Bn=C.event;function Bu(){}function Uu(){return this.cancelBubble}function Hu(){return this.defaultPrevented}C.event=function(t){return Bn&&(t=Bn(t)),t.persist=Bu,t.isPropagationStopped=Uu,t.isDefaultPrevented=Hu,t.nativeEvent=t};var Br,qu={enumerable:!1,configurable:!0,get:function(){return this.class}},Un=C.vnode;C.vnode=function(t){typeof t.type=="string"&&function(e){var r=e.props,a=e.type,n={};for(var i in r){var o=r[i];if(!(i==="value"&&"defaultValue"in r&&o==null||Vu&&i==="children"&&a==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||a!=="input"&&a!=="textarea"||ju(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Du.test(i)?i=s:a.indexOf("-")===-1&&Fu.test(i)?i=i.replace(Lu,"-$&").toLowerCase():o===null&&(o=void 0):s=i="oninput",s==="oninput"&&n[i=s]&&(i="oninputCapture"),n[i]=o}}a=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Mt(r.children).forEach(function(c){c.props.selected=n.value.indexOf(c.props.value)!=-1})),a=="select"&&n.defaultValue!=null&&(n.value=Mt(r.children).forEach(function(c){c.props.selected=n.multiple?n.defaultValue.indexOf(c.props.value)!=-1:n.defaultValue==c.props.value})),r.class&&!r.className?(n.class=r.class,Object.defineProperty(n,"className",qu)):(r.className&&!r.class||r.class&&r.className)&&(n.class=n.className=r.className),e.props=n}(t),t.$$typeof=Rn,Un&&Un(t)};var Hn=C.__r;C.__r=function(t){Hn&&Hn(t),Br=t.__c};var qn=C.diffed;C.diffed=function(t){qn&&qn(t);var e=t.props,r=t.__e;r!=null&&t.type==="textarea"&&"value"in e&&e.value!==r.value&&(r.value=e.value==null?"":e.value),Br=null};var Ku={ReactCurrentDispatcher:{current:{readContext:function(t){return Br.__n[t.__c].props.value}}}};function Gu(t){return ut.bind(null,t)}function Kn(t){return!!t&&t.$$typeof===Rn}function Wu(t){return Kn(t)?au.apply(null,arguments):t}function Yu(t){return!!t.__k&&(ce(null,t),!0)}function Xu(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ju=function(t,e){return t(e)},Zu=function(t,e){return t(e)},Qu=W;function Gn(t){t()}function td(t){return t}function ed(){return[!1,Gn]}var rd=dt;function ad(t,e){var r=e(),a=bt({h:{__:r,v:e}}),n=a[0].h,i=a[1];return dt(function(){n.__=r,n.v=e,jr(n.__,e())||i({h:n})},[t,r,e]),_t(function(){return jr(n.__,n.v())||i({h:n}),t(function(){jr(n.__,n.v())||i({h:n})})},[t]),r}var kt={useState:bt,useId:Cu,useReducer:In,useEffect:_t,useLayoutEffect:dt,useInsertionEffect:rd,useTransition:ed,useDeferredValue:td,useSyncExternalStore:ad,startTransition:Gn,useRef:ft,useImperativeHandle:xu,useMemo:Pt,useCallback:ku,useContext:Tn,useDebugValue:Su,version:"17.0.2",Children:Au,render:zu,hydrate:Ru,unmountComponentAtNode:Yu,createPortal:Ou,createElement:ut,createContext:ln,createFactory:Gu,cloneElement:Wu,createRef:Zc,Fragment:W,isValidElement:Kn,findDOMNode:Xu,Component:mt,PureComponent:zr,memo:Iu,forwardRef:Rr,flushSync:Zu,unstable_batchedUpdates:Ju,StrictMode:Qu,Suspense:Ee,SuspenseList:Ie,lazy:jn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ku};const st=Symbol.for("@ts-pattern/matcher"),Wn=Symbol.for("@ts-pattern/isVariadic"),ar="@ts-pattern/anonymous-select-key",Ur=t=>!!(t&&typeof t=="object"),nr=t=>t&&!!t[st],Y=(t,e,r)=>{if(nr(t)){const a=t[st](),{matched:n,selections:i}=a.match(e);return n&&i&&Object.keys(i).forEach(o=>r(o,i[o])),n}if(Ur(t)){if(!Ur(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let a=[],n=[],i=[];for(const o of t.keys()){const s=t[o];nr(s)&&s[Wn]?i.push(s):i.length?n.push(s):a.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<a.length+n.length)return!1;const o=e.slice(0,a.length),s=n.length===0?[]:e.slice(-n.length),c=e.slice(a.length,n.length===0?1/0:-n.length);return a.every((d,h)=>Y(d,o[h],r))&&n.every((d,h)=>Y(d,s[h],r))&&(i.length===0||Y(i[0],c,r))}return t.length===e.length&&t.every((o,s)=>Y(o,e[s],r))}return Object.keys(t).every(a=>{const n=t[a];return(a in e||nr(i=n)&&i[st]().matcherType==="optional")&&Y(n,e[a],r);var i})}return Object.is(e,t)},ht=t=>{var e,r,a;return Ur(t)?nr(t)?(e=(r=(a=t[st]()).getSelectionKeys)==null?void 0:r.call(a))!=null?e:[]:Array.isArray(t)?Te(t,ht):Te(Object.values(t),ht):[]},Te=(t,e)=>t.reduce((r,a)=>r.concat(e(a)),[]);function nd(...t){if(t.length===1){const[e]=t;return r=>Y(e,r,()=>{})}if(t.length===2){const[e,r]=t;return Y(e,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function Q(t){return Object.assign(t,{optional:()=>qr(t),and:e=>R(t,e),or:e=>Yn(t,e),select:e=>e===void 0?Ae(t):Ae(e,t)})}function Hr(t){return Object.assign((e=>Object.assign(e,{*[Symbol.iterator](){yield Object.assign(e,{[Wn]:!0})}}))(t),{optional:()=>Hr(qr(t)),select:e=>Hr(e===void 0?Ae(t):Ae(e,t))})}function qr(t){return Q({[st]:()=>({match:e=>{let r={};const a=(n,i)=>{r[n]=i};return e===void 0?(ht(t).forEach(n=>a(n,void 0)),{matched:!0,selections:r}):{matched:Y(t,e,a),selections:r}},getSelectionKeys:()=>ht(t),matcherType:"optional"})})}const id=(t,e)=>{for(const r of t)if(!e(r))return!1;return!0},od=(t,e)=>{for(const[r,a]of t.entries())if(!e(a,r))return!1;return!0};function R(...t){return Q({[st]:()=>({match:e=>{let r={};const a=(n,i)=>{r[n]=i};return{matched:t.every(n=>Y(n,e,a)),selections:r}},getSelectionKeys:()=>Te(t,ht),matcherType:"and"})})}function Yn(...t){return Q({[st]:()=>({match:e=>{let r={};const a=(n,i)=>{r[n]=i};return Te(t,ht).forEach(n=>a(n,void 0)),{matched:t.some(n=>Y(n,e,a)),selections:r}},getSelectionKeys:()=>Te(t,ht),matcherType:"or"})})}function P(t){return{[st]:()=>({match:e=>({matched:!!t(e)})})}}function Ae(...t){const e=typeof t[0]=="string"?t[0]:void 0,r=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return Q({[st]:()=>({match:a=>{let n={[e??ar]:a};return{matched:r===void 0||Y(r,a,(i,o)=>{n[i]=o}),selections:n}},getSelectionKeys:()=>[e??ar].concat(r===void 0?[]:ht(r))})})}function St(t){return typeof t=="number"}function Jt(t){return typeof t=="string"}function Rt(t){return typeof t=="bigint"}const Xn=Q(P(function(t){return!0})),sd=Xn,Zt=t=>Object.assign(Q(t),{startsWith:e=>{return Zt(R(t,(r=e,P(a=>Jt(a)&&a.startsWith(r)))));var r},endsWith:e=>{return Zt(R(t,(r=e,P(a=>Jt(a)&&a.endsWith(r)))));var r},minLength:e=>Zt(R(t,(r=>P(a=>Jt(a)&&a.length>=r))(e))),maxLength:e=>Zt(R(t,(r=>P(a=>Jt(a)&&a.length<=r))(e))),includes:e=>{return Zt(R(t,(r=e,P(a=>Jt(a)&&a.includes(r)))));var r},regex:e=>{return Zt(R(t,(r=e,P(a=>Jt(a)&&!!a.match(r)))));var r}}),ld=Zt(P(Jt)),Ct=t=>Object.assign(Q(t),{between:(e,r)=>Ct(R(t,((a,n)=>P(i=>St(i)&&a<=i&&n>=i))(e,r))),lt:e=>Ct(R(t,(r=>P(a=>St(a)&&a<r))(e))),gt:e=>Ct(R(t,(r=>P(a=>St(a)&&a>r))(e))),lte:e=>Ct(R(t,(r=>P(a=>St(a)&&a<=r))(e))),gte:e=>Ct(R(t,(r=>P(a=>St(a)&&a>=r))(e))),int:()=>Ct(R(t,P(e=>St(e)&&Number.isInteger(e)))),finite:()=>Ct(R(t,P(e=>St(e)&&Number.isFinite(e)))),positive:()=>Ct(R(t,P(e=>St(e)&&e>0))),negative:()=>Ct(R(t,P(e=>St(e)&&e<0)))}),cd=Ct(P(St)),Bt=t=>Object.assign(Q(t),{between:(e,r)=>Bt(R(t,((a,n)=>P(i=>Rt(i)&&a<=i&&n>=i))(e,r))),lt:e=>Bt(R(t,(r=>P(a=>Rt(a)&&a<r))(e))),gt:e=>Bt(R(t,(r=>P(a=>Rt(a)&&a>r))(e))),lte:e=>Bt(R(t,(r=>P(a=>Rt(a)&&a<=r))(e))),gte:e=>Bt(R(t,(r=>P(a=>Rt(a)&&a>=r))(e))),positive:()=>Bt(R(t,P(e=>Rt(e)&&e>0))),negative:()=>Bt(R(t,P(e=>Rt(e)&&e<0)))}),ud=Bt(P(Rt)),dd=Q(P(function(t){return typeof t=="boolean"})),fd=Q(P(function(t){return typeof t=="symbol"})),hd=Q(P(function(t){return t==null}));var F={__proto__:null,matcher:st,optional:qr,array:function(...t){return Hr({[st]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const r=t[0];let a={};if(e.length===0)return ht(r).forEach(i=>{a[i]=[]}),{matched:!0,selections:a};const n=(i,o)=>{a[i]=(a[i]||[]).concat([o])};return{matched:e.every(i=>Y(r,i,n)),selections:a}},getSelectionKeys:()=>t.length===0?[]:ht(t[0])})})},set:function(...t){return Q({[st]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};if(t.length===0)return{matched:!0};const a=(i,o)=>{r[i]=(r[i]||[]).concat([o])},n=t[0];return{matched:id(e,i=>Y(n,i,a)),selections:r}},getSelectionKeys:()=>t.length===0?[]:ht(t[0])})})},map:function(...t){return Q({[st]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};const a=(s,c)=>{r[s]=(r[s]||[]).concat([c])};if(t.length===0)return{matched:!0};var n;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=t[0])==null?void 0:n.toString()}`);const[i,o]=t;return{matched:od(e,(s,c)=>{const d=Y(i,c,a),h=Y(o,s,a);return d&&h}),selections:r}},getSelectionKeys:()=>t.length===0?[]:[...ht(t[0]),...ht(t[1])]})})},intersection:R,union:Yn,not:function(t){return Q({[st]:()=>({match:e=>({matched:!Y(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:P,select:Ae,any:Xn,_:sd,string:ld,number:cd,bigint:ud,boolean:dd,symbol:fd,nullish:hd,instanceOf:function(t){return Q(P(function(e){return r=>r instanceof e}(t)))},shape:function(t){return Q(P(nd(t)))}};const Kr={matched:!1,value:void 0};function Qt(t){return new ir(t,Kr)}class ir{constructor(e,r){this.input=void 0,this.state=void 0,this.input=e,this.state=r}with(...e){if(this.state.matched)return this;const r=e[e.length-1],a=[e[0]];let n;e.length===3&&typeof e[1]=="function"?n=e[1]:e.length>2&&a.push(...e.slice(1,e.length-1));let i=!1,o={};const s=(d,h)=>{i=!0,o[d]=h},c=!a.some(d=>Y(d,this.input,s))||n&&!n(this.input)?Kr:{matched:!0,value:r(i?ar in o?o[ar]:o:this.input,this.input)};return new ir(this.input,c)}when(e,r){if(this.state.matched)return this;const a=!!e(this.input);return new ir(this.input,a?{matched:!0,value:r(this.input,this.input)}:Kr)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let e;try{e=JSON.stringify(this.input)}catch{e=this.input}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}run(){return this.exhaustive()}returnType(){return this}}var pd=["other","few","many","two","one","zero"],Jn=({terms:t,overrides:e,locale:r})=>{const a=new Intl.PluralRules(r);function n(i,o){const s=(e==null?void 0:e[i])??t[i];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(c,d)=>{var h;return((h=o==null?void 0:o[d])==null?void 0:h.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${i.toString()}”`);let c=a.select(o.count);if(!(c in s)){const d=pd.find(h=>h in s);if(!d)throw new Error(`Missing plural rule for translation key “${i.toString()}”`);c=d}return s[c].replace(/{{(\w+)}}/g,(d,h)=>{var u;return((u=o==null?void 0:o[h])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${i.toString()}”.`)}}return n},gd=0;function l(t,e,r,a,n,i){var o,s,c={};for(s in e)s=="ref"?o=e[s]:c[s]=e[s];var d={type:t,props:c,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--gd,__source:n,__self:i};if(typeof t=="function"&&(o=t.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return C.vnode&&C.vnode(d),d}var Zn=ln(null),bd=t=>({TranslationProvider:({terms:e,children:r,locale:a})=>{const n=Pt(()=>(console.log("instantiating"),Jn({locale:a,terms:t,overrides:e})),[e,a]);return l(Zn.Provider,{value:{t:n,locale:a},children:r})},useTranslation:()=>{const e=Tn(Zn);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:r})=>Jn({terms:t,overrides:e,locale:r})});const{TranslationProvider:vd,useTranslation:nt,createTFunction:wd}=bd({error_heading:"Something unexpected happened",undo:"Undo",send:"Send",skip:"Skip",skipped:"Skipped",submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",maximize:"Maximise",minimize:"Minimise",close_application:"Close application",applying_for:"Applying for “{{title}}”",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"}}),xp="";function yt(t,e){if(!t)throw new Error(e)}function or(){throw new Error("Cycle detected")}var md=Symbol.for("preact-signals");function Gr(){if(fe>1)fe--;else{for(var t,e=!1;Me!==void 0;){var r=Me;for(Me=void 0,Wr++;r!==void 0;){var a=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ti(r))try{r.c()}catch(n){e||(t=n,e=!0)}r=a}}if(Wr=0,fe--,e)throw t}}var B=void 0,Me=void 0,fe=0,Wr=0,sr=0;function Qn(t){if(B!==void 0){var e=t.n;if(e===void 0||e.t!==B)return e={i:0,S:t,p:B.s,n:void 0,t:B,e:void 0,x:void 0,r:e},B.s!==void 0&&(B.s.n=e),B.s=e,t.n=e,32&B.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=B.s,e.n=void 0,B.s.n=e,B.s=e),e}}function X(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}X.prototype.brand=md,X.prototype.h=function(){return!0},X.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)},X.prototype.U=function(t){if(this.t!==void 0){var e=t.e,r=t.x;e!==void 0&&(e.x=r,t.e=void 0),r!==void 0&&(r.e=e,t.x=void 0),t===this.t&&(this.t=r)}},X.prototype.subscribe=function(t){var e=this;return Xr(function(){var r=e.value,a=32&this.f;this.f&=-33;try{t(r)}finally{this.f|=a}})},X.prototype.valueOf=function(){return this.value},X.prototype.toString=function(){return this.value+""},X.prototype.toJSON=function(){return this.value},X.prototype.peek=function(){return this.v},Object.defineProperty(X.prototype,"value",{get:function(){var t=Qn(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(B instanceof Ht&&function(){throw new Error("Computed cannot have side-effects")}(),t!==this.v){Wr>100&&or(),this.v=t,this.i++,sr++,fe++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Gr()}}}});function Ut(t){return new X(t)}function ti(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function ei(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function ri(t){for(var e=t.s,r=void 0;e!==void 0;){var a=e.p;e.i===-1?(e.S.U(e),a!==void 0&&(a.n=e.n),e.n!==void 0&&(e.n.p=a)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=a}t.s=r}function Ht(t){X.call(this,void 0),this.x=t,this.s=void 0,this.g=sr-1,this.f=4}(Ht.prototype=new X).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===sr))return!0;if(this.g=sr,this.f|=1,this.i>0&&!ti(this))return this.f&=-2,!0;var t=B;try{ei(this),B=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return B=t,ri(this),this.f&=-2,!0},Ht.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}X.prototype.S.call(this,t)},Ht.prototype.U=function(t){if(this.t!==void 0&&(X.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Ht.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Ht.prototype.peek=function(){if(this.h()||or(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ht.prototype,"value",{get:function(){1&this.f&&or();var t=Qn(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function _d(t){return new Ht(t)}function ai(t){var e=t.u;if(t.u=void 0,typeof e=="function"){fe++;var r=B;B=void 0;try{e()}catch(a){throw t.f&=-2,t.f|=8,Yr(t),a}finally{B=r,Gr()}}}function Yr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ai(t)}function yd(t){if(B!==this)throw new Error("Out-of-order effect");ri(this),B=t,this.f&=-2,8&this.f&&Yr(this),Gr()}function Ne(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ne.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Ne.prototype.S=function(){1&this.f&&or(),this.f|=1,this.f&=-9,ai(this),ei(this),fe++;var t=B;return B=this,yd.bind(this,t)},Ne.prototype.N=function(){2&this.f||(this.f|=2,this.o=Me,Me=this)},Ne.prototype.d=function(){this.f|=8,1&this.f||Yr(this)};function Xr(t){var e=new Ne(t);try{e.c()}catch(r){throw e.d(),r}return e.d.bind(e)}var Jr;function he(t,e){C[t]=e.bind(null,C[t]||function(){})}function lr(t){Jr&&Jr(),Jr=t&&t.S()}function ni(t){var e=this,r=t.data,a=kd(r);a.value=r;var n=Pt(function(){for(var i=e.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return e.__$u.c=function(){var o;!qa(n.peek())&&((o=e.base)==null?void 0:o.nodeType)===3?e.base.data=n.peek():(e.__$f|=1,e.setState({}))},_d(function(){var o=a.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}ni.displayName="_st",Object.defineProperties(X.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ni},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),he("__b",function(t,e){if(typeof e.type=="string"){var r,a=e.props;for(var n in a)if(n!=="children"){var i=a[n];i instanceof X&&(r||(e.__np=r={}),r[n]=i,a[n]=i.peek())}}t(e)}),he("__r",function(t,e){lr();var r,a=e.__c;a&&(a.__$f&=-2,(r=a.__$u)===void 0&&(a.__$u=r=function(n){var i;return Xr(function(){i=this}),i.c=function(){a.__$f|=1,a.setState({})},i}())),lr(r),t(e)}),he("__e",function(t,e,r,a){lr(),t(e,r,a)}),he("diffed",function(t,e){lr();var r;if(typeof e.type=="string"&&(r=e.__e)){var a=e.__np,n=e.props;if(a){var i=r.U;if(i)for(var o in i){var s=i[o];s!==void 0&&!(o in a)&&(s.d(),i[o]=void 0)}else r.U=i={};for(var c in a){var d=i[c],h=a[c];d===void 0?(d=xd(r,c,h,n),i[c]=d):d.o(h,n)}}}t(e)});function xd(t,e,r,a){var n=e in t&&t.ownerSVGElement===void 0,i=Ut(r);return{o:function(o,s){i.value=o,a=s},d:Xr(function(){var o=i.value.value;a[e]!==o&&(a[e]=o,n?t[e]=o:o?t.setAttribute(e,o):t.removeAttribute(e))})}}he("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__e;if(r){var a=r.U;if(a){r.U=void 0;for(var n in a){var i=a[n];i&&i.d()}}}}else{var o=e.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}t(e)}),he("__h",function(t,e,r,a){(a<3||a===9)&&(e.__$f|=2),t(e,r,a)}),mt.prototype.shouldComponentUpdate=function(t,e){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var a in e)return!0;for(var n in t)if(n!=="__source"&&t[n]!==this.props[n])return!0;for(var i in this.props)if(!(i in t))return!0;return!1};function kd(t){return Pt(function(){return Ut(t)},[])}const Zr=(t,e)=>e.some(r=>t instanceof r);let ii,oi;function Sd(){return ii||(ii=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Cd(){return oi||(oi=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Qr=new WeakMap,ta=new WeakMap,cr=new WeakMap;function $d(t){const e=new Promise((r,a)=>{const n=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(te(t.result)),n()},o=()=>{a(t.error),n()};t.addEventListener("success",i),t.addEventListener("error",o)});return cr.set(e,t),e}function Ed(t){if(Qr.has(t))return;const e=new Promise((r,a)=>{const n=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),n()},o=()=>{a(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});Qr.set(t,e)}let ea={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Qr.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return te(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function si(t){ea=t(ea)}function Id(t){return Cd().includes(t)?function(...e){return t.apply(ra(this),e),te(this.request)}:function(...e){return te(t.apply(ra(this),e))}}function Td(t){return typeof t=="function"?Id(t):(t instanceof IDBTransaction&&Ed(t),Zr(t,Sd())?new Proxy(t,ea):t)}function te(t){if(t instanceof IDBRequest)return $d(t);if(ta.has(t))return ta.get(t);const e=Td(t);return e!==t&&(ta.set(t,e),cr.set(e,t)),e}const ra=t=>cr.get(t);function Ad(t,e,{blocked:r,upgrade:a,blocking:n,terminated:i}={}){const o=indexedDB.open(t,e),s=te(o);return a&&o.addEventListener("upgradeneeded",c=>{a(te(o.result),c.oldVersion,c.newVersion,te(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),s.then(c=>{i&&c.addEventListener("close",()=>i()),n&&c.addEventListener("versionchange",d=>n(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const Md=["get","getKey","getAll","getAllKeys","count"],Nd=["put","add","delete","clear"],aa=new Map;function li(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(aa.get(e))return aa.get(e);const r=e.replace(/FromIndex$/,""),a=e!==r,n=Nd.includes(r);if(!(r in(a?IDBIndex:IDBObjectStore).prototype)||!(n||Md.includes(r)))return;const i=async function(o,...s){const c=this.transaction(o,n?"readwrite":"readonly");let d=c.store;return a&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),n&&c.done]))[0]};return aa.set(e,i),i}si(t=>({...t,get:(e,r,a)=>li(e,r)||t.get(e,r,a),has:(e,r)=>!!li(e,r)||t.has(e,r)}));const Pd=["continue","continuePrimaryKey","advance"],ci={},na=new WeakMap,ui=new WeakMap,Od={get(t,e){if(!Pd.includes(e))return t[e];let r=ci[e];return r||(r=ci[e]=function(...a){na.set(this,ui.get(this)[e](...a))}),r}};async function*Fd(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const r=new Proxy(e,Od);for(ui.set(r,e),cr.set(r,ra(e));e;)yield r,e=await(na.get(r)||e.continue()),na.delete(r)}function di(t,e){return e===Symbol.asyncIterator&&Zr(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Zr(t,[IDBIndex,IDBObjectStore])}si(t=>({...t,get(e,r,a){return di(e,r)?Fd:t.get(e,r,a)},has(e,r){return di(e,r)||t.has(e,r)}}));const Pe=t=>Qt(t).with(F.number.lte(1e3),()=>`${Math.round(t)}KB`).with(F.number.lt(1e3*10),()=>`${(t/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(t/1e3)}MB`),fi=t=>{const e=t.find(r=>r.isHead);if(!e)throw new Error("No head node found");return e},Dd=t=>Object.entries(t).reduce((r,[a,n])=>(r[a]=n.value,r),{}),pe=t=>e=>e?e.type===t:!1;class Oe extends Error{constructor(){super("Aborted")}}function Ld(t,e=300){let r;return(...a)=>{clearTimeout(r),r=setTimeout(()=>{t.apply(this,a)},e)}}const hi=t=>typeof t=="string",Vd=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),pi=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Vd()}),jd=t=>Qt(t).with({nativeEvent:{submitter:F.select(F.union(F.instanceOf(HTMLButtonElement),F.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),gi=typeof window>"u"?void 0:Ad("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}}),Fe={getStateData:async(t,e)=>{var a;const r=bi({...t,flowKeys:e});return(a=await gi)==null?void 0:a.get("state",r)},setStateData:Ld(async t=>{var r;const e=bi(t);return(r=await gi)==null?void 0:r.put("state",t.data,e)},1e3)},ur=(t,e,r,a=0)=>{if(!e.nextId)return r(e.id,{stepsMade:a,remainingSteps:0}),{stepsMade:a,remainingSteps:0};const n=t.find(d=>d.id===e.nextId);if(n===void 0)return{stepsMade:a,remainingSteps:0};const i=e.type==="if-block"?e.branchId:void 0,o=t.find(d=>d.id===i),s=e.type.includes("question")?1:0;if(o){const d=s+Math.max(ur(t,n,r,a+s).remainingSteps,ur(t,o,r,a+s).remainingSteps);return r(e.id,{stepsMade:a,remainingSteps:d}),{stepsMade:a,remainingSteps:d}}const c=s+ur(t,n,r,a+s).remainingSteps;return r(e.id,{stepsMade:a,remainingSteps:c}),{stepsMade:a,remainingSteps:c}},zd=t=>{const e={},r=t.find(a=>a.isHead);return r&&ur(t,r,(a,n)=>{e[a]=n}),e},bi=t=>[...t.flowKeys,t.id,t.version].join("/"),qt=Ut({state:"idle"}),De=t=>{const{state:e,flow:r}=qt.value;if(e!=="loaded")return;yt(r,"No flow to update");const a=t(r.data);r.data=a,qt.value={state:e,flow:r},Fe.setStateData(r)},T={current$:qt,viewState$:Ut("closed"),inputHeight$:Ut(53),startFlow:async({flow:t,context:e={},flowKeys:r,title:a,analytics:n,job:i})=>{const s={data:await Fe.getStateData(t,r)??pi(),startedAt:new Date,nodeIdToProgress:zd(t.nodes),flowKeys:r,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:e,title:a,analytics:n,job:i};qt.value={state:"loaded",flow:s},Fe.setStateData(s)},cancelCurrentFlow:()=>{qt.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>De(t=>({...t,isFinished:!0})),setCurrentNodeId:t=>De(e=>(e.nodeHistory.push(t),e)),restart:()=>{const{state:t,flow:e}=qt.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=pi();qt.value={state:t,flow:{...e,data:r,startedAt:new Date}},Fe.setStateData(e)},addMessage:(t,e)=>{const r={...t,groupId:e};return De(a=>(a.messages.push(r),a))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:r}=qt.value;yt(e==="loaded","Application not loaded");const a=r.data.messages.filter(n=>!n.groupId||!t.includes(n.groupId));r.data.messages=a,Fe.setStateData(r)},setSubmission:(t,e)=>De(r=>(e===null?delete r.submissions[t]:r.submissions[t]=e,r)),setInput:t=>De(e=>({...e,currentInput:t??null}))},Rd=({message:t})=>{const{t:e}=nt();return l("div",{class:"flex flex-grow flex-col items-center justify-center",children:[l("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:[l("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"}),l("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"}),l("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),l("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),l("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),l("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),l("path",{d:"M38 56h19"})]}),l("div",{class:"flex flex-col gap-2 text-center",children:[l("p",{class:"text-error-11 font-bold",children:e("error_heading")}),t&&l("p",{class:"text-neutral-9 text-sm",children:t})]})]})},vi=t=>l("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[l("title",{children:"Loading"}),l("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)}}"}),l("g",{id:"s1",transform:"translate(12,0)",children:l("g",{id:"s2",transform:"scale(0,0)",children:l("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),l("g",{id:"s3",transform:"translate(12,12)",children:l("g",{id:"s4",transform:"scale(1,1)",children:l("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),l("g",{id:"s5",transform:"translate(12,0)",children:l("g",{id:"s6",transform:"scale(0,0)",children:l("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"})})}),l("g",{id:"s7",transform:"translate(12,0)",children:l("g",{id:"s8",transform:"scale(0,0)",children:l("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"})})})]}),wi=()=>l("div",{class:"flex flex-grow flex-col items-center justify-center",children:l(vi,{class:"text-neutral-6 h-8 w-8"})}),Bd=t=>{const r=t/100,a=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,a))*100)}%`},dr=({class:t,children:e,...r})=>l("button",{class:Xt("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",t),...r,children:l("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:e})}),Ud=()=>{if(T.current$.value.state!=="loaded")return null;const t=T.current$.value.flow.nodeIdToProgress,e=T.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const r=t[e];if(r===void 0)return null;const a=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return l("div",{class:"bg-accent-3",children:l("div",{style:{width:Bd(a)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Hd=({children:t,params:e})=>{const{t:r}=nt(),a=T.viewState$;return l(W,{children:l("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:[l("div",{class:"flex h-[var(--header-height)] gap-2",children:[l("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),l("button",{tabIndex:-1,onClick:()=>{a.value==="minimised"?a.value="maximised":a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1",onTouchStart:ia,children:l("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),l("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?l("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header"}):null,a.value==="minimised"?l(W,{children:[l(dr,{class:"view-switch",onTouchStart:ia,"aria-label":r("maximize"),onClick:()=>a.value="maximised",children:l("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),l(dr,{"aria-label":r("close_application"),onClick:T.cancelCurrentFlow,children:l("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):l(W,{children:[T.current$.value.state==="loaded"&&l(dr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[l("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"}),l("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),l(dr,{class:"view-switch",onTouchStart:ia,"aria-label":r("minimize"),onClick:()=>a.value="minimised",children:l("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]})]}),l(Ud,{})]})})};function ia(){}const qd=jn(()=>Promise.resolve().then(()=>fp).then(t=>t.ChatbotBody)),mi=$e("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"}}}),_i="outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",Kd=({open:t,...e})=>{const r=ft(null);return dt(()=>{const a=r.current;a&&(t?a.showModal():a.close())},[t]),l("dialog",{ref:r,...e})},Gd=({logger:t,apiClient:e,analytics:r,params:a})=>{const{state:n,flow:i,error:o}=T.current$.value,s=T.viewState$.value,c=n!=="idle"&&s==="maximised",d=ft(null),h=l(Hd,{params:a,children:i==null?void 0:i.title});return l(vd,{terms:a.terms,locale:void 0,children:[l(Kd,{open:c,onClose:()=>T.viewState$.value="minimised",children:l("div",{ref:d,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:mi({view:"maximised"}),children:l("div",{class:_i,children:[h,Qt({state:n,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>l(wi,{},"loading")).with({state:"loaded"},()=>l(Ee,{fallback:l(wi,{},"loading"),children:l(qd,{analytics:r,apiClient:e,logger:t})})).with({state:"error"},()=>l(Rd,{message:o})).exhaustive()]})})}),s==="minimised"?l("div",{class:mi({view:"minimised",class:"z-100 isolate"}),children:l("div",{class:_i,children:h})}):null]})},yi=at({id:cn(Z(),String),version:Or(),build:Or(),nodes:hn(ou()),context_schema:Se(su(bn(Z(),at({required:pn(),type:du([gn("string"),gn("number")])}))))}),Wd=at({flow:yi}),Yd=at({company:at({name:Z()}),flow:yi,job:at({id:cn(Z(),String),title:Z()})}),Xd=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-moz-user-select:none;-webkit-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){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :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: }[data-widget=inploi-chatbot] ::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: }[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .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}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-2{bottom:.5rem}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:.625rem}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-2{left:.5rem}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-2{right:.5rem}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:.25rem}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .h-1{height:.25rem}[data-widget=inploi-chatbot] .h-1\\.5{height:.375rem}[data-widget=inploi-chatbot] .h-16{height:4rem}[data-widget=inploi-chatbot] .h-4{height:1rem}[data-widget=inploi-chatbot] .h-48{height:12rem}[data-widget=inploi-chatbot] .h-8{height:2rem}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 1rem)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 1rem)}[data-widget=inploi-chatbot] .w-1{width:.25rem}[data-widget=inploi-chatbot] .w-1\\.5{width:.375rem}[data-widget=inploi-chatbot] .w-16{width:4rem}[data-widget=inploi-chatbot] .w-24{width:6rem}[data-widget=inploi-chatbot] .w-4{width:1rem}[data-widget=inploi-chatbot] .w-64{width:16rem}[data-widget=inploi-chatbot] .w-8{width:2rem}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:2rem}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .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))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;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))}[data-widget=inploi-chatbot] .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)}}[data-widget=inploi-chatbot] .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}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .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)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-moz-user-select:none;-webkit-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-moz-user-select:text;-webkit-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .appearance-none{-moz-appearance:none;-webkit-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:.25rem}[data-widget=inploi-chatbot] .gap-1\\.5{gap:.375rem}[data-widget=inploi-chatbot] .gap-2{gap:.5rem}[data-widget=inploi-chatbot] .gap-2\\.5{gap:.625rem}[data-widget=inploi-chatbot] .gap-3{gap:.75rem}[data-widget=inploi-chatbot] .gap-4{gap:1rem}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overflow-y-scroll{overflow-y:scroll}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:.25rem}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:1rem}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:1.5rem}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:.5rem}[data-widget=inploi-chatbot] .rounded-md{border-radius:.375rem}[data-widget=inploi-chatbot] .rounded-xl{border-radius:.75rem}[data-widget=inploi-chatbot] .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:.375rem}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:.375rem}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:.25rem}[data-widget=inploi-chatbot] .p-1\\.5{padding:.375rem}[data-widget=inploi-chatbot] .p-10{padding:2.5rem}[data-widget=inploi-chatbot] .p-11{padding:2.75rem}[data-widget=inploi-chatbot] .p-12{padding:3rem}[data-widget=inploi-chatbot] .p-2{padding:.5rem}[data-widget=inploi-chatbot] .p-2\\.5{padding:.625rem}[data-widget=inploi-chatbot] .p-3{padding:.75rem}[data-widget=inploi-chatbot] .p-4{padding:1rem}[data-widget=inploi-chatbot] .p-5{padding:1.25rem}[data-widget=inploi-chatbot] .p-6{padding:1.5rem}[data-widget=inploi-chatbot] .p-7{padding:1.75rem}[data-widget=inploi-chatbot] .p-8{padding:2rem}[data-widget=inploi-chatbot] .p-9{padding:2.25rem}[data-widget=inploi-chatbot] .px-1{padding-left:.25rem;padding-right:.25rem}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:.375rem;padding-right:.375rem}[data-widget=inploi-chatbot] .px-2{padding-left:.5rem;padding-right:.5rem}[data-widget=inploi-chatbot] .px-2\\.5{padding-left:.625rem;padding-right:.625rem}[data-widget=inploi-chatbot] .px-3{padding-left:.75rem;padding-right:.75rem}[data-widget=inploi-chatbot] .px-4{padding-left:1rem;padding-right:1rem}[data-widget=inploi-chatbot] .px-5{padding-left:1.25rem;padding-right:1.25rem}[data-widget=inploi-chatbot] .py-0{padding-top:0;padding-bottom:0}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}[data-widget=inploi-chatbot] .py-1{padding-top:.25rem;padding-bottom:.25rem}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-widget=inploi-chatbot] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}[data-widget=inploi-chatbot] .py-3{padding-top:.75rem;padding-bottom:.75rem}[data-widget=inploi-chatbot] .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:.5rem}[data-widget=inploi-chatbot] .pb-6{padding-bottom:1.5rem}[data-widget=inploi-chatbot] .pl-1{padding-left:.25rem}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:.375rem}[data-widget=inploi-chatbot] .pl-2{padding-left:.5rem}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:.625rem}[data-widget=inploi-chatbot] .pl-3{padding-left:.75rem}[data-widget=inploi-chatbot] .pl-4{padding-left:1rem}[data-widget=inploi-chatbot] .pr-1{padding-right:.25rem}[data-widget=inploi-chatbot] .pr-16{padding-right:4rem}[data-widget=inploi-chatbot] .pr-2{padding-right:.5rem}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:.625rem}[data-widget=inploi-chatbot] .pr-3{padding-right:.75rem}[data-widget=inploi-chatbot] .pr-4{padding-right:1rem}[data-widget=inploi-chatbot] .pt-2{padding-top:.5rem}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:.625rem}[data-widget=inploi-chatbot] .pt-3{padding-top:.75rem}[data-widget=inploi-chatbot] .pt-5{padding-top:1.25rem}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:1rem;line-height:1.5rem}[data-widget=inploi-chatbot] .text-sm{font-size:.875rem;line-height:1.25rem}[data-widget=inploi-chatbot] .text-xs{font-size:.75rem;line-height:1rem}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .leading-3{line-height:.75rem}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}[data-widget=inploi-chatbot] .text-accent-1{color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-interactive-copy{color:var(--i-interactive-copy)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-neutral-8{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .text-neutral-9{color:var(--i-color-n-9)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 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)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .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}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .duration-700{transition-duration:.7s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[height\\]{will-change:height}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .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}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--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)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--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)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;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))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--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)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--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)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;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))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;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))}@media (pointer: coarse){[data-widget=inploi-chatbot] .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}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .\\[\\&\\: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))}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}
|
|
2
2
|
`,xi="inploi-chatbot",ki=`[data-widget='${xi}']`,Jd=()=>({getOrCreateChatbotElement:()=>{const t=document.querySelector(ki);if(t)return document.body.appendChild(t),t;const e=document.createElement("div");return document.body.appendChild(e),e.dataset.widget=xi,e}});var Zd=["1","2","3","4","5","6","7","8","9","10","11","12"],Qd={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]}},tf=(t,e=1,r)=>a=>{const[n,i]=Qd[r][a];return"oklch("+n+"% "+i*e+" "+t+")"},oa=t=>{const e=tf(t.hue,t.chroma,t.mode);return Object.fromEntries(Zd.map(r=>[t.prefix+r,t.transform(e(r))]))},sa=t=>t,ef=t=>{const e=Object.keys(t).flatMap(r=>{const a=t[r];return typeof a=="object"&&a!==null?Object.keys(a).map(n=>{const i=a[n];return[`${String(r)}.${n}`,i]}):[[r,a]]});return Object.fromEntries(e)},fr=t=>!!t&&typeof t=="object"&&!Array.isArray(t),la=(t,...e)=>{if(!e.length)return t;const r=e.shift();if(fr(t)&&fr(r))for(const a in r){const n=r[a];if(fr(n)){t[a]||Object.assign(t,{[a]:{}});const i=t[a];fr(i)&&la(i,n)}else Object.assign(t,{[a]:r[a]})}return la(t,...e)},rf=t=>{function e(r,a){const n=[t.prefix,a.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${n}`:`var(--${n})`}return e},af=()=>({core:t=>({semantic:e=>({component:r=>({from:a=>{const{theme:n,getToken:i}=a,o=p=>i("reference",p.toString()),s=t({theme:n}),c=e({theme:n,core:o,raw:{core:s}}),d=r({theme:n,core:o,semantic:o,raw:{core:s,semantic:c}}),h=ef(la(s,c,d)),u=([p,v],g)=>{const _=[g,p].filter(Boolean).join(".");return typeof v=="object"?Object.entries(v).flatMap(k=>u(k,_)):[[a.getToken("declaration",_),v]]};return{values:h,declarations:Object.fromEntries(Object.entries(h).flatMap(p=>u(p))),ref:p=>i("reference",p.toString())}}})})})});const[ca,ua,Si]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],nf=af().core(({theme:t})=>({color:{black:ca,white:ua,lowest:t.mode==="light"?ua:ca,highest:t.mode==="light"?ca:ua,...oa({prefix:"a-",hue:t.hue,chroma:t.chroma,mode:t.mode,transform:sa}),...oa({prefix:"n-",hue:t.hue,chroma:.05,mode:t.mode,transform:sa}),...oa({prefix:"e-",hue:20,chroma:t.chroma,mode:t.mode,transform:sa})},typography:{}})).semantic(({core:t,raw:e,theme:r})=>{const a=(n,i)=>e.core.color[n].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:a("n-8",r.mode==="dark"?.4:.2)},"copy-body":t("color.n-12"),"copy-headings":t("color.n-12"),interactive:{copy:t("color.n-11"),"copy-hover":t("color.n-12"),"copy-active":t("color.n-12"),bg:Si,"bg-hover":a("n-10",.4),"bg-active":a("n-10",.5)}}}).component(({raw:t,theme:e,semantic:r,core:a})=>{const n=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{app:{bg:a(e.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":a(e.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":n("a-9",.05)},"status-bar":{bg:n("n-2",.8),"bg-button":Si,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":a(e.mode==="dark"?"color.a-8":"color.a-11")}}}),of=rf({prefix:"i-"}),sf=t=>{const e=nf.from({theme:t,getToken:of}),r=Object.entries(e.declarations).map(([a,n])=>`${a}: ${n};`);return`${ki} {
|
|
3
3
|
${r.concat(r).join(`
|
|
4
4
|
`)}
|
|
5
|
-
}`},Ci=({context:t,schema:e,logger:r})=>{if(e)for(const a in e){const n=e[a];if(!n)continue;const i=_e(t,a,null);if(n.required&&i===null){const o=`Configuration error in context: ${a} is required`;throw r.error(o),new Error(o)}switch(n.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${a} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${a} is not a string`);break;default:n.type}}},lf=({_internal_domManager:t=Jd(),theme:e,terms:r,feedback:a})=>Wt(({apiClient:n,logger:i,analytics:o})=>{let s=!1;const c=wd({locale:void 0,overrides:r??{}}),d=()=>{var p;if(typeof window>"u")return;const h=[ut("style",{id:"inploi-chatbot-styles"},Xd),ut("style",{id:"inploi-chatbot-theme"},sf(e))],u=t.getOrCreateChatbotElement();if(ce(ut(W,{},[h,ut(Gd,{apiClient:n,logger:i,analytics:o,params:{theme:e,terms:r,feedback:a}})]),u),a){const v=a.plugin({apiClient:n,logger:i,analytics:o}),g=u.querySelector("dialog");if(!g)throw new Error("Couldn't find feedback host");v.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:e.chroma??1,hue:e.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:"light",corners:"rounded",highlights:"stroke"},terms:((p=a.params)==null?void 0:p.terms)??{},host:g})}s=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(s)return;d(),i.info("Chatbot plugin prepared")}catch(h){i.error("Error preparing chatbot plugin",h)}},fetchFlowByJobId:async(h,u)=>{const p=new URLSearchParams({id_type:(u==null?void 0:u.idType)==="inploi"?"internal":"external"});return n.fetch([`/flow/job/${h}`,p.toString()].filter(Boolean).join("?")).then(v=>{const g=Qe(Yd,v);return{flow:g.flow,title:c("applying_for",{title:g.job.title}),flowKeys:[g.job.id,...(u==null?void 0:u.flowKeys)??[]],job:{id:g.job.id,id_type:"external"},...u}})},fetchFlowById:async(h,u)=>n.fetch(`/flow/id/${h}`).then(p=>{var g;const v=Qe(Wd,p);return{flow:v.flow,title:"Chatbot",flowKeys:(u==null?void 0:u.flowKeys)??[],...u,analytics:{customProperties:{flow_id:v.flow.id,flow_version:v.flow.version,...(g=u==null?void 0:u.analytics)==null?void 0:g.customProperties}}}}),open:async h=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",s||d(),h instanceof Promise?(T.current$.value={state:"loading"},h.then(async u=>{Ci({context:u.context||{},schema:u.flow.context_schema,logger:i}),T.startFlow(u)}).catch(u=>{const p=u instanceof Error?u.message:c("unknown_error");T.current$.value={state:"error",error:p}})):(Ci({context:h.context||{},schema:h.flow.context_schema,logger:i}),T.startFlow(h))}catch(u){i.error("Error starting flow",u)}},close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),i.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=lf;const $i=({condition:t,context:e,submissions:r,ifBlock:a})=>{const[n,...i]=t.compareKey.split(".");if(!n)return!1;const o=Ii({context:e,key:n,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{const s=_e(o.value,i.join("."));switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const s=_e(o.value,i.join(".")),c={...a,data:{...a.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return Le(c,{submissions:{_temp:{value:s,type:"boolean"}},context:e});case"string":return Le(c,{submissions:{_temp:{value:s,type:"string"}},context:e});case"number":return Le(c,{submissions:{_temp:{value:s,type:"number"}},context:e});case"object":return Array.isArray(s)&&s.every(hi)?Le(c,{submissions:{_temp:{value:s,type:"enum"}},context:e}):!1}break}case"boolean":{const s=t.compareValue==="true";switch(t.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{const s=o.type==="phone"?hr(o.value):o.value;switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"number":{try{const s=Number(t.compareValue);switch(t.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${a.id}`,o.value),!1}break}case"enum":switch(t.compare){case"equals":return o.value.length===1&&o.value[0]===t.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==t.compareValue;case"contains":return o.value.includes(t.compareValue);case"notContains":return!o.value.includes(t.compareValue)}break}},Le=(t,{context:e,submissions:r})=>{const a="combinator"in t.data?t.data.conditions:[t.data];if(("combinator"in t.data?t.data.combinator:"and")==="or"){for(const i of a)if($i({condition:i,context:e,submissions:r,ifBlock:t}))return!0;return!1}else{for(const i of a)if(!$i({condition:i,context:e,submissions:r,ifBlock:t}))return!1;return!0}},cf=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,$t=(t,{context:e,submissions:r})=>t.replace(cf,(a,n,i="")=>{const[o,...s]=n.trim().split("."),c=Ii({key:o,path:s,submissions:r,context:e});if(!c)return i;switch(c.type){case"boolean":return c.value===!0?"true":"false";case"file":return c.value.map(d=>`${d.name} (${Pe(d.sizeKb)})`).join(", ");case"enum":return c.value.join(", ");case"address":return Object.values(c.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return c.value?c.value.toString():i;case"phone":return hr(c.value);case"integration":{if(typeof c.value!="object"||Array.isArray(c.value))break;const d=_e(c.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(hi))return d.join(", ")}break}}return i}),Ei=({node:t,nodes:e,stopWhen:r})=>{if((r==null?void 0:r(t))===!0)return t;const a=t.nextId?e.find(n=>n.id===t.nextId):void 0;if(a)return Ei({node:a,nodes:e,stopWhen:r})},uf=({childNode:t,nodes:e})=>{const a=e.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;const i=e.find(s=>s.id===n.branchId);if(!i)return!1;const o=Ei({node:i,nodes:e,stopWhen:s=>s.id===t.id});return!(!o||o.id!==t.id)});if(a!=null&&a.nextId)return e.find(n=>n.id===a.nextId)},df=({flow:t,analytics:e,logger:r,context:a,apiClient:n,getSubmissions:i,chatService:o,onFlowEnd:s,onInterpret:c,t:d})=>{let h=new AbortController;const u={...e.service,log:v=>e.service.log({...v,customProperties:{...v.customProperties,...e.customProperties}})},p=async(v,g)=>{const _=i();c==null||c(v,g);try{await ff({flow:t,analytics:u,logger:r,apiClient:n,context:a,node:v,submissions:_,t:d,chat:{sendMessage:async k=>o.send({groupId:v.id,message:k,signal:h.signal}),userInput:async k=>o.input({input:k,signal:h.signal}),addToSubmissions:o.addToSubmissions},next:k=>{const y=k?t.nodes.find(m=>m.id===k):uf({childNode:v,nodes:t.nodes});return y?p(y,v):s==null?void 0:s(v)},end:()=>s==null?void 0:s(v)})}catch(k){if(k instanceof Oe)return;throw k}};return{interpret:async v=>{const g=t.nodes.find(_=>_.id===v)??fi(t.nodes);return p(g)},undo:v=>{let g=1;const _=t.nodes.find(y=>y.id===v[v.length-1]);for(let y=v.length-2;y>0;y--){const m=v[y],M=t.nodes.find(F=>F.id===m);if(!M||(g++,M.type.startsWith("question-")))break}h.abort(),h=new AbortController;const k=t.nodes.find(y=>y.id===v[v.length-g]);return yt(k,"Undo failed: new start node not found"),p(k,_),{removed:g}},abort:()=>{h.abort()}}},hr=t=>`+${t.countryCode} ${t.phoneNumber}`;async function ff(t){const e=t.node;switch(e.type){case"text":return _f({...t,node:e});case"image":return yf({...t,node:e});case"question-text":return xf({...t,node:e});case"question-enum":return Cf({...t,node:e});case"question-number":return kf({...t,node:e});case"question-phone":return Sf({...t,node:e});case"question-boolean":return $f({...t,node:e});case"question-file":return If({...t,node:e});case"question-address":return Ef({...t,node:e});case"end-flow":return Tf({...t,node:e});case"if-block":return mf({...t,node:e});case"jump":return gf({...t,node:e});case"link":return wf({...t,node:e});case"integration-application-submit":return vf({...t,node:e});case"add-submission":return bf({...t,node:e});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return pf({...t,node:e});case"feedback":return hf({...t,node:e});default:throw new Error(`Unknown node: ${JSON.stringify(e)}`)}}const Ve=(t,e)=>{var a;const r=(a=t[e])==null?void 0:a.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r};async function hf({next:t,node:e}){t(e.nextId)}async function pf({next:t,node:e,analytics:r,submissions:a,logger:n}){if(!a)return t(e.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:Ve(a,e.data.key).toString(),first_name:e.data.firstName?Ve(a,e.data.firstName).toString():void 0,last_name:e.data.lastName?Ve(a,e.data.lastName).toString():void 0,email:e.data.email?Ve(a,e.data.email).toString():void 0,phone_number:e.data.phoneNumber?Ve(a,e.data.phoneNumber).toString():void 0,custom_traits:e.data.customTraits?Object.fromEntries(e.data.customTraits.map(({key:i,value:o})=>{var s;return[i,(s=a[o])==null?void 0:s.value]})):void 0}})}catch(i){n.error(i)}finally{t(e.nextId)}}async function gf({next:t,node:e}){t(e.data.targetId)}async function bf({next:t,node:e,logger:r,submissions:a,context:n}){if(!a){r.error("Submissions not found");return}a[e.data.key]={type:"string",value:$t(e.data.value,{submissions:a,context:n})},t(e.nextId)}async function vf({chat:t,next:e,node:r,logger:a,apiClient:n,submissions:i,analytics:o,flow:s,t:c}){const d=async h=>{h!==!0&&await t.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await t.sendMessage({type:"loading"});const{anonymous_id:u,session_id:p}=o.getSessionInfo(),v=await n.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:u,session_id:p,job:s.job,submissions:Dd(i||{})})}).catch(g=>g);r.data.key&&t.addToSubmissions(r.data.key,{type:"integration",value:v}),Qt(v).with({integration_response:A.select(A.union({service:A.optional(A.string),status:A.number,data:A.any},{service:A.optional(A.string),status:A.number,error:{message:A.string,data:A.any}}))},g=>{o.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 Qt(v).with(A.union({ats_data:A.select("redirect",{redirect_url:A.string,message:A.optional(A.union(A.string,A.nullish)),button_text:A.optional(A.union(A.string,A.nullish))})},{integration_response:{data:A.select("redirect",{redirect_url:A.string,message:A.optional(A.union(A.string,A.nullish)),button_text:A.optional(A.union(A.string,A.nullish))})}}),async g=>{if(g.redirect!==void 0){await t.sendMessage({type:"text",author:"bot",text:g.redirect.message??c("submission_redirect_message")});try{const _=new URL(g.redirect.redirect_url);u&&!_.searchParams.has("anonymous_id")&&_.searchParams.set("anonymous_id",u),await t.sendMessage({type:"link",href:_.toString(),text:g.redirect.button_text??c("complete_submission"),onClick:()=>{if(!p){a.error("session_id not set, cannot log FLOW_REDIRECT event");return}o.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:p,flow_version:s.version,href:_.toString(),job:s.job}})}})}catch(_){a.error(`Invalid redirect URL: ${g.redirect.redirect_url}`,_),t.sendMessage({type:"system",variant:"error",text:c("redirect_url_error")})}e(r.nextId)}}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await t.sendMessage({type:"system",variant:"success",text:c("submission_completed")}),e(r.nextId)}).with(A.union({success:!1,ats_data:A.select("error",{message:A.string})},{integration_response:{error:A.select("error",{message:A.string})}}),async g=>{var _;a.error(g.error),await t.sendMessage({type:"system",variant:"error",text:((_=g.error)==null?void 0:_.message)||c("submission_failed")}),await d(!1)}).otherwise(async g=>{a.error(g),await t.sendMessage({type:"system",variant:"error",text:c("submission_failed")}),await d(!1)})};await d(r.data.skipConfirmation)}async function wf({chat:t,next:e,node:r,submissions:a,context:n}){await t.sendMessage({type:"link",href:$t(r.data.href,{submissions:a,context:n}),text:$t(r.data.cta,{submissions:a,context:n})}),e(r.nextId)}async function mf({submissions:t,next:e,node:r,context:a}){e(Le(r,{submissions:t,context:a})?r.branchId:r.nextId)}async function _f({chat:t,next:e,node:r,submissions:a,context:n}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.text,{submissions:a,context:n})}),e(r.nextId)}async function yf({chat:t,next:e,node:r}){await t.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),e(r.nextId)}async function xf({chat:t,next:e,node:r,submissions:a,context:n,t:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const o=r.data.format==="phone"?await t.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,submissionFormat:"text",defaultValue:{}}}):await t.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 t.sendMessage({type:"system",variant:"info",text:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.type==="phone"?hr(o.value):o.value}),e(r.nextId)}async function kf({chat:t,next:e,node:r,submissions:a,context:n,t:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const o=await t.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 t.sendMessage({type:"system",variant:"info",text:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value.toString()}),e(r.nextId)}async function Sf({chat:t,next:e,node:r,submissions:a,context:n}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const i=await t.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});i===null?await t.sendMessage({type:"system",variant:"info",text:"Skipped"}):await t.sendMessage({author:"user",type:"text",text:i.type==="phone"?hr(i.value):i.value}),e(r.nextId)}async function Cf({chat:t,next:e,node:r,submissions:a,context:n,t:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const o=await t.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await t.sendMessage({type:"system",variant:"info",text:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),e(r.nextId)}async function $f({chat:t,next:e,node:r,submissions:a,context:n,t:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const o=await t.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await t.sendMessage({type:"system",variant:"info",text:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),e(r.nextId)}async function Ef({chat:t,next:e,node:r,t:a}){await t.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await t.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else{const i=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await t.sendMessage({author:"user",type:"text",text:i})}return e(r.nextId)}async function If({node:t,chat:e,next:r,submissions:a,context:n,t:i}){await e.sendMessage({author:"bot",type:"text",text:$t(t.data.question,{submissions:a,context:n})});const o=await e.userInput({key:t.data.key,type:"file",config:{optional:t.data.optional,extensions:t.data.extensions,fileSizeLimitKib:t.data.maxSizeKb??10*1024,allowMultiple:t.data.multiple===!0}});if(o===null)await e.sendMessage({type:"system",variant:"info",text:i("skipped")});else for(const s of o.value)await e.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});r(t.nextId)}async function Tf({chat:t,end:e,node:r}){await t.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),e()}const Ii=({key:t,path:e,submissions:r,context:a})=>{if(t==="$context"){if(!e)return;const n=_e(a,e.join("."));switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${e.join(".")}`,n);return}}return r==null?void 0:r[t]};function da(t,e,r){var a,n,i,o,s;e==null&&(e=100);function c(){var h=Date.now()-o;h<e&&h>=0?a=setTimeout(c,e-h):(a=null,r||(s=t.apply(i,n),i=n=null))}var d=function(){i=this,n=arguments,o=Date.now();var h=r&&!a;return a||(a=setTimeout(c,e)),h&&(s=t.apply(i,n),i=n=null),s};return d.clear=function(){a&&(clearTimeout(a),a=null)},d.flush=function(){a&&(s=t.apply(i,n),i=n=null,clearTimeout(a),a=null)},d}da.debounce=da;var Af=da;const Ti=Tt(Af);function Mf(t){let{debounce:e,scroll:r,polyfill:a,offsetSize:n}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const i=a||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,s]=bt({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=ft({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),d=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,u=ft(!1);_t(()=>(u.current=!0,()=>void(u.current=!1)));const[p,v,g]=Pt(()=>{const m=()=>{if(!c.current.element)return;const{left:M,top:F,width:N,height:H,bottom:et,right:pt,x:L,y:lt}=c.current.element.getBoundingClientRect(),ot={left:M,top:F,width:N,height:H,bottom:et,right:pt,x:L,y:lt};c.current.element instanceof HTMLElement&&n&&(ot.height=c.current.element.offsetHeight,ot.width=c.current.element.offsetWidth),Object.freeze(ot),u.current&&!Ff(c.current.lastBounds,ot)&&s(c.current.lastBounds=ot)};return[m,h?Ti(m,h):m,d?Ti(m,d):m]},[s,n,d,h]);function _(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(m=>m.removeEventListener("scroll",g,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function k(){c.current.element&&(c.current.resizeObserver=new i(g),c.current.resizeObserver.observe(c.current.element),r&&c.current.scrollContainers&&c.current.scrollContainers.forEach(m=>m.addEventListener("scroll",g,{capture:!0,passive:!0})))}const y=m=>{!m||m===c.current.element||(_(),c.current.element=m,c.current.scrollContainers=Ai(m),k())};return Pf(g,!!r),Nf(v),_t(()=>{_(),k()},[r,g,v]),_t(()=>_,[]),[y,o,p]}function Nf(t){_t(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Pf(t,e){_t(()=>{if(e){const r=t;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[t,e])}function Ai(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:a,overflowY:n}=window.getComputedStyle(t);return[r,a,n].some(i=>i==="auto"||i==="scroll")&&e.push(t),[...e,...Ai(t.parentElement)]}const Of=["x","y","top","bottom","left","right","width","height"],Ff=(t,e)=>Of.every(r=>t[r]===e[r]),ee=({class:t,...e})=>{const{t:r}=nt();return l("button",{class:Xt("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",t),type:"submit",...e,children:l("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[l("title",{children:r("send")}),l("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),l("path",{d:"M8 4V13"})]})})},Df=25,fa=Ut({instant:()=>{},smooth:()=>{}}),tt={onSubmitSuccessFn$:Ut(()=>{}),isBotTyping$:Ut(!1),scrollToEnd:{instant:()=>fa.value.instant(),smooth:()=>fa.value.smooth()}},Lf=()=>{const t=ft(null);dt(()=>{fa.value={instant:()=>{var r;return(r=t.current)==null?void 0:r.scrollTo({top:t.current.scrollHeight,behavior:"instant"})},smooth:()=>{t.current&&t.current.scrollHeight-t.current.scrollTop<=t.current.clientHeight*2&&t.current.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})}}},[t]);const e=Pt(()=>({addToSubmissions:(a,n)=>T.setSubmission(a,n),send:async({message:a,signal:n,groupId:i})=>{if(await Qt(a).with({author:"bot",type:"text"},async o=>{if(n!=null&&n.aborted)throw new Oe;tt.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Df;await new Promise(c=>setTimeout(c,s,{signal:n})),tt.isBotTyping$.value=!1}).otherwise(async()=>{}),n!=null&&n.aborted)throw new Oe;T.addMessage(a,i)},input:({input:a,signal:n})=>{if(n!=null&&n.aborted)throw new Oe;return T.setInput(a),new Promise(i=>{const o=s=>{if(n!=null&&n.aborted)throw new Oe;T.setInput(void 0),a.key&&T.setSubmission(a.key,s),i(s)};tt.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:t,chatService:e}},ge=({error:t})=>!t||!t.message?null:l("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[l("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),l("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),l("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),l("p",{class:"truncate pr-1 text-sm",children:t.message})]}),re=({class:t,...e})=>{const{t:r}=nt();return l("button",{type:"button",class:Xt("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",t),...e,children:[l("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[l("title",{children:r("skip")}),l("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),l("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})},ha={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":"262",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:"353","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":"850","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":"239",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"},je=$e("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),Vf="https://api.mapbox.com/search/searchbox/v1/suggest",jf="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",zf=t=>atob(t).split("").reverse().join(""),Ot=at({name:Z()}),Rf=at({suggestions:hn(at({full_address:Se(Z()),place_formatted:Se(Z()),name:Se(Z()),mapbox_id:Z(),context:hu(at({address:Ot,street:Ot,neighborhood:Ot,locality:Ot,district:Ot,place:Ot,region:Ot,postcode:Ot,country:Ot}))}))}),Bf=({logger:t,t:e})=>Pt(()=>{var a;const r=(a=T.current$.peek().flow)==null?void 0:a.data.flowSessionId;return r?{enabled:!0,getPredictions:async n=>{const i=new URL(Vf);i.searchParams.set("q",n),i.searchParams.set("session_token",r),i.searchParams.set("access_token",zf(jf));const o=await fetch(i);if(!o.ok)return t.error("Failed to get address details",o),{ok:!1,error:e("address_error")};const s=pu(Rf,await o.json());if(s.success===!1)return t.error("Failed to parse address details",s.issues),{ok:!1,error:e("address_error")};const{suggestions:c}=s.output;return{ok:!0,data:c.map(d=>{var h,u,p,v,g,_,k,y,m;return{label:d.full_address??d.place_formatted??d.name??d.mapbox_id,id:d.mapbox_id,address:{line1:((h=d.context.address)==null?void 0:h.name)??((u=d.context.street)==null?void 0:u.name),line2:void 0,line3:((p=d.context.neighborhood)==null?void 0:p.name)??((v=d.context.locality)==null?void 0:v.name),city:((g=d.context.place)==null?void 0:g.name)??((_=d.context.district)==null?void 0:_.name),state:(k=d.context.region)==null?void 0:k.name,postcode:(y=d.context.postcode)==null?void 0:y.name,country:(m=d.context.country)==null?void 0:m.name}}})}}}:{enabled:!1}},[t,e]),Mi=t=>{const{t:e}=nt();return l("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",...t,children:[l("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:l("path",{d:"M10 3L5 8L10 13"})}),l("span",{children:e("back")})]})},Uf=({input:t,onSubmitSuccess:e,logger:r})=>{const{t:a}=nt(),[n,i]=bt(),[o,s]=bt([]),{enabled:c,getPredictions:d}=Bf({logger:r,t:a}),[h,u]=bt(c?"query":"manual"),[p,v]=bt(""),[g,_]=bt(),k=y=>{yt(c,"Query state should not be enabled"),y=y.trim(),y!==(p==null?void 0:p.trim())&&(v(y),y===""&&s([]),_(void 0),d(y).then(m=>{if(m.ok===!1){s([]),_(m.error);return}s(m.data)}))};switch(h){case"query":return yt(c,"Query state should not be enabled"),l(Hf,{input:t,onSkip:()=>e(null),onAddressSelect:y=>{if(y===""){i(void 0),u("manual");return}const m=o.find(M=>M.id===y);m&&(i(m.address),u("details"))},onAddressSearch:y=>{k(y)},suggestions:o,query:p,error:g});case"details":return yt(n!==void 0),l(Pi,{input:t,logger:r,onSubmitSuccess:e,addressFields:n,actions:l(Mi,{onClick:()=>{u("query")}})});case"manual":return l(Pi,{logger:r,input:t,onSubmitSuccess:e,addressFields:{},actions:c?l(Mi,{onClick:()=>{u("query")}}):void 0})}},Hf=({input:t,onSkip:e,suggestions:r,onAddressSelect:a,query:n,onAddressSearch:i,error:o})=>{const{t:s}=nt(),c=ft(null);return dt(()=>{c.current&&(c.current.focus(),c.current.select())},[]),l(W,{children:[l("form",{noValidate:!0,onSubmit:d=>{d.preventDefault();const u=new FormData(d.currentTarget).get("address");typeof u=="string"&&i(u)},class:"flex gap-1 p-2.5",children:[l("div",{class:"group relative flex-1",children:[l("input",{ref:c,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:t.config.placeholder||s("address_search"),defaultValue:n,class:je({optional:!!t.config.optional,className:"w-full rounded-full"})}),l("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:l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[l("circle",{cx:"7",cy:"7",r:"4"}),l("path",{d:"M10 10L13 13"})]}),l("span",{class:"sr-only",children:s("search")})]})})]}),t.config.optional&&l(re,{class:"",onClick:e})]}),o?l(ge,{error:{message:o}}):null,l("ul",{children:[r.map(d=>l("li",{children:l("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:()=>{a(d.id)},children:[l("span",{class:"flex-grow",children:d.label}),l("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:l("path",{d:"M6 3L11 8L6 13"})})]})},d.id)),l("li",{children:l("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:()=>{a("")},children:l("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},Ni=["line1","line2","line3","city","state","postcode","country"],Pi=({addressFields:t,onSubmitSuccess:e,actions:r,input:a})=>{const n=ft(null);dt(()=>{if(n.current){const s=n.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const i=Object.keys(ha),{t:o}=nt();return l("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const c=new FormData(s.currentTarget),d=Object.fromEntries(c.entries());e({type:"address",value:d})},children:[l("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:n,children:Ni.map((s,c)=>{const d=`isdk_${s}`,h=a.config.keys[s];return h?l(W,{children:[l("label",{for:d,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:o(s)}),l("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?l("div",{class:"relative",children:[l("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:h,id:d,defaultValue:t[s],required:!0,children:[t.country&&!i.includes(t.country)?l("option",{value:t[s],children:t[s]}):l("option",{value:"",children:o("select_country")}),i.map(u=>l("option",{value:u,children:u},u))]}),l("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:l("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):l("input",{autoFocus:c===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:h,id:d,defaultValue:t[s],required:!0}),c===Ni.length-1?l("hr",{class:"m-0 w-full border-b border-b-transparent"}):l("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),l("div",{class:"flex w-full flex-1 ",children:[l("div",{class:"flex-grow",children:r}),l(ee,{class:"flex items-center justify-center"})]})]})},pa=()=>{const t=ft(null);return _t(()=>{var e;(e=t.current)==null||e.focus()},[]),t},Oi=["true","false"],qf=lu(Oi),Kf="answer",Fi="flex items-center gap-2 p-2.5",Di=Rr(({label:t,...e},r)=>l("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",...e,ref:r,children:l("p",{class:"truncate text-center text-base",children:t})})),Gf=({input:t,onSubmitSuccess:e})=>{const r=pa();return l("form",{noValidate:!0,class:"",onSubmit:a=>{a.preventDefault();const n=jd(a).value,i=Qe(qf,n);e({type:"boolean",value:i==="true"})},children:[l("ul",{class:Fi,children:Oi.map((a,n)=>l("li",{class:"flex-1",children:l(Di,{ref:n===0?r:null,type:"submit",name:Kf,value:a,label:t.config.labels[a]},a)}))}),t.config.optional&&l("div",{class:"px-2 pb-2",children:l(re,{class:"w-full",type:"button",onClick:()=>e(null)})})]})},Wf=t=>new Promise((e,r)=>{const a=new FileReader;a.readAsDataURL(t),a.onload=()=>a.result?e(a.result.toString()):r("No result from reader"),a.onerror=r}),Yf=t=>t.reduce((e,r)=>e+r.sizeKb,0),Xf=pe("file"),Li=3,Jf=({file:t,class:e,...r})=>{const a=t.name.split(".").pop(),n=t.name.replace(new RegExp(`.${a}$`),"");return l("div",{class:Xt("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",e),...r,children:[l("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[l("span",{class:"block truncate",children:n}),l("span",{children:[".",a]})]}),l("p",{"aria-label":"File size",class:"text-accent-11",children:Pe(t.sizeKb)})]})},Vi=({class:t,...e})=>l("li",{class:Xt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",t),...e}),ji=t=>{const e=t.split(".").pop();if(!e)throw new Error("No file extension found");return e?"."+e:""},Zf=({allowedExtensions:t,files:e})=>{const r=t.map(a=>a.toLowerCase());return e.every(a=>r.includes(ji(a.name).toLowerCase()))},Qf=(t,e)=>{const r=ji(t);return`${t.replace(new RegExp(`${r}$`),"").slice(0,e)}${r}`},th=({input:t,onSubmitSuccess:e})=>{var u;const r=(u=T.current$.value.flow)==null?void 0:u.data.submissions[t.key],[a,n]=bt(Xf(r)?r.value:[]),[i,o]=bt(),s=a.length-Li,c=Yf(a),d=pa(),{t:h}=nt();return l("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:p=>(p.preventDefault(),o(void 0),a.length===0?o({type:"required",message:h("validation_file")}):t.config.extensions.length>0&&!Zf({allowedExtensions:t.config.extensions,files:a})?o({type:"validate",message:`${h("validation_file_ext",{ext:t.config.extensions.join(", ")})}`}):t.config.fileSizeLimitKib&&c>t.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Pe(t.config.fileSizeLimitKib)}`}):t.config.allowMultiple===!1&&a.length>1?o({type:"invalid",message:h("validation_file_max",{count:1})}):e({type:"file",value:a})),children:[l("div",{class:"flex items-center gap-2",children:[l("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:[a.length>0?l(W,{children:[l("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[a.slice(0,Li).map(p=>{const v=p.name.split(".").pop(),g=p.name.replace(new RegExp(`.${v}$`),"");return l(Vi,{class:"flex overflow-hidden",children:[l("span",{class:"block truncate",children:g}),l("span",{children:[".",v]})]})}),s>0?l(Vi,{children:["+",s," file",s!==1?"s":""]}):null]}),l("p",{class:"text-neutral-11 text-xs",children:[Pe(c)," ",a.length>1?"total":""]})]}):l("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[l("header",{class:"flex flex-col items-center gap-0",children:[l("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:l("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"})}),l("p",{class:"text-neutral-12 tracking-[-0.01em]",children:h("upload_file",{count:t.config.allowMultiple?2:1})}),t.config.fileSizeLimitKib?l("p",{class:"text-neutral-10 text-xs",children:["(",h("file_max_size",{size:Pe(t.config.fileSizeLimitKib)}),")"]}):null]}),l("aside",{class:"flex flex-col items-center gap-2",children:[l("p",{id:"accepted-filetypes",class:"sr-only",children:h("file_extensions")}),l("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:t.config.extensions.map(p=>l("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:p.replace(".","")}))})]})]}),l("input",{id:"dropzone-file",onInput:async p=>{yt(p.target instanceof HTMLInputElement);const v=p.target.files?Array.from(p.target.files):[],g=await Promise.allSettled(v.map(async k=>{const y=await Wf(k);return{name:Qf(k.name,42),data:y,sizeKb:k.size/1e3}}));if(g.some(({status:k})=>k==="rejected"))return o({type:"invalid",message:"Invalid file"});const _=g.map(k=>k.status==="fulfilled"?k.value:null).filter(Boolean);n(_)},multiple:t.config.allowMultiple,type:"file",class:"sr-only"})]}),l("div",{class:"flex h-full flex-col items-center gap-2",children:[l(ee,{disabled:a.length===0}),t.config.optional&&l(re,{onClick:()=>e(null)})]})]}),l(ge,{error:i})]})};var ze=t=>t.type==="checkbox",be=t=>t instanceof Date,it=t=>t==null;const zi=t=>typeof t=="object";var G=t=>!it(t)&&!Array.isArray(t)&&zi(t)&&!be(t),eh=t=>G(t)&&t.target?ze(t.target)?t.target.checked:t.target.value:t,rh=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,ah=(t,e)=>t.has(rh(e)),nh=t=>{const e=t.constructor&&t.constructor.prototype;return G(e)&&e.hasOwnProperty("isPrototypeOf")},ga=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ft(t){let e;const r=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(ga&&(t instanceof Blob||t instanceof FileList))&&(r||G(t)))if(e=r?[]:{},!r&&!nh(t))e=t;else for(const a in t)t.hasOwnProperty(a)&&(e[a]=Ft(t[a]));else return t;return e}var Re=t=>Array.isArray(t)?t.filter(Boolean):[],U=t=>t===void 0,$=(t,e,r)=>{if(!e||!G(t))return r;const a=Re(e.split(/[,[\].]+?/)).reduce((n,i)=>it(n)?n:n[i],t);return U(a)||a===t?U(t[e])?r:t[e]:a},Kt=t=>typeof t=="boolean";const Ri={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};kt.createContext(null);var ih=(t,e,r,a=!0)=>{const n={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(n,i,{get:()=>{const o=i;return e._proxyFormState[o]!==xt.all&&(e._proxyFormState[o]=!a||xt.all),r&&(r[o]=!0),t[o]}});return n},vt=t=>G(t)&&!Object.keys(t).length,oh=(t,e,r,a)=>{r(t);const{name:n,...i}=t;return vt(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(o=>e[o]===(!a||xt.all))},ba=t=>Array.isArray(t)?t:[t];function sh(t){const e=kt.useRef(t);e.current=t,kt.useEffect(()=>{const r=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{r&&r.unsubscribe()}},[t.disabled])}var Et=t=>typeof t=="string",lh=(t,e,r,a,n)=>Et(t)?(a&&e.watch.add(t),$(r,t,n)):Array.isArray(t)?t.map(i=>(a&&e.watch.add(i),$(r,i))):(a&&(e.watchAll=!0),r),va=t=>/^\w*$/.test(t),Bi=t=>Re(t.replace(/["|']|\]/g,"").split(/\.|\[/));function V(t,e,r){let a=-1;const n=va(e)?[e]:Bi(e),i=n.length,o=i-1;for(;++a<i;){const s=n[a];let c=r;if(a!==o){const d=t[s];c=G(d)||Array.isArray(d)?d:isNaN(+n[a+1])?{}:[]}t[s]=c,t=t[s]}return t}var Ui=(t,e,r,a,n)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[a]:n||!0}}:{},Hi=t=>({isOnSubmit:!t||t===xt.onSubmit,isOnBlur:t===xt.onBlur,isOnChange:t===xt.onChange,isOnAll:t===xt.all,isOnTouch:t===xt.onTouched}),qi=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(a=>t.startsWith(a)&&/^\.\w+/.test(t.slice(a.length))));const pr=(t,e,r,a)=>{for(const n of r||Object.keys(t)){const i=$(t,n);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],n)&&!a)break;if(o.ref&&e(o.ref,o.name)&&!a)break}else G(s)&&pr(s,e)}}};var ch=(t,e,r)=>{const a=Re($(t,r));return V(a,"root",e[r]),V(t,r,a),t},wa=t=>t.type==="file",Gt=t=>typeof t=="function",gr=t=>{if(!ga)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},br=t=>Et(t),ma=t=>t.type==="radio",vr=t=>t instanceof RegExp;const Ki={value:!1,isValid:!1},Gi={value:!0,isValid:!0};var Wi=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!U(t[0].attributes.value)?U(t[0].value)||t[0].value===""?Gi:{value:t[0].value,isValid:!0}:Gi:Ki}return Ki};const Yi={isValid:!1,value:null};var Xi=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,Yi):Yi;function Ji(t,e,r="validate"){if(br(t)||Array.isArray(t)&&t.every(br)||Kt(t)&&!t)return{type:r,message:br(t)?t:"",ref:e}}var ve=t=>G(t)&&!vr(t)?t:{value:t,message:""},Zi=async(t,e,r,a,n)=>{const{ref:i,refs:o,required:s,maxLength:c,minLength:d,min:h,max:u,pattern:p,validate:v,name:g,valueAsNumber:_,mount:k,disabled:y}=t._f,m=$(e,g);if(!k||y)return{};const M=o?o[0]:i,F=D=>{a&&M.reportValidity&&(M.setCustomValidity(Kt(D)?"":D||""),M.reportValidity())},N={},H=ma(i),et=ze(i),pt=H||et,L=(_||wa(i))&&U(i.value)&&U(m)||gr(i)&&i.value===""||m===""||Array.isArray(m)&&!m.length,lt=Ui.bind(null,g,r,N),ot=(D,P,q,ct=Dt.maxLength,wt=Dt.minLength)=>{const It=D?P:q;N[g]={type:D?ct:wt,message:It,ref:i,...lt(D?ct:wt,It)}};if(n?!Array.isArray(m)||!m.length:s&&(!pt&&(L||it(m))||Kt(m)&&!m||et&&!Wi(o).isValid||H&&!Xi(o).isValid)){const{value:D,message:P}=br(s)?{value:!!s,message:s}:ve(s);if(D&&(N[g]={type:Dt.required,message:P,ref:M,...lt(Dt.required,P)},!r))return F(P),N}if(!L&&(!it(h)||!it(u))){let D,P;const q=ve(u),ct=ve(h);if(!it(m)&&!isNaN(m)){const wt=i.valueAsNumber||m&&+m;it(q.value)||(D=wt>q.value),it(ct.value)||(P=wt<ct.value)}else{const wt=i.valueAsDate||new Date(m),It=xr=>new Date(new Date().toDateString()+" "+xr),ne=i.type=="time",He=i.type=="week";Et(q.value)&&m&&(D=ne?It(m)>It(q.value):He?m>q.value:wt>new Date(q.value)),Et(ct.value)&&m&&(P=ne?It(m)<It(ct.value):He?m<ct.value:wt<new Date(ct.value))}if((D||P)&&(ot(!!D,q.message,ct.message,Dt.max,Dt.min),!r))return F(N[g].message),N}if((c||d)&&!L&&(Et(m)||n&&Array.isArray(m))){const D=ve(c),P=ve(d),q=!it(D.value)&&m.length>+D.value,ct=!it(P.value)&&m.length<+P.value;if((q||ct)&&(ot(q,D.message,P.message),!r))return F(N[g].message),N}if(p&&!L&&Et(m)){const{value:D,message:P}=ve(p);if(vr(D)&&!m.match(D)&&(N[g]={type:Dt.pattern,message:P,ref:i,...lt(Dt.pattern,P)},!r))return F(P),N}if(v){if(Gt(v)){const D=await v(m,e),P=Ji(D,M);if(P&&(N[g]={...P,...lt(Dt.validate,P.message)},!r))return F(P.message),N}else if(G(v)){let D={};for(const P in v){if(!vt(D)&&!r)break;const q=Ji(await v[P](m,e),M,P);q&&(D={...q,...lt(P,q.message)},F(q.message),r&&(N[g]=D))}if(!vt(D)&&(N[g]={ref:M,...D},!r))return N}}return F(!0),N};function uh(t,e){const r=e.slice(0,-1).length;let a=0;for(;a<r;)t=U(t)?a++:t[e[a++]];return t}function dh(t){for(const e in t)if(t.hasOwnProperty(e)&&!U(t[e]))return!1;return!0}function J(t,e){const r=Array.isArray(e)?e:va(e)?[e]:Bi(e),a=r.length===1?t:uh(t,r),n=r.length-1,i=r[n];return a&&delete a[i],n!==0&&(G(a)&&vt(a)||Array.isArray(a)&&dh(a))&&J(t,r.slice(0,-1)),t}function _a(){let t=[];return{get observers(){return t},next:n=>{for(const i of t)i.next&&i.next(n)},subscribe:n=>(t.push(n),{unsubscribe:()=>{t=t.filter(i=>i!==n)}}),unsubscribe:()=>{t=[]}}}var wr=t=>it(t)||!zi(t);function ae(t,e){if(wr(t)||wr(e))return t===e;if(be(t)&&be(e))return t.getTime()===e.getTime();const r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;for(const n of r){const i=t[n];if(!a.includes(n))return!1;if(n!=="ref"){const o=e[n];if(be(i)&&be(o)||G(i)&&G(o)||Array.isArray(i)&&Array.isArray(o)?!ae(i,o):i!==o)return!1}}return!0}var Qi=t=>t.type==="select-multiple",fh=t=>ma(t)||ze(t),ya=t=>gr(t)&&t.isConnected,to=t=>{for(const e in t)if(Gt(t[e]))return!0;return!1};function mr(t,e={}){const r=Array.isArray(t);if(G(t)||r)for(const a in t)Array.isArray(t[a])||G(t[a])&&!to(t[a])?(e[a]=Array.isArray(t[a])?[]:{},mr(t[a],e[a])):it(t[a])||(e[a]=!0);return e}function eo(t,e,r){const a=Array.isArray(t);if(G(t)||a)for(const n in t)Array.isArray(t[n])||G(t[n])&&!to(t[n])?U(e)||wr(r[n])?r[n]=Array.isArray(t[n])?mr(t[n],[]):{...mr(t[n])}:eo(t[n],it(e)?{}:e[n],r[n]):r[n]=!ae(t[n],e[n]);return r}var xa=(t,e)=>eo(t,e,mr(e)),ro=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:a})=>U(t)?t:e?t===""?NaN:t&&+t:r&&Et(t)?new Date(t):a?a(t):t;function ka(t){const e=t.ref;if(!(t.refs?t.refs.every(r=>r.disabled):e.disabled))return wa(e)?e.files:ma(e)?Xi(t.refs).value:Qi(e)?[...e.selectedOptions].map(({value:r})=>r):ze(e)?Wi(t.refs).value:ro(U(e.value)?t.ref.value:e.value,t)}var hh=(t,e,r,a)=>{const n={};for(const i of t){const o=$(e,i);o&&V(n,i,o._f)}return{criteriaMode:r,names:[...t],fields:n,shouldUseNativeValidation:a}},Be=t=>U(t)?t:vr(t)?t.source:G(t)?vr(t.value)?t.value.source:t.value:t,ph=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function ao(t,e,r){const a=$(t,r);if(a||va(r))return{error:a,name:r};const n=r.split(".");for(;n.length;){const i=n.join("."),o=$(e,i),s=$(t,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};n.pop()}return{name:r}}var gh=(t,e,r,a,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(e||t):(r?a.isOnBlur:n.isOnBlur)?!t:(r?a.isOnChange:n.isOnChange)?t:!0,bh=(t,e)=>!Re($(t,e)).length&&J(t,e);const vh={mode:xt.onSubmit,reValidateMode:xt.onChange,shouldFocusError:!0};function wh(t={},e){let r={...vh,...t},a={submitCount:0,isDirty:!1,isLoading:Gt(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},n={},i=G(r.defaultValues)||G(r.values)?Ft(r.defaultValues||r.values)||{}:{},o=r.shouldUnregister?{}:Ft(i),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d,h=0;const u={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:_a(),array:_a(),state:_a()},v=t.resetOptions&&t.resetOptions.keepDirtyValues,g=Hi(r.mode),_=Hi(r.reValidateMode),k=r.criteriaMode===xt.all,y=f=>b=>{clearTimeout(h),h=setTimeout(f,b)},m=async f=>{if(u.isValid||f){const b=r.resolver?vt((await L()).errors):await ot(n,!0);b!==a.isValid&&p.state.next({isValid:b})}},M=f=>u.isValidating&&p.state.next({isValidating:f}),F=(f,b=[],w,E,S=!0,x=!0)=>{if(E&&w){if(s.action=!0,x&&Array.isArray($(n,f))){const I=w($(n,f),E.argA,E.argB);S&&V(n,f,I)}if(x&&Array.isArray($(a.errors,f))){const I=w($(a.errors,f),E.argA,E.argB);S&&V(a.errors,f,I),bh(a.errors,f)}if(u.touchedFields&&x&&Array.isArray($(a.touchedFields,f))){const I=w($(a.touchedFields,f),E.argA,E.argB);S&&V(a.touchedFields,f,I)}u.dirtyFields&&(a.dirtyFields=xa(i,o)),p.state.next({name:f,isDirty:P(f,b),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else V(o,f,b)},N=(f,b)=>{V(a.errors,f,b),p.state.next({errors:a.errors})},H=(f,b,w,E)=>{const S=$(n,f);if(S){const x=$(o,f,U(w)?$(i,f):w);U(x)||E&&E.defaultChecked||b?V(o,f,b?x:ka(S._f)):wt(f,x),s.mount&&m()}},et=(f,b,w,E,S)=>{let x=!1,I=!1;const j={name:f};if(!w||E){u.isDirty&&(I=a.isDirty,a.isDirty=j.isDirty=P(),x=I!==j.isDirty);const K=ae($(i,f),b);I=$(a.dirtyFields,f),K?J(a.dirtyFields,f):V(a.dirtyFields,f,!0),j.dirtyFields=a.dirtyFields,x=x||u.dirtyFields&&I!==!K}if(w){const K=$(a.touchedFields,f);K||(V(a.touchedFields,f,w),j.touchedFields=a.touchedFields,x=x||u.touchedFields&&K!==w)}return x&&S&&p.state.next(j),x?j:{}},pt=(f,b,w,E)=>{const S=$(a.errors,f),x=u.isValid&&Kt(b)&&a.isValid!==b;if(t.delayError&&w?(d=y(()=>N(f,w)),d(t.delayError)):(clearTimeout(h),d=null,w?V(a.errors,f,w):J(a.errors,f)),(w?!ae(S,w):S)||!vt(E)||x){const I={...E,...x&&Kt(b)?{isValid:b}:{},errors:a.errors,name:f};a={...a,...I},p.state.next(I)}M(!1)},L=async f=>r.resolver(o,r.context,hh(f||c.mount,n,r.criteriaMode,r.shouldUseNativeValidation)),lt=async f=>{const{errors:b}=await L(f);if(f)for(const w of f){const E=$(b,w);E?V(a.errors,w,E):J(a.errors,w)}else a.errors=b;return b},ot=async(f,b,w={valid:!0})=>{for(const E in f){const S=f[E];if(S){const{_f:x,...I}=S;if(x){const j=c.array.has(x.name),K=await Zi(S,o,k,r.shouldUseNativeValidation&&!b,j);if(K[x.name]&&(w.valid=!1,b))break;!b&&($(K,x.name)?j?ch(a.errors,K,x.name):V(a.errors,x.name,K[x.name]):J(a.errors,x.name))}I&&await ot(I,b,w)}}return w.valid},D=()=>{for(const f of c.unMount){const b=$(n,f);b&&(b._f.refs?b._f.refs.every(w=>!ya(w)):!ya(b._f.ref))&&Ca(f)}c.unMount=new Set},P=(f,b)=>(f&&b&&V(o,f,b),!ae(fo(),i)),q=(f,b,w)=>lh(f,c,{...s.mount?o:U(b)?i:Et(f)?{[f]:b}:b},w,b),ct=f=>Re($(s.mount?o:i,f,t.shouldUnregister?$(i,f,[]):[])),wt=(f,b,w={})=>{const E=$(n,f);let S=b;if(E){const x=E._f;x&&(!x.disabled&&V(o,f,ro(b,x)),S=gr(x.ref)&&it(b)?"":b,Qi(x.ref)?[...x.ref.options].forEach(I=>I.selected=S.includes(I.value)):x.refs?ze(x.ref)?x.refs.length>1?x.refs.forEach(I=>(!I.defaultChecked||!I.disabled)&&(I.checked=Array.isArray(S)?!!S.find(j=>j===I.value):S===I.value)):x.refs[0]&&(x.refs[0].checked=!!S):x.refs.forEach(I=>I.checked=I.value===S):wa(x.ref)?x.ref.value="":(x.ref.value=S,x.ref.type||p.values.next({name:f,values:{...o}})))}(w.shouldDirty||w.shouldTouch)&&et(f,S,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&Sa(f)},It=(f,b,w)=>{for(const E in b){const S=b[E],x=`${f}.${E}`,I=$(n,x);(c.array.has(f)||!wr(S)||I&&!I._f)&&!be(S)?It(x,S,w):wt(x,S,w)}},ne=(f,b,w={})=>{const E=$(n,f),S=c.array.has(f),x=Ft(b);V(o,f,x),S?(p.array.next({name:f,values:{...o}}),(u.isDirty||u.dirtyFields)&&w.shouldDirty&&p.state.next({name:f,dirtyFields:xa(i,o),isDirty:P(f,x)})):E&&!E._f&&!it(x)?It(f,x,w):wt(f,x,w),qi(f,c)&&p.state.next({...a}),p.values.next({name:f,values:{...o}}),!s.mount&&e()},He=async f=>{const b=f.target;let w=b.name,E=!0;const S=$(n,w),x=()=>b.type?ka(S._f):eh(f),I=j=>{E=Number.isNaN(j)||j===$(o,w,j)};if(S){let j,K;const kr=x(),we=f.type===Ri.BLUR||f.type===Ri.FOCUS_OUT,vp=!ph(S._f)&&!r.resolver&&!$(a.errors,w)&&!S._f.deps||gh(we,$(a.touchedFields,w),a.isSubmitted,_,g),Ea=qi(w,c,we);V(o,w,kr),we?(S._f.onBlur&&S._f.onBlur(f),d&&d(0)):S._f.onChange&&S._f.onChange(f);const Ia=et(w,kr,we,!1),wp=!vt(Ia)||Ea;if(!we&&p.values.next({name:w,type:f.type,values:{...o}}),vp)return u.isValid&&m(),wp&&p.state.next({name:w,...Ea?{}:Ia});if(!we&&Ea&&p.state.next({...a}),M(!0),r.resolver){const{errors:_o}=await L([w]);if(I(kr),E){const mp=ao(a.errors,n,w),yo=ao(_o,n,mp.name||w);j=yo.error,w=yo.name,K=vt(_o)}}else j=(await Zi(S,o,k,r.shouldUseNativeValidation))[w],I(kr),E&&(j?K=!1:u.isValid&&(K=await ot(n,!0)));E&&(S._f.deps&&Sa(S._f.deps),pt(w,K,j,Ia))}},xr=(f,b)=>{if($(a.errors,b)&&f.focus)return f.focus(),1},Sa=async(f,b={})=>{let w,E;const S=ba(f);if(M(!0),r.resolver){const x=await lt(U(f)?f:S);w=vt(x),E=f?!S.some(I=>$(x,I)):w}else f?(E=(await Promise.all(S.map(async x=>{const I=$(n,x);return await ot(I&&I._f?{[x]:I}:I)}))).every(Boolean),!(!E&&!a.isValid)&&m()):E=w=await ot(n);return p.state.next({...!Et(f)||u.isValid&&w!==a.isValid?{}:{name:f},...r.resolver||!f?{isValid:w}:{},errors:a.errors,isValidating:!1}),b.shouldFocus&&!E&&pr(n,xr,f?S:c.mount),E},fo=f=>{const b={...i,...s.mount?o:{}};return U(f)?b:Et(f)?$(b,f):f.map(w=>$(b,w))},ho=(f,b)=>({invalid:!!$((b||a).errors,f),isDirty:!!$((b||a).dirtyFields,f),isTouched:!!$((b||a).touchedFields,f),error:$((b||a).errors,f)}),hp=f=>{f&&ba(f).forEach(b=>J(a.errors,b)),p.state.next({errors:f?a.errors:{}})},po=(f,b,w)=>{const E=($(n,f,{_f:{}})._f||{}).ref;V(a.errors,f,{...b,ref:E}),p.state.next({name:f,errors:a.errors,isValid:!1}),w&&w.shouldFocus&&E&&E.focus&&E.focus()},pp=(f,b)=>Gt(f)?p.values.subscribe({next:w=>f(q(void 0,b),w)}):q(f,b,!0),Ca=(f,b={})=>{for(const w of f?ba(f):c.mount)c.mount.delete(w),c.array.delete(w),b.keepValue||(J(n,w),J(o,w)),!b.keepError&&J(a.errors,w),!b.keepDirty&&J(a.dirtyFields,w),!b.keepTouched&&J(a.touchedFields,w),!r.shouldUnregister&&!b.keepDefaultValue&&J(i,w);p.values.next({values:{...o}}),p.state.next({...a,...b.keepDirty?{isDirty:P()}:{}}),!b.keepIsValid&&m()},go=({disabled:f,name:b,field:w,fields:E,value:S})=>{if(Kt(f)){const x=f?void 0:U(S)?ka(w?w._f:$(E,b)._f):S;V(o,b,x),et(b,x,!1,!1,!0)}},$a=(f,b={})=>{let w=$(n,f);const E=Kt(b.disabled);return V(n,f,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:f}},name:f,mount:!0,...b}}),c.mount.add(f),w?go({field:w,disabled:b.disabled,name:f}):H(f,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Be(b.min),max:Be(b.max),minLength:Be(b.minLength),maxLength:Be(b.maxLength),pattern:Be(b.pattern)}:{},name:f,onChange:He,onBlur:He,ref:S=>{if(S){$a(f,b),w=$(n,f);const x=U(S.value)&&S.querySelectorAll&&S.querySelectorAll("input,select,textarea")[0]||S,I=fh(x),j=w._f.refs||[];if(I?j.find(K=>K===x):x===w._f.ref)return;V(n,f,{_f:{...w._f,...I?{refs:[...j.filter(ya),x,...Array.isArray($(i,f))?[{}]:[]],ref:{type:x.type,name:f}}:{ref:x}}}),H(f,!1,void 0,x)}else w=$(n,f,{}),w._f&&(w._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(ah(c.array,f)&&s.action)&&c.unMount.add(f)}}},bo=()=>r.shouldFocusError&&pr(n,xr,c.mount),gp=f=>{Kt(f)&&(p.state.next({disabled:f}),pr(n,b=>{b.disabled=f},0,!1))},vo=(f,b)=>async w=>{w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let E=Ft(o);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:S,values:x}=await L();a.errors=S,E=x}else await ot(n);J(a.errors,"root"),vt(a.errors)?(p.state.next({errors:{}}),await f(E,w)):(b&&await b({...a.errors},w),bo(),setTimeout(bo)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:vt(a.errors),submitCount:a.submitCount+1,errors:a.errors})},bp=(f,b={})=>{$(n,f)&&(U(b.defaultValue)?ne(f,$(i,f)):(ne(f,b.defaultValue),V(i,f,b.defaultValue)),b.keepTouched||J(a.touchedFields,f),b.keepDirty||(J(a.dirtyFields,f),a.isDirty=b.defaultValue?P(f,$(i,f)):P()),b.keepError||(J(a.errors,f),u.isValid&&m()),p.state.next({...a}))},wo=(f,b={})=>{const w=f?Ft(f):i,E=Ft(w),S=f&&!vt(f)?E:i;if(b.keepDefaultValues||(i=w),!b.keepValues){if(b.keepDirtyValues||v)for(const x of c.mount)$(a.dirtyFields,x)?V(S,x,$(o,x)):ne(x,$(S,x));else{if(ga&&U(f))for(const x of c.mount){const I=$(n,x);if(I&&I._f){const j=Array.isArray(I._f.refs)?I._f.refs[0]:I._f.ref;if(gr(j)){const K=j.closest("form");if(K){K.reset();break}}}}n={}}o=t.shouldUnregister?b.keepDefaultValues?Ft(i):{}:Ft(S),p.array.next({values:{...S}}),p.values.next({values:{...S}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&e(),s.mount=!u.isValid||!!b.keepIsValid,s.watch=!!t.shouldUnregister,p.state.next({submitCount:b.keepSubmitCount?a.submitCount:0,isDirty:b.keepDirty?a.isDirty:!!(b.keepDefaultValues&&!ae(f,i)),isSubmitted:b.keepIsSubmitted?a.isSubmitted:!1,dirtyFields:b.keepDirtyValues?a.dirtyFields:b.keepDefaultValues&&f?xa(i,f):{},touchedFields:b.keepTouched?a.touchedFields:{},errors:b.keepErrors?a.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?a.isSubmitSuccessful:!1,isSubmitting:!1})},mo=(f,b)=>wo(Gt(f)?f(o):f,b);return{control:{register:$a,unregister:Ca,getFieldState:ho,handleSubmit:vo,setError:po,_executeSchema:L,_getWatch:q,_getDirty:P,_updateValid:m,_removeUnmounted:D,_updateFieldArray:F,_updateDisabledField:go,_getFieldArray:ct,_reset:wo,_resetDefaultValues:()=>Gt(r.defaultValues)&&r.defaultValues().then(f=>{mo(f,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:f=>{a={...a,...f}},_disableForm:gp,_subjects:p,_proxyFormState:u,get _fields(){return n},get _formValues(){return o},get _state(){return s},set _state(f){s=f},get _defaultValues(){return i},get _names(){return c},set _names(f){c=f},get _formState(){return a},set _formState(f){a=f},get _options(){return r},set _options(f){r={...r,...f}}},trigger:Sa,register:$a,handleSubmit:vo,watch:pp,setValue:ne,getValues:fo,reset:mo,resetField:bp,clearErrors:hp,unregister:Ca,setError:po,setFocus:(f,b={})=>{const w=$(n,f),E=w&&w._f;if(E){const S=E.refs?E.refs[0]:E.ref;S.focus&&(S.focus(),b.shouldSelect&&S.select())}},getFieldState:ho}}function _r(t={}){const e=kt.useRef(),r=kt.useRef(),[a,n]=kt.useState({isDirty:!1,isValidating:!1,isLoading:Gt(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Gt(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...wh(t,()=>n(o=>({...o}))),formState:a});const i=e.current.control;return i._options=t,sh({subject:i._subjects.state,next:o=>{oh(o,i._proxyFormState,i._updateFormState,!0)&&n({...i._formState})}}),kt.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),kt.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==a.isDirty&&i._subjects.state.next({isDirty:o})}},[i,a.isDirty]),kt.useEffect(()=>{t.values&&!ae(t.values,r.current)?(i._reset(t.values,i._options.resetOptions),r.current=t.values):i._resetDefaultValues()},[t.values,i]),kt.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),e.current.formState=ih(a,i),e.current}var no=function(t,e,r){if(t&&"reportValidity"in t){var a=$(r,e);t.setCustomValidity(a&&a.message||""),t.reportValidity()}},mh=function(t,e){var r=function(n){var i=e.fields[n];i&&i.ref&&"reportValidity"in i.ref?no(i.ref,n,t):i.refs&&i.refs.forEach(function(o){return no(o,n,t)})};for(var a in e.fields)r(a)},_h=function(t,e){e.shouldUseNativeValidation&&mh(t,e);var r={};for(var a in t){var n=$(e.fields,a),i=Object.assign(t[a]||{},{ref:n&&n.ref});if(xh(e.names||Object.keys(t),a)){var o=Object.assign({},yh($(r,a)));V(o,"root",i),V(r,a,o)}else V(r,a,i)}return r},yh=function(t){return Array.isArray(t)?t.filter(Boolean):[]},xh=function(t,e){return t.some(function(r){return r.startsWith(e+".")})},kh=function(t,e){for(var r={};t.issues.length;){var a=t.issues[0];if(a.path){var n=a.path.map(function(s){return s.key}).join(".");if(r[n]||(r[n]={message:a.message,type:a.validation}),e){var i=r[n].types,o=i&&i[a.validation];r[n]=Ui(n,e,r,a.validation,o?[].concat(o,a.message):a.message)}t.issues.shift()}}return r},yr=function(t,e,r){return r===void 0&&(r={}),function(a,n,i){try{return Promise.resolve(function(o,s){try{var c=function(){function d(u){return{values:r.raw?a:u,errors:{}}}var h=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},e);return r.mode==="sync"?d(Qe(t,a,h)):Promise.resolve(fu(t,a,h)).then(d)}()}catch(d){return s(d)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(o instanceof Ze)return{values:{},errors:_h(kh(o,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}};const io=27,oo=12,so=10,Sh=pe("enum"),Ch=(t,e)=>{const r={min:t.minSelected??0,max:t.maxSelected??t.options.length};return yr(at({checked:vn(bn(pn()),a=>Object.entries(a).filter(([n,i])=>i).map(([n,i])=>n),[tr(r.max,e("validation_multiple_choice_max",{count:r.max})),Ce(r.min,e("validation_multiple_choice_min",{count:r.min}))])}))},$h=Rr(({option:t,...e},r)=>l(W,{children:[l("input",{class:"peer sr-only h-full",type:"checkbox",...e,ref:r}),l("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:e.id,children:t.label})]})),lo=$e("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:Fi}}}),Eh=({input:t,onSubmitSuccess:e})=>{var h,u;const r=t.key?(h=T.current$.value.flow)==null?void 0:h.data.submissions[t.key]:void 0,a=(t.config.minSelected===1||t.config.minSelected===void 0)&&t.config.maxSelected===1,n=a&&t.config.options.length===2,{t:i}=nt(),{register:o,handleSubmit:s,formState:{errors:c}}=_r({defaultValues:{checked:a?{}:Sh(r)?Object.fromEntries(r.value.map(p=>[p,!0])):{}},resolver:Ch(t.config,i)}),d=pa();return n?l("ul",{style:{maxHeight:6.5*io+5*oo+2*so},class:lo({variant:"booleanLike"}),children:t.config.options.map((p,v)=>l("li",{class:"flex-1",children:l(Di,{type:"submit",ref:g=>{g&&v===0&&(d.current=g)},label:p.label,value:"true",onClick:()=>e({type:"enum",value:[p.value]})})},p.value))}):l("form",{noValidate:!0,onSubmit:p=>s(v=>{const g=v.checked;e({type:"enum",value:g})})(p),children:[l("div",{class:"flex items-center gap-1",children:[l("ul",{style:{maxHeight:6.5*io+5*oo+2*so},class:lo({variant:t.config.options.length===1?"singleOption":void 0}),children:t.config.options.map((p,v)=>{const g=`checked.${p.value}`,{ref:_,...k}=o(g);return l("li",{class:"relative",children:l($h,{option:p,autoFocus:v===0,ref:y=>{y&&v===0&&(d.current=y),_(y)},id:g,...k,onClick:a?()=>e({type:"enum",value:[p.value]}):void 0})},p.value)})}),l("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[a?null:l(ee,{}),t.config.minSelected===0&&l(re,{type:"button",onClick:()=>e({type:"enum",value:[]})})]})]}),l("div",{class:"px-1",children:l(ge,{error:(u=c.checked)==null?void 0:u.root})})]})},Ih=pe("number"),Th=(t,e)=>{const r=t.min??Number.MIN_SAFE_INTEGER,a=t.max??Number.MAX_SAFE_INTEGER,n=t.decimalCases??0;return yr(at({number:Or(e("validation_number"),[mu(r,e("validation_number_min",{min:r})),wu(a,e("validation_number_max",{max:a})),bu(i=>i===Number(i.toFixed(n)),e("validation_number_decimal_cases",{count:n}))])}))},Ah=({input:t,onSubmitSuccess:e})=>{var u;const r=t.config.defaultValue,a=t.key?(u=T.current$.value.flow)==null?void 0:u.data.submissions[t.key]:void 0,{t:n}=nt(),{register:i,handleSubmit:o,formState:{errors:s}}=_r({defaultValues:{number:r?Number(r):Ih(a)?a.value:void 0},resolver:Th(t.config,n)}),{ref:c,...d}=i("number",{required:!t.config.optional,valueAsNumber:!0}),h=ft();return dt(()=>{h.current&&(h.current.focus(),h.current.select())},[]),l("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{p.number!==void 0&&e({type:"number",value:p.number})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative min-w-0 flex-grow",children:[l("input",{...d,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(h.current=p),c(p)},type:"text",min:t.config.min,max:t.config.max,class:je({optional:t.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:t.config.placeholder}),t.config.optional&&l(re,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(ge,{error:s.number})]})},Mh=t=>{if(t==="")return{countryCode:"",phoneNumber:""};const e=Object.entries(ha).find(n=>t.startsWith(n[1])),r=e?e[1]:"",a=t.replace(r,"");return/^\d+$/.test(a)?{countryCode:r,phoneNumber:a}:{countryCode:"",phoneNumber:""}},Nh="44",Ph=/^[0-9 ]+$/,Oh=pe("string"),Fh=pe("phone"),Dh=t=>{const e=Z(t("validation_country_code"),[_u(Ph,t("validation_country_code"))]),r=vn(Z(t("validation_phone"),[Ce(1,t("validation_phone"))]),a=>a.replace(/[^0-9]/g,""),[]);return yr(at({countryCode:e,phoneNumber:r}))},Lh=({input:t,onSubmitSuccess:e})=>{var _;const r=t.key?(_=T.current$.value.flow)==null?void 0:_.data.submissions[t.key]:void 0,{t:a}=nt(),[n,i]=bt(),o=Oh(r)?Mh(r.value):Fh(r)?r.value:void 0,{register:s,handleSubmit:c,formState:{errors:d},watch:h}=_r({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??t.config.defaultValue.countryCode??Nh,phoneNumber:(o==null?void 0:o.phoneNumber)??t.config.defaultValue.phoneNumber??""},resolver:Dh(a)}),{ref:u,...p}=s("phoneNumber",{required:!t.config.optional}),v=ft(),g=h("countryCode");return dt(()=>{v.current&&(v.current.focus(),v.current.select())},[]),l("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:c(k=>{const y=k.phoneNumber.replace(/[^0-9]/g,""),m=k.countryCode.replace(/[^0-9]/g,"");i(void 0);const M=t.config.minChars??7;if(y.length+m.length<M)return i(a("validation_phone_min_chars",{count:M}));t.config.submissionFormat==="phone"?e({type:"phone",value:{countryCode:m,phoneNumber:y}}):e({type:"string",value:g+k.phoneNumber})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[l("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_${t.key}`,children:[l("span",{children:["+",g]}),l("select",{...s("countryCode",{}),id:`isdk_phone_${t.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(ha).map(([k,y])=>l("option",{value:y,children:[k," (+",y,")"]},k))})]}),l("input",{...p,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(v.current=k),u(k)},class:je({optional:t.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:t.config.placeholder}),t.config.optional&&l(re,{class:"absolute bottom-0 right-0 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(ge,{error:d.countryCode||d.phoneNumber||{message:n}})]})},Vh=({input:t,onSubmitSuccess:e})=>l("div",{class:"flex flex-col items-center py-3",children:l("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:t.key,onClick:()=>{e(null)},children:l("span",{class:"flex items-center gap-1.5",children:[l("span",{class:"inline-flex items-center text-sm font-medium",children:t.config.label||"Submit"}),l("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:[l("path",{d:"M4 8L8 4L12 8"}),l("path",{d:"M8 4V13"})]})]})})}),jh={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},zh=pe("string"),Rh=(t,e)=>{const r={maxLength:e("validation_max_chars",{count:t.maxChars??999}),minLength:e("validation_min_chars",{count:t.minChars??1})};return yr(at({text:{email:Z(e("validation_email"),[vu(e("validation_email")),Ce(t.minChars??1,r.minLength),tr(t.maxChars??1/0,r.maxLength)]),text:Z([Ce(t.minChars??1,r.minLength),tr(t.maxChars??1/0,r.maxLength)]),url:Z([yu(e("validation_url")),Ce(t.minChars??1,r.minLength),tr(t.maxChars??1/0,r.maxLength)])}[t.format]}))},Bh={text:({input:t,onSubmitSuccess:e})=>{var u;const{t:r}=nt(),a=t.key?(u=T.current$.value.flow)==null?void 0:u.data.submissions[t.key]:void 0,n=t.config.defaultValue,{register:i,handleSubmit:o,formState:{errors:s}}=_r({defaultValues:{text:n||(zh(a)?a.value:"")},resolver:Rh(t.config,r)}),{ref:c,...d}=i("text",{required:!t.config.optional}),h=ft();return dt(()=>{h.current&&(h.current.focus(),h.current.select())},[]),l("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{e({type:"string",value:p.text})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative min-w-0 flex-1",children:[l("input",{id:"chat-input",...d,...jh[t.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(h.current=p),c(p)},placeholder:t.config.placeholder,class:je({optional:!!t.config.optional,className:"w-full rounded-full"})}),t.config.optional&&l(re,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(ge,{error:s.text})]})},phone:Lh,"multiple-choice":Eh,boolean:Gf,file:th,submit:Vh,address:Uf,number:Ah},Uh=({logger:t})=>{var i;const e=(i=T.current$.value.flow)==null?void 0:i.data.currentInput,[r,a]=Mf(),n=ft(null);return T.inputHeight$.value=a.height,_t(()=>{const o=n.current;if(o)return o.addEventListener("transitionstart",tt.scrollToEnd.smooth),o.addEventListener("transitioncancel",tt.scrollToEnd.smooth),o.addEventListener("transitionend",tt.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",tt.scrollToEnd.smooth),o.removeEventListener("transitioncancel",tt.scrollToEnd.smooth),o.removeEventListener("transitionend",tt.scrollToEnd.smooth)}},[]),l("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:a.height},children:l("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:e?(()=>{const o=Bh[e.type];return l(o,{logger:t,onSubmitSuccess:tt.onSubmitSuccessFn$.value,input:e})})():l("div",{class:"flex items-center gap-2 p-2.5",children:[l("input",{"aria-hidden":"true",id:"chat-input",class:je({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),l(ee,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var Hh=function(t){return t instanceof RegExp},qh=function(e){var r=/[\\^$.*+?()[\]{}|]/g,a=RegExp(r.source);return e&&a.test(e)?e.replace(r,"\\$&"):e},co=function(t){return typeof t=="string"},Kh=function(t){var e=[];return t.forEach(function(r){Array.isArray(r)?e=e.concat(r):e.push(r)}),e};function Gh(t,e,r){var a=0,n=0;if(t==="")return t;if(!t||!co(t))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=e;Hh(i)||(i=new RegExp("("+qh(i)+")","gi"));for(var o=t.split(i),s=1,c=o.length;s<c;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}n=o[s].length,a+=o[s-1].length,o[s]=r(o[s],s,a),a+=n}return o}var Wh=function(e,r,a){return Array.isArray(e)||(e=[e]),Kh(e.map(function(n){return co(n)?Gh(n,r,a):n}))};const Ue=Tt(Wh),Yh=/(\[[^\]]+\]\([^)]+\))/g,Xh=/\[([^\]]+)\]\(([^)]+)\)/,Jh=/(https?:\/\/[^\s]+)/g,Zh=/_(.*?)_/g,Qh=/\*\*(.*?)\*\*/g,tp=/\\n|\n/g,uo="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",ep=t=>{const e=Ue(t,Yh,(o,s)=>{const[,c,d]=o.match(Xh)??[];return d?l("a",{class:uo,href:d,children:c??d},d+s):l("span",{children:"INVALID LINK"})}),r=Ue(e,Jh,(o,s)=>l("a",{class:uo,href:o,children:o},o+s)),a=Ue(r,Zh,(o,s)=>l("em",{children:o},o+s)),n=Ue(a,Qh,(o,s)=>l("strong",{children:o},o+s));return Ue(n,tp,(o,s)=>l("br",{},`br-${s}`))},rp=$e("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"}}),ap=({children:t,className:e,animate:r,side:a,...n})=>l("p",{style:{transformOrigin:a==="left"?"0% 50%":"100% 50%"},class:rp({className:e,side:a,animate:r}),...n,children:t}),np=({message:t})=>l("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:l("a",{onClick:t.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:t.href,children:[t.text,l("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l("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"})})]})}),ip=({className:t,...e})=>(_t(()=>{tt.scrollToEnd.smooth()}),l("div",{"aria-hidden":!0,children:tt.isBotTyping$.value===!0?l("div",{"aria-label":"Typing…",class:Xt("flex gap-1 p-4",t),...e,children:Array.from({length:3},(r,a)=>l("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-a*200}ms`}}))}):void 0})),op={bot:"left",user:"right"},sp=$e("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]"}}}),lp=({lastSentMessageFooter:t})=>{var r;const e=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return _t(()=>{tt.scrollToEnd.smooth()},[e.length]),l("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[e.map((a,n)=>l(W,{children:l("li",{class:"flex",children:Qt(a).with({type:"system"},i=>l("p",{class:sp({variant:i.variant}),children:i.text})).with({type:"text",author:A.union("bot","user")},i=>{const o=i.author==="user"&&!e.slice(n+1).some(d=>d.type==="text"&&d.author==="user"),s=n===e.length-1,c=i.author==="bot"?ep(i.text):i.text;return l(ap,{animate:s,side:op[i.author],children:[c,o?t:null]},n)}).with({type:"link"},i=>l(np,{message:i})).with({type:"image"},i=>l("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>l(Jf,{class:i.author==="bot"?void 0:"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).with({type:"loading"},i=>{const o=e[e.length-1];return!(i===o)||tt.isBotTyping$.value?null:l("div",{class:"flex flex-grow flex-col items-center justify-center",children:l(vi,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},n)),l(ip,{},"typing")]})},cp=({logger:t,apiClient:e,analytics:r})=>{const{flow:a}=T.current$.value;yt(a,"Flow is required to exist to show chatbot body");const n=T.viewState$.value,{chatRef:i,chatService:o}=Lf(),{t:s}=nt(),[c,d]=bt();return dt(()=>{n==="maximised"&&tt.scrollToEnd.instant()},[n]),dt(()=>{var k,y;const{state:h,flow:u}=T.current$.peek();if(h!=="loaded")throw new Error(s("invalid_state"));let p=u.data.nodeHistory.at(-1);if(tt.scrollToEnd.instant(),T.setInput(void 0),u.data.isFinished)return;p===void 0?(p=fi(a.nodes).id,T.setCurrentNodeId(p),r.log({event:"FLOW_START",properties:{flow_id:a.id,flow_version:a.version,flow_session_id:u.data.flowSessionId,flow_build:a.build,job:a.job},customProperties:(k=a.analytics)==null?void 0:k.customProperties})):T.removeMessagesSentByNodeIds([p]);const{interpret:v,abort:g,undo:_}=df({context:a.context,analytics:{service:r,customProperties:(y=a.analytics)==null?void 0:y.customProperties},apiClient:e,logger:t,flow:a,chatService:o,t:s,getSubmissions:()=>{var m;return(m=T.current$.peek().flow)==null?void 0:m.data.submissions},onInterpret:(m,M)=>{var N;const F=T.current$.peek().flow;yt(F),M&&(F.data.sequence=F.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:a.id,flow_version:a.version,from_node_id:M.id,flow_build:a.build,to_node_id:m.id,sequence:F.data.sequence,flow_session_id:F.data.flowSessionId,job:a.job},customProperties:(N=a.analytics)==null?void 0:N.customProperties})),T.setCurrentNodeId(m.id)},onFlowEnd:async()=>{var M;T.markAsFinished();const m=T.current$.peek().flow;yt(m),r.log({event:"FLOW_END",properties:{flow_id:a.id,flow_version:a.version,flow_session_id:m.data.flowSessionId,flow_build:a.build,job:a.job},customProperties:(M=a.analytics)==null?void 0:M.customProperties})}});return d(()=>_),v(p),g},[r,e,o,t,a,s]),l(W,{children:[l("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:T.inputHeight$.value},children:l(lp,{lastSentMessageFooter:a.data.isFinished||!c?null:l(dp,{undoFn:c})})}),l(Uh,{logger:t})]})},up=t=>"key"in t.data&&t.data.key?[t.data.key]:"keys"in t.data?Object.values(t.data.keys).filter(e=>typeof e=="string"):[],dp=({undoFn:t})=>{const{t:e}=nt();return l("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:l("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:r}=T.current$.peek();yt(r);const{removed:a}=t(r.data.nodeHistory),n=r.data.nodeHistory.splice(-a);n.length!==0&&(T.removeMessagesSentByNodeIds(n),T.setInput(void 0),n.pop(),n.map(i=>r.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(up).forEach(i=>delete r.data.submissions[i]),T.current$.value={...T.current$.value})},children:e("undo")})})},fp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:cp},Symbol.toStringTag,{value:"Module"}))})();
|
|
5
|
+
}`},Ci=({context:t,schema:e,logger:r})=>{if(e)for(const a in e){const n=e[a];if(!n)continue;const i=_e(t,a,null);if(n.required&&i===null){const o=`Configuration error in context: ${a} is required`;throw r.error(o),new Error(o)}switch(n.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${a} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${a} is not a string`);break;default:n.type}}},lf=({_internal_domManager:t=Jd(),theme:e,terms:r,feedback:a})=>Wt(({apiClient:n,logger:i,analytics:o})=>{let s=!1;const c=wd({locale:void 0,overrides:r??{}}),d=()=>{var p;if(typeof window>"u")return;const h=[ut("style",{id:"inploi-chatbot-styles"},Xd),ut("style",{id:"inploi-chatbot-theme"},sf(e))],u=t.getOrCreateChatbotElement();if(ce(ut(W,{},[h,ut(Gd,{apiClient:n,logger:i,analytics:o,params:{theme:e,terms:r,feedback:a}})]),u),a){const v=a.plugin({apiClient:n,logger:i,analytics:o}),g=u.querySelector("dialog");if(!g)throw new Error("Couldn't find feedback host");v.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:e.chroma??1,hue:e.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:"light",corners:"rounded",highlights:"stroke"},terms:((p=a.params)==null?void 0:p.terms)??{},host:g})}s=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(s)return;d(),i.info("Chatbot plugin prepared")}catch(h){i.error("Error preparing chatbot plugin",h)}},fetchFlowByJobId:async(h,u)=>{const p=new URLSearchParams({id_type:(u==null?void 0:u.idType)==="inploi"?"internal":"external"});return n.fetch([`/flow/job/${h}`,p.toString()].filter(Boolean).join("?")).then(v=>{const g=Qe(Yd,v);return{flow:g.flow,title:c("applying_for",{title:g.job.title}),flowKeys:[g.job.id,...(u==null?void 0:u.flowKeys)??[]],job:{id:g.job.id,id_type:"external"},...u}})},fetchFlowById:async(h,u)=>n.fetch(`/flow/id/${h}`).then(p=>{var g;const v=Qe(Wd,p);return{flow:v.flow,title:"Chatbot",flowKeys:(u==null?void 0:u.flowKeys)??[],...u,analytics:{customProperties:{flow_id:v.flow.id,flow_version:v.flow.version,...(g=u==null?void 0:u.analytics)==null?void 0:g.customProperties}}}}),open:async h=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",s||d(),h instanceof Promise?(T.current$.value={state:"loading"},h.then(async u=>{Ci({context:u.context||{},schema:u.flow.context_schema,logger:i}),T.startFlow(u)}).catch(u=>{const p=u instanceof Error?u.message:c("unknown_error");T.current$.value={state:"error",error:p}})):(Ci({context:h.context||{},schema:h.flow.context_schema,logger:i}),T.startFlow(h))}catch(u){i.error("Error starting flow",u)}},close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),i.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=lf;const $i=({condition:t,context:e,submissions:r,ifBlock:a})=>{const[n,...i]=t.compareKey.split(".");if(!n)return!1;const o=Ii({context:e,key:n,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{const s=_e(o.value,i.join("."));switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const s=_e(o.value,i.join(".")),c={...a,data:{...a.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return Le(c,{submissions:{_temp:{value:s,type:"boolean"}},context:e});case"string":return Le(c,{submissions:{_temp:{value:s,type:"string"}},context:e});case"number":return Le(c,{submissions:{_temp:{value:s,type:"number"}},context:e});case"object":return Array.isArray(s)&&s.every(hi)?Le(c,{submissions:{_temp:{value:s,type:"enum"}},context:e}):!1}break}case"boolean":{const s=t.compareValue==="true";switch(t.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{const s=o.type==="phone"?hr(o.value):o.value;switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"number":{try{const s=Number(t.compareValue);switch(t.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${a.id}`,o.value),!1}break}case"enum":switch(t.compare){case"equals":return o.value.length===1&&o.value[0]===t.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==t.compareValue;case"contains":return o.value.includes(t.compareValue);case"notContains":return!o.value.includes(t.compareValue)}break}},Le=(t,{context:e,submissions:r})=>{const a="combinator"in t.data?t.data.conditions:[t.data];if(("combinator"in t.data?t.data.combinator:"and")==="or"){for(const i of a)if($i({condition:i,context:e,submissions:r,ifBlock:t}))return!0;return!1}else{for(const i of a)if(!$i({condition:i,context:e,submissions:r,ifBlock:t}))return!1;return!0}},cf=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,$t=(t,{context:e,submissions:r})=>t.replace(cf,(a,n,i="")=>{const[o,...s]=n.trim().split("."),c=Ii({key:o,path:s,submissions:r,context:e});if(!c)return i;switch(c.type){case"boolean":return c.value===!0?"true":"false";case"file":return c.value.map(d=>`${d.name} (${Pe(d.sizeKb)})`).join(", ");case"enum":return c.value.join(", ");case"address":return Object.values(c.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return c.value?c.value.toString():i;case"phone":return hr(c.value);case"integration":{if(typeof c.value!="object"||Array.isArray(c.value))break;const d=_e(c.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(hi))return d.join(", ")}break}}return i}),Ei=({node:t,nodes:e,stopWhen:r})=>{if((r==null?void 0:r(t))===!0)return t;const a=t.nextId?e.find(n=>n.id===t.nextId):void 0;if(a)return Ei({node:a,nodes:e,stopWhen:r})},uf=({childNode:t,nodes:e})=>{const a=e.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;const i=e.find(s=>s.id===n.branchId);if(!i)return!1;const o=Ei({node:i,nodes:e,stopWhen:s=>s.id===t.id});return!(!o||o.id!==t.id)});if(a!=null&&a.nextId)return e.find(n=>n.id===a.nextId)},df=({flow:t,analytics:e,logger:r,context:a,apiClient:n,getSubmissions:i,chatService:o,onFlowEnd:s,onInterpret:c,t:d})=>{let h=new AbortController;const u={...e.service,log:v=>e.service.log({...v,customProperties:{...v.customProperties,...e.customProperties}})},p=async(v,g)=>{const _=i();c==null||c(v,g);try{await ff({flow:t,analytics:u,logger:r,apiClient:n,context:a,node:v,submissions:_,t:d,chat:{sendMessage:async k=>o.send({groupId:v.id,message:k,signal:h.signal}),userInput:async k=>o.input({input:k,signal:h.signal}),addToSubmissions:o.addToSubmissions},next:k=>{const y=k?t.nodes.find(m=>m.id===k):uf({childNode:v,nodes:t.nodes});return y?p(y,v):s==null?void 0:s(v)},end:()=>s==null?void 0:s(v)})}catch(k){if(k instanceof Oe)return;throw k}};return{interpret:async v=>{const g=t.nodes.find(_=>_.id===v)??fi(t.nodes);return p(g)},undo:v=>{let g=1;const _=t.nodes.find(y=>y.id===v[v.length-1]);for(let y=v.length-2;y>0;y--){const m=v[y],A=t.nodes.find(O=>O.id===m);if(!A||(g++,A.type.startsWith("question-")))break}h.abort(),h=new AbortController;const k=t.nodes.find(y=>y.id===v[v.length-g]);return yt(k,"Undo failed: new start node not found"),p(k,_),{removed:g}},abort:()=>{h.abort()}}},hr=t=>`+${t.countryCode} ${t.phoneNumber}`;async function ff(t){const e=t.node;switch(e.type){case"text":return _f({...t,node:e});case"image":return yf({...t,node:e});case"question-text":return xf({...t,node:e});case"question-enum":return Cf({...t,node:e});case"question-number":return kf({...t,node:e});case"question-phone":return Sf({...t,node:e});case"question-boolean":return $f({...t,node:e});case"question-file":return If({...t,node:e});case"question-address":return Ef({...t,node:e});case"end-flow":return Tf({...t,node:e});case"if-block":return mf({...t,node:e});case"jump":return gf({...t,node:e});case"link":return wf({...t,node:e});case"integration-application-submit":return vf({...t,node:e});case"add-submission":return bf({...t,node:e});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return pf({...t,node:e});case"feedback":return hf({...t,node:e});default:throw new Error(`Unknown node: ${JSON.stringify(e)}`)}}const Ve=(t,e)=>{var a;const r=(a=t[e])==null?void 0:a.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r};async function hf({next:t,node:e}){t(e.nextId)}async function pf({next:t,node:e,analytics:r,submissions:a,logger:n}){if(!a)return t(e.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:Ve(a,e.data.key).toString(),first_name:e.data.firstName?Ve(a,e.data.firstName).toString():void 0,last_name:e.data.lastName?Ve(a,e.data.lastName).toString():void 0,email:e.data.email?Ve(a,e.data.email).toString():void 0,phone_number:e.data.phoneNumber?Ve(a,e.data.phoneNumber).toString():void 0,custom_traits:e.data.customTraits?Object.fromEntries(e.data.customTraits.map(({key:i,value:o})=>{var s;return[i,(s=a[o])==null?void 0:s.value]})):void 0}})}catch(i){n.error(i)}finally{t(e.nextId)}}async function gf({next:t,node:e}){t(e.data.targetId)}async function bf({next:t,node:e,logger:r,submissions:a,context:n}){if(!a){r.error("Submissions not found");return}a[e.data.key]={type:"string",value:$t(e.data.value,{submissions:a,context:n})},t(e.nextId)}async function vf({chat:t,next:e,node:r,logger:a,apiClient:n,submissions:i,analytics:o,flow:s,t:c}){const d=async h=>{h!==!0&&await t.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await t.sendMessage({type:"loading"});const{anonymous_id:u,session_id:p}=o.getSessionInfo(),v=await n.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:u,session_id:p,job:s.job,submissions:Dd(i||{})})}).catch(g=>g);r.data.key&&t.addToSubmissions(r.data.key,{type:"integration",value:v}),Qt(v).with({integration_response:F.select(F.union({service:F.optional(F.string),status:F.number,data:F.any},{service:F.optional(F.string),status:F.number,error:{message:F.string,data:F.any}}))},g=>{o.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 Qt(v).with({integration_response:{data:F.select("redirect",{redirect_url:F.string,message:F.optional(F.union(F.string,F.nullish)),button_text:F.optional(F.union(F.string,F.nullish))})}},async g=>{await t.sendMessage({type:"text",author:"bot",text:g.redirect.message??c("submission_redirect_message")});try{const _=new URL(g.redirect.redirect_url);u&&!_.searchParams.has("anonymous_id")&&_.searchParams.set("anonymous_id",u),await t.sendMessage({type:"link",href:_.toString(),text:g.redirect.button_text??c("complete_submission"),onClick:()=>{if(!p){a.error("session_id not set, cannot log FLOW_REDIRECT event");return}o.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:p,flow_version:s.version,href:_.toString(),job:s.job}})}})}catch(_){a.error(`Invalid redirect URL: ${g.redirect.redirect_url}`,_),t.sendMessage({type:"system",variant:"error",text:c("redirect_url_error")})}e(r.nextId)}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await t.sendMessage({type:"system",variant:"success",text:c("submission_completed")}),e(r.nextId)}).with({integration_response:{error:F.select("error",{message:F.string})}},async g=>{a.error(g.error),await t.sendMessage({type:"system",variant:"error",text:g.error.message||c("submission_failed")}),await d(!1)}).otherwise(async g=>{a.error(g),await t.sendMessage({type:"system",variant:"error",text:c("submission_failed")}),await d(!1)})};await d(r.data.skipConfirmation)}async function wf({chat:t,next:e,node:r,submissions:a,context:n}){await t.sendMessage({type:"link",href:$t(r.data.href,{submissions:a,context:n}),text:$t(r.data.cta,{submissions:a,context:n})}),e(r.nextId)}async function mf({submissions:t,next:e,node:r,context:a}){e(Le(r,{submissions:t,context:a})?r.branchId:r.nextId)}async function _f({chat:t,next:e,node:r,submissions:a,context:n}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.text,{submissions:a,context:n})}),e(r.nextId)}async function yf({chat:t,next:e,node:r}){await t.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),e(r.nextId)}async function xf({chat:t,next:e,node:r,submissions:a,context:n,t:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const o=r.data.format==="phone"?await t.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,submissionFormat:"text",defaultValue:{}}}):await t.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 t.sendMessage({type:"system",variant:"info",text:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.type==="phone"?hr(o.value):o.value}),e(r.nextId)}async function kf({chat:t,next:e,node:r,submissions:a,context:n,t:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const o=await t.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 t.sendMessage({type:"system",variant:"info",text:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value.toString()}),e(r.nextId)}async function Sf({chat:t,next:e,node:r,submissions:a,context:n}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const i=await t.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});i===null?await t.sendMessage({type:"system",variant:"info",text:"Skipped"}):await t.sendMessage({author:"user",type:"text",text:i.type==="phone"?hr(i.value):i.value}),e(r.nextId)}async function Cf({chat:t,next:e,node:r,submissions:a,context:n,t:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const o=await t.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await t.sendMessage({type:"system",variant:"info",text:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),e(r.nextId)}async function $f({chat:t,next:e,node:r,submissions:a,context:n,t:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:n})});const o=await t.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await t.sendMessage({type:"system",variant:"info",text:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),e(r.nextId)}async function Ef({chat:t,next:e,node:r,t:a}){await t.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await t.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else{const i=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await t.sendMessage({author:"user",type:"text",text:i})}return e(r.nextId)}async function If({node:t,chat:e,next:r,submissions:a,context:n,t:i}){await e.sendMessage({author:"bot",type:"text",text:$t(t.data.question,{submissions:a,context:n})});const o=await e.userInput({key:t.data.key,type:"file",config:{optional:t.data.optional,extensions:t.data.extensions,fileSizeLimitKib:t.data.maxSizeKb??10*1024,allowMultiple:t.data.multiple===!0}});if(o===null)await e.sendMessage({type:"system",variant:"info",text:i("skipped")});else for(const s of o.value)await e.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});r(t.nextId)}async function Tf({chat:t,end:e,node:r}){await t.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),e()}const Ii=({key:t,path:e,submissions:r,context:a})=>{if(t==="$context"){if(!e)return;const n=_e(a,e.join("."));switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${e.join(".")}`,n);return}}return r==null?void 0:r[t]};function da(t,e,r){var a,n,i,o,s;e==null&&(e=100);function c(){var h=Date.now()-o;h<e&&h>=0?a=setTimeout(c,e-h):(a=null,r||(s=t.apply(i,n),i=n=null))}var d=function(){i=this,n=arguments,o=Date.now();var h=r&&!a;return a||(a=setTimeout(c,e)),h&&(s=t.apply(i,n),i=n=null),s};return d.clear=function(){a&&(clearTimeout(a),a=null)},d.flush=function(){a&&(s=t.apply(i,n),i=n=null,clearTimeout(a),a=null)},d}da.debounce=da;var Af=da;const Ti=Tt(Af);function Mf(t){let{debounce:e,scroll:r,polyfill:a,offsetSize:n}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const i=a||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,s]=bt({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=ft({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),d=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,u=ft(!1);_t(()=>(u.current=!0,()=>void(u.current=!1)));const[p,v,g]=Pt(()=>{const m=()=>{if(!c.current.element)return;const{left:A,top:O,width:M,height:H,bottom:et,right:pt,x:L,y:lt}=c.current.element.getBoundingClientRect(),ot={left:A,top:O,width:M,height:H,bottom:et,right:pt,x:L,y:lt};c.current.element instanceof HTMLElement&&n&&(ot.height=c.current.element.offsetHeight,ot.width=c.current.element.offsetWidth),Object.freeze(ot),u.current&&!Ff(c.current.lastBounds,ot)&&s(c.current.lastBounds=ot)};return[m,h?Ti(m,h):m,d?Ti(m,d):m]},[s,n,d,h]);function _(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(m=>m.removeEventListener("scroll",g,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function k(){c.current.element&&(c.current.resizeObserver=new i(g),c.current.resizeObserver.observe(c.current.element),r&&c.current.scrollContainers&&c.current.scrollContainers.forEach(m=>m.addEventListener("scroll",g,{capture:!0,passive:!0})))}const y=m=>{!m||m===c.current.element||(_(),c.current.element=m,c.current.scrollContainers=Ai(m),k())};return Pf(g,!!r),Nf(v),_t(()=>{_(),k()},[r,g,v]),_t(()=>_,[]),[y,o,p]}function Nf(t){_t(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Pf(t,e){_t(()=>{if(e){const r=t;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[t,e])}function Ai(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:a,overflowY:n}=window.getComputedStyle(t);return[r,a,n].some(i=>i==="auto"||i==="scroll")&&e.push(t),[...e,...Ai(t.parentElement)]}const Of=["x","y","top","bottom","left","right","width","height"],Ff=(t,e)=>Of.every(r=>t[r]===e[r]),ee=({class:t,...e})=>{const{t:r}=nt();return l("button",{class:Xt("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",t),type:"submit",...e,children:l("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[l("title",{children:r("send")}),l("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),l("path",{d:"M8 4V13"})]})})},Df=25,fa=Ut({instant:()=>{},smooth:()=>{}}),tt={onSubmitSuccessFn$:Ut(()=>{}),isBotTyping$:Ut(!1),scrollToEnd:{instant:()=>fa.value.instant(),smooth:()=>fa.value.smooth()}},Lf=()=>{const t=ft(null);dt(()=>{fa.value={instant:()=>{var r;return(r=t.current)==null?void 0:r.scrollTo({top:t.current.scrollHeight,behavior:"instant"})},smooth:()=>{t.current&&t.current.scrollHeight-t.current.scrollTop<=t.current.clientHeight*2&&t.current.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})}}},[t]);const e=Pt(()=>({addToSubmissions:(a,n)=>T.setSubmission(a,n),send:async({message:a,signal:n,groupId:i})=>{if(await Qt(a).with({author:"bot",type:"text"},async o=>{if(n!=null&&n.aborted)throw new Oe;tt.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Df;await new Promise(c=>setTimeout(c,s,{signal:n})),tt.isBotTyping$.value=!1}).otherwise(async()=>{}),n!=null&&n.aborted)throw new Oe;T.addMessage(a,i)},input:({input:a,signal:n})=>{if(n!=null&&n.aborted)throw new Oe;return T.setInput(a),new Promise(i=>{const o=s=>{if(n!=null&&n.aborted)throw new Oe;T.setInput(void 0),a.key&&T.setSubmission(a.key,s),i(s)};tt.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:t,chatService:e}},ge=({error:t})=>!t||!t.message?null:l("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[l("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),l("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),l("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),l("p",{class:"truncate pr-1 text-sm",children:t.message})]}),re=({class:t,...e})=>{const{t:r}=nt();return l("button",{type:"button",class:Xt("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",t),...e,children:[l("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[l("title",{children:r("skip")}),l("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),l("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})},ha={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":"262",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:"353","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":"850","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":"239",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"},je=$e("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),Vf="https://api.mapbox.com/search/searchbox/v1/suggest",jf="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",zf=t=>atob(t).split("").reverse().join(""),Ot=at({name:Z()}),Rf=at({suggestions:hn(at({full_address:Se(Z()),place_formatted:Se(Z()),name:Se(Z()),mapbox_id:Z(),context:hu(at({address:Ot,street:Ot,neighborhood:Ot,locality:Ot,district:Ot,place:Ot,region:Ot,postcode:Ot,country:Ot}))}))}),Bf=({logger:t,t:e})=>Pt(()=>{var a;const r=(a=T.current$.peek().flow)==null?void 0:a.data.flowSessionId;return r?{enabled:!0,getPredictions:async n=>{const i=new URL(Vf);i.searchParams.set("q",n),i.searchParams.set("session_token",r),i.searchParams.set("access_token",zf(jf));const o=await fetch(i);if(!o.ok)return t.error("Failed to get address details",o),{ok:!1,error:e("address_error")};const s=pu(Rf,await o.json());if(s.success===!1)return t.error("Failed to parse address details",s.issues),{ok:!1,error:e("address_error")};const{suggestions:c}=s.output;return{ok:!0,data:c.map(d=>{var h,u,p,v,g,_,k,y,m;return{label:d.full_address??d.place_formatted??d.name??d.mapbox_id,id:d.mapbox_id,address:{line1:((h=d.context.address)==null?void 0:h.name)??((u=d.context.street)==null?void 0:u.name),line2:void 0,line3:((p=d.context.neighborhood)==null?void 0:p.name)??((v=d.context.locality)==null?void 0:v.name),city:((g=d.context.place)==null?void 0:g.name)??((_=d.context.district)==null?void 0:_.name),state:(k=d.context.region)==null?void 0:k.name,postcode:(y=d.context.postcode)==null?void 0:y.name,country:(m=d.context.country)==null?void 0:m.name}}})}}}:{enabled:!1}},[t,e]),Mi=t=>{const{t:e}=nt();return l("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",...t,children:[l("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:l("path",{d:"M10 3L5 8L10 13"})}),l("span",{children:e("back")})]})},Uf=({input:t,onSubmitSuccess:e,logger:r})=>{const{t:a}=nt(),[n,i]=bt(),[o,s]=bt([]),{enabled:c,getPredictions:d}=Bf({logger:r,t:a}),[h,u]=bt(c?"query":"manual"),[p,v]=bt(""),[g,_]=bt(),k=y=>{yt(c,"Query state should not be enabled"),y=y.trim(),y!==(p==null?void 0:p.trim())&&(v(y),y===""&&s([]),_(void 0),d(y).then(m=>{if(m.ok===!1){s([]),_(m.error);return}s(m.data)}))};switch(h){case"query":return yt(c,"Query state should not be enabled"),l(Hf,{input:t,onSkip:()=>e(null),onAddressSelect:y=>{if(y===""){i(void 0),u("manual");return}const m=o.find(A=>A.id===y);m&&(i(m.address),u("details"))},onAddressSearch:y=>{k(y)},suggestions:o,query:p,error:g});case"details":return yt(n!==void 0),l(Pi,{input:t,logger:r,onSubmitSuccess:e,addressFields:n,actions:l(Mi,{onClick:()=>{u("query")}})});case"manual":return l(Pi,{logger:r,input:t,onSubmitSuccess:e,addressFields:{},actions:c?l(Mi,{onClick:()=>{u("query")}}):void 0})}},Hf=({input:t,onSkip:e,suggestions:r,onAddressSelect:a,query:n,onAddressSearch:i,error:o})=>{const{t:s}=nt(),c=ft(null);return dt(()=>{c.current&&(c.current.focus(),c.current.select())},[]),l(W,{children:[l("form",{noValidate:!0,onSubmit:d=>{d.preventDefault();const u=new FormData(d.currentTarget).get("address");typeof u=="string"&&i(u)},class:"flex gap-1 p-2.5",children:[l("div",{class:"group relative flex-1",children:[l("input",{ref:c,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:t.config.placeholder||s("address_search"),defaultValue:n,class:je({optional:!!t.config.optional,className:"w-full rounded-full"})}),l("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:l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[l("circle",{cx:"7",cy:"7",r:"4"}),l("path",{d:"M10 10L13 13"})]}),l("span",{class:"sr-only",children:s("search")})]})})]}),t.config.optional&&l(re,{class:"",onClick:e})]}),o?l(ge,{error:{message:o}}):null,l("ul",{children:[r.map(d=>l("li",{children:l("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:()=>{a(d.id)},children:[l("span",{class:"flex-grow",children:d.label}),l("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:l("path",{d:"M6 3L11 8L6 13"})})]})},d.id)),l("li",{children:l("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:()=>{a("")},children:l("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},Ni=["line1","line2","line3","city","state","postcode","country"],Pi=({addressFields:t,onSubmitSuccess:e,actions:r,input:a})=>{const n=ft(null);dt(()=>{if(n.current){const s=n.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const i=Object.keys(ha),{t:o}=nt();return l("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const c=new FormData(s.currentTarget),d=Object.fromEntries(c.entries());e({type:"address",value:d})},children:[l("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:n,children:Ni.map((s,c)=>{const d=`isdk_${s}`,h=a.config.keys[s];return h?l(W,{children:[l("label",{for:d,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:o(s)}),l("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?l("div",{class:"relative",children:[l("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:h,id:d,defaultValue:t[s],required:!0,children:[t.country&&!i.includes(t.country)?l("option",{value:t[s],children:t[s]}):l("option",{value:"",children:o("select_country")}),i.map(u=>l("option",{value:u,children:u},u))]}),l("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:l("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):l("input",{autoFocus:c===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:h,id:d,defaultValue:t[s],required:!0}),c===Ni.length-1?l("hr",{class:"m-0 w-full border-b border-b-transparent"}):l("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),l("div",{class:"flex w-full flex-1 ",children:[l("div",{class:"flex-grow",children:r}),l(ee,{class:"flex items-center justify-center"})]})]})},pa=()=>{const t=ft(null);return _t(()=>{var e;(e=t.current)==null||e.focus()},[]),t},Oi=["true","false"],qf=lu(Oi),Kf="answer",Fi="flex items-center gap-2 p-2.5",Di=Rr(({label:t,...e},r)=>l("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",...e,ref:r,children:l("p",{class:"truncate text-center text-base",children:t})})),Gf=({input:t,onSubmitSuccess:e})=>{const r=pa();return l("form",{noValidate:!0,class:"",onSubmit:a=>{a.preventDefault();const n=jd(a).value,i=Qe(qf,n);e({type:"boolean",value:i==="true"})},children:[l("ul",{class:Fi,children:Oi.map((a,n)=>l("li",{class:"flex-1",children:l(Di,{ref:n===0?r:null,type:"submit",name:Kf,value:a,label:t.config.labels[a]},a)}))}),t.config.optional&&l("div",{class:"px-2 pb-2",children:l(re,{class:"w-full",type:"button",onClick:()=>e(null)})})]})},Wf=t=>new Promise((e,r)=>{const a=new FileReader;a.readAsDataURL(t),a.onload=()=>a.result?e(a.result.toString()):r("No result from reader"),a.onerror=r}),Yf=t=>t.reduce((e,r)=>e+r.sizeKb,0),Xf=pe("file"),Li=3,Jf=({file:t,class:e,...r})=>{const a=t.name.split(".").pop(),n=t.name.replace(new RegExp(`.${a}$`),"");return l("div",{class:Xt("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",e),...r,children:[l("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[l("span",{class:"block truncate",children:n}),l("span",{children:[".",a]})]}),l("p",{"aria-label":"File size",class:"text-accent-11",children:Pe(t.sizeKb)})]})},Vi=({class:t,...e})=>l("li",{class:Xt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",t),...e}),ji=t=>{const e=t.split(".").pop();if(!e)throw new Error("No file extension found");return e?"."+e:""},Zf=({allowedExtensions:t,files:e})=>{const r=t.map(a=>a.toLowerCase());return e.every(a=>r.includes(ji(a.name).toLowerCase()))},Qf=(t,e)=>{const r=ji(t);return`${t.replace(new RegExp(`${r}$`),"").slice(0,e)}${r}`},th=({input:t,onSubmitSuccess:e})=>{var u;const r=(u=T.current$.value.flow)==null?void 0:u.data.submissions[t.key],[a,n]=bt(Xf(r)?r.value:[]),[i,o]=bt(),s=a.length-Li,c=Yf(a),d=pa(),{t:h}=nt();return l("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:p=>(p.preventDefault(),o(void 0),a.length===0?o({type:"required",message:h("validation_file")}):t.config.extensions.length>0&&!Zf({allowedExtensions:t.config.extensions,files:a})?o({type:"validate",message:`${h("validation_file_ext",{ext:t.config.extensions.join(", ")})}`}):t.config.fileSizeLimitKib&&c>t.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Pe(t.config.fileSizeLimitKib)}`}):t.config.allowMultiple===!1&&a.length>1?o({type:"invalid",message:h("validation_file_max",{count:1})}):e({type:"file",value:a})),children:[l("div",{class:"flex items-center gap-2",children:[l("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:[a.length>0?l(W,{children:[l("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[a.slice(0,Li).map(p=>{const v=p.name.split(".").pop(),g=p.name.replace(new RegExp(`.${v}$`),"");return l(Vi,{class:"flex overflow-hidden",children:[l("span",{class:"block truncate",children:g}),l("span",{children:[".",v]})]})}),s>0?l(Vi,{children:["+",s," file",s!==1?"s":""]}):null]}),l("p",{class:"text-neutral-11 text-xs",children:[Pe(c)," ",a.length>1?"total":""]})]}):l("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[l("header",{class:"flex flex-col items-center gap-0",children:[l("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:l("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"})}),l("p",{class:"text-neutral-12 tracking-[-0.01em]",children:h("upload_file",{count:t.config.allowMultiple?2:1})}),t.config.fileSizeLimitKib?l("p",{class:"text-neutral-10 text-xs",children:["(",h("file_max_size",{size:Pe(t.config.fileSizeLimitKib)}),")"]}):null]}),l("aside",{class:"flex flex-col items-center gap-2",children:[l("p",{id:"accepted-filetypes",class:"sr-only",children:h("file_extensions")}),l("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:t.config.extensions.map(p=>l("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:p.replace(".","")}))})]})]}),l("input",{id:"dropzone-file",onInput:async p=>{yt(p.target instanceof HTMLInputElement);const v=p.target.files?Array.from(p.target.files):[],g=await Promise.allSettled(v.map(async k=>{const y=await Wf(k);return{name:Qf(k.name,42),data:y,sizeKb:k.size/1e3}}));if(g.some(({status:k})=>k==="rejected"))return o({type:"invalid",message:"Invalid file"});const _=g.map(k=>k.status==="fulfilled"?k.value:null).filter(Boolean);n(_)},multiple:t.config.allowMultiple,type:"file",class:"sr-only"})]}),l("div",{class:"flex h-full flex-col items-center gap-2",children:[l(ee,{disabled:a.length===0}),t.config.optional&&l(re,{onClick:()=>e(null)})]})]}),l(ge,{error:i})]})};var ze=t=>t.type==="checkbox",be=t=>t instanceof Date,it=t=>t==null;const zi=t=>typeof t=="object";var G=t=>!it(t)&&!Array.isArray(t)&&zi(t)&&!be(t),eh=t=>G(t)&&t.target?ze(t.target)?t.target.checked:t.target.value:t,rh=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,ah=(t,e)=>t.has(rh(e)),nh=t=>{const e=t.constructor&&t.constructor.prototype;return G(e)&&e.hasOwnProperty("isPrototypeOf")},ga=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ft(t){let e;const r=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(ga&&(t instanceof Blob||t instanceof FileList))&&(r||G(t)))if(e=r?[]:{},!r&&!nh(t))e=t;else for(const a in t)t.hasOwnProperty(a)&&(e[a]=Ft(t[a]));else return t;return e}var Re=t=>Array.isArray(t)?t.filter(Boolean):[],U=t=>t===void 0,$=(t,e,r)=>{if(!e||!G(t))return r;const a=Re(e.split(/[,[\].]+?/)).reduce((n,i)=>it(n)?n:n[i],t);return U(a)||a===t?U(t[e])?r:t[e]:a},Kt=t=>typeof t=="boolean";const Ri={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};kt.createContext(null);var ih=(t,e,r,a=!0)=>{const n={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(n,i,{get:()=>{const o=i;return e._proxyFormState[o]!==xt.all&&(e._proxyFormState[o]=!a||xt.all),r&&(r[o]=!0),t[o]}});return n},vt=t=>G(t)&&!Object.keys(t).length,oh=(t,e,r,a)=>{r(t);const{name:n,...i}=t;return vt(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(o=>e[o]===(!a||xt.all))},ba=t=>Array.isArray(t)?t:[t];function sh(t){const e=kt.useRef(t);e.current=t,kt.useEffect(()=>{const r=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{r&&r.unsubscribe()}},[t.disabled])}var Et=t=>typeof t=="string",lh=(t,e,r,a,n)=>Et(t)?(a&&e.watch.add(t),$(r,t,n)):Array.isArray(t)?t.map(i=>(a&&e.watch.add(i),$(r,i))):(a&&(e.watchAll=!0),r),va=t=>/^\w*$/.test(t),Bi=t=>Re(t.replace(/["|']|\]/g,"").split(/\.|\[/));function V(t,e,r){let a=-1;const n=va(e)?[e]:Bi(e),i=n.length,o=i-1;for(;++a<i;){const s=n[a];let c=r;if(a!==o){const d=t[s];c=G(d)||Array.isArray(d)?d:isNaN(+n[a+1])?{}:[]}t[s]=c,t=t[s]}return t}var Ui=(t,e,r,a,n)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[a]:n||!0}}:{},Hi=t=>({isOnSubmit:!t||t===xt.onSubmit,isOnBlur:t===xt.onBlur,isOnChange:t===xt.onChange,isOnAll:t===xt.all,isOnTouch:t===xt.onTouched}),qi=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(a=>t.startsWith(a)&&/^\.\w+/.test(t.slice(a.length))));const pr=(t,e,r,a)=>{for(const n of r||Object.keys(t)){const i=$(t,n);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],n)&&!a)break;if(o.ref&&e(o.ref,o.name)&&!a)break}else G(s)&&pr(s,e)}}};var ch=(t,e,r)=>{const a=Re($(t,r));return V(a,"root",e[r]),V(t,r,a),t},wa=t=>t.type==="file",Gt=t=>typeof t=="function",gr=t=>{if(!ga)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},br=t=>Et(t),ma=t=>t.type==="radio",vr=t=>t instanceof RegExp;const Ki={value:!1,isValid:!1},Gi={value:!0,isValid:!0};var Wi=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!U(t[0].attributes.value)?U(t[0].value)||t[0].value===""?Gi:{value:t[0].value,isValid:!0}:Gi:Ki}return Ki};const Yi={isValid:!1,value:null};var Xi=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,Yi):Yi;function Ji(t,e,r="validate"){if(br(t)||Array.isArray(t)&&t.every(br)||Kt(t)&&!t)return{type:r,message:br(t)?t:"",ref:e}}var ve=t=>G(t)&&!vr(t)?t:{value:t,message:""},Zi=async(t,e,r,a,n)=>{const{ref:i,refs:o,required:s,maxLength:c,minLength:d,min:h,max:u,pattern:p,validate:v,name:g,valueAsNumber:_,mount:k,disabled:y}=t._f,m=$(e,g);if(!k||y)return{};const A=o?o[0]:i,O=D=>{a&&A.reportValidity&&(A.setCustomValidity(Kt(D)?"":D||""),A.reportValidity())},M={},H=ma(i),et=ze(i),pt=H||et,L=(_||wa(i))&&U(i.value)&&U(m)||gr(i)&&i.value===""||m===""||Array.isArray(m)&&!m.length,lt=Ui.bind(null,g,r,M),ot=(D,N,q,ct=Dt.maxLength,wt=Dt.minLength)=>{const It=D?N:q;M[g]={type:D?ct:wt,message:It,ref:i,...lt(D?ct:wt,It)}};if(n?!Array.isArray(m)||!m.length:s&&(!pt&&(L||it(m))||Kt(m)&&!m||et&&!Wi(o).isValid||H&&!Xi(o).isValid)){const{value:D,message:N}=br(s)?{value:!!s,message:s}:ve(s);if(D&&(M[g]={type:Dt.required,message:N,ref:A,...lt(Dt.required,N)},!r))return O(N),M}if(!L&&(!it(h)||!it(u))){let D,N;const q=ve(u),ct=ve(h);if(!it(m)&&!isNaN(m)){const wt=i.valueAsNumber||m&&+m;it(q.value)||(D=wt>q.value),it(ct.value)||(N=wt<ct.value)}else{const wt=i.valueAsDate||new Date(m),It=xr=>new Date(new Date().toDateString()+" "+xr),ne=i.type=="time",He=i.type=="week";Et(q.value)&&m&&(D=ne?It(m)>It(q.value):He?m>q.value:wt>new Date(q.value)),Et(ct.value)&&m&&(N=ne?It(m)<It(ct.value):He?m<ct.value:wt<new Date(ct.value))}if((D||N)&&(ot(!!D,q.message,ct.message,Dt.max,Dt.min),!r))return O(M[g].message),M}if((c||d)&&!L&&(Et(m)||n&&Array.isArray(m))){const D=ve(c),N=ve(d),q=!it(D.value)&&m.length>+D.value,ct=!it(N.value)&&m.length<+N.value;if((q||ct)&&(ot(q,D.message,N.message),!r))return O(M[g].message),M}if(p&&!L&&Et(m)){const{value:D,message:N}=ve(p);if(vr(D)&&!m.match(D)&&(M[g]={type:Dt.pattern,message:N,ref:i,...lt(Dt.pattern,N)},!r))return O(N),M}if(v){if(Gt(v)){const D=await v(m,e),N=Ji(D,A);if(N&&(M[g]={...N,...lt(Dt.validate,N.message)},!r))return O(N.message),M}else if(G(v)){let D={};for(const N in v){if(!vt(D)&&!r)break;const q=Ji(await v[N](m,e),A,N);q&&(D={...q,...lt(N,q.message)},O(q.message),r&&(M[g]=D))}if(!vt(D)&&(M[g]={ref:A,...D},!r))return M}}return O(!0),M};function uh(t,e){const r=e.slice(0,-1).length;let a=0;for(;a<r;)t=U(t)?a++:t[e[a++]];return t}function dh(t){for(const e in t)if(t.hasOwnProperty(e)&&!U(t[e]))return!1;return!0}function J(t,e){const r=Array.isArray(e)?e:va(e)?[e]:Bi(e),a=r.length===1?t:uh(t,r),n=r.length-1,i=r[n];return a&&delete a[i],n!==0&&(G(a)&&vt(a)||Array.isArray(a)&&dh(a))&&J(t,r.slice(0,-1)),t}function _a(){let t=[];return{get observers(){return t},next:n=>{for(const i of t)i.next&&i.next(n)},subscribe:n=>(t.push(n),{unsubscribe:()=>{t=t.filter(i=>i!==n)}}),unsubscribe:()=>{t=[]}}}var wr=t=>it(t)||!zi(t);function ae(t,e){if(wr(t)||wr(e))return t===e;if(be(t)&&be(e))return t.getTime()===e.getTime();const r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;for(const n of r){const i=t[n];if(!a.includes(n))return!1;if(n!=="ref"){const o=e[n];if(be(i)&&be(o)||G(i)&&G(o)||Array.isArray(i)&&Array.isArray(o)?!ae(i,o):i!==o)return!1}}return!0}var Qi=t=>t.type==="select-multiple",fh=t=>ma(t)||ze(t),ya=t=>gr(t)&&t.isConnected,to=t=>{for(const e in t)if(Gt(t[e]))return!0;return!1};function mr(t,e={}){const r=Array.isArray(t);if(G(t)||r)for(const a in t)Array.isArray(t[a])||G(t[a])&&!to(t[a])?(e[a]=Array.isArray(t[a])?[]:{},mr(t[a],e[a])):it(t[a])||(e[a]=!0);return e}function eo(t,e,r){const a=Array.isArray(t);if(G(t)||a)for(const n in t)Array.isArray(t[n])||G(t[n])&&!to(t[n])?U(e)||wr(r[n])?r[n]=Array.isArray(t[n])?mr(t[n],[]):{...mr(t[n])}:eo(t[n],it(e)?{}:e[n],r[n]):r[n]=!ae(t[n],e[n]);return r}var xa=(t,e)=>eo(t,e,mr(e)),ro=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:a})=>U(t)?t:e?t===""?NaN:t&&+t:r&&Et(t)?new Date(t):a?a(t):t;function ka(t){const e=t.ref;if(!(t.refs?t.refs.every(r=>r.disabled):e.disabled))return wa(e)?e.files:ma(e)?Xi(t.refs).value:Qi(e)?[...e.selectedOptions].map(({value:r})=>r):ze(e)?Wi(t.refs).value:ro(U(e.value)?t.ref.value:e.value,t)}var hh=(t,e,r,a)=>{const n={};for(const i of t){const o=$(e,i);o&&V(n,i,o._f)}return{criteriaMode:r,names:[...t],fields:n,shouldUseNativeValidation:a}},Be=t=>U(t)?t:vr(t)?t.source:G(t)?vr(t.value)?t.value.source:t.value:t,ph=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function ao(t,e,r){const a=$(t,r);if(a||va(r))return{error:a,name:r};const n=r.split(".");for(;n.length;){const i=n.join("."),o=$(e,i),s=$(t,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};n.pop()}return{name:r}}var gh=(t,e,r,a,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(e||t):(r?a.isOnBlur:n.isOnBlur)?!t:(r?a.isOnChange:n.isOnChange)?t:!0,bh=(t,e)=>!Re($(t,e)).length&&J(t,e);const vh={mode:xt.onSubmit,reValidateMode:xt.onChange,shouldFocusError:!0};function wh(t={},e){let r={...vh,...t},a={submitCount:0,isDirty:!1,isLoading:Gt(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},n={},i=G(r.defaultValues)||G(r.values)?Ft(r.defaultValues||r.values)||{}:{},o=r.shouldUnregister?{}:Ft(i),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d,h=0;const u={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:_a(),array:_a(),state:_a()},v=t.resetOptions&&t.resetOptions.keepDirtyValues,g=Hi(r.mode),_=Hi(r.reValidateMode),k=r.criteriaMode===xt.all,y=f=>b=>{clearTimeout(h),h=setTimeout(f,b)},m=async f=>{if(u.isValid||f){const b=r.resolver?vt((await L()).errors):await ot(n,!0);b!==a.isValid&&p.state.next({isValid:b})}},A=f=>u.isValidating&&p.state.next({isValidating:f}),O=(f,b=[],w,E,S=!0,x=!0)=>{if(E&&w){if(s.action=!0,x&&Array.isArray($(n,f))){const I=w($(n,f),E.argA,E.argB);S&&V(n,f,I)}if(x&&Array.isArray($(a.errors,f))){const I=w($(a.errors,f),E.argA,E.argB);S&&V(a.errors,f,I),bh(a.errors,f)}if(u.touchedFields&&x&&Array.isArray($(a.touchedFields,f))){const I=w($(a.touchedFields,f),E.argA,E.argB);S&&V(a.touchedFields,f,I)}u.dirtyFields&&(a.dirtyFields=xa(i,o)),p.state.next({name:f,isDirty:N(f,b),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else V(o,f,b)},M=(f,b)=>{V(a.errors,f,b),p.state.next({errors:a.errors})},H=(f,b,w,E)=>{const S=$(n,f);if(S){const x=$(o,f,U(w)?$(i,f):w);U(x)||E&&E.defaultChecked||b?V(o,f,b?x:ka(S._f)):wt(f,x),s.mount&&m()}},et=(f,b,w,E,S)=>{let x=!1,I=!1;const j={name:f};if(!w||E){u.isDirty&&(I=a.isDirty,a.isDirty=j.isDirty=N(),x=I!==j.isDirty);const K=ae($(i,f),b);I=$(a.dirtyFields,f),K?J(a.dirtyFields,f):V(a.dirtyFields,f,!0),j.dirtyFields=a.dirtyFields,x=x||u.dirtyFields&&I!==!K}if(w){const K=$(a.touchedFields,f);K||(V(a.touchedFields,f,w),j.touchedFields=a.touchedFields,x=x||u.touchedFields&&K!==w)}return x&&S&&p.state.next(j),x?j:{}},pt=(f,b,w,E)=>{const S=$(a.errors,f),x=u.isValid&&Kt(b)&&a.isValid!==b;if(t.delayError&&w?(d=y(()=>M(f,w)),d(t.delayError)):(clearTimeout(h),d=null,w?V(a.errors,f,w):J(a.errors,f)),(w?!ae(S,w):S)||!vt(E)||x){const I={...E,...x&&Kt(b)?{isValid:b}:{},errors:a.errors,name:f};a={...a,...I},p.state.next(I)}A(!1)},L=async f=>r.resolver(o,r.context,hh(f||c.mount,n,r.criteriaMode,r.shouldUseNativeValidation)),lt=async f=>{const{errors:b}=await L(f);if(f)for(const w of f){const E=$(b,w);E?V(a.errors,w,E):J(a.errors,w)}else a.errors=b;return b},ot=async(f,b,w={valid:!0})=>{for(const E in f){const S=f[E];if(S){const{_f:x,...I}=S;if(x){const j=c.array.has(x.name),K=await Zi(S,o,k,r.shouldUseNativeValidation&&!b,j);if(K[x.name]&&(w.valid=!1,b))break;!b&&($(K,x.name)?j?ch(a.errors,K,x.name):V(a.errors,x.name,K[x.name]):J(a.errors,x.name))}I&&await ot(I,b,w)}}return w.valid},D=()=>{for(const f of c.unMount){const b=$(n,f);b&&(b._f.refs?b._f.refs.every(w=>!ya(w)):!ya(b._f.ref))&&Ca(f)}c.unMount=new Set},N=(f,b)=>(f&&b&&V(o,f,b),!ae(fo(),i)),q=(f,b,w)=>lh(f,c,{...s.mount?o:U(b)?i:Et(f)?{[f]:b}:b},w,b),ct=f=>Re($(s.mount?o:i,f,t.shouldUnregister?$(i,f,[]):[])),wt=(f,b,w={})=>{const E=$(n,f);let S=b;if(E){const x=E._f;x&&(!x.disabled&&V(o,f,ro(b,x)),S=gr(x.ref)&&it(b)?"":b,Qi(x.ref)?[...x.ref.options].forEach(I=>I.selected=S.includes(I.value)):x.refs?ze(x.ref)?x.refs.length>1?x.refs.forEach(I=>(!I.defaultChecked||!I.disabled)&&(I.checked=Array.isArray(S)?!!S.find(j=>j===I.value):S===I.value)):x.refs[0]&&(x.refs[0].checked=!!S):x.refs.forEach(I=>I.checked=I.value===S):wa(x.ref)?x.ref.value="":(x.ref.value=S,x.ref.type||p.values.next({name:f,values:{...o}})))}(w.shouldDirty||w.shouldTouch)&&et(f,S,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&Sa(f)},It=(f,b,w)=>{for(const E in b){const S=b[E],x=`${f}.${E}`,I=$(n,x);(c.array.has(f)||!wr(S)||I&&!I._f)&&!be(S)?It(x,S,w):wt(x,S,w)}},ne=(f,b,w={})=>{const E=$(n,f),S=c.array.has(f),x=Ft(b);V(o,f,x),S?(p.array.next({name:f,values:{...o}}),(u.isDirty||u.dirtyFields)&&w.shouldDirty&&p.state.next({name:f,dirtyFields:xa(i,o),isDirty:N(f,x)})):E&&!E._f&&!it(x)?It(f,x,w):wt(f,x,w),qi(f,c)&&p.state.next({...a}),p.values.next({name:f,values:{...o}}),!s.mount&&e()},He=async f=>{const b=f.target;let w=b.name,E=!0;const S=$(n,w),x=()=>b.type?ka(S._f):eh(f),I=j=>{E=Number.isNaN(j)||j===$(o,w,j)};if(S){let j,K;const kr=x(),we=f.type===Ri.BLUR||f.type===Ri.FOCUS_OUT,vp=!ph(S._f)&&!r.resolver&&!$(a.errors,w)&&!S._f.deps||gh(we,$(a.touchedFields,w),a.isSubmitted,_,g),Ea=qi(w,c,we);V(o,w,kr),we?(S._f.onBlur&&S._f.onBlur(f),d&&d(0)):S._f.onChange&&S._f.onChange(f);const Ia=et(w,kr,we,!1),wp=!vt(Ia)||Ea;if(!we&&p.values.next({name:w,type:f.type,values:{...o}}),vp)return u.isValid&&m(),wp&&p.state.next({name:w,...Ea?{}:Ia});if(!we&&Ea&&p.state.next({...a}),A(!0),r.resolver){const{errors:_o}=await L([w]);if(I(kr),E){const mp=ao(a.errors,n,w),yo=ao(_o,n,mp.name||w);j=yo.error,w=yo.name,K=vt(_o)}}else j=(await Zi(S,o,k,r.shouldUseNativeValidation))[w],I(kr),E&&(j?K=!1:u.isValid&&(K=await ot(n,!0)));E&&(S._f.deps&&Sa(S._f.deps),pt(w,K,j,Ia))}},xr=(f,b)=>{if($(a.errors,b)&&f.focus)return f.focus(),1},Sa=async(f,b={})=>{let w,E;const S=ba(f);if(A(!0),r.resolver){const x=await lt(U(f)?f:S);w=vt(x),E=f?!S.some(I=>$(x,I)):w}else f?(E=(await Promise.all(S.map(async x=>{const I=$(n,x);return await ot(I&&I._f?{[x]:I}:I)}))).every(Boolean),!(!E&&!a.isValid)&&m()):E=w=await ot(n);return p.state.next({...!Et(f)||u.isValid&&w!==a.isValid?{}:{name:f},...r.resolver||!f?{isValid:w}:{},errors:a.errors,isValidating:!1}),b.shouldFocus&&!E&&pr(n,xr,f?S:c.mount),E},fo=f=>{const b={...i,...s.mount?o:{}};return U(f)?b:Et(f)?$(b,f):f.map(w=>$(b,w))},ho=(f,b)=>({invalid:!!$((b||a).errors,f),isDirty:!!$((b||a).dirtyFields,f),isTouched:!!$((b||a).touchedFields,f),error:$((b||a).errors,f)}),hp=f=>{f&&ba(f).forEach(b=>J(a.errors,b)),p.state.next({errors:f?a.errors:{}})},po=(f,b,w)=>{const E=($(n,f,{_f:{}})._f||{}).ref;V(a.errors,f,{...b,ref:E}),p.state.next({name:f,errors:a.errors,isValid:!1}),w&&w.shouldFocus&&E&&E.focus&&E.focus()},pp=(f,b)=>Gt(f)?p.values.subscribe({next:w=>f(q(void 0,b),w)}):q(f,b,!0),Ca=(f,b={})=>{for(const w of f?ba(f):c.mount)c.mount.delete(w),c.array.delete(w),b.keepValue||(J(n,w),J(o,w)),!b.keepError&&J(a.errors,w),!b.keepDirty&&J(a.dirtyFields,w),!b.keepTouched&&J(a.touchedFields,w),!r.shouldUnregister&&!b.keepDefaultValue&&J(i,w);p.values.next({values:{...o}}),p.state.next({...a,...b.keepDirty?{isDirty:N()}:{}}),!b.keepIsValid&&m()},go=({disabled:f,name:b,field:w,fields:E,value:S})=>{if(Kt(f)){const x=f?void 0:U(S)?ka(w?w._f:$(E,b)._f):S;V(o,b,x),et(b,x,!1,!1,!0)}},$a=(f,b={})=>{let w=$(n,f);const E=Kt(b.disabled);return V(n,f,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:f}},name:f,mount:!0,...b}}),c.mount.add(f),w?go({field:w,disabled:b.disabled,name:f}):H(f,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Be(b.min),max:Be(b.max),minLength:Be(b.minLength),maxLength:Be(b.maxLength),pattern:Be(b.pattern)}:{},name:f,onChange:He,onBlur:He,ref:S=>{if(S){$a(f,b),w=$(n,f);const x=U(S.value)&&S.querySelectorAll&&S.querySelectorAll("input,select,textarea")[0]||S,I=fh(x),j=w._f.refs||[];if(I?j.find(K=>K===x):x===w._f.ref)return;V(n,f,{_f:{...w._f,...I?{refs:[...j.filter(ya),x,...Array.isArray($(i,f))?[{}]:[]],ref:{type:x.type,name:f}}:{ref:x}}}),H(f,!1,void 0,x)}else w=$(n,f,{}),w._f&&(w._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(ah(c.array,f)&&s.action)&&c.unMount.add(f)}}},bo=()=>r.shouldFocusError&&pr(n,xr,c.mount),gp=f=>{Kt(f)&&(p.state.next({disabled:f}),pr(n,b=>{b.disabled=f},0,!1))},vo=(f,b)=>async w=>{w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let E=Ft(o);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:S,values:x}=await L();a.errors=S,E=x}else await ot(n);J(a.errors,"root"),vt(a.errors)?(p.state.next({errors:{}}),await f(E,w)):(b&&await b({...a.errors},w),bo(),setTimeout(bo)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:vt(a.errors),submitCount:a.submitCount+1,errors:a.errors})},bp=(f,b={})=>{$(n,f)&&(U(b.defaultValue)?ne(f,$(i,f)):(ne(f,b.defaultValue),V(i,f,b.defaultValue)),b.keepTouched||J(a.touchedFields,f),b.keepDirty||(J(a.dirtyFields,f),a.isDirty=b.defaultValue?N(f,$(i,f)):N()),b.keepError||(J(a.errors,f),u.isValid&&m()),p.state.next({...a}))},wo=(f,b={})=>{const w=f?Ft(f):i,E=Ft(w),S=f&&!vt(f)?E:i;if(b.keepDefaultValues||(i=w),!b.keepValues){if(b.keepDirtyValues||v)for(const x of c.mount)$(a.dirtyFields,x)?V(S,x,$(o,x)):ne(x,$(S,x));else{if(ga&&U(f))for(const x of c.mount){const I=$(n,x);if(I&&I._f){const j=Array.isArray(I._f.refs)?I._f.refs[0]:I._f.ref;if(gr(j)){const K=j.closest("form");if(K){K.reset();break}}}}n={}}o=t.shouldUnregister?b.keepDefaultValues?Ft(i):{}:Ft(S),p.array.next({values:{...S}}),p.values.next({values:{...S}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&e(),s.mount=!u.isValid||!!b.keepIsValid,s.watch=!!t.shouldUnregister,p.state.next({submitCount:b.keepSubmitCount?a.submitCount:0,isDirty:b.keepDirty?a.isDirty:!!(b.keepDefaultValues&&!ae(f,i)),isSubmitted:b.keepIsSubmitted?a.isSubmitted:!1,dirtyFields:b.keepDirtyValues?a.dirtyFields:b.keepDefaultValues&&f?xa(i,f):{},touchedFields:b.keepTouched?a.touchedFields:{},errors:b.keepErrors?a.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?a.isSubmitSuccessful:!1,isSubmitting:!1})},mo=(f,b)=>wo(Gt(f)?f(o):f,b);return{control:{register:$a,unregister:Ca,getFieldState:ho,handleSubmit:vo,setError:po,_executeSchema:L,_getWatch:q,_getDirty:N,_updateValid:m,_removeUnmounted:D,_updateFieldArray:O,_updateDisabledField:go,_getFieldArray:ct,_reset:wo,_resetDefaultValues:()=>Gt(r.defaultValues)&&r.defaultValues().then(f=>{mo(f,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:f=>{a={...a,...f}},_disableForm:gp,_subjects:p,_proxyFormState:u,get _fields(){return n},get _formValues(){return o},get _state(){return s},set _state(f){s=f},get _defaultValues(){return i},get _names(){return c},set _names(f){c=f},get _formState(){return a},set _formState(f){a=f},get _options(){return r},set _options(f){r={...r,...f}}},trigger:Sa,register:$a,handleSubmit:vo,watch:pp,setValue:ne,getValues:fo,reset:mo,resetField:bp,clearErrors:hp,unregister:Ca,setError:po,setFocus:(f,b={})=>{const w=$(n,f),E=w&&w._f;if(E){const S=E.refs?E.refs[0]:E.ref;S.focus&&(S.focus(),b.shouldSelect&&S.select())}},getFieldState:ho}}function _r(t={}){const e=kt.useRef(),r=kt.useRef(),[a,n]=kt.useState({isDirty:!1,isValidating:!1,isLoading:Gt(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Gt(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...wh(t,()=>n(o=>({...o}))),formState:a});const i=e.current.control;return i._options=t,sh({subject:i._subjects.state,next:o=>{oh(o,i._proxyFormState,i._updateFormState,!0)&&n({...i._formState})}}),kt.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),kt.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==a.isDirty&&i._subjects.state.next({isDirty:o})}},[i,a.isDirty]),kt.useEffect(()=>{t.values&&!ae(t.values,r.current)?(i._reset(t.values,i._options.resetOptions),r.current=t.values):i._resetDefaultValues()},[t.values,i]),kt.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),e.current.formState=ih(a,i),e.current}var no=function(t,e,r){if(t&&"reportValidity"in t){var a=$(r,e);t.setCustomValidity(a&&a.message||""),t.reportValidity()}},mh=function(t,e){var r=function(n){var i=e.fields[n];i&&i.ref&&"reportValidity"in i.ref?no(i.ref,n,t):i.refs&&i.refs.forEach(function(o){return no(o,n,t)})};for(var a in e.fields)r(a)},_h=function(t,e){e.shouldUseNativeValidation&&mh(t,e);var r={};for(var a in t){var n=$(e.fields,a),i=Object.assign(t[a]||{},{ref:n&&n.ref});if(xh(e.names||Object.keys(t),a)){var o=Object.assign({},yh($(r,a)));V(o,"root",i),V(r,a,o)}else V(r,a,i)}return r},yh=function(t){return Array.isArray(t)?t.filter(Boolean):[]},xh=function(t,e){return t.some(function(r){return r.startsWith(e+".")})},kh=function(t,e){for(var r={};t.issues.length;){var a=t.issues[0];if(a.path){var n=a.path.map(function(s){return s.key}).join(".");if(r[n]||(r[n]={message:a.message,type:a.validation}),e){var i=r[n].types,o=i&&i[a.validation];r[n]=Ui(n,e,r,a.validation,o?[].concat(o,a.message):a.message)}t.issues.shift()}}return r},yr=function(t,e,r){return r===void 0&&(r={}),function(a,n,i){try{return Promise.resolve(function(o,s){try{var c=function(){function d(u){return{values:r.raw?a:u,errors:{}}}var h=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},e);return r.mode==="sync"?d(Qe(t,a,h)):Promise.resolve(fu(t,a,h)).then(d)}()}catch(d){return s(d)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(o instanceof Ze)return{values:{},errors:_h(kh(o,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}};const io=27,oo=12,so=10,Sh=pe("enum"),Ch=(t,e)=>{const r={min:t.minSelected??0,max:t.maxSelected??t.options.length};return yr(at({checked:vn(bn(pn()),a=>Object.entries(a).filter(([n,i])=>i).map(([n,i])=>n),[tr(r.max,e("validation_multiple_choice_max",{count:r.max})),Ce(r.min,e("validation_multiple_choice_min",{count:r.min}))])}))},$h=Rr(({option:t,...e},r)=>l(W,{children:[l("input",{class:"peer sr-only h-full",type:"checkbox",...e,ref:r}),l("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:e.id,children:t.label})]})),lo=$e("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:Fi}}}),Eh=({input:t,onSubmitSuccess:e})=>{var h,u;const r=t.key?(h=T.current$.value.flow)==null?void 0:h.data.submissions[t.key]:void 0,a=(t.config.minSelected===1||t.config.minSelected===void 0)&&t.config.maxSelected===1,n=a&&t.config.options.length===2,{t:i}=nt(),{register:o,handleSubmit:s,formState:{errors:c}}=_r({defaultValues:{checked:a?{}:Sh(r)?Object.fromEntries(r.value.map(p=>[p,!0])):{}},resolver:Ch(t.config,i)}),d=pa();return n?l("ul",{style:{maxHeight:6.5*io+5*oo+2*so},class:lo({variant:"booleanLike"}),children:t.config.options.map((p,v)=>l("li",{class:"flex-1",children:l(Di,{type:"submit",ref:g=>{g&&v===0&&(d.current=g)},label:p.label,value:"true",onClick:()=>e({type:"enum",value:[p.value]})})},p.value))}):l("form",{noValidate:!0,onSubmit:p=>s(v=>{const g=v.checked;e({type:"enum",value:g})})(p),children:[l("div",{class:"flex items-center gap-1",children:[l("ul",{style:{maxHeight:6.5*io+5*oo+2*so},class:lo({variant:t.config.options.length===1?"singleOption":void 0}),children:t.config.options.map((p,v)=>{const g=`checked.${p.value}`,{ref:_,...k}=o(g);return l("li",{class:"relative",children:l($h,{option:p,autoFocus:v===0,ref:y=>{y&&v===0&&(d.current=y),_(y)},id:g,...k,onClick:a?()=>e({type:"enum",value:[p.value]}):void 0})},p.value)})}),l("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[a?null:l(ee,{}),t.config.minSelected===0&&l(re,{type:"button",onClick:()=>e({type:"enum",value:[]})})]})]}),l("div",{class:"px-1",children:l(ge,{error:(u=c.checked)==null?void 0:u.root})})]})},Ih=pe("number"),Th=(t,e)=>{const r=t.min??Number.MIN_SAFE_INTEGER,a=t.max??Number.MAX_SAFE_INTEGER,n=t.decimalCases??0;return yr(at({number:Or(e("validation_number"),[mu(r,e("validation_number_min",{min:r})),wu(a,e("validation_number_max",{max:a})),bu(i=>i===Number(i.toFixed(n)),e("validation_number_decimal_cases",{count:n}))])}))},Ah=({input:t,onSubmitSuccess:e})=>{var u;const r=t.config.defaultValue,a=t.key?(u=T.current$.value.flow)==null?void 0:u.data.submissions[t.key]:void 0,{t:n}=nt(),{register:i,handleSubmit:o,formState:{errors:s}}=_r({defaultValues:{number:r?Number(r):Ih(a)?a.value:void 0},resolver:Th(t.config,n)}),{ref:c,...d}=i("number",{required:!t.config.optional,valueAsNumber:!0}),h=ft();return dt(()=>{h.current&&(h.current.focus(),h.current.select())},[]),l("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{p.number!==void 0&&e({type:"number",value:p.number})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative min-w-0 flex-grow",children:[l("input",{...d,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(h.current=p),c(p)},type:"text",min:t.config.min,max:t.config.max,class:je({optional:t.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:t.config.placeholder}),t.config.optional&&l(re,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(ge,{error:s.number})]})},Mh=t=>{if(t==="")return{countryCode:"",phoneNumber:""};const e=Object.entries(ha).find(n=>t.startsWith(n[1])),r=e?e[1]:"",a=t.replace(r,"");return/^\d+$/.test(a)?{countryCode:r,phoneNumber:a}:{countryCode:"",phoneNumber:""}},Nh="44",Ph=/^[0-9 ]+$/,Oh=pe("string"),Fh=pe("phone"),Dh=t=>{const e=Z(t("validation_country_code"),[_u(Ph,t("validation_country_code"))]),r=vn(Z(t("validation_phone"),[Ce(1,t("validation_phone"))]),a=>a.replace(/[^0-9]/g,""),[]);return yr(at({countryCode:e,phoneNumber:r}))},Lh=({input:t,onSubmitSuccess:e})=>{var _;const r=t.key?(_=T.current$.value.flow)==null?void 0:_.data.submissions[t.key]:void 0,{t:a}=nt(),[n,i]=bt(),o=Oh(r)?Mh(r.value):Fh(r)?r.value:void 0,{register:s,handleSubmit:c,formState:{errors:d},watch:h}=_r({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??t.config.defaultValue.countryCode??Nh,phoneNumber:(o==null?void 0:o.phoneNumber)??t.config.defaultValue.phoneNumber??""},resolver:Dh(a)}),{ref:u,...p}=s("phoneNumber",{required:!t.config.optional}),v=ft(),g=h("countryCode");return dt(()=>{v.current&&(v.current.focus(),v.current.select())},[]),l("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:c(k=>{const y=k.phoneNumber.replace(/[^0-9]/g,""),m=k.countryCode.replace(/[^0-9]/g,"");i(void 0);const A=t.config.minChars??7;if(y.length+m.length<A)return i(a("validation_phone_min_chars",{count:A}));t.config.submissionFormat==="phone"?e({type:"phone",value:{countryCode:m,phoneNumber:y}}):e({type:"string",value:g+k.phoneNumber})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[l("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_${t.key}`,children:[l("span",{children:["+",g]}),l("select",{...s("countryCode",{}),id:`isdk_phone_${t.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(ha).map(([k,y])=>l("option",{value:y,children:[k," (+",y,")"]},k))})]}),l("input",{...p,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(v.current=k),u(k)},class:je({optional:t.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:t.config.placeholder}),t.config.optional&&l(re,{class:"absolute bottom-0 right-0 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(ge,{error:d.countryCode||d.phoneNumber||{message:n}})]})},Vh=({input:t,onSubmitSuccess:e})=>l("div",{class:"flex flex-col items-center py-3",children:l("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:t.key,onClick:()=>{e(null)},children:l("span",{class:"flex items-center gap-1.5",children:[l("span",{class:"inline-flex items-center text-sm font-medium",children:t.config.label||"Submit"}),l("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:[l("path",{d:"M4 8L8 4L12 8"}),l("path",{d:"M8 4V13"})]})]})})}),jh={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},zh=pe("string"),Rh=(t,e)=>{const r={maxLength:e("validation_max_chars",{count:t.maxChars??999}),minLength:e("validation_min_chars",{count:t.minChars??1})};return yr(at({text:{email:Z(e("validation_email"),[vu(e("validation_email")),Ce(t.minChars??1,r.minLength),tr(t.maxChars??1/0,r.maxLength)]),text:Z([Ce(t.minChars??1,r.minLength),tr(t.maxChars??1/0,r.maxLength)]),url:Z([yu(e("validation_url")),Ce(t.minChars??1,r.minLength),tr(t.maxChars??1/0,r.maxLength)])}[t.format]}))},Bh={text:({input:t,onSubmitSuccess:e})=>{var u;const{t:r}=nt(),a=t.key?(u=T.current$.value.flow)==null?void 0:u.data.submissions[t.key]:void 0,n=t.config.defaultValue,{register:i,handleSubmit:o,formState:{errors:s}}=_r({defaultValues:{text:n||(zh(a)?a.value:"")},resolver:Rh(t.config,r)}),{ref:c,...d}=i("text",{required:!t.config.optional}),h=ft();return dt(()=>{h.current&&(h.current.focus(),h.current.select())},[]),l("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{e({type:"string",value:p.text})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative min-w-0 flex-1",children:[l("input",{id:"chat-input",...d,...jh[t.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(h.current=p),c(p)},placeholder:t.config.placeholder,class:je({optional:!!t.config.optional,className:"w-full rounded-full"})}),t.config.optional&&l(re,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(ge,{error:s.text})]})},phone:Lh,"multiple-choice":Eh,boolean:Gf,file:th,submit:Vh,address:Uf,number:Ah},Uh=({logger:t})=>{var i;const e=(i=T.current$.value.flow)==null?void 0:i.data.currentInput,[r,a]=Mf(),n=ft(null);return T.inputHeight$.value=a.height,_t(()=>{const o=n.current;if(o)return o.addEventListener("transitionstart",tt.scrollToEnd.smooth),o.addEventListener("transitioncancel",tt.scrollToEnd.smooth),o.addEventListener("transitionend",tt.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",tt.scrollToEnd.smooth),o.removeEventListener("transitioncancel",tt.scrollToEnd.smooth),o.removeEventListener("transitionend",tt.scrollToEnd.smooth)}},[]),l("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:a.height},children:l("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:e?(()=>{const o=Bh[e.type];return l(o,{logger:t,onSubmitSuccess:tt.onSubmitSuccessFn$.value,input:e})})():l("div",{class:"flex items-center gap-2 p-2.5",children:[l("input",{"aria-hidden":"true",id:"chat-input",class:je({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),l(ee,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var Hh=function(t){return t instanceof RegExp},qh=function(e){var r=/[\\^$.*+?()[\]{}|]/g,a=RegExp(r.source);return e&&a.test(e)?e.replace(r,"\\$&"):e},co=function(t){return typeof t=="string"},Kh=function(t){var e=[];return t.forEach(function(r){Array.isArray(r)?e=e.concat(r):e.push(r)}),e};function Gh(t,e,r){var a=0,n=0;if(t==="")return t;if(!t||!co(t))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=e;Hh(i)||(i=new RegExp("("+qh(i)+")","gi"));for(var o=t.split(i),s=1,c=o.length;s<c;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}n=o[s].length,a+=o[s-1].length,o[s]=r(o[s],s,a),a+=n}return o}var Wh=function(e,r,a){return Array.isArray(e)||(e=[e]),Kh(e.map(function(n){return co(n)?Gh(n,r,a):n}))};const Ue=Tt(Wh),Yh=/(\[[^\]]+\]\([^)]+\))/g,Xh=/\[([^\]]+)\]\(([^)]+)\)/,Jh=/(https?:\/\/[^\s]+)/g,Zh=/_(.*?)_/g,Qh=/\*\*(.*?)\*\*/g,tp=/\\n|\n/g,uo="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",ep=t=>{const e=Ue(t,Yh,(o,s)=>{const[,c,d]=o.match(Xh)??[];return d?l("a",{class:uo,href:d,children:c??d},d+s):l("span",{children:"INVALID LINK"})}),r=Ue(e,Jh,(o,s)=>l("a",{class:uo,href:o,children:o},o+s)),a=Ue(r,Zh,(o,s)=>l("em",{children:o},o+s)),n=Ue(a,Qh,(o,s)=>l("strong",{children:o},o+s));return Ue(n,tp,(o,s)=>l("br",{},`br-${s}`))},rp=$e("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"}}),ap=({children:t,className:e,animate:r,side:a,...n})=>l("p",{style:{transformOrigin:a==="left"?"0% 50%":"100% 50%"},class:rp({className:e,side:a,animate:r}),...n,children:t}),np=({message:t})=>l("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:l("a",{onClick:t.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:t.href,children:[t.text,l("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l("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"})})]})}),ip=({className:t,...e})=>(_t(()=>{tt.scrollToEnd.smooth()}),l("div",{"aria-hidden":!0,children:tt.isBotTyping$.value===!0?l("div",{"aria-label":"Typing…",class:Xt("flex gap-1 p-4",t),...e,children:Array.from({length:3},(r,a)=>l("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-a*200}ms`}}))}):void 0})),op={bot:"left",user:"right"},sp=$e("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]"}}}),lp=({lastSentMessageFooter:t})=>{var r;const e=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return _t(()=>{tt.scrollToEnd.smooth()},[e.length]),l("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[e.map((a,n)=>l(W,{children:l("li",{class:"flex",children:Qt(a).with({type:"system"},i=>l("p",{class:sp({variant:i.variant}),children:i.text})).with({type:"text",author:F.union("bot","user")},i=>{const o=i.author==="user"&&!e.slice(n+1).some(d=>d.type==="text"&&d.author==="user"),s=n===e.length-1,c=i.author==="bot"?ep(i.text):i.text;return l(ap,{animate:s,side:op[i.author],children:[c,o?t:null]},n)}).with({type:"link"},i=>l(np,{message:i})).with({type:"image"},i=>l("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>l(Jf,{class:i.author==="bot"?void 0:"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).with({type:"loading"},i=>{const o=e[e.length-1];return!(i===o)||tt.isBotTyping$.value?null:l("div",{class:"flex flex-grow flex-col items-center justify-center",children:l(vi,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},n)),l(ip,{},"typing")]})},cp=({logger:t,apiClient:e,analytics:r})=>{const{flow:a}=T.current$.value;yt(a,"Flow is required to exist to show chatbot body");const n=T.viewState$.value,{chatRef:i,chatService:o}=Lf(),{t:s}=nt(),[c,d]=bt();return dt(()=>{n==="maximised"&&tt.scrollToEnd.instant()},[n]),dt(()=>{var k,y;const{state:h,flow:u}=T.current$.peek();if(h!=="loaded")throw new Error(s("invalid_state"));let p=u.data.nodeHistory.at(-1);if(tt.scrollToEnd.instant(),T.setInput(void 0),u.data.isFinished)return;p===void 0?(p=fi(a.nodes).id,T.setCurrentNodeId(p),r.log({event:"FLOW_START",properties:{flow_id:a.id,flow_version:a.version,flow_session_id:u.data.flowSessionId,flow_build:a.build,job:a.job},customProperties:(k=a.analytics)==null?void 0:k.customProperties})):T.removeMessagesSentByNodeIds([p]);const{interpret:v,abort:g,undo:_}=df({context:a.context,analytics:{service:r,customProperties:(y=a.analytics)==null?void 0:y.customProperties},apiClient:e,logger:t,flow:a,chatService:o,t:s,getSubmissions:()=>{var m;return(m=T.current$.peek().flow)==null?void 0:m.data.submissions},onInterpret:(m,A)=>{var M;const O=T.current$.peek().flow;yt(O),A&&(O.data.sequence=O.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:a.id,flow_version:a.version,from_node_id:A.id,flow_build:a.build,to_node_id:m.id,sequence:O.data.sequence,flow_session_id:O.data.flowSessionId,job:a.job},customProperties:(M=a.analytics)==null?void 0:M.customProperties})),T.setCurrentNodeId(m.id)},onFlowEnd:async()=>{var A;T.markAsFinished();const m=T.current$.peek().flow;yt(m),r.log({event:"FLOW_END",properties:{flow_id:a.id,flow_version:a.version,flow_session_id:m.data.flowSessionId,flow_build:a.build,job:a.job},customProperties:(A=a.analytics)==null?void 0:A.customProperties})}});return d(()=>_),v(p),g},[r,e,o,t,a,s]),l(W,{children:[l("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:T.inputHeight$.value},children:l(lp,{lastSentMessageFooter:a.data.isFinished||!c?null:l(dp,{undoFn:c})})}),l(Uh,{logger:t})]})},up=t=>"key"in t.data&&t.data.key?[t.data.key]:"keys"in t.data?Object.values(t.data.keys).filter(e=>typeof e=="string"):[],dp=({undoFn:t})=>{const{t:e}=nt();return l("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:l("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:r}=T.current$.peek();yt(r);const{removed:a}=t(r.data.nodeHistory),n=r.data.nodeHistory.splice(-a);n.length!==0&&(T.removeMessagesSentByNodeIds(n),T.setInput(void 0),n.pop(),n.map(i=>r.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(up).forEach(i=>delete r.data.submissions[i]),T.current$.value={...T.current$.value})},children:e("undo")})})},fp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:cp},Symbol.toStringTag,{value:"Module"}))})();
|