@inploi/plugin-chatbot 3.12.5 → 3.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +11 -19
- package/dist/{chatbot-body-1c87450e.cjs → chatbot-body-273e1510.cjs} +101 -160
- package/dist/{chatbot-body-83a30845.js → chatbot-body-8b76daf2.js} +99 -158
- package/dist/index-0fac2e23.cjs +5226 -0
- package/dist/index-da27a1bf.js +5227 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +2 -2
- package/package.json +1 -4
- package/dist/index-395856be.cjs +0 -9631
- package/dist/index-b4781911.js +0 -9632
package/cdn/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var dy=Object.defineProperty;var fy=(ht,xe,E)=>xe in ht?dy(ht,xe,{enumerable:!0,configurable:!0,writable:!0,value:E}):ht[xe]=E;var uu=(ht,xe,E)=>(fy(ht,typeof xe!="symbol"?xe+"":xe,E),E);(function(){"use strict";var ht=e=>e,xe,E,Uo,zo,pt,Ho,Wo,Kn,Ko,Ft={},qo=[],du=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Lr=Array.isArray;function Re(e,t){for(var r in t)e[r]=t[r];return e}function Go(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,i,o,s={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?xe.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return ir(e,s,n,i,null)}function ir(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Uo};return i==null&&E.vnode!=null&&E.vnode(o),o}function Yo(){return{current:null}}function Q(e){return e.children}function ke(e,t){this.props=e,this.context=t}function Rr(e,t){if(t==null)return e.__?Rr(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"?Rr(e):null}function Zo(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 Zo(e)}}function qn(e){(!e.__d&&(e.__d=!0)&&pt.push(e)&&!Br.__r++||Ho!==E.debounceRendering)&&((Ho=E.debounceRendering)||Wo)(Br)}function Br(){var e,t,r,n,i,o,s,a,l;for(pt.sort(Kn);e=pt.shift();)e.__d&&(t=pt.length,n=void 0,i=void 0,o=void 0,a=(s=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(o=Re({},s)).__v=s.__v+1,Gn(l,s,o,r.__n,l.ownerSVGElement!==void 0,s.__h!=null?[a]:null,n,a??Rr(s),s.__h,i),ns(n,s,i),s.__e!=a&&Zo(s)),pt.length>t&&pt.sort(Kn));Br.__r=0}function Xo(e,t,r,n,i,o,s,a,l,u,d){var c,f,p,h,m,b,x,y,_,C,S=0,N=n&&n.__k||qo,F=N.length,A=F,T=t.length;for(r.__k=[],c=0;c<T;c++)(h=r.__k[c]=(h=t[c])==null||typeof h=="boolean"||typeof h=="function"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"?ir(null,h,null,null,h):Lr(h)?ir(Q,{children:h},null,null,null):h.__b>0?ir(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null&&(h.__=r,h.__b=r.__b+1,(y=fu(h,N,x=c+S,A))===-1?p=Ft:(p=N[y]||Ft,N[y]=void 0,A--),Gn(e,h,p,i,o,s,a,l,u,d),m=h.__e,(f=h.ref)&&p.ref!=f&&(p.ref&&Yn(p.ref,null,h),d.push(f,h.__c||m,h)),m!=null&&(b==null&&(b=m),C=!(_=p===Ft||p.__v===null)&&y===x,_?y==-1&&S--:y!==x&&(y===x+1?(S++,C=!0):y>x?A>T-x?(S+=y-x,C=!0):S--:S=y<x&&y==x-1?y-x:0),x=c+S,C=C||y==c&&!_,typeof h.type!="function"||y===x&&p.__k!==h.__k?typeof h.type=="function"||C?h.__d!==void 0?(l=h.__d,h.__d=void 0):l=m.nextSibling:l=Jo(e,m,l):l=Qo(h,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=b,c=F;c--;)N[c]!=null&&(typeof r.type=="function"&&N[c].__e!=null&&N[c].__e==r.__d&&(r.__d=N[c].__e.nextSibling),is(N[c],N[c]))}function Qo(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t=typeof n.type=="function"?Qo(n,t,r):Jo(r,n.__e,t));return t}function Be(e,t){return t=t||[],e==null||typeof e=="boolean"||(Lr(e)?e.some(function(r){Be(r,t)}):t.push(e)),t}function Jo(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 fu(e,t,r,n){var i=e.key,o=e.type,s=r-1,a=r+1,l=t[r];if(l===null||l&&i==l.key&&o===l.type)return r;if(n>(l!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&i==l.key&&o===l.type)return a;a++}}return-1}function hu(e,t,r,n,i){var o;for(o in r)o==="children"||o==="key"||o in t||jr(e,o,null,r[o],n);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||r[o]===t[o]||jr(e,o,t[o],r[o],n)}function es(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||du.test(t)?r:r+"px"}function jr(e,t,r,n,i){var o;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||es(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||es(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n||e.addEventListener(t,o?rs:ts,o):e.removeEventListener(t,o?rs:ts,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function ts(e){return this.l[e.type+!1](E.event?E.event(e):e)}function rs(e){return this.l[e.type+!0](E.event?E.event(e):e)}function Gn(e,t,r,n,i,o,s,a,l,u){var d,c,f,p,h,m,b,x,y,_,C,S,N,F,A,T=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,a=t.__e=r.__e,t.__h=null,o=[a]),(d=E.__b)&&d(t);try{e:if(typeof T=="function"){if(x=t.props,y=(d=T.contextType)&&n[d.__c],_=d?y?y.props.value:d.__:n,r.__c?b=(c=t.__c=r.__c).__=c.__E:("prototype"in T&&T.prototype.render?t.__c=c=new T(x,_):(t.__c=c=new ke(x,_),c.constructor=T,c.render=mu),y&&y.sub(c),c.props=x,c.state||(c.state={}),c.context=_,c.__n=n,f=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),T.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Re({},c.__s)),Re(c.__s,T.getDerivedStateFromProps(x,c.__s))),p=c.props,h=c.state,c.__v=t,f)T.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(T.getDerivedStateFromProps==null&&x!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,_),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,_)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(K){K&&(K.__=t)}),C=0;C<c._sb.length;C++)c.__h.push(c._sb[C]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,_),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,h,m)})}if(c.context=_,c.props=x,c.__P=e,c.__e=!1,S=E.__r,N=0,"prototype"in T&&T.prototype.render){for(c.state=c.__s,c.__d=!1,S&&S(t),d=c.render(c.props,c.state,c.context),F=0;F<c._sb.length;F++)c.__h.push(c._sb[F]);c._sb=[]}else do c.__d=!1,S&&S(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++N<25);c.state=c.__s,c.getChildContext!=null&&(n=Re(Re({},n),c.getChildContext())),f||c.getSnapshotBeforeUpdate==null||(m=c.getSnapshotBeforeUpdate(p,h)),Xo(e,Lr(A=d!=null&&d.type===Q&&d.key==null?d.props.children:d)?A:[A],t,r,n,i,o,s,a,l,u),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),b&&(c.__E=c.__=null)}else o==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=pu(r.__e,t,r,n,i,o,s,l,u);(d=E.diffed)&&d(t)}catch(K){t.__v=null,(l||o!=null)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),E.__e(K,t,r)}}function ns(e,t,r){for(var n=0;n<r.length;n++)Yn(r[n],r[++n],r[++n]);E.__c&&E.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){E.__e(o,i.__v)}})}function pu(e,t,r,n,i,o,s,a,l){var u,d,c,f=r.props,p=t.props,h=t.type,m=0;if(h==="svg"&&(i=!0),o!=null){for(;m<o.length;m++)if((u=o[m])&&"setAttribute"in u==!!h&&(h?u.localName===h:u.nodeType===3)){e=u,o[m]=null;break}}if(e==null){if(h===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,a=!1}if(h===null)f===p||a&&e.data===p||(e.data=p);else{if(o=o&&xe.call(e.childNodes),d=(f=r.props||Ft).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!a){if(o!=null)for(f={},m=0;m<e.attributes.length;m++)f[e.attributes[m].name]=e.attributes[m].value;(c||d)&&(c&&(d&&c.__html==d.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(hu(e,p,f,i,a),c)t.__k=[];else if(Xo(e,Lr(m=t.props.children)?m:[m],t,r,n,i&&h!=="foreignObject",o,s,o?o[0]:r.__k&&Rr(r,0),a,l),o!=null)for(m=o.length;m--;)o[m]!=null&&Go(o[m]);a||("value"in p&&(m=p.value)!==void 0&&(m!==e.value||h==="progress"&&!m||h==="option"&&m!==f.value)&&jr(e,"value",m,f.value,!1),"checked"in p&&(m=p.checked)!==void 0&&m!==e.checked&&jr(e,"checked",m,f.checked,!1))}return e}function Yn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){E.__e(n,r)}}function is(e,t,r){var n,i;if(E.unmount&&E.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Yn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){E.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&is(n[i],t,r||typeof e.type!="function");r||e.__e==null||Go(e.__e),e.__=e.__e=e.__d=void 0}function mu(e,t,r){return this.constructor(e,r)}function Dt(e,t,r){var n,i,o,s;E.__&&E.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],s=[],Gn(t,e=(!n&&r||t).__k=O(Q,null,[e]),i||Ft,Ft,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?xe.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,s),ns(o,e,s)}function os(e,t){Dt(e,t,os)}function vu(e,t,r){var n,i,o,s,a=Re({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?xe.call(arguments,2):r),ir(e.type,a,n||e.key,i||e.ref,null)}function Ee(e,t){var r={__c:t="__cC"+Ko++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(a){a.__e=!0,qn(a)})},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}xe=qo.slice,E={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Uo=0,zo=function(e){return e!=null&&e.constructor===void 0},ke.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Re({},this.state),typeof e=="function"&&(e=e(Re({},r),this.props)),e&&Re(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),qn(this))},ke.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),qn(this))},ke.prototype.render=Q,pt=[],Wo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Kn=function(e,t){return e.__v.__b-t.__v.__b},Br.__r=0,Ko=0;var Zn=class extends Error{constructor(t){super(t[0].message);uu(this,"issues");this.name="ValiError",this.issues=t}};function ss(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function or(e){return{issues:e}}function qe(e){return{output:e}}function gu(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 yu(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 Ge(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return qe(e);let i,o,s=e;for(const a of t){const l=a._parse(s);if(l.issues){i=i||yu(r,n);for(const u of l.issues){const d=gu(i,u);o?o.push(d):o=[d]}if(i.abortEarly||i.abortPipeEarly)break}else s=l.output}return o?or(o):qe(s)}function Ye(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function as(e){return typeof e=="function"?e():e}function sr(e,t,r,n){return or([{validation:e,message:as(t),input:r,requirement:n}])}function bu(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,s]=Ye(t,r);return[e,o,s]}const[n,i]=Ye(e,t);return[void 0,n,i]}function mt(e,t,r,n,i,o){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:as(n),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function cs(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Ge(t,this.pipe,r,"any")}}}function ls(e,t,r){const[n="Invalid type",i]=Ye(t,r);return{type:"array",async:!1,item:e,message:n,pipe:i,_parse(o,s){if(!Array.isArray(o))return mt(s,"type","array",this.message,o);let a;const l=[];for(let u=0;u<o.length;u++){const d=o[u],c=this.item._parse(d,s);if(c.issues){const f={type:"array",input:o,key:u,value:d};for(const p of c.issues)p.path?p.path.unshift(f):p.path=[f],a==null||a.push(p);if(a||(a=c.issues),s!=null&&s.abortEarly)break}else l.push(c.output)}return a?or(a):Ge(l,this.pipe,s,"array")}}}function wu(e,t){const[r="Invalid type",n]=Ye(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="boolean"?mt(o,"type","boolean",this.message,i):Ge(i,this.pipe,o,"boolean")}}}function _u(e,t){const[r="Invalid type",n]=Ye(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="number"||isNaN(i)?mt(o,"type","number",this.message,i):Ge(i,this.pipe,o,"number")}}}function Ze(e,t,r,n){const[i,o="Invalid type",s]=bu(t,r,n);let a;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:s,_parse(l,u){if(!l||typeof l!="object")return mt(u,"type","object",this.message,l);a=a||Object.entries(this.entries);let d;const c={};for(const[f,p]of a){const h=l[f],m=p._parse(h,u);if(m.issues){const b={type:"object",input:l,key:f,value:h};for(const x of m.issues)x.path?x.path.unshift(b):x.path=[b],d==null||d.push(x);if(d||(d=m.issues),u!=null&&u.abortEarly)break}else(m.output!==void 0||f in l)&&(c[f]=m.output)}if(this.rest&&!(u!=null&&u.abortEarly&&d)){for(const f in l)if(!(f in this.entries)){const p=l[f],h=this.rest._parse(p,u);if(h.issues){const m={type:"object",input:l,key:f,value:p};for(const b of h.issues)b.path?b.path.unshift(m):b.path=[m],d==null||d.push(b);if(d||(d=h.issues),u!=null&&u.abortEarly)break}else c[f]=h.output}}return d?or(d):Ge(c,this.pipe,u,"object")}}}function xu(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?qe(r):mt(n,"type","picklist",this.message,r)}}}function $e(e,t){const[r="Invalid type",n]=Ye(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="string"?mt(o,"type","string",this.message,i):Ge(i,this.pipe,o,"string")}}}function ku(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=Ye(r,n);return[e,t,s,a]}const[i,o]=Ye(t,r);return[$e(),e,i,o]}var Su=["__proto__","prototype","constructor"];function us(e,t,r,n){const[i,o,s="Invalid type",a]=ku(e,t,r,n);return{type:"record",async:!1,key:i,value:o,message:s,pipe:a,_parse(l,u){if(!l||typeof l!="object")return mt(u,"type","record",this.message,l);let d;const c={};for(const[f,p]of Object.entries(l))if(!Su.includes(f)){let h;const m=this.key._parse(f,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(m.issues){h={type:"record",input:l,key:f,value:p};for(const x of m.issues)x.path=[h],d==null||d.push(x);if(d||(d=m.issues),u!=null&&u.abortEarly)break}const b=this.value._parse(p,u);if(b.issues){h=h||{type:"record",input:l,key:f,value:p};for(const x of b.issues)x.path?x.path.unshift(h):x.path=[h],d==null||d.push(x);if(d||(d=b.issues),u!=null&&u.abortEarly)break}!m.issues&&!b.issues&&(c[m.output]=b.output)}return d?or(d):Ge(c,this.pipe,u,"record")}}}function ar(e,t,r){const n=e._parse(t,r);if(n.issues)throw new Zn(n.issues);return n.output}async function Cu(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new Zn(n.issues);return n.output}function ds(e,t,r){return{...e,_parse(n,i){const o=e._parse(n,i);if(o.issues)return o;const s=t(o.output);return r&&!Array.isArray(r)?r._parse(s,i):Ge(s,r,i,typeof s)}}}var $u=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Au(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:$u,_parse(t){return this.requirement.test(t)?qe(t):sr(this.type,this.message,t,this.requirement)}}}function cr(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?sr(this.type,this.message,r,this.requirement):qe(r)}}}function fs(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?sr(this.type,this.message,r,this.requirement):qe(r)}}}function Pu(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?qe(r):sr(this.type,this.message,r,this.requirement)}}}function Eu(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)?qe(t):sr(this.type,this.message,t,this.requirement)}}}var Tu=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function Xe(e,t){if(!e)throw new Error(t)}function Xn(e,t){return t in e}function be(){return be=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},be.apply(this,arguments)}var je,q,Qn,hs,Nt=0,ps=[],Ur=[],ms=E.__b,vs=E.__r,gs=E.diffed,ys=E.__c,bs=E.unmount;function vt(e,t){E.__h&&E.__h(q,e,Nt||t),Nt=0;var r=q.__H||(q.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Ur}),r.__[e]}function ie(e){return Nt=1,zr(ks,e)}function zr(e,t,r){var n=vt(je++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):ks(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=q,!q.u)){var i=function(a,l,u){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!o||o.call(this,a,l,u);var c=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(c=!0)}}),!(!c&&n.__c.props===a)&&(!o||o.call(this,a,l,u))};q.u=!0;var o=q.shouldComponentUpdate,s=q.componentWillUpdate;q.componentWillUpdate=function(a,l,u){if(this.__e){var d=o;o=void 0,i(a,l,u),o=d}s&&s.call(this,a,l,u)},q.shouldComponentUpdate=i}return n.__N||n.__}function W(e,t){var r=vt(je++,3);!E.__s&&ei(r.__H,t)&&(r.__=e,r.i=t,q.__H.__h.push(r))}function Ae(e,t){var r=vt(je++,4);!E.__s&&ei(r.__H,t)&&(r.__=e,r.i=t,q.__h.push(r))}function j(e){return Nt=5,se(function(){return{current:e}},[])}function ws(e,t,r){Nt=6,Ae(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=vt(je++,7);return ei(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ae(e,t){return Nt=8,se(function(){return e},t)}function fe(e){var t=q.context[e.__c],r=vt(je++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(q)),t.props.value):e.__}function _s(e,t){E.useDebugValue&&E.useDebugValue(t?t(e):e)}function Vu(e){var t=vt(je++,10),r=ie();return t.__=e,q.componentDidCatch||(q.componentDidCatch=function(n,i){t.__&&t.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Hr(){var e=vt(je++,11);if(!e.__){for(var t=q.__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 Mu(){for(var e;e=ps.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Wr),e.__H.__h.forEach(Jn),e.__H.__h=[]}catch(t){e.__H.__h=[],E.__e(t,e.__v)}}E.__b=function(e){q=null,ms&&ms(e)},E.__r=function(e){vs&&vs(e),je=0;var t=(q=e.__c).__H;t&&(Qn===q?(t.__h=[],q.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Ur,r.__N=r.i=void 0})):(t.__h.forEach(Wr),t.__h.forEach(Jn),t.__h=[],je=0)),Qn=q},E.diffed=function(e){gs&&gs(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ps.push(t)!==1&&hs===E.requestAnimationFrame||((hs=E.requestAnimationFrame)||Ou)(Mu)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Ur&&(r.__=r.__V),r.i=void 0,r.__V=Ur})),Qn=q=null},E.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Wr),r.__h=r.__h.filter(function(n){return!n.__||Jn(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],E.__e(n,r.__v)}}),ys&&ys(e,t)},E.unmount=function(e){bs&&bs(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Wr(n)}catch(i){t=i}}),r.__H=void 0,t&&E.__e(t,r.__v))};var xs=typeof requestAnimationFrame=="function";function Ou(e){var t,r=function(){clearTimeout(n),xs&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);xs&&(t=requestAnimationFrame(r))}function Wr(e){var t=q,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),q=t}function Jn(e){var t=q;e.__c=e.__(),q=t}function ei(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function ks(e,t){return typeof t=="function"?t(e):t}function Ss(e,t){for(var r in t)e[r]=t[r];return e}function ti(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 ri(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Kr(e){this.props=e}function Cs(e,t){function r(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:ti(this.props,i)}function n(i){return this.shouldComponentUpdate=r,O(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Kr.prototype=new ke).isPureReactComponent=!0,Kr.prototype.shouldComponentUpdate=function(e,t){return ti(this.props,e)||ti(this.state,t)};var $s=E.__b;E.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),$s&&$s(e)};var Iu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function he(e){function t(r){var n=Ss({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Iu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var As=function(e,t){return e==null?null:Be(Be(e).map(t))},Oe={map:As,forEach:As,count:function(e){return e?Be(e).length:0},only:function(e){var t=Be(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Be},Fu=E.__e;E.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}Fu(e,t,r,n)};var Ps=E.unmount;function Es(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=Ss({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Es(n,t,r)})),e}function Ts(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Ts(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 Lt(){this.__u=0,this.t=null,this.__b=null}function Vs(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ni(e){var t,r,n;function i(o){if(t||(t=e()).then(function(s){r=s.default||s},function(s){n=s}),n)throw n;if(!r)throw t;return O(r,o)}return i.displayName="Lazy",i.__f=!0,i}function Rt(){this.u=null,this.o=null}E.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ps&&Ps(e)},(Lt.prototype=new ke).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Vs(n.__v),o=!1,s=function(){o||(o=!0,r.__R=null,i?i(a):a())};r.__R=s;var a=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=Ts(u,u.__c.__P,u.__c.__O)}var d;for(n.setState({__a:n.__b=null});d=n.t.pop();)d.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},Lt.prototype.componentWillUnmount=function(){this.t=[]},Lt.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]=Es(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&O(Q,null,e.fallback);return i&&(i.__h=null),[O(Q,null,t.__a?null:e.children),i]};var Ms=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 Du(e){return this.getChildContext=function(){return e.context},e.children}function Nu(e){var t=this,r=e.i;t.componentWillUnmount=function(){Dt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),Dt(O(Du,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Os(e,t){var r=O(Nu,{__v:e,i:t});return r.containerInfo=t,r}(Rt.prototype=new ke).__a=function(e){var t=this,r=Vs(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),Ms(t,e,n)):i()};r?r(o):o()}},Rt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Be(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},Rt.prototype.componentDidUpdate=Rt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ms(e,r,t)})};var Is=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Lu=/^(?: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]/,Ru=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Bu=/[A-Z0-9]/g,ju=typeof document<"u",Uu=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Fs(e,t,r){return t.__k==null&&(t.textContent=""),Dt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Ds(e,t,r){return os(e,t),typeof r=="function"&&r(),e?e.__c:null}ke.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ke.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ns=E.event;function zu(){}function Hu(){return this.cancelBubble}function Wu(){return this.defaultPrevented}E.event=function(e){return Ns&&(e=Ns(e)),e.persist=zu,e.isPropagationStopped=Hu,e.isDefaultPrevented=Wu,e.nativeEvent=e};var ii,Ku={enumerable:!1,configurable:!0,get:function(){return this.class}},Ls=E.vnode;E.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var o in r){var s=r[o];if(!(o==="value"&&"defaultValue"in r&&s==null||ju&&o==="children"&&n==="noscript"||o==="class"||o==="className")){var a=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&s===!0?s="":a==="ondoubleclick"?o="ondblclick":a!=="onchange"||n!=="input"&&n!=="textarea"||Uu(r.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":Ru.test(o)?o=a:n.indexOf("-")===-1&&Lu.test(o)?o=o.replace(Bu,"-$&").toLowerCase():s===null&&(s=void 0):a=o="oninput",a==="oninput"&&i[o=a]&&(o="oninputCapture"),i[o]=s}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Be(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=Be(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",Ku)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Is,Ls&&Ls(e)};var Rs=E.__r;E.__r=function(e){Rs&&Rs(e),ii=e.__c};var Bs=E.diffed;E.diffed=function(e){Bs&&Bs(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),ii=null};var js={ReactCurrentDispatcher:{current:{readContext:function(e){return ii.__n[e.__c].props.value}}}},qu="17.0.2";function Us(e){return O.bind(null,e)}function Qe(e){return!!e&&e.$$typeof===Is}function Je(e){return Qe(e)?vu.apply(null,arguments):e}function zs(e){return!!e.__k&&(Dt(null,e),!0)}function Hs(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ws=function(e,t){return e(t)},qr=function(e,t){return e(t)},Ks=Q;function oi(e){e()}function qs(e){return e}function Gs(){return[!1,oi]}var Gr=Ae;function Ys(e,t){var r=t(),n=ie({h:{__:r,v:t}}),i=n[0].h,o=n[1];return Ae(function(){i.__=r,i.v=t,ri(i.__,t())||o({h:i})},[e,r,t]),W(function(){return ri(i.__,i.v())||o({h:i}),e(function(){ri(i.__,i.v())||o({h:i})})},[e]),r}var Te={useState:ie,useId:Hr,useReducer:zr,useEffect:W,useLayoutEffect:Ae,useInsertionEffect:Gr,useTransition:Gs,useDeferredValue:qs,useSyncExternalStore:Ys,startTransition:oi,useRef:j,useImperativeHandle:ws,useMemo:se,useCallback:ae,useContext:fe,useDebugValue:_s,version:"17.0.2",Children:Oe,render:Fs,hydrate:Ds,unmountComponentAtNode:zs,createPortal:Os,createElement:O,createContext:Ee,createFactory:Us,cloneElement:Je,createRef:Yo,Fragment:Q,isValidElement:Qe,findDOMNode:Hs,Component:ke,PureComponent:Kr,memo:Cs,forwardRef:he,flushSync:qr,unstable_batchedUpdates:Ws,StrictMode:Ks,Suspense:Lt,SuspenseList:Rt,lazy:ni,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:js};const Gu=Object.freeze(Object.defineProperty({__proto__:null,Children:Oe,Component:ke,Fragment:Q,PureComponent:Kr,StrictMode:Ks,Suspense:Lt,SuspenseList:Rt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:js,cloneElement:Je,createContext:Ee,createElement:O,createFactory:Us,createPortal:Os,createRef:Yo,default:Te,findDOMNode:Hs,flushSync:qr,forwardRef:he,hydrate:Ds,isValidElement:Qe,lazy:ni,memo:Cs,render:Fs,startTransition:oi,unmountComponentAtNode:zs,unstable_batchedUpdates:Ws,useCallback:ae,useContext:fe,useDebugValue:_s,useDeferredValue:qs,useEffect:W,useErrorBoundary:Vu,useId:Hr,useImperativeHandle:ws,useInsertionEffect:Gr,useLayoutEffect:Ae,useMemo:se,useReducer:zr,useRef:j,useState:ie,useSyncExternalStore:Ys,useTransition:Gs,version:qu},Symbol.toStringTag,{value:"Module"}));function Bt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Yu(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Zs(...e){return t=>e.forEach(r=>Yu(r,t))}function lr(...e){return ae(Zs(...e),e)}function Zu(e,t=[]){let r=[];function n(o,s){const a=Ee(s),l=r.length;r=[...r,s];function u(c){const{scope:f,children:p,...h}=c,m=(f==null?void 0:f[e][l])||a,b=se(()=>h,Object.values(h));return O(m.Provider,{value:b},p)}function d(c,f){const p=(f==null?void 0:f[e][l])||a,h=fe(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=r.map(s=>Ee(s));return function(a){const l=(a==null?void 0:a[e])||o;return se(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[n,Xu(i,...t)]}function Xu(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=n.reduce((a,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...a,...c}},{});return se(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}const si=globalThis!=null&&globalThis.document?Ae:()=>{},Qu=Gu["useId".toString()]||(()=>{});let Ju=0;function ai(e){const[t,r]=ie(Qu());return si(()=>{e||r(n=>n??String(Ju++))},[e]),e||(t?`radix-${t}`:"")}function gt(e){const t=j(e);return W(()=>{t.current=e}),se(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function ed({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=td({defaultProp:t,onChange:r}),o=e!==void 0,s=o?e:n,a=gt(r),l=ae(u=>{if(o){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else i(u)},[o,e,i,a]);return[s,l]}function td({defaultProp:e,onChange:t}){const r=ie(e),[n]=r,i=j(n),o=gt(t);return W(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}const ci=he((e,t)=>{const{children:r,...n}=e,i=Oe.toArray(r),o=i.find(nd);if(o){const s=o.props.children,a=i.map(l=>l===o?Oe.count(s)>1?Oe.only(null):Qe(s)?s.props.children:null:l);return O(li,be({},n,{ref:t}),Qe(s)?Je(s,void 0,a):null)}return O(li,be({},n,{ref:t}),r)});ci.displayName="Slot";const li=he((e,t)=>{const{children:r,...n}=e;return Qe(r)?Je(r,{...id(n,r.props),ref:t?Zs(t,r.ref):r.ref}):Oe.count(r)>1?Oe.only(null):null});li.displayName="SlotClone";const rd=({children:e})=>O(Q,null,e);function nd(e){return Qe(e)&&e.type===rd}function id(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...a)=>{o(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}const ui=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=he((n,i)=>{const{asChild:o,...s}=n,a=o?ci:t;return W(()=>{window[Symbol.for("radix-ui")]=!0},[]),O(a,be({},s,{ref:i}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function od(e,t){e&&qr(()=>e.dispatchEvent(t))}function sd(e,t=globalThis==null?void 0:globalThis.document){const r=gt(e);W(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const di="dismissableLayer.update",ad="dismissableLayer.pointerDownOutside",cd="dismissableLayer.focusOutside";let Xs;const ld=Ee({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ud=he((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...u}=e,d=fe(ld),[c,f]=ie(null),p=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,h]=ie({}),m=lr(t,A=>f(A)),b=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(x),_=c?b.indexOf(c):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,S=_>=y,N=dd(A=>{const T=A.target,K=[...d.branches].some(J=>J.contains(T));!S||K||(o==null||o(A),a==null||a(A),A.defaultPrevented||l==null||l())},p),F=fd(A=>{const T=A.target;[...d.branches].some(J=>J.contains(T))||(s==null||s(A),a==null||a(A),A.defaultPrevented||l==null||l())},p);return sd(A=>{_===d.layers.size-1&&(i==null||i(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},p),W(()=>{if(c)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Xs=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(c)),d.layers.add(c),Qs(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Xs)}},[c,p,n,d]),W(()=>()=>{c&&(d.layers.delete(c),d.layersWithOutsidePointerEventsDisabled.delete(c),Qs())},[c,d]),W(()=>{const A=()=>h({});return document.addEventListener(di,A),()=>document.removeEventListener(di,A)},[]),O(ui.div,be({},u,{ref:m,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:Bt(e.onFocusCapture,F.onFocusCapture),onBlurCapture:Bt(e.onBlurCapture,F.onBlurCapture),onPointerDownCapture:Bt(e.onPointerDownCapture,N.onPointerDownCapture)}))});function dd(e,t=globalThis==null?void 0:globalThis.document){const r=gt(e),n=j(!1),i=j(()=>{});return W(()=>{const o=a=>{if(a.target&&!n.current){let u=function(){Js(ad,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function fd(e,t=globalThis==null?void 0:globalThis.document){const r=gt(e),n=j(!1);return W(()=>{const i=o=>{o.target&&!n.current&&Js(cd,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Qs(){const e=new CustomEvent(di);document.dispatchEvent(e)}function Js(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?od(i,o):i.dispatchEvent(o)}const fi="focusScope.autoFocusOnMount",hi="focusScope.autoFocusOnUnmount",ea={bubbles:!1,cancelable:!0},hd=he((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=ie(null),u=gt(i),d=gt(o),c=j(null),f=lr(t,m=>l(m)),p=j({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W(()=>{if(n){let m=function(_){if(p.paused||!a)return;const C=_.target;a.contains(C)?c.current=C:et(c.current,{select:!0})},b=function(_){if(p.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||et(c.current,{select:!0}))},x=function(_){if(document.activeElement===document.body)for(const S of _)S.removedNodes.length>0&&et(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[n,a,p.paused]),W(()=>{if(a){na.add(p);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(fi,ea);a.addEventListener(fi,u),a.dispatchEvent(x),x.defaultPrevented||(pd(bd(ta(a)),{select:!0}),document.activeElement===m&&et(a))}return()=>{a.removeEventListener(fi,u),setTimeout(()=>{const x=new CustomEvent(hi,ea);a.addEventListener(hi,d),a.dispatchEvent(x),x.defaultPrevented||et(m??document.body,{select:!0}),a.removeEventListener(hi,d),na.remove(p)},0)}}},[a,u,d,p]);const h=ae(m=>{if(!r&&!n||p.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(b&&x){const y=m.currentTarget,[_,C]=md(y);_&&C?!m.shiftKey&&x===C?(m.preventDefault(),r&&et(_,{select:!0})):m.shiftKey&&x===_&&(m.preventDefault(),r&&et(C,{select:!0})):x===y&&m.preventDefault()}},[r,n,p.paused]);return O(ui.div,be({tabIndex:-1},s,{ref:f,onKeyDown:h}))});function pd(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(et(n,{select:t}),document.activeElement!==r)return}function md(e){const t=ta(e),r=ra(t,e),n=ra(t.reverse(),e);return[r,n]}function ta(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ra(e,t){for(const r of e)if(!vd(r,{upTo:t}))return r}function vd(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 gd(e){return e instanceof HTMLInputElement&&"select"in e}function et(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&gd(e)&&t&&e.select()}}const na=yd();function yd(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ia(e,t),e.unshift(t)},remove(t){var r;e=ia(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function ia(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function bd(e){return e.filter(t=>t.tagName!=="A")}function wd(e,t){return zr((r,n)=>{const i=t[r][n];return i??r},e)}const pi=e=>{const{present:t,children:r}=e,n=_d(t),i=typeof r=="function"?r({present:n.isPresent}):Oe.only(r),o=lr(n.ref,i.ref);return typeof r=="function"||n.isPresent?Je(i,{ref:o}):null};pi.displayName="Presence";function _d(e){const[t,r]=ie(),n=j({}),i=j(e),o=j("none"),s=e?"mounted":"unmounted",[a,l]=wd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W(()=>{const u=Yr(n.current);o.current=a==="mounted"?u:"none"},[a]),si(()=>{const u=n.current,d=i.current;if(d!==e){const f=o.current,p=Yr(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),si(()=>{if(t){const u=c=>{const p=Yr(n.current).includes(c.animationName);c.target===t&&p&&qr(()=>l("ANIMATION_END"))},d=c=>{c.target===t&&(o.current=Yr(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:ae(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Yr(e){return(e==null?void 0:e.animationName)||"none"}let mi=0;function xd(){W(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:oa()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:oa()),mi++,()=>{mi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),mi--}},[])}function oa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ie=function(){return Ie=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ie.apply(this,arguments)};function sa(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function kd(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Zr="right-scroll-bar-position",Xr="width-before-scroll-bar",Sd="with-scroll-bars-hidden",Cd="--removed-body-scroll-bar-size";function $d(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ad(e,t){var r=ie(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}function Pd(e,t){return Ad(t||null,function(r){return e.forEach(function(n){return $d(n,r)})})}function Ed(e){return e}function Td(e,t){t===void 0&&(t=Ed);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var s=t(o,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(n=!0;r.length;){var s=r;r=[],s.forEach(o)}r={push:function(a){return o(a)},filter:function(){return r}}},assignMedium:function(o){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(o),s=r}var l=function(){var d=s;s=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),r}}}};return i}function Vd(e){e===void 0&&(e={});var t=Td(null);return t.options=Ie({async:!0,ssr:!1},e),t}var aa=function(e){var t=e.sideCar,r=sa(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 O(n,Ie({},r))};aa.isSideCarExport=!0;function Md(e,t){return e.useMedium(t),aa}var ca=Vd(),vi=function(){},Qr=he(function(e,t){var r=j(null),n=ie({onScrollCapture:vi,onWheelCapture:vi,onTouchMoveCapture:vi}),i=n[0],o=n[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,y=sa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=f,C=Pd([r,t]),S=Ie(Ie({},y),i);return O(Q,null,d&&O(_,{sideCar:ca,removeScrollBar:u,shards:c,noIsolation:p,inert:h,setCallbacks:o,allowPinchZoom:!!m,lockRef:r}),s?Je(Oe.only(a),Ie(Ie({},S),{ref:C})):O(x,Ie({},S,{className:l,ref:C}),a))});Qr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Qr.classNames={fullWidth:Xr,zeroRight:Zr};var la,Od=function(){if(la)return la;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Id(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Od();return t&&e.setAttribute("nonce",t),e}function Fd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Dd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Nd=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Id())&&(Fd(t,r),Dd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ld=function(){var e=Nd();return function(t,r){W(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ua=function(){var e=Ld(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},Rd={left:0,top:0,right:0,gap:0},gi=function(e){return parseInt(e||"",10)||0},Bd=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[gi(r),gi(n),gi(i)]},jd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Rd;var t=Bd(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])}},Ud=ua(),zd=function(e,t,r,n){var i=e.left,o=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
var Ad=Object.defineProperty;var Pd=(Ze,fe,S)=>fe in Ze?Ad(Ze,fe,{enumerable:!0,configurable:!0,writable:!0,value:S}):Ze[fe]=S;var Us=(Ze,fe,S)=>(Pd(Ze,typeof fe!="symbol"?fe+"":fe,S),S);(function(){"use strict";var Ze=e=>e,fe,S,Kn,qn,Xe,Yn,Gn,Pr,Zn,ct={},Xn=[],zs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Wt=Array.isArray;function Pe(e,t){for(var r in t)e[r]=t[r];return e}function Qn(e){var t=e.parentNode;t&&t.removeChild(e)}function T(e,t,r){var n,i,o,s={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?fe.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return St(e,s,n,i,null)}function St(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Kn};return i==null&&S.vnode!=null&&S.vnode(o),o}function Jn(){return{current:null}}function Y(e){return e.children}function me(e,t){this.props=e,this.context=t}function Kt(e,t){if(t==null)return e.__?Kt(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"?Kt(e):null}function ei(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 ei(e)}}function Or(e){(!e.__d&&(e.__d=!0)&&Xe.push(e)&&!qt.__r++||Yn!==S.debounceRendering)&&((Yn=S.debounceRendering)||Gn)(qt)}function qt(){var e,t,r,n,i,o,s,a,l;for(Xe.sort(Pr);e=Xe.shift();)e.__d&&(t=Xe.length,n=void 0,i=void 0,o=void 0,a=(s=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(o=Pe({},s)).__v=s.__v+1,Ir(l,s,o,r.__n,l.ownerSVGElement!==void 0,s.__h!=null?[a]:null,n,a??Kt(s),s.__h,i),ai(n,s,i),s.__e!=a&&ei(s)),Xe.length>t&&Xe.sort(Pr));qt.__r=0}function ti(e,t,r,n,i,o,s,a,l,u,h){var c,p,b,m,v,_,w,k,P,D,A=0,H=n&&n.__k||Xn,K=H.length,N=K,F=t.length;for(r.__k=[],c=0;c<F;c++)(m=r.__k[c]=(m=t[c])==null||typeof m=="boolean"||typeof m=="function"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?St(null,m,null,null,m):Wt(m)?St(Y,{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,(k=Hs(m,H,w=c+A,N))===-1?b=ct:(b=H[k]||ct,H[k]=void 0,N--),Ir(e,m,b,i,o,s,a,l,u,h),v=m.__e,(p=m.ref)&&b.ref!=p&&(b.ref&&Dr(b.ref,null,m),h.push(p,m.__c||v,m)),v!=null&&(_==null&&(_=v),D=!(P=b===ct||b.__v===null)&&k===w,P?k==-1&&A--:k!==w&&(k===w+1?(A++,D=!0):k>w?N>F-w?(A+=k-w,D=!0):A--:A=k<w&&k==w-1?k-w:0),w=c+A,D=D||k==c&&!P,typeof m.type!="function"||k===w&&b.__k!==m.__k?typeof m.type=="function"||D?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=v.nextSibling:l=ni(e,v,l):l=ri(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,c=K;c--;)H[c]!=null&&(typeof r.type=="function"&&H[c].__e!=null&&H[c].__e==r.__d&&(r.__d=H[c].__e.nextSibling),ci(H[c],H[c]))}function ri(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t=typeof n.type=="function"?ri(n,t,r):ni(r,n.__e,t));return t}function Oe(e,t){return t=t||[],e==null||typeof e=="boolean"||(Wt(e)?e.some(function(r){Oe(r,t)}):t.push(e)),t}function ni(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 Hs(e,t,r,n){var i=e.key,o=e.type,s=r-1,a=r+1,l=t[r];if(l===null||l&&i==l.key&&o===l.type)return r;if(n>(l!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&i==l.key&&o===l.type)return a;a++}}return-1}function Ws(e,t,r,n,i){var o;for(o in r)o==="children"||o==="key"||o in t||Yt(e,o,null,r[o],n);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||r[o]===t[o]||Yt(e,o,t[o],r[o],n)}function ii(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||zs.test(t)?r:r+"px"}function Yt(e,t,r,n,i){var o;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||ii(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||ii(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n||e.addEventListener(t,o?si:oi,o):e.removeEventListener(t,o?si:oi,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function oi(e){return this.l[e.type+!1](S.event?S.event(e):e)}function si(e){return this.l[e.type+!0](S.event?S.event(e):e)}function Ir(e,t,r,n,i,o,s,a,l,u){var h,c,p,b,m,v,_,w,k,P,D,A,H,K,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,o=[a]),(h=S.__b)&&h(t);try{e:if(typeof F=="function"){if(w=t.props,k=(h=F.contextType)&&n[h.__c],P=h?k?k.props.value:h.__:n,r.__c?_=(c=t.__c=r.__c).__=c.__E:("prototype"in F&&F.prototype.render?t.__c=c=new F(w,P):(t.__c=c=new me(w,P),c.constructor=F,c.render=qs),k&&k.sub(c),c.props=w,c.state||(c.state={}),c.context=P,c.__n=n,p=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),F.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Pe({},c.__s)),Pe(c.__s,F.getDerivedStateFromProps(w,c.__s))),b=c.props,m=c.state,c.__v=t,p)F.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(F.getDerivedStateFromProps==null&&w!==b&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(w,P),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(w,c.__s,P)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=w,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(ae){ae&&(ae.__=t)}),D=0;D<c._sb.length;D++)c.__h.push(c._sb[D]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(w,c.__s,P),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(b,m,v)})}if(c.context=P,c.props=w,c.__P=e,c.__e=!1,A=S.__r,H=0,"prototype"in F&&F.prototype.render){for(c.state=c.__s,c.__d=!1,A&&A(t),h=c.render(c.props,c.state,c.context),K=0;K<c._sb.length;K++)c.__h.push(c._sb[K]);c._sb=[]}else do c.__d=!1,A&&A(t),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++H<25);c.state=c.__s,c.getChildContext!=null&&(n=Pe(Pe({},n),c.getChildContext())),p||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(b,m)),ti(e,Wt(N=h!=null&&h.type===Y&&h.key==null?h.props.children:h)?N:[N],t,r,n,i,o,s,a,l,u),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),_&&(c.__E=c.__=null)}else o==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Ks(r.__e,t,r,n,i,o,s,l,u);(h=S.diffed)&&h(t)}catch(ae){t.__v=null,(l||o!=null)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),S.__e(ae,t,r)}}function ai(e,t,r){for(var n=0;n<r.length;n++)Dr(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){S.__e(o,i.__v)}})}function Ks(e,t,r,n,i,o,s,a,l){var u,h,c,p=r.props,b=t.props,m=t.type,v=0;if(m==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((u=o[v])&&"setAttribute"in u==!!m&&(m?u.localName===m:u.nodeType===3)){e=u,o[v]=null;break}}if(e==null){if(m===null)return document.createTextNode(b);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,b.is&&b),o=null,a=!1}if(m===null)p===b||a&&e.data===b||(e.data=b);else{if(o=o&&fe.call(e.childNodes),h=(p=r.props||ct).dangerouslySetInnerHTML,c=b.dangerouslySetInnerHTML,!a){if(o!=null)for(p={},v=0;v<e.attributes.length;v++)p[e.attributes[v].name]=e.attributes[v].value;(c||h)&&(c&&(h&&c.__html==h.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(Ws(e,b,p,i,a),c)t.__k=[];else if(ti(e,Wt(v=t.props.children)?v:[v],t,r,n,i&&m!=="foreignObject",o,s,o?o[0]:r.__k&&Kt(r,0),a,l),o!=null)for(v=o.length;v--;)o[v]!=null&&Qn(o[v]);a||("value"in b&&(v=b.value)!==void 0&&(v!==e.value||m==="progress"&&!v||m==="option"&&v!==p.value)&&Yt(e,"value",v,p.value,!1),"checked"in b&&(v=b.checked)!==void 0&&v!==e.checked&&Yt(e,"checked",v,p.checked,!1))}return e}function Dr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function ci(e,t,r){var n,i;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Dr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){S.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&ci(n[i],t,r||typeof e.type!="function");r||e.__e==null||Qn(e.__e),e.__=e.__e=e.__d=void 0}function qs(e,t,r){return this.constructor(e,r)}function lt(e,t,r){var n,i,o,s;S.__&&S.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],s=[],Ir(t,e=(!n&&r||t).__k=T(Y,null,[e]),i||ct,ct,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?fe.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,s),ai(o,e,s)}function li(e,t){lt(e,t,li)}function Ys(e,t,r){var n,i,o,s,a=Pe({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?fe.call(arguments,2):r),St(e.type,a,n||e.key,i||e.ref,null)}function Et(e,t){var r={__c:t="__cC"+Zn++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(a){a.__e=!0,Or(a)})},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}fe=Xn.slice,S={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Kn=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=Pe({},this.state),typeof e=="function"&&(e=e(Pe({},r),this.props)),e&&Pe(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Or(this))},me.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Or(this))},me.prototype.render=Y,Xe=[],Gn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Pr=function(e,t){return e.__v.__b-t.__v.__b},qt.__r=0,Zn=0;var Tr=class extends Error{constructor(t){super(t[0].message);Us(this,"issues");this.name="ValiError",this.issues=t}};function ui(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Ct(e){return{issues:e}}function Me(e){return{output:e}}function Gs(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 Zs(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 Le(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return Me(e);let i,o,s=e;for(const a of t){const l=a._parse(s);if(l.issues){i=i||Zs(r,n);for(const u of l.issues){const h=Gs(i,u);o?o.push(h):o=[h]}if(i.abortEarly||i.abortPipeEarly)break}else s=l.output}return o?Ct(o):Me(s)}function Re(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function di(e){return typeof e=="function"?e():e}function At(e,t,r,n){return Ct([{validation:e,message:di(t),input:r,requirement:n}])}function Xs(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,s]=Re(t,r);return[e,o,s]}const[n,i]=Re(e,t);return[void 0,n,i]}function Qe(e,t,r,n,i,o){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:di(n),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function fi(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Le(t,this.pipe,r,"any")}}}function pi(e,t,r){const[n="Invalid type",i]=Re(t,r);return{type:"array",async:!1,item:e,message:n,pipe:i,_parse(o,s){if(!Array.isArray(o))return Qe(s,"type","array",this.message,o);let a;const l=[];for(let u=0;u<o.length;u++){const h=o[u],c=this.item._parse(h,s);if(c.issues){const p={type:"array",input:o,key:u,value:h};for(const b of c.issues)b.path?b.path.unshift(p):b.path=[p],a==null||a.push(b);if(a||(a=c.issues),s!=null&&s.abortEarly)break}else l.push(c.output)}return a?Ct(a):Le(l,this.pipe,s,"array")}}}function Qs(e,t){const[r="Invalid type",n]=Re(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="boolean"?Qe(o,"type","boolean",this.message,i):Le(i,this.pipe,o,"boolean")}}}function Js(e,t){const[r="Invalid type",n]=Re(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="number"||isNaN(i)?Qe(o,"type","number",this.message,i):Le(i,this.pipe,o,"number")}}}function Ve(e,t,r,n){const[i,o="Invalid type",s]=Xs(t,r,n);let a;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:s,_parse(l,u){if(!l||typeof l!="object")return Qe(u,"type","object",this.message,l);a=a||Object.entries(this.entries);let h;const c={};for(const[p,b]of a){const m=l[p],v=b._parse(m,u);if(v.issues){const _={type:"object",input:l,key:p,value:m};for(const w of v.issues)w.path?w.path.unshift(_):w.path=[_],h==null||h.push(w);if(h||(h=v.issues),u!=null&&u.abortEarly)break}else(v.output!==void 0||p in l)&&(c[p]=v.output)}if(this.rest&&!(u!=null&&u.abortEarly&&h)){for(const p in l)if(!(p in this.entries)){const b=l[p],m=this.rest._parse(b,u);if(m.issues){const v={type:"object",input:l,key:p,value:b};for(const _ of m.issues)_.path?_.path.unshift(v):_.path=[v],h==null||h.push(_);if(h||(h=m.issues),u!=null&&u.abortEarly)break}else c[p]=m.output}}return h?Ct(h):Le(c,this.pipe,u,"object")}}}function ea(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?Me(r):Qe(n,"type","picklist",this.message,r)}}}function ge(e,t){const[r="Invalid type",n]=Re(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="string"?Qe(o,"type","string",this.message,i):Le(i,this.pipe,o,"string")}}}function ta(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=Re(r,n);return[e,t,s,a]}const[i,o]=Re(t,r);return[ge(),e,i,o]}var ra=["__proto__","prototype","constructor"];function hi(e,t,r,n){const[i,o,s="Invalid type",a]=ta(e,t,r,n);return{type:"record",async:!1,key:i,value:o,message:s,pipe:a,_parse(l,u){if(!l||typeof l!="object")return Qe(u,"type","record",this.message,l);let h;const c={};for(const[p,b]of Object.entries(l))if(!ra.includes(p)){let m;const v=this.key._parse(p,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(v.issues){m={type:"record",input:l,key:p,value:b};for(const w of v.issues)w.path=[m],h==null||h.push(w);if(h||(h=v.issues),u!=null&&u.abortEarly)break}const _=this.value._parse(b,u);if(_.issues){m=m||{type:"record",input:l,key:p,value:b};for(const w of _.issues)w.path?w.path.unshift(m):w.path=[m],h==null||h.push(w);if(h||(h=_.issues),u!=null&&u.abortEarly)break}!v.issues&&!_.issues&&(c[v.output]=_.output)}return h?Ct(h):Le(c,this.pipe,u,"record")}}}function Pt(e,t,r){const n=e._parse(t,r);if(n.issues)throw new Tr(n.issues);return n.output}async function na(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new Tr(n.issues);return n.output}function vi(e,t,r){return{...e,_parse(n,i){const o=e._parse(n,i);if(o.issues)return o;const s=t(o.output);return r&&!Array.isArray(r)?r._parse(s,i):Le(s,r,i,typeof s)}}}var ia=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function oa(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:ia,_parse(t){return this.requirement.test(t)?Me(t):At(this.type,this.message,t,this.requirement)}}}function Ot(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?At(this.type,this.message,r,this.requirement):Me(r)}}}function mi(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?At(this.type,this.message,r,this.requirement):Me(r)}}}function sa(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?Me(r):At(this.type,this.message,r,this.requirement)}}}function aa(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)?Me(t):At(this.type,this.message,t,this.requirement)}}}function ce(){return ce=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},ce.apply(this,arguments)}var Ie,B,Nr,gi,ut=0,bi=[],Gt=[],yi=S.__b,_i=S.__r,wi=S.diffed,xi=S.__c,ki=S.unmount;function Je(e,t){S.__h&&S.__h(B,e,ut||t),ut=0;var r=B.__H||(B.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Gt}),r.__[e]}function J(e){return ut=1,Zt(Ai,e)}function Zt(e,t,r){var n=Je(Ie++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Ai(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=B,!B.u)){var i=function(a,l,u){if(!n.__c.__H)return!0;var h=n.__c.__H.__.filter(function(p){return p.__c});if(h.every(function(p){return!p.__N}))return!o||o.call(this,a,l,u);var c=!1;return h.forEach(function(p){if(p.__N){var b=p.__[0];p.__=p.__N,p.__N=void 0,b!==p.__[0]&&(c=!0)}}),!(!c&&n.__c.props===a)&&(!o||o.call(this,a,l,u))};B.u=!0;var o=B.shouldComponentUpdate,s=B.componentWillUpdate;B.componentWillUpdate=function(a,l,u){if(this.__e){var h=o;o=void 0,i(a,l,u),o=h}s&&s.call(this,a,l,u)},B.shouldComponentUpdate=i}return n.__N||n.__}function U(e,t){var r=Je(Ie++,3);!S.__s&&Mr(r.__H,t)&&(r.__=e,r.i=t,B.__H.__h.push(r))}function we(e,t){var r=Je(Ie++,4);!S.__s&&Mr(r.__H,t)&&(r.__=e,r.i=t,B.__h.push(r))}function V(e){return ut=5,be(function(){return{current:e}},[])}function $i(e,t,r){ut=6,we(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 be(e,t){var r=Je(Ie++,7);return Mr(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function le(e,t){return ut=8,be(function(){return e},t)}function Xt(e){var t=B.context[e.__c],r=Je(Ie++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(B)),t.props.value):e.__}function Si(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function ca(e){var t=Je(Ie++,10),r=J();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(n,i){t.__&&t.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Ei(){var e=Je(Ie++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function la(){for(var e;e=bi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Qt),e.__H.__h.forEach(Fr),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){B=null,yi&&yi(e)},S.__r=function(e){_i&&_i(e),Ie=0;var t=(B=e.__c).__H;t&&(Nr===B?(t.__h=[],B.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Gt,r.__N=r.i=void 0})):(t.__h.forEach(Qt),t.__h.forEach(Fr),t.__h=[],Ie=0)),Nr=B},S.diffed=function(e){wi&&wi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(bi.push(t)!==1&&gi===S.requestAnimationFrame||((gi=S.requestAnimationFrame)||ua)(la)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Gt&&(r.__=r.__V),r.i=void 0,r.__V=Gt})),Nr=B=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Qt),r.__h=r.__h.filter(function(n){return!n.__||Fr(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],S.__e(n,r.__v)}}),xi&&xi(e,t)},S.unmount=function(e){ki&&ki(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Qt(n)}catch(i){t=i}}),r.__H=void 0,t&&S.__e(t,r.__v))};var Ci=typeof requestAnimationFrame=="function";function ua(e){var t,r=function(){clearTimeout(n),Ci&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Ci&&(t=requestAnimationFrame(r))}function Qt(e){var t=B,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),B=t}function Fr(e){var t=B;e.__c=e.__(),B=t}function Mr(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Ai(e,t){return typeof t=="function"?t(e):t}function Pi(e,t){for(var r in t)e[r]=t[r];return e}function Lr(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 Rr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Jt(e){this.props=e}function Oi(e,t){function r(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:Lr(this.props,i)}function n(i){return this.shouldComponentUpdate=r,T(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Jt.prototype=new me).isPureReactComponent=!0,Jt.prototype.shouldComponentUpdate=function(e,t){return Lr(this.props,e)||Lr(this.state,t)};var Ii=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ii&&Ii(e)};var da=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ie(e){function t(r){var n=Pi({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=da,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Di=function(e,t){return e==null?null:Oe(Oe(e).map(t))},De={map:Di,forEach:Di,count:function(e){return e?Oe(e).length:0},only:function(e){var t=Oe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Oe},fa=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}fa(e,t,r,n)};var Ti=S.unmount;function Ni(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=Pi({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Ni(n,t,r)})),e}function Fi(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Fi(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 Mi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Vr(e){var t,r,n;function i(o){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,o)}return i.displayName="Lazy",i.__f=!0,i}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),Ti&&Ti(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 i=Mi(n.__v),o=!1,s=function(){o||(o=!0,r.__R=null,i?i(a):a())};r.__R=s;var a=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=Fi(u,u.__c.__P,u.__c.__O)}var h;for(n.setState({__a:n.__b=null});h=n.t.pop();)h.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]=Ni(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&T(Y,null,e.fallback);return i&&(i.__h=null),[T(Y,null,t.__a?null:e.children),i]};var Li=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 pa(e){return this.getChildContext=function(){return e.context},e.children}function ha(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,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),lt(T(pa,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ri(e,t){var r=T(ha,{__v:e,i:t});return r.containerInfo=t,r}(ft.prototype=new me).__a=function(e){var t=this,r=Mi(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),Li(t,e,n)):i()};r?r(o):o()}},ft.prototype.render=function(e){this.u=null,this.o=new Map;var t=Oe(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){Li(e,r,t)})};var Vi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,va=/^(?: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]/,ma=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ga=/[A-Z0-9]/g,ba=typeof document<"u",ya=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Bi(e,t,r){return t.__k==null&&(t.textContent=""),lt(e,t),typeof r=="function"&&r(),e?e.__c:null}function ji(e,t,r){return li(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 Ui=S.event;function _a(){}function wa(){return this.cancelBubble}function xa(){return this.defaultPrevented}S.event=function(e){return Ui&&(e=Ui(e)),e.persist=_a,e.isPropagationStopped=wa,e.isDefaultPrevented=xa,e.nativeEvent=e};var Br,ka={enumerable:!1,configurable:!0,get:function(){return this.class}},zi=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var o in r){var s=r[o];if(!(o==="value"&&"defaultValue"in r&&s==null||ba&&o==="children"&&n==="noscript"||o==="class"||o==="className")){var a=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&s===!0?s="":a==="ondoubleclick"?o="ondblclick":a!=="onchange"||n!=="input"&&n!=="textarea"||ya(r.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":ma.test(o)?o=a:n.indexOf("-")===-1&&va.test(o)?o=o.replace(ga,"-$&").toLowerCase():s===null&&(s=void 0):a=o="oninput",a==="oninput"&&i[o=a]&&(o="oninputCapture"),i[o]=s}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Oe(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=Oe(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",ka)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Vi,zi&&zi(e)};var Hi=S.__r;S.__r=function(e){Hi&&Hi(e),Br=e.__c};var Wi=S.diffed;S.diffed=function(e){Wi&&Wi(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),Br=null};var Ki={ReactCurrentDispatcher:{current:{readContext:function(e){return Br.__n[e.__c].props.value}}}},$a="17.0.2";function qi(e){return T.bind(null,e)}function et(e){return!!e&&e.$$typeof===Vi}function pt(e){return et(e)?Ys.apply(null,arguments):e}function Yi(e){return!!e.__k&&(lt(null,e),!0)}function Gi(e){return e&&(e.base||e.nodeType===1&&e)||null}var Zi=function(e,t){return e(t)},er=function(e,t){return e(t)},Xi=Y;function jr(e){e()}function Qi(e){return e}function Ji(){return[!1,jr]}var eo=we;function to(e,t){var r=t(),n=J({h:{__:r,v:t}}),i=n[0].h,o=n[1];return we(function(){i.__=r,i.v=t,Rr(i.__,t())||o({h:i})},[e,r,t]),U(function(){return Rr(i.__,i.v())||o({h:i}),e(function(){Rr(i.__,i.v())||o({h:i})})},[e]),r}var xe={useState:J,useId:Ei,useReducer:Zt,useEffect:U,useLayoutEffect:we,useInsertionEffect:eo,useTransition:Ji,useDeferredValue:Qi,useSyncExternalStore:to,startTransition:jr,useRef:V,useImperativeHandle:$i,useMemo:be,useCallback:le,useContext:Xt,useDebugValue:Si,version:"17.0.2",Children:De,render:Bi,hydrate:ji,unmountComponentAtNode:Yi,createPortal:Ri,createElement:T,createContext:Et,createFactory:qi,cloneElement:pt,createRef:Jn,Fragment:Y,isValidElement:et,findDOMNode:Gi,Component:me,PureComponent:Jt,memo:Oi,forwardRef:ie,flushSync:er,unstable_batchedUpdates:Zi,StrictMode:Xi,Suspense:dt,SuspenseList:ft,lazy:Vr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ki};const Sa=Object.freeze(Object.defineProperty({__proto__:null,Children:De,Component:me,Fragment:Y,PureComponent:Jt,StrictMode:Xi,Suspense:dt,SuspenseList:ft,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ki,cloneElement:pt,createContext:Et,createElement:T,createFactory:qi,createPortal:Ri,createRef:Jn,default:xe,findDOMNode:Gi,flushSync:er,forwardRef:ie,hydrate:ji,isValidElement:et,lazy:Vr,memo:Oi,render:Bi,startTransition:jr,unmountComponentAtNode:Yi,unstable_batchedUpdates:Zi,useCallback:le,useContext:Xt,useDebugValue:Si,useDeferredValue:Qi,useEffect:U,useErrorBoundary:ca,useId:Ei,useImperativeHandle:$i,useInsertionEffect:eo,useLayoutEffect:we,useMemo:be,useReducer:Zt,useRef:V,useState:J,useSyncExternalStore:to,useTransition:Ji,version:$a},Symbol.toStringTag,{value:"Module"}));function ht(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Ea(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ro(...e){return t=>e.forEach(r=>Ea(r,t))}function It(...e){return le(ro(...e),e)}function Ca(e,t=[]){let r=[];function n(o,s){const a=Et(s),l=r.length;r=[...r,s];function u(c){const{scope:p,children:b,...m}=c,v=(p==null?void 0:p[e][l])||a,_=be(()=>m,Object.values(m));return T(v.Provider,{value:_},b)}function h(c,p){const b=(p==null?void 0:p[e][l])||a,m=Xt(b);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=r.map(s=>Et(s));return function(a){const l=(a==null?void 0:a[e])||o;return be(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[n,Aa(i,...t)]}function Aa(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=n.reduce((a,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...a,...c}},{});return be(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}const Ur=globalThis!=null&&globalThis.document?we:()=>{},Pa=Sa["useId".toString()]||(()=>{});let Oa=0;function zr(e){const[t,r]=J(Pa());return Ur(()=>{e||r(n=>n??String(Oa++))},[e]),e||(t?`radix-${t}`:"")}function tt(e){const t=V(e);return U(()=>{t.current=e}),be(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function Ia({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=Da({defaultProp:t,onChange:r}),o=e!==void 0,s=o?e:n,a=tt(r),l=le(u=>{if(o){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else i(u)},[o,e,i,a]);return[s,l]}function Da({defaultProp:e,onChange:t}){const r=J(e),[n]=r,i=V(n),o=tt(t);return U(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}const Hr=ie((e,t)=>{const{children:r,...n}=e,i=De.toArray(r),o=i.find(Na);if(o){const s=o.props.children,a=i.map(l=>l===o?De.count(s)>1?De.only(null):et(s)?s.props.children:null:l);return T(Wr,ce({},n,{ref:t}),et(s)?pt(s,void 0,a):null)}return T(Wr,ce({},n,{ref:t}),r)});Hr.displayName="Slot";const Wr=ie((e,t)=>{const{children:r,...n}=e;return et(r)?pt(r,{...Fa(n,r.props),ref:t?ro(t,r.ref):r.ref}):De.count(r)>1?De.only(null):null});Wr.displayName="SlotClone";const Ta=({children:e})=>T(Y,null,e);function Na(e){return et(e)&&e.type===Ta}function Fa(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...a)=>{o(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}const Kr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=ie((n,i)=>{const{asChild:o,...s}=n,a=o?Hr:t;return U(()=>{window[Symbol.for("radix-ui")]=!0},[]),T(a,ce({},s,{ref:i}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ma(e,t){e&&er(()=>e.dispatchEvent(t))}function La(e,t=globalThis==null?void 0:globalThis.document){const r=tt(e);U(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const qr="dismissableLayer.update",Ra="dismissableLayer.pointerDownOutside",Va="dismissableLayer.focusOutside";let no;const Ba=Et({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ja=ie((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...u}=e,h=Xt(Ba),[c,p]=J(null),b=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=J({}),v=It(t,N=>p(N)),_=Array.from(h.layers),[w]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=_.indexOf(w),P=c?_.indexOf(c):-1,D=h.layersWithOutsidePointerEventsDisabled.size>0,A=P>=k,H=Ua(N=>{const F=N.target,ae=[...h.branches].some(ve=>ve.contains(F));!A||ae||(o==null||o(N),a==null||a(N),N.defaultPrevented||l==null||l())},b),K=za(N=>{const F=N.target;[...h.branches].some(ve=>ve.contains(F))||(s==null||s(N),a==null||a(N),N.defaultPrevented||l==null||l())},b);return La(N=>{P===h.layers.size-1&&(i==null||i(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},b),U(()=>{if(c)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(no=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(c)),h.layers.add(c),io(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=no)}},[c,b,n,h]),U(()=>()=>{c&&(h.layers.delete(c),h.layersWithOutsidePointerEventsDisabled.delete(c),io())},[c,h]),U(()=>{const N=()=>m({});return document.addEventListener(qr,N),()=>document.removeEventListener(qr,N)},[]),T(Kr.div,ce({},u,{ref:v,style:{pointerEvents:D?A?"auto":"none":void 0,...e.style},onFocusCapture:ht(e.onFocusCapture,K.onFocusCapture),onBlurCapture:ht(e.onBlurCapture,K.onBlurCapture),onPointerDownCapture:ht(e.onPointerDownCapture,H.onPointerDownCapture)}))});function Ua(e,t=globalThis==null?void 0:globalThis.document){const r=tt(e),n=V(!1),i=V(()=>{});return U(()=>{const o=a=>{if(a.target&&!n.current){let u=function(){oo(Ra,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function za(e,t=globalThis==null?void 0:globalThis.document){const r=tt(e),n=V(!1);return U(()=>{const i=o=>{o.target&&!n.current&&oo(Va,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function io(){const e=new CustomEvent(qr);document.dispatchEvent(e)}function oo(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?Ma(i,o):i.dispatchEvent(o)}const Yr="focusScope.autoFocusOnMount",Gr="focusScope.autoFocusOnUnmount",so={bubbles:!1,cancelable:!0},Ha=ie((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=J(null),u=tt(i),h=tt(o),c=V(null),p=It(t,v=>l(v)),b=V({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;U(()=>{if(n){let v=function(P){if(b.paused||!a)return;const D=P.target;a.contains(D)?c.current=D:Be(c.current,{select:!0})},_=function(P){if(b.paused||!a)return;const D=P.relatedTarget;D!==null&&(a.contains(D)||Be(c.current,{select:!0}))},w=function(P){if(document.activeElement===document.body)for(const A of P)A.removedNodes.length>0&&Be(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const k=new MutationObserver(w);return a&&k.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),k.disconnect()}}},[n,a,b.paused]),U(()=>{if(a){lo.add(b);const v=document.activeElement;if(!a.contains(v)){const w=new CustomEvent(Yr,so);a.addEventListener(Yr,u),a.dispatchEvent(w),w.defaultPrevented||(Wa(Za(ao(a)),{select:!0}),document.activeElement===v&&Be(a))}return()=>{a.removeEventListener(Yr,u),setTimeout(()=>{const w=new CustomEvent(Gr,so);a.addEventListener(Gr,h),a.dispatchEvent(w),w.defaultPrevented||Be(v??document.body,{select:!0}),a.removeEventListener(Gr,h),lo.remove(b)},0)}}},[a,u,h,b]);const m=le(v=>{if(!r&&!n||b.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(_&&w){const k=v.currentTarget,[P,D]=Ka(k);P&&D?!v.shiftKey&&w===D?(v.preventDefault(),r&&Be(P,{select:!0})):v.shiftKey&&w===P&&(v.preventDefault(),r&&Be(D,{select:!0})):w===k&&v.preventDefault()}},[r,n,b.paused]);return T(Kr.div,ce({tabIndex:-1},s,{ref:p,onKeyDown:m}))});function Wa(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Be(n,{select:t}),document.activeElement!==r)return}function Ka(e){const t=ao(e),r=co(t,e),n=co(t.reverse(),e);return[r,n]}function ao(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function co(e,t){for(const r of e)if(!qa(r,{upTo:t}))return r}function qa(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 Ya(e){return e instanceof HTMLInputElement&&"select"in e}function Be(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Ya(e)&&t&&e.select()}}const lo=Ga();function Ga(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=uo(e,t),e.unshift(t)},remove(t){var r;e=uo(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function uo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Za(e){return e.filter(t=>t.tagName!=="A")}function Xa(e,t){return Zt((r,n)=>{const i=t[r][n];return i??r},e)}const Zr=e=>{const{present:t,children:r}=e,n=Qa(t),i=typeof r=="function"?r({present:n.isPresent}):De.only(r),o=It(n.ref,i.ref);return typeof r=="function"||n.isPresent?pt(i,{ref:o}):null};Zr.displayName="Presence";function Qa(e){const[t,r]=J(),n=V({}),i=V(e),o=V("none"),s=e?"mounted":"unmounted",[a,l]=Xa(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return U(()=>{const u=tr(n.current);o.current=a==="mounted"?u:"none"},[a]),Ur(()=>{const u=n.current,h=i.current;if(h!==e){const p=o.current,b=tr(u);e?l("MOUNT"):b==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(h&&p!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Ur(()=>{if(t){const u=c=>{const b=tr(n.current).includes(c.animationName);c.target===t&&b&&er(()=>l("ANIMATION_END"))},h=c=>{c.target===t&&(o.current=tr(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:le(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function tr(e){return(e==null?void 0:e.animationName)||"none"}let Xr=0;function Ja(){U(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:fo()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:fo()),Xr++,()=>{Xr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Xr--}},[])}function fo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var $e=function(){return $e=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},$e.apply(this,arguments)};function po(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function ec(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var rr="right-scroll-bar-position",nr="width-before-scroll-bar",tc="with-scroll-bars-hidden",rc="--removed-body-scroll-bar-size";function nc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ic(e,t){var r=J(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}function oc(e,t){return ic(t||null,function(r){return e.forEach(function(n){return nc(n,r)})})}function sc(e){return e}function ac(e,t){t===void 0&&(t=sc);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var s=t(o,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(n=!0;r.length;){var s=r;r=[],s.forEach(o)}r={push:function(a){return o(a)},filter:function(){return r}}},assignMedium:function(o){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(o),s=r}var l=function(){var h=s;s=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(h){s.push(h),u()},filter:function(h){return s=s.filter(h),r}}}};return i}function cc(e){e===void 0&&(e={});var t=ac(null);return t.options=$e({async:!0,ssr:!1},e),t}var ho=function(e){var t=e.sideCar,r=po(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,$e({},r))};ho.isSideCarExport=!0;function lc(e,t){return e.useMedium(t),ho}var vo=cc(),Qr=function(){},ir=ie(function(e,t){var r=V(null),n=J({onScrollCapture:Qr,onWheelCapture:Qr,onTouchMoveCapture:Qr}),i=n[0],o=n[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,c=e.shards,p=e.sideCar,b=e.noIsolation,m=e.inert,v=e.allowPinchZoom,_=e.as,w=_===void 0?"div":_,k=po(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),P=p,D=oc([r,t]),A=$e($e({},k),i);return T(Y,null,h&&T(P,{sideCar:vo,removeScrollBar:u,shards:c,noIsolation:b,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:r}),s?pt(De.only(a),$e($e({},A),{ref:D})):T(w,$e({},A,{className:l,ref:D}),a))});ir.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ir.classNames={fullWidth:nr,zeroRight:rr};var mo,uc=function(){if(mo)return mo;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=uc();return t&&e.setAttribute("nonce",t),e}function fc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function pc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hc=function(){var e=0,t=null;return{add:function(r){e==0&&(t=dc())&&(fc(t,r),pc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vc=function(){var e=hc();return function(t,r){U(function(){return e.add(t),function(){e.remove()}},[t&&r])}},go=function(){var e=vc(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},mc={left:0,top:0,right:0,gap:0},Jr=function(e){return parseInt(e||"",10)||0},gc=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Jr(r),Jr(n),Jr(i)]},bc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mc;var t=gc(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])}},yc=go(),_c=function(e,t,r,n){var i=e.left,o=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
+
.`.concat(tc,` {
|
|
3
3
|
overflow: hidden `).concat(n,`;
|
|
4
4
|
padding-right: `).concat(a,"px ").concat(n,`;
|
|
5
5
|
}
|
|
@@ -16,38 +16,30 @@ var dy=Object.defineProperty;var fy=(ht,xe,E)=>xe in ht?dy(ht,xe,{enumerable:!0,
|
|
|
16
16
|
`),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
19
|
+
.`).concat(rr,` {
|
|
20
20
|
right: `).concat(a,"px ").concat(n,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
23
|
+
.`).concat(nr,` {
|
|
24
24
|
margin-right: `).concat(a,"px ").concat(n,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(rr," .").concat(rr,` {
|
|
28
28
|
right: 0 `).concat(n,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
31
|
+
.`).concat(nr," .").concat(nr,` {
|
|
32
32
|
margin-right: 0 `).concat(n,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(rc,": ").concat(a,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},wc=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n,o=be(function(){return bc(i)},[i]);return T(yc,{styles:_c(o,!t,i,r?"":"!important")})},en=!1;if(typeof window<"u")try{var or=Object.defineProperty({},"passive",{get:function(){return en=!0,!0}});window.addEventListener("test",or,or),window.removeEventListener("test",or,or)}catch{en=!1}var vt=en?{passive:!1}:!1,xc=function(e){return e.tagName==="TEXTAREA"},bo=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!xc(e)&&r[t]==="visible")},kc=function(e){return bo(e,"overflowY")},$c=function(e){return bo(e,"overflowX")},yo=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=_o(e,r);if(n){var i=wo(e,r),o=i[1],s=i[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Sc=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Ec=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},_o=function(e,t){return e==="v"?kc(t):$c(t)},wo=function(e,t){return e==="v"?Sc(t):Ec(t)},Cc=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ac=function(e,t,r,n,i){var o=Cc(e,window.getComputedStyle(t).direction),s=o*n,a=r.target,l=t.contains(a),u=!1,h=s>0,c=0,p=0;do{var b=wo(e,a),m=b[0],v=b[1],_=b[2],w=v-_-o*m;(m||w)&&_o(e,a)&&(c+=w,p+=m),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(h&&(i&&c===0||!i&&s>c)||!h&&(i&&p===0||!i&&-s>p))&&(u=!0),u},sr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xo=function(e){return[e.deltaX,e.deltaY]},ko=function(e){return e&&"current"in e?e.current:e},Pc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Oc=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},ef=0,Ut=[];function tf(e){var t=j([]),r=j([0,0]),n=j(),i=ie(ef++)[0],o=ie(function(){return ua()})[0],s=j(e);W(function(){s.current=e},[e]),W(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=kd([e.lockRef.current],(e.shards||[]).map(va),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=ae(function(m,b){if("touches"in m&&m.touches.length===2)return!s.current.allowPinchZoom;var x=en(m),y=r.current,_="deltaX"in m?m.deltaX:y[0]-x[0],C="deltaY"in m?m.deltaY:y[1]-x[1],S,N=m.target,F=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in m&&F==="h"&&N.type==="range")return!1;var A=fa(F,N);if(!A)return!0;if(A?S=F:(S=F==="v"?"h":"v",A=fa(F,N)),!A)return!1;if(!n.current&&"changedTouches"in m&&(_||C)&&(n.current=S),!S)return!0;var T=n.current||S;return Xd(T,b,m,T==="h"?_:C,!0)},[]),l=ae(function(m){var b=m;if(!(!Ut.length||Ut[Ut.length-1]!==o)){var x="deltaY"in b?ma(b):en(b),y=t.current.filter(function(S){return S.name===b.type&&S.target===b.target&&Qd(S.delta,x)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var _=(s.current.shards||[]).map(va).filter(Boolean).filter(function(S){return S.contains(b.target)}),C=_.length>0?a(b,_[0]):!s.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=ae(function(m,b,x,y){var _={name:m,delta:b,target:x,should:y};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),d=ae(function(m){r.current=en(m),n.current=void 0},[]),c=ae(function(m){u(m.type,ma(m),m.target,a(m,e.lockRef.current))},[]),f=ae(function(m){u(m.type,en(m),m.target,a(m,e.lockRef.current))},[]);W(function(){return Ut.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:f}),document.addEventListener("wheel",l,jt),document.addEventListener("touchmove",l,jt),document.addEventListener("touchstart",d,jt),function(){Ut=Ut.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,jt),document.removeEventListener("touchmove",l,jt),document.removeEventListener("touchstart",d,jt)}},[]);var p=e.removeScrollBar,h=e.inert;return O(Q,null,h?O(o,{styles:Jd(i)}):null,p?O(Hd,{gapMode:"margin"}):null)}const rf=Md(ca,tf);var ga=he(function(e,t){return O(Qr,Ie({},e,{ref:t,sideCar:rf}))});ga.classNames=Qr.classNames;const nf=ga;var of=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zt=new WeakMap,tn=new WeakMap,rn={},bi=0,ya=function(e){return e&&(e.host||ya(e.parentNode))},sf=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ya(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})},af=function(e,t,r,n){var i=sf(t,Array.isArray(e)?e:[e]);rn[r]||(rn[r]=new WeakMap);var o=rn[r],s=[],a=new Set,l=new Set(i),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};i.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(f){if(a.has(f))d(f);else{var p=f.getAttribute(n),h=p!==null&&p!=="false",m=(zt.get(f)||0)+1,b=(o.get(f)||0)+1;zt.set(f,m),o.set(f,b),s.push(f),m===1&&h&&tn.set(f,!0),b===1&&f.setAttribute(r,"true"),h||f.setAttribute(n,"true")}})};return d(t),a.clear(),bi++,function(){s.forEach(function(c){var f=zt.get(c)-1,p=o.get(c)-1;zt.set(c,f),o.set(c,p),f||(tn.has(c)||c.removeAttribute(n),tn.delete(c)),p||c.removeAttribute(r)}),bi--,bi||(zt=new WeakMap,zt=new WeakMap,tn=new WeakMap,rn={})}},cf=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||of(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),af(n,i,r,"aria-hidden")):function(){return null}};const ba="Dialog",[wa,py]=Zu(ba),[lf,Ht]=wa(ba),uf=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=j(null),l=j(null),[u=!1,d]=ed({prop:n,defaultProp:i,onChange:o});return O(lf,{scope:t,triggerRef:a,contentRef:l,contentId:ai(),titleId:ai(),descriptionId:ai(),open:u,onOpenChange:d,onOpenToggle:ae(()=>d(c=>!c),[d]),modal:s},r)},df="DialogPortal",[my,_a]=wa(df,{forceMount:void 0}),wi="DialogOverlay",ff=he((e,t)=>{const r=_a(wi,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Ht(wi,e.__scopeDialog);return o.modal?O(pi,{present:n||o.open},O(hf,be({},i,{ref:t}))):null}),hf=he((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ht(wi,r);return O(nf,{as:ci,allowPinchZoom:!0,shards:[i.contentRef]},O(ui.div,be({"data-state":ka(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),ur="DialogContent",pf=he((e,t)=>{const r=_a(ur,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Ht(ur,e.__scopeDialog);return O(pi,{present:n||o.open},o.modal?O(mf,be({},i,{ref:t})):O(vf,be({},i,{ref:t})))}),mf=he((e,t)=>{const r=Ht(ur,e.__scopeDialog),n=j(null),i=lr(t,r.contentRef,n);return W(()=>{const o=n.current;if(o)return cf(o)},[]),O(xa,be({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bt(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=r.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Bt(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Bt(e.onFocusOutside,o=>o.preventDefault())}))}),vf=he((e,t)=>{const r=Ht(ur,e.__scopeDialog),n=j(!1),i=j(!1);return O(xa,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),xa=he((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Ht(ur,r),l=j(null),u=lr(t,l);return xd(),O(Q,null,O(hd,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o},O(ud,be({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ka(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function ka(e){return e?"open":"closed"}const gf=uf,yf=ff,bf=pf,Sa=Ee({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nn=Ee({}),_i=Ee(null),on=typeof document<"u",xi=on?Ae:W,ki=Ee({strict:!1});function wf(e,t,r,n){const{visualElement:i}=fe(nn),o=fe(ki),s=fe(_i),a=fe(Sa).reducedMotion,l=j();n=n||o.renderer,!l.current&&n&&(l.current=n(e,{visualState:t,parent:i,props:r,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;Gr(()=>{u&&u.update(r,s)});const d=j(!!window.HandoffAppearAnimations);return xi(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),W(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),u}function Ca(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _f(e,t,r){return ae(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):Ca(r)&&(r.current=n))},[t])}function dr(e){return typeof e=="string"||Array.isArray(e)}function sn(e){return typeof e=="object"&&typeof e.start=="function"}const Si=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ci=["initial",...Si];function an(e){return sn(e.animate)||Ci.some(t=>dr(e[t]))}function $a(e){return!!(an(e)||e.variants)}function xf(e,t){if(an(e)){const{initial:r,animate:n}=e;return{initial:r===!1||dr(r)?r:void 0,animate:dr(n)?n:void 0}}return e.inherit!==!1?t:{}}function kf(e){const{initial:t,animate:r}=xf(e,fe(nn));return se(()=>({initial:t,animate:r}),[Aa(t),Aa(r)])}function Aa(e){return Array.isArray(e)?e.join(" "):e}const Pa={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},fr={};for(const e in Pa)fr[e]={isEnabled:t=>Pa[e].some(r=>!!t[r])};function $i(e){for(const t in e)fr[t]={...fr[t],...e[t]}}const Ea=Ee({}),Sf=Ee({}),Cf=Symbol.for("motionComponentSymbol");function $f({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&$i(e);function o(a,l){let u;const d={...fe(Sa),...a,layoutId:Af(a)},{isStatic:c}=d,f=kf(a),p=n(a,c);if(!c&&on){f.visualElement=wf(i,p,d,t);const h=fe(Sf),m=fe(ki).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,m,e,h))}return O(nn.Provider,{value:f},u&&f.visualElement?O(u,{visualElement:f.visualElement,...d}):null,r(i,a,_f(p,f.visualElement,l),p,c,f.visualElement))}const s=he(o);return s[Cf]=i,s}function Af({layoutId:e}){const t=fe(Ea).id;return t&&e!==void 0?t+"-"+e:e}function Pf(e){function t(n,i={}){return $f(e(n,i))}if(typeof Proxy>"u")return t;const r=new Map;return new Proxy(t,{get:(n,i)=>(r.has(i)||r.set(i,t(i)),r.get(i))})}const Ef=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ai(e){return typeof e!="string"||e.includes("-")?!1:!!(Ef.indexOf(e)>-1||/[A-Z]/.test(e))}const Tf={},hr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yt=new Set(hr);function Ta(e,{layout:t,layoutId:r}){return yt.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Tf[e]||e==="opacity")}const Se=e=>!!(e&&e.getVelocity),Vf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mf=hr.length;function Of(e,{enableHardwareAcceleration:t=!0,allowTransformNone:r=!0},n,i){let o="";for(let s=0;s<Mf;s++){const a=hr[s];if(e[a]!==void 0){const l=Vf[a]||a;o+=`${l}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,n?"":o):r&&n&&(o="none"),o}const Va=e=>t=>typeof t=="string"&&t.startsWith(e),Ma=Va("--"),Pi=Va("var(--"),If=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Ff=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wt=(e,t,r)=>Math.min(Math.max(r,e),t),bt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pr={...bt,transform:e=>Wt(0,1,e)},cn={...bt,default:1},mr=e=>Math.round(e*1e5)/1e5,ln=/(-)?([\d]*\.?[\d])+/g,Oa=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Df=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function vr(e){return typeof e=="string"}const gr=e=>({test:t=>vr(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),tt=gr("deg"),Kt=gr("%"),D=gr("px"),Nf=gr("vh"),Lf=gr("vw"),Ia={...Kt,parse:e=>Kt.parse(e)/100,transform:e=>Kt.transform(e*100)},Fa={...bt,transform:Math.round},Da={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,size:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:cn,scaleX:cn,scaleY:cn,scaleZ:cn,skew:tt,skewX:tt,skewY:tt,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:pr,originX:Ia,originY:Ia,originZ:D,zIndex:Fa,fillOpacity:pr,strokeOpacity:pr,numOctaves:Fa};function Ei(e,t,r,n){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let l=!1,u=!1,d=!0;for(const c in t){const f=t[c];if(Ma(c)){o[c]=f;continue}const p=Da[c],h=Ff(f,p);if(yt.has(c)){if(l=!0,s[c]=h,!d)continue;f!==(p.default||0)&&(d=!1)}else c.startsWith("origin")?(u=!0,a[c]=h):i[c]=h}if(t.transform||(l||n?i.transform=Of(e.transform,r,d,n):i.transform&&(i.transform="none")),u){const{originX:c="50%",originY:f="50%",originZ:p=0}=a;i.transformOrigin=`${c} ${f} ${p}`}}const Ti=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Na(e,t,r){for(const n in t)!Se(t[n])&&!Ta(n,r)&&(e[n]=t[n])}function Rf({transformTemplate:e},t,r){return se(()=>{const n=Ti();return Ei(n,t,{enableHardwareAcceleration:!r},e),Object.assign({},n.vars,n.style)},[t])}function Bf(e,t,r){const n=e.style||{},i={};return Na(i,n,e),Object.assign(i,Rf(e,t,r)),e.transformValues?e.transformValues(i):i}function jf(e,t,r){const n={},i=Bf(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const Uf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function un(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Uf.has(e)}let La=e=>!un(e);function zf(e){e&&(La=t=>t.startsWith("on")?!un(t):e(t))}try{zf(require("@emotion/is-prop-valid").default)}catch{}function Hf(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(La(i)||r===!0&&un(i)||!t&&!un(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function Ra(e,t,r){return typeof e=="string"?e:D.transform(t+r*e)}function Wf(e,t,r){const n=Ra(t,e.x,e.width),i=Ra(r,e.y,e.height);return`${n} ${i}`}const Kf={offset:"stroke-dashoffset",array:"stroke-dasharray"},qf={offset:"strokeDashoffset",array:"strokeDasharray"};function Gf(e,t,r=1,n=0,i=!0){e.pathLength=1;const o=i?Kf:qf;e[o.offset]=D.transform(-n);const s=D.transform(t),a=D.transform(r);e[o.array]=`${s} ${a}`}function Vi(e,{attrX:t,attrY:r,attrScale:n,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},d,c,f){if(Ei(e,u,d,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:m}=e;p.transform&&(m&&(h.transform=p.transform),delete p.transform),m&&(i!==void 0||o!==void 0||h.transform)&&(h.transformOrigin=Wf(m,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(p.x=t),r!==void 0&&(p.y=r),n!==void 0&&(p.scale=n),s!==void 0&&Gf(p,s,a,l,!1)}const Ba=()=>({...Ti(),attrs:{}}),Mi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Yf(e,t,r,n){const i=se(()=>{const o=Ba();return Vi(o,t,{enableHardwareAcceleration:!1},Mi(n),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Na(o,e.style,e),i.style={...o,...i.style}}return i}function Zf(e=!1){return(r,n,i,{latestValues:o},s)=>{const l=(Ai(r)?Yf:jf)(n,o,s,r),d={...Hf(n,typeof r=="string",e),...l,ref:i},{children:c}=n,f=se(()=>Se(c)?c.get():c,[c]);return O(r,{...d,children:f})}}const Oi=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ja(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const o in r)e.style.setProperty(o,r[o])}const Ua=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function za(e,t,r,n){ja(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(Ua.has(i)?i:Oi(i),t.attrs[i])}function Ii(e,t){const{style:r}=e,n={};for(const i in r)(Se(r[i])||t.style&&Se(t.style[i])||Ta(i,e))&&(n[i]=r[i]);return n}function Ha(e,t){const r=Ii(e,t);for(const n in e)if(Se(e[n])||Se(t[n])){const i=hr.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[i]=e[n]}return r}function Fi(e,t,r,n={},i={}){return typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,i)),t}function Wa(e){const t=j(null);return t.current===null&&(t.current=e()),t.current}const dn=e=>Array.isArray(e),Xf=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Qf=e=>dn(e)?e[e.length-1]||0:e;function Jf(e){const t=Se(e)?e.get():e;return Xf(t)?t.toValue():t}function eh({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,i,o){const s={latestValues:th(n,i,o,e),renderState:t()};return r&&(s.mount=a=>r(n,a,s)),s}const Ka=e=>(t,r)=>{const n=fe(nn),i=fe(_i),o=()=>eh(e,t,n,i);return r?o():Wa(o)};function th(e,t,r,n){const i={},o=n(e,{});for(const f in o)i[f]=Jf(o[f]);let{initial:s,animate:a}=e;const l=an(e),u=$a(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=r?r.initial===!1:!1;d=d||s===!1;const c=d?a:s;return c&&typeof c!="boolean"&&!sn(c)&&(Array.isArray(c)?c:[c]).forEach(p=>{const h=Fi(e,p);if(!h)return;const{transitionEnd:m,transition:b,...x}=h;for(const y in x){let _=x[y];if(Array.isArray(_)){const C=d?_.length-1:0;_=_[C]}_!==null&&(i[y]=_)}for(const y in m)i[y]=m[y]}),i}const pe=e=>e;class qa{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const r=this.order.indexOf(t);r!==-1&&(this.order.splice(r,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function rh(e){let t=new qa,r=new qa,n=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,d=!1)=>{const c=d&&i,f=c?t:r;return u&&s.add(l),f.add(l)&&c&&i&&(n=t.order.length),l},cancel:l=>{r.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,r]=[r,t],r.clear(),n=t.order.length,n)for(let u=0;u<n;u++){const d=t.order[u];d(l),s.has(d)&&(a.schedule(d),e())}i=!1,o&&(o=!1,a.process(l))}};return a}const fn=["prepare","read","update","preRender","render","postRender"],nh=40;function ih(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=fn.reduce((c,f)=>(c[f]=rh(()=>r=!0),c),{}),s=c=>o[c].process(i),a=()=>{const c=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(c-i.timestamp,nh),1),i.timestamp=c,i.isProcessing=!0,fn.forEach(s),i.isProcessing=!1,r&&t&&(n=!1,e(a))},l=()=>{r=!0,n=!0,i.isProcessing||e(a)};return{schedule:fn.reduce((c,f)=>{const p=o[f];return c[f]=(h,m=!1,b=!1)=>(r||l(),p.schedule(h,m,b)),c},{}),cancel:c=>fn.forEach(f=>o[f].cancel(c)),state:i,steps:o}}const{schedule:me,cancel:hn,state:yr,steps:vy}=ih(typeof requestAnimationFrame<"u"?requestAnimationFrame:pe,!0),oh={useVisualState:Ka({scrapeMotionValuesFromProps:Ha,createRenderState:Ba,onMount:(e,t,{renderState:r,latestValues:n})=>{me.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),me.render(()=>{Vi(r,n,{enableHardwareAcceleration:!1},Mi(t.tagName),e.transformTemplate),za(t,r)})}})},sh={useVisualState:Ka({scrapeMotionValuesFromProps:Ii,createRenderState:Ti})};function ah(e,{forwardMotionProps:t=!1},r,n){return{...Ai(e)?oh:sh,preloadedFeatures:r,useRender:Zf(t),createVisualElement:n,Component:e}}function wt(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const ch=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ga(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const lh=e=>t=>ch(t)&&e(t,Ga(t));function pn(e,t,r,n){return wt(e,t,lh(r),n)}const uh=(e,t)=>r=>t(e(r)),_t=(...e)=>e.reduce(uh);function Ya(e){let t=null;return()=>{const r=()=>{t=null};return t===null?(t=e,r):!1}}const Za=Ya("dragHorizontal"),Xa=Ya("dragVertical");function dh(e){let t=!1;if(e==="y")t=Xa();else if(e==="x")t=Za();else{const r=Za(),n=Xa();r&&n?t=()=>{r(),n()}:(r&&r(),n&&n())}return t}function Qa(){const e=dh(!0);return e?(e(),!1):!0}class qt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ja(e,t){const r="pointer"+(t?"enter":"leave"),n="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||Qa())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[n]&&me.update(()=>a[n](o,s))};return pn(e.current,r,i,{passive:!e.getProps()[n]})}class fh extends qt{mount(){this.unmount=_t(Ja(this.node,!0),Ja(this.node,!1))}unmount(){}}class hh extends qt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_t(wt(this.node.current,"focus",()=>this.onFocus()),wt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ec=(e,t)=>t?e===t?!0:ec(e,t.parentElement):!1;function Di(e,t){if(!t)return;const r=new PointerEvent("pointer"+e);t(r,Ga(r))}class ph extends qt{constructor(){super(...arguments),this.removeStartListeners=pe,this.removeEndListeners=pe,this.removeAccessibleListeners=pe,this.startPointerPress=(t,r)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),o=pn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();me.update(()=>{ec(this.node.current,a.target)?u&&u(a,l):d&&d(a,l)})},{passive:!(n.onTap||n.onPointerUp)}),s=pn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=_t(o,s),this.startPress(t,r)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Di("up",(l,u)=>{const{onTap:d}=this.node.getProps();d&&me.update(()=>d(l,u))})};this.removeEndListeners(),this.removeEndListeners=wt(this.node.current,"keyup",s),Di("down",(a,l)=>{this.startPress(a,l)})},r=wt(this.node.current,"keydown",t),n=()=>{this.isPressing&&Di("cancel",(o,s)=>this.cancelPress(o,s))},i=wt(this.node.current,"blur",n);this.removeAccessibleListeners=_t(r,i)}}startPress(t,r){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&me.update(()=>n(t,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Qa()}cancelPress(t,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&me.update(()=>n(t,r))}mount(){const t=this.node.getProps(),r=pn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=wt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_t(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ni=new WeakMap,Li=new WeakMap,mh=e=>{const t=Ni.get(e.target);t&&t(e)},vh=e=>{e.forEach(mh)};function gh({root:e,...t}){const r=e||document;Li.has(r)||Li.set(r,{});const n=Li.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(vh,{root:e,...t})),n[i]}function yh(e,t,r){const n=gh(t);return Ni.set(e,r),n.observe(e),()=>{Ni.delete(e),n.unobserve(e)}}const bh={some:0,all:1};class wh extends qt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:o}=t,s={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:bh[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return yh(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(_h(t,r))&&this.startObserver()}unmount(){}}function _h({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const xh={inView:{Feature:wh},tap:{Feature:ph},focus:{Feature:hh},hover:{Feature:fh}};function tc(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function kh(e){const t={};return e.values.forEach((r,n)=>t[n]=r.get()),t}function Sh(e){const t={};return e.values.forEach((r,n)=>t[n]=r.getVelocity()),t}function mn(e,t,r){const n=e.getProps();return Fi(n,t,r!==void 0?r:n.custom,kh(e),Sh(e))}const Ch="data-"+Oi("framerAppearId");let br=pe,Fe=pe;process.env.NODE_ENV!=="production"&&(br=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Fe=(e,t)=>{if(!e)throw new Error(t)});const xt=e=>e*1e3,rt=e=>e/1e3,$h={current:!1},rc=e=>Array.isArray(e)&&typeof e[0]=="number";function nc(e){return!!(!e||typeof e=="string"&&ic[e]||rc(e)||Array.isArray(e)&&e.every(nc))}const wr=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,ic={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wr([0,.65,.55,1]),circOut:wr([.55,0,1,.45]),backIn:wr([.31,.01,.66,-.59]),backOut:wr([.33,1.53,.69,.99])};function oc(e){if(e)return rc(e)?wr(e):Array.isArray(e)?e.map(oc):ic[e]}function Ah(e,t,r,{delay:n=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:r};l&&(u.offset=l);const d=oc(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:n,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function Ph(e,{repeat:t,repeatType:r="loop"}){const n=t&&r!=="loop"&&t%2===1?0:e.length-1;return e[n]}const sc=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Eh=1e-7,Th=12;function Vh(e,t,r,n,i){let o,s,a=0;do s=t+(r-t)/2,o=sc(s,n,i)-e,o>0?r=s:t=s;while(Math.abs(o)>Eh&&++a<Th);return s}function _r(e,t,r,n){if(e===t&&r===n)return pe;const i=o=>Vh(o,0,1,e,r);return o=>o===0||o===1?o:sc(i(o),t,n)}const Mh=_r(.42,0,1,1),Oh=_r(0,0,.58,1),ac=_r(.42,0,.58,1),Ih=e=>Array.isArray(e)&&typeof e[0]!="number",cc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lc=e=>t=>1-e(1-t),uc=e=>1-Math.sin(Math.acos(e)),dc=lc(uc),Fh=cc(dc),fc=_r(.33,1.53,.69,.99),Ri=lc(fc),Dh=cc(Ri),hc={linear:pe,easeIn:Mh,easeInOut:ac,easeOut:Oh,circIn:uc,circInOut:Fh,circOut:dc,backIn:Ri,backInOut:Dh,backOut:fc,anticipate:e=>(e*=2)<1?.5*Ri(e):.5*(2-Math.pow(2,-10*(e-1)))},pc=e=>{if(Array.isArray(e)){Fe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,r,n,i]=e;return _r(t,r,n,i)}else if(typeof e=="string")return Fe(hc[e]!==void 0,`Invalid easing type '${e}'`),hc[e];return e},Bi=(e,t)=>r=>!!(vr(r)&&Df.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),mc=(e,t,r)=>n=>{if(!vr(n))return n;const[i,o,s,a]=n.match(ln);return{[e]:parseFloat(i),[t]:parseFloat(o),[r]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Nh=e=>Wt(0,255,e),ji={...bt,transform:e=>Math.round(Nh(e))},kt={test:Bi("rgb","red"),parse:mc("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+ji.transform(e)+", "+ji.transform(t)+", "+ji.transform(r)+", "+mr(pr.transform(n))+")"};function Lh(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const Ui={test:Bi("#"),parse:Lh,transform:kt.transform},Gt={test:Bi("hsl","hue"),parse:mc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Kt.transform(mr(t))+", "+Kt.transform(mr(r))+", "+mr(pr.transform(n))+")"},ge={test:e=>kt.test(e)||Ui.test(e)||Gt.test(e),parse:e=>kt.test(e)?kt.parse(e):Gt.test(e)?Gt.parse(e):Ui.parse(e),transform:e=>vr(e)?e:e.hasOwnProperty("red")?kt.transform(e):Gt.transform(e)},vn=(e,t,r)=>-r*e+r*t+e;function zi(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Rh({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,o=0,s=0;if(!t)i=o=s=r;else{const a=r<.5?r*(1+t):r+t-r*t,l=2*r-a;i=zi(l,a,e+1/3),o=zi(l,a,e),s=zi(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:n}}const Hi=(e,t,r)=>{const n=e*e;return Math.sqrt(Math.max(0,r*(t*t-n)+n))},Bh=[Ui,kt,Gt],jh=e=>Bh.find(t=>t.test(e));function vc(e){const t=jh(e);Fe(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let r=t.parse(e);return t===Gt&&(r=Rh(r)),r}const gc=(e,t)=>{const r=vc(e),n=vc(t),i={...r};return o=>(i.red=Hi(r.red,n.red,o),i.green=Hi(r.green,n.green,o),i.blue=Hi(r.blue,n.blue,o),i.alpha=vn(r.alpha,n.alpha,o),kt.transform(i))};function Uh(e){var t,r;return isNaN(e)&&vr(e)&&(((t=e.match(ln))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(Oa))===null||r===void 0?void 0:r.length)||0)>0}const yc={regex:If,countKey:"Vars",token:"${v}",parse:pe},bc={regex:Oa,countKey:"Colors",token:"${c}",parse:ge.parse},wc={regex:ln,countKey:"Numbers",token:"${n}",parse:bt.parse};function Wi(e,{regex:t,countKey:r,token:n,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+r]=o.length,e.tokenised=e.tokenised.replace(t,n),e.values.push(...o.map(i)))}function gn(e){const t=e.toString(),r={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&Wi(r,yc),Wi(r,bc),Wi(r,wc),r}function _c(e){return gn(e).values}function xc(e){const{values:t,numColors:r,numVars:n,tokenised:i}=gn(e),o=t.length;return s=>{let a=i;for(let l=0;l<o;l++)l<n?a=a.replace(yc.token,s[l]):l<n+r?a=a.replace(bc.token,ge.transform(s[l])):a=a.replace(wc.token,mr(s[l]));return a}}const zh=e=>typeof e=="number"?0:e;function Hh(e){const t=_c(e);return xc(e)(t.map(zh))}const Yt={test:Uh,parse:_c,createTransformer:xc,getAnimatableNone:Hh},kc=(e,t)=>r=>`${r>0?t:e}`;function Sc(e,t){return typeof e=="number"?r=>vn(e,t,r):ge.test(e)?gc(e,t):e.startsWith("var(")?kc(e,t):$c(e,t)}const Cc=(e,t)=>{const r=[...e],n=r.length,i=e.map((o,s)=>Sc(o,t[s]));return o=>{for(let s=0;s<n;s++)r[s]=i[s](o);return r}},Wh=(e,t)=>{const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=Sc(e[i],t[i]));return i=>{for(const o in n)r[o]=n[o](i);return r}},$c=(e,t)=>{const r=Yt.createTransformer(t),n=gn(e),i=gn(t);return n.numVars===i.numVars&&n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?_t(Cc(n.values,i.values),r):(br(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),kc(e,t))},Ac=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Pc=(e,t)=>r=>vn(e,t,r);function Kh(e){return typeof e=="number"?Pc:typeof e=="string"?ge.test(e)?gc:$c:Array.isArray(e)?Cc:typeof e=="object"?Wh:Pc}function qh(e,t,r){const n=[],i=r||Kh(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||pe:t;a=_t(l,a)}n.push(a)}return n}function Ec(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const o=e.length;if(Fe(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=qh(t,n,i),a=s.length,l=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const c=Ac(e[d],e[d+1],u);return s[d](c)};return r?u=>l(Wt(e[0],e[o-1],u)):l}function Gh(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=Ac(0,t,n);e.push(vn(r,1,i))}}function Yh(e){const t=[0];return Gh(t,e.length-1),t}function Zh(e,t){return e.map(r=>r*t)}function Xh(e,t){return e.map(()=>t||ac).splice(0,e.length-1)}function yn({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=Ih(n)?n.map(pc):pc(n),o={done:!1,value:t[0]},s=Zh(r&&r.length===t.length?r:Yh(t),e),a=Ec(s,t,{ease:Array.isArray(i)?i:Xh(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}function Tc(e,t){return t?e*(1e3/t):0}const Qh=5;function Vc(e,t,r){const n=Math.max(t-Qh,0);return Tc(r-e(n),t-n)}const Ki=.001,Jh=.01,Mc=10,ep=.05,tp=1;function rp({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,o;br(e<=xt(Mc),"Spring duration must be 10 seconds or less");let s=1-t;s=Wt(ep,tp,s),e=Wt(Jh,Mc,rt(e)),s<1?(i=u=>{const d=u*s,c=d*e,f=d-r,p=qi(u,s),h=Math.exp(-c);return Ki-f/p*h},o=u=>{const c=u*s*e,f=c*r+r,p=Math.pow(s,2)*Math.pow(u,2)*e,h=Math.exp(-c),m=qi(Math.pow(u,2),s);return(-i(u)+Ki>0?-1:1)*((f-p)*h)/m}):(i=u=>{const d=Math.exp(-u*e),c=(u-r)*e+1;return-Ki+d*c},o=u=>{const d=Math.exp(-u*e),c=(r-u)*(e*e);return d*c});const a=5/e,l=ip(i,o,a);if(e=xt(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:s*2*Math.sqrt(n*u),duration:e}}}const np=12;function ip(e,t,r){let n=r;for(let i=1;i<np;i++)n=n-e(n)/t(n);return n}function qi(e,t){return e*Math.sqrt(1-t*t)}const op=["duration","bounce"],sp=["stiffness","damping","mass"];function Oc(e,t){return t.some(r=>e[r]!==void 0)}function ap(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Oc(e,sp)&&Oc(e,op)){const r=rp(e);t={...t,...r,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Ic({keyframes:e,restDelta:t,restSpeed:r,...n}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,velocity:d,duration:c,isResolvedFromDuration:f}=ap(n),p=d?-rt(d):0,h=l/(2*Math.sqrt(a*u)),m=o-i,b=rt(Math.sqrt(a/u)),x=Math.abs(m)<5;r||(r=x?.01:2),t||(t=x?.005:.5);let y;if(h<1){const _=qi(b,h);y=C=>{const S=Math.exp(-h*b*C);return o-S*((p+h*b*m)/_*Math.sin(_*C)+m*Math.cos(_*C))}}else if(h===1)y=_=>o-Math.exp(-b*_)*(m+(p+b*m)*_);else{const _=b*Math.sqrt(h*h-1);y=C=>{const S=Math.exp(-h*b*C),N=Math.min(_*C,300);return o-S*((p+h*b*m)*Math.sinh(N)+_*m*Math.cosh(N))/_}}return{calculatedDuration:f&&c||null,next:_=>{const C=y(_);if(f)s.done=_>=c;else{let S=p;_!==0&&(h<1?S=Vc(y,_,C):S=0);const N=Math.abs(S)<=r,F=Math.abs(o-C)<=t;s.done=N&&F}return s.value=s.done?o:C,s}}}function Fc({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:d}){const c=e[0],f={done:!1,value:c},p=A=>a!==void 0&&A<a||l!==void 0&&A>l,h=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=r*t;const b=c+m,x=s===void 0?b:s(b);x!==b&&(m=x-c);const y=A=>-m*Math.exp(-A/n),_=A=>x+y(A),C=A=>{const T=y(A),K=_(A);f.done=Math.abs(T)<=u,f.value=f.done?x:K};let S,N;const F=A=>{p(f.value)&&(S=A,N=Ic({keyframes:[f.value,h(f.value)],velocity:Vc(_,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return F(0),{calculatedDuration:null,next:A=>{let T=!1;return!N&&S===void 0&&(T=!0,C(A),F(A)),S!==void 0&&A>S?N.next(A-S):(!T&&C(A),f)}}}const cp=e=>{const t=({timestamp:r})=>e(r);return{start:()=>me.update(t,!0),stop:()=>hn(t),now:()=>yr.isProcessing?yr.timestamp:performance.now()}},Dc=2e4;function Nc(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<Dc;)t+=r,n=e.next(t);return t>=Dc?1/0:t}const lp={decay:Fc,inertia:Fc,tween:yn,keyframes:yn,spring:Ic};function bn({autoplay:e=!0,delay:t=0,driver:r=cp,keyframes:n,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:d,onUpdate:c,...f}){let p=1,h=!1,m,b;const x=()=>{b=new Promise(Y=>{m=Y})};x();let y;const _=lp[i]||yn;let C;_!==yn&&typeof n[0]!="number"&&(C=Ec([0,100],n,{clamp:!1}),n=[0,100]);const S=_({...f,keyframes:n});let N;a==="mirror"&&(N=_({...f,keyframes:[...n].reverse(),velocity:-(f.velocity||0)}));let F="idle",A=null,T=null,K=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=Nc(S));const{calculatedDuration:J}=S;let U=1/0,R=1/0;J!==null&&(U=J+s,R=U*(o+1)-s);let B=0;const z=Y=>{if(T===null)return;p>0&&(T=Math.min(T,Y)),p<0&&(T=Math.min(Y-R/p,T)),A!==null?B=A:B=Math.round(Y-T)*p;const ft=B-t*(p>=0?1:-1),Fr=p>=0?ft<0:ft>R;B=Math.max(ft,0),F==="finished"&&A===null&&(B=R);let Un=B,Dr=S;if(o){const Ot=B/U;let It=Math.floor(Ot),Ke=Ot%1;!Ke&&Ot>=1&&(Ke=1),Ke===1&&It--,It=Math.min(It,o+1);const Nr=!!(It%2);Nr&&(a==="reverse"?(Ke=1-Ke,s&&(Ke-=s/U)):a==="mirror"&&(Dr=N));let Hn=Wt(0,1,Ke);B>R&&(Hn=a==="reverse"&&Nr?1:0),Un=Hn*U}const Mt=Fr?{done:!1,value:n[0]}:Dr.next(Un);C&&(Mt.value=C(Mt.value));let{done:rr}=Mt;!Fr&&J!==null&&(rr=p>=0?B>=R:B<=0);const zn=A===null&&(F==="finished"||F==="running"&&rr);return c&&c(Mt.value),zn&&We(),Mt},re=()=>{y&&y.stop(),y=void 0},de=()=>{F="idle",re(),m(),x(),T=K=null},We=()=>{F="finished",d&&d(),re(),m()},dt=()=>{if(h)return;y||(y=r(z));const Y=y.now();l&&l(),A!==null?T=Y-A:(!T||F==="finished")&&(T=Y),F==="finished"&&x(),K=T,A=null,F="running",y.start()};e&&dt();const Vt={then(Y,ft){return b.then(Y,ft)},get time(){return rt(B)},set time(Y){Y=xt(Y),B=Y,A!==null||!y||p===0?A=Y:T=y.now()-Y/p},get duration(){const Y=S.calculatedDuration===null?Nc(S):S.calculatedDuration;return rt(Y)},get speed(){return p},set speed(Y){Y===p||!y||(p=Y,Vt.time=rt(B))},get state(){return F},play:dt,pause:()=>{F="paused",A=B},stop:()=>{h=!0,F!=="idle"&&(F="idle",u&&u(),de())},cancel:()=>{K!==null&&z(K),de()},complete:()=>{F="finished"},sample:Y=>(T=0,z(Y))};return Vt}function up(e){let t;return()=>(t===void 0&&(t=e()),t)}const dp=up(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fp=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),wn=10,hp=2e4,pp=(e,t)=>t.type==="spring"||e==="backgroundColor"||!nc(t.ease);function mp(e,t,{onUpdate:r,onComplete:n,...i}){if(!(dp()&&fp.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(y=>{a=y})};u();let{keyframes:d,duration:c=300,ease:f,times:p}=i;if(pp(t,i)){const y=bn({...i,repeat:0,delay:0});let _={done:!1,value:d[0]};const C=[];let S=0;for(;!_.done&&S<hp;)_=y.sample(S),C.push(_.value),S+=wn;p=void 0,d=C,c=S-wn,f="linear"}const h=Ah(e.owner.current,t,d,{...i,duration:c,ease:f,times:p});i.syncStart&&(h.startTime=yr.isProcessing?yr.timestamp:document.timeline?document.timeline.currentTime:performance.now());const m=()=>h.cancel(),b=()=>{me.update(m),a(),u()};return h.onfinish=()=>{e.set(Ph(d,i)),n&&n(),b()},{then(y,_){return l.then(y,_)},attachTimeline(y){return h.timeline=y,h.onfinish=null,pe},get time(){return rt(h.currentTime||0)},set time(y){h.currentTime=xt(y)},get speed(){return h.playbackRate},set speed(y){h.playbackRate=y},get duration(){return rt(c)},play:()=>{s||(h.play(),hn(m))},pause:()=>h.pause(),stop:()=>{if(s=!0,h.playState==="idle")return;const{currentTime:y}=h;if(y){const _=bn({...i,autoplay:!1});e.setWithVelocity(_.sample(y-wn).value,_.sample(y).value,wn)}b()},complete:()=>h.finish(),cancel:b}}function vp({keyframes:e,delay:t,onUpdate:r,onComplete:n}){const i=()=>(r&&r(e[e.length-1]),n&&n(),{time:0,speed:1,duration:0,play:pe,pause:pe,stop:pe,then:o=>(o(),Promise.resolve()),cancel:pe,complete:pe});return t?bn({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const gp={type:"spring",stiffness:500,damping:25,restSpeed:10},yp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bp={type:"keyframes",duration:.8},wp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_p=(e,{keyframes:t})=>t.length>2?bp:yt.has(e)?e.startsWith("scale")?yp(t[1]):gp:wp,Gi=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Yt.test(t)||t==="0")&&!t.startsWith("url(")),xp=new Set(["brightness","contrast","saturate","opacity"]);function kp(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(ln)||[];if(!n)return e;const i=r.replace(n,"");let o=xp.has(t)?1:0;return n!==r&&(o*=100),t+"("+o+i+")"}const Sp=/([a-z-]*)\(.*?\)/g,Yi={...Yt,getAnimatableNone:e=>{const t=e.match(Sp);return t?t.map(kp).join(" "):e}},Cp={...Da,color:ge,backgroundColor:ge,outlineColor:ge,fill:ge,stroke:ge,borderColor:ge,borderTopColor:ge,borderRightColor:ge,borderBottomColor:ge,borderLeftColor:ge,filter:Yi,WebkitFilter:Yi},Zi=e=>Cp[e];function Lc(e,t){let r=Zi(e);return r!==Yi&&(r=Yt),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Rc=e=>/^0[^.\s]+$/.test(e);function $p(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Rc(e)}function Ap(e,t,r,n){const i=Gi(t,r);let o;Array.isArray(r)?o=[...r]:o=[null,r];const s=n.from!==void 0?n.from:e.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),$p(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const d=l[u];o[d]=Lc(t,a)}return o}function Pp({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}function Ep(e,t){return e[t]||e.default||e}const Tp=(e,t,r,n={})=>i=>{const o=Ep(n,e)||{},s=o.delay||n.delay||0;let{elapsed:a=0}=n;a=a-xt(s);const l=Ap(t,e,r,o),u=l[0],d=l[l.length-1],c=Gi(e,u),f=Gi(e,d);br(c===f,`You are trying to animate ${e} from "${u}" to "${d}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${d} via the \`style\` property.`);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Pp(o)||(p={...p,..._p(e,p)}),p.duration&&(p.duration=xt(p.duration)),p.repeatDelay&&(p.repeatDelay=xt(p.repeatDelay)),!c||!f||$h.current||o.type===!1)return vp(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const h=mp(t,e,p);if(h)return h}return bn(p)};function _n(e){return!!(Se(e)&&e.add)}const Bc=e=>/^\-?\d*\.?\d+$/.test(e);function Vp(e,t){e.indexOf(t)===-1&&e.push(t)}function Mp(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class jc{constructor(){this.subscriptions=[]}add(t){return Vp(this.subscriptions,t),()=>Mp(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Uc=new Set;function Xi(e,t,r){e||Uc.has(t)||(console.warn(t),r&&console.warn(r),Uc.add(t))}const Op=e=>!isNaN(parseFloat(e));class Ip{constructor(t,r={}){this.version="10.16.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:o,timestamp:s}=yr;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,me.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>me.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Op(this.current),this.owner=r.owner}onChange(t){return process.env.NODE_ENV!=="production"&&Xi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new jc);const n=this.events[t].add(r);return t==="change"?()=>{n(),me.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Tc(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xr(e,t){return new Ip(e,t)}const zc=e=>t=>t.test(e),Hc=[bt,D,Kt,tt,Lf,Nf,{test:e=>e==="auto",parse:e=>e}],kr=e=>Hc.find(zc(e)),Fp=[...Hc,ge,Yt],Dp=e=>Fp.find(zc(e));function Np(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,xr(r))}function Lp(e,t){const r=mn(e,t);let{transitionEnd:n={},transition:i={},...o}=r?e.makeTargetAnimatable(r,!1):{};o={...o,...n};for(const s in o){const a=Qf(o[s]);Np(e,s,a)}}function Rp(e,t,r){var n,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=t[l];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(n=r[l])!==null&&n!==void 0?n:e.readValue(l))!==null&&i!==void 0?i:t[l]),d!=null&&(typeof d=="string"&&(Bc(d)||Rc(d))?d=parseFloat(d):!Dp(d)&&Yt.test(u)&&(d=Lc(l,u)),e.addValue(l,xr(d,{owner:e})),r[l]===void 0&&(r[l]=d),d!==null&&e.setBaseTarget(l,d))}}function Bp(e,t){return t?(t[e]||t.default||t).from:void 0}function jp(e,t,r){const n={};for(const i in e){const o=Bp(i,t);if(o!==void 0)n[i]=o;else{const s=r.getValue(i);s&&(n[i]=s.get())}}return n}function Up({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function Wc(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");n&&(o=n);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c),p=a[c];if(!f||p===void 0||d&&Up(d,c))continue;const h={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const b=e.getProps()[Ch];b&&(h.elapsed=window.HandoffAppearAnimations(b,c,f,me),h.syncStart=!0)}f.start(Tp(c,f,p,e.shouldReduceMotion&&yt.has(c)?{type:!1}:h));const m=f.animation;_n(l)&&(l.add(c),m.then(()=>l.remove(c))),u.push(m)}return s&&Promise.all(u).then(()=>{s&&Lp(e,s)}),u}function Qi(e,t,r={}){const n=mn(e,t,r.custom);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const o=n?()=>Promise.all(Wc(e,n,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:c}=i;return zp(e,t,u+l,d,c,r)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(r.delay)])}function zp(e,t,r=0,n=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*n,l=i===1?(u=0)=>u*n:(u=0)=>a-u*n;return Array.from(e.variantChildren).sort(Hp).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Qi(u,t,{...o,delay:r+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function Hp(e,t){return e.sortNodePosition(t)}function Wp(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(o=>Qi(e,o,r));n=Promise.all(i)}else if(typeof t=="string")n=Qi(e,t,r);else{const i=typeof t=="function"?mn(e,t,r.custom):t;n=Promise.all(Wc(e,i,r))}return n.then(()=>e.notify("AnimationComplete",t))}const Kp=[...Si].reverse(),qp=Si.length;function Gp(e){return t=>Promise.all(t.map(({animation:r,options:n})=>Wp(e,r,n)))}function Yp(e){let t=Gp(e);const r=Xp();let n=!0;const i=(l,u)=>{const d=mn(e,u);if(d){const{transition:c,transitionEnd:f,...p}=d;l={...l,...p,...f}}return l};function o(l){t=l(e)}function s(l,u){const d=e.getProps(),c=e.getVariantContext(!0)||{},f=[],p=new Set;let h={},m=1/0;for(let x=0;x<qp;x++){const y=Kp[x],_=r[y],C=d[y]!==void 0?d[y]:c[y],S=dr(C),N=y===u?_.isActive:null;N===!1&&(m=x);let F=C===c[y]&&C!==d[y]&&S;if(F&&n&&e.manuallyAnimateOnMount&&(F=!1),_.protectedKeys={...h},!_.isActive&&N===null||!C&&!_.prevProp||sn(C)||typeof C=="boolean")continue;const A=Zp(_.prevProp,C);let T=A||y===u&&_.isActive&&!F&&S||x>m&&S;const K=Array.isArray(C)?C:[C];let J=K.reduce(i,{});N===!1&&(J={});const{prevResolvedValues:U={}}=_,R={...U,...J},B=z=>{T=!0,p.delete(z),_.needsAnimating[z]=!0};for(const z in R){const re=J[z],de=U[z];h.hasOwnProperty(z)||(re!==de?dn(re)&&dn(de)?!tc(re,de)||A?B(z):_.protectedKeys[z]=!0:re!==void 0?B(z):p.add(z):re!==void 0&&p.has(z)?B(z):_.protectedKeys[z]=!0)}_.prevProp=C,_.prevResolvedValues=J,_.isActive&&(h={...h,...J}),n&&e.blockInitialAnimation&&(T=!1),T&&!F&&f.push(...K.map(z=>({animation:z,options:{type:y,...l}})))}if(p.size){const x={};p.forEach(y=>{const _=e.getBaseTarget(y);_!==void 0&&(x[y]=_)}),f.push({animation:x})}let b=!!f.length;return n&&d.initial===!1&&!e.manuallyAnimateOnMount&&(b=!1),n=!1,b?t(f):Promise.resolve()}function a(l,u,d){var c;if(r[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(p=>{var h;return(h=p.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),r[l].isActive=u;const f=s(d,l);for(const p in r)r[p].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>r}}function Zp(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!tc(t,e):!1}function St(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Xp(){return{animate:St(!0),whileInView:St(),whileHover:St(),whileTap:St(),whileDrag:St(),whileFocus:St(),exit:St()}}class Qp extends qt{constructor(t){super(t),t.animationState||(t.animationState=Yp(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),sn(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let Jp=0;class em extends qt{constructor(){super(...arguments),this.id=Jp++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:n??this.node.getProps().custom});r&&!t&&o.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const tm={animation:{Feature:Qp},exit:{Feature:em}},Kc=()=>({min:0,max:0}),qc=()=>({x:Kc(),y:Kc()});function rm({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function nm(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function im(e,t){return rm(nm(e.getBoundingClientRect(),t))}const om=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function sm(e){const t=om.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]}const am=4;function Ji(e,t,r=1){Fe(r<=am,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[n,i]=sm(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const s=o.trim();return Bc(s)?parseFloat(s):s}else return Pi(i)?Ji(i,t,r+1):i}function cm(e,{...t},r){const n=e.current;if(!(n instanceof Element))return{target:t,transitionEnd:r};r&&(r={...r}),e.values.forEach(i=>{const o=i.get();if(!Pi(o))return;const s=Ji(o,n);s&&i.set(s)});for(const i in t){const o=t[i];if(!Pi(o))continue;const s=Ji(o,n);s&&(t[i]=s,r||(r={}),r[i]===void 0&&(r[i]=o))}return{target:t,transitionEnd:r}}const lm=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Gc=e=>lm.has(e),um=e=>Object.keys(e).some(Gc),xn=e=>e===bt||e===D,Yc=(e,t)=>parseFloat(e.split(", ")[t]),Zc=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return Yc(i[1],t);{const o=n.match(/^matrix\((.+)\)$/);return o?Yc(o[1],e):0}},dm=new Set(["x","y","z"]),fm=hr.filter(e=>!dm.has(e));function hm(e){const t=[];return fm.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Zt={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Zc(4,13),y:Zc(5,14)};Zt.translateX=Zt.x,Zt.translateY=Zt.y;const pm=(e,t,r)=>{const n=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),r.forEach(u=>{a[u]=Zt[u](n,o)}),t.render();const l=t.measureViewportBox();return r.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=Zt[u](l,o)}),e},mm=(e,t,r={},n={})=>{t={...t},n={...n};const i=Object.keys(t).filter(Gc);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=r[l],c=kr(d);const f=t[l];let p;if(dn(f)){const h=f.length,m=f[0]===null?1:0;d=f[m],c=kr(d);for(let b=m;b<h&&f[b]!==null;b++)p?Fe(kr(f[b])===p,"All keyframes must be of the same type"):(p=kr(f[b]),Fe(p===c||xn(c)&&xn(p),"Keyframes must be of the same dimension as the current value"))}else p=kr(f);if(c!==p)if(xn(c)&&xn(p)){const h=u.get();typeof h=="string"&&u.set(parseFloat(h)),typeof f=="string"?t[l]=parseFloat(f):Array.isArray(f)&&p===D&&(t[l]=f.map(parseFloat))}else c!=null&&c.transform&&(p!=null&&p.transform)&&(d===0||f===0)?d===0?u.set(p.transform(d)):t[l]=c.transform(f):(s||(o=hm(e),s=!0),a.push(l),n[l]=n[l]!==void 0?n[l]:t[l],u.jump(f))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=pm(t,e,a);return o.length&&o.forEach(([d,c])=>{e.getValue(d).set(c)}),e.render(),on&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:n}}else return{target:t,transitionEnd:n}};function vm(e,t,r,n){return um(t)?mm(e,t,r,n):{target:t,transitionEnd:n}}const gm=(e,t,r,n)=>{const i=cm(e,t,n);return t=i.target,n=i.transitionEnd,vm(e,t,r,n)},eo={current:null},Xc={current:!1};function ym(){if(Xc.current=!0,!!on)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>eo.current=e.matches;e.addListener(t),t()}else eo.current=!1}function bm(e,t,r){const{willChange:n}=t;for(const i in t){const o=t[i],s=r[i];if(Se(o))e.addValue(i,o),_n(n)&&n.add(i),process.env.NODE_ENV==="development"&&Xi(o.version==="10.16.5",`Attempting to mix Framer Motion versions ${o.version} with 10.16.5 may not work as expected.`);else if(Se(s))e.addValue(i,xr(o,{owner:e})),_n(n)&&n.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,xr(a!==void 0?a:o,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const Qc=new WeakMap,Jc=Object.keys(fr),wm=Jc.length,el=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],_m=Ci.length;class xm{constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>me.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=r.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=an(r),this.isVariantNode=$a(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(r,{});for(const c in d){const f=d[c];a[c]!==void 0&&Se(f)&&(f.set(a[c],!1),_n(u)&&u.add(c))}}scrapeMotionValuesFromProps(t,r){return{}}mount(t){this.current=t,Qc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),Xc.current||ym(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:eo.current,process.env.NODE_ENV!=="production"&&Xi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Qc.delete(this.current),this.projection&&this.projection.unmount(),hn(this.notifyUpdate),hn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,r){const n=yt.has(t),i=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&me.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...r},n,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&n){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";r.ignoreStrict?br(!1,l):Fe(!1,l)}for(let l=0;l<wm;l++){const u=Jc[l],{isEnabled:d,Feature:c,ProjectionNode:f,MeasureLayout:p}=fr[u];f&&(s=f),d(r)&&(!this.features[u]&&c&&(this.features[u]=new c(this)),p&&(a=p))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:d,dragConstraints:c,layoutScroll:f,layoutRoot:p}=r;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!d||c&&Ca(c),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qc()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}makeTargetAnimatable(t,r=!0){return this.makeTargetAnimatableFromInstance(t,this.props,r)}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<el.length;n++){const i=el[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=bm(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const n=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(n.initial=this.props.initial),n}const r={};for(let n=0;n<_m;n++){const i=Ci[n],o=this.props[i];(dr(o)||o===!1)&&(r[i]=o)}return r}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){r!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,r)),this.values.set(t,r),this.latestValues[t]=r.get()}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=xr(r,{owner:this}),this.addValue(t,n)),n}readValue(t){var r;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=Fi(this.props,n))===null||r===void 0?void 0:r[t]:void 0;if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Se(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new jc),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class tl extends xm{sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:r,...n},{transformValues:i},o){let s=jp(n,t||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),s&&(s=i(s))),o){Rp(this,n,s);const a=gm(this,n,s,r);r=a.transitionEnd,n=a.target}return{transition:t,transitionEnd:r,...n}}}function km(e){return window.getComputedStyle(e)}class Sm extends tl{readValueFromInstance(t,r){if(yt.has(r)){const n=Zi(r);return n&&n.default||0}else{const n=km(t),i=(Ma(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return im(t,r)}build(t,r,n,i){Ei(t,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,r){return Ii(t,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Se(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(t,r,n,i){ja(t,r,n,i)}}class Cm extends tl{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(yt.has(r)){const n=Zi(r);return n&&n.default||0}return r=Ua.has(r)?r:Oi(r),t.getAttribute(r)}measureInstanceViewportBox(){return qc()}scrapeMotionValuesFromProps(t,r){return Ha(t,r)}build(t,r,n,i){Vi(t,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,r,n,i){za(t,r,n,i)}mount(t){this.isSVGTag=Mi(t.tagName),super.mount(t)}}const $m=(e,t)=>Ai(e)?new Cm(t,{enableHardwareAcceleration:!1}):new Sm(t,{enableHardwareAcceleration:!0}),kn=Pf(ah);function rl(){const e=j(!1);return xi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Am(){const e=rl(),[t,r]=ie(0),n=ae(()=>{e.current&&r(t+1)},[t]);return[ae(()=>me.postRender(n),[n]),t]}class Pm extends ke{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Em({children:e,isPresent:t}){const r=Hr(),n=j(null),i=j({width:0,height:0,top:0,left:0});return Gr(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(t||!n.current||!o||!s)return;n.current.dataset.motionPopId=r;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
42
|
-
|
|
43
|
-
position: absolute !important;
|
|
44
|
-
width: ${o}px !important;
|
|
45
|
-
height: ${s}px !important;
|
|
46
|
-
top: ${a}px !important;
|
|
47
|
-
left: ${l}px !important;
|
|
48
|
-
}
|
|
49
|
-
`),()=>{document.head.removeChild(u)}},[t]),O(Pm,{isPresent:t,childRef:n,sizeRef:i},Je(e,{ref:n}))}const to=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Wa(Tm),l=Hr(),u=se(()=>({id:l,initial:t,isPresent:r,custom:i,onExitComplete:d=>{a.set(d,!0);for(const c of a.values())if(!c)return;n&&n()},register:d=>(a.set(d,!1),()=>a.delete(d))}),o?void 0:[r]);return se(()=>{a.forEach((d,c)=>a.set(c,!1))},[r]),W(()=>{!r&&!a.size&&n&&n()},[r]),s==="popLayout"&&(e=O(Em,{isPresent:r},e)),O(_i.Provider,{value:u},e)};function Tm(){return new Map}function Vm(e){return W(()=>()=>e(),[])}const Ct=e=>e.key||"";function Mm(e,t){e.forEach(r=>{const n=Ct(r);t.set(n,r)})}function Om(e){const t=[];return Oe.forEach(e,r=>{Qe(r)&&t.push(r)}),t}const nl=({children:e,custom:t,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Fe(!i,"Replace exitBeforeEnter with mode='wait'");const a=fe(Ea).forceRender||Am()[0],l=rl(),u=Om(e);let d=u;const c=j(new Map).current,f=j(d),p=j(new Map).current,h=j(!0);if(xi(()=>{h.current=!1,Mm(u,p),f.current=d}),Vm(()=>{h.current=!0,p.clear(),c.clear()}),h.current)return O(Q,null,d.map(y=>O(to,{key:Ct(y),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:o,mode:s},y)));d=[...d];const m=f.current.map(Ct),b=u.map(Ct),x=m.length;for(let y=0;y<x;y++){const _=m[y];b.indexOf(_)===-1&&!c.has(_)&&c.set(_,void 0)}return s==="wait"&&c.size&&(d=[]),c.forEach((y,_)=>{if(b.indexOf(_)!==-1)return;const C=p.get(_);if(!C)return;const S=m.indexOf(_);let N=y;if(!N){const F=()=>{c.delete(_);const A=Array.from(p.keys()).filter(T=>!b.includes(T));if(A.forEach(T=>p.delete(T)),f.current=u.filter(T=>{const K=Ct(T);return K===_||A.includes(K)}),!c.size){if(l.current===!1)return;a(),n&&n()}};N=O(to,{key:Ct(C),isPresent:!1,onExitComplete:F,custom:t,presenceAffectsLayout:o,mode:s},C),c.set(_,N)}d.splice(S,0,N)}),d=d.map(y=>{const _=y.key;return c.has(_)?y:O(to,{key:Ct(y),isPresent:!0,presenceAffectsLayout:o,mode:s},y)}),process.env.NODE_ENV!=="production"&&s==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),O(Q,null,c.size?d:d.map(y=>Je(y)))};function Im({children:e,features:t,strict:r=!1}){const[,n]=ie(!ro(t)),i=j(void 0);if(!ro(t)){const{renderer:o,...s}=t;i.current=o,$i(s)}return W(()=>{ro(t)&&t().then(({renderer:o,...s})=>{$i(s),i.current=o,n(!0)})},[]),O(ki.Provider,{value:{renderer:i.current,strict:r}},e)}function ro(e){return typeof e=="function"}const Fm={renderer:$m,...tm,...xh},we=Symbol.for("@ts-pattern/matcher"),il=Symbol.for("@ts-pattern/isVariadic"),Sn="@ts-pattern/anonymous-select-key",no=e=>!!(e&&typeof e=="object"),Cn=e=>e&&!!e[we],ce=(e,t,r)=>{if(Cn(e)){const n=e[we](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(no(e)){if(!no(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(const s of e.keys()){const a=e[s];Cn(a)&&a[il]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const s=t.slice(0,n.length),a=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((u,d)=>ce(u,s[d],r))&&i.every((u,d)=>ce(u,a[d],r))&&(o.length===0||ce(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>ce(s,t[a],r))}return Object.keys(e).every(n=>{const i=e[n];return(n in t||Cn(o=i)&&o[we]().matcherType==="optional")&&ce(i,t[n],r);var o})}return Object.is(t,e)},Ce=e=>{var t,r,n;return no(e)?Cn(e)?(t=(r=(n=e[we]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Sr(e,Ce):Sr(Object.values(e),Ce):[]},Sr=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Dm(...e){if(e.length===1){const[t]=e;return r=>ce(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ce(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ve(e){return Object.assign(e,{optional:()=>oo(e),and:t=>X(e,t),or:t=>ol(e,t),select:t=>t===void 0?Cr(e):Cr(t,e)})}function io(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[il]:!0})}}))(e),{optional:()=>io(oo(e)),select:t=>io(t===void 0?Cr(e):Cr(t,e))})}function oo(e){return ve({[we]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return t===void 0?(Ce(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:ce(e,t,n),selections:r}},getSelectionKeys:()=>Ce(e),matcherType:"optional"})})}const Nm=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Lm=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function X(...e){return ve({[we]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return{matched:e.every(i=>ce(i,t,n)),selections:r}},getSelectionKeys:()=>Sr(e,Ce),matcherType:"and"})})}function ol(...e){return ve({[we]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return Sr(e,Ce).forEach(i=>n(i,void 0)),{matched:e.some(i=>ce(i,t,n)),selections:r}},getSelectionKeys:()=>Sr(e,Ce),matcherType:"or"})})}function H(e){return{[we]:()=>({match:t=>({matched:!!e(t)})})}}function Cr(...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 ve({[we]:()=>({match:n=>{let i={[t??Sn]:n};return{matched:r===void 0||ce(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??Sn].concat(r===void 0?[]:Ce(r))})})}function De(e){return typeof e=="number"}function $t(e){return typeof e=="string"}function nt(e){return typeof e=="bigint"}const sl=ve(H(function(e){return!0})),Rm=sl,At=e=>Object.assign(ve(e),{startsWith:t=>{return At(X(e,(r=t,H(n=>$t(n)&&n.startsWith(r)))));var r},endsWith:t=>{return At(X(e,(r=t,H(n=>$t(n)&&n.endsWith(r)))));var r},minLength:t=>At(X(e,(r=>H(n=>$t(n)&&n.length>=r))(t))),maxLength:t=>At(X(e,(r=>H(n=>$t(n)&&n.length<=r))(t))),includes:t=>{return At(X(e,(r=t,H(n=>$t(n)&&n.includes(r)))));var r},regex:t=>{return At(X(e,(r=t,H(n=>$t(n)&&!!n.match(r)))));var r}}),Bm=At(H($t)),Ne=e=>Object.assign(ve(e),{between:(t,r)=>Ne(X(e,((n,i)=>H(o=>De(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ne(X(e,(r=>H(n=>De(n)&&n<r))(t))),gt:t=>Ne(X(e,(r=>H(n=>De(n)&&n>r))(t))),lte:t=>Ne(X(e,(r=>H(n=>De(n)&&n<=r))(t))),gte:t=>Ne(X(e,(r=>H(n=>De(n)&&n>=r))(t))),int:()=>Ne(X(e,H(t=>De(t)&&Number.isInteger(t)))),finite:()=>Ne(X(e,H(t=>De(t)&&Number.isFinite(t)))),positive:()=>Ne(X(e,H(t=>De(t)&&t>0))),negative:()=>Ne(X(e,H(t=>De(t)&&t<0)))}),jm=Ne(H(De)),it=e=>Object.assign(ve(e),{between:(t,r)=>it(X(e,((n,i)=>H(o=>nt(o)&&n<=o&&i>=o))(t,r))),lt:t=>it(X(e,(r=>H(n=>nt(n)&&n<r))(t))),gt:t=>it(X(e,(r=>H(n=>nt(n)&&n>r))(t))),lte:t=>it(X(e,(r=>H(n=>nt(n)&&n<=r))(t))),gte:t=>it(X(e,(r=>H(n=>nt(n)&&n>=r))(t))),positive:()=>it(X(e,H(t=>nt(t)&&t>0))),negative:()=>it(X(e,H(t=>nt(t)&&t<0)))}),Um=it(H(nt)),zm=ve(H(function(e){return typeof e=="boolean"})),Hm=ve(H(function(e){return typeof e=="symbol"})),Wm=ve(H(function(e){return e==null}));var _e={__proto__:null,matcher:we,optional:oo,array:function(...e){return io({[we]:()=>({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 Ce(r).forEach(o=>{n[o]=[]}),{matched:!0,selections:n};const i=(o,s)=>{n[o]=(n[o]||[]).concat([s])};return{matched:t.every(o=>ce(r,o,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ce(e[0])})})},set:function(...e){return ve({[we]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(o,s)=>{r[o]=(r[o]||[]).concat([s])},i=e[0];return{matched:Nm(t,o=>ce(i,o,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Ce(e[0])})})},map:function(...e){return ve({[we]:()=>({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 i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,s]=e;return{matched:Lm(t,(a,l)=>{const u=ce(o,l,n),d=ce(s,a,n);return u&&d}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...Ce(e[0]),...Ce(e[1])]})})},intersection:X,union:ol,not:function(e){return ve({[we]:()=>({match:t=>({matched:!ce(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:H,select:Cr,any:sl,_:Rm,string:Bm,number:jm,bigint:Um,boolean:zm,symbol:Hm,nullish:Wm,instanceOf:function(e){return ve(H(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ve(H(Dm(e)))}};const so={matched:!1,value:void 0};function Ue(e){return new $n(e,so)}class $n{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={};const a=(u,d)=>{o=!0,s[u]=d},l=!n.some(u=>ce(u,this.input,a))||i&&!i(this.input)?so:{matched:!0,value:r(o?Sn in s?s[Sn]:s:this.input,this.input)};return new $n(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new $n(this.input,n?{matched:!0,value:r(this.input,this.input)}:so)}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 al="isdk",ao=44,Km={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"};function An(){throw new Error("Cycle detected")}var qm=Symbol.for("preact-signals");function co(){if(Xt>1)Xt--;else{for(var e,t=!1;$r!==void 0;){var r=$r;for($r=void 0,lo++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ll(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(lo=0,Xt--,t)throw e}}var ee=void 0,$r=void 0,Xt=0,lo=0,Pn=0;function cl(e){if(ee!==void 0){var t=e.n;if(t===void 0||t.t!==ee)return t={i:0,S:e,p:ee.s,n:void 0,t:ee,e:void 0,x:void 0,r:t},ee.s!==void 0&&(ee.s.n=t),ee.s=t,e.n=t,32&ee.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=ee.s,t.n=void 0,ee.s.n=t,ee.s=t),t}}function le(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}le.prototype.brand=qm,le.prototype.h=function(){return!0},le.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)},le.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)}},le.prototype.subscribe=function(e){var t=this;return fo(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},le.prototype.valueOf=function(){return this.value},le.prototype.toString=function(){return this.value+""},le.prototype.toJSON=function(){return this.value},le.prototype.peek=function(){return this.v},Object.defineProperty(le.prototype,"value",{get:function(){var e=cl(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(ee instanceof st&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){lo>100&&An(),this.v=e,this.i++,Pn++,Xt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{co()}}}});function ot(e){return new le(e)}function ll(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 ul(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 dl(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 st(e){le.call(this,void 0),this.x=e,this.s=void 0,this.g=Pn-1,this.f=4}(st.prototype=new le).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Pn))return!0;if(this.g=Pn,this.f|=1,this.i>0&&!ll(this))return this.f&=-2,!0;var e=ee;try{ul(this),ee=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 ee=e,dl(this),this.f&=-2,!0},st.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)}le.prototype.S.call(this,e)},st.prototype.U=function(e){if(this.t!==void 0&&(le.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)}},st.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},st.prototype.peek=function(){if(this.h()||An(),16&this.f)throw this.v;return this.v},Object.defineProperty(st.prototype,"value",{get:function(){1&this.f&&An();var e=cl(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Gm(e){return new st(e)}function fl(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Xt++;var r=ee;ee=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,uo(e),n}finally{ee=r,co()}}}function uo(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,fl(e)}function Ym(e){if(ee!==this)throw new Error("Out-of-order effect");dl(this),ee=e,this.f&=-2,8&this.f&&uo(this),co()}function Ar(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ar.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()}},Ar.prototype.S=function(){1&this.f&&An(),this.f|=1,this.f&=-9,fl(this),ul(this),Xt++;var e=ee;return ee=this,Ym.bind(this,e)},Ar.prototype.N=function(){2&this.f||(this.f|=2,this.o=$r,$r=this)},Ar.prototype.d=function(){this.f|=8,1&this.f||uo(this)};function fo(e){var t=new Ar(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var ho;function Qt(e,t){E[e]=t.bind(null,E[e]||function(){})}function En(e){ho&&ho(),ho=e&&e.S()}function hl(e){var t=this,r=e.data,n=Xm(r);n.value=r;var i=se(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s;!zo(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},Gm(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}hl.displayName="_st",Object.defineProperties(le.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:hl},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Qt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof le&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)}),Qt("__r",function(e,t){En();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return fo(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),En(r),e(t)}),Qt("__e",function(e,t,r,n){En(),e(t,r,n)}),Qt("diffed",function(e,t){En();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in n)&&(a.d(),o[s]=void 0)}else r.U=o={};for(var l in n){var u=o[l],d=n[l];u===void 0?(u=Zm(r,l,d,i),o[l]=u):u.o(d,i)}}}e(t)});function Zm(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=ot(r);return{o:function(s,a){o.value=s,n=a},d:fo(function(){var s=o.value.value;n[t]!==s&&(n[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}Qt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),Qt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ke.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function Xm(e){return se(function(){return ot(e)},[])}const po=(e,t)=>t.some(r=>e instanceof r);let pl,ml;function Qm(){return pl||(pl=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Jm(){return ml||(ml=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const mo=new WeakMap,vo=new WeakMap,Tn=new WeakMap;function ev(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{r(Pt(e.result)),i()},s=()=>{n(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",s)});return Tn.set(t,e),t}function tv(e){if(mo.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{r(),i()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});mo.set(e,t)}let go={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return mo.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Pt(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 vl(e){go=e(go)}function rv(e){return Jm().includes(e)?function(...t){return e.apply(yo(this),t),Pt(this.request)}:function(...t){return Pt(e.apply(yo(this),t))}}function nv(e){return typeof e=="function"?rv(e):(e instanceof IDBTransaction&&tv(e),po(e,Qm())?new Proxy(e,go):e)}function Pt(e){if(e instanceof IDBRequest)return ev(e);if(vo.has(e))return vo.get(e);const t=nv(e);return t!==e&&(vo.set(e,t),Tn.set(t,e)),t}const yo=e=>Tn.get(e);function iv(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Pt(s);return n&&s.addEventListener("upgradeneeded",l=>{n(Pt(s.result),l.oldVersion,l.newVersion,Pt(s.transaction),l)}),r&&s.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const ov=["get","getKey","getAll","getAllKeys","count"],sv=["put","add","delete","clear"],bo=new Map;function gl(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(bo.get(t))return bo.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=sv.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||ov.includes(r)))return;const o=async function(s,...a){const l=this.transaction(s,i?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(a.shift())),(await Promise.all([u[r](...a),i&&l.done]))[0]};return bo.set(t,o),o}vl(e=>({...e,get:(t,r,n)=>gl(t,r)||e.get(t,r,n),has:(t,r)=>!!gl(t,r)||e.has(t,r)}));const av=["continue","continuePrimaryKey","advance"],yl={},wo=new WeakMap,bl=new WeakMap,cv={get(e,t){if(!av.includes(t))return e[t];let r=yl[t];return r||(r=yl[t]=function(...n){wo.set(this,bl.get(this)[t](...n))}),r}};async function*lv(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,cv);for(bl.set(r,t),Tn.set(r,yo(t));t;)yield r,t=await(wo.get(r)||t.continue()),wo.delete(r)}function wl(e,t){return t===Symbol.asyncIterator&&po(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&po(e,[IDBIndex,IDBObjectStore])}vl(e=>({...e,get(t,r,n){return wl(t,r)?lv:e.get(t,r,n)},has(t,r){return wl(t,r)||e.has(t,r)}}));const Pr=e=>Ue(e).with(_e.number.lte(1e3),()=>`${Math.round(e)}KB`).with(_e.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),_l=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},uv=e=>Object.entries(e).reduce((r,[n,i])=>(r[n]=i.value,r),{}),_o=e=>t=>t?t.type===e:!1;class Er extends Error{constructor(){super("Aborted")}}function dv(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const xl=typeof window>"u"?void 0:iv("inploi-chatbot",2,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Tr={getStateData:async(e,t)=>{var n;const r=kl({...e,flowKeys:t});return(n=await xl)==null?void 0:n.get("state",r)},setStateData:dv(async e=>{var r;const t=kl(e);return(r=await xl)==null?void 0:r.put("state",e.data,t)},1e3)},Vn=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(u=>u.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const o=t.type==="if-block"?t.branchId:void 0,s=e.find(u=>u.id===o),a=t.type.includes("question")?1:0;if(s){const u=a+Math.max(Vn(e,i,r,n+a).remainingSteps,Vn(e,s,r,n+a).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const l=a+Vn(e,i,r,n+a).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},fv=e=>{const t={},r=e.find(n=>n.isHead);return r&&Vn(e,r,(n,i)=>{t[n]=i}),t},kl=e=>[...e.flowKeys,e.id,e.version].join("/"),at=ot({state:"idle"}),Vr=e=>{const{state:t,flow:r}=at.value;if(t!=="loaded")return;Xe(r,"No flow to update");const n=e(r.data);r.data=n,at.value={state:t,flow:r},Tr.setStateData(r)},L={current$:at,viewState$:ot("maximised"),inputHeight$:ot(53),startFlow:async({flow:e,context:t,flowKeys:r,title:n})=>{const o={data:await Tr.getStateData(e,r)??Sl(),startedAt:new Date,nodeIdToProgress:fv(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,context:t,title:n};at.value={state:"loaded",flow:o},Tr.setStateData(o)},cancelCurrentFlow:()=>{at.value={state:"idle"}},markAsFinished:()=>Vr(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Vr(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=at.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Sl();at.value={state:e,flow:{...t,data:r,startedAt:new Date}},Tr.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Vr(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=at.value;Xe(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,Tr.setStateData(r)},setSubmission:(e,t)=>Vr(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Vr(t=>({...t,currentInput:e??null}))},hv=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Sl=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:hv()});var pv=0;function g(e,t,r,n,i,o){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:--pv,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return E.vnode&&E.vnode(u),u}const mv=({message:e})=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:[g("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:[g("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"}),g("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"}),g("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),g("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),g("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),g("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),g("path",{d:"M38 56h19"})]}),g("div",{class:"flex flex-col gap-2 text-center",children:[g("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&g("p",{class:"text-neutral-9 text-sm",children:e})]})]}),vv=e=>g("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[g("title",{children:"Loading"}),g("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)}}"}),g("g",{id:"s1",transform:"translate(12,0)",children:g("g",{id:"s2",transform:"scale(0,0)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s3",transform:"translate(12,12)",children:g("g",{id:"s4",transform:"scale(1,1)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s5",transform:"translate(12,0)",children:g("g",{id:"s6",transform:"scale(0,0)",children:g("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"})})}),g("g",{id:"s7",transform:"translate(12,0)",children:g("g",{id:"s8",transform:"scale(0,0)",children:g("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"})})})]}),Cl=()=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:g(vv,{class:"text-neutral-6 h-8 w-8"})});function $l(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=$l(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ct(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=$l(e))&&(n&&(n+=" "),n+=t);return n}const gv=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)}%`},Mn=({class:e,children:t,...r})=>g("button",{class:ct("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:g("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})}),yv=()=>{if(L.current$.value.state!=="loaded")return null;const e=L.current$.value.flow.nodeIdToProgress,t=L.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 g("div",{style:{width:gv(n)},class:"bg-accent-9 h-[2px] transition-all duration-1000"})},bv=({children:e})=>{const t=L.viewState$;return g(Q,{children:g("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:[g("div",{class:"flex h-[var(--header-height)] gap-2",children:[g("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),g("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:g("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),g("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?g(Q,{children:[g(Mn,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:g("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),g(Mn,{"aria-label":"Close application",onClick:L.cancelCurrentFlow,children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):g(Q,{children:[L.current$.value.state==="loaded"&&g(Mn,{"aria-label":"Restart",onClick:()=>{L.restart()},children:[g("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"}),g("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),g(Mn,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),g(yv,{})]})})},wv=ni(()=>Promise.resolve().then(()=>ay).then(e=>e.ChatbotBody)),_v=({children:e})=>g(Im,{features:Fm,children:e}),xv={closed:{y:"calc(100% + 1rem)",height:ao},maximised:{y:0,height:"75vh"},minimised:{y:0,height:ao}},kv=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:i,error:o}=L.current$.value,s=L.viewState$.value,a=n!=="idle"&&s==="maximised",l=j(null);return g(_v,{children:g(gf,{open:a,modal:a,children:g(nl,{children:[g(yf,{forceMount:!0,asChild:!0,children:a&&g(kn.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:"bg-overlay fixed inset-0"})},"bg"),g(bf,{forceMount:!0,asChild:!0,children:g(kn.div,{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",variants:xv,initial:"closed",animate:Ue({state:n,view:s}).with({state:"idle"},()=>"closed").with({state:_e.union("loaded","error","loading")},({view:u})=>u).exhaustive(),exit:"closed",style:{"--header-height":`${ao}px`},class:"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",children:g("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[g(bv,{children:i==null?void 0:i.title}),(()=>{if(s!=="maximised")return null;switch(n){case"idle":return null;case"loading":return g(Cl,{},"loading");case"loaded":return g(Lt,{fallback:g(Cl,{},"loading"),children:g(wv,{analytics:r,apiClient:t,logger:e})});case"error":return g(mv,{message:o});default:Tu(n)}})()]})},"content")})]})})})},xo=Ze({id:ss($e(),String),version:_u(),nodes:ls(cs())}),Sv=Ze({flow:xo}),Cv=Ze({company:Ze({name:$e()}),flow:xo,job:Ze({id:ss($e(),String),title:$e()})}),$v=Ze({flow:xo,title:$e(),flowKeys:ls($e()),context:us($e(),cs())}),Av=`#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 .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .bottom-\\[2px\\]{bottom:2px}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .top-\\[-2px\\]{top:-2px}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#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-\\[2px\\]{height:2px}#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-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-0{--tw-translate-y: 0px;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 .translate-y-8{--tw-translate-y: 2rem;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 .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 .scale-0{--tw-scale-x: 0;--tw-scale-y: 0;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}#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 .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-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-8{border-color:var(--i-color-n-8)}#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-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-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-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-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-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 .opacity-0{opacity:0}#isdk .opacity-100{opacity:1}#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-\\[inset_0px_-6px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\,inset_0px_1px_1px_oklch\\(100_0_0\\/\\.3\\)\\]{--tw-shadow: inset 0px -6px 2px -1px oklch(100 0 0/.45),inset 0px 1px 1px oklch(100 0 0/.3);--tw-shadow-colored: inset 0px -6px 2px -1px var(--tw-shadow-color), inset 0px 1px 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{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));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-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 .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#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 .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 .\\[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 .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#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\\: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\\: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\\:shadow-\\[inset_0px_0px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\,inset_0px_3px_1px_\\.5px_oklch\\(0_0_0\\/\\.08\\)\\]:active{--tw-shadow: inset 0px 0px 2px -1px oklch(100 0 0/.45),inset 0px 3px 1px .5px oklch(0 0 0/.08);--tw-shadow-colored: inset 0px 0px 2px -1px var(--tw-shadow-color), inset 0px 3px 1px .5px 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 .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 .group:active .group-active\\:bottom-0{bottom:0}#isdk .group:active .group-active\\:top-0{top:0}#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}}
|
|
50
|
-
`,Pv=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(al);if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=al,t}});var Ev=["1","2","3","4","5","6","7","8","9","10","11","12"],Tv={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]}},Vv=(e,t=1,r)=>n=>{const[i,o]=Tv[r][n];return"oklch("+i+"% "+o*t+" "+e+")"},ko=e=>{const t=Vv(e.hue,e.chroma,e.mode);return Object.fromEntries(Ev.map(r=>[e.prefix+r,e.transform(t(r))]))},So=e=>e,Mv=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(i=>{const o=n[i];return[`${String(r)}.${i}`,o]}):[[r,n]]});return Object.fromEntries(t)},On=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Co=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(On(e)&&On(r))for(const n in r){const i=r[n];if(On(i)){e[n]||Object.assign(e,{[n]:{}});const o=e[n];On(o)&&Co(o,i)}else Object.assign(e,{[n]:r[n]})}return Co(e,...t)},Ov=e=>{function t(r,n){const i=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return t},Iv=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:i,getToken:o}=n,s=f=>o("reference",f.toString()),a=e({theme:i}),l=t({theme:i,core:s,raw:{core:a}}),u=r({theme:i,core:s,semantic:s,raw:{core:a,semantic:l}}),d=Mv(Co(a,l,u)),c=([f,p],h)=>{const m=[h,f].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(b=>c(b,m)):[[n.getToken("declaration",m),p]]};return{values:d,declarations:Object.fromEntries(Object.entries(d).flatMap(f=>c(f))),ref:f=>o("reference",f.toString())}}})})})});const[$o,Ao,Al]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Fv=Iv().core(({theme:e})=>({color:{black:$o,white:Ao,lowest:e.mode==="light"?Ao:$o,highest:e.mode==="light"?$o:Ao,...ko({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:So}),...ko({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:So}),...ko({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:So})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Al,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const i=(o,s)=>e.core.color[o].replace(")",` / ${s})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":Al,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-9":"color.a-10")}}}),Dv=Ov({prefix:"i-"}),Nv=e=>{const t=Fv.from({theme:e,getToken:Dv}),r=Object.entries(t.declarations).map(([n,i])=>`${n}: ${i};`);return`#isdk {
|
|
41
|
+
`)},Ic=0,mt=[];function Dc(e){var t=V([]),r=V([0,0]),n=V(),i=J(Ic++)[0],o=J(function(){return go()})[0],s=V(e);U(function(){s.current=e},[e]),U(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=ec([e.lockRef.current],(e.shards||[]).map(ko),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=le(function(v,_){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var w=sr(v),k=r.current,P="deltaX"in v?v.deltaX:k[0]-w[0],D="deltaY"in v?v.deltaY:k[1]-w[1],A,H=v.target,K=Math.abs(P)>Math.abs(D)?"h":"v";if("touches"in v&&K==="h"&&H.type==="range")return!1;var N=yo(K,H);if(!N)return!0;if(N?A=K:(A=K==="v"?"h":"v",N=yo(K,H)),!N)return!1;if(!n.current&&"changedTouches"in v&&(P||D)&&(n.current=A),!A)return!0;var F=n.current||A;return Ac(F,_,v,F==="h"?P:D,!0)},[]),l=le(function(v){var _=v;if(!(!mt.length||mt[mt.length-1]!==o)){var w="deltaY"in _?xo(_):sr(_),k=t.current.filter(function(A){return A.name===_.type&&A.target===_.target&&Pc(A.delta,w)})[0];if(k&&k.should){_.cancelable&&_.preventDefault();return}if(!k){var P=(s.current.shards||[]).map(ko).filter(Boolean).filter(function(A){return A.contains(_.target)}),D=P.length>0?a(_,P[0]):!s.current.noIsolation;D&&_.cancelable&&_.preventDefault()}}},[]),u=le(function(v,_,w,k){var P={name:v,delta:_,target:w,should:k};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(D){return D!==P})},1)},[]),h=le(function(v){r.current=sr(v),n.current=void 0},[]),c=le(function(v){u(v.type,xo(v),v.target,a(v,e.lockRef.current))},[]),p=le(function(v){u(v.type,sr(v),v.target,a(v,e.lockRef.current))},[]);U(function(){return mt.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,vt),document.addEventListener("touchmove",l,vt),document.addEventListener("touchstart",h,vt),function(){mt=mt.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,vt),document.removeEventListener("touchmove",l,vt),document.removeEventListener("touchstart",h,vt)}},[]);var b=e.removeScrollBar,m=e.inert;return T(Y,null,m?T(o,{styles:Oc(i)}):null,b?T(wc,{gapMode:"margin"}):null)}const Tc=lc(vo,Dc);var $o=ie(function(e,t){return T(ir,$e({},e,{ref:t,sideCar:Tc}))});$o.classNames=ir.classNames;const Nc=$o;var Fc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gt=new WeakMap,ar=new WeakMap,cr={},tn=0,So=function(e){return e&&(e.host||So(e.parentNode))},Mc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=So(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})},Lc=function(e,t,r,n){var i=Mc(t,Array.isArray(e)?e:[e]);cr[r]||(cr[r]=new WeakMap);var o=cr[r],s=[],a=new Set,l=new Set(i),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};i.forEach(u);var h=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(a.has(p))h(p);else{var b=p.getAttribute(n),m=b!==null&&b!=="false",v=(gt.get(p)||0)+1,_=(o.get(p)||0)+1;gt.set(p,v),o.set(p,_),s.push(p),v===1&&m&&ar.set(p,!0),_===1&&p.setAttribute(r,"true"),m||p.setAttribute(n,"true")}})};return h(t),a.clear(),tn++,function(){s.forEach(function(c){var p=gt.get(c)-1,b=o.get(c)-1;gt.set(c,p),o.set(c,b),p||(ar.has(c)||c.removeAttribute(n),ar.delete(c)),b||c.removeAttribute(r)}),tn--,tn||(gt=new WeakMap,gt=new WeakMap,ar=new WeakMap,cr={})}},Rc=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||Fc(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),Lc(n,i,r,"aria-hidden")):function(){return null}};const Eo="Dialog",[Co,Id]=Ca(Eo),[Vc,bt]=Co(Eo),Bc=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=V(null),l=V(null),[u=!1,h]=Ia({prop:n,defaultProp:i,onChange:o});return T(Vc,{scope:t,triggerRef:a,contentRef:l,contentId:zr(),titleId:zr(),descriptionId:zr(),open:u,onOpenChange:h,onOpenToggle:le(()=>h(c=>!c),[h]),modal:s},r)},jc="DialogPortal",[Dd,Ao]=Co(jc,{forceMount:void 0}),rn="DialogOverlay",Uc=ie((e,t)=>{const r=Ao(rn,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=bt(rn,e.__scopeDialog);return o.modal?T(Zr,{present:n||o.open},T(zc,ce({},i,{ref:t}))):null}),zc=ie((e,t)=>{const{__scopeDialog:r,...n}=e,i=bt(rn,r);return T(Nc,{as:Hr,allowPinchZoom:!0,shards:[i.contentRef]},T(Kr.div,ce({"data-state":Oo(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Dt="DialogContent",Hc=ie((e,t)=>{const r=Ao(Dt,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=bt(Dt,e.__scopeDialog);return T(Zr,{present:n||o.open},o.modal?T(Wc,ce({},i,{ref:t})):T(Kc,ce({},i,{ref:t})))}),Wc=ie((e,t)=>{const r=bt(Dt,e.__scopeDialog),n=V(null),i=It(t,r.contentRef,n);return U(()=>{const o=n.current;if(o)return Rc(o)},[]),T(Po,ce({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ht(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=r.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ht(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ht(e.onFocusOutside,o=>o.preventDefault())}))}),Kc=ie((e,t)=>{const r=bt(Dt,e.__scopeDialog),n=V(!1),i=V(!1);return T(Po,ce({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),Po=ie((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=bt(Dt,r),l=V(null),u=It(t,l);return Ja(),T(Y,null,T(Ha,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o},T(ja,ce({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Oo(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function Oo(e){return e?"open":"closed"}const qc=Bc,Yc=Uc,Gc=Hc;function Io(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=Io(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function je(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Io(e))&&(n&&(n+=" "),n+=t);return n}const Do=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,To=je,nn=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return To(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const h=r==null?void 0:r[u],c=o==null?void 0:o[u];if(h===null)return null;const p=Do(h)||Do(c);return i[u][p]}),a=r&&Object.entries(r).reduce((u,h)=>{let[c,p]=h;return p===void 0||(u[c]=p),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,h)=>{let{class:c,className:p,...b}=h;return Object.entries(b).every(m=>{let[v,_]=m;return Array.isArray(_)?_.includes({...o,...a}[v]):{...o,...a}[v]===_})?[...u,c,p]:u},[]);return To(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},ue=Symbol.for("@ts-pattern/matcher"),No=Symbol.for("@ts-pattern/isVariadic"),lr="@ts-pattern/anonymous-select-key",on=e=>!!(e&&typeof e=="object"),ur=e=>e&&!!e[ue],ee=(e,t,r)=>{if(ur(e)){const n=e[ue](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(on(e)){if(!on(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(const s of e.keys()){const a=e[s];ur(a)&&a[No]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const s=t.slice(0,n.length),a=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((u,h)=>ee(u,s[h],r))&&i.every((u,h)=>ee(u,a[h],r))&&(o.length===0||ee(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>ee(s,t[a],r))}return Object.keys(e).every(n=>{const i=e[n];return(n in t||ur(o=i)&&o[ue]().matcherType==="optional")&&ee(i,t[n],r);var o})}return Object.is(t,e)},pe=e=>{var t,r,n;return on(e)?ur(e)?(t=(r=(n=e[ue]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Tt(e,pe):Tt(Object.values(e),pe):[]},Tt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Zc(...e){if(e.length===1){const[t]=e;return r=>ee(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ee(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ne(e){return Object.assign(e,{optional:()=>an(e),and:t=>W(e,t),or:t=>Fo(e,t),select:t=>t===void 0?Nt(e):Nt(t,e)})}function sn(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[No]:!0})}}))(e),{optional:()=>sn(an(e)),select:t=>sn(t===void 0?Nt(e):Nt(t,e))})}function an(e){return ne({[ue]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return t===void 0?(pe(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:ee(e,t,n),selections:r}},getSelectionKeys:()=>pe(e),matcherType:"optional"})})}const Xc=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Qc=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function W(...e){return ne({[ue]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return{matched:e.every(i=>ee(i,t,n)),selections:r}},getSelectionKeys:()=>Tt(e,pe),matcherType:"and"})})}function Fo(...e){return ne({[ue]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return Tt(e,pe).forEach(i=>n(i,void 0)),{matched:e.some(i=>ee(i,t,n)),selections:r}},getSelectionKeys:()=>Tt(e,pe),matcherType:"or"})})}function L(e){return{[ue]:()=>({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 ne({[ue]:()=>({match:n=>{let i={[t??lr]:n};return{matched:r===void 0||ee(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??lr].concat(r===void 0?[]:pe(r))})})}function Se(e){return typeof e=="number"}function rt(e){return typeof e=="string"}function Ue(e){return typeof e=="bigint"}const Mo=ne(L(function(e){return!0})),Jc=Mo,nt=e=>Object.assign(ne(e),{startsWith:t=>{return nt(W(e,(r=t,L(n=>rt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return nt(W(e,(r=t,L(n=>rt(n)&&n.endsWith(r)))));var r},minLength:t=>nt(W(e,(r=>L(n=>rt(n)&&n.length>=r))(t))),maxLength:t=>nt(W(e,(r=>L(n=>rt(n)&&n.length<=r))(t))),includes:t=>{return nt(W(e,(r=t,L(n=>rt(n)&&n.includes(r)))));var r},regex:t=>{return nt(W(e,(r=t,L(n=>rt(n)&&!!n.match(r)))));var r}}),el=nt(L(rt)),Ee=e=>Object.assign(ne(e),{between:(t,r)=>Ee(W(e,((n,i)=>L(o=>Se(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ee(W(e,(r=>L(n=>Se(n)&&n<r))(t))),gt:t=>Ee(W(e,(r=>L(n=>Se(n)&&n>r))(t))),lte:t=>Ee(W(e,(r=>L(n=>Se(n)&&n<=r))(t))),gte:t=>Ee(W(e,(r=>L(n=>Se(n)&&n>=r))(t))),int:()=>Ee(W(e,L(t=>Se(t)&&Number.isInteger(t)))),finite:()=>Ee(W(e,L(t=>Se(t)&&Number.isFinite(t)))),positive:()=>Ee(W(e,L(t=>Se(t)&&t>0))),negative:()=>Ee(W(e,L(t=>Se(t)&&t<0)))}),tl=Ee(L(Se)),ze=e=>Object.assign(ne(e),{between:(t,r)=>ze(W(e,((n,i)=>L(o=>Ue(o)&&n<=o&&i>=o))(t,r))),lt:t=>ze(W(e,(r=>L(n=>Ue(n)&&n<r))(t))),gt:t=>ze(W(e,(r=>L(n=>Ue(n)&&n>r))(t))),lte:t=>ze(W(e,(r=>L(n=>Ue(n)&&n<=r))(t))),gte:t=>ze(W(e,(r=>L(n=>Ue(n)&&n>=r))(t))),positive:()=>ze(W(e,L(t=>Ue(t)&&t>0))),negative:()=>ze(W(e,L(t=>Ue(t)&&t<0)))}),rl=ze(L(Ue)),nl=ne(L(function(e){return typeof e=="boolean"})),il=ne(L(function(e){return typeof e=="symbol"})),ol=ne(L(function(e){return e==null}));var he={__proto__:null,matcher:ue,optional:an,array:function(...e){return sn({[ue]:()=>({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 pe(r).forEach(o=>{n[o]=[]}),{matched:!0,selections:n};const i=(o,s)=>{n[o]=(n[o]||[]).concat([s])};return{matched:t.every(o=>ee(r,o,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:pe(e[0])})})},set:function(...e){return ne({[ue]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(o,s)=>{r[o]=(r[o]||[]).concat([s])},i=e[0];return{matched:Xc(t,o=>ee(i,o,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:pe(e[0])})})},map:function(...e){return ne({[ue]:()=>({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 i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,s]=e;return{matched:Qc(t,(a,l)=>{const u=ee(o,l,n),h=ee(s,a,n);return u&&h}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...pe(e[0]),...pe(e[1])]})})},intersection:W,union:Fo,not:function(e){return ne({[ue]:()=>({match:t=>({matched:!ee(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:L,select:Nt,any:Mo,_:Jc,string:el,number:tl,bigint:rl,boolean:nl,symbol:il,nullish:ol,instanceOf:function(e){return ne(L(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ne(L(Zc(e)))}};const cn={matched:!1,value:void 0};function Te(e){return new dr(e,cn)}class dr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={};const a=(u,h)=>{o=!0,s[u]=h},l=!n.some(u=>ee(u,this.input,a))||i&&!i(this.input)?cn:{matched:!0,value:r(o?lr in s?s[lr]:s:this.input,this.input)};return new dr(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new dr(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 Lo="isdk",sl=44,al={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"};function He(e,t){if(!e)throw new Error(t)}function ln(e,t){return t in e}function fr(){throw new Error("Cycle detected")}var cl=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)&&Vo(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(dn=0,yt--,t)throw e}}var q=void 0,Ft=void 0,yt=0,dn=0,pr=0;function Ro(e){if(q!==void 0){var t=e.n;if(t===void 0||t.t!==q)return t={i:0,S:e,p:q.s,n:void 0,t:q,e:void 0,x:void 0,r:t},q.s!==void 0&&(q.s.n=t),q.s=t,e.n=t,32&q.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=q.s,t.n=void 0,q.s.n=t,q.s=t),t}}function te(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}te.prototype.brand=cl,te.prototype.h=function(){return!0},te.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)},te.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)}},te.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}})},te.prototype.valueOf=function(){return this.value},te.prototype.toString=function(){return this.value+""},te.prototype.toJSON=function(){return this.value},te.prototype.peek=function(){return this.v},Object.defineProperty(te.prototype,"value",{get:function(){var e=Ro(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(q instanceof Ke&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){dn>100&&fr(),this.v=e,this.i++,pr++,yt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{un()}}}});function We(e){return new te(e)}function Vo(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 Bo(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 jo(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){te.call(this,void 0),this.x=e,this.s=void 0,this.g=pr-1,this.f=4}(Ke.prototype=new te).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===pr))return!0;if(this.g=pr,this.f|=1,this.i>0&&!Vo(this))return this.f&=-2,!0;var e=q;try{Bo(this),q=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 q=e,jo(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)}te.prototype.S.call(this,e)},Ke.prototype.U=function(e){if(this.t!==void 0&&(te.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()||fr(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ke.prototype,"value",{get:function(){1&this.f&&fr();var e=Ro(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ll(e){return new Ke(e)}function Uo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){yt++;var r=q;q=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,fn(e),n}finally{q=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,Uo(e)}function ul(e){if(q!==this)throw new Error("Out-of-order effect");jo(this),q=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&&fr(),this.f|=1,this.f&=-9,Uo(this),Bo(this),yt++;var e=q;return q=this,ul.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 _t(e,t){S[e]=t.bind(null,S[e]||function(){})}function hr(e){hn&&hn(),hn=e&&e.S()}function zo(e){var t=this,r=e.data,n=fl(r);n.value=r;var i=be(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s;!qn(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},ll(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}zo.displayName="_st",Object.defineProperties(te.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:zo},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),_t("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof te&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)}),_t("__r",function(e,t){hr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return pn(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),hr(r),e(t)}),_t("__e",function(e,t,r,n){hr(),e(t,r,n)}),_t("diffed",function(e,t){hr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in n)&&(a.d(),o[s]=void 0)}else r.U=o={};for(var l in n){var u=o[l],h=n[l];u===void 0?(u=dl(r,l,h,i),o[l]=u):u.o(h,i)}}}e(t)});function dl(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=We(r);return{o:function(s,a){o.value=s,n=a},d:pn(function(){var s=o.value.value;n[t]!==s&&(n[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}_t("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),_t("__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 i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function fl(e){return be(function(){return We(e)},[])}const vn=(e,t)=>t.some(r=>e instanceof r);let Ho,Wo;function pl(){return Ho||(Ho=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function hl(){return Wo||(Wo=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const mn=new WeakMap,gn=new WeakMap,vr=new WeakMap;function vl(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{r(it(e.result)),i()},s=()=>{n(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",s)});return vr.set(t,e),t}function ml(e){if(mn.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{r(),i()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),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 Ko(e){bn=e(bn)}function gl(e){return hl().includes(e)?function(...t){return e.apply(yn(this),t),it(this.request)}:function(...t){return it(e.apply(yn(this),t))}}function bl(e){return typeof e=="function"?gl(e):(e instanceof IDBTransaction&&ml(e),vn(e,pl())?new Proxy(e,bn):e)}function it(e){if(e instanceof IDBRequest)return vl(e);if(gn.has(e))return gn.get(e);const t=bl(e);return t!==e&&(gn.set(e,t),vr.set(t,e)),t}const yn=e=>vr.get(e);function yl(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){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=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const _l=["get","getKey","getAll","getAllKeys","count"],wl=["put","add","delete","clear"],_n=new Map;function qo(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(_n.get(t))return _n.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=wl.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||_l.includes(r)))return;const o=async function(s,...a){const l=this.transaction(s,i?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(a.shift())),(await Promise.all([u[r](...a),i&&l.done]))[0]};return _n.set(t,o),o}Ko(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 xl=["continue","continuePrimaryKey","advance"],Yo={},wn=new WeakMap,Go=new WeakMap,kl={get(e,t){if(!xl.includes(t))return e[t];let r=Yo[t];return r||(r=Yo[t]=function(...n){wn.set(this,Go.get(this)[t](...n))}),r}};async function*$l(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,kl);for(Go.set(r,t),vr.set(r,yn(t));t;)yield r,t=await(wn.get(r)||t.continue()),wn.delete(r)}function Zo(e,t){return t===Symbol.asyncIterator&&vn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&vn(e,[IDBIndex,IDBObjectStore])}Ko(e=>({...e,get(t,r,n){return Zo(t,r)?$l:e.get(t,r,n)},has(t,r){return Zo(t,r)||e.has(t,r)}}));const Lt=e=>Te(e).with(he.number.lte(1e3),()=>`${Math.round(e)}KB`).with(he.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Xo=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Sl=e=>Object.entries(e).reduce((r,[n,i])=>(r[n]=i.value,r),{}),xn=e=>t=>t?t.type===e:!1;class Rt extends Error{constructor(){super("Aborted")}}function El(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const Qo=typeof window>"u"?void 0:yl("inploi-chatbot",2,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Vt={getStateData:async(e,t)=>{var n;const r=Jo({...e,flowKeys:t});return(n=await Qo)==null?void 0:n.get("state",r)},setStateData:El(async e=>{var r;const t=Jo(e);return(r=await Qo)==null?void 0:r.put("state",e.data,t)},1e3)},mr=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(u=>u.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const o=t.type==="if-block"?t.branchId:void 0,s=e.find(u=>u.id===o),a=t.type.includes("question")?1:0;if(s){const u=a+Math.max(mr(e,i,r,n+a).remainingSteps,mr(e,s,r,n+a).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const l=a+mr(e,i,r,n+a).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Cl=e=>{const t={},r=e.find(n=>n.isHead);return r&&mr(e,r,(n,i)=>{t[n]=i}),t},Jo=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;He(r,"No flow to update");const n=e(r.data);r.data=n,qe.value={state:t,flow:r},Vt.setStateData(r)},I={current$:qe,viewState$:We("closed"),inputHeight$:We(53),startFlow:async({flow:e,context:t,flowKeys:r,title:n})=>{const o={data:await Vt.getStateData(e,r)??es(),startedAt:new Date,nodeIdToProgress:Cl(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,context:t,title:n};qe.value={state:"loaded",flow:o},Vt.setStateData(o)},cancelCurrentFlow:()=>{qe.value={state:"idle"},I.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=es();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;He(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.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}))},Al=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),es=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Al()});var Pl=0;function f(e,t,r,n,i,o){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:--Pl,__source:i,__self:o};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 Ol=({message:e})=>f("div",{class:"flex flex-grow flex-col items-center justify-center",children:[f("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:[f("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"}),f("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"}),f("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),f("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),f("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),f("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),f("path",{d:"M38 56h19"})]}),f("div",{class:"flex flex-col gap-2 text-center",children:[f("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&f("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Il=e=>f("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[f("title",{children:"Loading"}),f("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)}}"}),f("g",{id:"s1",transform:"translate(12,0)",children:f("g",{id:"s2",transform:"scale(0,0)",children:f("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),f("g",{id:"s3",transform:"translate(12,12)",children:f("g",{id:"s4",transform:"scale(1,1)",children:f("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),f("g",{id:"s5",transform:"translate(12,0)",children:f("g",{id:"s6",transform:"scale(0,0)",children:f("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"})})}),f("g",{id:"s7",transform:"translate(12,0)",children:f("g",{id:"s8",transform:"scale(0,0)",children:f("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"})})})]}),ts=()=>f("div",{class:"flex flex-grow flex-col items-center justify-center",children:f(Il,{class:"text-neutral-6 h-8 w-8"})}),Dl=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)}%`},gr=({class:e,children:t,...r})=>f("button",{class:je("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:f("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})}),Tl=()=>{if(I.current$.value.state!=="loaded")return null;const e=I.current$.value.flow.nodeIdToProgress,t=I.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return f("div",{class:"bg-accent-3",children:f("div",{style:{width:Dl(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Nl=({children:e})=>{const t=I.viewState$;return f(Y,{children:f("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:[f("div",{class:"flex h-[var(--header-height)] gap-2",children:[f("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),f("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:f("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),f("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?f(Y,{children:[f(gr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:f("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),f(gr,{"aria-label":"Close application",onClick:I.cancelCurrentFlow,children:f("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):f(Y,{children:[I.current$.value.state==="loaded"&&f(gr,{"aria-label":"Restart",onClick:()=>{I.restart()},children:[f("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"}),f("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),f(gr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:f("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),f(Tl,{})]})})},Fl=Vr(()=>Promise.resolve().then(()=>_d).then(e=>e.ChatbotBody)),Ml=nn("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"}}}),Ll=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:i,error:o}=I.current$.value,s=I.viewState$.value,a=n!=="idle"&&s==="maximised",l=V(null);return f(qc,{open:a,modal:a,children:[f(Yc,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0"}),f(Gc,{forceMount:!0,asChild:!0,children:f("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",style:{"--header-height":`${sl}px`,"--content-height":"75vh"},class:Ml({view:s}),children:f("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[f(Nl,{children:i==null?void 0:i.title}),Te({state:n,view:s}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>f(ts,{},"loading")).with({state:"loaded"},()=>f(dt,{fallback:f(ts,{},"loading"),children:f(Fl,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>f(Ol,{message:o})).exhaustive()]})})})]})},kn=Ve({id:ui(ge(),String),version:Js(),nodes:pi(fi())}),Rl=Ve({flow:kn}),Vl=Ve({company:Ve({name:ge()}),flow:kn,job:Ve({id:ui(ge(),String),title:ge()})}),Bl=Ve({flow:kn,title:ge(),flowKeys:pi(ge()),context:hi(ge(),fi())}),jl=`#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 .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#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-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 .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-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-8{border-color:var(--i-color-n-8)}#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-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-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-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-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-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-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 .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 .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 .\\[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 .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#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\\: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\\: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}}
|
|
42
|
+
`,Ul=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Lo);if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Lo,t}});var zl=["1","2","3","4","5","6","7","8","9","10","11","12"],Hl={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]}},Wl=(e,t=1,r)=>n=>{const[i,o]=Hl[r][n];return"oklch("+i+"% "+o*t+" "+e+")"},$n=e=>{const t=Wl(e.hue,e.chroma,e.mode);return Object.fromEntries(zl.map(r=>[e.prefix+r,e.transform(t(r))]))},Sn=e=>e,Kl=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(i=>{const o=n[i];return[`${String(r)}.${i}`,o]}):[[r,n]]});return Object.fromEntries(t)},br=e=>!!e&&typeof e=="object"&&!Array.isArray(e),En=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(br(e)&&br(r))for(const n in r){const i=r[n];if(br(i)){e[n]||Object.assign(e,{[n]:{}});const o=e[n];br(o)&&En(o,i)}else Object.assign(e,{[n]:r[n]})}return En(e,...t)},ql=e=>{function t(r,n){const i=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return t},Yl=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:i,getToken:o}=n,s=p=>o("reference",p.toString()),a=e({theme:i}),l=t({theme:i,core:s,raw:{core:a}}),u=r({theme:i,core:s,semantic:s,raw:{core:a,semantic:l}}),h=Kl(En(a,l,u)),c=([p,b],m)=>{const v=[m,p].filter(Boolean).join(".");return typeof b=="object"?Object.entries(b).flatMap(_=>c(_,v)):[[n.getToken("declaration",v),b]]};return{values:h,declarations:Object.fromEntries(Object.entries(h).flatMap(p=>c(p))),ref:p=>o("reference",p.toString())}}})})})});const[Cn,An,rs]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Gl=Yl().core(({theme:e})=>({color:{black:Cn,white:An,lowest:e.mode==="light"?An:Cn,highest:e.mode==="light"?Cn:An,...$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=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:rs,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const i=(o,s)=>e.core.color[o].replace(")",` / ${s})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":rs,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Zl=ql({prefix:"i-"}),Xl=e=>{const t=Gl.from({theme:e,getToken:Zl}),r=Object.entries(t.declarations).map(([n,i])=>`${n}: ${i};`);return`#isdk {
|
|
51
43
|
${r.concat(r).join(`
|
|
52
44
|
`)}
|
|
53
|
-
}`},Lv=({_internal_domManager:e=Pv(),theme:t})=>ht(({apiClient:r,logger:n,analytics:i})=>{let o=!1;const s=()=>{if(typeof window>"u")return;const a=[O("style",{id:"inploi-chatbot-styles"},Av),O("style",{id:"inploi-chatbot-theme"},Nv(t))],l=e.getOrCreateChatbotElement();Dt(O(Q,{},[a,O(kv,{apiClient:r,logger:n,analytics:i})]),l),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)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=ar(Cv,l);return{context:{job_id:u.job.id,flow_id:u.flow.id},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=ar(Sv,l);return{flow:u.flow,context:{flow_id:u.flow.id},title:"Chatbot",flowKeys:[]}}),open:async a=>{if(!(typeof window>"u"))try{L.cancelCurrentFlow(),L.viewState$.value="maximised",o||s(),a instanceof Promise?(L.current$.value={state:"loading"},a.then(async l=>{const u=ar($v,l);L.startFlow(u)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";L.current$.value={state:"error",error:u}})):L.startFlow(a)}catch(l){n.error("Error starting flow",l)}},startApplication:void 0,closeApplication:void 0,close:async()=>{typeof window>"u"||(L.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=Lv;const Pl=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return Pl({node:n,nodes:t,stopWhen:r})},Rv=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(a=>a.id===i.branchId);if(!o)return!1;const s=Pl({node:o,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},Bv=({flow:e,analytics:t,logger:r,context:n,apiClient:i,getSubmissions:o,chatService:s,onFlowEnd:a,onInterpret:l})=>{let u=new AbortController;const d=async(c,f)=>{const p=o();l==null||l(c,f);try{await jv({analytics:t,logger:r,apiClient:i,context:n,node:c,submissions:p,chat:{sendMessage:async h=>s.send({groupId:c.id,message:h,signal:u.signal}),userInput:async h=>s.input({input:h,signal:u.signal})},next:h=>{const m=h?e.find(b=>b.id===h):Rv({childNode:c,nodes:e});return m?d(m,c):a==null?void 0:a(c)},end:()=>a==null?void 0:a(c)})}catch(h){if(h instanceof Er)return;throw h}};return{interpret:async c=>{const f=e.find(p=>p.id===c)??_l(e);return d(f)},undo:c=>{let f=1;const p=e.find(m=>m.id===c[c.length-1]);for(let m=c.length-2;m>0;m--){const b=c[m],x=e.find(y=>y.id===b);if(!x||(f++,x.type.startsWith("question-")))break}u.abort(),u=new AbortController;const h=e.find(m=>m.id===c[c.length-f]);return Xe(h,"Undo failed: new start node not found"),d(h,p),{removed:f}},abort:()=>{u.abort()}}};async function jv(e){return await Ue(e).with({node:{type:"text"}},Wv).with({node:{type:"image"}},Kv).with({node:{type:"question-text"}},qv).with({node:{type:"question-enum"}},Yv).with({node:{type:"question-number"}},Gv).with({node:{type:"question-boolean"}},Zv).with({node:{type:"question-file"}},Jv).with({node:{type:"question-address"}},Qv).with({node:{type:"end-flow"}},eg).with({node:{type:"if-block"}},Hv).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},zv).with({node:{type:"integration-application-submit"}},Uv).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function Uv({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:o,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(),d=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:r.data.integrationId,anonymous_id:l,session_id:u,submissions:uv(o||{})})}).catch(c=>c);await Ue(d).with({ats_data:{redirect_url:_e.string}},async c=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const f=new URL(c.ats_data.redirect_url);l&&!f.searchParams.has("anonymous_id")&&f.searchParams.set("anonymous_id",l),await e.sendMessage({type:"link",href:f.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 zv({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({type:"link",href:r.data.href,text:Et(r.data.cta,n)}),t(r.nextId)}async function Hv({submissions:e,next:t,node:r}){const n=tg(r,e)?r.branchId:r.nextId;t(n)}async function Wv({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:Et(r.data.text,n)}),t(r.nextId)}async function Kv({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 qv({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:Et(r.data.question,n)});const i=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}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(r.nextId)}async function Gv({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:Et(r.data.question,n)});const i=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:"text"}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(r.nextId)}async function Yv({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:Et(r.data.question,n)});const i=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(o=>i.value.includes(o.value)).map(o=>o.label).join(", ")}),t(r.nextId)}async function Zv({chat:e,next:t,node:r,submissions:n}){await e.sendMessage({author:"bot",type:"text",text:Et(r.data.question,n)});const o=(await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}})).value;o===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}[o]}),t(r.nextId)}const Xv=document.createElement("div"),El={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"]},Tl=Object.keys(El);async function Qv({chat:e,next:t,node:r,logger:n}){if(Tl.every(h=>r.data.keys[h]===null))return t(r.nextId);const{google:i}=window;await e.sendMessage({author:"bot",type:"text",text:r.data.question});const o=async h=>{const m=[{label:"Postcode",key:r.data.keys.postcode,optional:!1,defaultValue:h.postcode},{label:"Line 1",key:r.data.keys.line1,optional:!1,defaultValue:h.line1},{label:"Line 2",key:r.data.keys.line2,optional:!0,defaultValue:h.line2},{label:"Line 3",key:r.data.keys.line3,optional:!0,defaultValue:h.line3},{label:"City",key:r.data.keys.city,optional:!1,defaultValue:h.city},{label:"State/County/Province",key:r.data.keys.state,optional:!0,defaultValue:h.state},{label:"Country",key:r.data.keys.country,optional:!1,defaultValue:h.country}];for(const b of m){if(b.key===null)continue;await e.sendMessage({author:"bot",type:"text",text:b.label});const{value:x}=await e.userInput({type:"text",key:b.key,config:{format:"text",optional:b.optional,defaultValue:b.defaultValue}});x===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:x})}};if(!Xn(window,"google")||!Xn(window.google,"maps")||!Xn(window.google.maps,"places"))return n.warn("Google maps not available, falling back to manual input."),n.info("If you’d like to use the address autocomplete, please insert the google maps API snippet in your website and make sure it has access to the *places* library."),await o({}),t(r.nextId);const s=new i.maps.places.AutocompleteService,a=new i.maps.places.PlacesService(Xv),{value:l}=await e.userInput({type:"text",key:"_internal-address-search",config:{format:"text",optional:!1,placeholder:"Search for your address"}});if(l===null)return t(r.id);await e.sendMessage({author:"user",type:"text",text:`Search for “${l}”`});const{predictions:u}=await s.getPlacePredictions({input:l}),{value:[d]}=await e.userInput({type:"multiple-choice",key:void 0,config:{options:u.slice(0,4).map(h=>({label:h.description,value:h.place_id})).concat({label:"None of these",value:"none"}),maxSelected:1,minSelected:1}});if(!d||d==="none")return t(r.id);const c=await new Promise((h,m)=>a.getDetails({placeId:d,fields:["address_components"]},(b,x)=>x!==i.maps.places.PlacesServiceStatus.OK?m(x):b===null?m("ZERO_RESULTS"):h({ok:!0,place:b}))).catch(async h=>(n.error("Failed to get address details",h),{ok:!1}));if(c.ok===!1)return await e.sendMessage({type:"system",variant:"error",text:"Failed to get address details"}),await o({}),t(r.id);const f=c.place.address_components,p=f?Tl.reduce((h,m)=>{const b=El[m],x=f.filter(y=>y.types.some(_=>b.includes(_))).map(y=>y.long_name).join(", ");return x&&(h[m]=x),h},{}):{};return await e.sendMessage({author:"bot",type:"text",text:"Please confirm or adjust your address:"}),await o(p),t(r.nextId)}async function Jv({node:e,chat:t,next:r,submissions:n}){await t.sendMessage({author:"bot",type:"text",text:Et(e.data.question,n)});const i=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(i.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const o of i.value)await t.sendMessage({author:"user",type:"file",fileName:o.name,fileSizeKb:o.sizeKb});r(e.nextId)}async function eg({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const Vl=_e.union(_e.string,_e.array(_e.string),null),tg=(e,t)=>{const r=t==null?void 0:t[e.data.compareKey];return r?Ue({...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:Vl}},({compareValue:n,answer:i})=>i.value!==null&&i.value.includes(n)).with({compare:"notContains",answer:{value:Vl}},({compareValue:n,answer:i})=>i.value===null||!i.value.includes(n)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},Et=(e,t)=>{const r=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(r,(n,i,o="")=>{i=i.trim();const s=t==null?void 0:t[i];if(!s)return o;switch(s.type){case"boolean":return s.value==="true"?"true":"false";case"file":return s.value?s.value.map(a=>`${a.name} (${Pr(a.sizeKb)})`).join(", "):"no files";case"multiple-choice":return s.value.join(", ");default:return s.value||o}})},In=({class:e,...t})=>g("button",{class:ct("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:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[g("title",{children:"Send"}),g("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),g("path",{d:"M8 4V13"})]})}),rg=25,Po=ot({instant:()=>{},smooth:()=>{}}),Ve={onSubmitSuccessFn$:ot(()=>{}),isBotTyping$:ot(!1),scrollToEnd:{instant:()=>Po.value.instant(),smooth:()=>Po.value.smooth()}},ng=()=>{const e=j(null);Ae(()=>{Po.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:i})=>{if(await Ue(r).with({author:"bot",type:"text"},async o=>{if(n!=null&&n.aborted)throw new Er;Ve.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*rg;await new Promise(a=>setTimeout(a,s,{signal:n})),Ve.isBotTyping$.value=!1}).otherwise(async()=>{}),n!=null&&n.aborted)throw new Er;L.addMessage(r,i)},input:async({input:r,signal:n})=>{if(n!=null&&n.aborted)throw new Er;return L.setInput(r),await new Promise(i=>{const o=s=>{if(n!=null&&n.aborted)throw new Er;L.setInput(void 0),r.key&&L.setSubmission(r.key,s),i(s)};Ve.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}},Fn=({class:e,...t})=>g("button",{type:"button",class:ct("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:[g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[g("title",{children:"Skip"}),g("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),g("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Eo=()=>{const e=j(null);return W(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Ml=["true","false"],ig=xu(Ml),og="answer",sg=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{const n=Eo();return r(),g("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const o=Ue(i).with({nativeEvent:{submitter:_e.select(_e.union(_e.instanceOf(HTMLButtonElement),_e.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=ar(ig,o);t(s)},children:[g("div",{class:"flex items-center gap-2 p-2.5",children:Ml.map((i,o)=>g("button",{ref:o===0?n:null,type:"submit",name:og,value:i,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:g("p",{class:"truncate text-center text-base",children:e.config.labels[i]})}))}),e.config.optional&&g("div",{class:"px-2 pb-2",children:g(Fn,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},To=({error:e,onAnimationComplete:t})=>(Ae(()=>{e&&t()},[e,t]),e?g("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[g("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),g("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),g("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),g("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null),ag=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}),cg=e=>e.reduce((t,r)=>t+r.sizeKb,0),lg=_o("file"),Ol=3,ug=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return g("div",{class:ct("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:[g("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[g("span",{class:"block truncate",children:i}),g("span",{children:[".",n]})]}),g("p",{"aria-label":"File size",class:"text-accent-11",children:Pr(e.sizeKb)})]})},Il=({class:e,...t})=>g("li",{class:ct("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Fl=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},dg=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(Fl(n.name).toLowerCase()))},fg=(e,t)=>{const r=Fl(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},hg=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{var c;const n=(c=L.current$.value.flow)==null?void 0:c.data.submissions[e.key],[i,o]=ie(lg(n)&&n.value!==null?n.value:[]),[s,a]=ie(),l=i.length-Ol,u=cg(i),d=Eo();return g("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:f=>(f.preventDefault(),a(void 0),i.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!dg({allowedExtensions:e.config.extensions,files:i})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${Pr(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&i.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(i)),children:[g("div",{class:"flex items-center gap-2",children:[g("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[i.length>0?g(Q,{children:[g("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,Ol).map(f=>{const p=f.name.split(".").pop(),h=f.name.replace(new RegExp(`.${p}$`),"");return g(Il,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:h}),g("span",{children:[".",p]})]})}),l>0?g(Il,{children:["+",l," file",l!==1?"s":""]}):null]}),g("p",{class:"text-neutral-11 text-xs",children:[Pr(u)," ",i.length>1?"total":""]})]}):g("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[g("header",{class:"flex flex-col items-center gap-0",children:[g("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:g("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"})}),g("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?g("p",{class:"text-neutral-10 text-xs",children:["(max ",Pr(e.config.fileSizeLimitKib),")"]}):null]}),g("aside",{class:"flex flex-col items-center gap-2",children:[g("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),g("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(f=>g("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:f.replace(".","")}))})]})]}),g("input",{id:"dropzone-file",onInput:async f=>{Xe(f.target instanceof HTMLInputElement);const p=f.target.files?Array.from(f.target.files):[],h=await Promise.allSettled(p.map(async b=>{const x=await ag(b);return{name:fg(b.name,42),data:x,sizeKb:b.size/1e3}}));if(h.some(({status:b})=>b==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=h.map(b=>b.status==="fulfilled"?b.value:null).filter(Boolean);o(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),g("div",{class:"flex h-full flex-col items-center gap-2",children:[g(In,{disabled:i.length===0}),e.config.optional&&g(Fn,{onClick:()=>t(null)})]})]}),s&&g(To,{onAnimationComplete:r,error:s})]})};var Mr=e=>e.type==="checkbox",Jt=e=>e instanceof Date,ye=e=>e==null;const Dl=e=>typeof e=="object";var oe=e=>!ye(e)&&!Array.isArray(e)&&Dl(e)&&!Jt(e),pg=e=>oe(e)&&e.target?Mr(e.target)?e.target.checked:e.target.value:e,mg=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vg=(e,t)=>e.has(mg(t)),gg=e=>{const t=e.constructor&&e.constructor.prototype;return oe(t)&&t.hasOwnProperty("isPrototypeOf")},Vo=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ze(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(!(Vo&&(e instanceof Blob||e instanceof FileList))&&(r||oe(e)))if(t=r?[]:{},!r&&!gg(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=ze(e[n]));else return e;return t}var Or=e=>Array.isArray(e)?e.filter(Boolean):[],te=e=>e===void 0,V=(e,t,r)=>{if(!t||!oe(e))return r;const n=Or(t.split(/[,[\].]+?/)).reduce((i,o)=>ye(i)?i:i[o],e);return te(n)||n===e?te(e[t])?r:e[t]:n},lt=e=>typeof e=="boolean";const Nl={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Me={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},He={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};Te.createContext(null);var yg=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Me.all&&(t._proxyFormState[s]=!n||Me.all),r&&(r[s]=!0),e[s]}});return i},Pe=e=>oe(e)&&!Object.keys(e).length,bg=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return Pe(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!n||Me.all))},Mo=e=>Array.isArray(e)?e:[e];function wg(e){const t=Te.useRef(e);t.current=e,Te.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Le=e=>typeof e=="string",_g=(e,t,r,n,i)=>Le(e)?(n&&t.watch.add(e),V(r,e,i)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),V(r,o))):(n&&(t.watchAll=!0),r),Oo=e=>/^\w*$/.test(e),Ll=e=>Or(e.replace(/["|']|\]/g,"").split(/\.|\[/));function G(e,t,r){let n=-1;const i=Oo(t)?[t]:Ll(t),o=i.length,s=o-1;for(;++n<o;){const a=i[n];let l=r;if(n!==s){const u=e[a];l=oe(u)||Array.isArray(u)?u:isNaN(+i[n+1])?{}:[]}e[a]=l,e=e[a]}return e}var Rl=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Bl=e=>({isOnSubmit:!e||e===Me.onSubmit,isOnBlur:e===Me.onBlur,isOnChange:e===Me.onChange,isOnAll:e===Me.all,isOnTouch:e===Me.onTouched}),jl=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Dn=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const o=V(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)break;if(s.ref&&t(s.ref,s.name)&&!n)break}else oe(a)&&Dn(a,t)}}};var xg=(e,t,r)=>{const n=Or(V(e,r));return G(n,"root",t[r]),G(e,r,n),e},Io=e=>e.type==="file",ut=e=>typeof e=="function",Nn=e=>{if(!Vo)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ln=e=>Le(e),Fo=e=>e.type==="radio",Rn=e=>e instanceof RegExp;const Ul={value:!1,isValid:!1},zl={value:!0,isValid:!0};var Hl=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&&!te(e[0].attributes.value)?te(e[0].value)||e[0].value===""?zl:{value:e[0].value,isValid:!0}:zl:Ul}return Ul};const Wl={isValid:!1,value:null};var Kl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Wl):Wl;function ql(e,t,r="validate"){if(Ln(e)||Array.isArray(e)&&e.every(Ln)||lt(e)&&!e)return{type:r,message:Ln(e)?e:"",ref:t}}var er=e=>oe(e)&&!Rn(e)?e:{value:e,message:""},Gl=async(e,t,r,n,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:d,max:c,pattern:f,validate:p,name:h,valueAsNumber:m,mount:b,disabled:x}=e._f,y=V(t,h);if(!b||x)return{};const _=s?s[0]:o,C=U=>{n&&_.reportValidity&&(_.setCustomValidity(lt(U)?"":U||""),_.reportValidity())},S={},N=Fo(o),F=Mr(o),A=N||F,T=(m||Io(o))&&te(o.value)&&te(y)||Nn(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,K=Rl.bind(null,h,r,S),J=(U,R,B,z=He.maxLength,re=He.minLength)=>{const de=U?R:B;S[h]={type:U?z:re,message:de,ref:o,...K(U?z:re,de)}};if(i?!Array.isArray(y)||!y.length:a&&(!A&&(T||ye(y))||lt(y)&&!y||F&&!Hl(s).isValid||N&&!Kl(s).isValid)){const{value:U,message:R}=Ln(a)?{value:!!a,message:a}:er(a);if(U&&(S[h]={type:He.required,message:R,ref:_,...K(He.required,R)},!r))return C(R),S}if(!T&&(!ye(d)||!ye(c))){let U,R;const B=er(c),z=er(d);if(!ye(y)&&!isNaN(y)){const re=o.valueAsNumber||y&&+y;ye(B.value)||(U=re>B.value),ye(z.value)||(R=re<z.value)}else{const re=o.valueAsDate||new Date(y),de=Vt=>new Date(new Date().toDateString()+" "+Vt),We=o.type=="time",dt=o.type=="week";Le(B.value)&&y&&(U=We?de(y)>de(B.value):dt?y>B.value:re>new Date(B.value)),Le(z.value)&&y&&(R=We?de(y)<de(z.value):dt?y<z.value:re<new Date(z.value))}if((U||R)&&(J(!!U,B.message,z.message,He.max,He.min),!r))return C(S[h].message),S}if((l||u)&&!T&&(Le(y)||i&&Array.isArray(y))){const U=er(l),R=er(u),B=!ye(U.value)&&y.length>+U.value,z=!ye(R.value)&&y.length<+R.value;if((B||z)&&(J(B,U.message,R.message),!r))return C(S[h].message),S}if(f&&!T&&Le(y)){const{value:U,message:R}=er(f);if(Rn(U)&&!y.match(U)&&(S[h]={type:He.pattern,message:R,ref:o,...K(He.pattern,R)},!r))return C(R),S}if(p){if(ut(p)){const U=await p(y,t),R=ql(U,_);if(R&&(S[h]={...R,...K(He.validate,R.message)},!r))return C(R.message),S}else if(oe(p)){let U={};for(const R in p){if(!Pe(U)&&!r)break;const B=ql(await p[R](y,t),_,R);B&&(U={...B,...K(R,B.message)},C(B.message),r&&(S[h]=U))}if(!Pe(U)&&(S[h]={ref:_,...U},!r))return S}}return C(!0),S};function kg(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=te(e)?n++:e[t[n++]];return e}function Sg(e){for(const t in e)if(e.hasOwnProperty(t)&&!te(e[t]))return!1;return!0}function ue(e,t){const r=Array.isArray(t)?t:Oo(t)?[t]:Ll(t),n=r.length===1?e:kg(e,r),i=r.length-1,o=r[i];return n&&delete n[o],i!==0&&(oe(n)&&Pe(n)||Array.isArray(n)&&Sg(n))&&ue(e,r.slice(0,-1)),e}function Do(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Bn=e=>ye(e)||!Dl(e);function Tt(e,t){if(Bn(e)||Bn(t))return e===t;if(Jt(e)&&Jt(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const o=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Jt(o)&&Jt(s)||oe(o)&&oe(s)||Array.isArray(o)&&Array.isArray(s)?!Tt(o,s):o!==s)return!1}}return!0}var Yl=e=>e.type==="select-multiple",Cg=e=>Fo(e)||Mr(e),No=e=>Nn(e)&&e.isConnected,Zl=e=>{for(const t in e)if(ut(e[t]))return!0;return!1};function jn(e,t={}){const r=Array.isArray(e);if(oe(e)||r)for(const n in e)Array.isArray(e[n])||oe(e[n])&&!Zl(e[n])?(t[n]=Array.isArray(e[n])?[]:{},jn(e[n],t[n])):ye(e[n])||(t[n]=!0);return t}function Xl(e,t,r){const n=Array.isArray(e);if(oe(e)||n)for(const i in e)Array.isArray(e[i])||oe(e[i])&&!Zl(e[i])?te(t)||Bn(r[i])?r[i]=Array.isArray(e[i])?jn(e[i],[]):{...jn(e[i])}:Xl(e[i],ye(t)?{}:t[i],r[i]):r[i]=!Tt(e[i],t[i]);return r}var Lo=(e,t)=>Xl(e,t,jn(t)),Ql=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>te(e)?e:t?e===""?NaN:e&&+e:r&&Le(e)?new Date(e):n?n(e):e;function Ro(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Io(t)?t.files:Fo(t)?Kl(e.refs).value:Yl(t)?[...t.selectedOptions].map(({value:r})=>r):Mr(t)?Hl(e.refs).value:Ql(te(t.value)?e.ref.value:t.value,e)}var $g=(e,t,r,n)=>{const i={};for(const o of e){const s=V(t,o);s&&G(i,o,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Ir=e=>te(e)?e:Rn(e)?e.source:oe(e)?Rn(e.value)?e.value.source:e.value:e,Ag=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Jl(e,t,r){const n=V(e,r);if(n||Oo(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const o=i.join("."),s=V(t,o),a=V(e,o);if(s&&!Array.isArray(s)&&r!==o)return{name:r};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:r}}var Pg=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Eg=(e,t)=>!Or(V(e,t)).length&&ue(e,t);const Tg={mode:Me.onSubmit,reValidateMode:Me.onChange,shouldFocusError:!0};function Vg(e={},t){let r={...Tg,...e},n={submitCount:0,isDirty:!1,isLoading:ut(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=oe(r.defaultValues)||oe(r.values)?ze(r.defaultValues||r.values)||{}:{},s=r.shouldUnregister?{}:ze(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Do(),array:Do(),state:Do()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,h=Bl(r.mode),m=Bl(r.reValidateMode),b=r.criteriaMode===Me.all,x=v=>w=>{clearTimeout(d),d=setTimeout(v,w)},y=async v=>{if(c.isValid||v){const w=r.resolver?Pe((await T()).errors):await J(i,!0);w!==n.isValid&&f.state.next({isValid:w})}},_=v=>c.isValidating&&f.state.next({isValidating:v}),C=(v,w=[],k,M,P=!0,$=!0)=>{if(M&&k){if(a.action=!0,$&&Array.isArray(V(i,v))){const I=k(V(i,v),M.argA,M.argB);P&&G(i,v,I)}if($&&Array.isArray(V(n.errors,v))){const I=k(V(n.errors,v),M.argA,M.argB);P&&G(n.errors,v,I),Eg(n.errors,v)}if(c.touchedFields&&$&&Array.isArray(V(n.touchedFields,v))){const I=k(V(n.touchedFields,v),M.argA,M.argB);P&&G(n.touchedFields,v,I)}c.dirtyFields&&(n.dirtyFields=Lo(o,s)),f.state.next({name:v,isDirty:R(v,w),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else G(s,v,w)},S=(v,w)=>{G(n.errors,v,w),f.state.next({errors:n.errors})},N=(v,w,k,M)=>{const P=V(i,v);if(P){const $=V(s,v,te(k)?V(o,v):k);te($)||M&&M.defaultChecked||w?G(s,v,w?$:Ro(P._f)):re(v,$),a.mount&&y()}},F=(v,w,k,M,P)=>{let $=!1,I=!1;const Z={name:v};if(!k||M){c.isDirty&&(I=n.isDirty,n.isDirty=Z.isDirty=R(),$=I!==Z.isDirty);const ne=Tt(V(o,v),w);I=V(n.dirtyFields,v),ne?ue(n.dirtyFields,v):G(n.dirtyFields,v,!0),Z.dirtyFields=n.dirtyFields,$=$||c.dirtyFields&&I!==!ne}if(k){const ne=V(n.touchedFields,v);ne||(G(n.touchedFields,v,k),Z.touchedFields=n.touchedFields,$=$||c.touchedFields&&ne!==k)}return $&&P&&f.state.next(Z),$?Z:{}},A=(v,w,k,M)=>{const P=V(n.errors,v),$=c.isValid&<(w)&&n.isValid!==w;if(e.delayError&&k?(u=x(()=>S(v,k)),u(e.delayError)):(clearTimeout(d),u=null,k?G(n.errors,v,k):ue(n.errors,v)),(k?!Tt(P,k):P)||!Pe(M)||$){const I={...M,...$&<(w)?{isValid:w}:{},errors:n.errors,name:v};n={...n,...I},f.state.next(I)}_(!1)},T=async v=>r.resolver(s,r.context,$g(v||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),K=async v=>{const{errors:w}=await T(v);if(v)for(const k of v){const M=V(w,k);M?G(n.errors,k,M):ue(n.errors,k)}else n.errors=w;return w},J=async(v,w,k={valid:!0})=>{for(const M in v){const P=v[M];if(P){const{_f:$,...I}=P;if($){const Z=l.array.has($.name),ne=await Gl(P,s,b,r.shouldUseNativeValidation&&!w,Z);if(ne[$.name]&&(k.valid=!1,w))break;!w&&(V(ne,$.name)?Z?xg(n.errors,ne,$.name):G(n.errors,$.name,ne[$.name]):ue(n.errors,$.name))}I&&await J(I,w,k)}}return k.valid},U=()=>{for(const v of l.unMount){const w=V(i,v);w&&(w._f.refs?w._f.refs.every(k=>!No(k)):!No(w._f.ref))&&rr(v)}l.unMount=new Set},R=(v,w)=>(v&&w&&G(s,v,w),!Tt(ft(),o)),B=(v,w,k)=>_g(v,l,{...a.mount?s:te(w)?o:Le(v)?{[v]:w}:w},k,w),z=v=>Or(V(a.mount?s:o,v,e.shouldUnregister?V(o,v,[]):[])),re=(v,w,k={})=>{const M=V(i,v);let P=w;if(M){const $=M._f;$&&(!$.disabled&&G(s,v,Ql(w,$)),P=Nn($.ref)&&ye(w)?"":w,Yl($.ref)?[...$.ref.options].forEach(I=>I.selected=P.includes(I.value)):$.refs?Mr($.ref)?$.refs.length>1?$.refs.forEach(I=>(!I.defaultChecked||!I.disabled)&&(I.checked=Array.isArray(P)?!!P.find(Z=>Z===I.value):P===I.value)):$.refs[0]&&($.refs[0].checked=!!P):$.refs.forEach(I=>I.checked=I.value===P):Io($.ref)?$.ref.value="":($.ref.value=P,$.ref.type||f.values.next({name:v,values:{...s}})))}(k.shouldDirty||k.shouldTouch)&&F(v,P,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&Y(v)},de=(v,w,k)=>{for(const M in w){const P=w[M],$=`${v}.${M}`,I=V(i,$);(l.array.has(v)||!Bn(P)||I&&!I._f)&&!Jt(P)?de($,P,k):re($,P,k)}},We=(v,w,k={})=>{const M=V(i,v),P=l.array.has(v),$=ze(w);G(s,v,$),P?(f.array.next({name:v,values:{...s}}),(c.isDirty||c.dirtyFields)&&k.shouldDirty&&f.state.next({name:v,dirtyFields:Lo(o,s),isDirty:R(v,$)})):M&&!M._f&&!ye($)?de(v,$,k):re(v,$,k),jl(v,l)&&f.state.next({...n}),f.values.next({name:v,values:{...s}}),!a.mount&&t()},dt=async v=>{const w=v.target;let k=w.name,M=!0;const P=V(i,k),$=()=>w.type?Ro(P._f):pg(v),I=Z=>{M=Number.isNaN(Z)||Z===V(s,k,Z)};if(P){let Z,ne;const Wn=$(),nr=v.type===Nl.BLUR||v.type===Nl.FOCUS_OUT,cy=!Ag(P._f)&&!r.resolver&&!V(n.errors,k)&&!P._f.deps||Pg(nr,V(n.touchedFields,k),n.isSubmitted,m,h),Bo=jl(k,l,nr);G(s,k,Wn),nr?(P._f.onBlur&&P._f.onBlur(v),u&&u(0)):P._f.onChange&&P._f.onChange(v);const jo=F(k,Wn,nr,!1),ly=!Pe(jo)||Bo;if(!nr&&f.values.next({name:k,type:v.type,values:{...s}}),cy)return c.isValid&&y(),ly&&f.state.next({name:k,...Bo?{}:jo});if(!nr&&Bo&&f.state.next({...n}),_(!0),r.resolver){const{errors:cu}=await T([k]);if(I(Wn),M){const uy=Jl(n.errors,i,k),lu=Jl(cu,i,uy.name||k);Z=lu.error,k=lu.name,ne=Pe(cu)}}else Z=(await Gl(P,s,b,r.shouldUseNativeValidation))[k],I(Wn),M&&(Z?ne=!1:c.isValid&&(ne=await J(i,!0)));M&&(P._f.deps&&Y(P._f.deps),A(k,ne,Z,jo))}},Vt=(v,w)=>{if(V(n.errors,w)&&v.focus)return v.focus(),1},Y=async(v,w={})=>{let k,M;const P=Mo(v);if(_(!0),r.resolver){const $=await K(te(v)?v:P);k=Pe($),M=v?!P.some(I=>V($,I)):k}else v?(M=(await Promise.all(P.map(async $=>{const I=V(i,$);return await J(I&&I._f?{[$]:I}:I)}))).every(Boolean),!(!M&&!n.isValid)&&y()):M=k=await J(i);return f.state.next({...!Le(v)||c.isValid&&k!==n.isValid?{}:{name:v},...r.resolver||!v?{isValid:k}:{},errors:n.errors,isValidating:!1}),w.shouldFocus&&!M&&Dn(i,Vt,v?P:l.mount),M},ft=v=>{const w={...o,...a.mount?s:{}};return te(v)?w:Le(v)?V(w,v):v.map(k=>V(w,k))},Fr=(v,w)=>({invalid:!!V((w||n).errors,v),isDirty:!!V((w||n).dirtyFields,v),isTouched:!!V((w||n).touchedFields,v),error:V((w||n).errors,v)}),Un=v=>{v&&Mo(v).forEach(w=>ue(n.errors,w)),f.state.next({errors:v?n.errors:{}})},Dr=(v,w,k)=>{const M=(V(i,v,{_f:{}})._f||{}).ref;G(n.errors,v,{...w,ref:M}),f.state.next({name:v,errors:n.errors,isValid:!1}),k&&k.shouldFocus&&M&&M.focus&&M.focus()},Mt=(v,w)=>ut(v)?f.values.subscribe({next:k=>v(B(void 0,w),k)}):B(v,w,!0),rr=(v,w={})=>{for(const k of v?Mo(v):l.mount)l.mount.delete(k),l.array.delete(k),w.keepValue||(ue(i,k),ue(s,k)),!w.keepError&&ue(n.errors,k),!w.keepDirty&&ue(n.dirtyFields,k),!w.keepTouched&&ue(n.touchedFields,k),!r.shouldUnregister&&!w.keepDefaultValue&&ue(o,k);f.values.next({values:{...s}}),f.state.next({...n,...w.keepDirty?{isDirty:R()}:{}}),!w.keepIsValid&&y()},zn=({disabled:v,name:w,field:k,fields:M,value:P})=>{if(lt(v)){const $=v?void 0:te(P)?Ro(k?k._f:V(M,w)._f):P;G(s,w,$),F(w,$,!1,!1,!0)}},Ot=(v,w={})=>{let k=V(i,v);const M=lt(w.disabled);return G(i,v,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:v}},name:v,mount:!0,...w}}),l.mount.add(v),k?zn({field:k,disabled:w.disabled,name:v}):N(v,!0,w.value),{...M?{disabled:w.disabled}:{},...r.progressive?{required:!!w.required,min:Ir(w.min),max:Ir(w.max),minLength:Ir(w.minLength),maxLength:Ir(w.maxLength),pattern:Ir(w.pattern)}:{},name:v,onChange:dt,onBlur:dt,ref:P=>{if(P){Ot(v,w),k=V(i,v);const $=te(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,I=Cg($),Z=k._f.refs||[];if(I?Z.find(ne=>ne===$):$===k._f.ref)return;G(i,v,{_f:{...k._f,...I?{refs:[...Z.filter(No),$,...Array.isArray(V(o,v))?[{}]:[]],ref:{type:$.type,name:v}}:{ref:$}}}),N(v,!1,void 0,$)}else k=V(i,v,{}),k._f&&(k._f.mount=!1),(r.shouldUnregister||w.shouldUnregister)&&!(vg(l.array,v)&&a.action)&&l.unMount.add(v)}}},It=()=>r.shouldFocusError&&Dn(i,Vt,l.mount),Ke=v=>{lt(v)&&(f.state.next({disabled:v}),Dn(i,w=>{w.disabled=v},0,!1))},Nr=(v,w)=>async k=>{k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let M=ze(s);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:P,values:$}=await T();n.errors=P,M=$}else await J(i);ue(n.errors,"root"),Pe(n.errors)?(f.state.next({errors:{}}),await v(M,k)):(w&&await w({...n.errors},k),It(),setTimeout(It)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Pe(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Hn=(v,w={})=>{V(i,v)&&(te(w.defaultValue)?We(v,V(o,v)):(We(v,w.defaultValue),G(o,v,w.defaultValue)),w.keepTouched||ue(n.touchedFields,v),w.keepDirty||(ue(n.dirtyFields,v),n.isDirty=w.defaultValue?R(v,V(o,v)):R()),w.keepError||(ue(n.errors,v),c.isValid&&y()),f.state.next({...n}))},su=(v,w={})=>{const k=v?ze(v):o,M=ze(k),P=v&&!Pe(v)?M:o;if(w.keepDefaultValues||(o=k),!w.keepValues){if(w.keepDirtyValues||p)for(const $ of l.mount)V(n.dirtyFields,$)?G(P,$,V(s,$)):We($,V(P,$));else{if(Vo&&te(v))for(const $ of l.mount){const I=V(i,$);if(I&&I._f){const Z=Array.isArray(I._f.refs)?I._f.refs[0]:I._f.ref;if(Nn(Z)){const ne=Z.closest("form");if(ne){ne.reset();break}}}}i={}}s=e.shouldUnregister?w.keepDefaultValues?ze(o):{}:ze(P),f.array.next({values:{...P}}),f.values.next({values:{...P}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!c.isValid||!!w.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:w.keepSubmitCount?n.submitCount:0,isDirty:w.keepDirty?n.isDirty:!!(w.keepDefaultValues&&!Tt(v,o)),isSubmitted:w.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:w.keepDirtyValues?n.dirtyFields:w.keepDefaultValues&&v?Lo(o,v):{},touchedFields:w.keepTouched?n.touchedFields:{},errors:w.keepErrors?n.errors:{},isSubmitSuccessful:w.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},au=(v,w)=>su(ut(v)?v(s):v,w);return{control:{register:Ot,unregister:rr,getFieldState:Fr,handleSubmit:Nr,setError:Dr,_executeSchema:T,_getWatch:B,_getDirty:R,_updateValid:y,_removeUnmounted:U,_updateFieldArray:C,_updateDisabledField:zn,_getFieldArray:z,_reset:su,_resetDefaultValues:()=>ut(r.defaultValues)&&r.defaultValues().then(v=>{au(v,r.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:v=>{n={...n,...v}},_disableForm:Ke,_subjects:f,_proxyFormState:c,get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(v){a=v},get _defaultValues(){return o},get _names(){return l},set _names(v){l=v},get _formState(){return n},set _formState(v){n=v},get _options(){return r},set _options(v){r={...r,...v}}},trigger:Y,register:Ot,handleSubmit:Nr,watch:Mt,setValue:We,getValues:ft,reset:au,resetField:Hn,clearErrors:Un,unregister:rr,setError:Dr,setFocus:(v,w={})=>{const k=V(i,v),M=k&&k._f;if(M){const P=M.refs?M.refs[0]:M.ref;P.focus&&(P.focus(),w.shouldSelect&&P.select())}},getFieldState:Fr}}function eu(e={}){const t=Te.useRef(),r=Te.useRef(),[n,i]=Te.useState({isDirty:!1,isValidating:!1,isLoading:ut(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:ut(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Vg(e,()=>i(s=>({...s}))),formState:n});const o=t.current.control;return o._options=e,wg({subject:o._subjects.state,next:s=>{bg(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Te.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Te.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==n.isDirty&&o._subjects.state.next({isDirty:s})}},[o,n.isDirty]),Te.useEffect(()=>{e.values&&!Tt(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values):o._resetDefaultValues()},[e.values,o]),Te.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=yg(n,o),t.current}var tu=function(e,t,r){if(e&&"reportValidity"in e){var n=V(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Mg=function(e,t){var r=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?tu(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return tu(s,i,e)})};for(var n in t.fields)r(n)},Og=function(e,t){t.shouldUseNativeValidation&&Mg(e,t);var r={};for(var n in e){var i=V(t.fields,n),o=Object.assign(e[n]||{},{ref:i&&i.ref});if(Fg(t.names||Object.keys(e),n)){var s=Object.assign({},Ig(V(r,n)));G(s,"root",o),G(r,n,s)}else G(r,n,o)}return r},Ig=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Fg=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},Dg=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var i=n.path.map(function(a){return a.key}).join(".");if(r[i]||(r[i]={message:n.message,type:n.validation}),t){var o=r[i].types,s=o&&o[n.validation];r[i]=Rl(i,t,r,n.validation,s?[].concat(s,n.message):n.message)}e.issues.shift()}}return r},ru=function(e,t,r){return r===void 0&&(r={}),function(n,i,o){try{return Promise.resolve(function(s,a){try{var l=function(){function u(c){return{values:r.raw?n:c,errors:{}}}var d=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(ar(e,n,d)):Promise.resolve(Cu(e,n,d)).then(u)}()}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(s instanceof Zn)return{values:{},errors:Og(Dg(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const Ng=27,Lg=12,Rg=10,Bg=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},jg=_o("multiple-choice"),Ug=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return ru(Ze({checked:ds(us(wu()),r=>Object.entries(r).filter(([n,i])=>i).map(([n,i])=>n),[cr(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),fs(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},zg=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{var u,d;const n=e.key?(u=L.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,i=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,{register:o,handleSubmit:s,formState:{errors:a}}=eu({defaultValues:{checked:i?{}:jg(n)?Object.fromEntries(n.value.map(c=>[c,!0])):{}},resolver:Ug(e.config)}),l=Eo();return g("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:c=>{i&&Bg(c.currentTarget)},onSubmit:s(c=>{const f=c.checked;t(f)}),children:[g("div",{class:"flex items-center gap-1",children:[g("ul",{style:{maxHeight:6.5*Ng+5*Lg+2*Rg},class:ct("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((c,f)=>{const p=`checked.${c.value}`,{ref:h,...m}=o(p);return g("li",{class:"relative",children:[g("input",{autoFocus:f===0,ref:b=>{b&&f===0&&(l.current=b),h(b)},id:p,...m,class:"peer sr-only h-full",type:"checkbox"}),g("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:p,children:c.label})]},c.value)})}),g("div",{class:"flex flex-col items-center gap-2",children:[!i&&g(In,{}),e.config.minSelected===0&&g(Fn,{type:"button",onClick:()=>t([])})]})]}),g("div",{class:"px-1",children:g(To,{onAnimationComplete:r,error:(d=a.checked)==null?void 0:d.root})})]})},Hg=({input:e,onSubmitSuccess:t})=>g("div",{class:"flex flex-col items-center py-3",children:g("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 group flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white shadow-[inset_0px_-6px_2px_-1px_oklch(100_0_0/.45),inset_0px_1px_1px_oklch(100_0_0/.3)] outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:shadow-[inset_0px_0px_2px_-1px_oklch(100_0_0/.45),inset_0px_3px_1px_.5px_oklch(0_0_0/.08)] active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:g("span",{class:"relative bottom-[2px] top-[-2px] flex items-center gap-1.5 transition-all duration-300 group-active:bottom-0 group-active:top-0",children:[g("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),g("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:[g("path",{d:"M4 8L8 4L12 8"}),g("path",{d:"M8 4V13"})]})]})})}),tr={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"},Wg=$e(tr.phone,[Pu(/^\+?[0-9 -]+$/,tr.phone)]),Kg={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},qg=_o("text"),Gg=e=>{const t=`Please enter no more than ${e.maxChars} characters`;return ru(Ze({text:{email:$e(tr.email,[Au(tr.email),cr(e.maxChars??1/0,t)]),phone:ds(Wg,r=>r.replace(/[^0-9]/g,""),[cr(e.maxChars??1/0,t)]),text:$e([fs(1,tr.empty),cr(e.maxChars??1/0,t)]),url:$e([Eu(tr.url),cr(e.maxChars??1/0,t)])}[e.format]}))},Yg=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{var c;const n=e.key?(c=L.current$.value.flow)==null?void 0:c.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:o,handleSubmit:s,formState:{errors:a}}=eu({defaultValues:{text:i||(qg(n)?n.value:"")},resolver:Gg(e.config)}),{ref:l,...u}=o("text",{required:!e.config.optional}),d=j();return Ae(()=>{d.current&&(d.current.focus(),d.current.select())},[]),g(Q,{children:g("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(f=>{t(f.text)}),children:[g("div",{class:"flex items-center gap-2",children:[g("div",{class:"relative min-w-0 flex-grow",children:[g("input",{id:"chat-input",...u,...Kg[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:f=>{f&&(d.current=f),l(f)},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&&g(Fn,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),g(In,{})]}),g(To,{onAnimationComplete:r,error:a.text})]})})},Zg=()=>{var i;const e=(i=L.current$.value.flow)==null?void 0:i.data.currentInput,t=j(null),r=ae(()=>{t.current&&(L.inputHeight$.value=t.current.getBoundingClientRect().height)},[]);W(()=>{r()},[e==null?void 0:e.type,r]);const n=o=>s=>Ve.onSubmitSuccessFn$.value({type:o,value:s});return g(kn.div,{initial:{height:0},animate:{height:L.inputHeight$.value},exit:{height:0,opacity:0},onAnimationStart:Ve.scrollToEnd.smooth,onAnimationComplete:Ve.scrollToEnd.smooth,class:"bg-statusbar absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",children:g("div",{ref:t,class:"border-divider border-t",children:Ue({input:e,onHeightChange:r}).with({input:_e.nullish},()=>g("div",{class:"flex items-center gap-2 p-2.5",children:[g("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}),g(In,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},o=>g(Yg,{onSubmitSuccess:n(o.input.type),...o})).with({input:{type:"multiple-choice"}},o=>g(zg,{onSubmitSuccess:n(o.input.type),...o})).with({input:{type:"boolean"}},o=>g(sg,{onSubmitSuccess:n(o.input.type),...o})).with({input:{type:"file"}},o=>g(hg,{onSubmitSuccess:n(o.input.type),...o})).with({input:{type:"submit"}},o=>g(Hg,{onSubmitSuccess:n(o.input.type),...o})).exhaustive()})})},nu=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,iu=ct,ou=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return iu(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const d=r==null?void 0:r[u],c=o==null?void 0:o[u];if(d===null)return null;const f=nu(d)||nu(c);return i[u][f]}),a=r&&Object.entries(r).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:c,className:f,...p}=d;return Object.entries(p).every(h=>{let[m,b]=h;return Array.isArray(b)?b.includes({...o,...a}[m]):{...o,...a}[m]===b})?[...u,c,f]:u},[]);return iu(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},Xg=ou("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"},transitionState:{entering:"opacity-0 translate-y-8",entered:"opacity-100 translate-y-0",exiting:"opacity-0 scale-0",exited:""}},defaultVariants:{side:"left"}}),Qg={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},Jg=({children:e,className:t,transitionState:r,side:n,...i})=>g(kn.p,{variants:Qg,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":r,style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Xg({className:t,side:n,transitionState:r}),...i,children:e}),ey=({className:e,...t})=>(W(()=>{Ve.scrollToEnd.smooth()}),g("div",{"aria-hidden":!0,children:Ve.isBotTyping$.value===!0?g("div",{"aria-label":"Typing…",class:ct("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>g("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),ty={bot:"left",user:"right"},ry=ou("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]"}}}),ny=({lastSentMessageFooter:e})=>{var r;const t=((r=L.current$.value.flow)==null?void 0:r.data.messages)??[];return W(()=>{Ve.scrollToEnd.smooth()},[t.length]),g("ol",{"aria-label":"Chat messages",class:"flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[g(nl,{initial:!1,children:t.map((n,i)=>g(Q,{children:g("li",{class:"flex",children:Ue(n).with({type:"system"},o=>g("p",{class:ry({variant:o.variant}),children:o.text})).with({type:"text",author:_e.union("bot","user")},o=>{const s=o.author==="user"&&!t.slice(i+1).some(a=>a.type==="text"&&a.author==="user");return g(Jg,{side:ty[o.author],children:[o.text,s?e:null]},i)}).with({type:"link"},o=>g("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:g("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:o.href,children:[o.text,g("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g("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"},o=>g("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:o.url,style:{aspectRatio:o.width/o.height}})).with({type:"file"},o=>g(ug,{class:o.author==="bot"?"":"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).exhaustive()})},i))}),g(ey,{},"typing")]})},iy=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=L.current$.value;Xe(n,"Flow is required to exist to show chatbot body");const i=L.viewState$.value,{chatRef:o,chatService:s}=ng(),[a,l]=ie();return Ae(()=>{i==="maximised"&&Ve.scrollToEnd.instant()},[i]),Ae(()=>{const{state:u,flow:d}=L.current$.peek();if(u!=="loaded")throw new Error(Km.invalid_state);let c=d.data.nodeHistory.at(-1);if(Ve.scrollToEnd.instant(),L.setInput(void 0),d.data.isFinished)return;c===void 0?(c=_l(n.nodes).id,L.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:d.data.flowSessionId}})):L.removeMessagesSentByNodeIds([c]);const{interpret:f,abort:p,undo:h}=Bv({context:n.context,analytics:r,apiClient:t,logger:e,flow:n.nodes,chatService:s,getSubmissions:()=>{var m;return(m=L.current$.peek().flow)==null?void 0:m.data.submissions},onInterpret:(m,b)=>{const x=L.current$.peek().flow;Xe(x),b&&(x.data.sequence=x.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:b.id,to_node_id:m.id,sequence:x.data.sequence,flow_session_id:x.data.flowSessionId},customProperties:n.context})),L.setCurrentNodeId(m.id)},onFlowEnd:async()=>{L.markAsFinished();const m=L.current$.peek().flow;Xe(m),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:m.data.flowSessionId},customProperties:n.context})}});return l(()=>h),f(c),p},[r,t,s,e,n]),g(Q,{children:[g("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:L.inputHeight$.value},children:g(ny,{lastSentMessageFooter:n.data.isFinished||!a?null:g(sy,{undoFn:a})})}),g(Zg,{})]})},oy=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"):[],sy=({undoFn:e})=>g("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:g("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}=L.current$.peek();Xe(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(L.removeMessagesSentByNodeIds(n),L.setInput(void 0),n.pop(),n.map(i=>t.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(oy).forEach(i=>delete t.data.submissions[i]),L.current$.value={...L.current$.value})},children:"Undo"})}),ay=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:iy},Symbol.toStringTag,{value:"Module"}))})();
|
|
45
|
+
}`},Ql=({_internal_domManager:e=Ul(),theme:t})=>Ze(({apiClient:r,logger:n,analytics:i})=>{let o=!1;const s=()=>{if(typeof window>"u")return;const a=[T("style",{id:"inploi-chatbot-styles"},jl),T("style",{id:"inploi-chatbot-theme"},Xl(t))],l=e.getOrCreateChatbotElement();lt(T(Y,{},[a,T(Ll,{apiClient:r,logger:n,analytics:i})]),l),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)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(Vl,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(Rl,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{I.cancelCurrentFlow(),I.viewState$.value="maximised",o||s(),a instanceof Promise?(I.current$.value={state:"loading"},a.then(async l=>{const u=Pt(Bl,l);I.startFlow(u)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";I.current$.value={state:"error",error:u}})):I.startFlow(a)}catch(l){n.error("Error starting flow",l)}},startApplication:void 0,closeApplication:void 0,close:async()=>{typeof window>"u"||(I.cancelCurrentFlow(),n.info("Closed flow from an external source"))}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Ql;const ns=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return ns({node:n,nodes:t,stopWhen:r})},Jl=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(a=>a.id===i.branchId);if(!o)return!1;const s=ns({node:o,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},eu=({flow:e,analytics:t,logger:r,context:n,apiClient:i,getSubmissions:o,chatService:s,onFlowEnd:a,onInterpret:l})=>{let u=new AbortController;const h=async(c,p)=>{const b=o();l==null||l(c,p);try{await tu({analytics:t,logger:r,apiClient:i,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 v=m?e.find(_=>_.id===m):Jl({childNode:c,nodes:e});return v?h(v,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 p=e.find(b=>b.id===c)??Xo(e);return h(p)},undo:c=>{let p=1;const b=e.find(v=>v.id===c[c.length-1]);for(let v=c.length-2;v>0;v--){const _=c[v],w=e.find(k=>k.id===_);if(!w||(p++,w.type.startsWith("question-")))break}u.abort(),u=new AbortController;const m=e.find(v=>v.id===c[c.length-p]);return He(m,"Undo failed: new start node not found"),h(m,b),{removed:p}},abort:()=>{u.abort()}}};async function tu(e){return await Te(e).with({node:{type:"text"}},ou).with({node:{type:"image"}},su).with({node:{type:"question-text"}},au).with({node:{type:"question-enum"}},lu).with({node:{type:"question-number"}},cu).with({node:{type:"question-boolean"}},uu).with({node:{type:"question-file"}},pu).with({node:{type:"question-address"}},fu).with({node:{type:"end-flow"}},hu).with({node:{type:"if-block"}},iu).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},nu).with({node:{type:"integration-application-submit"}},ru).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function ru({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:o,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(),h=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:r.data.integrationId,anonymous_id:l,session_id:u,submissions:Sl(o||{})})}).catch(c=>c);await Te(h).with({ats_data:{redirect_url:he.string}},async c=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const p=new URL(c.ats_data.redirect_url);l&&!p.searchParams.has("anonymous_id")&&p.searchParams.set("anonymous_id",l),await e.sendMessage({type:"link",href:p.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 nu({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 iu({submissions:e,next:t,node:r}){const n=vu(r,e)?r.branchId:r.nextId;t(n)}async function ou({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 su({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 au({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:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(r.nextId)}async function cu({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:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:"text"}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(r.nextId)}async function lu({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:"multiple-choice",config:r.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(o=>i.value.includes(o.value)).map(o=>o.label).join(", ")}),t(r.nextId)}async function uu({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:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}})).value;o===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}[o]}),t(r.nextId)}const du=document.createElement("div"),is={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"]},os=Object.keys(is);async function fu({chat:e,next:t,node:r,logger:n}){if(os.every(m=>r.data.keys[m]===null))return t(r.nextId);const{google:i}=window;await e.sendMessage({author:"bot",type:"text",text:r.data.question});const o=async m=>{const v=[{label:"Postcode",key:r.data.keys.postcode,optional:!1,defaultValue:m.postcode},{label:"Line 1",key:r.data.keys.line1,optional:!1,defaultValue:m.line1},{label:"Line 2",key:r.data.keys.line2,optional:!0,defaultValue:m.line2},{label:"Line 3",key:r.data.keys.line3,optional:!0,defaultValue:m.line3},{label:"City",key:r.data.keys.city,optional:!1,defaultValue:m.city},{label:"State/County/Province",key:r.data.keys.state,optional:!0,defaultValue:m.state},{label:"Country",key:r.data.keys.country,optional:!1,defaultValue:m.country}];for(const _ of v){if(_.key===null)continue;await e.sendMessage({author:"bot",type:"text",text:_.label});const{value:w}=await e.userInput({type:"text",key:_.key,config:{format:"text",optional:_.optional,defaultValue:_.defaultValue}});w===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:w})}};if(!ln(window,"google")||!ln(window.google,"maps")||!ln(window.google.maps,"places"))return n.warn("Google maps not available, falling back to manual input."),n.info("If you’d like to use the address autocomplete, please insert the google maps API snippet in your website and make sure it has access to the *places* library."),await o({}),t(r.nextId);const s=new i.maps.places.AutocompleteService,a=new i.maps.places.PlacesService(du),{value:l}=await e.userInput({type:"text",key:"_internal-address-search",config:{format:"text",optional:!1,placeholder:"Search for your address"}});if(l===null)return t(r.id);await e.sendMessage({author:"user",type:"text",text:`Search for “${l}”`});const{predictions:u}=await s.getPlacePredictions({input:l}),{value:[h]}=await e.userInput({type:"multiple-choice",key:void 0,config:{options:u.slice(0,4).map(m=>({label:m.description,value:m.place_id})).concat({label:"None of these",value:"none"}),maxSelected:1,minSelected:1}});if(!h||h==="none")return t(r.id);const c=await new Promise((m,v)=>a.getDetails({placeId:h,fields:["address_components"]},(_,w)=>w!==i.maps.places.PlacesServiceStatus.OK?v(w):_===null?v("ZERO_RESULTS"):m({ok:!0,place:_}))).catch(async m=>(n.error("Failed to get address details",m),{ok:!1}));if(c.ok===!1)return await e.sendMessage({type:"system",variant:"error",text:"Failed to get address details"}),await o({}),t(r.id);const p=c.place.address_components,b=p?os.reduce((m,v)=>{const _=is[v],w=p.filter(k=>k.types.some(P=>_.includes(P))).map(k=>k.long_name).join(", ");return w&&(m[v]=w),m},{}):{};return await e.sendMessage({author:"bot",type:"text",text:"Please confirm or adjust your address:"}),await o(b),t(r.nextId)}async function pu({node:e,chat:t,next:r,submissions:n}){await t.sendMessage({author:"bot",type:"text",text:ot(e.data.question,n)});const i=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(i.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const o of i.value)await t.sendMessage({author:"user",type:"file",fileName:o.name,fileSizeKb:o.sizeKb});r(e.nextId)}async function hu({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const ss=he.union(he.string,he.array(he.string),null),vu=(e,t)=>{const r=t==null?void 0:t[e.data.compareKey];return r?Te({...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:ss}},({compareValue:n,answer:i})=>i.value!==null&&i.value.includes(n)).with({compare:"notContains",answer:{value:ss}},({compareValue:n,answer:i})=>i.value===null||!i.value.includes(n)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},ot=(e,t)=>{const r=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(r,(n,i,o="")=>{i=i.trim();const s=t==null?void 0:t[i];if(!s)return o;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||o}})},yr=({class:e,...t})=>f("button",{class:je("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:f("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[f("title",{children:"Send"}),f("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),f("path",{d:"M8 4V13"})]})}),mu=25,Pn=We({instant:()=>{},smooth:()=>{}}),oe={onSubmitSuccessFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>Pn.value.instant(),smooth:()=>Pn.value.smooth()}},gu=()=>{const e=V(null);we(()=>{Pn.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=be(()=>({send:async({message:r,signal:n,groupId:i})=>{if(await Te(r).with({author:"bot",type:"text"},async o=>{if(n!=null&&n.aborted)throw new Rt;oe.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*mu;await new Promise(a=>setTimeout(a,s,{signal:n})),oe.isBotTyping$.value=!1}).otherwise(async()=>{}),n!=null&&n.aborted)throw new Rt;I.addMessage(r,i)},input:async({input:r,signal:n})=>{if(n!=null&&n.aborted)throw new Rt;return I.setInput(r),await new Promise(i=>{const o=s=>{if(n!=null&&n.aborted)throw new Rt;I.setInput(void 0),r.key&&I.setSubmission(r.key,s),i(s)};oe.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}},_r=({class:e,...t})=>f("button",{type:"button",class:je("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:[f("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[f("title",{children:"Skip"}),f("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),f("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),On=()=>{const e=V(null);return U(()=>{var t;(t=e.current)==null||t.focus()},[]),e},as=["true","false"],bu=ea(as),yu="answer",_u=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{const n=On();return r(),f("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const o=Te(i).with({nativeEvent:{submitter:he.select(he.union(he.instanceOf(HTMLButtonElement),he.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=Pt(bu,o);t(s)},children:[f("div",{class:"flex items-center gap-2 p-2.5",children:as.map((i,o)=>f("button",{ref:o===0?n:null,type:"submit",name:yu,value:i,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:f("p",{class:"truncate text-center text-base",children:e.config.labels[i]})}))}),e.config.optional&&f("div",{class:"px-2 pb-2",children:f(_r,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},In=({error:e,onAnimationComplete:t})=>(we(()=>{e&&t()},[e,t]),e?f("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[f("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),f("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),f("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),f("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null),wu=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}),xu=e=>e.reduce((t,r)=>t+r.sizeKb,0),ku=xn("file"),cs=3,$u=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return f("div",{class:je("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:[f("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[f("span",{class:"block truncate",children:i}),f("span",{children:[".",n]})]}),f("p",{"aria-label":"File size",class:"text-accent-11",children:Lt(e.sizeKb)})]})},ls=({class:e,...t})=>f("li",{class:je("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),us=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Su=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(us(n.name).toLowerCase()))},Eu=(e,t)=>{const r=us(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},Cu=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{var c;const n=(c=I.current$.value.flow)==null?void 0:c.data.submissions[e.key],[i,o]=J(ku(n)&&n.value!==null?n.value:[]),[s,a]=J(),l=i.length-cs,u=xu(i),h=On();return f("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:p=>(p.preventDefault(),a(void 0),i.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!Su({allowedExtensions:e.config.extensions,files:i})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${Lt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&i.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(i)),children:[f("div",{class:"flex items-center gap-2",children:[f("label",{ref:h,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:[i.length>0?f(Y,{children:[f("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,cs).map(p=>{const b=p.name.split(".").pop(),m=p.name.replace(new RegExp(`.${b}$`),"");return f(ls,{class:"flex overflow-hidden",children:[f("span",{class:"block truncate",children:m}),f("span",{children:[".",b]})]})}),l>0?f(ls,{children:["+",l," file",l!==1?"s":""]}):null]}),f("p",{class:"text-neutral-11 text-xs",children:[Lt(u)," ",i.length>1?"total":""]})]}):f("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[f("header",{class:"flex flex-col items-center gap-0",children:[f("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:f("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"})}),f("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?f("p",{class:"text-neutral-10 text-xs",children:["(max ",Lt(e.config.fileSizeLimitKib),")"]}):null]}),f("aside",{class:"flex flex-col items-center gap-2",children:[f("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),f("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(p=>f("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:p.replace(".","")}))})]})]}),f("input",{id:"dropzone-file",onInput:async p=>{He(p.target instanceof HTMLInputElement);const b=p.target.files?Array.from(p.target.files):[],m=await Promise.allSettled(b.map(async _=>{const w=await wu(_);return{name:Eu(_.name,42),data:w,sizeKb:_.size/1e3}}));if(m.some(({status:_})=>_==="rejected"))return a({type:"invalid",message:"Invalid file"});const v=m.map(_=>_.status==="fulfilled"?_.value:null).filter(Boolean);o(v)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),f("div",{class:"flex h-full flex-col items-center gap-2",children:[f(yr,{disabled:i.length===0}),e.config.optional&&f(_r,{onClick:()=>t(null)})]})]}),s&&f(In,{onAnimationComplete:r,error:s})]})};var jt=e=>e.type==="checkbox",wt=e=>e instanceof Date,se=e=>e==null;const ds=e=>typeof e=="object";var Q=e=>!se(e)&&!Array.isArray(e)&&ds(e)&&!wt(e),Au=e=>Q(e)&&e.target?jt(e.target)?e.target.checked:e.target.value:e,Pu=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ou=(e,t)=>e.has(Pu(t)),Iu=e=>{const t=e.constructor&&e.constructor.prototype;return Q(t)&&t.hasOwnProperty("isPrototypeOf")},Dn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ne(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(!(Dn&&(e instanceof Blob||e instanceof FileList))&&(r||Q(e)))if(t=r?[]:{},!r&&!Iu(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Ne(e[n]));else return e;return t}var Ut=e=>Array.isArray(e)?e.filter(Boolean):[],G=e=>e===void 0,E=(e,t,r)=>{if(!t||!Q(e))return r;const n=Ut(t.split(/[,[\].]+?/)).reduce((i,o)=>se(i)?i:i[o],e);return G(n)||n===e?G(e[t])?r:e[t]:n},Ye=e=>typeof e=="boolean";const fs={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ke={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Fe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};xe.createContext(null);var Du=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==ke.all&&(t._proxyFormState[s]=!n||ke.all),r&&(r[s]=!0),e[s]}});return i},ye=e=>Q(e)&&!Object.keys(e).length,Tu=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return ye(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!n||ke.all))},Tn=e=>Array.isArray(e)?e:[e];function Nu(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 Ce=e=>typeof e=="string",Fu=(e,t,r,n,i)=>Ce(e)?(n&&t.watch.add(e),E(r,e,i)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),E(r,o))):(n&&(t.watchAll=!0),r),Nn=e=>/^\w*$/.test(e),ps=e=>Ut(e.replace(/["|']|\]/g,"").split(/\.|\[/));function j(e,t,r){let n=-1;const i=Nn(t)?[t]:ps(t),o=i.length,s=o-1;for(;++n<o;){const a=i[n];let l=r;if(n!==s){const u=e[a];l=Q(u)||Array.isArray(u)?u:isNaN(+i[n+1])?{}:[]}e[a]=l,e=e[a]}return e}var hs=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},vs=e=>({isOnSubmit:!e||e===ke.onSubmit,isOnBlur:e===ke.onBlur,isOnChange:e===ke.onChange,isOnAll:e===ke.all,isOnTouch:e===ke.onTouched}),ms=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const wr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const o=E(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)break;if(s.ref&&t(s.ref,s.name)&&!n)break}else Q(a)&&wr(a,t)}}};var Mu=(e,t,r)=>{const n=Ut(E(e,r));return j(n,"root",t[r]),j(e,r,n),e},Fn=e=>e.type==="file",Ge=e=>typeof e=="function",xr=e=>{if(!Dn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},kr=e=>Ce(e),Mn=e=>e.type==="radio",$r=e=>e instanceof RegExp;const gs={value:!1,isValid:!1},bs={value:!0,isValid:!0};var ys=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&&!G(e[0].attributes.value)?G(e[0].value)||e[0].value===""?bs:{value:e[0].value,isValid:!0}:bs:gs}return gs};const _s={isValid:!1,value:null};var ws=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,_s):_s;function xs(e,t,r="validate"){if(kr(e)||Array.isArray(e)&&e.every(kr)||Ye(e)&&!e)return{type:r,message:kr(e)?e:"",ref:t}}var xt=e=>Q(e)&&!$r(e)?e:{value:e,message:""},ks=async(e,t,r,n,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:h,max:c,pattern:p,validate:b,name:m,valueAsNumber:v,mount:_,disabled:w}=e._f,k=E(t,m);if(!_||w)return{};const P=s?s[0]:o,D=R=>{n&&P.reportValidity&&(P.setCustomValidity(Ye(R)?"":R||""),P.reportValidity())},A={},H=Mn(o),K=jt(o),N=H||K,F=(v||Fn(o))&&G(o.value)&&G(k)||xr(o)&&o.value===""||k===""||Array.isArray(k)&&!k.length,ae=hs.bind(null,m,r,A),ve=(R,M,Z,de=Fe.maxLength,_e=Fe.minLength)=>{const Ae=R?M:Z;A[m]={type:R?de:_e,message:Ae,ref:o,...ae(R?de:_e,Ae)}};if(i?!Array.isArray(k)||!k.length:a&&(!N&&(F||se(k))||Ye(k)&&!k||K&&!ys(s).isValid||H&&!ws(s).isValid)){const{value:R,message:M}=kr(a)?{value:!!a,message:a}:xt(a);if(R&&(A[m]={type:Fe.required,message:M,ref:P,...ae(Fe.required,M)},!r))return D(M),A}if(!F&&(!se(h)||!se(c))){let R,M;const Z=xt(c),de=xt(h);if(!se(k)&&!isNaN(k)){const _e=o.valueAsNumber||k&&+k;se(Z.value)||(R=_e>Z.value),se(de.value)||(M=_e<de.value)}else{const _e=o.valueAsDate||new Date(k),Ae=Cr=>new Date(new Date().toDateString()+" "+Cr),at=o.type=="time",Ht=o.type=="week";Ce(Z.value)&&k&&(R=at?Ae(k)>Ae(Z.value):Ht?k>Z.value:_e>new Date(Z.value)),Ce(de.value)&&k&&(M=at?Ae(k)<Ae(de.value):Ht?k<de.value:_e<new Date(de.value))}if((R||M)&&(ve(!!R,Z.message,de.message,Fe.max,Fe.min),!r))return D(A[m].message),A}if((l||u)&&!F&&(Ce(k)||i&&Array.isArray(k))){const R=xt(l),M=xt(u),Z=!se(R.value)&&k.length>+R.value,de=!se(M.value)&&k.length<+M.value;if((Z||de)&&(ve(Z,R.message,M.message),!r))return D(A[m].message),A}if(p&&!F&&Ce(k)){const{value:R,message:M}=xt(p);if($r(R)&&!k.match(R)&&(A[m]={type:Fe.pattern,message:M,ref:o,...ae(Fe.pattern,M)},!r))return D(M),A}if(b){if(Ge(b)){const R=await b(k,t),M=xs(R,P);if(M&&(A[m]={...M,...ae(Fe.validate,M.message)},!r))return D(M.message),A}else if(Q(b)){let R={};for(const M in b){if(!ye(R)&&!r)break;const Z=xs(await b[M](k,t),P,M);Z&&(R={...Z,...ae(M,Z.message)},D(Z.message),r&&(A[m]=R))}if(!ye(R)&&(A[m]={ref:P,...R},!r))return A}}return D(!0),A};function Lu(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=G(e)?n++:e[t[n++]];return e}function Ru(e){for(const t in e)if(e.hasOwnProperty(t)&&!G(e[t]))return!1;return!0}function re(e,t){const r=Array.isArray(t)?t:Nn(t)?[t]:ps(t),n=r.length===1?e:Lu(e,r),i=r.length-1,o=r[i];return n&&delete n[o],i!==0&&(Q(n)&&ye(n)||Array.isArray(n)&&Ru(n))&&re(e,r.slice(0,-1)),e}function Ln(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Sr=e=>se(e)||!ds(e);function st(e,t){if(Sr(e)||Sr(t))return e===t;if(wt(e)&&wt(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const o=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const s=t[i];if(wt(o)&&wt(s)||Q(o)&&Q(s)||Array.isArray(o)&&Array.isArray(s)?!st(o,s):o!==s)return!1}}return!0}var $s=e=>e.type==="select-multiple",Vu=e=>Mn(e)||jt(e),Rn=e=>xr(e)&&e.isConnected,Ss=e=>{for(const t in e)if(Ge(e[t]))return!0;return!1};function Er(e,t={}){const r=Array.isArray(e);if(Q(e)||r)for(const n in e)Array.isArray(e[n])||Q(e[n])&&!Ss(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Er(e[n],t[n])):se(e[n])||(t[n]=!0);return t}function Es(e,t,r){const n=Array.isArray(e);if(Q(e)||n)for(const i in e)Array.isArray(e[i])||Q(e[i])&&!Ss(e[i])?G(t)||Sr(r[i])?r[i]=Array.isArray(e[i])?Er(e[i],[]):{...Er(e[i])}:Es(e[i],se(t)?{}:t[i],r[i]):r[i]=!st(e[i],t[i]);return r}var Vn=(e,t)=>Es(e,t,Er(t)),Cs=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>G(e)?e:t?e===""?NaN:e&&+e:r&&Ce(e)?new Date(e):n?n(e):e;function Bn(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Fn(t)?t.files:Mn(t)?ws(e.refs).value:$s(t)?[...t.selectedOptions].map(({value:r})=>r):jt(t)?ys(e.refs).value:Cs(G(t.value)?e.ref.value:t.value,e)}var Bu=(e,t,r,n)=>{const i={};for(const o of e){const s=E(t,o);s&&j(i,o,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},zt=e=>G(e)?e:$r(e)?e.source:Q(e)?$r(e.value)?e.value.source:e.value:e,ju=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function As(e,t,r){const n=E(e,r);if(n||Nn(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const o=i.join("."),s=E(t,o),a=E(e,o);if(s&&!Array.isArray(s)&&r!==o)return{name:r};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:r}}var Uu=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,zu=(e,t)=>!Ut(E(e,t)).length&&re(e,t);const Hu={mode:ke.onSubmit,reValidateMode:ke.onChange,shouldFocusError:!0};function Wu(e={},t){let r={...Hu,...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},i={},o=Q(r.defaultValues)||Q(r.values)?Ne(r.defaultValues||r.values)||{}:{},s=r.shouldUnregister?{}:Ne(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,h=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:Ln(),array:Ln(),state:Ln()},b=e.resetOptions&&e.resetOptions.keepDirtyValues,m=vs(r.mode),v=vs(r.reValidateMode),_=r.criteriaMode===ke.all,w=d=>g=>{clearTimeout(h),h=setTimeout(d,g)},k=async d=>{if(c.isValid||d){const g=r.resolver?ye((await F()).errors):await ve(i,!0);g!==n.isValid&&p.state.next({isValid:g})}},P=d=>c.isValidating&&p.state.next({isValidating:d}),D=(d,g=[],y,C,$=!0,x=!0)=>{if(C&&y){if(a.action=!0,x&&Array.isArray(E(i,d))){const O=y(E(i,d),C.argA,C.argB);$&&j(i,d,O)}if(x&&Array.isArray(E(n.errors,d))){const O=y(E(n.errors,d),C.argA,C.argB);$&&j(n.errors,d,O),zu(n.errors,d)}if(c.touchedFields&&x&&Array.isArray(E(n.touchedFields,d))){const O=y(E(n.touchedFields,d),C.argA,C.argB);$&&j(n.touchedFields,d,O)}c.dirtyFields&&(n.dirtyFields=Vn(o,s)),p.state.next({name:d,isDirty:M(d,g),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else j(s,d,g)},A=(d,g)=>{j(n.errors,d,g),p.state.next({errors:n.errors})},H=(d,g,y,C)=>{const $=E(i,d);if($){const x=E(s,d,G(y)?E(o,d):y);G(x)||C&&C.defaultChecked||g?j(s,d,g?x:Bn($._f)):_e(d,x),a.mount&&k()}},K=(d,g,y,C,$)=>{let x=!1,O=!1;const z={name:d};if(!y||C){c.isDirty&&(O=n.isDirty,n.isDirty=z.isDirty=M(),x=O!==z.isDirty);const X=st(E(o,d),g);O=E(n.dirtyFields,d),X?re(n.dirtyFields,d):j(n.dirtyFields,d,!0),z.dirtyFields=n.dirtyFields,x=x||c.dirtyFields&&O!==!X}if(y){const X=E(n.touchedFields,d);X||(j(n.touchedFields,d,y),z.touchedFields=n.touchedFields,x=x||c.touchedFields&&X!==y)}return x&&$&&p.state.next(z),x?z:{}},N=(d,g,y,C)=>{const $=E(n.errors,d),x=c.isValid&&Ye(g)&&n.isValid!==g;if(e.delayError&&y?(u=w(()=>A(d,y)),u(e.delayError)):(clearTimeout(h),u=null,y?j(n.errors,d,y):re(n.errors,d)),(y?!st($,y):$)||!ye(C)||x){const O={...C,...x&&Ye(g)?{isValid:g}:{},errors:n.errors,name:d};n={...n,...O},p.state.next(O)}P(!1)},F=async d=>r.resolver(s,r.context,Bu(d||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),ae=async d=>{const{errors:g}=await F(d);if(d)for(const y of d){const C=E(g,y);C?j(n.errors,y,C):re(n.errors,y)}else n.errors=g;return g},ve=async(d,g,y={valid:!0})=>{for(const C in d){const $=d[C];if($){const{_f:x,...O}=$;if(x){const z=l.array.has(x.name),X=await ks($,s,_,r.shouldUseNativeValidation&&!g,z);if(X[x.name]&&(y.valid=!1,g))break;!g&&(E(X,x.name)?z?Mu(n.errors,X,x.name):j(n.errors,x.name,X[x.name]):re(n.errors,x.name))}O&&await ve(O,g,y)}}return y.valid},R=()=>{for(const d of l.unMount){const g=E(i,d);g&&(g._f.refs?g._f.refs.every(y=>!Rn(y)):!Rn(g._f.ref))&&Un(d)}l.unMount=new Set},M=(d,g)=>(d&&g&&j(s,d,g),!st(Ds(),o)),Z=(d,g,y)=>Fu(d,l,{...a.mount?s:G(g)?o:Ce(d)?{[d]:g}:g},y,g),de=d=>Ut(E(a.mount?s:o,d,e.shouldUnregister?E(o,d,[]):[])),_e=(d,g,y={})=>{const C=E(i,d);let $=g;if(C){const x=C._f;x&&(!x.disabled&&j(s,d,Cs(g,x)),$=xr(x.ref)&&se(g)?"":g,$s(x.ref)?[...x.ref.options].forEach(O=>O.selected=$.includes(O.value)):x.refs?jt(x.ref)?x.refs.length>1?x.refs.forEach(O=>(!O.defaultChecked||!O.disabled)&&(O.checked=Array.isArray($)?!!$.find(z=>z===O.value):$===O.value)):x.refs[0]&&(x.refs[0].checked=!!$):x.refs.forEach(O=>O.checked=O.value===$):Fn(x.ref)?x.ref.value="":(x.ref.value=$,x.ref.type||p.values.next({name:d,values:{...s}})))}(y.shouldDirty||y.shouldTouch)&&K(d,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&jn(d)},Ae=(d,g,y)=>{for(const C in g){const $=g[C],x=`${d}.${C}`,O=E(i,x);(l.array.has(d)||!Sr($)||O&&!O._f)&&!wt($)?Ae(x,$,y):_e(x,$,y)}},at=(d,g,y={})=>{const C=E(i,d),$=l.array.has(d),x=Ne(g);j(s,d,x),$?(p.array.next({name:d,values:{...s}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&p.state.next({name:d,dirtyFields:Vn(o,s),isDirty:M(d,x)})):C&&!C._f&&!se(x)?Ae(d,x,y):_e(d,x,y),ms(d,l)&&p.state.next({...n}),p.values.next({name:d,values:{...s}}),!a.mount&&t()},Ht=async d=>{const g=d.target;let y=g.name,C=!0;const $=E(i,y),x=()=>g.type?Bn($._f):Au(d),O=z=>{C=Number.isNaN(z)||z===E(s,y,z)};if($){let z,X;const Ar=x(),$t=d.type===fs.BLUR||d.type===fs.FOCUS_OUT,Sd=!ju($._f)&&!r.resolver&&!E(n.errors,y)&&!$._f.deps||Uu($t,E(n.touchedFields,y),n.isSubmitted,v,m),Hn=ms(y,l,$t);j(s,y,Ar),$t?($._f.onBlur&&$._f.onBlur(d),u&&u(0)):$._f.onChange&&$._f.onChange(d);const Wn=K(y,Ar,$t,!1),Ed=!ye(Wn)||Hn;if(!$t&&p.values.next({name:y,type:d.type,values:{...s}}),Sd)return c.isValid&&k(),Ed&&p.state.next({name:y,...Hn?{}:Wn});if(!$t&&Hn&&p.state.next({...n}),P(!0),r.resolver){const{errors:Bs}=await F([y]);if(O(Ar),C){const Cd=As(n.errors,i,y),js=As(Bs,i,Cd.name||y);z=js.error,y=js.name,X=ye(Bs)}}else z=(await ks($,s,_,r.shouldUseNativeValidation))[y],O(Ar),C&&(z?X=!1:c.isValid&&(X=await ve(i,!0)));C&&($._f.deps&&jn($._f.deps),N(y,X,z,Wn))}},Cr=(d,g)=>{if(E(n.errors,g)&&d.focus)return d.focus(),1},jn=async(d,g={})=>{let y,C;const $=Tn(d);if(P(!0),r.resolver){const x=await ae(G(d)?d:$);y=ye(x),C=d?!$.some(O=>E(x,O)):y}else d?(C=(await Promise.all($.map(async x=>{const O=E(i,x);return await ve(O&&O._f?{[x]:O}:O)}))).every(Boolean),!(!C&&!n.isValid)&&k()):C=y=await ve(i);return p.state.next({...!Ce(d)||c.isValid&&y!==n.isValid?{}:{name:d},...r.resolver||!d?{isValid:y}:{},errors:n.errors,isValidating:!1}),g.shouldFocus&&!C&&wr(i,Cr,d?$:l.mount),C},Ds=d=>{const g={...o,...a.mount?s:{}};return G(d)?g:Ce(d)?E(g,d):d.map(y=>E(g,y))},Ts=(d,g)=>({invalid:!!E((g||n).errors,d),isDirty:!!E((g||n).dirtyFields,d),isTouched:!!E((g||n).touchedFields,d),error:E((g||n).errors,d)}),wd=d=>{d&&Tn(d).forEach(g=>re(n.errors,g)),p.state.next({errors:d?n.errors:{}})},Ns=(d,g,y)=>{const C=(E(i,d,{_f:{}})._f||{}).ref;j(n.errors,d,{...g,ref:C}),p.state.next({name:d,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&C&&C.focus&&C.focus()},xd=(d,g)=>Ge(d)?p.values.subscribe({next:y=>d(Z(void 0,g),y)}):Z(d,g,!0),Un=(d,g={})=>{for(const y of d?Tn(d):l.mount)l.mount.delete(y),l.array.delete(y),g.keepValue||(re(i,y),re(s,y)),!g.keepError&&re(n.errors,y),!g.keepDirty&&re(n.dirtyFields,y),!g.keepTouched&&re(n.touchedFields,y),!r.shouldUnregister&&!g.keepDefaultValue&&re(o,y);p.values.next({values:{...s}}),p.state.next({...n,...g.keepDirty?{isDirty:M()}:{}}),!g.keepIsValid&&k()},Fs=({disabled:d,name:g,field:y,fields:C,value:$})=>{if(Ye(d)){const x=d?void 0:G($)?Bn(y?y._f:E(C,g)._f):$;j(s,g,x),K(g,x,!1,!1,!0)}},zn=(d,g={})=>{let y=E(i,d);const C=Ye(g.disabled);return j(i,d,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:d}},name:d,mount:!0,...g}}),l.mount.add(d),y?Fs({field:y,disabled:g.disabled,name:d}):H(d,!0,g.value),{...C?{disabled:g.disabled}:{},...r.progressive?{required:!!g.required,min:zt(g.min),max:zt(g.max),minLength:zt(g.minLength),maxLength:zt(g.maxLength),pattern:zt(g.pattern)}:{},name:d,onChange:Ht,onBlur:Ht,ref:$=>{if($){zn(d,g),y=E(i,d);const x=G($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,O=Vu(x),z=y._f.refs||[];if(O?z.find(X=>X===x):x===y._f.ref)return;j(i,d,{_f:{...y._f,...O?{refs:[...z.filter(Rn),x,...Array.isArray(E(o,d))?[{}]:[]],ref:{type:x.type,name:d}}:{ref:x}}}),H(d,!1,void 0,x)}else y=E(i,d,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||g.shouldUnregister)&&!(Ou(l.array,d)&&a.action)&&l.unMount.add(d)}}},Ms=()=>r.shouldFocusError&&wr(i,Cr,l.mount),kd=d=>{Ye(d)&&(p.state.next({disabled:d}),wr(i,g=>{g.disabled=d},0,!1))},Ls=(d,g)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let C=Ne(s);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:x}=await F();n.errors=$,C=x}else await ve(i);re(n.errors,"root"),ye(n.errors)?(p.state.next({errors:{}}),await d(C,y)):(g&&await g({...n.errors},y),Ms(),setTimeout(Ms)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ye(n.errors),submitCount:n.submitCount+1,errors:n.errors})},$d=(d,g={})=>{E(i,d)&&(G(g.defaultValue)?at(d,E(o,d)):(at(d,g.defaultValue),j(o,d,g.defaultValue)),g.keepTouched||re(n.touchedFields,d),g.keepDirty||(re(n.dirtyFields,d),n.isDirty=g.defaultValue?M(d,E(o,d)):M()),g.keepError||(re(n.errors,d),c.isValid&&k()),p.state.next({...n}))},Rs=(d,g={})=>{const y=d?Ne(d):o,C=Ne(y),$=d&&!ye(d)?C:o;if(g.keepDefaultValues||(o=y),!g.keepValues){if(g.keepDirtyValues||b)for(const x of l.mount)E(n.dirtyFields,x)?j($,x,E(s,x)):at(x,E($,x));else{if(Dn&&G(d))for(const x of l.mount){const O=E(i,x);if(O&&O._f){const z=Array.isArray(O._f.refs)?O._f.refs[0]:O._f.ref;if(xr(z)){const X=z.closest("form");if(X){X.reset();break}}}}i={}}s=e.shouldUnregister?g.keepDefaultValues?Ne(o):{}:Ne($),p.array.next({values:{...$}}),p.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,p.state.next({submitCount:g.keepSubmitCount?n.submitCount:0,isDirty:g.keepDirty?n.isDirty:!!(g.keepDefaultValues&&!st(d,o)),isSubmitted:g.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:g.keepDirtyValues?n.dirtyFields:g.keepDefaultValues&&d?Vn(o,d):{},touchedFields:g.keepTouched?n.touchedFields:{},errors:g.keepErrors?n.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Vs=(d,g)=>Rs(Ge(d)?d(s):d,g);return{control:{register:zn,unregister:Un,getFieldState:Ts,handleSubmit:Ls,setError:Ns,_executeSchema:F,_getWatch:Z,_getDirty:M,_updateValid:k,_removeUnmounted:R,_updateFieldArray:D,_updateDisabledField:Fs,_getFieldArray:de,_reset:Rs,_resetDefaultValues:()=>Ge(r.defaultValues)&&r.defaultValues().then(d=>{Vs(d,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:d=>{n={...n,...d}},_disableForm:kd,_subjects:p,_proxyFormState:c,get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(d){a=d},get _defaultValues(){return o},get _names(){return l},set _names(d){l=d},get _formState(){return n},set _formState(d){n=d},get _options(){return r},set _options(d){r={...r,...d}}},trigger:jn,register:zn,handleSubmit:Ls,watch:xd,setValue:at,getValues:Ds,reset:Vs,resetField:$d,clearErrors:wd,unregister:Un,setError:Ns,setFocus:(d,g={})=>{const y=E(i,d),C=y&&y._f;if(C){const $=C.refs?C.refs[0]:C.ref;$.focus&&($.focus(),g.shouldSelect&&$.select())}},getFieldState:Ts}}function Ps(e={}){const t=xe.useRef(),r=xe.useRef(),[n,i]=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={...Wu(e,()=>i(s=>({...s}))),formState:n});const o=t.current.control;return o._options=e,Nu({subject:o._subjects.state,next:s=>{Tu(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),xe.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),xe.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==n.isDirty&&o._subjects.state.next({isDirty:s})}},[o,n.isDirty]),xe.useEffect(()=>{e.values&&!st(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values):o._resetDefaultValues()},[e.values,o]),xe.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Du(n,o),t.current}var Os=function(e,t,r){if(e&&"reportValidity"in e){var n=E(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Ku=function(e,t){var r=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Os(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return Os(s,i,e)})};for(var n in t.fields)r(n)},qu=function(e,t){t.shouldUseNativeValidation&&Ku(e,t);var r={};for(var n in e){var i=E(t.fields,n),o=Object.assign(e[n]||{},{ref:i&&i.ref});if(Gu(t.names||Object.keys(e),n)){var s=Object.assign({},Yu(E(r,n)));j(s,"root",o),j(r,n,s)}else j(r,n,o)}return r},Yu=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Gu=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},Zu=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var i=n.path.map(function(a){return a.key}).join(".");if(r[i]||(r[i]={message:n.message,type:n.validation}),t){var o=r[i].types,s=o&&o[n.validation];r[i]=hs(i,t,r,n.validation,s?[].concat(s,n.message):n.message)}e.issues.shift()}}return r},Is=function(e,t,r){return r===void 0&&(r={}),function(n,i,o){try{return Promise.resolve(function(s,a){try{var l=function(){function u(c){return{values:r.raw?n:c,errors:{}}}var h=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(Pt(e,n,h)):Promise.resolve(na(e,n,h)).then(u)}()}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(s instanceof Tr)return{values:{},errors:qu(Zu(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const Xu=27,Qu=12,Ju=10,ed=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},td=xn("multiple-choice"),rd=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Is(Ve({checked:vi(hi(Qs()),r=>Object.entries(r).filter(([n,i])=>i).map(([n,i])=>n),[Ot(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),mi(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},nd=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{var u,h;const n=e.key?(u=I.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,i=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,{register:o,handleSubmit:s,formState:{errors:a}}=Ps({defaultValues:{checked:i?{}:td(n)?Object.fromEntries(n.value.map(c=>[c,!0])):{}},resolver:rd(e.config)}),l=On();return f("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:c=>{i&&ed(c.currentTarget)},onSubmit:s(c=>{const p=c.checked;t(p)}),children:[f("div",{class:"flex items-center gap-1",children:[f("ul",{style:{maxHeight:6.5*Xu+5*Qu+2*Ju},class:je("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((c,p)=>{const b=`checked.${c.value}`,{ref:m,...v}=o(b);return f("li",{class:"relative",children:[f("input",{autoFocus:p===0,ref:_=>{_&&p===0&&(l.current=_),m(_)},id:b,...v,class:"peer sr-only h-full",type:"checkbox"}),f("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:b,children:c.label})]},c.value)})}),f("div",{class:"flex flex-col items-center gap-2",children:[!i&&f(yr,{}),e.config.minSelected===0&&f(_r,{type:"button",onClick:()=>t([])})]})]}),f("div",{class:"px-1",children:f(In,{onAnimationComplete:r,error:(h=a.checked)==null?void 0:h.root})})]})},id=({input:e,onSubmitSuccess:t})=>f("div",{class:"flex flex-col items-center py-3",children:f("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:f("span",{class:"flex items-center gap-1.5",children:[f("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),f("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:[f("path",{d:"M4 8L8 4L12 8"}),f("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"},od=ge(kt.phone,[sa(/^\+?[0-9 -]+$/,kt.phone)]),sd={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},ad=xn("text"),cd=e=>{const t=`Please enter no more than ${e.maxChars} characters`;return Is(Ve({text:{email:ge(kt.email,[oa(kt.email),Ot(e.maxChars??1/0,t)]),phone:vi(od,r=>r.replace(/[^0-9]/g,""),[Ot(e.maxChars??1/0,t)]),text:ge([mi(1,kt.empty),Ot(e.maxChars??1/0,t)]),url:ge([aa(kt.url),Ot(e.maxChars??1/0,t)])}[e.format]}))},ld=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{var c;const n=e.key?(c=I.current$.value.flow)==null?void 0:c.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:o,handleSubmit:s,formState:{errors:a}}=Ps({defaultValues:{text:i||(ad(n)?n.value:"")},resolver:cd(e.config)}),{ref:l,...u}=o("text",{required:!e.config.optional}),h=V();return we(()=>{h.current&&(h.current.focus(),h.current.select())},[]),f(Y,{children:f("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(p=>{t(p.text)}),children:[f("div",{class:"flex items-center gap-2",children:[f("div",{class:"relative min-w-0 flex-grow",children:[f("input",{id:"chat-input",...u,...sd[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(h.current=p),l(p)},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&&f(_r,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),f(yr,{})]}),f(In,{onAnimationComplete:r,error:a.text})]})})},ud=()=>{var o;const e=(o=I.current$.value.flow)==null?void 0:o.data.currentInput,t=V(null),r=V(null),n=le(()=>{r.current&&(I.inputHeight$.value=r.current.getBoundingClientRect().height)},[]);U(()=>{n()},[e==null?void 0:e.type,n]),U(()=>{const s=t.current;if(s)return s.addEventListener("transitionstart",oe.scrollToEnd.smooth),s.addEventListener("transitioncancel",oe.scrollToEnd.smooth),s.addEventListener("transitionend",oe.scrollToEnd.smooth),()=>{s.removeEventListener("transitionstart",oe.scrollToEnd.smooth),s.removeEventListener("transitioncancel",oe.scrollToEnd.smooth),s.removeEventListener("transitionend",oe.scrollToEnd.smooth)}},[]);const i=s=>a=>oe.onSubmitSuccessFn$.value({type:s,value:a});return f("div",{ref:t,style:{height:I.inputHeight$.value},class:"bg-statusbar ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150 transition-all duration-700",children:f("div",{ref:r,class:"border-divider border-t",children:Te({input:e,onHeightChange:n}).with({input:he.nullish},()=>f("div",{class:"flex items-center gap-2 p-2.5",children:[f("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}),f(yr,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>f(ld,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>f(nd,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"boolean"}},s=>f(_u,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"file"}},s=>f(Cu,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"submit"}},s=>f(id,{onSubmitSuccess:i(s.input.type),...s})).exhaustive()})})},dd=nn("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"}}),fd=({children:e,className:t,animate:r,side:n,...i})=>f("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:dd({className:t,side:n,animate:r}),...i,children:e}),pd=({className:e,...t})=>(U(()=>{oe.scrollToEnd.smooth()}),f("div",{"aria-hidden":!0,children:oe.isBotTyping$.value===!0?f("div",{"aria-label":"Typing…",class:je("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>f("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),hd={bot:"left",user:"right"},vd=nn("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]"}}}),md=({lastSentMessageFooter:e})=>{var r;const t=((r=I.current$.value.flow)==null?void 0:r.data.messages)??[];return U(()=>{oe.scrollToEnd.smooth()},[t.length]),f("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,i)=>f(Y,{children:f("li",{class:"flex",children:Te(n).with({type:"system"},o=>f("p",{class:vd({variant:o.variant}),children:o.text})).with({type:"text",author:he.union("bot","user")},o=>{const s=o.author==="user"&&!t.slice(i+1).some(l=>l.type==="text"&&l.author==="user"),a=i===t.length-1;return f(fd,{animate:a,side:hd[o.author],children:[o.text,s?e:null]},i)}).with({type:"link"},o=>f("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:f("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:o.href,children:[o.text,f("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f("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"},o=>f("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:o.url,style:{aspectRatio:o.width/o.height}})).with({type:"file"},o=>f($u,{class:o.author==="bot"?"":"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).exhaustive()})},i)),f(pd,{},"typing")]})},gd=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=I.current$.value;He(n,"Flow is required to exist to show chatbot body");const i=I.viewState$.value,{chatRef:o,chatService:s}=gu(),[a,l]=J();return we(()=>{i==="maximised"&&oe.scrollToEnd.instant()},[i]),we(()=>{const{state:u,flow:h}=I.current$.peek();if(u!=="loaded")throw new Error(al.invalid_state);let c=h.data.nodeHistory.at(-1);if(oe.scrollToEnd.instant(),I.setInput(void 0),h.data.isFinished)return;c===void 0?(c=Xo(n.nodes).id,I.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:h.data.flowSessionId},customProperties:n.context})):I.removeMessagesSentByNodeIds([c]);const{interpret:p,abort:b,undo:m}=eu({context:n.context,analytics:r,apiClient:t,logger:e,flow:n.nodes,chatService:s,getSubmissions:()=>{var v;return(v=I.current$.peek().flow)==null?void 0:v.data.submissions},onInterpret:(v,_)=>{const w=I.current$.peek().flow;He(w),_&&(w.data.sequence=w.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:_.id,to_node_id:v.id,sequence:w.data.sequence,flow_session_id:w.data.flowSessionId},customProperties:n.context})),I.setCurrentNodeId(v.id)},onFlowEnd:async()=>{I.markAsFinished();const v=I.current$.peek().flow;He(v),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:v.data.flowSessionId},customProperties:n.context})}});return l(()=>m),p(c),b},[r,t,s,e,n]),f(Y,{children:[f("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:I.inputHeight$.value},children:f(md,{lastSentMessageFooter:n.data.isFinished||!a?null:f(yd,{undoFn:a})})}),f(ud,{})]})},bd=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"):[],yd=({undoFn:e})=>f("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:f("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=I.current$.peek();He(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(I.removeMessagesSentByNodeIds(n),I.setInput(void 0),n.pop(),n.map(i=>t.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(bd).forEach(i=>delete t.data.submissions[i]),I.current$.value={...I.current$.value})},children:"Undo"})}),_d=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:gd},Symbol.toStringTag,{value:"Module"}))})();
|