@inploi/plugin-chatbot 3.13.2 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +7 -7
- package/cdn/style.css +1 -1
- package/dist/{chatbot-body-7af8f509.cjs → chatbot-body-99c5aac3.cjs} +9 -6
- package/dist/{chatbot-body-9e6ca5ed.js → chatbot-body-ff48078c.js} +9 -6
- package/dist/chatbot.api.d.ts +12 -0
- package/dist/{index-0a7f949c.js → index-d464f764.js} +4 -2
- package/dist/{index-189ceee1.cjs → index-fcdedc71.cjs} +4 -2
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/style.css +4 -0
- package/package.json +2 -2
package/cdn/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var Wd=Object.defineProperty;var Kd=(Ze,he,S)=>he in Ze?Wd(Ze,he,{enumerable:!0,configurable:!0,writable:!0,value:S}):Ze[he]=S;var Ys=(Ze,he,S)=>(Kd(Ze,typeof he!="symbol"?he+"":he,S),S);(function(){"use strict";var Ze=e=>e,he,S,Zn,Qn,Qe,Xn,Jn,Ar,ei,ct={},ti=[],Gs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,qt=Array.isArray;function Ae(e,t){for(var r in t)e[r]=t[r];return e}function ri(e){var t=e.parentNode;t&&t.removeChild(e)}function T(e,t,r){var n,o,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?he.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return St(e,s,n,o,null)}function St(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Zn};return o==null&&S.vnode!=null&&S.vnode(i),i}function ni(){return{current:null}}function q(e){return e.children}function ge(e,t){this.props=e,this.context=t}function Yt(e,t){if(t==null)return e.__?Yt(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"?Yt(e):null}function ii(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 ii(e)}}function Ir(e){(!e.__d&&(e.__d=!0)&&Qe.push(e)&&!Gt.__r++||Xn!==S.debounceRendering)&&((Xn=S.debounceRendering)||Jn)(Gt)}function Gt(){var e,t,r,n,o,i,s,a,l;for(Qe.sort(Ar);e=Qe.shift();)e.__d&&(t=Qe.length,n=void 0,o=void 0,i=void 0,a=(s=(r=e).__v).__e,(l=r.__P)&&(n=[],o=[],(i=Ae({},s)).__v=s.__v+1,Dr(l,s,i,r.__n,l.ownerSVGElement!==void 0,s.__h!=null?[a]:null,n,a??Yt(s),s.__h,o),di(n,s,o),s.__e!=a&&ii(s)),Qe.length>t&&Qe.sort(Ar));Gt.__r=0}function oi(e,t,r,n,o,i,s,a,l,u,p){var c,v,b,m,h,_,k,w,P,I,O=0,z=n&&n.__k||ti,W=z.length,N=W,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"?St(null,m,null,null,m):qt(m)?St(q,{children:m},null,null,null):m.__b>0?St(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=r,m.__b=r.__b+1,(w=Zs(m,z,k=c+O,N))===-1?b=ct:(b=z[w]||ct,z[w]=void 0,N--),Dr(e,m,b,o,i,s,a,l,u,p),h=m.__e,(v=m.ref)&&b.ref!=v&&(b.ref&&Tr(b.ref,null,m),p.push(v,m.__c||h,m)),h!=null&&(_==null&&(_=h),I=!(P=b===ct||b.__v===null)&&w===k,P?w==-1&&O--:w!==k&&(w===k+1?(O++,I=!0):w>k?N>F-k?(O+=w-k,I=!0):O--:O=w<k&&w==k-1?w-k:0),k=c+O,I=I||w==c&&!P,typeof m.type!="function"||w===k&&b.__k!==m.__k?typeof m.type=="function"||I?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=h.nextSibling:l=ai(e,h,l):l=si(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,c=W;c--;)z[c]!=null&&(typeof r.type=="function"&&z[c].__e!=null&&z[c].__e==r.__d&&(r.__d=z[c].__e.nextSibling),fi(z[c],z[c]))}function si(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t=typeof n.type=="function"?si(n,t,r):ai(r,n.__e,t));return t}function Ie(e,t){return t=t||[],e==null||typeof e=="boolean"||(qt(e)?e.some(function(r){Ie(r,t)}):t.push(e)),t}function ai(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 Zs(e,t,r,n){var o=e.key,i=e.type,s=r-1,a=r+1,l=t[r];if(l===null||l&&o==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&o==l.key&&i===l.type)return s;s--}if(a<t.length){if((l=t[a])&&o==l.key&&i===l.type)return a;a++}}return-1}function Qs(e,t,r,n,o){var i;for(i in r)i==="children"||i==="key"||i in t||Zt(e,i,null,r[i],n);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||Zt(e,i,t[i],r[i],n)}function ci(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Gs.test(t)?r:r+"px"}function Zt(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||ci(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||ci(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?ui:li,i):e.removeEventListener(t,i?ui:li,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function li(e){return this.l[e.type+!1](S.event?S.event(e):e)}function ui(e){return this.l[e.type+!0](S.event?S.event(e):e)}function Dr(e,t,r,n,o,i,s,a,l,u){var p,c,v,b,m,h,_,k,w,P,I,O,z,W,N,F=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,a=t.__e=r.__e,t.__h=null,i=[a]),(p=S.__b)&&p(t);try{e:if(typeof F=="function"){if(k=t.props,w=(p=F.contextType)&&n[p.__c],P=p?w?w.props.value:p.__:n,r.__c?_=(c=t.__c=r.__c).__=c.__E:("prototype"in F&&F.prototype.render?t.__c=c=new F(k,P):(t.__c=c=new ge(k,P),c.constructor=F,c.render=Js),w&&w.sub(c),c.props=k,c.state||(c.state={}),c.context=P,c.__n=n,v=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),F.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ae({},c.__s)),Ae(c.__s,F.getDerivedStateFromProps(k,c.__s))),b=c.props,m=c.state,c.__v=t,v)F.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(F.getDerivedStateFromProps==null&&k!==b&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(k,P),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(k,c.__s,P)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=k,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(ie){ie&&(ie.__=t)}),I=0;I<c._sb.length;I++)c.__h.push(c._sb[I]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(k,c.__s,P),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(b,m,h)})}if(c.context=P,c.props=k,c.__P=e,c.__e=!1,O=S.__r,z=0,"prototype"in F&&F.prototype.render){for(c.state=c.__s,c.__d=!1,O&&O(t),p=c.render(c.props,c.state,c.context),W=0;W<c._sb.length;W++)c.__h.push(c._sb[W]);c._sb=[]}else do c.__d=!1,O&&O(t),p=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++z<25);c.state=c.__s,c.getChildContext!=null&&(n=Ae(Ae({},n),c.getChildContext())),v||c.getSnapshotBeforeUpdate==null||(h=c.getSnapshotBeforeUpdate(b,m)),oi(e,qt(N=p!=null&&p.type===q&&p.key==null?p.props.children:p)?N:[N],t,r,n,o,i,s,a,l,u),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),_&&(c.__E=c.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Xs(r.__e,t,r,n,o,i,s,l,u);(p=S.diffed)&&p(t)}catch(ie){t.__v=null,(l||i!=null)&&(t.__e=a,t.__h=!!l,i[i.indexOf(a)]=null),S.__e(ie,t,r)}}function di(e,t,r){for(var n=0;n<r.length;n++)Tr(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function Xs(e,t,r,n,o,i,s,a,l){var u,p,c,v=r.props,b=t.props,m=t.type,h=0;if(m==="svg"&&(o=!0),i!=null){for(;h<i.length;h++)if((u=i[h])&&"setAttribute"in u==!!m&&(m?u.localName===m:u.nodeType===3)){e=u,i[h]=null;break}}if(e==null){if(m===null)return document.createTextNode(b);e=o?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,b.is&&b),i=null,a=!1}if(m===null)v===b||a&&e.data===b||(e.data=b);else{if(i=i&&he.call(e.childNodes),p=(v=r.props||ct).dangerouslySetInnerHTML,c=b.dangerouslySetInnerHTML,!a){if(i!=null)for(v={},h=0;h<e.attributes.length;h++)v[e.attributes[h].name]=e.attributes[h].value;(c||p)&&(c&&(p&&c.__html==p.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(Qs(e,b,v,o,a),c)t.__k=[];else if(oi(e,qt(h=t.props.children)?h:[h],t,r,n,o&&m!=="foreignObject",i,s,i?i[0]:r.__k&&Yt(r,0),a,l),i!=null)for(h=i.length;h--;)i[h]!=null&&ri(i[h]);a||("value"in b&&(h=b.value)!==void 0&&(h!==e.value||m==="progress"&&!h||m==="option"&&h!==v.value)&&Zt(e,"value",h,v.value,!1),"checked"in b&&(h=b.checked)!==void 0&&h!==e.checked&&Zt(e,"checked",h,v.checked,!1))}return e}function Tr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function fi(e,t,r){var n,o;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Tr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){S.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&fi(n[o],t,r||typeof e.type!="function");r||e.__e==null||ri(e.__e),e.__=e.__e=e.__d=void 0}function Js(e,t,r){return this.constructor(e,r)}function lt(e,t,r){var n,o,i,s;S.__&&S.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Dr(t,e=(!n&&r||t).__k=T(q,null,[e]),o||ct,ct,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?he.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,s),di(i,e,s)}function pi(e,t){lt(e,t,pi)}function ea(e,t,r){var n,o,i,s,a=Ae({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?he.call(arguments,2):r),St(e.type,a,n||e.key,o||e.ref,null)}function Et(e,t){var r={__c:t="__cC"+ei++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,Ir(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),a&&a.call(s)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}he=ti.slice,S={__e:function(e,t,r,n){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Zn=0,Qn=function(e){return e!=null&&e.constructor===void 0},ge.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ae({},this.state),typeof e=="function"&&(e=e(Ae({},r),this.props)),e&&Ae(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ir(this))},ge.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ir(this))},ge.prototype.render=q,Qe=[],Jn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(e,t){return e.__v.__b-t.__v.__b},Gt.__r=0,ei=0;var Nr=class extends Error{constructor(t){super(t[0].message);Ys(this,"issues");this.name="ValiError",this.issues=t}};function hi(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Ct(e){return{issues:e}}function Le(e){return{output:e}}function ta(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 ra(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Re(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return Le(e);let o,i,s=e;for(const a of t){const l=a._parse(s);if(l.issues){o=o||ra(r,n);for(const u of l.issues){const p=ta(o,u);i?i.push(p):i=[p]}if(o.abortEarly||o.abortPipeEarly)break}else s=l.output}return i?Ct(i):Le(s)}function Ve(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function vi(e){return typeof e=="function"?e():e}function Ot(e,t,r,n){return Ct([{validation:e,message:vi(t),input:r,requirement:n}])}function na(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,s]=Ve(t,r);return[e,i,s]}const[n,o]=Ve(e,t);return[void 0,n,o]}function Xe(e,t,r,n,o,i){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:vi(n),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function mi(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Re(t,this.pipe,r,"any")}}}function gi(e,t,r){const[n="Invalid type",o]=Ve(t,r);return{type:"array",async:!1,item:e,message:n,pipe:o,_parse(i,s){if(!Array.isArray(i))return Xe(s,"type","array",this.message,i);let a;const l=[];for(let u=0;u<i.length;u++){const p=i[u],c=this.item._parse(p,s);if(c.issues){const v={type:"array",input:i,key:u,value:p};for(const b of c.issues)b.path?b.path.unshift(v):b.path=[v],a==null||a.push(b);if(a||(a=c.issues),s!=null&&s.abortEarly)break}else l.push(c.output)}return a?Ct(a):Re(l,this.pipe,s,"array")}}}function ia(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="boolean"?Xe(i,"type","boolean",this.message,o):Re(o,this.pipe,i,"boolean")}}}function oa(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="number"||isNaN(o)?Xe(i,"type","number",this.message,o):Re(o,this.pipe,i,"number")}}}function Be(e,t,r,n){const[o,i="Invalid type",s]=na(t,r,n);let a;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:s,_parse(l,u){if(!l||typeof l!="object")return Xe(u,"type","object",this.message,l);a=a||Object.entries(this.entries);let p;const c={};for(const[v,b]of a){const m=l[v],h=b._parse(m,u);if(h.issues){const _={type:"object",input:l,key:v,value:m};for(const k of h.issues)k.path?k.path.unshift(_):k.path=[_],p==null||p.push(k);if(p||(p=h.issues),u!=null&&u.abortEarly)break}else(h.output!==void 0||v in l)&&(c[v]=h.output)}if(this.rest&&!(u!=null&&u.abortEarly&&p)){for(const v in l)if(!(v in this.entries)){const b=l[v],m=this.rest._parse(b,u);if(m.issues){const h={type:"object",input:l,key:v,value:b};for(const _ of m.issues)_.path?_.path.unshift(h):_.path=[h],p==null||p.push(_);if(p||(p=m.issues),u!=null&&u.abortEarly)break}else c[v]=m.output}}return p?Ct(p):Re(c,this.pipe,u,"object")}}}function sa(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?Le(r):Xe(n,"type","picklist",this.message,r)}}}function be(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="string"?Xe(i,"type","string",this.message,o):Re(o,this.pipe,i,"string")}}}function aa(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=Ve(r,n);return[e,t,s,a]}const[o,i]=Ve(t,r);return[be(),e,o,i]}var ca=["__proto__","prototype","constructor"];function bi(e,t,r,n){const[o,i,s="Invalid type",a]=aa(e,t,r,n);return{type:"record",async:!1,key:o,value:i,message:s,pipe:a,_parse(l,u){if(!l||typeof l!="object")return Xe(u,"type","record",this.message,l);let p;const c={};for(const[v,b]of Object.entries(l))if(!ca.includes(v)){let m;const h=this.key._parse(v,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(h.issues){m={type:"record",input:l,key:v,value:b};for(const k of h.issues)k.path=[m],p==null||p.push(k);if(p||(p=h.issues),u!=null&&u.abortEarly)break}const _=this.value._parse(b,u);if(_.issues){m=m||{type:"record",input:l,key:v,value:b};for(const k of _.issues)k.path?k.path.unshift(m):k.path=[m],p==null||p.push(k);if(p||(p=_.issues),u!=null&&u.abortEarly)break}!h.issues&&!_.issues&&(c[h.output]=_.output)}return p?Ct(p):Re(c,this.pipe,u,"record")}}}function Pt(e,t,r){const n=e._parse(t,r);if(n.issues)throw new Nr(n.issues);return n.output}async function la(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new Nr(n.issues);return n.output}function yi(e,t,r){return{...e,_parse(n,o){const i=e._parse(n,o);if(i.issues)return i;const s=t(i.output);return r&&!Array.isArray(r)?r._parse(s,o):Re(s,r,o,typeof s)}}}var ua=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function da(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:ua,_parse(t){return this.requirement.test(t)?Le(t):Ot(this.type,this.message,t,this.requirement)}}}function At(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ot(this.type,this.message,r,this.requirement):Le(r)}}}function wi(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ot(this.type,this.message,r,this.requirement):Le(r)}}}function fa(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?Le(r):Ot(this.type,this.message,r,this.requirement)}}}function pa(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)?Le(t):Ot(this.type,this.message,t,this.requirement)}}}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ue.apply(this,arguments)}var De,j,Fr,_i,ut=0,xi=[],Qt=[],ki=S.__b,$i=S.__r,Si=S.diffed,Ei=S.__c,Ci=S.unmount;function Je(e,t){S.__h&&S.__h(j,e,ut||t),ut=0;var r=j.__H||(j.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Qt}),r.__[e]}function Y(e){return ut=1,Xt(Di,e)}function Xt(e,t,r){var n=Je(De++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Di(void 0,t),function(a){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,a);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=j,!j.u)){var o=function(a,l,u){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(v){return v.__c});if(p.every(function(v){return!v.__N}))return!i||i.call(this,a,l,u);var c=!1;return p.forEach(function(v){if(v.__N){var b=v.__[0];v.__=v.__N,v.__N=void 0,b!==v.__[0]&&(c=!0)}}),!(!c&&n.__c.props===a)&&(!i||i.call(this,a,l,u))};j.u=!0;var i=j.shouldComponentUpdate,s=j.componentWillUpdate;j.componentWillUpdate=function(a,l,u){if(this.__e){var p=i;i=void 0,o(a,l,u),i=p}s&&s.call(this,a,l,u)},j.shouldComponentUpdate=o}return n.__N||n.__}function V(e,t){var r=Je(De++,3);!S.__s&&Lr(r.__H,t)&&(r.__=e,r.i=t,j.__H.__h.push(r))}function ye(e,t){var r=Je(De++,4);!S.__s&&Lr(r.__H,t)&&(r.__=e,r.i=t,j.__h.push(r))}function L(e){return ut=5,se(function(){return{current:e}},[])}function Oi(e,t,r){ut=6,ye(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function se(e,t){var r=Je(De++,7);return Lr(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ve(e,t){return ut=8,se(function(){return e},t)}function Jt(e){var t=j.context[e.__c],r=Je(De++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(j)),t.props.value):e.__}function Pi(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function ha(e){var t=Je(De++,10),r=Y();return t.__=e,j.componentDidCatch||(j.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Ai(){var e=Je(De++,11);if(!e.__){for(var t=j.__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 va(){for(var e;e=xi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(er),e.__H.__h.forEach(Mr),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){j=null,ki&&ki(e)},S.__r=function(e){$i&&$i(e),De=0;var t=(j=e.__c).__H;t&&(Fr===j?(t.__h=[],j.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Qt,r.__N=r.i=void 0})):(t.__h.forEach(er),t.__h.forEach(Mr),t.__h=[],De=0)),Fr=j},S.diffed=function(e){Si&&Si(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(xi.push(t)!==1&&_i===S.requestAnimationFrame||((_i=S.requestAnimationFrame)||ma)(va)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Qt&&(r.__=r.__V),r.i=void 0,r.__V=Qt})),Fr=j=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(er),r.__h=r.__h.filter(function(n){return!n.__||Mr(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),Ei&&Ei(e,t)},S.unmount=function(e){Ci&&Ci(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{er(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var Ii=typeof requestAnimationFrame=="function";function ma(e){var t,r=function(){clearTimeout(n),Ii&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Ii&&(t=requestAnimationFrame(r))}function er(e){var t=j,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),j=t}function Mr(e){var t=j;e.__c=e.__(),j=t}function Lr(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Di(e,t){return typeof t=="function"?t(e):t}function Ti(e,t){for(var r in t)e[r]=t[r];return e}function Rr(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 Vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function tr(e){this.props=e}function Ni(e,t){function r(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:Rr(this.props,o)}function n(o){return this.shouldComponentUpdate=r,T(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(tr.prototype=new ge).isPureReactComponent=!0,tr.prototype.shouldComponentUpdate=function(e,t){return Rr(this.props,e)||Rr(this.state,t)};var Fi=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Fi&&Fi(e)};var ga=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ae(e){function t(r){var n=Ti({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=ga,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Mi=function(e,t){return e==null?null:Ie(Ie(e).map(t))},Te={map:Mi,forEach:Mi,count:function(e){return e?Ie(e).length:0},only:function(e){var t=Ie(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ie},ba=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}ba(e,t,r,n)};var Li=S.unmount;function Ri(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=Ti({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Ri(n,t,r)})),e}function Vi(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Vi(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 dt(){this.__u=0,this.t=null,this.__b=null}function Bi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Br(e){var t,r,n;function o(i){if(t||(t=e()).then(function(s){r=s.default||s},function(s){n=s}),n)throw n;if(!r)throw t;return T(r,i)}return o.displayName="Lazy",o.__f=!0,o}function ft(){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),Li&&Li(e)},(dt.prototype=new ge).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=Bi(n.__v),i=!1,s=function(){i||(i=!0,r.__R=null,o?o(a):a())};r.__R=s;var a=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=Vi(u,u.__c.__P,u.__c.__O)}var p;for(n.setState({__a:n.__b=null});p=n.t.pop();)p.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},dt.prototype.componentWillUnmount=function(){this.t=[]},dt.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]=Ri(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&T(q,null,e.fallback);return o&&(o.__h=null),[T(q,null,t.__a?null:e.children),o]};var ji=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 ya(e){return this.getChildContext=function(){return e.context},e.children}function wa(e){var t=this,r=e.i;t.componentWillUnmount=function(){lt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),lt(T(ya,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ui(e,t){var r=T(wa,{__v:e,i:t});return r.containerInfo=t,r}(ft.prototype=new ge).__a=function(e){var t=this,r=Bi(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),ji(t,e,n)):o()};r?r(i):i()}},ft.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ie(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},ft.prototype.componentDidUpdate=ft.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){ji(e,r,t)})};var zi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,_a=/^(?: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]/,xa=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ka=/[A-Z0-9]/g,$a=typeof document<"u",Sa=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Hi(e,t,r){return t.__k==null&&(t.textContent=""),lt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Wi(e,t,r){return pi(e,t),typeof r=="function"&&r(),e?e.__c:null}ge.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ge.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ki=S.event;function Ea(){}function Ca(){return this.cancelBubble}function Oa(){return this.defaultPrevented}S.event=function(e){return Ki&&(e=Ki(e)),e.persist=Ea,e.isPropagationStopped=Ca,e.isDefaultPrevented=Oa,e.nativeEvent=e};var jr,Pa={enumerable:!1,configurable:!0,get:function(){return this.class}},qi=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var s=r[i];if(!(i==="value"&&"defaultValue"in r&&s==null||$a&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||n!=="input"&&n!=="textarea"||Sa(r.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":xa.test(i)?i=a:n.indexOf("-")===-1&&_a.test(i)?i=i.replace(ka,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Ie(r.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Ie(r.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Pa)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=zi,qi&&qi(e)};var Yi=S.__r;S.__r=function(e){Yi&&Yi(e),jr=e.__c};var Gi=S.diffed;S.diffed=function(e){Gi&&Gi(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),jr=null};var Zi={ReactCurrentDispatcher:{current:{readContext:function(e){return jr.__n[e.__c].props.value}}}},Aa="17.0.2";function Qi(e){return T.bind(null,e)}function et(e){return!!e&&e.$$typeof===zi}function pt(e){return et(e)?ea.apply(null,arguments):e}function Xi(e){return!!e.__k&&(lt(null,e),!0)}function Ji(e){return e&&(e.base||e.nodeType===1&&e)||null}var eo=function(e,t){return e(t)},rr=function(e,t){return e(t)},to=q;function Ur(e){e()}function ro(e){return e}function no(){return[!1,Ur]}var io=ye;function oo(e,t){var r=t(),n=Y({h:{__:r,v:t}}),o=n[0].h,i=n[1];return ye(function(){o.__=r,o.v=t,Vr(o.__,t())||i({h:o})},[e,r,t]),V(function(){return Vr(o.__,o.v())||i({h:o}),e(function(){Vr(o.__,o.v())||i({h:o})})},[e]),r}var xe={useState:Y,useId:Ai,useReducer:Xt,useEffect:V,useLayoutEffect:ye,useInsertionEffect:io,useTransition:no,useDeferredValue:ro,useSyncExternalStore:oo,startTransition:Ur,useRef:L,useImperativeHandle:Oi,useMemo:se,useCallback:ve,useContext:Jt,useDebugValue:Pi,version:"17.0.2",Children:Te,render:Hi,hydrate:Wi,unmountComponentAtNode:Xi,createPortal:Ui,createElement:T,createContext:Et,createFactory:Qi,cloneElement:pt,createRef:ni,Fragment:q,isValidElement:et,findDOMNode:Ji,Component:ge,PureComponent:tr,memo:Ni,forwardRef:ae,flushSync:rr,unstable_batchedUpdates:eo,StrictMode:to,Suspense:dt,SuspenseList:ft,lazy:Br,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Zi};const Ia=Object.freeze(Object.defineProperty({__proto__:null,Children:Te,Component:ge,Fragment:q,PureComponent:tr,StrictMode:to,Suspense:dt,SuspenseList:ft,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Zi,cloneElement:pt,createContext:Et,createElement:T,createFactory:Qi,createPortal:Ui,createRef:ni,default:xe,findDOMNode:Ji,flushSync:rr,forwardRef:ae,hydrate:Wi,isValidElement:et,lazy:Br,memo:Ni,render:Hi,startTransition:Ur,unmountComponentAtNode:Xi,unstable_batchedUpdates:eo,useCallback:ve,useContext:Jt,useDebugValue:Pi,useDeferredValue:ro,useEffect:V,useErrorBoundary:ha,useId:Ai,useImperativeHandle:Oi,useInsertionEffect:io,useLayoutEffect:ye,useMemo:se,useReducer:Xt,useRef:L,useState:Y,useSyncExternalStore:oo,useTransition:no,version:Aa},Symbol.toStringTag,{value:"Module"}));function ht(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Da(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function so(...e){return t=>e.forEach(r=>Da(r,t))}function It(...e){return ve(so(...e),e)}function Ta(e,t=[]){let r=[];function n(i,s){const a=Et(s),l=r.length;r=[...r,s];function u(c){const{scope:v,children:b,...m}=c,h=(v==null?void 0:v[e][l])||a,_=se(()=>m,Object.values(m));return T(h.Provider,{value:_},b)}function p(c,v){const b=(v==null?void 0:v[e][l])||a,m=Jt(b);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const o=()=>{const i=r.map(s=>Et(s));return function(a){const l=(a==null?void 0:a[e])||i;return se(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,Na(o,...t)]}function Na(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((a,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...a,...c}},{});return se(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}const zr=globalThis!=null&&globalThis.document?ye:()=>{},Fa=Ia["useId".toString()]||(()=>{});let Ma=0;function Hr(e){const[t,r]=Y(Fa());return zr(()=>{e||r(n=>n??String(Ma++))},[e]),e||(t?`radix-${t}`:"")}function tt(e){const t=L(e);return V(()=>{t.current=e}),se(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function La({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Ra({defaultProp:t,onChange:r}),i=e!==void 0,s=i?e:n,a=tt(r),l=ve(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else o(u)},[i,e,o,a]);return[s,l]}function Ra({defaultProp:e,onChange:t}){const r=Y(e),[n]=r,o=L(n),i=tt(t);return V(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const Wr=ae((e,t)=>{const{children:r,...n}=e,o=Te.toArray(r),i=o.find(Ba);if(i){const s=i.props.children,a=o.map(l=>l===i?Te.count(s)>1?Te.only(null):et(s)?s.props.children:null:l);return T(Kr,ue({},n,{ref:t}),et(s)?pt(s,void 0,a):null)}return T(Kr,ue({},n,{ref:t}),r)});Wr.displayName="Slot";const Kr=ae((e,t)=>{const{children:r,...n}=e;return et(r)?pt(r,{...ja(n,r.props),ref:t?so(t,r.ref):r.ref}):Te.count(r)>1?Te.only(null):null});Kr.displayName="SlotClone";const Va=({children:e})=>T(q,null,e);function Ba(e){return et(e)&&e.type===Va}function ja(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{i(...a),o(...a)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const qr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=ae((n,o)=>{const{asChild:i,...s}=n,a=i?Wr:t;return V(()=>{window[Symbol.for("radix-ui")]=!0},[]),T(a,ue({},s,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ua(e,t){e&&rr(()=>e.dispatchEvent(t))}function za(e,t=globalThis==null?void 0:globalThis.document){const r=tt(e);V(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Yr="dismissableLayer.update",Ha="dismissableLayer.pointerDownOutside",Wa="dismissableLayer.focusOutside";let ao;const Ka=Et({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qa=ae((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...u}=e,p=Jt(Ka),[c,v]=Y(null),b=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=Y({}),h=It(t,N=>v(N)),_=Array.from(p.layers),[k]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),w=_.indexOf(k),P=c?_.indexOf(c):-1,I=p.layersWithOutsidePointerEventsDisabled.size>0,O=P>=w,z=Ya(N=>{const F=N.target,ie=[...p.branches].some(ee=>ee.contains(F));!O||ie||(i==null||i(N),a==null||a(N),N.defaultPrevented||l==null||l())},b),W=Ga(N=>{const F=N.target;[...p.branches].some(ee=>ee.contains(F))||(s==null||s(N),a==null||a(N),N.defaultPrevented||l==null||l())},b);return za(N=>{P===p.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},b),V(()=>{if(c)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(ao=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(c)),p.layers.add(c),co(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=ao)}},[c,b,n,p]),V(()=>()=>{c&&(p.layers.delete(c),p.layersWithOutsidePointerEventsDisabled.delete(c),co())},[c,p]),V(()=>{const N=()=>m({});return document.addEventListener(Yr,N),()=>document.removeEventListener(Yr,N)},[]),T(qr.div,ue({},u,{ref:h,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:ht(e.onFocusCapture,W.onFocusCapture),onBlurCapture:ht(e.onBlurCapture,W.onBlurCapture),onPointerDownCapture:ht(e.onPointerDownCapture,z.onPointerDownCapture)}))});function Ya(e,t=globalThis==null?void 0:globalThis.document){const r=tt(e),n=L(!1),o=L(()=>{});return V(()=>{const i=a=>{if(a.target&&!n.current){let u=function(){lo(Ha,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Ga(e,t=globalThis==null?void 0:globalThis.document){const r=tt(e),n=L(!1);return V(()=>{const o=i=>{i.target&&!n.current&&lo(Wa,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function co(){const e=new CustomEvent(Yr);document.dispatchEvent(e)}function lo(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Ua(o,i):o.dispatchEvent(i)}const Gr="focusScope.autoFocusOnMount",Zr="focusScope.autoFocusOnUnmount",uo={bubbles:!1,cancelable:!0},Za=ae((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=Y(null),u=tt(o),p=tt(i),c=L(null),v=It(t,h=>l(h)),b=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V(()=>{if(n){let h=function(P){if(b.paused||!a)return;const I=P.target;a.contains(I)?c.current=I:je(c.current,{select:!0})},_=function(P){if(b.paused||!a)return;const I=P.relatedTarget;I!==null&&(a.contains(I)||je(c.current,{select:!0}))},k=function(P){if(document.activeElement===document.body)for(const O of P)O.removedNodes.length>0&&je(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",_);const w=new MutationObserver(k);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",_),w.disconnect()}}},[n,a,b.paused]),V(()=>{if(a){ho.add(b);const h=document.activeElement;if(!a.contains(h)){const k=new CustomEvent(Gr,uo);a.addEventListener(Gr,u),a.dispatchEvent(k),k.defaultPrevented||(Qa(rc(fo(a)),{select:!0}),document.activeElement===h&&je(a))}return()=>{a.removeEventListener(Gr,u),setTimeout(()=>{const k=new CustomEvent(Zr,uo);a.addEventListener(Zr,p),a.dispatchEvent(k),k.defaultPrevented||je(h??document.body,{select:!0}),a.removeEventListener(Zr,p),ho.remove(b)},0)}}},[a,u,p,b]);const m=ve(h=>{if(!r&&!n||b.paused)return;const _=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,k=document.activeElement;if(_&&k){const w=h.currentTarget,[P,I]=Xa(w);P&&I?!h.shiftKey&&k===I?(h.preventDefault(),r&&je(P,{select:!0})):h.shiftKey&&k===P&&(h.preventDefault(),r&&je(I,{select:!0})):k===w&&h.preventDefault()}},[r,n,b.paused]);return T(qr.div,ue({tabIndex:-1},s,{ref:v,onKeyDown:m}))});function Qa(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(je(n,{select:t}),document.activeElement!==r)return}function Xa(e){const t=fo(e),r=po(t,e),n=po(t.reverse(),e);return[r,n]}function fo(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function po(e,t){for(const r of e)if(!Ja(r,{upTo:t}))return r}function Ja(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 ec(e){return e instanceof HTMLInputElement&&"select"in e}function je(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ec(e)&&t&&e.select()}}const ho=tc();function tc(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=vo(e,t),e.unshift(t)},remove(t){var r;e=vo(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function vo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function rc(e){return e.filter(t=>t.tagName!=="A")}function nc(e,t){return Xt((r,n)=>{const o=t[r][n];return o??r},e)}const Qr=e=>{const{present:t,children:r}=e,n=ic(t),o=typeof r=="function"?r({present:n.isPresent}):Te.only(r),i=It(n.ref,o.ref);return typeof r=="function"||n.isPresent?pt(o,{ref:i}):null};Qr.displayName="Presence";function ic(e){const[t,r]=Y(),n=L({}),o=L(e),i=L("none"),s=e?"mounted":"unmounted",[a,l]=nc(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(()=>{const u=nr(n.current);i.current=a==="mounted"?u:"none"},[a]),zr(()=>{const u=n.current,p=o.current;if(p!==e){const v=i.current,b=nr(u);e?l("MOUNT"):b==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&v!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),zr(()=>{if(t){const u=c=>{const b=nr(n.current).includes(c.animationName);c.target===t&&b&&rr(()=>l("ANIMATION_END"))},p=c=>{c.target===t&&(i.current=nr(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:ve(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function nr(e){return(e==null?void 0:e.animationName)||"none"}let Xr=0;function oc(){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:mo()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:mo()),Xr++,()=>{Xr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Xr--}},[])}function mo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Se=function(){return Se=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Se.apply(this,arguments)};function go(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function sc(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var ir="right-scroll-bar-position",or="width-before-scroll-bar",ac="with-scroll-bars-hidden",cc="--removed-body-scroll-bar-size";function lc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function uc(e,t){var r=Y(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function dc(e,t){return uc(t||null,function(r){return e.forEach(function(n){return lc(n,r)})})}function fc(e){return e}function pc(e,t){t===void 0&&(t=fc);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(i),s=r}var l=function(){var p=s;s=[],p.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(p){s.push(p),u()},filter:function(p){return s=s.filter(p),r}}}};return o}function hc(e){e===void 0&&(e={});var t=pc(null);return t.options=Se({async:!0,ssr:!1},e),t}var bo=function(e){var t=e.sideCar,r=go(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 T(n,Se({},r))};bo.isSideCarExport=!0;function vc(e,t){return e.useMedium(t),bo}var yo=hc(),Jr=function(){},sr=ae(function(e,t){var r=L(null),n=Y({onScrollCapture:Jr,onWheelCapture:Jr,onTouchMoveCapture:Jr}),o=n[0],i=n[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,c=e.shards,v=e.sideCar,b=e.noIsolation,m=e.inert,h=e.allowPinchZoom,_=e.as,k=_===void 0?"div":_,w=go(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),P=v,I=dc([r,t]),O=Se(Se({},w),o);return T(q,null,p&&T(P,{sideCar:yo,removeScrollBar:u,shards:c,noIsolation:b,inert:m,setCallbacks:i,allowPinchZoom:!!h,lockRef:r}),s?pt(Te.only(a),Se(Se({},O),{ref:I})):T(k,Se({},O,{className:l,ref:I}),a))});sr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},sr.classNames={fullWidth:or,zeroRight:ir};var wo,mc=function(){if(wo)return wo;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mc();return t&&e.setAttribute("nonce",t),e}function bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var wc=function(){var e=0,t=null;return{add:function(r){e==0&&(t=gc())&&(bc(t,r),yc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_c=function(){var e=wc();return function(t,r){V(function(){return e.add(t),function(){e.remove()}},[t&&r])}},_o=function(){var e=_c(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},xc={left:0,top:0,right:0,gap:0},en=function(e){return parseInt(e||"",10)||0},kc=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[en(r),en(n),en(o)]},$c=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return xc;var t=kc(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])}},Sc=_o(),Ec=function(e,t,r,n){var o=e.left,i=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
var Wd=Object.defineProperty;var Kd=(Ze,he,S)=>he in Ze?Wd(Ze,he,{enumerable:!0,configurable:!0,writable:!0,value:S}):Ze[he]=S;var Gs=(Ze,he,S)=>(Kd(Ze,typeof he!="symbol"?he+"":he,S),S);(function(){"use strict";var Ze=e=>e,he,S,Zn,Qn,Qe,Xn,Jn,Ar,ei,lt={},ti=[],Zs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,qt=Array.isArray;function Ae(e,t){for(var r in t)e[r]=t[r];return e}function ri(e){var t=e.parentNode;t&&t.removeChild(e)}function T(e,t,r){var n,o,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?he.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return St(e,s,n,o,null)}function St(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Zn};return o==null&&S.vnode!=null&&S.vnode(i),i}function ni(){return{current:null}}function q(e){return e.children}function me(e,t){this.props=e,this.context=t}function Yt(e,t){if(t==null)return e.__?Yt(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"?Yt(e):null}function ii(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 ii(e)}}function Ir(e){(!e.__d&&(e.__d=!0)&&Qe.push(e)&&!Gt.__r++||Xn!==S.debounceRendering)&&((Xn=S.debounceRendering)||Jn)(Gt)}function Gt(){var e,t,r,n,o,i,s,a,c;for(Qe.sort(Ar);e=Qe.shift();)e.__d&&(t=Qe.length,n=void 0,o=void 0,i=void 0,a=(s=(r=e).__v).__e,(c=r.__P)&&(n=[],o=[],(i=Ae({},s)).__v=s.__v+1,Dr(c,s,i,r.__n,c.ownerSVGElement!==void 0,s.__h!=null?[a]:null,n,a??Yt(s),s.__h,o),di(n,s,o),s.__e!=a&&ii(s)),Qe.length>t&&Qe.sort(Ar));Gt.__r=0}function oi(e,t,r,n,o,i,s,a,c,u,p){var l,v,b,g,h,_,k,w,P,I,O=0,z=n&&n.__k||ti,W=z.length,N=W,F=t.length;for(r.__k=[],l=0;l<F;l++)(g=r.__k[l]=(g=t[l])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?St(null,g,null,null,g):qt(g)?St(q,{children:g},null,null,null):g.__b>0?St(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(w=Qs(g,z,k=l+O,N))===-1?b=lt:(b=z[w]||lt,z[w]=void 0,N--),Dr(e,g,b,o,i,s,a,c,u,p),h=g.__e,(v=g.ref)&&b.ref!=v&&(b.ref&&Tr(b.ref,null,g),p.push(v,g.__c||h,g)),h!=null&&(_==null&&(_=h),I=!(P=b===lt||b.__v===null)&&w===k,P?w==-1&&O--:w!==k&&(w===k+1?(O++,I=!0):w>k?N>F-k?(O+=w-k,I=!0):O--:O=w<k&&w==k-1?w-k:0),k=l+O,I=I||w==l&&!P,typeof g.type!="function"||w===k&&b.__k!==g.__k?typeof g.type=="function"||I?g.__d!==void 0?(c=g.__d,g.__d=void 0):c=h.nextSibling:c=ai(e,h,c):c=si(g,c,e),typeof r.type=="function"&&(r.__d=c)));for(r.__e=_,l=W;l--;)z[l]!=null&&(typeof r.type=="function"&&z[l].__e!=null&&z[l].__e==r.__d&&(r.__d=z[l].__e.nextSibling),fi(z[l],z[l]))}function si(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t=typeof n.type=="function"?si(n,t,r):ai(r,n.__e,t));return t}function Ie(e,t){return t=t||[],e==null||typeof e=="boolean"||(qt(e)?e.some(function(r){Ie(r,t)}):t.push(e)),t}function ai(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 Qs(e,t,r,n){var o=e.key,i=e.type,s=r-1,a=r+1,c=t[r];if(c===null||c&&o==c.key&&i===c.type)return r;if(n>(c!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&o==c.key&&i===c.type)return a;a++}}return-1}function Xs(e,t,r,n,o){var i;for(i in r)i==="children"||i==="key"||i in t||Zt(e,i,null,r[i],n);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||Zt(e,i,t[i],r[i],n)}function li(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Zs.test(t)?r:r+"px"}function Zt(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||li(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||li(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?ui:ci,i):e.removeEventListener(t,i?ui:ci,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function ci(e){return this.l[e.type+!1](S.event?S.event(e):e)}function ui(e){return this.l[e.type+!0](S.event?S.event(e):e)}function Dr(e,t,r,n,o,i,s,a,c,u){var p,l,v,b,g,h,_,k,w,P,I,O,z,W,N,F=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(c=r.__h,a=t.__e=r.__e,t.__h=null,i=[a]),(p=S.__b)&&p(t);try{e:if(typeof F=="function"){if(k=t.props,w=(p=F.contextType)&&n[p.__c],P=p?w?w.props.value:p.__:n,r.__c?_=(l=t.__c=r.__c).__=l.__E:("prototype"in F&&F.prototype.render?t.__c=l=new F(k,P):(t.__c=l=new me(k,P),l.constructor=F,l.render=ea),w&&w.sub(l),l.props=k,l.state||(l.state={}),l.context=P,l.__n=n,v=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),F.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Ae({},l.__s)),Ae(l.__s,F.getDerivedStateFromProps(k,l.__s))),b=l.props,g=l.state,l.__v=t,v)F.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(F.getDerivedStateFromProps==null&&k!==b&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(k,P),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(k,l.__s,P)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(l.props=k,l.state=l.__s,l.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(ie){ie&&(ie.__=t)}),I=0;I<l._sb.length;I++)l.__h.push(l._sb[I]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(k,l.__s,P),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(b,g,h)})}if(l.context=P,l.props=k,l.__P=e,l.__e=!1,O=S.__r,z=0,"prototype"in F&&F.prototype.render){for(l.state=l.__s,l.__d=!1,O&&O(t),p=l.render(l.props,l.state,l.context),W=0;W<l._sb.length;W++)l.__h.push(l._sb[W]);l._sb=[]}else do l.__d=!1,O&&O(t),p=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++z<25);l.state=l.__s,l.getChildContext!=null&&(n=Ae(Ae({},n),l.getChildContext())),v||l.getSnapshotBeforeUpdate==null||(h=l.getSnapshotBeforeUpdate(b,g)),oi(e,qt(N=p!=null&&p.type===q&&p.key==null?p.props.children:p)?N:[N],t,r,n,o,i,s,a,c,u),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Js(r.__e,t,r,n,o,i,s,c,u);(p=S.diffed)&&p(t)}catch(ie){t.__v=null,(c||i!=null)&&(t.__e=a,t.__h=!!c,i[i.indexOf(a)]=null),S.__e(ie,t,r)}}function di(e,t,r){for(var n=0;n<r.length;n++)Tr(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function Js(e,t,r,n,o,i,s,a,c){var u,p,l,v=r.props,b=t.props,g=t.type,h=0;if(g==="svg"&&(o=!0),i!=null){for(;h<i.length;h++)if((u=i[h])&&"setAttribute"in u==!!g&&(g?u.localName===g:u.nodeType===3)){e=u,i[h]=null;break}}if(e==null){if(g===null)return document.createTextNode(b);e=o?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,b.is&&b),i=null,a=!1}if(g===null)v===b||a&&e.data===b||(e.data=b);else{if(i=i&&he.call(e.childNodes),p=(v=r.props||lt).dangerouslySetInnerHTML,l=b.dangerouslySetInnerHTML,!a){if(i!=null)for(v={},h=0;h<e.attributes.length;h++)v[e.attributes[h].name]=e.attributes[h].value;(l||p)&&(l&&(p&&l.__html==p.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(Xs(e,b,v,o,a),l)t.__k=[];else if(oi(e,qt(h=t.props.children)?h:[h],t,r,n,o&&g!=="foreignObject",i,s,i?i[0]:r.__k&&Yt(r,0),a,c),i!=null)for(h=i.length;h--;)i[h]!=null&&ri(i[h]);a||("value"in b&&(h=b.value)!==void 0&&(h!==e.value||g==="progress"&&!h||g==="option"&&h!==v.value)&&Zt(e,"value",h,v.value,!1),"checked"in b&&(h=b.checked)!==void 0&&h!==e.checked&&Zt(e,"checked",h,v.checked,!1))}return e}function Tr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function fi(e,t,r){var n,o;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Tr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){S.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&fi(n[o],t,r||typeof e.type!="function");r||e.__e==null||ri(e.__e),e.__=e.__e=e.__d=void 0}function ea(e,t,r){return this.constructor(e,r)}function ct(e,t,r){var n,o,i,s;S.__&&S.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Dr(t,e=(!n&&r||t).__k=T(q,null,[e]),o||lt,lt,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?he.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,s),di(i,e,s)}function pi(e,t){ct(e,t,pi)}function ta(e,t,r){var n,o,i,s,a=Ae({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?he.call(arguments,2):r),St(e.type,a,n||e.key,o||e.ref,null)}function Et(e,t){var r={__c:t="__cC"+ei++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,Ir(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),a&&a.call(s)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}he=ti.slice,S={__e:function(e,t,r,n){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Zn=0,Qn=function(e){return e!=null&&e.constructor===void 0},me.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ae({},this.state),typeof e=="function"&&(e=e(Ae({},r),this.props)),e&&Ae(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ir(this))},me.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ir(this))},me.prototype.render=q,Qe=[],Jn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(e,t){return e.__v.__b-t.__v.__b},Gt.__r=0,ei=0;var Nr=class extends Error{constructor(t){super(t[0].message);Gs(this,"issues");this.name="ValiError",this.issues=t}};function hi(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Ct(e){return{issues:e}}function Le(e){return{output:e}}function ra(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 na(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Re(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return Le(e);let o,i,s=e;for(const a of t){const c=a._parse(s);if(c.issues){o=o||na(r,n);for(const u of c.issues){const p=ra(o,u);i?i.push(p):i=[p]}if(o.abortEarly||o.abortPipeEarly)break}else s=c.output}return i?Ct(i):Le(s)}function Ve(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function vi(e){return typeof e=="function"?e():e}function Ot(e,t,r,n){return Ct([{validation:e,message:vi(t),input:r,requirement:n}])}function ia(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,s]=Ve(t,r);return[e,i,s]}const[n,o]=Ve(e,t);return[void 0,n,o]}function Xe(e,t,r,n,o,i){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:vi(n),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function gi(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Re(t,this.pipe,r,"any")}}}function mi(e,t,r){const[n="Invalid type",o]=Ve(t,r);return{type:"array",async:!1,item:e,message:n,pipe:o,_parse(i,s){if(!Array.isArray(i))return Xe(s,"type","array",this.message,i);let a;const c=[];for(let u=0;u<i.length;u++){const p=i[u],l=this.item._parse(p,s);if(l.issues){const v={type:"array",input:i,key:u,value:p};for(const b of l.issues)b.path?b.path.unshift(v):b.path=[v],a==null||a.push(b);if(a||(a=l.issues),s!=null&&s.abortEarly)break}else c.push(l.output)}return a?Ct(a):Re(c,this.pipe,s,"array")}}}function oa(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="boolean"?Xe(i,"type","boolean",this.message,o):Re(o,this.pipe,i,"boolean")}}}function bi(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="number"||isNaN(o)?Xe(i,"type","number",this.message,o):Re(o,this.pipe,i,"number")}}}function Be(e,t,r,n){const[o,i="Invalid type",s]=ia(t,r,n);let a;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:s,_parse(c,u){if(!c||typeof c!="object")return Xe(u,"type","object",this.message,c);a=a||Object.entries(this.entries);let p;const l={};for(const[v,b]of a){const g=c[v],h=b._parse(g,u);if(h.issues){const _={type:"object",input:c,key:v,value:g};for(const k of h.issues)k.path?k.path.unshift(_):k.path=[_],p==null||p.push(k);if(p||(p=h.issues),u!=null&&u.abortEarly)break}else(h.output!==void 0||v in c)&&(l[v]=h.output)}if(this.rest&&!(u!=null&&u.abortEarly&&p)){for(const v in c)if(!(v in this.entries)){const b=c[v],g=this.rest._parse(b,u);if(g.issues){const h={type:"object",input:c,key:v,value:b};for(const _ of g.issues)_.path?_.path.unshift(h):_.path=[h],p==null||p.push(_);if(p||(p=g.issues),u!=null&&u.abortEarly)break}else l[v]=g.output}}return p?Ct(p):Re(l,this.pipe,u,"object")}}}function sa(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?Le(r):Xe(n,"type","picklist",this.message,r)}}}function be(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="string"?Xe(i,"type","string",this.message,o):Re(o,this.pipe,i,"string")}}}function aa(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=Ve(r,n);return[e,t,s,a]}const[o,i]=Ve(t,r);return[be(),e,o,i]}var la=["__proto__","prototype","constructor"];function yi(e,t,r,n){const[o,i,s="Invalid type",a]=aa(e,t,r,n);return{type:"record",async:!1,key:o,value:i,message:s,pipe:a,_parse(c,u){if(!c||typeof c!="object")return Xe(u,"type","record",this.message,c);let p;const l={};for(const[v,b]of Object.entries(c))if(!la.includes(v)){let g;const h=this.key._parse(v,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(h.issues){g={type:"record",input:c,key:v,value:b};for(const k of h.issues)k.path=[g],p==null||p.push(k);if(p||(p=h.issues),u!=null&&u.abortEarly)break}const _=this.value._parse(b,u);if(_.issues){g=g||{type:"record",input:c,key:v,value:b};for(const k of _.issues)k.path?k.path.unshift(g):k.path=[g],p==null||p.push(k);if(p||(p=_.issues),u!=null&&u.abortEarly)break}!h.issues&&!_.issues&&(l[h.output]=_.output)}return p?Ct(p):Re(l,this.pipe,u,"record")}}}function Pt(e,t,r){const n=e._parse(t,r);if(n.issues)throw new Nr(n.issues);return n.output}async function ca(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new Nr(n.issues);return n.output}function wi(e,t,r){return{...e,_parse(n,o){const i=e._parse(n,o);if(i.issues)return i;const s=t(i.output);return r&&!Array.isArray(r)?r._parse(s,o):Re(s,r,o,typeof s)}}}var ua=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function da(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:ua,_parse(t){return this.requirement.test(t)?Le(t):Ot(this.type,this.message,t,this.requirement)}}}function At(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ot(this.type,this.message,r,this.requirement):Le(r)}}}function _i(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ot(this.type,this.message,r,this.requirement):Le(r)}}}function fa(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?Le(r):Ot(this.type,this.message,r,this.requirement)}}}function pa(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)?Le(t):Ot(this.type,this.message,t,this.requirement)}}}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ue.apply(this,arguments)}var De,j,Fr,xi,ut=0,ki=[],Qt=[],$i=S.__b,Si=S.__r,Ei=S.diffed,Ci=S.__c,Oi=S.unmount;function Je(e,t){S.__h&&S.__h(j,e,ut||t),ut=0;var r=j.__H||(j.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Qt}),r.__[e]}function Y(e){return ut=1,Xt(Ti,e)}function Xt(e,t,r){var n=Je(De++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Ti(void 0,t),function(a){var c=n.__N?n.__N[0]:n.__[0],u=n.t(c,a);c!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=j,!j.u)){var o=function(a,c,u){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(v){return v.__c});if(p.every(function(v){return!v.__N}))return!i||i.call(this,a,c,u);var l=!1;return p.forEach(function(v){if(v.__N){var b=v.__[0];v.__=v.__N,v.__N=void 0,b!==v.__[0]&&(l=!0)}}),!(!l&&n.__c.props===a)&&(!i||i.call(this,a,c,u))};j.u=!0;var i=j.shouldComponentUpdate,s=j.componentWillUpdate;j.componentWillUpdate=function(a,c,u){if(this.__e){var p=i;i=void 0,o(a,c,u),i=p}s&&s.call(this,a,c,u)},j.shouldComponentUpdate=o}return n.__N||n.__}function V(e,t){var r=Je(De++,3);!S.__s&&Lr(r.__H,t)&&(r.__=e,r.i=t,j.__H.__h.push(r))}function ye(e,t){var r=Je(De++,4);!S.__s&&Lr(r.__H,t)&&(r.__=e,r.i=t,j.__h.push(r))}function L(e){return ut=5,se(function(){return{current:e}},[])}function Pi(e,t,r){ut=6,ye(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function se(e,t){var r=Je(De++,7);return Lr(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ve(e,t){return ut=8,se(function(){return e},t)}function Jt(e){var t=j.context[e.__c],r=Je(De++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(j)),t.props.value):e.__}function Ai(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function ha(e){var t=Je(De++,10),r=Y();return t.__=e,j.componentDidCatch||(j.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Ii(){var e=Je(De++,11);if(!e.__){for(var t=j.__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 va(){for(var e;e=ki.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(er),e.__H.__h.forEach(Mr),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){j=null,$i&&$i(e)},S.__r=function(e){Si&&Si(e),De=0;var t=(j=e.__c).__H;t&&(Fr===j?(t.__h=[],j.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Qt,r.__N=r.i=void 0})):(t.__h.forEach(er),t.__h.forEach(Mr),t.__h=[],De=0)),Fr=j},S.diffed=function(e){Ei&&Ei(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ki.push(t)!==1&&xi===S.requestAnimationFrame||((xi=S.requestAnimationFrame)||ga)(va)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Qt&&(r.__=r.__V),r.i=void 0,r.__V=Qt})),Fr=j=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(er),r.__h=r.__h.filter(function(n){return!n.__||Mr(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),Ci&&Ci(e,t)},S.unmount=function(e){Oi&&Oi(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{er(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var Di=typeof requestAnimationFrame=="function";function ga(e){var t,r=function(){clearTimeout(n),Di&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Di&&(t=requestAnimationFrame(r))}function er(e){var t=j,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),j=t}function Mr(e){var t=j;e.__c=e.__(),j=t}function Lr(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Ti(e,t){return typeof t=="function"?t(e):t}function Ni(e,t){for(var r in t)e[r]=t[r];return e}function Rr(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 Vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function tr(e){this.props=e}function Fi(e,t){function r(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:Rr(this.props,o)}function n(o){return this.shouldComponentUpdate=r,T(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(tr.prototype=new me).isPureReactComponent=!0,tr.prototype.shouldComponentUpdate=function(e,t){return Rr(this.props,e)||Rr(this.state,t)};var Mi=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Mi&&Mi(e)};var ma=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ae(e){function t(r){var n=Ni({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=ma,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Li=function(e,t){return e==null?null:Ie(Ie(e).map(t))},Te={map:Li,forEach:Li,count:function(e){return e?Ie(e).length:0},only:function(e){var t=Ie(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ie},ba=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}ba(e,t,r,n)};var Ri=S.unmount;function Vi(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=Ni({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Vi(n,t,r)})),e}function Bi(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Bi(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 dt(){this.__u=0,this.t=null,this.__b=null}function ji(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Br(e){var t,r,n;function o(i){if(t||(t=e()).then(function(s){r=s.default||s},function(s){n=s}),n)throw n;if(!r)throw t;return T(r,i)}return o.displayName="Lazy",o.__f=!0,o}function ft(){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),Ri&&Ri(e)},(dt.prototype=new me).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=ji(n.__v),i=!1,s=function(){i||(i=!0,r.__R=null,o?o(a):a())};r.__R=s;var a=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=Bi(u,u.__c.__P,u.__c.__O)}var p;for(n.setState({__a:n.__b=null});p=n.t.pop();)p.forceUpdate()}},c=t.__h===!0;n.__u++||c||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},dt.prototype.componentWillUnmount=function(){this.t=[]},dt.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]=Vi(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&T(q,null,e.fallback);return o&&(o.__h=null),[T(q,null,t.__a?null:e.children),o]};var Ui=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 ya(e){return this.getChildContext=function(){return e.context},e.children}function wa(e){var t=this,r=e.i;t.componentWillUnmount=function(){ct(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),ct(T(ya,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function zi(e,t){var r=T(wa,{__v:e,i:t});return r.containerInfo=t,r}(ft.prototype=new me).__a=function(e){var t=this,r=ji(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),Ui(t,e,n)):o()};r?r(i):i()}},ft.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ie(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},ft.prototype.componentDidUpdate=ft.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ui(e,r,t)})};var Hi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,_a=/^(?: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]/,xa=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ka=/[A-Z0-9]/g,$a=typeof document<"u",Sa=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Wi(e,t,r){return t.__k==null&&(t.textContent=""),ct(e,t),typeof r=="function"&&r(),e?e.__c:null}function Ki(e,t,r){return pi(e,t),typeof r=="function"&&r(),e?e.__c:null}me.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(me.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var qi=S.event;function Ea(){}function Ca(){return this.cancelBubble}function Oa(){return this.defaultPrevented}S.event=function(e){return qi&&(e=qi(e)),e.persist=Ea,e.isPropagationStopped=Ca,e.isDefaultPrevented=Oa,e.nativeEvent=e};var jr,Pa={enumerable:!1,configurable:!0,get:function(){return this.class}},Yi=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var s=r[i];if(!(i==="value"&&"defaultValue"in r&&s==null||$a&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||n!=="input"&&n!=="textarea"||Sa(r.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":xa.test(i)?i=a:n.indexOf("-")===-1&&_a.test(i)?i=i.replace(ka,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Ie(r.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Ie(r.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Pa)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Hi,Yi&&Yi(e)};var Gi=S.__r;S.__r=function(e){Gi&&Gi(e),jr=e.__c};var Zi=S.diffed;S.diffed=function(e){Zi&&Zi(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),jr=null};var Qi={ReactCurrentDispatcher:{current:{readContext:function(e){return jr.__n[e.__c].props.value}}}},Aa="17.0.2";function Xi(e){return T.bind(null,e)}function et(e){return!!e&&e.$$typeof===Hi}function pt(e){return et(e)?ta.apply(null,arguments):e}function Ji(e){return!!e.__k&&(ct(null,e),!0)}function eo(e){return e&&(e.base||e.nodeType===1&&e)||null}var to=function(e,t){return e(t)},rr=function(e,t){return e(t)},ro=q;function Ur(e){e()}function no(e){return e}function io(){return[!1,Ur]}var oo=ye;function so(e,t){var r=t(),n=Y({h:{__:r,v:t}}),o=n[0].h,i=n[1];return ye(function(){o.__=r,o.v=t,Vr(o.__,t())||i({h:o})},[e,r,t]),V(function(){return Vr(o.__,o.v())||i({h:o}),e(function(){Vr(o.__,o.v())||i({h:o})})},[e]),r}var xe={useState:Y,useId:Ii,useReducer:Xt,useEffect:V,useLayoutEffect:ye,useInsertionEffect:oo,useTransition:io,useDeferredValue:no,useSyncExternalStore:so,startTransition:Ur,useRef:L,useImperativeHandle:Pi,useMemo:se,useCallback:ve,useContext:Jt,useDebugValue:Ai,version:"17.0.2",Children:Te,render:Wi,hydrate:Ki,unmountComponentAtNode:Ji,createPortal:zi,createElement:T,createContext:Et,createFactory:Xi,cloneElement:pt,createRef:ni,Fragment:q,isValidElement:et,findDOMNode:eo,Component:me,PureComponent:tr,memo:Fi,forwardRef:ae,flushSync:rr,unstable_batchedUpdates:to,StrictMode:ro,Suspense:dt,SuspenseList:ft,lazy:Br,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Qi};const Ia=Object.freeze(Object.defineProperty({__proto__:null,Children:Te,Component:me,Fragment:q,PureComponent:tr,StrictMode:ro,Suspense:dt,SuspenseList:ft,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Qi,cloneElement:pt,createContext:Et,createElement:T,createFactory:Xi,createPortal:zi,createRef:ni,default:xe,findDOMNode:eo,flushSync:rr,forwardRef:ae,hydrate:Ki,isValidElement:et,lazy:Br,memo:Fi,render:Wi,startTransition:Ur,unmountComponentAtNode:Ji,unstable_batchedUpdates:to,useCallback:ve,useContext:Jt,useDebugValue:Ai,useDeferredValue:no,useEffect:V,useErrorBoundary:ha,useId:Ii,useImperativeHandle:Pi,useInsertionEffect:oo,useLayoutEffect:ye,useMemo:se,useReducer:Xt,useRef:L,useState:Y,useSyncExternalStore:so,useTransition:io,version:Aa},Symbol.toStringTag,{value:"Module"}));function ht(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Da(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ao(...e){return t=>e.forEach(r=>Da(r,t))}function It(...e){return ve(ao(...e),e)}function Ta(e,t=[]){let r=[];function n(i,s){const a=Et(s),c=r.length;r=[...r,s];function u(l){const{scope:v,children:b,...g}=l,h=(v==null?void 0:v[e][c])||a,_=se(()=>g,Object.values(g));return T(h.Provider,{value:_},b)}function p(l,v){const b=(v==null?void 0:v[e][c])||a,g=Jt(b);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const o=()=>{const i=r.map(s=>Et(s));return function(a){const c=(a==null?void 0:a[e])||i;return se(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[n,Na(o,...t)]}function Na(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((a,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...a,...l}},{});return se(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}const zr=globalThis!=null&&globalThis.document?ye:()=>{},Fa=Ia["useId".toString()]||(()=>{});let Ma=0;function Hr(e){const[t,r]=Y(Fa());return zr(()=>{e||r(n=>n??String(Ma++))},[e]),e||(t?`radix-${t}`:"")}function tt(e){const t=L(e);return V(()=>{t.current=e}),se(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function La({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Ra({defaultProp:t,onChange:r}),i=e!==void 0,s=i?e:n,a=tt(r),c=ve(u=>{if(i){const l=typeof u=="function"?u(e):u;l!==e&&a(l)}else o(u)},[i,e,o,a]);return[s,c]}function Ra({defaultProp:e,onChange:t}){const r=Y(e),[n]=r,o=L(n),i=tt(t);return V(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const Wr=ae((e,t)=>{const{children:r,...n}=e,o=Te.toArray(r),i=o.find(Ba);if(i){const s=i.props.children,a=o.map(c=>c===i?Te.count(s)>1?Te.only(null):et(s)?s.props.children:null:c);return T(Kr,ue({},n,{ref:t}),et(s)?pt(s,void 0,a):null)}return T(Kr,ue({},n,{ref:t}),r)});Wr.displayName="Slot";const Kr=ae((e,t)=>{const{children:r,...n}=e;return et(r)?pt(r,{...ja(n,r.props),ref:t?ao(t,r.ref):r.ref}):Te.count(r)>1?Te.only(null):null});Kr.displayName="SlotClone";const Va=({children:e})=>T(q,null,e);function Ba(e){return et(e)&&e.type===Va}function ja(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{i(...a),o(...a)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const qr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=ae((n,o)=>{const{asChild:i,...s}=n,a=i?Wr:t;return V(()=>{window[Symbol.for("radix-ui")]=!0},[]),T(a,ue({},s,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ua(e,t){e&&rr(()=>e.dispatchEvent(t))}function za(e,t=globalThis==null?void 0:globalThis.document){const r=tt(e);V(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Yr="dismissableLayer.update",Ha="dismissableLayer.pointerDownOutside",Wa="dismissableLayer.focusOutside";let lo;const Ka=Et({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qa=ae((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,p=Jt(Ka),[l,v]=Y(null),b=(r=l==null?void 0:l.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=Y({}),h=It(t,N=>v(N)),_=Array.from(p.layers),[k]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),w=_.indexOf(k),P=l?_.indexOf(l):-1,I=p.layersWithOutsidePointerEventsDisabled.size>0,O=P>=w,z=Ya(N=>{const F=N.target,ie=[...p.branches].some(ee=>ee.contains(F));!O||ie||(i==null||i(N),a==null||a(N),N.defaultPrevented||c==null||c())},b),W=Ga(N=>{const F=N.target;[...p.branches].some(ee=>ee.contains(F))||(s==null||s(N),a==null||a(N),N.defaultPrevented||c==null||c())},b);return za(N=>{P===p.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&c&&(N.preventDefault(),c()))},b),V(()=>{if(l)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(lo=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(l)),p.layers.add(l),co(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=lo)}},[l,b,n,p]),V(()=>()=>{l&&(p.layers.delete(l),p.layersWithOutsidePointerEventsDisabled.delete(l),co())},[l,p]),V(()=>{const N=()=>g({});return document.addEventListener(Yr,N),()=>document.removeEventListener(Yr,N)},[]),T(qr.div,ue({},u,{ref:h,style:{pointerEvents:I?O?"auto":"none":void 0,...e.style},onFocusCapture:ht(e.onFocusCapture,W.onFocusCapture),onBlurCapture:ht(e.onBlurCapture,W.onBlurCapture),onPointerDownCapture:ht(e.onPointerDownCapture,z.onPointerDownCapture)}))});function Ya(e,t=globalThis==null?void 0:globalThis.document){const r=tt(e),n=L(!1),o=L(()=>{});return V(()=>{const i=a=>{if(a.target&&!n.current){let u=function(){uo(Ha,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Ga(e,t=globalThis==null?void 0:globalThis.document){const r=tt(e),n=L(!1);return V(()=>{const o=i=>{i.target&&!n.current&&uo(Wa,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function co(){const e=new CustomEvent(Yr);document.dispatchEvent(e)}function uo(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Ua(o,i):o.dispatchEvent(i)}const Gr="focusScope.autoFocusOnMount",Zr="focusScope.autoFocusOnUnmount",fo={bubbles:!1,cancelable:!0},Za=ae((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,c]=Y(null),u=tt(o),p=tt(i),l=L(null),v=It(t,h=>c(h)),b=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V(()=>{if(n){let h=function(P){if(b.paused||!a)return;const I=P.target;a.contains(I)?l.current=I:je(l.current,{select:!0})},_=function(P){if(b.paused||!a)return;const I=P.relatedTarget;I!==null&&(a.contains(I)||je(l.current,{select:!0}))},k=function(P){if(document.activeElement===document.body)for(const O of P)O.removedNodes.length>0&&je(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",_);const w=new MutationObserver(k);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",_),w.disconnect()}}},[n,a,b.paused]),V(()=>{if(a){vo.add(b);const h=document.activeElement;if(!a.contains(h)){const k=new CustomEvent(Gr,fo);a.addEventListener(Gr,u),a.dispatchEvent(k),k.defaultPrevented||(Qa(rl(po(a)),{select:!0}),document.activeElement===h&&je(a))}return()=>{a.removeEventListener(Gr,u),setTimeout(()=>{const k=new CustomEvent(Zr,fo);a.addEventListener(Zr,p),a.dispatchEvent(k),k.defaultPrevented||je(h??document.body,{select:!0}),a.removeEventListener(Zr,p),vo.remove(b)},0)}}},[a,u,p,b]);const g=ve(h=>{if(!r&&!n||b.paused)return;const _=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,k=document.activeElement;if(_&&k){const w=h.currentTarget,[P,I]=Xa(w);P&&I?!h.shiftKey&&k===I?(h.preventDefault(),r&&je(P,{select:!0})):h.shiftKey&&k===P&&(h.preventDefault(),r&&je(I,{select:!0})):k===w&&h.preventDefault()}},[r,n,b.paused]);return T(qr.div,ue({tabIndex:-1},s,{ref:v,onKeyDown:g}))});function Qa(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(je(n,{select:t}),document.activeElement!==r)return}function Xa(e){const t=po(e),r=ho(t,e),n=ho(t.reverse(),e);return[r,n]}function po(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ho(e,t){for(const r of e)if(!Ja(r,{upTo:t}))return r}function Ja(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 el(e){return e instanceof HTMLInputElement&&"select"in e}function je(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&el(e)&&t&&e.select()}}const vo=tl();function tl(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=go(e,t),e.unshift(t)},remove(t){var r;e=go(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function go(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function rl(e){return e.filter(t=>t.tagName!=="A")}function nl(e,t){return Xt((r,n)=>{const o=t[r][n];return o??r},e)}const Qr=e=>{const{present:t,children:r}=e,n=il(t),o=typeof r=="function"?r({present:n.isPresent}):Te.only(r),i=It(n.ref,o.ref);return typeof r=="function"||n.isPresent?pt(o,{ref:i}):null};Qr.displayName="Presence";function il(e){const[t,r]=Y(),n=L({}),o=L(e),i=L("none"),s=e?"mounted":"unmounted",[a,c]=nl(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(()=>{const u=nr(n.current);i.current=a==="mounted"?u:"none"},[a]),zr(()=>{const u=n.current,p=o.current;if(p!==e){const v=i.current,b=nr(u);e?c("MOUNT"):b==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(p&&v!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),zr(()=>{if(t){const u=l=>{const b=nr(n.current).includes(l.animationName);l.target===t&&b&&rr(()=>c("ANIMATION_END"))},p=l=>{l.target===t&&(i.current=nr(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:ve(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function nr(e){return(e==null?void 0:e.animationName)||"none"}let Xr=0;function ol(){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:mo()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:mo()),Xr++,()=>{Xr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Xr--}},[])}function mo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Se=function(){return Se=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Se.apply(this,arguments)};function bo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function sl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var ir="right-scroll-bar-position",or="width-before-scroll-bar",al="with-scroll-bars-hidden",ll="--removed-body-scroll-bar-size";function cl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ul(e,t){var r=Y(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function dl(e,t){return ul(t||null,function(r){return e.forEach(function(n){return cl(n,r)})})}function fl(e){return e}function pl(e,t){t===void 0&&(t=fl);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(i),s=r}var c=function(){var p=s;s=[],p.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(p){s.push(p),u()},filter:function(p){return s=s.filter(p),r}}}};return o}function hl(e){e===void 0&&(e={});var t=pl(null);return t.options=Se({async:!0,ssr:!1},e),t}var yo=function(e){var t=e.sideCar,r=bo(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 T(n,Se({},r))};yo.isSideCarExport=!0;function vl(e,t){return e.useMedium(t),yo}var wo=hl(),Jr=function(){},sr=ae(function(e,t){var r=L(null),n=Y({onScrollCapture:Jr,onWheelCapture:Jr,onTouchMoveCapture:Jr}),o=n[0],i=n[1],s=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,p=e.enabled,l=e.shards,v=e.sideCar,b=e.noIsolation,g=e.inert,h=e.allowPinchZoom,_=e.as,k=_===void 0?"div":_,w=bo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),P=v,I=dl([r,t]),O=Se(Se({},w),o);return T(q,null,p&&T(P,{sideCar:wo,removeScrollBar:u,shards:l,noIsolation:b,inert:g,setCallbacks:i,allowPinchZoom:!!h,lockRef:r}),s?pt(Te.only(a),Se(Se({},O),{ref:I})):T(k,Se({},O,{className:c,ref:I}),a))});sr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},sr.classNames={fullWidth:or,zeroRight:ir};var _o,gl=function(){if(_o)return _o;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ml(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gl();return t&&e.setAttribute("nonce",t),e}function bl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var wl=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ml())&&(bl(t,r),yl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_l=function(){var e=wl();return function(t,r){V(function(){return e.add(t),function(){e.remove()}},[t&&r])}},xo=function(){var e=_l(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},xl={left:0,top:0,right:0,gap:0},en=function(e){return parseInt(e||"",10)||0},kl=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[en(r),en(n),en(o)]},$l=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return xl;var t=kl(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])}},Sl=xo(),El=function(e,t,r,n){var o=e.left,i=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
+
.`.concat(al,` {
|
|
3
3
|
overflow: hidden `).concat(n,`;
|
|
4
4
|
padding-right: `).concat(a,"px ").concat(n,`;
|
|
5
5
|
}
|
|
@@ -33,13 +33,13 @@ var Wd=Object.defineProperty;var Kd=(Ze,he,S)=>he in Ze?Wd(Ze,he,{enumerable:!0,
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(ll,": ").concat(a,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},Cl=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=se(function(){return $l(o)},[o]);return T(Sl,{styles:El(i,!t,o,r?"":"!important")})},tn=!1;if(typeof window<"u")try{var ar=Object.defineProperty({},"passive",{get:function(){return tn=!0,!0}});window.addEventListener("test",ar,ar),window.removeEventListener("test",ar,ar)}catch{tn=!1}var vt=tn?{passive:!1}:!1,Ol=function(e){return e.tagName==="TEXTAREA"},ko=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ol(e)&&r[t]==="visible")},Pl=function(e){return ko(e,"overflowY")},Al=function(e){return ko(e,"overflowX")},$o=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=So(e,r);if(n){var o=Eo(e,r),i=o[1],s=o[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Il=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Dl=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},So=function(e,t){return e==="v"?Pl(t):Al(t)},Eo=function(e,t){return e==="v"?Il(t):Dl(t)},Tl=function(e,t){return e==="h"&&t==="rtl"?-1:1},Nl=function(e,t,r,n,o){var i=Tl(e,window.getComputedStyle(t).direction),s=i*n,a=r.target,c=t.contains(a),u=!1,p=s>0,l=0,v=0;do{var b=Eo(e,a),g=b[0],h=b[1],_=b[2],k=h-_-i*g;(g||k)&&So(e,a)&&(l+=k,v+=g),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(p&&(o&&l===0||!o&&s>l)||!p&&(o&&v===0||!o&&-s>v))&&(u=!0),u},lr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Co=function(e){return[e.deltaX,e.deltaY]},Oo=function(e){return e&&"current"in e?e.current:e},Fl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ml=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},Lc=0,mt=[];function Rc(e){var t=L([]),r=L([0,0]),n=L(),o=Y(Lc++)[0],i=Y(function(){return _o()})[0],s=L(e);V(function(){s.current=e},[e]),V(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=sc([e.lockRef.current],(e.shards||[]).map(Co),!0).filter(Boolean);return h.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=ve(function(h,_){if("touches"in h&&h.touches.length===2)return!s.current.allowPinchZoom;var k=cr(h),w=r.current,P="deltaX"in h?h.deltaX:w[0]-k[0],I="deltaY"in h?h.deltaY:w[1]-k[1],O,z=h.target,W=Math.abs(P)>Math.abs(I)?"h":"v";if("touches"in h&&W==="h"&&z.type==="range")return!1;var N=ko(W,z);if(!N)return!0;if(N?O=W:(O=W==="v"?"h":"v",N=ko(W,z)),!N)return!1;if(!n.current&&"changedTouches"in h&&(P||I)&&(n.current=O),!O)return!0;var F=n.current||O;return Nc(F,_,h,F==="h"?P:I,!0)},[]),l=ve(function(h){var _=h;if(!(!mt.length||mt[mt.length-1]!==i)){var k="deltaY"in _?Eo(_):cr(_),w=t.current.filter(function(O){return O.name===_.type&&O.target===_.target&&Fc(O.delta,k)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var P=(s.current.shards||[]).map(Co).filter(Boolean).filter(function(O){return O.contains(_.target)}),I=P.length>0?a(_,P[0]):!s.current.noIsolation;I&&_.cancelable&&_.preventDefault()}}},[]),u=ve(function(h,_,k,w){var P={name:h,delta:_,target:k,should:w};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(I){return I!==P})},1)},[]),p=ve(function(h){r.current=cr(h),n.current=void 0},[]),c=ve(function(h){u(h.type,Eo(h),h.target,a(h,e.lockRef.current))},[]),v=ve(function(h){u(h.type,cr(h),h.target,a(h,e.lockRef.current))},[]);V(function(){return mt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:v}),document.addEventListener("wheel",l,vt),document.addEventListener("touchmove",l,vt),document.addEventListener("touchstart",p,vt),function(){mt=mt.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,vt),document.removeEventListener("touchmove",l,vt),document.removeEventListener("touchstart",p,vt)}},[]);var b=e.removeScrollBar,m=e.inert;return T(q,null,m?T(i,{styles:Mc(o)}):null,b?T(Cc,{gapMode:"margin"}):null)}const Vc=vc(yo,Rc);var Oo=ae(function(e,t){return T(sr,Se({},e,{ref:t,sideCar:Vc}))});Oo.classNames=sr.classNames;const Bc=Oo;var jc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gt=new WeakMap,lr=new WeakMap,ur={},rn=0,Po=function(e){return e&&(e.host||Po(e.parentNode))},Uc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Po(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})},zc=function(e,t,r,n){var o=Uc(t,Array.isArray(e)?e:[e]);ur[r]||(ur[r]=new WeakMap);var i=ur[r],s=[],a=new Set,l=new Set(o),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};o.forEach(u);var p=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(v){if(a.has(v))p(v);else{var b=v.getAttribute(n),m=b!==null&&b!=="false",h=(gt.get(v)||0)+1,_=(i.get(v)||0)+1;gt.set(v,h),i.set(v,_),s.push(v),h===1&&m&&lr.set(v,!0),_===1&&v.setAttribute(r,"true"),m||v.setAttribute(n,"true")}})};return p(t),a.clear(),rn++,function(){s.forEach(function(c){var v=gt.get(c)-1,b=i.get(c)-1;gt.set(c,v),i.set(c,b),v||(lr.has(c)||c.removeAttribute(n),lr.delete(c)),b||c.removeAttribute(r)}),rn--,rn||(gt=new WeakMap,gt=new WeakMap,lr=new WeakMap,ur={})}},Hc=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||jc(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),zc(n,o,r,"aria-hidden")):function(){return null}};const Ao="Dialog",[Io,Yd]=Ta(Ao),[Wc,bt]=Io(Ao),Kc=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=L(null),l=L(null),[u=!1,p]=La({prop:n,defaultProp:o,onChange:i});return T(Wc,{scope:t,triggerRef:a,contentRef:l,contentId:Hr(),titleId:Hr(),descriptionId:Hr(),open:u,onOpenChange:p,onOpenToggle:ve(()=>p(c=>!c),[p]),modal:s},r)},qc="DialogPortal",[Gd,Do]=Io(qc,{forceMount:void 0}),nn="DialogOverlay",Yc=ae((e,t)=>{const r=Do(nn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=bt(nn,e.__scopeDialog);return i.modal?T(Qr,{present:n||i.open},T(Gc,ue({},o,{ref:t}))):null}),Gc=ae((e,t)=>{const{__scopeDialog:r,...n}=e,o=bt(nn,r);return T(Bc,{as:Wr,allowPinchZoom:!0,shards:[o.contentRef]},T(qr.div,ue({"data-state":No(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Dt="DialogContent",Zc=ae((e,t)=>{const r=Do(Dt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=bt(Dt,e.__scopeDialog);return T(Qr,{present:n||i.open},i.modal?T(Qc,ue({},o,{ref:t})):T(Xc,ue({},o,{ref:t})))}),Qc=ae((e,t)=>{const r=bt(Dt,e.__scopeDialog),n=L(null),o=It(t,r.contentRef,n);return V(()=>{const i=n.current;if(i)return Hc(i)},[]),T(To,ue({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ht(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=r.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ht(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:ht(e.onFocusOutside,i=>i.preventDefault())}))}),Xc=ae((e,t)=>{const r=bt(Dt,e.__scopeDialog),n=L(!1),o=L(!1);return T(To,ue({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),To=ae((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=bt(Dt,r),l=L(null),u=It(t,l);return oc(),T(q,null,T(Za,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},T(qa,ue({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":No(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function No(e){return e?"open":"closed"}const Jc=Kc,el=Yc,tl=Zc;function Fo(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=Fo(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ue(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Fo(e))&&(n&&(n+=" "),n+=t);return n}const Mo=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Lo=Ue,on=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Lo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const p=r==null?void 0:r[u],c=i==null?void 0:i[u];if(p===null)return null;const v=Mo(p)||Mo(c);return o[u][v]}),a=r&&Object.entries(r).reduce((u,p)=>{let[c,v]=p;return v===void 0||(u[c]=v),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,p)=>{let{class:c,className:v,...b}=p;return Object.entries(b).every(m=>{let[h,_]=m;return Array.isArray(_)?_.includes({...i,...a}[h]):{...i,...a}[h]===_})?[...u,c,v]:u},[]);return Lo(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},de=Symbol.for("@ts-pattern/matcher"),Ro=Symbol.for("@ts-pattern/isVariadic"),dr="@ts-pattern/anonymous-select-key",sn=e=>!!(e&&typeof e=="object"),fr=e=>e&&!!e[de],te=(e,t,r)=>{if(fr(e)){const n=e[de](),{matched:o,selections:i}=n.match(t);return o&&i&&Object.keys(i).forEach(s=>r(s,i[s])),o}if(sn(e)){if(!sn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],i=[];for(const s of e.keys()){const a=e[s];fr(a)&&a[Ro]?i.push(a):i.length?o.push(a):n.push(a)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+o.length)return!1;const s=t.slice(0,n.length),a=o.length===0?[]:t.slice(-o.length),l=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((u,p)=>te(u,s[p],r))&&o.every((u,p)=>te(u,a[p],r))&&(i.length===0||te(i[0],l,r))}return e.length===t.length&&e.every((s,a)=>te(s,t[a],r))}return Object.keys(e).every(n=>{const o=e[n];return(n in t||fr(i=o)&&i[de]().matcherType==="optional")&&te(o,t[n],r);var i})}return Object.is(t,e)},me=e=>{var t,r,n;return sn(e)?fr(e)?(t=(r=(n=e[de]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Tt(e,me):Tt(Object.values(e),me):[]},Tt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function rl(...e){if(e.length===1){const[t]=e;return r=>te(t,r,()=>{})}if(e.length===2){const[t,r]=e;return te(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function oe(e){return Object.assign(e,{optional:()=>cn(e),and:t=>K(e,t),or:t=>Vo(e,t),select:t=>t===void 0?Nt(e):Nt(t,e)})}function an(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Ro]:!0})}}))(e),{optional:()=>an(cn(e)),select:t=>an(t===void 0?Nt(e):Nt(t,e))})}function cn(e){return oe({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return t===void 0?(me(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:te(e,t,n),selections:r}},getSelectionKeys:()=>me(e),matcherType:"optional"})})}const nl=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},il=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function K(...e){return oe({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:e.every(o=>te(o,t,n)),selections:r}},getSelectionKeys:()=>Tt(e,me),matcherType:"and"})})}function Vo(...e){return oe({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return Tt(e,me).forEach(o=>n(o,void 0)),{matched:e.some(o=>te(o,t,n)),selections:r}},getSelectionKeys:()=>Tt(e,me),matcherType:"or"})})}function R(e){return{[de]:()=>({match:t=>({matched:!!e(t)})})}}function Nt(...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 oe({[de]:()=>({match:n=>{let o={[t??dr]:n};return{matched:r===void 0||te(r,n,(i,s)=>{o[i]=s}),selections:o}},getSelectionKeys:()=>[t??dr].concat(r===void 0?[]:me(r))})})}function Ee(e){return typeof e=="number"}function rt(e){return typeof e=="string"}function ze(e){return typeof e=="bigint"}const Bo=oe(R(function(e){return!0})),ol=Bo,nt=e=>Object.assign(oe(e),{startsWith:t=>{return nt(K(e,(r=t,R(n=>rt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return nt(K(e,(r=t,R(n=>rt(n)&&n.endsWith(r)))));var r},minLength:t=>nt(K(e,(r=>R(n=>rt(n)&&n.length>=r))(t))),maxLength:t=>nt(K(e,(r=>R(n=>rt(n)&&n.length<=r))(t))),includes:t=>{return nt(K(e,(r=t,R(n=>rt(n)&&n.includes(r)))));var r},regex:t=>{return nt(K(e,(r=t,R(n=>rt(n)&&!!n.match(r)))));var r}}),sl=nt(R(rt)),Ce=e=>Object.assign(oe(e),{between:(t,r)=>Ce(K(e,((n,o)=>R(i=>Ee(i)&&n<=i&&o>=i))(t,r))),lt:t=>Ce(K(e,(r=>R(n=>Ee(n)&&n<r))(t))),gt:t=>Ce(K(e,(r=>R(n=>Ee(n)&&n>r))(t))),lte:t=>Ce(K(e,(r=>R(n=>Ee(n)&&n<=r))(t))),gte:t=>Ce(K(e,(r=>R(n=>Ee(n)&&n>=r))(t))),int:()=>Ce(K(e,R(t=>Ee(t)&&Number.isInteger(t)))),finite:()=>Ce(K(e,R(t=>Ee(t)&&Number.isFinite(t)))),positive:()=>Ce(K(e,R(t=>Ee(t)&&t>0))),negative:()=>Ce(K(e,R(t=>Ee(t)&&t<0)))}),al=Ce(R(Ee)),He=e=>Object.assign(oe(e),{between:(t,r)=>He(K(e,((n,o)=>R(i=>ze(i)&&n<=i&&o>=i))(t,r))),lt:t=>He(K(e,(r=>R(n=>ze(n)&&n<r))(t))),gt:t=>He(K(e,(r=>R(n=>ze(n)&&n>r))(t))),lte:t=>He(K(e,(r=>R(n=>ze(n)&&n<=r))(t))),gte:t=>He(K(e,(r=>R(n=>ze(n)&&n>=r))(t))),positive:()=>He(K(e,R(t=>ze(t)&&t>0))),negative:()=>He(K(e,R(t=>ze(t)&&t<0)))}),cl=He(R(ze)),ll=oe(R(function(e){return typeof e=="boolean"})),ul=oe(R(function(e){return typeof e=="symbol"})),dl=oe(R(function(e){return e==null}));var fe={__proto__:null,matcher:de,optional:cn,array:function(...e){return an({[de]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return me(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,s)=>{n[i]=(n[i]||[]).concat([s])};return{matched:t.every(i=>te(r,i,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:me(e[0])})})},set:function(...e){return oe({[de]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,s)=>{r[i]=(r[i]||[]).concat([s])},o=e[0];return{matched:nl(t,i=>te(o,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:me(e[0])})})},map:function(...e){return oe({[de]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(a,l)=>{r[a]=(r[a]||[]).concat([l])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,s]=e;return{matched:il(t,(a,l)=>{const u=te(i,l,n),p=te(s,a,n);return u&&p}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...me(e[0]),...me(e[1])]})})},intersection:K,union:Vo,not:function(e){return oe({[de]:()=>({match:t=>({matched:!te(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:R,select:Nt,any:Bo,_:ol,string:sl,number:al,bigint:cl,boolean:ll,symbol:ul,nullish:dl,instanceOf:function(e){return oe(R(function(t){return r=>r instanceof t}(e)))},shape:function(e){return oe(R(rl(e)))}};const ln={matched:!1,value:void 0};function Ne(e){return new pr(e,ln)}class pr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,s={};const a=(u,p)=>{i=!0,s[u]=p},l=!n.some(u=>te(u,this.input,a))||o&&!o(this.input)?ln:{matched:!0,value:r(i?dr in s?s[dr]:s:this.input,this.input)};return new pr(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new pr(this.input,n?{matched:!0,value:r(this.input,this.input)}:ln)}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 jo="isdk",fl=44,pl={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"},Zd="";function ke(e,t){if(!e)throw new Error(t)}function hr(){throw new Error("Cycle detected")}var hl=Symbol.for("preact-signals");function un(){if(yt>1)yt--;else{for(var e,t=!1;Ft!==void 0;){var r=Ft;for(Ft=void 0,dn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&zo(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(dn=0,yt--,t)throw e}}var G=void 0,Ft=void 0,yt=0,dn=0,vr=0;function Uo(e){if(G!==void 0){var t=e.n;if(t===void 0||t.t!==G)return t={i:0,S:e,p:G.s,n:void 0,t:G,e:void 0,x:void 0,r:t},G.s!==void 0&&(G.s.n=t),G.s=t,e.n=t,32&G.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=G.s,t.n=void 0,G.s.n=t,G.s=t),t}}function re(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}re.prototype.brand=hl,re.prototype.h=function(){return!0},re.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)},re.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)}},re.prototype.subscribe=function(e){var t=this;return pn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},re.prototype.valueOf=function(){return this.value},re.prototype.toString=function(){return this.value+""},re.prototype.toJSON=function(){return this.value},re.prototype.peek=function(){return this.v},Object.defineProperty(re.prototype,"value",{get:function(){var e=Uo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(G instanceof Ke&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){dn>100&&hr(),this.v=e,this.i++,vr++,yt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{un()}}}});function We(e){return new re(e)}function zo(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 Ho(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 Wo(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 Ke(e){re.call(this,void 0),this.x=e,this.s=void 0,this.g=vr-1,this.f=4}(Ke.prototype=new re).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===vr))return!0;if(this.g=vr,this.f|=1,this.i>0&&!zo(this))return this.f&=-2,!0;var e=G;try{Ho(this),G=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 G=e,Wo(this),this.f&=-2,!0},Ke.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)}re.prototype.S.call(this,e)},Ke.prototype.U=function(e){if(this.t!==void 0&&(re.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)}},Ke.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ke.prototype.peek=function(){if(this.h()||hr(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ke.prototype,"value",{get:function(){1&this.f&&hr();var e=Uo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function vl(e){return new Ke(e)}function Ko(e){var t=e.u;if(e.u=void 0,typeof t=="function"){yt++;var r=G;G=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,fn(e),n}finally{G=r,un()}}}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,Ko(e)}function ml(e){if(G!==this)throw new Error("Out-of-order effect");Wo(this),G=e,this.f&=-2,8&this.f&&fn(this),un()}function Mt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Mt.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()}},Mt.prototype.S=function(){1&this.f&&hr(),this.f|=1,this.f&=-9,Ko(this),Ho(this),yt++;var e=G;return G=this,ml.bind(this,e)},Mt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ft,Ft=this)},Mt.prototype.d=function(){this.f|=8,1&this.f||fn(this)};function pn(e){var t=new Mt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var hn;function wt(e,t){S[e]=t.bind(null,S[e]||function(){})}function mr(e){hn&&hn(),hn=e&&e.S()}function qo(e){var t=this,r=e.data,n=bl(r);n.value=r;var o=se(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Qn(o.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},vl(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}qo.displayName="_st",Object.defineProperties(re.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:qo},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),wt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof re&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),wt("__r",function(e,t){mr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return pn(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),mr(r),e(t)}),wt("__e",function(e,t,r,n){mr(),e(t,r,n)}),wt("diffed",function(e,t){mr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var s in i){var a=i[s];a!==void 0&&!(s in n)&&(a.d(),i[s]=void 0)}else r.U=i={};for(var l in n){var u=i[l],p=n[l];u===void 0?(u=gl(r,l,p,o),i[l]=u):u.o(p,o)}}}e(t)});function gl(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=We(r);return{o:function(s,a){i.value=s,n=a},d:pn(function(){var s=i.value.value;n[t]!==s&&(n[t]=s,o?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}wt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),wt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ge.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function bl(e){return se(function(){return We(e)},[])}const vn=(e,t)=>t.some(r=>e instanceof r);let Yo,Go;function yl(){return Yo||(Yo=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function wl(){return Go||(Go=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const mn=new WeakMap,gn=new WeakMap,gr=new WeakMap;function _l(e){const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{r(it(e.result)),o()},s=()=>{n(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",s)});return gr.set(t,e),t}function xl(e){if(mn.has(e))return;const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{r(),o()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});mn.set(e,t)}let bn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return mn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return it(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 Zo(e){bn=e(bn)}function kl(e){return wl().includes(e)?function(...t){return e.apply(yn(this),t),it(this.request)}:function(...t){return it(e.apply(yn(this),t))}}function $l(e){return typeof e=="function"?kl(e):(e instanceof IDBTransaction&&xl(e),vn(e,yl())?new Proxy(e,bn):e)}function it(e){if(e instanceof IDBRequest)return _l(e);if(gn.has(e))return gn.get(e);const t=$l(e);return t!==e&&(gn.set(e,t),gr.set(t,e)),t}const yn=e=>gr.get(e);function Sl(e,t,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const s=indexedDB.open(e,t),a=it(s);return n&&s.addEventListener("upgradeneeded",l=>{n(it(s.result),l.oldVersion,l.newVersion,it(s.transaction),l)}),r&&s.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const El=["get","getKey","getAll","getAllKeys","count"],Cl=["put","add","delete","clear"],wn=new Map;function Qo(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(wn.get(t))return wn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=Cl.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||El.includes(r)))return;const i=async function(s,...a){const l=this.transaction(s,o?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(a.shift())),(await Promise.all([u[r](...a),o&&l.done]))[0]};return wn.set(t,i),i}Zo(e=>({...e,get:(t,r,n)=>Qo(t,r)||e.get(t,r,n),has:(t,r)=>!!Qo(t,r)||e.has(t,r)}));const Ol=["continue","continuePrimaryKey","advance"],Xo={},_n=new WeakMap,Jo=new WeakMap,Pl={get(e,t){if(!Ol.includes(t))return e[t];let r=Xo[t];return r||(r=Xo[t]=function(...n){_n.set(this,Jo.get(this)[t](...n))}),r}};async function*Al(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Pl);for(Jo.set(r,t),gr.set(r,yn(t));t;)yield r,t=await(_n.get(r)||t.continue()),_n.delete(r)}function es(e,t){return t===Symbol.asyncIterator&&vn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&vn(e,[IDBIndex,IDBObjectStore])}Zo(e=>({...e,get(t,r,n){return es(t,r)?Al:e.get(t,r,n)},has(t,r){return es(t,r)||e.has(t,r)}}));const Lt=e=>Ne(e).with(fe.number.lte(1e3),()=>`${Math.round(e)}KB`).with(fe.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),ts=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Il=e=>Object.entries(e).reduce((r,[n,o])=>(r[n]=o.value,r),{}),xn=e=>t=>t?t.type===e:!1;class Rt extends Error{constructor(){super("Aborted")}}function rs(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const ns=typeof window>"u"?void 0:Sl("inploi-chatbot",2,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Vt={getStateData:async(e,t)=>{var n;const r=is({...e,flowKeys:t});return(n=await ns)==null?void 0:n.get("state",r)},setStateData:rs(async e=>{var r;const t=is(e);return(r=await ns)==null?void 0:r.put("state",e.data,t)},1e3)},br=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const o=e.find(u=>u.id===t.nextId);if(o===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,s=e.find(u=>u.id===i),a=t.type.includes("question")?1:0;if(s){const u=a+Math.max(br(e,o,r,n+a).remainingSteps,br(e,s,r,n+a).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const l=a+br(e,o,r,n+a).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Dl=e=>{const t={},r=e.find(n=>n.isHead);return r&&br(e,r,(n,o)=>{t[n]=o}),t},is=e=>[...e.flowKeys,e.id,e.version].join("/"),qe=We({state:"idle"}),Bt=e=>{const{state:t,flow:r}=qe.value;if(t!=="loaded")return;ke(r,"No flow to update");const n=e(r.data);r.data=n,qe.value={state:t,flow:r},Vt.setStateData(r)},D={current$:qe,viewState$:We("closed"),inputHeight$:We(53),startFlow:async({flow:e,context:t,flowKeys:r,title:n})=>{const i={data:await Vt.getStateData(e,r)??os(),startedAt:new Date,nodeIdToProgress:Dl(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,context:t,title:n};qe.value={state:"loaded",flow:i},Vt.setStateData(i)},cancelCurrentFlow:()=>{qe.value={state:"idle"},D.viewState$.value="closed"},markAsFinished:()=>Bt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Bt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=qe.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=os();qe.value={state:e,flow:{...t,data:r,startedAt:new Date}},Vt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Bt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=qe.value;ke(t==="loaded","Application not loaded");const n=r.data.messages.filter(o=>!o.groupId||!e.includes(o.groupId));r.data.messages=n,Vt.setStateData(r)},setSubmission:(e,t)=>Bt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Bt(t=>({...t,currentInput:e??null}))},Tl=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),os=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Tl()});var Nl=0;function d(e,t,r,n,o,i){var s,a,l={};for(a in t)a=="ref"?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Nl,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return S.vnode&&S.vnode(u),u}const Fl=({message:e})=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:[d("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&d("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Ml=e=>d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:"Loading"}),d("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),ss=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(Ml,{class:"text-neutral-6 h-8 w-8"})}),Ll=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)}%`},yr=({class:e,children:t,...r})=>d("button",{class:Ue("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),Rl=()=>{if(D.current$.value.state!=="loaded")return null;const e=D.current$.value.flow.nodeIdToProgress,t=D.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:Ll(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Vl=({children:e})=>{const t=D.viewState$;return d(q,{children:d("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[d("div",{class:"flex h-[var(--header-height)] gap-2",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?d(q,{children:[d(yr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:d("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),d(yr,{"aria-label":"Close application",onClick:D.cancelCurrentFlow,children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):d(q,{children:[D.current$.value.state==="loaded"&&d(yr,{"aria-label":"Restart",onClick:()=>{D.restart()},children:[d("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(yr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),d(Rl,{})]})})},Bl=Br(()=>Promise.resolve().then(()=>Ld).then(e=>e.ChatbotBody)),jl=on("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),Ul=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:o,error:i}=D.current$.value,s=D.viewState$.value,a=n!=="idle"&&s==="maximised",l=L(null);return d(Jc,{open:a,modal:a,children:[d(el,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0"}),d(tl,{forceMount:!0,asChild:!0,children:d("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",style:{"--header-height":`${fl}px`,"--content-height":"75vh"},class:jl({view:s}),children:d("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[d(Vl,{children:o==null?void 0:o.title}),Ne({state:n,view:s}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>d(ss,{},"loading")).with({state:"loaded"},()=>d(dt,{fallback:d(ss,{},"loading"),children:d(Bl,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>d(Fl,{message:i})).exhaustive()]})})})]})},kn=Be({id:hi(be(),String),version:oa(),nodes:gi(mi())}),zl=Be({flow:kn}),Hl=Be({company:Be({name:be()}),flow:kn,job:Be({id:hi(be(),String),title:be()})}),Wl=Be({flow:kn,title:be(),flowKeys:gi(be()),context:bi(be(),mi())}),Kl=`#isdk{position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{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 .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .right-3{right:.75rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-24{width:6rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-none{flex:none}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}#isdk .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%);height:var(--header-height)}to{transform:translateY(0);height:var(--content-height)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.16,1,.3,1)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#isdk .bg-accent-1{background-color:var(--i-color-a-1)}#isdk .bg-accent-3{background-color:var(--i-color-a-3)}#isdk .bg-accent-9{background-color:var(--i-color-a-9)}#isdk .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}#isdk .bg-lowest{background-color:var(--i-color-lowest)}#isdk .bg-neutral-1{background-color:var(--i-color-n-1)}#isdk .bg-neutral-2{background-color:var(--i-color-n-2)}#isdk .bg-neutral-3{background-color:var(--i-color-n-3)}#isdk .bg-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .px-5{padding-left:1.25rem;padding-right:1.25rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-3{padding-top:.75rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-right{text-align:right}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .font-medium{font-weight:500}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#isdk .leading-3{line-height:.75rem}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}#isdk .outline-none{outline:2px solid transparent;outline-offset:2px}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-accent-4{outline-color:var(--i-color-a-4)}#isdk .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}#isdk .outline-divider{outline-color:var(--i-color-divider)}#isdk .outline-neutral-3{outline-color:var(--i-color-n-3)}#isdk .outline-neutral-6{outline-color:var(--i-color-n-6)}#isdk .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}#isdk .ring-divider{--tw-ring-color: var(--i-color-divider)}#isdk .ring-lowest{--tw-ring-color: var(--i-color-lowest)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#isdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .will-change-\\[height\\]{will-change:height}#isdk .text-wrap-balance{text-wrap:balance}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}#isdk .\\[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 .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-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\: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-10:active{outline-color:var(--i-color-n-10)}#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-7{--tw-ring-color: var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-2{--tw-ring-offset-width: 2px}@media (pointer: coarse){#isdk .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}
|
|
42
|
-
`,
|
|
41
|
+
`)},Ll=0,gt=[];function Rl(e){var t=L([]),r=L([0,0]),n=L(),o=Y(Ll++)[0],i=Y(function(){return xo()})[0],s=L(e);V(function(){s.current=e},[e]),V(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=sl([e.lockRef.current],(e.shards||[]).map(Oo),!0).filter(Boolean);return h.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=ve(function(h,_){if("touches"in h&&h.touches.length===2)return!s.current.allowPinchZoom;var k=lr(h),w=r.current,P="deltaX"in h?h.deltaX:w[0]-k[0],I="deltaY"in h?h.deltaY:w[1]-k[1],O,z=h.target,W=Math.abs(P)>Math.abs(I)?"h":"v";if("touches"in h&&W==="h"&&z.type==="range")return!1;var N=$o(W,z);if(!N)return!0;if(N?O=W:(O=W==="v"?"h":"v",N=$o(W,z)),!N)return!1;if(!n.current&&"changedTouches"in h&&(P||I)&&(n.current=O),!O)return!0;var F=n.current||O;return Nl(F,_,h,F==="h"?P:I,!0)},[]),c=ve(function(h){var _=h;if(!(!gt.length||gt[gt.length-1]!==i)){var k="deltaY"in _?Co(_):lr(_),w=t.current.filter(function(O){return O.name===_.type&&O.target===_.target&&Fl(O.delta,k)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var P=(s.current.shards||[]).map(Oo).filter(Boolean).filter(function(O){return O.contains(_.target)}),I=P.length>0?a(_,P[0]):!s.current.noIsolation;I&&_.cancelable&&_.preventDefault()}}},[]),u=ve(function(h,_,k,w){var P={name:h,delta:_,target:k,should:w};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(I){return I!==P})},1)},[]),p=ve(function(h){r.current=lr(h),n.current=void 0},[]),l=ve(function(h){u(h.type,Co(h),h.target,a(h,e.lockRef.current))},[]),v=ve(function(h){u(h.type,lr(h),h.target,a(h,e.lockRef.current))},[]);V(function(){return gt.push(i),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:v}),document.addEventListener("wheel",c,vt),document.addEventListener("touchmove",c,vt),document.addEventListener("touchstart",p,vt),function(){gt=gt.filter(function(h){return h!==i}),document.removeEventListener("wheel",c,vt),document.removeEventListener("touchmove",c,vt),document.removeEventListener("touchstart",p,vt)}},[]);var b=e.removeScrollBar,g=e.inert;return T(q,null,g?T(i,{styles:Ml(o)}):null,b?T(Cl,{gapMode:"margin"}):null)}const Vl=vl(wo,Rl);var Po=ae(function(e,t){return T(sr,Se({},e,{ref:t,sideCar:Vl}))});Po.classNames=sr.classNames;const Bl=Po;var jl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mt=new WeakMap,cr=new WeakMap,ur={},rn=0,Ao=function(e){return e&&(e.host||Ao(e.parentNode))},Ul=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ao(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})},zl=function(e,t,r,n){var o=Ul(t,Array.isArray(e)?e:[e]);ur[r]||(ur[r]=new WeakMap);var i=ur[r],s=[],a=new Set,c=new Set(o),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};o.forEach(u);var p=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(v){if(a.has(v))p(v);else{var b=v.getAttribute(n),g=b!==null&&b!=="false",h=(mt.get(v)||0)+1,_=(i.get(v)||0)+1;mt.set(v,h),i.set(v,_),s.push(v),h===1&&g&&cr.set(v,!0),_===1&&v.setAttribute(r,"true"),g||v.setAttribute(n,"true")}})};return p(t),a.clear(),rn++,function(){s.forEach(function(l){var v=mt.get(l)-1,b=i.get(l)-1;mt.set(l,v),i.set(l,b),v||(cr.has(l)||l.removeAttribute(n),cr.delete(l)),b||l.removeAttribute(r)}),rn--,rn||(mt=new WeakMap,mt=new WeakMap,cr=new WeakMap,ur={})}},Hl=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||jl(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),zl(n,o,r,"aria-hidden")):function(){return null}};const Io="Dialog",[Do,Yd]=Ta(Io),[Wl,bt]=Do(Io),Kl=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=L(null),c=L(null),[u=!1,p]=La({prop:n,defaultProp:o,onChange:i});return T(Wl,{scope:t,triggerRef:a,contentRef:c,contentId:Hr(),titleId:Hr(),descriptionId:Hr(),open:u,onOpenChange:p,onOpenToggle:ve(()=>p(l=>!l),[p]),modal:s},r)},ql="DialogPortal",[Gd,To]=Do(ql,{forceMount:void 0}),nn="DialogOverlay",Yl=ae((e,t)=>{const r=To(nn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=bt(nn,e.__scopeDialog);return i.modal?T(Qr,{present:n||i.open},T(Gl,ue({},o,{ref:t}))):null}),Gl=ae((e,t)=>{const{__scopeDialog:r,...n}=e,o=bt(nn,r);return T(Bl,{as:Wr,allowPinchZoom:!0,shards:[o.contentRef]},T(qr.div,ue({"data-state":Fo(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Dt="DialogContent",Zl=ae((e,t)=>{const r=To(Dt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=bt(Dt,e.__scopeDialog);return T(Qr,{present:n||i.open},i.modal?T(Ql,ue({},o,{ref:t})):T(Xl,ue({},o,{ref:t})))}),Ql=ae((e,t)=>{const r=bt(Dt,e.__scopeDialog),n=L(null),o=It(t,r.contentRef,n);return V(()=>{const i=n.current;if(i)return Hl(i)},[]),T(No,ue({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ht(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=r.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ht(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:ht(e.onFocusOutside,i=>i.preventDefault())}))}),Xl=ae((e,t)=>{const r=bt(Dt,e.__scopeDialog),n=L(!1),o=L(!1);return T(No,ue({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),No=ae((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=bt(Dt,r),c=L(null),u=It(t,c);return ol(),T(q,null,T(Za,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},T(qa,ue({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Fo(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function Fo(e){return e?"open":"closed"}const Jl=Kl,ec=Yl,tc=Zl;function Mo(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=Mo(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ue(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Mo(e))&&(n&&(n+=" "),n+=t);return n}const Lo=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ro=Ue,on=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ro(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const p=r==null?void 0:r[u],l=i==null?void 0:i[u];if(p===null)return null;const v=Lo(p)||Lo(l);return o[u][v]}),a=r&&Object.entries(r).reduce((u,p)=>{let[l,v]=p;return v===void 0||(u[l]=v),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,p)=>{let{class:l,className:v,...b}=p;return Object.entries(b).every(g=>{let[h,_]=g;return Array.isArray(_)?_.includes({...i,...a}[h]):{...i,...a}[h]===_})?[...u,l,v]:u},[]);return Ro(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},de=Symbol.for("@ts-pattern/matcher"),Vo=Symbol.for("@ts-pattern/isVariadic"),dr="@ts-pattern/anonymous-select-key",sn=e=>!!(e&&typeof e=="object"),fr=e=>e&&!!e[de],te=(e,t,r)=>{if(fr(e)){const n=e[de](),{matched:o,selections:i}=n.match(t);return o&&i&&Object.keys(i).forEach(s=>r(s,i[s])),o}if(sn(e)){if(!sn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],i=[];for(const s of e.keys()){const a=e[s];fr(a)&&a[Vo]?i.push(a):i.length?o.push(a):n.push(a)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+o.length)return!1;const s=t.slice(0,n.length),a=o.length===0?[]:t.slice(-o.length),c=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((u,p)=>te(u,s[p],r))&&o.every((u,p)=>te(u,a[p],r))&&(i.length===0||te(i[0],c,r))}return e.length===t.length&&e.every((s,a)=>te(s,t[a],r))}return Object.keys(e).every(n=>{const o=e[n];return(n in t||fr(i=o)&&i[de]().matcherType==="optional")&&te(o,t[n],r);var i})}return Object.is(t,e)},ge=e=>{var t,r,n;return sn(e)?fr(e)?(t=(r=(n=e[de]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Tt(e,ge):Tt(Object.values(e),ge):[]},Tt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function rc(...e){if(e.length===1){const[t]=e;return r=>te(t,r,()=>{})}if(e.length===2){const[t,r]=e;return te(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function oe(e){return Object.assign(e,{optional:()=>ln(e),and:t=>K(e,t),or:t=>Bo(e,t),select:t=>t===void 0?Nt(e):Nt(t,e)})}function an(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Vo]:!0})}}))(e),{optional:()=>an(ln(e)),select:t=>an(t===void 0?Nt(e):Nt(t,e))})}function ln(e){return oe({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return t===void 0?(ge(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:te(e,t,n),selections:r}},getSelectionKeys:()=>ge(e),matcherType:"optional"})})}const nc=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},ic=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function K(...e){return oe({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:e.every(o=>te(o,t,n)),selections:r}},getSelectionKeys:()=>Tt(e,ge),matcherType:"and"})})}function Bo(...e){return oe({[de]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return Tt(e,ge).forEach(o=>n(o,void 0)),{matched:e.some(o=>te(o,t,n)),selections:r}},getSelectionKeys:()=>Tt(e,ge),matcherType:"or"})})}function R(e){return{[de]:()=>({match:t=>({matched:!!e(t)})})}}function Nt(...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 oe({[de]:()=>({match:n=>{let o={[t??dr]:n};return{matched:r===void 0||te(r,n,(i,s)=>{o[i]=s}),selections:o}},getSelectionKeys:()=>[t??dr].concat(r===void 0?[]:ge(r))})})}function Ee(e){return typeof e=="number"}function rt(e){return typeof e=="string"}function ze(e){return typeof e=="bigint"}const jo=oe(R(function(e){return!0})),oc=jo,nt=e=>Object.assign(oe(e),{startsWith:t=>{return nt(K(e,(r=t,R(n=>rt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return nt(K(e,(r=t,R(n=>rt(n)&&n.endsWith(r)))));var r},minLength:t=>nt(K(e,(r=>R(n=>rt(n)&&n.length>=r))(t))),maxLength:t=>nt(K(e,(r=>R(n=>rt(n)&&n.length<=r))(t))),includes:t=>{return nt(K(e,(r=t,R(n=>rt(n)&&n.includes(r)))));var r},regex:t=>{return nt(K(e,(r=t,R(n=>rt(n)&&!!n.match(r)))));var r}}),sc=nt(R(rt)),Ce=e=>Object.assign(oe(e),{between:(t,r)=>Ce(K(e,((n,o)=>R(i=>Ee(i)&&n<=i&&o>=i))(t,r))),lt:t=>Ce(K(e,(r=>R(n=>Ee(n)&&n<r))(t))),gt:t=>Ce(K(e,(r=>R(n=>Ee(n)&&n>r))(t))),lte:t=>Ce(K(e,(r=>R(n=>Ee(n)&&n<=r))(t))),gte:t=>Ce(K(e,(r=>R(n=>Ee(n)&&n>=r))(t))),int:()=>Ce(K(e,R(t=>Ee(t)&&Number.isInteger(t)))),finite:()=>Ce(K(e,R(t=>Ee(t)&&Number.isFinite(t)))),positive:()=>Ce(K(e,R(t=>Ee(t)&&t>0))),negative:()=>Ce(K(e,R(t=>Ee(t)&&t<0)))}),ac=Ce(R(Ee)),He=e=>Object.assign(oe(e),{between:(t,r)=>He(K(e,((n,o)=>R(i=>ze(i)&&n<=i&&o>=i))(t,r))),lt:t=>He(K(e,(r=>R(n=>ze(n)&&n<r))(t))),gt:t=>He(K(e,(r=>R(n=>ze(n)&&n>r))(t))),lte:t=>He(K(e,(r=>R(n=>ze(n)&&n<=r))(t))),gte:t=>He(K(e,(r=>R(n=>ze(n)&&n>=r))(t))),positive:()=>He(K(e,R(t=>ze(t)&&t>0))),negative:()=>He(K(e,R(t=>ze(t)&&t<0)))}),lc=He(R(ze)),cc=oe(R(function(e){return typeof e=="boolean"})),uc=oe(R(function(e){return typeof e=="symbol"})),dc=oe(R(function(e){return e==null}));var fe={__proto__:null,matcher:de,optional:ln,array:function(...e){return an({[de]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return ge(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,s)=>{n[i]=(n[i]||[]).concat([s])};return{matched:t.every(i=>te(r,i,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},set:function(...e){return oe({[de]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,s)=>{r[i]=(r[i]||[]).concat([s])},o=e[0];return{matched:nc(t,i=>te(o,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},map:function(...e){return oe({[de]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(a,c)=>{r[a]=(r[a]||[]).concat([c])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,s]=e;return{matched:ic(t,(a,c)=>{const u=te(i,c,n),p=te(s,a,n);return u&&p}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ge(e[0]),...ge(e[1])]})})},intersection:K,union:Bo,not:function(e){return oe({[de]:()=>({match:t=>({matched:!te(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:R,select:Nt,any:jo,_:oc,string:sc,number:ac,bigint:lc,boolean:cc,symbol:uc,nullish:dc,instanceOf:function(e){return oe(R(function(t){return r=>r instanceof t}(e)))},shape:function(e){return oe(R(rc(e)))}};const cn={matched:!1,value:void 0};function Ne(e){return new pr(e,cn)}class pr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,s={};const a=(u,p)=>{i=!0,s[u]=p},c=!n.some(u=>te(u,this.input,a))||o&&!o(this.input)?cn:{matched:!0,value:r(i?dr in s?s[dr]:s:this.input,this.input)};return new pr(this.input,c)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new pr(this.input,n?{matched:!0,value:r(this.input,this.input)}:cn)}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 Uo="isdk",fc=44,pc={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"},Zd="";function ke(e,t){if(!e)throw new Error(t)}function hr(){throw new Error("Cycle detected")}var hc=Symbol.for("preact-signals");function un(){if(yt>1)yt--;else{for(var e,t=!1;Ft!==void 0;){var r=Ft;for(Ft=void 0,dn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Ho(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(dn=0,yt--,t)throw e}}var G=void 0,Ft=void 0,yt=0,dn=0,vr=0;function zo(e){if(G!==void 0){var t=e.n;if(t===void 0||t.t!==G)return t={i:0,S:e,p:G.s,n:void 0,t:G,e:void 0,x:void 0,r:t},G.s!==void 0&&(G.s.n=t),G.s=t,e.n=t,32&G.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=G.s,t.n=void 0,G.s.n=t,G.s=t),t}}function re(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}re.prototype.brand=hc,re.prototype.h=function(){return!0},re.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)},re.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)}},re.prototype.subscribe=function(e){var t=this;return pn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},re.prototype.valueOf=function(){return this.value},re.prototype.toString=function(){return this.value+""},re.prototype.toJSON=function(){return this.value},re.prototype.peek=function(){return this.v},Object.defineProperty(re.prototype,"value",{get:function(){var e=zo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(G instanceof Ke&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){dn>100&&hr(),this.v=e,this.i++,vr++,yt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{un()}}}});function We(e){return new re(e)}function Ho(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 Wo(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 Ko(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 Ke(e){re.call(this,void 0),this.x=e,this.s=void 0,this.g=vr-1,this.f=4}(Ke.prototype=new re).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===vr))return!0;if(this.g=vr,this.f|=1,this.i>0&&!Ho(this))return this.f&=-2,!0;var e=G;try{Wo(this),G=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 G=e,Ko(this),this.f&=-2,!0},Ke.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)}re.prototype.S.call(this,e)},Ke.prototype.U=function(e){if(this.t!==void 0&&(re.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)}},Ke.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ke.prototype.peek=function(){if(this.h()||hr(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ke.prototype,"value",{get:function(){1&this.f&&hr();var e=zo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function vc(e){return new Ke(e)}function qo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){yt++;var r=G;G=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,fn(e),n}finally{G=r,un()}}}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,qo(e)}function gc(e){if(G!==this)throw new Error("Out-of-order effect");Ko(this),G=e,this.f&=-2,8&this.f&&fn(this),un()}function Mt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Mt.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()}},Mt.prototype.S=function(){1&this.f&&hr(),this.f|=1,this.f&=-9,qo(this),Wo(this),yt++;var e=G;return G=this,gc.bind(this,e)},Mt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ft,Ft=this)},Mt.prototype.d=function(){this.f|=8,1&this.f||fn(this)};function pn(e){var t=new Mt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var hn;function wt(e,t){S[e]=t.bind(null,S[e]||function(){})}function gr(e){hn&&hn(),hn=e&&e.S()}function Yo(e){var t=this,r=e.data,n=bc(r);n.value=r;var o=se(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Qn(o.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},vc(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}Yo.displayName="_st",Object.defineProperties(re.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Yo},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),wt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof re&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),wt("__r",function(e,t){gr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return pn(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),gr(r),e(t)}),wt("__e",function(e,t,r,n){gr(),e(t,r,n)}),wt("diffed",function(e,t){gr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var s in i){var a=i[s];a!==void 0&&!(s in n)&&(a.d(),i[s]=void 0)}else r.U=i={};for(var c in n){var u=i[c],p=n[c];u===void 0?(u=mc(r,c,p,o),i[c]=u):u.o(p,o)}}}e(t)});function mc(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=We(r);return{o:function(s,a){i.value=s,n=a},d:pn(function(){var s=i.value.value;n[t]!==s&&(n[t]=s,o?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}wt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),wt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),me.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function bc(e){return se(function(){return We(e)},[])}const vn=(e,t)=>t.some(r=>e instanceof r);let Go,Zo;function yc(){return Go||(Go=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function wc(){return Zo||(Zo=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const gn=new WeakMap,mn=new WeakMap,mr=new WeakMap;function _c(e){const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{r(it(e.result)),o()},s=()=>{n(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",s)});return mr.set(t,e),t}function xc(e){if(gn.has(e))return;const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{r(),o()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});gn.set(e,t)}let bn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return gn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return it(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 Qo(e){bn=e(bn)}function kc(e){return wc().includes(e)?function(...t){return e.apply(yn(this),t),it(this.request)}:function(...t){return it(e.apply(yn(this),t))}}function $c(e){return typeof e=="function"?kc(e):(e instanceof IDBTransaction&&xc(e),vn(e,yc())?new Proxy(e,bn):e)}function it(e){if(e instanceof IDBRequest)return _c(e);if(mn.has(e))return mn.get(e);const t=$c(e);return t!==e&&(mn.set(e,t),mr.set(t,e)),t}const yn=e=>mr.get(e);function Sc(e,t,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const s=indexedDB.open(e,t),a=it(s);return n&&s.addEventListener("upgradeneeded",c=>{n(it(s.result),c.oldVersion,c.newVersion,it(s.transaction),c)}),r&&s.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),a.then(c=>{i&&c.addEventListener("close",()=>i()),o&&c.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const Ec=["get","getKey","getAll","getAllKeys","count"],Cc=["put","add","delete","clear"],wn=new Map;function Xo(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(wn.get(t))return wn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=Cc.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||Ec.includes(r)))return;const i=async function(s,...a){const c=this.transaction(s,o?"readwrite":"readonly");let u=c.store;return n&&(u=u.index(a.shift())),(await Promise.all([u[r](...a),o&&c.done]))[0]};return wn.set(t,i),i}Qo(e=>({...e,get:(t,r,n)=>Xo(t,r)||e.get(t,r,n),has:(t,r)=>!!Xo(t,r)||e.has(t,r)}));const Oc=["continue","continuePrimaryKey","advance"],Jo={},_n=new WeakMap,es=new WeakMap,Pc={get(e,t){if(!Oc.includes(t))return e[t];let r=Jo[t];return r||(r=Jo[t]=function(...n){_n.set(this,es.get(this)[t](...n))}),r}};async function*Ac(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Pc);for(es.set(r,t),mr.set(r,yn(t));t;)yield r,t=await(_n.get(r)||t.continue()),_n.delete(r)}function ts(e,t){return t===Symbol.asyncIterator&&vn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&vn(e,[IDBIndex,IDBObjectStore])}Qo(e=>({...e,get(t,r,n){return ts(t,r)?Ac:e.get(t,r,n)},has(t,r){return ts(t,r)||e.has(t,r)}}));const Lt=e=>Ne(e).with(fe.number.lte(1e3),()=>`${Math.round(e)}KB`).with(fe.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),rs=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Ic=e=>Object.entries(e).reduce((r,[n,o])=>(r[n]=o.value,r),{}),xn=e=>t=>t?t.type===e:!1;class Rt extends Error{constructor(){super("Aborted")}}function ns(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const is=typeof window>"u"?void 0:Sc("inploi-chatbot",2,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Vt={getStateData:async(e,t)=>{var n;const r=os({...e,flowKeys:t});return(n=await is)==null?void 0:n.get("state",r)},setStateData:ns(async e=>{var r;const t=os(e);return(r=await is)==null?void 0:r.put("state",e.data,t)},1e3)},br=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const o=e.find(u=>u.id===t.nextId);if(o===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,s=e.find(u=>u.id===i),a=t.type.includes("question")?1:0;if(s){const u=a+Math.max(br(e,o,r,n+a).remainingSteps,br(e,s,r,n+a).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const c=a+br(e,o,r,n+a).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}},Dc=e=>{const t={},r=e.find(n=>n.isHead);return r&&br(e,r,(n,o)=>{t[n]=o}),t},os=e=>[...e.flowKeys,e.id,e.version].join("/"),qe=We({state:"idle"}),Bt=e=>{const{state:t,flow:r}=qe.value;if(t!=="loaded")return;ke(r,"No flow to update");const n=e(r.data);r.data=n,qe.value={state:t,flow:r},Vt.setStateData(r)},D={current$:qe,viewState$:We("closed"),inputHeight$:We(53),startFlow:async({flow:e,context:t,flowKeys:r,title:n})=>{const i={data:await Vt.getStateData(e,r)??ss(),startedAt:new Date,nodeIdToProgress:Dc(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n};qe.value={state:"loaded",flow:i},Vt.setStateData(i)},cancelCurrentFlow:()=>{qe.value={state:"idle"},D.viewState$.value="closed"},markAsFinished:()=>Bt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Bt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=qe.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=ss();qe.value={state:e,flow:{...t,data:r,startedAt:new Date}},Vt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Bt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=qe.value;ke(t==="loaded","Application not loaded");const n=r.data.messages.filter(o=>!o.groupId||!e.includes(o.groupId));r.data.messages=n,Vt.setStateData(r)},setSubmission:(e,t)=>Bt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Bt(t=>({...t,currentInput:e??null}))},Tc=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),ss=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Tc()});var Nc=0;function d(e,t,r,n,o,i){var s,a,c={};for(a in t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Nc,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return S.vnode&&S.vnode(u),u}const Fc=({message:e})=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:[d("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&d("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Mc=e=>d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:"Loading"}),d("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),as=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(Mc,{class:"text-neutral-6 h-8 w-8"})}),Lc=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)}%`},yr=({class:e,children:t,...r})=>d("button",{class:Ue("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),Rc=()=>{if(D.current$.value.state!=="loaded")return null;const e=D.current$.value.flow.nodeIdToProgress,t=D.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:Lc(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Vc=({children:e})=>{const t=D.viewState$;return d(q,{children:d("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[d("div",{class:"flex h-[var(--header-height)] gap-2",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?d(q,{children:[d(yr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:d("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),d(yr,{"aria-label":"Close application",onClick:D.cancelCurrentFlow,children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):d(q,{children:[D.current$.value.state==="loaded"&&d(yr,{"aria-label":"Restart",onClick:()=>{D.restart()},children:[d("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(yr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),d(Rc,{})]})})},Bc=Br(()=>Promise.resolve().then(()=>Ld).then(e=>e.ChatbotBody)),jc=on("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),Uc=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:o,error:i}=D.current$.value,s=D.viewState$.value,a=n!=="idle"&&s==="maximised",c=L(null);return d(Jl,{open:a,modal:a,children:[d(ec,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0"}),d(tc,{forceMount:!0,asChild:!0,children:d("div",{ref:c,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",style:{"--header-height":`${fc}px`,"--content-height":"75vh"},class:jc({view:s}),children:d("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[d(Vc,{children:o==null?void 0:o.title}),Ne({state:n,view:s}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>d(as,{},"loading")).with({state:"loaded"},()=>d(dt,{fallback:d(as,{},"loading"),children:d(Bc,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>d(Fc,{message:i})).exhaustive()]})})})]})},kn=Be({id:hi(be(),String),version:bi(),build:bi(),nodes:mi(gi())}),zc=Be({flow:kn}),Hc=Be({company:Be({name:be()}),flow:kn,job:Be({id:hi(be(),String),title:be()})}),Wc=Be({flow:kn,title:be(),flowKeys:mi(be()),context:yi(be(),gi())}),Kc=`#isdk{position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{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 .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .right-3{right:.75rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-24{width:6rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-none{flex:none}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}#isdk .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%);height:var(--header-height)}to{transform:translateY(0);height:var(--content-height)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.16,1,.3,1)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#isdk .bg-accent-1{background-color:var(--i-color-a-1)}#isdk .bg-accent-3{background-color:var(--i-color-a-3)}#isdk .bg-accent-9{background-color:var(--i-color-a-9)}#isdk .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}#isdk .bg-lowest{background-color:var(--i-color-lowest)}#isdk .bg-neutral-1{background-color:var(--i-color-n-1)}#isdk .bg-neutral-2{background-color:var(--i-color-n-2)}#isdk .bg-neutral-3{background-color:var(--i-color-n-3)}#isdk .bg-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .px-5{padding-left:1.25rem;padding-right:1.25rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-3{padding-top:.75rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-right{text-align:right}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .font-medium{font-weight:500}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#isdk .leading-3{line-height:.75rem}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}#isdk .outline-none{outline:2px solid transparent;outline-offset:2px}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-accent-4{outline-color:var(--i-color-a-4)}#isdk .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}#isdk .outline-divider{outline-color:var(--i-color-divider)}#isdk .outline-neutral-3{outline-color:var(--i-color-n-3)}#isdk .outline-neutral-6{outline-color:var(--i-color-n-6)}#isdk .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}#isdk .ring-divider{--tw-ring-color: var(--i-color-divider)}#isdk .ring-lowest{--tw-ring-color: var(--i-color-lowest)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#isdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .will-change-\\[height\\]{will-change:height}#isdk .text-wrap-balance{text-wrap:balance}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}#isdk .\\[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 .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-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}#isdk .focus-visible\\:outline-2:focus-visible{outline-width:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}#isdk .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}#isdk .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}#isdk .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}#isdk .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}#isdk .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}#isdk .active\\:text-accent-10:active{color:var(--i-color-a-10)}#isdk .active\\:text-accent-11:active{color:var(--i-color-a-11)}#isdk .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}#isdk .active\\:outline-neutral-10:active{outline-color:var(--i-color-n-10)}#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-7{--tw-ring-color: var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-2{--tw-ring-offset-width: 2px}@media (pointer: coarse){#isdk .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}
|
|
42
|
+
`,qc=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Uo);if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Uo,t}});var Yc=["1","2","3","4","5","6","7","8","9","10","11","12"],Gc={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]}},Zc=(e,t=1,r)=>n=>{const[o,i]=Gc[r][n];return"oklch("+o+"% "+i*t+" "+e+")"},$n=e=>{const t=Zc(e.hue,e.chroma,e.mode);return Object.fromEntries(Yc.map(r=>[e.prefix+r,e.transform(t(r))]))},Sn=e=>e,Qc=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(o=>{const i=n[o];return[`${String(r)}.${o}`,i]}):[[r,n]]});return Object.fromEntries(t)},wr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),En=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(wr(e)&&wr(r))for(const n in r){const o=r[n];if(wr(o)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];wr(i)&&En(i,o)}else Object.assign(e,{[n]:r[n]})}return En(e,...t)},Xc=e=>{function t(r,n){const o=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${o}`:`var(--${o})`}return t},Jc=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:o,getToken:i}=n,s=v=>i("reference",v.toString()),a=e({theme:o}),c=t({theme:o,core:s,raw:{core:a}}),u=r({theme:o,core:s,semantic:s,raw:{core:a,semantic:c}}),p=Qc(En(a,c,u)),l=([v,b],g)=>{const h=[g,v].filter(Boolean).join(".");return typeof b=="object"?Object.entries(b).flatMap(_=>l(_,h)):[[n.getToken("declaration",h),b]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(v=>l(v))),ref:v=>i("reference",v.toString())}}})})})});const[Cn,On,ls]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],eu=Jc().core(({theme:e})=>({color:{black:Cn,white:On,lowest:e.mode==="light"?On:Cn,highest:e.mode==="light"?Cn:On,...$n({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Sn}),...$n({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Sn}),...$n({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Sn})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(o,i)=>t.core.color[o].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:ls,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const o=(i,s)=>e.core.color[i].replace(")",` / ${s})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:o("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":o("a-9",.05)},"status-bar":{bg:o("n-2",.8),"bg-button":ls,"bg-button-hover":o("n-10",.4),"bg-button-active":o("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),tu=Xc({prefix:"i-"}),ru=e=>{const t=eu.from({theme:e,getToken:tu}),r=Object.entries(t.declarations).map(([n,o])=>`${n}: ${o};`);return`#isdk {
|
|
43
43
|
${r.concat(r).join(`
|
|
44
44
|
`)}
|
|
45
|
-
}`},nu=({_internal_domManager:e=ql(),theme:t})=>Ze(({apiClient:r,logger:n,analytics:o})=>{let i=!1;const s=()=>{if(typeof window>"u")return;const a=[T("style",{id:"inploi-chatbot-styles"},Kl),T("style",{id:"inploi-chatbot-theme"},ru(t))],l=e.getOrCreateChatbotElement();lt(T(q,{},[a,T(Ul,{apiClient:r,logger:n,analytics:o})]),l),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;s(),n.info("Chatbot plugin prepared")}catch(a){n.error("Error preparing chatbot plugin",a)}},fetchFlowByJobId:async a=>r.fetch(`/flow/job/${a}`).then(l=>{const u=Pt(Hl,l);return{context:{job_id:u.job.id,flow_id:u.flow.id,flow_version:u.flow.version},flow:u.flow,title:`Applying for “${u.job.title}”`,flowKeys:[u.job.id]}}),fetchFlowById:async a=>r.fetch(`/flow/id/${a}`).then(l=>{const u=Pt(zl,l);return{flow:u.flow,context:{flow_id:u.flow.id,flow_version:u.flow.version},title:"Chatbot",flowKeys:[]}}),open:async a=>{if(!(typeof window>"u"))try{D.cancelCurrentFlow(),D.viewState$.value="maximised",i||s(),a instanceof Promise?(D.current$.value={state:"loading"},a.then(async l=>{const u=Pt(Wl,l);D.startFlow(u)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";D.current$.value={state:"error",error:u}})):D.startFlow(a)}catch(l){n.error("Error starting flow",l)}},startApplication:void 0,closeApplication:void 0,close:async()=>{typeof window>"u"||(D.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=nu;const cs=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(n)return cs({node:n,nodes:t,stopWhen:r})},iu=({childNode:e,nodes:t})=>{const n=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(a=>a.id===o.branchId);if(!i)return!1;const s=cs({node:i,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(n!=null&&n.nextId)return t.find(o=>o.id===n.nextId)},ou=({flow:e,analytics:t,logger:r,context:n,apiClient:o,getSubmissions:i,chatService:s,onFlowEnd:a,onInterpret:l})=>{let u=new AbortController;const p=async(c,v)=>{const b=i();l==null||l(c,v);try{await su({analytics:t,logger:r,apiClient:o,context:n,node:c,submissions:b,chat:{sendMessage:async m=>s.send({groupId:c.id,message:m,signal:u.signal}),userInput:async m=>s.input({input:m,signal:u.signal})},next:m=>{const h=m?e.find(_=>_.id===m):iu({childNode:c,nodes:e});return h?p(h,c):a==null?void 0:a(c)},end:()=>a==null?void 0:a(c)})}catch(m){if(m instanceof Rt)return;throw m}};return{interpret:async c=>{const v=e.find(b=>b.id===c)??ts(e);return p(v)},undo:c=>{let v=1;const b=e.find(h=>h.id===c[c.length-1]);for(let h=c.length-2;h>0;h--){const _=c[h],k=e.find(w=>w.id===_);if(!k||(v++,k.type.startsWith("question-")))break}u.abort(),u=new AbortController;const m=e.find(h=>h.id===c[c.length-v]);return ke(m,"Undo failed: new start node not found"),p(m,b),{removed:v}},abort:()=>{u.abort()}}};async function su(e){return await Ne(e).with({node:{type:"text"}},uu).with({node:{type:"image"}},du).with({node:{type:"question-text"}},fu).with({node:{type:"question-enum"}},hu).with({node:{type:"question-number"}},pu).with({node:{type:"question-boolean"}},vu).with({node:{type:"question-file"}},gu).with({node:{type:"question-address"}},mu).with({node:{type:"end-flow"}},bu).with({node:{type:"if-block"}},lu).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},cu).with({node:{type:"integration-application-submit"}},au).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function au({chat:e,next:t,node:r,logger:n,apiClient:o,submissions:i,context:s,analytics:a}){r.data.skipConfirmation!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"system",variant:"info",text:"Submitting…"});const{anonymous_id:l,session_id:u}=a.getSessionInfo(),p=await o.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:r.data.integrationId,anonymous_id:l,session_id:u,submissions:Il(i||{})})}).catch(c=>c);await Ne(p).with({ats_data:{redirect_url:fe.string}},async c=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const v=new URL(c.ats_data.redirect_url);l&&!v.searchParams.has("anonymous_id")&&v.searchParams.set("anonymous_id",l),await e.sendMessage({type:"link",href:v.toString(),text:"Complete submission"}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).otherwise(async c=>{n.error(c),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),t(r.id)})}async function cu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({type:"link",href:r.data.href,text:ot(r.data.cta,n)}),t(r.nextId)}async function lu({submissions:e,next:t,node:r}){const n=yu(r,e)?r.branchId:r.nextId;t(n)}async function uu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.text,n)}),t(r.nextId)}async function du({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 fu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars}});o.value===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 pu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:"text"}});o.value===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 hu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(i=>o.value.includes(i.value)).map(i=>i.label).join(", ")}),t(r.nextId)}async function vu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.question,n)});const i=(await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}})).value;i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:{true:r.data.trueLabel,false:r.data.falseLabel}[i]}),t(r.nextId)}async function mu({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.value===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const o=Object.values(n.value).filter(i=>i&&i.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:o})}return t(r.nextId)}async function gu({node:e,chat:t,next:r,submissions:n}){await t.sendMessage({author:"bot",type:"text",text:ot(e.data.question,n)});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const i of o.value)await t.sendMessage({author:"user",type:"file",fileName:i.name,fileSizeKb:i.sizeKb});r(e.nextId)}async function bu({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const ls=fe.union(fe.string,fe.array(fe.string),null),yu=(e,t)=>{const r=t==null?void 0:t[e.data.compareKey];return r?Ne({...e.data,answer:r}).with({compare:"equals"},({compareValue:n})=>typeof r.value=="string"||typeof r.value=="boolean"?n===r.value.toString():!1).with({compare:"notEquals"},({compareValue:n})=>typeof r.value=="string"||typeof r.value=="boolean"?n!==r.value.toString():!1).with({compare:"contains",answer:{value:ls}},({compareValue:n,answer:o})=>o.value!==null&&o.value.includes(n)).with({compare:"notContains",answer:{value:ls}},({compareValue:n,answer:o})=>o.value===null||!o.value.includes(n)).with({answer:{type:"file"}},()=>!1).with({answer:{type:"address",value:fe.any}},()=>!1).exhaustive():!1},ot=(e,t)=>{const r=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(r,(n,o,i="")=>{o=o.trim();const s=t==null?void 0:t[o];if(!s)return i;switch(s.type){case"boolean":return s.value==="true"?"true":"false";case"file":return s.value?s.value.map(a=>`${a.name} (${Lt(a.sizeKb)})`).join(", "):"no files";case"multiple-choice":return s.value.join(", ");default:return s.value||i}})};function wu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pn(e,t,r){var n,o,i,s,a;t==null&&(t=100);function l(){var p=Date.now()-s;p<t&&p>=0?n=setTimeout(l,t-p):(n=null,r||(a=e.apply(i,o),i=o=null))}var u=function(){i=this,o=arguments,s=Date.now();var p=r&&!n;return n||(n=setTimeout(l,t)),p&&(a=e.apply(i,o),i=o=null),a};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(a=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},u}Pn.debounce=Pn;var _u=Pn;const us=wu(_u);function xu(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,a]=Y({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:s}),u=t?typeof t=="number"?t:t.scroll:null,p=t?typeof t=="number"?t:t.resize:null,c=L(!1);V(()=>(c.current=!0,()=>void(c.current=!1)));const[v,b,m]=se(()=>{const w=()=>{if(!l.current.element)return;const{left:P,top:I,width:O,height:z,bottom:W,right:N,x:F,y:ie}=l.current.element.getBoundingClientRect(),ee={left:P,top:I,width:O,height:z,bottom:W,right:N,x:F,y:ie};l.current.element instanceof HTMLElement&&o&&(ee.height=l.current.element.offsetHeight,ee.width=l.current.element.offsetWidth),Object.freeze(ee),c.current&&!Eu(l.current.lastBounds,ee)&&a(l.current.lastBounds=ee)};return[w,p?us(w,p):w,u?us(w,u):w]},[a,o,u,p]);function h(){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 i(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 k=w=>{!w||w===l.current.element||(h(),l.current.element=w,l.current.scrollContainers=ds(w),_())};return $u(m,!!r),ku(b),V(()=>{h(),_()},[r,m,b]),V(()=>h,[]),[k,s,v]}function ku(e){V(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function $u(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 ds(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...ds(e.parentElement)]}const Su=["x","y","top","bottom","left","right","width","height"],Eu=(e,t)=>Su.every(r=>e[r]===t[r]),jt=({class:e,...t})=>d("button",{class:Ue("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:"Send"}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})}),Cu=25,An=We({instant:()=>{},smooth:()=>{}}),ce={onSubmitSuccessFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>An.value.instant(),smooth:()=>An.value.smooth()}},Ou=()=>{const e=L(null);ye(()=>{An.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*1.5&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=se(()=>({send:async({message:r,signal:n,groupId:o})=>{if(await Ne(r).with({author:"bot",type:"text"},async i=>{if(n!=null&&n.aborted)throw new Rt;ce.isBotTyping$.value=!0;const s=Math.min(Math.max(20,i.text.length),100)*Cu;await new Promise(a=>setTimeout(a,s,{signal:n})),ce.isBotTyping$.value=!1}).otherwise(async()=>{}),n!=null&&n.aborted)throw new Rt;D.addMessage(r,o)},input:async({input:r,signal:n})=>{if(n!=null&&n.aborted)throw new Rt;return D.setInput(r),await new Promise(o=>{const i=s=>{if(n!=null&&n.aborted)throw new Rt;D.setInput(void 0),r.key&&D.setSubmission(r.key,s),o(s)};ce.onSubmitSuccessFn$.value=i})}}),[]);return{chatRef:e,chatService:t}},Ut=({class:e,...t})=>d("button",{type:"button",class:Ue("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:"Skip"}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),fs={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"]},_r=Object.keys(fs),Pu=e=>_r.reduce((t,r)=>{const n=fs[r],o=e.filter(i=>i.types.some(s=>n.includes(s))).map(i=>i.long_name).join(", ");return o&&(t[r]=o),t},{}),Au=document.createElement("div"),Iu=()=>se(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(Au);return{enabled:!0,getPredictions:async n=>{const{predictions:o}=await t.getPlacePredictions({input:n});return o.map(i=>({label:i.description,value:i.place_id}))},getPlaceDetails:async n=>await new Promise((i,s)=>r.getDetails({placeId:n,fields:["address_components"]},(a,l)=>l!==e.maps.places.PlacesServiceStatus.OK?s(l):a===null?s("ZERO_RESULTS"):i({ok:!0,place:a}))).catch(async i=>(console.error("Failed to get address details",i),{ok:!1}))}},[]),In=e=>d("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:"Back"})]}),Dn={label:"Fill in manually",value:""},Du=({input:e,onSubmitSuccess:t})=>{const[r,n]=Y(""),[o,i]=Y(),[s,a]=Y([]),[l,u]=Y(),{enabled:p,getPredictions:c,getPlaceDetails:v}=Iu(),[b,m]=Y(p?"query":"manual"),h=se(()=>rs(_=>{if(ke(p,"Query state should not be enabled if Google Places isn't available"),n(_),_===""){a([]);return}c(_).then(k=>{a(k)})},500),[p,c]);switch(V(()=>{if(p&&!(l===void 0||l===""))return v(l).then(_=>{if(!_.ok||!_.place.address_components){i({});return}const k=Pu(_.place.address_components);i(k),m("details")}),()=>{i(void 0)}},[l,v,p]),b){case"query":return ke(p,"Query state should not be enabled if Google Places isn't available"),d(Tu,{input:e,onSkip:()=>t(null),onAddressSelect:_=>{u(_),m("loading")},onInputChange:h,suggestions:s,query:r});case"loading":return d(Tn,{input:e,onSubmitSuccess:t,addressFields:{},actions:d(In,{onClick:()=>{u(void 0),m("query")}})});case"details":return ke(o!==void 0),d(Tn,{input:e,onSubmitSuccess:t,addressFields:o,actions:d(In,{onClick:()=>{u(void 0),m("query")}})});case"manual":return d(Tn,{input:e,onSubmitSuccess:t,addressFields:{},actions:p?d(In,{onClick:()=>{u(void 0),m("query")}}):void 0})}},Tu=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:o,onInputChange:i})=>{const s=L(null);return ye(()=>{s.current&&(s.current.focus(),s.current.select())},[]),d(q,{children:[d("form",{noValidate:!0,onSubmit:a=>{a.preventDefault},class:"flex flex-col justify-end gap-1 p-2.5",children:[d("input",{onChange:a=>{i(a.currentTarget.value)},ref:s,name:"address",id:"chat-address",autocomplete:"on",autoFocus:!0,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder||"Search an address",defaultValue:o}),!e.config.optional&&d(Ut,{class:"absolute right-3",onClick:t})]}),d("ul",{children:[r.map(a=>d("li",{children:d("button",{class:"text-neutral-11 fr hover: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(a.value)},children:[d("span",{class:"flex-grow",children:a.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},a.label)),d("li",{children:d("button",{class:"text-neutral-11 fr hover: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(Dn.value)},children:d("span",{class:"flex-grow",children:Dn.label})})},Dn.label)]})]})},Nu={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},Tn=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const o=L(null);return ye(()=>{if(o.current){const i=o.current.querySelector("input");i&&(i.focus(),i.select())}},[]),d("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:i=>{const s=new FormData(i.currentTarget),a=Object.fromEntries(s.entries());t(a)},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:o,children:_r.map((i,s)=>{const a=`isdk_${i}`,l=n.config.keys[i];return l?d(q,{children:[d("label",{for:a,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:Nu[i]}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[d("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 focus:outline-none",name:l,id:a,defaultValue:e[i],required:!0}),s!==_r.length-1&&d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),s===_r.length-1&&d("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),d("div",{class:"flex w-full flex-1 ",children:[d("div",{class:"flex-grow",children:r}),d(jt,{class:"flex items-center justify-center"})]})]})},Nn=()=>{const e=L(null);return V(()=>{var t;(t=e.current)==null||t.focus()},[]),e},ps=["true","false"],Fu=sa(ps),Mu="answer",Lu=({input:e,onSubmitSuccess:t})=>{const r=Nn();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const o=Ne(n).with({nativeEvent:{submitter:fe.select(fe.union(fe.instanceOf(HTMLButtonElement),fe.instanceOf(HTMLInputElement)))}},s=>s.value).otherwise(()=>{throw new Error("invalid form")}),i=Pt(Fu,o);t(i)},children:[d("div",{class:"flex items-center gap-2 p-2.5",children:ps.map((n,o)=>d("button",{ref:o===0?r:null,type:"submit",name:Mu,value:n,class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:d("p",{class:"truncate text-center text-base",children:e.config.labels[n]})}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(Ut,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Fn=({error:e})=>e?d("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[d("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null,Ru=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}),Vu=e=>e.reduce((t,r)=>t+r.sizeKb,0),Bu=xn("file"),hs=3,ju=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${n}$`),"");return d("div",{class:Ue("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"block truncate",children:o}),d("span",{children:[".",n]})]}),d("p",{"aria-label":"File size",class:"text-accent-11",children:Lt(e.sizeKb)})]})},vs=({class:e,...t})=>d("li",{class:Ue("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),ms=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Uu=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(ms(n.name).toLowerCase()))},zu=(e,t)=>{const r=ms(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},Hu=({input:e,onSubmitSuccess:t})=>{var p;const r=(p=D.current$.value.flow)==null?void 0:p.data.submissions[e.key],[n,o]=Y(Bu(r)&&r.value!==null?r.value:[]),[i,s]=Y(),a=n.length-hs,l=Vu(n),u=Nn();return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:c=>(c.preventDefault(),s(void 0),n.length===0?s({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!Uu({allowedExtensions:e.config.extensions,files:n})?s({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?s({type:"max",message:`File size exceeds limit of ${Lt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?s({type:"invalid",message:"Only one file is allowed"}):t(n)),children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:u,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?d(q,{children:[d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,hs).map(c=>{const v=c.name.split(".").pop(),b=c.name.replace(new RegExp(`.${v}$`),"");return d(vs,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:b}),d("span",{children:[".",v]})]})}),a>0?d(vs,{children:["+",a," file",a!==1?"s":""]}):null]}),d("p",{class:"text-neutral-11 text-xs",children:[Lt(l)," ",n.length>1?"total":""]})]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-10 text-xs",children:["(max ",Lt(e.config.fileSizeLimitKib),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:c.replace(".","")}))})]})]}),d("input",{id:"dropzone-file",onInput:async c=>{ke(c.target instanceof HTMLInputElement);const v=c.target.files?Array.from(c.target.files):[],b=await Promise.allSettled(v.map(async h=>{const _=await Ru(h);return{name:zu(h.name,42),data:_,sizeKb:h.size/1e3}}));if(b.some(({status:h})=>h==="rejected"))return s({type:"invalid",message:"Invalid file"});const m=b.map(h=>h.status==="fulfilled"?h.value:null).filter(Boolean);o(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(jt,{disabled:n.length===0}),e.config.optional&&d(Ut,{onClick:()=>t(null)})]})]}),i&&d(Fn,{error:i})]})};var zt=e=>e.type==="checkbox",_t=e=>e instanceof Date,le=e=>e==null;const gs=e=>typeof e=="object";var J=e=>!le(e)&&!Array.isArray(e)&&gs(e)&&!_t(e),Wu=e=>J(e)&&e.target?zt(e.target)?e.target.checked:e.target.value:e,Ku=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,qu=(e,t)=>e.has(Ku(t)),Yu=e=>{const t=e.constructor&&e.constructor.prototype;return J(t)&&t.hasOwnProperty("isPrototypeOf")},Mn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Fe(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Mn&&(e instanceof Blob||e instanceof FileList))&&(r||J(e)))if(t=r?[]:{},!r&&!Yu(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Fe(e[n]));else return e;return t}var Ht=e=>Array.isArray(e)?e.filter(Boolean):[],Z=e=>e===void 0,E=(e,t,r)=>{if(!t||!J(e))return r;const n=Ht(t.split(/[,[\].]+?/)).reduce((o,i)=>le(o)?o:o[i],e);return Z(n)||n===e?Z(e[t])?r:e[t]:n},Ye=e=>typeof e=="boolean";const bs={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Me={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};xe.createContext(null);var Gu=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==$e.all&&(t._proxyFormState[s]=!n||$e.all),r&&(r[s]=!0),e[s]}});return o},we=e=>J(e)&&!Object.keys(e).length,Zu=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return we(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!n||$e.all))},Ln=e=>Array.isArray(e)?e:[e];function Qu(e){const t=xe.useRef(e);t.current=e,xe.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Oe=e=>typeof e=="string",Xu=(e,t,r,n,o)=>Oe(e)?(n&&t.watch.add(e),E(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),E(r,i))):(n&&(t.watchAll=!0),r),Rn=e=>/^\w*$/.test(e),ys=e=>Ht(e.replace(/["|']|\]/g,"").split(/\.|\[/));function U(e,t,r){let n=-1;const o=Rn(t)?[t]:ys(t),i=o.length,s=i-1;for(;++n<i;){const a=o[n];let l=r;if(n!==s){const u=e[a];l=J(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}e[a]=l,e=e[a]}return e}var ws=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},_s=e=>({isOnSubmit:!e||e===$e.onSubmit,isOnBlur:e===$e.onBlur,isOnChange:e===$e.onChange,isOnAll:e===$e.all,isOnTouch:e===$e.onTouched}),xs=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const xr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=E(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!n)break;if(s.ref&&t(s.ref,s.name)&&!n)break}else J(a)&&xr(a,t)}}};var Ju=(e,t,r)=>{const n=Ht(E(e,r));return U(n,"root",t[r]),U(e,r,n),e},Vn=e=>e.type==="file",Ge=e=>typeof e=="function",kr=e=>{if(!Mn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},$r=e=>Oe(e),Bn=e=>e.type==="radio",Sr=e=>e instanceof RegExp;const ks={value:!1,isValid:!1},$s={value:!0,isValid:!0};var Ss=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&&!Z(e[0].attributes.value)?Z(e[0].value)||e[0].value===""?$s:{value:e[0].value,isValid:!0}:$s:ks}return ks};const Es={isValid:!1,value:null};var Cs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Es):Es;function Os(e,t,r="validate"){if($r(e)||Array.isArray(e)&&e.every($r)||Ye(e)&&!e)return{type:r,message:$r(e)?e:"",ref:t}}var xt=e=>J(e)&&!Sr(e)?e:{value:e,message:""},Ps=async(e,t,r,n,o)=>{const{ref:i,refs:s,required:a,maxLength:l,minLength:u,min:p,max:c,pattern:v,validate:b,name:m,valueAsNumber:h,mount:_,disabled:k}=e._f,w=E(t,m);if(!_||k)return{};const P=s?s[0]:i,I=B=>{n&&P.reportValidity&&(P.setCustomValidity(Ye(B)?"":B||""),P.reportValidity())},O={},z=Bn(i),W=zt(i),N=z||W,F=(h||Vn(i))&&Z(i.value)&&Z(w)||kr(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,ie=ws.bind(null,m,r,O),ee=(B,M,Q,pe=Me.maxLength,_e=Me.minLength)=>{const Pe=B?M:Q;O[m]={type:B?pe:_e,message:Pe,ref:i,...ie(B?pe:_e,Pe)}};if(o?!Array.isArray(w)||!w.length:a&&(!N&&(F||le(w))||Ye(w)&&!w||W&&!Ss(s).isValid||z&&!Cs(s).isValid)){const{value:B,message:M}=$r(a)?{value:!!a,message:a}:xt(a);if(B&&(O[m]={type:Me.required,message:M,ref:P,...ie(Me.required,M)},!r))return I(M),O}if(!F&&(!le(p)||!le(c))){let B,M;const Q=xt(c),pe=xt(p);if(!le(w)&&!isNaN(w)){const _e=i.valueAsNumber||w&&+w;le(Q.value)||(B=_e>Q.value),le(pe.value)||(M=_e<pe.value)}else{const _e=i.valueAsDate||new Date(w),Pe=Or=>new Date(new Date().toDateString()+" "+Or),at=i.type=="time",Kt=i.type=="week";Oe(Q.value)&&w&&(B=at?Pe(w)>Pe(Q.value):Kt?w>Q.value:_e>new Date(Q.value)),Oe(pe.value)&&w&&(M=at?Pe(w)<Pe(pe.value):Kt?w<pe.value:_e<new Date(pe.value))}if((B||M)&&(ee(!!B,Q.message,pe.message,Me.max,Me.min),!r))return I(O[m].message),O}if((l||u)&&!F&&(Oe(w)||o&&Array.isArray(w))){const B=xt(l),M=xt(u),Q=!le(B.value)&&w.length>+B.value,pe=!le(M.value)&&w.length<+M.value;if((Q||pe)&&(ee(Q,B.message,M.message),!r))return I(O[m].message),O}if(v&&!F&&Oe(w)){const{value:B,message:M}=xt(v);if(Sr(B)&&!w.match(B)&&(O[m]={type:Me.pattern,message:M,ref:i,...ie(Me.pattern,M)},!r))return I(M),O}if(b){if(Ge(b)){const B=await b(w,t),M=Os(B,P);if(M&&(O[m]={...M,...ie(Me.validate,M.message)},!r))return I(M.message),O}else if(J(b)){let B={};for(const M in b){if(!we(B)&&!r)break;const Q=Os(await b[M](w,t),P,M);Q&&(B={...Q,...ie(M,Q.message)},I(Q.message),r&&(O[m]=B))}if(!we(B)&&(O[m]={ref:P,...B},!r))return O}}return I(!0),O};function ed(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Z(e)?n++:e[t[n++]];return e}function td(e){for(const t in e)if(e.hasOwnProperty(t)&&!Z(e[t]))return!1;return!0}function ne(e,t){const r=Array.isArray(t)?t:Rn(t)?[t]:ys(t),n=r.length===1?e:ed(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(J(n)&&we(n)||Array.isArray(n)&&td(n))&&ne(e,r.slice(0,-1)),e}function jn(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Er=e=>le(e)||!gs(e);function st(e,t){if(Er(e)||Er(t))return e===t;if(_t(e)&&_t(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const s=t[o];if(_t(i)&&_t(s)||J(i)&&J(s)||Array.isArray(i)&&Array.isArray(s)?!st(i,s):i!==s)return!1}}return!0}var As=e=>e.type==="select-multiple",rd=e=>Bn(e)||zt(e),Un=e=>kr(e)&&e.isConnected,Is=e=>{for(const t in e)if(Ge(e[t]))return!0;return!1};function Cr(e,t={}){const r=Array.isArray(e);if(J(e)||r)for(const n in e)Array.isArray(e[n])||J(e[n])&&!Is(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Cr(e[n],t[n])):le(e[n])||(t[n]=!0);return t}function Ds(e,t,r){const n=Array.isArray(e);if(J(e)||n)for(const o in e)Array.isArray(e[o])||J(e[o])&&!Is(e[o])?Z(t)||Er(r[o])?r[o]=Array.isArray(e[o])?Cr(e[o],[]):{...Cr(e[o])}:Ds(e[o],le(t)?{}:t[o],r[o]):r[o]=!st(e[o],t[o]);return r}var zn=(e,t)=>Ds(e,t,Cr(t)),Ts=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Z(e)?e:t?e===""?NaN:e&&+e:r&&Oe(e)?new Date(e):n?n(e):e;function Hn(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Vn(t)?t.files:Bn(t)?Cs(e.refs).value:As(t)?[...t.selectedOptions].map(({value:r})=>r):zt(t)?Ss(e.refs).value:Ts(Z(t.value)?e.ref.value:t.value,e)}var nd=(e,t,r,n)=>{const o={};for(const i of e){const s=E(t,i);s&&U(o,i,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Wt=e=>Z(e)?e:Sr(e)?e.source:J(e)?Sr(e.value)?e.value.source:e.value:e,id=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ns(e,t,r){const n=E(e,r);if(n||Rn(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),s=E(t,i),a=E(e,i);if(s&&!Array.isArray(s)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:r}}var od=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,sd=(e,t)=>!Ht(E(e,t)).length&&ne(e,t);const ad={mode:$e.onSubmit,reValidateMode:$e.onChange,shouldFocusError:!0};function cd(e={},t){let r={...ad,...e},n={submitCount:0,isDirty:!1,isLoading:Ge(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=J(r.defaultValues)||J(r.values)?Fe(r.defaultValues||r.values)||{}:{},s=r.shouldUnregister?{}:Fe(i),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,p=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:jn(),array:jn(),state:jn()},b=e.resetOptions&&e.resetOptions.keepDirtyValues,m=_s(r.mode),h=_s(r.reValidateMode),_=r.criteriaMode===$e.all,k=f=>g=>{clearTimeout(p),p=setTimeout(f,g)},w=async f=>{if(c.isValid||f){const g=r.resolver?we((await F()).errors):await ee(o,!0);g!==n.isValid&&v.state.next({isValid:g})}},P=f=>c.isValidating&&v.state.next({isValidating:f}),I=(f,g=[],y,C,$=!0,x=!0)=>{if(C&&y){if(a.action=!0,x&&Array.isArray(E(o,f))){const A=y(E(o,f),C.argA,C.argB);$&&U(o,f,A)}if(x&&Array.isArray(E(n.errors,f))){const A=y(E(n.errors,f),C.argA,C.argB);$&&U(n.errors,f,A),sd(n.errors,f)}if(c.touchedFields&&x&&Array.isArray(E(n.touchedFields,f))){const A=y(E(n.touchedFields,f),C.argA,C.argB);$&&U(n.touchedFields,f,A)}c.dirtyFields&&(n.dirtyFields=zn(i,s)),v.state.next({name:f,isDirty:M(f,g),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else U(s,f,g)},O=(f,g)=>{U(n.errors,f,g),v.state.next({errors:n.errors})},z=(f,g,y,C)=>{const $=E(o,f);if($){const x=E(s,f,Z(y)?E(i,f):y);Z(x)||C&&C.defaultChecked||g?U(s,f,g?x:Hn($._f)):_e(f,x),a.mount&&w()}},W=(f,g,y,C,$)=>{let x=!1,A=!1;const H={name:f};if(!y||C){c.isDirty&&(A=n.isDirty,n.isDirty=H.isDirty=M(),x=A!==H.isDirty);const X=st(E(i,f),g);A=E(n.dirtyFields,f),X?ne(n.dirtyFields,f):U(n.dirtyFields,f,!0),H.dirtyFields=n.dirtyFields,x=x||c.dirtyFields&&A!==!X}if(y){const X=E(n.touchedFields,f);X||(U(n.touchedFields,f,y),H.touchedFields=n.touchedFields,x=x||c.touchedFields&&X!==y)}return x&&$&&v.state.next(H),x?H:{}},N=(f,g,y,C)=>{const $=E(n.errors,f),x=c.isValid&&Ye(g)&&n.isValid!==g;if(e.delayError&&y?(u=k(()=>O(f,y)),u(e.delayError)):(clearTimeout(p),u=null,y?U(n.errors,f,y):ne(n.errors,f)),(y?!st($,y):$)||!we(C)||x){const A={...C,...x&&Ye(g)?{isValid:g}:{},errors:n.errors,name:f};n={...n,...A},v.state.next(A)}P(!1)},F=async f=>r.resolver(s,r.context,nd(f||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),ie=async f=>{const{errors:g}=await F(f);if(f)for(const y of f){const C=E(g,y);C?U(n.errors,y,C):ne(n.errors,y)}else n.errors=g;return g},ee=async(f,g,y={valid:!0})=>{for(const C in f){const $=f[C];if($){const{_f:x,...A}=$;if(x){const H=l.array.has(x.name),X=await Ps($,s,_,r.shouldUseNativeValidation&&!g,H);if(X[x.name]&&(y.valid=!1,g))break;!g&&(E(X,x.name)?H?Ju(n.errors,X,x.name):U(n.errors,x.name,X[x.name]):ne(n.errors,x.name))}A&&await ee(A,g,y)}}return y.valid},B=()=>{for(const f of l.unMount){const g=E(o,f);g&&(g._f.refs?g._f.refs.every(y=>!Un(y)):!Un(g._f.ref))&&Kn(f)}l.unMount=new Set},M=(f,g)=>(f&&g&&U(s,f,g),!st(Rs(),i)),Q=(f,g,y)=>Xu(f,l,{...a.mount?s:Z(g)?i:Oe(f)?{[f]:g}:g},y,g),pe=f=>Ht(E(a.mount?s:i,f,e.shouldUnregister?E(i,f,[]):[])),_e=(f,g,y={})=>{const C=E(o,f);let $=g;if(C){const x=C._f;x&&(!x.disabled&&U(s,f,Ts(g,x)),$=kr(x.ref)&&le(g)?"":g,As(x.ref)?[...x.ref.options].forEach(A=>A.selected=$.includes(A.value)):x.refs?zt(x.ref)?x.refs.length>1?x.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(H=>H===A.value):$===A.value)):x.refs[0]&&(x.refs[0].checked=!!$):x.refs.forEach(A=>A.checked=A.value===$):Vn(x.ref)?x.ref.value="":(x.ref.value=$,x.ref.type||v.values.next({name:f,values:{...s}})))}(y.shouldDirty||y.shouldTouch)&&W(f,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&Wn(f)},Pe=(f,g,y)=>{for(const C in g){const $=g[C],x=`${f}.${C}`,A=E(o,x);(l.array.has(f)||!Er($)||A&&!A._f)&&!_t($)?Pe(x,$,y):_e(x,$,y)}},at=(f,g,y={})=>{const C=E(o,f),$=l.array.has(f),x=Fe(g);U(s,f,x),$?(v.array.next({name:f,values:{...s}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&v.state.next({name:f,dirtyFields:zn(i,s),isDirty:M(f,x)})):C&&!C._f&&!le(x)?Pe(f,x,y):_e(f,x,y),xs(f,l)&&v.state.next({...n}),v.values.next({name:f,values:{...s}}),!a.mount&&t()},Kt=async f=>{const g=f.target;let y=g.name,C=!0;const $=E(o,y),x=()=>g.type?Hn($._f):Wu(f),A=H=>{C=Number.isNaN(H)||H===E(s,y,H)};if($){let H,X;const Pr=x(),$t=f.type===bs.BLUR||f.type===bs.FOCUS_OUT,Ud=!id($._f)&&!r.resolver&&!E(n.errors,y)&&!$._f.deps||od($t,E(n.touchedFields,y),n.isSubmitted,h,m),Yn=xs(y,l,$t);U(s,y,Pr),$t?($._f.onBlur&&$._f.onBlur(f),u&&u(0)):$._f.onChange&&$._f.onChange(f);const Gn=W(y,Pr,$t,!1),zd=!we(Gn)||Yn;if(!$t&&v.values.next({name:y,type:f.type,values:{...s}}),Ud)return c.isValid&&w(),zd&&v.state.next({name:y,...Yn?{}:Gn});if(!$t&&Yn&&v.state.next({...n}),P(!0),r.resolver){const{errors:Ks}=await F([y]);if(A(Pr),C){const Hd=Ns(n.errors,o,y),qs=Ns(Ks,o,Hd.name||y);H=qs.error,y=qs.name,X=we(Ks)}}else H=(await Ps($,s,_,r.shouldUseNativeValidation))[y],A(Pr),C&&(H?X=!1:c.isValid&&(X=await ee(o,!0)));C&&($._f.deps&&Wn($._f.deps),N(y,X,H,Gn))}},Or=(f,g)=>{if(E(n.errors,g)&&f.focus)return f.focus(),1},Wn=async(f,g={})=>{let y,C;const $=Ln(f);if(P(!0),r.resolver){const x=await ie(Z(f)?f:$);y=we(x),C=f?!$.some(A=>E(x,A)):y}else f?(C=(await Promise.all($.map(async x=>{const A=E(o,x);return await ee(A&&A._f?{[x]:A}:A)}))).every(Boolean),!(!C&&!n.isValid)&&w()):C=y=await ee(o);return v.state.next({...!Oe(f)||c.isValid&&y!==n.isValid?{}:{name:f},...r.resolver||!f?{isValid:y}:{},errors:n.errors,isValidating:!1}),g.shouldFocus&&!C&&xr(o,Or,f?$:l.mount),C},Rs=f=>{const g={...i,...a.mount?s:{}};return Z(f)?g:Oe(f)?E(g,f):f.map(y=>E(g,y))},Vs=(f,g)=>({invalid:!!E((g||n).errors,f),isDirty:!!E((g||n).dirtyFields,f),isTouched:!!E((g||n).touchedFields,f),error:E((g||n).errors,f)}),Rd=f=>{f&&Ln(f).forEach(g=>ne(n.errors,g)),v.state.next({errors:f?n.errors:{}})},Bs=(f,g,y)=>{const C=(E(o,f,{_f:{}})._f||{}).ref;U(n.errors,f,{...g,ref:C}),v.state.next({name:f,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&C&&C.focus&&C.focus()},Vd=(f,g)=>Ge(f)?v.values.subscribe({next:y=>f(Q(void 0,g),y)}):Q(f,g,!0),Kn=(f,g={})=>{for(const y of f?Ln(f):l.mount)l.mount.delete(y),l.array.delete(y),g.keepValue||(ne(o,y),ne(s,y)),!g.keepError&&ne(n.errors,y),!g.keepDirty&&ne(n.dirtyFields,y),!g.keepTouched&&ne(n.touchedFields,y),!r.shouldUnregister&&!g.keepDefaultValue&&ne(i,y);v.values.next({values:{...s}}),v.state.next({...n,...g.keepDirty?{isDirty:M()}:{}}),!g.keepIsValid&&w()},js=({disabled:f,name:g,field:y,fields:C,value:$})=>{if(Ye(f)){const x=f?void 0:Z($)?Hn(y?y._f:E(C,g)._f):$;U(s,g,x),W(g,x,!1,!1,!0)}},qn=(f,g={})=>{let y=E(o,f);const C=Ye(g.disabled);return U(o,f,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:f}},name:f,mount:!0,...g}}),l.mount.add(f),y?js({field:y,disabled:g.disabled,name:f}):z(f,!0,g.value),{...C?{disabled:g.disabled}:{},...r.progressive?{required:!!g.required,min:Wt(g.min),max:Wt(g.max),minLength:Wt(g.minLength),maxLength:Wt(g.maxLength),pattern:Wt(g.pattern)}:{},name:f,onChange:Kt,onBlur:Kt,ref:$=>{if($){qn(f,g),y=E(o,f);const x=Z($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=rd(x),H=y._f.refs||[];if(A?H.find(X=>X===x):x===y._f.ref)return;U(o,f,{_f:{...y._f,...A?{refs:[...H.filter(Un),x,...Array.isArray(E(i,f))?[{}]:[]],ref:{type:x.type,name:f}}:{ref:x}}}),z(f,!1,void 0,x)}else y=E(o,f,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||g.shouldUnregister)&&!(qu(l.array,f)&&a.action)&&l.unMount.add(f)}}},Us=()=>r.shouldFocusError&&xr(o,Or,l.mount),Bd=f=>{Ye(f)&&(v.state.next({disabled:f}),xr(o,g=>{g.disabled=f},0,!1))},zs=(f,g)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let C=Fe(s);if(v.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:x}=await F();n.errors=$,C=x}else await ee(o);ne(n.errors,"root"),we(n.errors)?(v.state.next({errors:{}}),await f(C,y)):(g&&await g({...n.errors},y),Us(),setTimeout(Us)),v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:we(n.errors),submitCount:n.submitCount+1,errors:n.errors})},jd=(f,g={})=>{E(o,f)&&(Z(g.defaultValue)?at(f,E(i,f)):(at(f,g.defaultValue),U(i,f,g.defaultValue)),g.keepTouched||ne(n.touchedFields,f),g.keepDirty||(ne(n.dirtyFields,f),n.isDirty=g.defaultValue?M(f,E(i,f)):M()),g.keepError||(ne(n.errors,f),c.isValid&&w()),v.state.next({...n}))},Hs=(f,g={})=>{const y=f?Fe(f):i,C=Fe(y),$=f&&!we(f)?C:i;if(g.keepDefaultValues||(i=y),!g.keepValues){if(g.keepDirtyValues||b)for(const x of l.mount)E(n.dirtyFields,x)?U($,x,E(s,x)):at(x,E($,x));else{if(Mn&&Z(f))for(const x of l.mount){const A=E(o,x);if(A&&A._f){const H=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(kr(H)){const X=H.closest("form");if(X){X.reset();break}}}}o={}}s=e.shouldUnregister?g.keepDefaultValues?Fe(i):{}:Fe($),v.array.next({values:{...$}}),v.values.next({values:{...$}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!c.isValid||!!g.keepIsValid,a.watch=!!e.shouldUnregister,v.state.next({submitCount:g.keepSubmitCount?n.submitCount:0,isDirty:g.keepDirty?n.isDirty:!!(g.keepDefaultValues&&!st(f,i)),isSubmitted:g.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:g.keepDirtyValues?n.dirtyFields:g.keepDefaultValues&&f?zn(i,f):{},touchedFields:g.keepTouched?n.touchedFields:{},errors:g.keepErrors?n.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ws=(f,g)=>Hs(Ge(f)?f(s):f,g);return{control:{register:qn,unregister:Kn,getFieldState:Vs,handleSubmit:zs,setError:Bs,_executeSchema:F,_getWatch:Q,_getDirty:M,_updateValid:w,_removeUnmounted:B,_updateFieldArray:I,_updateDisabledField:js,_getFieldArray:pe,_reset:Hs,_resetDefaultValues:()=>Ge(r.defaultValues)&&r.defaultValues().then(f=>{Ws(f,r.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:f=>{n={...n,...f}},_disableForm:Bd,_subjects:v,_proxyFormState:c,get _fields(){return o},get _formValues(){return s},get _state(){return a},set _state(f){a=f},get _defaultValues(){return i},get _names(){return l},set _names(f){l=f},get _formState(){return n},set _formState(f){n=f},get _options(){return r},set _options(f){r={...r,...f}}},trigger:Wn,register:qn,handleSubmit:zs,watch:Vd,setValue:at,getValues:Rs,reset:Ws,resetField:jd,clearErrors:Rd,unregister:Kn,setError:Bs,setFocus:(f,g={})=>{const y=E(o,f),C=y&&y._f;if(C){const $=C.refs?C.refs[0]:C.ref;$.focus&&($.focus(),g.shouldSelect&&$.select())}},getFieldState:Vs}}function Fs(e={}){const t=xe.useRef(),r=xe.useRef(),[n,o]=xe.useState({isDirty:!1,isValidating:!1,isLoading:Ge(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Ge(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...cd(e,()=>o(s=>({...s}))),formState:n});const i=t.current.control;return i._options=e,Qu({subject:i._subjects.state,next:s=>{Zu(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),xe.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),xe.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==n.isDirty&&i._subjects.state.next({isDirty:s})}},[i,n.isDirty]),xe.useEffect(()=>{e.values&&!st(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),xe.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Gu(n,i),t.current}var Ms=function(e,t,r){if(e&&"reportValidity"in e){var n=E(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},ld=function(e,t){var r=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?Ms(i.ref,o,e):i.refs&&i.refs.forEach(function(s){return Ms(s,o,e)})};for(var n in t.fields)r(n)},ud=function(e,t){t.shouldUseNativeValidation&&ld(e,t);var r={};for(var n in e){var o=E(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(fd(t.names||Object.keys(e),n)){var s=Object.assign({},dd(E(r,n)));U(s,"root",i),U(r,n,s)}else U(r,n,i)}return r},dd=function(e){return Array.isArray(e)?e.filter(Boolean):[]},fd=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},pd=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var o=n.path.map(function(a){return a.key}).join(".");if(r[o]||(r[o]={message:n.message,type:n.validation}),t){var i=r[o].types,s=i&&i[n.validation];r[o]=ws(o,t,r,n.validation,s?[].concat(s,n.message):n.message)}e.issues.shift()}}return r},Ls=function(e,t,r){return r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(s,a){try{var l=function(){function u(c){return{values:r.raw?n:c,errors:{}}}var p=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(Pt(e,n,p)):Promise.resolve(la(e,n,p)).then(u)}()}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(s instanceof Nr)return{values:{},errors:ud(pd(s,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};const hd=27,vd=12,md=10,gd=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},bd=xn("multiple-choice"),yd=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Ls(Be({checked:yi(bi(ia()),r=>Object.entries(r).filter(([n,o])=>o).map(([n,o])=>n),[At(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),wi(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},wd=({input:e,onSubmitSuccess:t})=>{var l,u;const r=e.key?(l=D.current$.value.flow)==null?void 0:l.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,{register:o,handleSubmit:i,formState:{errors:s}}=Fs({defaultValues:{checked:n?{}:bd(r)?Object.fromEntries(r.value.map(p=>[p,!0])):{}},resolver:yd(e.config)}),a=Nn();return d("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:p=>{n&&gd(p.currentTarget)},onSubmit:i(p=>{const c=p.checked;t(c)}),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*hd+5*vd+2*md},class:Ue("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{"justify-center":e.config.options.length===1}),children:e.config.options.map((p,c)=>{const v=`checked.${p.value}`,{ref:b,...m}=o(v);return d("li",{class:"relative",children:[d("input",{autoFocus:c===0,ref:h=>{h&&c===0&&(a.current=h),b(h)},id:v,...m,class:"peer sr-only h-full",type:"checkbox"}),d("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",htmlFor:v,children:p.label})]},p.value)})}),d("div",{class:"flex flex-col items-center gap-2",children:[!n&&d(jt,{}),e.config.minSelected===0&&d(Ut,{type:"button",onClick:()=>t([])})]})]}),d("div",{class:"px-1",children:d(Fn,{error:(u=s.checked)==null?void 0:u.root})})]})},_d=({input:e,onSubmitSuccess:t})=>d("div",{class:"flex flex-col items-center py-3",children:d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})})}),kt={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"},xd=be(kt.phone,[fa(/^\+?[0-9 -]+$/,kt.phone)]),kd={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},$d=xn("text"),Sd=e=>{const t=`Please enter no more than ${e.maxChars} characters`;return Ls(Be({text:{email:be(kt.email,[da(kt.email),At(e.maxChars??1/0,t)]),phone:yi(xd,r=>r.replace(/[^0-9]/g,""),[At(e.maxChars??1/0,t)]),text:be([wi(1,kt.empty),At(e.maxChars??1/0,t)]),url:be([pa(kt.url),At(e.maxChars??1/0,t)])}[e.format]}))},Ed=({input:e,onSubmitSuccess:t})=>{var p;const r=e.key?(p=D.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:s}}=Fs({defaultValues:{text:n||($d(r)?r.value:"")},resolver:Sd(e.config)}),{ref:a,...l}=o("text",{required:!e.config.optional}),u=L();return ye(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d(q,{children:d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{t(c.text)}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{id:"chat-input",...l,...kd[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),a(c)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&d(Ut,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(jt,{})]}),d(Fn,{error:s.text})]})})},Cd=()=>{var i;const e=(i=D.current$.value.flow)==null?void 0:i.data.currentInput,[t,r]=xu(),n=L(null);D.inputHeight$.value=r.height,V(()=>{const s=n.current;if(s)return s.addEventListener("transitionstart",ce.scrollToEnd.smooth),s.addEventListener("transitioncancel",ce.scrollToEnd.smooth),s.addEventListener("transitionend",ce.scrollToEnd.smooth),()=>{s.removeEventListener("transitionstart",ce.scrollToEnd.smooth),s.removeEventListener("transitioncancel",ce.scrollToEnd.smooth),s.removeEventListener("transitionend",ce.scrollToEnd.smooth)}},[]);const o=s=>a=>ce.onSubmitSuccessFn$.value({type:s,value:a});return d("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:d("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:Ne({input:e}).with({input:fe.nullish},()=>d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),d(jt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>d(Ed,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>d(wd,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"boolean"}},s=>d(Lu,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"file"}},s=>d(Hu,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"submit"}},s=>d(_d,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"address"}},s=>d(Du,{onSubmitSuccess:o(s.input.type),...s})).exhaustive()})})},Od=on("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"}}),Pd=({children:e,className:t,animate:r,side:n,...o})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Od({className:t,side:n,animate:r}),...o,children:e}),Ad=({className:e,...t})=>(V(()=>{ce.scrollToEnd.smooth()}),d("div",{"aria-hidden":!0,children:ce.isBotTyping$.value===!0?d("div",{"aria-label":"Typing…",class:Ue("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),Id={bot:"left",user:"right"},Dd=on("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]"}}}),Td=({lastSentMessageFooter:e})=>{var r;const t=((r=D.current$.value.flow)==null?void 0:r.data.messages)??[];return V(()=>{ce.scrollToEnd.smooth()},[t.length]),d("ol",{"aria-label":"Chat messages",class:"flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,o)=>d(q,{children:d("li",{class:"flex",children:Ne(n).with({type:"system"},i=>d("p",{class:Dd({variant:i.variant}),children:i.text})).with({type:"text",author:fe.union("bot","user")},i=>{const s=i.author==="user"&&!t.slice(o+1).some(l=>l.type==="text"&&l.author==="user"),a=o===t.length-1;return d(Pd,{animate:a,side:Id[i.author],children:[i.text,s?e:null]},o)}).with({type:"link"},i=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:i.href,children:[i.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})})).with({type:"image"},i=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>d(ju,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()})},o)),d(Ad,{},"typing")]})},Nd=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=D.current$.value;ke(n,"Flow is required to exist to show chatbot body");const o=D.viewState$.value,{chatRef:i,chatService:s}=Ou(),[a,l]=Y();return ye(()=>{o==="maximised"&&ce.scrollToEnd.instant()},[o]),ye(()=>{const{state:u,flow:p}=D.current$.peek();if(u!=="loaded")throw new Error(pl.invalid_state);let c=p.data.nodeHistory.at(-1);if(ce.scrollToEnd.instant(),D.setInput(void 0),p.data.isFinished)return;c===void 0?(c=ts(n.nodes).id,D.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:p.data.flowSessionId},customProperties:n.context})):D.removeMessagesSentByNodeIds([c]);const{interpret:v,abort:b,undo:m}=ou({context:n.context,analytics:r,apiClient:t,logger:e,flow:n.nodes,chatService:s,getSubmissions:()=>{var h;return(h=D.current$.peek().flow)==null?void 0:h.data.submissions},onInterpret:(h,_)=>{const k=D.current$.peek().flow;ke(k),_&&(k.data.sequence=k.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:_.id,to_node_id:h.id,sequence:k.data.sequence,flow_session_id:k.data.flowSessionId},customProperties:n.context})),D.setCurrentNodeId(h.id)},onFlowEnd:async()=>{D.markAsFinished();const h=D.current$.peek().flow;ke(h),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:h.data.flowSessionId},customProperties:n.context})}});return l(()=>m),v(c),b},[r,t,s,e,n]),d(q,{children:[d("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:D.inputHeight$.value},children:d(Td,{lastSentMessageFooter:n.data.isFinished||!a?null:d(Md,{undoFn:a})})}),d(Cd,{})]})},Fd=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"):[],Md=({undoFn:e})=>d("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:d("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=D.current$.peek();ke(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(D.removeMessagesSentByNodeIds(n),D.setInput(void 0),n.pop(),n.map(o=>t.nodes.find(i=>i.id===o)).filter(Boolean).flatMap(Fd).forEach(o=>delete t.data.submissions[o]),D.current$.value={...D.current$.value})},children:"Undo"})}),Ld=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Nd},Symbol.toStringTag,{value:"Module"}))})();
|
|
45
|
+
}`},nu=({_internal_domManager:e=qc(),theme:t})=>Ze(({apiClient:r,logger:n,analytics:o})=>{let i=!1;const s=()=>{if(typeof window>"u")return;const a=[T("style",{id:"inploi-chatbot-styles"},Kc),T("style",{id:"inploi-chatbot-theme"},ru(t))],c=e.getOrCreateChatbotElement();ct(T(q,{},[a,T(Uc,{apiClient:r,logger:n,analytics:o})]),c),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;s(),n.info("Chatbot plugin prepared")}catch(a){n.error("Error preparing chatbot plugin",a)}},fetchFlowByJobId:async a=>r.fetch(`/flow/job/${a}`).then(c=>{const u=Pt(Hc,c);return{context:{job_id:u.job.id,flow_id:u.flow.id,flow_version:u.flow.version},flow:u.flow,title:`Applying for “${u.job.title}”`,flowKeys:[u.job.id]}}),fetchFlowById:async a=>r.fetch(`/flow/id/${a}`).then(c=>{const u=Pt(zc,c);return{flow:u.flow,context:{flow_id:u.flow.id,flow_version:u.flow.version},title:"Chatbot",flowKeys:[]}}),open:async a=>{if(!(typeof window>"u"))try{D.cancelCurrentFlow(),D.viewState$.value="maximised",i||s(),a instanceof Promise?(D.current$.value={state:"loading"},a.then(async c=>{const u=Pt(Wc,c);D.startFlow(u)}).catch(c=>{const u=c instanceof Error?c.message:"An error occurred";D.current$.value={state:"error",error:u}})):D.startFlow(a)}catch(c){n.error("Error starting flow",c)}},startApplication:void 0,closeApplication:void 0,close:async()=>{typeof window>"u"||(D.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=nu;const cs=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(n)return cs({node:n,nodes:t,stopWhen:r})},iu=({childNode:e,nodes:t})=>{const n=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(a=>a.id===o.branchId);if(!i)return!1;const s=cs({node:i,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(n!=null&&n.nextId)return t.find(o=>o.id===n.nextId)},ou=({flow:e,analytics:t,logger:r,context:n,apiClient:o,getSubmissions:i,chatService:s,onFlowEnd:a,onInterpret:c})=>{let u=new AbortController;const p=async(l,v)=>{const b=i();c==null||c(l,v);try{await su({analytics:t,logger:r,apiClient:o,context:n,node:l,submissions:b,chat:{sendMessage:async g=>s.send({groupId:l.id,message:g,signal:u.signal}),userInput:async g=>s.input({input:g,signal:u.signal})},next:g=>{const h=g?e.find(_=>_.id===g):iu({childNode:l,nodes:e});return h?p(h,l):a==null?void 0:a(l)},end:()=>a==null?void 0:a(l)})}catch(g){if(g instanceof Rt)return;throw g}};return{interpret:async l=>{const v=e.find(b=>b.id===l)??rs(e);return p(v)},undo:l=>{let v=1;const b=e.find(h=>h.id===l[l.length-1]);for(let h=l.length-2;h>0;h--){const _=l[h],k=e.find(w=>w.id===_);if(!k||(v++,k.type.startsWith("question-")))break}u.abort(),u=new AbortController;const g=e.find(h=>h.id===l[l.length-v]);return ke(g,"Undo failed: new start node not found"),p(g,b),{removed:v}},abort:()=>{u.abort()}}};async function su(e){return await Ne(e).with({node:{type:"text"}},uu).with({node:{type:"image"}},du).with({node:{type:"question-text"}},fu).with({node:{type:"question-enum"}},hu).with({node:{type:"question-number"}},pu).with({node:{type:"question-boolean"}},vu).with({node:{type:"question-file"}},mu).with({node:{type:"question-address"}},gu).with({node:{type:"end-flow"}},bu).with({node:{type:"if-block"}},cu).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},lu).with({node:{type:"integration-application-submit"}},au).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function au({chat:e,next:t,node:r,logger:n,apiClient:o,submissions:i,context:s,analytics:a}){r.data.skipConfirmation!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"system",variant:"info",text:"Submitting…"});const{anonymous_id:c,session_id:u}=a.getSessionInfo(),p=await o.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:r.data.integrationId,anonymous_id:c,session_id:u,submissions:Ic(i||{})})}).catch(l=>l);await Ne(p).with({ats_data:{redirect_url:fe.string}},async l=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const v=new URL(l.ats_data.redirect_url);c&&!v.searchParams.has("anonymous_id")&&v.searchParams.set("anonymous_id",c),await e.sendMessage({type:"link",href:v.toString(),text:"Complete submission"}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).otherwise(async l=>{n.error(l),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),t(r.id)})}async function lu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({type:"link",href:r.data.href,text:ot(r.data.cta,n)}),t(r.nextId)}async function cu({submissions:e,next:t,node:r}){const n=yu(r,e)?r.branchId:r.nextId;t(n)}async function uu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.text,n)}),t(r.nextId)}async function du({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 fu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars}});o.value===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 pu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:"text"}});o.value===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 hu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.question,n)});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(i=>o.value.includes(i.value)).map(i=>i.label).join(", ")}),t(r.nextId)}async function vu({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:ot(r.data.question,n)});const i=(await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}})).value;i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:{true:r.data.trueLabel,false:r.data.falseLabel}[i]}),t(r.nextId)}async function gu({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.value===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const o=Object.values(n.value).filter(i=>i&&i.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:o})}return t(r.nextId)}async function mu({node:e,chat:t,next:r,submissions:n}){await t.sendMessage({author:"bot",type:"text",text:ot(e.data.question,n)});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const i of o.value)await t.sendMessage({author:"user",type:"file",fileName:i.name,fileSizeKb:i.sizeKb});r(e.nextId)}async function bu({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const us=fe.union(fe.string,fe.array(fe.string),null),yu=(e,t)=>{const r=t==null?void 0:t[e.data.compareKey];return r?Ne({...e.data,answer:r}).with({compare:"equals"},({compareValue:n})=>typeof r.value=="string"||typeof r.value=="boolean"?n===r.value.toString():!1).with({compare:"notEquals"},({compareValue:n})=>typeof r.value=="string"||typeof r.value=="boolean"?n!==r.value.toString():!1).with({compare:"contains",answer:{value:us}},({compareValue:n,answer:o})=>o.value!==null&&o.value.includes(n)).with({compare:"notContains",answer:{value:us}},({compareValue:n,answer:o})=>o.value===null||!o.value.includes(n)).with({answer:{type:"file"}},()=>!1).with({answer:{type:"address",value:fe.any}},()=>!1).exhaustive():!1},ot=(e,t)=>{const r=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(r,(n,o,i="")=>{o=o.trim();const s=t==null?void 0:t[o];if(!s)return i;switch(s.type){case"boolean":return s.value==="true"?"true":"false";case"file":return s.value?s.value.map(a=>`${a.name} (${Lt(a.sizeKb)})`).join(", "):"no files";case"multiple-choice":return s.value.join(", ");default:return s.value||i}})};function wu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pn(e,t,r){var n,o,i,s,a;t==null&&(t=100);function c(){var p=Date.now()-s;p<t&&p>=0?n=setTimeout(c,t-p):(n=null,r||(a=e.apply(i,o),i=o=null))}var u=function(){i=this,o=arguments,s=Date.now();var p=r&&!n;return n||(n=setTimeout(c,t)),p&&(a=e.apply(i,o),i=o=null),a};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(a=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},u}Pn.debounce=Pn;var _u=Pn;const ds=wu(_u);function xu(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,a]=Y({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=L({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),u=t?typeof t=="number"?t:t.scroll:null,p=t?typeof t=="number"?t:t.resize:null,l=L(!1);V(()=>(l.current=!0,()=>void(l.current=!1)));const[v,b,g]=se(()=>{const w=()=>{if(!c.current.element)return;const{left:P,top:I,width:O,height:z,bottom:W,right:N,x:F,y:ie}=c.current.element.getBoundingClientRect(),ee={left:P,top:I,width:O,height:z,bottom:W,right:N,x:F,y:ie};c.current.element instanceof HTMLElement&&o&&(ee.height=c.current.element.offsetHeight,ee.width=c.current.element.offsetWidth),Object.freeze(ee),l.current&&!Eu(c.current.lastBounds,ee)&&a(c.current.lastBounds=ee)};return[w,p?ds(w,p):w,u?ds(w,u):w]},[a,o,u,p]);function h(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",g,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function _(){c.current.element&&(c.current.resizeObserver=new i(g),c.current.resizeObserver.observe(c.current.element),r&&c.current.scrollContainers&&c.current.scrollContainers.forEach(w=>w.addEventListener("scroll",g,{capture:!0,passive:!0})))}const k=w=>{!w||w===c.current.element||(h(),c.current.element=w,c.current.scrollContainers=fs(w),_())};return $u(g,!!r),ku(b),V(()=>{h(),_()},[r,g,b]),V(()=>h,[]),[k,s,v]}function ku(e){V(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function $u(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 fs(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...fs(e.parentElement)]}const Su=["x","y","top","bottom","left","right","width","height"],Eu=(e,t)=>Su.every(r=>e[r]===t[r]),jt=({class:e,...t})=>d("button",{class:Ue("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:"Send"}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})}),Cu=25,An=We({instant:()=>{},smooth:()=>{}}),le={onSubmitSuccessFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>An.value.instant(),smooth:()=>An.value.smooth()}},Ou=()=>{const e=L(null);ye(()=>{An.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*1.5&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=se(()=>({send:async({message:r,signal:n,groupId:o})=>{if(await Ne(r).with({author:"bot",type:"text"},async i=>{if(n!=null&&n.aborted)throw new Rt;le.isBotTyping$.value=!0;const s=Math.min(Math.max(20,i.text.length),100)*Cu;await new Promise(a=>setTimeout(a,s,{signal:n})),le.isBotTyping$.value=!1}).otherwise(async()=>{}),n!=null&&n.aborted)throw new Rt;D.addMessage(r,o)},input:async({input:r,signal:n})=>{if(n!=null&&n.aborted)throw new Rt;return D.setInput(r),await new Promise(o=>{const i=s=>{if(n!=null&&n.aborted)throw new Rt;D.setInput(void 0),r.key&&D.setSubmission(r.key,s),o(s)};le.onSubmitSuccessFn$.value=i})}}),[]);return{chatRef:e,chatService:t}},Ut=({class:e,...t})=>d("button",{type:"button",class:Ue("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:"Skip"}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),ps={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"]},_r=Object.keys(ps),Pu=e=>_r.reduce((t,r)=>{const n=ps[r],o=e.filter(i=>i.types.some(s=>n.includes(s))).map(i=>i.long_name).join(", ");return o&&(t[r]=o),t},{}),Au=document.createElement("div"),Iu=()=>se(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(Au);return{enabled:!0,getPredictions:async n=>{const{predictions:o}=await t.getPlacePredictions({input:n});return o.map(i=>({label:i.description,value:i.place_id}))},getPlaceDetails:async n=>await new Promise((i,s)=>r.getDetails({placeId:n,fields:["address_components"]},(a,c)=>c!==e.maps.places.PlacesServiceStatus.OK?s(c):a===null?s("ZERO_RESULTS"):i({ok:!0,place:a}))).catch(async i=>(console.error("Failed to get address details",i),{ok:!1}))}},[]),In=e=>d("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:"Back"})]}),Dn={label:"Fill in manually",value:""},Du=({input:e,onSubmitSuccess:t})=>{const[r,n]=Y(""),[o,i]=Y(),[s,a]=Y([]),[c,u]=Y(),{enabled:p,getPredictions:l,getPlaceDetails:v}=Iu(),[b,g]=Y(p?"query":"manual"),h=se(()=>ns(_=>{if(ke(p,"Query state should not be enabled if Google Places isn't available"),n(_),_===""){a([]);return}l(_).then(k=>{a(k)})},500),[p,l]);switch(V(()=>{if(p&&!(c===void 0||c===""))return v(c).then(_=>{if(!_.ok||!_.place.address_components){i({});return}const k=Pu(_.place.address_components);i(k),g("details")}),()=>{i(void 0)}},[c,v,p]),b){case"query":return ke(p,"Query state should not be enabled if Google Places isn't available"),d(Tu,{input:e,onSkip:()=>t(null),onAddressSelect:_=>{u(_),g("loading")},onInputChange:h,suggestions:s,query:r});case"loading":return d(Tn,{input:e,onSubmitSuccess:t,addressFields:{},actions:d(In,{onClick:()=>{u(void 0),g("query")}})});case"details":return ke(o!==void 0),d(Tn,{input:e,onSubmitSuccess:t,addressFields:o,actions:d(In,{onClick:()=>{u(void 0),g("query")}})});case"manual":return d(Tn,{input:e,onSubmitSuccess:t,addressFields:{},actions:p?d(In,{onClick:()=>{u(void 0),g("query")}}):void 0})}},Tu=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:o,onInputChange:i})=>{const s=L(null);return ye(()=>{s.current&&(s.current.focus(),s.current.select())},[]),d(q,{children:[d("form",{noValidate:!0,onSubmit:a=>{a.preventDefault()},class:"flex flex-col justify-end gap-1 p-2.5",children:[d("input",{onChange:a=>{i(a.currentTarget.value)},ref:s,name:"address",id:"chat-address",autocomplete:"on",autoFocus:!0,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder||"Search an address",defaultValue:o}),!e.config.optional&&d(Ut,{class:"absolute right-3",onClick:t})]}),d("ul",{children:[r.map(a=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(a.value)},children:[d("span",{class:"flex-grow",children:a.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},a.label)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(Dn.value)},children:d("span",{class:"flex-grow",children:Dn.label})})},Dn.label)]})]})},Nu={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},Tn=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const o=L(null);return ye(()=>{if(o.current){const i=o.current.querySelector("input");i&&(i.focus(),i.select())}},[]),d("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:i=>{const s=new FormData(i.currentTarget),a=Object.fromEntries(s.entries());t(a)},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:o,children:_r.map((i,s)=>{const a=`isdk_${i}`,c=n.config.keys[i];return c?d(q,{children:[d("label",{for:a,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:Nu[i]}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[d("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 focus:outline-none",name:c,id:a,defaultValue:e[i],required:!0}),s!==_r.length-1&&d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),s===_r.length-1&&d("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),d("div",{class:"flex w-full flex-1 ",children:[d("div",{class:"flex-grow",children:r}),d(jt,{class:"flex items-center justify-center"})]})]})},Nn=()=>{const e=L(null);return V(()=>{var t;(t=e.current)==null||t.focus()},[]),e},hs=["true","false"],Fu=sa(hs),Mu="answer",Lu=({input:e,onSubmitSuccess:t})=>{const r=Nn();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const o=Ne(n).with({nativeEvent:{submitter:fe.select(fe.union(fe.instanceOf(HTMLButtonElement),fe.instanceOf(HTMLInputElement)))}},s=>s.value).otherwise(()=>{throw new Error("invalid form")}),i=Pt(Fu,o);t(i)},children:[d("div",{class:"flex items-center gap-2 p-2.5",children:hs.map((n,o)=>d("button",{ref:o===0?r:null,type:"submit",name:Mu,value:n,class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:d("p",{class:"truncate text-center text-base",children:e.config.labels[n]})}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(Ut,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Fn=({error:e})=>e?d("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[d("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null,Ru=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}),Vu=e=>e.reduce((t,r)=>t+r.sizeKb,0),Bu=xn("file"),vs=3,ju=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${n}$`),"");return d("div",{class:Ue("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"block truncate",children:o}),d("span",{children:[".",n]})]}),d("p",{"aria-label":"File size",class:"text-accent-11",children:Lt(e.sizeKb)})]})},gs=({class:e,...t})=>d("li",{class:Ue("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),ms=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Uu=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(ms(n.name).toLowerCase()))},zu=(e,t)=>{const r=ms(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},Hu=({input:e,onSubmitSuccess:t})=>{var p;const r=(p=D.current$.value.flow)==null?void 0:p.data.submissions[e.key],[n,o]=Y(Bu(r)&&r.value!==null?r.value:[]),[i,s]=Y(),a=n.length-vs,c=Vu(n),u=Nn();return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:l=>(l.preventDefault(),s(void 0),n.length===0?s({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!Uu({allowedExtensions:e.config.extensions,files:n})?s({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&c>e.config.fileSizeLimitKib?s({type:"max",message:`File size exceeds limit of ${Lt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?s({type:"invalid",message:"Only one file is allowed"}):t(n)),children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:u,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?d(q,{children:[d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,vs).map(l=>{const v=l.name.split(".").pop(),b=l.name.replace(new RegExp(`.${v}$`),"");return d(gs,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:b}),d("span",{children:[".",v]})]})}),a>0?d(gs,{children:["+",a," file",a!==1?"s":""]}):null]}),d("p",{class:"text-neutral-11 text-xs",children:[Lt(c)," ",n.length>1?"total":""]})]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-10 text-xs",children:["(max ",Lt(e.config.fileSizeLimitKib),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(l=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:l.replace(".","")}))})]})]}),d("input",{id:"dropzone-file",onInput:async l=>{ke(l.target instanceof HTMLInputElement);const v=l.target.files?Array.from(l.target.files):[],b=await Promise.allSettled(v.map(async h=>{const _=await Ru(h);return{name:zu(h.name,42),data:_,sizeKb:h.size/1e3}}));if(b.some(({status:h})=>h==="rejected"))return s({type:"invalid",message:"Invalid file"});const g=b.map(h=>h.status==="fulfilled"?h.value:null).filter(Boolean);o(g)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(jt,{disabled:n.length===0}),e.config.optional&&d(Ut,{onClick:()=>t(null)})]})]}),i&&d(Fn,{error:i})]})};var zt=e=>e.type==="checkbox",_t=e=>e instanceof Date,ce=e=>e==null;const bs=e=>typeof e=="object";var J=e=>!ce(e)&&!Array.isArray(e)&&bs(e)&&!_t(e),Wu=e=>J(e)&&e.target?zt(e.target)?e.target.checked:e.target.value:e,Ku=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,qu=(e,t)=>e.has(Ku(t)),Yu=e=>{const t=e.constructor&&e.constructor.prototype;return J(t)&&t.hasOwnProperty("isPrototypeOf")},Mn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Fe(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Mn&&(e instanceof Blob||e instanceof FileList))&&(r||J(e)))if(t=r?[]:{},!r&&!Yu(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Fe(e[n]));else return e;return t}var Ht=e=>Array.isArray(e)?e.filter(Boolean):[],Z=e=>e===void 0,E=(e,t,r)=>{if(!t||!J(e))return r;const n=Ht(t.split(/[,[\].]+?/)).reduce((o,i)=>ce(o)?o:o[i],e);return Z(n)||n===e?Z(e[t])?r:e[t]:n},Ye=e=>typeof e=="boolean";const ys={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Me={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};xe.createContext(null);var Gu=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==$e.all&&(t._proxyFormState[s]=!n||$e.all),r&&(r[s]=!0),e[s]}});return o},we=e=>J(e)&&!Object.keys(e).length,Zu=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return we(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!n||$e.all))},Ln=e=>Array.isArray(e)?e:[e];function Qu(e){const t=xe.useRef(e);t.current=e,xe.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Oe=e=>typeof e=="string",Xu=(e,t,r,n,o)=>Oe(e)?(n&&t.watch.add(e),E(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),E(r,i))):(n&&(t.watchAll=!0),r),Rn=e=>/^\w*$/.test(e),ws=e=>Ht(e.replace(/["|']|\]/g,"").split(/\.|\[/));function U(e,t,r){let n=-1;const o=Rn(t)?[t]:ws(t),i=o.length,s=i-1;for(;++n<i;){const a=o[n];let c=r;if(n!==s){const u=e[a];c=J(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}e[a]=c,e=e[a]}return e}var _s=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},xs=e=>({isOnSubmit:!e||e===$e.onSubmit,isOnBlur:e===$e.onBlur,isOnChange:e===$e.onChange,isOnAll:e===$e.all,isOnTouch:e===$e.onTouched}),ks=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const xr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=E(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!n)break;if(s.ref&&t(s.ref,s.name)&&!n)break}else J(a)&&xr(a,t)}}};var Ju=(e,t,r)=>{const n=Ht(E(e,r));return U(n,"root",t[r]),U(e,r,n),e},Vn=e=>e.type==="file",Ge=e=>typeof e=="function",kr=e=>{if(!Mn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},$r=e=>Oe(e),Bn=e=>e.type==="radio",Sr=e=>e instanceof RegExp;const $s={value:!1,isValid:!1},Ss={value:!0,isValid:!0};var Es=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&&!Z(e[0].attributes.value)?Z(e[0].value)||e[0].value===""?Ss:{value:e[0].value,isValid:!0}:Ss:$s}return $s};const Cs={isValid:!1,value:null};var Os=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Cs):Cs;function Ps(e,t,r="validate"){if($r(e)||Array.isArray(e)&&e.every($r)||Ye(e)&&!e)return{type:r,message:$r(e)?e:"",ref:t}}var xt=e=>J(e)&&!Sr(e)?e:{value:e,message:""},As=async(e,t,r,n,o)=>{const{ref:i,refs:s,required:a,maxLength:c,minLength:u,min:p,max:l,pattern:v,validate:b,name:g,valueAsNumber:h,mount:_,disabled:k}=e._f,w=E(t,g);if(!_||k)return{};const P=s?s[0]:i,I=B=>{n&&P.reportValidity&&(P.setCustomValidity(Ye(B)?"":B||""),P.reportValidity())},O={},z=Bn(i),W=zt(i),N=z||W,F=(h||Vn(i))&&Z(i.value)&&Z(w)||kr(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,ie=_s.bind(null,g,r,O),ee=(B,M,Q,pe=Me.maxLength,_e=Me.minLength)=>{const Pe=B?M:Q;O[g]={type:B?pe:_e,message:Pe,ref:i,...ie(B?pe:_e,Pe)}};if(o?!Array.isArray(w)||!w.length:a&&(!N&&(F||ce(w))||Ye(w)&&!w||W&&!Es(s).isValid||z&&!Os(s).isValid)){const{value:B,message:M}=$r(a)?{value:!!a,message:a}:xt(a);if(B&&(O[g]={type:Me.required,message:M,ref:P,...ie(Me.required,M)},!r))return I(M),O}if(!F&&(!ce(p)||!ce(l))){let B,M;const Q=xt(l),pe=xt(p);if(!ce(w)&&!isNaN(w)){const _e=i.valueAsNumber||w&&+w;ce(Q.value)||(B=_e>Q.value),ce(pe.value)||(M=_e<pe.value)}else{const _e=i.valueAsDate||new Date(w),Pe=Or=>new Date(new Date().toDateString()+" "+Or),at=i.type=="time",Kt=i.type=="week";Oe(Q.value)&&w&&(B=at?Pe(w)>Pe(Q.value):Kt?w>Q.value:_e>new Date(Q.value)),Oe(pe.value)&&w&&(M=at?Pe(w)<Pe(pe.value):Kt?w<pe.value:_e<new Date(pe.value))}if((B||M)&&(ee(!!B,Q.message,pe.message,Me.max,Me.min),!r))return I(O[g].message),O}if((c||u)&&!F&&(Oe(w)||o&&Array.isArray(w))){const B=xt(c),M=xt(u),Q=!ce(B.value)&&w.length>+B.value,pe=!ce(M.value)&&w.length<+M.value;if((Q||pe)&&(ee(Q,B.message,M.message),!r))return I(O[g].message),O}if(v&&!F&&Oe(w)){const{value:B,message:M}=xt(v);if(Sr(B)&&!w.match(B)&&(O[g]={type:Me.pattern,message:M,ref:i,...ie(Me.pattern,M)},!r))return I(M),O}if(b){if(Ge(b)){const B=await b(w,t),M=Ps(B,P);if(M&&(O[g]={...M,...ie(Me.validate,M.message)},!r))return I(M.message),O}else if(J(b)){let B={};for(const M in b){if(!we(B)&&!r)break;const Q=Ps(await b[M](w,t),P,M);Q&&(B={...Q,...ie(M,Q.message)},I(Q.message),r&&(O[g]=B))}if(!we(B)&&(O[g]={ref:P,...B},!r))return O}}return I(!0),O};function ed(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Z(e)?n++:e[t[n++]];return e}function td(e){for(const t in e)if(e.hasOwnProperty(t)&&!Z(e[t]))return!1;return!0}function ne(e,t){const r=Array.isArray(t)?t:Rn(t)?[t]:ws(t),n=r.length===1?e:ed(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(J(n)&&we(n)||Array.isArray(n)&&td(n))&&ne(e,r.slice(0,-1)),e}function jn(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Er=e=>ce(e)||!bs(e);function st(e,t){if(Er(e)||Er(t))return e===t;if(_t(e)&&_t(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const s=t[o];if(_t(i)&&_t(s)||J(i)&&J(s)||Array.isArray(i)&&Array.isArray(s)?!st(i,s):i!==s)return!1}}return!0}var Is=e=>e.type==="select-multiple",rd=e=>Bn(e)||zt(e),Un=e=>kr(e)&&e.isConnected,Ds=e=>{for(const t in e)if(Ge(e[t]))return!0;return!1};function Cr(e,t={}){const r=Array.isArray(e);if(J(e)||r)for(const n in e)Array.isArray(e[n])||J(e[n])&&!Ds(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Cr(e[n],t[n])):ce(e[n])||(t[n]=!0);return t}function Ts(e,t,r){const n=Array.isArray(e);if(J(e)||n)for(const o in e)Array.isArray(e[o])||J(e[o])&&!Ds(e[o])?Z(t)||Er(r[o])?r[o]=Array.isArray(e[o])?Cr(e[o],[]):{...Cr(e[o])}:Ts(e[o],ce(t)?{}:t[o],r[o]):r[o]=!st(e[o],t[o]);return r}var zn=(e,t)=>Ts(e,t,Cr(t)),Ns=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Z(e)?e:t?e===""?NaN:e&&+e:r&&Oe(e)?new Date(e):n?n(e):e;function Hn(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Vn(t)?t.files:Bn(t)?Os(e.refs).value:Is(t)?[...t.selectedOptions].map(({value:r})=>r):zt(t)?Es(e.refs).value:Ns(Z(t.value)?e.ref.value:t.value,e)}var nd=(e,t,r,n)=>{const o={};for(const i of e){const s=E(t,i);s&&U(o,i,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Wt=e=>Z(e)?e:Sr(e)?e.source:J(e)?Sr(e.value)?e.value.source:e.value:e,id=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Fs(e,t,r){const n=E(e,r);if(n||Rn(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),s=E(t,i),a=E(e,i);if(s&&!Array.isArray(s)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:r}}var od=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,sd=(e,t)=>!Ht(E(e,t)).length&&ne(e,t);const ad={mode:$e.onSubmit,reValidateMode:$e.onChange,shouldFocusError:!0};function ld(e={},t){let r={...ad,...e},n={submitCount:0,isDirty:!1,isLoading:Ge(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=J(r.defaultValues)||J(r.values)?Fe(r.defaultValues||r.values)||{}:{},s=r.shouldUnregister?{}:Fe(i),a={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,p=0;const l={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:jn(),array:jn(),state:jn()},b=e.resetOptions&&e.resetOptions.keepDirtyValues,g=xs(r.mode),h=xs(r.reValidateMode),_=r.criteriaMode===$e.all,k=f=>m=>{clearTimeout(p),p=setTimeout(f,m)},w=async f=>{if(l.isValid||f){const m=r.resolver?we((await F()).errors):await ee(o,!0);m!==n.isValid&&v.state.next({isValid:m})}},P=f=>l.isValidating&&v.state.next({isValidating:f}),I=(f,m=[],y,C,$=!0,x=!0)=>{if(C&&y){if(a.action=!0,x&&Array.isArray(E(o,f))){const A=y(E(o,f),C.argA,C.argB);$&&U(o,f,A)}if(x&&Array.isArray(E(n.errors,f))){const A=y(E(n.errors,f),C.argA,C.argB);$&&U(n.errors,f,A),sd(n.errors,f)}if(l.touchedFields&&x&&Array.isArray(E(n.touchedFields,f))){const A=y(E(n.touchedFields,f),C.argA,C.argB);$&&U(n.touchedFields,f,A)}l.dirtyFields&&(n.dirtyFields=zn(i,s)),v.state.next({name:f,isDirty:M(f,m),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else U(s,f,m)},O=(f,m)=>{U(n.errors,f,m),v.state.next({errors:n.errors})},z=(f,m,y,C)=>{const $=E(o,f);if($){const x=E(s,f,Z(y)?E(i,f):y);Z(x)||C&&C.defaultChecked||m?U(s,f,m?x:Hn($._f)):_e(f,x),a.mount&&w()}},W=(f,m,y,C,$)=>{let x=!1,A=!1;const H={name:f};if(!y||C){l.isDirty&&(A=n.isDirty,n.isDirty=H.isDirty=M(),x=A!==H.isDirty);const X=st(E(i,f),m);A=E(n.dirtyFields,f),X?ne(n.dirtyFields,f):U(n.dirtyFields,f,!0),H.dirtyFields=n.dirtyFields,x=x||l.dirtyFields&&A!==!X}if(y){const X=E(n.touchedFields,f);X||(U(n.touchedFields,f,y),H.touchedFields=n.touchedFields,x=x||l.touchedFields&&X!==y)}return x&&$&&v.state.next(H),x?H:{}},N=(f,m,y,C)=>{const $=E(n.errors,f),x=l.isValid&&Ye(m)&&n.isValid!==m;if(e.delayError&&y?(u=k(()=>O(f,y)),u(e.delayError)):(clearTimeout(p),u=null,y?U(n.errors,f,y):ne(n.errors,f)),(y?!st($,y):$)||!we(C)||x){const A={...C,...x&&Ye(m)?{isValid:m}:{},errors:n.errors,name:f};n={...n,...A},v.state.next(A)}P(!1)},F=async f=>r.resolver(s,r.context,nd(f||c.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),ie=async f=>{const{errors:m}=await F(f);if(f)for(const y of f){const C=E(m,y);C?U(n.errors,y,C):ne(n.errors,y)}else n.errors=m;return m},ee=async(f,m,y={valid:!0})=>{for(const C in f){const $=f[C];if($){const{_f:x,...A}=$;if(x){const H=c.array.has(x.name),X=await As($,s,_,r.shouldUseNativeValidation&&!m,H);if(X[x.name]&&(y.valid=!1,m))break;!m&&(E(X,x.name)?H?Ju(n.errors,X,x.name):U(n.errors,x.name,X[x.name]):ne(n.errors,x.name))}A&&await ee(A,m,y)}}return y.valid},B=()=>{for(const f of c.unMount){const m=E(o,f);m&&(m._f.refs?m._f.refs.every(y=>!Un(y)):!Un(m._f.ref))&&Kn(f)}c.unMount=new Set},M=(f,m)=>(f&&m&&U(s,f,m),!st(Vs(),i)),Q=(f,m,y)=>Xu(f,c,{...a.mount?s:Z(m)?i:Oe(f)?{[f]:m}:m},y,m),pe=f=>Ht(E(a.mount?s:i,f,e.shouldUnregister?E(i,f,[]):[])),_e=(f,m,y={})=>{const C=E(o,f);let $=m;if(C){const x=C._f;x&&(!x.disabled&&U(s,f,Ns(m,x)),$=kr(x.ref)&&ce(m)?"":m,Is(x.ref)?[...x.ref.options].forEach(A=>A.selected=$.includes(A.value)):x.refs?zt(x.ref)?x.refs.length>1?x.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(H=>H===A.value):$===A.value)):x.refs[0]&&(x.refs[0].checked=!!$):x.refs.forEach(A=>A.checked=A.value===$):Vn(x.ref)?x.ref.value="":(x.ref.value=$,x.ref.type||v.values.next({name:f,values:{...s}})))}(y.shouldDirty||y.shouldTouch)&&W(f,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&Wn(f)},Pe=(f,m,y)=>{for(const C in m){const $=m[C],x=`${f}.${C}`,A=E(o,x);(c.array.has(f)||!Er($)||A&&!A._f)&&!_t($)?Pe(x,$,y):_e(x,$,y)}},at=(f,m,y={})=>{const C=E(o,f),$=c.array.has(f),x=Fe(m);U(s,f,x),$?(v.array.next({name:f,values:{...s}}),(l.isDirty||l.dirtyFields)&&y.shouldDirty&&v.state.next({name:f,dirtyFields:zn(i,s),isDirty:M(f,x)})):C&&!C._f&&!ce(x)?Pe(f,x,y):_e(f,x,y),ks(f,c)&&v.state.next({...n}),v.values.next({name:f,values:{...s}}),!a.mount&&t()},Kt=async f=>{const m=f.target;let y=m.name,C=!0;const $=E(o,y),x=()=>m.type?Hn($._f):Wu(f),A=H=>{C=Number.isNaN(H)||H===E(s,y,H)};if($){let H,X;const Pr=x(),$t=f.type===ys.BLUR||f.type===ys.FOCUS_OUT,Ud=!id($._f)&&!r.resolver&&!E(n.errors,y)&&!$._f.deps||od($t,E(n.touchedFields,y),n.isSubmitted,h,g),Yn=ks(y,c,$t);U(s,y,Pr),$t?($._f.onBlur&&$._f.onBlur(f),u&&u(0)):$._f.onChange&&$._f.onChange(f);const Gn=W(y,Pr,$t,!1),zd=!we(Gn)||Yn;if(!$t&&v.values.next({name:y,type:f.type,values:{...s}}),Ud)return l.isValid&&w(),zd&&v.state.next({name:y,...Yn?{}:Gn});if(!$t&&Yn&&v.state.next({...n}),P(!0),r.resolver){const{errors:qs}=await F([y]);if(A(Pr),C){const Hd=Fs(n.errors,o,y),Ys=Fs(qs,o,Hd.name||y);H=Ys.error,y=Ys.name,X=we(qs)}}else H=(await As($,s,_,r.shouldUseNativeValidation))[y],A(Pr),C&&(H?X=!1:l.isValid&&(X=await ee(o,!0)));C&&($._f.deps&&Wn($._f.deps),N(y,X,H,Gn))}},Or=(f,m)=>{if(E(n.errors,m)&&f.focus)return f.focus(),1},Wn=async(f,m={})=>{let y,C;const $=Ln(f);if(P(!0),r.resolver){const x=await ie(Z(f)?f:$);y=we(x),C=f?!$.some(A=>E(x,A)):y}else f?(C=(await Promise.all($.map(async x=>{const A=E(o,x);return await ee(A&&A._f?{[x]:A}:A)}))).every(Boolean),!(!C&&!n.isValid)&&w()):C=y=await ee(o);return v.state.next({...!Oe(f)||l.isValid&&y!==n.isValid?{}:{name:f},...r.resolver||!f?{isValid:y}:{},errors:n.errors,isValidating:!1}),m.shouldFocus&&!C&&xr(o,Or,f?$:c.mount),C},Vs=f=>{const m={...i,...a.mount?s:{}};return Z(f)?m:Oe(f)?E(m,f):f.map(y=>E(m,y))},Bs=(f,m)=>({invalid:!!E((m||n).errors,f),isDirty:!!E((m||n).dirtyFields,f),isTouched:!!E((m||n).touchedFields,f),error:E((m||n).errors,f)}),Rd=f=>{f&&Ln(f).forEach(m=>ne(n.errors,m)),v.state.next({errors:f?n.errors:{}})},js=(f,m,y)=>{const C=(E(o,f,{_f:{}})._f||{}).ref;U(n.errors,f,{...m,ref:C}),v.state.next({name:f,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&C&&C.focus&&C.focus()},Vd=(f,m)=>Ge(f)?v.values.subscribe({next:y=>f(Q(void 0,m),y)}):Q(f,m,!0),Kn=(f,m={})=>{for(const y of f?Ln(f):c.mount)c.mount.delete(y),c.array.delete(y),m.keepValue||(ne(o,y),ne(s,y)),!m.keepError&&ne(n.errors,y),!m.keepDirty&&ne(n.dirtyFields,y),!m.keepTouched&&ne(n.touchedFields,y),!r.shouldUnregister&&!m.keepDefaultValue&&ne(i,y);v.values.next({values:{...s}}),v.state.next({...n,...m.keepDirty?{isDirty:M()}:{}}),!m.keepIsValid&&w()},Us=({disabled:f,name:m,field:y,fields:C,value:$})=>{if(Ye(f)){const x=f?void 0:Z($)?Hn(y?y._f:E(C,m)._f):$;U(s,m,x),W(m,x,!1,!1,!0)}},qn=(f,m={})=>{let y=E(o,f);const C=Ye(m.disabled);return U(o,f,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:f}},name:f,mount:!0,...m}}),c.mount.add(f),y?Us({field:y,disabled:m.disabled,name:f}):z(f,!0,m.value),{...C?{disabled:m.disabled}:{},...r.progressive?{required:!!m.required,min:Wt(m.min),max:Wt(m.max),minLength:Wt(m.minLength),maxLength:Wt(m.maxLength),pattern:Wt(m.pattern)}:{},name:f,onChange:Kt,onBlur:Kt,ref:$=>{if($){qn(f,m),y=E(o,f);const x=Z($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=rd(x),H=y._f.refs||[];if(A?H.find(X=>X===x):x===y._f.ref)return;U(o,f,{_f:{...y._f,...A?{refs:[...H.filter(Un),x,...Array.isArray(E(i,f))?[{}]:[]],ref:{type:x.type,name:f}}:{ref:x}}}),z(f,!1,void 0,x)}else y=E(o,f,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||m.shouldUnregister)&&!(qu(c.array,f)&&a.action)&&c.unMount.add(f)}}},zs=()=>r.shouldFocusError&&xr(o,Or,c.mount),Bd=f=>{Ye(f)&&(v.state.next({disabled:f}),xr(o,m=>{m.disabled=f},0,!1))},Hs=(f,m)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let C=Fe(s);if(v.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:x}=await F();n.errors=$,C=x}else await ee(o);ne(n.errors,"root"),we(n.errors)?(v.state.next({errors:{}}),await f(C,y)):(m&&await m({...n.errors},y),zs(),setTimeout(zs)),v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:we(n.errors),submitCount:n.submitCount+1,errors:n.errors})},jd=(f,m={})=>{E(o,f)&&(Z(m.defaultValue)?at(f,E(i,f)):(at(f,m.defaultValue),U(i,f,m.defaultValue)),m.keepTouched||ne(n.touchedFields,f),m.keepDirty||(ne(n.dirtyFields,f),n.isDirty=m.defaultValue?M(f,E(i,f)):M()),m.keepError||(ne(n.errors,f),l.isValid&&w()),v.state.next({...n}))},Ws=(f,m={})=>{const y=f?Fe(f):i,C=Fe(y),$=f&&!we(f)?C:i;if(m.keepDefaultValues||(i=y),!m.keepValues){if(m.keepDirtyValues||b)for(const x of c.mount)E(n.dirtyFields,x)?U($,x,E(s,x)):at(x,E($,x));else{if(Mn&&Z(f))for(const x of c.mount){const A=E(o,x);if(A&&A._f){const H=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(kr(H)){const X=H.closest("form");if(X){X.reset();break}}}}o={}}s=e.shouldUnregister?m.keepDefaultValues?Fe(i):{}:Fe($),v.array.next({values:{...$}}),v.values.next({values:{...$}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!l.isValid||!!m.keepIsValid,a.watch=!!e.shouldUnregister,v.state.next({submitCount:m.keepSubmitCount?n.submitCount:0,isDirty:m.keepDirty?n.isDirty:!!(m.keepDefaultValues&&!st(f,i)),isSubmitted:m.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:m.keepDirtyValues?n.dirtyFields:m.keepDefaultValues&&f?zn(i,f):{},touchedFields:m.keepTouched?n.touchedFields:{},errors:m.keepErrors?n.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ks=(f,m)=>Ws(Ge(f)?f(s):f,m);return{control:{register:qn,unregister:Kn,getFieldState:Bs,handleSubmit:Hs,setError:js,_executeSchema:F,_getWatch:Q,_getDirty:M,_updateValid:w,_removeUnmounted:B,_updateFieldArray:I,_updateDisabledField:Us,_getFieldArray:pe,_reset:Ws,_resetDefaultValues:()=>Ge(r.defaultValues)&&r.defaultValues().then(f=>{Ks(f,r.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:f=>{n={...n,...f}},_disableForm:Bd,_subjects:v,_proxyFormState:l,get _fields(){return o},get _formValues(){return s},get _state(){return a},set _state(f){a=f},get _defaultValues(){return i},get _names(){return c},set _names(f){c=f},get _formState(){return n},set _formState(f){n=f},get _options(){return r},set _options(f){r={...r,...f}}},trigger:Wn,register:qn,handleSubmit:Hs,watch:Vd,setValue:at,getValues:Vs,reset:Ks,resetField:jd,clearErrors:Rd,unregister:Kn,setError:js,setFocus:(f,m={})=>{const y=E(o,f),C=y&&y._f;if(C){const $=C.refs?C.refs[0]:C.ref;$.focus&&($.focus(),m.shouldSelect&&$.select())}},getFieldState:Bs}}function Ms(e={}){const t=xe.useRef(),r=xe.useRef(),[n,o]=xe.useState({isDirty:!1,isValidating:!1,isLoading:Ge(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Ge(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...ld(e,()=>o(s=>({...s}))),formState:n});const i=t.current.control;return i._options=e,Qu({subject:i._subjects.state,next:s=>{Zu(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),xe.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),xe.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==n.isDirty&&i._subjects.state.next({isDirty:s})}},[i,n.isDirty]),xe.useEffect(()=>{e.values&&!st(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),xe.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Gu(n,i),t.current}var Ls=function(e,t,r){if(e&&"reportValidity"in e){var n=E(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},cd=function(e,t){var r=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?Ls(i.ref,o,e):i.refs&&i.refs.forEach(function(s){return Ls(s,o,e)})};for(var n in t.fields)r(n)},ud=function(e,t){t.shouldUseNativeValidation&&cd(e,t);var r={};for(var n in e){var o=E(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(fd(t.names||Object.keys(e),n)){var s=Object.assign({},dd(E(r,n)));U(s,"root",i),U(r,n,s)}else U(r,n,i)}return r},dd=function(e){return Array.isArray(e)?e.filter(Boolean):[]},fd=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},pd=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var o=n.path.map(function(a){return a.key}).join(".");if(r[o]||(r[o]={message:n.message,type:n.validation}),t){var i=r[o].types,s=i&&i[n.validation];r[o]=_s(o,t,r,n.validation,s?[].concat(s,n.message):n.message)}e.issues.shift()}}return r},Rs=function(e,t,r){return r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(s,a){try{var c=function(){function u(l){return{values:r.raw?n:l,errors:{}}}var p=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(Pt(e,n,p)):Promise.resolve(ca(e,n,p)).then(u)}()}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(s){if(s instanceof Nr)return{values:{},errors:ud(pd(s,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};const hd=27,vd=12,gd=10,md=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},bd=xn("multiple-choice"),yd=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Rs(Be({checked:wi(yi(oa()),r=>Object.entries(r).filter(([n,o])=>o).map(([n,o])=>n),[At(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),_i(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},wd=({input:e,onSubmitSuccess:t})=>{var c,u;const r=e.key?(c=D.current$.value.flow)==null?void 0:c.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,{register:o,handleSubmit:i,formState:{errors:s}}=Ms({defaultValues:{checked:n?{}:bd(r)?Object.fromEntries(r.value.map(p=>[p,!0])):{}},resolver:yd(e.config)}),a=Nn();return d("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:p=>{n&&md(p.currentTarget)},onSubmit:i(p=>{const l=p.checked;t(l)}),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*hd+5*vd+2*gd},class:Ue("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{"justify-center":e.config.options.length===1}),children:e.config.options.map((p,l)=>{const v=`checked.${p.value}`,{ref:b,...g}=o(v);return d("li",{class:"relative",children:[d("input",{autoFocus:l===0,ref:h=>{h&&l===0&&(a.current=h),b(h)},id:v,...g,class:"peer sr-only h-full",type:"checkbox"}),d("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",htmlFor:v,children:p.label})]},p.value)})}),d("div",{class:"flex flex-col items-center gap-2",children:[!n&&d(jt,{}),e.config.minSelected===0&&d(Ut,{type:"button",onClick:()=>t([])})]})]}),d("div",{class:"px-1",children:d(Fn,{error:(u=s.checked)==null?void 0:u.root})})]})},_d=({input:e,onSubmitSuccess:t})=>d("div",{class:"flex flex-col items-center py-3",children:d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})})}),kt={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"},xd=be(kt.phone,[fa(/^\+?[0-9 -]+$/,kt.phone)]),kd={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},$d=xn("text"),Sd=e=>{const t=`Please enter no more than ${e.maxChars} characters`;return Rs(Be({text:{email:be(kt.email,[da(kt.email),At(e.maxChars??1/0,t)]),phone:wi(xd,r=>r.replace(/[^0-9]/g,""),[At(e.maxChars??1/0,t)]),text:be([_i(1,kt.empty),At(e.maxChars??1/0,t)]),url:be([pa(kt.url),At(e.maxChars??1/0,t)])}[e.format]}))},Ed=({input:e,onSubmitSuccess:t})=>{var p;const r=e.key?(p=D.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:s}}=Ms({defaultValues:{text:n||($d(r)?r.value:"")},resolver:Sd(e.config)}),{ref:a,...c}=o("text",{required:!e.config.optional}),u=L();return ye(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d(q,{children:d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(l=>{t(l.text)}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{id:"chat-input",...c,...kd[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:l=>{l&&(u.current=l),a(l)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&d(Ut,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(jt,{})]}),d(Fn,{error:s.text})]})})},Cd=()=>{var i;const e=(i=D.current$.value.flow)==null?void 0:i.data.currentInput,[t,r]=xu(),n=L(null);D.inputHeight$.value=r.height,V(()=>{const s=n.current;if(s)return s.addEventListener("transitionstart",le.scrollToEnd.smooth),s.addEventListener("transitioncancel",le.scrollToEnd.smooth),s.addEventListener("transitionend",le.scrollToEnd.smooth),()=>{s.removeEventListener("transitionstart",le.scrollToEnd.smooth),s.removeEventListener("transitioncancel",le.scrollToEnd.smooth),s.removeEventListener("transitionend",le.scrollToEnd.smooth)}},[]);const o=s=>a=>le.onSubmitSuccessFn$.value({type:s,value:a});return d("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:d("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:Ne({input:e}).with({input:fe.nullish},()=>d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),d(jt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>d(Ed,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>d(wd,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"boolean"}},s=>d(Lu,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"file"}},s=>d(Hu,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"submit"}},s=>d(_d,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"address"}},s=>d(Du,{onSubmitSuccess:o(s.input.type),...s})).exhaustive()})})},Od=on("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"}}),Pd=({children:e,className:t,animate:r,side:n,...o})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Od({className:t,side:n,animate:r}),...o,children:e}),Ad=({className:e,...t})=>(V(()=>{le.scrollToEnd.smooth()}),d("div",{"aria-hidden":!0,children:le.isBotTyping$.value===!0?d("div",{"aria-label":"Typing…",class:Ue("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),Id={bot:"left",user:"right"},Dd=on("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]"}}}),Td=({lastSentMessageFooter:e})=>{var r;const t=((r=D.current$.value.flow)==null?void 0:r.data.messages)??[];return V(()=>{le.scrollToEnd.smooth()},[t.length]),d("ol",{"aria-label":"Chat messages",class:"flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,o)=>d(q,{children:d("li",{class:"flex",children:Ne(n).with({type:"system"},i=>d("p",{class:Dd({variant:i.variant}),children:i.text})).with({type:"text",author:fe.union("bot","user")},i=>{const s=i.author==="user"&&!t.slice(o+1).some(c=>c.type==="text"&&c.author==="user"),a=o===t.length-1;return d(Pd,{animate:a,side:Id[i.author],children:[i.text,s?e:null]},o)}).with({type:"link"},i=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:i.href,children:[i.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})})).with({type:"image"},i=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>d(ju,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()})},o)),d(Ad,{},"typing")]})},Nd=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=D.current$.value;ke(n,"Flow is required to exist to show chatbot body");const o=D.viewState$.value,{chatRef:i,chatService:s}=Ou(),[a,c]=Y();return ye(()=>{o==="maximised"&&le.scrollToEnd.instant()},[o]),ye(()=>{const{state:u,flow:p}=D.current$.peek();if(u!=="loaded")throw new Error(pc.invalid_state);let l=p.data.nodeHistory.at(-1);if(le.scrollToEnd.instant(),D.setInput(void 0),p.data.isFinished)return;l===void 0?(l=rs(n.nodes).id,D.setCurrentNodeId(l),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:p.data.flowSessionId,flow_build:n.build},customProperties:n.context})):D.removeMessagesSentByNodeIds([l]);const{interpret:v,abort:b,undo:g}=ou({context:n.context,analytics:r,apiClient:t,logger:e,flow:n.nodes,chatService:s,getSubmissions:()=>{var h;return(h=D.current$.peek().flow)==null?void 0:h.data.submissions},onInterpret:(h,_)=>{const k=D.current$.peek().flow;ke(k),_&&(k.data.sequence=k.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:h.id,sequence:k.data.sequence,flow_session_id:k.data.flowSessionId},customProperties:n.context})),D.setCurrentNodeId(h.id)},onFlowEnd:async()=>{D.markAsFinished();const h=D.current$.peek().flow;ke(h),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:h.data.flowSessionId,flow_build:n.build},customProperties:n.context})}});return c(()=>g),v(l),b},[r,t,s,e,n]),d(q,{children:[d("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:D.inputHeight$.value},children:d(Td,{lastSentMessageFooter:n.data.isFinished||!a?null:d(Md,{undoFn:a})})}),d(Cd,{})]})},Fd=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"):[],Md=({undoFn:e})=>d("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:d("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=D.current$.peek();ke(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(D.removeMessagesSentByNodeIds(n),D.setInput(void 0),n.pop(),n.map(o=>t.nodes.find(i=>i.id===o)).filter(Boolean).flatMap(Fd).forEach(o=>delete t.data.submissions[o]),D.current$.value={...D.current$.value})},children:"Undo"})}),Ld=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Nd},Symbol.toStringTag,{value:"Module"}))})();
|