@inploi/plugin-chatbot 3.28.4 → 3.28.6
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 +11 -11
- package/dist/{chatbot-body-30a036fc.cjs → chatbot-body-a56a7923.cjs} +61 -38
- package/dist/{chatbot-body-51e9bd34.js → chatbot-body-e28d969c.js} +61 -38
- package/dist/chatbot.api.d.ts +55 -0
- package/dist/chatbot.utils.d.ts +5 -0
- package/dist/{index-251fe248.cjs → index-1bbddc51.cjs} +1 -1
- package/dist/{index-5e2a3998.js → index-a103d43c.js} +1 -1
- package/dist/mocks/mocks.utils.d.ts +1 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +3 -3
package/cdn/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var zm=Object.defineProperty;var Um=(Qe,be,Pe)=>be in Qe?zm(Qe,be,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Qe[be]=Pe;var Ks=(Qe,be,Pe)=>(Um(Qe,typeof be!="symbol"?be+"":be,Pe),Pe);(function(){"use strict";var Qe=e=>e,be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ws=Array.isArray,Gr=Ws,Gs=typeof be=="object"&&be&&be.Object===Object&&be,Ys=Gs,Xs=Ys,Zs=typeof self=="object"&&self&&self.Object===Object&&self,Js=Xs||Zs||Function("return this")(),Yr=Js,Qs=Yr,el=Qs.Symbol,Xr=el,xo=Xr,ko=Object.prototype,tl=ko.hasOwnProperty,rl=ko.toString,At=xo?xo.toStringTag:void 0;function nl(e){var t=tl.call(e,At),r=e[At];try{e[At]=void 0;var n=!0}catch{}var i=rl.call(e);return n&&(t?e[At]=r:delete e[At]),i}var ol=nl,il=Object.prototype,al=il.toString;function sl(e){return al.call(e)}var ll=sl,$o=Xr,cl=ol,ul=ll,dl="[object Null]",fl="[object Undefined]",So=$o?$o.toStringTag:void 0;function hl(e){return e==null?e===void 0?fl:dl:So&&So in Object(e)?cl(e):ul(e)}var Co=hl;function pl(e){return e!=null&&typeof e=="object"}var vl=pl,ml=Co,gl=vl,bl="[object Symbol]";function yl(e){return typeof e=="symbol"||gl(e)&&ml(e)==bl}var Zr=yl,wl=Gr,_l=Zr,xl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kl=/^\w*$/;function $l(e,t){if(wl(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||_l(e)?!0:kl.test(e)||!xl.test(e)||t!=null&&e in Object(t)}var Sl=$l;function Cl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Eo=Cl,El=Co,Il=Eo,Ol="[object AsyncFunction]",Tl="[object Function]",Al="[object GeneratorFunction]",Pl="[object Proxy]";function Nl(e){if(!Il(e))return!1;var t=El(e);return t==Tl||t==Al||t==Ol||t==Pl}var Dl=Nl,Ml=Yr,Fl=Ml["__core-js_shared__"],Ll=Fl,Jr=Ll,Io=function(){var e=/[^.]+$/.exec(Jr&&Jr.keys&&Jr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Rl(e){return!!Io&&Io in e}var jl=Rl,Vl=Function.prototype,Bl=Vl.toString;function zl(e){if(e!=null){try{return Bl.call(e)}catch{}try{return e+""}catch{}}return""}var Ul=zl,Hl=Dl,ql=jl,Kl=Eo,Wl=Ul,Gl=/[\\^$.*+?()[\]{}|]/g,Yl=/^\[object .+?Constructor\]$/,Xl=Function.prototype,Zl=Object.prototype,Jl=Xl.toString,Ql=Zl.hasOwnProperty,ec=RegExp("^"+Jl.call(Ql).replace(Gl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function tc(e){if(!Kl(e)||ql(e))return!1;var t=Hl(e)?ec:Yl;return t.test(Wl(e))}var rc=tc;function nc(e,t){return e==null?void 0:e[t]}var oc=nc,ic=rc,ac=oc;function sc(e,t){var r=ac(e,t);return ic(r)?r:void 0}var Oo=sc,lc=Oo,cc=lc(Object,"create"),er=cc,To=er;function uc(){this.__data__=To?To(null):{},this.size=0}var dc=uc;function fc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var hc=fc,pc=er,vc="__lodash_hash_undefined__",mc=Object.prototype,gc=mc.hasOwnProperty;function bc(e){var t=this.__data__;if(pc){var r=t[e];return r===vc?void 0:r}return gc.call(t,e)?t[e]:void 0}var yc=bc,wc=er,_c=Object.prototype,xc=_c.hasOwnProperty;function kc(e){var t=this.__data__;return wc?t[e]!==void 0:xc.call(t,e)}var $c=kc,Sc=er,Cc="__lodash_hash_undefined__";function Ec(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Sc&&t===void 0?Cc:t,this}var Ic=Ec,Oc=dc,Tc=hc,Ac=yc,Pc=$c,Nc=Ic;function ft(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ft.prototype.clear=Oc,ft.prototype.delete=Tc,ft.prototype.get=Ac,ft.prototype.has=Pc,ft.prototype.set=Nc;var Dc=ft;function Mc(){this.__data__=[],this.size=0}var Fc=Mc;function Lc(e,t){return e===t||e!==e&&t!==t}var Rc=Lc,jc=Rc;function Vc(e,t){for(var r=e.length;r--;)if(jc(e[r][0],t))return r;return-1}var tr=Vc,Bc=tr,zc=Array.prototype,Uc=zc.splice;function Hc(e){var t=this.__data__,r=Bc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Uc.call(t,r,1),--this.size,!0}var qc=Hc,Kc=tr;function Wc(e){var t=this.__data__,r=Kc(t,e);return r<0?void 0:t[r][1]}var Gc=Wc,Yc=tr;function Xc(e){return Yc(this.__data__,e)>-1}var Zc=Xc,Jc=tr;function Qc(e,t){var r=this.__data__,n=Jc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var eu=Qc,tu=Fc,ru=qc,nu=Gc,ou=Zc,iu=eu;function ht(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ht.prototype.clear=tu,ht.prototype.delete=ru,ht.prototype.get=nu,ht.prototype.has=ou,ht.prototype.set=iu;var au=ht,su=Oo,lu=Yr,cu=su(lu,"Map"),uu=cu,Ao=Dc,du=au,fu=uu;function hu(){this.size=0,this.__data__={hash:new Ao,map:new(fu||du),string:new Ao}}var pu=hu;function vu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var mu=vu,gu=mu;function bu(e,t){var r=e.__data__;return gu(t)?r[typeof t=="string"?"string":"hash"]:r.map}var rr=bu,yu=rr;function wu(e){var t=yu(this,e).delete(e);return this.size-=t?1:0,t}var _u=wu,xu=rr;function ku(e){return xu(this,e).get(e)}var $u=ku,Su=rr;function Cu(e){return Su(this,e).has(e)}var Eu=Cu,Iu=rr;function Ou(e,t){var r=Iu(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Tu=Ou,Au=pu,Pu=_u,Nu=$u,Du=Eu,Mu=Tu;function pt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}pt.prototype.clear=Au,pt.prototype.delete=Pu,pt.prototype.get=Nu,pt.prototype.has=Du,pt.prototype.set=Mu;var Fu=pt,Po=Fu,Lu="Expected a function";function Qr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Lu);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Qr.Cache||Po),r}Qr.Cache=Po;var Ru=Qr,ju=Ru,Vu=500;function Bu(e){var t=ju(e,function(n){return r.size===Vu&&r.clear(),n}),r=t.cache;return t}var zu=Bu,Uu=zu,Hu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qu=/\\(\\)?/g,Ku=Uu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Hu,function(r,n,i,o){t.push(i?o.replace(qu,"$1"):n||r)}),t}),Wu=Ku;function Gu(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Yu=Gu,No=Xr,Xu=Yu,Zu=Gr,Ju=Zr,Qu=1/0,Do=No?No.prototype:void 0,Mo=Do?Do.toString:void 0;function Fo(e){if(typeof e=="string")return e;if(Zu(e))return Xu(e,Fo)+"";if(Ju(e))return Mo?Mo.call(e):"";var t=e+"";return t=="0"&&1/e==-Qu?"-0":t}var ed=Fo,td=ed;function rd(e){return e==null?"":td(e)}var nd=rd,od=Gr,id=Sl,ad=Wu,sd=nd;function ld(e,t){return od(e)?e:id(e,t)?[e]:ad(sd(e))}var cd=ld,ud=Zr,dd=1/0;function fd(e){if(typeof e=="string"||ud(e))return e;var t=e+"";return t=="0"&&1/e==-dd?"-0":t}var hd=fd,pd=cd,vd=hd;function md(e,t){t=pd(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[vd(t[r++])];return r&&r==n?e:void 0}var gd=md,bd=gd;function yd(e,t,r){var n=e==null?void 0:bd(e,t);return n===void 0?r:n}var wd=yd;const Pt=Pe(wd);var Nt,S,Lo,Ro,et,jo,Vo,en,Bo,vt={},zo=[],_d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nr=Array.isArray;function Ne(e,t){for(var r in t)e[r]=t[r];return e}function Uo(e){var t=e.parentNode;t&&t.removeChild(e)}function D(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Nt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Dt(e,a,n,i,null)}function Dt(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Lo};return i==null&&S.vnode!=null&&S.vnode(o),o}function Ho(){return{current:null}}function Y(e){return e.children}function ye(e,t){this.props=e,this.context=t}function or(e,t){if(t==null)return e.__?or(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?or(e):null}function qo(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return qo(e)}}function tn(e){(!e.__d&&(e.__d=!0)&&et.push(e)&&!ir.__r++||jo!==S.debounceRendering)&&((jo=S.debounceRendering)||Vo)(ir)}function ir(){var e,t,r,n,i,o,a,s,l;for(et.sort(en);e=et.shift();)e.__d&&(t=et.length,n=void 0,i=void 0,o=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(o=Ne({},a)).__v=a.__v+1,rn(l,a,o,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??or(a),a.__h,i),Jo(n,a,i),a.__e!=s&&qo(a)),et.length>t&&et.sort(en));ir.__r=0}function Ko(e,t,r,n,i,o,a,s,l,d,f){var c,p,g,m,v,w,x,_,I,T,O=0,H=n&&n.__k||zo,K=H.length,M=K,F=t.length;for(r.__k=[],c=0;c<F;c++)(m=r.__k[c]=(m=t[c])==null||typeof m=="boolean"||typeof m=="function"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?Dt(null,m,null,null,m):nr(m)?Dt(Y,{children:m},null,null,null):m.__b>0?Dt(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=r,m.__b=r.__b+1,(_=xd(m,H,x=c+O,M))===-1?g=vt:(g=H[_]||vt,H[_]=void 0,M--),rn(e,m,g,i,o,a,s,l,d,f),v=m.__e,(p=m.ref)&&g.ref!=p&&(g.ref&&nn(g.ref,null,m),f.push(p,m.__c||v,m)),v!=null&&(w==null&&(w=v),T=!(I=g===vt||g.__v===null)&&_===x,I?_==-1&&O--:_!==x&&(_===x+1?(O++,T=!0):_>x?M>F-x?(O+=_-x,T=!0):O--:O=_<x&&_==x-1?_-x:0),x=c+O,T=T||_==c&&!I,typeof m.type!="function"||_===x&&g.__k!==m.__k?typeof m.type=="function"||T?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=v.nextSibling:l=Go(e,v,l):l=Wo(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=w,c=K;c--;)H[c]!=null&&(typeof r.type=="function"&&H[c].__e!=null&&H[c].__e==r.__d&&(r.__d=H[c].__e.nextSibling),Qo(H[c],H[c]))}function Wo(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t=typeof n.type=="function"?Wo(n,t,r):Go(r,n.__e,t));return t}function De(e,t){return t=t||[],e==null||typeof e=="boolean"||(nr(e)?e.some(function(r){De(r,t)}):t.push(e)),t}function Go(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function xd(e,t,r,n){var i=e.key,o=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&o===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&i==l.key&&o===l.type)return a;a--}if(s<t.length){if((l=t[s])&&i==l.key&&o===l.type)return s;s++}}return-1}function kd(e,t,r,n,i){var o;for(o in r)o==="children"||o==="key"||o in t||ar(e,o,null,r[o],n);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||r[o]===t[o]||ar(e,o,t[o],r[o],n)}function Yo(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||_d.test(t)?r:r+"px"}function ar(e,t,r,n,i){var o;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Yo(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Yo(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n||e.addEventListener(t,o?Zo:Xo,o):e.removeEventListener(t,o?Zo:Xo,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Xo(e){return this.l[e.type+!1](S.event?S.event(e):e)}function Zo(e){return this.l[e.type+!0](S.event?S.event(e):e)}function rn(e,t,r,n,i,o,a,s,l,d){var f,c,p,g,m,v,w,x,_,I,T,O,H,K,M,F=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,o=[s]),(f=S.__b)&&f(t);try{e:if(typeof F=="function"){if(x=t.props,_=(f=F.contextType)&&n[f.__c],I=f?_?_.props.value:f.__:n,r.__c?w=(c=t.__c=r.__c).__=c.__E:("prototype"in F&&F.prototype.render?t.__c=c=new F(x,I):(t.__c=c=new ye(x,I),c.constructor=F,c.render=Sd),_&&_.sub(c),c.props=x,c.state||(c.state={}),c.context=I,c.__n=n,p=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),F.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ne({},c.__s)),Ne(c.__s,F.getDerivedStateFromProps(x,c.__s))),g=c.props,m=c.state,c.__v=t,p)F.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(F.getDerivedStateFromProps==null&&x!==g&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,I),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,I)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(se){se&&(se.__=t)}),T=0;T<c._sb.length;T++)c.__h.push(c._sb[T]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,I),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(g,m,v)})}if(c.context=I,c.props=x,c.__P=e,c.__e=!1,O=S.__r,H=0,"prototype"in F&&F.prototype.render){for(c.state=c.__s,c.__d=!1,O&&O(t),f=c.render(c.props,c.state,c.context),K=0;K<c._sb.length;K++)c.__h.push(c._sb[K]);c._sb=[]}else do c.__d=!1,O&&O(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++H<25);c.state=c.__s,c.getChildContext!=null&&(n=Ne(Ne({},n),c.getChildContext())),p||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(g,m)),Ko(e,nr(M=f!=null&&f.type===Y&&f.key==null?f.props.children:f)?M:[M],t,r,n,i,o,a,s,l,d),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),w&&(c.__E=c.__=null)}else o==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=$d(r.__e,t,r,n,i,o,a,l,d);(f=S.diffed)&&f(t)}catch(se){t.__v=null,(l||o!=null)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),S.__e(se,t,r)}}function Jo(e,t,r){for(var n=0;n<r.length;n++)nn(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){S.__e(o,i.__v)}})}function $d(e,t,r,n,i,o,a,s,l){var d,f,c,p=r.props,g=t.props,m=t.type,v=0;if(m==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((d=o[v])&&"setAttribute"in d==!!m&&(m?d.localName===m:d.nodeType===3)){e=d,o[v]=null;break}}if(e==null){if(m===null)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,g.is&&g),o=null,s=!1}if(m===null)p===g||s&&e.data===g||(e.data=g);else{if(o=o&&Nt.call(e.childNodes),f=(p=r.props||vt).dangerouslySetInnerHTML,c=g.dangerouslySetInnerHTML,!s){if(o!=null)for(p={},v=0;v<e.attributes.length;v++)p[e.attributes[v].name]=e.attributes[v].value;(c||f)&&(c&&(f&&c.__html==f.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(kd(e,g,p,i,s),c)t.__k=[];else if(Ko(e,nr(v=t.props.children)?v:[v],t,r,n,i&&m!=="foreignObject",o,a,o?o[0]:r.__k&&or(r,0),s,l),o!=null)for(v=o.length;v--;)o[v]!=null&&Uo(o[v]);s||("value"in g&&(v=g.value)!==void 0&&(v!==e.value||m==="progress"&&!v||m==="option"&&v!==p.value)&&ar(e,"value",v,p.value,!1),"checked"in g&&(v=g.checked)!==void 0&&v!==e.checked&&ar(e,"checked",v,p.checked,!1))}return e}function nn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function Qo(e,t,r){var n,i;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||nn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){S.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Qo(n[i],t,r||typeof e.type!="function");r||e.__e==null||Uo(e.__e),e.__=e.__e=e.__d=void 0}function Sd(e,t,r){return this.constructor(e,r)}function mt(e,t,r){var n,i,o,a;S.__&&S.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],a=[],rn(t,e=(!n&&r||t).__k=D(Y,null,[e]),i||vt,vt,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?Nt.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,a),Jo(o,e,a)}function ei(e,t){mt(e,t,ei)}function Cd(e,t,r){var n,i,o,a,s=Ne({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o]===void 0&&a!==void 0?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?Nt.call(arguments,2):r),Dt(e.type,s,n||e.key,i||e.ref,null)}function Mt(e,t){var r={__c:t="__cC"+Bo++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(s){s.__e=!0,tn(s)})},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Nt=zo.slice,S={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Lo=0,Ro=function(e){return e!=null&&e.constructor===void 0},ye.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ne({},this.state),typeof e=="function"&&(e=e(Ne({},r),this.props)),e&&Ne(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),tn(this))},ye.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tn(this))},ye.prototype.render=Y,et=[],Vo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,en=function(e,t){return e.__v.__b-t.__v.__b},ir.__r=0,Bo=0;var on=class extends Error{constructor(t){super(t[0].message);Ks(this,"issues");this.name="ValiError",this.issues=t}};function ti(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Ft(e){return{issues:e}}function ce(e){return{output:e}}function Ed(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,path:t.path,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Id(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Be(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return ce(e);let i,o,a=e;for(const s of t){const l=s._parse(a);if(l.issues){i=i||Id(r,n);for(const d of l.issues){const f=Ed(i,d);o?o.push(f):o=[f]}if(i.abortEarly||i.abortPipeEarly)break}else a=l.output}return o?Ft(o):ce(a)}function ze(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function ri(e){return typeof e=="function"?e():e}function Ue(e,t,r,n){return Ft([{validation:e,message:ri(t),input:r,requirement:n}])}function Od(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,a]=ze(t,r);return[e,o,a]}const[n,i]=ze(e,t);return[void 0,n,i]}function Me(e,t,r,n,i,o){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:ri(n),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function ni(e){return typeof e.default=="function"?e.default():e.default}function Td(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Be(t,this.pipe,r,"any")}}}function Ad(e,t,r){const[n="Invalid type",i]=ze(t,r);return{type:"array",async:!1,item:e,message:n,pipe:i,_parse(o,a){if(!Array.isArray(o))return Me(a,"type","array",this.message,o);let s;const l=[];for(let d=0;d<o.length;d++){const f=o[d],c=this.item._parse(f,a);if(c.issues){const p={type:"array",input:o,key:d,value:f};for(const g of c.issues)g.path?g.path.unshift(p):g.path=[p],s==null||s.push(g);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Ft(s):Be(l,this.pipe,a,"array")}}}function oi(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="boolean"?Me(o,"type","boolean",this.message,i):Be(i,this.pipe,o,"boolean")}}}function ii(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?Me(n,"type","literal",this.message,r):ce(r)}}}function Pd(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const i=ni(this);if(i===void 0)return ce(r);r=i}return this.wrapped._parse(r,n)}}}function an(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="number"||isNaN(i)?Me(o,"type","number",this.message,i):Be(i,this.pipe,o,"number")}}}function Ce(e,t,r,n){const[i,o="Invalid type",a]=Od(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:a,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","object",this.message,l);s=s||Object.entries(this.entries);let f;const c={};for(const[p,g]of s){const m=l[p],v=g._parse(m,d);if(v.issues){const w={type:"object",input:l,key:p,value:m};for(const x of v.issues)x.path?x.path.unshift(w):x.path=[w],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}else(v.output!==void 0||p in l)&&(c[p]=v.output)}if(this.rest&&!(d!=null&&d.abortEarly&&f)){for(const p in l)if(!(p in this.entries)){const g=l[p],m=this.rest._parse(g,d);if(m.issues){const v={type:"object",input:l,key:p,value:g};for(const w of m.issues)w.path?w.path.unshift(v):w.path=[v],f==null||f.push(w);if(f||(f=m.issues),d!=null&&d.abortEarly)break}else c[p]=m.output}}return f?Ft(f):Be(c,this.pipe,d,"object")}}}function Nd(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const i=ni(this);if(i===void 0)return ce(r);r=i}return this.wrapped._parse(r,n)}}}function Dd(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?ce(r):Me(n,"type","picklist",this.message,r)}}}function xe(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="string"?Me(o,"type","string",this.message,i):Be(i,this.pipe,o,"string")}}}function Md(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=ze(r,n);return[e,t,a,s]}const[i,o]=ze(t,r);return[xe(),e,i,o]}var Fd=["__proto__","prototype","constructor"];function ai(e,t,r,n){const[i,o,a="Invalid type",s]=Md(e,t,r,n);return{type:"record",async:!1,key:i,value:o,message:a,pipe:s,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","record",this.message,l);let f;const c={};for(const[p,g]of Object.entries(l))if(!Fd.includes(p)){let m;const v=this.key._parse(p,{origin:"key",abortEarly:d==null?void 0:d.abortEarly,abortPipeEarly:d==null?void 0:d.abortPipeEarly,skipPipe:d==null?void 0:d.skipPipe});if(v.issues){m={type:"record",input:l,key:p,value:g};for(const x of v.issues)x.path=[m],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}const w=this.value._parse(g,d);if(w.issues){m=m||{type:"record",input:l,key:p,value:g};for(const x of w.issues)x.path?x.path.unshift(m):x.path=[m],f==null||f.push(x);if(f||(f=w.issues),d!=null&&d.abortEarly)break}!v.issues&&!w.issues&&(c[v.output]=w.output)}return f?Ft(f):Be(c,this.pipe,d,"record")}}}function Ld(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let i,o;for(const a of this.options){const s=a._parse(r,n);if(s.issues)if(i)for(const l of s.issues)i.push(l);else i=s.issues;else{o=[s.output];break}}return o?ce(o[0]):Me(n,"type","union",this.message,r,i)}}}function sr(e,t,r){const n=e._parse(t,r);if(n.issues)throw new on(n.issues);return n.output}async function Rd(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new on(n.issues);return n.output}function si(e,t,r){return{...e,_parse(n,i){const o=e._parse(n,i);if(o.issues)return o;const a=t(o.output);return r&&!Array.isArray(r)?r._parse(a,i):Be(a,r,i,typeof a)}}}var jd=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Vd(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Bd(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:jd,_parse(t){return this.requirement.test(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function lr(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function zd(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function cr(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Ud(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function li(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Hd(e="Invalid URL"){return{type:"url",async:!1,message:e,requirement(t){try{return new URL(t),!0}catch{return!1}},_parse(t){return this.requirement(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},de.apply(this,arguments)}var Fe,z,sn,ci,gt=0,ui=[],ur=[],di=S.__b,fi=S.__r,hi=S.diffed,pi=S.__c,vi=S.unmount;function tt(e,t){S.__h&&S.__h(z,e,gt||t),gt=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:ur}),r.__[e]}function W(e){return gt=1,dr(wi,e)}function dr(e,t,r){var n=tt(Fe++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):wi(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],d=n.t(l,s);l!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=z,!z.u)){var i=function(s,l,d){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(p){return p.__c});if(f.every(function(p){return!p.__N}))return!o||o.call(this,s,l,d);var c=!1;return f.forEach(function(p){if(p.__N){var g=p.__[0];p.__=p.__N,p.__N=void 0,g!==p.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!o||o.call(this,s,l,d))};z.u=!0;var o=z.shouldComponentUpdate,a=z.componentWillUpdate;z.componentWillUpdate=function(s,l,d){if(this.__e){var f=o;o=void 0,i(s,l,d),o=f}a&&a.call(this,s,l,d)},z.shouldComponentUpdate=i}return n.__N||n.__}function V(e,t){var r=tt(Fe++,3);!S.__s&&cn(r.__H,t)&&(r.__=e,r.i=t,z.__H.__h.push(r))}function fe(e,t){var r=tt(Fe++,4);!S.__s&&cn(r.__H,t)&&(r.__=e,r.i=t,z.__h.push(r))}function L(e){return gt=5,he(function(){return{current:e}},[])}function mi(e,t,r){gt=6,fe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function he(e,t){var r=tt(Fe++,7);return cn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function me(e,t){return gt=8,he(function(){return e},t)}function fr(e){var t=z.context[e.__c],r=tt(Fe++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(z)),t.props.value):e.__}function gi(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function qd(e){var t=tt(Fe++,10),r=W();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(n,i){t.__&&t.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function bi(){var e=tt(Fe++,11);if(!e.__){for(var t=z.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Kd(){for(var e;e=ui.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(hr),e.__H.__h.forEach(ln),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){z=null,di&&di(e)},S.__r=function(e){fi&&fi(e),Fe=0;var t=(z=e.__c).__H;t&&(sn===z?(t.__h=[],z.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=ur,r.__N=r.i=void 0})):(t.__h.forEach(hr),t.__h.forEach(ln),t.__h=[],Fe=0)),sn=z},S.diffed=function(e){hi&&hi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ui.push(t)!==1&&ci===S.requestAnimationFrame||((ci=S.requestAnimationFrame)||Wd)(Kd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==ur&&(r.__=r.__V),r.i=void 0,r.__V=ur})),sn=z=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(hr),r.__h=r.__h.filter(function(n){return!n.__||ln(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],S.__e(n,r.__v)}}),pi&&pi(e,t)},S.unmount=function(e){vi&&vi(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{hr(n)}catch(i){t=i}}),r.__H=void 0,t&&S.__e(t,r.__v))};var yi=typeof requestAnimationFrame=="function";function Wd(e){var t,r=function(){clearTimeout(n),yi&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);yi&&(t=requestAnimationFrame(r))}function hr(e){var t=z,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),z=t}function ln(e){var t=z;e.__c=e.__(),z=t}function cn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function wi(e,t){return typeof t=="function"?t(e):t}function _i(e,t){for(var r in t)e[r]=t[r];return e}function un(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function dn(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function pr(e){this.props=e}function xi(e,t){function r(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:un(this.props,i)}function n(i){return this.shouldComponentUpdate=r,D(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(pr.prototype=new ye).isPureReactComponent=!0,pr.prototype.shouldComponentUpdate=function(e,t){return un(this.props,e)||un(this.state,t)};var ki=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ki&&ki(e)};var Gd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ne(e){function t(r){var n=_i({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Gd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $i=function(e,t){return e==null?null:De(De(e).map(t))},Le={map:$i,forEach:$i,count:function(e){return e?De(e).length:0},only:function(e){var t=De(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:De},Yd=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}Yd(e,t,r,n)};var Si=S.unmount;function Ci(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=_i({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Ci(n,t,r)})),e}function Ei(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Ei(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function bt(){this.__u=0,this.t=null,this.__b=null}function Ii(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function fn(e){var t,r,n;function i(o){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return D(r,o)}return i.displayName="Lazy",i.__f=!0,i}function yt(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Si&&Si(e)},(bt.prototype=new ye).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Ii(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var d=n.state.__a;n.__v.__k[0]=Ei(d,d.__c.__P,d.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},bt.prototype.componentWillUnmount=function(){this.t=[]},bt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Ci(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&D(Y,null,e.fallback);return i&&(i.__h=null),[D(Y,null,t.__a?null:e.children),i]};var Oi=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Xd(e){return this.getChildContext=function(){return e.context},e.children}function Zd(e){var t=this,r=e.i;t.componentWillUnmount=function(){mt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),mt(D(Xd,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ti(e,t){var r=D(Zd,{__v:e,i:t});return r.containerInfo=t,r}(yt.prototype=new ye).__a=function(e){var t=this,r=Ii(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),Oi(t,e,n)):i()};r?r(o):o()}},yt.prototype.render=function(e){this.u=null,this.o=new Map;var t=De(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},yt.prototype.componentDidUpdate=yt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Oi(e,r,t)})};var Ai=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Jd=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Qd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ef=/[A-Z0-9]/g,tf=typeof document<"u",rf=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Pi(e,t,r){return t.__k==null&&(t.textContent=""),mt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Ni(e,t,r){return ei(e,t),typeof r=="function"&&r(),e?e.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ye.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Di=S.event;function nf(){}function of(){return this.cancelBubble}function af(){return this.defaultPrevented}S.event=function(e){return Di&&(e=Di(e)),e.persist=nf,e.isPropagationStopped=of,e.isDefaultPrevented=af,e.nativeEvent=e};var hn,sf={enumerable:!1,configurable:!0,get:function(){return this.class}},Mi=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var o in r){var a=r[o];if(!(o==="value"&&"defaultValue"in r&&a==null||tf&&o==="children"&&n==="noscript"||o==="class"||o==="className")){var s=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&a===!0?a="":s==="ondoubleclick"?o="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||rf(r.type)?s==="onfocus"?o="onfocusin":s==="onblur"?o="onfocusout":Qd.test(o)?o=s:n.indexOf("-")===-1&&Jd.test(o)?o=o.replace(ef,"-$&").toLowerCase():a===null&&(a=void 0):s=o="oninput",s==="oninput"&&i[o=s]&&(o="oninputCapture"),i[o]=a}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=De(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=De(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",sf)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Ai,Mi&&Mi(e)};var Fi=S.__r;S.__r=function(e){Fi&&Fi(e),hn=e.__c};var Li=S.diffed;S.diffed=function(e){Li&&Li(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),hn=null};var Ri={ReactCurrentDispatcher:{current:{readContext:function(e){return hn.__n[e.__c].props.value}}}},lf="17.0.2";function ji(e){return D.bind(null,e)}function rt(e){return!!e&&e.$$typeof===Ai}function wt(e){return rt(e)?Cd.apply(null,arguments):e}function Vi(e){return!!e.__k&&(mt(null,e),!0)}function Bi(e){return e&&(e.base||e.nodeType===1&&e)||null}var zi=function(e,t){return e(t)},vr=function(e,t){return e(t)},Ui=Y;function pn(e){e()}function Hi(e){return e}function qi(){return[!1,pn]}var Ki=fe;function Wi(e,t){var r=t(),n=W({h:{__:r,v:t}}),i=n[0].h,o=n[1];return fe(function(){i.__=r,i.v=t,dn(i.__,t())||o({h:i})},[e,r,t]),V(function(){return dn(i.__,i.v())||o({h:i}),e(function(){dn(i.__,i.v())||o({h:i})})},[e]),r}var ke={useState:W,useId:bi,useReducer:dr,useEffect:V,useLayoutEffect:fe,useInsertionEffect:Ki,useTransition:qi,useDeferredValue:Hi,useSyncExternalStore:Wi,startTransition:pn,useRef:L,useImperativeHandle:mi,useMemo:he,useCallback:me,useContext:fr,useDebugValue:gi,version:"17.0.2",Children:Le,render:Pi,hydrate:Ni,unmountComponentAtNode:Vi,createPortal:Ti,createElement:D,createContext:Mt,createFactory:ji,cloneElement:wt,createRef:Ho,Fragment:Y,isValidElement:rt,findDOMNode:Bi,Component:ye,PureComponent:pr,memo:xi,forwardRef:ne,flushSync:vr,unstable_batchedUpdates:zi,StrictMode:Ui,Suspense:bt,SuspenseList:yt,lazy:fn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ri};const cf=Object.freeze(Object.defineProperty({__proto__:null,Children:Le,Component:ye,Fragment:Y,PureComponent:pr,StrictMode:Ui,Suspense:bt,SuspenseList:yt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ri,cloneElement:wt,createContext:Mt,createElement:D,createFactory:ji,createPortal:Ti,createRef:Ho,default:ke,findDOMNode:Bi,flushSync:vr,forwardRef:ne,hydrate:Ni,isValidElement:rt,lazy:fn,memo:xi,render:Pi,startTransition:pn,unmountComponentAtNode:Vi,unstable_batchedUpdates:zi,useCallback:me,useContext:fr,useDebugValue:gi,useDeferredValue:Hi,useEffect:V,useErrorBoundary:qd,useId:bi,useImperativeHandle:mi,useInsertionEffect:Ki,useLayoutEffect:fe,useMemo:he,useReducer:dr,useRef:L,useState:W,useSyncExternalStore:Wi,useTransition:qi,version:lf},Symbol.toStringTag,{value:"Module"}));function _t(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function uf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Gi(...e){return t=>e.forEach(r=>uf(r,t))}function Lt(...e){return me(Gi(...e),e)}function df(e,t=[]){let r=[];function n(o,a){const s=Mt(a),l=r.length;r=[...r,a];function d(c){const{scope:p,children:g,...m}=c,v=(p==null?void 0:p[e][l])||s,w=he(()=>m,Object.values(m));return D(v.Provider,{value:w},g)}function f(c,p){const g=(p==null?void 0:p[e][l])||s,m=fr(g);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${o}\``)}return d.displayName=o+"Provider",[d,f]}const i=()=>{const o=r.map(a=>Mt(a));return function(s){const l=(s==null?void 0:s[e])||o;return he(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,ff(i,...t)]}function ff(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((s,{useScope:l,scopeName:d})=>{const c=l(o)[`__scope${d}`];return{...s,...c}},{});return he(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const vn=globalThis!=null&&globalThis.document?fe:()=>{},hf=cf["useId".toString()]||(()=>{});let pf=0;function mn(e){const[t,r]=W(hf());return vn(()=>{e||r(n=>n??String(pf++))},[e]),e||(t?`radix-${t}`:"")}function nt(e){const t=L(e);return V(()=>{t.current=e}),he(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function vf({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=mf({defaultProp:t,onChange:r}),o=e!==void 0,a=o?e:n,s=nt(r),l=me(d=>{if(o){const c=typeof d=="function"?d(e):d;c!==e&&s(c)}else i(d)},[o,e,i,s]);return[a,l]}function mf({defaultProp:e,onChange:t}){const r=W(e),[n]=r,i=L(n),o=nt(t);return V(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}const gn=ne((e,t)=>{const{children:r,...n}=e,i=Le.toArray(r),o=i.find(bf);if(o){const a=o.props.children,s=i.map(l=>l===o?Le.count(a)>1?Le.only(null):rt(a)?a.props.children:null:l);return D(bn,de({},n,{ref:t}),rt(a)?wt(a,void 0,s):null)}return D(bn,de({},n,{ref:t}),r)});gn.displayName="Slot";const bn=ne((e,t)=>{const{children:r,...n}=e;return rt(r)?wt(r,{...yf(n,r.props),ref:t?Gi(t,r.ref):r.ref}):Le.count(r)>1?Le.only(null):null});bn.displayName="SlotClone";const gf=({children:e})=>D(Y,null,e);function bf(e){return rt(e)&&e.type===gf}function yf(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...s)=>{o(...s),i(...s)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}const yn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=ne((n,i)=>{const{asChild:o,...a}=n,s=o?gn:t;return V(()=>{window[Symbol.for("radix-ui")]=!0},[]),D(s,de({},a,{ref:i}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wf(e,t){e&&vr(()=>e.dispatchEvent(t))}function _f(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e);V(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const wn="dismissableLayer.update",xf="dismissableLayer.pointerDownOutside",kf="dismissableLayer.focusOutside";let Yi;const $f=Mt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sf=ne((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...d}=e,f=fr($f),[c,p]=W(null),g=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=W({}),v=Lt(t,M=>p(M)),w=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),_=w.indexOf(x),I=c?w.indexOf(c):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,O=I>=_,H=Cf(M=>{const F=M.target,se=[...f.branches].some(re=>re.contains(F));!O||se||(o==null||o(M),s==null||s(M),M.defaultPrevented||l==null||l())},g),K=Ef(M=>{const F=M.target;[...f.branches].some(re=>re.contains(F))||(a==null||a(M),s==null||s(M),M.defaultPrevented||l==null||l())},g);return _f(M=>{I===f.layers.size-1&&(i==null||i(M),!M.defaultPrevented&&l&&(M.preventDefault(),l()))},g),V(()=>{if(c)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Yi=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(c)),f.layers.add(c),Xi(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Yi)}},[c,g,n,f]),V(()=>()=>{c&&(f.layers.delete(c),f.layersWithOutsidePointerEventsDisabled.delete(c),Xi())},[c,f]),V(()=>{const M=()=>m({});return document.addEventListener(wn,M),()=>document.removeEventListener(wn,M)},[]),D(yn.div,de({},d,{ref:v,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:_t(e.onFocusCapture,K.onFocusCapture),onBlurCapture:_t(e.onBlurCapture,K.onBlurCapture),onPointerDownCapture:_t(e.onPointerDownCapture,H.onPointerDownCapture)}))});function Cf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1),i=L(()=>{});return V(()=>{const o=s=>{if(s.target&&!n.current){let d=function(){Zi(xf,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Ef(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1);return V(()=>{const i=o=>{o.target&&!n.current&&Zi(kf,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Xi(){const e=new CustomEvent(wn);document.dispatchEvent(e)}function Zi(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?wf(i,o):i.dispatchEvent(o)}const _n="focusScope.autoFocusOnMount",xn="focusScope.autoFocusOnUnmount",Ji={bubbles:!1,cancelable:!0},If=ne((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=W(null),d=nt(i),f=nt(o),c=L(null),p=Lt(t,v=>l(v)),g=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V(()=>{if(n){let v=function(I){if(g.paused||!s)return;const T=I.target;s.contains(T)?c.current=T:He(c.current,{select:!0})},w=function(I){if(g.paused||!s)return;const T=I.relatedTarget;T!==null&&(s.contains(T)||He(c.current,{select:!0}))},x=function(I){if(document.activeElement===document.body)for(const O of I)O.removedNodes.length>0&&He(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",w);const _=new MutationObserver(x);return s&&_.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),_.disconnect()}}},[n,s,g.paused]),V(()=>{if(s){ta.add(g);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(_n,Ji);s.addEventListener(_n,d),s.dispatchEvent(x),x.defaultPrevented||(Of(Df(Qi(s)),{select:!0}),document.activeElement===v&&He(s))}return()=>{s.removeEventListener(_n,d),setTimeout(()=>{const x=new CustomEvent(xn,Ji);s.addEventListener(xn,f),s.dispatchEvent(x),x.defaultPrevented||He(v??document.body,{select:!0}),s.removeEventListener(xn,f),ta.remove(g)},0)}}},[s,d,f,g]);const m=me(v=>{if(!r&&!n||g.paused)return;const w=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(w&&x){const _=v.currentTarget,[I,T]=Tf(_);I&&T?!v.shiftKey&&x===T?(v.preventDefault(),r&&He(I,{select:!0})):v.shiftKey&&x===I&&(v.preventDefault(),r&&He(T,{select:!0})):x===_&&v.preventDefault()}},[r,n,g.paused]);return D(yn.div,de({tabIndex:-1},a,{ref:p,onKeyDown:m}))});function Of(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(He(n,{select:t}),document.activeElement!==r)return}function Tf(e){const t=Qi(e),r=ea(t,e),n=ea(t.reverse(),e);return[r,n]}function Qi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ea(e,t){for(const r of e)if(!Af(r,{upTo:t}))return r}function Af(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Pf(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Pf(e)&&t&&e.select()}}const ta=Nf();function Nf(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ra(e,t),e.unshift(t)},remove(t){var r;e=ra(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function ra(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Df(e){return e.filter(t=>t.tagName!=="A")}function Mf(e,t){return dr((r,n)=>{const i=t[r][n];return i??r},e)}const kn=e=>{const{present:t,children:r}=e,n=Ff(t),i=typeof r=="function"?r({present:n.isPresent}):Le.only(r),o=Lt(n.ref,i.ref);return typeof r=="function"||n.isPresent?wt(i,{ref:o}):null};kn.displayName="Presence";function Ff(e){const[t,r]=W(),n=L({}),i=L(e),o=L("none"),a=e?"mounted":"unmounted",[s,l]=Mf(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(()=>{const d=mr(n.current);o.current=s==="mounted"?d:"none"},[s]),vn(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,g=mr(d);e?l("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),vn(()=>{if(t){const d=c=>{const g=mr(n.current).includes(c.animationName);c.target===t&&g&&vr(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(o.current=mr(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:me(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function mr(e){return(e==null?void 0:e.animationName)||"none"}let $n=0;function Lf(){V(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:na()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:na()),$n++,()=>{$n===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),$n--}},[])}function na(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ee=function(){return Ee=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ee.apply(this,arguments)};function oa(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Rf(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var gr="right-scroll-bar-position",br="width-before-scroll-bar",jf="with-scroll-bars-hidden",Vf="--removed-body-scroll-bar-size";function Bf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function zf(e,t){var r=W(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}function Uf(e,t){return zf(t||null,function(r){return e.forEach(function(n){return Bf(n,r)})})}function Hf(e){return e}function qf(e,t){t===void 0&&(t=Hf);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(s){return o(s)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(o),a=r}var l=function(){var f=a;a=[],f.forEach(o)},d=function(){return Promise.resolve().then(l)};d(),r={push:function(f){a.push(f),d()},filter:function(f){return a=a.filter(f),r}}}};return i}function Kf(e){e===void 0&&(e={});var t=qf(null);return t.options=Ee({async:!0,ssr:!1},e),t}var ia=function(e){var t=e.sideCar,r=oa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return D(n,Ee({},r))};ia.isSideCarExport=!0;function Wf(e,t){return e.useMedium(t),ia}var aa=Kf(),Sn=function(){},yr=ne(function(e,t){var r=L(null),n=W({onScrollCapture:Sn,onWheelCapture:Sn,onTouchMoveCapture:Sn}),i=n[0],o=n[1],a=e.forwardProps,s=e.children,l=e.className,d=e.removeScrollBar,f=e.enabled,c=e.shards,p=e.sideCar,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,_=oa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),I=p,T=Uf([r,t]),O=Ee(Ee({},_),i);return D(Y,null,f&&D(I,{sideCar:aa,removeScrollBar:d,shards:c,noIsolation:g,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:r}),a?wt(Le.only(s),Ee(Ee({},O),{ref:T})):D(x,Ee({},O,{className:l,ref:T}),s))});yr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},yr.classNames={fullWidth:br,zeroRight:gr};var sa,Gf=function(){if(sa)return sa;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Yf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Gf();return t&&e.setAttribute("nonce",t),e}function Xf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Jf=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Yf())&&(Xf(t,r),Zf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qf=function(){var e=Jf();return function(t,r){V(function(){return e.add(t),function(){e.remove()}},[t&&r])}},la=function(){var e=Qf(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},eh={left:0,top:0,right:0,gap:0},Cn=function(e){return parseInt(e||"",10)||0},th=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Cn(r),Cn(n),Cn(i)]},rh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return eh;var t=th(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},nh=la(),oh=function(e,t,r,n){var i=e.left,o=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
var Um=Object.defineProperty;var Hm=(Qe,be,Pe)=>be in Qe?Um(Qe,be,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Qe[be]=Pe;var Ws=(Qe,be,Pe)=>(Hm(Qe,typeof be!="symbol"?be+"":be,Pe),Pe);(function(){"use strict";var Qe=e=>e,be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gs=Array.isArray,Yr=Gs,Ys=typeof be=="object"&&be&&be.Object===Object&&be,Xs=Ys,Zs=Xs,Js=typeof self=="object"&&self&&self.Object===Object&&self,Qs=Zs||Js||Function("return this")(),Xr=Qs,el=Xr,tl=el.Symbol,Zr=tl,ko=Zr,$o=Object.prototype,rl=$o.hasOwnProperty,nl=$o.toString,At=ko?ko.toStringTag:void 0;function ol(e){var t=rl.call(e,At),r=e[At];try{e[At]=void 0;var n=!0}catch{}var i=nl.call(e);return n&&(t?e[At]=r:delete e[At]),i}var il=ol,al=Object.prototype,sl=al.toString;function ll(e){return sl.call(e)}var cl=ll,So=Zr,ul=il,dl=cl,fl="[object Null]",hl="[object Undefined]",Co=So?So.toStringTag:void 0;function pl(e){return e==null?e===void 0?hl:fl:Co&&Co in Object(e)?ul(e):dl(e)}var Eo=pl;function vl(e){return e!=null&&typeof e=="object"}var ml=vl,gl=Eo,bl=ml,yl="[object Symbol]";function _l(e){return typeof e=="symbol"||bl(e)&&gl(e)==yl}var Jr=_l,wl=Yr,xl=Jr,kl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$l=/^\w*$/;function Sl(e,t){if(wl(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||xl(e)?!0:$l.test(e)||!kl.test(e)||t!=null&&e in Object(t)}var Cl=Sl;function El(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Io=El,Il=Eo,Ol=Io,Tl="[object AsyncFunction]",Al="[object Function]",Pl="[object GeneratorFunction]",Nl="[object Proxy]";function Dl(e){if(!Ol(e))return!1;var t=Il(e);return t==Al||t==Pl||t==Tl||t==Nl}var Ml=Dl,Fl=Xr,Ll=Fl["__core-js_shared__"],Rl=Ll,Qr=Rl,Oo=function(){var e=/[^.]+$/.exec(Qr&&Qr.keys&&Qr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function jl(e){return!!Oo&&Oo in e}var Vl=jl,Bl=Function.prototype,zl=Bl.toString;function Ul(e){if(e!=null){try{return zl.call(e)}catch{}try{return e+""}catch{}}return""}var Hl=Ul,ql=Ml,Kl=Vl,Wl=Io,Gl=Hl,Yl=/[\\^$.*+?()[\]{}|]/g,Xl=/^\[object .+?Constructor\]$/,Zl=Function.prototype,Jl=Object.prototype,Ql=Zl.toString,ec=Jl.hasOwnProperty,tc=RegExp("^"+Ql.call(ec).replace(Yl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rc(e){if(!Wl(e)||Kl(e))return!1;var t=ql(e)?tc:Xl;return t.test(Gl(e))}var nc=rc;function oc(e,t){return e==null?void 0:e[t]}var ic=oc,ac=nc,sc=ic;function lc(e,t){var r=sc(e,t);return ac(r)?r:void 0}var To=lc,cc=To,uc=cc(Object,"create"),tr=uc,Ao=tr;function dc(){this.__data__=Ao?Ao(null):{},this.size=0}var fc=dc;function hc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pc=hc,vc=tr,mc="__lodash_hash_undefined__",gc=Object.prototype,bc=gc.hasOwnProperty;function yc(e){var t=this.__data__;if(vc){var r=t[e];return r===mc?void 0:r}return bc.call(t,e)?t[e]:void 0}var _c=yc,wc=tr,xc=Object.prototype,kc=xc.hasOwnProperty;function $c(e){var t=this.__data__;return wc?t[e]!==void 0:kc.call(t,e)}var Sc=$c,Cc=tr,Ec="__lodash_hash_undefined__";function Ic(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Cc&&t===void 0?Ec:t,this}var Oc=Ic,Tc=fc,Ac=pc,Pc=_c,Nc=Sc,Dc=Oc;function ft(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ft.prototype.clear=Tc,ft.prototype.delete=Ac,ft.prototype.get=Pc,ft.prototype.has=Nc,ft.prototype.set=Dc;var Mc=ft;function Fc(){this.__data__=[],this.size=0}var Lc=Fc;function Rc(e,t){return e===t||e!==e&&t!==t}var jc=Rc,Vc=jc;function Bc(e,t){for(var r=e.length;r--;)if(Vc(e[r][0],t))return r;return-1}var rr=Bc,zc=rr,Uc=Array.prototype,Hc=Uc.splice;function qc(e){var t=this.__data__,r=zc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Hc.call(t,r,1),--this.size,!0}var Kc=qc,Wc=rr;function Gc(e){var t=this.__data__,r=Wc(t,e);return r<0?void 0:t[r][1]}var Yc=Gc,Xc=rr;function Zc(e){return Xc(this.__data__,e)>-1}var Jc=Zc,Qc=rr;function eu(e,t){var r=this.__data__,n=Qc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var tu=eu,ru=Lc,nu=Kc,ou=Yc,iu=Jc,au=tu;function ht(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ht.prototype.clear=ru,ht.prototype.delete=nu,ht.prototype.get=ou,ht.prototype.has=iu,ht.prototype.set=au;var su=ht,lu=To,cu=Xr,uu=lu(cu,"Map"),du=uu,Po=Mc,fu=su,hu=du;function pu(){this.size=0,this.__data__={hash:new Po,map:new(hu||fu),string:new Po}}var vu=pu;function mu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var gu=mu,bu=gu;function yu(e,t){var r=e.__data__;return bu(t)?r[typeof t=="string"?"string":"hash"]:r.map}var nr=yu,_u=nr;function wu(e){var t=_u(this,e).delete(e);return this.size-=t?1:0,t}var xu=wu,ku=nr;function $u(e){return ku(this,e).get(e)}var Su=$u,Cu=nr;function Eu(e){return Cu(this,e).has(e)}var Iu=Eu,Ou=nr;function Tu(e,t){var r=Ou(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Au=Tu,Pu=vu,Nu=xu,Du=Su,Mu=Iu,Fu=Au;function pt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}pt.prototype.clear=Pu,pt.prototype.delete=Nu,pt.prototype.get=Du,pt.prototype.has=Mu,pt.prototype.set=Fu;var Lu=pt,No=Lu,Ru="Expected a function";function en(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ru);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(en.Cache||No),r}en.Cache=No;var ju=en,Vu=ju,Bu=500;function zu(e){var t=Vu(e,function(n){return r.size===Bu&&r.clear(),n}),r=t.cache;return t}var Uu=zu,Hu=Uu,qu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ku=/\\(\\)?/g,Wu=Hu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(qu,function(r,n,i,o){t.push(i?o.replace(Ku,"$1"):n||r)}),t}),Gu=Wu;function Yu(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Xu=Yu,Do=Zr,Zu=Xu,Ju=Yr,Qu=Jr,ed=1/0,Mo=Do?Do.prototype:void 0,Fo=Mo?Mo.toString:void 0;function Lo(e){if(typeof e=="string")return e;if(Ju(e))return Zu(e,Lo)+"";if(Qu(e))return Fo?Fo.call(e):"";var t=e+"";return t=="0"&&1/e==-ed?"-0":t}var td=Lo,rd=td;function nd(e){return e==null?"":rd(e)}var od=nd,id=Yr,ad=Cl,sd=Gu,ld=od;function cd(e,t){return id(e)?e:ad(e,t)?[e]:sd(ld(e))}var ud=cd,dd=Jr,fd=1/0;function hd(e){if(typeof e=="string"||dd(e))return e;var t=e+"";return t=="0"&&1/e==-fd?"-0":t}var pd=hd,vd=ud,md=pd;function gd(e,t){t=vd(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[md(t[r++])];return r&&r==n?e:void 0}var bd=gd,yd=bd;function _d(e,t,r){var n=e==null?void 0:yd(e,t);return n===void 0?r:n}var wd=_d;const Pt=Pe(wd);var Nt,S,Ro,jo,et,Vo,Bo,tn,zo,vt={},Uo=[],xd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,or=Array.isArray;function Ne(e,t){for(var r in t)e[r]=t[r];return e}function Ho(e){var t=e.parentNode;t&&t.removeChild(e)}function D(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Nt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Dt(e,a,n,i,null)}function Dt(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Ro};return i==null&&S.vnode!=null&&S.vnode(o),o}function qo(){return{current:null}}function Y(e){return e.children}function ye(e,t){this.props=e,this.context=t}function ir(e,t){if(t==null)return e.__?ir(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ir(e):null}function Ko(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Ko(e)}}function rn(e){(!e.__d&&(e.__d=!0)&&et.push(e)&&!ar.__r++||Vo!==S.debounceRendering)&&((Vo=S.debounceRendering)||Bo)(ar)}function ar(){var e,t,r,n,i,o,a,s,l;for(et.sort(tn);e=et.shift();)e.__d&&(t=et.length,n=void 0,i=void 0,o=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(o=Ne({},a)).__v=a.__v+1,nn(l,a,o,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??ir(a),a.__h,i),Qo(n,a,i),a.__e!=s&&Ko(a)),et.length>t&&et.sort(tn));ar.__r=0}function Wo(e,t,r,n,i,o,a,s,l,d,f){var c,p,g,m,v,_,x,w,I,T,O=0,H=n&&n.__k||Uo,K=H.length,M=K,F=t.length;for(r.__k=[],c=0;c<F;c++)(m=r.__k[c]=(m=t[c])==null||typeof m=="boolean"||typeof m=="function"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?Dt(null,m,null,null,m):or(m)?Dt(Y,{children:m},null,null,null):m.__b>0?Dt(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=r,m.__b=r.__b+1,(w=kd(m,H,x=c+O,M))===-1?g=vt:(g=H[w]||vt,H[w]=void 0,M--),nn(e,m,g,i,o,a,s,l,d,f),v=m.__e,(p=m.ref)&&g.ref!=p&&(g.ref&&on(g.ref,null,m),f.push(p,m.__c||v,m)),v!=null&&(_==null&&(_=v),T=!(I=g===vt||g.__v===null)&&w===x,I?w==-1&&O--:w!==x&&(w===x+1?(O++,T=!0):w>x?M>F-x?(O+=w-x,T=!0):O--:O=w<x&&w==x-1?w-x:0),x=c+O,T=T||w==c&&!I,typeof m.type!="function"||w===x&&g.__k!==m.__k?typeof m.type=="function"||T?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=v.nextSibling:l=Yo(e,v,l):l=Go(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,c=K;c--;)H[c]!=null&&(typeof r.type=="function"&&H[c].__e!=null&&H[c].__e==r.__d&&(r.__d=H[c].__e.nextSibling),ei(H[c],H[c]))}function Go(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t=typeof n.type=="function"?Go(n,t,r):Yo(r,n.__e,t));return t}function De(e,t){return t=t||[],e==null||typeof e=="boolean"||(or(e)?e.some(function(r){De(r,t)}):t.push(e)),t}function Yo(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function kd(e,t,r,n){var i=e.key,o=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&o===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&i==l.key&&o===l.type)return a;a--}if(s<t.length){if((l=t[s])&&i==l.key&&o===l.type)return s;s++}}return-1}function $d(e,t,r,n,i){var o;for(o in r)o==="children"||o==="key"||o in t||sr(e,o,null,r[o],n);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||r[o]===t[o]||sr(e,o,t[o],r[o],n)}function Xo(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||xd.test(t)?r:r+"px"}function sr(e,t,r,n,i){var o;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Xo(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Xo(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n||e.addEventListener(t,o?Jo:Zo,o):e.removeEventListener(t,o?Jo:Zo,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Zo(e){return this.l[e.type+!1](S.event?S.event(e):e)}function Jo(e){return this.l[e.type+!0](S.event?S.event(e):e)}function nn(e,t,r,n,i,o,a,s,l,d){var f,c,p,g,m,v,_,x,w,I,T,O,H,K,M,F=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,o=[s]),(f=S.__b)&&f(t);try{e:if(typeof F=="function"){if(x=t.props,w=(f=F.contextType)&&n[f.__c],I=f?w?w.props.value:f.__:n,r.__c?_=(c=t.__c=r.__c).__=c.__E:("prototype"in F&&F.prototype.render?t.__c=c=new F(x,I):(t.__c=c=new ye(x,I),c.constructor=F,c.render=Cd),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=I,c.__n=n,p=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),F.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ne({},c.__s)),Ne(c.__s,F.getDerivedStateFromProps(x,c.__s))),g=c.props,m=c.state,c.__v=t,p)F.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(F.getDerivedStateFromProps==null&&x!==g&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,I),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,I)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(se){se&&(se.__=t)}),T=0;T<c._sb.length;T++)c.__h.push(c._sb[T]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,I),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(g,m,v)})}if(c.context=I,c.props=x,c.__P=e,c.__e=!1,O=S.__r,H=0,"prototype"in F&&F.prototype.render){for(c.state=c.__s,c.__d=!1,O&&O(t),f=c.render(c.props,c.state,c.context),K=0;K<c._sb.length;K++)c.__h.push(c._sb[K]);c._sb=[]}else do c.__d=!1,O&&O(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++H<25);c.state=c.__s,c.getChildContext!=null&&(n=Ne(Ne({},n),c.getChildContext())),p||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(g,m)),Wo(e,or(M=f!=null&&f.type===Y&&f.key==null?f.props.children:f)?M:[M],t,r,n,i,o,a,s,l,d),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),_&&(c.__E=c.__=null)}else o==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Sd(r.__e,t,r,n,i,o,a,l,d);(f=S.diffed)&&f(t)}catch(se){t.__v=null,(l||o!=null)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),S.__e(se,t,r)}}function Qo(e,t,r){for(var n=0;n<r.length;n++)on(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){S.__e(o,i.__v)}})}function Sd(e,t,r,n,i,o,a,s,l){var d,f,c,p=r.props,g=t.props,m=t.type,v=0;if(m==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((d=o[v])&&"setAttribute"in d==!!m&&(m?d.localName===m:d.nodeType===3)){e=d,o[v]=null;break}}if(e==null){if(m===null)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,g.is&&g),o=null,s=!1}if(m===null)p===g||s&&e.data===g||(e.data=g);else{if(o=o&&Nt.call(e.childNodes),f=(p=r.props||vt).dangerouslySetInnerHTML,c=g.dangerouslySetInnerHTML,!s){if(o!=null)for(p={},v=0;v<e.attributes.length;v++)p[e.attributes[v].name]=e.attributes[v].value;(c||f)&&(c&&(f&&c.__html==f.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if($d(e,g,p,i,s),c)t.__k=[];else if(Wo(e,or(v=t.props.children)?v:[v],t,r,n,i&&m!=="foreignObject",o,a,o?o[0]:r.__k&&ir(r,0),s,l),o!=null)for(v=o.length;v--;)o[v]!=null&&Ho(o[v]);s||("value"in g&&(v=g.value)!==void 0&&(v!==e.value||m==="progress"&&!v||m==="option"&&v!==p.value)&&sr(e,"value",v,p.value,!1),"checked"in g&&(v=g.checked)!==void 0&&v!==e.checked&&sr(e,"checked",v,p.checked,!1))}return e}function on(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function ei(e,t,r){var n,i;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||on(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){S.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&ei(n[i],t,r||typeof e.type!="function");r||e.__e==null||Ho(e.__e),e.__=e.__e=e.__d=void 0}function Cd(e,t,r){return this.constructor(e,r)}function mt(e,t,r){var n,i,o,a;S.__&&S.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],a=[],nn(t,e=(!n&&r||t).__k=D(Y,null,[e]),i||vt,vt,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?Nt.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,a),Qo(o,e,a)}function ti(e,t){mt(e,t,ti)}function Ed(e,t,r){var n,i,o,a,s=Ne({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o]===void 0&&a!==void 0?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?Nt.call(arguments,2):r),Dt(e.type,s,n||e.key,i||e.ref,null)}function Mt(e,t){var r={__c:t="__cC"+zo++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(s){s.__e=!0,rn(s)})},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Nt=Uo.slice,S={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Ro=0,jo=function(e){return e!=null&&e.constructor===void 0},ye.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ne({},this.state),typeof e=="function"&&(e=e(Ne({},r),this.props)),e&&Ne(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),rn(this))},ye.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rn(this))},ye.prototype.render=Y,et=[],Bo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tn=function(e,t){return e.__v.__b-t.__v.__b},ar.__r=0,zo=0;var an=class extends Error{constructor(t){super(t[0].message);Ws(this,"issues");this.name="ValiError",this.issues=t}};function ri(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Ft(e){return{issues:e}}function ce(e){return{output:e}}function Id(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,path:t.path,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Od(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Be(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return ce(e);let i,o,a=e;for(const s of t){const l=s._parse(a);if(l.issues){i=i||Od(r,n);for(const d of l.issues){const f=Id(i,d);o?o.push(f):o=[f]}if(i.abortEarly||i.abortPipeEarly)break}else a=l.output}return o?Ft(o):ce(a)}function ze(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function ni(e){return typeof e=="function"?e():e}function Ue(e,t,r,n){return Ft([{validation:e,message:ni(t),input:r,requirement:n}])}function Td(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,a]=ze(t,r);return[e,o,a]}const[n,i]=ze(e,t);return[void 0,n,i]}function Me(e,t,r,n,i,o){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:ni(n),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function oi(e){return typeof e.default=="function"?e.default():e.default}function Ad(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Be(t,this.pipe,r,"any")}}}function Pd(e,t,r){const[n="Invalid type",i]=ze(t,r);return{type:"array",async:!1,item:e,message:n,pipe:i,_parse(o,a){if(!Array.isArray(o))return Me(a,"type","array",this.message,o);let s;const l=[];for(let d=0;d<o.length;d++){const f=o[d],c=this.item._parse(f,a);if(c.issues){const p={type:"array",input:o,key:d,value:f};for(const g of c.issues)g.path?g.path.unshift(p):g.path=[p],s==null||s.push(g);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Ft(s):Be(l,this.pipe,a,"array")}}}function ii(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="boolean"?Me(o,"type","boolean",this.message,i):Be(i,this.pipe,o,"boolean")}}}function ai(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?Me(n,"type","literal",this.message,r):ce(r)}}}function Nd(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const i=oi(this);if(i===void 0)return ce(r);r=i}return this.wrapped._parse(r,n)}}}function sn(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="number"||isNaN(i)?Me(o,"type","number",this.message,i):Be(i,this.pipe,o,"number")}}}function Ce(e,t,r,n){const[i,o="Invalid type",a]=Td(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:a,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","object",this.message,l);s=s||Object.entries(this.entries);let f;const c={};for(const[p,g]of s){const m=l[p],v=g._parse(m,d);if(v.issues){const _={type:"object",input:l,key:p,value:m};for(const x of v.issues)x.path?x.path.unshift(_):x.path=[_],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}else(v.output!==void 0||p in l)&&(c[p]=v.output)}if(this.rest&&!(d!=null&&d.abortEarly&&f)){for(const p in l)if(!(p in this.entries)){const g=l[p],m=this.rest._parse(g,d);if(m.issues){const v={type:"object",input:l,key:p,value:g};for(const _ of m.issues)_.path?_.path.unshift(v):_.path=[v],f==null||f.push(_);if(f||(f=m.issues),d!=null&&d.abortEarly)break}else c[p]=m.output}}return f?Ft(f):Be(c,this.pipe,d,"object")}}}function Dd(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const i=oi(this);if(i===void 0)return ce(r);r=i}return this.wrapped._parse(r,n)}}}function Md(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?ce(r):Me(n,"type","picklist",this.message,r)}}}function xe(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="string"?Me(o,"type","string",this.message,i):Be(i,this.pipe,o,"string")}}}function Fd(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=ze(r,n);return[e,t,a,s]}const[i,o]=ze(t,r);return[xe(),e,i,o]}var Ld=["__proto__","prototype","constructor"];function si(e,t,r,n){const[i,o,a="Invalid type",s]=Fd(e,t,r,n);return{type:"record",async:!1,key:i,value:o,message:a,pipe:s,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","record",this.message,l);let f;const c={};for(const[p,g]of Object.entries(l))if(!Ld.includes(p)){let m;const v=this.key._parse(p,{origin:"key",abortEarly:d==null?void 0:d.abortEarly,abortPipeEarly:d==null?void 0:d.abortPipeEarly,skipPipe:d==null?void 0:d.skipPipe});if(v.issues){m={type:"record",input:l,key:p,value:g};for(const x of v.issues)x.path=[m],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}const _=this.value._parse(g,d);if(_.issues){m=m||{type:"record",input:l,key:p,value:g};for(const x of _.issues)x.path?x.path.unshift(m):x.path=[m],f==null||f.push(x);if(f||(f=_.issues),d!=null&&d.abortEarly)break}!v.issues&&!_.issues&&(c[v.output]=_.output)}return f?Ft(f):Be(c,this.pipe,d,"record")}}}function Rd(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let i,o;for(const a of this.options){const s=a._parse(r,n);if(s.issues)if(i)for(const l of s.issues)i.push(l);else i=s.issues;else{o=[s.output];break}}return o?ce(o[0]):Me(n,"type","union",this.message,r,i)}}}function lr(e,t,r){const n=e._parse(t,r);if(n.issues)throw new an(n.issues);return n.output}async function jd(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new an(n.issues);return n.output}function li(e,t,r){return{...e,_parse(n,i){const o=e._parse(n,i);if(o.issues)return o;const a=t(o.output);return r&&!Array.isArray(r)?r._parse(a,i):Be(a,r,i,typeof a)}}}var Vd=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Bd(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function zd(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Vd,_parse(t){return this.requirement.test(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function cr(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Ud(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function ur(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Hd(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function ci(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function qd(e="Invalid URL"){return{type:"url",async:!1,message:e,requirement(t){try{return new URL(t),!0}catch{return!1}},_parse(t){return this.requirement(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},de.apply(this,arguments)}var Fe,z,ln,ui,gt=0,di=[],dr=[],fi=S.__b,hi=S.__r,pi=S.diffed,vi=S.__c,mi=S.unmount;function tt(e,t){S.__h&&S.__h(z,e,gt||t),gt=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:dr}),r.__[e]}function W(e){return gt=1,fr(wi,e)}function fr(e,t,r){var n=tt(Fe++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):wi(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],d=n.t(l,s);l!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=z,!z.u)){var i=function(s,l,d){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(p){return p.__c});if(f.every(function(p){return!p.__N}))return!o||o.call(this,s,l,d);var c=!1;return f.forEach(function(p){if(p.__N){var g=p.__[0];p.__=p.__N,p.__N=void 0,g!==p.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!o||o.call(this,s,l,d))};z.u=!0;var o=z.shouldComponentUpdate,a=z.componentWillUpdate;z.componentWillUpdate=function(s,l,d){if(this.__e){var f=o;o=void 0,i(s,l,d),o=f}a&&a.call(this,s,l,d)},z.shouldComponentUpdate=i}return n.__N||n.__}function V(e,t){var r=tt(Fe++,3);!S.__s&&un(r.__H,t)&&(r.__=e,r.i=t,z.__H.__h.push(r))}function fe(e,t){var r=tt(Fe++,4);!S.__s&&un(r.__H,t)&&(r.__=e,r.i=t,z.__h.push(r))}function L(e){return gt=5,he(function(){return{current:e}},[])}function gi(e,t,r){gt=6,fe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function he(e,t){var r=tt(Fe++,7);return un(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function me(e,t){return gt=8,he(function(){return e},t)}function hr(e){var t=z.context[e.__c],r=tt(Fe++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(z)),t.props.value):e.__}function bi(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function Kd(e){var t=tt(Fe++,10),r=W();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(n,i){t.__&&t.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function yi(){var e=tt(Fe++,11);if(!e.__){for(var t=z.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Wd(){for(var e;e=di.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pr),e.__H.__h.forEach(cn),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){z=null,fi&&fi(e)},S.__r=function(e){hi&&hi(e),Fe=0;var t=(z=e.__c).__H;t&&(ln===z?(t.__h=[],z.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=dr,r.__N=r.i=void 0})):(t.__h.forEach(pr),t.__h.forEach(cn),t.__h=[],Fe=0)),ln=z},S.diffed=function(e){pi&&pi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(di.push(t)!==1&&ui===S.requestAnimationFrame||((ui=S.requestAnimationFrame)||Gd)(Wd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==dr&&(r.__=r.__V),r.i=void 0,r.__V=dr})),ln=z=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(pr),r.__h=r.__h.filter(function(n){return!n.__||cn(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],S.__e(n,r.__v)}}),vi&&vi(e,t)},S.unmount=function(e){mi&&mi(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{pr(n)}catch(i){t=i}}),r.__H=void 0,t&&S.__e(t,r.__v))};var _i=typeof requestAnimationFrame=="function";function Gd(e){var t,r=function(){clearTimeout(n),_i&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);_i&&(t=requestAnimationFrame(r))}function pr(e){var t=z,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),z=t}function cn(e){var t=z;e.__c=e.__(),z=t}function un(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function wi(e,t){return typeof t=="function"?t(e):t}function xi(e,t){for(var r in t)e[r]=t[r];return e}function dn(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function fn(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function vr(e){this.props=e}function ki(e,t){function r(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:dn(this.props,i)}function n(i){return this.shouldComponentUpdate=r,D(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(vr.prototype=new ye).isPureReactComponent=!0,vr.prototype.shouldComponentUpdate=function(e,t){return dn(this.props,e)||dn(this.state,t)};var $i=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),$i&&$i(e)};var Yd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ne(e){function t(r){var n=xi({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Yd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Si=function(e,t){return e==null?null:De(De(e).map(t))},Le={map:Si,forEach:Si,count:function(e){return e?De(e).length:0},only:function(e){var t=De(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:De},Xd=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}Xd(e,t,r,n)};var Ci=S.unmount;function Ei(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=xi({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Ei(n,t,r)})),e}function Ii(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Ii(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function bt(){this.__u=0,this.t=null,this.__b=null}function Oi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function hn(e){var t,r,n;function i(o){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return D(r,o)}return i.displayName="Lazy",i.__f=!0,i}function yt(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ci&&Ci(e)},(bt.prototype=new ye).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Oi(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var d=n.state.__a;n.__v.__k[0]=Ii(d,d.__c.__P,d.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},bt.prototype.componentWillUnmount=function(){this.t=[]},bt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Ei(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&D(Y,null,e.fallback);return i&&(i.__h=null),[D(Y,null,t.__a?null:e.children),i]};var Ti=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Zd(e){return this.getChildContext=function(){return e.context},e.children}function Jd(e){var t=this,r=e.i;t.componentWillUnmount=function(){mt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),mt(D(Zd,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ai(e,t){var r=D(Jd,{__v:e,i:t});return r.containerInfo=t,r}(yt.prototype=new ye).__a=function(e){var t=this,r=Oi(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),Ti(t,e,n)):i()};r?r(o):o()}},yt.prototype.render=function(e){this.u=null,this.o=new Map;var t=De(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},yt.prototype.componentDidUpdate=yt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ti(e,r,t)})};var Pi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Qd=/^(?: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]/,ef=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,tf=/[A-Z0-9]/g,rf=typeof document<"u",nf=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ni(e,t,r){return t.__k==null&&(t.textContent=""),mt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Di(e,t,r){return ti(e,t),typeof r=="function"&&r(),e?e.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ye.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Mi=S.event;function of(){}function af(){return this.cancelBubble}function sf(){return this.defaultPrevented}S.event=function(e){return Mi&&(e=Mi(e)),e.persist=of,e.isPropagationStopped=af,e.isDefaultPrevented=sf,e.nativeEvent=e};var pn,lf={enumerable:!1,configurable:!0,get:function(){return this.class}},Fi=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var o in r){var a=r[o];if(!(o==="value"&&"defaultValue"in r&&a==null||rf&&o==="children"&&n==="noscript"||o==="class"||o==="className")){var s=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&a===!0?a="":s==="ondoubleclick"?o="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||nf(r.type)?s==="onfocus"?o="onfocusin":s==="onblur"?o="onfocusout":ef.test(o)?o=s:n.indexOf("-")===-1&&Qd.test(o)?o=o.replace(tf,"-$&").toLowerCase():a===null&&(a=void 0):s=o="oninput",s==="oninput"&&i[o=s]&&(o="oninputCapture"),i[o]=a}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=De(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=De(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",lf)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Pi,Fi&&Fi(e)};var Li=S.__r;S.__r=function(e){Li&&Li(e),pn=e.__c};var Ri=S.diffed;S.diffed=function(e){Ri&&Ri(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),pn=null};var ji={ReactCurrentDispatcher:{current:{readContext:function(e){return pn.__n[e.__c].props.value}}}},cf="17.0.2";function Vi(e){return D.bind(null,e)}function rt(e){return!!e&&e.$$typeof===Pi}function _t(e){return rt(e)?Ed.apply(null,arguments):e}function Bi(e){return!!e.__k&&(mt(null,e),!0)}function zi(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ui=function(e,t){return e(t)},mr=function(e,t){return e(t)},Hi=Y;function vn(e){e()}function qi(e){return e}function Ki(){return[!1,vn]}var Wi=fe;function Gi(e,t){var r=t(),n=W({h:{__:r,v:t}}),i=n[0].h,o=n[1];return fe(function(){i.__=r,i.v=t,fn(i.__,t())||o({h:i})},[e,r,t]),V(function(){return fn(i.__,i.v())||o({h:i}),e(function(){fn(i.__,i.v())||o({h:i})})},[e]),r}var ke={useState:W,useId:yi,useReducer:fr,useEffect:V,useLayoutEffect:fe,useInsertionEffect:Wi,useTransition:Ki,useDeferredValue:qi,useSyncExternalStore:Gi,startTransition:vn,useRef:L,useImperativeHandle:gi,useMemo:he,useCallback:me,useContext:hr,useDebugValue:bi,version:"17.0.2",Children:Le,render:Ni,hydrate:Di,unmountComponentAtNode:Bi,createPortal:Ai,createElement:D,createContext:Mt,createFactory:Vi,cloneElement:_t,createRef:qo,Fragment:Y,isValidElement:rt,findDOMNode:zi,Component:ye,PureComponent:vr,memo:ki,forwardRef:ne,flushSync:mr,unstable_batchedUpdates:Ui,StrictMode:Hi,Suspense:bt,SuspenseList:yt,lazy:hn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ji};const uf=Object.freeze(Object.defineProperty({__proto__:null,Children:Le,Component:ye,Fragment:Y,PureComponent:vr,StrictMode:Hi,Suspense:bt,SuspenseList:yt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ji,cloneElement:_t,createContext:Mt,createElement:D,createFactory:Vi,createPortal:Ai,createRef:qo,default:ke,findDOMNode:zi,flushSync:mr,forwardRef:ne,hydrate:Di,isValidElement:rt,lazy:hn,memo:ki,render:Ni,startTransition:vn,unmountComponentAtNode:Bi,unstable_batchedUpdates:Ui,useCallback:me,useContext:hr,useDebugValue:bi,useDeferredValue:qi,useEffect:V,useErrorBoundary:Kd,useId:yi,useImperativeHandle:gi,useInsertionEffect:Wi,useLayoutEffect:fe,useMemo:he,useReducer:fr,useRef:L,useState:W,useSyncExternalStore:Gi,useTransition:Ki,version:cf},Symbol.toStringTag,{value:"Module"}));function wt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function df(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Yi(...e){return t=>e.forEach(r=>df(r,t))}function Lt(...e){return me(Yi(...e),e)}function ff(e,t=[]){let r=[];function n(o,a){const s=Mt(a),l=r.length;r=[...r,a];function d(c){const{scope:p,children:g,...m}=c,v=(p==null?void 0:p[e][l])||s,_=he(()=>m,Object.values(m));return D(v.Provider,{value:_},g)}function f(c,p){const g=(p==null?void 0:p[e][l])||s,m=hr(g);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${o}\``)}return d.displayName=o+"Provider",[d,f]}const i=()=>{const o=r.map(a=>Mt(a));return function(s){const l=(s==null?void 0:s[e])||o;return he(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,hf(i,...t)]}function hf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((s,{useScope:l,scopeName:d})=>{const c=l(o)[`__scope${d}`];return{...s,...c}},{});return he(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const mn=globalThis!=null&&globalThis.document?fe:()=>{},pf=uf["useId".toString()]||(()=>{});let vf=0;function gn(e){const[t,r]=W(pf());return mn(()=>{e||r(n=>n??String(vf++))},[e]),e||(t?`radix-${t}`:"")}function nt(e){const t=L(e);return V(()=>{t.current=e}),he(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function mf({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=gf({defaultProp:t,onChange:r}),o=e!==void 0,a=o?e:n,s=nt(r),l=me(d=>{if(o){const c=typeof d=="function"?d(e):d;c!==e&&s(c)}else i(d)},[o,e,i,s]);return[a,l]}function gf({defaultProp:e,onChange:t}){const r=W(e),[n]=r,i=L(n),o=nt(t);return V(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}const bn=ne((e,t)=>{const{children:r,...n}=e,i=Le.toArray(r),o=i.find(yf);if(o){const a=o.props.children,s=i.map(l=>l===o?Le.count(a)>1?Le.only(null):rt(a)?a.props.children:null:l);return D(yn,de({},n,{ref:t}),rt(a)?_t(a,void 0,s):null)}return D(yn,de({},n,{ref:t}),r)});bn.displayName="Slot";const yn=ne((e,t)=>{const{children:r,...n}=e;return rt(r)?_t(r,{..._f(n,r.props),ref:t?Yi(t,r.ref):r.ref}):Le.count(r)>1?Le.only(null):null});yn.displayName="SlotClone";const bf=({children:e})=>D(Y,null,e);function yf(e){return rt(e)&&e.type===bf}function _f(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...s)=>{o(...s),i(...s)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}const _n=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=ne((n,i)=>{const{asChild:o,...a}=n,s=o?bn:t;return V(()=>{window[Symbol.for("radix-ui")]=!0},[]),D(s,de({},a,{ref:i}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wf(e,t){e&&mr(()=>e.dispatchEvent(t))}function xf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e);V(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const wn="dismissableLayer.update",kf="dismissableLayer.pointerDownOutside",$f="dismissableLayer.focusOutside";let Xi;const Sf=Mt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cf=ne((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...d}=e,f=hr(Sf),[c,p]=W(null),g=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=W({}),v=Lt(t,M=>p(M)),_=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=_.indexOf(x),I=c?_.indexOf(c):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,O=I>=w,H=Ef(M=>{const F=M.target,se=[...f.branches].some(re=>re.contains(F));!O||se||(o==null||o(M),s==null||s(M),M.defaultPrevented||l==null||l())},g),K=If(M=>{const F=M.target;[...f.branches].some(re=>re.contains(F))||(a==null||a(M),s==null||s(M),M.defaultPrevented||l==null||l())},g);return xf(M=>{I===f.layers.size-1&&(i==null||i(M),!M.defaultPrevented&&l&&(M.preventDefault(),l()))},g),V(()=>{if(c)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Xi=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(c)),f.layers.add(c),Zi(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Xi)}},[c,g,n,f]),V(()=>()=>{c&&(f.layers.delete(c),f.layersWithOutsidePointerEventsDisabled.delete(c),Zi())},[c,f]),V(()=>{const M=()=>m({});return document.addEventListener(wn,M),()=>document.removeEventListener(wn,M)},[]),D(_n.div,de({},d,{ref:v,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:wt(e.onFocusCapture,K.onFocusCapture),onBlurCapture:wt(e.onBlurCapture,K.onBlurCapture),onPointerDownCapture:wt(e.onPointerDownCapture,H.onPointerDownCapture)}))});function Ef(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1),i=L(()=>{});return V(()=>{const o=s=>{if(s.target&&!n.current){let d=function(){Ji(kf,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function If(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1);return V(()=>{const i=o=>{o.target&&!n.current&&Ji($f,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Zi(){const e=new CustomEvent(wn);document.dispatchEvent(e)}function Ji(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?wf(i,o):i.dispatchEvent(o)}const xn="focusScope.autoFocusOnMount",kn="focusScope.autoFocusOnUnmount",Qi={bubbles:!1,cancelable:!0},Of=ne((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=W(null),d=nt(i),f=nt(o),c=L(null),p=Lt(t,v=>l(v)),g=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V(()=>{if(n){let v=function(I){if(g.paused||!s)return;const T=I.target;s.contains(T)?c.current=T:He(c.current,{select:!0})},_=function(I){if(g.paused||!s)return;const T=I.relatedTarget;T!==null&&(s.contains(T)||He(c.current,{select:!0}))},x=function(I){if(document.activeElement===document.body)for(const O of I)O.removedNodes.length>0&&He(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const w=new MutationObserver(x);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),w.disconnect()}}},[n,s,g.paused]),V(()=>{if(s){ra.add(g);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(xn,Qi);s.addEventListener(xn,d),s.dispatchEvent(x),x.defaultPrevented||(Tf(Mf(ea(s)),{select:!0}),document.activeElement===v&&He(s))}return()=>{s.removeEventListener(xn,d),setTimeout(()=>{const x=new CustomEvent(kn,Qi);s.addEventListener(kn,f),s.dispatchEvent(x),x.defaultPrevented||He(v??document.body,{select:!0}),s.removeEventListener(kn,f),ra.remove(g)},0)}}},[s,d,f,g]);const m=me(v=>{if(!r&&!n||g.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(_&&x){const w=v.currentTarget,[I,T]=Af(w);I&&T?!v.shiftKey&&x===T?(v.preventDefault(),r&&He(I,{select:!0})):v.shiftKey&&x===I&&(v.preventDefault(),r&&He(T,{select:!0})):x===w&&v.preventDefault()}},[r,n,g.paused]);return D(_n.div,de({tabIndex:-1},a,{ref:p,onKeyDown:m}))});function Tf(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(He(n,{select:t}),document.activeElement!==r)return}function Af(e){const t=ea(e),r=ta(t,e),n=ta(t.reverse(),e);return[r,n]}function ea(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ta(e,t){for(const r of e)if(!Pf(r,{upTo:t}))return r}function Pf(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Nf(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Nf(e)&&t&&e.select()}}const ra=Df();function Df(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=na(e,t),e.unshift(t)},remove(t){var r;e=na(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function na(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Mf(e){return e.filter(t=>t.tagName!=="A")}function Ff(e,t){return fr((r,n)=>{const i=t[r][n];return i??r},e)}const $n=e=>{const{present:t,children:r}=e,n=Lf(t),i=typeof r=="function"?r({present:n.isPresent}):Le.only(r),o=Lt(n.ref,i.ref);return typeof r=="function"||n.isPresent?_t(i,{ref:o}):null};$n.displayName="Presence";function Lf(e){const[t,r]=W(),n=L({}),i=L(e),o=L("none"),a=e?"mounted":"unmounted",[s,l]=Ff(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(()=>{const d=gr(n.current);o.current=s==="mounted"?d:"none"},[s]),mn(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,g=gr(d);e?l("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),mn(()=>{if(t){const d=c=>{const g=gr(n.current).includes(c.animationName);c.target===t&&g&&mr(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(o.current=gr(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:me(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function gr(e){return(e==null?void 0:e.animationName)||"none"}let Sn=0;function Rf(){V(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:oa()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:oa()),Sn++,()=>{Sn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Sn--}},[])}function oa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ee=function(){return Ee=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ee.apply(this,arguments)};function ia(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function jf(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var br="right-scroll-bar-position",yr="width-before-scroll-bar",Vf="with-scroll-bars-hidden",Bf="--removed-body-scroll-bar-size";function zf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Uf(e,t){var r=W(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}function Hf(e,t){return Uf(t||null,function(r){return e.forEach(function(n){return zf(n,r)})})}function qf(e){return e}function Kf(e,t){t===void 0&&(t=qf);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(s){return o(s)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(o),a=r}var l=function(){var f=a;a=[],f.forEach(o)},d=function(){return Promise.resolve().then(l)};d(),r={push:function(f){a.push(f),d()},filter:function(f){return a=a.filter(f),r}}}};return i}function Wf(e){e===void 0&&(e={});var t=Kf(null);return t.options=Ee({async:!0,ssr:!1},e),t}var aa=function(e){var t=e.sideCar,r=ia(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return D(n,Ee({},r))};aa.isSideCarExport=!0;function Gf(e,t){return e.useMedium(t),aa}var sa=Wf(),Cn=function(){},_r=ne(function(e,t){var r=L(null),n=W({onScrollCapture:Cn,onWheelCapture:Cn,onTouchMoveCapture:Cn}),i=n[0],o=n[1],a=e.forwardProps,s=e.children,l=e.className,d=e.removeScrollBar,f=e.enabled,c=e.shards,p=e.sideCar,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,_=e.as,x=_===void 0?"div":_,w=ia(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),I=p,T=Hf([r,t]),O=Ee(Ee({},w),i);return D(Y,null,f&&D(I,{sideCar:sa,removeScrollBar:d,shards:c,noIsolation:g,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:r}),a?_t(Le.only(s),Ee(Ee({},O),{ref:T})):D(x,Ee({},O,{className:l,ref:T}),s))});_r.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_r.classNames={fullWidth:yr,zeroRight:br};var la,Yf=function(){if(la)return la;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Yf();return t&&e.setAttribute("nonce",t),e}function Zf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Jf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Qf=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Xf())&&(Zf(t,r),Jf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eh=function(){var e=Qf();return function(t,r){V(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ca=function(){var e=eh(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},th={left:0,top:0,right:0,gap:0},En=function(e){return parseInt(e||"",10)||0},rh=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[En(r),En(n),En(i)]},nh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return th;var t=rh(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},oh=ca(),ih=function(e,t,r,n){var i=e.left,o=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
+
.`.concat(Vf,` {
|
|
3
3
|
overflow: hidden `).concat(n,`;
|
|
4
4
|
padding-right: `).concat(s,"px ").concat(n,`;
|
|
5
5
|
}
|
|
@@ -16,30 +16,30 @@ var zm=Object.defineProperty;var Um=(Qe,be,Pe)=>be in Qe?zm(Qe,be,{enumerable:!0
|
|
|
16
16
|
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
19
|
+
.`).concat(br,` {
|
|
20
20
|
right: `).concat(s,"px ").concat(n,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
23
|
+
.`).concat(yr,` {
|
|
24
24
|
margin-right: `).concat(s,"px ").concat(n,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(br," .").concat(br,` {
|
|
28
28
|
right: 0 `).concat(n,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
31
|
+
.`).concat(yr," .").concat(yr,` {
|
|
32
32
|
margin-right: 0 `).concat(n,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(Bf,": ").concat(s,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},ah=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n,o=he(function(){return nh(i)},[i]);return D(oh,{styles:ih(o,!t,i,r?"":"!important")})},In=!1;if(typeof window<"u")try{var wr=Object.defineProperty({},"passive",{get:function(){return In=!0,!0}});window.addEventListener("test",wr,wr),window.removeEventListener("test",wr,wr)}catch{In=!1}var xt=In?{passive:!1}:!1,sh=function(e){return e.tagName==="TEXTAREA"},ua=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!sh(e)&&r[t]==="visible")},lh=function(e){return ua(e,"overflowY")},ch=function(e){return ua(e,"overflowX")},da=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=fa(e,r);if(n){var i=ha(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},uh=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},dh=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},fa=function(e,t){return e==="v"?lh(t):ch(t)},ha=function(e,t){return e==="v"?uh(t):dh(t)},fh=function(e,t){return e==="h"&&t==="rtl"?-1:1},hh=function(e,t,r,n,i){var o=fh(e,window.getComputedStyle(t).direction),a=o*n,s=r.target,l=t.contains(s),d=!1,f=a>0,c=0,p=0;do{var g=ha(e,s),m=g[0],v=g[1],_=g[2],x=v-_-o*m;(m||x)&&fa(e,s)&&(c+=x,p+=m),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(i&&c===0||!i&&a>c)||!f&&(i&&p===0||!i&&-a>p))&&(d=!0),d},xr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pa=function(e){return[e.deltaX,e.deltaY]},va=function(e){return e&&"current"in e?e.current:e},ph=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vh=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},vh=0,kt=[];function mh(e){var t=L([]),r=L([0,0]),n=L(),i=W(vh++)[0],o=W(function(){return la()})[0],a=L(e);V(function(){a.current=e},[e]),V(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Rf([e.lockRef.current],(e.shards||[]).map(pa),!0).filter(Boolean);return v.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=me(function(v,w){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=_r(v),_=r.current,I="deltaX"in v?v.deltaX:_[0]-x[0],T="deltaY"in v?v.deltaY:_[1]-x[1],O,H=v.target,K=Math.abs(I)>Math.abs(T)?"h":"v";if("touches"in v&&K==="h"&&H.type==="range")return!1;var M=ua(K,H);if(!M)return!0;if(M?O=K:(O=K==="v"?"h":"v",M=ua(K,H)),!M)return!1;if(!n.current&&"changedTouches"in v&&(I||T)&&(n.current=O),!O)return!0;var F=n.current||O;return fh(F,w,v,F==="h"?I:T,!0)},[]),l=me(function(v){var w=v;if(!(!kt.length||kt[kt.length-1]!==o)){var x="deltaY"in w?ha(w):_r(w),_=t.current.filter(function(O){return O.name===w.type&&O.target===w.target&&hh(O.delta,x)})[0];if(_&&_.should){w.cancelable&&w.preventDefault();return}if(!_){var I=(a.current.shards||[]).map(pa).filter(Boolean).filter(function(O){return O.contains(w.target)}),T=I.length>0?s(w,I[0]):!a.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),d=me(function(v,w,x,_){var I={name:v,delta:w,target:x,should:_};t.current.push(I),setTimeout(function(){t.current=t.current.filter(function(T){return T!==I})},1)},[]),f=me(function(v){r.current=_r(v),n.current=void 0},[]),c=me(function(v){d(v.type,ha(v),v.target,s(v,e.lockRef.current))},[]),p=me(function(v){d(v.type,_r(v),v.target,s(v,e.lockRef.current))},[]);V(function(){return kt.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,xt),document.addEventListener("touchmove",l,xt),document.addEventListener("touchstart",f,xt),function(){kt=kt.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,xt),document.removeEventListener("touchmove",l,xt),document.removeEventListener("touchstart",f,xt)}},[]);var g=e.removeScrollBar,m=e.inert;return D(Y,null,m?D(o,{styles:ph(i)}):null,g?D(ih,{gapMode:"margin"}):null)}const gh=Wf(aa,mh);var va=ne(function(e,t){return D(yr,Ee({},e,{ref:t,sideCar:gh}))});va.classNames=yr.classNames;const bh=va;var yh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,xr=new WeakMap,kr={},In=0,ma=function(e){return e&&(e.host||ma(e.parentNode))},wh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ma(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},_h=function(e,t,r,n){var i=wh(t,Array.isArray(e)?e:[e]);kr[r]||(kr[r]=new WeakMap);var o=kr[r],a=[],s=new Set,l=new Set(i),d=function(c){!c||s.has(c)||(s.add(c),d(c.parentNode))};i.forEach(d);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(s.has(p))f(p);else{var g=p.getAttribute(n),m=g!==null&&g!=="false",v=($t.get(p)||0)+1,w=(o.get(p)||0)+1;$t.set(p,v),o.set(p,w),a.push(p),v===1&&m&&xr.set(p,!0),w===1&&p.setAttribute(r,"true"),m||p.setAttribute(n,"true")}})};return f(t),s.clear(),In++,function(){a.forEach(function(c){var p=$t.get(c)-1,g=o.get(c)-1;$t.set(c,p),o.set(c,g),p||(xr.has(c)||c.removeAttribute(n),xr.delete(c)),g||c.removeAttribute(r)}),In--,In||($t=new WeakMap,$t=new WeakMap,xr=new WeakMap,kr={})}},xh=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||yh(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),_h(n,i,r,"aria-hidden")):function(){return null}};const ga="Dialog",[ba,qm]=df(ga),[kh,St]=ba(ga),$h=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=L(null),l=L(null),[d=!1,f]=vf({prop:n,defaultProp:i,onChange:o});return D(kh,{scope:t,triggerRef:s,contentRef:l,contentId:mn(),titleId:mn(),descriptionId:mn(),open:d,onOpenChange:f,onOpenToggle:me(()=>f(c=>!c),[f]),modal:a},r)},Sh="DialogPortal",[Km,ya]=ba(Sh,{forceMount:void 0}),On="DialogOverlay",Ch=ne((e,t)=>{const r=ya(On,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=St(On,e.__scopeDialog);return o.modal?D(kn,{present:n||o.open},D(Eh,de({},i,{ref:t}))):null}),Eh=ne((e,t)=>{const{__scopeDialog:r,...n}=e,i=St(On,r);return D(bh,{as:gn,allowPinchZoom:!0,shards:[i.contentRef]},D(yn.div,de({"data-state":_a(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Rt="DialogContent",Ih=ne((e,t)=>{const r=ya(Rt,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=St(Rt,e.__scopeDialog);return D(kn,{present:n||o.open},o.modal?D(Oh,de({},i,{ref:t})):D(Th,de({},i,{ref:t})))}),Oh=ne((e,t)=>{const r=St(Rt,e.__scopeDialog),n=L(null),i=Lt(t,r.contentRef,n);return V(()=>{const o=n.current;if(o)return xh(o)},[]),D(wa,de({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_t(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:_t(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:_t(e.onFocusOutside,o=>o.preventDefault())}))}),Th=ne((e,t)=>{const r=St(Rt,e.__scopeDialog),n=L(!1),i=L(!1);return D(wa,de({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,o),!o.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),o.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:o=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),wa=ne((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=St(Rt,r),l=L(null),d=Lt(t,l);return Lf(),D(Y,null,D(If,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o},D(Sf,de({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":_a(s.open)},a,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function _a(e){return e?"open":"closed"}const Ah=$h,Ph=Ch,Nh=Ih;function xa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=xa(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ot(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=xa(e))&&(n&&(n+=" "),n+=t);return n}const ka=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,$a=ot,$r=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return $a(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(d=>{const f=r==null?void 0:r[d],c=o==null?void 0:o[d];if(f===null)return null;const p=ka(f)||ka(c);return i[d][p]}),s=r&&Object.entries(r).reduce((d,f)=>{let[c,p]=f;return p===void 0||(d[c]=p),d},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:c,className:p,...g}=f;return Object.entries(g).every(m=>{let[v,w]=m;return Array.isArray(w)?w.includes({...o,...s}[v]):{...o,...s}[v]===w})?[...d,c,p]:d},[]);return $a(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},pe=Symbol.for("@ts-pattern/matcher"),Sa=Symbol.for("@ts-pattern/isVariadic"),Sr="@ts-pattern/anonymous-select-key",Tn=e=>!!(e&&typeof e=="object"),Cr=e=>e&&!!e[pe],oe=(e,t,r)=>{if(Cr(e)){const n=e[pe](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(a=>r(a,o[a])),i}if(Tn(e)){if(!Tn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(const a of e.keys()){const s=e[a];Cr(s)&&s[Sa]?o.push(s):o.length?i.push(s):n.push(s)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const a=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((d,f)=>oe(d,a[f],r))&&i.every((d,f)=>oe(d,s[f],r))&&(o.length===0||oe(o[0],l,r))}return e.length===t.length&&e.every((a,s)=>oe(a,t[s],r))}return Object.keys(e).every(n=>{const i=e[n];return(n in t||Cr(o=i)&&o[pe]().matcherType==="optional")&&oe(i,t[n],r);var o})}return Object.is(t,e)},ge=e=>{var t,r,n;return Tn(e)?Cr(e)?(t=(r=(n=e[pe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?jt(e,ge):jt(Object.values(e),ge):[]},jt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Dh(...e){if(e.length===1){const[t]=e;return r=>oe(t,r,()=>{})}if(e.length===2){const[t,r]=e;return oe(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function le(e){return Object.assign(e,{optional:()=>Pn(e),and:t=>G(e,t),or:t=>Ca(e,t),select:t=>t===void 0?Vt(e):Vt(t,e)})}function An(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Sa]:!0})}}))(e),{optional:()=>An(Pn(e)),select:t=>An(t===void 0?Vt(e):Vt(t,e))})}function Pn(e){return le({[pe]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return t===void 0?(ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:oe(e,t,n),selections:r}},getSelectionKeys:()=>ge(e),matcherType:"optional"})})}const Mh=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Fh=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function G(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return{matched:e.every(i=>oe(i,t,n)),selections:r}},getSelectionKeys:()=>jt(e,ge),matcherType:"and"})})}function Ca(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return jt(e,ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>oe(i,t,n)),selections:r}},getSelectionKeys:()=>jt(e,ge),matcherType:"or"})})}function j(e){return{[pe]:()=>({match:t=>({matched:!!e(t)})})}}function Vt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return le({[pe]:()=>({match:n=>{let i={[t??Sr]:n};return{matched:r===void 0||oe(r,n,(o,a)=>{i[o]=a}),selections:i}},getSelectionKeys:()=>[t??Sr].concat(r===void 0?[]:ge(r))})})}function Ie(e){return typeof e=="number"}function it(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}const Ea=le(j(function(e){return!0})),Lh=Ea,at=e=>Object.assign(le(e),{startsWith:t=>{return at(G(e,(r=t,j(n=>it(n)&&n.startsWith(r)))));var r},endsWith:t=>{return at(G(e,(r=t,j(n=>it(n)&&n.endsWith(r)))));var r},minLength:t=>at(G(e,(r=>j(n=>it(n)&&n.length>=r))(t))),maxLength:t=>at(G(e,(r=>j(n=>it(n)&&n.length<=r))(t))),includes:t=>{return at(G(e,(r=t,j(n=>it(n)&&n.includes(r)))));var r},regex:t=>{return at(G(e,(r=t,j(n=>it(n)&&!!n.match(r)))));var r}}),Rh=at(j(it)),Oe=e=>Object.assign(le(e),{between:(t,r)=>Oe(G(e,((n,i)=>j(o=>Ie(o)&&n<=o&&i>=o))(t,r))),lt:t=>Oe(G(e,(r=>j(n=>Ie(n)&&n<r))(t))),gt:t=>Oe(G(e,(r=>j(n=>Ie(n)&&n>r))(t))),lte:t=>Oe(G(e,(r=>j(n=>Ie(n)&&n<=r))(t))),gte:t=>Oe(G(e,(r=>j(n=>Ie(n)&&n>=r))(t))),int:()=>Oe(G(e,j(t=>Ie(t)&&Number.isInteger(t)))),finite:()=>Oe(G(e,j(t=>Ie(t)&&Number.isFinite(t)))),positive:()=>Oe(G(e,j(t=>Ie(t)&&t>0))),negative:()=>Oe(G(e,j(t=>Ie(t)&&t<0)))}),jh=Oe(j(Ie)),Ke=e=>Object.assign(le(e),{between:(t,r)=>Ke(G(e,((n,i)=>j(o=>qe(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ke(G(e,(r=>j(n=>qe(n)&&n<r))(t))),gt:t=>Ke(G(e,(r=>j(n=>qe(n)&&n>r))(t))),lte:t=>Ke(G(e,(r=>j(n=>qe(n)&&n<=r))(t))),gte:t=>Ke(G(e,(r=>j(n=>qe(n)&&n>=r))(t))),positive:()=>Ke(G(e,j(t=>qe(t)&&t>0))),negative:()=>Ke(G(e,j(t=>qe(t)&&t<0)))}),Vh=Ke(j(qe)),Bh=le(j(function(e){return typeof e=="boolean"})),zh=le(j(function(e){return typeof e=="symbol"})),Uh=le(j(function(e){return e==null}));var N={__proto__:null,matcher:pe,optional:Pn,array:function(...e){return An({[pe]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return ge(r).forEach(o=>{n[o]=[]}),{matched:!0,selections:n};const i=(o,a)=>{n[o]=(n[o]||[]).concat([a])};return{matched:t.every(o=>oe(r,o,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},set:function(...e){return le({[pe]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(o,a)=>{r[o]=(r[o]||[]).concat([a])},i=e[0];return{matched:Mh(t,o=>oe(i,o,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},map:function(...e){return le({[pe]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,a]=e;return{matched:Fh(t,(s,l)=>{const d=oe(o,l,n),f=oe(a,s,n);return d&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ge(e[0]),...ge(e[1])]})})},intersection:G,union:Ca,not:function(e){return le({[pe]:()=>({match:t=>({matched:!oe(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:j,select:Vt,any:Ea,_:Lh,string:Rh,number:jh,bigint:Vh,boolean:Bh,symbol:zh,nullish:Uh,instanceOf:function(e){return le(j(function(t){return r=>r instanceof t}(e)))},shape:function(e){return le(j(Dh(e)))}};const Nn={matched:!1,value:void 0};function We(e){return new Er(e,Nn)}class Er{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,a={};const s=(d,f)=>{o=!0,a[d]=f},l=!n.some(d=>oe(d,this.input,s))||i&&!i(this.input)?Nn:{matched:!0,value:r(o?Sr in a?a[Sr]:a:this.input,this.input)};return new Er(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Er(this.input,n?{matched:!0,value:r(this.input,this.input)}:Nn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}}const Wm="";function $e(e,t){if(!e)throw new Error(t)}function Ir(){throw new Error("Cycle detected")}var Hh=Symbol.for("preact-signals");function Dn(){if(Ct>1)Ct--;else{for(var e,t=!1;Bt!==void 0;){var r=Bt;for(Bt=void 0,Mn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Oa(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Mn=0,Ct--,t)throw e}}var Z=void 0,Bt=void 0,Ct=0,Mn=0,Or=0;function Ia(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function ie(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ie.prototype.brand=Hh,ie.prototype.h=function(){return!0},ie.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},ie.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ie.prototype.subscribe=function(e){var t=this;return Ln(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},ie.prototype.valueOf=function(){return this.value},ie.prototype.toString=function(){return this.value+""},ie.prototype.toJSON=function(){return this.value},ie.prototype.peek=function(){return this.v},Object.defineProperty(ie.prototype,"value",{get:function(){var e=Ia(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(Z instanceof Ye&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Mn>100&&Ir(),this.v=e,this.i++,Or++,Ct++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Dn()}}}});function Ge(e){return new ie(e)}function Oa(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ta(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Aa(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Ye(e){ie.call(this,void 0),this.x=e,this.s=void 0,this.g=Or-1,this.f=4}(Ye.prototype=new ie).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Or))return!0;if(this.g=Or,this.f|=1,this.i>0&&!Oa(this))return this.f&=-2,!0;var e=Z;try{Ta(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Z=e,Aa(this),this.f&=-2,!0},Ye.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ie.prototype.S.call(this,e)},Ye.prototype.U=function(e){if(this.t!==void 0&&(ie.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ye.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ye.prototype.peek=function(){if(this.h()||Ir(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ye.prototype,"value",{get:function(){1&this.f&&Ir();var e=Ia(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function qh(e){return new Ye(e)}function Pa(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ct++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Fn(e),n}finally{Z=r,Dn()}}}function Fn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Pa(e)}function Kh(e){if(Z!==this)throw new Error("Out-of-order effect");Aa(this),Z=e,this.f&=-2,8&this.f&&Fn(this),Dn()}function zt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}zt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},zt.prototype.S=function(){1&this.f&&Ir(),this.f|=1,this.f&=-9,Pa(this),Ta(this),Ct++;var e=Z;return Z=this,Kh.bind(this,e)},zt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Bt,Bt=this)},zt.prototype.d=function(){this.f|=8,1&this.f||Fn(this)};function Ln(e){var t=new zt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Rn;function Et(e,t){S[e]=t.bind(null,S[e]||function(){})}function Tr(e){Rn&&Rn(),Rn=e&&e.S()}function Na(e){var t=this,r=e.data,n=Gh(r);n.value=r;var i=he(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Ro(i.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},qh(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return i.value}Na.displayName="_st",Object.defineProperties(ie.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Na},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Et("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof ie&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)}),Et("__r",function(e,t){Tr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return Ln(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Tr(r),e(t)}),Et("__e",function(e,t,r,n){Tr(),e(t,r,n)}),Et("diffed",function(e,t){Tr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var a in o){var s=o[a];s!==void 0&&!(a in n)&&(s.d(),o[a]=void 0)}else r.U=o={};for(var l in n){var d=o[l],f=n[l];d===void 0?(d=Wh(r,l,f,i),o[l]=d):d.o(f,i)}}}e(t)});function Wh(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=Ge(r);return{o:function(a,s){o.value=a,n=s},d:Ln(function(){var a=o.value.value;n[t]!==a&&(n[t]=a,i?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}Et("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),Et("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ye.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function Gh(e){return he(function(){return Ge(e)},[])}const jn=(e,t)=>t.some(r=>e instanceof r);let Da,Ma;function Yh(){return Da||(Da=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Xh(){return Ma||(Ma=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Vn=new WeakMap,Bn=new WeakMap,Ar=new WeakMap;function Zh(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{r(st(e.result)),i()},a=()=>{n(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return Ar.set(t,e),t}function Jh(e){if(Vn.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{r(),i()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});Vn.set(e,t)}let zn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return Vn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return st(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Fa(e){zn=e(zn)}function Qh(e){return Xh().includes(e)?function(...t){return e.apply(Un(this),t),st(this.request)}:function(...t){return st(e.apply(Un(this),t))}}function ep(e){return typeof e=="function"?Qh(e):(e instanceof IDBTransaction&&Jh(e),jn(e,Yh())?new Proxy(e,zn):e)}function st(e){if(e instanceof IDBRequest)return Zh(e);if(Bn.has(e))return Bn.get(e);const t=ep(e);return t!==e&&(Bn.set(e,t),Ar.set(t,e)),t}const Un=e=>Ar.get(e);function tp(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),s=st(a);return n&&a.addEventListener("upgradeneeded",l=>{n(st(a.result),l.oldVersion,l.newVersion,st(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const rp=["get","getKey","getAll","getAllKeys","count"],np=["put","add","delete","clear"],Hn=new Map;function La(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Hn.get(t))return Hn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=np.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||rp.includes(r)))return;const o=async function(a,...s){const l=this.transaction(a,i?"readwrite":"readonly");let d=l.store;return n&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),i&&l.done]))[0]};return Hn.set(t,o),o}Fa(e=>({...e,get:(t,r,n)=>La(t,r)||e.get(t,r,n),has:(t,r)=>!!La(t,r)||e.has(t,r)}));const op=["continue","continuePrimaryKey","advance"],Ra={},qn=new WeakMap,ja=new WeakMap,ip={get(e,t){if(!op.includes(t))return e[t];let r=Ra[t];return r||(r=Ra[t]=function(...n){qn.set(this,ja.get(this)[t](...n))}),r}};async function*ap(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,ip);for(ja.set(r,t),Ar.set(r,Un(t));t;)yield r,t=await(qn.get(r)||t.continue()),qn.delete(r)}function Va(e,t){return t===Symbol.asyncIterator&&jn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&jn(e,[IDBIndex,IDBObjectStore])}Fa(e=>({...e,get(t,r,n){return Va(t,r)?ap:e.get(t,r,n)},has(t,r){return Va(t,r)||e.has(t,r)}}));const Ut=e=>We(e).with(N.number.lte(1e3),()=>`${Math.round(e)}KB`).with(N.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Ba=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},sp=e=>Object.entries(e).reduce((r,[n,i])=>(r[n]=i.value,r),{}),Ht=e=>t=>t?t.type===e:!1;class qt extends Error{constructor(){super("Aborted")}}function lp(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const za=e=>typeof e=="string",cp=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ua=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:cp()}),up=e=>We(e).with({nativeEvent:{submitter:N.select(N.union(N.instanceOf(HTMLButtonElement),N.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Ha=typeof window>"u"?void 0:tp("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Kt={getStateData:async(e,t)=>{var n;const r=qa({...e,flowKeys:t});return(n=await Ha)==null?void 0:n.get("state",r)},setStateData:lp(async e=>{var r;const t=qa(e);return(r=await Ha)==null?void 0:r.put("state",e.data,t)},1e3)},Pr=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(d=>d.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const o=t.type==="if-block"?t.branchId:void 0,a=e.find(d=>d.id===o),s=t.type.includes("question")?1:0;if(a){const d=s+Math.max(Pr(e,i,r,n+s).remainingSteps,Pr(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:d}),{stepsMade:n,remainingSteps:d}}const l=s+Pr(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},dp=e=>{const t={},r=e.find(n=>n.isHead);return r&&Pr(e,r,(n,i)=>{t[n]=i}),t},qa=e=>[...e.flowKeys,e.id,e.version].join("/"),Xe=Ge({state:"idle"}),Wt=e=>{const{state:t,flow:r}=Xe.value;if(t!=="loaded")return;$e(r,"No flow to update");const n=e(r.data);r.data=n,Xe.value={state:t,flow:r},Kt.setStateData(r)},P={current$:Xe,viewState$:Ge("closed"),inputHeight$:Ge(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:i,job:o})=>{const s={data:await Kt.getStateData(e,r)??Ua(),startedAt:new Date,nodeIdToProgress:dp(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:i,job:o};Xe.value={state:"loaded",flow:s},Kt.setStateData(s)},cancelCurrentFlow:()=>{Xe.value={state:"idle"},P.viewState$.value="closed"},markAsFinished:()=>Wt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Wt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Xe.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ua();Xe.value={state:e,flow:{...t,data:r,startedAt:new Date}},Kt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Wt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Xe.value;$e(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,Kt.setStateData(r)},setSubmission:(e,t)=>Wt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Wt(t=>({...t,currentInput:e??null}))};var fp=0;function u(e,t,r,n,i,o){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var d={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--fp,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(d),d}const hp=({message:e})=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:[u("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[u("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),u("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),u("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),u("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),u("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),u("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),u("path",{d:"M38 56h19"})]}),u("div",{class:"flex flex-col gap-2 text-center",children:[u("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&u("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Ka=e=>u("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[u("title",{children:"Loading"}),u("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),u("g",{id:"s1",transform:"translate(12,0)",children:u("g",{id:"s2",transform:"scale(0,0)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s3",transform:"translate(12,12)",children:u("g",{id:"s4",transform:"scale(1,1)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s5",transform:"translate(12,0)",children:u("g",{id:"s6",transform:"scale(0,0)",children:u("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),u("g",{id:"s7",transform:"translate(12,0)",children:u("g",{id:"s8",transform:"scale(0,0)",children:u("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),Wa=()=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(Ka,{class:"text-neutral-6 h-8 w-8"})}),pp=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Nr=({class:e,children:t,...r})=>u("button",{class:ot("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),vp=()=>{if(P.current$.value.state!=="loaded")return null;const e=P.current$.value.flow.nodeIdToProgress,t=P.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return u("div",{class:"bg-accent-3",children:u("div",{style:{width:pp(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},mp=({children:e})=>{const t=P.viewState$;return u(Y,{children:u("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[u("div",{class:"flex h-[var(--header-height)] gap-2",children:[u("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),u("button",{tabIndex:-1,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1",onTouchStart:Kn,children:u("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),u("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?u(Y,{children:[u(Nr,{class:"view-switch",onTouchStart:Kn,"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:u("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),u(Nr,{"aria-label":"Close application",onClick:P.cancelCurrentFlow,children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):u(Y,{children:[P.current$.value.state==="loaded"&&u(Nr,{"aria-label":"Restart",onClick:()=>{P.restart()},children:[u("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),u("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),u(Nr,{class:"view-switch",onTouchStart:Kn,"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),u(vp,{})]})})};function Kn(){}const gp=fn(()=>Promise.resolve().then(()=>Dm).then(e=>e.ChatbotBody)),bp=$r("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),yp=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:i,error:o}=P.current$.value,a=P.viewState$.value,s=n!=="idle"&&a==="maximised",l=L(null);return u(Ah,{open:s,modal:s,children:[u(Ph,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0 isolate"}),u(Nh,{forceMount:!0,asChild:!0,children:u("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:bp({view:a}),children:u("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[u(mp,{children:i==null?void 0:i.title}),We({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>u(Wa,{},"loading")).with({state:"loaded"},()=>u(bt,{fallback:u(Wa,{},"loading"),children:u(gp,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>u(hp,{message:o})).exhaustive()]})})})]})},Ga=Ce({id:ti(xe(),String),version:an(),build:an(),nodes:Ad(Td()),context_schema:Nd(Pd(ai(xe(),Ce({required:oi(),type:Ld([ii("string"),ii("number")])}))))}),wp=Ce({flow:Ga}),_p=Ce({company:Ce({name:xe()}),flow:Ga,job:Ce({id:ti(xe(),String),title:xe()})}),xp=`#isdk{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){#isdk{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}#isdk{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk em{font-style:italic}#isdk strong{font-weight:700}#isdk *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#isdk .pointer-events-none{pointer-events:none}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .bottom-2\\.5{bottom:.625rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .mt-auto{margin-top:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-24{width:6rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-none{flex:none}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}#isdk .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(.82)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}#isdk .resize{resize:both}#isdk .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .text-ellipsis{text-overflow:ellipsis}#isdk .whitespace-nowrap{white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}#isdk .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#isdk .bg-accent-1{background-color:var(--i-color-a-1)}#isdk .bg-accent-3{background-color:var(--i-color-a-3)}#isdk .bg-accent-9{background-color:var(--i-color-a-9)}#isdk .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}#isdk .bg-lowest{background-color:var(--i-color-lowest)}#isdk .bg-neutral-1{background-color:var(--i-color-n-1)}#isdk .bg-neutral-2{background-color:var(--i-color-n-2)}#isdk .bg-neutral-3{background-color:var(--i-color-n-3)}#isdk .bg-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .bg-none{background-image:none}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .px-5{padding-left:1.25rem;padding-right:1.25rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-2{padding-top:.5rem}#isdk .pt-2\\.5{padding-top:.625rem}#isdk .pt-3{padding-top:.75rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-right{text-align:right}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .font-medium{font-weight:500}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#isdk .leading-3{line-height:.75rem}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-10{color:var(--i-color-a-10)}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .opacity-0{opacity:0}#isdk .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}#isdk .outline-none{outline:2px solid transparent;outline-offset:2px}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-accent-4{outline-color:var(--i-color-a-4)}#isdk .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}#isdk .outline-divider{outline-color:var(--i-color-divider)}#isdk .outline-neutral-3{outline-color:var(--i-color-n-3)}#isdk .outline-neutral-6{outline-color:var(--i-color-n-6)}#isdk .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}#isdk .ring-divider{--tw-ring-color: var(--i-color-divider)}#isdk .ring-lowest{--tw-ring-color: var(--i-color-lowest)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#isdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .will-change-\\[height\\]{will-change:height}#isdk .text-wrap-balance{text-wrap:balance}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}#isdk .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}#isdk .\\[text-wrap\\:pretty\\]{text-wrap:pretty}#isdk .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}#isdk .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}#isdk .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}#isdk .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}#isdk .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}#isdk .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}#isdk .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#isdk .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}#isdk .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}#isdk .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}#isdk .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}#isdk .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:underline:hover{text-decoration-line:underline}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}#isdk .focus-visible\\:outline-2:focus-visible{outline-width:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}#isdk .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}#isdk .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}#isdk .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}#isdk .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}#isdk .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}#isdk .active\\:text-accent-10:active{color:var(--i-color-a-10)}#isdk .active\\:text-accent-11:active{color:var(--i-color-a-11)}#isdk .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}#isdk .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}#isdk .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#isdk .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}#isdk .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}@media (pointer: coarse){#isdk .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}#isdk .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}
|
|
42
|
-
`,
|
|
41
|
+
`)},mh=0,kt=[];function gh(e){var t=L([]),r=L([0,0]),n=L(),i=W(mh++)[0],o=W(function(){return ca()})[0],a=L(e);V(function(){a.current=e},[e]),V(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=jf([e.lockRef.current],(e.shards||[]).map(va),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=me(function(v,_){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=xr(v),w=r.current,I="deltaX"in v?v.deltaX:w[0]-x[0],T="deltaY"in v?v.deltaY:w[1]-x[1],O,H=v.target,K=Math.abs(I)>Math.abs(T)?"h":"v";if("touches"in v&&K==="h"&&H.type==="range")return!1;var M=da(K,H);if(!M)return!0;if(M?O=K:(O=K==="v"?"h":"v",M=da(K,H)),!M)return!1;if(!n.current&&"changedTouches"in v&&(I||T)&&(n.current=O),!O)return!0;var F=n.current||O;return hh(F,_,v,F==="h"?I:T,!0)},[]),l=me(function(v){var _=v;if(!(!kt.length||kt[kt.length-1]!==o)){var x="deltaY"in _?pa(_):xr(_),w=t.current.filter(function(O){return O.name===_.type&&O.target===_.target&&ph(O.delta,x)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var I=(a.current.shards||[]).map(va).filter(Boolean).filter(function(O){return O.contains(_.target)}),T=I.length>0?s(_,I[0]):!a.current.noIsolation;T&&_.cancelable&&_.preventDefault()}}},[]),d=me(function(v,_,x,w){var I={name:v,delta:_,target:x,should:w};t.current.push(I),setTimeout(function(){t.current=t.current.filter(function(T){return T!==I})},1)},[]),f=me(function(v){r.current=xr(v),n.current=void 0},[]),c=me(function(v){d(v.type,pa(v),v.target,s(v,e.lockRef.current))},[]),p=me(function(v){d(v.type,xr(v),v.target,s(v,e.lockRef.current))},[]);V(function(){return kt.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,xt),document.addEventListener("touchmove",l,xt),document.addEventListener("touchstart",f,xt),function(){kt=kt.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,xt),document.removeEventListener("touchmove",l,xt),document.removeEventListener("touchstart",f,xt)}},[]);var g=e.removeScrollBar,m=e.inert;return D(Y,null,m?D(o,{styles:vh(i)}):null,g?D(ah,{gapMode:"margin"}):null)}const bh=Gf(sa,gh);var ma=ne(function(e,t){return D(_r,Ee({},e,{ref:t,sideCar:bh}))});ma.classNames=_r.classNames;const yh=ma;var _h=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,kr=new WeakMap,$r={},On=0,ga=function(e){return e&&(e.host||ga(e.parentNode))},wh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ga(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},xh=function(e,t,r,n){var i=wh(t,Array.isArray(e)?e:[e]);$r[r]||($r[r]=new WeakMap);var o=$r[r],a=[],s=new Set,l=new Set(i),d=function(c){!c||s.has(c)||(s.add(c),d(c.parentNode))};i.forEach(d);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(s.has(p))f(p);else{var g=p.getAttribute(n),m=g!==null&&g!=="false",v=($t.get(p)||0)+1,_=(o.get(p)||0)+1;$t.set(p,v),o.set(p,_),a.push(p),v===1&&m&&kr.set(p,!0),_===1&&p.setAttribute(r,"true"),m||p.setAttribute(n,"true")}})};return f(t),s.clear(),On++,function(){a.forEach(function(c){var p=$t.get(c)-1,g=o.get(c)-1;$t.set(c,p),o.set(c,g),p||(kr.has(c)||c.removeAttribute(n),kr.delete(c)),g||c.removeAttribute(r)}),On--,On||($t=new WeakMap,$t=new WeakMap,kr=new WeakMap,$r={})}},kh=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||_h(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),xh(n,i,r,"aria-hidden")):function(){return null}};const ba="Dialog",[ya,Km]=ff(ba),[$h,St]=ya(ba),Sh=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=L(null),l=L(null),[d=!1,f]=mf({prop:n,defaultProp:i,onChange:o});return D($h,{scope:t,triggerRef:s,contentRef:l,contentId:gn(),titleId:gn(),descriptionId:gn(),open:d,onOpenChange:f,onOpenToggle:me(()=>f(c=>!c),[f]),modal:a},r)},Ch="DialogPortal",[Wm,_a]=ya(Ch,{forceMount:void 0}),Tn="DialogOverlay",Eh=ne((e,t)=>{const r=_a(Tn,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=St(Tn,e.__scopeDialog);return o.modal?D($n,{present:n||o.open},D(Ih,de({},i,{ref:t}))):null}),Ih=ne((e,t)=>{const{__scopeDialog:r,...n}=e,i=St(Tn,r);return D(yh,{as:bn,allowPinchZoom:!0,shards:[i.contentRef]},D(_n.div,de({"data-state":xa(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Rt="DialogContent",Oh=ne((e,t)=>{const r=_a(Rt,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=St(Rt,e.__scopeDialog);return D($n,{present:n||o.open},o.modal?D(Th,de({},i,{ref:t})):D(Ah,de({},i,{ref:t})))}),Th=ne((e,t)=>{const r=St(Rt,e.__scopeDialog),n=L(null),i=Lt(t,r.contentRef,n);return V(()=>{const o=n.current;if(o)return kh(o)},[]),D(wa,de({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:wt(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:wt(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:wt(e.onFocusOutside,o=>o.preventDefault())}))}),Ah=ne((e,t)=>{const r=St(Rt,e.__scopeDialog),n=L(!1),i=L(!1);return D(wa,de({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,o),!o.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),o.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:o=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),wa=ne((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=St(Rt,r),l=L(null),d=Lt(t,l);return Rf(),D(Y,null,D(Of,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o},D(Cf,de({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":xa(s.open)},a,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function xa(e){return e?"open":"closed"}const Ph=Sh,Nh=Eh,Dh=Oh;function ka(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ka(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ot(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ka(e))&&(n&&(n+=" "),n+=t);return n}const $a=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Sa=ot,Sr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Sa(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(d=>{const f=r==null?void 0:r[d],c=o==null?void 0:o[d];if(f===null)return null;const p=$a(f)||$a(c);return i[d][p]}),s=r&&Object.entries(r).reduce((d,f)=>{let[c,p]=f;return p===void 0||(d[c]=p),d},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:c,className:p,...g}=f;return Object.entries(g).every(m=>{let[v,_]=m;return Array.isArray(_)?_.includes({...o,...s}[v]):{...o,...s}[v]===_})?[...d,c,p]:d},[]);return Sa(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},pe=Symbol.for("@ts-pattern/matcher"),Ca=Symbol.for("@ts-pattern/isVariadic"),Cr="@ts-pattern/anonymous-select-key",An=e=>!!(e&&typeof e=="object"),Er=e=>e&&!!e[pe],oe=(e,t,r)=>{if(Er(e)){const n=e[pe](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(a=>r(a,o[a])),i}if(An(e)){if(!An(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(const a of e.keys()){const s=e[a];Er(s)&&s[Ca]?o.push(s):o.length?i.push(s):n.push(s)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const a=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((d,f)=>oe(d,a[f],r))&&i.every((d,f)=>oe(d,s[f],r))&&(o.length===0||oe(o[0],l,r))}return e.length===t.length&&e.every((a,s)=>oe(a,t[s],r))}return Object.keys(e).every(n=>{const i=e[n];return(n in t||Er(o=i)&&o[pe]().matcherType==="optional")&&oe(i,t[n],r);var o})}return Object.is(t,e)},ge=e=>{var t,r,n;return An(e)?Er(e)?(t=(r=(n=e[pe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?jt(e,ge):jt(Object.values(e),ge):[]},jt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Mh(...e){if(e.length===1){const[t]=e;return r=>oe(t,r,()=>{})}if(e.length===2){const[t,r]=e;return oe(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function le(e){return Object.assign(e,{optional:()=>Nn(e),and:t=>G(e,t),or:t=>Ea(e,t),select:t=>t===void 0?Vt(e):Vt(t,e)})}function Pn(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Ca]:!0})}}))(e),{optional:()=>Pn(Nn(e)),select:t=>Pn(t===void 0?Vt(e):Vt(t,e))})}function Nn(e){return le({[pe]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return t===void 0?(ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:oe(e,t,n),selections:r}},getSelectionKeys:()=>ge(e),matcherType:"optional"})})}const Fh=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Lh=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function G(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return{matched:e.every(i=>oe(i,t,n)),selections:r}},getSelectionKeys:()=>jt(e,ge),matcherType:"and"})})}function Ea(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return jt(e,ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>oe(i,t,n)),selections:r}},getSelectionKeys:()=>jt(e,ge),matcherType:"or"})})}function j(e){return{[pe]:()=>({match:t=>({matched:!!e(t)})})}}function Vt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return le({[pe]:()=>({match:n=>{let i={[t??Cr]:n};return{matched:r===void 0||oe(r,n,(o,a)=>{i[o]=a}),selections:i}},getSelectionKeys:()=>[t??Cr].concat(r===void 0?[]:ge(r))})})}function Ie(e){return typeof e=="number"}function it(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}const Ia=le(j(function(e){return!0})),Rh=Ia,at=e=>Object.assign(le(e),{startsWith:t=>{return at(G(e,(r=t,j(n=>it(n)&&n.startsWith(r)))));var r},endsWith:t=>{return at(G(e,(r=t,j(n=>it(n)&&n.endsWith(r)))));var r},minLength:t=>at(G(e,(r=>j(n=>it(n)&&n.length>=r))(t))),maxLength:t=>at(G(e,(r=>j(n=>it(n)&&n.length<=r))(t))),includes:t=>{return at(G(e,(r=t,j(n=>it(n)&&n.includes(r)))));var r},regex:t=>{return at(G(e,(r=t,j(n=>it(n)&&!!n.match(r)))));var r}}),jh=at(j(it)),Oe=e=>Object.assign(le(e),{between:(t,r)=>Oe(G(e,((n,i)=>j(o=>Ie(o)&&n<=o&&i>=o))(t,r))),lt:t=>Oe(G(e,(r=>j(n=>Ie(n)&&n<r))(t))),gt:t=>Oe(G(e,(r=>j(n=>Ie(n)&&n>r))(t))),lte:t=>Oe(G(e,(r=>j(n=>Ie(n)&&n<=r))(t))),gte:t=>Oe(G(e,(r=>j(n=>Ie(n)&&n>=r))(t))),int:()=>Oe(G(e,j(t=>Ie(t)&&Number.isInteger(t)))),finite:()=>Oe(G(e,j(t=>Ie(t)&&Number.isFinite(t)))),positive:()=>Oe(G(e,j(t=>Ie(t)&&t>0))),negative:()=>Oe(G(e,j(t=>Ie(t)&&t<0)))}),Vh=Oe(j(Ie)),Ke=e=>Object.assign(le(e),{between:(t,r)=>Ke(G(e,((n,i)=>j(o=>qe(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ke(G(e,(r=>j(n=>qe(n)&&n<r))(t))),gt:t=>Ke(G(e,(r=>j(n=>qe(n)&&n>r))(t))),lte:t=>Ke(G(e,(r=>j(n=>qe(n)&&n<=r))(t))),gte:t=>Ke(G(e,(r=>j(n=>qe(n)&&n>=r))(t))),positive:()=>Ke(G(e,j(t=>qe(t)&&t>0))),negative:()=>Ke(G(e,j(t=>qe(t)&&t<0)))}),Bh=Ke(j(qe)),zh=le(j(function(e){return typeof e=="boolean"})),Uh=le(j(function(e){return typeof e=="symbol"})),Hh=le(j(function(e){return e==null}));var N={__proto__:null,matcher:pe,optional:Nn,array:function(...e){return Pn({[pe]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return ge(r).forEach(o=>{n[o]=[]}),{matched:!0,selections:n};const i=(o,a)=>{n[o]=(n[o]||[]).concat([a])};return{matched:t.every(o=>oe(r,o,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},set:function(...e){return le({[pe]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(o,a)=>{r[o]=(r[o]||[]).concat([a])},i=e[0];return{matched:Fh(t,o=>oe(i,o,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},map:function(...e){return le({[pe]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,a]=e;return{matched:Lh(t,(s,l)=>{const d=oe(o,l,n),f=oe(a,s,n);return d&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ge(e[0]),...ge(e[1])]})})},intersection:G,union:Ea,not:function(e){return le({[pe]:()=>({match:t=>({matched:!oe(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:j,select:Vt,any:Ia,_:Rh,string:jh,number:Vh,bigint:Bh,boolean:zh,symbol:Uh,nullish:Hh,instanceOf:function(e){return le(j(function(t){return r=>r instanceof t}(e)))},shape:function(e){return le(j(Mh(e)))}};const Dn={matched:!1,value:void 0};function We(e){return new Ir(e,Dn)}class Ir{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,a={};const s=(d,f)=>{o=!0,a[d]=f},l=!n.some(d=>oe(d,this.input,s))||i&&!i(this.input)?Dn:{matched:!0,value:r(o?Cr in a?a[Cr]:a:this.input,this.input)};return new Ir(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Ir(this.input,n?{matched:!0,value:r(this.input,this.input)}:Dn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}}const Gm="";function $e(e,t){if(!e)throw new Error(t)}function Or(){throw new Error("Cycle detected")}var qh=Symbol.for("preact-signals");function Mn(){if(Ct>1)Ct--;else{for(var e,t=!1;Bt!==void 0;){var r=Bt;for(Bt=void 0,Fn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Ta(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Fn=0,Ct--,t)throw e}}var Z=void 0,Bt=void 0,Ct=0,Fn=0,Tr=0;function Oa(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function ie(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ie.prototype.brand=qh,ie.prototype.h=function(){return!0},ie.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},ie.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ie.prototype.subscribe=function(e){var t=this;return Rn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},ie.prototype.valueOf=function(){return this.value},ie.prototype.toString=function(){return this.value+""},ie.prototype.toJSON=function(){return this.value},ie.prototype.peek=function(){return this.v},Object.defineProperty(ie.prototype,"value",{get:function(){var e=Oa(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(Z instanceof Ye&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Fn>100&&Or(),this.v=e,this.i++,Tr++,Ct++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Mn()}}}});function Ge(e){return new ie(e)}function Ta(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Aa(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Pa(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Ye(e){ie.call(this,void 0),this.x=e,this.s=void 0,this.g=Tr-1,this.f=4}(Ye.prototype=new ie).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Tr))return!0;if(this.g=Tr,this.f|=1,this.i>0&&!Ta(this))return this.f&=-2,!0;var e=Z;try{Aa(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Z=e,Pa(this),this.f&=-2,!0},Ye.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ie.prototype.S.call(this,e)},Ye.prototype.U=function(e){if(this.t!==void 0&&(ie.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ye.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ye.prototype.peek=function(){if(this.h()||Or(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ye.prototype,"value",{get:function(){1&this.f&&Or();var e=Oa(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Kh(e){return new Ye(e)}function Na(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ct++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Ln(e),n}finally{Z=r,Mn()}}}function Ln(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Na(e)}function Wh(e){if(Z!==this)throw new Error("Out-of-order effect");Pa(this),Z=e,this.f&=-2,8&this.f&&Ln(this),Mn()}function zt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}zt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},zt.prototype.S=function(){1&this.f&&Or(),this.f|=1,this.f&=-9,Na(this),Aa(this),Ct++;var e=Z;return Z=this,Wh.bind(this,e)},zt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Bt,Bt=this)},zt.prototype.d=function(){this.f|=8,1&this.f||Ln(this)};function Rn(e){var t=new zt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var jn;function Et(e,t){S[e]=t.bind(null,S[e]||function(){})}function Ar(e){jn&&jn(),jn=e&&e.S()}function Da(e){var t=this,r=e.data,n=Yh(r);n.value=r;var i=he(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var a;!jo(i.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},Kh(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return i.value}Da.displayName="_st",Object.defineProperties(ie.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Da},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Et("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof ie&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)}),Et("__r",function(e,t){Ar();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return Rn(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Ar(r),e(t)}),Et("__e",function(e,t,r,n){Ar(),e(t,r,n)}),Et("diffed",function(e,t){Ar();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var a in o){var s=o[a];s!==void 0&&!(a in n)&&(s.d(),o[a]=void 0)}else r.U=o={};for(var l in n){var d=o[l],f=n[l];d===void 0?(d=Gh(r,l,f,i),o[l]=d):d.o(f,i)}}}e(t)});function Gh(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=Ge(r);return{o:function(a,s){o.value=a,n=s},d:Rn(function(){var a=o.value.value;n[t]!==a&&(n[t]=a,i?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}Et("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),Et("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ye.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function Yh(e){return he(function(){return Ge(e)},[])}const Vn=(e,t)=>t.some(r=>e instanceof r);let Ma,Fa;function Xh(){return Ma||(Ma=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Zh(){return Fa||(Fa=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Bn=new WeakMap,zn=new WeakMap,Pr=new WeakMap;function Jh(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{r(st(e.result)),i()},a=()=>{n(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return Pr.set(t,e),t}function Qh(e){if(Bn.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{r(),i()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});Bn.set(e,t)}let Un={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return Bn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return st(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function La(e){Un=e(Un)}function ep(e){return Zh().includes(e)?function(...t){return e.apply(Hn(this),t),st(this.request)}:function(...t){return st(e.apply(Hn(this),t))}}function tp(e){return typeof e=="function"?ep(e):(e instanceof IDBTransaction&&Qh(e),Vn(e,Xh())?new Proxy(e,Un):e)}function st(e){if(e instanceof IDBRequest)return Jh(e);if(zn.has(e))return zn.get(e);const t=tp(e);return t!==e&&(zn.set(e,t),Pr.set(t,e)),t}const Hn=e=>Pr.get(e);function rp(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),s=st(a);return n&&a.addEventListener("upgradeneeded",l=>{n(st(a.result),l.oldVersion,l.newVersion,st(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const np=["get","getKey","getAll","getAllKeys","count"],op=["put","add","delete","clear"],qn=new Map;function Ra(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(qn.get(t))return qn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=op.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||np.includes(r)))return;const o=async function(a,...s){const l=this.transaction(a,i?"readwrite":"readonly");let d=l.store;return n&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),i&&l.done]))[0]};return qn.set(t,o),o}La(e=>({...e,get:(t,r,n)=>Ra(t,r)||e.get(t,r,n),has:(t,r)=>!!Ra(t,r)||e.has(t,r)}));const ip=["continue","continuePrimaryKey","advance"],ja={},Kn=new WeakMap,Va=new WeakMap,ap={get(e,t){if(!ip.includes(t))return e[t];let r=ja[t];return r||(r=ja[t]=function(...n){Kn.set(this,Va.get(this)[t](...n))}),r}};async function*sp(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,ap);for(Va.set(r,t),Pr.set(r,Hn(t));t;)yield r,t=await(Kn.get(r)||t.continue()),Kn.delete(r)}function Ba(e,t){return t===Symbol.asyncIterator&&Vn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Vn(e,[IDBIndex,IDBObjectStore])}La(e=>({...e,get(t,r,n){return Ba(t,r)?sp:e.get(t,r,n)},has(t,r){return Ba(t,r)||e.has(t,r)}}));const Ut=e=>We(e).with(N.number.lte(1e3),()=>`${Math.round(e)}KB`).with(N.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),za=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},lp=e=>Object.entries(e).reduce((r,[n,i])=>(r[n]=i.value,r),{}),Ht=e=>t=>t?t.type===e:!1;class qt extends Error{constructor(){super("Aborted")}}function cp(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const Ua=e=>typeof e=="string",up=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ha=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:up()}),dp=e=>We(e).with({nativeEvent:{submitter:N.select(N.union(N.instanceOf(HTMLButtonElement),N.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),qa=typeof window>"u"?void 0:rp("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Kt={getStateData:async(e,t)=>{var n;const r=Ka({...e,flowKeys:t});return(n=await qa)==null?void 0:n.get("state",r)},setStateData:cp(async e=>{var r;const t=Ka(e);return(r=await qa)==null?void 0:r.put("state",e.data,t)},1e3)},Nr=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(d=>d.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const o=t.type==="if-block"?t.branchId:void 0,a=e.find(d=>d.id===o),s=t.type.includes("question")?1:0;if(a){const d=s+Math.max(Nr(e,i,r,n+s).remainingSteps,Nr(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:d}),{stepsMade:n,remainingSteps:d}}const l=s+Nr(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},fp=e=>{const t={},r=e.find(n=>n.isHead);return r&&Nr(e,r,(n,i)=>{t[n]=i}),t},Ka=e=>[...e.flowKeys,e.id,e.version].join("/"),Xe=Ge({state:"idle"}),Wt=e=>{const{state:t,flow:r}=Xe.value;if(t!=="loaded")return;$e(r,"No flow to update");const n=e(r.data);r.data=n,Xe.value={state:t,flow:r},Kt.setStateData(r)},P={current$:Xe,viewState$:Ge("closed"),inputHeight$:Ge(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:i,job:o})=>{const s={data:await Kt.getStateData(e,r)??Ha(),startedAt:new Date,nodeIdToProgress:fp(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:i,job:o};Xe.value={state:"loaded",flow:s},Kt.setStateData(s)},cancelCurrentFlow:()=>{Xe.value={state:"idle"},P.viewState$.value="closed"},markAsFinished:()=>Wt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Wt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Xe.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ha();Xe.value={state:e,flow:{...t,data:r,startedAt:new Date}},Kt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Wt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Xe.value;$e(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,Kt.setStateData(r)},setSubmission:(e,t)=>Wt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Wt(t=>({...t,currentInput:e??null}))};var hp=0;function u(e,t,r,n,i,o){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var d={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--hp,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(d),d}const pp=({message:e})=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:[u("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[u("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),u("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),u("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),u("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),u("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),u("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),u("path",{d:"M38 56h19"})]}),u("div",{class:"flex flex-col gap-2 text-center",children:[u("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&u("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Wa=e=>u("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[u("title",{children:"Loading"}),u("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),u("g",{id:"s1",transform:"translate(12,0)",children:u("g",{id:"s2",transform:"scale(0,0)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s3",transform:"translate(12,12)",children:u("g",{id:"s4",transform:"scale(1,1)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s5",transform:"translate(12,0)",children:u("g",{id:"s6",transform:"scale(0,0)",children:u("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),u("g",{id:"s7",transform:"translate(12,0)",children:u("g",{id:"s8",transform:"scale(0,0)",children:u("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),Ga=()=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(Wa,{class:"text-neutral-6 h-8 w-8"})}),vp=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Dr=({class:e,children:t,...r})=>u("button",{class:ot("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),mp=()=>{if(P.current$.value.state!=="loaded")return null;const e=P.current$.value.flow.nodeIdToProgress,t=P.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return u("div",{class:"bg-accent-3",children:u("div",{style:{width:vp(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},gp=({children:e})=>{const t=P.viewState$;return u(Y,{children:u("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[u("div",{class:"flex h-[var(--header-height)] gap-2",children:[u("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),u("button",{tabIndex:-1,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1",onTouchStart:Wn,children:u("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),u("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?u(Y,{children:[u(Dr,{class:"view-switch",onTouchStart:Wn,"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:u("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),u(Dr,{"aria-label":"Close application",onClick:P.cancelCurrentFlow,children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):u(Y,{children:[P.current$.value.state==="loaded"&&u(Dr,{"aria-label":"Restart",onClick:()=>{P.restart()},children:[u("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),u("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),u(Dr,{class:"view-switch",onTouchStart:Wn,"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),u(mp,{})]})})};function Wn(){}const bp=hn(()=>Promise.resolve().then(()=>Mm).then(e=>e.ChatbotBody)),yp=Sr("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"}}}),_p=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:i,error:o}=P.current$.value,a=P.viewState$.value,s=n!=="idle"&&a==="maximised",l=L(null);return u(Ph,{open:s,modal:s,children:[u(Nh,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0 isolate"}),u(Dh,{forceMount:!0,asChild:!0,children:u("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:yp({view:a}),children:u("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[u(gp,{children:i==null?void 0:i.title}),We({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>u(Ga,{},"loading")).with({state:"loaded"},()=>u(bt,{fallback:u(Ga,{},"loading"),children:u(bp,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>u(pp,{message:o})).exhaustive()]})})})]})},Ya=Ce({id:ri(xe(),String),version:sn(),build:sn(),nodes:Pd(Ad()),context_schema:Dd(Nd(si(xe(),Ce({required:ii(),type:Rd([ai("string"),ai("number")])}))))}),wp=Ce({flow:Ya}),xp=Ce({company:Ce({name:xe()}),flow:Ya,job:Ce({id:ri(xe(),String),title:xe()})}),kp=`#isdk{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){#isdk{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}#isdk{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk em{font-style:italic}#isdk strong{font-weight:700}#isdk *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#isdk .pointer-events-none{pointer-events:none}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .bottom-2\\.5{bottom:.625rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .mt-auto{margin-top:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-24{width:6rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-none{flex:none}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}#isdk .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(.82)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}#isdk .resize{resize:both}#isdk .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .text-ellipsis{text-overflow:ellipsis}#isdk .whitespace-nowrap{white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}#isdk .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#isdk .bg-accent-1{background-color:var(--i-color-a-1)}#isdk .bg-accent-3{background-color:var(--i-color-a-3)}#isdk .bg-accent-9{background-color:var(--i-color-a-9)}#isdk .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}#isdk .bg-lowest{background-color:var(--i-color-lowest)}#isdk .bg-neutral-1{background-color:var(--i-color-n-1)}#isdk .bg-neutral-2{background-color:var(--i-color-n-2)}#isdk .bg-neutral-3{background-color:var(--i-color-n-3)}#isdk .bg-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .bg-none{background-image:none}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .px-5{padding-left:1.25rem;padding-right:1.25rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-2{padding-top:.5rem}#isdk .pt-2\\.5{padding-top:.625rem}#isdk .pt-3{padding-top:.75rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-right{text-align:right}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .font-medium{font-weight:500}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#isdk .leading-3{line-height:.75rem}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-10{color:var(--i-color-a-10)}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .opacity-0{opacity:0}#isdk .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}#isdk .outline-none{outline:2px solid transparent;outline-offset:2px}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-accent-4{outline-color:var(--i-color-a-4)}#isdk .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}#isdk .outline-divider{outline-color:var(--i-color-divider)}#isdk .outline-neutral-3{outline-color:var(--i-color-n-3)}#isdk .outline-neutral-6{outline-color:var(--i-color-n-6)}#isdk .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}#isdk .ring-divider{--tw-ring-color: var(--i-color-divider)}#isdk .ring-lowest{--tw-ring-color: var(--i-color-lowest)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#isdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .will-change-\\[height\\]{will-change:height}#isdk .text-wrap-balance{text-wrap:balance}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}#isdk .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}#isdk .\\[text-wrap\\:pretty\\]{text-wrap:pretty}#isdk .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}#isdk .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}#isdk .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}#isdk .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}#isdk .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}#isdk .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}#isdk .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#isdk .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}#isdk .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}#isdk .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}#isdk .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}#isdk .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:underline:hover{text-decoration-line:underline}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}#isdk .focus-visible\\:outline-2:focus-visible{outline-width:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}#isdk .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}#isdk .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}#isdk .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}#isdk .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}#isdk .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}#isdk .active\\:text-accent-10:active{color:var(--i-color-a-10)}#isdk .active\\:text-accent-11:active{color:var(--i-color-a-11)}#isdk .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}#isdk .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}#isdk .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#isdk .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}#isdk .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}@media (pointer: coarse){#isdk .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}#isdk .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}
|
|
42
|
+
`,Xa="isdk",$p={not_in_local_storage:"Application not found in local storage",invalid_end_node:"Unexpected node type to finish flow",no_submissions:"Application ended without any fields submitted",invalid_state:"Invalid state"},Sp=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Xa);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Xa,t}});var Cp=["1","2","3","4","5","6","7","8","9","10","11","12"],Ep={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]}},Ip=(e,t=1,r)=>n=>{const[i,o]=Ep[r][n];return"oklch("+i+"% "+o*t+" "+e+")"},Gn=e=>{const t=Ip(e.hue,e.chroma,e.mode);return Object.fromEntries(Cp.map(r=>[e.prefix+r,e.transform(t(r))]))},Yn=e=>e,Op=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(i=>{const o=n[i];return[`${String(r)}.${i}`,o]}):[[r,n]]});return Object.fromEntries(t)},Mr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Xn=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Mr(e)&&Mr(r))for(const n in r){const i=r[n];if(Mr(i)){e[n]||Object.assign(e,{[n]:{}});const o=e[n];Mr(o)&&Xn(o,i)}else Object.assign(e,{[n]:r[n]})}return Xn(e,...t)},Tp=e=>{function t(r,n){const i=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return t},Ap=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:i,getToken:o}=n,a=p=>o("reference",p.toString()),s=e({theme:i}),l=t({theme:i,core:a,raw:{core:s}}),d=r({theme:i,core:a,semantic:a,raw:{core:s,semantic:l}}),f=Op(Xn(s,l,d)),c=([p,g],m)=>{const v=[m,p].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(_=>c(_,v)):[[n.getToken("declaration",v),g]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(p=>c(p))),ref:p=>o("reference",p.toString())}}})})})});const[Zn,Jn,Za]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Pp=Ap().core(({theme:e})=>({color:{black:Zn,white:Jn,lowest:e.mode==="light"?Jn:Zn,highest:e.mode==="light"?Zn:Jn,...Gn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Yn}),...Gn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Yn}),...Gn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Yn})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Za,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const i=(o,a)=>e.core.color[o].replace(")",` / ${a})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":Za,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Np=Tp({prefix:"i-"}),Dp=e=>{const t=Pp.from({theme:e,getToken:Np}),r=Object.entries(t.declarations).map(([n,i])=>`${n}: ${i};`);return`#isdk {
|
|
43
43
|
${r.concat(r).join(`
|
|
44
44
|
`)}
|
|
45
|
-
}`},Za=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const i=t[n];if(!i)continue;const o=Pt(e,n,null);if(i.required&&o===null){const a=`Configuration error in context: ${n} is required`;throw r.error(a),new Error(a)}switch(i.type){case"number":if(typeof o!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof o!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}},Dp=({_internal_domManager:e=$p(),theme:t})=>Qe(({apiClient:r,logger:n,analytics:i})=>{let o=!1;const a=()=>{if(typeof window>"u")return;const s=[D("style",{id:"inploi-chatbot-styles"},xp),D("style",{id:"inploi-chatbot-theme"},Np(t))],l=e.getOrCreateChatbotElement();mt(D(Y,{},[s,D(yp,{apiClient:r,logger:n,analytics:i})]),l),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async(s,l)=>{const d=new URLSearchParams({id_type:(l==null?void 0:l.idType)==="inploi"?"internal":"external"});return r.fetch([`/flow/job/${s}`,d.toString()].filter(Boolean).join("?")).then(f=>{const c=sr(_p,f);return{flow:c.flow,title:`Applying for “${c.job.title}”`,flowKeys:[c.job.id,...(l==null?void 0:l.flowKeys)??[]],job:{id:c.job.id,id_type:"external"},...l}})},fetchFlowById:async(s,l)=>r.fetch(`/flow/id/${s}`).then(d=>{var c;const f=sr(wp,d);return{flow:f.flow,title:"Chatbot",flowKeys:(l==null?void 0:l.flowKeys)??[],...l,analytics:{customProperties:{flow_id:f.flow.id,flow_version:f.flow.version,...(c=l==null?void 0:l.analytics)==null?void 0:c.customProperties}}}}),open:async s=>{if(!(typeof window>"u"))try{P.cancelCurrentFlow(),P.viewState$.value="maximised",o||a(),s instanceof Promise?(P.current$.value={state:"loading"},s.then(async l=>{Za({context:l.context||{},schema:l.flow.context_schema,logger:n}),P.startFlow(l)}).catch(l=>{const d=l instanceof Error?l.message:"An error occurred";P.current$.value={state:"error",error:d}})):(Za({context:s.context||{},schema:s.flow.context_schema,logger:n}),P.startFlow(s))}catch(l){n.error("Error starting flow",l)}},close:async()=>{typeof window>"u"||(P.cancelCurrentFlow(),n.info("Closed flow from an external source"))}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Dp;const Mp=({condition:e,context:t,submissions:r,ifBlock:n})=>{const[i,...o]=e.compareKey.split(".");if(!i)return!1;const a=Qa({context:t,key:i,path:o,submissions:r});if(!a)return!1;switch(a.type){case"address":{const s=Pt(a.value,o.join("."));switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"integration":{if(typeof a.value!="object"||Array.isArray(a.value))return!1;const s=Pt(a.value,o.join(".")),l={...n,data:{...n.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return Gt(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Gt(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Gt(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(za)?Gt(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{const s=e.compareValue==="true";switch(e.compare){case"equals":return a.value===s;case"notEquals":return a.value!==s}break}case"string":switch(e.compare){case"equals":return a.value===e.compareValue;case"contains":return a.value?a.value.includes(e.compareValue):!1;case"notEquals":return a.value!==e.compareValue;case"notContains":return a.value?!a.value.includes(e.compareValue):!0}break;case"number":{try{const s=Number(e.compareValue);switch(e.compare){case"equals":return a.value===s;case"notEquals":return a.value!==s;case"greaterThan":return a.value>s;case"greaterThanOrEqualTo":return a.value>=s;case"lessThan":return a.value<s;case"lessThanOrEqualTo":return a.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,a.value),!1}break}case"enum":switch(e.compare){case"equals":return a.value.length===1&&a.value[0]===e.compareValue;case"notEquals":return a.value.length===1&&a.value[0]!==e.compareValue;case"contains":return a.value.includes(e.compareValue);case"notContains":return!a.value.includes(e.compareValue)}break}},Gt=(e,{context:t,submissions:r})=>{const n="combinator"in e.data?e.data.conditions:[e.data],i="combinator"in e.data?e.data.combinator:"and";for(const o of n){const a=Mp({condition:o,context:t,submissions:r,ifBlock:e});if(i==="or"&&a)return!0;if(i==="and"&&!a)return!1}return!0},Fp=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Re=(e,{context:t,submissions:r})=>e.replace(Fp,(n,i,o="")=>{const[a,...s]=i.trim().split("."),l=Qa({key:a,path:s,submissions:r,context:t});if(!l)return o;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Ut(d.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():o;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const d=Pt(l.value,s.join("."));switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(za))return d.join(", ")}break}}return o}),Ja=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return Ja({node:n,nodes:t,stopWhen:r})},Lp=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(s=>s.id===i.branchId);if(!o)return!1;const a=Ja({node:o,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},Rp=({flow:e,analytics:t,logger:r,context:n,apiClient:i,getSubmissions:o,chatService:a,onFlowEnd:s,onInterpret:l})=>{let d=new AbortController;const f={...t.service,log:p=>t.service.log({...p,customProperties:{...p.customProperties,...t.customProperties}})},c=async(p,g)=>{const m=o();l==null||l(p,g);try{await jp({flow:e,analytics:f,logger:r,apiClient:i,context:n,node:p,submissions:m,chat:{sendMessage:async v=>a.send({groupId:p.id,message:v,signal:d.signal}),userInput:async v=>a.input({input:v,signal:d.signal}),addToSubmissions:a.addToSubmissions},next:v=>{const w=v?e.nodes.find(x=>x.id===v):Lp({childNode:p,nodes:e.nodes});return w?c(w,p):s==null?void 0:s(p)},end:()=>s==null?void 0:s(p)})}catch(v){if(v instanceof qt)return;throw v}};return{interpret:async p=>{const g=e.nodes.find(m=>m.id===p)??Ba(e.nodes);return c(g)},undo:p=>{let g=1;const m=e.nodes.find(w=>w.id===p[p.length-1]);for(let w=p.length-2;w>0;w--){const x=p[w],_=e.nodes.find(I=>I.id===x);if(!_||(g++,_.type.startsWith("question-")))break}d.abort(),d=new AbortController;const v=e.nodes.find(w=>w.id===p[p.length-g]);return $e(v,"Undo failed: new start node not found"),c(v,m),{removed:g}},abort:()=>{d.abort()}}};async function jp(e){const t=e.node;switch(t.type){case"text":return Kp({...e,node:t});case"image":return Wp({...e,node:t});case"question-text":return Gp({...e,node:t});case"question-enum":return Xp({...e,node:t});case"question-number":return Yp({...e,node:t});case"question-boolean":return Zp({...e,node:t});case"question-file":return Qp({...e,node:t});case"question-address":return Jp({...e,node:t});case"end-flow":return ev({...e,node:t});case"if-block":return qp({...e,node:t});case"jump":return Bp({...e,node:t});case"link":return Hp({...e,node:t});case"integration-application-submit":return Up({...e,node:t});case"add-submission":return zp({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return Vp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Vp({next:e,node:t,analytics:r,submissions:n,logger:i}){var a;if(!n)return e(t.nextId);const o=(a=n[t.data.key])==null?void 0:a.value;if(typeof o!="string"&&typeof o!="number")return i.warn(`Failed to identify user, key “${t.data.key}” is not a string or number`),e(t.nextId);r.log({event:"IDENTIFY",properties:{identifier:o.toString()}}),e(t.nextId)}async function Bp({next:e,node:t}){e(t.data.targetId)}async function zp({next:e,node:t,logger:r,submissions:n,context:i}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Re(t.data.value,{submissions:n,context:i})},e(t.nextId)}async function Up({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:o,analytics:a,flow:s}){const l=async d=>{d!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:f,session_id:c}=a.getSessionInfo(),p=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:f,session_id:c,job:s.job,submissions:sp(o||{})})}).catch(g=>g);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:p}),We(p).with({integration_response:N.select(N.union({service:N.optional(N.string),status:N.number,data:N.any},{service:N.optional(N.string),status:N.number,error:{message:N.string,data:N.any}}))},g=>{a.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:g.service??"INVALID_SERVICE",response:{status:g.status,payload:"data"in g?g.data:g.error.data??null},job:s.job}})}).otherwise(()=>{}),await We(p).with(N.union({ats_data:N.select("redirect",{redirect_url:N.string,message:N.optional(N.union(N.string,N.nullish)),button_text:N.optional(N.union(N.string,N.nullish))})},{integration_response:{data:N.select("redirect",{redirect_url:N.string,message:N.optional(N.union(N.string,N.nullish)),button_text:N.optional(N.union(N.string,N.nullish))})}}),async g=>{if(g.redirect===void 0)return;await e.sendMessage({type:"text",author:"bot",text:g.redirect.message??"Almost there! Please complete your submission here:"});const m=new URL(g.redirect.redirect_url);f&&!m.searchParams.has("anonymous_id")&&m.searchParams.set("anonymous_id",f),await e.sendMessage({type:"link",href:m.toString(),text:g.redirect.button_text??"Complete submission",onClick:()=>{if(!c){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}a.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:c,flow_version:s.version,href:m.toString(),job:s.job}})}}),t(r.nextId)}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with(N.union({success:!1,ats_data:N.select("error",{message:N.string})},{integration_response:{error:N.select("error",{message:N.string})}}),async g=>{var m;n.error(g.error),await e.sendMessage({type:"system",variant:"error",text:((m=g.error)==null?void 0:m.message)||"Failed to submit"}),await l(!1)}).otherwise(async g=>{n.error(g),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await l(!1)})};await l(r.data.skipConfirmation)}async function Hp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({type:"link",href:Re(r.data.href,{submissions:n,context:i}),text:Re(r.data.cta,{submissions:n,context:i})}),t(r.nextId)}async function qp({submissions:e,next:t,node:r,context:n}){t(Gt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Kp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function Wp({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Gp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.question,{submissions:n,context:i})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,maxChars:r.data.maxChars,minChars:r.data.minChars}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value}),t(r.nextId)}async function Yp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Xp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(a=>o.value.includes(a.value)).map(a=>a.label).join(", ")}),t(r.nextId)}async function Zp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Jp({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const i=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:i})}return t(r.nextId)}async function Qp({node:e,chat:t,next:r,submissions:n,context:i}){await t.sendMessage({author:"bot",type:"text",text:Re(e.data.question,{submissions:n,context:i})});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const a of o.value)await t.sendMessage({author:"user",type:"file",fileName:a.name,fileSizeKb:a.sizeKb});r(e.nextId)}async function ev({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const Qa=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const i=Pt(n,t.join("."));switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r==null?void 0:r[e]};function Jn(e,t,r){var n,i,o,a,s;t==null&&(t=100);function l(){var f=Date.now()-a;f<t&&f>=0?n=setTimeout(l,t-f):(n=null,r||(s=e.apply(o,i),o=i=null))}var d=function(){o=this,i=arguments,a=Date.now();var f=r&&!n;return n||(n=setTimeout(l,t)),f&&(s=e.apply(o,i),o=i=null),s};return d.clear=function(){n&&(clearTimeout(n),n=null)},d.flush=function(){n&&(s=e.apply(o,i),o=i=null,clearTimeout(n),n=null)},d}Jn.debounce=Jn;var tv=Jn;const es=Pe(tv);function rv(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const o=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=W({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=L({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),d=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,c=L(!1);V(()=>(c.current=!0,()=>void(c.current=!1)));const[p,g,m]=he(()=>{const _=()=>{if(!l.current.element)return;const{left:I,top:T,width:O,height:H,bottom:K,right:M,x:F,y:se}=l.current.element.getBoundingClientRect(),re={left:I,top:T,width:O,height:H,bottom:K,right:M,x:F,y:se};l.current.element instanceof HTMLElement&&i&&(re.height=l.current.element.offsetHeight,re.width=l.current.element.offsetWidth),Object.freeze(re),c.current&&!av(l.current.lastBounds,re)&&s(l.current.lastBounds=re)};return[_,f?es(_,f):_,d?es(_,d):_]},[s,i,d,f]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",m,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function w(){l.current.element&&(l.current.resizeObserver=new o(m),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",m,{capture:!0,passive:!0})))}const x=_=>{!_||_===l.current.element||(v(),l.current.element=_,l.current.scrollContainers=ts(_),w())};return ov(m,!!r),nv(g),V(()=>{v(),w()},[r,m,g]),V(()=>v,[]),[x,a,p]}function nv(e){V(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function ov(e,t){V(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function ts(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...ts(e.parentElement)]}const iv=["x","y","top","bottom","left","right","width","height"],av=(e,t)=>iv.every(r=>e[r]===t[r]),lt=({class:e,...t})=>u("button",{class:ot("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[u("title",{children:"Send"}),u("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),u("path",{d:"M8 4V13"})]})}),sv=25,Qn=Ge({instant:()=>{},smooth:()=>{}}),X={onSubmitSuccessFn$:Ge(()=>{}),isBotTyping$:Ge(!1),scrollToEnd:{instant:()=>Qn.value.instant(),smooth:()=>Qn.value.smooth()}},lv=()=>{const e=L(null);fe(()=>{Qn.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=he(()=>({addToSubmissions:(n,i)=>P.setSubmission(n,i),send:async({message:n,signal:i,groupId:o})=>{if(await We(n).with({author:"bot",type:"text"},async a=>{if(i!=null&&i.aborted)throw new qt;X.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*sv;await new Promise(l=>setTimeout(l,s,{signal:i})),X.isBotTyping$.value=!1}).otherwise(async()=>{}),i!=null&&i.aborted)throw new qt;P.addMessage(n,o)},input:({input:n,signal:i})=>{if(i!=null&&i.aborted)throw new qt;return P.setInput(n),new Promise(o=>{const a=s=>{if(i!=null&&i.aborted)throw new qt;P.setInput(void 0),n.key&&P.setSubmission(n.key,s),o(s)};X.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},ct=({class:e,...t})=>u("button",{type:"button",class:ot("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[u("title",{children:"Skip"}),u("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),u("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),eo={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"},rs={line1:["street_number","floor","room","premise"],line2:["subpremise","street_address","route"],line3:["sublocality","neighborhood"],city:["locality","postal_town"],state:["administrative_area_level_1"],postcode:["postal_code"],country:["country"]},Mr=Object.keys(rs),cv=e=>Mr.reduce((t,r)=>{const n=rs[r],i=e.filter(o=>o.types.some(a=>n.includes(a))).map(o=>o.long_name).join(", ");return i&&(t[r]=i),t},{}),uv=document.createElement("div"),dv=()=>he(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(uv);return{enabled:!0,getPredictions:async n=>{const{predictions:i}=await t.getPlacePredictions({input:n,language:"en"});return i.map(o=>({label:o.description,value:o.place_id}))},getPlaceDetails:async n=>await new Promise((o,a)=>r.getDetails({placeId:n,fields:["address_components"],language:"en"},(s,l)=>l!==e.maps.places.PlacesServiceStatus.OK?a(l):s===null?a("ZERO_RESULTS"):o({ok:!0,place:s}))).catch(async o=>(console.error("Failed to get address details",o),{ok:!1}))}},[]),to=e=>u("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M10 3L5 8L10 13"})}),u("span",{children:"Back"})]}),ro={label:"Fill in manually",value:""},fv=({input:e,onSubmitSuccess:t})=>{const[r,n]=W(""),[i,o]=W(),[a,s]=W([]),[l,d]=W(),{enabled:f,getPredictions:c,getPlaceDetails:p}=dv(),[g,m]=W(f?"query":"manual"),v=w=>{$e(f,"Query state should not be enabled if Google Places isn't available"),n(w),w===""&&s([]),c(w).then(x=>{s(x)})};switch(V(()=>{if(f&&!(l===void 0||l===""))return p(l).then(w=>{if(!w.ok||!w.place.address_components){o({});return}const x=cv(w.place.address_components);o(x),m("details")}),()=>{o(void 0)}},[l,p,f]),g){case"query":return $e(f,"Query state should not be enabled if Google Places isn't available"),u(hv,{input:e,onSkip:()=>t(null),onAddressSelect:w=>{d(w),m("loading")},onAddressSearch:w=>{v(w)},suggestions:a,query:r});case"loading":return u(no,{input:e,onSubmitSuccess:t,addressFields:{},actions:u(to,{onClick:()=>{d(void 0),m("query")}})});case"details":return $e(i!==void 0),u(no,{input:e,onSubmitSuccess:t,addressFields:i,actions:u(to,{onClick:()=>{d(void 0),m("query")}})});case"manual":return u(no,{input:e,onSubmitSuccess:t,addressFields:{},actions:f?u(to,{onClick:()=>{d(void 0),m("query")}}):void 0})}},hv=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:i,onAddressSearch:o})=>{const a=L(null);return fe(()=>{a.current&&(a.current.focus(),a.current.select())},[]),u(Y,{children:[u("form",{noValidate:!0,onSubmit:s=>{s.preventDefault();const d=new FormData(s.currentTarget).get("address");typeof d=="string"&&o(d)},class:"flex gap-1 p-2.5",children:[u("div",{class:"group relative flex-1",children:[u("input",{ref:a,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder||"Type and search for places...",defaultValue:i}),u("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[u("circle",{cx:"7",cy:"7",r:"4"}),u("path",{d:"M10 10L13 13"})]}),u("span",{class:"sr-only",children:"Search"})]})})]}),e.config.optional&&u(ct,{class:"",onClick:t})]}),u("ul",{children:[r.map(s=>u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(s.value)},children:[u("span",{class:"flex-grow",children:s.label}),u("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(ro.value)},children:u("span",{class:"flex-grow",children:ro.label})})},ro.label)]})]})},pv={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},no=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const i=L(null);fe(()=>{if(i.current){const a=i.current.querySelector("input");a&&(a.focus(),a.select())}},[]);const o=Object.keys(eo);return u("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:a=>{const s=new FormData(a.currentTarget),l=Object.fromEntries(s.entries());t({type:"address",value:l})},children:[u("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:i,children:Mr.map((a,s)=>{const l=`isdk_${a}`,d=n.config.keys[a];return d?u(Y,{children:[u("label",{for:l,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:pv[a]}),u("div",{class:"flex flex-col items-stretch gap-1.5",children:[a==="country"?u("div",{class:"relative",children:[u("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:d,id:l,defaultValue:e[a],required:!0,children:[e.country&&!o.includes(e.country)?u("option",{value:e[a],children:e[a]}):u("option",{value:"",children:"Select a country"}),o.map(f=>u("option",{value:f,children:f},f))]}),u("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):u("input",{autoFocus:s===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:d,id:l,defaultValue:e[a],required:!0}),s!==Mr.length-1&&u("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),s===Mr.length-1&&u("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),u("div",{class:"flex w-full flex-1 ",children:[u("div",{class:"flex-grow",children:r}),u(lt,{class:"flex items-center justify-center"})]})]})},oo=()=>{const e=L(null);return V(()=>{var t;(t=e.current)==null||t.focus()},[]),e},ns=["true","false"],vv=Dd(ns),mv="answer",os="flex items-center gap-2 p-2.5",is=ne(({label:e,...t},r)=>u("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:u("p",{class:"truncate text-center text-base",children:e})})),gv=({input:e,onSubmitSuccess:t})=>{const r=oo();return u("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=up(n).value,o=sr(vv,i);t({type:"boolean",value:o==="true"})},children:[u("ul",{class:os,children:ns.map((n,i)=>u("li",{class:"flex-1",children:u(is,{ref:i===0?r:null,type:"submit",name:mv,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&u("div",{class:"px-2 pb-2",children:u(ct,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Yt=({error:e})=>!e||!e.message?null:u("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[u("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),u("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),u("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),u("p",{class:"truncate pr-1 text-sm",children:e.message})]}),bv=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),yv=e=>e.reduce((t,r)=>t+r.sizeKb,0),wv=Ht("file"),as=3,_v=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return u("div",{class:ot("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[u("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[u("span",{class:"block truncate",children:i}),u("span",{children:[".",n]})]}),u("p",{"aria-label":"File size",class:"text-accent-11",children:Ut(e.sizeKb)})]})},ss=({class:e,...t})=>u("li",{class:ot("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),ls=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},xv=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(ls(n.name).toLowerCase()))},kv=(e,t)=>{const r=ls(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},$v=({input:e,onSubmitSuccess:t})=>{var f;const r=(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key],[n,i]=W(wv(r)?r.value:[]),[o,a]=W(),s=n.length-as,l=yv(n),d=oo();return u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:c=>(c.preventDefault(),a(void 0),n.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!xv({allowedExtensions:e.config.extensions,files:n})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${Ut(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?a({type:"invalid",message:"Only one file is allowed"}):t({type:"file",value:n})),children:[u("div",{class:"flex items-center gap-2",children:[u("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?u(Y,{children:[u("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,as).map(c=>{const p=c.name.split(".").pop(),g=c.name.replace(new RegExp(`.${p}$`),"");return u(ss,{class:"flex overflow-hidden",children:[u("span",{class:"block truncate",children:g}),u("span",{children:[".",p]})]})}),s>0?u(ss,{children:["+",s," file",s!==1?"s":""]}):null]}),u("p",{class:"text-neutral-11 text-xs",children:[Ut(l)," ",n.length>1?"total":""]})]}):u("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[u("header",{class:"flex flex-col items-center gap-0",children:[u("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:u("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),u("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?u("p",{class:"text-neutral-10 text-xs",children:["(max ",Ut(e.config.fileSizeLimitKib),")"]}):null]}),u("aside",{class:"flex flex-col items-center gap-2",children:[u("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),u("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>u("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:c.replace(".","")}))})]})]}),u("input",{id:"dropzone-file",onInput:async c=>{$e(c.target instanceof HTMLInputElement);const p=c.target.files?Array.from(c.target.files):[],g=await Promise.allSettled(p.map(async v=>{const w=await bv(v);return{name:kv(v.name,42),data:w,sizeKb:v.size/1e3}}));if(g.some(({status:v})=>v==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=g.map(v=>v.status==="fulfilled"?v.value:null).filter(Boolean);i(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),u("div",{class:"flex h-full flex-col items-center gap-2",children:[u(lt,{disabled:n.length===0}),e.config.optional&&u(ct,{onClick:()=>t(null)})]})]}),u(Yt,{error:o})]})};var Xt=e=>e.type==="checkbox",It=e=>e instanceof Date,ue=e=>e==null;const cs=e=>typeof e=="object";var te=e=>!ue(e)&&!Array.isArray(e)&&cs(e)&&!It(e),Sv=e=>te(e)&&e.target?Xt(e.target)?e.target.checked:e.target.value:e,Cv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ev=(e,t)=>e.has(Cv(t)),Iv=e=>{const t=e.constructor&&e.constructor.prototype;return te(t)&&t.hasOwnProperty("isPrototypeOf")},io=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(io&&(e instanceof Blob||e instanceof FileList))&&(r||te(e)))if(t=r?[]:{},!r&&!Iv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=je(e[n]));else return e;return t}var Zt=e=>Array.isArray(e)?e.filter(Boolean):[],J=e=>e===void 0,C=(e,t,r)=>{if(!t||!te(e))return r;const n=Zt(t.split(/[,[\].]+?/)).reduce((i,o)=>ue(i)?i:i[o],e);return J(n)||n===e?J(e[t])?r:e[t]:n},Ze=e=>typeof e=="boolean";const us={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Se={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ve={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ke.createContext(null);var Ov=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Se.all&&(t._proxyFormState[a]=!n||Se.all),r&&(r[a]=!0),e[a]}});return i},we=e=>te(e)&&!Object.keys(e).length,Tv=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return we(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||Se.all))},ao=e=>Array.isArray(e)?e:[e];function Av(e){const t=ke.useRef(e);t.current=e,ke.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Te=e=>typeof e=="string",Pv=(e,t,r,n,i)=>Te(e)?(n&&t.watch.add(e),C(r,e,i)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),C(r,o))):(n&&(t.watchAll=!0),r),so=e=>/^\w*$/.test(e),ds=e=>Zt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function U(e,t,r){let n=-1;const i=so(t)?[t]:ds(t),o=i.length,a=o-1;for(;++n<o;){const s=i[n];let l=r;if(n!==a){const d=e[s];l=te(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var fs=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},hs=e=>({isOnSubmit:!e||e===Se.onSubmit,isOnBlur:e===Se.onBlur,isOnChange:e===Se.onChange,isOnAll:e===Se.all,isOnTouch:e===Se.onTouched}),ps=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Fr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const o=C(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else te(s)&&Fr(s,t)}}};var Nv=(e,t,r)=>{const n=Zt(C(e,r));return U(n,"root",t[r]),U(e,r,n),e},lo=e=>e.type==="file",Je=e=>typeof e=="function",Lr=e=>{if(!io)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Rr=e=>Te(e),co=e=>e.type==="radio",jr=e=>e instanceof RegExp;const vs={value:!1,isValid:!1},ms={value:!0,isValid:!0};var gs=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!J(e[0].attributes.value)?J(e[0].value)||e[0].value===""?ms:{value:e[0].value,isValid:!0}:ms:vs}return vs};const bs={isValid:!1,value:null};var ys=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,bs):bs;function ws(e,t,r="validate"){if(Rr(e)||Array.isArray(e)&&e.every(Rr)||Ze(e)&&!e)return{type:r,message:Rr(e)?e:"",ref:t}}var Ot=e=>te(e)&&!jr(e)?e:{value:e,message:""},_s=async(e,t,r,n,i)=>{const{ref:o,refs:a,required:s,maxLength:l,minLength:d,min:f,max:c,pattern:p,validate:g,name:m,valueAsNumber:v,mount:w,disabled:x}=e._f,_=C(t,m);if(!w||x)return{};const I=a?a[0]:o,T=B=>{n&&I.reportValidity&&(I.setCustomValidity(Ze(B)?"":B||""),I.reportValidity())},O={},H=co(o),K=Xt(o),M=H||K,F=(v||lo(o))&&J(o.value)&&J(_)||Lr(o)&&o.value===""||_===""||Array.isArray(_)&&!_.length,se=fs.bind(null,m,r,O),re=(B,R,Q,ve=Ve.maxLength,_e=Ve.minLength)=>{const Ae=B?R:Q;O[m]={type:B?ve:_e,message:Ae,ref:o,...se(B?ve:_e,Ae)}};if(i?!Array.isArray(_)||!_.length:s&&(!M&&(F||ue(_))||Ze(_)&&!_||K&&!gs(a).isValid||H&&!ys(a).isValid)){const{value:B,message:R}=Rr(s)?{value:!!s,message:s}:Ot(s);if(B&&(O[m]={type:Ve.required,message:R,ref:I,...se(Ve.required,R)},!r))return T(R),O}if(!F&&(!ue(f)||!ue(c))){let B,R;const Q=Ot(c),ve=Ot(f);if(!ue(_)&&!isNaN(_)){const _e=o.valueAsNumber||_&&+_;ue(Q.value)||(B=_e>Q.value),ue(ve.value)||(R=_e<ve.value)}else{const _e=o.valueAsDate||new Date(_),Ae=Kr=>new Date(new Date().toDateString()+" "+Kr),dt=o.type=="time",Qt=o.type=="week";Te(Q.value)&&_&&(B=dt?Ae(_)>Ae(Q.value):Qt?_>Q.value:_e>new Date(Q.value)),Te(ve.value)&&_&&(R=dt?Ae(_)<Ae(ve.value):Qt?_<ve.value:_e<new Date(ve.value))}if((B||R)&&(re(!!B,Q.message,ve.message,Ve.max,Ve.min),!r))return T(O[m].message),O}if((l||d)&&!F&&(Te(_)||i&&Array.isArray(_))){const B=Ot(l),R=Ot(d),Q=!ue(B.value)&&_.length>+B.value,ve=!ue(R.value)&&_.length<+R.value;if((Q||ve)&&(re(Q,B.message,R.message),!r))return T(O[m].message),O}if(p&&!F&&Te(_)){const{value:B,message:R}=Ot(p);if(jr(B)&&!_.match(B)&&(O[m]={type:Ve.pattern,message:R,ref:o,...se(Ve.pattern,R)},!r))return T(R),O}if(g){if(Je(g)){const B=await g(_,t),R=ws(B,I);if(R&&(O[m]={...R,...se(Ve.validate,R.message)},!r))return T(R.message),O}else if(te(g)){let B={};for(const R in g){if(!we(B)&&!r)break;const Q=ws(await g[R](_,t),I,R);Q&&(B={...Q,...se(R,Q.message)},T(Q.message),r&&(O[m]=B))}if(!we(B)&&(O[m]={ref:I,...B},!r))return O}}return T(!0),O};function Dv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=J(e)?n++:e[t[n++]];return e}function Mv(e){for(const t in e)if(e.hasOwnProperty(t)&&!J(e[t]))return!1;return!0}function ae(e,t){const r=Array.isArray(t)?t:so(t)?[t]:ds(t),n=r.length===1?e:Dv(e,r),i=r.length-1,o=r[i];return n&&delete n[o],i!==0&&(te(n)&&we(n)||Array.isArray(n)&&Mv(n))&&ae(e,r.slice(0,-1)),e}function uo(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Vr=e=>ue(e)||!cs(e);function ut(e,t){if(Vr(e)||Vr(t))return e===t;if(It(e)&&It(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const o=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const a=t[i];if(It(o)&&It(a)||te(o)&&te(a)||Array.isArray(o)&&Array.isArray(a)?!ut(o,a):o!==a)return!1}}return!0}var xs=e=>e.type==="select-multiple",Fv=e=>co(e)||Xt(e),fo=e=>Lr(e)&&e.isConnected,ks=e=>{for(const t in e)if(Je(e[t]))return!0;return!1};function Br(e,t={}){const r=Array.isArray(e);if(te(e)||r)for(const n in e)Array.isArray(e[n])||te(e[n])&&!ks(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Br(e[n],t[n])):ue(e[n])||(t[n]=!0);return t}function $s(e,t,r){const n=Array.isArray(e);if(te(e)||n)for(const i in e)Array.isArray(e[i])||te(e[i])&&!ks(e[i])?J(t)||Vr(r[i])?r[i]=Array.isArray(e[i])?Br(e[i],[]):{...Br(e[i])}:$s(e[i],ue(t)?{}:t[i],r[i]):r[i]=!ut(e[i],t[i]);return r}var ho=(e,t)=>$s(e,t,Br(t)),Ss=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>J(e)?e:t?e===""?NaN:e&&+e:r&&Te(e)?new Date(e):n?n(e):e;function po(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return lo(t)?t.files:co(t)?ys(e.refs).value:xs(t)?[...t.selectedOptions].map(({value:r})=>r):Xt(t)?gs(e.refs).value:Ss(J(t.value)?e.ref.value:t.value,e)}var Lv=(e,t,r,n)=>{const i={};for(const o of e){const a=C(t,o);a&&U(i,o,a._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Jt=e=>J(e)?e:jr(e)?e.source:te(e)?jr(e.value)?e.value.source:e.value:e,Rv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Cs(e,t,r){const n=C(e,r);if(n||so(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const o=i.join("."),a=C(t,o),s=C(e,o);if(a&&!Array.isArray(a)&&r!==o)return{name:r};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:r}}var jv=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Vv=(e,t)=>!Zt(C(e,t)).length&&ae(e,t);const Bv={mode:Se.onSubmit,reValidateMode:Se.onChange,shouldFocusError:!0};function zv(e={},t){let r={...Bv,...e},n={submitCount:0,isDirty:!1,isLoading:Je(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=te(r.defaultValues)||te(r.values)?je(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:je(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:uo(),array:uo(),state:uo()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,m=hs(r.mode),v=hs(r.reValidateMode),w=r.criteriaMode===Se.all,x=h=>b=>{clearTimeout(f),f=setTimeout(h,b)},_=async h=>{if(c.isValid||h){const b=r.resolver?we((await F()).errors):await re(i,!0);b!==n.isValid&&p.state.next({isValid:b})}},I=h=>c.isValidating&&p.state.next({isValidating:h}),T=(h,b=[],y,E,$=!0,k=!0)=>{if(E&&y){if(s.action=!0,k&&Array.isArray(C(i,h))){const A=y(C(i,h),E.argA,E.argB);$&&U(i,h,A)}if(k&&Array.isArray(C(n.errors,h))){const A=y(C(n.errors,h),E.argA,E.argB);$&&U(n.errors,h,A),Vv(n.errors,h)}if(c.touchedFields&&k&&Array.isArray(C(n.touchedFields,h))){const A=y(C(n.touchedFields,h),E.argA,E.argB);$&&U(n.touchedFields,h,A)}c.dirtyFields&&(n.dirtyFields=ho(o,a)),p.state.next({name:h,isDirty:R(h,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else U(a,h,b)},O=(h,b)=>{U(n.errors,h,b),p.state.next({errors:n.errors})},H=(h,b,y,E)=>{const $=C(i,h);if($){const k=C(a,h,J(y)?C(o,h):y);J(k)||E&&E.defaultChecked||b?U(a,h,b?k:po($._f)):_e(h,k),s.mount&&_()}},K=(h,b,y,E,$)=>{let k=!1,A=!1;const q={name:h};if(!y||E){c.isDirty&&(A=n.isDirty,n.isDirty=q.isDirty=R(),k=A!==q.isDirty);const ee=ut(C(o,h),b);A=C(n.dirtyFields,h),ee?ae(n.dirtyFields,h):U(n.dirtyFields,h,!0),q.dirtyFields=n.dirtyFields,k=k||c.dirtyFields&&A!==!ee}if(y){const ee=C(n.touchedFields,h);ee||(U(n.touchedFields,h,y),q.touchedFields=n.touchedFields,k=k||c.touchedFields&&ee!==y)}return k&&$&&p.state.next(q),k?q:{}},M=(h,b,y,E)=>{const $=C(n.errors,h),k=c.isValid&&Ze(b)&&n.isValid!==b;if(e.delayError&&y?(d=x(()=>O(h,y)),d(e.delayError)):(clearTimeout(f),d=null,y?U(n.errors,h,y):ae(n.errors,h)),(y?!ut($,y):$)||!we(E)||k){const A={...E,...k&&Ze(b)?{isValid:b}:{},errors:n.errors,name:h};n={...n,...A},p.state.next(A)}I(!1)},F=async h=>r.resolver(a,r.context,Lv(h||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),se=async h=>{const{errors:b}=await F(h);if(h)for(const y of h){const E=C(b,y);E?U(n.errors,y,E):ae(n.errors,y)}else n.errors=b;return b},re=async(h,b,y={valid:!0})=>{for(const E in h){const $=h[E];if($){const{_f:k,...A}=$;if(k){const q=l.array.has(k.name),ee=await _s($,a,w,r.shouldUseNativeValidation&&!b,q);if(ee[k.name]&&(y.valid=!1,b))break;!b&&(C(ee,k.name)?q?Nv(n.errors,ee,k.name):U(n.errors,k.name,ee[k.name]):ae(n.errors,k.name))}A&&await re(A,b,y)}}return y.valid},B=()=>{for(const h of l.unMount){const b=C(i,h);b&&(b._f.refs?b._f.refs.every(y=>!fo(y)):!fo(b._f.ref))&&bo(h)}l.unMount=new Set},R=(h,b)=>(h&&b&&U(a,h,b),!ut(Fs(),o)),Q=(h,b,y)=>Pv(h,l,{...s.mount?a:J(b)?o:Te(h)?{[h]:b}:b},y,b),ve=h=>Zt(C(s.mount?a:o,h,e.shouldUnregister?C(o,h,[]):[])),_e=(h,b,y={})=>{const E=C(i,h);let $=b;if(E){const k=E._f;k&&(!k.disabled&&U(a,h,Ss(b,k)),$=Lr(k.ref)&&ue(b)?"":b,xs(k.ref)?[...k.ref.options].forEach(A=>A.selected=$.includes(A.value)):k.refs?Xt(k.ref)?k.refs.length>1?k.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(q=>q===A.value):$===A.value)):k.refs[0]&&(k.refs[0].checked=!!$):k.refs.forEach(A=>A.checked=A.value===$):lo(k.ref)?k.ref.value="":(k.ref.value=$,k.ref.type||p.values.next({name:h,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&K(h,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&go(h)},Ae=(h,b,y)=>{for(const E in b){const $=b[E],k=`${h}.${E}`,A=C(i,k);(l.array.has(h)||!Vr($)||A&&!A._f)&&!It($)?Ae(k,$,y):_e(k,$,y)}},dt=(h,b,y={})=>{const E=C(i,h),$=l.array.has(h),k=je(b);U(a,h,k),$?(p.array.next({name:h,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&p.state.next({name:h,dirtyFields:ho(o,a),isDirty:R(h,k)})):E&&!E._f&&!ue(k)?Ae(h,k,y):_e(h,k,y),ps(h,l)&&p.state.next({...n}),p.values.next({name:h,values:{...a}}),!s.mount&&t()},Qt=async h=>{const b=h.target;let y=b.name,E=!0;const $=C(i,y),k=()=>b.type?po($._f):Sv(h),A=q=>{E=Number.isNaN(q)||q===C(a,y,q)};if($){let q,ee;const Wr=k(),Tt=h.type===us.BLUR||h.type===us.FOCUS_OUT,jm=!Rv($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||jv(Tt,C(n.touchedFields,y),n.isSubmitted,v,m),wo=ps(y,l,Tt);U(a,y,Wr),Tt?($._f.onBlur&&$._f.onBlur(h),d&&d(0)):$._f.onChange&&$._f.onChange(h);const _o=K(y,Wr,Tt,!1),Vm=!we(_o)||wo;if(!Tt&&p.values.next({name:y,type:h.type,values:{...a}}),jm)return c.isValid&&_(),Vm&&p.state.next({name:y,...wo?{}:_o});if(!Tt&&wo&&p.state.next({...n}),I(!0),r.resolver){const{errors:Hs}=await F([y]);if(A(Wr),E){const Bm=Cs(n.errors,i,y),qs=Cs(Hs,i,Bm.name||y);q=qs.error,y=qs.name,ee=we(Hs)}}else q=(await _s($,a,w,r.shouldUseNativeValidation))[y],A(Wr),E&&(q?ee=!1:c.isValid&&(ee=await re(i,!0)));E&&($._f.deps&&go($._f.deps),M(y,ee,q,_o))}},Kr=(h,b)=>{if(C(n.errors,b)&&h.focus)return h.focus(),1},go=async(h,b={})=>{let y,E;const $=ao(h);if(I(!0),r.resolver){const k=await se(J(h)?h:$);y=we(k),E=h?!$.some(A=>C(k,A)):y}else h?(E=(await Promise.all($.map(async k=>{const A=C(i,k);return await re(A&&A._f?{[k]:A}:A)}))).every(Boolean),!(!E&&!n.isValid)&&_()):E=y=await re(i);return p.state.next({...!Te(h)||c.isValid&&y!==n.isValid?{}:{name:h},...r.resolver||!h?{isValid:y}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!E&&Fr(i,Kr,h?$:l.mount),E},Fs=h=>{const b={...o,...s.mount?a:{}};return J(h)?b:Te(h)?C(b,h):h.map(y=>C(b,y))},Ls=(h,b)=>({invalid:!!C((b||n).errors,h),isDirty:!!C((b||n).dirtyFields,h),isTouched:!!C((b||n).touchedFields,h),error:C((b||n).errors,h)}),Mm=h=>{h&&ao(h).forEach(b=>ae(n.errors,b)),p.state.next({errors:h?n.errors:{}})},Rs=(h,b,y)=>{const E=(C(i,h,{_f:{}})._f||{}).ref;U(n.errors,h,{...b,ref:E}),p.state.next({name:h,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},Fm=(h,b)=>Je(h)?p.values.subscribe({next:y=>h(Q(void 0,b),y)}):Q(h,b,!0),bo=(h,b={})=>{for(const y of h?ao(h):l.mount)l.mount.delete(y),l.array.delete(y),b.keepValue||(ae(i,y),ae(a,y)),!b.keepError&&ae(n.errors,y),!b.keepDirty&&ae(n.dirtyFields,y),!b.keepTouched&&ae(n.touchedFields,y),!r.shouldUnregister&&!b.keepDefaultValue&&ae(o,y);p.values.next({values:{...a}}),p.state.next({...n,...b.keepDirty?{isDirty:R()}:{}}),!b.keepIsValid&&_()},js=({disabled:h,name:b,field:y,fields:E,value:$})=>{if(Ze(h)){const k=h?void 0:J($)?po(y?y._f:C(E,b)._f):$;U(a,b,k),K(b,k,!1,!1,!0)}},yo=(h,b={})=>{let y=C(i,h);const E=Ze(b.disabled);return U(i,h,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:h}},name:h,mount:!0,...b}}),l.mount.add(h),y?js({field:y,disabled:b.disabled,name:h}):H(h,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Jt(b.min),max:Jt(b.max),minLength:Jt(b.minLength),maxLength:Jt(b.maxLength),pattern:Jt(b.pattern)}:{},name:h,onChange:Qt,onBlur:Qt,ref:$=>{if($){yo(h,b),y=C(i,h);const k=J($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=Fv(k),q=y._f.refs||[];if(A?q.find(ee=>ee===k):k===y._f.ref)return;U(i,h,{_f:{...y._f,...A?{refs:[...q.filter(fo),k,...Array.isArray(C(o,h))?[{}]:[]],ref:{type:k.type,name:h}}:{ref:k}}}),H(h,!1,void 0,k)}else y=C(i,h,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(Ev(l.array,h)&&s.action)&&l.unMount.add(h)}}},Vs=()=>r.shouldFocusError&&Fr(i,Kr,l.mount),Lm=h=>{Ze(h)&&(p.state.next({disabled:h}),Fr(i,b=>{b.disabled=h},0,!1))},Bs=(h,b)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=je(a);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:k}=await F();n.errors=$,E=k}else await re(i);ae(n.errors,"root"),we(n.errors)?(p.state.next({errors:{}}),await h(E,y)):(b&&await b({...n.errors},y),Vs(),setTimeout(Vs)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:we(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Rm=(h,b={})=>{C(i,h)&&(J(b.defaultValue)?dt(h,C(o,h)):(dt(h,b.defaultValue),U(o,h,b.defaultValue)),b.keepTouched||ae(n.touchedFields,h),b.keepDirty||(ae(n.dirtyFields,h),n.isDirty=b.defaultValue?R(h,C(o,h)):R()),b.keepError||(ae(n.errors,h),c.isValid&&_()),p.state.next({...n}))},zs=(h,b={})=>{const y=h?je(h):o,E=je(y),$=h&&!we(h)?E:o;if(b.keepDefaultValues||(o=y),!b.keepValues){if(b.keepDirtyValues||g)for(const k of l.mount)C(n.dirtyFields,k)?U($,k,C(a,k)):dt(k,C($,k));else{if(io&&J(h))for(const k of l.mount){const A=C(i,k);if(A&&A._f){const q=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Lr(q)){const ee=q.closest("form");if(ee){ee.reset();break}}}}i={}}a=e.shouldUnregister?b.keepDefaultValues?je(o):{}:je($),p.array.next({values:{...$}}),p.values.next({values:{...$}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!c.isValid||!!b.keepIsValid,s.watch=!!e.shouldUnregister,p.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!ut(h,o)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&h?ho(o,h):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Us=(h,b)=>zs(Je(h)?h(a):h,b);return{control:{register:yo,unregister:bo,getFieldState:Ls,handleSubmit:Bs,setError:Rs,_executeSchema:F,_getWatch:Q,_getDirty:R,_updateValid:_,_removeUnmounted:B,_updateFieldArray:T,_updateDisabledField:js,_getFieldArray:ve,_reset:zs,_resetDefaultValues:()=>Je(r.defaultValues)&&r.defaultValues().then(h=>{Us(h,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:h=>{n={...n,...h}},_disableForm:Lm,_subjects:p,_proxyFormState:c,get _fields(){return i},get _formValues(){return a},get _state(){return s},set _state(h){s=h},get _defaultValues(){return o},get _names(){return l},set _names(h){l=h},get _formState(){return n},set _formState(h){n=h},get _options(){return r},set _options(h){r={...r,...h}}},trigger:go,register:yo,handleSubmit:Bs,watch:Fm,setValue:dt,getValues:Fs,reset:Us,resetField:Rm,clearErrors:Mm,unregister:bo,setError:Rs,setFocus:(h,b={})=>{const y=C(i,h),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),b.shouldSelect&&$.select())}},getFieldState:Ls}}function zr(e={}){const t=ke.useRef(),r=ke.useRef(),[n,i]=ke.useState({isDirty:!1,isValidating:!1,isLoading:Je(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Je(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...zv(e,()=>i(a=>({...a}))),formState:n});const o=t.current.control;return o._options=e,Av({subject:o._subjects.state,next:a=>{Tv(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),ke.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),ke.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==n.isDirty&&o._subjects.state.next({isDirty:a})}},[o,n.isDirty]),ke.useEffect(()=>{e.values&&!ut(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values):o._resetDefaultValues()},[e.values,o]),ke.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Ov(n,o),t.current}var Es=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Uv=function(e,t){var r=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Es(o.ref,i,e):o.refs&&o.refs.forEach(function(a){return Es(a,i,e)})};for(var n in t.fields)r(n)},Hv=function(e,t){t.shouldUseNativeValidation&&Uv(e,t);var r={};for(var n in e){var i=C(t.fields,n),o=Object.assign(e[n]||{},{ref:i&&i.ref});if(Kv(t.names||Object.keys(e),n)){var a=Object.assign({},qv(C(r,n)));U(a,"root",o),U(r,n,a)}else U(r,n,o)}return r},qv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Kv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},Wv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var i=n.path.map(function(s){return s.key}).join(".");if(r[i]||(r[i]={message:n.message,type:n.validation}),t){var o=r[i].types,a=o&&o[n.validation];r[i]=fs(i,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},Ur=function(e,t,r){return r===void 0&&(r={}),function(n,i,o){try{return Promise.resolve(function(a,s){try{var l=function(){function d(c){return{values:r.raw?n:c,errors:{}}}var f=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?d(sr(e,n,f)):Promise.resolve(Rd(e,n,f)).then(d)}()}catch(d){return s(d)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof on)return{values:{},errors:Hv(Wv(a,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}};const Is=27,Os=12,Ts=10,Gv=Ht("enum"),Yv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Ur(Ce({checked:si(ai(oi()),r=>Object.entries(r).filter(([n,i])=>i).map(([n,i])=>n),[lr(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),cr(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Xv=ne(({option:e,...t},r)=>u(Y,{children:[u("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),u("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),As=$r("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:os}}}),Zv=({input:e,onSubmitSuccess:t})=>{var d,f;const r=e.key?(d=P.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,i=n&&e.config.options.length===2,{register:o,handleSubmit:a,formState:{errors:s}}=zr({defaultValues:{checked:n?{}:Gv(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:Yv(e.config)}),l=oo();return i?u("ul",{style:{maxHeight:6.5*Is+5*Os+2*Ts},class:As({variant:"booleanLike"}),children:e.config.options.map((c,p)=>u("li",{class:"flex-1",children:u(is,{type:"submit",ref:g=>{g&&p===0&&(l.current=g)},label:c.label,value:"true",onClick:()=>t({type:"enum",value:[c.value]})})},c.value))}):u("form",{noValidate:!0,onSubmit:c=>a(p=>{const g=p.checked;t({type:"enum",value:g})})(c),children:[u("div",{class:"flex items-center gap-1",children:[u("ul",{style:{maxHeight:6.5*Is+5*Os+2*Ts},class:As({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((c,p)=>{const g=`checked.${c.value}`,{ref:m,...v}=o(g);return u("li",{class:"relative",children:u(Xv,{option:c,autoFocus:p===0,ref:w=>{w&&p===0&&(l.current=w),m(w)},id:g,...v,onClick:n?()=>t({type:"enum",value:[c.value]}):void 0})},c.value)})}),u("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:u(lt,{}),e.config.minSelected===0&&u(ct,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),u("div",{class:"px-1",children:u(Yt,{error:(f=s.checked)==null?void 0:f.root})})]})},Jv=Ht("number"),Hr={number:()=>"Please enter a valid number",min:e=>`Please enter a number greater than or equal to ${e}`,max:e=>`Please enter a number less than or equal to ${e}`,decimalCases:e=>`Please enter a number with at most ${e} decimal cases`},Qv=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Ur(Ce({number:an(Hr.number(),[Ud(t,Hr.min(t)),zd(r,Hr.max(r)),Vd(i=>i===Number(i.toFixed(n)),Hr.decimalCases(n))])}))},em=({input:e,onSubmitSuccess:t})=>{var f;const r=e.config.defaultValue,n=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,{register:i,handleSubmit:o,formState:{errors:a}}=zr({defaultValues:{number:r?Number(r):Jv(n)?n.value:void 0},resolver:Qv(e.config)}),{ref:s,...l}=i("number",{required:!e.config.optional,valueAsNumber:!0}),d=L();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-grow",children:[u("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.current=c),s(c)},type:"text",min:e.config.min,max:e.config.max,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest [type=number:-webkit-inner-spin-button] w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all [-webkit-outer-spin-button:none]",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Yt,{error:a.number})]})},Ps=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(eo).find(i=>e.startsWith(i[1])),r=t?t[1]:"",n=e.replace(r,"");return/^\d+$/.test(n)?{countryCode:r,phoneNumber:n}:{countryCode:"",phoneNumber:""}},tm="44",vo="That doesn’t look like a valid phone number",Ns=e=>({min:`The phone number needs to be at least ${e.minChars} digits long.`,max:`The phone number can't be longer than ${e.maxChars} digits.`}),rm=Ht("string"),nm=xe(vo,[li(/^\+?[0-9 -]+$/,vo)]),om=xe("Please select a country code",[li(/^\+?[0-9 -]+$/,vo)]),im=()=>Ur(Ce({countryCode:om,phoneNumber:si(nm,e=>e.replace(/[^0-9]/g,""),[])})),am=({input:e,onSubmitSuccess:t})=>{var g;const r=e.key?(g=P.current$.value.flow)==null?void 0:g.data.submissions[e.key]:void 0,[n,i]=W(),{register:o,handleSubmit:a,formState:{errors:s},watch:l}=zr({defaultValues:e.config.defaultValue?Ps(e.config.defaultValue):rm(r)?Ps(r.value):{countryCode:tm,phoneNumber:""},resolver:im()}),{ref:d,...f}=o("phoneNumber",{required:!e.config.optional}),c=L(),p=l("countryCode");return fe(()=>{c.current&&(c.current.focus(),c.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:a(m=>{const v=m.phoneNumber.replace(/[^0-9]/g,""),w=m.countryCode.replace(/[^0-9]/g,"");if(i(void 0),v.length+w.length>(e.config.maxChars||1/0))return i(Ns(e.config).max);if(v.length+w.length<(e.config.minChars||0))return i(Ns(e.config).min);t({type:"string",value:p+m.phoneNumber})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[u("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[u("span",{children:["+",p]}),u("select",{...o("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(eo).map(([m,v])=>u("option",{value:v,children:[m," (+",v,")"]},m))})]}),u("input",{...f,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:m=>{m&&(c.current=m),d(m)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest flex-1 rounded-r-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Yt,{error:s.countryCode||s.phoneNumber||{message:n}})]})},sm=({input:e,onSubmitSuccess:t})=>u("div",{class:"flex flex-col items-center py-3",children:u("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:u("span",{class:"flex items-center gap-1.5",children:[u("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),u("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("path",{d:"M4 8L8 4L12 8"}),u("path",{d:"M8 4V13"})]})]})})}),mo={empty:"Please enter some text",email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number",url:"That doesn’t look like a valid URL"},lm={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},cm=Ht("string"),um=e=>{const t={maxLength:`Please enter no more than ${e.maxChars??999} characters`,minLength:`Please enter ${e.minChars??1} or more characters`};return Ur(Ce({text:{email:xe(mo.email,[Bd(mo.email),cr(e.minChars??1,t.minLength),lr(e.maxChars??1/0,t.maxLength)]),text:xe([cr(e.minChars??1,t.minLength),lr(e.maxChars??1/0,t.maxLength)]),url:xe([Hd(mo.url),cr(e.minChars??1,t.minLength),lr(e.maxChars??1/0,t.maxLength)])}[e.format]}))},dm=({input:e,onSubmitSuccess:t})=>{var f;const r=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:i,handleSubmit:o,formState:{errors:a}}=zr({defaultValues:{text:n||(cm(r)?r.value:"")},resolver:um(e.config)}),{ref:s,...l}=i("text",{required:!e.config.optional}),d=L();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(c=>{t({type:"string",value:c.text})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-1",children:[u("input",{id:"chat-input",...l,...lm[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.current=c),s(c)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Yt,{error:a.text})]})},fm=()=>{var i;const e=(i=P.current$.value.flow)==null?void 0:i.data.currentInput,[t,r]=rv(),n=L(null);return P.inputHeight$.value=r.height,V(()=>{const o=n.current;if(o)return o.addEventListener("transitionstart",X.scrollToEnd.smooth),o.addEventListener("transitioncancel",X.scrollToEnd.smooth),o.addEventListener("transitionend",X.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",X.scrollToEnd.smooth),o.removeEventListener("transitioncancel",X.scrollToEnd.smooth),o.removeEventListener("transitionend",X.scrollToEnd.smooth)}},[]),u("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:u("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:We({input:e}).with({input:N.nullish},()=>u("div",{class:"flex items-center gap-2 p-2.5",children:[u("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),u(lt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},o=>u(dm,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"phone"}},o=>u(am,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"multiple-choice"}},o=>u(Zv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"boolean"}},o=>u(gv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"file"}},o=>u($v,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"submit"}},o=>u(sm,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"address"}},o=>u(fv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"number"}},o=>u(em,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).exhaustive()})})};var hm=function(e){return e instanceof RegExp},pm=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Ds=function(e){return typeof e=="string"},vm=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function mm(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!Ds(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;hm(o)||(o=new RegExp("("+pm(o)+")","gi"));for(var a=e.split(o),s=1,l=a.length;s<l;s+=2){if(a[s]===void 0||a[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=a[s].length,n+=a[s-1].length,a[s]=r(a[s],s,n),n+=i}return a}var gm=function(t,r,n){return Array.isArray(t)||(t=[t]),vm(t.map(function(i){return Ds(i)?mm(i,r,n):i}))};const qr=Pe(gm),bm=/(\[[^\]]+\]\([^)]+\))/g,ym=/\[([^\]]+)\]\(([^)]+)\)/,wm=/(https?:\/\/[^\s]+)/g,_m=/_(.*?)_/g,xm=/\*\*(.*?)\*\*/g,Ms="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",km=e=>{const t=qr(e,bm,(o,a)=>{const[,s,l]=o.match(ym)??[];return l?u("a",{class:Ms,href:l,children:s??l},l+a):u("span",{children:"INVALID LINK"})}),r=qr(t,wm,(o,a)=>u("a",{class:Ms,href:o,children:o},o+a)),n=qr(r,_m,(o,a)=>u("em",{children:o},o+a));return qr(n,xm,(o,a)=>u("strong",{children:o},o+a))},$m=$r("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Sm=({children:e,className:t,animate:r,side:n,...i})=>u("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:$m({className:t,side:n,animate:r}),...i,children:e}),Cm=({message:e})=>u("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:u("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,u("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Em=({className:e,...t})=>(V(()=>{X.scrollToEnd.smooth()}),u("div",{"aria-hidden":!0,children:X.isBotTyping$.value===!0?u("div",{"aria-label":"Typing…",class:ot("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>u("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),Im={bot:"left",user:"right"},Om=$r("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),Tm=({lastSentMessageFooter:e})=>{var r;const t=((r=P.current$.value.flow)==null?void 0:r.data.messages)??[];return V(()=>{X.scrollToEnd.smooth()},[t.length]),u("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,i)=>u(Y,{children:u("li",{class:"flex",children:We(n).with({type:"system"},o=>u("p",{class:Om({variant:o.variant}),children:o.text})).with({type:"text",author:N.union("bot","user")},o=>{const a=o.author==="user"&&!t.slice(i+1).some(d=>d.type==="text"&&d.author==="user"),s=i===t.length-1,l=o.author==="bot"?km(o.text):o.text;return u(Sm,{animate:s,side:Im[o.author],children:[l,a?e:null]},i)}).with({type:"link"},o=>u(Cm,{message:o})).with({type:"image"},o=>u("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:o.url,style:{aspectRatio:o.width/o.height}})).with({type:"file"},o=>u(_v,{class:o.author==="bot"?void 0:"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).with({type:"loading"},o=>{const a=t[t.length-1];return!(o===a)||X.isBotTyping$.value?null:u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(Ka,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),u(Em,{},"typing")]})},Am=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=P.current$.value;$e(n,"Flow is required to exist to show chatbot body");const i=P.viewState$.value,{chatRef:o,chatService:a}=lv(),[s,l]=W();return fe(()=>{i==="maximised"&&X.scrollToEnd.instant()},[i]),fe(()=>{var v,w;const{state:d,flow:f}=P.current$.peek();if(d!=="loaded")throw new Error(kp.invalid_state);let c=f.data.nodeHistory.at(-1);if(X.scrollToEnd.instant(),P.setInput(void 0),f.data.isFinished)return;c===void 0?(c=Ba(n.nodes).id,P.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:f.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(v=n.analytics)==null?void 0:v.customProperties})):P.removeMessagesSentByNodeIds([c]);const{interpret:p,abort:g,undo:m}=Rp({context:n.context,analytics:{service:r,customProperties:(w=n.analytics)==null?void 0:w.customProperties},apiClient:t,logger:e,flow:n,chatService:a,getSubmissions:()=>{var x;return(x=P.current$.peek().flow)==null?void 0:x.data.submissions},onInterpret:(x,_)=>{var T;const I=P.current$.peek().flow;$e(I),_&&(I.data.sequence=I.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:_.id,flow_build:n.build,to_node_id:x.id,sequence:I.data.sequence,flow_session_id:I.data.flowSessionId,job:n.job},customProperties:(T=n.analytics)==null?void 0:T.customProperties})),P.setCurrentNodeId(x.id)},onFlowEnd:async()=>{var _;P.markAsFinished();const x=P.current$.peek().flow;$e(x),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:x.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(_=n.analytics)==null?void 0:_.customProperties})}});return l(()=>m),p(c),g},[r,t,a,e,n]),u(Y,{children:[u("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:P.inputHeight$.value},children:u(Tm,{lastSentMessageFooter:n.data.isFinished||!s?null:u(Nm,{undoFn:s})})}),u(fm,{})]})},Pm=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],Nm=({undoFn:e})=>u("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:u("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=P.current$.peek();$e(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(P.removeMessagesSentByNodeIds(n),P.setInput(void 0),n.pop(),n.map(i=>t.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(Pm).forEach(i=>delete t.data.submissions[i]),P.current$.value={...P.current$.value})},children:"Undo"})}),Dm=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Am},Symbol.toStringTag,{value:"Module"}))})();
|
|
45
|
+
}`},Ja=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const i=t[n];if(!i)continue;const o=Pt(e,n,null);if(i.required&&o===null){const a=`Configuration error in context: ${n} is required`;throw r.error(a),new Error(a)}switch(i.type){case"number":if(typeof o!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof o!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}},Mp=({_internal_domManager:e=Sp(),theme:t})=>Qe(({apiClient:r,logger:n,analytics:i})=>{let o=!1;const a=()=>{if(typeof window>"u")return;const s=[D("style",{id:"inploi-chatbot-styles"},kp),D("style",{id:"inploi-chatbot-theme"},Dp(t))],l=e.getOrCreateChatbotElement();mt(D(Y,{},[s,D(_p,{apiClient:r,logger:n,analytics:i})]),l),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async(s,l)=>{const d=new URLSearchParams({id_type:(l==null?void 0:l.idType)==="inploi"?"internal":"external"});return r.fetch([`/flow/job/${s}`,d.toString()].filter(Boolean).join("?")).then(f=>{const c=lr(xp,f);return{flow:c.flow,title:`Applying for “${c.job.title}”`,flowKeys:[c.job.id,...(l==null?void 0:l.flowKeys)??[]],job:{id:c.job.id,id_type:"external"},...l}})},fetchFlowById:async(s,l)=>r.fetch(`/flow/id/${s}`).then(d=>{var c;const f=lr(wp,d);return{flow:f.flow,title:"Chatbot",flowKeys:(l==null?void 0:l.flowKeys)??[],...l,analytics:{customProperties:{flow_id:f.flow.id,flow_version:f.flow.version,...(c=l==null?void 0:l.analytics)==null?void 0:c.customProperties}}}}),open:async s=>{if(!(typeof window>"u"))try{P.cancelCurrentFlow(),P.viewState$.value="maximised",o||a(),s instanceof Promise?(P.current$.value={state:"loading"},s.then(async l=>{Ja({context:l.context||{},schema:l.flow.context_schema,logger:n}),P.startFlow(l)}).catch(l=>{const d=l instanceof Error?l.message:"An error occurred";P.current$.value={state:"error",error:d}})):(Ja({context:s.context||{},schema:s.flow.context_schema,logger:n}),P.startFlow(s))}catch(l){n.error("Error starting flow",l)}},close:async()=>{typeof window>"u"||(P.cancelCurrentFlow(),n.info("Closed flow from an external source"))}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Mp;const Fp=({condition:e,context:t,submissions:r,ifBlock:n})=>{const[i,...o]=e.compareKey.split(".");if(!i)return!1;const a=es({context:t,key:i,path:o,submissions:r});if(!a)return!1;switch(a.type){case"address":{const s=Pt(a.value,o.join("."));switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"integration":{if(typeof a.value!="object"||Array.isArray(a.value))return!1;const s=Pt(a.value,o.join(".")),l={...n,data:{...n.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return Gt(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Gt(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Gt(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(Ua)?Gt(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{const s=e.compareValue==="true";switch(e.compare){case"equals":return a.value===s;case"notEquals":return a.value!==s}break}case"string":switch(e.compare){case"equals":return a.value===e.compareValue;case"contains":return a.value?a.value.includes(e.compareValue):!1;case"notEquals":return a.value!==e.compareValue;case"notContains":return a.value?!a.value.includes(e.compareValue):!0}break;case"number":{try{const s=Number(e.compareValue);switch(e.compare){case"equals":return a.value===s;case"notEquals":return a.value!==s;case"greaterThan":return a.value>s;case"greaterThanOrEqualTo":return a.value>=s;case"lessThan":return a.value<s;case"lessThanOrEqualTo":return a.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,a.value),!1}break}case"enum":switch(e.compare){case"equals":return a.value.length===1&&a.value[0]===e.compareValue;case"notEquals":return a.value.length===1&&a.value[0]!==e.compareValue;case"contains":return a.value.includes(e.compareValue);case"notContains":return!a.value.includes(e.compareValue)}break}},Gt=(e,{context:t,submissions:r})=>{const n="combinator"in e.data?e.data.conditions:[e.data],i="combinator"in e.data?e.data.combinator:"and";for(const o of n){const a=Fp({condition:o,context:t,submissions:r,ifBlock:e});if(i==="or"&&a)return!0;if(i==="and"&&!a)return!1}return!0},Lp=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Re=(e,{context:t,submissions:r})=>e.replace(Lp,(n,i,o="")=>{const[a,...s]=i.trim().split("."),l=es({key:a,path:s,submissions:r,context:t});if(!l)return o;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Ut(d.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():o;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const d=Pt(l.value,s.join("."));switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(Ua))return d.join(", ")}break}}return o}),Qa=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return Qa({node:n,nodes:t,stopWhen:r})},Rp=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(s=>s.id===i.branchId);if(!o)return!1;const a=Qa({node:o,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},jp=({flow:e,analytics:t,logger:r,context:n,apiClient:i,getSubmissions:o,chatService:a,onFlowEnd:s,onInterpret:l})=>{let d=new AbortController;const f={...t.service,log:p=>t.service.log({...p,customProperties:{...p.customProperties,...t.customProperties}})},c=async(p,g)=>{const m=o();l==null||l(p,g);try{await Vp({flow:e,analytics:f,logger:r,apiClient:i,context:n,node:p,submissions:m,chat:{sendMessage:async v=>a.send({groupId:p.id,message:v,signal:d.signal}),userInput:async v=>a.input({input:v,signal:d.signal}),addToSubmissions:a.addToSubmissions},next:v=>{const _=v?e.nodes.find(x=>x.id===v):Rp({childNode:p,nodes:e.nodes});return _?c(_,p):s==null?void 0:s(p)},end:()=>s==null?void 0:s(p)})}catch(v){if(v instanceof qt)return;throw v}};return{interpret:async p=>{const g=e.nodes.find(m=>m.id===p)??za(e.nodes);return c(g)},undo:p=>{let g=1;const m=e.nodes.find(_=>_.id===p[p.length-1]);for(let _=p.length-2;_>0;_--){const x=p[_],w=e.nodes.find(I=>I.id===x);if(!w||(g++,w.type.startsWith("question-")))break}d.abort(),d=new AbortController;const v=e.nodes.find(_=>_.id===p[p.length-g]);return $e(v,"Undo failed: new start node not found"),c(v,m),{removed:g}},abort:()=>{d.abort()}}};async function Vp(e){const t=e.node;switch(t.type){case"text":return Wp({...e,node:t});case"image":return Gp({...e,node:t});case"question-text":return Yp({...e,node:t});case"question-enum":return Zp({...e,node:t});case"question-number":return Xp({...e,node:t});case"question-boolean":return Jp({...e,node:t});case"question-file":return ev({...e,node:t});case"question-address":return Qp({...e,node:t});case"end-flow":return tv({...e,node:t});case"if-block":return Kp({...e,node:t});case"jump":return zp({...e,node:t});case"link":return qp({...e,node:t});case"integration-application-submit":return Hp({...e,node:t});case"add-submission":return Up({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return Bp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}const Yt=(e,t)=>{var n;const r=(n=e[t])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${t}” is not a string or number`);return r};async function Bp({next:e,node:t,analytics:r,submissions:n,logger:i}){if(!n)return e(t.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:Yt(n,t.data.key).toString(),first_name:t.data.firstName?Yt(n,t.data.firstName).toString():void 0,last_name:t.data.lastName?Yt(n,t.data.lastName).toString():void 0,email:t.data.email?Yt(n,t.data.email).toString():void 0,phone_number:t.data.phoneNumber?Yt(n,t.data.phoneNumber).toString():void 0,custom_traits:t.data.customTraits?Object.fromEntries(Object.entries(t.data.customTraits).map(([o,a])=>{var s;return[o,(s=n[a])==null?void 0:s.value]})):void 0}})}catch(o){i.error(o)}finally{e(t.nextId)}}async function zp({next:e,node:t}){e(t.data.targetId)}async function Up({next:e,node:t,logger:r,submissions:n,context:i}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Re(t.data.value,{submissions:n,context:i})},e(t.nextId)}async function Hp({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:o,analytics:a,flow:s}){const l=async d=>{d!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:f,session_id:c}=a.getSessionInfo(),p=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:f,session_id:c,job:s.job,submissions:lp(o||{})})}).catch(g=>g);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:p}),We(p).with({integration_response:N.select(N.union({service:N.optional(N.string),status:N.number,data:N.any},{service:N.optional(N.string),status:N.number,error:{message:N.string,data:N.any}}))},g=>{a.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:g.service??"INVALID_SERVICE",response:{status:g.status,payload:"data"in g?g.data:g.error.data??null},job:s.job}})}).otherwise(()=>{}),await We(p).with(N.union({ats_data:N.select("redirect",{redirect_url:N.string,message:N.optional(N.union(N.string,N.nullish)),button_text:N.optional(N.union(N.string,N.nullish))})},{integration_response:{data:N.select("redirect",{redirect_url:N.string,message:N.optional(N.union(N.string,N.nullish)),button_text:N.optional(N.union(N.string,N.nullish))})}}),async g=>{if(g.redirect!==void 0){await e.sendMessage({type:"text",author:"bot",text:g.redirect.message??"Almost there! Please complete your submission here:"});try{const m=new URL(g.redirect.redirect_url);f&&!m.searchParams.has("anonymous_id")&&m.searchParams.set("anonymous_id",f),await e.sendMessage({type:"link",href:m.toString(),text:g.redirect.button_text??"Complete submission",onClick:()=>{if(!c){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}a.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:c,flow_version:s.version,href:m.toString(),job:s.job}})}})}catch(m){n.error(`Invalid redirect URL: ${g.redirect.redirect_url}`,m),e.sendMessage({type:"system",variant:"error",text:"Couldn’t get the redirect URL."})}t(r.nextId)}}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with(N.union({success:!1,ats_data:N.select("error",{message:N.string})},{integration_response:{error:N.select("error",{message:N.string})}}),async g=>{var m;n.error(g.error),await e.sendMessage({type:"system",variant:"error",text:((m=g.error)==null?void 0:m.message)||"Failed to submit"}),await l(!1)}).otherwise(async g=>{n.error(g),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await l(!1)})};await l(r.data.skipConfirmation)}async function qp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({type:"link",href:Re(r.data.href,{submissions:n,context:i}),text:Re(r.data.cta,{submissions:n,context:i})}),t(r.nextId)}async function Kp({submissions:e,next:t,node:r,context:n}){t(Gt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Wp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function Gp({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Yp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.question,{submissions:n,context:i})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,maxChars:r.data.maxChars,minChars:r.data.minChars}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value}),t(r.nextId)}async function Xp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Zp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(a=>o.value.includes(a.value)).map(a=>a.label).join(", ")}),t(r.nextId)}async function Jp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Re(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Qp({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const i=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:i})}return t(r.nextId)}async function ev({node:e,chat:t,next:r,submissions:n,context:i}){await t.sendMessage({author:"bot",type:"text",text:Re(e.data.question,{submissions:n,context:i})});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const a of o.value)await t.sendMessage({author:"user",type:"file",fileName:a.name,fileSizeKb:a.sizeKb});r(e.nextId)}async function tv({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const es=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const i=Pt(n,t.join("."));switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r==null?void 0:r[e]};function Qn(e,t,r){var n,i,o,a,s;t==null&&(t=100);function l(){var f=Date.now()-a;f<t&&f>=0?n=setTimeout(l,t-f):(n=null,r||(s=e.apply(o,i),o=i=null))}var d=function(){o=this,i=arguments,a=Date.now();var f=r&&!n;return n||(n=setTimeout(l,t)),f&&(s=e.apply(o,i),o=i=null),s};return d.clear=function(){n&&(clearTimeout(n),n=null)},d.flush=function(){n&&(s=e.apply(o,i),o=i=null,clearTimeout(n),n=null)},d}Qn.debounce=Qn;var rv=Qn;const ts=Pe(rv);function nv(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const o=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=W({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=L({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),d=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,c=L(!1);V(()=>(c.current=!0,()=>void(c.current=!1)));const[p,g,m]=he(()=>{const w=()=>{if(!l.current.element)return;const{left:I,top:T,width:O,height:H,bottom:K,right:M,x:F,y:se}=l.current.element.getBoundingClientRect(),re={left:I,top:T,width:O,height:H,bottom:K,right:M,x:F,y:se};l.current.element instanceof HTMLElement&&i&&(re.height=l.current.element.offsetHeight,re.width=l.current.element.offsetWidth),Object.freeze(re),c.current&&!sv(l.current.lastBounds,re)&&s(l.current.lastBounds=re)};return[w,f?ts(w,f):w,d?ts(w,d):w]},[s,i,d,f]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",m,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new o(m),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",m,{capture:!0,passive:!0})))}const x=w=>{!w||w===l.current.element||(v(),l.current.element=w,l.current.scrollContainers=rs(w),_())};return iv(m,!!r),ov(g),V(()=>{v(),_()},[r,m,g]),V(()=>v,[]),[x,a,p]}function ov(e){V(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function iv(e,t){V(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function rs(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...rs(e.parentElement)]}const av=["x","y","top","bottom","left","right","width","height"],sv=(e,t)=>av.every(r=>e[r]===t[r]),lt=({class:e,...t})=>u("button",{class:ot("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[u("title",{children:"Send"}),u("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),u("path",{d:"M8 4V13"})]})}),lv=25,eo=Ge({instant:()=>{},smooth:()=>{}}),X={onSubmitSuccessFn$:Ge(()=>{}),isBotTyping$:Ge(!1),scrollToEnd:{instant:()=>eo.value.instant(),smooth:()=>eo.value.smooth()}},cv=()=>{const e=L(null);fe(()=>{eo.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=he(()=>({addToSubmissions:(n,i)=>P.setSubmission(n,i),send:async({message:n,signal:i,groupId:o})=>{if(await We(n).with({author:"bot",type:"text"},async a=>{if(i!=null&&i.aborted)throw new qt;X.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*lv;await new Promise(l=>setTimeout(l,s,{signal:i})),X.isBotTyping$.value=!1}).otherwise(async()=>{}),i!=null&&i.aborted)throw new qt;P.addMessage(n,o)},input:({input:n,signal:i})=>{if(i!=null&&i.aborted)throw new qt;return P.setInput(n),new Promise(o=>{const a=s=>{if(i!=null&&i.aborted)throw new qt;P.setInput(void 0),n.key&&P.setSubmission(n.key,s),o(s)};X.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},ct=({class:e,...t})=>u("button",{type:"button",class:ot("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[u("title",{children:"Skip"}),u("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),u("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),to={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"},ns={line1:["street_number","floor","room","premise"],line2:["subpremise","street_address","route"],line3:["sublocality","neighborhood"],city:["locality","postal_town"],state:["administrative_area_level_1"],postcode:["postal_code"],country:["country"]},Fr=Object.keys(ns),uv=e=>Fr.reduce((t,r)=>{const n=ns[r],i=e.filter(o=>o.types.some(a=>n.includes(a))).map(o=>o.long_name).join(", ");return i&&(t[r]=i),t},{}),dv=document.createElement("div"),fv=()=>he(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(dv);return{enabled:!0,getPredictions:async n=>{const{predictions:i}=await t.getPlacePredictions({input:n,language:"en"});return i.map(o=>({label:o.description,value:o.place_id}))},getPlaceDetails:async n=>await new Promise((o,a)=>r.getDetails({placeId:n,fields:["address_components"],language:"en"},(s,l)=>l!==e.maps.places.PlacesServiceStatus.OK?a(l):s===null?a("ZERO_RESULTS"):o({ok:!0,place:s}))).catch(async o=>(console.error("Failed to get address details",o),{ok:!1}))}},[]),ro=e=>u("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M10 3L5 8L10 13"})}),u("span",{children:"Back"})]}),no={label:"Fill in manually",value:""},hv=({input:e,onSubmitSuccess:t})=>{const[r,n]=W(""),[i,o]=W(),[a,s]=W([]),[l,d]=W(),{enabled:f,getPredictions:c,getPlaceDetails:p}=fv(),[g,m]=W(f?"query":"manual"),v=_=>{$e(f,"Query state should not be enabled if Google Places isn't available"),n(_),_===""&&s([]),c(_).then(x=>{s(x)})};switch(V(()=>{if(f&&!(l===void 0||l===""))return p(l).then(_=>{if(!_.ok||!_.place.address_components){o({});return}const x=uv(_.place.address_components);o(x),m("details")}),()=>{o(void 0)}},[l,p,f]),g){case"query":return $e(f,"Query state should not be enabled if Google Places isn't available"),u(pv,{input:e,onSkip:()=>t(null),onAddressSelect:_=>{d(_),m("loading")},onAddressSearch:_=>{v(_)},suggestions:a,query:r});case"loading":return u(oo,{input:e,onSubmitSuccess:t,addressFields:{},actions:u(ro,{onClick:()=>{d(void 0),m("query")}})});case"details":return $e(i!==void 0),u(oo,{input:e,onSubmitSuccess:t,addressFields:i,actions:u(ro,{onClick:()=>{d(void 0),m("query")}})});case"manual":return u(oo,{input:e,onSubmitSuccess:t,addressFields:{},actions:f?u(ro,{onClick:()=>{d(void 0),m("query")}}):void 0})}},pv=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:i,onAddressSearch:o})=>{const a=L(null);return fe(()=>{a.current&&(a.current.focus(),a.current.select())},[]),u(Y,{children:[u("form",{noValidate:!0,onSubmit:s=>{s.preventDefault();const d=new FormData(s.currentTarget).get("address");typeof d=="string"&&o(d)},class:"flex gap-1 p-2.5",children:[u("div",{class:"group relative flex-1",children:[u("input",{ref:a,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder||"Type and search for places...",defaultValue:i}),u("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[u("circle",{cx:"7",cy:"7",r:"4"}),u("path",{d:"M10 10L13 13"})]}),u("span",{class:"sr-only",children:"Search"})]})})]}),e.config.optional&&u(ct,{class:"",onClick:t})]}),u("ul",{children:[r.map(s=>u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(s.value)},children:[u("span",{class:"flex-grow",children:s.label}),u("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(no.value)},children:u("span",{class:"flex-grow",children:no.label})})},no.label)]})]})},vv={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},oo=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const i=L(null);fe(()=>{if(i.current){const a=i.current.querySelector("input");a&&(a.focus(),a.select())}},[]);const o=Object.keys(to);return u("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:a=>{const s=new FormData(a.currentTarget),l=Object.fromEntries(s.entries());t({type:"address",value:l})},children:[u("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:i,children:Fr.map((a,s)=>{const l=`isdk_${a}`,d=n.config.keys[a];return d?u(Y,{children:[u("label",{for:l,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:vv[a]}),u("div",{class:"flex flex-col items-stretch gap-1.5",children:[a==="country"?u("div",{class:"relative",children:[u("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:d,id:l,defaultValue:e[a],required:!0,children:[e.country&&!o.includes(e.country)?u("option",{value:e[a],children:e[a]}):u("option",{value:"",children:"Select a country"}),o.map(f=>u("option",{value:f,children:f},f))]}),u("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):u("input",{autoFocus:s===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:d,id:l,defaultValue:e[a],required:!0}),s!==Fr.length-1&&u("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),s===Fr.length-1&&u("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),u("div",{class:"flex w-full flex-1 ",children:[u("div",{class:"flex-grow",children:r}),u(lt,{class:"flex items-center justify-center"})]})]})},io=()=>{const e=L(null);return V(()=>{var t;(t=e.current)==null||t.focus()},[]),e},os=["true","false"],mv=Md(os),gv="answer",is="flex items-center gap-2 p-2.5",as=ne(({label:e,...t},r)=>u("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:u("p",{class:"truncate text-center text-base",children:e})})),bv=({input:e,onSubmitSuccess:t})=>{const r=io();return u("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=dp(n).value,o=lr(mv,i);t({type:"boolean",value:o==="true"})},children:[u("ul",{class:is,children:os.map((n,i)=>u("li",{class:"flex-1",children:u(as,{ref:i===0?r:null,type:"submit",name:gv,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&u("div",{class:"px-2 pb-2",children:u(ct,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Xt=({error:e})=>!e||!e.message?null:u("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[u("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),u("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),u("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),u("p",{class:"truncate pr-1 text-sm",children:e.message})]}),yv=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),_v=e=>e.reduce((t,r)=>t+r.sizeKb,0),wv=Ht("file"),ss=3,xv=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return u("div",{class:ot("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[u("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[u("span",{class:"block truncate",children:i}),u("span",{children:[".",n]})]}),u("p",{"aria-label":"File size",class:"text-accent-11",children:Ut(e.sizeKb)})]})},ls=({class:e,...t})=>u("li",{class:ot("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),cs=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},kv=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(cs(n.name).toLowerCase()))},$v=(e,t)=>{const r=cs(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},Sv=({input:e,onSubmitSuccess:t})=>{var f;const r=(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key],[n,i]=W(wv(r)?r.value:[]),[o,a]=W(),s=n.length-ss,l=_v(n),d=io();return u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:c=>(c.preventDefault(),a(void 0),n.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!kv({allowedExtensions:e.config.extensions,files:n})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${Ut(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?a({type:"invalid",message:"Only one file is allowed"}):t({type:"file",value:n})),children:[u("div",{class:"flex items-center gap-2",children:[u("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?u(Y,{children:[u("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,ss).map(c=>{const p=c.name.split(".").pop(),g=c.name.replace(new RegExp(`.${p}$`),"");return u(ls,{class:"flex overflow-hidden",children:[u("span",{class:"block truncate",children:g}),u("span",{children:[".",p]})]})}),s>0?u(ls,{children:["+",s," file",s!==1?"s":""]}):null]}),u("p",{class:"text-neutral-11 text-xs",children:[Ut(l)," ",n.length>1?"total":""]})]}):u("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[u("header",{class:"flex flex-col items-center gap-0",children:[u("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:u("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),u("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?u("p",{class:"text-neutral-10 text-xs",children:["(max ",Ut(e.config.fileSizeLimitKib),")"]}):null]}),u("aside",{class:"flex flex-col items-center gap-2",children:[u("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),u("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>u("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:c.replace(".","")}))})]})]}),u("input",{id:"dropzone-file",onInput:async c=>{$e(c.target instanceof HTMLInputElement);const p=c.target.files?Array.from(c.target.files):[],g=await Promise.allSettled(p.map(async v=>{const _=await yv(v);return{name:$v(v.name,42),data:_,sizeKb:v.size/1e3}}));if(g.some(({status:v})=>v==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=g.map(v=>v.status==="fulfilled"?v.value:null).filter(Boolean);i(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),u("div",{class:"flex h-full flex-col items-center gap-2",children:[u(lt,{disabled:n.length===0}),e.config.optional&&u(ct,{onClick:()=>t(null)})]})]}),u(Xt,{error:o})]})};var Zt=e=>e.type==="checkbox",It=e=>e instanceof Date,ue=e=>e==null;const us=e=>typeof e=="object";var te=e=>!ue(e)&&!Array.isArray(e)&&us(e)&&!It(e),Cv=e=>te(e)&&e.target?Zt(e.target)?e.target.checked:e.target.value:e,Ev=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Iv=(e,t)=>e.has(Ev(t)),Ov=e=>{const t=e.constructor&&e.constructor.prototype;return te(t)&&t.hasOwnProperty("isPrototypeOf")},ao=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ao&&(e instanceof Blob||e instanceof FileList))&&(r||te(e)))if(t=r?[]:{},!r&&!Ov(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=je(e[n]));else return e;return t}var Jt=e=>Array.isArray(e)?e.filter(Boolean):[],J=e=>e===void 0,C=(e,t,r)=>{if(!t||!te(e))return r;const n=Jt(t.split(/[,[\].]+?/)).reduce((i,o)=>ue(i)?i:i[o],e);return J(n)||n===e?J(e[t])?r:e[t]:n},Ze=e=>typeof e=="boolean";const ds={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Se={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ve={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ke.createContext(null);var Tv=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Se.all&&(t._proxyFormState[a]=!n||Se.all),r&&(r[a]=!0),e[a]}});return i},_e=e=>te(e)&&!Object.keys(e).length,Av=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return _e(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||Se.all))},so=e=>Array.isArray(e)?e:[e];function Pv(e){const t=ke.useRef(e);t.current=e,ke.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Te=e=>typeof e=="string",Nv=(e,t,r,n,i)=>Te(e)?(n&&t.watch.add(e),C(r,e,i)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),C(r,o))):(n&&(t.watchAll=!0),r),lo=e=>/^\w*$/.test(e),fs=e=>Jt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function U(e,t,r){let n=-1;const i=lo(t)?[t]:fs(t),o=i.length,a=o-1;for(;++n<o;){const s=i[n];let l=r;if(n!==a){const d=e[s];l=te(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var hs=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},ps=e=>({isOnSubmit:!e||e===Se.onSubmit,isOnBlur:e===Se.onBlur,isOnChange:e===Se.onChange,isOnAll:e===Se.all,isOnTouch:e===Se.onTouched}),vs=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Lr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const o=C(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else te(s)&&Lr(s,t)}}};var Dv=(e,t,r)=>{const n=Jt(C(e,r));return U(n,"root",t[r]),U(e,r,n),e},co=e=>e.type==="file",Je=e=>typeof e=="function",Rr=e=>{if(!ao)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},jr=e=>Te(e),uo=e=>e.type==="radio",Vr=e=>e instanceof RegExp;const ms={value:!1,isValid:!1},gs={value:!0,isValid:!0};var bs=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!J(e[0].attributes.value)?J(e[0].value)||e[0].value===""?gs:{value:e[0].value,isValid:!0}:gs:ms}return ms};const ys={isValid:!1,value:null};var _s=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,ys):ys;function ws(e,t,r="validate"){if(jr(e)||Array.isArray(e)&&e.every(jr)||Ze(e)&&!e)return{type:r,message:jr(e)?e:"",ref:t}}var Ot=e=>te(e)&&!Vr(e)?e:{value:e,message:""},xs=async(e,t,r,n,i)=>{const{ref:o,refs:a,required:s,maxLength:l,minLength:d,min:f,max:c,pattern:p,validate:g,name:m,valueAsNumber:v,mount:_,disabled:x}=e._f,w=C(t,m);if(!_||x)return{};const I=a?a[0]:o,T=B=>{n&&I.reportValidity&&(I.setCustomValidity(Ze(B)?"":B||""),I.reportValidity())},O={},H=uo(o),K=Zt(o),M=H||K,F=(v||co(o))&&J(o.value)&&J(w)||Rr(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,se=hs.bind(null,m,r,O),re=(B,R,Q,ve=Ve.maxLength,we=Ve.minLength)=>{const Ae=B?R:Q;O[m]={type:B?ve:we,message:Ae,ref:o,...se(B?ve:we,Ae)}};if(i?!Array.isArray(w)||!w.length:s&&(!M&&(F||ue(w))||Ze(w)&&!w||K&&!bs(a).isValid||H&&!_s(a).isValid)){const{value:B,message:R}=jr(s)?{value:!!s,message:s}:Ot(s);if(B&&(O[m]={type:Ve.required,message:R,ref:I,...se(Ve.required,R)},!r))return T(R),O}if(!F&&(!ue(f)||!ue(c))){let B,R;const Q=Ot(c),ve=Ot(f);if(!ue(w)&&!isNaN(w)){const we=o.valueAsNumber||w&&+w;ue(Q.value)||(B=we>Q.value),ue(ve.value)||(R=we<ve.value)}else{const we=o.valueAsDate||new Date(w),Ae=Wr=>new Date(new Date().toDateString()+" "+Wr),dt=o.type=="time",er=o.type=="week";Te(Q.value)&&w&&(B=dt?Ae(w)>Ae(Q.value):er?w>Q.value:we>new Date(Q.value)),Te(ve.value)&&w&&(R=dt?Ae(w)<Ae(ve.value):er?w<ve.value:we<new Date(ve.value))}if((B||R)&&(re(!!B,Q.message,ve.message,Ve.max,Ve.min),!r))return T(O[m].message),O}if((l||d)&&!F&&(Te(w)||i&&Array.isArray(w))){const B=Ot(l),R=Ot(d),Q=!ue(B.value)&&w.length>+B.value,ve=!ue(R.value)&&w.length<+R.value;if((Q||ve)&&(re(Q,B.message,R.message),!r))return T(O[m].message),O}if(p&&!F&&Te(w)){const{value:B,message:R}=Ot(p);if(Vr(B)&&!w.match(B)&&(O[m]={type:Ve.pattern,message:R,ref:o,...se(Ve.pattern,R)},!r))return T(R),O}if(g){if(Je(g)){const B=await g(w,t),R=ws(B,I);if(R&&(O[m]={...R,...se(Ve.validate,R.message)},!r))return T(R.message),O}else if(te(g)){let B={};for(const R in g){if(!_e(B)&&!r)break;const Q=ws(await g[R](w,t),I,R);Q&&(B={...Q,...se(R,Q.message)},T(Q.message),r&&(O[m]=B))}if(!_e(B)&&(O[m]={ref:I,...B},!r))return O}}return T(!0),O};function Mv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=J(e)?n++:e[t[n++]];return e}function Fv(e){for(const t in e)if(e.hasOwnProperty(t)&&!J(e[t]))return!1;return!0}function ae(e,t){const r=Array.isArray(t)?t:lo(t)?[t]:fs(t),n=r.length===1?e:Mv(e,r),i=r.length-1,o=r[i];return n&&delete n[o],i!==0&&(te(n)&&_e(n)||Array.isArray(n)&&Fv(n))&&ae(e,r.slice(0,-1)),e}function fo(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Br=e=>ue(e)||!us(e);function ut(e,t){if(Br(e)||Br(t))return e===t;if(It(e)&&It(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const o=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const a=t[i];if(It(o)&&It(a)||te(o)&&te(a)||Array.isArray(o)&&Array.isArray(a)?!ut(o,a):o!==a)return!1}}return!0}var ks=e=>e.type==="select-multiple",Lv=e=>uo(e)||Zt(e),ho=e=>Rr(e)&&e.isConnected,$s=e=>{for(const t in e)if(Je(e[t]))return!0;return!1};function zr(e,t={}){const r=Array.isArray(e);if(te(e)||r)for(const n in e)Array.isArray(e[n])||te(e[n])&&!$s(e[n])?(t[n]=Array.isArray(e[n])?[]:{},zr(e[n],t[n])):ue(e[n])||(t[n]=!0);return t}function Ss(e,t,r){const n=Array.isArray(e);if(te(e)||n)for(const i in e)Array.isArray(e[i])||te(e[i])&&!$s(e[i])?J(t)||Br(r[i])?r[i]=Array.isArray(e[i])?zr(e[i],[]):{...zr(e[i])}:Ss(e[i],ue(t)?{}:t[i],r[i]):r[i]=!ut(e[i],t[i]);return r}var po=(e,t)=>Ss(e,t,zr(t)),Cs=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>J(e)?e:t?e===""?NaN:e&&+e:r&&Te(e)?new Date(e):n?n(e):e;function vo(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return co(t)?t.files:uo(t)?_s(e.refs).value:ks(t)?[...t.selectedOptions].map(({value:r})=>r):Zt(t)?bs(e.refs).value:Cs(J(t.value)?e.ref.value:t.value,e)}var Rv=(e,t,r,n)=>{const i={};for(const o of e){const a=C(t,o);a&&U(i,o,a._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Qt=e=>J(e)?e:Vr(e)?e.source:te(e)?Vr(e.value)?e.value.source:e.value:e,jv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Es(e,t,r){const n=C(e,r);if(n||lo(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const o=i.join("."),a=C(t,o),s=C(e,o);if(a&&!Array.isArray(a)&&r!==o)return{name:r};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:r}}var Vv=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Bv=(e,t)=>!Jt(C(e,t)).length&&ae(e,t);const zv={mode:Se.onSubmit,reValidateMode:Se.onChange,shouldFocusError:!0};function Uv(e={},t){let r={...zv,...e},n={submitCount:0,isDirty:!1,isLoading:Je(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=te(r.defaultValues)||te(r.values)?je(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:je(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:fo(),array:fo(),state:fo()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,m=ps(r.mode),v=ps(r.reValidateMode),_=r.criteriaMode===Se.all,x=h=>b=>{clearTimeout(f),f=setTimeout(h,b)},w=async h=>{if(c.isValid||h){const b=r.resolver?_e((await F()).errors):await re(i,!0);b!==n.isValid&&p.state.next({isValid:b})}},I=h=>c.isValidating&&p.state.next({isValidating:h}),T=(h,b=[],y,E,$=!0,k=!0)=>{if(E&&y){if(s.action=!0,k&&Array.isArray(C(i,h))){const A=y(C(i,h),E.argA,E.argB);$&&U(i,h,A)}if(k&&Array.isArray(C(n.errors,h))){const A=y(C(n.errors,h),E.argA,E.argB);$&&U(n.errors,h,A),Bv(n.errors,h)}if(c.touchedFields&&k&&Array.isArray(C(n.touchedFields,h))){const A=y(C(n.touchedFields,h),E.argA,E.argB);$&&U(n.touchedFields,h,A)}c.dirtyFields&&(n.dirtyFields=po(o,a)),p.state.next({name:h,isDirty:R(h,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else U(a,h,b)},O=(h,b)=>{U(n.errors,h,b),p.state.next({errors:n.errors})},H=(h,b,y,E)=>{const $=C(i,h);if($){const k=C(a,h,J(y)?C(o,h):y);J(k)||E&&E.defaultChecked||b?U(a,h,b?k:vo($._f)):we(h,k),s.mount&&w()}},K=(h,b,y,E,$)=>{let k=!1,A=!1;const q={name:h};if(!y||E){c.isDirty&&(A=n.isDirty,n.isDirty=q.isDirty=R(),k=A!==q.isDirty);const ee=ut(C(o,h),b);A=C(n.dirtyFields,h),ee?ae(n.dirtyFields,h):U(n.dirtyFields,h,!0),q.dirtyFields=n.dirtyFields,k=k||c.dirtyFields&&A!==!ee}if(y){const ee=C(n.touchedFields,h);ee||(U(n.touchedFields,h,y),q.touchedFields=n.touchedFields,k=k||c.touchedFields&&ee!==y)}return k&&$&&p.state.next(q),k?q:{}},M=(h,b,y,E)=>{const $=C(n.errors,h),k=c.isValid&&Ze(b)&&n.isValid!==b;if(e.delayError&&y?(d=x(()=>O(h,y)),d(e.delayError)):(clearTimeout(f),d=null,y?U(n.errors,h,y):ae(n.errors,h)),(y?!ut($,y):$)||!_e(E)||k){const A={...E,...k&&Ze(b)?{isValid:b}:{},errors:n.errors,name:h};n={...n,...A},p.state.next(A)}I(!1)},F=async h=>r.resolver(a,r.context,Rv(h||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),se=async h=>{const{errors:b}=await F(h);if(h)for(const y of h){const E=C(b,y);E?U(n.errors,y,E):ae(n.errors,y)}else n.errors=b;return b},re=async(h,b,y={valid:!0})=>{for(const E in h){const $=h[E];if($){const{_f:k,...A}=$;if(k){const q=l.array.has(k.name),ee=await xs($,a,_,r.shouldUseNativeValidation&&!b,q);if(ee[k.name]&&(y.valid=!1,b))break;!b&&(C(ee,k.name)?q?Dv(n.errors,ee,k.name):U(n.errors,k.name,ee[k.name]):ae(n.errors,k.name))}A&&await re(A,b,y)}}return y.valid},B=()=>{for(const h of l.unMount){const b=C(i,h);b&&(b._f.refs?b._f.refs.every(y=>!ho(y)):!ho(b._f.ref))&&yo(h)}l.unMount=new Set},R=(h,b)=>(h&&b&&U(a,h,b),!ut(Ls(),o)),Q=(h,b,y)=>Nv(h,l,{...s.mount?a:J(b)?o:Te(h)?{[h]:b}:b},y,b),ve=h=>Jt(C(s.mount?a:o,h,e.shouldUnregister?C(o,h,[]):[])),we=(h,b,y={})=>{const E=C(i,h);let $=b;if(E){const k=E._f;k&&(!k.disabled&&U(a,h,Cs(b,k)),$=Rr(k.ref)&&ue(b)?"":b,ks(k.ref)?[...k.ref.options].forEach(A=>A.selected=$.includes(A.value)):k.refs?Zt(k.ref)?k.refs.length>1?k.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(q=>q===A.value):$===A.value)):k.refs[0]&&(k.refs[0].checked=!!$):k.refs.forEach(A=>A.checked=A.value===$):co(k.ref)?k.ref.value="":(k.ref.value=$,k.ref.type||p.values.next({name:h,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&K(h,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&bo(h)},Ae=(h,b,y)=>{for(const E in b){const $=b[E],k=`${h}.${E}`,A=C(i,k);(l.array.has(h)||!Br($)||A&&!A._f)&&!It($)?Ae(k,$,y):we(k,$,y)}},dt=(h,b,y={})=>{const E=C(i,h),$=l.array.has(h),k=je(b);U(a,h,k),$?(p.array.next({name:h,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&p.state.next({name:h,dirtyFields:po(o,a),isDirty:R(h,k)})):E&&!E._f&&!ue(k)?Ae(h,k,y):we(h,k,y),vs(h,l)&&p.state.next({...n}),p.values.next({name:h,values:{...a}}),!s.mount&&t()},er=async h=>{const b=h.target;let y=b.name,E=!0;const $=C(i,y),k=()=>b.type?vo($._f):Cv(h),A=q=>{E=Number.isNaN(q)||q===C(a,y,q)};if($){let q,ee;const Gr=k(),Tt=h.type===ds.BLUR||h.type===ds.FOCUS_OUT,Vm=!jv($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||Vv(Tt,C(n.touchedFields,y),n.isSubmitted,v,m),wo=vs(y,l,Tt);U(a,y,Gr),Tt?($._f.onBlur&&$._f.onBlur(h),d&&d(0)):$._f.onChange&&$._f.onChange(h);const xo=K(y,Gr,Tt,!1),Bm=!_e(xo)||wo;if(!Tt&&p.values.next({name:y,type:h.type,values:{...a}}),Vm)return c.isValid&&w(),Bm&&p.state.next({name:y,...wo?{}:xo});if(!Tt&&wo&&p.state.next({...n}),I(!0),r.resolver){const{errors:qs}=await F([y]);if(A(Gr),E){const zm=Es(n.errors,i,y),Ks=Es(qs,i,zm.name||y);q=Ks.error,y=Ks.name,ee=_e(qs)}}else q=(await xs($,a,_,r.shouldUseNativeValidation))[y],A(Gr),E&&(q?ee=!1:c.isValid&&(ee=await re(i,!0)));E&&($._f.deps&&bo($._f.deps),M(y,ee,q,xo))}},Wr=(h,b)=>{if(C(n.errors,b)&&h.focus)return h.focus(),1},bo=async(h,b={})=>{let y,E;const $=so(h);if(I(!0),r.resolver){const k=await se(J(h)?h:$);y=_e(k),E=h?!$.some(A=>C(k,A)):y}else h?(E=(await Promise.all($.map(async k=>{const A=C(i,k);return await re(A&&A._f?{[k]:A}:A)}))).every(Boolean),!(!E&&!n.isValid)&&w()):E=y=await re(i);return p.state.next({...!Te(h)||c.isValid&&y!==n.isValid?{}:{name:h},...r.resolver||!h?{isValid:y}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!E&&Lr(i,Wr,h?$:l.mount),E},Ls=h=>{const b={...o,...s.mount?a:{}};return J(h)?b:Te(h)?C(b,h):h.map(y=>C(b,y))},Rs=(h,b)=>({invalid:!!C((b||n).errors,h),isDirty:!!C((b||n).dirtyFields,h),isTouched:!!C((b||n).touchedFields,h),error:C((b||n).errors,h)}),Fm=h=>{h&&so(h).forEach(b=>ae(n.errors,b)),p.state.next({errors:h?n.errors:{}})},js=(h,b,y)=>{const E=(C(i,h,{_f:{}})._f||{}).ref;U(n.errors,h,{...b,ref:E}),p.state.next({name:h,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},Lm=(h,b)=>Je(h)?p.values.subscribe({next:y=>h(Q(void 0,b),y)}):Q(h,b,!0),yo=(h,b={})=>{for(const y of h?so(h):l.mount)l.mount.delete(y),l.array.delete(y),b.keepValue||(ae(i,y),ae(a,y)),!b.keepError&&ae(n.errors,y),!b.keepDirty&&ae(n.dirtyFields,y),!b.keepTouched&&ae(n.touchedFields,y),!r.shouldUnregister&&!b.keepDefaultValue&&ae(o,y);p.values.next({values:{...a}}),p.state.next({...n,...b.keepDirty?{isDirty:R()}:{}}),!b.keepIsValid&&w()},Vs=({disabled:h,name:b,field:y,fields:E,value:$})=>{if(Ze(h)){const k=h?void 0:J($)?vo(y?y._f:C(E,b)._f):$;U(a,b,k),K(b,k,!1,!1,!0)}},_o=(h,b={})=>{let y=C(i,h);const E=Ze(b.disabled);return U(i,h,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:h}},name:h,mount:!0,...b}}),l.mount.add(h),y?Vs({field:y,disabled:b.disabled,name:h}):H(h,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Qt(b.min),max:Qt(b.max),minLength:Qt(b.minLength),maxLength:Qt(b.maxLength),pattern:Qt(b.pattern)}:{},name:h,onChange:er,onBlur:er,ref:$=>{if($){_o(h,b),y=C(i,h);const k=J($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=Lv(k),q=y._f.refs||[];if(A?q.find(ee=>ee===k):k===y._f.ref)return;U(i,h,{_f:{...y._f,...A?{refs:[...q.filter(ho),k,...Array.isArray(C(o,h))?[{}]:[]],ref:{type:k.type,name:h}}:{ref:k}}}),H(h,!1,void 0,k)}else y=C(i,h,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(Iv(l.array,h)&&s.action)&&l.unMount.add(h)}}},Bs=()=>r.shouldFocusError&&Lr(i,Wr,l.mount),Rm=h=>{Ze(h)&&(p.state.next({disabled:h}),Lr(i,b=>{b.disabled=h},0,!1))},zs=(h,b)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=je(a);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:k}=await F();n.errors=$,E=k}else await re(i);ae(n.errors,"root"),_e(n.errors)?(p.state.next({errors:{}}),await h(E,y)):(b&&await b({...n.errors},y),Bs(),setTimeout(Bs)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_e(n.errors),submitCount:n.submitCount+1,errors:n.errors})},jm=(h,b={})=>{C(i,h)&&(J(b.defaultValue)?dt(h,C(o,h)):(dt(h,b.defaultValue),U(o,h,b.defaultValue)),b.keepTouched||ae(n.touchedFields,h),b.keepDirty||(ae(n.dirtyFields,h),n.isDirty=b.defaultValue?R(h,C(o,h)):R()),b.keepError||(ae(n.errors,h),c.isValid&&w()),p.state.next({...n}))},Us=(h,b={})=>{const y=h?je(h):o,E=je(y),$=h&&!_e(h)?E:o;if(b.keepDefaultValues||(o=y),!b.keepValues){if(b.keepDirtyValues||g)for(const k of l.mount)C(n.dirtyFields,k)?U($,k,C(a,k)):dt(k,C($,k));else{if(ao&&J(h))for(const k of l.mount){const A=C(i,k);if(A&&A._f){const q=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Rr(q)){const ee=q.closest("form");if(ee){ee.reset();break}}}}i={}}a=e.shouldUnregister?b.keepDefaultValues?je(o):{}:je($),p.array.next({values:{...$}}),p.values.next({values:{...$}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!c.isValid||!!b.keepIsValid,s.watch=!!e.shouldUnregister,p.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!ut(h,o)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&h?po(o,h):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Hs=(h,b)=>Us(Je(h)?h(a):h,b);return{control:{register:_o,unregister:yo,getFieldState:Rs,handleSubmit:zs,setError:js,_executeSchema:F,_getWatch:Q,_getDirty:R,_updateValid:w,_removeUnmounted:B,_updateFieldArray:T,_updateDisabledField:Vs,_getFieldArray:ve,_reset:Us,_resetDefaultValues:()=>Je(r.defaultValues)&&r.defaultValues().then(h=>{Hs(h,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:h=>{n={...n,...h}},_disableForm:Rm,_subjects:p,_proxyFormState:c,get _fields(){return i},get _formValues(){return a},get _state(){return s},set _state(h){s=h},get _defaultValues(){return o},get _names(){return l},set _names(h){l=h},get _formState(){return n},set _formState(h){n=h},get _options(){return r},set _options(h){r={...r,...h}}},trigger:bo,register:_o,handleSubmit:zs,watch:Lm,setValue:dt,getValues:Ls,reset:Hs,resetField:jm,clearErrors:Fm,unregister:yo,setError:js,setFocus:(h,b={})=>{const y=C(i,h),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),b.shouldSelect&&$.select())}},getFieldState:Rs}}function Ur(e={}){const t=ke.useRef(),r=ke.useRef(),[n,i]=ke.useState({isDirty:!1,isValidating:!1,isLoading:Je(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Je(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Uv(e,()=>i(a=>({...a}))),formState:n});const o=t.current.control;return o._options=e,Pv({subject:o._subjects.state,next:a=>{Av(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),ke.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),ke.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==n.isDirty&&o._subjects.state.next({isDirty:a})}},[o,n.isDirty]),ke.useEffect(()=>{e.values&&!ut(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values):o._resetDefaultValues()},[e.values,o]),ke.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Tv(n,o),t.current}var Is=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Hv=function(e,t){var r=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Is(o.ref,i,e):o.refs&&o.refs.forEach(function(a){return Is(a,i,e)})};for(var n in t.fields)r(n)},qv=function(e,t){t.shouldUseNativeValidation&&Hv(e,t);var r={};for(var n in e){var i=C(t.fields,n),o=Object.assign(e[n]||{},{ref:i&&i.ref});if(Wv(t.names||Object.keys(e),n)){var a=Object.assign({},Kv(C(r,n)));U(a,"root",o),U(r,n,a)}else U(r,n,o)}return r},Kv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Wv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},Gv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var i=n.path.map(function(s){return s.key}).join(".");if(r[i]||(r[i]={message:n.message,type:n.validation}),t){var o=r[i].types,a=o&&o[n.validation];r[i]=hs(i,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},Hr=function(e,t,r){return r===void 0&&(r={}),function(n,i,o){try{return Promise.resolve(function(a,s){try{var l=function(){function d(c){return{values:r.raw?n:c,errors:{}}}var f=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?d(lr(e,n,f)):Promise.resolve(jd(e,n,f)).then(d)}()}catch(d){return s(d)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof an)return{values:{},errors:qv(Gv(a,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}};const Os=27,Ts=12,As=10,Yv=Ht("enum"),Xv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Hr(Ce({checked:li(si(ii()),r=>Object.entries(r).filter(([n,i])=>i).map(([n,i])=>n),[cr(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),ur(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Zv=ne(({option:e,...t},r)=>u(Y,{children:[u("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),u("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Ps=Sr("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:is}}}),Jv=({input:e,onSubmitSuccess:t})=>{var d,f;const r=e.key?(d=P.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,i=n&&e.config.options.length===2,{register:o,handleSubmit:a,formState:{errors:s}}=Ur({defaultValues:{checked:n?{}:Yv(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:Xv(e.config)}),l=io();return i?u("ul",{style:{maxHeight:6.5*Os+5*Ts+2*As},class:Ps({variant:"booleanLike"}),children:e.config.options.map((c,p)=>u("li",{class:"flex-1",children:u(as,{type:"submit",ref:g=>{g&&p===0&&(l.current=g)},label:c.label,value:"true",onClick:()=>t({type:"enum",value:[c.value]})})},c.value))}):u("form",{noValidate:!0,onSubmit:c=>a(p=>{const g=p.checked;t({type:"enum",value:g})})(c),children:[u("div",{class:"flex items-center gap-1",children:[u("ul",{style:{maxHeight:6.5*Os+5*Ts+2*As},class:Ps({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((c,p)=>{const g=`checked.${c.value}`,{ref:m,...v}=o(g);return u("li",{class:"relative",children:u(Zv,{option:c,autoFocus:p===0,ref:_=>{_&&p===0&&(l.current=_),m(_)},id:g,...v,onClick:n?()=>t({type:"enum",value:[c.value]}):void 0})},c.value)})}),u("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:u(lt,{}),e.config.minSelected===0&&u(ct,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),u("div",{class:"px-1",children:u(Xt,{error:(f=s.checked)==null?void 0:f.root})})]})},Qv=Ht("number"),qr={number:()=>"Please enter a valid number",min:e=>`Please enter a number greater than or equal to ${e}`,max:e=>`Please enter a number less than or equal to ${e}`,decimalCases:e=>`Please enter a number with at most ${e} decimal cases`},em=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Hr(Ce({number:sn(qr.number(),[Hd(t,qr.min(t)),Ud(r,qr.max(r)),Bd(i=>i===Number(i.toFixed(n)),qr.decimalCases(n))])}))},tm=({input:e,onSubmitSuccess:t})=>{var f;const r=e.config.defaultValue,n=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,{register:i,handleSubmit:o,formState:{errors:a}}=Ur({defaultValues:{number:r?Number(r):Qv(n)?n.value:void 0},resolver:em(e.config)}),{ref:s,...l}=i("number",{required:!e.config.optional,valueAsNumber:!0}),d=L();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-grow",children:[u("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.current=c),s(c)},type:"text",min:e.config.min,max:e.config.max,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest [type=number:-webkit-inner-spin-button] w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all [-webkit-outer-spin-button:none]",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Xt,{error:a.number})]})},Ns=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(to).find(i=>e.startsWith(i[1])),r=t?t[1]:"",n=e.replace(r,"");return/^\d+$/.test(n)?{countryCode:r,phoneNumber:n}:{countryCode:"",phoneNumber:""}},rm="44",mo="That doesn’t look like a valid phone number",Ds=e=>({min:`The phone number needs to be at least ${e.minChars} digits long.`,max:`The phone number can't be longer than ${e.maxChars} digits.`}),nm=Ht("string"),om=xe(mo,[ci(/^\+?[0-9 -]+$/,mo)]),im=xe("Please select a country code",[ci(/^\+?[0-9 -]+$/,mo)]),am=()=>Hr(Ce({countryCode:im,phoneNumber:li(om,e=>e.replace(/[^0-9]/g,""),[])})),sm=({input:e,onSubmitSuccess:t})=>{var g;const r=e.key?(g=P.current$.value.flow)==null?void 0:g.data.submissions[e.key]:void 0,[n,i]=W(),{register:o,handleSubmit:a,formState:{errors:s},watch:l}=Ur({defaultValues:e.config.defaultValue?Ns(e.config.defaultValue):nm(r)?Ns(r.value):{countryCode:rm,phoneNumber:""},resolver:am()}),{ref:d,...f}=o("phoneNumber",{required:!e.config.optional}),c=L(),p=l("countryCode");return fe(()=>{c.current&&(c.current.focus(),c.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:a(m=>{const v=m.phoneNumber.replace(/[^0-9]/g,""),_=m.countryCode.replace(/[^0-9]/g,"");if(i(void 0),v.length+_.length>(e.config.maxChars||1/0))return i(Ds(e.config).max);if(v.length+_.length<(e.config.minChars||0))return i(Ds(e.config).min);t({type:"string",value:p+m.phoneNumber})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[u("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[u("span",{children:["+",p]}),u("select",{...o("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(to).map(([m,v])=>u("option",{value:v,children:[m," (+",v,")"]},m))})]}),u("input",{...f,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:m=>{m&&(c.current=m),d(m)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest flex-1 rounded-r-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Xt,{error:s.countryCode||s.phoneNumber||{message:n}})]})},lm=({input:e,onSubmitSuccess:t})=>u("div",{class:"flex flex-col items-center py-3",children:u("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:u("span",{class:"flex items-center gap-1.5",children:[u("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),u("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("path",{d:"M4 8L8 4L12 8"}),u("path",{d:"M8 4V13"})]})]})})}),go={empty:"Please enter some text",email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number",url:"That doesn’t look like a valid URL"},cm={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},um=Ht("string"),dm=e=>{const t={maxLength:`Please enter no more than ${e.maxChars??999} characters`,minLength:`Please enter ${e.minChars??1} or more characters`};return Hr(Ce({text:{email:xe(go.email,[zd(go.email),ur(e.minChars??1,t.minLength),cr(e.maxChars??1/0,t.maxLength)]),text:xe([ur(e.minChars??1,t.minLength),cr(e.maxChars??1/0,t.maxLength)]),url:xe([qd(go.url),ur(e.minChars??1,t.minLength),cr(e.maxChars??1/0,t.maxLength)])}[e.format]}))},fm=({input:e,onSubmitSuccess:t})=>{var f;const r=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:i,handleSubmit:o,formState:{errors:a}}=Ur({defaultValues:{text:n||(um(r)?r.value:"")},resolver:dm(e.config)}),{ref:s,...l}=i("text",{required:!e.config.optional}),d=L();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(c=>{t({type:"string",value:c.text})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-1",children:[u("input",{id:"chat-input",...l,...cm[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.current=c),s(c)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Xt,{error:a.text})]})},hm=()=>{var i;const e=(i=P.current$.value.flow)==null?void 0:i.data.currentInput,[t,r]=nv(),n=L(null);return P.inputHeight$.value=r.height,V(()=>{const o=n.current;if(o)return o.addEventListener("transitionstart",X.scrollToEnd.smooth),o.addEventListener("transitioncancel",X.scrollToEnd.smooth),o.addEventListener("transitionend",X.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",X.scrollToEnd.smooth),o.removeEventListener("transitioncancel",X.scrollToEnd.smooth),o.removeEventListener("transitionend",X.scrollToEnd.smooth)}},[]),u("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:u("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:We({input:e}).with({input:N.nullish},()=>u("div",{class:"flex items-center gap-2 p-2.5",children:[u("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),u(lt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},o=>u(fm,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"phone"}},o=>u(sm,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"multiple-choice"}},o=>u(Jv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"boolean"}},o=>u(bv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"file"}},o=>u(Sv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"submit"}},o=>u(lm,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"address"}},o=>u(hv,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).with({input:{type:"number"}},o=>u(tm,{onSubmitSuccess:X.onSubmitSuccessFn$.value,...o})).exhaustive()})})};var pm=function(e){return e instanceof RegExp},vm=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Ms=function(e){return typeof e=="string"},mm=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function gm(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!Ms(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;pm(o)||(o=new RegExp("("+vm(o)+")","gi"));for(var a=e.split(o),s=1,l=a.length;s<l;s+=2){if(a[s]===void 0||a[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=a[s].length,n+=a[s-1].length,a[s]=r(a[s],s,n),n+=i}return a}var bm=function(t,r,n){return Array.isArray(t)||(t=[t]),mm(t.map(function(i){return Ms(i)?gm(i,r,n):i}))};const Kr=Pe(bm),ym=/(\[[^\]]+\]\([^)]+\))/g,_m=/\[([^\]]+)\]\(([^)]+)\)/,wm=/(https?:\/\/[^\s]+)/g,xm=/_(.*?)_/g,km=/\*\*(.*?)\*\*/g,Fs="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",$m=e=>{const t=Kr(e,ym,(o,a)=>{const[,s,l]=o.match(_m)??[];return l?u("a",{class:Fs,href:l,children:s??l},l+a):u("span",{children:"INVALID LINK"})}),r=Kr(t,wm,(o,a)=>u("a",{class:Fs,href:o,children:o},o+a)),n=Kr(r,xm,(o,a)=>u("em",{children:o},o+a));return Kr(n,km,(o,a)=>u("strong",{children:o},o+a))},Sm=Sr("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"}}),Cm=({children:e,className:t,animate:r,side:n,...i})=>u("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Sm({className:t,side:n,animate:r}),...i,children:e}),Em=({message:e})=>u("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:u("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,u("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Im=({className:e,...t})=>(V(()=>{X.scrollToEnd.smooth()}),u("div",{"aria-hidden":!0,children:X.isBotTyping$.value===!0?u("div",{"aria-label":"Typing…",class:ot("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>u("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),Om={bot:"left",user:"right"},Tm=Sr("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]"}}}),Am=({lastSentMessageFooter:e})=>{var r;const t=((r=P.current$.value.flow)==null?void 0:r.data.messages)??[];return V(()=>{X.scrollToEnd.smooth()},[t.length]),u("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,i)=>u(Y,{children:u("li",{class:"flex",children:We(n).with({type:"system"},o=>u("p",{class:Tm({variant:o.variant}),children:o.text})).with({type:"text",author:N.union("bot","user")},o=>{const a=o.author==="user"&&!t.slice(i+1).some(d=>d.type==="text"&&d.author==="user"),s=i===t.length-1,l=o.author==="bot"?$m(o.text):o.text;return u(Cm,{animate:s,side:Om[o.author],children:[l,a?e:null]},i)}).with({type:"link"},o=>u(Em,{message:o})).with({type:"image"},o=>u("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:o.url,style:{aspectRatio:o.width/o.height}})).with({type:"file"},o=>u(xv,{class:o.author==="bot"?void 0:"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).with({type:"loading"},o=>{const a=t[t.length-1];return!(o===a)||X.isBotTyping$.value?null:u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(Wa,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),u(Im,{},"typing")]})},Pm=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=P.current$.value;$e(n,"Flow is required to exist to show chatbot body");const i=P.viewState$.value,{chatRef:o,chatService:a}=cv(),[s,l]=W();return fe(()=>{i==="maximised"&&X.scrollToEnd.instant()},[i]),fe(()=>{var v,_;const{state:d,flow:f}=P.current$.peek();if(d!=="loaded")throw new Error($p.invalid_state);let c=f.data.nodeHistory.at(-1);if(X.scrollToEnd.instant(),P.setInput(void 0),f.data.isFinished)return;c===void 0?(c=za(n.nodes).id,P.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:f.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(v=n.analytics)==null?void 0:v.customProperties})):P.removeMessagesSentByNodeIds([c]);const{interpret:p,abort:g,undo:m}=jp({context:n.context,analytics:{service:r,customProperties:(_=n.analytics)==null?void 0:_.customProperties},apiClient:t,logger:e,flow:n,chatService:a,getSubmissions:()=>{var x;return(x=P.current$.peek().flow)==null?void 0:x.data.submissions},onInterpret:(x,w)=>{var T;const I=P.current$.peek().flow;$e(I),w&&(I.data.sequence=I.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:w.id,flow_build:n.build,to_node_id:x.id,sequence:I.data.sequence,flow_session_id:I.data.flowSessionId,job:n.job},customProperties:(T=n.analytics)==null?void 0:T.customProperties})),P.setCurrentNodeId(x.id)},onFlowEnd:async()=>{var w;P.markAsFinished();const x=P.current$.peek().flow;$e(x),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:x.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(w=n.analytics)==null?void 0:w.customProperties})}});return l(()=>m),p(c),g},[r,t,a,e,n]),u(Y,{children:[u("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:P.inputHeight$.value},children:u(Am,{lastSentMessageFooter:n.data.isFinished||!s?null:u(Dm,{undoFn:s})})}),u(hm,{})]})},Nm=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],Dm=({undoFn:e})=>u("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:u("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=P.current$.peek();$e(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(P.removeMessagesSentByNodeIds(n),P.setInput(void 0),n.pop(),n.map(i=>t.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(Nm).forEach(i=>delete t.data.submissions[i]),P.current$.value={...P.current$.value})},children:"Undo"})}),Mm=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Pm},Symbol.toStringTag,{value:"Module"}))})();
|