@inploi/plugin-chatbot 13.1.0 → 14.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +7 -3
- package/cdn/style.css +1 -1
- package/dist/{chatbot-body-02c464c0.js → chatbot-body-77c91e40.js} +1707 -1599
- package/dist/chatbot-body-a078e4eb.cjs +5 -0
- package/dist/chatbot.idb.d.ts +1 -0
- package/dist/chatbot.state.d.ts +48 -0
- package/dist/chatbot.utils.d.ts +37 -0
- package/dist/components/correction.test.d.ts +1 -0
- package/dist/i18n.d.ts +24 -18
- package/dist/{index-fc976df1.js → index-21fc767e.js} +919 -867
- package/dist/index-bc9b2b2e.cjs +5 -0
- package/dist/interpreter.d.ts +2 -1
- package/dist/mocks/pre-apply.mock.d.ts +296 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/style/tokens.d.ts +4 -4
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/dist/chatbot-body-9dd967cb.cjs +0 -1
- package/dist/index-a3ad2e04.cjs +0 -5
package/cdn/index.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
(function(){"use strict";var je;function en(e){return{lang:(e==null?void 0:e.lang)??(je==null?void 0:je.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(je==null?void 0:je.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(je==null?void 0:je.abortPipeEarly)}}var Dr;function os(e){return Dr==null?void 0:Dr.get(e)}var Vr;function ss(e){return Vr==null?void 0:Vr.get(e)}var Mr;function ls(e,t){var r;return(r=Mr==null?void 0:Mr.get(e))==null?void 0:r.get(t)}function tn(e){var r,i;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function Fe(e,t,r,i,n){let a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??tn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??ls(e.reference,l.lang)??(d?ss(l.lang):null)??i.message??os(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ve(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},en())}}}function cs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function us(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function rn(e){return{kind:"transformation",type:"transform",reference:rn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function ds(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Pr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function nn(){return{kind:"schema",type:"any",reference:nn,expects:"any",async:!1,get"~standard"(){return ve(this)},"~run"(e){return e.typed=!0,e}}}function an(e,t){return{kind:"schema",type:"array",reference:an,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ve(this)},"~run"(r,i){var a;let n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){let s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){let d={type:"array",origin:"value",input:n,key:o,value:s};for(let p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Fe(this,"type",r,i);return r}}}function Or(e){return{kind:"schema",type:"boolean",reference:Or,expects:"boolean",async:!1,message:e,get"~standard"(){return ve(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Fe(this,"type",t,r),t}}}function ir(e,t){return{kind:"schema",type:"literal",reference:ir,expects:tn(e),async:!1,literal:e,message:t,get"~standard"(){return ve(this)},"~run"(r,i){return r.value===this.literal?r.typed=!0:Fe(this,"type",r,i),r}}}function nr(e,t){return{kind:"schema",type:"nullable",reference:nr,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ve(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=Pr(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function ar(e){return{kind:"schema",type:"number",reference:ar,expects:"number",async:!1,message:e,get"~standard"(){return ve(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Fe(this,"type",t,r),t}}}function le(e,t){return{kind:"schema",type:"object",reference:le,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ve(this)},"~run"(r,i){var a;let n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in n?n[o]:Pr(s),d=s["~run"]({value:l},i);if(d.issues){let p={type:"object",origin:"value",input:n,key:o,value:l};for(let u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=ds(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Fe(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else Fe(this,"type",r,i);return r}}}function Te(e,t){return{kind:"schema",type:"optional",reference:Te,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ve(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=Pr(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function on(e,t,r){return{kind:"schema",type:"record",reference:on,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ve(this)},"~run"(i,n){var o,s;let a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(let l in a)if(cs(a,l)){let d=a[l],p=this.key["~run"]({value:l},n);if(p.issues){let h={type:"object",origin:"key",input:a,key:l,value:d};for(let b of p.issues)b.path=[h],(o=i.issues)==null||o.push(b);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}let u=this.value["~run"]({value:d},n);if(u.issues){let h={type:"object",origin:"value",input:a,key:l,value:d};for(let b of u.issues)b.path?b.path.unshift(h):b.path=[h],(s=i.issues)==null||s.push(b);if(i.issues||(i.issues=u.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!u.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=u.value)}}else Fe(this,"type",i,n);return i}}}function xe(e){return{kind:"schema",type:"string",reference:xe,expects:"string",async:!1,message:e,get"~standard"(){return ve(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Fe(this,"type",t,r),t}}}function sn(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function Lr(e,t){return{kind:"schema",type:"union",reference:Lr,expects:us(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return ve(this)},"~run"(r,i){let n,a,o;for(let s of this.options){let l=s["~run"]({value:r.value},i);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(a){if(a.length===1)return a[0];Fe(this,"type",r,i,{issues:sn(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Fe(this,"type",r,i,{issues:sn(o)})}return r}}}function ln(){return{kind:"schema",type:"unknown",reference:ln,expects:"unknown",async:!1,get"~standard"(){return ve(this)},"~run"(e){return e.typed=!0,e}}}function fs(...e){return{...e[0],pipe:e,get"~standard"(){return ve(this)},"~run"(t,r){for(let i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function cn(e,t,r){let i=e["~run"]({value:t},en(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}var ps=e=>({ok:!0,err:!1,val:e}),hs=e=>({err:!0,ok:!1,val:e}),Tt=(e,t)=>{if(t.length===0)return;let r=e;for(let i of t){if(r==null||typeof r!="object")return;r=r[i]}return r},gs=(e,t="all")=>{let r={},i=t==="all"?null:new Set(t);for(let n in e){let a=e[n];a&&(i&&!i.has(n)||(r[n]=a.value))}return r},bs=({key:e,submissions:t})=>{var i;let r=(i=t[e])==null?void 0:i.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},un=({key:e,path:t,submissions:r,context:i})=>{if(e==="$context"){if(!t)return;let n=Tt(i,t);switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${t.join(".")}`,n);return}}return r[e]},vs=e=>{let t=e.split(".").pop();return t?ps(t?"."+t:""):hs("No file extension found")},ws=(e,t)=>{if(t.length===0)return!0;let r=t.map(i=>i.toLowerCase());return e.every(i=>{let n=vs(i.name);return n.ok&&r.includes(n.val.toLowerCase())})},Nt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,or=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,ms=le({integration_response:le({data:le({redirect_url:xe(),message:Te(nr(xe())),button_text:Te(nr(xe()))})})}),ys=e=>cn(ms,e).success,_s=le({integration_response:le({error:le({message:xe()})})}),xs=e=>cn(_s,e).success;le({success:ir(!1),message:Te(ln())});var ks=e=>{if(typeof e!="object"||e===null)return null;let t=e.integration_response;if(typeof t!="object"||t===null)return null;let r=t;if(typeof r.status!="number"||r.service!==void 0&&typeof r.service!="string")return null;let i="data"in r,n=r.error,a=typeof n=="object"&&n!==null&&typeof n.message=="string"&&"data"in n;if(!i&&!a)return null;let o=i?r.data:n.data??null;return{service:r.service??"INVALID_SERVICE",response:{status:r.status,payload:o}}},Ss=({context:e,schema:t,logger:r})=>{if(t)for(let i in t){let n=t[i];if(!n)continue;let a=Tt(e,i.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${i} is required`;throw r.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${i} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${i} is not a string`);break;default:n.type}}};let Re;function dn(e){return{lang:(e==null?void 0:e.lang)??(Re==null?void 0:Re.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Re==null?void 0:Re.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Re==null?void 0:Re.abortPipeEarly)}}let jr;function Cs(e){return jr==null?void 0:jr.get(e)}let Rr;function Es(e){return Rr==null?void 0:Rr.get(e)}let Br;function $s(e,t){var r;return(r=Br==null?void 0:Br.get(e))==null?void 0:r.get(t)}function fn(e){var r,i;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function Ne(e,t,r,i,n){const a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??fn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??$s(e.reference,l.lang)??(d?Es(l.lang):null)??i.message??Cs(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ke(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},dn())}}}function Is(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function As(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function zr(e,t){return{kind:"validation",type:"max_length",reference:zr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&Ne(this,"length",r,i,{received:`${r.value.length}`}),r}}}function sr(e,t){return{kind:"validation",type:"min_length",reference:sr,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&Ne(this,"length",r,i,{received:`${r.value.length}`}),r}}}function Ur(){return{kind:"transformation",type:"trim",reference:Ur,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Fs(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function lr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function pn(e,t){return{kind:"schema",type:"array",reference:pn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ke(this)},"~run"(r,i){var a;const n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){const d={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Ne(this,"type",r,i);return r}}}function qr(e){return{kind:"schema",type:"boolean",reference:qr,expects:"boolean",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ne(this,"type",t,r),t}}}function z(e,t){return{kind:"schema",type:"nullable",reference:z,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=lr(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Dt(e,t){return{kind:"schema",type:"nullish",reference:Dt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,i){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=lr(this,r,i)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function st(e){return{kind:"schema",type:"number",reference:st,expects:"number",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ne(this,"type",t,r),t}}}function Se(e,t){return{kind:"schema",type:"object",reference:Se,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ke(this)},"~run"(r,i){var a;const n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:lr(s),d=s["~run"]({value:l},i);if(d.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=Fs(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ne(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else Ne(this,"type",r,i);return r}}}function hn(e,t){return{kind:"schema",type:"optional",reference:hn,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=lr(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function wt(e,t){return{kind:"schema",type:"picklist",reference:wt,expects:As(e.map(fn),"|"),async:!1,options:e,message:t,get"~standard"(){return ke(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:Ne(this,"type",r,i),r}}}function Hr(e,t,r){return{kind:"schema",type:"record",reference:Hr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ke(this)},"~run"(i,n){var o,s;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const l in a)if(Is(a,l)){const d=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:d};for(const b of p.issues)b.path=[h],(o=i.issues)==null||o.push(b);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}const u=this.value["~run"]({value:d},n);if(u.issues){const h={type:"object",origin:"value",input:a,key:l,value:d};for(const b of u.issues)b.path?b.path.unshift(h):b.path=[h],(s=i.issues)==null||s.push(b);if(i.issues||(i.issues=u.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!u.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=u.value)}}else Ne(this,"type",i,n);return i}}}function V(e){return{kind:"schema",type:"string",reference:V,expects:"string",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ne(this,"type",t,r),t}}}function gn(){return{kind:"schema",type:"unknown",reference:gn,expects:"unknown",async:!1,get"~standard"(){return ke(this)},"~run"(e){return e.typed=!0,e}}}function Wr(...e){return{...e[0],pipe:e,get"~standard"(){return ke(this)},"~run"(t,r){for(const i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function Kr(e,t,r){const i=e["~run"]({value:t},dn(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}const Ts=["agent","sdk","form","integration","migration"],Ns=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],Ds=["screening","cv_match","interview","overall"],Vs=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],Ms=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],bn=wt(Ts),Ps=wt(Ns),Os=Wr(V(),Ur(),sr(1),zr(100)),Ls=wt(Ds),js=wt(Vs),Rs=Wr(V(),Ur(),sr(1),zr(100)),Bs=wt(Ms),vn=Se({id:V(),email:z(V()),firstName:z(V()),lastName:z(V()),phone:z(V()),source:z(bn),identifiedAt:z(V()),createdAt:V(),updatedAt:V()}),wn=Wr(V(),sr(1)),Gr=Hr(V(),gn()),zs=Se({id:V(),applicationId:V(),status:js,scheduledAt:z(V()),completedAt:z(V()),meta:z(Gr),createdAt:V(),updatedAt:V()}),Us=Se({score:st(),reason:V(),confidence:st()}),mn=Se({id:V(),candidateId:V(),jobId:st(),stage:Os,stageGroup:Ps,stageEnteredAt:V(),rating:z(st()),disqualifiedAt:z(V()),disqualificationReason:z(Rs),disqualificationNote:z(V()),source:Bs,sourceDetail:z(V()),sessionId:z(st()),externalApplicationId:z(V()),meta:z(Gr),context:z(Gr),scoredAt:z(V()),createdAt:V(),updatedAt:V()}),qs=Se({id:V(),applicationId:V(),scoreType:Ls,score:z(st()),reason:z(V()),categories:z(Hr(V(),Us)),scoredBy:z(V()),createdAt:V()});({...mn.entries},{...vn.entries});const Hs=Se({anonymousId:wn,email:wn,firstName:Dt(V()),lastName:Dt(V()),phone:Dt(V()),source:Dt(bn)}),Ws=Se({candidateId:V(),isNew:qr()}),Ks=Se({isDuplicate:qr(),existingApplication:hn(Se({id:V(),stageGroup:V(),createdAt:V()}))});var Gs=e=>e,Ys=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},yn=class extends Ys{constructor(t,r,i){super(t),this.data=i,this.name="ApiError",this.status=r??500}},Js=e=>e instanceof yn&&e.data!==void 0,Zs={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Xs(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function Ff(e){return e}var Qs=({environment:e,publishableKey:t,logger:r})=>{let i=Zs[e];return{async checkDuplicate(n){try{let a=new URLSearchParams({email:n.email,scope:n.scope});n.scope==="job"&&n.jobId!=null&&a.set("job_id",String(n.jobId));let o=await fetch(`${i}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Kr(Ks,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:n.email,firstName:n.firstName,lastName:n.lastName,phone:n.phone,anonymousId:n.anonymousId,source:n.source??"sdk"},o=Kr(Hs,a);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${i}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Kr(Ws,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},Vt,T,_n,xn,lt,kn,Sn,Yr,Cn,mt={},En=[],el=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cr=Array.isArray;function Be(e,t){for(var r in t)e[r]=t[r];return e}function $n(e){var t=e.parentNode;t&&t.removeChild(e)}function we(e,t,r){var i,n,a,o={};for(a in t)a=="key"?i=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Vt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Mt(e,o,i,n,null)}function Mt(e,t,r,i,n){var a={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++_n};return n==null&&T.vnode!=null&&T.vnode(a),a}function tl(){return{current:null}}function Q(e){return e.children}function Ce(e,t){this.props=e,this.context=t}function ur(e,t){if(t==null)return e.__?ur(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"?ur(e):null}function In(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 In(e)}}function Jr(e){(!e.__d&&(e.__d=!0)&<.push(e)&&!dr.__r++||kn!==T.debounceRendering)&&((kn=T.debounceRendering)||Sn)(dr)}function dr(){var e,t,r,i,n,a,o,s,l;for(lt.sort(Yr);e=lt.shift();)e.__d&&(t=lt.length,i=void 0,n=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(i=[],n=[],(a=Be({},o)).__v=o.__v+1,Zr(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,i,s??ur(o),o.__h,n),Mn(i,o,n),o.__e!=s&&In(o)),lt.length>t&<.sort(Yr));dr.__r=0}function An(e,t,r,i,n,a,o,s,l,d,p){var u,h,b,m,_,k,$,w,y,S,E=0,A=i&&i.__k||En,G=A.length,O=G,L=t.length;for(r.__k=[],u=0;u<L;u++)(m=r.__k[u]=(m=t[u])==null||typeof m=="boolean"||typeof m=="function"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?Mt(null,m,null,null,m):cr(m)?Mt(Q,{children:m},null,null,null):m.__b>0?Mt(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=r,m.__b=r.__b+1,(w=rl(m,A,$=u+E,O))===-1?b=mt:(b=A[w]||mt,A[w]=void 0,O--),Zr(e,m,b,n,a,o,s,l,d,p),_=m.__e,(h=m.ref)&&b.ref!=h&&(b.ref&&Xr(b.ref,null,m),p.push(h,m.__c||_,m)),_!=null&&(k==null&&(k=_),S=!(y=b===mt||b.__v===null)&&w===$,y?w==-1&&E--:w!==$&&(w===$+1?(E++,S=!0):w>$?O>L-$?(E+=w-$,S=!0):E--:E=w<$&&w==$-1?w-$:0),$=u+E,S=S||w==u&&!y,typeof m.type!="function"||w===$&&b.__k!==m.__k?typeof m.type=="function"||S?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=_.nextSibling:l=Tn(e,_,l):l=Fn(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=k,u=G;u--;)A[u]!=null&&(typeof r.type=="function"&&A[u].__e!=null&&A[u].__e==r.__d&&(r.__d=A[u].__e.nextSibling),Pn(A[u],A[u]))}function Fn(e,t,r){for(var i,n=e.__k,a=0;n&&a<n.length;a++)(i=n[a])&&(i.__=e,t=typeof i.type=="function"?Fn(i,t,r):Tn(r,i.__e,t));return t}function ze(e,t){return t=t||[],e==null||typeof e=="boolean"||(cr(e)?e.some(function(r){ze(r,t)}):t.push(e)),t}function Tn(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 rl(e,t,r,i){var n=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&n==l.key&&a===l.type)return r;if(i>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&n==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&n==l.key&&a===l.type)return s;s++}}return-1}function il(e,t,r,i,n){var a;for(a in r)a==="children"||a==="key"||a in t||fr(e,a,null,r[a],i);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||fr(e,a,t[a],r[a],i)}function Nn(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||el.test(t)?r:r+"px"}function fr(e,t,r,i,n){var a;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)r&&t in r||Nn(e.style,t,"");if(r)for(t in r)i&&r[t]===i[t]||Nn(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?i||e.addEventListener(t,a?Vn:Dn,a):e.removeEventListener(t,a?Vn:Dn,a);else if(t!=="dangerouslySetInnerHTML"){if(n)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 Dn(e){return this.l[e.type+!1](T.event?T.event(e):e)}function Vn(e){return this.l[e.type+!0](T.event?T.event(e):e)}function Zr(e,t,r,i,n,a,o,s,l,d){var p,u,h,b,m,_,k,$,w,y,S,E,A,G,O,L=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(p=T.__b)&&p(t);try{e:if(typeof L=="function"){if($=t.props,w=(p=L.contextType)&&i[p.__c],y=p?w?w.props.value:p.__:i,r.__c?k=(u=t.__c=r.__c).__=u.__E:("prototype"in L&&L.prototype.render?t.__c=u=new L($,y):(t.__c=u=new Ce($,y),u.constructor=L,u.render=al),w&&w.sub(u),u.props=$,u.state||(u.state={}),u.context=y,u.__n=i,h=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),L.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Be({},u.__s)),Be(u.__s,L.getDerivedStateFromProps($,u.__s))),b=u.props,m=u.state,u.__v=t,h)L.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(L.getDerivedStateFromProps==null&&$!==b&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps($,y),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate($,u.__s,y)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=$,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(Y){Y&&(Y.__=t)}),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate($,u.__s,y),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(b,m,_)})}if(u.context=y,u.props=$,u.__P=e,u.__e=!1,E=T.__r,A=0,"prototype"in L&&L.prototype.render){for(u.state=u.__s,u.__d=!1,E&&E(t),p=u.render(u.props,u.state,u.context),G=0;G<u._sb.length;G++)u.__h.push(u._sb[G]);u._sb=[]}else do u.__d=!1,E&&E(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++A<25);u.state=u.__s,u.getChildContext!=null&&(i=Be(Be({},i),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(_=u.getSnapshotBeforeUpdate(b,m)),An(e,cr(O=p!=null&&p.type===Q&&p.key==null?p.props.children:p)?O:[O],t,r,i,n,a,o,s,l,d),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),k&&(u.__E=u.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=nl(r.__e,t,r,i,n,a,o,l,d);(p=T.diffed)&&p(t)}catch(Y){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),T.__e(Y,t,r)}}function Mn(e,t,r){for(var i=0;i<r.length;i++)Xr(r[i],r[++i],r[++i]);T.__c&&T.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){T.__e(a,n.__v)}})}function nl(e,t,r,i,n,a,o,s,l){var d,p,u,h=r.props,b=t.props,m=t.type,_=0;if(m==="svg"&&(n=!0),a!=null){for(;_<a.length;_++)if((d=a[_])&&"setAttribute"in d==!!m&&(m?d.localName===m:d.nodeType===3)){e=d,a[_]=null;break}}if(e==null){if(m===null)return document.createTextNode(b);e=n?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,b.is&&b),a=null,s=!1}if(m===null)h===b||s&&e.data===b||(e.data=b);else{if(a=a&&Vt.call(e.childNodes),p=(h=r.props||mt).dangerouslySetInnerHTML,u=b.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},_=0;_<e.attributes.length;_++)h[e.attributes[_].name]=e.attributes[_].value;(u||p)&&(u&&(p&&u.__html==p.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(il(e,b,h,n,s),u)t.__k=[];else if(An(e,cr(_=t.props.children)?_:[_],t,r,i,n&&m!=="foreignObject",a,o,a?a[0]:r.__k&&ur(r,0),s,l),a!=null)for(_=a.length;_--;)a[_]!=null&&$n(a[_]);s||("value"in b&&(_=b.value)!==void 0&&(_!==e.value||m==="progress"&&!_||m==="option"&&_!==h.value)&&fr(e,"value",_,h.value,!1),"checked"in b&&(_=b.checked)!==void 0&&_!==e.checked&&fr(e,"checked",_,h.checked,!1))}return e}function Xr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(i){T.__e(i,r)}}function Pn(e,t,r){var i,n;if(T.unmount&&T.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||Xr(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){T.__e(a,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(n=0;n<i.length;n++)i[n]&&Pn(i[n],t,r||typeof e.type!="function");r||e.__e==null||$n(e.__e),e.__=e.__e=e.__d=void 0}function al(e,t,r){return this.constructor(e,r)}function ct(e,t,r){var i,n,a,o;T.__&&T.__(e,t),n=(i=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Zr(t,e=(!i&&r||t).__k=we(Q,null,[e]),n||mt,mt,t.ownerSVGElement!==void 0,!i&&r?[r]:n?null:t.firstChild?Vt.call(t.childNodes):null,a,!i&&r?r:n?n.__e:t.firstChild,i,o),Mn(a,e,o)}function On(e,t){ct(e,t,On)}function ol(e,t,r){var i,n,a,o,s=Be({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?i=t[a]:a=="ref"?n=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Vt.call(arguments,2):r),Mt(e.type,s,i||e.key,n||e.ref,null)}function Ln(e,t){var r={__c:t="__cC"+Cn++,__:e,Consumer:function(i,n){return i.children(n)},Provider:function(i){var n,a;return this.getChildContext||(n=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,Jr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),i.children}};return r.Provider.__=r.Consumer.contextType=r}Vt=En.slice,T={__e:function(e,t,r,i){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,i||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},_n=0,xn=function(e){return e!=null&&e.constructor===void 0},Ce.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Be({},this.state),typeof e=="function"&&(e=e(Be({},r),this.props)),e&&Be(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Jr(this))},Ce.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Jr(this))},Ce.prototype.render=Q,lt=[],Sn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Yr=function(e,t){return e.__v.__b-t.__v.__b},dr.__r=0,Cn=0;function jn(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=jn(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Ue(){for(var e,t,r=0,i="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=jn(e))&&(i&&(i+=" "),i+=t);return i}const Rn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Bn=Ue,ut=(e,t)=>r=>{var i;if((t==null?void 0:t.variants)==null)return Bn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(d=>{const p=r==null?void 0:r[d],u=a==null?void 0:a[d];if(p===null)return null;const h=Rn(p)||Rn(u);return n[d][h]}),s=r&&Object.entries(r).reduce((d,p)=>{let[u,h]=p;return h===void 0||(d[u]=h),d},{}),l=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((d,p)=>{let{class:u,className:h,...b}=p;return Object.entries(b).every(m=>{let[_,k]=m;return Array.isArray(k)?k.includes({...a,...s}[_]):{...a,...s}[_]===k})?[...d,u,h]:d},[]);return Bn(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var Je,H,Qr,zn,yt=0,Un=[],pr=[],qn=T.__b,Hn=T.__r,Wn=T.diffed,Kn=T.__c,Gn=T.unmount;function _t(e,t){T.__h&&T.__h(H,e,yt||t),yt=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:pr}),r.__[e]}function qe(e){return yt=1,Yn(Xn,e)}function Yn(e,t,r){var i=_t(Je++,2);if(i.t=e,!i.__c&&(i.__=[r?r(t):Xn(void 0,t),function(s){var l=i.__N?i.__N[0]:i.__[0],d=i.t(l,s);l!==d&&(i.__N=[d,i.__[1]],i.__c.setState({}))}],i.__c=H,!H.u)){var n=function(s,l,d){if(!i.__c.__H)return!0;var p=i.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,s,l,d);var u=!1;return p.forEach(function(h){if(h.__N){var b=h.__[0];h.__=h.__N,h.__N=void 0,b!==h.__[0]&&(u=!0)}}),!(!u&&i.__c.props===s)&&(!a||a.call(this,s,l,d))};H.u=!0;var a=H.shouldComponentUpdate,o=H.componentWillUpdate;H.componentWillUpdate=function(s,l,d){if(this.__e){var p=a;a=void 0,n(s,l,d),a=p}o&&o.call(this,s,l,d)},H.shouldComponentUpdate=n}return i.__N||i.__}function ei(e,t){var r=_t(Je++,3);!T.__s&&ri(r.__H,t)&&(r.__=e,r.i=t,H.__H.__h.push(r))}function he(e,t){var r=_t(Je++,4);!T.__s&&ri(r.__H,t)&&(r.__=e,r.i=t,H.__h.push(r))}function ge(e){return yt=5,Ze(function(){return{current:e}},[])}function sl(e,t,r){yt=6,he(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 Ze(e,t){var r=_t(Je++,7);return ri(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ll(e,t){return yt=8,Ze(function(){return e},t)}function Jn(e){var t=H.context[e.__c],r=_t(Je++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(H)),t.props.value):e.__}function cl(e,t){T.useDebugValue&&T.useDebugValue(t?t(e):e)}function ul(){var e=_t(Je++,11);if(!e.__){for(var t=H.__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 dl(){for(var e;e=Un.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(hr),e.__H.__h.forEach(ti),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){H=null,qn&&qn(e)},T.__r=function(e){Hn&&Hn(e),Je=0;var t=(H=e.__c).__H;t&&(Qr===H?(t.__h=[],H.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=pr,r.__N=r.i=void 0})):(t.__h.forEach(hr),t.__h.forEach(ti),t.__h=[],Je=0)),Qr=H},T.diffed=function(e){Wn&&Wn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Un.push(t)!==1&&zn===T.requestAnimationFrame||((zn=T.requestAnimationFrame)||fl)(dl)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==pr&&(r.__=r.__V),r.i=void 0,r.__V=pr})),Qr=H=null},T.__c=function(e,t){t.some(function(r){try{r.__h.forEach(hr),r.__h=r.__h.filter(function(i){return!i.__||ti(i)})}catch(i){t.some(function(n){n.__h&&(n.__h=[])}),t=[],T.__e(i,r.__v)}}),Kn&&Kn(e,t)},T.unmount=function(e){Gn&&Gn(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(i){try{hr(i)}catch(n){t=n}}),r.__H=void 0,t&&T.__e(t,r.__v))};var Zn=typeof requestAnimationFrame=="function";function fl(e){var t,r=function(){clearTimeout(i),Zn&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(r,100);Zn&&(t=requestAnimationFrame(r))}function hr(e){var t=H,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),H=t}function ti(e){var t=H;e.__c=e.__(),H=t}function ri(e,t){return!e||e.length!==t.length||t.some(function(r,i){return r!==e[i]})}function Xn(e,t){return typeof t=="function"?t(e):t}function Qn(e,t){for(var r in t)e[r]=t[r];return e}function ii(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var i in t)if(i!=="__source"&&e[i]!==t[i])return!0;return!1}function ni(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ai(e){this.props=e}function pl(e,t){function r(n){var a=this.props.ref,o=a==n.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,n)||!o:ii(this.props,n)}function i(n){return this.shouldComponentUpdate=r,we(e,n)}return i.displayName="Memo("+(e.displayName||e.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(ai.prototype=new Ce).isPureReactComponent=!0,ai.prototype.shouldComponentUpdate=function(e,t){return ii(this.props,e)||ii(this.state,t)};var ea=T.__b;T.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ea&&ea(e)};var hl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function oi(e){function t(r){var i=Qn({},r);return delete i.ref,e(i,r.ref||null)}return t.$$typeof=hl,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ta=function(e,t){return e==null?null:ze(ze(e).map(t))},gl={map:ta,forEach:ta,count:function(e){return e?ze(e).length:0},only:function(e){var t=ze(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:ze},bl=T.__e;T.__e=function(e,t,r,i){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),n.__c(e,t)}bl(e,t,r,i)};var ra=T.unmount;function ia(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),e.__c.__H=null),(e=Qn({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(i){return ia(i,t,r)})),e}function na(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(i){return na(i,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 Pt(){this.__u=0,this.t=null,this.__b=null}function aa(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function oa(e){var t,r,i;function n(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){i=o}),i)throw i;if(!r)throw t;return we(r,a)}return n.displayName="Lazy",n.__f=!0,n}function Ot(){this.u=null,this.o=null}T.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),ra&&ra(e)},(Pt.prototype=new Ce).__c=function(e,t){var r=t.__c,i=this;i.t==null&&(i.t=[]),i.t.push(r);var n=aa(i.__v),a=!1,o=function(){a||(a=!0,r.__R=null,n?n(s):s())};r.__R=o;var s=function(){if(!--i.__u){if(i.state.__a){var d=i.state.__a;i.__v.__k[0]=na(d,d.__c.__P,d.__c.__O)}var p;for(i.setState({__a:i.__b=null});p=i.t.pop();)p.forceUpdate()}},l=t.__h===!0;i.__u++||l||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(o,o)},Pt.prototype.componentWillUnmount=function(){this.t=[]},Pt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=ia(this.__b,r,i.__O=i.__P)}this.__b=null}var n=t.__a&&we(Q,null,e.fallback);return n&&(n.__h=null),[we(Q,null,t.__a?null:e.children),n]};var sa=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 vl(e){return this.getChildContext=function(){return e.context},e.children}function wl(e){var t=this,r=e.i;t.componentWillUnmount=function(){ct(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(i){this.childNodes.push(i),t.i.appendChild(i)},insertBefore:function(i,n){this.childNodes.push(i),t.i.appendChild(i)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.i.removeChild(i)}}),ct(we(vl,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function ml(e,t){var r=we(wl,{__v:e,i:t});return r.containerInfo=t,r}(Ot.prototype=new Ce).__a=function(e){var t=this,r=aa(t.__v),i=t.o.get(e);return i[0]++,function(n){var a=function(){t.props.revealOrder?(i.push(n),sa(t,e,i)):n()};r?r(a):a()}},Ot.prototype.render=function(e){this.u=null,this.o=new Map;var t=ze(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},Ot.prototype.componentDidUpdate=Ot.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){sa(e,r,t)})};var la=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,yl=/^(?: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]/,_l=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,xl=/[A-Z0-9]/g,kl=typeof document<"u",Sl=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Cl(e,t,r){return t.__k==null&&(t.textContent=""),ct(e,t),typeof r=="function"&&r(),e?e.__c:null}function El(e,t,r){return On(e,t),typeof r=="function"&&r(),e?e.__c:null}Ce.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ce.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ca=T.event;function $l(){}function Il(){return this.cancelBubble}function Al(){return this.defaultPrevented}T.event=function(e){return ca&&(e=ca(e)),e.persist=$l,e.isPropagationStopped=Il,e.isDefaultPrevented=Al,e.nativeEvent=e};var si,Fl={enumerable:!1,configurable:!0,get:function(){return this.class}},ua=T.vnode;T.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,i=t.type,n={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||kl&&a==="children"&&i==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||i!=="input"&&i!=="textarea"||Sl(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":_l.test(a)?a=s:i.indexOf("-")===-1&&yl.test(a)?a=a.replace(xl,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}i=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=ze(r.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),i=="select"&&n.defaultValue!=null&&(n.value=ze(r.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),r.class&&!r.className?(n.class=r.class,Object.defineProperty(n,"className",Fl)):(r.className&&!r.class||r.class&&r.className)&&(n.class=n.className=r.className),t.props=n}(e),e.$$typeof=la,ua&&ua(e)};var da=T.__r;T.__r=function(e){da&&da(e),si=e.__c};var fa=T.diffed;T.diffed=function(e){fa&&fa(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),si=null};var Tl={ReactCurrentDispatcher:{current:{readContext:function(e){return si.__n[e.__c].props.value}}}};function Nl(e){return we.bind(null,e)}function pa(e){return!!e&&e.$$typeof===la}function Dl(e){return pa(e)?ol.apply(null,arguments):e}function Vl(e){return!!e.__k&&(ct(null,e),!0)}function Ml(e){return e&&(e.base||e.nodeType===1&&e)||null}var Pl=function(e,t){return e(t)},Ol=function(e,t){return e(t)},Ll=Q;function ha(e){e()}function jl(e){return e}function Rl(){return[!1,ha]}var Bl=he;function zl(e,t){var r=t(),i=qe({h:{__:r,v:t}}),n=i[0].h,a=i[1];return he(function(){n.__=r,n.v=t,ni(n.__,t())||a({h:n})},[e,r,t]),ei(function(){return ni(n.__,n.v())||a({h:n}),e(function(){ni(n.__,n.v())||a({h:n})})},[e]),r}var ce={useState:qe,useId:ul,useReducer:Yn,useEffect:ei,useLayoutEffect:he,useInsertionEffect:Bl,useTransition:Rl,useDeferredValue:jl,useSyncExternalStore:zl,startTransition:ha,useRef:ge,useImperativeHandle:sl,useMemo:Ze,useCallback:ll,useContext:Jn,useDebugValue:cl,version:"17.0.2",Children:gl,render:Cl,hydrate:El,unmountComponentAtNode:Vl,createPortal:ml,createElement:we,createContext:Ln,createFactory:Nl,cloneElement:Dl,createRef:tl,Fragment:Q,isValidElement:pa,findDOMNode:Ml,Component:Ce,PureComponent:ai,memo:pl,forwardRef:oi,flushSync:Ol,unstable_batchedUpdates:Pl,StrictMode:Ll,Suspense:Pt,SuspenseList:Ot,lazy:oa,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Tl};const ue=Symbol.for("@ts-pattern/matcher"),ga=Symbol.for("@ts-pattern/isVariadic"),gr="@ts-pattern/anonymous-select-key",li=e=>!!(e&&typeof e=="object"),br=e=>e&&!!e[ue],J=(e,t,r)=>{if(br(e)){const i=e[ue](),{matched:n,selections:a}=i.match(t);return n&&a&&Object.keys(a).forEach(o=>r(o,a[o])),n}if(li(e)){if(!li(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let i=[],n=[],a=[];for(const o of e.keys()){const s=e[o];br(s)&&s[ga]?a.push(s):a.length?n.push(s):i.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<i.length+n.length)return!1;const o=t.slice(0,i.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(i.length,n.length===0?1/0:-n.length);return i.every((d,p)=>J(d,o[p],r))&&n.every((d,p)=>J(d,s[p],r))&&(a.length===0||J(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>J(o,t[s],r))}return Reflect.ownKeys(e).every(i=>{const n=e[i];return(i in t||br(a=n)&&a[ue]().matcherType==="optional")&&J(n,t[i],r);var a})}return Object.is(t,e)},de=e=>{var t,r,i;return li(e)?br(e)?(t=(r=(i=e[ue]()).getSelectionKeys)==null?void 0:r.call(i))!=null?t:[]:Array.isArray(e)?Lt(e,de):Lt(Object.values(e),de):[]},Lt=(e,t)=>e.reduce((r,i)=>r.concat(t(i)),[]);function Ul(...e){if(e.length===1){const[t]=e;return r=>J(t,r,()=>{})}if(e.length===2){const[t,r]=e;return J(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ee(e){return Object.assign(e,{optional:()=>ui(e),and:t=>W(e,t),or:t=>ba(e,t),select:t=>t===void 0?jt(e):jt(t,e)})}function ci(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const i=[{value:Object.assign(t,{[ga]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=i[r++])!=null?n:i.at(-1)}}}}))(e),{optional:()=>ci(ui(e)),select:t=>ci(t===void 0?jt(e):jt(t,e))})}function ui(e){return ee({[ue]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return t===void 0?(de(e).forEach(n=>i(n,void 0)),{matched:!0,selections:r}):{matched:J(e,t,i),selections:r}},getSelectionKeys:()=>de(e),matcherType:"optional"})})}const ql=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Hl=(e,t)=>{for(const[r,i]of e.entries())if(!t(i,r))return!1;return!0},Wl=(e,t)=>{const r=Reflect.ownKeys(e);for(const i of r)if(!t(i,e[i]))return!1;return!0};function W(...e){return ee({[ue]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return{matched:e.every(n=>J(n,t,i)),selections:r}},getSelectionKeys:()=>Lt(e,de),matcherType:"and"})})}function ba(...e){return ee({[ue]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return Lt(e,de).forEach(n=>i(n,void 0)),{matched:e.some(n=>J(n,t,i)),selections:r}},getSelectionKeys:()=>Lt(e,de),matcherType:"or"})})}function P(e){return{[ue]:()=>({match:t=>({matched:!!e(t)})})}}function jt(...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 ee({[ue]:()=>({match:i=>{let n={[t??gr]:i};return{matched:r===void 0||J(r,i,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??gr].concat(r===void 0?[]:de(r))})})}function va(e){return!0}function De(e){return typeof e=="number"}function Xe(e){return typeof e=="string"}function Qe(e){return typeof e=="bigint"}const wa=ee(P(va)),Kl=ee(P(va)),Gl=wa,et=e=>Object.assign(ee(e),{startsWith:t=>{return et(W(e,(r=t,P(i=>Xe(i)&&i.startsWith(r)))));var r},endsWith:t=>{return et(W(e,(r=t,P(i=>Xe(i)&&i.endsWith(r)))));var r},minLength:t=>et(W(e,(r=>P(i=>Xe(i)&&i.length>=r))(t))),length:t=>et(W(e,(r=>P(i=>Xe(i)&&i.length===r))(t))),maxLength:t=>et(W(e,(r=>P(i=>Xe(i)&&i.length<=r))(t))),includes:t=>{return et(W(e,(r=t,P(i=>Xe(i)&&i.includes(r)))));var r},regex:t=>{return et(W(e,(r=t,P(i=>Xe(i)&&!!i.match(r)))));var r}}),ma=et(P(Xe)),Ve=e=>Object.assign(ee(e),{between:(t,r)=>Ve(W(e,((i,n)=>P(a=>De(a)&&i<=a&&n>=a))(t,r))),lt:t=>Ve(W(e,(r=>P(i=>De(i)&&i<r))(t))),gt:t=>Ve(W(e,(r=>P(i=>De(i)&&i>r))(t))),lte:t=>Ve(W(e,(r=>P(i=>De(i)&&i<=r))(t))),gte:t=>Ve(W(e,(r=>P(i=>De(i)&&i>=r))(t))),int:()=>Ve(W(e,P(t=>De(t)&&Number.isInteger(t)))),finite:()=>Ve(W(e,P(t=>De(t)&&Number.isFinite(t)))),positive:()=>Ve(W(e,P(t=>De(t)&&t>0))),negative:()=>Ve(W(e,P(t=>De(t)&&t<0)))}),Yl=Ve(P(De)),tt=e=>Object.assign(ee(e),{between:(t,r)=>tt(W(e,((i,n)=>P(a=>Qe(a)&&i<=a&&n>=a))(t,r))),lt:t=>tt(W(e,(r=>P(i=>Qe(i)&&i<r))(t))),gt:t=>tt(W(e,(r=>P(i=>Qe(i)&&i>r))(t))),lte:t=>tt(W(e,(r=>P(i=>Qe(i)&&i<=r))(t))),gte:t=>tt(W(e,(r=>P(i=>Qe(i)&&i>=r))(t))),positive:()=>tt(W(e,P(t=>Qe(t)&&t>0))),negative:()=>tt(W(e,P(t=>Qe(t)&&t<0)))}),Jl=tt(P(Qe)),Zl=ee(P(function(e){return typeof e=="boolean"})),Xl=ee(P(function(e){return typeof e=="symbol"})),Ql=ee(P(function(e){return e==null})),ec=ee(P(function(e){return e!=null}));var Rt={__proto__:null,matcher:ue,optional:ui,array:function(...e){return ci({[ue]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let i={};if(t.length===0)return de(r).forEach(a=>{i[a]=[]}),{matched:!0,selections:i};const n=(a,o)=>{i[a]=(i[a]||[]).concat([o])};return{matched:t.every(a=>J(r,a,n)),selections:i}},getSelectionKeys:()=>e.length===0?[]:de(e[0])})})},set:function(...e){return ee({[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 i=(a,o)=>{r[a]=(r[a]||[]).concat([o])},n=e[0];return{matched:ql(t,a=>J(n,a,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:de(e[0])})})},map:function(...e){return ee({[ue]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const i=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var n;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=e[0])==null?void 0:n.toString()}`);const[a,o]=e;return{matched:Hl(t,(s,l)=>{const d=J(a,l,i),p=J(o,s,i);return d&&p}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...de(e[0]),...de(e[1])]})})},record:function(...e){return ee({[ue]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let i={};const n=(s,l)=>{i[s]=(i[s]||[]).concat([l])},[a,o]=e.length===1?[ma,e[0]]:e;return{matched:Wl(t,(s,l)=>{const d=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),p=d!==null&&J(a,d,n),u=J(a,s,n),h=J(o,l,n);return(u||p)&&h}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[...de(e[0]),...de(e[1])]})})},intersection:W,union:ba,not:function(e){return ee({[ue]:()=>({match:t=>({matched:!J(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:P,select:jt,any:wa,unknown:Kl,_:Gl,string:ma,number:Yl,bigint:Jl,boolean:Zl,symbol:Xl,nullish:Ql,nonNullable:ec,instanceOf:function(e){return ee(P(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ee(P(Ul(e)))}};class tc extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}}const di={matched:!1,value:void 0};function vr(e){return new wr(e,di)}class wr{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],i=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&i.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(d,p)=>{a=!0,o[d]=p},l=!i.some(d=>J(d,this.input,s))||n&&!n(this.input)?di:{matched:!0,value:r(a?gr in o?o[gr]:o:this.input,this.input)};return new wr(this.input,l)}when(t,r){if(this.state.matched)return this;const i=!!t(this.input);return new wr(this.input,i?{matched:!0,value:r(this.input,this.input)}:di)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=rc){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function rc(e){throw new tc(e)}var ic=["other","few","many","two","one","zero"],ya=({terms:e,overrides:t,locale:r})=>{const i=new Intl.PluralRules(r);function n(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,d)=>{var p;return((p=o==null?void 0:o[d])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=i.select(o.count);if(!(l in s)){const d=ic.find(p=>p in s);if(!d)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=d}return s[l].replace(/{{(\w+)}}/g,(d,p)=>{var u;return((u=o==null?void 0:o[p])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return n},nc=0;function c(e,t,r,i,n,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var d={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--nc,__source:n,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return T.vnode&&T.vnode(d),d}var _a=Ln(null),xa=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:i})=>{const n=Ze(()=>ya({locale:i,terms:e,overrides:t}),[t,i]);return c(_a.Provider,{value:{t:n,locale:i},children:r})},useTranslation:()=>{const t=Jn(_a);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>ya({terms:e,overrides:t,locale:r})}),{TranslationProvider:Tf,useTranslation:Nf,createTFunction:Df,defaultTerms:ac}=xa({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",close_application:"Close application",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_empty:"Please enter a value",validation_date:"Please enter a valid date (YYYY-MM-DD)",validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_min:{one:"Please upload at least one file",other:"Please only upload at least {{count}} files"},validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_file_size:"Your file is too big. Please upload a file smaller than {{size}}",validation_required:"This field is required.",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"},optional:"optional"});const{TranslationProvider:oc,useTranslation:ae,createTFunction:sc}=xa({...ac,error_heading:"Something unexpected happened",undo:"Undo",conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",skip:"Skip",skipped:"Skipped",submission_closed:"This role is no longer accepting applications.",submission_duplicate:"It looks like you've already applied for this role.",submission_retryable:"We couldn't submit your application. Please try again.",submission_unknown:"We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",file_preparing:{one:"Preparing your file…",other:"Preparing your files…"},file_ready:{one:"Your file is ready to send",other:"Your files are ready to send"},file_read_error:"We couldn't read this file. Select it again or choose another file.",file_read_error_replacement:"We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.",address_error:"We couldn't search for that address. Try again, or fill it in manually.",address_searching:"Searching addresses…",address_no_results:"We couldn't find that address. Check the spelling or postcode, or fill it in manually.",maximize:"Maximise",minimize:"Minimise"}),Vf="";function Me(e,t){if(!e)throw new Error(t)}var fi=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(fi):Object.keys(e).sort().reduce((t,r)=>(t[r]=fi(e[r]),t),{}),lc=e=>{let t=JSON.stringify(fi(e)),r=5381;for(let i=0;i<t.length;i++)r=r*33^t.charCodeAt(i);return(r>>>0).toString(36)},cc=Symbol.for("preact-signals");function pi(){if(xt>1)xt--;else{for(var e,t=!1;Bt!==void 0;){var r=Bt;for(Bt=void 0,hi++;r!==void 0;){var i=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Sa(r))try{r.c()}catch(n){t||(e=n,t=!0)}r=i}}if(hi=0,xt--,t)throw e}}var U=void 0,Bt=void 0,xt=0,hi=0,mr=0;function ka(e){if(U!==void 0){var t=e.n;if(t===void 0||t.t!==U)return t={i:0,S:e,p:U.s,n:void 0,t:U,e:void 0,x:void 0,r:t},U.s!==void 0&&(U.s.n=t),U.s=t,e.n=t,32&U.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=U.s,t.n=void 0,U.s.n=t,U.s=t),t}}function ne(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ne.prototype.brand=cc,ne.prototype.h=function(){return!0},ne.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)},ne.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)}},ne.prototype.subscribe=function(e){var t=this;return bi(function(){var r=t.value,i=U;U=void 0;try{e(r)}finally{U=i}})},ne.prototype.valueOf=function(){return this.value},ne.prototype.toString=function(){return this.value+""},ne.prototype.toJSON=function(){return this.value},ne.prototype.peek=function(){var e=U;U=void 0;try{return this.value}finally{U=e}},Object.defineProperty(ne.prototype,"value",{get:function(){var e=ka(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(hi>100)throw new Error("Cycle detected");this.v=e,this.i++,mr++,xt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{pi()}}}});function He(e){return new ne(e)}function Sa(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 Ca(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 Ea(e){for(var t=e.s,r=void 0;t!==void 0;){var i=t.p;t.i===-1?(t.S.U(t),i!==void 0&&(i.n=t.n),t.n!==void 0&&(t.n.p=i)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=i}e.s=r}function kt(e){ne.call(this,void 0),this.x=e,this.s=void 0,this.g=mr-1,this.f=4}(kt.prototype=new ne).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===mr))return!0;if(this.g=mr,this.f|=1,this.i>0&&!Sa(this))return this.f&=-2,!0;var e=U;try{Ca(this),U=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 U=e,Ea(this),this.f&=-2,!0},kt.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)}ne.prototype.S.call(this,e)},kt.prototype.U=function(e){if(this.t!==void 0&&(ne.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)}},kt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(kt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=ka(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function uc(e){return new kt(e)}function $a(e){var t=e.u;if(e.u=void 0,typeof t=="function"){xt++;var r=U;U=void 0;try{t()}catch(i){throw e.f&=-2,e.f|=8,gi(e),i}finally{U=r,pi()}}}function gi(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,$a(e)}function dc(e){if(U!==this)throw new Error("Out-of-order effect");Ea(this),U=e,this.f&=-2,8&this.f&&gi(this),pi()}function zt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}zt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},zt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,$a(this),Ca(this),xt++;var e=U;return U=this,dc.bind(this,e)},zt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Bt,Bt=this)},zt.prototype.d=function(){this.f|=8,1&this.f||gi(this)};function bi(e){var t=new zt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var vi;function St(e,t){T[e]=t.bind(null,T[e]||function(){})}function yr(e){vi&&vi(),vi=e&&e.S()}function Ia(e){var t=this,r=e.data,i=pc(r);i.value=r;var n=Ze(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!xn(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},uc(function(){var o=i.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}Ia.displayName="_st",Object.defineProperties(ne.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Ia},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),St("__b",function(e,t){if(typeof t.type=="string"){var r,i=t.props;for(var n in i)if(n!=="children"){var a=i[n];a instanceof ne&&(r||(t.__np=r={}),r[n]=a,i[n]=a.peek())}}e(t)}),St("__r",function(e,t){yr();var r,i=t.__c;i&&(i.__$f&=-2,(r=i.__$u)===void 0&&(i.__$u=r=function(n){var a;return bi(function(){a=this}),a.c=function(){i.__$f|=1,i.setState({})},a}())),yr(r),e(t)}),St("__e",function(e,t,r,i){yr(),e(t,r,i)}),St("diffed",function(e,t){yr();var r;if(typeof t.type=="string"&&(r=t.__e)){var i=t.__np,n=t.props;if(i){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in i)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in i){var d=a[l],p=i[l];d===void 0?(d=fc(r,l,p,n),a[l]=d):d.o(p,n)}}}e(t)});function fc(e,t,r,i){var n=t in e&&e.ownerSVGElement===void 0,a=He(r);return{o:function(o,s){a.value=o,i=s},d:bi(function(){var o=a.value.value;i[t]!==o&&(i[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}St("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var i=r.U;if(i){r.U=void 0;for(var n in i){var a=i[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),St("__h",function(e,t,r,i){(i<3||i===9)&&(t.__$f|=2),e(t,r,i)}),Ce.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 i in t)return!0;for(var n in e)if(n!=="__source"&&e[n]!==this.props[n])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function pc(e){return Ze(function(){return He(e)},[])}const wi=(e,t)=>t.some(r=>e instanceof r);let Aa,Fa;function hc(){return Aa||(Aa=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function gc(){return Fa||(Fa=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const mi=new WeakMap,yi=new WeakMap,_r=new WeakMap;function bc(e){const t=new Promise((r,i)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(dt(e.result)),n()},o=()=>{i(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return _r.set(t,e),t}function vc(e){if(mi.has(e))return;const t=new Promise((r,i)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),n()},o=()=>{i(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});mi.set(e,t)}let _i={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return mi.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return dt(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 Ta(e){_i=e(_i)}function wc(e){return gc().includes(e)?function(...t){return e.apply(xi(this),t),dt(this.request)}:function(...t){return dt(e.apply(xi(this),t))}}function mc(e){return typeof e=="function"?wc(e):(e instanceof IDBTransaction&&vc(e),wi(e,hc())?new Proxy(e,_i):e)}function dt(e){if(e instanceof IDBRequest)return bc(e);if(yi.has(e))return yi.get(e);const t=mc(e);return t!==e&&(yi.set(e,t),_r.set(t,e)),t}const xi=e=>_r.get(e);function yc(e,t,{blocked:r,upgrade:i,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=dt(o);return i&&o.addEventListener("upgradeneeded",l=>{i(dt(o.result),l.oldVersion,l.newVersion,dt(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),n&&l.addEventListener("versionchange",d=>n(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const _c=["get","getKey","getAll","getAllKeys","count"],xc=["put","add","delete","clear"],ki=new Map;function Na(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ki.get(t))return ki.get(t);const r=t.replace(/FromIndex$/,""),i=t!==r,n=xc.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(n||_c.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let d=l.store;return i&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),n&&l.done]))[0]};return ki.set(t,a),a}Ta(e=>({...e,get:(t,r,i)=>Na(t,r)||e.get(t,r,i),has:(t,r)=>!!Na(t,r)||e.has(t,r)}));const kc=["continue","continuePrimaryKey","advance"],Da={},Si=new WeakMap,Va=new WeakMap,Sc={get(e,t){if(!kc.includes(t))return e[t];let r=Da[t];return r||(r=Da[t]=function(...i){Si.set(this,Va.get(this)[t](...i))}),r}};async function*Cc(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Sc);for(Va.set(r,t),_r.set(r,xi(t));t;)yield r,t=await(Si.get(r)||t.continue()),Si.delete(r)}function Ma(e,t){return t===Symbol.asyncIterator&&wi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&wi(e,[IDBIndex,IDBObjectStore])}Ta(e=>({...e,get(t,r,i){return Ma(t,r)?Cc:e.get(t,r,i)},has(t,r){return Ma(t,r)||e.has(t,r)}}));const xr=typeof indexedDB>"u"?void 0:yc("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let kr,Ci,Ut;const Pa=()=>{if(!kr)return Ut;const e=kr;kr=void 0;const t=ja(e),r=xr==null?void 0:xr.then(i=>i.put("state",e.data,t)).finally(()=>{Ut===r&&(Ut=void 0)});return Ut=r,Ut},rt={getStateData:async(e,t,r)=>{var n;const i=ja({...e,flowKeys:t,context:r});return(n=await xr)==null?void 0:n.get("state",i)},setStateData:e=>{kr=e,clearTimeout(Ci),Ci=setTimeout(()=>void Pa(),1e3)},flushStateData:()=>(clearTimeout(Ci),Pa()??Promise.resolve())},Oa=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Ct=e=>t=>t?t.type===e:!1;class ft extends Error{constructor(){super("Aborted")}}const Ec=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),La=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Ec()}),$c=e=>vr(e).with({nativeEvent:{submitter:Rt.select(Rt.union(Rt.instanceOf(HTMLButtonElement),Rt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Sr=(e,t,r,i=0)=>{if(!t.nextId)return r(t.id,{stepsMade:i,remainingSteps:0}),{stepsMade:i,remainingSteps:0};const n=e.find(d=>d.id===t.nextId);if(n===void 0)return{stepsMade:i,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(d=>d.id===a),s=t.type.includes("question")?1:0;if(o){const d=s+Math.max(Sr(e,n,r,i+s).remainingSteps,Sr(e,o,r,i+s).remainingSteps);return r(t.id,{stepsMade:i,remainingSteps:d}),{stepsMade:i,remainingSteps:d}}const l=s+Sr(e,n,r,i+s).remainingSteps;return r(t.id,{stepsMade:i,remainingSteps:l}),{stepsMade:i,remainingSteps:l}},Ic=e=>{const t={},r=e.find(i=>i.isHead);return r&&Sr(e,r,(i,n)=>{t[i]=n}),t},ja=e=>[...e.flowKeys,e.id,e.version,e.build,lc(e.context)].join("/"),it=He({state:"idle"}),pt=e=>{const{state:t,flow:r}=it.value;if(t!=="loaded")return;Me(r,"No flow to update");const i=e(r.data);r.data=i,it.value={state:t,flow:r},rt.setStateData(r)},N={current$:it,viewState$:He("closed"),prepareFlow:async({flow:e,context:t={},flowKeys:r,title:i,analytics:n,job:a,locationOrigin:o})=>(await rt.flushStateData().catch(()=>{}),{data:await rt.getStateData(e,r,t)??La(),startedAt:new Date,nodeIdToProgress:Ic(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:i,analytics:n,job:a,locationOrigin:o}),commitFlow:e=>{it.value={state:"loaded",flow:e},rt.setStateData(e)},cancelCurrentFlow:()=>{it.value={state:"idle"},N.viewState$.value="closed"},markAsFinished:()=>pt(e=>({...e,isFinished:!0})),markAsInteracted:()=>pt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>pt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{pt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await rt.flushStateData()},restart:()=>{const{state:e,flow:t}=it.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=La(),i={...t,data:r,startedAt:new Date};it.value={state:e,flow:i},rt.setStateData(i)},addMessage:(e,t)=>{const r={...e,groupId:t};return pt(i=>(i.messages.push(r),i))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=it.value;Me(t==="loaded","Application not loaded");const i=r.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));r.data.messages=i,rt.setStateData(r)},setSubmission:(e,t)=>pt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>pt(t=>({...t,currentInput:e??null}))},Ac=({message:e})=>{const{t}=ae();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("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:[c("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"}),c("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"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-9 text-sm",children:e})]})]})},Cr=e=>c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:"Loading"}),c("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)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("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"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("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"})})})]}),Ra=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Cr,{class:"text-neutral-6 h-8 w-8"})}),Fc=e=>{const r=e/100,i=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,i))*100)}%`},Tc=ut("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),qt=({class:e,children:t,variant:r,...i})=>c("button",{class:Ue(Tc({variant:r}),e),...i,children:c("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})}),Ba=()=>c("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Nc=()=>{if(N.current$.value.state!=="loaded")return null;const e=N.current$.value.flow.nodeIdToProgress,t=N.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const i=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Fc(i)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Dc=({children:e,params:t})=>{const{t:r}=ae(),i=N.viewState$;return c(Q,{children:c("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:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ei,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:Ue({hidden:N.current$.value.state!=="loaded"||i.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,N.current$.value.state==="loaded"&&c(qt,{class:"mx-1","aria-label":"Restart",onClick:()=>{N.restart()},children:[c("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"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(qt,{class:"view-switch mx-1",onTouchStart:Ei,"aria-label":r("minimize"),onClick:()=>i.value="minimised",children:c(Ba,{})},"minmax")]})]}),c(Nc,{})]})})};function Ei(){}const Vc=oa(()=>Promise.resolve().then(()=>wf).then(e=>e.ChatbotBody)),za=ut("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),Ua=ut("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),Mc=({open:e,...t})=>{const r=ge(null);return he(()=>{const i=r.current;i&&(e?i.showModal():i.close())},[e]),c("dialog",{ref:r,...t})},Pc=({logger:e,apiClient:t,analytics:r,talentBankClient:i,params:n})=>{const{state:a,flow:o,error:s}=N.current$.value,l=N.viewState$.value,d=a!=="idle"&&l==="maximised",p=ge(null);return c(oc,{terms:n.terms,locale:void 0,children:[c(Mc,{open:d,onClose:()=>N.viewState$.value="minimised",children:c("div",{ref:p,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:za({view:"maximised"}),children:c("div",{class:Ua({view:"maximised"}),children:[c(Dc,{params:n,children:o==null?void 0:o.title}),vr({state:a,view:l}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Ra,{},"loading")).with({state:"loaded"},()=>c(Pt,{fallback:c(Ra,{},"loading"),children:c(Vc,{analytics:r,apiClient:t,logger:e,talentBankClient:i})})).with({state:"error"},()=>c(Ac,{message:s})).exhaustive()]})})}),l==="minimised"?c(Oc,{flow:o}):null]})},Oc=({flow:e})=>{const{t}=ae();return c("div",{class:za({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Ua({view:"minimised"}),children:[c("button",{onClick:()=>{N.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ei,children:c("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),c("div",{class:"flex items-center px-0.5",children:c(qt,{class:"mx-1","aria-label":t("close_application"),onClick:N.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Lc=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-accent-1{color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-neutral-8{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .text-neutral-9{color:var(--i-color-n-9)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (pointer: coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch: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(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)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}
|
|
2
|
-
`,
|
|
1
|
+
(function(){"use strict";var Be;function nn(e){return{lang:(e==null?void 0:e.lang)??(Be==null?void 0:Be.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Be==null?void 0:Be.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Be==null?void 0:Be.abortPipeEarly)}}var Dr;function us(e){return Dr==null?void 0:Dr.get(e)}var Vr;function ds(e){return Vr==null?void 0:Vr.get(e)}var Mr;function fs(e,t){var r;return(r=Mr==null?void 0:Mr.get(e))==null?void 0:r.get(t)}function an(e){var r,i;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function Fe(e,t,r,i,n){let a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??an(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},u=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??fs(e.reference,l.lang)??(u?ds(l.lang):null)??i.message??us(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function we(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},nn())}}}function ps(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function hs(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function on(e){return{kind:"transformation",type:"transform",reference:on,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function gs(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Pr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function sn(){return{kind:"schema",type:"any",reference:sn,expects:"any",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function ln(e,t){return{kind:"schema",type:"array",reference:ln,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return we(this)},"~run"(r,i){var a;let n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){let s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){let u={type:"array",origin:"value",input:n,key:o,value:s};for(let p of l.issues)p.path?p.path.unshift(u):p.path=[u],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Fe(this,"type",r,i);return r}}}function Or(e){return{kind:"schema",type:"boolean",reference:Or,expects:"boolean",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Fe(this,"type",t,r),t}}}function ir(e,t){return{kind:"schema",type:"literal",reference:ir,expects:an(e),async:!1,literal:e,message:t,get"~standard"(){return we(this)},"~run"(r,i){return r.value===this.literal?r.typed=!0:Fe(this,"type",r,i),r}}}function nr(e,t){return{kind:"schema",type:"nullable",reference:nr,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return we(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=Pr(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function ar(e){return{kind:"schema",type:"number",reference:ar,expects:"number",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Fe(this,"type",t,r),t}}}function ce(e,t){return{kind:"schema",type:"object",reference:ce,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return we(this)},"~run"(r,i){var a;let n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in n?n[o]:Pr(s),u=s["~run"]({value:l},i);if(u.issues){let p={type:"object",origin:"value",input:n,key:o,value:l};for(let d of u.issues)d.path?d.path.unshift(p):d.path=[p],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=u.issues),i.abortEarly){r.typed=!1;break}}u.typed||(r.typed=!1),r.value[o]=u.value}else if(s.fallback!==void 0)r.value[o]=gs(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Fe(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else Fe(this,"type",r,i);return r}}}function Ne(e,t){return{kind:"schema",type:"optional",reference:Ne,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return we(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=Pr(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function cn(e,t,r){return{kind:"schema",type:"record",reference:cn,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return we(this)},"~run"(i,n){var o,s;let a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(let l in a)if(ps(a,l)){let u=a[l],p=this.key["~run"]({value:l},n);if(p.issues){let h={type:"object",origin:"key",input:a,key:l,value:u};for(let b of p.issues)b.path=[h],(o=i.issues)==null||o.push(b);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}let d=this.value["~run"]({value:u},n);if(d.issues){let h={type:"object",origin:"value",input:a,key:l,value:u};for(let b of d.issues)b.path?b.path.unshift(h):b.path=[h],(s=i.issues)==null||s.push(b);if(i.issues||(i.issues=d.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!d.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=d.value)}}else Fe(this,"type",i,n);return i}}}function ke(e){return{kind:"schema",type:"string",reference:ke,expects:"string",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Fe(this,"type",t,r),t}}}function un(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function Lr(e,t){return{kind:"schema",type:"union",reference:Lr,expects:hs(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,i){let n,a,o;for(let s of this.options){let l=s["~run"]({value:r.value},i);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(a){if(a.length===1)return a[0];Fe(this,"type",r,i,{issues:un(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Fe(this,"type",r,i,{issues:un(o)})}return r}}}function dn(){return{kind:"schema",type:"unknown",reference:dn,expects:"unknown",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function bs(...e){return{...e[0],pipe:e,get"~standard"(){return we(this)},"~run"(t,r){for(let i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function fn(e,t,r){let i=e["~run"]({value:t},nn(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}var vs=e=>({ok:!0,err:!1,val:e}),ws=e=>({err:!0,ok:!1,val:e}),jr=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function Br(e,t,r){var o,s;let i=e.find(l=>l.type==="pre-apply-result");if(!i)return;let n=(o=t[i.data.participationKey])==null?void 0:o.value,a={};if(n===!0)for(let l of jr(e)){let u=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(u)&&u.length===1&&(u=u[0]),(typeof u=="boolean"||typeof u=="string")&&(a[l.data.key]=u)}return{node_id:i.id,flow_session_id:r,participation:n,answers:a}}function ms(e,t){let r=Br(e,t,""),i=jr(e).map(a=>{let o=a.data.preApply,s=r==null?void 0:r.answers[a.data.key],l=a.type==="question-boolean"?typeof s=="boolean":a.data.options.some(u=>u.value===s);return{key:a.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),n=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&i.length>0&&i.every(a=>a.valid)?"completed":"unavailable";return{status:n,hasHardConcerns:n==="completed"?i.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:n==="completed"?i.some(a=>!a.matched&&a.severity==="advisory"):null,answers:n==="completed"?i:[]}}function ys(e,t){let r=new Set(jr(e).map(i=>i.data.key));for(let i of e)i.type==="pre-apply-result"&&(r.add(i.data.key),r.add(i.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([i])=>!r.has(i)))}var Nt=(e,t)=>{if(t.length===0)return;let r=e;for(let i of t){if(r==null||typeof r!="object")return;r=r[i]}return r},_s=(e,t="all")=>{let r={},i=t==="all"?null:new Set(t);for(let n in e){let a=e[n];a&&(i&&!i.has(n)||(r[n]=a.value))}return r},xs=({key:e,submissions:t})=>{var i;let r=(i=t[e])==null?void 0:i.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},pn=({key:e,path:t,submissions:r,context:i})=>{if(e==="$context"){if(!t)return;let n=Nt(i,t);switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${t.join(".")}`,n);return}}return r[e]},ks=e=>{let t=e.split(".").pop();return t?vs(t?"."+t:""):ws("No file extension found")},Ss=(e,t)=>{if(t.length===0)return!0;let r=t.map(i=>i.toLowerCase());return e.every(i=>{let n=ks(i.name);return n.ok&&r.includes(n.val.toLowerCase())})},Tt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,or=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,Cs=ce({integration_response:ce({data:ce({redirect_url:ke(),message:Ne(nr(ke())),button_text:Ne(nr(ke()))})})}),$s=e=>fn(Cs,e).success,Es=ce({integration_response:ce({error:ce({message:ke()})})}),Is=e=>fn(Es,e).success;ce({success:ir(!1),message:Ne(dn())});var As=e=>{if(typeof e!="object"||e===null)return null;let t=e.integration_response;if(typeof t!="object"||t===null)return null;let r=t;if(typeof r.status!="number"||r.service!==void 0&&typeof r.service!="string")return null;let i="data"in r,n=r.error,a=typeof n=="object"&&n!==null&&typeof n.message=="string"&&"data"in n;if(!i&&!a)return null;let o=i?r.data:n.data??null;return{service:r.service??"INVALID_SERVICE",response:{status:r.status,payload:o}}},Fs=({context:e,schema:t,logger:r})=>{if(t)for(let i in t){let n=t[i];if(!n)continue;let a=Nt(e,i.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${i} is required`;throw r.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${i} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${i} is not a string`);break;default:n.type}}};let Re;function hn(e){return{lang:(e==null?void 0:e.lang)??(Re==null?void 0:Re.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Re==null?void 0:Re.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Re==null?void 0:Re.abortPipeEarly)}}let Rr;function Ns(e){return Rr==null?void 0:Rr.get(e)}let zr;function Ts(e){return zr==null?void 0:zr.get(e)}let Ur;function Ds(e,t){var r;return(r=Ur==null?void 0:Ur.get(e))==null?void 0:r.get(t)}function gn(e){var r,i;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function Te(e,t,r,i,n){const a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??gn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},u=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Ds(e.reference,l.lang)??(u?Ts(l.lang):null)??i.message??Ns(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Se(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},hn())}}}function Vs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Ms(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function qr(e,t){return{kind:"validation",type:"max_length",reference:qr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&Te(this,"length",r,i,{received:`${r.value.length}`}),r}}}function sr(e,t){return{kind:"validation",type:"min_length",reference:sr,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&Te(this,"length",r,i,{received:`${r.value.length}`}),r}}}function Hr(){return{kind:"transformation",type:"trim",reference:Hr,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Ps(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function lr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function bn(e,t){return{kind:"schema",type:"array",reference:bn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Se(this)},"~run"(r,i){var a;const n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(u):p.path=[u],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Te(this,"type",r,i);return r}}}function Wr(e){return{kind:"schema",type:"boolean",reference:Wr,expects:"boolean",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Te(this,"type",t,r),t}}}function U(e,t){return{kind:"schema",type:"nullable",reference:U,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Se(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=lr(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Dt(e,t){return{kind:"schema",type:"nullish",reference:Dt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Se(this)},"~run"(r,i){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=lr(this,r,i)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function st(e){return{kind:"schema",type:"number",reference:st,expects:"number",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Te(this,"type",t,r),t}}}function Ce(e,t){return{kind:"schema",type:"object",reference:Ce,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Se(this)},"~run"(r,i){var a;const n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:lr(s),u=s["~run"]({value:l},i);if(u.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(p):d.path=[p],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=u.issues),i.abortEarly){r.typed=!1;break}}u.typed||(r.typed=!1),r.value[o]=u.value}else if(s.fallback!==void 0)r.value[o]=Ps(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Te(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else Te(this,"type",r,i);return r}}}function vn(e,t){return{kind:"schema",type:"optional",reference:vn,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Se(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=lr(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function wt(e,t){return{kind:"schema",type:"picklist",reference:wt,expects:Ms(e.map(gn),"|"),async:!1,options:e,message:t,get"~standard"(){return Se(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:Te(this,"type",r,i),r}}}function Kr(e,t,r){return{kind:"schema",type:"record",reference:Kr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Se(this)},"~run"(i,n){var o,s;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const l in a)if(Vs(a,l)){const u=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const b of p.issues)b.path=[h],(o=i.issues)==null||o.push(b);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}const d=this.value["~run"]({value:u},n);if(d.issues){const h={type:"object",origin:"value",input:a,key:l,value:u};for(const b of d.issues)b.path?b.path.unshift(h):b.path=[h],(s=i.issues)==null||s.push(b);if(i.issues||(i.issues=d.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!d.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=d.value)}}else Te(this,"type",i,n);return i}}}function P(e){return{kind:"schema",type:"string",reference:P,expects:"string",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Te(this,"type",t,r),t}}}function wn(){return{kind:"schema",type:"unknown",reference:wn,expects:"unknown",async:!1,get"~standard"(){return Se(this)},"~run"(e){return e.typed=!0,e}}}function Gr(...e){return{...e[0],pipe:e,get"~standard"(){return Se(this)},"~run"(t,r){for(const i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function Yr(e,t,r){const i=e["~run"]({value:t},hn(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}var Os=e=>e,Ls=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},mn=class extends Ls{constructor(t,r,i){super(t),this.data=i,this.name="ApiError",this.status=r??500}},js=e=>e instanceof mn&&e.data!==void 0,Bs={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Rs(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function Mf(e){return e}var zs=["agent","sdk","form","integration","migration"],Us=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],qs=["screening","cv_match","interview","overall"],Hs=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],Ws=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],yn=wt(zs),Ks=wt(Us),Gs=Gr(P(),Hr(),sr(1),qr(100)),Ys=wt(qs),Js=wt(Hs),Zs=Gr(P(),Hr(),sr(1),qr(100)),Xs=wt(Ws),_n=Ce({id:P(),email:U(P()),firstName:U(P()),lastName:U(P()),phone:U(P()),source:U(yn),identifiedAt:U(P()),createdAt:P(),updatedAt:P()}),xn=Gr(P(),sr(1)),Jr=Kr(P(),wn()),Qs=Ce({id:P(),applicationId:P(),status:Js,scheduledAt:U(P()),completedAt:U(P()),meta:U(Jr),createdAt:P(),updatedAt:P()}),el=Ce({score:st(),reason:P(),confidence:st()}),kn=Ce({id:P(),candidateId:P(),jobId:st(),stage:Gs,stageGroup:Ks,stageEnteredAt:P(),rating:U(st()),disqualifiedAt:U(P()),disqualificationReason:U(Zs),disqualificationNote:U(P()),source:Xs,sourceDetail:U(P()),sessionId:U(st()),externalApplicationId:U(P()),meta:U(Jr),context:U(Jr),scoredAt:U(P()),createdAt:P(),updatedAt:P()}),tl=Ce({id:P(),applicationId:P(),scoreType:Ys,score:U(st()),reason:U(P()),categories:U(Kr(P(),el)),scoredBy:U(P()),createdAt:P()});({...kn.entries},{..._n.entries});var rl=Ce({anonymousId:xn,email:xn,firstName:Dt(P()),lastName:Dt(P()),phone:Dt(P()),source:Dt(yn)}),il=Ce({candidateId:P(),isNew:Wr()}),nl=Ce({id:P(),stageGroup:P(),createdAt:P()}),al=Ce({isDuplicate:Wr(),existingApplication:vn(nl)}),ol=({environment:e,publishableKey:t,logger:r})=>{let i=Bs[e];return{async checkDuplicate(n){try{let a=new URLSearchParams({email:n.email,scope:n.scope});n.scope==="job"&&n.jobId!=null&&a.set("job_id",String(n.jobId));let o=await fetch(`${i}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Yr(al,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:n.email,firstName:n.firstName,lastName:n.lastName,phone:n.phone,anonymousId:n.anonymousId,source:n.source??"sdk"},o=Yr(rl,a);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${i}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Yr(il,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},Vt,N,Sn,Cn,lt,$n,En,Zr,In,mt={},An=[],sl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cr=Array.isArray;function ze(e,t){for(var r in t)e[r]=t[r];return e}function Fn(e){var t=e.parentNode;t&&t.removeChild(e)}function me(e,t,r){var i,n,a,o={};for(a in t)a=="key"?i=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Vt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Mt(e,o,i,n,null)}function Mt(e,t,r,i,n){var a={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++Sn};return n==null&&N.vnode!=null&&N.vnode(a),a}function ll(){return{current:null}}function X(e){return e.children}function $e(e,t){this.props=e,this.context=t}function ur(e,t){if(t==null)return e.__?ur(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"?ur(e):null}function Nn(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 Nn(e)}}function Xr(e){(!e.__d&&(e.__d=!0)&<.push(e)&&!dr.__r++||$n!==N.debounceRendering)&&(($n=N.debounceRendering)||En)(dr)}function dr(){var e,t,r,i,n,a,o,s,l;for(lt.sort(Zr);e=lt.shift();)e.__d&&(t=lt.length,i=void 0,n=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(i=[],n=[],(a=ze({},o)).__v=o.__v+1,Qr(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,i,s??ur(o),o.__h,n),Ln(i,o,n),o.__e!=s&&Nn(o)),lt.length>t&<.sort(Zr));dr.__r=0}function Tn(e,t,r,i,n,a,o,s,l,u,p){var d,h,b,m,_,E,I,v,y,S,C=0,D=i&&i.__k||An,W=D.length,F=W,O=t.length;for(r.__k=[],d=0;d<O;d++)(m=r.__k[d]=(m=t[d])==null||typeof m=="boolean"||typeof m=="function"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?Mt(null,m,null,null,m):cr(m)?Mt(X,{children:m},null,null,null):m.__b>0?Mt(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=r,m.__b=r.__b+1,(v=cl(m,D,I=d+C,F))===-1?b=mt:(b=D[v]||mt,D[v]=void 0,F--),Qr(e,m,b,n,a,o,s,l,u,p),_=m.__e,(h=m.ref)&&b.ref!=h&&(b.ref&&ei(b.ref,null,m),p.push(h,m.__c||_,m)),_!=null&&(E==null&&(E=_),S=!(y=b===mt||b.__v===null)&&v===I,y?v==-1&&C--:v!==I&&(v===I+1?(C++,S=!0):v>I?F>O-I?(C+=v-I,S=!0):C--:C=v<I&&v==I-1?v-I:0),I=d+C,S=S||v==d&&!y,typeof m.type!="function"||v===I&&b.__k!==m.__k?typeof m.type=="function"||S?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=_.nextSibling:l=Vn(e,_,l):l=Dn(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=E,d=W;d--;)D[d]!=null&&(typeof r.type=="function"&&D[d].__e!=null&&D[d].__e==r.__d&&(r.__d=D[d].__e.nextSibling),jn(D[d],D[d]))}function Dn(e,t,r){for(var i,n=e.__k,a=0;n&&a<n.length;a++)(i=n[a])&&(i.__=e,t=typeof i.type=="function"?Dn(i,t,r):Vn(r,i.__e,t));return t}function Ue(e,t){return t=t||[],e==null||typeof e=="boolean"||(cr(e)?e.some(function(r){Ue(r,t)}):t.push(e)),t}function Vn(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 cl(e,t,r,i){var n=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&n==l.key&&a===l.type)return r;if(i>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&n==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&n==l.key&&a===l.type)return s;s++}}return-1}function ul(e,t,r,i,n){var a;for(a in r)a==="children"||a==="key"||a in t||fr(e,a,null,r[a],i);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||fr(e,a,t[a],r[a],i)}function Mn(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||sl.test(t)?r:r+"px"}function fr(e,t,r,i,n){var a;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)r&&t in r||Mn(e.style,t,"");if(r)for(t in r)i&&r[t]===i[t]||Mn(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?i||e.addEventListener(t,a?On:Pn,a):e.removeEventListener(t,a?On:Pn,a);else if(t!=="dangerouslySetInnerHTML"){if(n)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 Pn(e){return this.l[e.type+!1](N.event?N.event(e):e)}function On(e){return this.l[e.type+!0](N.event?N.event(e):e)}function Qr(e,t,r,i,n,a,o,s,l,u){var p,d,h,b,m,_,E,I,v,y,S,C,D,W,F,O=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(p=N.__b)&&p(t);try{e:if(typeof O=="function"){if(I=t.props,v=(p=O.contextType)&&i[p.__c],y=p?v?v.props.value:p.__:i,r.__c?E=(d=t.__c=r.__c).__=d.__E:("prototype"in O&&O.prototype.render?t.__c=d=new O(I,y):(t.__c=d=new $e(I,y),d.constructor=O,d.render=fl),v&&v.sub(d),d.props=I,d.state||(d.state={}),d.context=y,d.__n=i,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),O.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=ze({},d.__s)),ze(d.__s,O.getDerivedStateFromProps(I,d.__s))),b=d.props,m=d.state,d.__v=t,h)O.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(O.getDerivedStateFromProps==null&&I!==b&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(I,y),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(I,d.__s,y)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=I,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(B){B&&(B.__=t)}),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(I,d.__s,y),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(b,m,_)})}if(d.context=y,d.props=I,d.__P=e,d.__e=!1,C=N.__r,D=0,"prototype"in O&&O.prototype.render){for(d.state=d.__s,d.__d=!1,C&&C(t),p=d.render(d.props,d.state,d.context),W=0;W<d._sb.length;W++)d.__h.push(d._sb[W]);d._sb=[]}else do d.__d=!1,C&&C(t),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++D<25);d.state=d.__s,d.getChildContext!=null&&(i=ze(ze({},i),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(_=d.getSnapshotBeforeUpdate(b,m)),Tn(e,cr(F=p!=null&&p.type===X&&p.key==null?p.props.children:p)?F:[F],t,r,i,n,a,o,s,l,u),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),E&&(d.__E=d.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=dl(r.__e,t,r,i,n,a,o,l,u);(p=N.diffed)&&p(t)}catch(B){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),N.__e(B,t,r)}}function Ln(e,t,r){for(var i=0;i<r.length;i++)ei(r[i],r[++i],r[++i]);N.__c&&N.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){N.__e(a,n.__v)}})}function dl(e,t,r,i,n,a,o,s,l){var u,p,d,h=r.props,b=t.props,m=t.type,_=0;if(m==="svg"&&(n=!0),a!=null){for(;_<a.length;_++)if((u=a[_])&&"setAttribute"in u==!!m&&(m?u.localName===m:u.nodeType===3)){e=u,a[_]=null;break}}if(e==null){if(m===null)return document.createTextNode(b);e=n?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,b.is&&b),a=null,s=!1}if(m===null)h===b||s&&e.data===b||(e.data=b);else{if(a=a&&Vt.call(e.childNodes),p=(h=r.props||mt).dangerouslySetInnerHTML,d=b.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},_=0;_<e.attributes.length;_++)h[e.attributes[_].name]=e.attributes[_].value;(d||p)&&(d&&(p&&d.__html==p.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(ul(e,b,h,n,s),d)t.__k=[];else if(Tn(e,cr(_=t.props.children)?_:[_],t,r,i,n&&m!=="foreignObject",a,o,a?a[0]:r.__k&&ur(r,0),s,l),a!=null)for(_=a.length;_--;)a[_]!=null&&Fn(a[_]);s||("value"in b&&(_=b.value)!==void 0&&(_!==e.value||m==="progress"&&!_||m==="option"&&_!==h.value)&&fr(e,"value",_,h.value,!1),"checked"in b&&(_=b.checked)!==void 0&&_!==e.checked&&fr(e,"checked",_,h.checked,!1))}return e}function ei(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(i){N.__e(i,r)}}function jn(e,t,r){var i,n;if(N.unmount&&N.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||ei(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){N.__e(a,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(n=0;n<i.length;n++)i[n]&&jn(i[n],t,r||typeof e.type!="function");r||e.__e==null||Fn(e.__e),e.__=e.__e=e.__d=void 0}function fl(e,t,r){return this.constructor(e,r)}function ct(e,t,r){var i,n,a,o;N.__&&N.__(e,t),n=(i=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Qr(t,e=(!i&&r||t).__k=me(X,null,[e]),n||mt,mt,t.ownerSVGElement!==void 0,!i&&r?[r]:n?null:t.firstChild?Vt.call(t.childNodes):null,a,!i&&r?r:n?n.__e:t.firstChild,i,o),Ln(a,e,o)}function Bn(e,t){ct(e,t,Bn)}function pl(e,t,r){var i,n,a,o,s=ze({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?i=t[a]:a=="ref"?n=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Vt.call(arguments,2):r),Mt(e.type,s,i||e.key,n||e.ref,null)}function Rn(e,t){var r={__c:t="__cC"+In++,__:e,Consumer:function(i,n){return i.children(n)},Provider:function(i){var n,a;return this.getChildContext||(n=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,Xr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),i.children}};return r.Provider.__=r.Consumer.contextType=r}Vt=An.slice,N={__e:function(e,t,r,i){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,i||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},Sn=0,Cn=function(e){return e!=null&&e.constructor===void 0},$e.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ze({},this.state),typeof e=="function"&&(e=e(ze({},r),this.props)),e&&ze(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Xr(this))},$e.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Xr(this))},$e.prototype.render=X,lt=[],En=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Zr=function(e,t){return e.__v.__b-t.__v.__b},dr.__r=0,In=0;function zn(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=zn(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function qe(){for(var e,t,r=0,i="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=zn(e))&&(i&&(i+=" "),i+=t);return i}const Un=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qn=qe,ut=(e,t)=>r=>{var i;if((t==null?void 0:t.variants)==null)return qn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(u=>{const p=r==null?void 0:r[u],d=a==null?void 0:a[u];if(p===null)return null;const h=Un(p)||Un(d);return n[u][h]}),s=r&&Object.entries(r).reduce((u,p)=>{let[d,h]=p;return h===void 0||(u[d]=h),u},{}),l=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((u,p)=>{let{class:d,className:h,...b}=p;return Object.entries(b).every(m=>{let[_,E]=m;return Array.isArray(E)?E.includes({...a,...s}[_]):{...a,...s}[_]===E})?[...u,d,h]:u},[]);return qn(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var Xe,K,ti,Hn,yt=0,Wn=[],pr=[],Kn=N.__b,Gn=N.__r,Yn=N.diffed,Jn=N.__c,Zn=N.unmount;function _t(e,t){N.__h&&N.__h(K,e,yt||t),yt=0;var r=K.__H||(K.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:pr}),r.__[e]}function He(e){return yt=1,Xn(ta,e)}function Xn(e,t,r){var i=_t(Xe++,2);if(i.t=e,!i.__c&&(i.__=[r?r(t):ta(void 0,t),function(s){var l=i.__N?i.__N[0]:i.__[0],u=i.t(l,s);l!==u&&(i.__N=[u,i.__[1]],i.__c.setState({}))}],i.__c=K,!K.u)){var n=function(s,l,u){if(!i.__c.__H)return!0;var p=i.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,s,l,u);var d=!1;return p.forEach(function(h){if(h.__N){var b=h.__[0];h.__=h.__N,h.__N=void 0,b!==h.__[0]&&(d=!0)}}),!(!d&&i.__c.props===s)&&(!a||a.call(this,s,l,u))};K.u=!0;var a=K.shouldComponentUpdate,o=K.componentWillUpdate;K.componentWillUpdate=function(s,l,u){if(this.__e){var p=a;a=void 0,n(s,l,u),a=p}o&&o.call(this,s,l,u)},K.shouldComponentUpdate=n}return i.__N||i.__}function ri(e,t){var r=_t(Xe++,3);!N.__s&&ni(r.__H,t)&&(r.__=e,r.i=t,K.__H.__h.push(r))}function ge(e,t){var r=_t(Xe++,4);!N.__s&&ni(r.__H,t)&&(r.__=e,r.i=t,K.__h.push(r))}function be(e){return yt=5,Qe(function(){return{current:e}},[])}function hl(e,t,r){yt=6,ge(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 Qe(e,t){var r=_t(Xe++,7);return ni(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function gl(e,t){return yt=8,Qe(function(){return e},t)}function Qn(e){var t=K.context[e.__c],r=_t(Xe++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(K)),t.props.value):e.__}function bl(e,t){N.useDebugValue&&N.useDebugValue(t?t(e):e)}function vl(){var e=_t(Xe++,11);if(!e.__){for(var t=K.__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 wl(){for(var e;e=Wn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(hr),e.__H.__h.forEach(ii),e.__H.__h=[]}catch(t){e.__H.__h=[],N.__e(t,e.__v)}}N.__b=function(e){K=null,Kn&&Kn(e)},N.__r=function(e){Gn&&Gn(e),Xe=0;var t=(K=e.__c).__H;t&&(ti===K?(t.__h=[],K.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=pr,r.__N=r.i=void 0})):(t.__h.forEach(hr),t.__h.forEach(ii),t.__h=[],Xe=0)),ti=K},N.diffed=function(e){Yn&&Yn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Wn.push(t)!==1&&Hn===N.requestAnimationFrame||((Hn=N.requestAnimationFrame)||ml)(wl)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==pr&&(r.__=r.__V),r.i=void 0,r.__V=pr})),ti=K=null},N.__c=function(e,t){t.some(function(r){try{r.__h.forEach(hr),r.__h=r.__h.filter(function(i){return!i.__||ii(i)})}catch(i){t.some(function(n){n.__h&&(n.__h=[])}),t=[],N.__e(i,r.__v)}}),Jn&&Jn(e,t)},N.unmount=function(e){Zn&&Zn(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(i){try{hr(i)}catch(n){t=n}}),r.__H=void 0,t&&N.__e(t,r.__v))};var ea=typeof requestAnimationFrame=="function";function ml(e){var t,r=function(){clearTimeout(i),ea&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(r,100);ea&&(t=requestAnimationFrame(r))}function hr(e){var t=K,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),K=t}function ii(e){var t=K;e.__c=e.__(),K=t}function ni(e,t){return!e||e.length!==t.length||t.some(function(r,i){return r!==e[i]})}function ta(e,t){return typeof t=="function"?t(e):t}function ra(e,t){for(var r in t)e[r]=t[r];return e}function ai(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var i in t)if(i!=="__source"&&e[i]!==t[i])return!0;return!1}function oi(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function si(e){this.props=e}function yl(e,t){function r(n){var a=this.props.ref,o=a==n.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,n)||!o:ai(this.props,n)}function i(n){return this.shouldComponentUpdate=r,me(e,n)}return i.displayName="Memo("+(e.displayName||e.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(si.prototype=new $e).isPureReactComponent=!0,si.prototype.shouldComponentUpdate=function(e,t){return ai(this.props,e)||ai(this.state,t)};var ia=N.__b;N.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ia&&ia(e)};var _l=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function li(e){function t(r){var i=ra({},r);return delete i.ref,e(i,r.ref||null)}return t.$$typeof=_l,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var na=function(e,t){return e==null?null:Ue(Ue(e).map(t))},xl={map:na,forEach:na,count:function(e){return e?Ue(e).length:0},only:function(e){var t=Ue(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ue},kl=N.__e;N.__e=function(e,t,r,i){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),n.__c(e,t)}kl(e,t,r,i)};var aa=N.unmount;function oa(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),e.__c.__H=null),(e=ra({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(i){return oa(i,t,r)})),e}function sa(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(i){return sa(i,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 Pt(){this.__u=0,this.t=null,this.__b=null}function la(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ca(e){var t,r,i;function n(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){i=o}),i)throw i;if(!r)throw t;return me(r,a)}return n.displayName="Lazy",n.__f=!0,n}function Ot(){this.u=null,this.o=null}N.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),aa&&aa(e)},(Pt.prototype=new $e).__c=function(e,t){var r=t.__c,i=this;i.t==null&&(i.t=[]),i.t.push(r);var n=la(i.__v),a=!1,o=function(){a||(a=!0,r.__R=null,n?n(s):s())};r.__R=o;var s=function(){if(!--i.__u){if(i.state.__a){var u=i.state.__a;i.__v.__k[0]=sa(u,u.__c.__P,u.__c.__O)}var p;for(i.setState({__a:i.__b=null});p=i.t.pop();)p.forceUpdate()}},l=t.__h===!0;i.__u++||l||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(o,o)},Pt.prototype.componentWillUnmount=function(){this.t=[]},Pt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=oa(this.__b,r,i.__O=i.__P)}this.__b=null}var n=t.__a&&me(X,null,e.fallback);return n&&(n.__h=null),[me(X,null,t.__a?null:e.children),n]};var ua=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 Sl(e){return this.getChildContext=function(){return e.context},e.children}function Cl(e){var t=this,r=e.i;t.componentWillUnmount=function(){ct(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(i){this.childNodes.push(i),t.i.appendChild(i)},insertBefore:function(i,n){this.childNodes.push(i),t.i.appendChild(i)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.i.removeChild(i)}}),ct(me(Sl,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function $l(e,t){var r=me(Cl,{__v:e,i:t});return r.containerInfo=t,r}(Ot.prototype=new $e).__a=function(e){var t=this,r=la(t.__v),i=t.o.get(e);return i[0]++,function(n){var a=function(){t.props.revealOrder?(i.push(n),ua(t,e,i)):n()};r?r(a):a()}},Ot.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ue(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},Ot.prototype.componentDidUpdate=Ot.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){ua(e,r,t)})};var da=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,El=/^(?: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]/,Il=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Al=/[A-Z0-9]/g,Fl=typeof document<"u",Nl=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Tl(e,t,r){return t.__k==null&&(t.textContent=""),ct(e,t),typeof r=="function"&&r(),e?e.__c:null}function Dl(e,t,r){return Bn(e,t),typeof r=="function"&&r(),e?e.__c:null}$e.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty($e.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var fa=N.event;function Vl(){}function Ml(){return this.cancelBubble}function Pl(){return this.defaultPrevented}N.event=function(e){return fa&&(e=fa(e)),e.persist=Vl,e.isPropagationStopped=Ml,e.isDefaultPrevented=Pl,e.nativeEvent=e};var ci,Ol={enumerable:!1,configurable:!0,get:function(){return this.class}},pa=N.vnode;N.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,i=t.type,n={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||Fl&&a==="children"&&i==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||i!=="input"&&i!=="textarea"||Nl(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Il.test(a)?a=s:i.indexOf("-")===-1&&El.test(a)?a=a.replace(Al,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}i=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Ue(r.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),i=="select"&&n.defaultValue!=null&&(n.value=Ue(r.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),r.class&&!r.className?(n.class=r.class,Object.defineProperty(n,"className",Ol)):(r.className&&!r.class||r.class&&r.className)&&(n.class=n.className=r.className),t.props=n}(e),e.$$typeof=da,pa&&pa(e)};var ha=N.__r;N.__r=function(e){ha&&ha(e),ci=e.__c};var ga=N.diffed;N.diffed=function(e){ga&&ga(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),ci=null};var Ll={ReactCurrentDispatcher:{current:{readContext:function(e){return ci.__n[e.__c].props.value}}}};function jl(e){return me.bind(null,e)}function ba(e){return!!e&&e.$$typeof===da}function Bl(e){return ba(e)?pl.apply(null,arguments):e}function Rl(e){return!!e.__k&&(ct(null,e),!0)}function zl(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ul=function(e,t){return e(t)},ql=function(e,t){return e(t)},Hl=X;function va(e){e()}function Wl(e){return e}function Kl(){return[!1,va]}var Gl=ge;function Yl(e,t){var r=t(),i=He({h:{__:r,v:t}}),n=i[0].h,a=i[1];return ge(function(){n.__=r,n.v=t,oi(n.__,t())||a({h:n})},[e,r,t]),ri(function(){return oi(n.__,n.v())||a({h:n}),e(function(){oi(n.__,n.v())||a({h:n})})},[e]),r}var ue={useState:He,useId:vl,useReducer:Xn,useEffect:ri,useLayoutEffect:ge,useInsertionEffect:Gl,useTransition:Kl,useDeferredValue:Wl,useSyncExternalStore:Yl,startTransition:va,useRef:be,useImperativeHandle:hl,useMemo:Qe,useCallback:gl,useContext:Qn,useDebugValue:bl,version:"17.0.2",Children:xl,render:Tl,hydrate:Dl,unmountComponentAtNode:Rl,createPortal:$l,createElement:me,createContext:Rn,createFactory:jl,cloneElement:Bl,createRef:ll,Fragment:X,isValidElement:ba,findDOMNode:zl,Component:$e,PureComponent:si,memo:yl,forwardRef:li,flushSync:ql,unstable_batchedUpdates:Ul,StrictMode:Hl,Suspense:Pt,SuspenseList:Ot,lazy:ca,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ll};const de=Symbol.for("@ts-pattern/matcher"),wa=Symbol.for("@ts-pattern/isVariadic"),gr="@ts-pattern/anonymous-select-key",ui=e=>!!(e&&typeof e=="object"),br=e=>e&&!!e[de],Q=(e,t,r)=>{if(br(e)){const i=e[de](),{matched:n,selections:a}=i.match(t);return n&&a&&Object.keys(a).forEach(o=>r(o,a[o])),n}if(ui(e)){if(!ui(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let i=[],n=[],a=[];for(const o of e.keys()){const s=e[o];br(s)&&s[wa]?a.push(s):a.length?n.push(s):i.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<i.length+n.length)return!1;const o=t.slice(0,i.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(i.length,n.length===0?1/0:-n.length);return i.every((u,p)=>Q(u,o[p],r))&&n.every((u,p)=>Q(u,s[p],r))&&(a.length===0||Q(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>Q(o,t[s],r))}return Reflect.ownKeys(e).every(i=>{const n=e[i];return(i in t||br(a=n)&&a[de]().matcherType==="optional")&&Q(n,t[i],r);var a})}return Object.is(t,e)},fe=e=>{var t,r,i;return ui(e)?br(e)?(t=(r=(i=e[de]()).getSelectionKeys)==null?void 0:r.call(i))!=null?t:[]:Array.isArray(e)?Lt(e,fe):Lt(Object.values(e),fe):[]},Lt=(e,t)=>e.reduce((r,i)=>r.concat(t(i)),[]);function Jl(...e){if(e.length===1){const[t]=e;return r=>Q(t,r,()=>{})}if(e.length===2){const[t,r]=e;return Q(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function re(e){return Object.assign(e,{optional:()=>fi(e),and:t=>G(e,t),or:t=>ma(e,t),select:t=>t===void 0?jt(e):jt(t,e)})}function di(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const i=[{value:Object.assign(t,{[wa]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=i[r++])!=null?n:i.at(-1)}}}}))(e),{optional:()=>di(fi(e)),select:t=>di(t===void 0?jt(e):jt(t,e))})}function fi(e){return re({[de]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return t===void 0?(fe(e).forEach(n=>i(n,void 0)),{matched:!0,selections:r}):{matched:Q(e,t,i),selections:r}},getSelectionKeys:()=>fe(e),matcherType:"optional"})})}const Zl=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Xl=(e,t)=>{for(const[r,i]of e.entries())if(!t(i,r))return!1;return!0},Ql=(e,t)=>{const r=Reflect.ownKeys(e);for(const i of r)if(!t(i,e[i]))return!1;return!0};function G(...e){return re({[de]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return{matched:e.every(n=>Q(n,t,i)),selections:r}},getSelectionKeys:()=>Lt(e,fe),matcherType:"and"})})}function ma(...e){return re({[de]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return Lt(e,fe).forEach(n=>i(n,void 0)),{matched:e.some(n=>Q(n,t,i)),selections:r}},getSelectionKeys:()=>Lt(e,fe),matcherType:"or"})})}function j(e){return{[de]:()=>({match:t=>({matched:!!e(t)})})}}function jt(...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 re({[de]:()=>({match:i=>{let n={[t??gr]:i};return{matched:r===void 0||Q(r,i,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??gr].concat(r===void 0?[]:fe(r))})})}function ya(e){return!0}function De(e){return typeof e=="number"}function et(e){return typeof e=="string"}function tt(e){return typeof e=="bigint"}const _a=re(j(ya)),ec=re(j(ya)),tc=_a,rt=e=>Object.assign(re(e),{startsWith:t=>{return rt(G(e,(r=t,j(i=>et(i)&&i.startsWith(r)))));var r},endsWith:t=>{return rt(G(e,(r=t,j(i=>et(i)&&i.endsWith(r)))));var r},minLength:t=>rt(G(e,(r=>j(i=>et(i)&&i.length>=r))(t))),length:t=>rt(G(e,(r=>j(i=>et(i)&&i.length===r))(t))),maxLength:t=>rt(G(e,(r=>j(i=>et(i)&&i.length<=r))(t))),includes:t=>{return rt(G(e,(r=t,j(i=>et(i)&&i.includes(r)))));var r},regex:t=>{return rt(G(e,(r=t,j(i=>et(i)&&!!i.match(r)))));var r}}),xa=rt(j(et)),Ve=e=>Object.assign(re(e),{between:(t,r)=>Ve(G(e,((i,n)=>j(a=>De(a)&&i<=a&&n>=a))(t,r))),lt:t=>Ve(G(e,(r=>j(i=>De(i)&&i<r))(t))),gt:t=>Ve(G(e,(r=>j(i=>De(i)&&i>r))(t))),lte:t=>Ve(G(e,(r=>j(i=>De(i)&&i<=r))(t))),gte:t=>Ve(G(e,(r=>j(i=>De(i)&&i>=r))(t))),int:()=>Ve(G(e,j(t=>De(t)&&Number.isInteger(t)))),finite:()=>Ve(G(e,j(t=>De(t)&&Number.isFinite(t)))),positive:()=>Ve(G(e,j(t=>De(t)&&t>0))),negative:()=>Ve(G(e,j(t=>De(t)&&t<0)))}),rc=Ve(j(De)),it=e=>Object.assign(re(e),{between:(t,r)=>it(G(e,((i,n)=>j(a=>tt(a)&&i<=a&&n>=a))(t,r))),lt:t=>it(G(e,(r=>j(i=>tt(i)&&i<r))(t))),gt:t=>it(G(e,(r=>j(i=>tt(i)&&i>r))(t))),lte:t=>it(G(e,(r=>j(i=>tt(i)&&i<=r))(t))),gte:t=>it(G(e,(r=>j(i=>tt(i)&&i>=r))(t))),positive:()=>it(G(e,j(t=>tt(t)&&t>0))),negative:()=>it(G(e,j(t=>tt(t)&&t<0)))}),ic=it(j(tt)),nc=re(j(function(e){return typeof e=="boolean"})),ac=re(j(function(e){return typeof e=="symbol"})),oc=re(j(function(e){return e==null})),sc=re(j(function(e){return e!=null}));var Bt={__proto__:null,matcher:de,optional:fi,array:function(...e){return di({[de]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let i={};if(t.length===0)return fe(r).forEach(a=>{i[a]=[]}),{matched:!0,selections:i};const n=(a,o)=>{i[a]=(i[a]||[]).concat([o])};return{matched:t.every(a=>Q(r,a,n)),selections:i}},getSelectionKeys:()=>e.length===0?[]:fe(e[0])})})},set:function(...e){return re({[de]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const i=(a,o)=>{r[a]=(r[a]||[]).concat([o])},n=e[0];return{matched:Zl(t,a=>Q(n,a,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:fe(e[0])})})},map:function(...e){return re({[de]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const i=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var n;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=e[0])==null?void 0:n.toString()}`);const[a,o]=e;return{matched:Xl(t,(s,l)=>{const u=Q(a,l,i),p=Q(o,s,i);return u&&p}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...fe(e[0]),...fe(e[1])]})})},record:function(...e){return re({[de]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let i={};const n=(s,l)=>{i[s]=(i[s]||[]).concat([l])},[a,o]=e.length===1?[xa,e[0]]:e;return{matched:Ql(t,(s,l)=>{const u=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),p=u!==null&&Q(a,u,n),d=Q(a,s,n),h=Q(o,l,n);return(d||p)&&h}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[...fe(e[0]),...fe(e[1])]})})},intersection:G,union:ma,not:function(e){return re({[de]:()=>({match:t=>({matched:!Q(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:j,select:jt,any:_a,unknown:ec,_:tc,string:xa,number:rc,bigint:ic,boolean:nc,symbol:ac,nullish:oc,nonNullable:sc,instanceOf:function(e){return re(j(function(t){return r=>r instanceof t}(e)))},shape:function(e){return re(j(Jl(e)))}};class lc extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}}const pi={matched:!1,value:void 0};function vr(e){return new wr(e,pi)}class wr{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],i=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&i.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(u,p)=>{a=!0,o[u]=p},l=!i.some(u=>Q(u,this.input,s))||n&&!n(this.input)?pi:{matched:!0,value:r(a?gr in o?o[gr]:o:this.input,this.input)};return new wr(this.input,l)}when(t,r){if(this.state.matched)return this;const i=!!t(this.input);return new wr(this.input,i?{matched:!0,value:r(this.input,this.input)}:pi)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=cc){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function cc(e){throw new lc(e)}var uc=["other","few","many","two","one","zero"],ka=({terms:e,overrides:t,locale:r})=>{const i=new Intl.PluralRules(r);function n(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,u)=>{var p;return((p=o==null?void 0:o[u])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=i.select(o.count);if(!(l in s)){const u=uc.find(p=>p in s);if(!u)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=u}return s[l].replace(/{{(\w+)}}/g,(u,p)=>{var d;return((d=o==null?void 0:o[p])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return n},dc=0;function c(e,t,r,i,n,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var u={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--dc,__source:n,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return N.vnode&&N.vnode(u),u}var Sa=Rn(null),Ca=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:i})=>{const n=Qe(()=>ka({locale:i,terms:e,overrides:t}),[t,i]);return c(Sa.Provider,{value:{t:n,locale:i},children:r})},useTranslation:()=>{const t=Qn(Sa);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>ka({terms:e,overrides:t,locale:r})}),{TranslationProvider:Pf,useTranslation:Of,createTFunction:Lf,defaultTerms:fc}=Ca({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",close_application:"Close application",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_empty:"Please enter a value",validation_date:"Please enter a valid date (YYYY-MM-DD)",validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_min:{one:"Please upload at least one file",other:"Please only upload at least {{count}} files"},validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_file_size:"Your file is too big. Please upload a file smaller than {{size}}",validation_required:"This field is required.",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"},optional:"optional"});const{TranslationProvider:pc,useTranslation:se,createTFunction:hc}=Ca({...fc,error_heading:"Something unexpected happened",undo:"Change answer",conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"This role is no longer accepting applications.",submission_duplicate:"It looks like you've already applied for this role.",submission_retryable:"We couldn't submit your application. Please try again.",submission_failed:"We couldn't submit your application. Choose Restart to try again.",submission_unknown:"We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",file_preparing:{one:"Preparing your file…",other:"Preparing your files…"},file_ready:{one:"Your file is ready to send",other:"Your files are ready to send"},file_read_error:"We couldn't read this file. Select it again or choose another file.",file_read_error_replacement:"We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.",address_error:"We couldn't search for that address. Try again, or fill it in manually.",address_searching:"Searching addresses…",address_no_results:"We couldn't find that address. Check the spelling or postcode, or fill it in manually.",maximize:"Maximise",minimize:"Minimise"}),jf="";function We(e,t){if(!e)throw new Error(t)}var hi=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(hi):Object.keys(e).sort().reduce((t,r)=>(t[r]=hi(e[r]),t),{}),gc=e=>{let t=JSON.stringify(hi(e)),r=5381;for(let i=0;i<t.length;i++)r=r*33^t.charCodeAt(i);return(r>>>0).toString(36)},bc=Symbol.for("preact-signals");function gi(){if(xt>1)xt--;else{for(var e,t=!1;Rt!==void 0;){var r=Rt;for(Rt=void 0,bi++;r!==void 0;){var i=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Ea(r))try{r.c()}catch(n){t||(e=n,t=!0)}r=i}}if(bi=0,xt--,t)throw e}}var q=void 0,Rt=void 0,xt=0,bi=0,mr=0;function $a(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 ae(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ae.prototype.brand=bc,ae.prototype.h=function(){return!0},ae.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)},ae.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)}},ae.prototype.subscribe=function(e){var t=this;return wi(function(){var r=t.value,i=q;q=void 0;try{e(r)}finally{q=i}})},ae.prototype.valueOf=function(){return this.value},ae.prototype.toString=function(){return this.value+""},ae.prototype.toJSON=function(){return this.value},ae.prototype.peek=function(){var e=q;q=void 0;try{return this.value}finally{q=e}},Object.defineProperty(ae.prototype,"value",{get:function(){var e=$a(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(bi>100)throw new Error("Cycle detected");this.v=e,this.i++,mr++,xt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{gi()}}}});function Ke(e){return new ae(e)}function Ea(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ia(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Aa(e){for(var t=e.s,r=void 0;t!==void 0;){var i=t.p;t.i===-1?(t.S.U(t),i!==void 0&&(i.n=t.n),t.n!==void 0&&(t.n.p=i)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=i}e.s=r}function kt(e){ae.call(this,void 0),this.x=e,this.s=void 0,this.g=mr-1,this.f=4}(kt.prototype=new ae).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===mr))return!0;if(this.g=mr,this.f|=1,this.i>0&&!Ea(this))return this.f&=-2,!0;var e=q;try{Ia(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,Aa(this),this.f&=-2,!0},kt.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)}ae.prototype.S.call(this,e)},kt.prototype.U=function(e){if(this.t!==void 0&&(ae.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)}},kt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(kt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=$a(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function vc(e){return new kt(e)}function Fa(e){var t=e.u;if(e.u=void 0,typeof t=="function"){xt++;var r=q;q=void 0;try{t()}catch(i){throw e.f&=-2,e.f|=8,vi(e),i}finally{q=r,gi()}}}function vi(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Fa(e)}function wc(e){if(q!==this)throw new Error("Out-of-order effect");Aa(this),q=e,this.f&=-2,8&this.f&&vi(this),gi()}function zt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}zt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},zt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Fa(this),Ia(this),xt++;var e=q;return q=this,wc.bind(this,e)},zt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Rt,Rt=this)},zt.prototype.d=function(){this.f|=8,1&this.f||vi(this)};function wi(e){var t=new zt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var mi;function St(e,t){N[e]=t.bind(null,N[e]||function(){})}function yr(e){mi&&mi(),mi=e&&e.S()}function Na(e){var t=this,r=e.data,i=yc(r);i.value=r;var n=Qe(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Cn(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},vc(function(){var o=i.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}Na.displayName="_st",Object.defineProperties(ae.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Na},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),St("__b",function(e,t){if(typeof t.type=="string"){var r,i=t.props;for(var n in i)if(n!=="children"){var a=i[n];a instanceof ae&&(r||(t.__np=r={}),r[n]=a,i[n]=a.peek())}}e(t)}),St("__r",function(e,t){yr();var r,i=t.__c;i&&(i.__$f&=-2,(r=i.__$u)===void 0&&(i.__$u=r=function(n){var a;return wi(function(){a=this}),a.c=function(){i.__$f|=1,i.setState({})},a}())),yr(r),e(t)}),St("__e",function(e,t,r,i){yr(),e(t,r,i)}),St("diffed",function(e,t){yr();var r;if(typeof t.type=="string"&&(r=t.__e)){var i=t.__np,n=t.props;if(i){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in i)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in i){var u=a[l],p=i[l];u===void 0?(u=mc(r,l,p,n),a[l]=u):u.o(p,n)}}}e(t)});function mc(e,t,r,i){var n=t in e&&e.ownerSVGElement===void 0,a=Ke(r);return{o:function(o,s){a.value=o,i=s},d:wi(function(){var o=a.value.value;i[t]!==o&&(i[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}St("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var i=r.U;if(i){r.U=void 0;for(var n in i){var a=i[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),St("__h",function(e,t,r,i){(i<3||i===9)&&(t.__$f|=2),e(t,r,i)}),$e.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 i in t)return!0;for(var n in e)if(n!=="__source"&&e[n]!==this.props[n])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function yc(e){return Qe(function(){return Ke(e)},[])}const yi=(e,t)=>t.some(r=>e instanceof r);let Ta,Da;function _c(){return Ta||(Ta=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function xc(){return Da||(Da=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const _i=new WeakMap,xi=new WeakMap,_r=new WeakMap;function kc(e){const t=new Promise((r,i)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(dt(e.result)),n()},o=()=>{i(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return _r.set(t,e),t}function Sc(e){if(_i.has(e))return;const t=new Promise((r,i)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),n()},o=()=>{i(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});_i.set(e,t)}let ki={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return _i.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return dt(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 Va(e){ki=e(ki)}function Cc(e){return xc().includes(e)?function(...t){return e.apply(Si(this),t),dt(this.request)}:function(...t){return dt(e.apply(Si(this),t))}}function $c(e){return typeof e=="function"?Cc(e):(e instanceof IDBTransaction&&Sc(e),yi(e,_c())?new Proxy(e,ki):e)}function dt(e){if(e instanceof IDBRequest)return kc(e);if(xi.has(e))return xi.get(e);const t=$c(e);return t!==e&&(xi.set(e,t),_r.set(t,e)),t}const Si=e=>_r.get(e);function Ec(e,t,{blocked:r,upgrade:i,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=dt(o);return i&&o.addEventListener("upgradeneeded",l=>{i(dt(o.result),l.oldVersion,l.newVersion,dt(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),n&&l.addEventListener("versionchange",u=>n(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const Ic=["get","getKey","getAll","getAllKeys","count"],Ac=["put","add","delete","clear"],Ci=new Map;function Ma(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Ci.get(t))return Ci.get(t);const r=t.replace(/FromIndex$/,""),i=t!==r,n=Ac.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(n||Ic.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let u=l.store;return i&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),n&&l.done]))[0]};return Ci.set(t,a),a}Va(e=>({...e,get:(t,r,i)=>Ma(t,r)||e.get(t,r,i),has:(t,r)=>!!Ma(t,r)||e.has(t,r)}));const Fc=["continue","continuePrimaryKey","advance"],Pa={},$i=new WeakMap,Oa=new WeakMap,Nc={get(e,t){if(!Fc.includes(t))return e[t];let r=Pa[t];return r||(r=Pa[t]=function(...i){$i.set(this,Oa.get(this)[t](...i))}),r}};async function*Tc(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Nc);for(Oa.set(r,t),_r.set(r,Si(t));t;)yield r,t=await($i.get(r)||t.continue()),$i.delete(r)}function La(e,t){return t===Symbol.asyncIterator&&yi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&yi(e,[IDBIndex,IDBObjectStore])}Va(e=>({...e,get(t,r,i){return La(t,r)?Tc:e.get(t,r,i)},has(t,r){return La(t,r)||e.has(t,r)}}));const xr=typeof indexedDB>"u"?void 0:Ec("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let kr,Ei,Ut;const ja=()=>{if(!kr)return Ut;const e=kr;kr=void 0;const t=za(e),r=xr==null?void 0:xr.then(i=>i.put("state",e.data,t)).finally(()=>{Ut===r&&(Ut=void 0)});return Ut=r,Ut},Me={getStateData:async(e,t,r)=>{var n;const i=za({...e,flowKeys:t,context:r});return(n=await xr)==null?void 0:n.get("state",i)},setStateData:e=>{kr=e,clearTimeout(Ei),Ei=setTimeout(()=>void ja(),1e3)},flushStateData:()=>(clearTimeout(Ei),ja()??Promise.resolve())},Ba=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Ct=e=>t=>t?t.type===e:!1;class ft extends Error{constructor(){super("Aborted")}}const Dc=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ra=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Dc()}),Vc=e=>vr(e).with({nativeEvent:{submitter:Bt.select(Bt.union(Bt.instanceOf(HTMLButtonElement),Bt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Sr=(e,t,r,i=0)=>{if(!t.nextId)return r(t.id,{stepsMade:i,remainingSteps:0}),{stepsMade:i,remainingSteps:0};const n=e.find(u=>u.id===t.nextId);if(n===void 0)return{stepsMade:i,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(u=>u.id===a),s=t.type.includes("question")?1:0;if(o){const u=s+Math.max(Sr(e,n,r,i+s).remainingSteps,Sr(e,o,r,i+s).remainingSteps);return r(t.id,{stepsMade:i,remainingSteps:u}),{stepsMade:i,remainingSteps:u}}const l=s+Sr(e,n,r,i+s).remainingSteps;return r(t.id,{stepsMade:i,remainingSteps:l}),{stepsMade:i,remainingSteps:l}},Mc=e=>{const t={},r=e.find(i=>i.isHead);return r&&Sr(e,r,(i,n)=>{t[i]=n}),t},za=e=>[...e.flowKeys,e.id,e.version,e.build,gc(e.context)].join("/"),Ii=e=>{var t,r;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(r=[...e.data.messages].reverse().find(i=>i.groupId&&e.nodes.some(n=>n.id===i.groupId&&n.type.startsWith("question-"))&&(i.type==="system"||"author"in i&&i.author==="user")))==null?void 0:r.groupId},Pe=Ke({state:"idle"}),pt=e=>{const{state:t,flow:r}=Pe.value;if(t!=="loaded")return;We(r,"No flow to update");const i=e(r.data);r.data=i,Pe.value={state:t,flow:r},Me.setStateData(r)},M={current$:Pe,viewState$:Ke("closed"),prepareFlow:async({flow:e,context:t={},flowKeys:r,title:i,analytics:n,job:a,locationOrigin:o})=>(await Me.flushStateData().catch(()=>{}),{data:await Me.getStateData(e,r,t)??Ra(),startedAt:new Date,nodeIdToProgress:Mc(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:i,analytics:n,job:a,locationOrigin:o}),commitFlow:e=>{Pe.value={state:"loaded",flow:e},Me.setStateData(e)},cancelCurrentFlow:()=>{Pe.value={state:"idle"},M.viewState$.value="closed"},markAsFinished:()=>pt(e=>({...e,isFinished:!0})),markAsInteracted:()=>pt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>pt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{pt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Me.flushStateData()},restart:()=>{const{state:e,flow:t}=Pe.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ra(),i={...t,data:r,startedAt:new Date};Pe.value={state:e,flow:i},Me.setStateData(i)},addMessage:(e,t)=>{const r={...e,groupId:t};return pt(i=>(i.messages.push(r),i))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Pe.value;We(t==="loaded","Application not loaded");const i=r.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));r.data.messages=i,Me.setStateData(r)},setSubmission:(e,t)=>pt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>pt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Pe.peek().flow===e&&(Pe.value={state:"loaded",flow:e}),Me.setStateData(e),await Me.flushStateData()}},Pc=({message:e})=>{const{t}=se();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("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:[c("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"}),c("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"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-9 text-sm",children:e})]})]})},Cr=e=>c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:"Loading"}),c("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)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("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"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("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"})})})]}),Ua=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Cr,{class:"text-neutral-6 h-8 w-8"})}),Oc=e=>{const r=e/100,i=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,i))*100)}%`},Lc=ut("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),qt=({class:e,children:t,variant:r,...i})=>c("button",{class:qe(Lc({variant:r}),e),...i,children:c("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})}),qa=()=>c("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),jc=()=>{if(M.current$.value.state!=="loaded")return null;const e=M.current$.value.flow.nodeIdToProgress,t=M.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const i=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Oc(i)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Bc=({children:e,params:t})=>{const{t:r}=se(),i=M.viewState$;return c(X,{children:c("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:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ai,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:qe({hidden:M.current$.value.state!=="loaded"||i.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,M.current$.value.state==="loaded"&&c(qt,{class:"mx-1","aria-label":"Restart",onClick:()=>{M.restart()},children:[c("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"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(qt,{class:"view-switch mx-1",onTouchStart:Ai,"aria-label":r("minimize"),onClick:()=>i.value="minimised",children:c(qa,{})},"minmax")]})]}),c(jc,{})]})})};function Ai(){}const Rc=ca(()=>Promise.resolve().then(()=>Sf).then(e=>e.ChatbotBody)),Ha=ut("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),Wa=ut("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),zc=({open:e,...t})=>{const r=be(null);return ge(()=>{const i=r.current;i&&(e?i.showModal():i.close())},[e]),c("dialog",{ref:r,...t})},Uc=({logger:e,apiClient:t,analytics:r,talentBankClient:i,params:n})=>{const{state:a,flow:o,error:s}=M.current$.value,l=M.viewState$.value,u=a!=="idle"&&l==="maximised",p=be(null),d=o?[...o.data.nodeHistory].reverse().map(h=>o.nodes.find(b=>b.id===h)).find(h=>(h==null?void 0:h.type)==="flow-section"):void 0;return c(pc,{terms:n.terms,locale:void 0,children:[c(zc,{open:u,onClose:()=>M.viewState$.value="minimised",children:c("div",{ref:p,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Ha({view:"maximised"}),children:c("div",{class:Wa({view:"maximised"}),children:[c(Bc,{params:n,children:d?c(X,{children:[c("span",{class:"block",children:d.data.title}),c("span",{class:"block truncate text-xs font-normal",children:o==null?void 0:o.title})]}):o==null?void 0:o.title}),vr({state:a,view:l}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Ua,{},"loading")).with({state:"loaded"},()=>c(Pt,{fallback:c(Ua,{},"loading"),children:c(Rc,{analytics:r,apiClient:t,logger:e,talentBankClient:i})})).with({state:"error"},()=>c(Pc,{message:s})).exhaustive()]})})}),l==="minimised"?c(qc,{flow:o}):null]})},qc=({flow:e})=>{const{t}=se();return c("div",{class:Ha({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Wa({view:"minimised"}),children:[c("button",{onClick:()=>{M.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ai,children:c("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),c("div",{class:"flex items-center px-0.5",children:c(qt,{class:"mx-1","aria-label":t("close_application"),onClick:M.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Hc=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-accent-1{color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-neutral-8{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .text-neutral-9{color:var(--i-color-n-9)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (pointer: coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch: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(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)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}
|
|
2
|
+
`,Ka="inploi-chatbot",Fi=`[data-widget='${Ka}']`,Wc=()=>({getChatbotElement:()=>document.querySelector(Fi),getOrCreateChatbotElement:()=>{const e=document.querySelector(Fi);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Ka,t}}),Kc=25,Ga=Ke(()=>{}),Gc=(e,t)=>new Promise((r,i)=>{if(t!=null&&t.aborted)return i(new ft);const n=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(n),i(new ft)},{once:!0})}),ie={onSubmitSuccessFn$:Ke(()=>{}),onInteractionFn$:Ke(()=>{}),isBotTyping$:Ke(!1),isReadingHistory$:Ke(!1),scrollToEnd:()=>Ga.value()},Yc=()=>{const e=be(null);ge(()=>{const r=e.current;if(!r)return;const i=()=>{ie.isReadingHistory$.value=!1,r.scrollTo({top:r.scrollHeight,behavior:"instant"})};Ga.value=i;const n=()=>{ie.isReadingHistory$.value=r.scrollHeight-r.scrollTop-r.clientHeight>2};r.addEventListener("scroll",n,{passive:!0});const a=new ResizeObserver(()=>{ie.isReadingHistory$.peek()||i()});return a.observe(r),r.firstElementChild&&a.observe(r.firstElementChild),()=>{r.removeEventListener("scroll",n),a.disconnect()}},[]);const t=Qe(()=>({setSubmission:(i,n)=>M.setSubmission(i,n),send:async({message:i,signal:n,groupId:a})=>{if(await vr(i).with({author:"bot",type:"text"},async o=>{if(n!=null&&n.aborted)throw new ft;ie.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Kc;try{await Gc(s,n)}finally{ie.isBotTyping$.value=!1}}).otherwise(async()=>{}),n!=null&&n.aborted)throw new ft;M.addMessage(i,a)},input:({input:i,signal:n})=>{if(n!=null&&n.aborted)throw new ft;return M.setInput(i),new Promise(a=>{const o=s=>{if(n!=null&&n.aborted)throw new ft;M.setInput(void 0),i.key&&M.setSubmission(i.key,s),a(s)};ie.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}};var Ya=bs(Lr([ke(),ar()]),on(String)),Ja=ce({id:Ya,version:ar(),build:ar(),nodes:ln(sn()),context_schema:Ne(nr(cn(ke(),ce({required:Or(),type:Lr([ir("string"),ir("number")])}))))}),Jc=ce({flow:Ja}),Zc=ce({company:ce({name:ke()}),flow:Ja,job:ce({id:Ya,title:ke()}),user:Ne(ce({city:Ne(ke()),country:Ne(ke()),isEU:Ne(Or()),continent:Ne(ke())}))}),Xc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Rs(),response:Zc}},Qc={pathname:"/flow/id/:id",method:"GET",schema:{response:Jc}},eu=["1","2","3","4","5","6","7","8","9","10","11","12"],tu={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]}},ru=(e,t=1,r)=>i=>{const[n,a]=tu[r][i];return"oklch("+n+"% "+a*t+" "+e+")"},Ni=e=>{const t=ru(e.hue,e.chroma,e.mode);return Object.fromEntries(eu.map(r=>[e.prefix+r,e.transform(t(r))]))},Ti=e=>e,iu=e=>{const t=Object.keys(e).flatMap(r=>{const i=e[r];return typeof i=="object"&&i!==null?Object.keys(i).map(n=>{const a=i[n];return[`${String(r)}.${n}`,a]}):[[r,i]]});return Object.fromEntries(t)},$r=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Di=(e,...t)=>{if(!t.length)return e;const r=t.shift();if($r(e)&&$r(r))for(const i in r){const n=r[i];if($r(n)){e[i]||Object.assign(e,{[i]:{}});const a=e[i];$r(a)&&Di(a,n)}else Object.assign(e,{[i]:r[i]})}return Di(e,...t)},nu=e=>{function t(r,i){const n=[e.prefix,i.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${n}`:`var(--${n})`}return t},au=()=>({core:e=>({semantic:t=>({component:r=>({from:i=>{const{theme:n,getToken:a}=i,o=h=>a("reference",h.toString()),s=e({theme:n}),l=t({theme:n,core:o,raw:{core:s}}),u=r({theme:n,core:o,semantic:o,raw:{core:s,semantic:l}}),p=iu(Di(s,l,u)),d=([h,b],m)=>{const _=[m,h].filter(Boolean).join(".");return typeof b=="object"?Object.entries(b).flatMap(E=>d(E,_)):[[i.getToken("declaration",_),b]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(h=>d(h))),ref:h=>a("reference",h.toString())}}})})})});const[Vi,Mi,Za]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],ou=au().core(({theme:e})=>({color:{black:Vi,white:Mi,lowest:e.mode==="light"?Mi:Vi,highest:e.mode==="light"?Vi:Mi,...Ni({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Ti}),...Ni({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Ti}),...Ni({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Ti})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const i=(n,a)=>t.core.color[n].replace(")",` / ${a})`);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:i("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Za,"bg-hover":i("n-10",.2),"bg-active":i("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:i})=>{const n=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:i(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":i(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":n("a-9",.05)},"status-bar":{bg:n("n-2",.8),"bg-button":Za,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":i(t.mode==="dark"?"color.a-8":"color.a-11")}}}),su=nu({prefix:"i-"}),lu=e=>{const t=ou.from({theme:e,getToken:su}),r=Object.entries(t.declarations).map(([i,n])=>`${i}: ${n};`);return`${Fi} {
|
|
3
3
|
${r.concat(r).join(`
|
|
4
4
|
`)}
|
|
5
|
-
}`},ru=({_internal_domManager:e=jc(),theme:t,terms:r,feedback:i})=>Gs(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:d})=>{let p=!1,u=0;const h=sc({locale:void 0,overrides:r??{}}),b=l&&d?Qs({environment:d,publishableKey:l,logger:o}):void 0,m=w=>w===u,_=()=>{if(typeof window>"u")return;u++,rt.flushStateData().catch(()=>{}),N.cancelCurrentFlow(),te.isBotTyping$.value=!1;const w=e.getChatbotElement();w&&(ct(null,w),w.remove()),p=!1,o.info("Chatbot plugin destroyed")},k=()=>{if(typeof window>"u")return;const w=u,y=[we("style",{id:"inploi-chatbot-styles"},Lc),we("style",{id:"inploi-chatbot-theme"},tu(t))],S=e.getOrCreateChatbotElement();if(ct(we(Q,{},[y,we(Pc,{apiClient:n,logger:o,analytics:s,talentBankClient:b,params:{theme:t,terms:r,feedback:i}})]),S),i){const E=A=>{var O,L;if(!m(w))return;const G=(O=e.getChatbotElement())==null?void 0:O.querySelector("dialog");G&&iu({instance:A({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((L=i.params)==null?void 0:L.terms)??{},host:G})};i.plugin instanceof Promise?i.plugin.then(({feedbackPlugin:A})=>{E(A())}).catch(A=>{o.error("Error preparing feedback plugin",A)}):E(i.plugin)}p=!0},$=async(w,y)=>{if(!m(y))return;Ss({context:w.context||{},schema:w.flow.context_schema,logger:o});const S=await N.prepareFlow(w);m(y)&&N.commitFlow(S)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(p)return;k(),o.info("Chatbot plugin prepared")}catch(w){o.error("Error preparing chatbot plugin",w)}},fetchFlowByJobId:async(w,y)=>a.request(Hc,{params:{id:w},searchParams:{id_type:(y==null?void 0:y.idType)==="inploi"?"internal":"external"}}).then(S=>({flow:S.flow,title:S.job.title,flowKeys:[S.job.id,...(y==null?void 0:y.flowKeys)??[]],job:{id:S.job.id,id_type:"external"},...y,context:{user:S.user,...y==null?void 0:y.context}})),fetchFlowById:async(w,y)=>a.request(Wc,{params:{id:w}}).then(S=>{var E;return{flow:S.flow,title:"Chatbot",flowKeys:(y==null?void 0:y.flowKeys)??[],...y,analytics:{customProperties:{flow_id:S.flow.id,flow_version:S.flow.version,...(E=y==null?void 0:y.analytics)==null?void 0:E.customProperties}}}}),open:async w=>{if(!(typeof window>"u"))try{N.cancelCurrentFlow(),N.viewState$.value="maximised",p||k();const y=u;w instanceof Promise?(N.current$.value={state:"loading"},w.then(S=>$(S,y)).catch(S=>{if(!m(y))return;const E=S instanceof Error?S.message:h("unknown_error");N.current$.value={state:"error",error:E}})):await $(w,y)}catch(y){o.error("Error starting flow",y)}},close:async()=>{typeof window>"u"||(N.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:_}});function iu({instance:e,terms:t,theme:r,host:i}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:i})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=ru;const Ya=(e,t,r)=>{var i;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(i=t.analytics)==null?void 0:i.customProperties})};var Ja=({condition:e,context:t,submissions:r,ifBlock:i})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=un({context:t,key:n,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=Tt(o.value,a);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=Tt(o.value,a),l={...i,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return Ht(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Ht(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Ht(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(d=>typeof d=="string")?Ht(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?or(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${i.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},Ht=(e,{context:t,submissions:r})=>{let i="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of i)if(Ja({condition:n,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let n of i)if(!Ja({condition:n,context:t,submissions:r,ifBlock:e}))return!1;return!0}},nu=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,au=(e,{context:t,submissions:r})=>e.replace(nu,(i,n,a="")=>{let[o,...s]=n.trim().split("."),l=un({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Nt(d.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return or(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let d=Tt(l.value,s);switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(p=>typeof p=="string"))return d.join(", ")}break}}return a});const Za=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Pe=(e,t)=>au(e,Za(t)),ou=(e,t)=>Ht(e,Za(t)),Xa=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const i=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(i)return Xa({node:i,nodes:t,stopWhen:r})},su=({childNode:e,nodes:t})=>{const i=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;const a=t.find(s=>s.id===n.branchId);if(!a)return!1;const o=Xa({node:a,nodes:t,stopWhen:s=>s.id===e.id});return!(!o||o.id!==e.id)});if(i!=null&&i.nextId)return t.find(n=>n.id===i.nextId)},lu=({flow:e,analytics:t,logger:r,talentBankClient:i,context:n,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:d,onFlowEnd:p,onInterpret:u,t:h})=>{let b=new AbortController;const m={...t.service,log:k=>t.service.log({...k,customProperties:{...k.customProperties,...t.customProperties}})},_=async(k,$)=>{if(b.signal.aborted)return;const w=o(),y=s(),S=(y==null?void 0:y.submitNodeId)===k.id?e.nodes.find(E=>{var A;return E.id===y.fileQuestionNodeId&&E.type==="question-file"&&((A=w==null?void 0:w[E.data.key])==null?void 0:A.type)!=="file"}):void 0;if(S)return _(S,$);u==null||u(k,$);try{await cu({flow:e,analytics:m,logger:r,talentBankClient:i,apiClient:a,context:n,node:k,submissions:w,applicationRecovery:y,setApplicationRecovery:async E=>{if(!b.signal.aborted)try{await l(E)}catch(A){r.error("Failed to persist application recovery",A)}},forceSubmitConfirmation:(y==null?void 0:y.submitNodeId)===k.id,t:h,chat:{sendMessage:async E=>d.send({groupId:k.id,message:E,signal:b.signal}),userInput:async E=>d.input({input:E,signal:b.signal}),setSubmission:(E,A)=>{b.signal.aborted||d.setSubmission(E,A)}},next:E=>{const A=(y==null?void 0:y.fileQuestionNodeId)===k.id?y.submitNodeId:E,G=A?e.nodes.find(O=>O.id===A):su({childNode:k,nodes:e.nodes});return G?_(G,k):p==null?void 0:p(k)},end:()=>p==null?void 0:p(k)})}catch(E){if(E instanceof ft)return;throw E}};return{interpret:async k=>{const $=e.nodes.find(w=>w.id===k)??Oa(e.nodes);return _($)},undo:k=>{let $=1;const w=e.nodes.find(S=>S.id===k[k.length-1]);for(let S=k.length-2;S>0;S--){const E=k[S],A=e.nodes.find(G=>G.id===E);if(!A||($++,A.type.startsWith("question-")))break}b.abort(),b=new AbortController;const y=e.nodes.find(S=>S.id===k[k.length-$]);return Me(y,"Undo failed: new start node not found"),_(y,w),{removed:$}},abort:()=>{b.abort()}}};async function cu(e){const t=e.node;switch(t.type){case"text":return wu({...e,node:t});case"image":return mu({...e,node:t});case"question-text":return yu({...e,node:t});case"question-enum":return ku({...e,node:t});case"question-number":return _u({...e,node:t});case"question-phone":return xu({...e,node:t});case"question-boolean":return Su({...e,node:t});case"question-file":return Eu({...e,node:t});case"question-address":return Cu({...e,node:t});case"end-flow":return $u({...e,node:t});case"if-block":return vu({...e,node:t});case"jump":return fu({...e,node:t});case"link":return bu({...e,node:t});case"integration-application-submit":return hu({...e,node:t});case"add-submission":return pu({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return du({...e,node:t});case"feedback":return uu({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function uu({next:e,node:t}){e(t.nextId)}async function du({next:e,node:t,talentBankClient:r,submissions:i,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(i&&r){const d=t.data.scope==="job"?(l=n.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||d!=null)try{s=await r.checkDuplicate({email:bs({key:t.data.email,submissions:i}).toString(),jobId:d,scope:t.data.scope})}catch(p){a.error("[check-duplicate]",p)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function fu({next:e,node:t}){e(t.data.targetId)}async function pu({next:e,node:t,logger:r,submissions:i,context:n}){if(!i){r.error("Submissions not found");return}i[t.data.key]={type:"string",value:Pe(t.data.value,{submissions:i,context:n})},e(t.nextId)}async function hu({chat:e,next:t,end:r,node:i,logger:n,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:d,setApplicationRecovery:p,forceSubmitConfirmation:u,t:h}){const b=async()=>{(d==null?void 0:d.submitNodeId)===i.id&&await p(void 0)},m=async k=>{const $=k();return await b(),$},_=async k=>{var G;k!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:i.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:$,session_id:w}=s.getSessionInfo();let y;const S=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:i.data.integrationId,anonymous_id:$,session_id:w,job:l.job,flow_build:l.build,submissions:gs(o||{},i.data.submitKeys)})}).catch(O=>(y=O,Js(O)?O.data:O));i.data.key&&e.setSubmission(i.data.key,{type:"integration",value:S});const E=ks(S);if(E&&s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,service:E.service,response:E.response,flow_type:"CHATBOT_DRAWER",job:l.job}}),ys(S)){const{redirect_url:O,message:L,button_text:Y}=S.integration_response.data;await e.sendMessage({type:"text",author:"bot",text:L??h("submission_redirect_message")});try{const Ie=new URL(O);$&&!Ie.searchParams.has("anonymous_id")&&Ie.searchParams.set("anonymous_id",$),await e.sendMessage({type:"link",href:Ie.toString(),text:Y??h("complete_submission"),onClick:()=>{if(!w){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:w,flow_version:l.version,href:Ie.toString(),job:l.job}})}})}catch(Ie){n.error(`Invalid redirect URL: ${O}`,Ie),e.sendMessage({type:"system",variant:"error",text:h("redirect_url_error")})}return m(()=>t(i.nextId))}if((S==null?void 0:S.success)===!0)return i.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:h("submission_completed")}),m(()=>t(i.nextId));const A=gu(S,y);if(A){n.error(y??A.message);const O=A.phase==="submit"&&A.verdict==="confirmed"&&A.code==="unreadable_document"&&typeof A.field=="string"&&A.status!==void 0&&A.status>=400&&A.status<500&&((G=o==null?void 0:o[A.field])==null?void 0:G.type)==="file"?A.field:void 0,L=O===void 0?void 0:l.nodes.find(Y=>Y.type==="question-file"&&Y.data.key===O);return L&&O!==void 0?(e.setSubmission(O,null),await p({fileQuestionNodeId:L.id,submitNodeId:i.id}),await e.sendMessage({type:"system",variant:"error",text:h("submission_unreadable_document")}),t(L.id)):A.status===409&&A.phase==="submit"&&A.verdict==="confirmed"?(await e.sendMessage({type:"system",variant:"info",text:h("submission_duplicate")}),m(r)):A.status===410&&A.phase==="submit"&&A.verdict==="confirmed"&&A.code==="job_closed"?(await e.sendMessage({type:"system",variant:"info",text:h("submission_closed")}),m(r)):A.phase==="submit"&&A.verdict==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:h("submission_unknown")}),m(r)):A.phase==="workflow"&&A.retryable===!0&&A.verdict==="not_submitted"?(await e.sendMessage({type:"system",variant:"error",text:h("submission_retryable")}),_(!1)):(await e.sendMessage({type:"system",variant:"error",text:h("submission_failed")}),m(r))}return n.error(y??S),await e.sendMessage({type:"system",variant:"error",text:h("submission_failed")}),m(r)};await _(u===!0?!1:i.data.skipConfirmation)}const gu=(e,t)=>{if(!xs(e))return;const r=e.integration_response;if(typeof r!="object"||r===null)return;const i=r.error;if(typeof i!="object"||i===null)return;const n=i.data,a=typeof n=="object"&&n!==null?n:{},o=d=>typeof a[d]=="string"?a[d]:void 0,s=d=>typeof a[d]=="boolean"?a[d]:void 0,l=r.status;return{message:e.integration_response.error.message,status:typeof l=="number"?l:t instanceof yn?t.status:void 0,phase:o("phase"),retryable:s("retryable"),verdict:o("verdict"),code:o("code"),field:o("field")}};async function bu({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({type:"link",href:Pe(r.data.href,{submissions:i,context:n}),text:Pe(r.data.cta,{submissions:i,context:n})}),t(r.nextId)}async function vu({submissions:e,next:t,node:r,context:i}){t(ou(r,{submissions:e,context:i})?r.branchId:r.nextId)}async function wu({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.text,{submissions:i,context:n})}),t(r.nextId)}async function mu({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 yu({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context:n})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?or(o.value):o.value}),t(r.nextId)}async function _u({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function xu({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context:n})});const a=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});a===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:a.type==="phone"?or(a.value):a.value}),t(r.nextId)}async function ku({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function Su({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context: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}}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Cu({chat:e,next:t,node:r,t:i}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:i("skipped")});else{const a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function Eu({node:e,chat:t,next:r,submissions:i,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Pe(e.data.question,{submissions:i,context:n})});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function $u({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const ht=({class:e,...t})=>{const{t:r}=ae();return c("button",{class:Ue("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var We;function $r(e){return{lang:(e==null?void 0:e.lang)??(We==null?void 0:We.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(We==null?void 0:We.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(We==null?void 0:We.abortPipeEarly)}}var Di;function Iu(e){return Di==null?void 0:Di.get(e)}var Vi;function Au(e){return Vi==null?void 0:Vi.get(e)}var Mi;function Fu(e,t){var r;return(r=Mi==null?void 0:Mi.get(e))==null?void 0:r.get(t)}function Et(e){var r,i;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function oe(e,t,r,i,n){const a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Et(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Fu(e.reference,l.lang)??(d?Au(l.lang):null)??i.message??Iu(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Oe(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},$r())}}}function Tu(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Nu(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function Du(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Vu=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},Mu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Qa(e,t){return{kind:"validation",type:"check",reference:Qa,async:!1,expects:null,requirement:e,message:t,"~run"(r,i){return r.typed&&!this.requirement(r.value)&&oe(this,"input",r,i),r}}}function eo(e){return{kind:"validation",type:"email",reference:eo,expects:null,async:!1,requirement:Mu,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&oe(this,"email",t,r),t}}}function Wt(e,t){return{kind:"validation",type:"max_length",reference:Wt,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&oe(this,"length",r,i,{received:`${r.value.length}`}),r}}}function to(e,t){return{kind:"validation",type:"max_value",reference:to,async:!1,expects:`<=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!(r.value<=this.requirement)&&oe(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function $t(e,t){return{kind:"validation",type:"min_length",reference:$t,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&oe(this,"length",r,i,{received:`${r.value.length}`}),r}}}function ro(e,t){return{kind:"validation",type:"min_value",reference:ro,async:!1,expects:`>=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!(r.value>=this.requirement)&&oe(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function Pi(e,t){return{kind:"validation",type:"regex",reference:Pi,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!this.requirement.test(r.value)&&oe(this,"format",r,i),r}}}function Oi(e){return{kind:"transformation",type:"transform",reference:Oi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function io(e){return{kind:"validation",type:"url",reference:io,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&oe(this,"URL",t,r),t}}}function Pu(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function no(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function ao(e,t){return{kind:"schema",type:"array",reference:ao,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Oe(this)},"~run"(r,i){var a;const n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){const d={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else oe(this,"type",r,i);return r}}}function oo(e){return{kind:"schema",type:"boolean",reference:oo,expects:"boolean",async:!1,message:e,get"~standard"(){return Oe(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:oe(this,"type",t,r),t}}}function so(e){return{kind:"schema",type:"number",reference:so,expects:"number",async:!1,message:e,get"~standard"(){return Oe(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:oe(this,"type",t,r),t}}}function Ke(e,t){return{kind:"schema",type:"object",reference:Ke,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Oe(this)},"~run"(r,i){var a;const n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:no(s),d=s["~run"]({value:l},i);if(d.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=Pu(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(oe(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else oe(this,"type",r,i);return r}}}function Kt(e,t){return{kind:"schema",type:"optional",reference:Kt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Oe(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=no(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function lo(e,t){return{kind:"schema",type:"picklist",reference:lo,expects:Nu(e.map(Et),"|"),async:!1,options:e,message:t,get"~standard"(){return Oe(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:oe(this,"type",r,i),r}}}function co(e,t,r){return{kind:"schema",type:"record",reference:co,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Oe(this)},"~run"(i,n){var o,s;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const l in a)if(Tu(a,l)){const d=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:d};for(const b of p.issues)b.path=[h],(o=i.issues)==null||o.push(b);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}const u=this.value["~run"]({value:d},n);if(u.issues){const h={type:"object",origin:"value",input:a,key:l,value:d};for(const b of u.issues)b.path?b.path.unshift(h):b.path=[h],(s=i.issues)==null||s.push(b);if(i.issues||(i.issues=u.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!u.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=u.value)}}else oe(this,"type",i,n);return i}}}function me(e){return{kind:"schema",type:"string",reference:me,expects:"string",async:!1,message:e,get"~standard"(){return Oe(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:oe(this,"type",t,r),t}}}function Ou(e,t,r){const i=e["~run"]({value:t},$r(r));if(i.issues)throw new Vu(i.issues);return i.value}function Lu(e,t){const r={};for(const i in e.entries)r[i]=!t||t.includes(i)?Kt(e.entries[i]):e.entries[i];return{...e,entries:r,get"~standard"(){return Oe(this)}}}function nt(...e){return{...e[0],pipe:e,get"~standard"(){return Oe(this)},"~run"(t,r){for(const i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function ju(e,t,r){const i=e["~run"]({value:t},$r(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}async function Ru(e,t,r){const i=await e["~run"]({value:t},$r(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}const It=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[c("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"break-words pr-1 text-sm",children:e.message})]}),gt=({class:e,...t})=>{const{t:r}=ae();return c("button",{type:"button",class:Ue("fr touch-hitbox text-neutral-10 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Li={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"};const Gt=ut("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),Bu="https://api.mapbox.com/search/searchbox/v1/suggest",zu="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Uu=e=>atob(e).split("").reverse().join(""),Ge=Ke({name:me()}),qu=Ke({suggestions:ao(Ke({full_address:Kt(me()),place_formatted:Kt(me()),name:Kt(me()),mapbox_id:me(),context:Lu(Ke({address:Ge,street:Ge,neighborhood:Ge,locality:Ge,district:Ge,place:Ge,region:Ge,postcode:Ge,country:Ge}))}))}),Hu=({logger:e,t})=>Ze(()=>{var i;const r=(i=N.current$.peek().flow)==null?void 0:i.data.flowSessionId;return r?{enabled:!0,getPredictions:async n=>{var u;const a=new URL(Bu);a.searchParams.set("q",n),a.searchParams.set("session_token",r);const o=(u=N.current$.peek().flow)==null?void 0:u.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&a.searchParams.set("proximity",`${o.lng},${o.lat}`),a.searchParams.set("access_token",Uu(zu));const l=await fetch(a);if(!l.ok)return e.error("Failed to get address details",l),{ok:!1,error:t("address_error")};const d=ju(qu,await l.json());if(d.success===!1)return e.error("Failed to parse address details",d.issues),{ok:!1,error:t("address_error")};const{suggestions:p}=d.output;return{ok:!0,data:p.map(h=>{var b,m,_,k,$,w,y,S,E;return{label:h.full_address??h.place_formatted??h.name??h.mapbox_id,id:h.mapbox_id,address:{line1:((b=h.context.address)==null?void 0:b.name)??((m=h.context.street)==null?void 0:m.name),line2:void 0,line3:((_=h.context.neighborhood)==null?void 0:_.name)??((k=h.context.locality)==null?void 0:k.name),city:(($=h.context.place)==null?void 0:$.name)??((w=h.context.district)==null?void 0:w.name),state:(y=h.context.region)==null?void 0:y.name,postcode:(S=h.context.postcode)==null?void 0:S.name,country:(E=h.context.country)==null?void 0:E.name}}})}}}:{enabled:!1}},[e,t]),uo=e=>{const{t}=ae();return c("button",{type:"button",class:"touch-hitbox text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},Wu=({input:e,onSubmitSuccess:t,logger:r})=>{const{t:i}=ae(),[n,a]=qe(),{enabled:o,getPredictions:s}=Hu({logger:r,t:i}),[l,d]=qe(o?"query":"manual"),[p,u]=qe(""),[h,b]=qe(),m=ge(),_=ge(),k=w=>{var S;if(Me(o,"Query state should not be enabled"),w=w.trim(),w===((S=m.current)==null?void 0:S.query)||w===(h==null?void 0:h.query)&&h.status==="done")return;if(u(w),w===""){m.current=void 0,b(void 0);return}const y=m.current={query:w};b({query:w,status:"pending"}),s(w).then(E=>{m.current===y&&(m.current=void 0,b(E.ok?{query:w,status:"done",items:E.data}:{query:w,status:"failed",error:E.error}))},E=>{m.current===y&&(m.current=void 0,r.error("Failed to get address details",E),b({query:w,status:"failed",error:i("address_error")}))})},$=(w,y)=>{a(S=>({...S,[w]:y}))};switch(l){case"query":return Me(o,"Query state should not be enabled"),c(Ku,{input:e,onSkip:()=>t(null),onAddressSelect:w=>{if(w===""){m.current&&(m.current=void 0,b(void 0)),d("manual");return}const y=(h==null?void 0:h.status)==="done"?h.items.find(S=>S.id===w):void 0;y&&(_.current!==w&&a(y.address),_.current=w,d("details"))},onAddressSearch:k,lookup:h,query:p});case"details":return Me(n!==void 0),c(po,{input:e,logger:r,onSubmitSuccess:t,addressFields:n,onFieldChange:$,actions:c(uo,{onClick:()=>{d("query")}})});case"manual":return c(po,{logger:r,input:e,onSubmitSuccess:t,addressFields:n??{},onFieldChange:$,actions:o?c(uo,{onClick:()=>{d("query")}}):void 0})}},Ku=({input:e,onSkip:t,lookup:r,onAddressSelect:i,query:n,onAddressSearch:a})=>{const{t:o}=ae(),s=ge(null);return he(()=>{s.current&&(s.current.focus(),s.current.select())},[]),c(Q,{children:[c("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const p=new FormData(l.currentTarget).get("address");typeof p=="string"&&a(p)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:n,class:Gt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[c("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]})}),c("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&c(gt,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?c(It,{error:{message:r.error}}):null,c("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-10 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?c(Q,{children:[c(Cr,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),c("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{i(l.id)},children:[c("span",{class:"flex-grow",children:l.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{i("")},children:c("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},fo=["line1","line2","line3","city","state","postcode","country"],po=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:i,input:n})=>{const a=ge(null);he(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(Li),{t:s}=ae();return c("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{const d=new FormData(l.currentTarget),p=Object.fromEntries(d.entries());r({type:"address",value:p})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:fo.map((l,d)=>{const p=`isdk_${l}`,u=n.config.keys[l];return u?c(Q,{children:[c("label",{for:p,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:s(l)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:u,id:p,defaultValue:e[l],onChange:h=>t(l,h.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?c("option",{value:e[l],children:e[l]}):c("option",{value:"",children:s("select_country")}),o.map(h=>c("option",{value:h,children:h},h))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:d===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:u,id:p,defaultValue:e[l],onInput:h=>t(l,h.currentTarget.value),required:!0}),d===fo.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[i,c(ht,{class:"ml-auto"})]})]})},ji=()=>{const e=ge(null);return ei(()=>{var t;(t=e.current)==null||t.focus()},[]),e},ho=["true","false"],Gu=lo(ho),Yu="answer",go="flex items-center flex-wrap gap-2 p-2.5",bo="min-w-0 max-w-full flex-auto",vo=oi(({label:e,...t},r)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:c("p",{class:"text-center text-base",children:e})})),Ju=({input:e,onSubmitSuccess:t})=>{const r=ji();return c("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const n=$c(i).value,a=Ou(Gu,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:go,children:ho.map((i,n)=>c("li",{class:bo,children:c(vo,{ref:n===0?r:null,type:"submit",name:Yu,value:i,label:e.config.labels[i]},i)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(gt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},Zu=e=>new Promise((t,r)=>{const i=new FileReader;i.onload=()=>{if(typeof i.result!="string"||!i.result)return r(new Error("Invalid file"));t(i.result)},i.onerror=r,i.readAsDataURL(e)}),wo=e=>e.reduce((t,r)=>t+r.sizeKb,0),Xu=Ct("file"),mo=3,Ri=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Qu=({file:e,class:t,...r})=>{const[i,n]=Ri(e.name);return c("div",{class:Ue("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:i}),c("span",{children:n})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Nt(e.sizeKb)})]})},yo=({class:e,...t})=>c("li",{class:Ue("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),ed=(e,t)=>{const[r,i]=Ri(e);return`${r.slice(0,t)}${i}`},_o=e=>({name:ed(e.name,42),sizeKb:e.size/1e3}),td=({input:e,onSubmitSuccess:t})=>{var m;const r=(m=N.current$.value.flow)==null?void 0:m.data.submissions[e.key],[i,n]=qe(Xu(r)&&r.value.length?{status:"ready",files:r.value}:{status:"empty"}),a=ge(0),o=i.status==="ready"?i.files:[],s=i.status==="ready"||i.status==="pending"?i.files:[],l=i.status==="error"?i.error:void 0,d=s.length-mo,p=wo(s),u=ji(),{t:h}=ae(),b=_=>{if(!_.length)return{type:"required",message:h("validation_file")};if(!ws(_,e.config.extensions))return{type:"validate",message:h("validation_file_ext",{ext:e.config.extensions.join(", ")})};if(e.config.fileSizeLimitKib&&wo(_)>e.config.fileSizeLimitKib)return{type:"max",message:h("validation_file_size",{size:Nt(e.config.fileSizeLimitKib)})};if(!e.config.allowMultiple&&_.length>1)return{type:"invalid",message:h("validation_file_max",{count:1})}};return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:_=>{if(_.preventDefault(),i.status==="pending"||i.status==="error")return;const k=b(o);k?n({status:"error",error:k}):t({type:"file",value:o})},children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:u,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[s.length>0?c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[s.slice(0,mo).map(_=>{const[k,$]=Ri(_.name);return c(yo,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:k}),c("span",{children:$})]})}),d>0?c(yo,{children:["+",d," file",d!==1?"s":""]}):null]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("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:c("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"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:h("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",h("file_max_size",{size:Nt(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:h("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(_=>c("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:_.replace(".","")}))})]})]}),c("p",{role:"status",class:Ue("text-neutral-11 flex items-center gap-1.5 text-xs",s.length===0&&"sr-only"),children:i.status==="pending"?c(Q,{children:[c(Cr,{"aria-hidden":"true",class:"h-4 w-4"}),h("file_preparing",{count:s.length})]}):i.status==="ready"?c(Q,{children:[Nt(p)," ",o.length>1?"total":"",c("span",{class:"sr-only",children:[". ",h("file_ready",{count:o.length})]})]}):null}),c("input",{id:"dropzone-file",onInput:async _=>{Me(_.target instanceof HTMLInputElement);const k=_.target.files?Array.from(_.target.files):[];if(_.target.value="",!k.length)return;const $=++a.current,w=i.status==="ready",y=k.map(_o),S=b(y);if(S)return n({status:"error",error:S});n({status:"pending",files:y});try{const E=await Promise.all(k.map(async A=>({..._o(A),data:await Zu(A)})));a.current===$&&n({status:"ready",files:E})}catch{a.current===$&&n({status:"error",error:{type:"invalid",message:h(w?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(ht,{disabled:o.length===0}),e.config.optional&&c(gt,{class:"relative",onClick:()=>t(null)})]})]}),c(It,{error:l})]})};var Yt=e=>e.type==="checkbox",bt=e=>e instanceof Date,be=e=>e==null;const xo=e=>typeof e=="object";var Z=e=>!be(e)&&!Array.isArray(e)&&xo(e)&&!bt(e),rd=e=>Z(e)&&e.target?Yt(e.target)?e.target.checked:e.target.value:e,id=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,nd=(e,t)=>e.has(id(t)),ad=e=>{const t=e.constructor&&e.constructor.prototype;return Z(t)&&t.hasOwnProperty("isPrototypeOf")},Bi=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function re(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Bi&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Z(e)&&ad(e)))return e;const i=r?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=re(e[n]));return i}var Ir=e=>/^\w*$/.test(e),K=e=>e===void 0,zi=e=>Array.isArray(e)?e.filter(Boolean):[],Ui=e=>zi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),F=(e,t,r)=>{if(!t||!Z(e))return r;const i=(Ir(t)?[t]:Ui(t)).reduce((n,a)=>be(n)?n:n[a],e);return K(i)||i===e?K(e[t])?r:e[t]:i},Le=e=>typeof e=="boolean",Ee=e=>typeof e=="function",q=(e,t,r)=>{let i=-1;const n=Ir(t)?[t]:Ui(t),a=n.length,o=a-1;for(;++i<a;){const s=n[i];let l=r;if(i!==o){const d=e[s];l=Z(d)||Array.isArray(d)?d:isNaN(+n[i+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ko={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ye={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},od=ce.createContext(null);od.displayName="HookFormControlContext";var sd=(e,t,r,i=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==$e.all&&(t._proxyFormState[o]=!i||$e.all),r&&(r[o]=!0),e[o]}});return n};const ld=typeof window<"u"?ce.useLayoutEffect:ce.useEffect;var ye=e=>typeof e=="string",cd=(e,t,r,i,n)=>ye(e)?(i&&t.watch.add(e),F(r,e,n)):Array.isArray(e)?e.map(a=>(i&&t.watch.add(a),F(r,a))):(i&&(t.watchAll=!0),r),qi=e=>be(e)||!xo(e);function at(e,t,r=new WeakSet){if(qi(e)||qi(t))return Object.is(e,t);if(bt(e)&&bt(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of i){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(bt(o)&&bt(s)||Z(o)&&Z(s)||Array.isArray(o)&&Array.isArray(s)?!at(o,s,r):!Object.is(o,s))return!1}}return!0}const ud=ce.createContext(null);ud.displayName="HookFormContext";var So=(e,t,r,i,n)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:n||!0}}:{},Jt=e=>Array.isArray(e)?e:[e],Co=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function Eo(e,t){const r={};for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],a=t[i];if(n&&Z(n)&&a){const o=Eo(n,a);Z(o)&&(r[i]=o)}else e[i]&&(r[i]=a)}return r}var fe=e=>Z(e)&&!Object.keys(e).length,Hi=e=>e.type==="file",Ar=e=>{if(!Bi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},$o=e=>e.type==="select-multiple",Wi=e=>e.type==="radio",dd=e=>Wi(e)||Yt(e),Ki=e=>Ar(e)&&e.isConnected;function fd(e,t){const r=t.slice(0,-1).length;let i=0;for(;i<r;)e=K(e)?i++:e[t[i++]];return e}function pd(e){for(const t in e)if(e.hasOwnProperty(t)&&!K(e[t]))return!1;return!0}function X(e,t){const r=Array.isArray(t)?t:Ir(t)?[t]:Ui(t),i=r.length===1?e:fd(e,r),n=r.length-1,a=r[n];return i&&delete i[a],n!==0&&(Z(i)&&fe(i)||Array.isArray(i)&&pd(i))&&X(e,r.slice(0,-1)),e}var hd=e=>{for(const t in e)if(Ee(e[t]))return!0;return!1};function Io(e){return Array.isArray(e)||Z(e)&&!hd(e)}function Gi(e,t={}){for(const r in e){const i=e[r];Io(i)?(t[r]=Array.isArray(i)?[]:{},Gi(i,t[r])):K(i)||(t[r]=!0)}return t}function At(e,t,r){r||(r=Gi(t));for(const i in e){const n=e[i];if(Io(n))K(t)||qi(r[i])?r[i]=Gi(n,Array.isArray(n)?[]:{}):At(n,be(t)?{}:t[i],r[i]);else{const a=t[i];r[i]=!at(n,a)}}return r}const Ao={value:!1,isValid:!1},Fo={value:!0,isValid:!0};var To=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&&!K(e[0].attributes.value)?K(e[0].value)||e[0].value===""?Fo:{value:e[0].value,isValid:!0}:Fo:Ao}return Ao},No=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>K(e)?e:t?e===""?NaN:e&&+e:r&&ye(e)?new Date(e):i?i(e):e;const Do={isValid:!1,value:null};var Vo=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Do):Do;function Mo(e){const t=e.ref;return Hi(t)?t.files:Wi(t)?Vo(e.refs).value:$o(t)?[...t.selectedOptions].map(({value:r})=>r):Yt(t)?To(e.refs).value:No(K(t.value)?e.ref.value:t.value,e)}var gd=(e,t,r,i)=>{const n={};for(const a of e){const o=F(t,a);o&&q(n,a,o._f)}return{criteriaMode:r,names:[...e],fields:n,shouldUseNativeValidation:i}},Fr=e=>e instanceof RegExp,Zt=e=>K(e)?e:Fr(e)?e.source:Z(e)?Fr(e.value)?e.value.source:e.value:e,Po=e=>({isOnSubmit:!e||e===$e.onSubmit,isOnBlur:e===$e.onBlur,isOnChange:e===$e.onChange,isOnAll:e===$e.all,isOnTouch:e===$e.onTouched});const Oo="AsyncFunction";var bd=e=>!!e&&!!e.validate&&!!(Ee(e.validate)&&e.validate.constructor.name===Oo||Z(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Oo)),vd=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Lo=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const Xt=(e,t,r,i)=>{for(const n of r||Object.keys(e)){const a=F(e,n);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!i)return!0;if(o.ref&&t(o.ref,o.name)&&!i)return!0;if(Xt(s,t))break}else if(Z(s)&&Xt(s,t))break}}};function jo(e,t,r){const i=F(e,r);if(i||Ir(r))return{error:i,name:r};const n=r.split(".");for(;n.length;){const a=n.join("."),o=F(t,a),s=F(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};n.pop()}return{name:r}}var wd=(e,t,r,i)=>{r(e);const{name:n,...a}=e;return fe(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!i||$e.all))},md=(e,t,r)=>!e||!t||e===t||Jt(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i))),yd=(e,t,r,i,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(t||e):(r?i.isOnBlur:n.isOnBlur)?!e:(r?i.isOnChange:n.isOnChange)?e:!0,_d=(e,t)=>!zi(F(e,t)).length&&X(e,t),xd=(e,t,r)=>{const i=Jt(F(e,r));return q(i,"root",t[r]),q(e,r,i),e};function Ro(e,t,r="validate"){if(ye(e)||Array.isArray(e)&&e.every(ye)||Le(e)&&!e)return{type:r,message:ye(e)?e:"",ref:t}}var Ft=e=>Z(e)&&!Fr(e)?e:{value:e,message:""},Bo=async(e,t,r,i,n,a)=>{const{ref:o,refs:s,required:l,maxLength:d,minLength:p,min:u,max:h,pattern:b,validate:m,name:_,valueAsNumber:k,mount:$}=e._f,w=F(r,_);if(!$||t.has(_))return{};const y=s?s[0]:o,S=M=>{n&&y.reportValidity&&(y.setCustomValidity(Le(M)?"":M||""),y.reportValidity())},E={},A=Wi(o),G=Yt(o),O=A||G,L=(k||Hi(o))&&K(o.value)&&K(w)||Ar(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,Y=So.bind(null,_,i,E),Ie=(M,j,ie,se=Ye.maxLength,Ae=Ye.minLength)=>{const _e=M?j:ie;E[_]={type:M?se:Ae,message:_e,ref:o,...Y(M?se:Ae,_e)}};if(a?!Array.isArray(w)||!w.length:l&&(!O&&(L||be(w))||Le(w)&&!w||G&&!To(s).isValid||A&&!Vo(s).isValid)){const{value:M,message:j}=ye(l)?{value:!!l,message:l}:Ft(l);if(M&&(E[_]={type:Ye.required,message:j,ref:y,...Y(Ye.required,j)},!i))return S(j),E}if(!L&&(!be(u)||!be(h))){let M,j;const ie=Ft(h),se=Ft(u);if(!be(w)&&!isNaN(w)){const Ae=o.valueAsNumber||w&&+w;be(ie.value)||(M=Ae>ie.value),be(se.value)||(j=Ae<se.value)}else{const Ae=o.valueAsDate||new Date(w),_e=rr=>new Date(new Date().toDateString()+" "+rr),er=o.type=="time",tr=o.type=="week";ye(ie.value)&&w&&(M=er?_e(w)>_e(ie.value):tr?w>ie.value:Ae>new Date(ie.value)),ye(se.value)&&w&&(j=er?_e(w)<_e(se.value):tr?w<se.value:Ae<new Date(se.value))}if((M||j)&&(Ie(!!M,ie.message,se.message,Ye.max,Ye.min),!i))return S(E[_].message),E}if((d||p)&&!L&&(ye(w)||a&&Array.isArray(w))){const M=Ft(d),j=Ft(p),ie=!be(M.value)&&w.length>+M.value,se=!be(j.value)&&w.length<+j.value;if((ie||se)&&(Ie(ie,M.message,j.message),!i))return S(E[_].message),E}if(b&&!L&&ye(w)){const{value:M,message:j}=Ft(b);if(Fr(M)&&!w.match(M)&&(E[_]={type:Ye.pattern,message:j,ref:o,...Y(Ye.pattern,j)},!i))return S(j),E}if(m){if(Ee(m)){const M=await m(w,r),j=Ro(M,y);if(j&&(E[_]={...j,...Y(Ye.validate,j.message)},!i))return S(j.message),E}else if(Z(m)){let M={};for(const j in m){if(!fe(M)&&!i)break;const ie=Ro(await m[j](w,r),y,j);ie&&(M={...ie,...Y(j,ie.message)},S(ie.message),i&&(E[_]=M))}if(!fe(M)&&(E[_]={ref:y,...M},!i))return E}}return S(!0),E};const kd={mode:$e.onSubmit,reValidateMode:$e.onChange,shouldFocusError:!0};function Sd(e={}){let t={...kd,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ee(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},i={},n=Z(t.defaultValues)||Z(t.values)?re(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:re(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={...p};let h={...u};const b={array:Co(),state:Co()},m=t.criteriaMode===$e.all,_=f=>g=>{clearTimeout(d),d=setTimeout(f,g)},k=async f=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||h.isValid||f)){let g;t.resolver?(g=fe((await O()).errors),$()):g=await Y(i,!0),g!==r.isValid&&b.state.next({isValid:g})}},$=(f,g)=>{!t.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((f||Array.from(s.mount)).forEach(v=>{v&&(g?q(r.validatingFields,v,g):X(r.validatingFields,v))}),b.state.next({validatingFields:r.validatingFields,isValidating:!fe(r.validatingFields)}))},w=(f,g=[],v,I,C=!0,x=!0)=>{if(I&&v&&!t.disabled){if(o.action=!0,x&&Array.isArray(F(i,f))){const D=v(F(i,f),I.argA,I.argB);C&&q(i,f,D)}if(x&&Array.isArray(F(r.errors,f))){const D=v(F(r.errors,f),I.argA,I.argB);C&&q(r.errors,f,D),_d(r.errors,f)}if((u.touchedFields||h.touchedFields)&&x&&Array.isArray(F(r.touchedFields,f))){const D=v(F(r.touchedFields,f),I.argA,I.argB);C&&q(r.touchedFields,f,D)}(u.dirtyFields||h.dirtyFields)&&(r.dirtyFields=At(n,a)),b.state.next({name:f,isDirty:M(f,g),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else q(a,f,g)},y=(f,g)=>{q(r.errors,f,g),b.state.next({errors:r.errors})},S=f=>{r.errors=f,b.state.next({errors:r.errors,isValid:!1})},E=(f,g,v,I)=>{const C=F(i,f);if(C){const x=F(a,f,K(v)?F(n,f):v);K(x)||I&&I.defaultChecked||g?q(a,f,g?x:Mo(C._f)):se(f,x),o.mount&&!o.action&&k()}},A=(f,g,v,I,C)=>{let x=!1,D=!1;const R={name:f};if(!t.disabled){if(!v||I){(u.isDirty||h.isDirty)&&(D=r.isDirty,r.isDirty=R.isDirty=M(),x=D!==R.isDirty);const B=at(F(n,f),g);D=!!F(r.dirtyFields,f),B?X(r.dirtyFields,f):q(r.dirtyFields,f,!0),R.dirtyFields=r.dirtyFields,x=x||(u.dirtyFields||h.dirtyFields)&&D!==!B}if(v){const B=F(r.touchedFields,f);B||(q(r.touchedFields,f,v),R.touchedFields=r.touchedFields,x=x||(u.touchedFields||h.touchedFields)&&B!==v)}x&&C&&b.state.next(R)}return x?R:{}},G=(f,g,v,I)=>{const C=F(r.errors,f),x=(u.isValid||h.isValid)&&Le(g)&&r.isValid!==g;if(t.delayError&&v?(l=_(()=>y(f,v)),l(t.delayError)):(clearTimeout(d),l=null,v?q(r.errors,f,v):X(r.errors,f)),(v?!at(C,v):C)||!fe(I)||x){const D={...I,...x&&Le(g)?{isValid:g}:{},errors:r.errors,name:f};r={...r,...D},b.state.next(D)}},O=async f=>($(f,!0),await t.resolver(a,t.context,gd(f||s.mount,i,t.criteriaMode,t.shouldUseNativeValidation))),L=async f=>{const{errors:g}=await O(f);if($(f),f)for(const v of f){const I=F(g,v);I?q(r.errors,v,I):X(r.errors,v)}else r.errors=g;return g},Y=async(f,g,v={valid:!0})=>{for(const I in f){const C=f[I];if(C){const{_f:x,...D}=C;if(x){const R=s.array.has(x.name),B=C._f&&bd(C._f);B&&u.validatingFields&&$([x.name],!0);const pe=await Bo(C,s.disabled,a,m,t.shouldUseNativeValidation&&!g,R);if(B&&u.validatingFields&&$([x.name]),pe[x.name]&&(v.valid=!1,g||e.shouldUseNativeValidation))break;!g&&(F(pe,x.name)?R?xd(r.errors,pe,x.name):q(r.errors,x.name,pe[x.name]):X(r.errors,x.name))}!fe(D)&&await Y(D,g,v)}}return v.valid},Ie=()=>{for(const f of s.unMount){const g=F(i,f);g&&(g._f.refs?g._f.refs.every(v=>!Ki(v)):!Ki(g._f.ref))&&Yi(f)}s.unMount=new Set},M=(f,g)=>!t.disabled&&(f&&g&&q(a,f,g),!at(Yo(),n)),j=(f,g,v)=>cd(f,s,{...o.mount?a:K(g)?n:ye(f)?{[f]:g}:g},v,g),ie=f=>zi(F(o.mount?a:n,f,t.shouldUnregister?F(n,f,[]):[])),se=(f,g,v={})=>{const I=F(i,f);let C=g;if(I){const x=I._f;x&&(!x.disabled&&q(a,f,No(g,x)),C=Ar(x.ref)&&be(g)?"":g,$o(x.ref)?[...x.ref.options].forEach(D=>D.selected=C.includes(D.value)):x.refs?Yt(x.ref)?x.refs.forEach(D=>{(!D.defaultChecked||!D.disabled)&&(Array.isArray(C)?D.checked=!!C.find(R=>R===D.value):D.checked=C===D.value||!!C)}):x.refs.forEach(D=>D.checked=D.value===C):Hi(x.ref)?x.ref.value="":(x.ref.value=C,x.ref.type||b.state.next({name:f,values:re(a)})))}(v.shouldDirty||v.shouldTouch)&&A(f,C,v.shouldTouch,v.shouldDirty,!0),v.shouldValidate&&rr(f)},Ae=(f,g,v)=>{for(const I in g){if(!g.hasOwnProperty(I))return;const C=g[I],x=f+"."+I,D=F(i,x);(s.array.has(f)||Z(C)||D&&!D._f)&&!bt(C)?Ae(x,C,v):se(x,C,v)}},_e=(f,g,v={})=>{const I=F(i,f),C=s.array.has(f),x=re(g);q(a,f,x),C?(b.array.next({name:f,values:re(a)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&v.shouldDirty&&b.state.next({name:f,dirtyFields:At(n,a),isDirty:M(f,x)})):I&&!I._f&&!be(x)?Ae(f,x,v):se(f,x,v),Lo(f,s)?b.state.next({...r,name:f,values:re(a)}):b.state.next({name:o.mount?f:void 0,values:re(a)})},er=async f=>{o.mount=!0;const g=f.target;let v=g.name,I=!0;const C=F(i,v),x=B=>{I=Number.isNaN(B)||bt(B)&&isNaN(B.getTime())||at(B,F(a,v,B))},D=Po(t.mode),R=Po(t.reValidateMode);if(C){let B,pe;const vt=g.type?Mo(C._f):rd(f),ot=f.type===ko.BLUR||f.type===ko.FOCUS_OUT,Ef=!vd(C._f)&&!t.resolver&&!F(r.errors,v)&&!C._f.deps||yd(ot,F(r.touchedFields,v),r.isSubmitted,R,D),Xi=Lo(v,s,ot);q(a,v,vt),ot?(!g||!g.readOnly)&&(C._f.onBlur&&C._f.onBlur(f),l&&l(0)):C._f.onChange&&C._f.onChange(f);const Qi=A(v,vt,ot),$f=!fe(Qi)||Xi;if(!ot&&b.state.next({name:v,type:f.type,values:re(a)}),Ef)return(u.isValid||h.isValid)&&(t.mode==="onBlur"?ot&&k():ot||k()),$f&&b.state.next({name:v,...Xi?{}:Qi});if(!ot&&Xi&&b.state.next({...r}),t.resolver){const{errors:ns}=await O([v]);if($([v]),x(vt),I){const If=jo(r.errors,i,v),as=jo(ns,i,If.name||v);B=as.error,v=as.name,pe=fe(ns)}}else $([v],!0),B=(await Bo(C,s.disabled,a,m,t.shouldUseNativeValidation))[v],$([v]),x(vt),I&&(B?pe=!1:(u.isValid||h.isValid)&&(pe=await Y(i,!0)));I&&(C._f.deps&&(!Array.isArray(C._f.deps)||C._f.deps.length>0)&&rr(C._f.deps),G(v,pe,B,Qi))}},tr=(f,g)=>{if(F(r.errors,g)&&f.focus)return f.focus(),1},rr=async(f,g={})=>{let v,I;const C=Jt(f);if(t.resolver){const x=await L(K(f)?f:C);v=fe(x),I=f?!C.some(D=>F(x,D)):v}else f?(I=(await Promise.all(C.map(async x=>{const D=F(i,x);return await Y(D&&D._f?{[x]:D}:D)}))).every(Boolean),!(!I&&!r.isValid)&&k()):I=v=await Y(i);return b.state.next({...!ye(f)||(u.isValid||h.isValid)&&v!==r.isValid?{}:{name:f},...t.resolver||!f?{isValid:v}:{},errors:r.errors}),g.shouldFocus&&!I&&Xt(i,tr,f?C:s.mount),I},Yo=(f,g)=>{let v={...o.mount?a:n};return g&&(v=Eo(g.dirtyFields?r.dirtyFields:r.touchedFields,v)),K(f)?v:ye(f)?F(v,f):f.map(I=>F(v,I))},Jo=(f,g)=>({invalid:!!F((g||r).errors,f),isDirty:!!F((g||r).dirtyFields,f),error:F((g||r).errors,f),isValidating:!!F(r.validatingFields,f),isTouched:!!F((g||r).touchedFields,f)}),mf=f=>{const g=f?Jt(f):void 0;g==null||g.forEach(v=>X(r.errors,v)),g?g.forEach(v=>{b.state.next({name:v,errors:r.errors})}):b.state.next({errors:{}})},Zo=(f,g,v)=>{const I=(F(i,f,{_f:{}})._f||{}).ref,C=F(r.errors,f)||{},{ref:x,message:D,type:R,...B}=C;q(r.errors,f,{...B,...g,ref:I}),b.state.next({name:f,errors:r.errors,isValid:!1}),v&&v.shouldFocus&&I&&I.focus&&I.focus()},yf=(f,g)=>Ee(f)?b.state.subscribe({next:v=>"values"in v&&f(j(void 0,g),v)}):j(f,g,!0),Xo=f=>b.state.subscribe({next:g=>{md(f.name,g.name,f.exact)&&wd(g,f.formState||u,Cf,f.reRenderRoot)&&f.callback({values:{...a},...r,...g,defaultValues:n})}}).unsubscribe,_f=f=>(o.mount=!0,h={...h,...f.formState},Xo({...f,formState:{...p,...f.formState}})),Yi=(f,g={})=>{for(const v of f?Jt(f):s.mount)s.mount.delete(v),s.array.delete(v),g.keepValue||(X(i,v),X(a,v)),!g.keepError&&X(r.errors,v),!g.keepDirty&&X(r.dirtyFields,v),!g.keepTouched&&X(r.touchedFields,v),!g.keepIsValidating&&X(r.validatingFields,v),!t.shouldUnregister&&!g.keepDefaultValue&&X(n,v);b.state.next({values:re(a)}),b.state.next({...r,...g.keepDirty?{isDirty:M()}:{}}),!g.keepIsValid&&k()},Qo=({disabled:f,name:g})=>{if(Le(f)&&o.mount||f||s.disabled.has(g)){const C=s.disabled.has(g)!==!!f;f?s.disabled.add(g):s.disabled.delete(g),C&&o.mount&&!o.action&&k()}},Ji=(f,g={})=>{let v=F(i,f);const I=Le(g.disabled)||Le(t.disabled);return q(i,f,{...v||{},_f:{...v&&v._f?v._f:{ref:{name:f}},name:f,mount:!0,...g}}),s.mount.add(f),v?Qo({disabled:Le(g.disabled)?g.disabled:t.disabled,name:f}):E(f,!0,g.value),{...I?{disabled:g.disabled||t.disabled}:{},...t.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:f,onChange:er,onBlur:er,ref:C=>{if(C){Ji(f,g),v=F(i,f);const x=K(C.value)&&C.querySelectorAll&&C.querySelectorAll("input,select,textarea")[0]||C,D=dd(x),R=v._f.refs||[];if(D?R.find(B=>B===x):x===v._f.ref)return;q(i,f,{_f:{...v._f,...D?{refs:[...R.filter(Ki),x,...Array.isArray(F(n,f))?[{}]:[]],ref:{type:x.type,name:f}}:{ref:x}}}),E(f,!1,void 0,x)}else v=F(i,f,{}),v._f&&(v._f.mount=!1),(t.shouldUnregister||g.shouldUnregister)&&!(nd(s.array,f)&&o.action)&&s.unMount.add(f)}}},Zi=()=>t.shouldFocusError&&Xt(i,tr,s.mount),xf=f=>{Le(f)&&(b.state.next({disabled:f}),Xt(i,(g,v)=>{const I=F(i,v);I&&(g.disabled=I._f.disabled||f,Array.isArray(I._f.refs)&&I._f.refs.forEach(C=>{C.disabled=I._f.disabled||f}))},0,!1))},es=(f,g)=>async v=>{let I;v&&(v.preventDefault&&v.preventDefault(),v.persist&&v.persist());let C=re(a);if(b.state.next({isSubmitting:!0}),t.resolver){const{errors:x,values:D}=await O();$(),r.errors=x,C=re(D)}else await Y(i);if(s.disabled.size)for(const x of s.disabled)X(C,x);if(X(r.errors,"root"),fe(r.errors)){b.state.next({errors:{}});try{await f(C,v)}catch(x){I=x}}else g&&await g({...r.errors},v),Zi(),setTimeout(Zi);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:fe(r.errors)&&!I,submitCount:r.submitCount+1,errors:r.errors}),I)throw I},kf=(f,g={})=>{F(i,f)&&(K(g.defaultValue)?_e(f,re(F(n,f))):(_e(f,g.defaultValue),q(n,f,re(g.defaultValue))),g.keepTouched||X(r.touchedFields,f),g.keepDirty||(X(r.dirtyFields,f),r.isDirty=g.defaultValue?M(f,re(F(n,f))):M()),g.keepError||(X(r.errors,f),u.isValid&&k()),b.state.next({...r}))},ts=(f,g={})=>{const v=f?re(f):n,I=re(v),C=fe(f),x=C?n:I;if(g.keepDefaultValues||(n=v),!g.keepValues){if(g.keepDirtyValues){const D=new Set([...s.mount,...Object.keys(At(n,a))]);for(const R of Array.from(D)){const B=F(r.dirtyFields,R),pe=F(a,R),vt=F(x,R);B&&!K(pe)?q(x,R,pe):!B&&!K(vt)&&_e(R,vt)}}else{if(Bi&&K(f))for(const D of s.mount){const R=F(i,D);if(R&&R._f){const B=Array.isArray(R._f.refs)?R._f.refs[0]:R._f.ref;if(Ar(B)){const pe=B.closest("form");if(pe){pe.reset();break}}}}if(g.keepFieldsRef)for(const D of s.mount)_e(D,F(x,D));else i={}}a=t.shouldUnregister?g.keepDefaultValues?re(n):{}:re(x),b.array.next({values:{...x}}),b.state.next({values:{...x}})}s={mount:g.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!g.keepIsValid||!!g.keepDirtyValues||!t.shouldUnregister&&!fe(x),o.watch=!!t.shouldUnregister,o.keepIsValid=!!g.keepIsValid,o.action=!1,g.keepErrors||(r.errors={}),b.state.next({submitCount:g.keepSubmitCount?r.submitCount:0,isDirty:C?!1:g.keepDirty?r.isDirty:!!(g.keepDefaultValues&&!at(f,n)),isSubmitted:g.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:C?{}:g.keepDirtyValues?g.keepDefaultValues&&a?At(n,a):r.dirtyFields:g.keepDefaultValues&&f?At(n,f):g.keepDirty?r.dirtyFields:{},touchedFields:g.keepTouched?r.touchedFields:{},errors:g.keepErrors?r.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},rs=(f,g)=>ts(Ee(f)?f(a):f,{...t.resetOptions,...g}),Sf=(f,g={})=>{const v=F(i,f),I=v&&v._f;if(I){const C=I.refs?I.refs[0]:I.ref;C.focus&&setTimeout(()=>{C.focus(),g.shouldSelect&&Ee(C.select)&&C.select()})}},Cf=f=>{r={...r,...f}},is={control:{register:Ji,unregister:Yi,getFieldState:Jo,handleSubmit:es,setError:Zo,_subscribe:Xo,_runSchema:O,_updateIsValidating:$,_focusError:Zi,_getWatch:j,_getDirty:M,_setValid:k,_setFieldArray:w,_setDisabledField:Qo,_setErrors:S,_getFieldArray:ie,_reset:ts,_resetDefaultValues:()=>Ee(t.defaultValues)&&t.defaultValues().then(f=>{rs(f,t.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:Ie,_disableForm:xf,_subjects:b,_proxyFormState:u,get _fields(){return i},get _formValues(){return a},get _state(){return o},set _state(f){o=f},get _defaultValues(){return n},get _names(){return s},set _names(f){s=f},get _formState(){return r},get _options(){return t},set _options(f){t={...t,...f}}},subscribe:_f,trigger:rr,register:Ji,handleSubmit:es,watch:yf,setValue:_e,getValues:Yo,reset:rs,resetField:kf,clearErrors:mf,unregister:Yi,setError:Zo,setFocus:Sf,getFieldState:Jo};return{...is,formControl:is}}function Tr(e={}){const t=ce.useRef(void 0),r=ce.useRef(void 0),[i,n]=ce.useState({isDirty:!1,isValidating:!1,isLoading:Ee(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ee(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!Ee(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=Sd(e);t.current={...s,formState:i}}const a=t.current.control;return a._options=e,ld(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),ce.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),ce.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),ce.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),ce.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),ce.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==i.isDirty&&a._subjects.state.next({isDirty:o})}},[a,i.isDirty]),ce.useEffect(()=>{var o;e.values&&!at(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),ce.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=ce.useMemo(()=>sd(i,a),[a,i]),t.current}const zo=(e,t,r)=>{if(e&&"reportValidity"in e){const i=F(r,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},Cd=(e,t)=>{for(const r in t.fields){const i=t.fields[r];i&&i.ref&&"reportValidity"in i.ref?zo(i.ref,r,e):i.refs&&i.refs.forEach(n=>zo(n,r,e))}},Ed=(e,t)=>{t.shouldUseNativeValidation&&Cd(e,t);const r={};for(const i in e){const n=F(t.fields,i),a=Object.assign(e[i]||{},{ref:n&&n.ref});if($d(t.names||Object.keys(e),i)){const o=Object.assign({},F(r,i));q(o,"root",a),q(r,i,o)}else q(r,i,a)}return r},$d=(e,t)=>e.some(r=>r.startsWith(t+"."));var Nr=function(e,t,r){return r===void 0&&(r={}),function(i,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(Ru(e,i,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var d=s.issues[0],p=Du(d);if(p&&(l[p]||(l[p]={message:d.message,type:d.type}),o)){var u=l[p].types,h=u&&u[d.type];l[p]=So(p,o,l,d.type,h?[].concat(h,d.message):d.message)}s.issues.shift()}return{values:{},errors:Ed(l,a)}}return{values:r.raw?i:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Uo=27,qo=12,Ho=10,Id=Ct("enum"),Ad=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Nr(Ke({checked:nt(co(me(),oo()),Oi(i=>Object.entries(i).filter(([n,a])=>a).map(([n,a])=>n)),Wt(r.max,t("validation_multiple_choice_max",{count:r.max})),$t(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},Fd=oi(({option:e,...t},r)=>c(Q,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Wo=ut("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:go}}}),Td=({input:e,onSubmitSuccess:t})=>{var p,u;const r=e.key?(p=N.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,i=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,n=i&&e.config.options.length===2,{t:a}=ae(),{register:o,handleSubmit:s,formState:{errors:l}}=Tr({defaultValues:{checked:i?{}:Id(r)?Object.fromEntries(r.value.map(h=>[h,!0])):{}},resolver:Ad(e.config,a)}),d=ji();return n?c("ul",{style:{maxHeight:6.5*Uo+5*qo+2*Ho},class:Wo({variant:"booleanLike"}),children:e.config.options.map((h,b)=>c("li",{class:bo,children:c(vo,{type:"submit",ref:m=>{m&&b===0&&(d.current=m)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}):c("form",{noValidate:!0,onSubmit:h=>s(b=>{const m=b.checked;t({type:"enum",value:m})})(h),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Uo+5*qo+2*Ho},class:Wo({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,b)=>{const m=`checked.${h.value}`,{ref:_,...k}=o(m);return c("li",{class:"relative",children:c(Fd,{option:h,autoFocus:b===0,ref:$=>{$&&b===0&&(d.current=$),_($)},id:m,...k,onClick:i?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[i?null:c(ht,{}),e.config.minSelected===0&&c(gt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(It,{error:(u=l.checked)==null?void 0:u.root})})]})},Nd=Ct("number"),Dd=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,i=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Nr(Ke({number:nt(so(t("validation_number")),ro(r,t("validation_number_min",{min:r})),to(i,t("validation_number_max",{max:i})),Qa(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},Vd=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,i=e.key?(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:n}=ae(),{register:a,handleSubmit:o,formState:{errors:s}}=Tr({defaultValues:{number:r?Number(r):Nd(i)?i.value:void 0},resolver:Dd(e.config,n)}),{ref:l,...d}=a("number",{required:!e.config.optional,valueAsNumber:!0}),p=ge();return he(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...d,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(p.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:Gt({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&c(gt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(ht,{})]}),c(It,{error:s.number})]})},Md=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(Li).find(n=>e.startsWith(n[1])),r=t?t[1]:"",i=e.replace(r,"");return/^\d+$/.test(i)?{countryCode:r,phoneNumber:i}:{countryCode:"",phoneNumber:""}},Pd="44",Od=/^[0-9 ]+$/,Ld=Ct("string"),jd=Ct("phone"),Rd=e=>{const t=nt(me(e("validation_country_code")),Pi(Od,e("validation_country_code"))),r=nt(me(e("validation_phone")),$t(1,e("validation_phone")),Oi(i=>i.replace(/[^0-9]/g,"")));return Nr(Ke({countryCode:t,phoneNumber:r}))},Bd=({input:e,onSubmitSuccess:t})=>{var _;const r=e.key?(_=N.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,{t:i}=ae(),[n,a]=qe(),o=Ld(r)?Md(r.value):jd(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:d},watch:p}=Tr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??Pd,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:Rd(i)}),{ref:u,...h}=s("phoneNumber",{required:!e.config.optional}),b=ge(),m=p("countryCode");return he(()=>{b.current&&(b.current.focus(),b.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(k=>{const $=k.phoneNumber.replace(/[^0-9]/g,""),w=k.countryCode.replace(/[^0-9]/g,"");a(void 0);const y=e.config.minChars??7,S=$.length+w.length;if(S<y)return a(i("validation_phone_min_chars",{count:y}));const E=e.config.maxChars;if(E!=null&&S>E)return a(i("validation_max_chars",{count:E}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:w,phoneNumber:$}}):t({type:"string",value:m+k.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[c("span",{children:["+",m]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Li).map(([k,$])=>c("option",{value:$,children:[k," (+",$,")"]},k))})]}),c("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(b.current=k),u(k)},class:Gt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(gt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(ht,{})]}),c(It,{error:d.countryCode||d.phoneNumber||{message:n}})]})},zd=({input:e,onSubmitSuccess:t})=>c("div",{class:"flex flex-col items-center py-3",children:c("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:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("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:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),Ud={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},qd=Ct("string"),Hd=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return Nr(Ke({text:{date:nt(me(t("validation_date")),Pi(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:nt(me(t("validation_email")),eo(t("validation_email")),$t(e.minChars??1,r.minLength),Wt(e.maxChars??1/0,r.maxLength)),text:nt(me(),$t(e.minChars??1,r.minLength),Wt(e.maxChars??1/0,r.maxLength)),url:nt(me(t("validation_url")),io(t("validation_url")),$t(e.minChars??1,r.minLength),Wt(e.maxChars??1/0,r.maxLength))}[e.format]}))},Wd={text:({input:e,onSubmitSuccess:t})=>{var u;const{t:r}=ae(),i=e.key?(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:a,handleSubmit:o,formState:{errors:s}}=Tr({defaultValues:{text:n||(qd(i)?i.value:"")},resolver:Hd(e.config,r)}),{ref:l,...d}=a("text",{required:!e.config.optional}),p=ge();return he(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{t({type:"string",value:h.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...d,...Ud[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(p.current=h),l(h)},placeholder:e.config.placeholder,class:Gt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(gt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(ht,{})]}),c(It,{error:s.text})]})},phone:Bd,"multiple-choice":Td,boolean:Ju,file:td,submit:zd,address:Wu,number:Vd},Kd=({logger:e})=>{var n;const t=(n=N.current$.value.flow)==null?void 0:n.data.currentInput,r=ge(null),i=()=>te.onInteractionFn$.value();return he(()=>{var a;(a=r.current)==null||a.scrollTo({top:0})},[t]),c("div",{ref:r,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:c("div",{class:"flex flex-col",onPointerDownCapture:t?i:void 0,onKeyDownCapture:t?i:void 0,children:t?(()=>{const a=Wd[t.type];return c(a,{logger:e,onSubmitSuccess:te.onSubmitSuccessFn$.value,input:t})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Gt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(ht,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Gd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yd=function(e){return e instanceof RegExp},Jd=function(t){var r=/[\\^$.*+?()[\]{}|]/g,i=RegExp(r.source);return t&&i.test(t)?t.replace(r,"\\$&"):t},Ko=function(e){return typeof e=="string"},Zd=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Xd(e,t,r){var i=0,n=0;if(e==="")return e;if(!e||!Ko(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Yd(a)||(a=new RegExp("("+Jd(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}n=o[s].length,i+=o[s-1].length,o[s]=r(o[s],s,i),i+=n}return o}var Qd=function(t,r,i){return Array.isArray(t)||(t=[t]),Zd(t.map(function(n){return Ko(n)?Xd(n,r,i):n}))};const Qt=Gd(Qd),ef=/(\[[^\]]+\]\([^)]+\))/g,tf=/\[([^\]]+)\]\(([^)]+)\)/,rf=/(https?:\/\/[^\s]+)/g,nf=/_(.*?)_/g,af=/\*\*(.*?)\*\*/g,of=/\\n|\n/g,Go="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",sf=e=>{const t=Qt(e,ef,(o,s)=>{const[,l,d]=o.match(tf)??[];return d?c("a",{class:Go,href:d,children:l??d},d+s):c("span",{children:"INVALID LINK"})}),r=Qt(t,rf,(o,s)=>c("a",{class:Go,href:o,children:o},o+s)),i=Qt(r,nf,(o,s)=>c("em",{children:o},o+s)),n=Qt(i,af,(o,s)=>c("strong",{children:o},o+s));return Qt(n,of,(o,s)=>c("br",{},`br-${s}`))},lf=ut("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),cf=({children:e,className:t,animate:r,side:i,...n})=>c("p",{style:{transformOrigin:i==="left"?"0% 50%":"100% 50%"},class:lf({className:t,side:i,animate:r}),...n,children:e}),uf=({message:e})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("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"})})]})}),df=({className:e,...t})=>c("div",{"aria-hidden":!0,children:te.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:Ue("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,i)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-i*200}ms`}}))}):void 0}),ff={bot:"left",user:"right"},pf=ut("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]"}}}),hf=({lastSentMessageFooter:e})=>{var r;const t=((r=N.current$.value.flow)==null?void 0:r.data.messages)??[];return c("ol",{"aria-label":"Chat messages","aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((i,n)=>c(Q,{children:c("li",{class:"flex",tabIndex:n===t.length-1?-1:void 0,children:vr(i).with({type:"system"},a=>c("p",{class:pf({variant:a.variant}),children:a.text})).with({type:"text",author:Rt.union("bot","user")},a=>{const o=a.author==="user"&&!t.slice(n+1).some(d=>d.type==="text"&&d.author==="user"),s=n===t.length-1,l=a.author==="bot"?sf(a.text):a.text;return c(Q,{children:[o?e:null,c(cf,{animate:s,side:ff[a.author],children:l},n)]})}).with({type:"link"},a=>c(uf,{message:a})).with({type:"image"},a=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:a.url,style:{aspectRatio:a.width/a.height}})).with({type:"file"},a=>c(Qu,{class:a.author==="bot"?void 0:"ml-auto",file:{name:a.fileName,sizeKb:a.fileSizeKb}})).with({type:"loading"},a=>{const o=t[t.length-1];return!(a===o)||te.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Cr,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},n)),c(df,{},"typing")]})},gf=({logger:e,apiClient:t,analytics:r,talentBankClient:i})=>{const{flow:n}=N.current$.value;Me(n,"Flow is required to exist to show chatbot body");const a=N.viewState$.value,{chatRef:o,chatService:s}=zc(),{t:l}=ae(),[d,p]=qe();return he(()=>{a==="maximised"&&te.scrollToEnd()},[a]),he(()=>{var w;const{state:u,flow:h}=N.current$.peek();if(u!=="loaded")throw new Error(l("invalid_state"));let b=h.data.nodeHistory.at(-1);if(te.scrollToEnd(),N.setInput(void 0),h.data.isFinished)return;const m=()=>{const y=N.current$.peek().flow;!y||y.data.hasInteracted||(N.markAsInteracted(),Ya(r,y,"FLOW_INTERACT"))};te.onInteractionFn$.value=m,b===void 0?(b=Oa(n.nodes).id,N.setCurrentNodeId(b),Ya(r,h,"FLOW_START")):N.removeMessagesSentByNodeIds([b]);const{interpret:_,abort:k,undo:$}=lu({context:n.context,analytics:{service:r,customProperties:(w=n.analytics)==null?void 0:w.customProperties},apiClient:t,logger:e,talentBankClient:i,flow:n,chatService:s,t:l,getApplicationRecovery:()=>{var y;return(y=N.current$.peek().flow)==null?void 0:y.data.applicationRecovery},setApplicationRecovery:N.setApplicationRecovery,getSubmissions:()=>{var y;return(y=N.current$.peek().flow)==null?void 0:y.data.submissions},onInterpret:y=>N.setCurrentNodeId(y.id),onFlowEnd:async()=>{var S;N.markAsFinished();const y=N.current$.peek().flow;Me(y),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:y.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(S=n.analytics)==null?void 0:S.customProperties})}});return p(()=>$),_(b),()=>{te.onInteractionFn$.value===m&&(te.onInteractionFn$.value=()=>{}),k()}},[r,t,s,e,n,i,l]),c(Q,{children:[c("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[c("div",{ref:o,role:"region","aria-label":l("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:c(hf,{lastSentMessageFooter:n.data.isFinished||!d?null:c(vf,{undoFn:d})})}),te.isReadingHistory$.value&&!n.data.isFinished&&!te.isBotTyping$.value&&c("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:c(qt,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":l("jump_to_current"),onClick:()=>{var h,b;te.scrollToEnd(),(b=((h=o.current)==null?void 0:h.querySelector('li[tabindex="-1"]'))??o.current)==null||b.focus({preventScroll:!0})},children:c(Ba,{})})})]}),c(Kd,{logger:e})]})},bf=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"):[],vf=({undoFn:e})=>{const{t}=ae();return c("div",{class:"flex flex-1 items-center justify-end px-1",children:c(qt,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=N.current$.peek();Me(r);const{removed:i}=e(r.data.nodeHistory),n=r.data.nodeHistory.splice(-i);n.length!==0&&(N.removeMessagesSentByNodeIds(n),N.setInput(void 0),n.pop(),n.map(a=>r.nodes.find(o=>o.id===a)).filter(Boolean).flatMap(bf).forEach(a=>delete r.data.submissions[a]),N.current$.value={...N.current$.value})},children:c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},wf=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:gf},Symbol.toStringTag,{value:"Module"}))})();
|
|
5
|
+
}`},cu=({_internal_domManager:e=Wc(),theme:t,terms:r,feedback:i})=>Os(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:u})=>{let p=!1,d=0;const h=hc({locale:void 0,overrides:r??{}}),b=l&&u?ol({environment:u,publishableKey:l,logger:o}):void 0,m=v=>v===d,_=()=>{if(typeof window>"u")return;d++,Me.flushStateData().catch(()=>{}),M.cancelCurrentFlow(),ie.isBotTyping$.value=!1;const v=e.getChatbotElement();v&&(ct(null,v),v.remove()),p=!1,o.info("Chatbot plugin destroyed")},E=()=>{if(typeof window>"u")return;const v=d,y=[me("style",{id:"inploi-chatbot-styles"},Hc),me("style",{id:"inploi-chatbot-theme"},lu(t))],S=e.getOrCreateChatbotElement();if(ct(me(X,{},[y,me(Uc,{apiClient:n,logger:o,analytics:s,talentBankClient:b,params:{theme:t,terms:r,feedback:i}})]),S),i){const C=D=>{var F,O;if(!m(v))return;const W=(F=e.getChatbotElement())==null?void 0:F.querySelector("dialog");W&&uu({instance:D({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((O=i.params)==null?void 0:O.terms)??{},host:W})};i.plugin instanceof Promise?i.plugin.then(({feedbackPlugin:D})=>{C(D())}).catch(D=>{o.error("Error preparing feedback plugin",D)}):C(i.plugin)}p=!0},I=async(v,y)=>{if(!m(y))return;Fs({context:v.context||{},schema:v.flow.context_schema,logger:o});const S=await M.prepareFlow(v);m(y)&&M.commitFlow(S)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(p)return;E(),o.info("Chatbot plugin prepared")}catch(v){o.error("Error preparing chatbot plugin",v)}},fetchFlowByJobId:async(v,y)=>a.request(Xc,{params:{id:v},searchParams:{id_type:(y==null?void 0:y.idType)==="inploi"?"internal":"external"}}).then(S=>({flow:S.flow,title:S.job.title,flowKeys:[S.job.id,...(y==null?void 0:y.flowKeys)??[]],job:{id:S.job.id,id_type:"external"},...y,context:{user:S.user,...y==null?void 0:y.context}})),fetchFlowById:async(v,y)=>a.request(Qc,{params:{id:v}}).then(S=>{var C;return{flow:S.flow,title:"Chatbot",flowKeys:(y==null?void 0:y.flowKeys)??[],...y,analytics:{customProperties:{flow_id:S.flow.id,flow_version:S.flow.version,...(C=y==null?void 0:y.analytics)==null?void 0:C.customProperties}}}}),open:async v=>{if(!(typeof window>"u"))try{M.cancelCurrentFlow(),M.viewState$.value="maximised",p||E();const y=d;v instanceof Promise?(M.current$.value={state:"loading"},v.then(S=>I(S,y)).catch(S=>{if(!m(y))return;const C=S instanceof Error?S.message:h("unknown_error");M.current$.value={state:"error",error:C}})):await I(v,y)}catch(y){o.error("Error starting flow",y)}},close:async()=>{typeof window>"u"||(M.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:_}});function uu({instance:e,terms:t,theme:r,host:i}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:i})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=cu;const Xa=(e,t,r)=>{var i;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(i=t.analytics)==null?void 0:i.customProperties})};var Qa=({condition:e,context:t,submissions:r,ifBlock:i})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=pn({context:t,key:n,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=Nt(o.value,a);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=Nt(o.value,a),l={...i,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return Ht(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Ht(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Ht(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(u=>typeof u=="string")?Ht(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?or(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${i.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},Ht=(e,{context:t,submissions:r})=>{let i="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of i)if(Qa({condition:n,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let n of i)if(!Qa({condition:n,context:t,submissions:r,ifBlock:e}))return!1;return!0}},du=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,fu=(e,{context:t,submissions:r})=>e.replace(du,(i,n,a="")=>{let[o,...s]=n.trim().split("."),l=pn({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${Tt(u.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return or(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let u=Nt(l.value,s);switch(typeof u){case"boolean":return u===!0?"true":"false";case"string":return u;case"number":return u.toString();case"object":if(Array.isArray(u)&&u.every(p=>typeof p=="string"))return u.join(", ")}break}}return a});const eo=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Oe=(e,t)=>fu(e,eo(t)),pu=(e,t)=>Ht(e,eo(t)),to=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const i=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(i)return to({node:i,nodes:t,stopWhen:r})},hu=({childNode:e,nodes:t})=>{const i=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;const a=t.find(s=>s.id===n.branchId);if(!a)return!1;const o=to({node:a,nodes:t,stopWhen:s=>s.id===e.id});return!(!o||o.id!==e.id)});if(i!=null&&i.nextId)return t.find(n=>n.id===i.nextId)},gu=({flow:e,analytics:t,logger:r,talentBankClient:i,context:n,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:u,persistWriteBarrier:p,onFlowEnd:d,onInterpret:h,t:b})=>{var I;let m=new AbortController;(I=e.data).startedWriteNodeIds??(I.startedWriteNodeIds=e.nodes.flatMap(v=>{var C,D;if(v.type!=="integration-application-submit"||!e.data.nodeHistory.includes(v.id))return[];const y=v.data.key?(C=o())==null?void 0:C[v.data.key]:void 0;return(y==null?void 0:y.type)==="integration"&&((D=ro(y.value,void 0))==null?void 0:D.verdict)==="not_submitted"?[]:[v.id]}));const _={...t.service,log:v=>t.service.log({...v,customProperties:{...v.customProperties,...t.customProperties}})},E=async(v,y)=>{const S=m.signal;if(S.aborted)return;const C=o(),D=s(),W=(D==null?void 0:D.submitNodeId)===v.id?e.nodes.find(F=>{var O;return F.id===D.fileQuestionNodeId&&F.type==="question-file"&&((O=C==null?void 0:C[F.data.key])==null?void 0:O.type)!=="file"}):void 0;if(W)return E(W,y);h==null||h(v,y);try{await bu({flow:e,analytics:_,logger:r,talentBankClient:i,apiClient:a,context:n,node:v,submissions:C,applicationRecovery:D,setApplicationRecovery:async F=>{if(!S.aborted)try{await l(F)}catch(O){r.error("Failed to persist application recovery",O)}},forceSubmitConfirmation:(D==null?void 0:D.submitNodeId)===v.id,persistWriteBarrier:p,signal:S,t:b,chat:{sendMessage:async F=>u.send({groupId:v.id,message:F,signal:S}),userInput:async F=>u.input({input:F,signal:S}),setSubmission:(F,O)=>{S.aborted||u.setSubmission(F,O)}},next:F=>{if(S.aborted)return;const O=(D==null?void 0:D.fileQuestionNodeId)===v.id?D.submitNodeId:F,B=O?e.nodes.find(oe=>oe.id===O):hu({childNode:v,nodes:e.nodes});return B?E(B,v):d==null?void 0:d(v)},end:()=>{S.aborted||d==null||d(v)}})}catch(F){if(F instanceof ft)return;throw F}};return{interpret:async v=>{const y=e.nodes.find(S=>S.id===v)??Ba(e.nodes);return E(y)},undo:v=>{var O;if((O=e.data.startedWriteNodeIds)!=null&&O.length||e.data.isFinished)return{removed:0};const y=Ii(e),S=y?v.lastIndexOf(y):-1,C=e.nodes.find(B=>B.id===y);if(S===-1||!C)return{removed:0};const D=e.nodes.find(B=>B.id===v[v.length-1]);m.abort();const W=v.splice(S);e.data.messages=e.data.messages.filter(B=>!B.groupId||!W.includes(B.groupId)),e.data.currentInput=null;const F=o();for(const B of W.slice(1)){const oe=e.nodes.find(T=>T.id===B);if(!(!oe||!F||oe.id===y)&&("key"in oe.data&&oe.data.key&&delete F[oe.data.key],"keys"in oe.data))for(const T of Object.values(oe.data.keys))typeof T=="string"&&delete F[T]}return m=new AbortController,E(C,D),{removed:W.length}},abort:()=>{m.abort()}}};async function bu(e){const t=e.node;switch(t.type){case"flow-section":return await e.chat.sendMessage({type:"system",variant:"info",text:t.data.title}),e.next(t.nextId);case"pre-apply-result":return Vu({...e,node:t});case"text":return Su({...e,node:t});case"image":return Cu({...e,node:t});case"question-text":return $u({...e,node:t});case"question-enum":return Au({...e,node:t});case"question-number":return Eu({...e,node:t});case"question-phone":return Iu({...e,node:t});case"question-boolean":return Fu({...e,node:t});case"question-file":return Tu({...e,node:t});case"question-address":return Nu({...e,node:t});case"end-flow":return Du({...e,node:t});case"if-block":return ku({...e,node:t});case"jump":return mu({...e,node:t});case"link":return xu({...e,node:t});case"integration-application-submit":return _u({...e,node:t});case"add-submission":return yu({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return wu({...e,node:t});case"feedback":return vu({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function vu({next:e,node:t}){e(t.nextId)}async function wu({next:e,node:t,talentBankClient:r,submissions:i,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(i&&r){const u=t.data.scope==="job"?(l=n.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||u!=null)try{s=await r.checkDuplicate({email:xs({key:t.data.email,submissions:i}).toString(),jobId:u,scope:t.data.scope})}catch(p){a.error("[check-duplicate]",p)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function mu({next:e,node:t}){e(t.data.targetId)}async function yu({next:e,node:t,logger:r,submissions:i,context:n}){if(!i){r.error("Submissions not found");return}i[t.data.key]={type:"string",value:Oe(t.data.value,{submissions:i,context:n})},e(t.nextId)}async function _u({chat:e,next:t,end:r,node:i,logger:n,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:u,setApplicationRecovery:p,forceSubmitConfirmation:d,persistWriteBarrier:h,signal:b,t:m}){var E;if((E=l.data.startedWriteNodeIds)!=null&&E.includes(i.id)&&(u==null?void 0:u.submitNodeId)!==i.id)return await e.sendMessage({type:"system",variant:"warning",text:m("submission_unknown")}),r();const _=async I=>{var O,B,oe;I!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:i.data.submitLabel}}),await e.sendMessage({type:"loading",text:m("submitting")});const{anonymous_id:v,session_id:y}=s.getSessionInfo();if(b.aborted)return;const S=((O=l.data.startedWriteNodeIds)==null?void 0:O.includes(i.id))===!0;if((u==null?void 0:u.submitNodeId)===i.id&&await p(void 0),S||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],i.id]),await h().catch(T=>n.error("Failed to persist application write barrier",T)),b.aborted)return;let C;const D=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:i.data.integrationId,anonymous_id:v,session_id:y,job:l.job,flow_build:l.build,submissions:ys(l.nodes,_s(o||{},i.data.submitKeys)),pre_apply:Br(l.nodes,o||{},l.data.flowSessionId)})}).catch(T=>(C=T,js(T)?T.data:T));if(b.aborted)return;i.data.key&&e.setSubmission(i.data.key,{type:"integration",value:D});const W=As(D);if(W&&s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,service:W.service,response:W.response,flow_type:"CHATBOT_DRAWER",job:l.job}}),$s(D)){const{redirect_url:T,message:L,button_text:Y}=D.integration_response.data;await e.sendMessage({type:"text",author:"bot",text:L??m("submission_redirect_message")});try{const Z=new URL(T);v&&!Z.searchParams.has("anonymous_id")&&Z.searchParams.set("anonymous_id",v),await e.sendMessage({type:"link",href:Z.toString(),text:Y??m("complete_submission"),onClick:()=>{if(!y){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:y,flow_version:l.version,href:Z.toString(),job:l.job}})}})}catch(Z){n.error(`Invalid redirect URL: ${T}`,Z),e.sendMessage({type:"system",variant:"error",text:m("redirect_url_error")})}return t(i.nextId)}if((D==null?void 0:D.success)===!0)return i.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:m("submission_completed")}),t(i.nextId);const F=ro(D,C);if((F==null?void 0:F.verdict)==="not_submitted"&&(S||(l.data.startedWriteNodeIds=(B=l.data.startedWriteNodeIds)==null?void 0:B.filter(T=>T!==i.id)),(u==null?void 0:u.submitNodeId)===i.id&&await p(u),await h().catch(T=>n.error("Failed to persist application write barrier release",T))),F){n.error(C??F.message);const T=F.phase==="submit"&&F.verdict==="confirmed"&&F.code==="unreadable_document"&&typeof F.field=="string"&&F.status!==void 0&&F.status>=400&&F.status<500&&((oe=o==null?void 0:o[F.field])==null?void 0:oe.type)==="file"?F.field:void 0,L=T===void 0?void 0:l.nodes.find(Y=>Y.type==="question-file"&&Y.data.key===T);return L&&T!==void 0?(e.setSubmission(T,null),await p({fileQuestionNodeId:L.id,submitNodeId:i.id}),await e.sendMessage({type:"system",variant:"error",text:m("submission_unreadable_document")}),t(L.id)):F.status===409&&F.phase==="submit"&&F.verdict==="confirmed"?(await e.sendMessage({type:"system",variant:"info",text:m("submission_duplicate")}),r()):F.status===410&&F.code==="job_closed"?(await e.sendMessage({type:"system",variant:"info",text:m("submission_closed")}),r()):F.phase==="submit"&&F.verdict==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:m("submission_unknown")}),r()):F.phase==="workflow"&&F.retryable===!0&&F.verdict==="not_submitted"?(await e.sendMessage({type:"system",variant:"error",text:m("submission_retryable")}),_(!1)):(await e.sendMessage({type:"system",variant:"error",text:m("submission_failed")}),r())}return n.error(C??D),await e.sendMessage({type:"system",variant:"error",text:m("submission_failed")}),r()};await _(d===!0?!1:i.data.skipConfirmation)}const ro=(e,t)=>{if(!Is(e))return;const r=e.integration_response;if(typeof r!="object"||r===null)return;const i=r.error;if(typeof i!="object"||i===null)return;const n=i.data,a=typeof n=="object"&&n!==null?n:{},o=u=>typeof a[u]=="string"?a[u]:void 0,s=u=>typeof a[u]=="boolean"?a[u]:void 0,l=r.status;return{message:e.integration_response.error.message,status:typeof l=="number"?l:t instanceof mn?t.status:void 0,phase:o("phase"),retryable:s("retryable"),verdict:o("verdict"),code:o("code"),field:o("field")}};async function xu({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({type:"link",href:Oe(r.data.href,{submissions:i,context:n}),text:Oe(r.data.cta,{submissions:i,context:n})}),t(r.nextId)}async function ku({submissions:e,next:t,node:r,context:i}){t(pu(r,{submissions:e,context:i})?r.branchId:r.nextId)}async function Su({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.text,{submissions:i,context:n})}),t(r.nextId)}async function Cu({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 $u({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:i,context:n})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?or(o.value):o.value}),t(r.nextId)}async function Eu({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Iu({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?or(o.value):o.value}),t(r.nextId)}async function Au({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function Fu({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:i,context: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}}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Nu({chat:e,next:t,node:r,t:i}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:i("skipped")});else{const a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function Tu({node:e,chat:t,next:r,submissions:i,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Oe(e.data.question,{submissions:i,context:n})});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function Du({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function Vu({node:e,flow:t,submissions:r,chat:i,next:n,apiClient:a,analytics:o}){const s=ms(t.nodes,r||{}),{answers:l,...u}=s;i.setSubmission(e.data.key,{type:"integration",value:u});const p=new AbortController,d=setTimeout(()=>p.abort(),5e3);if(a.fetch("/flow/pre-apply",{method:"POST",signal:p.signal,body:JSON.stringify({...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:Br(t.nodes,r||{},t.data.flowSessionId)})}).catch(()=>{}).finally(()=>clearTimeout(d)),s.status!=="skipped"){const b=[s.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":s.hasHardConcerns?e.data.messages.hard:s.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(const m of["hard","advisory"]){const _=l.filter(E=>!E.matched&&E.severity===m);_.length&&b.push((m==="hard"?"Role requirements":"Other things to consider")+`
|
|
6
|
+
`+_.map(E=>`• ${E.message}`).join(`
|
|
7
|
+
`))}await i.sendMessage({type:"text",author:"bot",text:b.join(`
|
|
8
|
+
|
|
9
|
+
`)}),s.hasHardConcerns&&e.data.alternativeLink&&await i.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await i.userInput({type:"submit",key:void 0,config:{label:e.data.continueLabel}})}return n(e.nextId)}const ht=({class:e,...t})=>{const{t:r}=se();return c("button",{class:qe("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:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var Ge;function Er(e){return{lang:(e==null?void 0:e.lang)??(Ge==null?void 0:Ge.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ge==null?void 0:Ge.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ge==null?void 0:Ge.abortPipeEarly)}}var Pi;function Mu(e){return Pi==null?void 0:Pi.get(e)}var Oi;function Pu(e){return Oi==null?void 0:Oi.get(e)}var Li;function Ou(e,t){var r;return(r=Li==null?void 0:Li.get(e))==null?void 0:r.get(t)}function $t(e){var r,i;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function le(e,t,r,i,n){const a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??$t(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},u=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Ou(e.reference,l.lang)??(u?Pu(l.lang):null)??i.message??Mu(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Le(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Er())}}}function Lu(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ju(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function Bu(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Ru=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},zu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function io(e,t){return{kind:"validation",type:"check",reference:io,async:!1,expects:null,requirement:e,message:t,"~run"(r,i){return r.typed&&!this.requirement(r.value)&&le(this,"input",r,i),r}}}function no(e){return{kind:"validation",type:"email",reference:no,expects:null,async:!1,requirement:zu,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&le(this,"email",t,r),t}}}function Wt(e,t){return{kind:"validation",type:"max_length",reference:Wt,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&le(this,"length",r,i,{received:`${r.value.length}`}),r}}}function ao(e,t){return{kind:"validation",type:"max_value",reference:ao,async:!1,expects:`<=${e instanceof Date?e.toJSON():$t(e)}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!(r.value<=this.requirement)&&le(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():$t(r.value)}),r}}}function Et(e,t){return{kind:"validation",type:"min_length",reference:Et,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&le(this,"length",r,i,{received:`${r.value.length}`}),r}}}function oo(e,t){return{kind:"validation",type:"min_value",reference:oo,async:!1,expects:`>=${e instanceof Date?e.toJSON():$t(e)}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!(r.value>=this.requirement)&&le(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():$t(r.value)}),r}}}function ji(e,t){return{kind:"validation",type:"regex",reference:ji,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!this.requirement.test(r.value)&&le(this,"format",r,i),r}}}function Bi(e){return{kind:"transformation",type:"transform",reference:Bi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function so(e){return{kind:"validation",type:"url",reference:so,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&le(this,"URL",t,r),t}}}function Uu(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function lo(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function co(e,t){return{kind:"schema",type:"array",reference:co,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Le(this)},"~run"(r,i){var a;const n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(u):p.path=[u],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else le(this,"type",r,i);return r}}}function uo(e){return{kind:"schema",type:"boolean",reference:uo,expects:"boolean",async:!1,message:e,get"~standard"(){return Le(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:le(this,"type",t,r),t}}}function fo(e){return{kind:"schema",type:"number",reference:fo,expects:"number",async:!1,message:e,get"~standard"(){return Le(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:le(this,"type",t,r),t}}}function Ye(e,t){return{kind:"schema",type:"object",reference:Ye,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Le(this)},"~run"(r,i){var a;const n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:lo(s),u=s["~run"]({value:l},i);if(u.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(p):d.path=[p],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=u.issues),i.abortEarly){r.typed=!1;break}}u.typed||(r.typed=!1),r.value[o]=u.value}else if(s.fallback!==void 0)r.value[o]=Uu(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(le(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else le(this,"type",r,i);return r}}}function Kt(e,t){return{kind:"schema",type:"optional",reference:Kt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Le(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=lo(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function po(e,t){return{kind:"schema",type:"picklist",reference:po,expects:ju(e.map($t),"|"),async:!1,options:e,message:t,get"~standard"(){return Le(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:le(this,"type",r,i),r}}}function ho(e,t,r){return{kind:"schema",type:"record",reference:ho,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Le(this)},"~run"(i,n){var o,s;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const l in a)if(Lu(a,l)){const u=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const b of p.issues)b.path=[h],(o=i.issues)==null||o.push(b);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}const d=this.value["~run"]({value:u},n);if(d.issues){const h={type:"object",origin:"value",input:a,key:l,value:u};for(const b of d.issues)b.path?b.path.unshift(h):b.path=[h],(s=i.issues)==null||s.push(b);if(i.issues||(i.issues=d.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!d.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=d.value)}}else le(this,"type",i,n);return i}}}function ye(e){return{kind:"schema",type:"string",reference:ye,expects:"string",async:!1,message:e,get"~standard"(){return Le(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:le(this,"type",t,r),t}}}function qu(e,t,r){const i=e["~run"]({value:t},Er(r));if(i.issues)throw new Ru(i.issues);return i.value}function Hu(e,t){const r={};for(const i in e.entries)r[i]=!t||t.includes(i)?Kt(e.entries[i]):e.entries[i];return{...e,entries:r,get"~standard"(){return Le(this)}}}function nt(...e){return{...e[0],pipe:e,get"~standard"(){return Le(this)},"~run"(t,r){for(const i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function Wu(e,t,r){const i=e["~run"]({value:t},Er(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}async function Ku(e,t,r){const i=await e["~run"]({value:t},Er(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}const It=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[c("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"break-words pr-1 text-sm",children:e.message})]}),gt=({class:e,...t})=>{const{t:r}=se();return c("button",{type:"button",class:qe("fr touch-hitbox text-neutral-10 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Ri={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"};const Gt=ut("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),Gu="https://api.mapbox.com/search/searchbox/v1/suggest",Yu="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Ju=e=>atob(e).split("").reverse().join(""),Je=Ye({name:ye()}),Zu=Ye({suggestions:co(Ye({full_address:Kt(ye()),place_formatted:Kt(ye()),name:Kt(ye()),mapbox_id:ye(),context:Hu(Ye({address:Je,street:Je,neighborhood:Je,locality:Je,district:Je,place:Je,region:Je,postcode:Je,country:Je}))}))}),Xu=({logger:e,t})=>Qe(()=>{var i;const r=(i=M.current$.peek().flow)==null?void 0:i.data.flowSessionId;return r?{enabled:!0,getPredictions:async n=>{var d;const a=new URL(Gu);a.searchParams.set("q",n),a.searchParams.set("session_token",r);const o=(d=M.current$.peek().flow)==null?void 0:d.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&a.searchParams.set("proximity",`${o.lng},${o.lat}`),a.searchParams.set("access_token",Ju(Yu));const l=await fetch(a);if(!l.ok)return e.error("Failed to get address details",l),{ok:!1,error:t("address_error")};const u=Wu(Zu,await l.json());if(u.success===!1)return e.error("Failed to parse address details",u.issues),{ok:!1,error:t("address_error")};const{suggestions:p}=u.output;return{ok:!0,data:p.map(h=>{var b,m,_,E,I,v,y,S,C;return{label:h.full_address??h.place_formatted??h.name??h.mapbox_id,id:h.mapbox_id,address:{line1:((b=h.context.address)==null?void 0:b.name)??((m=h.context.street)==null?void 0:m.name),line2:void 0,line3:((_=h.context.neighborhood)==null?void 0:_.name)??((E=h.context.locality)==null?void 0:E.name),city:((I=h.context.place)==null?void 0:I.name)??((v=h.context.district)==null?void 0:v.name),state:(y=h.context.region)==null?void 0:y.name,postcode:(S=h.context.postcode)==null?void 0:S.name,country:(C=h.context.country)==null?void 0:C.name}}})}}}:{enabled:!1}},[e,t]),go=e=>{const{t}=se();return c("button",{type:"button",class:"touch-hitbox text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},Qu=({input:e,onSubmitSuccess:t,logger:r})=>{const{t:i}=se(),[n,a]=He(),{enabled:o,getPredictions:s}=Xu({logger:r,t:i}),[l,u]=He(o?"query":"manual"),[p,d]=He(""),[h,b]=He(),m=be(),_=be(),E=v=>{var S;if(We(o,"Query state should not be enabled"),v=v.trim(),v===((S=m.current)==null?void 0:S.query)||v===(h==null?void 0:h.query)&&h.status==="done")return;if(d(v),v===""){m.current=void 0,b(void 0);return}const y=m.current={query:v};b({query:v,status:"pending"}),s(v).then(C=>{m.current===y&&(m.current=void 0,b(C.ok?{query:v,status:"done",items:C.data}:{query:v,status:"failed",error:C.error}))},C=>{m.current===y&&(m.current=void 0,r.error("Failed to get address details",C),b({query:v,status:"failed",error:i("address_error")}))})},I=(v,y)=>{a(S=>({...S,[v]:y}))};switch(l){case"query":return We(o,"Query state should not be enabled"),c(ed,{input:e,onSkip:()=>t(null),onAddressSelect:v=>{if(v===""){m.current&&(m.current=void 0,b(void 0)),u("manual");return}const y=(h==null?void 0:h.status)==="done"?h.items.find(S=>S.id===v):void 0;y&&(_.current!==v&&a(y.address),_.current=v,u("details"))},onAddressSearch:E,lookup:h,query:p});case"details":return We(n!==void 0),c(vo,{input:e,logger:r,onSubmitSuccess:t,addressFields:n,onFieldChange:I,actions:c(go,{onClick:()=>{u("query")}})});case"manual":return c(vo,{logger:r,input:e,onSubmitSuccess:t,addressFields:n??{},onFieldChange:I,actions:o?c(go,{onClick:()=>{u("query")}}):void 0})}},ed=({input:e,onSkip:t,lookup:r,onAddressSelect:i,query:n,onAddressSearch:a})=>{const{t:o}=se(),s=be(null);return ge(()=>{s.current&&(s.current.focus(),s.current.select())},[]),c(X,{children:[c("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const p=new FormData(l.currentTarget).get("address");typeof p=="string"&&a(p)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:n,class:Gt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[c("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]})}),c("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&c(gt,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?c(It,{error:{message:r.error}}):null,c("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-10 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?c(X,{children:[c(Cr,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),c("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{i(l.id)},children:[c("span",{class:"flex-grow",children:l.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{i("")},children:c("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},bo=["line1","line2","line3","city","state","postcode","country"],vo=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:i,input:n})=>{const a=be(null);ge(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(Ri),{t:s}=se();return c("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{const u=new FormData(l.currentTarget),p=Object.fromEntries(u.entries());r({type:"address",value:p})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:bo.map((l,u)=>{const p=`isdk_${l}`,d=n.config.keys[l];return d?c(X,{children:[c("label",{for:p,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:s(l)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:d,id:p,defaultValue:e[l],onChange:h=>t(l,h.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?c("option",{value:e[l],children:e[l]}):c("option",{value:"",children:s("select_country")}),o.map(h=>c("option",{value:h,children:h},h))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:u===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:d,id:p,defaultValue:e[l],onInput:h=>t(l,h.currentTarget.value),required:!0}),u===bo.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[i,c(ht,{class:"ml-auto"})]})]})},zi=()=>{const e=be(null);return ri(()=>{var t;(t=e.current)==null||t.focus()},[]),e},wo=["true","false"],td=po(wo),rd="answer",mo="flex items-center flex-wrap gap-2 p-2.5",yo="min-w-0 max-w-full flex-auto",_o=li(({label:e,...t},r)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:c("p",{class:"text-center text-base",children:e})})),id=({input:e,onSubmitSuccess:t})=>{const r=zi();return c("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const n=Vc(i).value,a=qu(td,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:mo,children:wo.map((i,n)=>c("li",{class:yo,children:c(_o,{ref:n===0?r:null,type:"submit",name:rd,value:i,label:e.config.labels[i]},i)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(gt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},nd=e=>new Promise((t,r)=>{const i=new FileReader;i.onload=()=>{if(typeof i.result!="string"||!i.result)return r(new Error("Invalid file"));t(i.result)},i.onerror=r,i.readAsDataURL(e)}),xo=e=>e.reduce((t,r)=>t+r.sizeKb,0),ad=Ct("file"),ko=3,Ui=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},od=({file:e,class:t,...r})=>{const[i,n]=Ui(e.name);return c("div",{class:qe("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:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:i}),c("span",{children:n})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Tt(e.sizeKb)})]})},So=({class:e,...t})=>c("li",{class:qe("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),sd=(e,t)=>{const[r,i]=Ui(e);return`${r.slice(0,t)}${i}`},Co=e=>({name:sd(e.name,42),sizeKb:e.size/1e3}),ld=({input:e,onSubmitSuccess:t})=>{var m;const r=(m=M.current$.value.flow)==null?void 0:m.data.submissions[e.key],[i,n]=He(ad(r)&&r.value.length?{status:"ready",files:r.value}:{status:"empty"}),a=be(0),o=i.status==="ready"?i.files:[],s=i.status==="ready"||i.status==="pending"?i.files:[],l=i.status==="error"?i.error:void 0,u=s.length-ko,p=xo(s),d=zi(),{t:h}=se(),b=_=>{if(!_.length)return{type:"required",message:h("validation_file")};if(!Ss(_,e.config.extensions))return{type:"validate",message:h("validation_file_ext",{ext:e.config.extensions.join(", ")})};if(e.config.fileSizeLimitKib&&xo(_)>e.config.fileSizeLimitKib)return{type:"max",message:h("validation_file_size",{size:Tt(e.config.fileSizeLimitKib)})};if(!e.config.allowMultiple&&_.length>1)return{type:"invalid",message:h("validation_file_max",{count:1})}};return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:_=>{if(_.preventDefault(),i.status==="pending"||i.status==="error")return;const E=b(o);E?n({status:"error",error:E}):t({type:"file",value:o})},children:[c("div",{class:"flex items-center gap-2",children:[c("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:[s.length>0?c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[s.slice(0,ko).map(_=>{const[E,I]=Ui(_.name);return c(So,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:E}),c("span",{children:I})]})}),u>0?c(So,{children:["+",u," file",u!==1?"s":""]}):null]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("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:c("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"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:h("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",h("file_max_size",{size:Tt(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:h("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(_=>c("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:_.replace(".","")}))})]})]}),c("p",{role:"status",class:qe("text-neutral-11 flex items-center gap-1.5 text-xs",s.length===0&&"sr-only"),children:i.status==="pending"?c(X,{children:[c(Cr,{"aria-hidden":"true",class:"h-4 w-4"}),h("file_preparing",{count:s.length})]}):i.status==="ready"?c(X,{children:[Tt(p)," ",o.length>1?"total":"",c("span",{class:"sr-only",children:[". ",h("file_ready",{count:o.length})]})]}):null}),c("input",{id:"dropzone-file",onInput:async _=>{We(_.target instanceof HTMLInputElement);const E=_.target.files?Array.from(_.target.files):[];if(_.target.value="",!E.length)return;const I=++a.current,v=i.status==="ready",y=E.map(Co),S=b(y);if(S)return n({status:"error",error:S});n({status:"pending",files:y});try{const C=await Promise.all(E.map(async D=>({...Co(D),data:await nd(D)})));a.current===I&&n({status:"ready",files:C})}catch{a.current===I&&n({status:"error",error:{type:"invalid",message:h(v?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(ht,{disabled:o.length===0}),e.config.optional&&c(gt,{class:"relative",onClick:()=>t(null)})]})]}),c(It,{error:l})]})};var Yt=e=>e.type==="checkbox",bt=e=>e instanceof Date,ve=e=>e==null;const $o=e=>typeof e=="object";var ee=e=>!ve(e)&&!Array.isArray(e)&&$o(e)&&!bt(e),cd=e=>ee(e)&&e.target?Yt(e.target)?e.target.checked:e.target.value:e,ud=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dd=(e,t)=>e.has(ud(t)),fd=e=>{const t=e.constructor&&e.constructor.prototype;return ee(t)&&t.hasOwnProperty("isPrototypeOf")},qi=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ne(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(qi&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(ee(e)&&fd(e)))return e;const i=r?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=ne(e[n]));return i}var Ir=e=>/^\w*$/.test(e),J=e=>e===void 0,Hi=e=>Array.isArray(e)?e.filter(Boolean):[],Wi=e=>Hi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),A=(e,t,r)=>{if(!t||!ee(e))return r;const i=(Ir(t)?[t]:Wi(t)).reduce((n,a)=>ve(n)?n:n[a],e);return J(i)||i===e?J(e[t])?r:e[t]:i},je=e=>typeof e=="boolean",Ee=e=>typeof e=="function",H=(e,t,r)=>{let i=-1;const n=Ir(t)?[t]:Wi(t),a=n.length,o=a-1;for(;++i<a;){const s=n[i];let l=r;if(i!==o){const u=e[s];l=ee(u)||Array.isArray(u)?u:isNaN(+n[i+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const Eo={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ie={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ze={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},pd=ue.createContext(null);pd.displayName="HookFormControlContext";var hd=(e,t,r,i=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Ie.all&&(t._proxyFormState[o]=!i||Ie.all),r&&(r[o]=!0),e[o]}});return n};const gd=typeof window<"u"?ue.useLayoutEffect:ue.useEffect;var _e=e=>typeof e=="string",bd=(e,t,r,i,n)=>_e(e)?(i&&t.watch.add(e),A(r,e,n)):Array.isArray(e)?e.map(a=>(i&&t.watch.add(a),A(r,a))):(i&&(t.watchAll=!0),r),Ki=e=>ve(e)||!$o(e);function at(e,t,r=new WeakSet){if(Ki(e)||Ki(t))return Object.is(e,t);if(bt(e)&&bt(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of i){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(bt(o)&&bt(s)||ee(o)&&ee(s)||Array.isArray(o)&&Array.isArray(s)?!at(o,s,r):!Object.is(o,s))return!1}}return!0}const vd=ue.createContext(null);vd.displayName="HookFormContext";var Io=(e,t,r,i,n)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:n||!0}}:{},Jt=e=>Array.isArray(e)?e:[e],Ao=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function Fo(e,t){const r={};for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],a=t[i];if(n&&ee(n)&&a){const o=Fo(n,a);ee(o)&&(r[i]=o)}else e[i]&&(r[i]=a)}return r}var pe=e=>ee(e)&&!Object.keys(e).length,Gi=e=>e.type==="file",Ar=e=>{if(!qi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},No=e=>e.type==="select-multiple",Yi=e=>e.type==="radio",wd=e=>Yi(e)||Yt(e),Ji=e=>Ar(e)&&e.isConnected;function md(e,t){const r=t.slice(0,-1).length;let i=0;for(;i<r;)e=J(e)?i++:e[t[i++]];return e}function yd(e){for(const t in e)if(e.hasOwnProperty(t)&&!J(e[t]))return!1;return!0}function te(e,t){const r=Array.isArray(t)?t:Ir(t)?[t]:Wi(t),i=r.length===1?e:md(e,r),n=r.length-1,a=r[n];return i&&delete i[a],n!==0&&(ee(i)&&pe(i)||Array.isArray(i)&&yd(i))&&te(e,r.slice(0,-1)),e}var _d=e=>{for(const t in e)if(Ee(e[t]))return!0;return!1};function To(e){return Array.isArray(e)||ee(e)&&!_d(e)}function Zi(e,t={}){for(const r in e){const i=e[r];To(i)?(t[r]=Array.isArray(i)?[]:{},Zi(i,t[r])):J(i)||(t[r]=!0)}return t}function At(e,t,r){r||(r=Zi(t));for(const i in e){const n=e[i];if(To(n))J(t)||Ki(r[i])?r[i]=Zi(n,Array.isArray(n)?[]:{}):At(n,ve(t)?{}:t[i],r[i]);else{const a=t[i];r[i]=!at(n,a)}}return r}const Do={value:!1,isValid:!1},Vo={value:!0,isValid:!0};var Mo=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!J(e[0].attributes.value)?J(e[0].value)||e[0].value===""?Vo:{value:e[0].value,isValid:!0}:Vo:Do}return Do},Po=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>J(e)?e:t?e===""?NaN:e&&+e:r&&_e(e)?new Date(e):i?i(e):e;const Oo={isValid:!1,value:null};var Lo=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Oo):Oo;function jo(e){const t=e.ref;return Gi(t)?t.files:Yi(t)?Lo(e.refs).value:No(t)?[...t.selectedOptions].map(({value:r})=>r):Yt(t)?Mo(e.refs).value:Po(J(t.value)?e.ref.value:t.value,e)}var xd=(e,t,r,i)=>{const n={};for(const a of e){const o=A(t,a);o&&H(n,a,o._f)}return{criteriaMode:r,names:[...e],fields:n,shouldUseNativeValidation:i}},Fr=e=>e instanceof RegExp,Zt=e=>J(e)?e:Fr(e)?e.source:ee(e)?Fr(e.value)?e.value.source:e.value:e,Bo=e=>({isOnSubmit:!e||e===Ie.onSubmit,isOnBlur:e===Ie.onBlur,isOnChange:e===Ie.onChange,isOnAll:e===Ie.all,isOnTouch:e===Ie.onTouched});const Ro="AsyncFunction";var kd=e=>!!e&&!!e.validate&&!!(Ee(e.validate)&&e.validate.constructor.name===Ro||ee(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ro)),Sd=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),zo=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const Xt=(e,t,r,i)=>{for(const n of r||Object.keys(e)){const a=A(e,n);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!i)return!0;if(o.ref&&t(o.ref,o.name)&&!i)return!0;if(Xt(s,t))break}else if(ee(s)&&Xt(s,t))break}}};function Uo(e,t,r){const i=A(e,r);if(i||Ir(r))return{error:i,name:r};const n=r.split(".");for(;n.length;){const a=n.join("."),o=A(t,a),s=A(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};n.pop()}return{name:r}}var Cd=(e,t,r,i)=>{r(e);const{name:n,...a}=e;return pe(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!i||Ie.all))},$d=(e,t,r)=>!e||!t||e===t||Jt(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i))),Ed=(e,t,r,i,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(t||e):(r?i.isOnBlur:n.isOnBlur)?!e:(r?i.isOnChange:n.isOnChange)?e:!0,Id=(e,t)=>!Hi(A(e,t)).length&&te(e,t),Ad=(e,t,r)=>{const i=Jt(A(e,r));return H(i,"root",t[r]),H(e,r,i),e};function qo(e,t,r="validate"){if(_e(e)||Array.isArray(e)&&e.every(_e)||je(e)&&!e)return{type:r,message:_e(e)?e:"",ref:t}}var Ft=e=>ee(e)&&!Fr(e)?e:{value:e,message:""},Ho=async(e,t,r,i,n,a)=>{const{ref:o,refs:s,required:l,maxLength:u,minLength:p,min:d,max:h,pattern:b,validate:m,name:_,valueAsNumber:E,mount:I}=e._f,v=A(r,_);if(!I||t.has(_))return{};const y=s?s[0]:o,S=T=>{n&&y.reportValidity&&(y.setCustomValidity(je(T)?"":T||""),y.reportValidity())},C={},D=Yi(o),W=Yt(o),F=D||W,O=(E||Gi(o))&&J(o.value)&&J(v)||Ar(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,B=Io.bind(null,_,i,C),oe=(T,L,Y,Z=Ze.maxLength,Ae=Ze.minLength)=>{const xe=T?L:Y;C[_]={type:T?Z:Ae,message:xe,ref:o,...B(T?Z:Ae,xe)}};if(a?!Array.isArray(v)||!v.length:l&&(!F&&(O||ve(v))||je(v)&&!v||W&&!Mo(s).isValid||D&&!Lo(s).isValid)){const{value:T,message:L}=_e(l)?{value:!!l,message:l}:Ft(l);if(T&&(C[_]={type:Ze.required,message:L,ref:y,...B(Ze.required,L)},!i))return S(L),C}if(!O&&(!ve(d)||!ve(h))){let T,L;const Y=Ft(h),Z=Ft(d);if(!ve(v)&&!isNaN(v)){const Ae=o.valueAsNumber||v&&+v;ve(Y.value)||(T=Ae>Y.value),ve(Z.value)||(L=Ae<Z.value)}else{const Ae=o.valueAsDate||new Date(v),xe=rr=>new Date(new Date().toDateString()+" "+rr),er=o.type=="time",tr=o.type=="week";_e(Y.value)&&v&&(T=er?xe(v)>xe(Y.value):tr?v>Y.value:Ae>new Date(Y.value)),_e(Z.value)&&v&&(L=er?xe(v)<xe(Z.value):tr?v<Z.value:Ae<new Date(Z.value))}if((T||L)&&(oe(!!T,Y.message,Z.message,Ze.max,Ze.min),!i))return S(C[_].message),C}if((u||p)&&!O&&(_e(v)||a&&Array.isArray(v))){const T=Ft(u),L=Ft(p),Y=!ve(T.value)&&v.length>+T.value,Z=!ve(L.value)&&v.length<+L.value;if((Y||Z)&&(oe(Y,T.message,L.message),!i))return S(C[_].message),C}if(b&&!O&&_e(v)){const{value:T,message:L}=Ft(b);if(Fr(T)&&!v.match(T)&&(C[_]={type:Ze.pattern,message:L,ref:o,...B(Ze.pattern,L)},!i))return S(L),C}if(m){if(Ee(m)){const T=await m(v,r),L=qo(T,y);if(L&&(C[_]={...L,...B(Ze.validate,L.message)},!i))return S(L.message),C}else if(ee(m)){let T={};for(const L in m){if(!pe(T)&&!i)break;const Y=qo(await m[L](v,r),y,L);Y&&(T={...Y,...B(L,Y.message)},S(Y.message),i&&(C[_]=T))}if(!pe(T)&&(C[_]={ref:y,...T},!i))return C}}return S(!0),C};const Fd={mode:Ie.onSubmit,reValidateMode:Ie.onChange,shouldFocusError:!0};function Nd(e={}){let t={...Fd,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ee(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},i={},n=ee(t.defaultValues)||ee(t.values)?ne(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ne(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...p};let h={...d};const b={array:Ao(),state:Ao()},m=t.criteriaMode===Ie.all,_=f=>g=>{clearTimeout(u),u=setTimeout(f,g)},E=async f=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||f)){let g;t.resolver?(g=pe((await F()).errors),I()):g=await B(i,!0),g!==r.isValid&&b.state.next({isValid:g})}},I=(f,g)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((f||Array.from(s.mount)).forEach(w=>{w&&(g?H(r.validatingFields,w,g):te(r.validatingFields,w))}),b.state.next({validatingFields:r.validatingFields,isValidating:!pe(r.validatingFields)}))},v=(f,g=[],w,$,k=!0,x=!0)=>{if($&&w&&!t.disabled){if(o.action=!0,x&&Array.isArray(A(i,f))){const V=w(A(i,f),$.argA,$.argB);k&&H(i,f,V)}if(x&&Array.isArray(A(r.errors,f))){const V=w(A(r.errors,f),$.argA,$.argB);k&&H(r.errors,f,V),Id(r.errors,f)}if((d.touchedFields||h.touchedFields)&&x&&Array.isArray(A(r.touchedFields,f))){const V=w(A(r.touchedFields,f),$.argA,$.argB);k&&H(r.touchedFields,f,V)}(d.dirtyFields||h.dirtyFields)&&(r.dirtyFields=At(n,a)),b.state.next({name:f,isDirty:T(f,g),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else H(a,f,g)},y=(f,g)=>{H(r.errors,f,g),b.state.next({errors:r.errors})},S=f=>{r.errors=f,b.state.next({errors:r.errors,isValid:!1})},C=(f,g,w,$)=>{const k=A(i,f);if(k){const x=A(a,f,J(w)?A(n,f):w);J(x)||$&&$.defaultChecked||g?H(a,f,g?x:jo(k._f)):Z(f,x),o.mount&&!o.action&&E()}},D=(f,g,w,$,k)=>{let x=!1,V=!1;const R={name:f};if(!t.disabled){if(!w||$){(d.isDirty||h.isDirty)&&(V=r.isDirty,r.isDirty=R.isDirty=T(),x=V!==R.isDirty);const z=at(A(n,f),g);V=!!A(r.dirtyFields,f),z?te(r.dirtyFields,f):H(r.dirtyFields,f,!0),R.dirtyFields=r.dirtyFields,x=x||(d.dirtyFields||h.dirtyFields)&&V!==!z}if(w){const z=A(r.touchedFields,f);z||(H(r.touchedFields,f,w),R.touchedFields=r.touchedFields,x=x||(d.touchedFields||h.touchedFields)&&z!==w)}x&&k&&b.state.next(R)}return x?R:{}},W=(f,g,w,$)=>{const k=A(r.errors,f),x=(d.isValid||h.isValid)&&je(g)&&r.isValid!==g;if(t.delayError&&w?(l=_(()=>y(f,w)),l(t.delayError)):(clearTimeout(u),l=null,w?H(r.errors,f,w):te(r.errors,f)),(w?!at(k,w):k)||!pe($)||x){const V={...$,...x&&je(g)?{isValid:g}:{},errors:r.errors,name:f};r={...r,...V},b.state.next(V)}},F=async f=>(I(f,!0),await t.resolver(a,t.context,xd(f||s.mount,i,t.criteriaMode,t.shouldUseNativeValidation))),O=async f=>{const{errors:g}=await F(f);if(I(f),f)for(const w of f){const $=A(g,w);$?H(r.errors,w,$):te(r.errors,w)}else r.errors=g;return g},B=async(f,g,w={valid:!0})=>{for(const $ in f){const k=f[$];if(k){const{_f:x,...V}=k;if(x){const R=s.array.has(x.name),z=k._f&&kd(k._f);z&&d.validatingFields&&I([x.name],!0);const he=await Ho(k,s.disabled,a,m,t.shouldUseNativeValidation&&!g,R);if(z&&d.validatingFields&&I([x.name]),he[x.name]&&(w.valid=!1,g||e.shouldUseNativeValidation))break;!g&&(A(he,x.name)?R?Ad(r.errors,he,x.name):H(r.errors,x.name,he[x.name]):te(r.errors,x.name))}!pe(V)&&await B(V,g,w)}}return w.valid},oe=()=>{for(const f of s.unMount){const g=A(i,f);g&&(g._f.refs?g._f.refs.every(w=>!Ji(w)):!Ji(g._f.ref))&&Xi(f)}s.unMount=new Set},T=(f,g)=>!t.disabled&&(f&&g&&H(a,f,g),!at(Qo(),n)),L=(f,g,w)=>bd(f,s,{...o.mount?a:J(g)?n:_e(f)?{[f]:g}:g},w,g),Y=f=>Hi(A(o.mount?a:n,f,t.shouldUnregister?A(n,f,[]):[])),Z=(f,g,w={})=>{const $=A(i,f);let k=g;if($){const x=$._f;x&&(!x.disabled&&H(a,f,Po(g,x)),k=Ar(x.ref)&&ve(g)?"":g,No(x.ref)?[...x.ref.options].forEach(V=>V.selected=k.includes(V.value)):x.refs?Yt(x.ref)?x.refs.forEach(V=>{(!V.defaultChecked||!V.disabled)&&(Array.isArray(k)?V.checked=!!k.find(R=>R===V.value):V.checked=k===V.value||!!k)}):x.refs.forEach(V=>V.checked=V.value===k):Gi(x.ref)?x.ref.value="":(x.ref.value=k,x.ref.type||b.state.next({name:f,values:ne(a)})))}(w.shouldDirty||w.shouldTouch)&&D(f,k,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&rr(f)},Ae=(f,g,w)=>{for(const $ in g){if(!g.hasOwnProperty($))return;const k=g[$],x=f+"."+$,V=A(i,x);(s.array.has(f)||ee(k)||V&&!V._f)&&!bt(k)?Ae(x,k,w):Z(x,k,w)}},xe=(f,g,w={})=>{const $=A(i,f),k=s.array.has(f),x=ne(g);H(a,f,x),k?(b.array.next({name:f,values:ne(a)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&w.shouldDirty&&b.state.next({name:f,dirtyFields:At(n,a),isDirty:T(f,x)})):$&&!$._f&&!ve(x)?Ae(f,x,w):Z(f,x,w),zo(f,s)?b.state.next({...r,name:f,values:ne(a)}):b.state.next({name:o.mount?f:void 0,values:ne(a)})},er=async f=>{o.mount=!0;const g=f.target;let w=g.name,$=!0;const k=A(i,w),x=z=>{$=Number.isNaN(z)||bt(z)&&isNaN(z.getTime())||at(z,A(a,w,z))},V=Bo(t.mode),R=Bo(t.reValidateMode);if(k){let z,he;const vt=g.type?jo(k._f):cd(f),ot=f.type===Eo.BLUR||f.type===Eo.FOCUS_OUT,Tf=!Sd(k._f)&&!t.resolver&&!A(r.errors,w)&&!k._f.deps||Ed(ot,A(r.touchedFields,w),r.isSubmitted,R,V),tn=zo(w,s,ot);H(a,w,vt),ot?(!g||!g.readOnly)&&(k._f.onBlur&&k._f.onBlur(f),l&&l(0)):k._f.onChange&&k._f.onChange(f);const rn=D(w,vt,ot),Df=!pe(rn)||tn;if(!ot&&b.state.next({name:w,type:f.type,values:ne(a)}),Tf)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?ot&&E():ot||E()),Df&&b.state.next({name:w,...tn?{}:rn});if(!ot&&tn&&b.state.next({...r}),t.resolver){const{errors:ls}=await F([w]);if(I([w]),x(vt),$){const Vf=Uo(r.errors,i,w),cs=Uo(ls,i,Vf.name||w);z=cs.error,w=cs.name,he=pe(ls)}}else I([w],!0),z=(await Ho(k,s.disabled,a,m,t.shouldUseNativeValidation))[w],I([w]),x(vt),$&&(z?he=!1:(d.isValid||h.isValid)&&(he=await B(i,!0)));$&&(k._f.deps&&(!Array.isArray(k._f.deps)||k._f.deps.length>0)&&rr(k._f.deps),W(w,he,z,rn))}},tr=(f,g)=>{if(A(r.errors,g)&&f.focus)return f.focus(),1},rr=async(f,g={})=>{let w,$;const k=Jt(f);if(t.resolver){const x=await O(J(f)?f:k);w=pe(x),$=f?!k.some(V=>A(x,V)):w}else f?($=(await Promise.all(k.map(async x=>{const V=A(i,x);return await B(V&&V._f?{[x]:V}:V)}))).every(Boolean),!(!$&&!r.isValid)&&E()):$=w=await B(i);return b.state.next({...!_e(f)||(d.isValid||h.isValid)&&w!==r.isValid?{}:{name:f},...t.resolver||!f?{isValid:w}:{},errors:r.errors}),g.shouldFocus&&!$&&Xt(i,tr,f?k:s.mount),$},Qo=(f,g)=>{let w={...o.mount?a:n};return g&&(w=Fo(g.dirtyFields?r.dirtyFields:r.touchedFields,w)),J(f)?w:_e(f)?A(w,f):f.map($=>A(w,$))},es=(f,g)=>({invalid:!!A((g||r).errors,f),isDirty:!!A((g||r).dirtyFields,f),error:A((g||r).errors,f),isValidating:!!A(r.validatingFields,f),isTouched:!!A((g||r).touchedFields,f)}),Cf=f=>{const g=f?Jt(f):void 0;g==null||g.forEach(w=>te(r.errors,w)),g?g.forEach(w=>{b.state.next({name:w,errors:r.errors})}):b.state.next({errors:{}})},ts=(f,g,w)=>{const $=(A(i,f,{_f:{}})._f||{}).ref,k=A(r.errors,f)||{},{ref:x,message:V,type:R,...z}=k;H(r.errors,f,{...z,...g,ref:$}),b.state.next({name:f,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&$&&$.focus&&$.focus()},$f=(f,g)=>Ee(f)?b.state.subscribe({next:w=>"values"in w&&f(L(void 0,g),w)}):L(f,g,!0),rs=f=>b.state.subscribe({next:g=>{$d(f.name,g.name,f.exact)&&Cd(g,f.formState||d,Nf,f.reRenderRoot)&&f.callback({values:{...a},...r,...g,defaultValues:n})}}).unsubscribe,Ef=f=>(o.mount=!0,h={...h,...f.formState},rs({...f,formState:{...p,...f.formState}})),Xi=(f,g={})=>{for(const w of f?Jt(f):s.mount)s.mount.delete(w),s.array.delete(w),g.keepValue||(te(i,w),te(a,w)),!g.keepError&&te(r.errors,w),!g.keepDirty&&te(r.dirtyFields,w),!g.keepTouched&&te(r.touchedFields,w),!g.keepIsValidating&&te(r.validatingFields,w),!t.shouldUnregister&&!g.keepDefaultValue&&te(n,w);b.state.next({values:ne(a)}),b.state.next({...r,...g.keepDirty?{isDirty:T()}:{}}),!g.keepIsValid&&E()},is=({disabled:f,name:g})=>{if(je(f)&&o.mount||f||s.disabled.has(g)){const k=s.disabled.has(g)!==!!f;f?s.disabled.add(g):s.disabled.delete(g),k&&o.mount&&!o.action&&E()}},Qi=(f,g={})=>{let w=A(i,f);const $=je(g.disabled)||je(t.disabled);return H(i,f,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:f}},name:f,mount:!0,...g}}),s.mount.add(f),w?is({disabled:je(g.disabled)?g.disabled:t.disabled,name:f}):C(f,!0,g.value),{...$?{disabled:g.disabled||t.disabled}:{},...t.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:f,onChange:er,onBlur:er,ref:k=>{if(k){Qi(f,g),w=A(i,f);const x=J(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,V=wd(x),R=w._f.refs||[];if(V?R.find(z=>z===x):x===w._f.ref)return;H(i,f,{_f:{...w._f,...V?{refs:[...R.filter(Ji),x,...Array.isArray(A(n,f))?[{}]:[]],ref:{type:x.type,name:f}}:{ref:x}}}),C(f,!1,void 0,x)}else w=A(i,f,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||g.shouldUnregister)&&!(dd(s.array,f)&&o.action)&&s.unMount.add(f)}}},en=()=>t.shouldFocusError&&Xt(i,tr,s.mount),If=f=>{je(f)&&(b.state.next({disabled:f}),Xt(i,(g,w)=>{const $=A(i,w);$&&(g.disabled=$._f.disabled||f,Array.isArray($._f.refs)&&$._f.refs.forEach(k=>{k.disabled=$._f.disabled||f}))},0,!1))},ns=(f,g)=>async w=>{let $;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let k=ne(a);if(b.state.next({isSubmitting:!0}),t.resolver){const{errors:x,values:V}=await F();I(),r.errors=x,k=ne(V)}else await B(i);if(s.disabled.size)for(const x of s.disabled)te(k,x);if(te(r.errors,"root"),pe(r.errors)){b.state.next({errors:{}});try{await f(k,w)}catch(x){$=x}}else g&&await g({...r.errors},w),en(),setTimeout(en);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:pe(r.errors)&&!$,submitCount:r.submitCount+1,errors:r.errors}),$)throw $},Af=(f,g={})=>{A(i,f)&&(J(g.defaultValue)?xe(f,ne(A(n,f))):(xe(f,g.defaultValue),H(n,f,ne(g.defaultValue))),g.keepTouched||te(r.touchedFields,f),g.keepDirty||(te(r.dirtyFields,f),r.isDirty=g.defaultValue?T(f,ne(A(n,f))):T()),g.keepError||(te(r.errors,f),d.isValid&&E()),b.state.next({...r}))},as=(f,g={})=>{const w=f?ne(f):n,$=ne(w),k=pe(f),x=k?n:$;if(g.keepDefaultValues||(n=w),!g.keepValues){if(g.keepDirtyValues){const V=new Set([...s.mount,...Object.keys(At(n,a))]);for(const R of Array.from(V)){const z=A(r.dirtyFields,R),he=A(a,R),vt=A(x,R);z&&!J(he)?H(x,R,he):!z&&!J(vt)&&xe(R,vt)}}else{if(qi&&J(f))for(const V of s.mount){const R=A(i,V);if(R&&R._f){const z=Array.isArray(R._f.refs)?R._f.refs[0]:R._f.ref;if(Ar(z)){const he=z.closest("form");if(he){he.reset();break}}}}if(g.keepFieldsRef)for(const V of s.mount)xe(V,A(x,V));else i={}}a=t.shouldUnregister?g.keepDefaultValues?ne(n):{}:ne(x),b.array.next({values:{...x}}),b.state.next({values:{...x}})}s={mount:g.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!g.keepIsValid||!!g.keepDirtyValues||!t.shouldUnregister&&!pe(x),o.watch=!!t.shouldUnregister,o.keepIsValid=!!g.keepIsValid,o.action=!1,g.keepErrors||(r.errors={}),b.state.next({submitCount:g.keepSubmitCount?r.submitCount:0,isDirty:k?!1:g.keepDirty?r.isDirty:!!(g.keepDefaultValues&&!at(f,n)),isSubmitted:g.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:k?{}:g.keepDirtyValues?g.keepDefaultValues&&a?At(n,a):r.dirtyFields:g.keepDefaultValues&&f?At(n,f):g.keepDirty?r.dirtyFields:{},touchedFields:g.keepTouched?r.touchedFields:{},errors:g.keepErrors?r.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},os=(f,g)=>as(Ee(f)?f(a):f,{...t.resetOptions,...g}),Ff=(f,g={})=>{const w=A(i,f),$=w&&w._f;if($){const k=$.refs?$.refs[0]:$.ref;k.focus&&setTimeout(()=>{k.focus(),g.shouldSelect&&Ee(k.select)&&k.select()})}},Nf=f=>{r={...r,...f}},ss={control:{register:Qi,unregister:Xi,getFieldState:es,handleSubmit:ns,setError:ts,_subscribe:rs,_runSchema:F,_updateIsValidating:I,_focusError:en,_getWatch:L,_getDirty:T,_setValid:E,_setFieldArray:v,_setDisabledField:is,_setErrors:S,_getFieldArray:Y,_reset:as,_resetDefaultValues:()=>Ee(t.defaultValues)&&t.defaultValues().then(f=>{os(f,t.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:If,_subjects:b,_proxyFormState:d,get _fields(){return i},get _formValues(){return a},get _state(){return o},set _state(f){o=f},get _defaultValues(){return n},get _names(){return s},set _names(f){s=f},get _formState(){return r},get _options(){return t},set _options(f){t={...t,...f}}},subscribe:Ef,trigger:rr,register:Qi,handleSubmit:ns,watch:$f,setValue:xe,getValues:Qo,reset:os,resetField:Af,clearErrors:Cf,unregister:Xi,setError:ts,setFocus:Ff,getFieldState:es};return{...ss,formControl:ss}}function Nr(e={}){const t=ue.useRef(void 0),r=ue.useRef(void 0),[i,n]=ue.useState({isDirty:!1,isValidating:!1,isLoading:Ee(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ee(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!Ee(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=Nd(e);t.current={...s,formState:i}}const a=t.current.control;return a._options=e,gd(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),ue.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),ue.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),ue.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),ue.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),ue.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==i.isDirty&&a._subjects.state.next({isDirty:o})}},[a,i.isDirty]),ue.useEffect(()=>{var o;e.values&&!at(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),ue.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=ue.useMemo(()=>hd(i,a),[a,i]),t.current}const Wo=(e,t,r)=>{if(e&&"reportValidity"in e){const i=A(r,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},Td=(e,t)=>{for(const r in t.fields){const i=t.fields[r];i&&i.ref&&"reportValidity"in i.ref?Wo(i.ref,r,e):i.refs&&i.refs.forEach(n=>Wo(n,r,e))}},Dd=(e,t)=>{t.shouldUseNativeValidation&&Td(e,t);const r={};for(const i in e){const n=A(t.fields,i),a=Object.assign(e[i]||{},{ref:n&&n.ref});if(Vd(t.names||Object.keys(e),i)){const o=Object.assign({},A(r,i));H(o,"root",a),H(r,i,o)}else H(r,i,a)}return r},Vd=(e,t)=>e.some(r=>r.startsWith(t+"."));var Tr=function(e,t,r){return r===void 0&&(r={}),function(i,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(Ku(e,i,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var u=s.issues[0],p=Bu(u);if(p&&(l[p]||(l[p]={message:u.message,type:u.type}),o)){var d=l[p].types,h=d&&d[u.type];l[p]=Io(p,o,l,u.type,h?[].concat(h,u.message):u.message)}s.issues.shift()}return{values:{},errors:Dd(l,a)}}return{values:r.raw?i:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Ko=27,Go=12,Yo=10,Md=Ct("enum"),Pd=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Tr(Ye({checked:nt(ho(ye(),uo()),Bi(i=>Object.entries(i).filter(([n,a])=>a).map(([n,a])=>n)),Wt(r.max,t("validation_multiple_choice_max",{count:r.max})),Et(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},Od=li(({option:e,...t},r)=>c(X,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Jo=ut("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:mo}}}),Ld=({input:e,onSubmitSuccess:t})=>{var p,d;const r=e.key?(p=M.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,i=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,n=i&&e.config.options.length===2,{t:a}=se(),{register:o,handleSubmit:s,formState:{errors:l}}=Nr({defaultValues:{checked:i?{}:Md(r)?Object.fromEntries(r.value.map(h=>[h,!0])):{}},resolver:Pd(e.config,a)}),u=zi();return n?c("ul",{style:{maxHeight:6.5*Ko+5*Go+2*Yo},class:Jo({variant:"booleanLike"}),children:e.config.options.map((h,b)=>c("li",{class:yo,children:c(_o,{type:"submit",ref:m=>{m&&b===0&&(u.current=m)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}):c("form",{noValidate:!0,onSubmit:h=>s(b=>{const m=b.checked;t({type:"enum",value:m})})(h),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Ko+5*Go+2*Yo},class:Jo({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,b)=>{const m=`checked.${h.value}`,{ref:_,...E}=o(m);return c("li",{class:"relative",children:c(Od,{option:h,autoFocus:b===0,ref:I=>{I&&b===0&&(u.current=I),_(I)},id:m,...E,onClick:i?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[i?null:c(ht,{}),e.config.minSelected===0&&c(gt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(It,{error:(d=l.checked)==null?void 0:d.root})})]})},jd=Ct("number"),Bd=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,i=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Tr(Ye({number:nt(fo(t("validation_number")),oo(r,t("validation_number_min",{min:r})),ao(i,t("validation_number_max",{max:i})),io(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},Rd=({input:e,onSubmitSuccess:t})=>{var d;const r=e.config.defaultValue,i=e.key?(d=M.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:n}=se(),{register:a,handleSubmit:o,formState:{errors:s}}=Nr({defaultValues:{number:jd(i)?i.value:r?Number(r):void 0},resolver:Bd(e.config,n)}),{ref:l,...u}=a("number",{required:!e.config.optional,valueAsNumber:!0}),p=be();return ge(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...u,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(p.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:Gt({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&c(gt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(ht,{})]}),c(It,{error:s.number})]})},zd=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(Ri).find(n=>e.startsWith(n[1])),r=t?t[1]:"",i=e.replace(r,"");return/^\d+$/.test(i)?{countryCode:r,phoneNumber:i}:{countryCode:"",phoneNumber:""}},Ud="44",qd=/^[0-9 ]+$/,Hd=Ct("string"),Wd=Ct("phone"),Kd=e=>{const t=nt(ye(e("validation_country_code")),ji(qd,e("validation_country_code"))),r=nt(ye(e("validation_phone")),Et(1,e("validation_phone")),Bi(i=>i.replace(/[^0-9]/g,"")));return Tr(Ye({countryCode:t,phoneNumber:r}))},Gd=({input:e,onSubmitSuccess:t})=>{var _;const r=e.key?(_=M.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,{t:i}=se(),[n,a]=He(),o=Hd(r)?zd(r.value):Wd(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:u},watch:p}=Nr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??Ud,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:Kd(i)}),{ref:d,...h}=s("phoneNumber",{required:!e.config.optional}),b=be(),m=p("countryCode");return ge(()=>{b.current&&(b.current.focus(),b.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(E=>{const I=E.phoneNumber.replace(/[^0-9]/g,""),v=E.countryCode.replace(/[^0-9]/g,"");a(void 0);const y=e.config.minChars??7,S=I.length+v.length;if(S<y)return a(i("validation_phone_min_chars",{count:y}));const C=e.config.maxChars;if(C!=null&&S>C)return a(i("validation_max_chars",{count:C}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:v,phoneNumber:I}}):t({type:"string",value:m+E.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[c("span",{children:["+",m]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Ri).map(([E,I])=>c("option",{value:I,children:[E," (+",I,")"]},E))})]}),c("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:E=>{E&&(b.current=E),d(E)},class:Gt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(gt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(ht,{})]}),c(It,{error:u.countryCode||u.phoneNumber||{message:n}})]})},Yd=({input:e,onSubmitSuccess:t})=>c("div",{class:"flex flex-col items-center py-3",children:c("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:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("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:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),Jd={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Zd=Ct("string"),Xd=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return Tr(Ye({text:{date:nt(ye(t("validation_date")),ji(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:nt(ye(t("validation_email")),no(t("validation_email")),Et(e.minChars??1,r.minLength),Wt(e.maxChars??1/0,r.maxLength)),text:nt(ye(),Et(e.minChars??1,r.minLength),Wt(e.maxChars??1/0,r.maxLength)),url:nt(ye(t("validation_url")),so(t("validation_url")),Et(e.minChars??1,r.minLength),Wt(e.maxChars??1/0,r.maxLength))}[e.format]}))},Qd={text:({input:e,onSubmitSuccess:t})=>{var d;const{t:r}=se(),i=e.key?(d=M.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:a,handleSubmit:o,formState:{errors:s}}=Nr({defaultValues:{text:Zd(i)?i.value:n??""},resolver:Xd(e.config,r)}),{ref:l,...u}=a("text",{required:!e.config.optional}),p=be();return ge(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{t({type:"string",value:h.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...u,...Jd[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(p.current=h),l(h)},placeholder:e.config.placeholder,class:Gt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(gt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(ht,{})]}),c(It,{error:s.text})]})},phone:Gd,"multiple-choice":Ld,boolean:id,file:ld,submit:Yd,address:Qu,number:Rd},ef=({logger:e})=>{var n;const t=(n=M.current$.value.flow)==null?void 0:n.data.currentInput,r=be(null),i=()=>ie.onInteractionFn$.value();return ge(()=>{var a;(a=r.current)==null||a.scrollTo({top:0})},[t]),c("div",{ref:r,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:c("div",{class:"flex flex-col",onPointerDownCapture:t?i:void 0,onKeyDownCapture:t?i:void 0,children:t?(()=>{const a=Qd[t.type];return c(a,{logger:e,onSubmitSuccess:ie.onSubmitSuccessFn$.value,input:t})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Gt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(ht,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function tf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rf=function(e){return e instanceof RegExp},nf=function(t){var r=/[\\^$.*+?()[\]{}|]/g,i=RegExp(r.source);return t&&i.test(t)?t.replace(r,"\\$&"):t},Zo=function(e){return typeof e=="string"},af=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function of(e,t,r){var i=0,n=0;if(e==="")return e;if(!e||!Zo(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;rf(a)||(a=new RegExp("("+nf(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}n=o[s].length,i+=o[s-1].length,o[s]=r(o[s],s,i),i+=n}return o}var sf=function(t,r,i){return Array.isArray(t)||(t=[t]),af(t.map(function(n){return Zo(n)?of(n,r,i):n}))};const Qt=tf(sf),lf=/(\[[^\]]+\]\([^)]+\))/g,cf=/\[([^\]]+)\]\(([^)]+)\)/,uf=/(https?:\/\/[^\s]+)/g,df=/_(.*?)_/g,ff=/\*\*(.*?)\*\*/g,pf=/\\n|\n/g,Xo="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",hf=e=>{const t=Qt(e,lf,(o,s)=>{const[,l,u]=o.match(cf)??[];return u?c("a",{class:Xo,href:u,children:l??u},u+s):c("span",{children:"INVALID LINK"})}),r=Qt(t,uf,(o,s)=>c("a",{class:Xo,href:o,children:o},o+s)),i=Qt(r,df,(o,s)=>c("em",{children:o},o+s)),n=Qt(i,ff,(o,s)=>c("strong",{children:o},o+s));return Qt(n,pf,(o,s)=>c("br",{},`br-${s}`))},gf=ut("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),bf=({children:e,className:t,animate:r,side:i,...n})=>c("p",{style:{transformOrigin:i==="left"?"0% 50%":"100% 50%"},class:gf({className:t,side:i,animate:r}),...n,children:e}),vf=({message:e})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("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"})})]})}),wf=({className:e,...t})=>c("div",{"aria-hidden":!0,children:ie.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:qe("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,i)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-i*200}ms`}}))}):void 0}),mf={bot:"left",user:"right"},yf=ut("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]"}}}),_f=({lastSentMessageFooter:e})=>{const t=M.current$.value.flow,r=(t==null?void 0:t.data.messages)??[],i=t?Ii(t):void 0;return c("ol",{"aria-label":"Chat messages","aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[r.map((n,a)=>c(X,{children:c("li",{class:"flex",tabIndex:a===r.length-1?-1:void 0,children:[i&&n.groupId===i&&!r.slice(a+1).some(o=>o.groupId===i)?e:null,vr(n).with({type:"system"},o=>c("p",{class:yf({variant:o.variant}),children:o.text})).with({type:"text",author:Bt.union("bot","user")},o=>{const s=a===r.length-1,l=o.author==="bot"?hf(o.text):o.text;return c(X,{children:c(bf,{animate:s,side:mf[o.author],children:l},a)})}).with({type:"link"},o=>c(vf,{message:o})).with({type:"image"},o=>c("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=>c(od,{class:o.author==="bot"?void 0:"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).with({type:"loading"},o=>{const s=r[r.length-1];return!(o===s)||ie.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[c(Cr,{"aria-hidden":o.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),o.text?c("p",{role:"status",class:"text-neutral-11 text-sm",children:o.text}):null]})}).exhaustive()]})},a)),c(wf,{},"typing")]})},xf=({logger:e,apiClient:t,analytics:r,talentBankClient:i})=>{const{flow:n}=M.current$.value;We(n,"Flow is required to exist to show chatbot body");const a=M.viewState$.value,{chatRef:o,chatService:s}=Yc(),{t:l}=se(),[u,p]=He();return ge(()=>{a==="maximised"&&ie.scrollToEnd()},[a]),ge(()=>{var v;const{state:d,flow:h}=M.current$.peek();if(d!=="loaded")throw new Error(l("invalid_state"));let b=h.data.nodeHistory.at(-1);if(ie.scrollToEnd(),M.setInput(void 0),h.data.isFinished)return;const m=()=>{const y=M.current$.peek().flow;!y||y.data.hasInteracted||(M.markAsInteracted(),Xa(r,y,"FLOW_INTERACT"))};ie.onInteractionFn$.value=m,b===void 0?(b=Ba(n.nodes).id,M.setCurrentNodeId(b),Xa(r,h,"FLOW_START")):M.removeMessagesSentByNodeIds([b]);const{interpret:_,abort:E,undo:I}=gu({context:n.context,analytics:{service:r,customProperties:(v=n.analytics)==null?void 0:v.customProperties},apiClient:t,logger:e,talentBankClient:i,flow:n,chatService:s,t:l,getApplicationRecovery:()=>{var y;return(y=M.current$.peek().flow)==null?void 0:y.data.applicationRecovery},setApplicationRecovery:M.setApplicationRecovery,persistWriteBarrier:()=>M.persistWriteBarrier(h),getSubmissions:()=>{var y;return(y=M.current$.peek().flow)==null?void 0:y.data.submissions},onInterpret:y=>M.setCurrentNodeId(y.id),onFlowEnd:async()=>{var S;M.markAsFinished();const y=M.current$.peek().flow;We(y),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:y.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(S=n.analytics)==null?void 0:S.customProperties})}});return p(()=>I),_(b),()=>{ie.onInteractionFn$.value===m&&(ie.onInteractionFn$.value=()=>{}),E()}},[r,t,s,e,n,i,l]),c(X,{children:[c("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[c("div",{ref:o,role:"region","aria-label":l("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:c(_f,{lastSentMessageFooter:!Ii(n)||!u?null:c(kf,{undoFn:u})})}),ie.isReadingHistory$.value&&!n.data.isFinished&&!ie.isBotTyping$.value&&c("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:c(qt,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":l("jump_to_current"),onClick:()=>{var h,b;ie.scrollToEnd(),(b=((h=o.current)==null?void 0:h.querySelector('li[tabindex="-1"]'))??o.current)==null||b.focus({preventScroll:!0})},children:c(qa,{})})})]}),c(ef,{logger:e})]})},kf=({undoFn:e})=>{const{t}=se();return c("div",{class:"flex flex-1 items-center justify-end px-1",children:c(qt,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=M.current$.peek();We(r),e(r.data.nodeHistory)},children:c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},Sf=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:xf},Symbol.toStringTag,{value:"Module"}))})();
|