@inploi/plugin-chatbot 14.13.1 → 14.13.2

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 CHANGED
@@ -1,9 +1,9 @@
1
- var sh=Object.defineProperty;var lh=(ve,ze,Je)=>ze in ve?sh(ve,ze,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ve[ze]=Je;var pe=(ve,ze,Je)=>(lh(ve,typeof ze!="symbol"?ze+"":ze,Je),Je);(function(){"use strict";var ve;function ze(e){return{lang:(e==null?void 0:e.lang)??(ve==null?void 0:ve.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(ve==null?void 0:ve.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(ve==null?void 0:ve.abortPipeEarly)}}var Je;function Js(e){return Je==null?void 0:Je.get(e)}var cr;function Zs(e){return cr==null?void 0:cr.get(e)}var dr;function Xs(e,t){var i;return(i=dr==null?void 0:dr.get(e))==null?void 0:i.get(t)}function zn(e){var i,r;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Le(e,t,i,r,n){let a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??zn(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:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",f=(n==null?void 0:n.message)??e.message??Xs(e.reference,l.lang)??(u?Zs(l.lang):null)??r.message??Js(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Se(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ze())}}}function Qs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function el(e,t){let i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function Un(e){return{kind:"transformation",type:"transform",reference:Un,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function tl(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function ur(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function Hn(){return{kind:"schema",type:"any",reference:Hn,expects:"any",async:!1,get"~standard"(){return Se(this)},"~run"(e){return e.typed=!0,e}}}function qn(e,t){return{kind:"schema",type:"array",reference:qn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Se(this)},"~run"(i,r){var a;let n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){let s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){let u={type:"array",origin:"value",input:n,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(u):f.path=[u],(a=i.issues)==null||a.push(f);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Le(this,"type",i,r);return i}}}function fr(e){return{kind:"schema",type:"boolean",reference:fr,expects:"boolean",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Le(this,"type",t,i),t}}}function _t(e,t){return{kind:"schema",type:"literal",reference:_t,expects:zn(e),async:!1,literal:e,message:t,get"~standard"(){return Se(this)},"~run"(i,r){return i.value===this.literal?i.typed=!0:Le(this,"type",i,r),i}}}function Wn(e){return{kind:"schema",type:"null",reference:Wn,expects:"null",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,i){return t.value===null?t.typed=!0:Le(this,"type",t,i),t}}}function Ii(e,t){return{kind:"schema",type:"nullable",reference:Ii,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Se(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Ai(e){return{kind:"schema",type:"number",reference:Ai,expects:"number",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Le(this,"type",t,i),t}}}function ne(e,t){return{kind:"schema",type:"object",reference:ne,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Se(this)},"~run"(i,r){var a;let n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.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]:ur(s),u=s["~run"]({value:l},r);if(u.issues){let f={type:"object",origin:"value",input:n,key:o,value:l};for(let d of u.issues)d.path?d.path.unshift(f):d.path=[f],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=tl(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Le(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Le(this,"type",i,r);return i}}}function Ce(e,t){return{kind:"schema",type:"optional",reference:Ce,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Se(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Kn(e,t,i){return{kind:"schema",type:"record",reference:Kn,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Se(this)},"~run"(r,n){var o,s;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let l in a)if(Qs(a,l)){let u=a[l],f=this.key["~run"]({value:l},n);if(f.issues){let h={type:"object",origin:"key",input:a,key:l,value:u};for(let g of f.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=f.issues),n.abortEarly){r.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 g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!f.typed||!d.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=d.value)}}else Le(this,"type",r,n);return r}}}function De(e){return{kind:"schema",type:"string",reference:De,expects:"string",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Le(this,"type",t,i),t}}}function Gn(e){let t;if(e)for(let i of e)t?t.push(...i.issues):t=i.issues;return t}function pr(e,t){return{kind:"schema",type:"union",reference:pr,expects:el(e.map(i=>i.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Se(this)},"~run"(i,r){let n,a,o;for(let s of this.options){let l=s["~run"]({value:i.value},r);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];Le(this,"type",i,r,{issues:Gn(a)}),i.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Le(this,"type",i,r,{issues:Gn(o)})}return i}}}function ii(){return{kind:"schema",type:"unknown",reference:ii,expects:"unknown",async:!1,get"~standard"(){return Se(this)},"~run"(e){return e.typed=!0,e}}}function il(...e){return{...e[0],pipe:e,get"~standard"(){return Se(this)},"~run"(t,i){for(let r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Ti(e,t,i){let r=e["~run"]({value:t},ze(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var rl=e=>({ok:!0,err:!1,val:e}),nl=e=>({err:!0,ok:!1,val:e}),hr=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function gr(e,t,i){var o,s;let r=e.find(l=>l.type==="pre-apply-result");if(!r)return;let n=(o=t[r.data.participationKey])==null?void 0:o.value,a={};if(n===!0)for(let l of hr(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:r.id,flow_session_id:i,participation:n,answers:a}}function al(e,t){let i=gr(e,t,""),r=hr(e).map(a=>{let o=a.data.preApply,s=i==null?void 0:i.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=(i==null?void 0:i.participation)===!1?"skipped":(i==null?void 0:i.participation)===!0&&r.length>0&&r.every(a=>a.valid)?"completed":"unavailable";return{status:n,hasHardConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="advisory"):null,answers:n==="completed"?r:[]}}function ol(e,t){let i=new Set(hr(e).map(r=>r.data.key));for(let r of e)r.type==="pre-apply-result"&&(i.add(r.data.key),i.add(r.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([r])=>!i.has(r)))}var st=class extends Error{constructor(){super("Aborted")}},ri=(e,t)=>{if(t.length===0)return;let i=e;for(let r of t){if(i==null||typeof i!="object")return;i=i[r]}return i},sl=(e,t="all")=>{let i={},r=t==="all"?null:new Set(t);for(let n in e){let a=e[n];a&&(r&&!r.has(n)||(i[n]=a.value))}return i},Yn=(e,t)=>{let i=new Set(e.flatMap(r=>r.type==="add-submission"?[r.data.key]:[]));return Object.entries(t).some(([r,n])=>n!==void 0&&n.type!=="integration"&&!i.has(r))},ll=({key:e,submissions:t})=>{var r;let i=(r=t[e])==null?void 0:r.value;if(typeof i!="string"&&typeof i!="number")throw new Error(`Submission at “${e}” is not a string or number`);return i},Jn=({key:e,path:t,submissions:i,context:r})=>{if(e==="$context"){if(!t)return;let n=ri(r,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 i[e]},cl=e=>{let t=e.split(".").pop();return t?rl(t?"."+t:""):nl("No file extension found")},Zn=(e,t)=>{if(t.length===0)return!0;let i=t.map(r=>r.toLowerCase());return e.every(r=>{let n=cl(r.name);return n.ok&&i.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`,Fi=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,dl=ne({integration_response:ne({data:ne({redirect_url:De(),message:Ce(Ii(De())),button_text:Ce(Ii(De()))})})}),br=e=>Ti(dl,e).success,ul=ne({integration_response:ne({status:Ce(ii()),error:ne({message:De(),data:Ce(ii())})})}),Xn=e=>Ti(ul,e).success,fl=ne({success:_t(!0),integration_response:ne({data:ne({outcome:_t("pending"),message:Ce(ii())}),error:Ce(Wn())})}),vr=e=>{let t=Ti(fl,e);if(!t.success||br(e))return;let{message:i}=t.output.integration_response.data;return typeof i=="string"&&i.trim()?{message:i}:{}};ne({success:_t(!1),message:Ce(ii())});var pl=ne({error:_t("Validation failed"),messages:ne({})}),hl=(e,t)=>t===422&&Ti(pl,e).success,Qn=(e,t)=>{if(!Xn(e))return;let i=e.integration_response,r=i.error.data,n=typeof r=="object"&&r!==null?r:{},a=w=>typeof n[w]=="string"?n[w]:void 0,o=w=>typeof n[w]=="boolean"?n[w]:void 0,s=w=>{let _=n[w];return Number.isSafeInteger(_)&&_>=0?_:void 0},l=w=>{let _=a(w),C=_===void 0?NaN:Date.parse(_);return Number.isFinite(C)?C:void 0},u=typeof i.status=="number"?i.status:t,f=a("phase"),d=a("verdict"),h=a("code"),g=u===409&&f==="submit"&&d==="confirmed"?"duplicate":u===410&&h==="job_closed"?"closed":f==="submit"&&d==="unknown"?"unknown":void 0;return{message:i.error.message,status:u,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:d,code:h,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:g}},ea=3e4,gl=2e4,bl=6e4,wr=12e4,ta=6*60*6e4,vl=60*6e4,ia=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,i=t===void 0?0:t-Date.now();return i>0&&i<=ta?t:void 0},wl=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=ia(e);return t===void 0?{}:{until:t}},ra=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),ml=(e,t)=>{let i=ia(t);if(i!==void 0)return{waitMs:i-Date.now(),throttles:(e??0)+1,maintenance:!0};if(!((t==null?void 0:t.reason)==="provider_maintenance"||(t==null?void 0:t.retryable)===!0&&(t.providerStatus===429||t.providerStatus!==void 0&&t.providerStatus>=500||t.phase==="workflow"&&t.verdict==="not_submitted")))return{waitMs:ea};let r=(e??0)+1,n=Math.min(r*gl,bl),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(n,a),wr),throttles:r}},na=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",yl=e=>{if(!Xn(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},_l=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",xl=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",kl=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,Sl=(e,t)=>{if(typeof e!="object"||e===null)return null;let i=e.integration_response;if(typeof i!="object"||i===null){if(t===void 0)return null;let l="code"in e&&typeof e.code=="string"?e.code:void 0;return{service:"API",response:{status:t,payload:l===void 0?{}:{code:l}}}}let r=i;if(typeof r.status!="number"||r.service!==void 0&&typeof r.service!="string")return null;let n="data"in r,a=r.error,o=typeof a=="object"&&a!==null&&typeof a.message=="string"&&"data"in a;if(!n&&!o)return null;let s=n?r.data:a.data??null;return{service:r.service??"INVALID_SERVICE",response:{status:r.status,payload:s},...vr(e)&&{outcome:"pending"}}},Cl=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isFinite(t.getTime())&&t.toISOString().slice(0,10)===e},$l=(e,t)=>{if(!Cl(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},El=e=>new Promise((t,i)=>{let r=new FileReader;r.onload=()=>{if(typeof r.result!="string"||!r.result)return i(new Error("Invalid file"));t(r.result)},r.onerror=i,r.readAsDataURL(e)}),Il=({context:e,schema:t,logger:i})=>{if(t)for(let r in t){let n=t[r];if(!n)continue;let a=ri(e,r.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${r} is required`;throw i.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${r} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${r} is not a string`);break;default:n.type}}};let Ze;function aa(e){return{lang:(e==null?void 0:e.lang)??(Ze==null?void 0:Ze.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ze==null?void 0:Ze.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ze==null?void 0:Ze.abortPipeEarly)}}let mr;function Al(e){return mr==null?void 0:mr.get(e)}let yr;function Tl(e){return yr==null?void 0:yr.get(e)}let _r;function Fl(e,t){var i;return(i=_r==null?void 0:_r.get(e))==null?void 0:i.get(t)}function oa(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Ue(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??oa(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:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",f=(n==null?void 0:n.message)??e.message??Fl(e.reference,l.lang)??(u?Tl(l.lang):null)??r.message??Al(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Ne(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},aa())}}}function Dl(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Nl(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function xr(e,t){return{kind:"validation",type:"max_length",reference:xr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Di(e,t){return{kind:"validation",type:"min_length",reference:Di,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function kr(){return{kind:"transformation",type:"trim",reference:kr,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Ml(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function Ni(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function sa(e,t){return{kind:"schema",type:"array",reference:sa,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ne(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(u):f.path=[u],(a=i.issues)==null||a.push(f);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Ue(this,"type",i,r);return i}}}function Sr(e){return{kind:"schema",type:"boolean",reference:Sr,expects:"boolean",async:!1,message:e,get"~standard"(){return Ne(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Ue(this,"type",t,i),t}}}function Y(e,t){return{kind:"schema",type:"nullable",reference:Y,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ne(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=Ni(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function ni(e,t){return{kind:"schema",type:"nullish",reference:ni,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ne(this)},"~run"(i,r){return(i.value===null||i.value===void 0)&&(this.default!==void 0&&(i.value=Ni(this,i,r)),i.value===null||i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function xt(e){return{kind:"schema",type:"number",reference:xt,expects:"number",async:!1,message:e,get"~standard"(){return Ne(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ue(this,"type",t,i),t}}}function Me(e,t){return{kind:"schema",type:"object",reference:Me,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ne(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.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]:Ni(s),u=s["~run"]({value:l},r);if(u.issues){const f={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(f):d.path=[f],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=Ml(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ue(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Ue(this,"type",i,r);return i}}}function la(e,t){return{kind:"schema",type:"optional",reference:la,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ne(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=Ni(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Mt(e,t){return{kind:"schema",type:"picklist",reference:Mt,expects:Nl(e.map(oa),"|"),async:!1,options:e,message:t,get"~standard"(){return Ne(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:Ue(this,"type",i,r),i}}}function Cr(e,t,i){return{kind:"schema",type:"record",reference:Cr,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Ne(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(Dl(a,l)){const u=a[l],f=this.key["~run"]({value:l},n);if(f.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of f.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=f.issues),n.abortEarly){r.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 g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!f.typed||!d.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=d.value)}}else Ue(this,"type",r,n);return r}}}function R(e){return{kind:"schema",type:"string",reference:R,expects:"string",async:!1,message:e,get"~standard"(){return Ne(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Ue(this,"type",t,i),t}}}function ca(){return{kind:"schema",type:"unknown",reference:ca,expects:"unknown",async:!1,get"~standard"(){return Ne(this)},"~run"(e){return e.typed=!0,e}}}function $r(...e){return{...e[0],pipe:e,get"~standard"(){return Ne(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Er(e,t,i){const r=e["~run"]({value:t},aa(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var Ll=e=>e,Vl={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Ol(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function ch(e){return e}var Pl=["agent","sdk","form","integration","migration"],Rl=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],jl=["screening","cv_match","interview","overall"],Bl=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],zl=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],da=Mt(Pl),Ul=Mt(Rl),Hl=$r(R(),kr(),Di(1),xr(100)),ql=Mt(jl),Wl=Mt(Bl),Kl=$r(R(),kr(),Di(1),xr(100)),Gl=Mt(zl),ua=Me({id:R(),email:Y(R()),firstName:Y(R()),lastName:Y(R()),phone:Y(R()),source:Y(da),identifiedAt:Y(R()),createdAt:R(),updatedAt:R()}),fa=$r(R(),Di(1)),Ir=Cr(R(),ca()),Yl=Me({id:R(),applicationId:R(),status:Wl,scheduledAt:Y(R()),completedAt:Y(R()),meta:Y(Ir),createdAt:R(),updatedAt:R()}),Jl=Me({score:xt(),reason:R(),confidence:xt()}),pa=Me({id:R(),candidateId:R(),jobId:xt(),stage:Hl,stageGroup:Ul,stageEnteredAt:R(),rating:Y(xt()),disqualifiedAt:Y(R()),disqualificationReason:Y(Kl),disqualificationNote:Y(R()),source:Gl,sourceDetail:Y(R()),sessionId:Y(xt()),externalApplicationId:Y(R()),meta:Y(Ir),context:Y(Ir),scoredAt:Y(R()),createdAt:R(),updatedAt:R()}),Zl=Me({id:R(),applicationId:R(),scoreType:ql,score:Y(xt()),reason:Y(R()),categories:Y(Cr(R(),Jl)),scoredBy:Y(R()),createdAt:R()});({...pa.entries},{...ua.entries});var Xl=Me({anonymousId:fa,email:fa,firstName:ni(R()),lastName:ni(R()),phone:ni(R()),source:ni(da)}),Ql=Me({candidateId:R(),isNew:Sr()}),ec=Me({id:R(),stageGroup:R(),createdAt:R()}),tc=Me({isDuplicate:Sr(),existingApplication:la(ec)}),ic=({environment:e,publishableKey:t,logger:i})=>{let r=Vl[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(`${r}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return i.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Er(tc,s);return l.success?l.output:(i.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 i.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return i.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=Er(Xl,a);if(!o.success)return i.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${r}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return i.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Er(Ql,await s.json());return l.success?l.output:(i.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return i.error("[TalentBankClient] identify failed:",a),null}}}},ha=il(pr([De(),Ai()]),Un(String)),ga=ne({id:ha,version:Ai(),build:Ai(),nodes:qn(Hn()),context_schema:Ce(Ii(Kn(De(),ne({required:fr(),type:pr([_t("string"),_t("number")])}))))}),rc=ne({flow:ga}),nc=ne({company:ne({name:De()}),flow:ga,job:ne({id:ha,title:De()}),user:Ce(ne({city:Ce(De()),country:Ce(De()),isEU:Ce(fr()),continent:Ce(De())}))}),ac=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),oc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Ol(),response:nc}},sc={pathname:"/flow/id/:id",method:"GET",schema:{response:rc}},ai,T,ba,va,kt,wa,ma,Ar,ya,Lt={},_a=[],lc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mi=Array.isArray;function Xe(e,t){for(var i in t)e[i]=t[i];return e}function xa(e){var t=e.parentNode;t&&t.removeChild(e)}function Ae(e,t,i){var r,n,a,o={};for(a in t)a=="key"?r=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?ai.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return oi(e,o,r,n,null)}function oi(e,t,i,r,n){var a={type:e,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++ba};return n==null&&T.vnode!=null&&T.vnode(a),a}function cc(){return{current:null}}function ae(e){return e.children}function Ve(e,t){this.props=e,this.context=t}function Li(e,t){if(t==null)return e.__?Li(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null)return i.__e;return typeof e.type=="function"?Li(e):null}function ka(e){var t,i;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null){e.__e=e.__c.base=i.__e;break}return ka(e)}}function Tr(e){(!e.__d&&(e.__d=!0)&&kt.push(e)&&!Vi.__r++||wa!==T.debounceRendering)&&((wa=T.debounceRendering)||ma)(Vi)}function Vi(){var e,t,i,r,n,a,o,s,l;for(kt.sort(Ar);e=kt.shift();)e.__d&&(t=kt.length,r=void 0,n=void 0,a=void 0,s=(o=(i=e).__v).__e,(l=i.__P)&&(r=[],n=[],(a=Xe({},o)).__v=o.__v+1,Fr(l,o,a,i.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s??Li(o),o.__h,n),Ta(r,o,n),o.__e!=s&&ka(o)),kt.length>t&&kt.sort(Ar));Vi.__r=0}function Sa(e,t,i,r,n,a,o,s,l,u,f){var d,h,g,w,_,C,S,v,k,$,I=0,M=r&&r.__k||_a,B=M.length,K=B,D=t.length;for(i.__k=[],d=0;d<D;d++)(w=i.__k[d]=(w=t[d])==null||typeof w=="boolean"||typeof w=="function"?null:typeof w=="string"||typeof w=="number"||typeof w=="bigint"?oi(null,w,null,null,w):Mi(w)?oi(ae,{children:w},null,null,null):w.__b>0?oi(w.type,w.props,w.key,w.ref?w.ref:null,w.__v):w)!=null&&(w.__=i,w.__b=i.__b+1,(v=dc(w,M,S=d+I,K))===-1?g=Lt:(g=M[v]||Lt,M[v]=void 0,K--),Fr(e,w,g,n,a,o,s,l,u,f),_=w.__e,(h=w.ref)&&g.ref!=h&&(g.ref&&Dr(g.ref,null,w),f.push(h,w.__c||_,w)),_!=null&&(C==null&&(C=_),$=!(k=g===Lt||g.__v===null)&&v===S,k?v==-1&&I--:v!==S&&(v===S+1?(I++,$=!0):v>S?K>D-S?(I+=v-S,$=!0):I--:I=v<S&&v==S-1?v-S:0),S=d+I,$=$||v==d&&!k,typeof w.type!="function"||v===S&&g.__k!==w.__k?typeof w.type=="function"||$?w.__d!==void 0?(l=w.__d,w.__d=void 0):l=_.nextSibling:l=$a(e,_,l):l=Ca(w,l,e),typeof i.type=="function"&&(i.__d=l)));for(i.__e=C,d=B;d--;)M[d]!=null&&(typeof i.type=="function"&&M[d].__e!=null&&M[d].__e==i.__d&&(i.__d=M[d].__e.nextSibling),Fa(M[d],M[d]))}function Ca(e,t,i){for(var r,n=e.__k,a=0;n&&a<n.length;a++)(r=n[a])&&(r.__=e,t=typeof r.type=="function"?Ca(r,t,i):$a(i,r.__e,t));return t}function Qe(e,t){return t=t||[],e==null||typeof e=="boolean"||(Mi(e)?e.some(function(i){Qe(i,t)}):t.push(e)),t}function $a(e,t,i){return i==null||i.parentNode!==e?e.insertBefore(t,null):t==i&&t.parentNode!=null||e.insertBefore(t,i),t.nextSibling}function dc(e,t,i,r){var n=e.key,a=e.type,o=i-1,s=i+1,l=t[i];if(l===null||l&&n==l.key&&a===l.type)return i;if(r>(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 uc(e,t,i,r,n){var a;for(a in i)a==="children"||a==="key"||a in t||Oi(e,a,null,i[a],r);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||i[a]===t[a]||Oi(e,a,t[a],i[a],r)}function Ea(e,t,i){t[0]==="-"?e.setProperty(t,i??""):e[t]=i==null?"":typeof i!="number"||lc.test(t)?i:i+"px"}function Oi(e,t,i,r,n){var a;e:if(t==="style")if(typeof i=="string")e.style.cssText=i;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)i&&t in i||Ea(e.style,t,"");if(i)for(t in i)r&&i[t]===r[t]||Ea(e.style,t,i[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]=i,i?r||e.addEventListener(t,a?Aa:Ia,a):e.removeEventListener(t,a?Aa:Ia,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]=i??"";break e}catch{}typeof i=="function"||(i==null||i===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,i))}}function Ia(e){return this.l[e.type+!1](T.event?T.event(e):e)}function Aa(e){return this.l[e.type+!0](T.event?T.event(e):e)}function Fr(e,t,i,r,n,a,o,s,l,u){var f,d,h,g,w,_,C,S,v,k,$,I,M,B,K,D=t.type;if(t.constructor!==void 0)return null;i.__h!=null&&(l=i.__h,s=t.__e=i.__e,t.__h=null,a=[s]),(f=T.__b)&&f(t);try{e:if(typeof D=="function"){if(S=t.props,v=(f=D.contextType)&&r[f.__c],k=f?v?v.props.value:f.__:r,i.__c?C=(d=t.__c=i.__c).__=d.__E:("prototype"in D&&D.prototype.render?t.__c=d=new D(S,k):(t.__c=d=new Ve(S,k),d.constructor=D,d.render=pc),v&&v.sub(d),d.props=S,d.state||(d.state={}),d.context=k,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),D.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Xe({},d.__s)),Xe(d.__s,D.getDerivedStateFromProps(S,d.__s))),g=d.props,w=d.state,d.__v=t,h)D.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(D.getDerivedStateFromProps==null&&S!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(S,k),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(S,d.__s,k)===!1||t.__v===i.__v)){for(t.__v!==i.__v&&(d.props=S,d.state=d.__s,d.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.forEach(function(P){P&&(P.__=t)}),$=0;$<d._sb.length;$++)d.__h.push(d._sb[$]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(S,d.__s,k),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,w,_)})}if(d.context=k,d.props=S,d.__P=e,d.__e=!1,I=T.__r,M=0,"prototype"in D&&D.prototype.render){for(d.state=d.__s,d.__d=!1,I&&I(t),f=d.render(d.props,d.state,d.context),B=0;B<d._sb.length;B++)d.__h.push(d._sb[B]);d._sb=[]}else do d.__d=!1,I&&I(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++M<25);d.state=d.__s,d.getChildContext!=null&&(r=Xe(Xe({},r),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(_=d.getSnapshotBeforeUpdate(g,w)),Sa(e,Mi(K=f!=null&&f.type===ae&&f.key==null?f.props.children:f)?K:[K],t,i,r,n,a,o,s,l,u),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),C&&(d.__E=d.__=null)}else a==null&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=fc(i.__e,t,i,r,n,a,o,l,u);(f=T.diffed)&&f(t)}catch(P){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),T.__e(P,t,i)}}function Ta(e,t,i){for(var r=0;r<i.length;r++)Dr(i[r],i[++r],i[++r]);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 fc(e,t,i,r,n,a,o,s,l){var u,f,d,h=i.props,g=t.props,w=t.type,_=0;if(w==="svg"&&(n=!0),a!=null){for(;_<a.length;_++)if((u=a[_])&&"setAttribute"in u==!!w&&(w?u.localName===w:u.nodeType===3)){e=u,a[_]=null;break}}if(e==null){if(w===null)return document.createTextNode(g);e=n?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,g.is&&g),a=null,s=!1}if(w===null)h===g||s&&e.data===g||(e.data=g);else{if(a=a&&ai.call(e.childNodes),f=(h=i.props||Lt).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},_=0;_<e.attributes.length;_++)h[e.attributes[_].name]=e.attributes[_].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(uc(e,g,h,n,s),d)t.__k=[];else if(Sa(e,Mi(_=t.props.children)?_:[_],t,i,r,n&&w!=="foreignObject",a,o,a?a[0]:i.__k&&Li(i,0),s,l),a!=null)for(_=a.length;_--;)a[_]!=null&&xa(a[_]);s||("value"in g&&(_=g.value)!==void 0&&(_!==e.value||w==="progress"&&!_||w==="option"&&_!==h.value)&&Oi(e,"value",_,h.value,!1),"checked"in g&&(_=g.checked)!==void 0&&_!==e.checked&&Oi(e,"checked",_,h.checked,!1))}return e}function Dr(e,t,i){try{typeof e=="function"?e(t):e.current=t}catch(r){T.__e(r,i)}}function Fa(e,t,i){var r,n;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Dr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){T.__e(a,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&Fa(r[n],t,i||typeof e.type!="function");i||e.__e==null||xa(e.__e),e.__=e.__e=e.__d=void 0}function pc(e,t,i){return this.constructor(e,i)}function St(e,t,i){var r,n,a,o;T.__&&T.__(e,t),n=(r=typeof i=="function")?null:i&&i.__k||t.__k,a=[],o=[],Fr(t,e=(!r&&i||t).__k=Ae(ae,null,[e]),n||Lt,Lt,t.ownerSVGElement!==void 0,!r&&i?[i]:n?null:t.firstChild?ai.call(t.childNodes):null,a,!r&&i?i:n?n.__e:t.firstChild,r,o),Ta(a,e,o)}function Da(e,t){St(e,t,Da)}function hc(e,t,i){var r,n,a,o,s=Xe({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?r=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?ai.call(arguments,2):i),oi(e.type,s,r||e.key,n||e.ref,null)}function Na(e,t){var i={__c:t="__cC"+ya++,__:e,Consumer:function(r,n){return r.children(n)},Provider:function(r){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,Tr(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)}}),r.children}};return i.Provider.__=i.Consumer.contextType=i}ai=_a.slice,T={__e:function(e,t,i,r){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,r||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},ba=0,va=function(e){return e!=null&&e.constructor===void 0},Ve.prototype.setState=function(e,t){var i;i=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xe({},this.state),typeof e=="function"&&(e=e(Xe({},i),this.props)),e&&Xe(i,e),e!=null&&this.__v&&(t&&this._sb.push(t),Tr(this))},Ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Tr(this))},Ve.prototype.render=ae,kt=[],ma=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(e,t){return e.__v.__b-t.__v.__b},Vi.__r=0,ya=0;function Ma(e){var t,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(i=Ma(e[t]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function et(){for(var e,t,i=0,r="",n=arguments.length;i<n;i++)(e=arguments[i])&&(t=Ma(e))&&(r&&(r+=" "),r+=t);return r}const La=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Va=et,Ct=(e,t)=>i=>{var r;if((t==null?void 0:t.variants)==null)return Va(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(u=>{const f=i==null?void 0:i[u],d=a==null?void 0:a[u];if(f===null)return null;const h=La(f)||La(d);return n[u][h]}),s=i&&Object.entries(i).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:h,...g}=f;return Object.entries(g).every(w=>{let[_,C]=w;return Array.isArray(C)?C.includes({...a,...s}[_]):{...a,...s}[_]===C})?[...u,d,h]:u},[]);return Va(e,o,l,i==null?void 0:i.class,i==null?void 0:i.className)};var lt,ee,Nr,Oa,Vt=0,Pa=[],Pi=[],Ra=T.__b,ja=T.__r,Ba=T.diffed,za=T.__c,Ua=T.unmount;function Ot(e,t){T.__h&&T.__h(ee,e,Vt||t),Vt=0;var i=ee.__H||(ee.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:Pi}),i.__[e]}function Oe(e){return Vt=1,Ha(Ka,e)}function Ha(e,t,i){var r=Ot(lt++,2);if(r.t=e,!r.__c&&(r.__=[i?i(t):Ka(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,s);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=ee,!ee.u)){var n=function(s,l,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!a||a.call(this,s,l,u);var d=!1;return f.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(d=!0)}}),!(!d&&r.__c.props===s)&&(!a||a.call(this,s,l,u))};ee.u=!0;var a=ee.shouldComponentUpdate,o=ee.componentWillUpdate;ee.componentWillUpdate=function(s,l,u){if(this.__e){var f=a;a=void 0,n(s,l,u),a=f}o&&o.call(this,s,l,u)},ee.shouldComponentUpdate=n}return r.__N||r.__}function Ri(e,t){var i=Ot(lt++,3);!T.__s&&Lr(i.__H,t)&&(i.__=e,i.i=t,ee.__H.__h.push(i))}function $e(e,t){var i=Ot(lt++,4);!T.__s&&Lr(i.__H,t)&&(i.__=e,i.i=t,ee.__h.push(i))}function we(e){return Vt=5,ct(function(){return{current:e}},[])}function gc(e,t,i){Vt=6,$e(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},i==null?i:i.concat(e))}function ct(e,t){var i=Ot(lt++,7);return Lr(i.__H,t)?(i.__V=e(),i.i=t,i.__h=e,i.__V):i.__}function bc(e,t){return Vt=8,ct(function(){return e},t)}function qa(e){var t=ee.context[e.__c],i=Ot(lt++,9);return i.c=e,t?(i.__==null&&(i.__=!0,t.sub(ee)),t.props.value):e.__}function vc(e,t){T.useDebugValue&&T.useDebugValue(t?t(e):e)}function wc(){var e=Ot(lt++,11);if(!e.__){for(var t=ee.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var i=t.__m||(t.__m=[0,0]);e.__="P"+i[0]+"-"+i[1]++}return e.__}function mc(){for(var e;e=Pa.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ji),e.__H.__h.forEach(Mr),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){ee=null,Ra&&Ra(e)},T.__r=function(e){ja&&ja(e),lt=0;var t=(ee=e.__c).__H;t&&(Nr===ee?(t.__h=[],ee.__h=[],t.__.forEach(function(i){i.__N&&(i.__=i.__N),i.__V=Pi,i.__N=i.i=void 0})):(t.__h.forEach(ji),t.__h.forEach(Mr),t.__h=[],lt=0)),Nr=ee},T.diffed=function(e){Ba&&Ba(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Pa.push(t)!==1&&Oa===T.requestAnimationFrame||((Oa=T.requestAnimationFrame)||yc)(mc)),t.__H.__.forEach(function(i){i.i&&(i.__H=i.i),i.__V!==Pi&&(i.__=i.__V),i.i=void 0,i.__V=Pi})),Nr=ee=null},T.__c=function(e,t){t.some(function(i){try{i.__h.forEach(ji),i.__h=i.__h.filter(function(r){return!r.__||Mr(r)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],T.__e(r,i.__v)}}),za&&za(e,t)},T.unmount=function(e){Ua&&Ua(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.forEach(function(r){try{ji(r)}catch(n){t=n}}),i.__H=void 0,t&&T.__e(t,i.__v))};var Wa=typeof requestAnimationFrame=="function";function yc(e){var t,i=function(){clearTimeout(r),Wa&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(i,100);Wa&&(t=requestAnimationFrame(i))}function ji(e){var t=ee,i=e.__c;typeof i=="function"&&(e.__c=void 0,i()),ee=t}function Mr(e){var t=ee;e.__c=e.__(),ee=t}function Lr(e,t){return!e||e.length!==t.length||t.some(function(i,r){return i!==e[r]})}function Ka(e,t){return typeof t=="function"?t(e):t}function Ga(e,t){for(var i in t)e[i]=t[i];return e}function Vr(e,t){for(var i in e)if(i!=="__source"&&!(i in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Or(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Pr(e){this.props=e}function _c(e,t){function i(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:Vr(this.props,n)}function r(n){return this.shouldComponentUpdate=i,Ae(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Pr.prototype=new Ve).isPureReactComponent=!0,Pr.prototype.shouldComponentUpdate=function(e,t){return Vr(this.props,e)||Vr(this.state,t)};var Ya=T.__b;T.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ya&&Ya(e)};var xc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(e){function t(i){var r=Ga({},i);return delete r.ref,e(r,i.ref||null)}return t.$$typeof=xc,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ja=function(e,t){return e==null?null:Qe(Qe(e).map(t))},kc={map:Ja,forEach:Ja,count:function(e){return e?Qe(e).length:0},only:function(e){var t=Qe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Qe},Sc=T.__e;T.__e=function(e,t,i,r){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=i.__e,t.__k=i.__k),n.__c(e,t)}Sc(e,t,i,r)};var Za=T.unmount;function Xa(e,t,i){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Ga({},e)).__c!=null&&(e.__c.__P===i&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Xa(r,t,i)})),e}function Qa(e,t,i){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Qa(r,t,i)}),e.__c&&e.__c.__P===t&&(e.__e&&i.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=i)),e}function si(){this.__u=0,this.t=null,this.__b=null}function eo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function to(e){var t,i,r;function n(a){if(t||(t=e()).then(function(o){i=o.default||o},function(o){r=o}),r)throw r;if(!i)throw t;return Ae(i,a)}return n.displayName="Lazy",n.__f=!0,n}function li(){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),Za&&Za(e)},(si.prototype=new Ve).__c=function(e,t){var i=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(i);var n=eo(r.__v),a=!1,o=function(){a||(a=!0,i.__R=null,n?n(s):s())};i.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Qa(u,u.__c.__P,u.__c.__O)}var f;for(r.setState({__a:r.__b=null});f=r.t.pop();)f.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},si.prototype.componentWillUnmount=function(){this.t=[]},si.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Xa(this.__b,i,r.__O=r.__P)}this.__b=null}var n=t.__a&&Ae(ae,null,e.fallback);return n&&(n.__h=null),[Ae(ae,null,t.__a?null:e.children),n]};var io=function(e,t,i){if(++i[1]===i[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(i=e.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;e.u=i=i[2]}};function Cc(e){return this.getChildContext=function(){return e.context},e.children}function $c(e){var t=this,i=e.i;t.componentWillUnmount=function(){St(null,t.l),t.l=null,t.i=null},t.i&&t.i!==i&&t.componentWillUnmount(),e.__v?(t.l||(t.i=i,t.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,n){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),St(Ae(Cc,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ec(e,t){var i=Ae($c,{__v:e,i:t});return i.containerInfo=t,i}(li.prototype=new Ve).__a=function(e){var t=this,i=eo(t.__v),r=t.o.get(e);return r[0]++,function(n){var a=function(){t.props.revealOrder?(r.push(n),io(t,e,r)):n()};i?i(a):a()}},li.prototype.render=function(e){this.u=null,this.o=new Map;var t=Qe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var i=t.length;i--;)this.o.set(t[i],this.u=[1,0,this.u]);return e.children},li.prototype.componentDidUpdate=li.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,i){io(e,i,t)})};var ro=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ic=/^(?: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]/,Ac=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Tc=/[A-Z0-9]/g,Fc=typeof document<"u",Dc=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Nc(e,t,i){return t.__k==null&&(t.textContent=""),St(e,t),typeof i=="function"&&i(),e?e.__c:null}function Mc(e,t,i){return Da(e,t),typeof i=="function"&&i(),e?e.__c:null}Ve.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ve.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var no=T.event;function Lc(){}function Vc(){return this.cancelBubble}function Oc(){return this.defaultPrevented}T.event=function(e){return no&&(e=no(e)),e.persist=Lc,e.isPropagationStopped=Vc,e.isDefaultPrevented=Oc,e.nativeEvent=e};var jr,Pc={enumerable:!1,configurable:!0,get:function(){return this.class}},ao=T.vnode;T.vnode=function(e){typeof e.type=="string"&&function(t){var i=t.props,r=t.type,n={};for(var a in i){var o=i[a];if(!(a==="value"&&"defaultValue"in i&&o==null||Fc&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in i&&i.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||r!=="input"&&r!=="textarea"||Dc(i.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Ac.test(a)?a=s:r.indexOf("-")===-1&&Ic.test(a)?a=a.replace(Tc,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}r=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),r=="select"&&n.defaultValue!=null&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),i.class&&!i.className?(n.class=i.class,Object.defineProperty(n,"className",Pc)):(i.className&&!i.class||i.class&&i.className)&&(n.class=n.className=i.className),t.props=n}(e),e.$$typeof=ro,ao&&ao(e)};var oo=T.__r;T.__r=function(e){oo&&oo(e),jr=e.__c};var so=T.diffed;T.diffed=function(e){so&&so(e);var t=e.props,i=e.__e;i!=null&&e.type==="textarea"&&"value"in t&&t.value!==i.value&&(i.value=t.value==null?"":t.value),jr=null};var Rc={ReactCurrentDispatcher:{current:{readContext:function(e){return jr.__n[e.__c].props.value}}}};function jc(e){return Ae.bind(null,e)}function lo(e){return!!e&&e.$$typeof===ro}function Bc(e){return lo(e)?hc.apply(null,arguments):e}function zc(e){return!!e.__k&&(St(null,e),!0)}function Uc(e){return e&&(e.base||e.nodeType===1&&e)||null}var Hc=function(e,t){return e(t)},qc=function(e,t){return e(t)},Wc=ae;function co(e){e()}function Kc(e){return e}function Gc(){return[!1,co]}var Yc=$e;function Jc(e,t){var i=t(),r=Oe({h:{__:i,v:t}}),n=r[0].h,a=r[1];return $e(function(){n.__=i,n.v=t,Or(n.__,t())||a({h:n})},[e,i,t]),Ri(function(){return Or(n.__,n.v())||a({h:n}),e(function(){Or(n.__,n.v())||a({h:n})})},[e]),i}var me={useState:Oe,useId:wc,useReducer:Ha,useEffect:Ri,useLayoutEffect:$e,useInsertionEffect:Yc,useTransition:Gc,useDeferredValue:Kc,useSyncExternalStore:Jc,startTransition:co,useRef:we,useImperativeHandle:gc,useMemo:ct,useCallback:bc,useContext:qa,useDebugValue:vc,version:"17.0.2",Children:kc,render:Nc,hydrate:Mc,unmountComponentAtNode:zc,createPortal:Ec,createElement:Ae,createContext:Na,createFactory:jc,cloneElement:Bc,createRef:cc,Fragment:ae,isValidElement:lo,findDOMNode:Uc,Component:Ve,PureComponent:Pr,memo:_c,forwardRef:Rr,flushSync:qc,unstable_batchedUpdates:Hc,StrictMode:Wc,Suspense:si,SuspenseList:li,lazy:to,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Rc};const ye=Symbol.for("@ts-pattern/matcher"),uo=Symbol.for("@ts-pattern/isVariadic"),Bi="@ts-pattern/anonymous-select-key",Br=e=>!!(e&&typeof e=="object"),zi=e=>e&&!!e[ye],oe=(e,t,i)=>{if(zi(e)){const r=e[ye](),{matched:n,selections:a}=r.match(t);return n&&a&&Object.keys(a).forEach(o=>i(o,a[o])),n}if(Br(e)){if(!Br(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],n=[],a=[];for(const o of e.keys()){const s=e[o];zi(s)&&s[uo]?a.push(s):a.length?n.push(s):r.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<r.length+n.length)return!1;const o=t.slice(0,r.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(r.length,n.length===0?1/0:-n.length);return r.every((u,f)=>oe(u,o[f],i))&&n.every((u,f)=>oe(u,s[f],i))&&(a.length===0||oe(a[0],l,i))}return e.length===t.length&&e.every((o,s)=>oe(o,t[s],i))}return Reflect.ownKeys(e).every(r=>{const n=e[r];return(r in t||zi(a=n)&&a[ye]().matcherType==="optional")&&oe(n,t[r],i);var a})}return Object.is(t,e)},_e=e=>{var t,i,r;return Br(e)?zi(e)?(t=(i=(r=e[ye]()).getSelectionKeys)==null?void 0:i.call(r))!=null?t:[]:Array.isArray(e)?ci(e,_e):ci(Object.values(e),_e):[]},ci=(e,t)=>e.reduce((i,r)=>i.concat(t(r)),[]);function Zc(...e){if(e.length===1){const[t]=e;return i=>oe(t,i,()=>{})}if(e.length===2){const[t,i]=e;return oe(t,i,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function de(e){return Object.assign(e,{optional:()=>Ur(e),and:t=>te(e,t),or:t=>fo(e,t),select:t=>t===void 0?di(e):di(t,e)})}function zr(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let i=0;const r=[{value:Object.assign(t,{[uo]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=r[i++])!=null?n:r.at(-1)}}}}))(e),{optional:()=>zr(Ur(e)),select:t=>zr(t===void 0?di(e):di(t,e))})}function Ur(e){return de({[ye]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return t===void 0?(_e(e).forEach(n=>r(n,void 0)),{matched:!0,selections:i}):{matched:oe(e,t,r),selections:i}},getSelectionKeys:()=>_e(e),matcherType:"optional"})})}const Xc=(e,t)=>{for(const i of e)if(!t(i))return!1;return!0},Qc=(e,t)=>{for(const[i,r]of e.entries())if(!t(r,i))return!1;return!0},ed=(e,t)=>{const i=Reflect.ownKeys(e);for(const r of i)if(!t(r,e[r]))return!1;return!0};function te(...e){return de({[ye]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return{matched:e.every(n=>oe(n,t,r)),selections:i}},getSelectionKeys:()=>ci(e,_e),matcherType:"and"})})}function fo(...e){return de({[ye]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return ci(e,_e).forEach(n=>r(n,void 0)),{matched:e.some(n=>oe(n,t,r)),selections:i}},getSelectionKeys:()=>ci(e,_e),matcherType:"or"})})}function z(e){return{[ye]:()=>({match:t=>({matched:!!e(t)})})}}function di(...e){const t=typeof e[0]=="string"?e[0]:void 0,i=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return de({[ye]:()=>({match:r=>{let n={[t??Bi]:r};return{matched:i===void 0||oe(i,r,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??Bi].concat(i===void 0?[]:_e(i))})})}function po(e){return!0}function He(e){return typeof e=="number"}function dt(e){return typeof e=="string"}function ut(e){return typeof e=="bigint"}const ho=de(z(po)),td=de(z(po)),id=ho,ft=e=>Object.assign(de(e),{startsWith:t=>{return ft(te(e,(i=t,z(r=>dt(r)&&r.startsWith(i)))));var i},endsWith:t=>{return ft(te(e,(i=t,z(r=>dt(r)&&r.endsWith(i)))));var i},minLength:t=>ft(te(e,(i=>z(r=>dt(r)&&r.length>=i))(t))),length:t=>ft(te(e,(i=>z(r=>dt(r)&&r.length===i))(t))),maxLength:t=>ft(te(e,(i=>z(r=>dt(r)&&r.length<=i))(t))),includes:t=>{return ft(te(e,(i=t,z(r=>dt(r)&&r.includes(i)))));var i},regex:t=>{return ft(te(e,(i=t,z(r=>dt(r)&&!!r.match(i)))));var i}}),go=ft(z(dt)),qe=e=>Object.assign(de(e),{between:(t,i)=>qe(te(e,((r,n)=>z(a=>He(a)&&r<=a&&n>=a))(t,i))),lt:t=>qe(te(e,(i=>z(r=>He(r)&&r<i))(t))),gt:t=>qe(te(e,(i=>z(r=>He(r)&&r>i))(t))),lte:t=>qe(te(e,(i=>z(r=>He(r)&&r<=i))(t))),gte:t=>qe(te(e,(i=>z(r=>He(r)&&r>=i))(t))),int:()=>qe(te(e,z(t=>He(t)&&Number.isInteger(t)))),finite:()=>qe(te(e,z(t=>He(t)&&Number.isFinite(t)))),positive:()=>qe(te(e,z(t=>He(t)&&t>0))),negative:()=>qe(te(e,z(t=>He(t)&&t<0)))}),rd=qe(z(He)),pt=e=>Object.assign(de(e),{between:(t,i)=>pt(te(e,((r,n)=>z(a=>ut(a)&&r<=a&&n>=a))(t,i))),lt:t=>pt(te(e,(i=>z(r=>ut(r)&&r<i))(t))),gt:t=>pt(te(e,(i=>z(r=>ut(r)&&r>i))(t))),lte:t=>pt(te(e,(i=>z(r=>ut(r)&&r<=i))(t))),gte:t=>pt(te(e,(i=>z(r=>ut(r)&&r>=i))(t))),positive:()=>pt(te(e,z(t=>ut(t)&&t>0))),negative:()=>pt(te(e,z(t=>ut(t)&&t<0)))}),nd=pt(z(ut)),ad=de(z(function(e){return typeof e=="boolean"})),od=de(z(function(e){return typeof e=="symbol"})),sd=de(z(function(e){return e==null})),ld=de(z(function(e){return e!=null}));var ui={__proto__:null,matcher:ye,optional:Ur,array:function(...e){return zr({[ye]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const i=e[0];let r={};if(t.length===0)return _e(i).forEach(a=>{r[a]=[]}),{matched:!0,selections:r};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])};return{matched:t.every(a=>oe(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:_e(e[0])})})},set:function(...e){return de({[ye]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};if(e.length===0)return{matched:!0};const r=(a,o)=>{i[a]=(i[a]||[]).concat([o])},n=e[0];return{matched:Xc(t,a=>oe(n,a,r)),selections:i}},getSelectionKeys:()=>e.length===0?[]:_e(e[0])})})},map:function(...e){return de({[ye]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};const r=(s,l)=>{i[s]=(i[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:Qc(t,(s,l)=>{const u=oe(a,l,r),f=oe(o,s,r);return u&&f}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[..._e(e[0]),..._e(e[1])]})})},record:function(...e){return de({[ye]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var i;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);let r={};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])},[a,o]=e.length===1?[go,e[0]]:e;return{matched:ed(t,(s,l)=>{const u=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=u!==null&&oe(a,u,n),d=oe(a,s,n),h=oe(o,l,n);return(d||f)&&h}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[..._e(e[0]),..._e(e[1])]})})},intersection:te,union:fo,not:function(e){return de({[ye]:()=>({match:t=>({matched:!oe(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:z,select:di,any:ho,unknown:td,_:id,string:go,number:rd,bigint:nd,boolean:ad,symbol:od,nullish:sd,nonNullable:ld,instanceOf:function(e){return de(z(function(t){return i=>i instanceof t}(e)))},shape:function(e){return de(z(Zc(e)))}};class cd extends Error{constructor(t){let i;try{i=JSON.stringify(t)}catch{i=t}super(`Pattern matching error: no pattern matches value ${i}`),this.input=void 0,this.input=t}}const Hr={matched:!1,value:void 0};function Ui(e){return new dd(e,Hr)}let dd=class Bn{constructor(t,i){this.input=void 0,this.state=void 0,this.input=t,this.state=i}with(...t){if(this.state.matched)return this;const i=t[t.length-1],r=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(u,f)=>{a=!0,o[u]=f},l=!r.some(u=>oe(u,this.input,s))||n&&!n(this.input)?Hr:{matched:!0,value:i(a?Bi in o?o[Bi]:o:this.input,this.input)};return new Bn(this.input,l)}when(t,i){if(this.state.matched)return this;const r=!!t(this.input);return new Bn(this.input,r?{matched:!0,value:i(this.input,this.input)}:Hr)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=ud){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function ud(e){throw new cd(e)}var fd=["other","few","many","two","one","zero"],bo=({terms:e,overrides:t,locale:i})=>{const r=new Intl.PluralRules(i);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 f;return((f=o==null?void 0:o[u])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=r.select(o.count);if(!(l in s)){const u=fd.find(f=>f in s);if(!u)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=u}return s[l].replace(/{{(\w+)}}/g,(u,f)=>{var d;return((d=o==null?void 0:o[f])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return n},pd=0;function c(e,t,i,r,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:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--pd,__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(u),u}var vo=Na(null),wo=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:i,locale:r})=>{const n=ct(()=>bo({locale:r,terms:e,overrides:t}),[t,r]);return c(vo.Provider,{value:{t:n,locale:r},children:i})},useTranslation:()=>{const t=qa(vo);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:i})=>bo({terms:e,overrides:t,locale:i})}),hd={conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_duplicate_earlier_attempt:"You've already applied for this role. If that doesn't sound right, it's most likely a hiccup from your earlier attempt — don't worry, we have your application.",submission_failed:"We couldn't submit your application. Choose Restart to try again.",submission_unknown_do_not_resubmit:"We couldn't confirm whether your application went through, and submitting it again won't help. Please don't keep resubmitting — check your email for a confirmation, or contact the employer if nothing arrives.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",submission_cooldown:{one:"Submit will be available again in {{count}} second.",other:"Submit will be available again in {{count}} seconds."},submission_cooldown_ready:"Submit is available again.",captcha_check:"One quick check before we send your application",submission_still_working:"Sending your application, this can take up to a minute. Please keep this page open.",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.",restart:"Restart",chat_messages:"Chat messages",file_name:"File name",file_size:"File size",file_total_size:"{{size}} total",loading:"Loading",minimize:"Minimise"},{TranslationProvider:dh,useTranslation:uh,createTFunction:fh,defaultTerms:gd}=wo({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_pending:"Thanks, we've received your application and are processing it.",submission_failed:"Failed to submit",submission_provider_maintenance:"Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_provider_maintenance_later:"Sorry, our recruitment system is down for scheduled maintenance until later today. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_available_at:"Submit will be available again at {{time}}.",resume_prompt:"You have an unfinished application for this role. Continue where you left off?",resume_continue:"Continue",resume_start_again:"Start again",captcha_failed:"Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.",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_whole:"Enter a whole number",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_file_empty:"This file is empty. If it’s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.",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:bd,useTranslation:se,createTFunction:ph}=wo({...gd,...hd,error_heading:"Something unexpected happened",undo:"Change answer",submission_closed:"This role is no longer accepting applications.",submission_duplicate:"You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.",submission_retryable:"We couldn't submit your application. Please 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.",maximize:"Maximise",file_more:{one:"+{{count}} file",other:"+{{count}} files"}}),hh="";function tt(e,t){if(!e)throw new Error(t)}var qr=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(qr):Object.keys(e).sort().reduce((t,i)=>(t[i]=qr(e[i]),t),{}),vd=e=>{let t=JSON.stringify(qr(e)),i=5381;for(let r=0;r<t.length;r++)i=i*33^t.charCodeAt(r);return(i>>>0).toString(36)},wd=Symbol.for("preact-signals");function Wr(){if(Pt>1)Pt--;else{for(var e,t=!1;fi!==void 0;){var i=fi;for(fi=void 0,Kr++;i!==void 0;){var r=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&yo(i))try{i.c()}catch(n){t||(e=n,t=!0)}i=r}}if(Kr=0,Pt--,t)throw e}}var J=void 0,fi=void 0,Pt=0,Kr=0,Hi=0;function mo(e){if(J!==void 0){var t=e.n;if(t===void 0||t.t!==J)return t={i:0,S:e,p:J.s,n:void 0,t:J,e:void 0,x:void 0,r:t},J.s!==void 0&&(J.s.n=t),J.s=t,e.n=t,32&J.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=J.s,t.n=void 0,J.s.n=t,J.s=t),t}}function he(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}he.prototype.brand=wd,he.prototype.h=function(){return!0},he.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)},he.prototype.U=function(e){if(this.t!==void 0){var t=e.e,i=e.x;t!==void 0&&(t.x=i,e.e=void 0),i!==void 0&&(i.e=t,e.x=void 0),e===this.t&&(this.t=i)}},he.prototype.subscribe=function(e){var t=this;return Yr(function(){var i=t.value,r=J;J=void 0;try{e(i)}finally{J=r}})},he.prototype.valueOf=function(){return this.value},he.prototype.toString=function(){return this.value+""},he.prototype.toJSON=function(){return this.value},he.prototype.peek=function(){var e=J;J=void 0;try{return this.value}finally{J=e}},Object.defineProperty(he.prototype,"value",{get:function(){var e=mo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Kr>100)throw new Error("Cycle detected");this.v=e,this.i++,Hi++,Pt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Wr()}}}});function Pe(e){return new he(e)}function yo(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 _o(e){for(var t=e.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function xo(e){for(var t=e.s,i=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=i}function Rt(e){he.call(this,void 0),this.x=e,this.s=void 0,this.g=Hi-1,this.f=4}(Rt.prototype=new he).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Hi))return!0;if(this.g=Hi,this.f|=1,this.i>0&&!yo(this))return this.f&=-2,!0;var e=J;try{_o(this),J=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return J=e,xo(this),this.f&=-2,!0},Rt.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)}he.prototype.S.call(this,e)},Rt.prototype.U=function(e){if(this.t!==void 0&&(he.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)}},Rt.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(Rt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=mo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function md(e){return new Rt(e)}function ko(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Pt++;var i=J;J=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Gr(e),r}finally{J=i,Wr()}}}function Gr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ko(e)}function yd(e){if(J!==this)throw new Error("Out-of-order effect");xo(this),J=e,this.f&=-2,8&this.f&&Gr(this),Wr()}function pi(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}pi.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()}},pi.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ko(this),_o(this),Pt++;var e=J;return J=this,yd.bind(this,e)},pi.prototype.N=function(){2&this.f||(this.f|=2,this.o=fi,fi=this)},pi.prototype.d=function(){this.f|=8,1&this.f||Gr(this)};function Yr(e){var t=new pi(e);try{t.c()}catch(i){throw t.d(),i}return t.d.bind(t)}var Jr;function jt(e,t){T[e]=t.bind(null,T[e]||function(){})}function qi(e){Jr&&Jr(),Jr=e&&e.S()}function So(e){var t=this,i=e.data,r=xd(i);r.value=i;var n=ct(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!va(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},md(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}So.displayName="_st",Object.defineProperties(he.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:So},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),jt("__b",function(e,t){if(typeof t.type=="string"){var i,r=t.props;for(var n in r)if(n!=="children"){var a=r[n];a instanceof he&&(i||(t.__np=i={}),i[n]=a,r[n]=a.peek())}}e(t)}),jt("__r",function(e,t){qi();var i,r=t.__c;r&&(r.__$f&=-2,(i=r.__$u)===void 0&&(r.__$u=i=function(n){var a;return Yr(function(){a=this}),a.c=function(){r.__$f|=1,r.setState({})},a}())),qi(i),e(t)}),jt("__e",function(e,t,i,r){qi(),e(t,i,r)}),jt("diffed",function(e,t){qi();var i;if(typeof t.type=="string"&&(i=t.__e)){var r=t.__np,n=t.props;if(r){var a=i.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in r)&&(s.d(),a[o]=void 0)}else i.U=a={};for(var l in r){var u=a[l],f=r[l];u===void 0?(u=_d(i,l,f,n),a[l]=u):u.o(f,n)}}}e(t)});function _d(e,t,i,r){var n=t in e&&e.ownerSVGElement===void 0,a=Pe(i);return{o:function(o,s){a.value=o,r=s},d:Yr(function(){var o=a.value.value;r[t]!==o&&(r[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}jt("unmount",function(e,t){if(typeof t.type=="string"){var i=t.__e;if(i){var r=i.U;if(r){i.U=void 0;for(var n in r){var a=r[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),jt("__h",function(e,t,i,r){(r<3||r===9)&&(t.__$f|=2),e(t,i,r)}),Ve.prototype.shouldComponentUpdate=function(e,t){var i=this.__$u;if(!(i&&i.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r 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 xd(e){return ct(function(){return Pe(e)},[])}const Zr=(e,t)=>t.some(i=>e instanceof i);let Co,$o;function kd(){return Co||(Co=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Sd(){return $o||($o=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Xr=new WeakMap,Qr=new WeakMap,Wi=new WeakMap;function Cd(e){const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{i($t(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return Wi.set(t,e),t}function $d(e){if(Xr.has(e))return;const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{i(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Xr.set(e,t)}let en={get(e,t,i){if(e instanceof IDBTransaction){if(t==="done")return Xr.get(e);if(t==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return $t(e[t])},set(e,t,i){return e[t]=i,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Eo(e){en=e(en)}function Ed(e){return Sd().includes(e)?function(...t){return e.apply(tn(this),t),$t(this.request)}:function(...t){return $t(e.apply(tn(this),t))}}function Id(e){return typeof e=="function"?Ed(e):(e instanceof IDBTransaction&&$d(e),Zr(e,kd())?new Proxy(e,en):e)}function $t(e){if(e instanceof IDBRequest)return Cd(e);if(Qr.has(e))return Qr.get(e);const t=Id(e);return t!==e&&(Qr.set(e,t),Wi.set(t,e)),t}const tn=e=>Wi.get(e);function Ad(e,t,{blocked:i,upgrade:r,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=$t(o);return r&&o.addEventListener("upgradeneeded",l=>{r($t(o.result),l.oldVersion,l.newVersion,$t(o.transaction),l)}),i&&o.addEventListener("blocked",l=>i(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 Td=["get","getKey","getAll","getAllKeys","count"],Fd=["put","add","delete","clear"],rn=new Map;function Io(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(rn.get(t))return rn.get(t);const i=t.replace(/FromIndex$/,""),r=t!==i,n=Fd.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!(n||Td.includes(i)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(s.shift())),(await Promise.all([u[i](...s),n&&l.done]))[0]};return rn.set(t,a),a}Eo(e=>({...e,get:(t,i,r)=>Io(t,i)||e.get(t,i,r),has:(t,i)=>!!Io(t,i)||e.has(t,i)}));const Dd=["continue","continuePrimaryKey","advance"],Ao={},nn=new WeakMap,To=new WeakMap,Nd={get(e,t){if(!Dd.includes(t))return e[t];let i=Ao[t];return i||(i=Ao[t]=function(...r){nn.set(this,To.get(this)[t](...r))}),i}};async function*Md(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const i=new Proxy(t,Nd);for(To.set(i,t),Wi.set(i,tn(t));t;)yield i,t=await(nn.get(i)||t.continue()),nn.delete(i)}function Fo(e,t){return t===Symbol.asyncIterator&&Zr(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Zr(e,[IDBIndex,IDBObjectStore])}Eo(e=>({...e,get(t,i,r){return Fo(t,i)?Md:e.get(t,i,r)},has(t,i){return Fo(t,i)||e.has(t,i)}}));const hi=typeof indexedDB>"u"?void 0:Ad("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Ld=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:i,...r}=t;return r})});let Ki,an,gi;const Do=()=>{if(!Ki)return gi;const e=Ki;Ki=void 0;const t=Yi(e),i=hi==null?void 0:hi.then(r=>r.put("state",Ld(e.data),t)).finally(()=>{gi===i&&(gi=void 0)});return gi=i,gi},Te={getStateData:async(e,t,i)=>{var n;const r=Yi({...e,flowKeys:t,context:i});return(n=await hi)==null?void 0:n.get("state",r)},getAllStateData:async()=>{var e;return((e=await hi)==null?void 0:e.getAll("state"))??[]},setStateData:e=>{Ki=e,clearTimeout(an),an=setTimeout(()=>void Do(),1e3)},flushStateData:()=>(clearTimeout(an),Do()??Promise.resolve())},Bt=e=>t=>t?t.type===e:!1,Vd=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),No=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Vd()}),Od=e=>Ui(e).with({nativeEvent:{submitter:ui.select(ui.union(ui.instanceOf(HTMLButtonElement),ui.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Gi=(e,t,i,r=0)=>{if(!t.nextId)return i(t.id,{stepsMade:r,remainingSteps:0}),{stepsMade:r,remainingSteps:0};const n=e.find(u=>u.id===t.nextId);if(n===void 0)return{stepsMade:r,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(Gi(e,n,i,r+s).remainingSteps,Gi(e,o,i,r+s).remainingSteps);return i(t.id,{stepsMade:r,remainingSteps:u}),{stepsMade:r,remainingSteps:u}}const l=s+Gi(e,n,i,r+s).remainingSteps;return i(t.id,{stepsMade:r,remainingSteps:l}),{stepsMade:r,remainingSteps:l}},Pd=e=>{const t={},i=e.find(r=>r.isHead);return i&&Gi(e,i,(r,n)=>{t[r]=n}),t},Yi=e=>[...e.flowKeys,e.id,e.version,e.build,vd(e.context)].join("/"),Rd=({data:e,nodes:t})=>{const i=e.startedWriteNodeIds===void 0?t.some(r=>r.type==="integration-application-submit"&&e.nodeHistory.includes(r.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!i&&Yn(t,e.submissions)},Mo=({data:e,nodes:t})=>{var i;return!e.isFinished&&((((i=e.startedWriteNodeIds)==null?void 0:i.length)??0)>0||Yn(t,e.submissions))},We=Pe({state:"idle"}),on=new Set,Et=e=>{const{state:t,flow:i}=We.value;if(t!=="loaded")return;tt(i,"No flow to update");const r=e(i.data);i.data=r,We.value={state:t,flow:i},Te.setStateData(i)},N={current$:We,viewState$:Pe("closed"),prepareFlow:async({flow:e,context:t={},flowKeys:i,title:r,analytics:n,job:a,locationOrigin:o})=>{await Te.flushStateData().catch(()=>{});const s=await Te.getStateData(e,i,t),l=s??No(),u=Yi({...e,flowKeys:i,context:t}),f=s!==void 0&&!on.has(u)&&Rd({data:l,nodes:e.nodes});return f||on.add(u),{data:l,offerResume:f,startedAt:new Date,nodeIdToProgress:Pd(e.nodes),flowKeys:i,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:r,analytics:n,job:a,locationOrigin:o}},commitFlow:e=>{We.value={state:"loaded",flow:e},Te.setStateData(e)},settleResume:e=>{e.offerResume=!1,on.add(Yi(e))},cancelCurrentFlow:()=>{We.value={state:"idle"},N.viewState$.value="closed"},markAsFinished:()=>Et(e=>({...e,isFinished:!0})),markAsInteracted:()=>Et(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Et(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{Et(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Te.flushStateData()},restart:()=>{const{state:e,flow:t}=We.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const i={...No(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},r={...t,data:i,startedAt:new Date,offerResume:!1};We.value={state:e,flow:r},Te.setStateData(r)},addMessage:(e,t)=>{const i={...e,groupId:t};return Et(r=>(r.messages.push(i),r))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:i}=We.value;tt(t==="loaded","Application not loaded");const r=i.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));i.data.messages=r,Te.setStateData(i)},setSubmission:(e,t)=>Et(i=>(t===null?delete i.submissions[e]:i.submissions[e]=t,i)),setInput:e=>Et(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{We.peek().flow===e&&(We.value={state:"loaded",flow:e}),Te.setStateData(e),await Te.flushStateData()}},jd=()=>{const{t:e}=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:e("error_heading")})})]})},Ji=e=>{const{t}=se();return c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:t("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"})})})]})},Lo=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Ji,{class:"text-neutral-6 h-8 w-8"})}),Bd=e=>{const i=e/100,r=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-i,r))*100)}%`},zd=Ct("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"}}),bi=({class:e,children:t,variant:i,...r})=>c("button",{class:et(zd({variant:i}),e),...r,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})}),Vo=()=>c("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Ud=()=>{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 i=e[t];if(i===void 0)return null;const r=100*(i.stepsMade/(i.remainingSteps+i.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Bd(r)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Hd=({children:e,params:t})=>{const{t:i}=se(),r=N.viewState$;return c(ae,{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",{"aria-label":i("minimize"),onClick:()=>{r.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:sn,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:et({hidden:N.current$.value.state!=="loaded"||r.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(bi,{class:"mx-1","aria-label":i("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(bi,{class:"view-switch mx-1",onTouchStart:sn,"aria-label":i("minimize"),onClick:()=>r.value="minimised",children:c(Vo,{})},"minmax")]})]}),c(Ud,{})]})})};function sn(){}const qd=to(()=>Promise.resolve().then(()=>rh).then(e=>e.ChatbotBody)),Oo=Ct("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"}}}),Po=Ct("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"}}}),Wd=({open:e,...t})=>{const i=we(null);return $e(()=>{const r=i.current;r&&(e?r.showModal():r.close())},[e]),c("dialog",{ref:i,...t})},Kd=({logger:e,apiClient:t,analytics:i,talentBankClient:r,params:n})=>{const{state:a,flow:o}=N.current$.value,s=N.viewState$.value,l=a!=="idle"&&s==="maximised",u=we(null),f=o?[...o.data.nodeHistory].reverse().map(d=>o.nodes.find(h=>h.id===d)).find(d=>(d==null?void 0:d.type)==="flow-section"):void 0;return c(bd,{terms:n.terms,locale:void 0,children:[c(Wd,{open:l,onClose:()=>N.viewState$.value="minimised",children:c("div",{ref:u,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Oo({view:"maximised"}),children:c("div",{class:Po({view:"maximised"}),children:[c(Hd,{params:n,children:f?c(ae,{children:[c("span",{class:"block",children:f.data.title}),c("span",{class:"block truncate text-xs font-normal",children:o==null?void 0:o.title})]}):o==null?void 0:o.title}),Ui({state:a,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Lo,{},"loading")).with({state:"loaded"},()=>c(si,{fallback:c(Lo,{},"loading"),children:c(qd,{analytics:i,apiClient:t,logger:e,talentBankClient:r})})).with({state:"error"},()=>c(jd,{})).exhaustive()]})})}),s==="minimised"?c(Gd,{flow:o}):null]})},Gd=({flow:e})=>{const{t}=se();return c("div",{class:Oo({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Po({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:sn,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(bi,{class:"mx-1","aria-label":t("close_application"),onClick:N.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Yd=`[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!important}[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-1{bottom:4px}[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-none{resize:none}[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-end{align-items:flex-end}[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-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size: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-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-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[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{--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(3px + 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-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] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--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] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[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-12:has(+*>input:focus){color:var(--i-color-n-12)}[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)}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}
2
- `,Ro="inploi-chatbot",ln=`[data-widget='${Ro}']`,Jd=()=>({getChatbotElement:()=>document.querySelector(ln),getOrCreateChatbotElement:()=>{const e=document.querySelector(ln);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Ro,t}}),Zd=25,jo=Pe(()=>{}),Bo=["wheel","touchmove","keydown"],Xd=(e,t)=>new Promise((i,r)=>{if(t!=null&&t.aborted)return r(new st);const n=setTimeout(i,e);t==null||t.addEventListener("abort",()=>{clearTimeout(n),r(new st)},{once:!0})}),ie={onSubmitSuccessFn$:Pe(()=>{}),onInteractionFn$:Pe(()=>{}),isBotTyping$:Pe(!1),captchaVisible$:Pe(!1),themeMode$:Pe("light"),isReadingHistory$:Pe(!1),scrollToEnd:()=>jo.value()},Qd=()=>{const e=we(null),t=we(-1/0);$e(()=>{const r=e.current;if(!r)return;const n=()=>{ie.isReadingHistory$.value=!1,r.scrollTo({top:r.scrollHeight,behavior:"instant"})};jo.value=n;const a=()=>t.current=performance.now(),o=()=>{r.scrollHeight-r.scrollTop-r.clientHeight<=24?ie.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(ie.isReadingHistory$.value=!0)};r.addEventListener("scroll",o,{passive:!0});for(const l of Bo)r.addEventListener(l,a,{passive:!0});const s=new ResizeObserver(()=>{ie.isReadingHistory$.peek()||n()});return s.observe(r),r.firstElementChild&&s.observe(r.firstElementChild),()=>{r.removeEventListener("scroll",o);for(const l of Bo)r.removeEventListener(l,a);s.disconnect()}},[]);const i=ct(()=>({setSubmission:(n,a)=>N.setSubmission(n,a),captcha:{container:()=>{var n;return((n=e.current)==null?void 0:n.querySelector("[data-captcha-slot]"))??null},get theme(){return ie.themeMode$.peek()},reveal:n=>{ie.captchaVisible$.value=n,n&&requestAnimationFrame(()=>{var a,o;(o=(a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))==null||o.focus(),ie.scrollToEnd()})}},send:async({message:n,signal:a,groupId:o})=>{if(await Ui(n).with({author:"bot",type:"text"},async s=>{if(a!=null&&a.aborted)throw new st;ie.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*Zd;try{await Xd(l,a)}finally{ie.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new st;N.addMessage(n,o)},input:({input:n,signal:a})=>{if(a!=null&&a.aborted)throw new st;return N.setInput(n),new Promise(o=>{const s=l=>{if(a!=null&&a.aborted)throw new st;t.current=-1/0,N.setInput(void 0),n.key&&N.setSubmission(n.key,l),o(l)};ie.onSubmitSuccessFn$.value=s})}}),[]);return{chatRef:e,chatService:i}};var 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]}},iu=(e,t=1,i)=>r=>{const[n,a]=tu[i][r];return"oklch("+n+"% "+a*t+" "+e+")"},cn=e=>{const t=iu(e.hue,e.chroma,e.mode);return Object.fromEntries(eu.map(i=>[e.prefix+i,e.transform(t(i))]))},dn=e=>e,ru=e=>{const t=Object.keys(e).flatMap(i=>{const r=e[i];return typeof r=="object"&&r!==null?Object.keys(r).map(n=>{const a=r[n];return[`${String(i)}.${n}`,a]}):[[i,r]]});return Object.fromEntries(t)},Zi=e=>!!e&&typeof e=="object"&&!Array.isArray(e),un=(e,...t)=>{if(!t.length)return e;const i=t.shift();if(Zi(e)&&Zi(i))for(const r in i){const n=i[r];if(Zi(n)){e[r]||Object.assign(e,{[r]:{}});const a=e[r];Zi(a)&&un(a,n)}else Object.assign(e,{[r]:i[r]})}return un(e,...t)},nu=e=>{function t(i,r){const n=[e.prefix,r.toString().replace(/\./g,"-")].join("");return i==="declaration"?`--${n}`:`var(--${n})`}return t},au=()=>({core:e=>({semantic:t=>({component:i=>({from:r=>{const{theme:n,getToken:a}=r,o=h=>a("reference",h.toString()),s=e({theme:n}),l=t({theme:n,core:o,raw:{core:s}}),u=i({theme:n,core:o,semantic:o,raw:{core:s,semantic:l}}),f=ru(un(s,l,u)),d=([h,g],w)=>{const _=[w,h].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(C=>d(C,_)):[[r.getToken("declaration",_),g]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(h=>d(h))),ref:h=>a("reference",h.toString())}}})})})});const[fn,pn,zo]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],ou=au().core(({theme:e})=>({color:{black:fn,white:pn,lowest:e.mode==="light"?pn:fn,highest:e.mode==="light"?fn:pn,...cn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:dn}),...cn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:dn}),...cn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:dn})},typography:{}})).semantic(({core:e,raw:t,theme:i})=>{const r=(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:r("n-8",i.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:zo,"bg-hover":r("n-10",.2),"bg-active":r("n-10",.3)}}}).component(({raw:e,theme:t,semantic:i,core:r})=>{const n=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:r(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":r(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":i("color.divider"),"strong-shadow":n("a-9",.05)},"status-bar":{bg:n("n-2",.8),"bg-button":zo,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":r(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),su=nu({prefix:"i-"}),lu=e=>{const t=ou.from({theme:e,getToken:su}),i=Object.entries(t.declarations).map(([r,n])=>`${r}: ${n};`);return`${ln} {
1
+ var lh=Object.defineProperty;var ch=(ve,ze,Je)=>ze in ve?lh(ve,ze,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ve[ze]=Je;var pe=(ve,ze,Je)=>(ch(ve,typeof ze!="symbol"?ze+"":ze,Je),Je);(function(){"use strict";var ve;function ze(e){return{lang:(e==null?void 0:e.lang)??(ve==null?void 0:ve.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(ve==null?void 0:ve.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(ve==null?void 0:ve.abortPipeEarly)}}var Je;function Js(e){return Je==null?void 0:Je.get(e)}var cr;function Zs(e){return cr==null?void 0:cr.get(e)}var dr;function Xs(e,t){var i;return(i=dr==null?void 0:dr.get(e))==null?void 0:i.get(t)}function zn(e){var i,r;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Le(e,t,i,r,n){let a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??zn(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:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",f=(n==null?void 0:n.message)??e.message??Xs(e.reference,l.lang)??(u?Zs(l.lang):null)??r.message??Js(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Se(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ze())}}}function Qs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function el(e,t){let i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function Un(e){return{kind:"transformation",type:"transform",reference:Un,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function tl(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function ur(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function Hn(){return{kind:"schema",type:"any",reference:Hn,expects:"any",async:!1,get"~standard"(){return Se(this)},"~run"(e){return e.typed=!0,e}}}function qn(e,t){return{kind:"schema",type:"array",reference:qn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Se(this)},"~run"(i,r){var a;let n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){let s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){let u={type:"array",origin:"value",input:n,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(u):f.path=[u],(a=i.issues)==null||a.push(f);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Le(this,"type",i,r);return i}}}function fr(e){return{kind:"schema",type:"boolean",reference:fr,expects:"boolean",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Le(this,"type",t,i),t}}}function _t(e,t){return{kind:"schema",type:"literal",reference:_t,expects:zn(e),async:!1,literal:e,message:t,get"~standard"(){return Se(this)},"~run"(i,r){return i.value===this.literal?i.typed=!0:Le(this,"type",i,r),i}}}function Wn(e){return{kind:"schema",type:"null",reference:Wn,expects:"null",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,i){return t.value===null?t.typed=!0:Le(this,"type",t,i),t}}}function Ii(e,t){return{kind:"schema",type:"nullable",reference:Ii,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Se(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Ai(e){return{kind:"schema",type:"number",reference:Ai,expects:"number",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Le(this,"type",t,i),t}}}function ae(e,t){return{kind:"schema",type:"object",reference:ae,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Se(this)},"~run"(i,r){var a;let n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.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]:ur(s),u=s["~run"]({value:l},r);if(u.issues){let f={type:"object",origin:"value",input:n,key:o,value:l};for(let d of u.issues)d.path?d.path.unshift(f):d.path=[f],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=tl(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Le(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Le(this,"type",i,r);return i}}}function Ce(e,t){return{kind:"schema",type:"optional",reference:Ce,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Se(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Kn(e,t,i){return{kind:"schema",type:"record",reference:Kn,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Se(this)},"~run"(r,n){var o,s;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let l in a)if(Qs(a,l)){let u=a[l],f=this.key["~run"]({value:l},n);if(f.issues){let h={type:"object",origin:"key",input:a,key:l,value:u};for(let g of f.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=f.issues),n.abortEarly){r.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 g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!f.typed||!d.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=d.value)}}else Le(this,"type",r,n);return r}}}function De(e){return{kind:"schema",type:"string",reference:De,expects:"string",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Le(this,"type",t,i),t}}}function Gn(e){let t;if(e)for(let i of e)t?t.push(...i.issues):t=i.issues;return t}function pr(e,t){return{kind:"schema",type:"union",reference:pr,expects:el(e.map(i=>i.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Se(this)},"~run"(i,r){let n,a,o;for(let s of this.options){let l=s["~run"]({value:i.value},r);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];Le(this,"type",i,r,{issues:Gn(a)}),i.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Le(this,"type",i,r,{issues:Gn(o)})}return i}}}function ii(){return{kind:"schema",type:"unknown",reference:ii,expects:"unknown",async:!1,get"~standard"(){return Se(this)},"~run"(e){return e.typed=!0,e}}}function il(...e){return{...e[0],pipe:e,get"~standard"(){return Se(this)},"~run"(t,i){for(let r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Ti(e,t,i){let r=e["~run"]({value:t},ze(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var rl=e=>({ok:!0,err:!1,val:e}),nl=e=>({err:!0,ok:!1,val:e}),hr=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function gr(e,t,i){var o,s;let r=e.find(l=>l.type==="pre-apply-result");if(!r)return;let n=(o=t[r.data.participationKey])==null?void 0:o.value,a={};if(n===!0)for(let l of hr(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:r.id,flow_session_id:i,participation:n,answers:a}}function al(e,t){let i=gr(e,t,""),r=hr(e).map(a=>{let o=a.data.preApply,s=i==null?void 0:i.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=(i==null?void 0:i.participation)===!1?"skipped":(i==null?void 0:i.participation)===!0&&r.length>0&&r.every(a=>a.valid)?"completed":"unavailable";return{status:n,hasHardConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="advisory"):null,answers:n==="completed"?r:[]}}function ol(e,t){let i=new Set(hr(e).map(r=>r.data.key));for(let r of e)r.type==="pre-apply-result"&&(i.add(r.data.key),i.add(r.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([r])=>!i.has(r)))}var lt=class extends Error{constructor(){super("Aborted")}},ri=(e,t)=>{if(t.length===0)return;let i=e;for(let r of t){if(i==null||typeof i!="object")return;i=i[r]}return i},sl=(e,t="all")=>{let i={},r=t==="all"?null:new Set(t);for(let n in e){let a=e[n];a&&(r&&!r.has(n)||(i[n]=a.value))}return i},Yn=(e,t)=>{let i=new Set(e.flatMap(r=>r.type==="add-submission"?[r.data.key]:[]));return Object.entries(t).some(([r,n])=>n!==void 0&&n.type!=="integration"&&!i.has(r))},ll=({key:e,submissions:t})=>{var r;let i=(r=t[e])==null?void 0:r.value;if(typeof i!="string"&&typeof i!="number")throw new Error(`Submission at “${e}” is not a string or number`);return i},Jn=({key:e,path:t,submissions:i,context:r})=>{if(e==="$context"){if(!t)return;let n=ri(r,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 i[e]},cl=e=>{let t=e.split(".").pop();return t?rl(t?"."+t:""):nl("No file extension found")},Zn=(e,t)=>{if(t.length===0)return!0;let i=t.map(r=>r.toLowerCase());return e.every(r=>{let n=cl(r.name);return n.ok&&i.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`,Fi=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,dl=ae({integration_response:ae({data:ae({redirect_url:De(),message:Ce(Ii(De())),button_text:Ce(Ii(De()))})})}),br=e=>Ti(dl,e).success,ul=ae({integration_response:ae({status:Ce(ii()),error:ae({message:De(),data:Ce(ii())})})}),Xn=e=>Ti(ul,e).success,fl=ae({success:_t(!0),integration_response:ae({data:ae({outcome:_t("pending"),message:Ce(ii())}),error:Ce(Wn())})}),vr=e=>{let t=Ti(fl,e);if(!t.success||br(e))return;let{message:i}=t.output.integration_response.data;return typeof i=="string"&&i.trim()?{message:i}:{}};ae({success:_t(!1),message:Ce(ii())});var pl=ae({error:_t("Validation failed"),messages:ae({})}),hl=(e,t)=>t===422&&Ti(pl,e).success,Qn=(e,t)=>{if(!Xn(e))return;let i=e.integration_response,r=i.error.data,n=typeof r=="object"&&r!==null?r:{},a=w=>typeof n[w]=="string"?n[w]:void 0,o=w=>typeof n[w]=="boolean"?n[w]:void 0,s=w=>{let _=n[w];return Number.isSafeInteger(_)&&_>=0?_:void 0},l=w=>{let _=a(w),C=_===void 0?NaN:Date.parse(_);return Number.isFinite(C)?C:void 0},u=typeof i.status=="number"?i.status:t,f=a("phase"),d=a("verdict"),h=a("code"),g=u===409&&f==="submit"&&d==="confirmed"?"duplicate":u===410&&h==="job_closed"?"closed":f==="submit"&&d==="unknown"?"unknown":void 0;return{message:i.error.message,status:u,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:d,code:h,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:g}},ea=3e4,gl=2e4,bl=6e4,wr=12e4,ta=6*60*6e4,vl=60*6e4,ia=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,i=t===void 0?0:t-Date.now();return i>0&&i<=ta?t:void 0},wl=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=ia(e);return t===void 0?{}:{until:t}},ra=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),ml=(e,t)=>{let i=ia(t);if(i!==void 0)return{waitMs:i-Date.now(),throttles:(e??0)+1,maintenance:!0};if(!((t==null?void 0:t.reason)==="provider_maintenance"||(t==null?void 0:t.retryable)===!0&&(t.providerStatus===429||t.providerStatus!==void 0&&t.providerStatus>=500||t.phase==="workflow"&&t.verdict==="not_submitted")))return{waitMs:ea};let r=(e??0)+1,n=Math.min(r*gl,bl),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(n,a),wr),throttles:r}},na=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",yl=e=>{if(!Xn(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},_l=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",xl=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",kl=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,Sl=(e,t)=>{if(typeof e!="object"||e===null)return null;let i=e.integration_response;if(typeof i!="object"||i===null){if(t===void 0)return null;let l="code"in e&&typeof e.code=="string"?e.code:void 0;return{service:"API",response:{status:t,payload:l===void 0?{}:{code:l}}}}let r=i;if(typeof r.status!="number"||r.service!==void 0&&typeof r.service!="string")return null;let n="data"in r,a=r.error,o=typeof a=="object"&&a!==null&&typeof a.message=="string"&&"data"in a;if(!n&&!o)return null;let s=n?r.data:a.data??null;return{service:r.service??"INVALID_SERVICE",response:{status:r.status,payload:s},...vr(e)&&{outcome:"pending"}}},Cl=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isFinite(t.getTime())&&t.toISOString().slice(0,10)===e},$l=(e,t)=>{if(!Cl(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},El=e=>new Promise((t,i)=>{let r=new FileReader;r.onload=()=>{if(typeof r.result!="string"||!r.result)return i(new Error("Invalid file"));t(r.result)},r.onerror=i,r.readAsDataURL(e)}),Il=({context:e,schema:t,logger:i})=>{if(t)for(let r in t){let n=t[r];if(!n)continue;let a=ri(e,r.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${r} is required`;throw i.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${r} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${r} is not a string`);break;default:n.type}}};let Ze;function aa(e){return{lang:(e==null?void 0:e.lang)??(Ze==null?void 0:Ze.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ze==null?void 0:Ze.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ze==null?void 0:Ze.abortPipeEarly)}}let mr;function Al(e){return mr==null?void 0:mr.get(e)}let yr;function Tl(e){return yr==null?void 0:yr.get(e)}let _r;function Fl(e,t){var i;return(i=_r==null?void 0:_r.get(e))==null?void 0:i.get(t)}function oa(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Ue(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??oa(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:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",f=(n==null?void 0:n.message)??e.message??Fl(e.reference,l.lang)??(u?Tl(l.lang):null)??r.message??Al(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Ne(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},aa())}}}function Dl(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Nl(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function xr(e,t){return{kind:"validation",type:"max_length",reference:xr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Di(e,t){return{kind:"validation",type:"min_length",reference:Di,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function kr(){return{kind:"transformation",type:"trim",reference:kr,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Ml(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function Ni(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function sa(e,t){return{kind:"schema",type:"array",reference:sa,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ne(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(u):f.path=[u],(a=i.issues)==null||a.push(f);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Ue(this,"type",i,r);return i}}}function Sr(e){return{kind:"schema",type:"boolean",reference:Sr,expects:"boolean",async:!1,message:e,get"~standard"(){return Ne(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Ue(this,"type",t,i),t}}}function Y(e,t){return{kind:"schema",type:"nullable",reference:Y,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ne(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=Ni(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function ni(e,t){return{kind:"schema",type:"nullish",reference:ni,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ne(this)},"~run"(i,r){return(i.value===null||i.value===void 0)&&(this.default!==void 0&&(i.value=Ni(this,i,r)),i.value===null||i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function xt(e){return{kind:"schema",type:"number",reference:xt,expects:"number",async:!1,message:e,get"~standard"(){return Ne(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ue(this,"type",t,i),t}}}function Me(e,t){return{kind:"schema",type:"object",reference:Me,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ne(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.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]:Ni(s),u=s["~run"]({value:l},r);if(u.issues){const f={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(f):d.path=[f],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=Ml(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ue(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Ue(this,"type",i,r);return i}}}function la(e,t){return{kind:"schema",type:"optional",reference:la,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ne(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=Ni(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Mt(e,t){return{kind:"schema",type:"picklist",reference:Mt,expects:Nl(e.map(oa),"|"),async:!1,options:e,message:t,get"~standard"(){return Ne(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:Ue(this,"type",i,r),i}}}function Cr(e,t,i){return{kind:"schema",type:"record",reference:Cr,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Ne(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(Dl(a,l)){const u=a[l],f=this.key["~run"]({value:l},n);if(f.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of f.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=f.issues),n.abortEarly){r.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 g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!f.typed||!d.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=d.value)}}else Ue(this,"type",r,n);return r}}}function R(e){return{kind:"schema",type:"string",reference:R,expects:"string",async:!1,message:e,get"~standard"(){return Ne(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Ue(this,"type",t,i),t}}}function ca(){return{kind:"schema",type:"unknown",reference:ca,expects:"unknown",async:!1,get"~standard"(){return Ne(this)},"~run"(e){return e.typed=!0,e}}}function $r(...e){return{...e[0],pipe:e,get"~standard"(){return Ne(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Er(e,t,i){const r=e["~run"]({value:t},aa(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var Ll=e=>e,Vl={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Ol(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function dh(e){return e}var Pl=["agent","sdk","form","integration","migration"],Rl=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],jl=["screening","cv_match","interview","overall"],Bl=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],zl=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],da=Mt(Pl),Ul=Mt(Rl),Hl=$r(R(),kr(),Di(1),xr(100)),ql=Mt(jl),Wl=Mt(Bl),Kl=$r(R(),kr(),Di(1),xr(100)),Gl=Mt(zl),ua=Me({id:R(),email:Y(R()),firstName:Y(R()),lastName:Y(R()),phone:Y(R()),source:Y(da),identifiedAt:Y(R()),createdAt:R(),updatedAt:R()}),fa=$r(R(),Di(1)),Ir=Cr(R(),ca()),Yl=Me({id:R(),applicationId:R(),status:Wl,scheduledAt:Y(R()),completedAt:Y(R()),meta:Y(Ir),createdAt:R(),updatedAt:R()}),Jl=Me({score:xt(),reason:R(),confidence:xt()}),pa=Me({id:R(),candidateId:R(),jobId:xt(),stage:Hl,stageGroup:Ul,stageEnteredAt:R(),rating:Y(xt()),disqualifiedAt:Y(R()),disqualificationReason:Y(Kl),disqualificationNote:Y(R()),source:Gl,sourceDetail:Y(R()),sessionId:Y(xt()),externalApplicationId:Y(R()),meta:Y(Ir),context:Y(Ir),scoredAt:Y(R()),createdAt:R(),updatedAt:R()}),Zl=Me({id:R(),applicationId:R(),scoreType:ql,score:Y(xt()),reason:Y(R()),categories:Y(Cr(R(),Jl)),scoredBy:Y(R()),createdAt:R()});({...pa.entries},{...ua.entries});var Xl=Me({anonymousId:fa,email:fa,firstName:ni(R()),lastName:ni(R()),phone:ni(R()),source:ni(da)}),Ql=Me({candidateId:R(),isNew:Sr()}),ec=Me({id:R(),stageGroup:R(),createdAt:R()}),tc=Me({isDuplicate:Sr(),existingApplication:la(ec)}),ic=({environment:e,publishableKey:t,logger:i})=>{let r=Vl[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(`${r}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return i.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Er(tc,s);return l.success?l.output:(i.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 i.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return i.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=Er(Xl,a);if(!o.success)return i.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${r}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return i.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Er(Ql,await s.json());return l.success?l.output:(i.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return i.error("[TalentBankClient] identify failed:",a),null}}}},ha=il(pr([De(),Ai()]),Un(String)),ga=ae({id:ha,version:Ai(),build:Ai(),nodes:qn(Hn()),context_schema:Ce(Ii(Kn(De(),ae({required:fr(),type:pr([_t("string"),_t("number")])}))))}),rc=ae({flow:ga}),nc=ae({company:ae({name:De()}),flow:ga,job:ae({id:ha,title:De()}),user:Ce(ae({city:Ce(De()),country:Ce(De()),isEU:Ce(fr()),continent:Ce(De())}))}),ac=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),oc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Ol(),response:nc}},sc={pathname:"/flow/id/:id",method:"GET",schema:{response:rc}},ai,T,ba,va,kt,wa,ma,Ar,ya,Lt={},_a=[],lc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mi=Array.isArray;function Xe(e,t){for(var i in t)e[i]=t[i];return e}function xa(e){var t=e.parentNode;t&&t.removeChild(e)}function Ae(e,t,i){var r,n,a,o={};for(a in t)a=="key"?r=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?ai.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return oi(e,o,r,n,null)}function oi(e,t,i,r,n){var a={type:e,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++ba};return n==null&&T.vnode!=null&&T.vnode(a),a}function cc(){return{current:null}}function ne(e){return e.children}function Ve(e,t){this.props=e,this.context=t}function Li(e,t){if(t==null)return e.__?Li(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null)return i.__e;return typeof e.type=="function"?Li(e):null}function ka(e){var t,i;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null){e.__e=e.__c.base=i.__e;break}return ka(e)}}function Tr(e){(!e.__d&&(e.__d=!0)&&kt.push(e)&&!Vi.__r++||wa!==T.debounceRendering)&&((wa=T.debounceRendering)||ma)(Vi)}function Vi(){var e,t,i,r,n,a,o,s,l;for(kt.sort(Ar);e=kt.shift();)e.__d&&(t=kt.length,r=void 0,n=void 0,a=void 0,s=(o=(i=e).__v).__e,(l=i.__P)&&(r=[],n=[],(a=Xe({},o)).__v=o.__v+1,Fr(l,o,a,i.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s??Li(o),o.__h,n),Ta(r,o,n),o.__e!=s&&ka(o)),kt.length>t&&kt.sort(Ar));Vi.__r=0}function Sa(e,t,i,r,n,a,o,s,l,u,f){var d,h,g,w,_,C,S,v,k,$,I=0,M=r&&r.__k||_a,B=M.length,K=B,D=t.length;for(i.__k=[],d=0;d<D;d++)(w=i.__k[d]=(w=t[d])==null||typeof w=="boolean"||typeof w=="function"?null:typeof w=="string"||typeof w=="number"||typeof w=="bigint"?oi(null,w,null,null,w):Mi(w)?oi(ne,{children:w},null,null,null):w.__b>0?oi(w.type,w.props,w.key,w.ref?w.ref:null,w.__v):w)!=null&&(w.__=i,w.__b=i.__b+1,(v=dc(w,M,S=d+I,K))===-1?g=Lt:(g=M[v]||Lt,M[v]=void 0,K--),Fr(e,w,g,n,a,o,s,l,u,f),_=w.__e,(h=w.ref)&&g.ref!=h&&(g.ref&&Dr(g.ref,null,w),f.push(h,w.__c||_,w)),_!=null&&(C==null&&(C=_),$=!(k=g===Lt||g.__v===null)&&v===S,k?v==-1&&I--:v!==S&&(v===S+1?(I++,$=!0):v>S?K>D-S?(I+=v-S,$=!0):I--:I=v<S&&v==S-1?v-S:0),S=d+I,$=$||v==d&&!k,typeof w.type!="function"||v===S&&g.__k!==w.__k?typeof w.type=="function"||$?w.__d!==void 0?(l=w.__d,w.__d=void 0):l=_.nextSibling:l=$a(e,_,l):l=Ca(w,l,e),typeof i.type=="function"&&(i.__d=l)));for(i.__e=C,d=B;d--;)M[d]!=null&&(typeof i.type=="function"&&M[d].__e!=null&&M[d].__e==i.__d&&(i.__d=M[d].__e.nextSibling),Fa(M[d],M[d]))}function Ca(e,t,i){for(var r,n=e.__k,a=0;n&&a<n.length;a++)(r=n[a])&&(r.__=e,t=typeof r.type=="function"?Ca(r,t,i):$a(i,r.__e,t));return t}function Qe(e,t){return t=t||[],e==null||typeof e=="boolean"||(Mi(e)?e.some(function(i){Qe(i,t)}):t.push(e)),t}function $a(e,t,i){return i==null||i.parentNode!==e?e.insertBefore(t,null):t==i&&t.parentNode!=null||e.insertBefore(t,i),t.nextSibling}function dc(e,t,i,r){var n=e.key,a=e.type,o=i-1,s=i+1,l=t[i];if(l===null||l&&n==l.key&&a===l.type)return i;if(r>(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 uc(e,t,i,r,n){var a;for(a in i)a==="children"||a==="key"||a in t||Oi(e,a,null,i[a],r);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||i[a]===t[a]||Oi(e,a,t[a],i[a],r)}function Ea(e,t,i){t[0]==="-"?e.setProperty(t,i??""):e[t]=i==null?"":typeof i!="number"||lc.test(t)?i:i+"px"}function Oi(e,t,i,r,n){var a;e:if(t==="style")if(typeof i=="string")e.style.cssText=i;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)i&&t in i||Ea(e.style,t,"");if(i)for(t in i)r&&i[t]===r[t]||Ea(e.style,t,i[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]=i,i?r||e.addEventListener(t,a?Aa:Ia,a):e.removeEventListener(t,a?Aa:Ia,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]=i??"";break e}catch{}typeof i=="function"||(i==null||i===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,i))}}function Ia(e){return this.l[e.type+!1](T.event?T.event(e):e)}function Aa(e){return this.l[e.type+!0](T.event?T.event(e):e)}function Fr(e,t,i,r,n,a,o,s,l,u){var f,d,h,g,w,_,C,S,v,k,$,I,M,B,K,D=t.type;if(t.constructor!==void 0)return null;i.__h!=null&&(l=i.__h,s=t.__e=i.__e,t.__h=null,a=[s]),(f=T.__b)&&f(t);try{e:if(typeof D=="function"){if(S=t.props,v=(f=D.contextType)&&r[f.__c],k=f?v?v.props.value:f.__:r,i.__c?C=(d=t.__c=i.__c).__=d.__E:("prototype"in D&&D.prototype.render?t.__c=d=new D(S,k):(t.__c=d=new Ve(S,k),d.constructor=D,d.render=pc),v&&v.sub(d),d.props=S,d.state||(d.state={}),d.context=k,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),D.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Xe({},d.__s)),Xe(d.__s,D.getDerivedStateFromProps(S,d.__s))),g=d.props,w=d.state,d.__v=t,h)D.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(D.getDerivedStateFromProps==null&&S!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(S,k),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(S,d.__s,k)===!1||t.__v===i.__v)){for(t.__v!==i.__v&&(d.props=S,d.state=d.__s,d.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.forEach(function(P){P&&(P.__=t)}),$=0;$<d._sb.length;$++)d.__h.push(d._sb[$]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(S,d.__s,k),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,w,_)})}if(d.context=k,d.props=S,d.__P=e,d.__e=!1,I=T.__r,M=0,"prototype"in D&&D.prototype.render){for(d.state=d.__s,d.__d=!1,I&&I(t),f=d.render(d.props,d.state,d.context),B=0;B<d._sb.length;B++)d.__h.push(d._sb[B]);d._sb=[]}else do d.__d=!1,I&&I(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++M<25);d.state=d.__s,d.getChildContext!=null&&(r=Xe(Xe({},r),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(_=d.getSnapshotBeforeUpdate(g,w)),Sa(e,Mi(K=f!=null&&f.type===ne&&f.key==null?f.props.children:f)?K:[K],t,i,r,n,a,o,s,l,u),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),C&&(d.__E=d.__=null)}else a==null&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=fc(i.__e,t,i,r,n,a,o,l,u);(f=T.diffed)&&f(t)}catch(P){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),T.__e(P,t,i)}}function Ta(e,t,i){for(var r=0;r<i.length;r++)Dr(i[r],i[++r],i[++r]);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 fc(e,t,i,r,n,a,o,s,l){var u,f,d,h=i.props,g=t.props,w=t.type,_=0;if(w==="svg"&&(n=!0),a!=null){for(;_<a.length;_++)if((u=a[_])&&"setAttribute"in u==!!w&&(w?u.localName===w:u.nodeType===3)){e=u,a[_]=null;break}}if(e==null){if(w===null)return document.createTextNode(g);e=n?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,g.is&&g),a=null,s=!1}if(w===null)h===g||s&&e.data===g||(e.data=g);else{if(a=a&&ai.call(e.childNodes),f=(h=i.props||Lt).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},_=0;_<e.attributes.length;_++)h[e.attributes[_].name]=e.attributes[_].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(uc(e,g,h,n,s),d)t.__k=[];else if(Sa(e,Mi(_=t.props.children)?_:[_],t,i,r,n&&w!=="foreignObject",a,o,a?a[0]:i.__k&&Li(i,0),s,l),a!=null)for(_=a.length;_--;)a[_]!=null&&xa(a[_]);s||("value"in g&&(_=g.value)!==void 0&&(_!==e.value||w==="progress"&&!_||w==="option"&&_!==h.value)&&Oi(e,"value",_,h.value,!1),"checked"in g&&(_=g.checked)!==void 0&&_!==e.checked&&Oi(e,"checked",_,h.checked,!1))}return e}function Dr(e,t,i){try{typeof e=="function"?e(t):e.current=t}catch(r){T.__e(r,i)}}function Fa(e,t,i){var r,n;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Dr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){T.__e(a,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&Fa(r[n],t,i||typeof e.type!="function");i||e.__e==null||xa(e.__e),e.__=e.__e=e.__d=void 0}function pc(e,t,i){return this.constructor(e,i)}function St(e,t,i){var r,n,a,o;T.__&&T.__(e,t),n=(r=typeof i=="function")?null:i&&i.__k||t.__k,a=[],o=[],Fr(t,e=(!r&&i||t).__k=Ae(ne,null,[e]),n||Lt,Lt,t.ownerSVGElement!==void 0,!r&&i?[i]:n?null:t.firstChild?ai.call(t.childNodes):null,a,!r&&i?i:n?n.__e:t.firstChild,r,o),Ta(a,e,o)}function Da(e,t){St(e,t,Da)}function hc(e,t,i){var r,n,a,o,s=Xe({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?r=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?ai.call(arguments,2):i),oi(e.type,s,r||e.key,n||e.ref,null)}function Na(e,t){var i={__c:t="__cC"+ya++,__:e,Consumer:function(r,n){return r.children(n)},Provider:function(r){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,Tr(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)}}),r.children}};return i.Provider.__=i.Consumer.contextType=i}ai=_a.slice,T={__e:function(e,t,i,r){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,r||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},ba=0,va=function(e){return e!=null&&e.constructor===void 0},Ve.prototype.setState=function(e,t){var i;i=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xe({},this.state),typeof e=="function"&&(e=e(Xe({},i),this.props)),e&&Xe(i,e),e!=null&&this.__v&&(t&&this._sb.push(t),Tr(this))},Ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Tr(this))},Ve.prototype.render=ne,kt=[],ma=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(e,t){return e.__v.__b-t.__v.__b},Vi.__r=0,ya=0;function Ma(e){var t,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(i=Ma(e[t]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function et(){for(var e,t,i=0,r="",n=arguments.length;i<n;i++)(e=arguments[i])&&(t=Ma(e))&&(r&&(r+=" "),r+=t);return r}const La=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Va=et,Ct=(e,t)=>i=>{var r;if((t==null?void 0:t.variants)==null)return Va(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(u=>{const f=i==null?void 0:i[u],d=a==null?void 0:a[u];if(f===null)return null;const h=La(f)||La(d);return n[u][h]}),s=i&&Object.entries(i).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:h,...g}=f;return Object.entries(g).every(w=>{let[_,C]=w;return Array.isArray(C)?C.includes({...a,...s}[_]):{...a,...s}[_]===C})?[...u,d,h]:u},[]);return Va(e,o,l,i==null?void 0:i.class,i==null?void 0:i.className)};var ct,ee,Nr,Oa,Vt=0,Pa=[],Pi=[],Ra=T.__b,ja=T.__r,Ba=T.diffed,za=T.__c,Ua=T.unmount;function Ot(e,t){T.__h&&T.__h(ee,e,Vt||t),Vt=0;var i=ee.__H||(ee.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:Pi}),i.__[e]}function Oe(e){return Vt=1,Ha(Ka,e)}function Ha(e,t,i){var r=Ot(ct++,2);if(r.t=e,!r.__c&&(r.__=[i?i(t):Ka(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,s);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=ee,!ee.u)){var n=function(s,l,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!a||a.call(this,s,l,u);var d=!1;return f.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(d=!0)}}),!(!d&&r.__c.props===s)&&(!a||a.call(this,s,l,u))};ee.u=!0;var a=ee.shouldComponentUpdate,o=ee.componentWillUpdate;ee.componentWillUpdate=function(s,l,u){if(this.__e){var f=a;a=void 0,n(s,l,u),a=f}o&&o.call(this,s,l,u)},ee.shouldComponentUpdate=n}return r.__N||r.__}function Ri(e,t){var i=Ot(ct++,3);!T.__s&&Lr(i.__H,t)&&(i.__=e,i.i=t,ee.__H.__h.push(i))}function $e(e,t){var i=Ot(ct++,4);!T.__s&&Lr(i.__H,t)&&(i.__=e,i.i=t,ee.__h.push(i))}function we(e){return Vt=5,dt(function(){return{current:e}},[])}function gc(e,t,i){Vt=6,$e(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},i==null?i:i.concat(e))}function dt(e,t){var i=Ot(ct++,7);return Lr(i.__H,t)?(i.__V=e(),i.i=t,i.__h=e,i.__V):i.__}function bc(e,t){return Vt=8,dt(function(){return e},t)}function qa(e){var t=ee.context[e.__c],i=Ot(ct++,9);return i.c=e,t?(i.__==null&&(i.__=!0,t.sub(ee)),t.props.value):e.__}function vc(e,t){T.useDebugValue&&T.useDebugValue(t?t(e):e)}function wc(){var e=Ot(ct++,11);if(!e.__){for(var t=ee.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var i=t.__m||(t.__m=[0,0]);e.__="P"+i[0]+"-"+i[1]++}return e.__}function mc(){for(var e;e=Pa.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ji),e.__H.__h.forEach(Mr),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){ee=null,Ra&&Ra(e)},T.__r=function(e){ja&&ja(e),ct=0;var t=(ee=e.__c).__H;t&&(Nr===ee?(t.__h=[],ee.__h=[],t.__.forEach(function(i){i.__N&&(i.__=i.__N),i.__V=Pi,i.__N=i.i=void 0})):(t.__h.forEach(ji),t.__h.forEach(Mr),t.__h=[],ct=0)),Nr=ee},T.diffed=function(e){Ba&&Ba(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Pa.push(t)!==1&&Oa===T.requestAnimationFrame||((Oa=T.requestAnimationFrame)||yc)(mc)),t.__H.__.forEach(function(i){i.i&&(i.__H=i.i),i.__V!==Pi&&(i.__=i.__V),i.i=void 0,i.__V=Pi})),Nr=ee=null},T.__c=function(e,t){t.some(function(i){try{i.__h.forEach(ji),i.__h=i.__h.filter(function(r){return!r.__||Mr(r)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],T.__e(r,i.__v)}}),za&&za(e,t)},T.unmount=function(e){Ua&&Ua(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.forEach(function(r){try{ji(r)}catch(n){t=n}}),i.__H=void 0,t&&T.__e(t,i.__v))};var Wa=typeof requestAnimationFrame=="function";function yc(e){var t,i=function(){clearTimeout(r),Wa&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(i,100);Wa&&(t=requestAnimationFrame(i))}function ji(e){var t=ee,i=e.__c;typeof i=="function"&&(e.__c=void 0,i()),ee=t}function Mr(e){var t=ee;e.__c=e.__(),ee=t}function Lr(e,t){return!e||e.length!==t.length||t.some(function(i,r){return i!==e[r]})}function Ka(e,t){return typeof t=="function"?t(e):t}function Ga(e,t){for(var i in t)e[i]=t[i];return e}function Vr(e,t){for(var i in e)if(i!=="__source"&&!(i in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Or(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Pr(e){this.props=e}function _c(e,t){function i(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:Vr(this.props,n)}function r(n){return this.shouldComponentUpdate=i,Ae(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Pr.prototype=new Ve).isPureReactComponent=!0,Pr.prototype.shouldComponentUpdate=function(e,t){return Vr(this.props,e)||Vr(this.state,t)};var Ya=T.__b;T.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ya&&Ya(e)};var xc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(e){function t(i){var r=Ga({},i);return delete r.ref,e(r,i.ref||null)}return t.$$typeof=xc,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ja=function(e,t){return e==null?null:Qe(Qe(e).map(t))},kc={map:Ja,forEach:Ja,count:function(e){return e?Qe(e).length:0},only:function(e){var t=Qe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Qe},Sc=T.__e;T.__e=function(e,t,i,r){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=i.__e,t.__k=i.__k),n.__c(e,t)}Sc(e,t,i,r)};var Za=T.unmount;function Xa(e,t,i){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Ga({},e)).__c!=null&&(e.__c.__P===i&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Xa(r,t,i)})),e}function Qa(e,t,i){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Qa(r,t,i)}),e.__c&&e.__c.__P===t&&(e.__e&&i.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=i)),e}function si(){this.__u=0,this.t=null,this.__b=null}function eo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function to(e){var t,i,r;function n(a){if(t||(t=e()).then(function(o){i=o.default||o},function(o){r=o}),r)throw r;if(!i)throw t;return Ae(i,a)}return n.displayName="Lazy",n.__f=!0,n}function li(){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),Za&&Za(e)},(si.prototype=new Ve).__c=function(e,t){var i=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(i);var n=eo(r.__v),a=!1,o=function(){a||(a=!0,i.__R=null,n?n(s):s())};i.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Qa(u,u.__c.__P,u.__c.__O)}var f;for(r.setState({__a:r.__b=null});f=r.t.pop();)f.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},si.prototype.componentWillUnmount=function(){this.t=[]},si.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Xa(this.__b,i,r.__O=r.__P)}this.__b=null}var n=t.__a&&Ae(ne,null,e.fallback);return n&&(n.__h=null),[Ae(ne,null,t.__a?null:e.children),n]};var io=function(e,t,i){if(++i[1]===i[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(i=e.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;e.u=i=i[2]}};function Cc(e){return this.getChildContext=function(){return e.context},e.children}function $c(e){var t=this,i=e.i;t.componentWillUnmount=function(){St(null,t.l),t.l=null,t.i=null},t.i&&t.i!==i&&t.componentWillUnmount(),e.__v?(t.l||(t.i=i,t.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,n){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),St(Ae(Cc,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ec(e,t){var i=Ae($c,{__v:e,i:t});return i.containerInfo=t,i}(li.prototype=new Ve).__a=function(e){var t=this,i=eo(t.__v),r=t.o.get(e);return r[0]++,function(n){var a=function(){t.props.revealOrder?(r.push(n),io(t,e,r)):n()};i?i(a):a()}},li.prototype.render=function(e){this.u=null,this.o=new Map;var t=Qe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var i=t.length;i--;)this.o.set(t[i],this.u=[1,0,this.u]);return e.children},li.prototype.componentDidUpdate=li.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,i){io(e,i,t)})};var ro=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ic=/^(?: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]/,Ac=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Tc=/[A-Z0-9]/g,Fc=typeof document<"u",Dc=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Nc(e,t,i){return t.__k==null&&(t.textContent=""),St(e,t),typeof i=="function"&&i(),e?e.__c:null}function Mc(e,t,i){return Da(e,t),typeof i=="function"&&i(),e?e.__c:null}Ve.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ve.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var no=T.event;function Lc(){}function Vc(){return this.cancelBubble}function Oc(){return this.defaultPrevented}T.event=function(e){return no&&(e=no(e)),e.persist=Lc,e.isPropagationStopped=Vc,e.isDefaultPrevented=Oc,e.nativeEvent=e};var jr,Pc={enumerable:!1,configurable:!0,get:function(){return this.class}},ao=T.vnode;T.vnode=function(e){typeof e.type=="string"&&function(t){var i=t.props,r=t.type,n={};for(var a in i){var o=i[a];if(!(a==="value"&&"defaultValue"in i&&o==null||Fc&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in i&&i.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||r!=="input"&&r!=="textarea"||Dc(i.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Ac.test(a)?a=s:r.indexOf("-")===-1&&Ic.test(a)?a=a.replace(Tc,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}r=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),r=="select"&&n.defaultValue!=null&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),i.class&&!i.className?(n.class=i.class,Object.defineProperty(n,"className",Pc)):(i.className&&!i.class||i.class&&i.className)&&(n.class=n.className=i.className),t.props=n}(e),e.$$typeof=ro,ao&&ao(e)};var oo=T.__r;T.__r=function(e){oo&&oo(e),jr=e.__c};var so=T.diffed;T.diffed=function(e){so&&so(e);var t=e.props,i=e.__e;i!=null&&e.type==="textarea"&&"value"in t&&t.value!==i.value&&(i.value=t.value==null?"":t.value),jr=null};var Rc={ReactCurrentDispatcher:{current:{readContext:function(e){return jr.__n[e.__c].props.value}}}};function jc(e){return Ae.bind(null,e)}function lo(e){return!!e&&e.$$typeof===ro}function Bc(e){return lo(e)?hc.apply(null,arguments):e}function zc(e){return!!e.__k&&(St(null,e),!0)}function Uc(e){return e&&(e.base||e.nodeType===1&&e)||null}var Hc=function(e,t){return e(t)},qc=function(e,t){return e(t)},Wc=ne;function co(e){e()}function Kc(e){return e}function Gc(){return[!1,co]}var Yc=$e;function Jc(e,t){var i=t(),r=Oe({h:{__:i,v:t}}),n=r[0].h,a=r[1];return $e(function(){n.__=i,n.v=t,Or(n.__,t())||a({h:n})},[e,i,t]),Ri(function(){return Or(n.__,n.v())||a({h:n}),e(function(){Or(n.__,n.v())||a({h:n})})},[e]),i}var me={useState:Oe,useId:wc,useReducer:Ha,useEffect:Ri,useLayoutEffect:$e,useInsertionEffect:Yc,useTransition:Gc,useDeferredValue:Kc,useSyncExternalStore:Jc,startTransition:co,useRef:we,useImperativeHandle:gc,useMemo:dt,useCallback:bc,useContext:qa,useDebugValue:vc,version:"17.0.2",Children:kc,render:Nc,hydrate:Mc,unmountComponentAtNode:zc,createPortal:Ec,createElement:Ae,createContext:Na,createFactory:jc,cloneElement:Bc,createRef:cc,Fragment:ne,isValidElement:lo,findDOMNode:Uc,Component:Ve,PureComponent:Pr,memo:_c,forwardRef:Rr,flushSync:qc,unstable_batchedUpdates:Hc,StrictMode:Wc,Suspense:si,SuspenseList:li,lazy:to,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Rc};const ye=Symbol.for("@ts-pattern/matcher"),uo=Symbol.for("@ts-pattern/isVariadic"),Bi="@ts-pattern/anonymous-select-key",Br=e=>!!(e&&typeof e=="object"),zi=e=>e&&!!e[ye],oe=(e,t,i)=>{if(zi(e)){const r=e[ye](),{matched:n,selections:a}=r.match(t);return n&&a&&Object.keys(a).forEach(o=>i(o,a[o])),n}if(Br(e)){if(!Br(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],n=[],a=[];for(const o of e.keys()){const s=e[o];zi(s)&&s[uo]?a.push(s):a.length?n.push(s):r.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<r.length+n.length)return!1;const o=t.slice(0,r.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(r.length,n.length===0?1/0:-n.length);return r.every((u,f)=>oe(u,o[f],i))&&n.every((u,f)=>oe(u,s[f],i))&&(a.length===0||oe(a[0],l,i))}return e.length===t.length&&e.every((o,s)=>oe(o,t[s],i))}return Reflect.ownKeys(e).every(r=>{const n=e[r];return(r in t||zi(a=n)&&a[ye]().matcherType==="optional")&&oe(n,t[r],i);var a})}return Object.is(t,e)},_e=e=>{var t,i,r;return Br(e)?zi(e)?(t=(i=(r=e[ye]()).getSelectionKeys)==null?void 0:i.call(r))!=null?t:[]:Array.isArray(e)?ci(e,_e):ci(Object.values(e),_e):[]},ci=(e,t)=>e.reduce((i,r)=>i.concat(t(r)),[]);function Zc(...e){if(e.length===1){const[t]=e;return i=>oe(t,i,()=>{})}if(e.length===2){const[t,i]=e;return oe(t,i,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function de(e){return Object.assign(e,{optional:()=>Ur(e),and:t=>te(e,t),or:t=>fo(e,t),select:t=>t===void 0?di(e):di(t,e)})}function zr(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let i=0;const r=[{value:Object.assign(t,{[uo]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=r[i++])!=null?n:r.at(-1)}}}}))(e),{optional:()=>zr(Ur(e)),select:t=>zr(t===void 0?di(e):di(t,e))})}function Ur(e){return de({[ye]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return t===void 0?(_e(e).forEach(n=>r(n,void 0)),{matched:!0,selections:i}):{matched:oe(e,t,r),selections:i}},getSelectionKeys:()=>_e(e),matcherType:"optional"})})}const Xc=(e,t)=>{for(const i of e)if(!t(i))return!1;return!0},Qc=(e,t)=>{for(const[i,r]of e.entries())if(!t(r,i))return!1;return!0},ed=(e,t)=>{const i=Reflect.ownKeys(e);for(const r of i)if(!t(r,e[r]))return!1;return!0};function te(...e){return de({[ye]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return{matched:e.every(n=>oe(n,t,r)),selections:i}},getSelectionKeys:()=>ci(e,_e),matcherType:"and"})})}function fo(...e){return de({[ye]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return ci(e,_e).forEach(n=>r(n,void 0)),{matched:e.some(n=>oe(n,t,r)),selections:i}},getSelectionKeys:()=>ci(e,_e),matcherType:"or"})})}function z(e){return{[ye]:()=>({match:t=>({matched:!!e(t)})})}}function di(...e){const t=typeof e[0]=="string"?e[0]:void 0,i=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return de({[ye]:()=>({match:r=>{let n={[t??Bi]:r};return{matched:i===void 0||oe(i,r,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??Bi].concat(i===void 0?[]:_e(i))})})}function po(e){return!0}function He(e){return typeof e=="number"}function ut(e){return typeof e=="string"}function ft(e){return typeof e=="bigint"}const ho=de(z(po)),td=de(z(po)),id=ho,pt=e=>Object.assign(de(e),{startsWith:t=>{return pt(te(e,(i=t,z(r=>ut(r)&&r.startsWith(i)))));var i},endsWith:t=>{return pt(te(e,(i=t,z(r=>ut(r)&&r.endsWith(i)))));var i},minLength:t=>pt(te(e,(i=>z(r=>ut(r)&&r.length>=i))(t))),length:t=>pt(te(e,(i=>z(r=>ut(r)&&r.length===i))(t))),maxLength:t=>pt(te(e,(i=>z(r=>ut(r)&&r.length<=i))(t))),includes:t=>{return pt(te(e,(i=t,z(r=>ut(r)&&r.includes(i)))));var i},regex:t=>{return pt(te(e,(i=t,z(r=>ut(r)&&!!r.match(i)))));var i}}),go=pt(z(ut)),qe=e=>Object.assign(de(e),{between:(t,i)=>qe(te(e,((r,n)=>z(a=>He(a)&&r<=a&&n>=a))(t,i))),lt:t=>qe(te(e,(i=>z(r=>He(r)&&r<i))(t))),gt:t=>qe(te(e,(i=>z(r=>He(r)&&r>i))(t))),lte:t=>qe(te(e,(i=>z(r=>He(r)&&r<=i))(t))),gte:t=>qe(te(e,(i=>z(r=>He(r)&&r>=i))(t))),int:()=>qe(te(e,z(t=>He(t)&&Number.isInteger(t)))),finite:()=>qe(te(e,z(t=>He(t)&&Number.isFinite(t)))),positive:()=>qe(te(e,z(t=>He(t)&&t>0))),negative:()=>qe(te(e,z(t=>He(t)&&t<0)))}),rd=qe(z(He)),ht=e=>Object.assign(de(e),{between:(t,i)=>ht(te(e,((r,n)=>z(a=>ft(a)&&r<=a&&n>=a))(t,i))),lt:t=>ht(te(e,(i=>z(r=>ft(r)&&r<i))(t))),gt:t=>ht(te(e,(i=>z(r=>ft(r)&&r>i))(t))),lte:t=>ht(te(e,(i=>z(r=>ft(r)&&r<=i))(t))),gte:t=>ht(te(e,(i=>z(r=>ft(r)&&r>=i))(t))),positive:()=>ht(te(e,z(t=>ft(t)&&t>0))),negative:()=>ht(te(e,z(t=>ft(t)&&t<0)))}),nd=ht(z(ft)),ad=de(z(function(e){return typeof e=="boolean"})),od=de(z(function(e){return typeof e=="symbol"})),sd=de(z(function(e){return e==null})),ld=de(z(function(e){return e!=null}));var ui={__proto__:null,matcher:ye,optional:Ur,array:function(...e){return zr({[ye]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const i=e[0];let r={};if(t.length===0)return _e(i).forEach(a=>{r[a]=[]}),{matched:!0,selections:r};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])};return{matched:t.every(a=>oe(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:_e(e[0])})})},set:function(...e){return de({[ye]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};if(e.length===0)return{matched:!0};const r=(a,o)=>{i[a]=(i[a]||[]).concat([o])},n=e[0];return{matched:Xc(t,a=>oe(n,a,r)),selections:i}},getSelectionKeys:()=>e.length===0?[]:_e(e[0])})})},map:function(...e){return de({[ye]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};const r=(s,l)=>{i[s]=(i[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:Qc(t,(s,l)=>{const u=oe(a,l,r),f=oe(o,s,r);return u&&f}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[..._e(e[0]),..._e(e[1])]})})},record:function(...e){return de({[ye]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var i;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);let r={};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])},[a,o]=e.length===1?[go,e[0]]:e;return{matched:ed(t,(s,l)=>{const u=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=u!==null&&oe(a,u,n),d=oe(a,s,n),h=oe(o,l,n);return(d||f)&&h}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[..._e(e[0]),..._e(e[1])]})})},intersection:te,union:fo,not:function(e){return de({[ye]:()=>({match:t=>({matched:!oe(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:z,select:di,any:ho,unknown:td,_:id,string:go,number:rd,bigint:nd,boolean:ad,symbol:od,nullish:sd,nonNullable:ld,instanceOf:function(e){return de(z(function(t){return i=>i instanceof t}(e)))},shape:function(e){return de(z(Zc(e)))}};class cd extends Error{constructor(t){let i;try{i=JSON.stringify(t)}catch{i=t}super(`Pattern matching error: no pattern matches value ${i}`),this.input=void 0,this.input=t}}const Hr={matched:!1,value:void 0};function Ui(e){return new dd(e,Hr)}let dd=class Bn{constructor(t,i){this.input=void 0,this.state=void 0,this.input=t,this.state=i}with(...t){if(this.state.matched)return this;const i=t[t.length-1],r=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(u,f)=>{a=!0,o[u]=f},l=!r.some(u=>oe(u,this.input,s))||n&&!n(this.input)?Hr:{matched:!0,value:i(a?Bi in o?o[Bi]:o:this.input,this.input)};return new Bn(this.input,l)}when(t,i){if(this.state.matched)return this;const r=!!t(this.input);return new Bn(this.input,r?{matched:!0,value:i(this.input,this.input)}:Hr)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=ud){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function ud(e){throw new cd(e)}var fd=["other","few","many","two","one","zero"],bo=({terms:e,overrides:t,locale:i})=>{const r=new Intl.PluralRules(i);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 f;return((f=o==null?void 0:o[u])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=r.select(o.count);if(!(l in s)){const u=fd.find(f=>f in s);if(!u)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=u}return s[l].replace(/{{(\w+)}}/g,(u,f)=>{var d;return((d=o==null?void 0:o[f])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return n},pd=0;function c(e,t,i,r,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:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--pd,__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(u),u}var vo=Na(null),wo=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:i,locale:r})=>{const n=dt(()=>bo({locale:r,terms:e,overrides:t}),[t,r]);return c(vo.Provider,{value:{t:n,locale:r},children:i})},useTranslation:()=>{const t=qa(vo);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:i})=>bo({terms:e,overrides:t,locale:i})}),hd={conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_duplicate_earlier_attempt:"You've already applied for this role. If that doesn't sound right, it's most likely a hiccup from your earlier attempt — don't worry, we have your application.",submission_failed:"We couldn't submit your application. Choose Restart to try again.",submission_unknown_do_not_resubmit:"We couldn't confirm whether your application went through, and submitting it again won't help. Please don't keep resubmitting — check your email for a confirmation, or contact the employer if nothing arrives.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",submission_cooldown:{one:"Submit will be available again in {{count}} second.",other:"Submit will be available again in {{count}} seconds."},submission_cooldown_ready:"Submit is available again.",captcha_check:"One quick check before we send your application",submission_still_working:"Sending your application, this can take up to a minute. Please keep this page open.",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.",restart:"Restart",chat_messages:"Chat messages",file_name:"File name",file_size:"File size",file_total_size:"{{size}} total",loading:"Loading",minimize:"Minimise"},{TranslationProvider:uh,useTranslation:fh,createTFunction:ph,defaultTerms:gd}=wo({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_pending:"Thanks, we've received your application and are processing it.",submission_failed:"Failed to submit",submission_provider_maintenance:"Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_provider_maintenance_later:"Sorry, our recruitment system is down for scheduled maintenance until later today. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_available_at:"Submit will be available again at {{time}}.",resume_prompt:"You have an unfinished application for this role. Continue where you left off?",resume_continue:"Continue",resume_start_again:"Start again",captcha_failed:"Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.",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_whole:"Enter a whole number",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_file_empty:"This file is empty. If it’s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.",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:bd,useTranslation:se,createTFunction:hh}=wo({...gd,...hd,error_heading:"Something unexpected happened",undo:"Change answer",submission_closed:"This role is no longer accepting applications.",submission_duplicate:"You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.",submission_retryable:"We couldn't submit your application. Please 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.",maximize:"Maximise",submit:"Submit",file_more:{one:"+{{count}} file",other:"+{{count}} files"}}),gh="";function tt(e,t){if(!e)throw new Error(t)}var qr=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(qr):Object.keys(e).sort().reduce((t,i)=>(t[i]=qr(e[i]),t),{}),vd=e=>{let t=JSON.stringify(qr(e)),i=5381;for(let r=0;r<t.length;r++)i=i*33^t.charCodeAt(r);return(i>>>0).toString(36)},wd=Symbol.for("preact-signals");function Wr(){if(Pt>1)Pt--;else{for(var e,t=!1;fi!==void 0;){var i=fi;for(fi=void 0,Kr++;i!==void 0;){var r=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&yo(i))try{i.c()}catch(n){t||(e=n,t=!0)}i=r}}if(Kr=0,Pt--,t)throw e}}var J=void 0,fi=void 0,Pt=0,Kr=0,Hi=0;function mo(e){if(J!==void 0){var t=e.n;if(t===void 0||t.t!==J)return t={i:0,S:e,p:J.s,n:void 0,t:J,e:void 0,x:void 0,r:t},J.s!==void 0&&(J.s.n=t),J.s=t,e.n=t,32&J.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=J.s,t.n=void 0,J.s.n=t,J.s=t),t}}function he(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}he.prototype.brand=wd,he.prototype.h=function(){return!0},he.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)},he.prototype.U=function(e){if(this.t!==void 0){var t=e.e,i=e.x;t!==void 0&&(t.x=i,e.e=void 0),i!==void 0&&(i.e=t,e.x=void 0),e===this.t&&(this.t=i)}},he.prototype.subscribe=function(e){var t=this;return Yr(function(){var i=t.value,r=J;J=void 0;try{e(i)}finally{J=r}})},he.prototype.valueOf=function(){return this.value},he.prototype.toString=function(){return this.value+""},he.prototype.toJSON=function(){return this.value},he.prototype.peek=function(){var e=J;J=void 0;try{return this.value}finally{J=e}},Object.defineProperty(he.prototype,"value",{get:function(){var e=mo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Kr>100)throw new Error("Cycle detected");this.v=e,this.i++,Hi++,Pt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Wr()}}}});function Pe(e){return new he(e)}function yo(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 _o(e){for(var t=e.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function xo(e){for(var t=e.s,i=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=i}function Rt(e){he.call(this,void 0),this.x=e,this.s=void 0,this.g=Hi-1,this.f=4}(Rt.prototype=new he).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Hi))return!0;if(this.g=Hi,this.f|=1,this.i>0&&!yo(this))return this.f&=-2,!0;var e=J;try{_o(this),J=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return J=e,xo(this),this.f&=-2,!0},Rt.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)}he.prototype.S.call(this,e)},Rt.prototype.U=function(e){if(this.t!==void 0&&(he.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)}},Rt.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(Rt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=mo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function md(e){return new Rt(e)}function ko(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Pt++;var i=J;J=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Gr(e),r}finally{J=i,Wr()}}}function Gr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ko(e)}function yd(e){if(J!==this)throw new Error("Out-of-order effect");xo(this),J=e,this.f&=-2,8&this.f&&Gr(this),Wr()}function pi(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}pi.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()}},pi.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ko(this),_o(this),Pt++;var e=J;return J=this,yd.bind(this,e)},pi.prototype.N=function(){2&this.f||(this.f|=2,this.o=fi,fi=this)},pi.prototype.d=function(){this.f|=8,1&this.f||Gr(this)};function Yr(e){var t=new pi(e);try{t.c()}catch(i){throw t.d(),i}return t.d.bind(t)}var Jr;function jt(e,t){T[e]=t.bind(null,T[e]||function(){})}function qi(e){Jr&&Jr(),Jr=e&&e.S()}function So(e){var t=this,i=e.data,r=xd(i);r.value=i;var n=dt(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!va(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},md(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}So.displayName="_st",Object.defineProperties(he.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:So},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),jt("__b",function(e,t){if(typeof t.type=="string"){var i,r=t.props;for(var n in r)if(n!=="children"){var a=r[n];a instanceof he&&(i||(t.__np=i={}),i[n]=a,r[n]=a.peek())}}e(t)}),jt("__r",function(e,t){qi();var i,r=t.__c;r&&(r.__$f&=-2,(i=r.__$u)===void 0&&(r.__$u=i=function(n){var a;return Yr(function(){a=this}),a.c=function(){r.__$f|=1,r.setState({})},a}())),qi(i),e(t)}),jt("__e",function(e,t,i,r){qi(),e(t,i,r)}),jt("diffed",function(e,t){qi();var i;if(typeof t.type=="string"&&(i=t.__e)){var r=t.__np,n=t.props;if(r){var a=i.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in r)&&(s.d(),a[o]=void 0)}else i.U=a={};for(var l in r){var u=a[l],f=r[l];u===void 0?(u=_d(i,l,f,n),a[l]=u):u.o(f,n)}}}e(t)});function _d(e,t,i,r){var n=t in e&&e.ownerSVGElement===void 0,a=Pe(i);return{o:function(o,s){a.value=o,r=s},d:Yr(function(){var o=a.value.value;r[t]!==o&&(r[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}jt("unmount",function(e,t){if(typeof t.type=="string"){var i=t.__e;if(i){var r=i.U;if(r){i.U=void 0;for(var n in r){var a=r[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),jt("__h",function(e,t,i,r){(r<3||r===9)&&(t.__$f|=2),e(t,i,r)}),Ve.prototype.shouldComponentUpdate=function(e,t){var i=this.__$u;if(!(i&&i.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r 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 xd(e){return dt(function(){return Pe(e)},[])}const Zr=(e,t)=>t.some(i=>e instanceof i);let Co,$o;function kd(){return Co||(Co=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Sd(){return $o||($o=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Xr=new WeakMap,Qr=new WeakMap,Wi=new WeakMap;function Cd(e){const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{i($t(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return Wi.set(t,e),t}function $d(e){if(Xr.has(e))return;const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{i(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Xr.set(e,t)}let en={get(e,t,i){if(e instanceof IDBTransaction){if(t==="done")return Xr.get(e);if(t==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return $t(e[t])},set(e,t,i){return e[t]=i,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Eo(e){en=e(en)}function Ed(e){return Sd().includes(e)?function(...t){return e.apply(tn(this),t),$t(this.request)}:function(...t){return $t(e.apply(tn(this),t))}}function Id(e){return typeof e=="function"?Ed(e):(e instanceof IDBTransaction&&$d(e),Zr(e,kd())?new Proxy(e,en):e)}function $t(e){if(e instanceof IDBRequest)return Cd(e);if(Qr.has(e))return Qr.get(e);const t=Id(e);return t!==e&&(Qr.set(e,t),Wi.set(t,e)),t}const tn=e=>Wi.get(e);function Ad(e,t,{blocked:i,upgrade:r,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=$t(o);return r&&o.addEventListener("upgradeneeded",l=>{r($t(o.result),l.oldVersion,l.newVersion,$t(o.transaction),l)}),i&&o.addEventListener("blocked",l=>i(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 Td=["get","getKey","getAll","getAllKeys","count"],Fd=["put","add","delete","clear"],rn=new Map;function Io(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(rn.get(t))return rn.get(t);const i=t.replace(/FromIndex$/,""),r=t!==i,n=Fd.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!(n||Td.includes(i)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(s.shift())),(await Promise.all([u[i](...s),n&&l.done]))[0]};return rn.set(t,a),a}Eo(e=>({...e,get:(t,i,r)=>Io(t,i)||e.get(t,i,r),has:(t,i)=>!!Io(t,i)||e.has(t,i)}));const Dd=["continue","continuePrimaryKey","advance"],Ao={},nn=new WeakMap,To=new WeakMap,Nd={get(e,t){if(!Dd.includes(t))return e[t];let i=Ao[t];return i||(i=Ao[t]=function(...r){nn.set(this,To.get(this)[t](...r))}),i}};async function*Md(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const i=new Proxy(t,Nd);for(To.set(i,t),Wi.set(i,tn(t));t;)yield i,t=await(nn.get(i)||t.continue()),nn.delete(i)}function Fo(e,t){return t===Symbol.asyncIterator&&Zr(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Zr(e,[IDBIndex,IDBObjectStore])}Eo(e=>({...e,get(t,i,r){return Fo(t,i)?Md:e.get(t,i,r)},has(t,i){return Fo(t,i)||e.has(t,i)}}));const hi=typeof indexedDB>"u"?void 0:Ad("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Ld=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:i,...r}=t;return r})});let Ki,an,gi;const Do=()=>{if(!Ki)return gi;const e=Ki;Ki=void 0;const t=Yi(e),i=hi==null?void 0:hi.then(r=>r.put("state",Ld(e.data),t)).finally(()=>{gi===i&&(gi=void 0)});return gi=i,gi},Te={getStateData:async(e,t,i)=>{var n;const r=Yi({...e,flowKeys:t,context:i});return(n=await hi)==null?void 0:n.get("state",r)},getAllStateData:async()=>{var e;return((e=await hi)==null?void 0:e.getAll("state"))??[]},setStateData:e=>{Ki=e,clearTimeout(an),an=setTimeout(()=>void Do(),1e3)},flushStateData:()=>(clearTimeout(an),Do()??Promise.resolve())},Bt=e=>t=>t?t.type===e:!1,Vd=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),No=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Vd()}),Od=e=>Ui(e).with({nativeEvent:{submitter:ui.select(ui.union(ui.instanceOf(HTMLButtonElement),ui.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Gi=(e,t,i,r=0)=>{if(!t.nextId)return i(t.id,{stepsMade:r,remainingSteps:0}),{stepsMade:r,remainingSteps:0};const n=e.find(u=>u.id===t.nextId);if(n===void 0)return{stepsMade:r,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(Gi(e,n,i,r+s).remainingSteps,Gi(e,o,i,r+s).remainingSteps);return i(t.id,{stepsMade:r,remainingSteps:u}),{stepsMade:r,remainingSteps:u}}const l=s+Gi(e,n,i,r+s).remainingSteps;return i(t.id,{stepsMade:r,remainingSteps:l}),{stepsMade:r,remainingSteps:l}},Pd=e=>{const t={},i=e.find(r=>r.isHead);return i&&Gi(e,i,(r,n)=>{t[r]=n}),t},Yi=e=>[...e.flowKeys,e.id,e.version,e.build,vd(e.context)].join("/"),Rd=({data:e,nodes:t})=>{const i=e.startedWriteNodeIds===void 0?t.some(r=>r.type==="integration-application-submit"&&e.nodeHistory.includes(r.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!i&&Yn(t,e.submissions)},Mo=({data:e,nodes:t})=>{var i;return!e.isFinished&&((((i=e.startedWriteNodeIds)==null?void 0:i.length)??0)>0||Yn(t,e.submissions))},We=Pe({state:"idle"}),on=new Set,Et=e=>{const{state:t,flow:i}=We.value;if(t!=="loaded")return;tt(i,"No flow to update");const r=e(i.data);i.data=r,We.value={state:t,flow:i},Te.setStateData(i)},N={current$:We,viewState$:Pe("closed"),prepareFlow:async({flow:e,context:t={},flowKeys:i,title:r,analytics:n,job:a,locationOrigin:o})=>{await Te.flushStateData().catch(()=>{});const s=await Te.getStateData(e,i,t),l=s??No(),u=Yi({...e,flowKeys:i,context:t}),f=s!==void 0&&!on.has(u)&&Rd({data:l,nodes:e.nodes});return f||on.add(u),{data:l,offerResume:f,startedAt:new Date,nodeIdToProgress:Pd(e.nodes),flowKeys:i,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:r,analytics:n,job:a,locationOrigin:o}},commitFlow:e=>{We.value={state:"loaded",flow:e},Te.setStateData(e)},settleResume:e=>{e.offerResume=!1,on.add(Yi(e))},cancelCurrentFlow:()=>{We.value={state:"idle"},N.viewState$.value="closed"},markAsFinished:()=>Et(e=>({...e,isFinished:!0})),markAsInteracted:()=>Et(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Et(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{Et(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Te.flushStateData()},restart:()=>{const{state:e,flow:t}=We.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const i={...No(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},r={...t,data:i,startedAt:new Date,offerResume:!1};We.value={state:e,flow:r},Te.setStateData(r)},addMessage:(e,t)=>{const i={...e,groupId:t};return Et(r=>(r.messages.push(i),r))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:i}=We.value;tt(t==="loaded","Application not loaded");const r=i.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));i.data.messages=r,Te.setStateData(i)},setSubmission:(e,t)=>Et(i=>(t===null?delete i.submissions[e]:i.submissions[e]=t,i)),setInput:e=>Et(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{We.peek().flow===e&&(We.value={state:"loaded",flow:e}),Te.setStateData(e),await Te.flushStateData()}},jd=()=>{const{t:e}=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:e("error_heading")})})]})},Ji=e=>{const{t}=se();return c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:t("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"})})})]})},Lo=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Ji,{class:"text-neutral-6 h-8 w-8"})}),Bd=e=>{const i=e/100,r=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-i,r))*100)}%`},zd=Ct("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"}}),bi=({class:e,children:t,variant:i,...r})=>c("button",{class:et(zd({variant:i}),e),...r,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})}),Vo=()=>c("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Ud=()=>{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 i=e[t];if(i===void 0)return null;const r=100*(i.stepsMade/(i.remainingSteps+i.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Bd(r)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Hd=({children:e,params:t})=>{const{t:i}=se(),r=N.viewState$;return c(ne,{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",{"aria-label":i("minimize"),onClick:()=>{r.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:sn,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:et({hidden:N.current$.value.state!=="loaded"||r.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(bi,{class:"mx-1","aria-label":i("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(bi,{class:"view-switch mx-1",onTouchStart:sn,"aria-label":i("minimize"),onClick:()=>r.value="minimised",children:c(Vo,{})},"minmax")]})]}),c(Ud,{})]})})};function sn(){}const qd=to(()=>Promise.resolve().then(()=>nh).then(e=>e.ChatbotBody)),Oo=Ct("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"}}}),Po=Ct("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"}}}),Wd=({open:e,...t})=>{const i=we(null);return $e(()=>{const r=i.current;r&&(e?r.showModal():r.close())},[e]),c("dialog",{ref:i,...t})},Kd=({logger:e,apiClient:t,analytics:i,talentBankClient:r,params:n})=>{const{state:a,flow:o}=N.current$.value,s=N.viewState$.value,l=a!=="idle"&&s==="maximised",u=we(null),f=o?[...o.data.nodeHistory].reverse().map(d=>o.nodes.find(h=>h.id===d)).find(d=>(d==null?void 0:d.type)==="flow-section"):void 0;return c(bd,{terms:n.terms,locale:void 0,children:[c(Wd,{open:l,onClose:()=>N.viewState$.value="minimised",children:c("div",{ref:u,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Oo({view:"maximised"}),children:c("div",{class:Po({view:"maximised"}),children:[c(Hd,{params:n,children:f?c(ne,{children:[c("span",{class:"block",children:f.data.title}),c("span",{class:"block truncate text-xs font-normal",children:o==null?void 0:o.title})]}):o==null?void 0:o.title}),Ui({state:a,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Lo,{},"loading")).with({state:"loaded"},()=>c(si,{fallback:c(Lo,{},"loading"),children:c(qd,{analytics:i,apiClient:t,logger:e,talentBankClient:r})})).with({state:"error"},()=>c(jd,{})).exhaustive()]})})}),s==="minimised"?c(Gd,{flow:o}):null]})},Gd=({flow:e})=>{const{t}=se();return c("div",{class:Oo({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Po({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:sn,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(bi,{class:"mx-1","aria-label":t("close_application"),onClick:N.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Yd=`[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!important}[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-1{bottom:4px}[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-none{resize:none}[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-end{align-items:flex-end}[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-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size: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-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-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[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{--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(3px + 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-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] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--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] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[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-12:has(+*>input:focus){color:var(--i-color-n-12)}[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)}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}
2
+ `,Ro="inploi-chatbot",ln=`[data-widget='${Ro}']`,Jd=()=>({getChatbotElement:()=>document.querySelector(ln),getOrCreateChatbotElement:()=>{const e=document.querySelector(ln);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Ro,t}}),Zd=25,jo=Pe(()=>{}),Bo=["wheel","touchmove","keydown"],Xd=(e,t)=>new Promise((i,r)=>{if(t!=null&&t.aborted)return r(new lt);const n=setTimeout(i,e);t==null||t.addEventListener("abort",()=>{clearTimeout(n),r(new lt)},{once:!0})}),ie={onSubmitSuccessFn$:Pe(()=>{}),onInteractionFn$:Pe(()=>{}),isBotTyping$:Pe(!1),captchaVisible$:Pe(!1),themeMode$:Pe("light"),isReadingHistory$:Pe(!1),scrollToEnd:()=>jo.value()},Qd=()=>{const e=we(null),t=we(-1/0);$e(()=>{const r=e.current;if(!r)return;const n=()=>{ie.isReadingHistory$.value=!1,r.scrollTo({top:r.scrollHeight,behavior:"instant"})};jo.value=n;const a=()=>t.current=performance.now(),o=()=>{r.scrollHeight-r.scrollTop-r.clientHeight<=24?ie.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(ie.isReadingHistory$.value=!0)};r.addEventListener("scroll",o,{passive:!0});for(const l of Bo)r.addEventListener(l,a,{passive:!0});const s=new ResizeObserver(()=>{ie.isReadingHistory$.peek()||n()});return s.observe(r),r.firstElementChild&&s.observe(r.firstElementChild),()=>{r.removeEventListener("scroll",o);for(const l of Bo)r.removeEventListener(l,a);s.disconnect()}},[]);const i=dt(()=>({setSubmission:(n,a)=>N.setSubmission(n,a),captcha:{container:()=>{var n;return((n=e.current)==null?void 0:n.querySelector("[data-captcha-slot]"))??null},get theme(){return ie.themeMode$.peek()},reveal:n=>{ie.captchaVisible$.value=n,n&&requestAnimationFrame(()=>{var a,o;(o=(a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))==null||o.focus(),ie.scrollToEnd()})}},send:async({message:n,signal:a,groupId:o})=>{if(await Ui(n).with({author:"bot",type:"text"},async s=>{if(a!=null&&a.aborted)throw new lt;ie.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*Zd;try{await Xd(l,a)}finally{ie.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new lt;N.addMessage(n,o)},input:({input:n,signal:a})=>{if(a!=null&&a.aborted)throw new lt;return N.setInput(n),new Promise(o=>{const s=l=>{if(a!=null&&a.aborted)throw new lt;t.current=-1/0,N.setInput(void 0),n.key&&N.setSubmission(n.key,l),o(l)};ie.onSubmitSuccessFn$.value=s})}}),[]);return{chatRef:e,chatService:i}};var 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]}},iu=(e,t=1,i)=>r=>{const[n,a]=tu[i][r];return"oklch("+n+"% "+a*t+" "+e+")"},cn=e=>{const t=iu(e.hue,e.chroma,e.mode);return Object.fromEntries(eu.map(i=>[e.prefix+i,e.transform(t(i))]))},dn=e=>e,ru=e=>{const t=Object.keys(e).flatMap(i=>{const r=e[i];return typeof r=="object"&&r!==null?Object.keys(r).map(n=>{const a=r[n];return[`${String(i)}.${n}`,a]}):[[i,r]]});return Object.fromEntries(t)},Zi=e=>!!e&&typeof e=="object"&&!Array.isArray(e),un=(e,...t)=>{if(!t.length)return e;const i=t.shift();if(Zi(e)&&Zi(i))for(const r in i){const n=i[r];if(Zi(n)){e[r]||Object.assign(e,{[r]:{}});const a=e[r];Zi(a)&&un(a,n)}else Object.assign(e,{[r]:i[r]})}return un(e,...t)},nu=e=>{function t(i,r){const n=[e.prefix,r.toString().replace(/\./g,"-")].join("");return i==="declaration"?`--${n}`:`var(--${n})`}return t},au=()=>({core:e=>({semantic:t=>({component:i=>({from:r=>{const{theme:n,getToken:a}=r,o=h=>a("reference",h.toString()),s=e({theme:n}),l=t({theme:n,core:o,raw:{core:s}}),u=i({theme:n,core:o,semantic:o,raw:{core:s,semantic:l}}),f=ru(un(s,l,u)),d=([h,g],w)=>{const _=[w,h].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(C=>d(C,_)):[[r.getToken("declaration",_),g]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(h=>d(h))),ref:h=>a("reference",h.toString())}}})})})});const[fn,pn,zo]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],ou=au().core(({theme:e})=>({color:{black:fn,white:pn,lowest:e.mode==="light"?pn:fn,highest:e.mode==="light"?fn:pn,...cn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:dn}),...cn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:dn}),...cn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:dn})},typography:{}})).semantic(({core:e,raw:t,theme:i})=>{const r=(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:r("n-8",i.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:zo,"bg-hover":r("n-10",.2),"bg-active":r("n-10",.3)}}}).component(({raw:e,theme:t,semantic:i,core:r})=>{const n=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:r(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":r(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":i("color.divider"),"strong-shadow":n("a-9",.05)},"status-bar":{bg:n("n-2",.8),"bg-button":zo,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":r(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),su=nu({prefix:"i-"}),lu=e=>{const t=ou.from({theme:e,getToken:su}),i=Object.entries(t.declarations).map(([r,n])=>`${r}: ${n};`);return`${ln} {
3
3
  ${i.concat(i).join(`
4
4
  `)}
5
- }`},cu="14.13.1",du=(e,t=cu)=>t===void 0?e:{fetch:(i,r)=>{if(i!=="/flow/submit")return e.fetch(i,r);const n=new Headers(r==null?void 0:r.headers);return n.set("x-inploi-widget-version",t),e.fetch(i,{...r,headers:Object.fromEntries(n.entries())})}},uu=({_internal_domManager:e=Jd(),theme:t,terms:i,feedback:r})=>Ll(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:u})=>{let f=!1,d=0;const h=du(n),g=l&&u?ic({environment:u,publishableKey:l,logger:o}):void 0,w=v=>v===d,_=()=>{if(typeof window>"u")return;d++,Te.flushStateData().catch(()=>{}),N.cancelCurrentFlow(),ie.isBotTyping$.value=!1;const v=e.getChatbotElement();v&&(St(null,v),v.remove()),f=!1,o.info("Chatbot plugin destroyed")},C=()=>{if(typeof window>"u")return;const v=d,k=[Ae("style",{id:"inploi-chatbot-styles"},Yd),Ae("style",{id:"inploi-chatbot-theme"},lu(t))],$=e.getOrCreateChatbotElement();if(ie.themeMode$.value=t.mode,St(Ae(ae,{},[k,Ae(Kd,{apiClient:h,logger:o,analytics:s,talentBankClient:g,params:{theme:t,terms:i,feedback:r}})]),$),r){const I=M=>{var K,D;if(!w(v))return;const B=(K=e.getChatbotElement())==null?void 0:K.querySelector("dialog");B&&fu({instance:M({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((D=r.params)==null?void 0:D.terms)??{},host:B})};r.plugin instanceof Promise?r.plugin.then(({feedbackPlugin:M})=>{I(M())}).catch(M=>{o.error("Error preparing feedback plugin",M)}):I(r.plugin)}f=!0},S=async(v,k)=>{if(!w(k))return;Il({context:v.context||{},schema:v.flow.context_schema,logger:o});const $=await N.prepareFlow(v);w(k)&&N.commitFlow($)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(f)return;C(),o.info("Chatbot plugin prepared")}catch(v){o.error("Error preparing chatbot plugin",v)}},fetchFlowByJobId:async(v,k)=>{const $=(k==null?void 0:k.idType)==="inploi"?"internal":"external";return a.request(oc,{params:{id:v},searchParams:{id_type:$}}).then(I=>({flow:I.flow,title:I.job.title,flowKeys:[I.job.id,...(k==null?void 0:k.flowKeys)??[]],job:ac(I,{id:v,idType:$}),...k,context:{user:I.user,...k==null?void 0:k.context}}))},fetchFlowById:async(v,k)=>a.request(sc,{params:{id:v}}).then($=>{var I;return{flow:$.flow,title:"Chatbot",flowKeys:(k==null?void 0:k.flowKeys)??[],...k,analytics:{customProperties:{flow_id:$.flow.id,flow_version:$.flow.version,...(I=k==null?void 0:k.analytics)==null?void 0:I.customProperties}}}}),open:async v=>{if(!(typeof window>"u"))try{N.cancelCurrentFlow(),N.viewState$.value="maximised",f||C();const k=d;v instanceof Promise?(N.current$.value={state:"loading"},v.then($=>S($,k)).catch($=>{w(k)&&(o.error("Error loading flow",$),N.current$.value={state:"error"})})):await S(v,k)}catch(k){o.error("Error starting flow",k)}},hasApplicationInProgress:async v=>{const k=await Te.getStateData(v.flow,v.flowKeys,v.context??{});return k!==void 0&&Mo({data:k,nodes:v.flow.nodes})},hasAnyApplicationInProgress:async()=>(await Te.getAllStateData()).some(v=>Mo({data:v,nodes:[]})),close:async()=>{typeof window>"u"||(N.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:_}});function fu({instance:e,terms:t,theme:i,host:r}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:i.chroma??1,hue:i.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:i.mode,corners:"rounded",highlights:"stroke"},terms:t,host:r})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=uu;var pu="9.10.0",Uo=`https://sdk.inploi.com/@inploi/flows@${pu}/cdn/captcha/index.html`,hu=new URL(Uo).origin,Ho=3e4,gu=5*6e4,bu=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",hn=new WeakMap,vu=e=>{let t=hn.get(e);return t||(t=e.fetch("/flow/captcha").then(i=>{let r=i==null?void 0:i.site_key;return typeof r=="string"&&r!==""?r:void 0}).catch(i=>{throw hn.delete(e),i}),hn.set(e,t)),t},wu=(e,t={})=>new Promise((i,r)=>{let{signal:n,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,u=()=>{},f=_=>{l||(l=!0,clearTimeout(g),n==null||n.removeEventListener("abort",h),u(),_())},d=_=>f(()=>r(new Error(_))),h=()=>d("Captcha aborted"),g,w=_=>{clearTimeout(g),g=setTimeout(()=>d("Captcha timed out"),_)};if(w(Ho),n==null?void 0:n.aborted)return h();n==null||n.addEventListener("abort",h),(async()=>{let _=await vu(e);if(_===void 0)return f(()=>i(void 0));if(l)return;let C=document.createElement("iframe");C.src=`${Uo}?${new URLSearchParams({sitekey:_,origin:window.location.origin,...o&&{theme:o}}).toString()}`,C.title="Cloudflare security check",C.style.cssText=`display:block;border:0;width:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(C):(C.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(C));let S=!1,v=k=>{if(!C.contentWindow||k.source!==C.contentWindow||k.origin!==hu||!bu(k.data))return;let $=k.data;switch($.type){case"token":return f(()=>i($.token));case"resize":C.style.height=`${Math.max(0,Math.ceil($.height))}px`;return;case"before-interactive":return S=!0,w(gu),s==null?void 0:s();case"after-interactive":return S=!1,w(Ho);case"error":!S&&!$.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("Captcha timed out")}};window.addEventListener("message",v),u=()=>{window.removeEventListener("message",v),C.remove()}})().catch(_=>f(()=>r(_)))}),qo=({condition:e,context:t,submissions:i,ifBlock:r})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=Jn({context:t,key:n,path:a,submissions:i});if(!o)return!1;switch(o.type){case"address":{let s=ri(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=ri(o.value,a),l={...r,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return vi(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return vi(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return vi(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(u=>typeof u=="string")?vi(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"?Fi(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 ${r.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}},vi=(e,{context:t,submissions:i})=>{let r="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of r)if(qo({condition:n,context:t,submissions:i,ifBlock:e}))return!0;return!1}else{for(let n of r)if(!qo({condition:n,context:t,submissions:i,ifBlock:e}))return!1;return!0}},mu=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,yu=(e,{context:t,submissions:i})=>e.replace(mu,(r,n,a="")=>{let[o,...s]=n.trim().split("."),l=Jn({key:o,path:s,submissions:i,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} (${Nt(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 Fi(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let u=ri(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(f=>typeof f=="string"))return u.join(", ")}break}}return a});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function _u(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function gn(e,t,i=""){const r=_u(e),n=e==null?void 0:e.length,a=t!==void 0;if(!r||a&&n!==t){const o=i&&`"${i}" `,s=a?` of length ${t}`:"",l=r?`length=${n}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Wo(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function xu(e,t){gn(e,void 0,"digestInto() output");const i=t.outputLen;if(e.length<i)throw new Error('"digestInto() output" expected to be of length >='+i)}function bn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function vn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ke(e,t){return e<<32-t|e>>>t}const ku=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),Su=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Cu(e){if(gn(e),ku)return e.toHex();let t="";for(let i=0;i<e.length;i++)t+=Su[e[i]];return t}function $u(e,t={}){const i=(n,a)=>e(a).update(n).digest(),r=e(void 0);return i.outputLen=r.outputLen,i.blockLen=r.blockLen,i.create=n=>e(n),Object.assign(i,t),Object.freeze(i)}const Eu=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Iu(e,t,i){return e&t^~e&i}function Au(e,t,i){return e&t^e&i^t&i}class Tu{constructor(t,i,r,n){pe(this,"blockLen");pe(this,"outputLen");pe(this,"padOffset");pe(this,"isLE");pe(this,"buffer");pe(this,"view");pe(this,"finished",!1);pe(this,"length",0);pe(this,"pos",0);pe(this,"destroyed",!1);this.blockLen=t,this.outputLen=i,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(t),this.view=vn(this.buffer)}update(t){Wo(this),gn(t);const{view:i,buffer:r,blockLen:n}=this,a=t.length;for(let o=0;o<a;){const s=Math.min(n-this.pos,a-o);if(s===n){const l=vn(t);for(;n<=a-o;o+=n)this.process(l,o);continue}r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(i,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Wo(this),xu(t,this),this.finished=!0;const{buffer:i,view:r,blockLen:n,isLE:a}=this;let{pos:o}=this;i[o++]=128,bn(this.buffer.subarray(o)),this.padOffset>n-o&&(this.process(r,0),o=0);for(let d=o;d<n;d++)i[d]=0;r.setBigUint64(n-8,BigInt(this.length*8),a),this.process(r,0);const s=vn(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const u=l/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)s.setUint32(4*d,f[d],a)}digest(){const{buffer:t,outputLen:i}=this;this.digestInto(t);const r=t.slice(0,i);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:i,buffer:r,length:n,finished:a,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=a,t.length=n,t.pos=s,n%i&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const ht=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Fu=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),gt=new Uint32Array(64);class Du extends Tu{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:i,C:r,D:n,E:a,F:o,G:s,H:l}=this;return[t,i,r,n,a,o,s,l]}set(t,i,r,n,a,o,s,l){this.A=t|0,this.B=i|0,this.C=r|0,this.D=n|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,i){for(let d=0;d<16;d++,i+=4)gt[d]=t.getUint32(i,!1);for(let d=16;d<64;d++){const h=gt[d-15],g=gt[d-2],w=Ke(h,7)^Ke(h,18)^h>>>3,_=Ke(g,17)^Ke(g,19)^g>>>10;gt[d]=_+gt[d-7]+w+gt[d-16]|0}let{A:r,B:n,C:a,D:o,E:s,F:l,G:u,H:f}=this;for(let d=0;d<64;d++){const h=Ke(s,6)^Ke(s,11)^Ke(s,25),g=f+h+Iu(s,l,u)+Fu[d]+gt[d]|0,_=(Ke(r,2)^Ke(r,13)^Ke(r,22))+Au(r,n,a)|0;f=u,u=l,l=s,s=o+g|0,o=a,a=n,n=r,r=g+_|0}r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(r,n,a,o,s,l,u,f)}roundClean(){bn(gt)}destroy(){this.set(0,0,0,0,0,0,0,0),bn(this.buffer)}}class Nu extends Du{constructor(){super(32);pe(this,"A",ht[0]|0);pe(this,"B",ht[1]|0);pe(this,"C",ht[2]|0);pe(this,"D",ht[3]|0);pe(this,"E",ht[4]|0);pe(this,"F",ht[5]|0);pe(this,"G",ht[6]|0);pe(this,"H",ht[7]|0)}}const Mu=$u(()=>new Nu,Eu(1));var Ko=e=>{let t=e.find(i=>i.isHead);if(!t)throw new Error("No head node found");return t},wn=e=>{var t,i;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(i=[...e.data.messages].reverse().find(r=>r.groupId&&e.nodes.some(n=>n.id===r.groupId&&n.type.startsWith("question-"))&&(r.type==="system"||"author"in r&&r.author==="user")))==null?void 0:i.groupId},mn=e=>Array.isArray(e)?e.map(mn):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[i])=>t.localeCompare(i)).map(([t,i])=>[t,mn(i)])):typeof e=="function"?void 0:e,Lu=e=>Cu(Mu(new TextEncoder().encode(JSON.stringify(mn(e)))));function Vu(e,t,i,r){var n;if(r!=null&&r.aborted)return;let a=Lu(i),o=(n=e.data).preApplyFingerprints??(n.preApplyFingerprints=[]);if(o.includes(a))return;o.push(a);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(i)}).catch(()=>{let u=o.indexOf(a);u!==-1&&o.splice(u,1)}).finally(()=>{clearTimeout(l)})}var Go=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Re=(e,t)=>yu(e,Go(t)),Ou=(e,t)=>vi(e,Go(t)),Yo=({node:e,nodes:t,stopWhen:i})=>{if((i==null?void 0:i(e))===!0)return e;let r=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(r)return Yo({node:r,nodes:t,stopWhen:i})},Pu=({childNode:e,nodes:t})=>{let i=t.filter(r=>r.type==="if-block").find(r=>{if(!r.branchId)return!1;let n=t.find(o=>o.id===r.branchId);if(!n)return!1;let a=Yo({node:n,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(i!=null&&i.nextId)return t.find(r=>r.id===i.nextId)},Ru=3,ju=({flow:e,analytics:t,logger:i,talentBankClient:r,context:n,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:u,persistWriteBarrier:f,onSubmitNetworkError:d,closedRoleBehaviour:h,settledOutcomes:g=h,dateEchoLocale:w,onFlowEnd:_,onInterpret:C,forceSubmitConfirmation:S,flowType:v,t:k})=>{var $;let I=new AbortController,M={submitAccepted:!1};($=e.data).startedWriteNodeIds??($.startedWriteNodeIds=e.nodes.flatMap(D=>{var U,L;if(D.type!=="integration-application-submit"||!e.data.nodeHistory.includes(D.id))return[];let P=D.data.key?(U=o())==null?void 0:U[D.data.key]:void 0;return(P==null?void 0:P.type)==="integration"&&((L=Qn(P.value))==null?void 0:L.verdict)==="not_submitted"?[]:[D.id]}));let B={...t.service,log:D=>t.service.log({...D,customProperties:{...D.customProperties,...t.customProperties}})},K=async(D,P)=>{let U=I.signal;if(U.aborted)return;let L=o(),V=s(),q=(V==null?void 0:V.submitNodeId)===D.id?e.nodes.find(O=>{var X;return O.id===V.fileQuestionNodeId&&O.type==="question-file"&&((X=L==null?void 0:L[O.data.key])==null?void 0:X.type)!=="file"}):void 0;if(q)return K(q,P);C==null||C(D,P);try{await Bu({flow:e,analytics:B,logger:i,talentBankClient:r,apiClient:a,context:n,node:D,submissions:L,applicationRecovery:V,setApplicationRecovery:async O=>{if(!U.aborted)try{await l(O)}catch(X){i.error("Failed to persist application recovery",X)}},forceSubmitConfirmation:S||(V==null?void 0:V.submitNodeId)===D.id,run:M,persistWriteBarrier:f,onSubmitNetworkError:d,settledOutcomes:g,dateEchoLocale:w,flowType:v,signal:U,t:k,chat:{sendMessage:async O=>u.send({groupId:D.id,message:O,signal:U}),userInput:async O=>u.input({input:O,signal:U}),setSubmission:(O,X)=>{U.aborted||u.setSubmission(O,X)},captcha:u.captcha},next:O=>{if(U.aborted)return;let X=(V==null?void 0:V.fileQuestionNodeId)===D.id?V.submitNodeId:O,G=X?e.nodes.find(ge=>ge.id===X):Pu({childNode:D,nodes:e.nodes});return G?K(G,D):_==null?void 0:_(D)},end:()=>{U.aborted||(_==null||_(D))}})}catch(O){if(O instanceof st)return;throw O}};return{interpret:async D=>{let P=e.nodes.find(U=>U.id===D)??Ko(e.nodes);return K(P)},undo:D=>{var X;if(delete e.data.reviewReplay,((X=e.data.startedWriteNodeIds)==null?void 0:X.length)||e.data.isFinished)return{removed:0};let P=wn(e),U=P?D.lastIndexOf(P):-1,L=e.nodes.find(G=>G.id===P);if(U===-1||!L)return{removed:0};let V=e.nodes.find(G=>G.id===D[D.length-1]);I.abort();let q=D.splice(U);e.data.messages=e.data.messages.filter(G=>!G.groupId||!q.includes(G.groupId)),e.data.currentInput=null;let O=o();for(let G of q.slice(1)){let ge=e.nodes.find(fe=>fe.id===G);if(!(!ge||!O||ge.id===P)&&("key"in ge.data&&ge.data.key&&delete O[ge.data.key],"keys"in ge.data))for(let fe of Object.values(ge.data.keys))typeof fe=="string"&&delete O[fe]}return I=new AbortController,K(L,V),{removed:q.length}},abort:()=>{I.abort()}}};async function Bu(e){let 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 uf({...e,node:t});case"text":return ef({...e,node:t});case"image":return tf({...e,node:t});case"question-text":return rf({...e,node:t});case"question-enum":return of({...e,node:t});case"question-number":return nf({...e,node:t});case"question-phone":return af({...e,node:t});case"question-boolean":return sf({...e,node:t});case"question-file":return cf({...e,node:t});case"question-address":return lf({...e,node:t});case"end-flow":return df({...e,node:t});case"if-block":return Qu({...e,node:t});case"jump":return Hu({...e,node:t});case"link":return Xu({...e,node:t});case"integration-application-submit":return Zu({...e,node:t});case"add-submission":return qu({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Uu({...e,node:t});case"feedback":return zu({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function zu({next:e,node:t}){e(t.nextId)}async function Uu({next:e,node:t,talentBankClient:i,submissions:r,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(r&&i){let 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 i.checkDuplicate({email:ll({key:t.data.email,submissions:r}).toString(),jobId:u,scope:t.data.scope})}catch(f){a.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Hu({next:e,node:t}){e(t.data.targetId)}async function qu({next:e,node:t,logger:i,submissions:r,context:n}){if(!r){i.error("Submissions not found");return}r[t.data.key]={type:"string",value:Re(t.data.value,{submissions:r,context:n})},e(t.nextId)}var Wu=5e3,Ku=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Gu=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?ta:e.throttles?wr:ea)),Yu=(e,t,i)=>{let{waitMs:r,throttles:n,maintenance:a}=ml(t==null?void 0:t.throttles,i);return{key:e,until:Date.now()+r,...n!==void 0&&{throttles:n},...a&&{maintenance:a}}},Ju=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],yn=e=>e instanceof Error&&Ju.includes(e.name)?e:void 0,Jo=e=>{let t=yn(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Zu({chat:e,next:t,end:i,node:r,logger:n,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:u,setApplicationRecovery:f,forceSubmitConfirmation:d,flowType:h,run:g,persistWriteBarrier:w,signal:_,onSubmitNetworkError:C,settledOutcomes:S,t:v}){var K,D;let k=async({redirect_url:P,message:U,button_text:L})=>{let{anonymous_id:V,session_id:q}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:U??v("submission_redirect_message")});try{let O=new URL(P);V&&!O.searchParams.has("anonymous_id")&&O.searchParams.set("anonymous_id",V),await e.sendMessage({type:"link",href:O.toString(),text:L??v("complete_submission"),onClick:()=>{if(!q){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:q,flow_version:l.version,href:O.toString(),job:l.job}})}})}catch(O){n.error(`Invalid redirect URL: ${P}`,O),e.sendMessage({type:"system",variant:"error",text:v("redirect_url_error")})}};if((K=l.data.startedWriteNodeIds)!=null&&K.includes(r.id)&&(u==null?void 0:u.submitNodeId)!==r.id){let P=(D=l.data.submitRedirects)==null?void 0:D[r.id];return P?(await k(P),t(r.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:v("submission_unknown")}),i())}let $=Ku(r.id,l.job),I=0,M=g.submitAccepted&&r.data.skipConfirmation===!0&&(u==null?void 0:u.submitNodeId)!==r.id,B=async P=>{var $i,sr,lr,Pn,Ei,p,b,m,E;let U=(($i=l.data.submitCooldown)==null?void 0:$i.key)===$?l.data.submitCooldown:void 0;U&&(U.until=Gu(U));let L=U==null?void 0:U.until;(l.data.reviewRequiresSend===!0&&!M||P!==!0||L!==void 0&&L>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel,...L!==void 0&&{availableAt:L}}}),M=!1;let V;if(r.data.captcha){let y=e.captcha,x=!0;try{V=await wu(a,{signal:_,container:(y==null?void 0:y.container())??null,theme:y==null?void 0:y.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:v("captcha_check")}).catch(()=>{}).then(()=>{x&&(y==null||y.reveal(!0))})}})}catch(F){if(n.error("Captcha check failed",F),_.aborted)return}finally{x=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:v("submitting")});let{anonymous_id:q,session_id:O}=s.getSessionInfo();if(_.aborted)return;let X=((sr=l.data.startedWriteNodeIds)==null?void 0:sr.includes(r.id))===!0;if((u==null?void 0:u.submitNodeId)===r.id&&await f(void 0),X||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],r.id]),await w().catch(y=>n.error("Failed to persist application write barrier",y)),_.aborted)return;let G,ge=setTimeout(()=>{G=e.sendMessage({type:"loading",semantic:"submission-still-working",text:v("submission_still_working")}).catch(y=>n.error("Failed to send submission progress message",y))},Wu),fe,Q=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:q,session_id:O,job:l.job,flow_build:l.build,...V!==void 0&&{captcha_token:V},submissions:ol(l.nodes,sl(o||{},r.data.submitKeys)),pre_apply:gr(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{fe=y;let x=Jo(y);return(x==null?void 0:x.data)!==void 0?x.data:y});if(clearTimeout(ge),await G,_.aborted)return;if(fe!==void 0&&!yn(fe)&&C)return await C(fe,_),B(!0);r.data.key&&e.setSubmission(r.data.key,{type:"integration",value:Q});let Si=(lr=Jo(fe))==null?void 0:lr.status,Yt=typeof Si=="number"?Si:void 0,j=Qn(Q,Yt),Jt=j===void 0&&Yt===429,Zt=S==="terminal"&&((j==null?void 0:j.outcome)==="closed"||(j==null?void 0:j.outcome)==="duplicate"),mt=l.data.failedAttemptAt,Tt=mt==null?void 0:mt[$];mt&&Tt!==void 0&&Tt>Date.now()&&(Tt=mt[$]=Date.now());let Xt=Tt!==void 0&&Date.now()-Tt<vl||((Pn=l.data.unconfirmedAttemptKeys)==null?void 0:Pn.includes($))===!0,Ci=(Ei=yn(fe))==null?void 0:Ei.status,ot=Sl(Q,typeof Ci=="number"?Ci:void 0);ot&&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:ot.service,response:ot.response,captured:(Q==null?void 0:Q.captured)===!0,flow_type:(h==null?void 0:h())??"CHATBOT_DRAWER",job:l.job,...(j==null?void 0:j.outcome)==="duplicate"&&{outcome:Xt?"duplicate_after_own_attempt":"duplicate"},...ot.outcome&&{outcome:ot.outcome}}});let Qt=br(Q)||(Q==null?void 0:Q.success)===!0;if((Qt||vr(Q))&&(g.submitAccepted=!0),Qt&&((p=l.data.submitCooldown)==null?void 0:p.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await w().catch(y=>n.error("Failed to persist submit cooldown reset",y))),br(Q)){let{redirect_url:y,message:x,button_text:F}=Q.integration_response.data,H={redirect_url:y,message:x,button_text:F};return _.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[r.id]:H},await w().catch(W=>n.error("Failed to persist submit redirect",W)),await k(H),t(r.nextId))}let or=vr(Q);if(or)return await e.sendMessage({type:"system",variant:"success",text:or.message??v("submission_pending")}),t(r.nextId);if((Q==null?void 0:Q.success)===!0)return r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:v("submission_completed")}),t(r.nextId);let ei=kl(j),ti=ei!==void 0&&((b=o==null?void 0:o[ei])==null?void 0:b.type)==="file"?ei:void 0,Ft=ti===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===ti);if(!Ft&&!Zt&&!na(j)&&(l.data.submitCooldown=Yu($,U,j)),(j==null?void 0:j.outcome)!=="duplicate"&&!Jt&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[$]:Date.now()},(m=l.data.unconfirmedAttemptKeys)!=null&&m.includes($)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==$))),(j==null?void 0:j.verdict)==="not_submitted"||(j==null?void 0:j.outcome)==="duplicate"||(j==null?void 0:j.outcome)==="closed"||Jt||hl(Q,Yt)?(X||(l.data.startedWriteNodeIds=(E=l.data.startedWriteNodeIds)==null?void 0:E.filter(y=>y!==r.id)),(u==null?void 0:u.submitNodeId)===r.id&&await f(u),await w().catch(y=>n.error("Failed to persist application write barrier release",y))):await w().catch(y=>n.error("Failed to persist submit cooldown",y)),j){if(n.error(fe??j.message),Ft&&ti!==void 0)return e.setSubmission(ti,null),await f({fileQuestionNodeId:Ft.id,submitNodeId:r.id}),await e.sendMessage({type:"system",variant:"error",text:v("submission_unreadable_document")}),t(Ft.id);if(j.outcome==="duplicate")return await e.sendMessage({type:"system",variant:Zt?"success":"info",semantic:"submission-duplicate",text:v(Xt?"submission_duplicate_earlier_attempt":"submission_duplicate")}),Zt?(delete l.data.submitCooldown,i()):B(!1);if(j.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:v("submission_closed")}),Zt?(delete l.data.submitCooldown,i()):B(!1);let y=wl(j);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?v("submission_provider_maintenance_later"):v("submission_provider_maintenance",{time:ra(y.until,void 0)})}),B(!1)):j.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:v(xl(j)?"submission_unknown_do_not_resubmit":"submission_unknown")}),B(!1)):na(j)?yl(Q)?(await e.sendMessage({type:"text",author:"bot",text:j.message}),B(!1)):(I===0&&await e.sendMessage({type:"system",variant:"warning",text:v("captcha_failed")}),I++,B(I<=Ru)):_l(j)?(await e.sendMessage({type:"system",variant:"error",text:v("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:v("submission_failed")}),i())}return n.error(fe??Q),Jt?(await e.sendMessage({type:"system",variant:"error",text:v("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:v("submission_failed")}),i())};await B(d===!0&&!M?!1:r.data.skipConfirmation)}async function Xu({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({type:"link",href:Re(i.data.href,{submissions:r,context:n}),text:Re(i.data.cta,{submissions:r,context:n})}),t(i.nextId)}async function Qu({submissions:e,next:t,node:i,context:r}){t(Ou(i,{submissions:e,context:r})?i.branchId:i.nextId)}async function ef({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.text,{submissions:r,context:n})}),t(i.nextId)}async function tf({chat:e,next:t,node:i}){await e.sendMessage({author:"bot",type:"image",url:i.data.url,height:i.data.height,width:i.data.width}),t(i.nextId)}async function rf({chat:e,next:t,node:i,submissions:r,context:n,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let s=i.data.format==="phone"?await e.userInput({key:i.data.key,type:"phone",config:{optional:i.data.optional,placeholder:i.data.placeholder,minChars:i.data.minChars,maxChars:i.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:i.data.key,type:"text",config:{optional:i.data.optional,placeholder:i.data.placeholder,format:i.data.format,maxChars:i.data.maxChars,minChars:i.data.minChars,multiline:i.data.format==="text"&&i.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Fi(s.value):i.data.format==="date"&&o!==void 0?$l(s.value,o):s.value}),t(i.nextId)}async function nf({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"number",config:{max:i.data.max,min:i.data.min,optional:i.data.optional,placeholder:i.data.placeholder,decimalCases:i.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(i.nextId)}async function af({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"phone",config:{minChars:i.data.minChars,defaultValue:{countryCode:i.data.defaultCountryCode},placeholder:i.data.placeholder,submissionFormat:"phone",optional:i.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Fi(o.value):o.value}),t(i.nextId)}async function of({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"multiple-choice",config:i.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:i.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(i.nextId)}async function sf({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"boolean",config:{optional:i.data.optional,labels:{true:i.data.trueLabel,false:i.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?i.data.trueLabel:i.data.falseLabel}),t(i.nextId)}async function lf({chat:e,next:t,node:i,t:r}){await e.sendMessage({author:"bot",type:"text",text:i.data.question});let n=await e.userInput({type:"address",key:i.data.key,config:{optional:i.data.optional,keys:i.data.keys,line2Required:i.data.line2Required,placeholder:i.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:r("skipped")});else{let a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(i.nextId)}async function cf({node:e,chat:t,next:i,submissions:r,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Re(e.data.question,{submissions:r,context:n})});let 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",semantic:"question-skipped",text:a("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return i(e.nextId)}async function df({chat:e,end:t,node:i}){await e.sendMessage({type:"system",variant:"info",text:i.data.systemMessage}),t()}async function uf({node:e,flow:t,submissions:i,chat:r,next:n,apiClient:a,analytics:o,signal:s,context:l}){let u=al(t.nodes,i||{}),{answers:f,...d}=u;if(r.setSubmission(e.data.key,{type:"integration",value:d}),Vu(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:gr(t.nodes,i||{},t.data.flowSessionId)},s),u.status!=="skipped"){let h=[u.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":u.hasHardConcerns?e.data.messages.hard:u.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let g of["hard","advisory"]){let w=f.filter(_=>!_.matched&&_.severity===g);w.length&&h.push((g==="hard"?"Role requirements":"Other things to consider")+`
5
+ }`},cu="14.13.2",du=(e,t=cu)=>t===void 0?e:{fetch:(i,r)=>{if(i!=="/flow/submit")return e.fetch(i,r);const n=new Headers(r==null?void 0:r.headers);return n.set("x-inploi-widget-version",t),e.fetch(i,{...r,headers:Object.fromEntries(n.entries())})}},uu=({_internal_domManager:e=Jd(),theme:t,terms:i,feedback:r})=>Ll(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:u})=>{let f=!1,d=0;const h=du(n),g=l&&u?ic({environment:u,publishableKey:l,logger:o}):void 0,w=v=>v===d,_=()=>{if(typeof window>"u")return;d++,Te.flushStateData().catch(()=>{}),N.cancelCurrentFlow(),ie.isBotTyping$.value=!1;const v=e.getChatbotElement();v&&(St(null,v),v.remove()),f=!1,o.info("Chatbot plugin destroyed")},C=()=>{if(typeof window>"u")return;const v=d,k=[Ae("style",{id:"inploi-chatbot-styles"},Yd),Ae("style",{id:"inploi-chatbot-theme"},lu(t))],$=e.getOrCreateChatbotElement();if(ie.themeMode$.value=t.mode,St(Ae(ne,{},[k,Ae(Kd,{apiClient:h,logger:o,analytics:s,talentBankClient:g,params:{theme:t,terms:i,feedback:r}})]),$),r){const I=M=>{var K,D;if(!w(v))return;const B=(K=e.getChatbotElement())==null?void 0:K.querySelector("dialog");B&&fu({instance:M({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((D=r.params)==null?void 0:D.terms)??{},host:B})};r.plugin instanceof Promise?r.plugin.then(({feedbackPlugin:M})=>{I(M())}).catch(M=>{o.error("Error preparing feedback plugin",M)}):I(r.plugin)}f=!0},S=async(v,k)=>{if(!w(k))return;Il({context:v.context||{},schema:v.flow.context_schema,logger:o});const $=await N.prepareFlow(v);w(k)&&N.commitFlow($)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(f)return;C(),o.info("Chatbot plugin prepared")}catch(v){o.error("Error preparing chatbot plugin",v)}},fetchFlowByJobId:async(v,k)=>{const $=(k==null?void 0:k.idType)==="inploi"?"internal":"external";return a.request(oc,{params:{id:v},searchParams:{id_type:$}}).then(I=>({flow:I.flow,title:I.job.title,flowKeys:[I.job.id,...(k==null?void 0:k.flowKeys)??[]],job:ac(I,{id:v,idType:$}),...k,context:{user:I.user,...k==null?void 0:k.context}}))},fetchFlowById:async(v,k)=>a.request(sc,{params:{id:v}}).then($=>{var I;return{flow:$.flow,title:"Chatbot",flowKeys:(k==null?void 0:k.flowKeys)??[],...k,analytics:{customProperties:{flow_id:$.flow.id,flow_version:$.flow.version,...(I=k==null?void 0:k.analytics)==null?void 0:I.customProperties}}}}),open:async v=>{if(!(typeof window>"u"))try{N.cancelCurrentFlow(),N.viewState$.value="maximised",f||C();const k=d;v instanceof Promise?(N.current$.value={state:"loading"},v.then($=>S($,k)).catch($=>{w(k)&&(o.error("Error loading flow",$),N.current$.value={state:"error"})})):await S(v,k)}catch(k){o.error("Error starting flow",k)}},hasApplicationInProgress:async v=>{const k=await Te.getStateData(v.flow,v.flowKeys,v.context??{});return k!==void 0&&Mo({data:k,nodes:v.flow.nodes})},hasAnyApplicationInProgress:async()=>(await Te.getAllStateData()).some(v=>Mo({data:v,nodes:[]})),close:async()=>{typeof window>"u"||(N.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:_}});function fu({instance:e,terms:t,theme:i,host:r}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:i.chroma??1,hue:i.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:i.mode,corners:"rounded",highlights:"stroke"},terms:t,host:r})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=uu;var pu="9.10.0",Uo=`https://sdk.inploi.com/@inploi/flows@${pu}/cdn/captcha/index.html`,hu=new URL(Uo).origin,Ho=3e4,gu=5*6e4,bu=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",hn=new WeakMap,vu=e=>{let t=hn.get(e);return t||(t=e.fetch("/flow/captcha").then(i=>{let r=i==null?void 0:i.site_key;return typeof r=="string"&&r!==""?r:void 0}).catch(i=>{throw hn.delete(e),i}),hn.set(e,t)),t},wu=(e,t={})=>new Promise((i,r)=>{let{signal:n,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,u=()=>{},f=_=>{l||(l=!0,clearTimeout(g),n==null||n.removeEventListener("abort",h),u(),_())},d=_=>f(()=>r(new Error(_))),h=()=>d("Captcha aborted"),g,w=_=>{clearTimeout(g),g=setTimeout(()=>d("Captcha timed out"),_)};if(w(Ho),n==null?void 0:n.aborted)return h();n==null||n.addEventListener("abort",h),(async()=>{let _=await vu(e);if(_===void 0)return f(()=>i(void 0));if(l)return;let C=document.createElement("iframe");C.src=`${Uo}?${new URLSearchParams({sitekey:_,origin:window.location.origin,...o&&{theme:o}}).toString()}`,C.title="Cloudflare security check",C.style.cssText=`display:block;border:0;width:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(C):(C.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(C));let S=!1,v=k=>{if(!C.contentWindow||k.source!==C.contentWindow||k.origin!==hu||!bu(k.data))return;let $=k.data;switch($.type){case"token":return f(()=>i($.token));case"resize":C.style.height=`${Math.max(0,Math.ceil($.height))}px`;return;case"before-interactive":return S=!0,w(gu),s==null?void 0:s();case"after-interactive":return S=!1,w(Ho);case"error":!S&&!$.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("Captcha timed out")}};window.addEventListener("message",v),u=()=>{window.removeEventListener("message",v),C.remove()}})().catch(_=>f(()=>r(_)))}),qo=({condition:e,context:t,submissions:i,ifBlock:r})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=Jn({context:t,key:n,path:a,submissions:i});if(!o)return!1;switch(o.type){case"address":{let s=ri(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=ri(o.value,a),l={...r,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return vi(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return vi(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return vi(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(u=>typeof u=="string")?vi(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"?Fi(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 ${r.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}},vi=(e,{context:t,submissions:i})=>{let r="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of r)if(qo({condition:n,context:t,submissions:i,ifBlock:e}))return!0;return!1}else{for(let n of r)if(!qo({condition:n,context:t,submissions:i,ifBlock:e}))return!1;return!0}},mu=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,yu=(e,{context:t,submissions:i})=>e.replace(mu,(r,n,a="")=>{let[o,...s]=n.trim().split("."),l=Jn({key:o,path:s,submissions:i,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} (${Nt(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 Fi(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let u=ri(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(f=>typeof f=="string"))return u.join(", ")}break}}return a});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function _u(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function gn(e,t,i=""){const r=_u(e),n=e==null?void 0:e.length,a=t!==void 0;if(!r||a&&n!==t){const o=i&&`"${i}" `,s=a?` of length ${t}`:"",l=r?`length=${n}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Wo(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function xu(e,t){gn(e,void 0,"digestInto() output");const i=t.outputLen;if(e.length<i)throw new Error('"digestInto() output" expected to be of length >='+i)}function bn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function vn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ke(e,t){return e<<32-t|e>>>t}const ku=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),Su=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Cu(e){if(gn(e),ku)return e.toHex();let t="";for(let i=0;i<e.length;i++)t+=Su[e[i]];return t}function $u(e,t={}){const i=(n,a)=>e(a).update(n).digest(),r=e(void 0);return i.outputLen=r.outputLen,i.blockLen=r.blockLen,i.create=n=>e(n),Object.assign(i,t),Object.freeze(i)}const Eu=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Iu(e,t,i){return e&t^~e&i}function Au(e,t,i){return e&t^e&i^t&i}class Tu{constructor(t,i,r,n){pe(this,"blockLen");pe(this,"outputLen");pe(this,"padOffset");pe(this,"isLE");pe(this,"buffer");pe(this,"view");pe(this,"finished",!1);pe(this,"length",0);pe(this,"pos",0);pe(this,"destroyed",!1);this.blockLen=t,this.outputLen=i,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(t),this.view=vn(this.buffer)}update(t){Wo(this),gn(t);const{view:i,buffer:r,blockLen:n}=this,a=t.length;for(let o=0;o<a;){const s=Math.min(n-this.pos,a-o);if(s===n){const l=vn(t);for(;n<=a-o;o+=n)this.process(l,o);continue}r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(i,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Wo(this),xu(t,this),this.finished=!0;const{buffer:i,view:r,blockLen:n,isLE:a}=this;let{pos:o}=this;i[o++]=128,bn(this.buffer.subarray(o)),this.padOffset>n-o&&(this.process(r,0),o=0);for(let d=o;d<n;d++)i[d]=0;r.setBigUint64(n-8,BigInt(this.length*8),a),this.process(r,0);const s=vn(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const u=l/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)s.setUint32(4*d,f[d],a)}digest(){const{buffer:t,outputLen:i}=this;this.digestInto(t);const r=t.slice(0,i);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:i,buffer:r,length:n,finished:a,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=a,t.length=n,t.pos=s,n%i&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const gt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Fu=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),bt=new Uint32Array(64);class Du extends Tu{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:i,C:r,D:n,E:a,F:o,G:s,H:l}=this;return[t,i,r,n,a,o,s,l]}set(t,i,r,n,a,o,s,l){this.A=t|0,this.B=i|0,this.C=r|0,this.D=n|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,i){for(let d=0;d<16;d++,i+=4)bt[d]=t.getUint32(i,!1);for(let d=16;d<64;d++){const h=bt[d-15],g=bt[d-2],w=Ke(h,7)^Ke(h,18)^h>>>3,_=Ke(g,17)^Ke(g,19)^g>>>10;bt[d]=_+bt[d-7]+w+bt[d-16]|0}let{A:r,B:n,C:a,D:o,E:s,F:l,G:u,H:f}=this;for(let d=0;d<64;d++){const h=Ke(s,6)^Ke(s,11)^Ke(s,25),g=f+h+Iu(s,l,u)+Fu[d]+bt[d]|0,_=(Ke(r,2)^Ke(r,13)^Ke(r,22))+Au(r,n,a)|0;f=u,u=l,l=s,s=o+g|0,o=a,a=n,n=r,r=g+_|0}r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(r,n,a,o,s,l,u,f)}roundClean(){bn(bt)}destroy(){this.set(0,0,0,0,0,0,0,0),bn(this.buffer)}}class Nu extends Du{constructor(){super(32);pe(this,"A",gt[0]|0);pe(this,"B",gt[1]|0);pe(this,"C",gt[2]|0);pe(this,"D",gt[3]|0);pe(this,"E",gt[4]|0);pe(this,"F",gt[5]|0);pe(this,"G",gt[6]|0);pe(this,"H",gt[7]|0)}}const Mu=$u(()=>new Nu,Eu(1));var Ko=e=>{let t=e.find(i=>i.isHead);if(!t)throw new Error("No head node found");return t},wn=e=>{var t,i;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(i=[...e.data.messages].reverse().find(r=>r.groupId&&e.nodes.some(n=>n.id===r.groupId&&n.type.startsWith("question-"))&&(r.type==="system"||"author"in r&&r.author==="user")))==null?void 0:i.groupId},mn=e=>Array.isArray(e)?e.map(mn):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[i])=>t.localeCompare(i)).map(([t,i])=>[t,mn(i)])):typeof e=="function"?void 0:e,Lu=e=>Cu(Mu(new TextEncoder().encode(JSON.stringify(mn(e)))));function Vu(e,t,i,r){var n;if(r!=null&&r.aborted)return;let a=Lu(i),o=(n=e.data).preApplyFingerprints??(n.preApplyFingerprints=[]);if(o.includes(a))return;o.push(a);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(i)}).catch(()=>{let u=o.indexOf(a);u!==-1&&o.splice(u,1)}).finally(()=>{clearTimeout(l)})}var Go=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Re=(e,t)=>yu(e,Go(t)),Ou=(e,t)=>vi(e,Go(t)),Yo=({node:e,nodes:t,stopWhen:i})=>{if((i==null?void 0:i(e))===!0)return e;let r=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(r)return Yo({node:r,nodes:t,stopWhen:i})},Pu=({childNode:e,nodes:t})=>{let i=t.filter(r=>r.type==="if-block").find(r=>{if(!r.branchId)return!1;let n=t.find(o=>o.id===r.branchId);if(!n)return!1;let a=Yo({node:n,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(i!=null&&i.nextId)return t.find(r=>r.id===i.nextId)},Ru=3,ju=({flow:e,analytics:t,logger:i,talentBankClient:r,context:n,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:u,persistWriteBarrier:f,onSubmitNetworkError:d,closedRoleBehaviour:h,settledOutcomes:g=h,dateEchoLocale:w,onFlowEnd:_,onInterpret:C,forceSubmitConfirmation:S,flowType:v,t:k})=>{var $;let I=new AbortController,M={submitAccepted:!1};($=e.data).startedWriteNodeIds??($.startedWriteNodeIds=e.nodes.flatMap(D=>{var U,L;if(D.type!=="integration-application-submit"||!e.data.nodeHistory.includes(D.id))return[];let P=D.data.key?(U=o())==null?void 0:U[D.data.key]:void 0;return(P==null?void 0:P.type)==="integration"&&((L=Qn(P.value))==null?void 0:L.verdict)==="not_submitted"?[]:[D.id]}));let B={...t.service,log:D=>t.service.log({...D,customProperties:{...D.customProperties,...t.customProperties}})},K=async(D,P)=>{let U=I.signal;if(U.aborted)return;let L=o(),V=s(),q=(V==null?void 0:V.submitNodeId)===D.id?e.nodes.find(O=>{var X;return O.id===V.fileQuestionNodeId&&O.type==="question-file"&&((X=L==null?void 0:L[O.data.key])==null?void 0:X.type)!=="file"}):void 0;if(q)return K(q,P);C==null||C(D,P);try{await Bu({flow:e,analytics:B,logger:i,talentBankClient:r,apiClient:a,context:n,node:D,submissions:L,applicationRecovery:V,setApplicationRecovery:async O=>{if(!U.aborted)try{await l(O)}catch(X){i.error("Failed to persist application recovery",X)}},forceSubmitConfirmation:S||(V==null?void 0:V.submitNodeId)===D.id,run:M,persistWriteBarrier:f,onSubmitNetworkError:d,settledOutcomes:g,dateEchoLocale:w,flowType:v,signal:U,t:k,chat:{sendMessage:async O=>u.send({groupId:D.id,message:O,signal:U}),userInput:async O=>u.input({input:O,signal:U}),setSubmission:(O,X)=>{U.aborted||u.setSubmission(O,X)},captcha:u.captcha},next:O=>{if(U.aborted)return;let X=(V==null?void 0:V.fileQuestionNodeId)===D.id?V.submitNodeId:O,G=X?e.nodes.find(ge=>ge.id===X):Pu({childNode:D,nodes:e.nodes});return G?K(G,D):_==null?void 0:_(D)},end:()=>{U.aborted||(_==null||_(D))}})}catch(O){if(O instanceof lt)return;throw O}};return{interpret:async D=>{let P=e.nodes.find(U=>U.id===D)??Ko(e.nodes);return K(P)},undo:D=>{var X;if(delete e.data.reviewReplay,((X=e.data.startedWriteNodeIds)==null?void 0:X.length)||e.data.isFinished)return{removed:0};let P=wn(e),U=P?D.lastIndexOf(P):-1,L=e.nodes.find(G=>G.id===P);if(U===-1||!L)return{removed:0};let V=e.nodes.find(G=>G.id===D[D.length-1]);I.abort();let q=D.splice(U);e.data.messages=e.data.messages.filter(G=>!G.groupId||!q.includes(G.groupId)),e.data.currentInput=null;let O=o();for(let G of q.slice(1)){let ge=e.nodes.find(fe=>fe.id===G);if(!(!ge||!O||ge.id===P)&&("key"in ge.data&&ge.data.key&&delete O[ge.data.key],"keys"in ge.data))for(let fe of Object.values(ge.data.keys))typeof fe=="string"&&delete O[fe]}return I=new AbortController,K(L,V),{removed:q.length}},abort:()=>{I.abort()}}};async function Bu(e){let 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 uf({...e,node:t});case"text":return ef({...e,node:t});case"image":return tf({...e,node:t});case"question-text":return rf({...e,node:t});case"question-enum":return of({...e,node:t});case"question-number":return nf({...e,node:t});case"question-phone":return af({...e,node:t});case"question-boolean":return sf({...e,node:t});case"question-file":return cf({...e,node:t});case"question-address":return lf({...e,node:t});case"end-flow":return df({...e,node:t});case"if-block":return Qu({...e,node:t});case"jump":return Hu({...e,node:t});case"link":return Xu({...e,node:t});case"integration-application-submit":return Zu({...e,node:t});case"add-submission":return qu({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Uu({...e,node:t});case"feedback":return zu({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function zu({next:e,node:t}){e(t.nextId)}async function Uu({next:e,node:t,talentBankClient:i,submissions:r,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(r&&i){let 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 i.checkDuplicate({email:ll({key:t.data.email,submissions:r}).toString(),jobId:u,scope:t.data.scope})}catch(f){a.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Hu({next:e,node:t}){e(t.data.targetId)}async function qu({next:e,node:t,logger:i,submissions:r,context:n}){if(!r){i.error("Submissions not found");return}r[t.data.key]={type:"string",value:Re(t.data.value,{submissions:r,context:n})},e(t.nextId)}var Wu=5e3,Ku=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Gu=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?ta:e.throttles?wr:ea)),Yu=(e,t,i)=>{let{waitMs:r,throttles:n,maintenance:a}=ml(t==null?void 0:t.throttles,i);return{key:e,until:Date.now()+r,...n!==void 0&&{throttles:n},...a&&{maintenance:a}}},Ju=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],yn=e=>e instanceof Error&&Ju.includes(e.name)?e:void 0,Jo=e=>{let t=yn(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Zu({chat:e,next:t,end:i,node:r,logger:n,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:u,setApplicationRecovery:f,forceSubmitConfirmation:d,flowType:h,run:g,persistWriteBarrier:w,signal:_,onSubmitNetworkError:C,settledOutcomes:S,t:v}){var K,D;let k=async({redirect_url:P,message:U,button_text:L})=>{let{anonymous_id:V,session_id:q}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:U??v("submission_redirect_message")});try{let O=new URL(P);V&&!O.searchParams.has("anonymous_id")&&O.searchParams.set("anonymous_id",V),await e.sendMessage({type:"link",href:O.toString(),text:L??v("complete_submission"),onClick:()=>{if(!q){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:q,flow_version:l.version,href:O.toString(),job:l.job}})}})}catch(O){n.error(`Invalid redirect URL: ${P}`,O),e.sendMessage({type:"system",variant:"error",text:v("redirect_url_error")})}};if((K=l.data.startedWriteNodeIds)!=null&&K.includes(r.id)&&(u==null?void 0:u.submitNodeId)!==r.id){let P=(D=l.data.submitRedirects)==null?void 0:D[r.id];return P?(await k(P),t(r.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:v("submission_unknown")}),i())}let $=Ku(r.id,l.job),I=0,M=g.submitAccepted&&r.data.skipConfirmation===!0&&(u==null?void 0:u.submitNodeId)!==r.id,B=async P=>{var $i,sr,lr,Pn,Ei,p,b,m,E;let U=(($i=l.data.submitCooldown)==null?void 0:$i.key)===$?l.data.submitCooldown:void 0;U&&(U.until=Gu(U));let L=U==null?void 0:U.until;(l.data.reviewRequiresSend===!0&&!M||P!==!0||L!==void 0&&L>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel,...L!==void 0&&{availableAt:L}}}),M=!1;let V;if(r.data.captcha){let y=e.captcha,x=!0;try{V=await wu(a,{signal:_,container:(y==null?void 0:y.container())??null,theme:y==null?void 0:y.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:v("captcha_check")}).catch(()=>{}).then(()=>{x&&(y==null||y.reveal(!0))})}})}catch(F){if(n.error("Captcha check failed",F),_.aborted)return}finally{x=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:v("submitting")});let{anonymous_id:q,session_id:O}=s.getSessionInfo();if(_.aborted)return;let X=((sr=l.data.startedWriteNodeIds)==null?void 0:sr.includes(r.id))===!0;if((u==null?void 0:u.submitNodeId)===r.id&&await f(void 0),X||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],r.id]),await w().catch(y=>n.error("Failed to persist application write barrier",y)),_.aborted)return;let G,ge=setTimeout(()=>{G=e.sendMessage({type:"loading",semantic:"submission-still-working",text:v("submission_still_working")}).catch(y=>n.error("Failed to send submission progress message",y))},Wu),fe,Q=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:q,session_id:O,job:l.job,flow_build:l.build,...V!==void 0&&{captcha_token:V},submissions:ol(l.nodes,sl(o||{},r.data.submitKeys)),pre_apply:gr(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{fe=y;let x=Jo(y);return(x==null?void 0:x.data)!==void 0?x.data:y});if(clearTimeout(ge),await G,_.aborted)return;if(fe!==void 0&&!yn(fe)&&C)return await C(fe,_),B(!0);r.data.key&&e.setSubmission(r.data.key,{type:"integration",value:Q});let Si=(lr=Jo(fe))==null?void 0:lr.status,Yt=typeof Si=="number"?Si:void 0,j=Qn(Q,Yt),Jt=j===void 0&&Yt===429,Zt=S==="terminal"&&((j==null?void 0:j.outcome)==="closed"||(j==null?void 0:j.outcome)==="duplicate"),mt=l.data.failedAttemptAt,Tt=mt==null?void 0:mt[$];mt&&Tt!==void 0&&Tt>Date.now()&&(Tt=mt[$]=Date.now());let Xt=Tt!==void 0&&Date.now()-Tt<vl||((Pn=l.data.unconfirmedAttemptKeys)==null?void 0:Pn.includes($))===!0,Ci=(Ei=yn(fe))==null?void 0:Ei.status,st=Sl(Q,typeof Ci=="number"?Ci:void 0);st&&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:st.service,response:st.response,captured:(Q==null?void 0:Q.captured)===!0,flow_type:(h==null?void 0:h())??"CHATBOT_DRAWER",job:l.job,...(j==null?void 0:j.outcome)==="duplicate"&&{outcome:Xt?"duplicate_after_own_attempt":"duplicate"},...st.outcome&&{outcome:st.outcome}}});let Qt=br(Q)||(Q==null?void 0:Q.success)===!0;if((Qt||vr(Q))&&(g.submitAccepted=!0),Qt&&((p=l.data.submitCooldown)==null?void 0:p.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await w().catch(y=>n.error("Failed to persist submit cooldown reset",y))),br(Q)){let{redirect_url:y,message:x,button_text:F}=Q.integration_response.data,H={redirect_url:y,message:x,button_text:F};return _.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[r.id]:H},await w().catch(W=>n.error("Failed to persist submit redirect",W)),await k(H),t(r.nextId))}let or=vr(Q);if(or)return await e.sendMessage({type:"system",variant:"success",text:or.message??v("submission_pending")}),t(r.nextId);if((Q==null?void 0:Q.success)===!0)return r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:v("submission_completed")}),t(r.nextId);let ei=kl(j),ti=ei!==void 0&&((b=o==null?void 0:o[ei])==null?void 0:b.type)==="file"?ei:void 0,Ft=ti===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===ti);if(!Ft&&!Zt&&!na(j)&&(l.data.submitCooldown=Yu($,U,j)),(j==null?void 0:j.outcome)!=="duplicate"&&!Jt&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[$]:Date.now()},(m=l.data.unconfirmedAttemptKeys)!=null&&m.includes($)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==$))),(j==null?void 0:j.verdict)==="not_submitted"||(j==null?void 0:j.outcome)==="duplicate"||(j==null?void 0:j.outcome)==="closed"||Jt||hl(Q,Yt)?(X||(l.data.startedWriteNodeIds=(E=l.data.startedWriteNodeIds)==null?void 0:E.filter(y=>y!==r.id)),(u==null?void 0:u.submitNodeId)===r.id&&await f(u),await w().catch(y=>n.error("Failed to persist application write barrier release",y))):await w().catch(y=>n.error("Failed to persist submit cooldown",y)),j){if(n.error(fe??j.message),Ft&&ti!==void 0)return e.setSubmission(ti,null),await f({fileQuestionNodeId:Ft.id,submitNodeId:r.id}),await e.sendMessage({type:"system",variant:"error",text:v("submission_unreadable_document")}),t(Ft.id);if(j.outcome==="duplicate")return await e.sendMessage({type:"system",variant:Zt?"success":"info",semantic:"submission-duplicate",text:v(Xt?"submission_duplicate_earlier_attempt":"submission_duplicate")}),Zt?(delete l.data.submitCooldown,i()):B(!1);if(j.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:v("submission_closed")}),Zt?(delete l.data.submitCooldown,i()):B(!1);let y=wl(j);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?v("submission_provider_maintenance_later"):v("submission_provider_maintenance",{time:ra(y.until,void 0)})}),B(!1)):j.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:v(xl(j)?"submission_unknown_do_not_resubmit":"submission_unknown")}),B(!1)):na(j)?yl(Q)?(await e.sendMessage({type:"text",author:"bot",text:j.message}),B(!1)):(I===0&&await e.sendMessage({type:"system",variant:"warning",text:v("captcha_failed")}),I++,B(I<=Ru)):_l(j)?(await e.sendMessage({type:"system",variant:"error",text:v("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:v("submission_failed")}),i())}return n.error(fe??Q),Jt?(await e.sendMessage({type:"system",variant:"error",text:v("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:v("submission_failed")}),i())};await B(d===!0&&!M?!1:r.data.skipConfirmation)}async function Xu({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({type:"link",href:Re(i.data.href,{submissions:r,context:n}),text:Re(i.data.cta,{submissions:r,context:n})}),t(i.nextId)}async function Qu({submissions:e,next:t,node:i,context:r}){t(Ou(i,{submissions:e,context:r})?i.branchId:i.nextId)}async function ef({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.text,{submissions:r,context:n})}),t(i.nextId)}async function tf({chat:e,next:t,node:i}){await e.sendMessage({author:"bot",type:"image",url:i.data.url,height:i.data.height,width:i.data.width}),t(i.nextId)}async function rf({chat:e,next:t,node:i,submissions:r,context:n,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let s=i.data.format==="phone"?await e.userInput({key:i.data.key,type:"phone",config:{optional:i.data.optional,placeholder:i.data.placeholder,minChars:i.data.minChars,maxChars:i.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:i.data.key,type:"text",config:{optional:i.data.optional,placeholder:i.data.placeholder,format:i.data.format,maxChars:i.data.maxChars,minChars:i.data.minChars,multiline:i.data.format==="text"&&i.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Fi(s.value):i.data.format==="date"&&o!==void 0?$l(s.value,o):s.value}),t(i.nextId)}async function nf({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"number",config:{max:i.data.max,min:i.data.min,optional:i.data.optional,placeholder:i.data.placeholder,decimalCases:i.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(i.nextId)}async function af({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"phone",config:{minChars:i.data.minChars,defaultValue:{countryCode:i.data.defaultCountryCode},placeholder:i.data.placeholder,submissionFormat:"phone",optional:i.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Fi(o.value):o.value}),t(i.nextId)}async function of({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"multiple-choice",config:i.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:i.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(i.nextId)}async function sf({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"boolean",config:{optional:i.data.optional,labels:{true:i.data.trueLabel,false:i.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?i.data.trueLabel:i.data.falseLabel}),t(i.nextId)}async function lf({chat:e,next:t,node:i,t:r}){await e.sendMessage({author:"bot",type:"text",text:i.data.question});let n=await e.userInput({type:"address",key:i.data.key,config:{optional:i.data.optional,keys:i.data.keys,line2Required:i.data.line2Required,placeholder:i.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:r("skipped")});else{let a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(i.nextId)}async function cf({node:e,chat:t,next:i,submissions:r,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Re(e.data.question,{submissions:r,context:n})});let 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",semantic:"question-skipped",text:a("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return i(e.nextId)}async function df({chat:e,end:t,node:i}){await e.sendMessage({type:"system",variant:"info",text:i.data.systemMessage}),t()}async function uf({node:e,flow:t,submissions:i,chat:r,next:n,apiClient:a,analytics:o,signal:s,context:l}){let u=al(t.nodes,i||{}),{answers:f,...d}=u;if(r.setSubmission(e.data.key,{type:"integration",value:d}),Vu(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:gr(t.nodes,i||{},t.data.flowSessionId)},s),u.status!=="skipped"){let h=[u.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":u.hasHardConcerns?e.data.messages.hard:u.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let g of["hard","advisory"]){let w=f.filter(_=>!_.matched&&_.severity===g);w.length&&h.push((g==="hard"?"Role requirements":"Other things to consider")+`
6
6
  `+w.map(_=>`• ${_.message}`).join(`
7
7
  `))}await r.sendMessage({type:"text",author:"bot",text:h.join(`
8
8
 
9
- `)}),u.hasHardConcerns&&e.data.alternativeLink&&await r.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await r.userInput({type:"submit",key:void 0,config:{label:Re(e.data.continueLabel,{submissions:i,context:l})}})}return n(e.nextId)}const Zo=(e,t,i)=>{var r;return e.log({event:i,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:(r=t.analytics)==null?void 0:r.customProperties})},_n="resume-prompt",ff=async({chatService:e,t,signal:i})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:_n,signal:i});const r=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:i});return N.removeMessagesSentByNodeIds([_n]),(r==null?void 0:r.value)!==!1},It=({class:e,...t})=>{const{t:i}=se();return c("button",{class:et("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:i("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var it;function Xi(e){return{lang:(e==null?void 0:e.lang)??(it==null?void 0:it.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(it==null?void 0:it.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(it==null?void 0:it.abortPipeEarly)}}var xn;function pf(e){return xn==null?void 0:xn.get(e)}var kn;function hf(e){return kn==null?void 0:kn.get(e)}var Sn;function gf(e,t){var i;return(i=Sn==null?void 0:Sn.get(e))==null?void 0:i.get(t)}function zt(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function be(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??zt(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:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",f=(n==null?void 0:n.message)??e.message??gf(e.reference,l.lang)??(u?hf(l.lang):null)??r.message??pf(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Ge(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Xi())}}}function bf(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function vf(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function wf(e){if(e.path){let t="";for(const i of e.path)if(typeof i.key=="string"||typeof i.key=="number")t?t+=`.${i.key}`:t+=i.key;else return null;return t}return null}var mf=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},yf=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Xo(e,t){return{kind:"validation",type:"check",reference:Xo,async:!1,expects:null,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement(i.value)&&be(this,"input",i,r),i}}}function Qo(e){return{kind:"validation",type:"email",reference:Qo,expects:null,async:!1,requirement:yf,message:e,"~run"(t,i){return t.typed&&!this.requirement.test(t.value)&&be(this,"email",t,i),t}}}function wi(e,t){return{kind:"validation",type:"max_length",reference:wi,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&be(this,"length",i,r,{received:`${i.value.length}`}),i}}}function es(e,t){return{kind:"validation",type:"max_value",reference:es,async:!1,expects:`<=${e instanceof Date?e.toJSON():zt(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value<=this.requirement)&&be(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():zt(i.value)}),i}}}function Ut(e,t){return{kind:"validation",type:"min_length",reference:Ut,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&be(this,"length",i,r,{received:`${i.value.length}`}),i}}}function ts(e,t){return{kind:"validation",type:"min_value",reference:ts,async:!1,expects:`>=${e instanceof Date?e.toJSON():zt(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value>=this.requirement)&&be(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():zt(i.value)}),i}}}function Cn(e,t){return{kind:"validation",type:"regex",reference:Cn,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement.test(i.value)&&be(this,"format",i,r),i}}}function $n(e){return{kind:"transformation",type:"transform",reference:$n,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function is(e){return{kind:"validation",type:"url",reference:is,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,i){return t.typed&&!this.requirement(t.value)&&be(this,"URL",t,i),t}}}function _f(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function rs(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function ns(e,t){return{kind:"schema",type:"array",reference:ns,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(u):f.path=[u],(a=i.issues)==null||a.push(f);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else be(this,"type",i,r);return i}}}function as(e){return{kind:"schema",type:"boolean",reference:as,expects:"boolean",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:be(this,"type",t,i),t}}}function os(e){return{kind:"schema",type:"number",reference:os,expects:"number",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:be(this,"type",t,i),t}}}function rt(e,t){return{kind:"schema",type:"object",reference:rt,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.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]:rs(s),u=s["~run"]({value:l},r);if(u.issues){const f={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(f):d.path=[f],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=_f(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(be(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else be(this,"type",i,r);return i}}}function Ht(e,t){return{kind:"schema",type:"optional",reference:Ht,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ge(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=rs(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function ss(e,t){return{kind:"schema",type:"picklist",reference:ss,expects:vf(e.map(zt),"|"),async:!1,options:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:be(this,"type",i,r),i}}}function ls(e,t,i){return{kind:"schema",type:"record",reference:ls,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Ge(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(bf(a,l)){const u=a[l],f=this.key["~run"]({value:l},n);if(f.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of f.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=f.issues),n.abortEarly){r.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 g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!f.typed||!d.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=d.value)}}else be(this,"type",r,n);return r}}}function Ee(e){return{kind:"schema",type:"string",reference:Ee,expects:"string",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:be(this,"type",t,i),t}}}function xf(e,t,i){const r=e["~run"]({value:t},Xi(i));if(r.issues)throw new mf(r.issues);return r.value}function kf(e,t){const i={};for(const r in e.entries)i[r]=!t||t.includes(r)?Ht(e.entries[r]):e.entries[r];return{...e,entries:i,get"~standard"(){return Ge(this)}}}function bt(...e){return{...e[0],pipe:e,get"~standard"(){return Ge(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Sf(e,t,i){const r=e["~run"]({value:t},Xi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}async function Cf(e,t,i){const r=await e["~run"]({value:t},Xi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}const qt=({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})]}),vt=({class:e,...t})=>{const{t:i}=se();return c("button",{type:"button",class:et("fr touch-hitbox text-neutral-11 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:i("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),i("skip")]})};var En={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"},$f=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(En).find(r=>e.startsWith(r))??"",i=e.replace(t,"");return/^\d+$/.test(i)?{countryCode:t,phoneNumber:i}:{countryCode:"",phoneNumber:""}};const Wt=Ct("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}}),Ef="https://api.mapbox.com/search/searchbox/v1/suggest",If="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Af=e=>atob(e).split("").reverse().join(""),nt=rt({name:Ee()}),Tf=rt({suggestions:ns(rt({feature_type:Ht(Ee()),full_address:Ht(Ee()),place_formatted:Ht(Ee()),name:Ht(Ee()),mapbox_id:Ee(),context:kf(rt({address:nt,street:nt,neighborhood:nt,locality:nt,district:nt,place:nt,region:nt,postcode:nt,country:nt}))}))}),Ff=({logger:e,t})=>ct(()=>{var r;const i=(r=N.current$.peek().flow)==null?void 0:r.data.flowSessionId;return i?{enabled:!0,getPredictions:async n=>{var d;const a=new URL(Ef);a.searchParams.set("q",n),a.searchParams.set("session_token",i);const o=(d=N.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",Af(If));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=Sf(Tf,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:f}=u.output;return{ok:!0,data:f.map(h=>{var g,w,_,C,S,v,k,$,I;return{label:h.full_address??([h.name,h.place_formatted].filter(Boolean).join(", ")||h.mapbox_id),id:h.mapbox_id,address:{line1:((g=h.context.address)==null?void 0:g.name)??((w=h.context.street)==null?void 0:w.name),line2:void 0,line3:((_=h.context.neighborhood)==null?void 0:_.name)??((C=h.context.locality)==null?void 0:C.name),city:((S=h.context.place)==null?void 0:S.name)??((v=h.context.district)==null?void 0:v.name),state:(k=h.context.region)==null?void 0:k.name,postcode:(($=h.context.postcode)==null?void 0:$.name)??(h.feature_type==="postcode"?h.name:void 0),country:(I=h.context.country)==null?void 0:I.name}}})}}}:{enabled:!1}},[e,t]),cs=e=>{const{t}=se();return c("button",{type:"button",class:"touch-hitbox text-neutral-11 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")})]})},Df=({input:e,onSubmitSuccess:t,logger:i})=>{const{t:r}=se(),[n,a]=Oe(),{enabled:o,getPredictions:s}=Ff({logger:i,t:r}),[l,u]=Oe(o?"query":"manual"),[f,d]=Oe(""),[h,g]=Oe(),w=we(),_=we(),C=v=>{var $;if(tt(o,"Query state should not be enabled"),v=v.trim(),v===(($=w.current)==null?void 0:$.query)||v===(h==null?void 0:h.query)&&h.status==="done")return;if(d(v),v===""){w.current=void 0,g(void 0);return}const k=w.current={query:v};g({query:v,status:"pending"}),s(v).then(I=>{w.current===k&&(w.current=void 0,g(I.ok?{query:v,status:"done",items:I.data}:{query:v,status:"failed",error:I.error}))},I=>{w.current===k&&(w.current=void 0,i.error("Failed to get address details",I),g({query:v,status:"failed",error:r("address_error")}))})},S=(v,k)=>{a($=>({...$,[v]:k}))};switch(l){case"query":return tt(o,"Query state should not be enabled"),c(Nf,{input:e,onSkip:()=>t(null),onAddressSelect:v=>{if(v===""){w.current&&(w.current=void 0,g(void 0)),u("manual");return}const k=(h==null?void 0:h.status)==="done"?h.items.find($=>$.id===v):void 0;k&&(_.current!==v&&a(k.address),_.current=v,u("details"))},onAddressSearch:C,lookup:h,query:f});case"details":return tt(n!==void 0),c(ds,{input:e,logger:i,onSubmitSuccess:t,addressFields:n,onFieldChange:S,actions:c(cs,{onClick:()=>{u("query")}})});case"manual":return c(ds,{logger:i,input:e,onSubmitSuccess:t,addressFields:n??{},onFieldChange:S,actions:o?c(cs,{onClick:()=>{u("query")}}):e.config.optional?c(vt,{onClick:()=>t(null)}):void 0})}},Nf=({input:e,onSkip:t,lookup:i,onAddressSelect:r,query:n,onAddressSearch:a})=>{const{t:o}=se(),s=we(null);return $e(()=>{s.current&&(s.current.focus(),s.current.select())},[]),c(ae,{children:[c("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&a(f)},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",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:n,class:Wt({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(vt,{class:"relative",onClick:t})]}),(i==null?void 0:i.status)==="failed"?c(qt,{error:{message:i.error}}):null,c("p",{role:"status",class:(i==null?void 0:i.status)==="pending"||(i==null?void 0:i.status)==="done"&&i.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(i==null?void 0:i.status)==="pending"?c(ae,{children:[c(Ji,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(i==null?void 0:i.status)==="done"&&i.items.length===0?o("address_no_results"):null}),c("ul",{children:[((i==null?void 0:i.status)==="done"?i.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:()=>{r(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:()=>{r("")},children:c("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},In=["line1","line2","line3","city","state","postcode","country"],ds=({addressFields:e,onFieldChange:t,onSubmitSuccess:i,actions:r,input:n})=>{const a=we(null);$e(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(En),{t:s}=se();return c("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{l.preventDefault();const u=l.currentTarget,f=[...u.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of f){g.value="";const w=In.find(_=>n.config.keys[_]===g.name);w&&t(w,"")}if(f.length>0&&!u.checkValidity()){u.reportValidity();return}const d=new FormData(u),h=Object.fromEntries(d.entries());i({type:"address",value:h})},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:In.map((l,u)=>{const f=`isdk_${l}`,d=n.config.keys[l];return d?c(ae,{children:[c("label",{for:f,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 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:f,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:f,defaultValue:e[l],onInput:h=>t(l,h.currentTarget.value),required:l==="line2"?n.config.line2Required===!0:l!=="line3"}),u===In.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:[r,c(It,{class:"ml-auto"})]})]})},An=()=>{const e=we(null);return Ri(()=>{var t;(t=e.current)==null||t.focus()},[]),e},us=["true","false"],Mf=ss(us),Lf="answer",fs="flex items-center flex-wrap gap-2 p-2.5",ps="min-w-0 max-w-full flex-auto",hs=Rr(({label:e,...t},i)=>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:i,children:c("p",{class:"text-center text-base",children:e})})),Vf=({input:e,onSubmitSuccess:t})=>{const i=An();return c("form",{noValidate:!0,class:"",onSubmit:r=>{r.preventDefault();const n=Od(r).value,a=xf(Mf,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:fs,children:us.map((r,n)=>c("li",{class:ps,children:c(hs,{ref:n===0?i:null,type:"submit",name:Lf,value:r,label:e.config.labels[r]},r)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(vt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},gs=e=>e.reduce((t,i)=>t+i.sizeKb,0),Of=Bt("file"),bs=3,Qi=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Pf=({file:e,class:t,...i})=>{const{t:r}=se(),[n,a]=Qi(e.name);return c("div",{class:et("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...i,children:[c("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"sr-only",children:[r("file_name"),": "]}),c("span",{class:"block truncate",children:n}),c("span",{children:a})]}),c("p",{class:"text-accent-11",children:[c("span",{class:"sr-only",children:[r("file_size"),": "]}),Nt(e.sizeKb)]})]})},vs=({class:e,...t})=>c("li",{class:et("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Rf=(e,t)=>{const[i,r]=Qi(e);return`${i.slice(0,t)}${r}`},ws=e=>({name:Rf(e.name,42),sizeKb:e.size/1e3}),jf=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Bf=(e,t,i)=>{const r=Qi(t.name)[1].toLowerCase(),n=[...i.map(o=>o.toLowerCase()),...jf],a=r===""?"none":n.includes(r)?r:"other";return`chatbot-file-refused:${e}:${a}`},zf=({input:e,onSubmitSuccess:t,analytics:i})=>{var C;const r=(C=N.current$.value.flow)==null?void 0:C.data.submissions[e.key],[n,a]=Oe(Of(r)&&r.value.length?{status:"ready",files:r.value}:{status:"empty"}),o=we(0),s=n.status==="ready"?n.files:[],l=n.status==="ready"||n.status==="pending"?n.files:[],u=n.status==="error"?n.error:void 0,f=l.length-bs,d=gs(l),h=An(),{t:g}=se(),w=S=>{if(!S.length)return{reason:"required",error:{type:"required",message:g("validation_file")}};if(!Zn(S,e.config.extensions))return{reason:"type",file:S.find(v=>!Zn([v],e.config.extensions)),error:{type:"validate",message:g("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(S.some(v=>v.sizeKb===0))return{reason:"empty",file:S.find(v=>v.sizeKb===0),error:{type:"validate",message:g("validation_file_empty")}};if(e.config.fileSizeLimitKib&&gs(S)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:g("validation_file_size",{size:Nt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&S.length>1)return{reason:"count",error:{type:"invalid",message:g("validation_file_max",{count:1})}}},_=(S,v)=>{var k,$;return i.log({event:"INTERACTION",properties:{tag:Bf(S,v,e.config.extensions)},customProperties:($=(k=N.current$.peek().flow)==null?void 0:k.analytics)==null?void 0:$.customProperties})};return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:S=>{if(S.preventDefault(),n.status==="pending"||n.status==="error")return;const v=w(s);v?a({status:"error",error:v.error}):t({type:"file",value:s})},children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:h,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,bs).map(S=>{const[v,k]=Qi(S.name);return c(vs,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:v}),c("span",{children:k})]})}),f>0?c(vs,{children:g("file_more",{count:f})}):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:g("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-11 text-xs",children:["(",g("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:g("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(S=>c("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:S.replace(".","")}))})]})]}),c("p",{role:"status",class:et("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:n.status==="pending"?c(ae,{children:[c(Ji,{"aria-hidden":"true",class:"h-4 w-4"}),g("file_preparing",{count:l.length})]}):n.status==="ready"?c(ae,{children:[s.length>1?g("file_total_size",{size:Nt(d)}):Nt(d),c("span",{class:"sr-only",children:[". ",g("file_ready",{count:s.length})]})]}):null}),c("input",{id:"dropzone-file","aria-label":g("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async S=>{tt(S.target instanceof HTMLInputElement);const v=S.target.files?Array.from(S.target.files):[];S.target.value="";const[k]=v;if(!k)return;const $=++o.current,I=n.status==="ready",M=v.map(ws),B=w(M);if(B)return _(B.reason,B.file??k),a({status:"error",error:B.error});a({status:"pending",files:M});let K;try{const D=await Promise.all(v.map(async P=>{try{return{...ws(P),data:await El(P)}}catch(U){throw K??(K=P),U}}));o.current===$&&a({status:"ready",files:D})}catch{if(o.current!==$)return;_("unreadable",K??k),a({status:"error",error:{type:"invalid",message:g(I?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(It,{disabled:s.length===0}),e.config.optional&&c(vt,{class:"relative",onClick:()=>t(null)})]})]}),c(qt,{error:u})]})};var mi=e=>e.type==="checkbox",At=e=>e instanceof Date,Ie=e=>e==null;const ms=e=>typeof e=="object";var le=e=>!Ie(e)&&!Array.isArray(e)&&ms(e)&&!At(e),Uf=e=>le(e)&&e.target?mi(e.target)?e.target.checked:e.target.value:e,Hf=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,qf=(e,t)=>e.has(Hf(t)),Wf=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},Tn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ue(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Tn&&(e instanceof Blob||t))return e;const i=Array.isArray(e);if(!i&&!(le(e)&&Wf(e)))return e;const r=i?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=ue(e[n]));return r}var er=e=>/^\w*$/.test(e),re=e=>e===void 0,Fn=e=>Array.isArray(e)?e.filter(Boolean):[],Dn=e=>Fn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),A=(e,t,i)=>{if(!t||!le(e))return i;const r=(er(t)?[t]:Dn(t)).reduce((n,a)=>Ie(n)?n:n[a],e);return re(r)||r===e?re(e[t])?i:e[t]:r},Ye=e=>typeof e=="boolean",je=e=>typeof e=="function",Z=(e,t,i)=>{let r=-1;const n=er(t)?[t]:Dn(t),a=n.length,o=a-1;for(;++r<a;){const s=n[r];let l=i;if(r!==o){const u=e[s];l=le(u)||Array.isArray(u)?u:isNaN(+n[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ys={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Be={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},at={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Kf=me.createContext(null);Kf.displayName="HookFormControlContext";var Gf=(e,t,i,r=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Be.all&&(t._proxyFormState[o]=!r||Be.all),i&&(i[o]=!0),e[o]}});return n};const Yf=typeof window<"u"?me.useLayoutEffect:me.useEffect;var Fe=e=>typeof e=="string",Jf=(e,t,i,r,n)=>Fe(e)?(r&&t.watch.add(e),A(i,e,n)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),A(i,a))):(r&&(t.watchAll=!0),i),Nn=e=>Ie(e)||!ms(e);function wt(e,t,i=new WeakSet){if(Nn(e)||Nn(t))return Object.is(e,t);if(At(e)&&At(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(i.has(e)||i.has(t))return!0;i.add(e),i.add(t);for(const a of r){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(At(o)&&At(s)||le(o)&&le(s)||Array.isArray(o)&&Array.isArray(s)?!wt(o,s,i):!Object.is(o,s))return!1}}return!0}const Zf=me.createContext(null);Zf.displayName="HookFormContext";var _s=(e,t,i,r,n)=>t?{...i[e],types:{...i[e]&&i[e].types?i[e].types:{},[r]:n||!0}}:{},yi=e=>Array.isArray(e)?e:[e],xs=()=>{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 ks(e,t){const i={};for(const r in e)if(e.hasOwnProperty(r)){const n=e[r],a=t[r];if(n&&le(n)&&a){const o=ks(n,a);le(o)&&(i[r]=o)}else e[r]&&(i[r]=a)}return i}var xe=e=>le(e)&&!Object.keys(e).length,Mn=e=>e.type==="file",tr=e=>{if(!Tn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ss=e=>e.type==="select-multiple",Ln=e=>e.type==="radio",Xf=e=>Ln(e)||mi(e),Vn=e=>tr(e)&&e.isConnected;function Qf(e,t){const i=t.slice(0,-1).length;let r=0;for(;r<i;)e=re(e)?r++:e[t[r++]];return e}function ep(e){for(const t in e)if(e.hasOwnProperty(t)&&!re(e[t]))return!1;return!0}function ce(e,t){const i=Array.isArray(t)?t:er(t)?[t]:Dn(t),r=i.length===1?e:Qf(e,i),n=i.length-1,a=i[n];return r&&delete r[a],n!==0&&(le(r)&&xe(r)||Array.isArray(r)&&ep(r))&&ce(e,i.slice(0,-1)),e}var tp=e=>{for(const t in e)if(je(e[t]))return!0;return!1};function Cs(e){return Array.isArray(e)||le(e)&&!tp(e)}function On(e,t={}){for(const i in e){const r=e[i];Cs(r)?(t[i]=Array.isArray(r)?[]:{},On(r,t[i])):re(r)||(t[i]=!0)}return t}function Kt(e,t,i){i||(i=On(t));for(const r in e){const n=e[r];if(Cs(n))re(t)||Nn(i[r])?i[r]=On(n,Array.isArray(n)?[]:{}):Kt(n,Ie(t)?{}:t[r],i[r]);else{const a=t[r];i[r]=!wt(n,a)}}return i}const $s={value:!1,isValid:!1},Es={value:!0,isValid:!0};var Is=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(i=>i&&i.checked&&!i.disabled).map(i=>i.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!re(e[0].attributes.value)?re(e[0].value)||e[0].value===""?Es:{value:e[0].value,isValid:!0}:Es:$s}return $s},As=(e,{valueAsNumber:t,valueAsDate:i,setValueAs:r})=>re(e)?e:t?e===""?NaN:e&&+e:i&&Fe(e)?new Date(e):r?r(e):e;const Ts={isValid:!1,value:null};var Fs=e=>Array.isArray(e)?e.reduce((t,i)=>i&&i.checked&&!i.disabled?{isValid:!0,value:i.value}:t,Ts):Ts;function Ds(e){const t=e.ref;return Mn(t)?t.files:Ln(t)?Fs(e.refs).value:Ss(t)?[...t.selectedOptions].map(({value:i})=>i):mi(t)?Is(e.refs).value:As(re(t.value)?e.ref.value:t.value,e)}var ip=(e,t,i,r)=>{const n={};for(const a of e){const o=A(t,a);o&&Z(n,a,o._f)}return{criteriaMode:i,names:[...e],fields:n,shouldUseNativeValidation:r}},ir=e=>e instanceof RegExp,_i=e=>re(e)?e:ir(e)?e.source:le(e)?ir(e.value)?e.value.source:e.value:e,Ns=e=>({isOnSubmit:!e||e===Be.onSubmit,isOnBlur:e===Be.onBlur,isOnChange:e===Be.onChange,isOnAll:e===Be.all,isOnTouch:e===Be.onTouched});const Ms="AsyncFunction";var rp=e=>!!e&&!!e.validate&&!!(je(e.validate)&&e.validate.constructor.name===Ms||le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ms)),np=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ls=(e,t,i)=>!i&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const xi=(e,t,i,r)=>{for(const n of i||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)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(xi(s,t))break}else if(le(s)&&xi(s,t))break}}};function Vs(e,t,i){const r=A(e,i);if(r||er(i))return{error:r,name:i};const n=i.split(".");for(;n.length;){const a=n.join("."),o=A(t,a),s=A(e,a);if(o&&!Array.isArray(o)&&i!==a)return{name:i};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:i}}var ap=(e,t,i,r)=>{i(e);const{name:n,...a}=e;return xe(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!r||Be.all))},op=(e,t,i)=>!e||!t||e===t||yi(e).some(r=>r&&(i?r===t:r.startsWith(t)||t.startsWith(r))),sp=(e,t,i,r,n)=>n.isOnAll?!1:!i&&n.isOnTouch?!(t||e):(i?r.isOnBlur:n.isOnBlur)?!e:(i?r.isOnChange:n.isOnChange)?e:!0,lp=(e,t)=>!Fn(A(e,t)).length&&ce(e,t),cp=(e,t,i)=>{const r=yi(A(e,i));return Z(r,"root",t[i]),Z(e,i,r),e};function Os(e,t,i="validate"){if(Fe(e)||Array.isArray(e)&&e.every(Fe)||Ye(e)&&!e)return{type:i,message:Fe(e)?e:"",ref:t}}var Gt=e=>le(e)&&!ir(e)?e:{value:e,message:""},Ps=async(e,t,i,r,n,a)=>{const{ref:o,refs:s,required:l,maxLength:u,minLength:f,min:d,max:h,pattern:g,validate:w,name:_,valueAsNumber:C,mount:S}=e._f,v=A(i,_);if(!S||t.has(_))return{};const k=s?s[0]:o,$=L=>{n&&k.reportValidity&&(k.setCustomValidity(Ye(L)?"":L||""),k.reportValidity())},I={},M=Ln(o),B=mi(o),K=M||B,D=(C||Mn(o))&&re(o.value)&&re(v)||tr(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,P=_s.bind(null,_,r,I),U=(L,V,q,O=at.maxLength,X=at.minLength)=>{const G=L?V:q;I[_]={type:L?O:X,message:G,ref:o,...P(L?O:X,G)}};if(a?!Array.isArray(v)||!v.length:l&&(!K&&(D||Ie(v))||Ye(v)&&!v||B&&!Is(s).isValid||M&&!Fs(s).isValid)){const{value:L,message:V}=Fe(l)?{value:!!l,message:l}:Gt(l);if(L&&(I[_]={type:at.required,message:V,ref:k,...P(at.required,V)},!r))return $(V),I}if(!D&&(!Ie(d)||!Ie(h))){let L,V;const q=Gt(h),O=Gt(d);if(!Ie(v)&&!isNaN(v)){const X=o.valueAsNumber||v&&+v;Ie(q.value)||(L=X>q.value),Ie(O.value)||(V=X<O.value)}else{const X=o.valueAsDate||new Date(v),G=Q=>new Date(new Date().toDateString()+" "+Q),ge=o.type=="time",fe=o.type=="week";Fe(q.value)&&v&&(L=ge?G(v)>G(q.value):fe?v>q.value:X>new Date(q.value)),Fe(O.value)&&v&&(V=ge?G(v)<G(O.value):fe?v<O.value:X<new Date(O.value))}if((L||V)&&(U(!!L,q.message,O.message,at.max,at.min),!r))return $(I[_].message),I}if((u||f)&&!D&&(Fe(v)||a&&Array.isArray(v))){const L=Gt(u),V=Gt(f),q=!Ie(L.value)&&v.length>+L.value,O=!Ie(V.value)&&v.length<+V.value;if((q||O)&&(U(q,L.message,V.message),!r))return $(I[_].message),I}if(g&&!D&&Fe(v)){const{value:L,message:V}=Gt(g);if(ir(L)&&!v.match(L)&&(I[_]={type:at.pattern,message:V,ref:o,...P(at.pattern,V)},!r))return $(V),I}if(w){if(je(w)){const L=await w(v,i),V=Os(L,k);if(V&&(I[_]={...V,...P(at.validate,V.message)},!r))return $(V.message),I}else if(le(w)){let L={};for(const V in w){if(!xe(L)&&!r)break;const q=Os(await w[V](v,i),k,V);q&&(L={...q,...P(V,q.message)},$(q.message),r&&(I[_]=L))}if(!xe(L)&&(I[_]={ref:k,...L},!r))return I}}return $(!0),I};const dp={mode:Be.onSubmit,reValidateMode:Be.onChange,shouldFocusError:!0};function up(e={}){let t={...dp,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:je(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},n=le(t.defaultValues)||le(t.values)?ue(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ue(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 f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...f};let h={...d};const g={array:xs(),state:xs()},w=t.criteriaMode===Be.all,_=p=>b=>{clearTimeout(u),u=setTimeout(p,b)},C=async p=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||p)){let b;t.resolver?(b=xe((await K()).errors),S()):b=await P(r,!0),b!==i.isValid&&g.state.next({isValid:b})}},S=(p,b)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((p||Array.from(s.mount)).forEach(m=>{m&&(b?Z(i.validatingFields,m,b):ce(i.validatingFields,m))}),g.state.next({validatingFields:i.validatingFields,isValidating:!xe(i.validatingFields)}))},v=(p,b=[],m,E,y=!0,x=!0)=>{if(E&&m&&!t.disabled){if(o.action=!0,x&&Array.isArray(A(r,p))){const F=m(A(r,p),E.argA,E.argB);y&&Z(r,p,F)}if(x&&Array.isArray(A(i.errors,p))){const F=m(A(i.errors,p),E.argA,E.argB);y&&Z(i.errors,p,F),lp(i.errors,p)}if((d.touchedFields||h.touchedFields)&&x&&Array.isArray(A(i.touchedFields,p))){const F=m(A(i.touchedFields,p),E.argA,E.argB);y&&Z(i.touchedFields,p,F)}(d.dirtyFields||h.dirtyFields)&&(i.dirtyFields=Kt(n,a)),g.state.next({name:p,isDirty:L(p,b),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Z(a,p,b)},k=(p,b)=>{Z(i.errors,p,b),g.state.next({errors:i.errors})},$=p=>{i.errors=p,g.state.next({errors:i.errors,isValid:!1})},I=(p,b,m,E)=>{const y=A(r,p);if(y){const x=A(a,p,re(m)?A(n,p):m);re(x)||E&&E.defaultChecked||b?Z(a,p,b?x:Ds(y._f)):O(p,x),o.mount&&!o.action&&C()}},M=(p,b,m,E,y)=>{let x=!1,F=!1;const H={name:p};if(!t.disabled){if(!m||E){(d.isDirty||h.isDirty)&&(F=i.isDirty,i.isDirty=H.isDirty=L(),x=F!==H.isDirty);const W=wt(A(n,p),b);F=!!A(i.dirtyFields,p),W?ce(i.dirtyFields,p):Z(i.dirtyFields,p,!0),H.dirtyFields=i.dirtyFields,x=x||(d.dirtyFields||h.dirtyFields)&&F!==!W}if(m){const W=A(i.touchedFields,p);W||(Z(i.touchedFields,p,m),H.touchedFields=i.touchedFields,x=x||(d.touchedFields||h.touchedFields)&&W!==m)}x&&y&&g.state.next(H)}return x?H:{}},B=(p,b,m,E)=>{const y=A(i.errors,p),x=(d.isValid||h.isValid)&&Ye(b)&&i.isValid!==b;if(t.delayError&&m?(l=_(()=>k(p,m)),l(t.delayError)):(clearTimeout(u),l=null,m?Z(i.errors,p,m):ce(i.errors,p)),(m?!wt(y,m):y)||!xe(E)||x){const F={...E,...x&&Ye(b)?{isValid:b}:{},errors:i.errors,name:p};i={...i,...F},g.state.next(F)}},K=async p=>(S(p,!0),await t.resolver(a,t.context,ip(p||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),D=async p=>{const{errors:b}=await K(p);if(S(p),p)for(const m of p){const E=A(b,m);E?Z(i.errors,m,E):ce(i.errors,m)}else i.errors=b;return b},P=async(p,b,m={valid:!0})=>{for(const E in p){const y=p[E];if(y){const{_f:x,...F}=y;if(x){const H=s.array.has(x.name),W=y._f&&rp(y._f);W&&d.validatingFields&&S([x.name],!0);const ke=await Ps(y,s.disabled,a,w,t.shouldUseNativeValidation&&!b,H);if(W&&d.validatingFields&&S([x.name]),ke[x.name]&&(m.valid=!1,b||e.shouldUseNativeValidation))break;!b&&(A(ke,x.name)?H?cp(i.errors,ke,x.name):Z(i.errors,x.name,ke[x.name]):ce(i.errors,x.name))}!xe(F)&&await P(F,b,m)}}return m.valid},U=()=>{for(const p of s.unMount){const b=A(r,p);b&&(b._f.refs?b._f.refs.every(m=>!Vn(m)):!Vn(b._f.ref))&&Xt(p)}s.unMount=new Set},L=(p,b)=>!t.disabled&&(p&&b&&Z(a,p,b),!wt(Si(),n)),V=(p,b,m)=>Jf(p,s,{...o.mount?a:re(b)?n:Fe(p)?{[p]:b}:b},m,b),q=p=>Fn(A(o.mount?a:n,p,t.shouldUnregister?A(n,p,[]):[])),O=(p,b,m={})=>{const E=A(r,p);let y=b;if(E){const x=E._f;x&&(!x.disabled&&Z(a,p,As(b,x)),y=tr(x.ref)&&Ie(b)?"":b,Ss(x.ref)?[...x.ref.options].forEach(F=>F.selected=y.includes(F.value)):x.refs?mi(x.ref)?x.refs.forEach(F=>{(!F.defaultChecked||!F.disabled)&&(Array.isArray(y)?F.checked=!!y.find(H=>H===F.value):F.checked=y===F.value||!!y)}):x.refs.forEach(F=>F.checked=F.value===y):Mn(x.ref)?x.ref.value="":(x.ref.value=y,x.ref.type||g.state.next({name:p,values:ue(a)})))}(m.shouldDirty||m.shouldTouch)&&M(p,y,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&Q(p)},X=(p,b,m)=>{for(const E in b){if(!b.hasOwnProperty(E))return;const y=b[E],x=p+"."+E,F=A(r,x);(s.array.has(p)||le(y)||F&&!F._f)&&!At(y)?X(x,y,m):O(x,y,m)}},G=(p,b,m={})=>{const E=A(r,p),y=s.array.has(p),x=ue(b);Z(a,p,x),y?(g.array.next({name:p,values:ue(a)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&m.shouldDirty&&g.state.next({name:p,dirtyFields:Kt(n,a),isDirty:L(p,x)})):E&&!E._f&&!Ie(x)?X(p,x,m):O(p,x,m),Ls(p,s)?g.state.next({...i,name:p,values:ue(a)}):g.state.next({name:o.mount?p:void 0,values:ue(a)})},ge=async p=>{o.mount=!0;const b=p.target;let m=b.name,E=!0;const y=A(r,m),x=W=>{E=Number.isNaN(W)||At(W)&&isNaN(W.getTime())||wt(W,A(a,m,W))},F=Ns(t.mode),H=Ns(t.reValidateMode);if(y){let W,ke;const Dt=b.type?Ds(y._f):Uf(p),yt=p.type===ys.BLUR||p.type===ys.FOCUS_OUT,nh=!np(y._f)&&!t.resolver&&!A(i.errors,m)&&!y._f.deps||sp(yt,A(i.touchedFields,m),i.isSubmitted,H,F),Rn=Ls(m,s,yt);Z(a,m,Dt),yt?(!b||!b.readOnly)&&(y._f.onBlur&&y._f.onBlur(p),l&&l(0)):y._f.onChange&&y._f.onChange(p);const jn=M(m,Dt,yt),ah=!xe(jn)||Rn;if(!yt&&g.state.next({name:m,type:p.type,values:ue(a)}),nh)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?yt&&C():yt||C()),ah&&g.state.next({name:m,...Rn?{}:jn});if(!yt&&Rn&&g.state.next({...i}),t.resolver){const{errors:Gs}=await K([m]);if(S([m]),x(Dt),E){const oh=Vs(i.errors,r,m),Ys=Vs(Gs,r,oh.name||m);W=Ys.error,m=Ys.name,ke=xe(Gs)}}else S([m],!0),W=(await Ps(y,s.disabled,a,w,t.shouldUseNativeValidation))[m],S([m]),x(Dt),E&&(W?ke=!1:(d.isValid||h.isValid)&&(ke=await P(r,!0)));E&&(y._f.deps&&(!Array.isArray(y._f.deps)||y._f.deps.length>0)&&Q(y._f.deps),B(m,ke,W,jn))}},fe=(p,b)=>{if(A(i.errors,b)&&p.focus)return p.focus(),1},Q=async(p,b={})=>{let m,E;const y=yi(p);if(t.resolver){const x=await D(re(p)?p:y);m=xe(x),E=p?!y.some(F=>A(x,F)):m}else p?(E=(await Promise.all(y.map(async x=>{const F=A(r,x);return await P(F&&F._f?{[x]:F}:F)}))).every(Boolean),!(!E&&!i.isValid)&&C()):E=m=await P(r);return g.state.next({...!Fe(p)||(d.isValid||h.isValid)&&m!==i.isValid?{}:{name:p},...t.resolver||!p?{isValid:m}:{},errors:i.errors}),b.shouldFocus&&!E&&xi(r,fe,p?y:s.mount),E},Si=(p,b)=>{let m={...o.mount?a:n};return b&&(m=ks(b.dirtyFields?i.dirtyFields:i.touchedFields,m)),re(p)?m:Fe(p)?A(m,p):p.map(E=>A(m,E))},Yt=(p,b)=>({invalid:!!A((b||i).errors,p),isDirty:!!A((b||i).dirtyFields,p),error:A((b||i).errors,p),isValidating:!!A(i.validatingFields,p),isTouched:!!A((b||i).touchedFields,p)}),j=p=>{const b=p?yi(p):void 0;b==null||b.forEach(m=>ce(i.errors,m)),b?b.forEach(m=>{g.state.next({name:m,errors:i.errors})}):g.state.next({errors:{}})},Jt=(p,b,m)=>{const E=(A(r,p,{_f:{}})._f||{}).ref,y=A(i.errors,p)||{},{ref:x,message:F,type:H,...W}=y;Z(i.errors,p,{...W,...b,ref:E}),g.state.next({name:p,errors:i.errors,isValid:!1}),m&&m.shouldFocus&&E&&E.focus&&E.focus()},Zt=(p,b)=>je(p)?g.state.subscribe({next:m=>"values"in m&&p(V(void 0,b),m)}):V(p,b,!0),mt=p=>g.state.subscribe({next:b=>{op(p.name,b.name,p.exact)&&ap(b,p.formState||d,lr,p.reRenderRoot)&&p.callback({values:{...a},...i,...b,defaultValues:n})}}).unsubscribe,Tt=p=>(o.mount=!0,h={...h,...p.formState},mt({...p,formState:{...f,...p.formState}})),Xt=(p,b={})=>{for(const m of p?yi(p):s.mount)s.mount.delete(m),s.array.delete(m),b.keepValue||(ce(r,m),ce(a,m)),!b.keepError&&ce(i.errors,m),!b.keepDirty&&ce(i.dirtyFields,m),!b.keepTouched&&ce(i.touchedFields,m),!b.keepIsValidating&&ce(i.validatingFields,m),!t.shouldUnregister&&!b.keepDefaultValue&&ce(n,m);g.state.next({values:ue(a)}),g.state.next({...i,...b.keepDirty?{isDirty:L()}:{}}),!b.keepIsValid&&C()},Ci=({disabled:p,name:b})=>{if(Ye(p)&&o.mount||p||s.disabled.has(b)){const y=s.disabled.has(b)!==!!p;p?s.disabled.add(b):s.disabled.delete(b),y&&o.mount&&!o.action&&C()}},ot=(p,b={})=>{let m=A(r,p);const E=Ye(b.disabled)||Ye(t.disabled);return Z(r,p,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:p}},name:p,mount:!0,...b}}),s.mount.add(p),m?Ci({disabled:Ye(b.disabled)?b.disabled:t.disabled,name:p}):I(p,!0,b.value),{...E?{disabled:b.disabled||t.disabled}:{},...t.progressive?{required:!!b.required,min:_i(b.min),max:_i(b.max),minLength:_i(b.minLength),maxLength:_i(b.maxLength),pattern:_i(b.pattern)}:{},name:p,onChange:ge,onBlur:ge,ref:y=>{if(y){ot(p,b),m=A(r,p);const x=re(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,F=Xf(x),H=m._f.refs||[];if(F?H.find(W=>W===x):x===m._f.ref)return;Z(r,p,{_f:{...m._f,...F?{refs:[...H.filter(Vn),x,...Array.isArray(A(n,p))?[{}]:[]],ref:{type:x.type,name:p}}:{ref:x}}}),I(p,!1,void 0,x)}else m=A(r,p,{}),m._f&&(m._f.mount=!1),(t.shouldUnregister||b.shouldUnregister)&&!(qf(s.array,p)&&o.action)&&s.unMount.add(p)}}},Qt=()=>t.shouldFocusError&&xi(r,fe,s.mount),or=p=>{Ye(p)&&(g.state.next({disabled:p}),xi(r,(b,m)=>{const E=A(r,m);E&&(b.disabled=E._f.disabled||p,Array.isArray(E._f.refs)&&E._f.refs.forEach(y=>{y.disabled=E._f.disabled||p}))},0,!1))},ei=(p,b)=>async m=>{let E;m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let y=ue(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:x,values:F}=await K();S(),i.errors=x,y=ue(F)}else await P(r);if(s.disabled.size)for(const x of s.disabled)ce(y,x);if(ce(i.errors,"root"),xe(i.errors)){g.state.next({errors:{}});try{await p(y,m)}catch(x){E=x}}else b&&await b({...i.errors},m),Qt(),setTimeout(Qt);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:xe(i.errors)&&!E,submitCount:i.submitCount+1,errors:i.errors}),E)throw E},ti=(p,b={})=>{A(r,p)&&(re(b.defaultValue)?G(p,ue(A(n,p))):(G(p,b.defaultValue),Z(n,p,ue(b.defaultValue))),b.keepTouched||ce(i.touchedFields,p),b.keepDirty||(ce(i.dirtyFields,p),i.isDirty=b.defaultValue?L(p,ue(A(n,p))):L()),b.keepError||(ce(i.errors,p),d.isValid&&C()),g.state.next({...i}))},Ft=(p,b={})=>{const m=p?ue(p):n,E=ue(m),y=xe(p),x=y?n:E;if(b.keepDefaultValues||(n=m),!b.keepValues){if(b.keepDirtyValues){const F=new Set([...s.mount,...Object.keys(Kt(n,a))]);for(const H of Array.from(F)){const W=A(i.dirtyFields,H),ke=A(a,H),Dt=A(x,H);W&&!re(ke)?Z(x,H,ke):!W&&!re(Dt)&&G(H,Dt)}}else{if(Tn&&re(p))for(const F of s.mount){const H=A(r,F);if(H&&H._f){const W=Array.isArray(H._f.refs)?H._f.refs[0]:H._f.ref;if(tr(W)){const ke=W.closest("form");if(ke){ke.reset();break}}}}if(b.keepFieldsRef)for(const F of s.mount)G(F,A(x,F));else r={}}a=t.shouldUnregister?b.keepDefaultValues?ue(n):{}:ue(x),g.array.next({values:{...x}}),g.state.next({values:{...x}})}s={mount:b.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!b.keepIsValid||!!b.keepDirtyValues||!t.shouldUnregister&&!xe(x),o.watch=!!t.shouldUnregister,o.keepIsValid=!!b.keepIsValid,o.action=!1,b.keepErrors||(i.errors={}),g.state.next({submitCount:b.keepSubmitCount?i.submitCount:0,isDirty:y?!1:b.keepDirty?i.isDirty:!!(b.keepDefaultValues&&!wt(p,n)),isSubmitted:b.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:y?{}:b.keepDirtyValues?b.keepDefaultValues&&a?Kt(n,a):i.dirtyFields:b.keepDefaultValues&&p?Kt(n,p):b.keepDirty?i.dirtyFields:{},touchedFields:b.keepTouched?i.touchedFields:{},errors:b.keepErrors?i.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?i.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},$i=(p,b)=>Ft(je(p)?p(a):p,{...t.resetOptions,...b}),sr=(p,b={})=>{const m=A(r,p),E=m&&m._f;if(E){const y=E.refs?E.refs[0]:E.ref;y.focus&&setTimeout(()=>{y.focus(),b.shouldSelect&&je(y.select)&&y.select()})}},lr=p=>{i={...i,...p}},Ei={control:{register:ot,unregister:Xt,getFieldState:Yt,handleSubmit:ei,setError:Jt,_subscribe:mt,_runSchema:K,_updateIsValidating:S,_focusError:Qt,_getWatch:V,_getDirty:L,_setValid:C,_setFieldArray:v,_setDisabledField:Ci,_setErrors:$,_getFieldArray:q,_reset:Ft,_resetDefaultValues:()=>je(t.defaultValues)&&t.defaultValues().then(p=>{$i(p,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:or,_subjects:g,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(p){o=p},get _defaultValues(){return n},get _names(){return s},set _names(p){s=p},get _formState(){return i},get _options(){return t},set _options(p){t={...t,...p}}},subscribe:Tt,trigger:Q,register:ot,handleSubmit:ei,watch:Zt,setValue:G,getValues:Si,reset:$i,resetField:ti,clearErrors:j,unregister:Xt,setError:Jt,setFocus:sr,getFieldState:Yt};return{...Ei,formControl:Ei}}function rr(e={}){const t=me.useRef(void 0),i=me.useRef(void 0),[r,n]=me.useState({isDirty:!1,isValidating:!1,isLoading:je(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:je(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!je(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=up(e);t.current={...s,formState:r}}const a=t.current.control;return a._options=e,Yf(()=>{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]),me.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),me.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),me.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),me.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),me.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==r.isDirty&&a._subjects.state.next({isDirty:o})}},[a,r.isDirty]),me.useEffect(()=>{var o;e.values&&!wt(e.values,i.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),i.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),me.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=me.useMemo(()=>Gf(r,a),[a,r]),t.current}const Rs=(e,t,i)=>{if(e&&"reportValidity"in e){const r=A(i,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},fp=(e,t)=>{for(const i in t.fields){const r=t.fields[i];r&&r.ref&&"reportValidity"in r.ref?Rs(r.ref,i,e):r.refs&&r.refs.forEach(n=>Rs(n,i,e))}},pp=(e,t)=>{t.shouldUseNativeValidation&&fp(e,t);const i={};for(const r in e){const n=A(t.fields,r),a=Object.assign(e[r]||{},{ref:n&&n.ref});if(hp(t.names||Object.keys(e),r)){const o=Object.assign({},A(i,r));Z(o,"root",a),Z(i,r,o)}else Z(i,r,a)}return i},hp=(e,t)=>e.some(i=>i.startsWith(t+"."));var nr=function(e,t,i){return i===void 0&&(i={}),function(r,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(Cf(e,r,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var u=s.issues[0],f=wf(u);if(f&&(l[f]||(l[f]={message:u.message,type:u.type}),o)){var d=l[f].types,h=d&&d[u.type];l[f]=_s(f,o,l,u.type,h?[].concat(h,u.message):u.message)}s.issues.shift()}return{values:{},errors:pp(l,a)}}return{values:i.raw?r:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const js=27,Bs=12,zs=10,gp=Bt("enum"),bp=(e,t)=>{const i={min:e.minSelected??0,max:e.maxSelected??e.options.length};return nr(rt({checked:bt(ls(Ee(),as()),$n(r=>Object.entries(r).filter(([n,a])=>a).map(([n,a])=>n)),wi(i.max,t("validation_multiple_choice_max",{count:i.max})),Ut(i.min,t("validation_multiple_choice_min",{count:i.min})))}))},vp=Rr(({option:e,...t},i)=>c(ae,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:i}),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})]})),Us=Ct("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:fs}}}),wp=({input:e,onSubmitSuccess:t})=>{var f,d;const i=e.key?(f=N.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,r=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,n=r&&e.config.options.length===2,{t:a}=se(),{register:o,handleSubmit:s,formState:{errors:l}}=rr({defaultValues:{checked:r?{}:gp(i)?Object.fromEntries(i.value.map(h=>[h,!0])):{}},resolver:bp(e.config,a)}),u=An();return n?c("ul",{style:{maxHeight:6.5*js+5*Bs+2*zs},class:Us({variant:"booleanLike"}),children:e.config.options.map((h,g)=>c("li",{class:ps,children:c(hs,{type:"submit",ref:w=>{w&&g===0&&(u.current=w)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}):c("form",{noValidate:!0,onSubmit:h=>s(g=>{const w=g.checked;t({type:"enum",value:w})})(h),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*js+5*Bs+2*zs},class:Us({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,g)=>{const w=`checked.${h.value}`,{ref:_,...C}=o(w);return c("li",{class:"relative",children:c(vp,{option:h,autoFocus:g===0,ref:S=>{S&&g===0&&(u.current=S),_(S)},id:w,...C,onClick:r?()=>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:[r?null:c(It,{}),e.config.minSelected===0&&c(vt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(qt,{error:(d=l.checked)==null?void 0:d.root})})]})},mp=Bt("number"),yp=(e,t)=>{const i=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return nr(rt({number:bt(os(t("validation_number")),ts(i,t("validation_number_min",{min:i})),es(r,t("validation_number_max",{max:r})),Xo(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},_p=({input:e,onSubmitSuccess:t})=>{var d;const i=e.config.defaultValue,r=e.key?(d=N.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:n}=se(),{register:a,handleSubmit:o,formState:{errors:s}}=rr({defaultValues:{number:mp(r)?r.value:i?Number(i):void 0},resolver:yp(e.config,n)}),{ref:l,...u}=a("number",{required:!e.config.optional,valueAsNumber:!0}),f=we();return $e(()=>{f.current&&(f.current.focus(),f.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&&(f.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:Wt({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(vt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(It,{})]}),c(qt,{error:s.number})]})},xp="44",kp=/^[0-9 ]+$/,Sp=Bt("string"),Cp=Bt("phone"),$p=e=>{const t=bt(Ee(e("validation_country_code")),Cn(kp,e("validation_country_code"))),i=bt(Ee(e("validation_phone")),Ut(1,e("validation_phone")),$n(r=>r.replace(/[^0-9]/g,"")));return nr(rt({countryCode:t,phoneNumber:i}))},Ep=({input:e,onSubmitSuccess:t})=>{var _;const i=e.key?(_=N.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,{t:r}=se(),[n,a]=Oe(),o=Sp(i)?$f(i.value):Cp(i)?i.value:void 0,{register:s,handleSubmit:l,formState:{errors:u},watch:f}=rr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??xp,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:$p(r)}),{ref:d,...h}=s("phoneNumber",{required:!e.config.optional}),g=we(),w=f("countryCode");return $e(()=>{g.current&&(g.current.focus(),g.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(C=>{const S=C.phoneNumber.replace(/[^0-9]/g,""),v=C.countryCode.replace(/[^0-9]/g,"");a(void 0);const k=e.config.minChars??7,$=S.length+v.length;if($<k)return a(r("validation_phone_min_chars",{count:k}));const I=e.config.maxChars;if(I!=null&&$>I)return a(r("validation_max_chars",{count:I}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:v,phoneNumber:S}}):t({type:"string",value:w+C.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:["+",w]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(En).map(([C,S])=>c("option",{value:S,children:[C," (+",S,")"]},C))})]}),c("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:C=>{C&&(g.current=C),d(C)},class:Wt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(vt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(It,{})]}),c(qt,{error:u.countryCode||u.phoneNumber||{message:n}})]})},ar=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),Hs=(e,t,i,r)=>i!==void 0&&r*1e3>wr?e("submission_available_at",{time:ra(i,t)}):e("submission_cooldown",{count:r}),Ip=({input:e,onSubmitSuccess:t})=>{const{t:i,locale:r}=se(),{availableAt:n}=e.config,[a,o]=Oe(()=>ar(n)),[s,l]=Oe("");Ri(()=>{const f=ar(n);if(o(f),f===0)return;l(Hs(i,r,n,f));const d=setInterval(()=>{const h=ar(n);o(h),!(h>0)&&(clearInterval(d),l(i("submission_cooldown_ready")))},250);return()=>clearInterval(d)},[n,r,i]);const u=a>0;return c("div",{class:"flex flex-col items-center gap-2 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 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 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 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":u,"aria-describedby":u?"submit-cooldown":void 0,onClick:()=>{ar(n)>0||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"})]})]})}),u&&c("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:Hs(i,r,n,a)}),c("p",{role:"status",class:"sr-only",children:s})]})},Ap=160,qs=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Ap)}px`},Tp={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Fp=Bt("string"),Dp=(e,t)=>{const i={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return nr(rt({text:{date:bt(Ee(t("validation_date")),Cn(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:bt(Ee(t("validation_email")),Qo(t("validation_email")),Ut(e.minChars??1,i.minLength),wi(e.maxChars??1/0,i.maxLength)),text:bt(Ee(),Ut(e.minChars??1,i.minLength),wi(e.maxChars??1/0,i.maxLength)),url:bt(Ee(t("validation_url")),is(t("validation_url")),Ut(e.minChars??1,i.minLength),wi(e.maxChars??1/0,i.maxLength))}[e.format]}))},Np={text:({input:e,onSubmitSuccess:t})=>{var _;const{t:i}=se(),r=e.key?(_=N.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,n=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:u}}=rr({defaultValues:{text:Fp(r)?r.value:n??""},resolver:Dp(e.config,i)}),{ref:f,...d}=o("text",{required:!e.config.optional}),h=we();$e(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&qs(h.current),h.current.focus(),h.current.select())},[]);const g=e.config.maxChars,w=a&&g!==void 0?l("text").length:void 0;return c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(C=>{t({type:"string",value:C.text})}),children:[c("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[a?c("textarea",{id:"chat-input",...d,rows:2,maxLength:g,autoFocus:!0,"aria-describedby":w!==void 0?"chat-input-count":void 0,onInput:C=>qs(C.currentTarget),onKeyDown:C=>{var S;C.key==="Enter"&&(C.ctrlKey||C.metaKey)&&(C.preventDefault(),(S=C.currentTarget.form)==null||S.requestSubmit())},ref:C=>{C&&(h.current=C),f(C)},placeholder:e.config.placeholder,class:Wt({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):c("input",{id:"chat-input",...d,...Tp[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:C=>{C&&(h.current=C),f(C)},placeholder:e.config.placeholder,class:Wt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(vt,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(It,{})]}),w!==void 0&&g!==void 0&&c("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[w,"/",g]}),c(qt,{error:u.text})]})},phone:Ep,"multiple-choice":wp,boolean:Vf,file:zf,submit:Ip,address:Df,number:_p},Mp=({logger:e,analytics:t})=>{var a;const i=(a=N.current$.value.flow)==null?void 0:a.data.currentInput,r=we(null),n=()=>ie.onInteractionFn$.value();return $e(()=>{var o;(o=r.current)==null||o.scrollTo({top:0})},[i]),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:i?n:void 0,onKeyDownCapture:i?n:void 0,children:i?(()=>{const o=Np[i.type];return c(o,{logger:e,analytics:t,onSubmitSuccess:ie.onSubmitSuccessFn$.value,input:i})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Wt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(It,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Lp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vp=function(e){return e instanceof RegExp},Op=function(t){var i=/[\\^$.*+?()[\]{}|]/g,r=RegExp(i.source);return t&&r.test(t)?t.replace(i,"\\$&"):t},Ws=function(e){return typeof e=="string"},Pp=function(e){var t=[];return e.forEach(function(i){Array.isArray(i)?t=t.concat(i):t.push(i)}),t};function Rp(e,t,i){var r=0,n=0;if(e==="")return e;if(!e||!Ws(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Vp(a)||(a=new RegExp("("+Op(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,r+=o[s-1].length,o[s]=i(o[s],s,r),r+=n}return o}var jp=function(t,i,r){return Array.isArray(t)||(t=[t]),Pp(t.map(function(n){return Ws(n)?Rp(n,i,r):n}))};const ki=Lp(jp),Bp=/(\[[^\]]+\]\([^)]+\))/g,zp=/\[([^\]]+)\]\(([^)]+)\)/,Up=/(https?:\/\/[^\s]+)/g,Hp=/_(.*?)_/g,qp=/\*\*(.*?)\*\*/g,Wp=/(\\n|\n)/g,Ks="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Kp=e=>{const t=ki(e,Bp,(s,l)=>{const[,u,f]=s.match(zp)??[];return f?c("a",{class:Ks,href:f,children:u??f},f+l):c("span",{children:"INVALID LINK"})}),i=ki(t,Up,(s,l)=>c("a",{class:Ks,href:s,children:s},s+l)),r=ki(i,Hp,(s,l)=>c("em",{children:s},s+l)),n=ki(r,qp,(s,l)=>c("strong",{children:s},s+l));let a=0;return ki(n,Wp,()=>c("br",{},`br-${a++}`))},Gp=Ct("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"}}),Yp=({children:e,className:t,animate:i,side:r,...n})=>c("p",{style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:Gp({className:t,side:r,animate:i}),...n,children:e}),Jp=({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"})})]})}),Zp=({className:e,...t})=>c("div",{"aria-hidden":!0,children:ie.isBotTyping$.value===!0?c("div",{"data-testid":"typing-indicator",class:et("flex gap-1 p-4",e),...t,children:Array.from({length:3},(i,r)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}):void 0}),Xp={bot:"left",user:"right"},Qp=Ct("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-11",warning:"text-system-warning",error:"text-error-11",success:"text-system-success"}}}),eh=({lastSentMessageFooter:e})=>{const{t}=se(),i=N.current$.value.flow,r=(i==null?void 0:i.data.messages)??[],n=i?wn(i):void 0;return c("ol",{"aria-label":t("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((a,o)=>c(ae,{children:c("li",{class:"flex",tabIndex:o===r.length-1?-1:void 0,children:[n&&a.groupId===n&&!r.slice(o+1).some(s=>s.groupId===n)?e:null,Ui(a).with({type:"system"},s=>c("p",{class:Qp({variant:s.variant}),children:s.text})).with({type:"text",author:ui.union("bot","user")},s=>{const l=o===r.length-1,u=s.author==="bot"?Kp(s.text):s.text;return c(ae,{children:c(Yp,{animate:l,side:Xp[s.author],children:u},o)})}).with({type:"link"},s=>c(Jp,{message:s})).with({type:"image"},s=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:s.url,style:{aspectRatio:s.width/s.height}})).with({type:"file"},s=>c(Pf,{class:s.author==="bot"?void 0:"ml-auto",file:{name:s.fileName,sizeKb:s.fileSizeKb}})).with({type:"loading"},s=>{const l=r[r.length-1];return!(s===l)||ie.isBotTyping$.value||i!=null&&i.data.isFinished?null:c("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[c(Ji,{"aria-hidden":s.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),s.text?c("p",{role:"status",class:"text-neutral-11 text-sm",children:s.text}):null]})}).exhaustive()]})},o)),c("li",{class:ie.captchaVisible$.value?"flex":"hidden",children:c("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":t("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),c(Zp,{},"typing")]})},th=({logger:e,apiClient:t,analytics:i,talentBankClient:r})=>{const{flow:n}=N.current$.value;tt(n,"Flow is required to exist to show chatbot body");const a=N.viewState$.value,{chatRef:o,chatService:s}=Qd(),{t:l}=se(),[u,f]=Oe();return $e(()=>{a==="maximised"&&ie.scrollToEnd()},[a]),$e(()=>{var I;const{state:d,flow:h}=N.current$.peek();if(d!=="loaded")throw new Error(l("invalid_state"));let g=h.data.nodeHistory.at(-1);if(ie.scrollToEnd(),N.setInput(void 0),h.data.isFinished)return;const w=()=>{const M=N.current$.peek().flow;!M||M.data.hasInteracted||(N.markAsInteracted(),Zo(i,M,"FLOW_INTERACT"))};ie.onInteractionFn$.value=w,g===void 0?(g=Ko(n.nodes).id,N.setCurrentNodeId(g),Zo(i,h,"FLOW_START")):N.removeMessagesSentByNodeIds([g,_n]);const{interpret:_,abort:C,undo:S}=ju({context:n.context,analytics:{service:i,customProperties:(I=n.analytics)==null?void 0:I.customProperties},apiClient:t,logger:e,talentBankClient:r,flow:n,chatService:s,t:l,getApplicationRecovery:()=>{var M;return(M=N.current$.peek().flow)==null?void 0:M.data.applicationRecovery},setApplicationRecovery:N.setApplicationRecovery,persistWriteBarrier:()=>N.persistWriteBarrier(h),getSubmissions:()=>{var M;return(M=N.current$.peek().flow)==null?void 0:M.data.submissions},onInterpret:M=>N.setCurrentNodeId(M.id),onFlowEnd:async()=>{var B;N.markAsFinished();const M=N.current$.peek().flow;tt(M),i.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:M.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(B=n.analytics)==null?void 0:B.customProperties})}}),v=g,k=()=>{f(()=>S),_(v)},$=new AbortController;return h.offerResume?ff({chatService:s,t:l,signal:$.signal}).then(M=>(N.settleResume(h),M?k():(N.restart(),Te.flushStateData()))).catch(M=>{M instanceof st||e.error("Resume prompt failed",M)}):k(),()=>{$.abort(),ie.onInteractionFn$.value===w&&(ie.onInteractionFn$.value=()=>{}),C()}},[i,t,s,e,n,r,l]),c(ae,{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(eh,{lastSentMessageFooter:!wn(n)||!u?null:c(ih,{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(bi,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":l("jump_to_current"),onClick:()=>{var h,g;ie.scrollToEnd(),(g=((h=o.current)==null?void 0:h.querySelector('li[tabindex="-1"]'))??o.current)==null||g.focus({preventScroll:!0})},children:c(Vo,{})})})]}),c(Mp,{logger:e,analytics:i})]})},ih=({undoFn:e})=>{const{t}=se();return c("div",{class:"flex flex-1 items-center justify-end px-1",children:c(bi,{"aria-label":t("undo"),onClick:async()=>{const{flow:i}=N.current$.peek();tt(i),e(i.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"})})})},rh=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:th},Symbol.toStringTag,{value:"Module"}))})();
9
+ `)}),u.hasHardConcerns&&e.data.alternativeLink&&await r.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await r.userInput({type:"submit",key:void 0,config:{label:Re(e.data.continueLabel,{submissions:i,context:l})}})}return n(e.nextId)}const Zo=(e,t,i)=>{var r;return e.log({event:i,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:(r=t.analytics)==null?void 0:r.customProperties})},_n="resume-prompt",ff=async({chatService:e,t,signal:i})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:_n,signal:i});const r=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:i});return N.removeMessagesSentByNodeIds([_n]),(r==null?void 0:r.value)!==!1},It=({class:e,...t})=>{const{t:i}=se();return c("button",{class:et("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:i("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var it;function Xi(e){return{lang:(e==null?void 0:e.lang)??(it==null?void 0:it.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(it==null?void 0:it.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(it==null?void 0:it.abortPipeEarly)}}var xn;function pf(e){return xn==null?void 0:xn.get(e)}var kn;function hf(e){return kn==null?void 0:kn.get(e)}var Sn;function gf(e,t){var i;return(i=Sn==null?void 0:Sn.get(e))==null?void 0:i.get(t)}function zt(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function be(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??zt(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:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",f=(n==null?void 0:n.message)??e.message??gf(e.reference,l.lang)??(u?hf(l.lang):null)??r.message??pf(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Ge(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Xi())}}}function bf(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function vf(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function wf(e){if(e.path){let t="";for(const i of e.path)if(typeof i.key=="string"||typeof i.key=="number")t?t+=`.${i.key}`:t+=i.key;else return null;return t}return null}var mf=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},yf=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Xo(e,t){return{kind:"validation",type:"check",reference:Xo,async:!1,expects:null,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement(i.value)&&be(this,"input",i,r),i}}}function Qo(e){return{kind:"validation",type:"email",reference:Qo,expects:null,async:!1,requirement:yf,message:e,"~run"(t,i){return t.typed&&!this.requirement.test(t.value)&&be(this,"email",t,i),t}}}function wi(e,t){return{kind:"validation",type:"max_length",reference:wi,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&be(this,"length",i,r,{received:`${i.value.length}`}),i}}}function es(e,t){return{kind:"validation",type:"max_value",reference:es,async:!1,expects:`<=${e instanceof Date?e.toJSON():zt(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value<=this.requirement)&&be(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():zt(i.value)}),i}}}function Ut(e,t){return{kind:"validation",type:"min_length",reference:Ut,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&be(this,"length",i,r,{received:`${i.value.length}`}),i}}}function ts(e,t){return{kind:"validation",type:"min_value",reference:ts,async:!1,expects:`>=${e instanceof Date?e.toJSON():zt(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value>=this.requirement)&&be(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():zt(i.value)}),i}}}function Cn(e,t){return{kind:"validation",type:"regex",reference:Cn,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement.test(i.value)&&be(this,"format",i,r),i}}}function $n(e){return{kind:"transformation",type:"transform",reference:$n,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function is(e){return{kind:"validation",type:"url",reference:is,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,i){return t.typed&&!this.requirement(t.value)&&be(this,"URL",t,i),t}}}function _f(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function rs(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function ns(e,t){return{kind:"schema",type:"array",reference:ns,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(u):f.path=[u],(a=i.issues)==null||a.push(f);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else be(this,"type",i,r);return i}}}function as(e){return{kind:"schema",type:"boolean",reference:as,expects:"boolean",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:be(this,"type",t,i),t}}}function os(e){return{kind:"schema",type:"number",reference:os,expects:"number",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:be(this,"type",t,i),t}}}function rt(e,t){return{kind:"schema",type:"object",reference:rt,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.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]:rs(s),u=s["~run"]({value:l},r);if(u.issues){const f={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(f):d.path=[f],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=_f(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(be(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else be(this,"type",i,r);return i}}}function Ht(e,t){return{kind:"schema",type:"optional",reference:Ht,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ge(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=rs(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function ss(e,t){return{kind:"schema",type:"picklist",reference:ss,expects:vf(e.map(zt),"|"),async:!1,options:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:be(this,"type",i,r),i}}}function ls(e,t,i){return{kind:"schema",type:"record",reference:ls,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Ge(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(bf(a,l)){const u=a[l],f=this.key["~run"]({value:l},n);if(f.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of f.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=f.issues),n.abortEarly){r.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 g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!f.typed||!d.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=d.value)}}else be(this,"type",r,n);return r}}}function Ee(e){return{kind:"schema",type:"string",reference:Ee,expects:"string",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:be(this,"type",t,i),t}}}function xf(e,t,i){const r=e["~run"]({value:t},Xi(i));if(r.issues)throw new mf(r.issues);return r.value}function kf(e,t){const i={};for(const r in e.entries)i[r]=!t||t.includes(r)?Ht(e.entries[r]):e.entries[r];return{...e,entries:i,get"~standard"(){return Ge(this)}}}function vt(...e){return{...e[0],pipe:e,get"~standard"(){return Ge(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Sf(e,t,i){const r=e["~run"]({value:t},Xi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}async function Cf(e,t,i){const r=await e["~run"]({value:t},Xi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}const qt=({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})]}),nt=({class:e,...t})=>{const{t:i}=se();return c("button",{type:"button",class:et("fr touch-hitbox text-neutral-11 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:i("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),i("skip")]})};var En={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"},$f=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(En).find(r=>e.startsWith(r))??"",i=e.replace(t,"");return/^\d+$/.test(i)?{countryCode:t,phoneNumber:i}:{countryCode:"",phoneNumber:""}};const Wt=Ct("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}}),Ef="https://api.mapbox.com/search/searchbox/v1/suggest",If="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Af=e=>atob(e).split("").reverse().join(""),at=rt({name:Ee()}),Tf=rt({suggestions:ns(rt({feature_type:Ht(Ee()),full_address:Ht(Ee()),place_formatted:Ht(Ee()),name:Ht(Ee()),mapbox_id:Ee(),context:kf(rt({address:at,street:at,neighborhood:at,locality:at,district:at,place:at,region:at,postcode:at,country:at}))}))}),Ff=({logger:e,t})=>dt(()=>{var r;const i=(r=N.current$.peek().flow)==null?void 0:r.data.flowSessionId;return i?{enabled:!0,getPredictions:async n=>{var d;const a=new URL(Ef);a.searchParams.set("q",n),a.searchParams.set("session_token",i);const o=(d=N.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",Af(If));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=Sf(Tf,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:f}=u.output;return{ok:!0,data:f.map(h=>{var g,w,_,C,S,v,k,$,I;return{label:h.full_address??([h.name,h.place_formatted].filter(Boolean).join(", ")||h.mapbox_id),id:h.mapbox_id,address:{line1:((g=h.context.address)==null?void 0:g.name)??((w=h.context.street)==null?void 0:w.name),line2:void 0,line3:((_=h.context.neighborhood)==null?void 0:_.name)??((C=h.context.locality)==null?void 0:C.name),city:((S=h.context.place)==null?void 0:S.name)??((v=h.context.district)==null?void 0:v.name),state:(k=h.context.region)==null?void 0:k.name,postcode:(($=h.context.postcode)==null?void 0:$.name)??(h.feature_type==="postcode"?h.name:void 0),country:(I=h.context.country)==null?void 0:I.name}}})}}}:{enabled:!1}},[e,t]),cs=e=>{const{t}=se();return c("button",{type:"button",class:"touch-hitbox text-neutral-11 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")})]})},Df=({input:e,onSubmitSuccess:t,logger:i})=>{const{t:r}=se(),[n,a]=Oe(),{enabled:o,getPredictions:s}=Ff({logger:i,t:r}),[l,u]=Oe(o?"query":"manual"),[f,d]=Oe(""),[h,g]=Oe(),w=we(),_=we(),C=v=>{var $;if(tt(o,"Query state should not be enabled"),v=v.trim(),v===(($=w.current)==null?void 0:$.query)||v===(h==null?void 0:h.query)&&h.status==="done")return;if(d(v),v===""){w.current=void 0,g(void 0);return}const k=w.current={query:v};g({query:v,status:"pending"}),s(v).then(I=>{w.current===k&&(w.current=void 0,g(I.ok?{query:v,status:"done",items:I.data}:{query:v,status:"failed",error:I.error}))},I=>{w.current===k&&(w.current=void 0,i.error("Failed to get address details",I),g({query:v,status:"failed",error:r("address_error")}))})},S=(v,k)=>{a($=>({...$,[v]:k}))};switch(l){case"query":return tt(o,"Query state should not be enabled"),c(Nf,{input:e,onSkip:()=>t(null),onAddressSelect:v=>{if(v===""){w.current&&(w.current=void 0,g(void 0)),u("manual");return}const k=(h==null?void 0:h.status)==="done"?h.items.find($=>$.id===v):void 0;k&&(_.current!==v&&a(k.address),_.current=v,u("details"))},onAddressSearch:C,lookup:h,query:f});case"details":return tt(n!==void 0),c(ds,{input:e,logger:i,onSubmitSuccess:t,addressFields:n,onFieldChange:S,actions:c(cs,{onClick:()=>{u("query")}})});case"manual":return c(ds,{logger:i,input:e,onSubmitSuccess:t,addressFields:n??{},onFieldChange:S,actions:o?c(cs,{onClick:()=>{u("query")}}):e.config.optional?c(nt,{onClick:()=>t(null)}):void 0})}},Nf=({input:e,onSkip:t,lookup:i,onAddressSelect:r,query:n,onAddressSearch:a})=>{const{t:o}=se(),s=we(null);return $e(()=>{s.current&&(s.current.focus(),s.current.select())},[]),c(ne,{children:[c("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&a(f)},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",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:n,class:Wt({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(nt,{class:"relative",onClick:t})]}),(i==null?void 0:i.status)==="failed"?c(qt,{error:{message:i.error}}):null,c("p",{role:"status",class:(i==null?void 0:i.status)==="pending"||(i==null?void 0:i.status)==="done"&&i.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(i==null?void 0:i.status)==="pending"?c(ne,{children:[c(Ji,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(i==null?void 0:i.status)==="done"&&i.items.length===0?o("address_no_results"):null}),c("ul",{children:[((i==null?void 0:i.status)==="done"?i.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:()=>{r(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:()=>{r("")},children:c("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},In=["line1","line2","line3","city","state","postcode","country"],ds=({addressFields:e,onFieldChange:t,onSubmitSuccess:i,actions:r,input:n})=>{const a=we(null);$e(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(En),{t:s}=se();return c("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{l.preventDefault();const u=l.currentTarget,f=[...u.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of f){g.value="";const w=In.find(_=>n.config.keys[_]===g.name);w&&t(w,"")}if(f.length>0&&!u.checkValidity()){u.reportValidity();return}const d=new FormData(u),h=Object.fromEntries(d.entries());i({type:"address",value:h})},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:In.map((l,u)=>{const f=`isdk_${l}`,d=n.config.keys[l];return d?c(ne,{children:[c("label",{for:f,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 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:f,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:f,defaultValue:e[l],onInput:h=>t(l,h.currentTarget.value),required:l==="line2"?n.config.line2Required===!0:l!=="line3"}),u===In.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:[r,c(It,{class:"ml-auto"})]})]})},An=()=>{const e=we(null);return Ri(()=>{var t;(t=e.current)==null||t.focus()},[]),e},us=["true","false"],Mf=ss(us),Lf="answer",fs="flex items-center flex-wrap gap-2 p-2.5",ps="min-w-0 max-w-full flex-auto",hs=Rr(({label:e,...t},i)=>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:i,children:c("p",{class:"text-center text-base",children:e})})),Vf=({input:e,onSubmitSuccess:t})=>{const i=An();return c("form",{noValidate:!0,class:"",onSubmit:r=>{r.preventDefault();const n=Od(r).value,a=xf(Mf,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:fs,children:us.map((r,n)=>c("li",{class:ps,children:c(hs,{ref:n===0?i:null,type:"submit",name:Lf,value:r,label:e.config.labels[r]},r)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(nt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},gs=e=>e.reduce((t,i)=>t+i.sizeKb,0),Of=Bt("file"),bs=3,Qi=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Pf=({file:e,class:t,...i})=>{const{t:r}=se(),[n,a]=Qi(e.name);return c("div",{class:et("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...i,children:[c("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"sr-only",children:[r("file_name"),": "]}),c("span",{class:"block truncate",children:n}),c("span",{children:a})]}),c("p",{class:"text-accent-11",children:[c("span",{class:"sr-only",children:[r("file_size"),": "]}),Nt(e.sizeKb)]})]})},vs=({class:e,...t})=>c("li",{class:et("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Rf=(e,t)=>{const[i,r]=Qi(e);return`${i.slice(0,t)}${r}`},ws=e=>({name:Rf(e.name,42),sizeKb:e.size/1e3}),jf=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Bf=(e,t,i)=>{const r=Qi(t.name)[1].toLowerCase(),n=[...i.map(o=>o.toLowerCase()),...jf],a=r===""?"none":n.includes(r)?r:"other";return`chatbot-file-refused:${e}:${a}`},zf=({input:e,onSubmitSuccess:t,analytics:i})=>{var C;const r=(C=N.current$.value.flow)==null?void 0:C.data.submissions[e.key],[n,a]=Oe(Of(r)&&r.value.length?{status:"ready",files:r.value}:{status:"empty"}),o=we(0),s=n.status==="ready"?n.files:[],l=n.status==="ready"||n.status==="pending"?n.files:[],u=n.status==="error"?n.error:void 0,f=l.length-bs,d=gs(l),h=An(),{t:g}=se(),w=S=>{if(!S.length)return{reason:"required",error:{type:"required",message:g("validation_file")}};if(!Zn(S,e.config.extensions))return{reason:"type",file:S.find(v=>!Zn([v],e.config.extensions)),error:{type:"validate",message:g("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(S.some(v=>v.sizeKb===0))return{reason:"empty",file:S.find(v=>v.sizeKb===0),error:{type:"validate",message:g("validation_file_empty")}};if(e.config.fileSizeLimitKib&&gs(S)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:g("validation_file_size",{size:Nt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&S.length>1)return{reason:"count",error:{type:"invalid",message:g("validation_file_max",{count:1})}}},_=(S,v)=>{var k,$;return i.log({event:"INTERACTION",properties:{tag:Bf(S,v,e.config.extensions)},customProperties:($=(k=N.current$.peek().flow)==null?void 0:k.analytics)==null?void 0:$.customProperties})};return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:S=>{if(S.preventDefault(),n.status==="pending"||n.status==="error")return;const v=w(s);v?a({status:"error",error:v.error}):t({type:"file",value:s})},children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:h,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,bs).map(S=>{const[v,k]=Qi(S.name);return c(vs,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:v}),c("span",{children:k})]})}),f>0?c(vs,{children:g("file_more",{count:f})}):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:g("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-11 text-xs",children:["(",g("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:g("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(S=>c("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:S.replace(".","")}))})]})]}),c("p",{role:"status",class:et("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:n.status==="pending"?c(ne,{children:[c(Ji,{"aria-hidden":"true",class:"h-4 w-4"}),g("file_preparing",{count:l.length})]}):n.status==="ready"?c(ne,{children:[s.length>1?g("file_total_size",{size:Nt(d)}):Nt(d),c("span",{class:"sr-only",children:[". ",g("file_ready",{count:s.length})]})]}):null}),c("input",{id:"dropzone-file","aria-label":g("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async S=>{tt(S.target instanceof HTMLInputElement);const v=S.target.files?Array.from(S.target.files):[];S.target.value="";const[k]=v;if(!k)return;const $=++o.current,I=n.status==="ready",M=v.map(ws),B=w(M);if(B)return _(B.reason,B.file??k),a({status:"error",error:B.error});a({status:"pending",files:M});let K;try{const D=await Promise.all(v.map(async P=>{try{return{...ws(P),data:await El(P)}}catch(U){throw K??(K=P),U}}));o.current===$&&a({status:"ready",files:D})}catch{if(o.current!==$)return;_("unreadable",K??k),a({status:"error",error:{type:"invalid",message:g(I?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(It,{disabled:s.length===0}),e.config.optional&&c(nt,{class:"relative",onClick:()=>t(null)})]})]}),c(qt,{error:u})]})};var mi=e=>e.type==="checkbox",At=e=>e instanceof Date,Ie=e=>e==null;const ms=e=>typeof e=="object";var le=e=>!Ie(e)&&!Array.isArray(e)&&ms(e)&&!At(e),Uf=e=>le(e)&&e.target?mi(e.target)?e.target.checked:e.target.value:e,Hf=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,qf=(e,t)=>e.has(Hf(t)),Wf=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},Tn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ue(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Tn&&(e instanceof Blob||t))return e;const i=Array.isArray(e);if(!i&&!(le(e)&&Wf(e)))return e;const r=i?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=ue(e[n]));return r}var er=e=>/^\w*$/.test(e),re=e=>e===void 0,Fn=e=>Array.isArray(e)?e.filter(Boolean):[],Dn=e=>Fn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),A=(e,t,i)=>{if(!t||!le(e))return i;const r=(er(t)?[t]:Dn(t)).reduce((n,a)=>Ie(n)?n:n[a],e);return re(r)||r===e?re(e[t])?i:e[t]:r},Ye=e=>typeof e=="boolean",je=e=>typeof e=="function",Z=(e,t,i)=>{let r=-1;const n=er(t)?[t]:Dn(t),a=n.length,o=a-1;for(;++r<a;){const s=n[r];let l=i;if(r!==o){const u=e[s];l=le(u)||Array.isArray(u)?u:isNaN(+n[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ys={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Be={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ot={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Kf=me.createContext(null);Kf.displayName="HookFormControlContext";var Gf=(e,t,i,r=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Be.all&&(t._proxyFormState[o]=!r||Be.all),i&&(i[o]=!0),e[o]}});return n};const Yf=typeof window<"u"?me.useLayoutEffect:me.useEffect;var Fe=e=>typeof e=="string",Jf=(e,t,i,r,n)=>Fe(e)?(r&&t.watch.add(e),A(i,e,n)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),A(i,a))):(r&&(t.watchAll=!0),i),Nn=e=>Ie(e)||!ms(e);function wt(e,t,i=new WeakSet){if(Nn(e)||Nn(t))return Object.is(e,t);if(At(e)&&At(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(i.has(e)||i.has(t))return!0;i.add(e),i.add(t);for(const a of r){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(At(o)&&At(s)||le(o)&&le(s)||Array.isArray(o)&&Array.isArray(s)?!wt(o,s,i):!Object.is(o,s))return!1}}return!0}const Zf=me.createContext(null);Zf.displayName="HookFormContext";var _s=(e,t,i,r,n)=>t?{...i[e],types:{...i[e]&&i[e].types?i[e].types:{},[r]:n||!0}}:{},yi=e=>Array.isArray(e)?e:[e],xs=()=>{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 ks(e,t){const i={};for(const r in e)if(e.hasOwnProperty(r)){const n=e[r],a=t[r];if(n&&le(n)&&a){const o=ks(n,a);le(o)&&(i[r]=o)}else e[r]&&(i[r]=a)}return i}var xe=e=>le(e)&&!Object.keys(e).length,Mn=e=>e.type==="file",tr=e=>{if(!Tn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ss=e=>e.type==="select-multiple",Ln=e=>e.type==="radio",Xf=e=>Ln(e)||mi(e),Vn=e=>tr(e)&&e.isConnected;function Qf(e,t){const i=t.slice(0,-1).length;let r=0;for(;r<i;)e=re(e)?r++:e[t[r++]];return e}function ep(e){for(const t in e)if(e.hasOwnProperty(t)&&!re(e[t]))return!1;return!0}function ce(e,t){const i=Array.isArray(t)?t:er(t)?[t]:Dn(t),r=i.length===1?e:Qf(e,i),n=i.length-1,a=i[n];return r&&delete r[a],n!==0&&(le(r)&&xe(r)||Array.isArray(r)&&ep(r))&&ce(e,i.slice(0,-1)),e}var tp=e=>{for(const t in e)if(je(e[t]))return!0;return!1};function Cs(e){return Array.isArray(e)||le(e)&&!tp(e)}function On(e,t={}){for(const i in e){const r=e[i];Cs(r)?(t[i]=Array.isArray(r)?[]:{},On(r,t[i])):re(r)||(t[i]=!0)}return t}function Kt(e,t,i){i||(i=On(t));for(const r in e){const n=e[r];if(Cs(n))re(t)||Nn(i[r])?i[r]=On(n,Array.isArray(n)?[]:{}):Kt(n,Ie(t)?{}:t[r],i[r]);else{const a=t[r];i[r]=!wt(n,a)}}return i}const $s={value:!1,isValid:!1},Es={value:!0,isValid:!0};var Is=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(i=>i&&i.checked&&!i.disabled).map(i=>i.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!re(e[0].attributes.value)?re(e[0].value)||e[0].value===""?Es:{value:e[0].value,isValid:!0}:Es:$s}return $s},As=(e,{valueAsNumber:t,valueAsDate:i,setValueAs:r})=>re(e)?e:t?e===""?NaN:e&&+e:i&&Fe(e)?new Date(e):r?r(e):e;const Ts={isValid:!1,value:null};var Fs=e=>Array.isArray(e)?e.reduce((t,i)=>i&&i.checked&&!i.disabled?{isValid:!0,value:i.value}:t,Ts):Ts;function Ds(e){const t=e.ref;return Mn(t)?t.files:Ln(t)?Fs(e.refs).value:Ss(t)?[...t.selectedOptions].map(({value:i})=>i):mi(t)?Is(e.refs).value:As(re(t.value)?e.ref.value:t.value,e)}var ip=(e,t,i,r)=>{const n={};for(const a of e){const o=A(t,a);o&&Z(n,a,o._f)}return{criteriaMode:i,names:[...e],fields:n,shouldUseNativeValidation:r}},ir=e=>e instanceof RegExp,_i=e=>re(e)?e:ir(e)?e.source:le(e)?ir(e.value)?e.value.source:e.value:e,Ns=e=>({isOnSubmit:!e||e===Be.onSubmit,isOnBlur:e===Be.onBlur,isOnChange:e===Be.onChange,isOnAll:e===Be.all,isOnTouch:e===Be.onTouched});const Ms="AsyncFunction";var rp=e=>!!e&&!!e.validate&&!!(je(e.validate)&&e.validate.constructor.name===Ms||le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ms)),np=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ls=(e,t,i)=>!i&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const xi=(e,t,i,r)=>{for(const n of i||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)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(xi(s,t))break}else if(le(s)&&xi(s,t))break}}};function Vs(e,t,i){const r=A(e,i);if(r||er(i))return{error:r,name:i};const n=i.split(".");for(;n.length;){const a=n.join("."),o=A(t,a),s=A(e,a);if(o&&!Array.isArray(o)&&i!==a)return{name:i};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:i}}var ap=(e,t,i,r)=>{i(e);const{name:n,...a}=e;return xe(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!r||Be.all))},op=(e,t,i)=>!e||!t||e===t||yi(e).some(r=>r&&(i?r===t:r.startsWith(t)||t.startsWith(r))),sp=(e,t,i,r,n)=>n.isOnAll?!1:!i&&n.isOnTouch?!(t||e):(i?r.isOnBlur:n.isOnBlur)?!e:(i?r.isOnChange:n.isOnChange)?e:!0,lp=(e,t)=>!Fn(A(e,t)).length&&ce(e,t),cp=(e,t,i)=>{const r=yi(A(e,i));return Z(r,"root",t[i]),Z(e,i,r),e};function Os(e,t,i="validate"){if(Fe(e)||Array.isArray(e)&&e.every(Fe)||Ye(e)&&!e)return{type:i,message:Fe(e)?e:"",ref:t}}var Gt=e=>le(e)&&!ir(e)?e:{value:e,message:""},Ps=async(e,t,i,r,n,a)=>{const{ref:o,refs:s,required:l,maxLength:u,minLength:f,min:d,max:h,pattern:g,validate:w,name:_,valueAsNumber:C,mount:S}=e._f,v=A(i,_);if(!S||t.has(_))return{};const k=s?s[0]:o,$=L=>{n&&k.reportValidity&&(k.setCustomValidity(Ye(L)?"":L||""),k.reportValidity())},I={},M=Ln(o),B=mi(o),K=M||B,D=(C||Mn(o))&&re(o.value)&&re(v)||tr(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,P=_s.bind(null,_,r,I),U=(L,V,q,O=ot.maxLength,X=ot.minLength)=>{const G=L?V:q;I[_]={type:L?O:X,message:G,ref:o,...P(L?O:X,G)}};if(a?!Array.isArray(v)||!v.length:l&&(!K&&(D||Ie(v))||Ye(v)&&!v||B&&!Is(s).isValid||M&&!Fs(s).isValid)){const{value:L,message:V}=Fe(l)?{value:!!l,message:l}:Gt(l);if(L&&(I[_]={type:ot.required,message:V,ref:k,...P(ot.required,V)},!r))return $(V),I}if(!D&&(!Ie(d)||!Ie(h))){let L,V;const q=Gt(h),O=Gt(d);if(!Ie(v)&&!isNaN(v)){const X=o.valueAsNumber||v&&+v;Ie(q.value)||(L=X>q.value),Ie(O.value)||(V=X<O.value)}else{const X=o.valueAsDate||new Date(v),G=Q=>new Date(new Date().toDateString()+" "+Q),ge=o.type=="time",fe=o.type=="week";Fe(q.value)&&v&&(L=ge?G(v)>G(q.value):fe?v>q.value:X>new Date(q.value)),Fe(O.value)&&v&&(V=ge?G(v)<G(O.value):fe?v<O.value:X<new Date(O.value))}if((L||V)&&(U(!!L,q.message,O.message,ot.max,ot.min),!r))return $(I[_].message),I}if((u||f)&&!D&&(Fe(v)||a&&Array.isArray(v))){const L=Gt(u),V=Gt(f),q=!Ie(L.value)&&v.length>+L.value,O=!Ie(V.value)&&v.length<+V.value;if((q||O)&&(U(q,L.message,V.message),!r))return $(I[_].message),I}if(g&&!D&&Fe(v)){const{value:L,message:V}=Gt(g);if(ir(L)&&!v.match(L)&&(I[_]={type:ot.pattern,message:V,ref:o,...P(ot.pattern,V)},!r))return $(V),I}if(w){if(je(w)){const L=await w(v,i),V=Os(L,k);if(V&&(I[_]={...V,...P(ot.validate,V.message)},!r))return $(V.message),I}else if(le(w)){let L={};for(const V in w){if(!xe(L)&&!r)break;const q=Os(await w[V](v,i),k,V);q&&(L={...q,...P(V,q.message)},$(q.message),r&&(I[_]=L))}if(!xe(L)&&(I[_]={ref:k,...L},!r))return I}}return $(!0),I};const dp={mode:Be.onSubmit,reValidateMode:Be.onChange,shouldFocusError:!0};function up(e={}){let t={...dp,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:je(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},n=le(t.defaultValues)||le(t.values)?ue(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ue(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 f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...f};let h={...d};const g={array:xs(),state:xs()},w=t.criteriaMode===Be.all,_=p=>b=>{clearTimeout(u),u=setTimeout(p,b)},C=async p=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||p)){let b;t.resolver?(b=xe((await K()).errors),S()):b=await P(r,!0),b!==i.isValid&&g.state.next({isValid:b})}},S=(p,b)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((p||Array.from(s.mount)).forEach(m=>{m&&(b?Z(i.validatingFields,m,b):ce(i.validatingFields,m))}),g.state.next({validatingFields:i.validatingFields,isValidating:!xe(i.validatingFields)}))},v=(p,b=[],m,E,y=!0,x=!0)=>{if(E&&m&&!t.disabled){if(o.action=!0,x&&Array.isArray(A(r,p))){const F=m(A(r,p),E.argA,E.argB);y&&Z(r,p,F)}if(x&&Array.isArray(A(i.errors,p))){const F=m(A(i.errors,p),E.argA,E.argB);y&&Z(i.errors,p,F),lp(i.errors,p)}if((d.touchedFields||h.touchedFields)&&x&&Array.isArray(A(i.touchedFields,p))){const F=m(A(i.touchedFields,p),E.argA,E.argB);y&&Z(i.touchedFields,p,F)}(d.dirtyFields||h.dirtyFields)&&(i.dirtyFields=Kt(n,a)),g.state.next({name:p,isDirty:L(p,b),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Z(a,p,b)},k=(p,b)=>{Z(i.errors,p,b),g.state.next({errors:i.errors})},$=p=>{i.errors=p,g.state.next({errors:i.errors,isValid:!1})},I=(p,b,m,E)=>{const y=A(r,p);if(y){const x=A(a,p,re(m)?A(n,p):m);re(x)||E&&E.defaultChecked||b?Z(a,p,b?x:Ds(y._f)):O(p,x),o.mount&&!o.action&&C()}},M=(p,b,m,E,y)=>{let x=!1,F=!1;const H={name:p};if(!t.disabled){if(!m||E){(d.isDirty||h.isDirty)&&(F=i.isDirty,i.isDirty=H.isDirty=L(),x=F!==H.isDirty);const W=wt(A(n,p),b);F=!!A(i.dirtyFields,p),W?ce(i.dirtyFields,p):Z(i.dirtyFields,p,!0),H.dirtyFields=i.dirtyFields,x=x||(d.dirtyFields||h.dirtyFields)&&F!==!W}if(m){const W=A(i.touchedFields,p);W||(Z(i.touchedFields,p,m),H.touchedFields=i.touchedFields,x=x||(d.touchedFields||h.touchedFields)&&W!==m)}x&&y&&g.state.next(H)}return x?H:{}},B=(p,b,m,E)=>{const y=A(i.errors,p),x=(d.isValid||h.isValid)&&Ye(b)&&i.isValid!==b;if(t.delayError&&m?(l=_(()=>k(p,m)),l(t.delayError)):(clearTimeout(u),l=null,m?Z(i.errors,p,m):ce(i.errors,p)),(m?!wt(y,m):y)||!xe(E)||x){const F={...E,...x&&Ye(b)?{isValid:b}:{},errors:i.errors,name:p};i={...i,...F},g.state.next(F)}},K=async p=>(S(p,!0),await t.resolver(a,t.context,ip(p||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),D=async p=>{const{errors:b}=await K(p);if(S(p),p)for(const m of p){const E=A(b,m);E?Z(i.errors,m,E):ce(i.errors,m)}else i.errors=b;return b},P=async(p,b,m={valid:!0})=>{for(const E in p){const y=p[E];if(y){const{_f:x,...F}=y;if(x){const H=s.array.has(x.name),W=y._f&&rp(y._f);W&&d.validatingFields&&S([x.name],!0);const ke=await Ps(y,s.disabled,a,w,t.shouldUseNativeValidation&&!b,H);if(W&&d.validatingFields&&S([x.name]),ke[x.name]&&(m.valid=!1,b||e.shouldUseNativeValidation))break;!b&&(A(ke,x.name)?H?cp(i.errors,ke,x.name):Z(i.errors,x.name,ke[x.name]):ce(i.errors,x.name))}!xe(F)&&await P(F,b,m)}}return m.valid},U=()=>{for(const p of s.unMount){const b=A(r,p);b&&(b._f.refs?b._f.refs.every(m=>!Vn(m)):!Vn(b._f.ref))&&Xt(p)}s.unMount=new Set},L=(p,b)=>!t.disabled&&(p&&b&&Z(a,p,b),!wt(Si(),n)),V=(p,b,m)=>Jf(p,s,{...o.mount?a:re(b)?n:Fe(p)?{[p]:b}:b},m,b),q=p=>Fn(A(o.mount?a:n,p,t.shouldUnregister?A(n,p,[]):[])),O=(p,b,m={})=>{const E=A(r,p);let y=b;if(E){const x=E._f;x&&(!x.disabled&&Z(a,p,As(b,x)),y=tr(x.ref)&&Ie(b)?"":b,Ss(x.ref)?[...x.ref.options].forEach(F=>F.selected=y.includes(F.value)):x.refs?mi(x.ref)?x.refs.forEach(F=>{(!F.defaultChecked||!F.disabled)&&(Array.isArray(y)?F.checked=!!y.find(H=>H===F.value):F.checked=y===F.value||!!y)}):x.refs.forEach(F=>F.checked=F.value===y):Mn(x.ref)?x.ref.value="":(x.ref.value=y,x.ref.type||g.state.next({name:p,values:ue(a)})))}(m.shouldDirty||m.shouldTouch)&&M(p,y,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&Q(p)},X=(p,b,m)=>{for(const E in b){if(!b.hasOwnProperty(E))return;const y=b[E],x=p+"."+E,F=A(r,x);(s.array.has(p)||le(y)||F&&!F._f)&&!At(y)?X(x,y,m):O(x,y,m)}},G=(p,b,m={})=>{const E=A(r,p),y=s.array.has(p),x=ue(b);Z(a,p,x),y?(g.array.next({name:p,values:ue(a)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&m.shouldDirty&&g.state.next({name:p,dirtyFields:Kt(n,a),isDirty:L(p,x)})):E&&!E._f&&!Ie(x)?X(p,x,m):O(p,x,m),Ls(p,s)?g.state.next({...i,name:p,values:ue(a)}):g.state.next({name:o.mount?p:void 0,values:ue(a)})},ge=async p=>{o.mount=!0;const b=p.target;let m=b.name,E=!0;const y=A(r,m),x=W=>{E=Number.isNaN(W)||At(W)&&isNaN(W.getTime())||wt(W,A(a,m,W))},F=Ns(t.mode),H=Ns(t.reValidateMode);if(y){let W,ke;const Dt=b.type?Ds(y._f):Uf(p),yt=p.type===ys.BLUR||p.type===ys.FOCUS_OUT,ah=!np(y._f)&&!t.resolver&&!A(i.errors,m)&&!y._f.deps||sp(yt,A(i.touchedFields,m),i.isSubmitted,H,F),Rn=Ls(m,s,yt);Z(a,m,Dt),yt?(!b||!b.readOnly)&&(y._f.onBlur&&y._f.onBlur(p),l&&l(0)):y._f.onChange&&y._f.onChange(p);const jn=M(m,Dt,yt),oh=!xe(jn)||Rn;if(!yt&&g.state.next({name:m,type:p.type,values:ue(a)}),ah)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?yt&&C():yt||C()),oh&&g.state.next({name:m,...Rn?{}:jn});if(!yt&&Rn&&g.state.next({...i}),t.resolver){const{errors:Gs}=await K([m]);if(S([m]),x(Dt),E){const sh=Vs(i.errors,r,m),Ys=Vs(Gs,r,sh.name||m);W=Ys.error,m=Ys.name,ke=xe(Gs)}}else S([m],!0),W=(await Ps(y,s.disabled,a,w,t.shouldUseNativeValidation))[m],S([m]),x(Dt),E&&(W?ke=!1:(d.isValid||h.isValid)&&(ke=await P(r,!0)));E&&(y._f.deps&&(!Array.isArray(y._f.deps)||y._f.deps.length>0)&&Q(y._f.deps),B(m,ke,W,jn))}},fe=(p,b)=>{if(A(i.errors,b)&&p.focus)return p.focus(),1},Q=async(p,b={})=>{let m,E;const y=yi(p);if(t.resolver){const x=await D(re(p)?p:y);m=xe(x),E=p?!y.some(F=>A(x,F)):m}else p?(E=(await Promise.all(y.map(async x=>{const F=A(r,x);return await P(F&&F._f?{[x]:F}:F)}))).every(Boolean),!(!E&&!i.isValid)&&C()):E=m=await P(r);return g.state.next({...!Fe(p)||(d.isValid||h.isValid)&&m!==i.isValid?{}:{name:p},...t.resolver||!p?{isValid:m}:{},errors:i.errors}),b.shouldFocus&&!E&&xi(r,fe,p?y:s.mount),E},Si=(p,b)=>{let m={...o.mount?a:n};return b&&(m=ks(b.dirtyFields?i.dirtyFields:i.touchedFields,m)),re(p)?m:Fe(p)?A(m,p):p.map(E=>A(m,E))},Yt=(p,b)=>({invalid:!!A((b||i).errors,p),isDirty:!!A((b||i).dirtyFields,p),error:A((b||i).errors,p),isValidating:!!A(i.validatingFields,p),isTouched:!!A((b||i).touchedFields,p)}),j=p=>{const b=p?yi(p):void 0;b==null||b.forEach(m=>ce(i.errors,m)),b?b.forEach(m=>{g.state.next({name:m,errors:i.errors})}):g.state.next({errors:{}})},Jt=(p,b,m)=>{const E=(A(r,p,{_f:{}})._f||{}).ref,y=A(i.errors,p)||{},{ref:x,message:F,type:H,...W}=y;Z(i.errors,p,{...W,...b,ref:E}),g.state.next({name:p,errors:i.errors,isValid:!1}),m&&m.shouldFocus&&E&&E.focus&&E.focus()},Zt=(p,b)=>je(p)?g.state.subscribe({next:m=>"values"in m&&p(V(void 0,b),m)}):V(p,b,!0),mt=p=>g.state.subscribe({next:b=>{op(p.name,b.name,p.exact)&&ap(b,p.formState||d,lr,p.reRenderRoot)&&p.callback({values:{...a},...i,...b,defaultValues:n})}}).unsubscribe,Tt=p=>(o.mount=!0,h={...h,...p.formState},mt({...p,formState:{...f,...p.formState}})),Xt=(p,b={})=>{for(const m of p?yi(p):s.mount)s.mount.delete(m),s.array.delete(m),b.keepValue||(ce(r,m),ce(a,m)),!b.keepError&&ce(i.errors,m),!b.keepDirty&&ce(i.dirtyFields,m),!b.keepTouched&&ce(i.touchedFields,m),!b.keepIsValidating&&ce(i.validatingFields,m),!t.shouldUnregister&&!b.keepDefaultValue&&ce(n,m);g.state.next({values:ue(a)}),g.state.next({...i,...b.keepDirty?{isDirty:L()}:{}}),!b.keepIsValid&&C()},Ci=({disabled:p,name:b})=>{if(Ye(p)&&o.mount||p||s.disabled.has(b)){const y=s.disabled.has(b)!==!!p;p?s.disabled.add(b):s.disabled.delete(b),y&&o.mount&&!o.action&&C()}},st=(p,b={})=>{let m=A(r,p);const E=Ye(b.disabled)||Ye(t.disabled);return Z(r,p,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:p}},name:p,mount:!0,...b}}),s.mount.add(p),m?Ci({disabled:Ye(b.disabled)?b.disabled:t.disabled,name:p}):I(p,!0,b.value),{...E?{disabled:b.disabled||t.disabled}:{},...t.progressive?{required:!!b.required,min:_i(b.min),max:_i(b.max),minLength:_i(b.minLength),maxLength:_i(b.maxLength),pattern:_i(b.pattern)}:{},name:p,onChange:ge,onBlur:ge,ref:y=>{if(y){st(p,b),m=A(r,p);const x=re(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,F=Xf(x),H=m._f.refs||[];if(F?H.find(W=>W===x):x===m._f.ref)return;Z(r,p,{_f:{...m._f,...F?{refs:[...H.filter(Vn),x,...Array.isArray(A(n,p))?[{}]:[]],ref:{type:x.type,name:p}}:{ref:x}}}),I(p,!1,void 0,x)}else m=A(r,p,{}),m._f&&(m._f.mount=!1),(t.shouldUnregister||b.shouldUnregister)&&!(qf(s.array,p)&&o.action)&&s.unMount.add(p)}}},Qt=()=>t.shouldFocusError&&xi(r,fe,s.mount),or=p=>{Ye(p)&&(g.state.next({disabled:p}),xi(r,(b,m)=>{const E=A(r,m);E&&(b.disabled=E._f.disabled||p,Array.isArray(E._f.refs)&&E._f.refs.forEach(y=>{y.disabled=E._f.disabled||p}))},0,!1))},ei=(p,b)=>async m=>{let E;m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let y=ue(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:x,values:F}=await K();S(),i.errors=x,y=ue(F)}else await P(r);if(s.disabled.size)for(const x of s.disabled)ce(y,x);if(ce(i.errors,"root"),xe(i.errors)){g.state.next({errors:{}});try{await p(y,m)}catch(x){E=x}}else b&&await b({...i.errors},m),Qt(),setTimeout(Qt);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:xe(i.errors)&&!E,submitCount:i.submitCount+1,errors:i.errors}),E)throw E},ti=(p,b={})=>{A(r,p)&&(re(b.defaultValue)?G(p,ue(A(n,p))):(G(p,b.defaultValue),Z(n,p,ue(b.defaultValue))),b.keepTouched||ce(i.touchedFields,p),b.keepDirty||(ce(i.dirtyFields,p),i.isDirty=b.defaultValue?L(p,ue(A(n,p))):L()),b.keepError||(ce(i.errors,p),d.isValid&&C()),g.state.next({...i}))},Ft=(p,b={})=>{const m=p?ue(p):n,E=ue(m),y=xe(p),x=y?n:E;if(b.keepDefaultValues||(n=m),!b.keepValues){if(b.keepDirtyValues){const F=new Set([...s.mount,...Object.keys(Kt(n,a))]);for(const H of Array.from(F)){const W=A(i.dirtyFields,H),ke=A(a,H),Dt=A(x,H);W&&!re(ke)?Z(x,H,ke):!W&&!re(Dt)&&G(H,Dt)}}else{if(Tn&&re(p))for(const F of s.mount){const H=A(r,F);if(H&&H._f){const W=Array.isArray(H._f.refs)?H._f.refs[0]:H._f.ref;if(tr(W)){const ke=W.closest("form");if(ke){ke.reset();break}}}}if(b.keepFieldsRef)for(const F of s.mount)G(F,A(x,F));else r={}}a=t.shouldUnregister?b.keepDefaultValues?ue(n):{}:ue(x),g.array.next({values:{...x}}),g.state.next({values:{...x}})}s={mount:b.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!b.keepIsValid||!!b.keepDirtyValues||!t.shouldUnregister&&!xe(x),o.watch=!!t.shouldUnregister,o.keepIsValid=!!b.keepIsValid,o.action=!1,b.keepErrors||(i.errors={}),g.state.next({submitCount:b.keepSubmitCount?i.submitCount:0,isDirty:y?!1:b.keepDirty?i.isDirty:!!(b.keepDefaultValues&&!wt(p,n)),isSubmitted:b.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:y?{}:b.keepDirtyValues?b.keepDefaultValues&&a?Kt(n,a):i.dirtyFields:b.keepDefaultValues&&p?Kt(n,p):b.keepDirty?i.dirtyFields:{},touchedFields:b.keepTouched?i.touchedFields:{},errors:b.keepErrors?i.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?i.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},$i=(p,b)=>Ft(je(p)?p(a):p,{...t.resetOptions,...b}),sr=(p,b={})=>{const m=A(r,p),E=m&&m._f;if(E){const y=E.refs?E.refs[0]:E.ref;y.focus&&setTimeout(()=>{y.focus(),b.shouldSelect&&je(y.select)&&y.select()})}},lr=p=>{i={...i,...p}},Ei={control:{register:st,unregister:Xt,getFieldState:Yt,handleSubmit:ei,setError:Jt,_subscribe:mt,_runSchema:K,_updateIsValidating:S,_focusError:Qt,_getWatch:V,_getDirty:L,_setValid:C,_setFieldArray:v,_setDisabledField:Ci,_setErrors:$,_getFieldArray:q,_reset:Ft,_resetDefaultValues:()=>je(t.defaultValues)&&t.defaultValues().then(p=>{$i(p,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:or,_subjects:g,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(p){o=p},get _defaultValues(){return n},get _names(){return s},set _names(p){s=p},get _formState(){return i},get _options(){return t},set _options(p){t={...t,...p}}},subscribe:Tt,trigger:Q,register:st,handleSubmit:ei,watch:Zt,setValue:G,getValues:Si,reset:$i,resetField:ti,clearErrors:j,unregister:Xt,setError:Jt,setFocus:sr,getFieldState:Yt};return{...Ei,formControl:Ei}}function rr(e={}){const t=me.useRef(void 0),i=me.useRef(void 0),[r,n]=me.useState({isDirty:!1,isValidating:!1,isLoading:je(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:je(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!je(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=up(e);t.current={...s,formState:r}}const a=t.current.control;return a._options=e,Yf(()=>{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]),me.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),me.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),me.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),me.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),me.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==r.isDirty&&a._subjects.state.next({isDirty:o})}},[a,r.isDirty]),me.useEffect(()=>{var o;e.values&&!wt(e.values,i.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),i.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),me.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=me.useMemo(()=>Gf(r,a),[a,r]),t.current}const Rs=(e,t,i)=>{if(e&&"reportValidity"in e){const r=A(i,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},fp=(e,t)=>{for(const i in t.fields){const r=t.fields[i];r&&r.ref&&"reportValidity"in r.ref?Rs(r.ref,i,e):r.refs&&r.refs.forEach(n=>Rs(n,i,e))}},pp=(e,t)=>{t.shouldUseNativeValidation&&fp(e,t);const i={};for(const r in e){const n=A(t.fields,r),a=Object.assign(e[r]||{},{ref:n&&n.ref});if(hp(t.names||Object.keys(e),r)){const o=Object.assign({},A(i,r));Z(o,"root",a),Z(i,r,o)}else Z(i,r,a)}return i},hp=(e,t)=>e.some(i=>i.startsWith(t+"."));var nr=function(e,t,i){return i===void 0&&(i={}),function(r,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(Cf(e,r,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var u=s.issues[0],f=wf(u);if(f&&(l[f]||(l[f]={message:u.message,type:u.type}),o)){var d=l[f].types,h=d&&d[u.type];l[f]=_s(f,o,l,u.type,h?[].concat(h,u.message):u.message)}s.issues.shift()}return{values:{},errors:pp(l,a)}}return{values:i.raw?r:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const js=27,Bs=12,zs=10,gp=Bt("enum"),bp=(e,t)=>{const i={min:e.minSelected??0,max:e.maxSelected??e.options.length};return nr(rt({checked:vt(ls(Ee(),as()),$n(r=>Object.entries(r).filter(([n,a])=>a).map(([n,a])=>n)),wi(i.max,t("validation_multiple_choice_max",{count:i.max})),Ut(i.min,t("validation_multiple_choice_min",{count:i.min})))}))},vp=Rr(({option:e,...t},i)=>c(ne,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:i}),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})]})),Us=Ct("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:fs}}}),wp=({input:e,onSubmitSuccess:t})=>{var f,d;const i=e.key?(f=N.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,r=e.config.maxSelected===1,n=r&&e.config.options.length===2,{t:a}=se(),{register:o,handleSubmit:s,formState:{errors:l}}=rr({defaultValues:{checked:r?{}:gp(i)?Object.fromEntries(i.value.map(h=>[h,!0])):{}},resolver:bp(e.config,a)}),u=An();return n?c(ne,{children:[c("ul",{style:{maxHeight:6.5*js+5*Bs+2*zs},class:Us({variant:"booleanLike"}),children:e.config.options.map((h,g)=>c("li",{class:ps,children:c(hs,{type:"submit",ref:w=>{w&&g===0&&(u.current=w)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}),e.config.minSelected===0&&c("div",{class:"px-2 pb-2",children:c(nt,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):c("form",{noValidate:!0,onSubmit:h=>s(g=>{const w=g.checked;t({type:"enum",value:w})})(h),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*js+5*Bs+2*zs},class:Us({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,g)=>{const w=`checked.${h.value}`,{ref:_,...C}=o(w);return c("li",{class:"relative",children:c(vp,{option:h,autoFocus:g===0,ref:S=>{S&&g===0&&(u.current=S),_(S)},id:w,...C,onClick:r?()=>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:[r?null:c(It,{}),e.config.minSelected===0&&c(nt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(qt,{error:(d=l.checked)==null?void 0:d.root})})]})},mp=Bt("number"),yp=(e,t)=>{const i=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return nr(rt({number:vt(os(t("validation_number")),ts(i,t("validation_number_min",{min:i})),es(r,t("validation_number_max",{max:r})),Xo(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},_p=({input:e,onSubmitSuccess:t})=>{var d;const i=e.config.defaultValue,r=e.key?(d=N.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:n}=se(),{register:a,handleSubmit:o,formState:{errors:s}}=rr({defaultValues:{number:mp(r)?r.value:i?Number(i):void 0},resolver:yp(e.config,n)}),{ref:l,...u}=a("number",{required:!e.config.optional,valueAsNumber:!0}),f=we();return $e(()=>{f.current&&(f.current.focus(),f.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&&(f.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:Wt({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(nt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(It,{})]}),c(qt,{error:s.number})]})},xp="44",kp=/^[0-9 ]+$/,Sp=Bt("string"),Cp=Bt("phone"),$p=e=>{const t=vt(Ee(e("validation_country_code")),Cn(kp,e("validation_country_code"))),i=vt(Ee(e("validation_phone")),Ut(1,e("validation_phone")),$n(r=>r.replace(/[^0-9]/g,"")));return nr(rt({countryCode:t,phoneNumber:i}))},Ep=({input:e,onSubmitSuccess:t})=>{var _;const i=e.key?(_=N.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,{t:r}=se(),[n,a]=Oe(),o=Sp(i)?$f(i.value):Cp(i)?i.value:void 0,{register:s,handleSubmit:l,formState:{errors:u},watch:f}=rr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??xp,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:$p(r)}),{ref:d,...h}=s("phoneNumber",{required:!e.config.optional}),g=we(),w=f("countryCode");return $e(()=>{g.current&&(g.current.focus(),g.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(C=>{const S=C.phoneNumber.replace(/[^0-9]/g,""),v=C.countryCode.replace(/[^0-9]/g,"");a(void 0);const k=e.config.minChars??7,$=S.length+v.length;if($<k)return a(r("validation_phone_min_chars",{count:k}));const I=e.config.maxChars;if(I!=null&&$>I)return a(r("validation_max_chars",{count:I}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:v,phoneNumber:S}}):t({type:"string",value:w+C.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:["+",w]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(En).map(([C,S])=>c("option",{value:S,children:[C," (+",S,")"]},C))})]}),c("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:C=>{C&&(g.current=C),d(C)},class:Wt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(nt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(It,{})]}),c(qt,{error:u.countryCode||u.phoneNumber||{message:n}})]})},ar=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),Hs=(e,t,i,r)=>i!==void 0&&r*1e3>wr?e("submission_available_at",{time:ra(i,t)}):e("submission_cooldown",{count:r}),Ip=(e,t)=>{const i=e==null?void 0:e.trim();return i&&i!=="Submit"?i:t("submit")},Ap=({input:e,onSubmitSuccess:t})=>{const{t:i,locale:r}=se(),{availableAt:n}=e.config,[a,o]=Oe(()=>ar(n)),[s,l]=Oe("");Ri(()=>{const f=ar(n);if(o(f),f===0)return;l(Hs(i,r,n,f));const d=setInterval(()=>{const h=ar(n);o(h),!(h>0)&&(clearInterval(d),l(i("submission_cooldown_ready")))},250);return()=>clearInterval(d)},[n,r,i]);const u=a>0;return c("div",{class:"flex flex-col items-center gap-2 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 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 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 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":u,"aria-describedby":u?"submit-cooldown":void 0,onClick:()=>{ar(n)>0||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:Ip(e.config.label,i)}),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"})]})]})}),u&&c("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:Hs(i,r,n,a)}),c("p",{role:"status",class:"sr-only",children:s})]})},Tp=160,qs=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Tp)}px`},Fp={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Dp=Bt("string"),Np=(e,t)=>{const i={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return nr(rt({text:{date:vt(Ee(t("validation_date")),Cn(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:vt(Ee(t("validation_email")),Qo(t("validation_email")),Ut(e.minChars??1,i.minLength),wi(e.maxChars??1/0,i.maxLength)),text:vt(Ee(),Ut(e.minChars??1,i.minLength),wi(e.maxChars??1/0,i.maxLength)),url:vt(Ee(t("validation_url")),is(t("validation_url")),Ut(e.minChars??1,i.minLength),wi(e.maxChars??1/0,i.maxLength))}[e.format]}))},Mp={text:({input:e,onSubmitSuccess:t})=>{var _;const{t:i}=se(),r=e.key?(_=N.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,n=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:u}}=rr({defaultValues:{text:Dp(r)?r.value:n??""},resolver:Np(e.config,i)}),{ref:f,...d}=o("text",{required:!e.config.optional}),h=we();$e(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&qs(h.current),h.current.focus(),h.current.select())},[]);const g=e.config.maxChars,w=a&&g!==void 0?l("text").length:void 0;return c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(C=>{t({type:"string",value:C.text})}),children:[c("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[a?c("textarea",{id:"chat-input",...d,rows:2,maxLength:g,autoFocus:!0,"aria-describedby":w!==void 0?"chat-input-count":void 0,onInput:C=>qs(C.currentTarget),onKeyDown:C=>{var S;C.key==="Enter"&&(C.ctrlKey||C.metaKey)&&(C.preventDefault(),(S=C.currentTarget.form)==null||S.requestSubmit())},ref:C=>{C&&(h.current=C),f(C)},placeholder:e.config.placeholder,class:Wt({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):c("input",{id:"chat-input",...d,...Fp[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:C=>{C&&(h.current=C),f(C)},placeholder:e.config.placeholder,class:Wt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(nt,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(It,{})]}),w!==void 0&&g!==void 0&&c("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[w,"/",g]}),c(qt,{error:u.text})]})},phone:Ep,"multiple-choice":wp,boolean:Vf,file:zf,submit:Ap,address:Df,number:_p},Lp=({logger:e,analytics:t})=>{var a;const i=(a=N.current$.value.flow)==null?void 0:a.data.currentInput,r=we(null),n=()=>ie.onInteractionFn$.value();return $e(()=>{var o;(o=r.current)==null||o.scrollTo({top:0})},[i]),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:i?n:void 0,onKeyDownCapture:i?n:void 0,children:i?(()=>{const o=Mp[i.type];return c(o,{logger:e,analytics:t,onSubmitSuccess:ie.onSubmitSuccessFn$.value,input:i})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Wt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(It,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Vp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Op=function(e){return e instanceof RegExp},Pp=function(t){var i=/[\\^$.*+?()[\]{}|]/g,r=RegExp(i.source);return t&&r.test(t)?t.replace(i,"\\$&"):t},Ws=function(e){return typeof e=="string"},Rp=function(e){var t=[];return e.forEach(function(i){Array.isArray(i)?t=t.concat(i):t.push(i)}),t};function jp(e,t,i){var r=0,n=0;if(e==="")return e;if(!e||!Ws(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Op(a)||(a=new RegExp("("+Pp(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,r+=o[s-1].length,o[s]=i(o[s],s,r),r+=n}return o}var Bp=function(t,i,r){return Array.isArray(t)||(t=[t]),Rp(t.map(function(n){return Ws(n)?jp(n,i,r):n}))};const ki=Vp(Bp),zp=/(\[[^\]]+\]\([^)]+\))/g,Up=/\[([^\]]+)\]\(([^)]+)\)/,Hp=/(https?:\/\/[^\s]+)/g,qp=/_(.*?)_/g,Wp=/\*\*(.*?)\*\*/g,Kp=/(\\n|\n)/g,Ks="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Gp=e=>{const t=ki(e,zp,(s,l)=>{const[,u,f]=s.match(Up)??[];return f?c("a",{class:Ks,href:f,children:u??f},f+l):c("span",{children:"INVALID LINK"})}),i=ki(t,Hp,(s,l)=>c("a",{class:Ks,href:s,children:s},s+l)),r=ki(i,qp,(s,l)=>c("em",{children:s},s+l)),n=ki(r,Wp,(s,l)=>c("strong",{children:s},s+l));let a=0;return ki(n,Kp,()=>c("br",{},`br-${a++}`))},Yp=Ct("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"}}),Jp=({children:e,className:t,animate:i,side:r,...n})=>c("p",{style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:Yp({className:t,side:r,animate:i}),...n,children:e}),Zp=({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"})})]})}),Xp=({className:e,...t})=>c("div",{"aria-hidden":!0,children:ie.isBotTyping$.value===!0?c("div",{"data-testid":"typing-indicator",class:et("flex gap-1 p-4",e),...t,children:Array.from({length:3},(i,r)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}):void 0}),Qp={bot:"left",user:"right"},eh=Ct("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-11",warning:"text-system-warning",error:"text-error-11",success:"text-system-success"}}}),th=({lastSentMessageFooter:e})=>{const{t}=se(),i=N.current$.value.flow,r=(i==null?void 0:i.data.messages)??[],n=i?wn(i):void 0;return c("ol",{"aria-label":t("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((a,o)=>c(ne,{children:c("li",{class:"flex",tabIndex:o===r.length-1?-1:void 0,children:[n&&a.groupId===n&&!r.slice(o+1).some(s=>s.groupId===n)?e:null,Ui(a).with({type:"system"},s=>c("p",{class:eh({variant:s.variant}),children:s.text})).with({type:"text",author:ui.union("bot","user")},s=>{const l=o===r.length-1,u=s.author==="bot"?Gp(s.text):s.text;return c(ne,{children:c(Jp,{animate:l,side:Qp[s.author],children:u},o)})}).with({type:"link"},s=>c(Zp,{message:s})).with({type:"image"},s=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:s.url,style:{aspectRatio:s.width/s.height}})).with({type:"file"},s=>c(Pf,{class:s.author==="bot"?void 0:"ml-auto",file:{name:s.fileName,sizeKb:s.fileSizeKb}})).with({type:"loading"},s=>{const l=r[r.length-1];return!(s===l)||ie.isBotTyping$.value||i!=null&&i.data.isFinished?null:c("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[c(Ji,{"aria-hidden":s.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),s.text?c("p",{role:"status",class:"text-neutral-11 text-sm",children:s.text}):null]})}).exhaustive()]})},o)),c("li",{class:ie.captchaVisible$.value?"flex":"hidden",children:c("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":t("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),c(Xp,{},"typing")]})},ih=({logger:e,apiClient:t,analytics:i,talentBankClient:r})=>{const{flow:n}=N.current$.value;tt(n,"Flow is required to exist to show chatbot body");const a=N.viewState$.value,{chatRef:o,chatService:s}=Qd(),{t:l}=se(),[u,f]=Oe();return $e(()=>{a==="maximised"&&ie.scrollToEnd()},[a]),$e(()=>{var I;const{state:d,flow:h}=N.current$.peek();if(d!=="loaded")throw new Error(l("invalid_state"));let g=h.data.nodeHistory.at(-1);if(ie.scrollToEnd(),N.setInput(void 0),h.data.isFinished)return;const w=()=>{const M=N.current$.peek().flow;!M||M.data.hasInteracted||(N.markAsInteracted(),Zo(i,M,"FLOW_INTERACT"))};ie.onInteractionFn$.value=w,g===void 0?(g=Ko(n.nodes).id,N.setCurrentNodeId(g),Zo(i,h,"FLOW_START")):N.removeMessagesSentByNodeIds([g,_n]);const{interpret:_,abort:C,undo:S}=ju({context:n.context,analytics:{service:i,customProperties:(I=n.analytics)==null?void 0:I.customProperties},apiClient:t,logger:e,talentBankClient:r,flow:n,chatService:s,t:l,getApplicationRecovery:()=>{var M;return(M=N.current$.peek().flow)==null?void 0:M.data.applicationRecovery},setApplicationRecovery:N.setApplicationRecovery,persistWriteBarrier:()=>N.persistWriteBarrier(h),getSubmissions:()=>{var M;return(M=N.current$.peek().flow)==null?void 0:M.data.submissions},onInterpret:M=>N.setCurrentNodeId(M.id),onFlowEnd:async()=>{var B;N.markAsFinished();const M=N.current$.peek().flow;tt(M),i.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:M.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(B=n.analytics)==null?void 0:B.customProperties})}}),v=g,k=()=>{f(()=>S),_(v)},$=new AbortController;return h.offerResume?ff({chatService:s,t:l,signal:$.signal}).then(M=>(N.settleResume(h),M?k():(N.restart(),Te.flushStateData()))).catch(M=>{M instanceof lt||e.error("Resume prompt failed",M)}):k(),()=>{$.abort(),ie.onInteractionFn$.value===w&&(ie.onInteractionFn$.value=()=>{}),C()}},[i,t,s,e,n,r,l]),c(ne,{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(th,{lastSentMessageFooter:!wn(n)||!u?null:c(rh,{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(bi,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":l("jump_to_current"),onClick:()=>{var h,g;ie.scrollToEnd(),(g=((h=o.current)==null?void 0:h.querySelector('li[tabindex="-1"]'))??o.current)==null||g.focus({preventScroll:!0})},children:c(Vo,{})})})]}),c(Lp,{logger:e,analytics:i})]})},rh=({undoFn:e})=>{const{t}=se();return c("div",{class:"flex flex-1 items-center justify-end px-1",children:c(bi,{"aria-label":t("undo"),onClick:async()=>{const{flow:i}=N.current$.peek();tt(i),e(i.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"})})})},nh=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:ih},Symbol.toStringTag,{value:"Module"}))})();