@inploi/plugin-chatbot 14.18.1 → 14.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/cdn/index.js +11 -11
- package/dist/chatbot-body-B75cUCyM.js +3542 -0
- package/dist/chatbot-body-DNPAc97n.cjs +1 -0
- package/dist/index-CGRnGR-K.js +4132 -0
- package/dist/index-NnL-o0w8.cjs +25 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +2 -2
- package/package.json +11 -10
- package/dist/chatbot-body-DjE1hhPI.js +0 -4309
- package/dist/chatbot-body-Y8XV3f3-.cjs +0 -5
- package/dist/index-C8Gr0Ijn.js +0 -3198
- package/dist/index-DSa7ZKqt.cjs +0 -21
package/cdn/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ib=Object.defineProperty;var ob=(Qe,Ve,Ut)=>Ve in Qe?ib(Qe,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Qe[Ve]=Ut;var ve=(Qe,Ve,Ut)=>ob(Qe,typeof Ve!="symbol"?Ve+"":Ve,Ut);(function(){"use strict";var Qe=typeof document<"u"?document.currentScript:null,Ve=new Set(["Error","TypeError","RangeError","ReferenceError","SyntaxError","URIError","EvalError","AggregateError","AbortError","TimeoutError","NetworkError","NotAllowedError","NotFoundError","NotSupportedError","InvalidStateError","QuotaExceededError","SecurityError","DataCloneError","ChunkLoadError"]),Ut=[/^Cannot (?:read|set) properties of (?:undefined|null) \((?:reading|setting) '[\w$]{1,40}'\)$/,/^[\w$.]{1,60} is (?:not a function|not iterable|not defined|not a constructor|undefined|null)$/,/^(?:undefined|null) is not an object \(evaluating '[\w$.]{1,60}'\)$/,/^can't access property "[\w$]{1,40}", [\w$.]{1,60} is (?:undefined|null)$/,/^(?:Script error\.|Assignment to constant variable\.|Maximum call stack size exceeded|Invalid array length|Invalid time value|Failed to fetch|Load failed|Importing a module script failed\.|NetworkError when attempting to fetch resource\.)$/],jl=`IDBDatabase IDBObjectStore IDBTransaction IDBFactory IDBRequest IDBOpenDBRequest IDBIndex IDBCursor IDBKeyRange
|
|
2
2
|
Storage StorageManager Window Document Element HTMLElement HTMLIFrameElement HTMLMediaElement HTMLFormElement
|
|
3
3
|
HTMLInputElement Node EventTarget Navigator Clipboard ServiceWorkerContainer ServiceWorkerRegistration Response
|
|
4
4
|
Request Headers URL URLSearchParams Blob File FileReader FormData MessagePort Worker Cache CacheStorage History
|
|
@@ -12,9 +12,9 @@ var og=Object.defineProperty;var sg=(Xe,Pe,Ut)=>Pe in Xe?og(Xe,Pe,{enumerable:!0
|
|
|
12
12
|
getRegistration requestStorageAccess focus blur scrollTo scrollIntoView setAttribute getAttribute
|
|
13
13
|
getBoundingClientRect attachShadow define pushState replaceState assign replace reload send close abort
|
|
14
14
|
requestAnimationFrame matchMedia getComputedStyle createElement structuredClone localStorage sessionStorage
|
|
15
|
-
indexedDB serviceWorker clipboard cookie`,
|
|
16
|
-
`,1e3).length:0}}}catch{return r}},
|
|
17
|
-
`,60)){let p=b.indexOf(t),g=p!==-1&&(p===0||" (@".includes(b[p-1])),v=g?Jl.exec(b.slice(p+t.length).trim()):null;v?c.push([v[1],v[2],v[3]].filter(Boolean).join(":")):g?f.add("build"):Wl.test(b)&&f.add(Yl(b))}c.splice(10);let u={name:n,message:l,stack:c,foreign:[...f].sort(),thrown:o};for(;JSON.stringify(u).length>1400&&u.stack.length;)u.stack.pop();return u},ci="inploi-candidate-beacon-seed",rc=()=>{try{return typeof sessionStorage>"u"?void 0:sessionStorage}catch{return}},nc=()=>({host:"s2811583.eu-central-1a.betterstackdata.com",token:"LHJqsZXu82MrkgUP44JHAwvU",sampleRate:Math.min(1,Math.max(0,1))}),ui=e=>{let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=Math.imul(t^a,2654435761),r=Math.imul(r^a,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&r)+(t>>>0)},ac=(e,t)=>{try{let r=e==null?void 0:e.getItem(ci);if(r)return r;let n=t();return e==null||e.setItem(ci,n),n}catch{return t()}},ic=[["facebook",/\bFB(?:AN|AV|_IAB)\b/],["instagram",/\bInstagram (\d+)/],["linkedin",/\bLinkedInApp\b/],["tiktok",/\b(?:musical_ly|BytedanceWebview|TikTok)\b/],["samsung",/\bSamsungBrowser\/(\d+)/],["edge",/\bEdg(?:e|A|iOS)?\/(\d+)/],["opera",/\bOPR\/(\d+)/],["firefox",/\b(?:Firefox|FxiOS)\/(\d+)/],["chrome",/\b(?:Chrome|CriOS)\/(\d+)/],["safari",/\bVersion\/(\d+)[\d.]* (?:Mobile\/\S+ )?Safari\//]],oc=[["ios",/\b(?:iPhone|iPad|iPod)\b/],["android",/\bAndroid\b/],["windows",/\bWindows\b/],["chromeos",/\bCrOS\b/],["mac",/\bMacintosh\b/],["linux",/\bLinux\b/]],sc=e=>{var n,a;let t=ic.find(([,i])=>i.test(e)),r=(n=t==null?void 0:t[1].exec(e))==null?void 0:n[1];return{browser:t?[t[0],r].filter(Boolean).join(" "):"other",platform:((a=oc.find(([,i])=>i.test(e)))==null?void 0:a[0])??"other"}},lc=(e=typeof document>"u"?void 0:document)=>{var i,o;let t=()=>typeof performance>"u"?0:Math.round(performance.now()),r=(e==null?void 0:e.visibilityState)==="hidden"?t():null,n=null,a=!1;return e==null||e.addEventListener("visibilitychange",()=>{e.visibilityState==="hidden"?r=t():r!==null&&(n=t())}),(i=e==null?void 0:e.defaultView)==null||i.addEventListener("pagehide",()=>a=!0),(o=e==null?void 0:e.defaultView)==null||o.addEventListener("pageshow",()=>a=!1),()=>{var c;let s=typeof navigator>"u"?void 0:navigator,l=(c=s==null?void 0:s.connection)==null?void 0:c.effectiveType;return{visibility:(e==null?void 0:e.visibilityState)??"unknown",was_hidden:r!==null,hidden_at_ms:r,shown_at_ms:n,unloading:a,online:typeof(s==null?void 0:s.onLine)=="boolean"?s.onLine:null,connection:typeof l=="string"?l.slice(0,8):null,...sc((s==null?void 0:s.userAgent)??""),page_ms:t()}}},cc=new Set(["boot_failed","fatal","submit_blocked"]),uc=(e,t,r)=>{if(t.unloading||t.visibility==="hidden")return!0;if(e!=="boot_failed"||t.hidden_at_ms===null)return!1;if(r.elapsed_ms===void 0)return!0;let n=t.page_ms-r.elapsed_ms;return t.hidden_at_ms>=n||t.shown_at_ms!==null&&t.shown_at_ms>=n},dc=(e,t,r,n,a)=>{var o;if(t)return"abandoned";if(a.online===!1)return"offline";let i=[n.phase,n.stage,r==null?void 0:r.slice(0,40),n.http_status??((o=n.error)==null?void 0:o.name)];return[...new Set(i.filter(s=>s!==void 0&&s!=="").map(String))].join(":")||e},fc=({config:e,version:t,env:r,seed:n,automated:a=typeof navigator<"u"&&navigator.webdriver===!0,company:i,page:o=lc(),now:s=Date.now,post:l=(c,f)=>fetch(c,f)})=>{let c=ui(n),f=s(),u=e!==void 0&&c%1e4<e.sampleRate*1e4,b=new Set;return{send:(p,g,v={})=>{if(!e||!u||!t)return;let x=o(),C=cc.has(p),_=C&&uc(p,x,v),M=_?`${p}:abandoned`:p;if(b.has(M))return;b.add(M);let{error:j,...D}=v,z={dt:new Date(s()).toISOString(),message:"Candidate widget beacon",kind:p,version:t,company_slug:(i==null?void 0:i())??null,env:r==="production"?"production":"staging",mode:a?"test":"live",seed_hash:c.toString(36),sample_rate:e.sampleRate,...g&&{reason:g.slice(0,40)},...C&&{abandoned:_,cause:dc(p,_,g,v,x).slice(0,60)},since_start_ms:Math.max(0,Math.round(s()-f)),...x,...D,...j&&{error:j,error_message:j.message,error_frame:j.stack[0]??null}};l(`https://${e.host}`,{method:"POST",keepalive:!0,headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify(z)}).catch(()=>{})}}},Qe;function di(e){return{lang:(e==null?void 0:e.lang)??(Qe==null?void 0:Qe.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Qe==null?void 0:Qe.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Qe==null?void 0:Qe.abortPipeEarly)}}var _n;function pc(e){return _n==null?void 0:_n.get(e)}var xn;function hc(e){return xn==null?void 0:xn.get(e)}var kn;function bc(e,t){var r;return(r=kn==null?void 0:kn.get(e))==null?void 0:r.get(t)}function Sn(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function Ee(e,t,r,n,a){let i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??Sn(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??bc(e.reference,l.lang)??(c?hc(l.lang):null)??n.message??pc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function we(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},di())}}}function gc(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Cn(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function fi(e){return{kind:"transformation",type:"transform",reference:fi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function mc(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function En(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function pi(){return{kind:"schema",type:"any",reference:pi,expects:"any",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function hi(e,t){return{kind:"schema",type:"array",reference:hi,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var i;let a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){let s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:a,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Ee(this,"type",r,n);return r}}}function $n(e){return{kind:"schema",type:"boolean",reference:$n,expects:"boolean",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ee(this,"type",t,r),t}}}function $e(e,t){return{kind:"schema",type:"literal",reference:$e,expects:Sn(e),async:!1,literal:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Ee(this,"type",r,n),r}}}function bi(e){return{kind:"schema",type:"null",reference:bi,expects:"null",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return t.value===null?t.typed=!0:Ee(this,"type",t,r),t}}}function $t(e,t){return{kind:"schema",type:"nullable",reference:$t,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=En(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Pr(e){return{kind:"schema",type:"number",reference:Pr,expects:"number",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ee(this,"type",t,r),t}}}function Q(e,t){return{kind:"schema",type:"object",reference:Q,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var i;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in a?a[o]:En(s),c=s["~run"]({value:l},n);if(c.issues){let f={type:"object",origin:"value",input:a,key:o,value:l};for(let u of c.issues)u.path?u.path.unshift(f):u.path=[f],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=mc(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ee(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else Ee(this,"type",r,n);return r}}}function _e(e,t){return{kind:"schema",type:"optional",reference:_e,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=En(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function gi(e,t){return{kind:"schema",type:"picklist",reference:gi,expects:Cn(e.map(Sn),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Ee(this,"type",r,n),r}}}function An(e,t,r){return{kind:"schema",type:"record",reference:An,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return we(this)},"~run"(n,a){var o,s;let i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(let l in i)if(gc(i,l)){let c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){let b={type:"object",origin:"key",input:i,key:l,value:c};for(let p of f.issues)p.path=[b],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}let u=this.value["~run"]({value:c},a);if(u.issues){let b={type:"object",origin:"value",input:i,key:l,value:c};for(let p of u.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else Ee(this,"type",n,a);return n}}}function be(e){return{kind:"schema",type:"string",reference:be,expects:"string",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ee(this,"type",t,r),t}}}function mi(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function In(e,t){return{kind:"schema",type:"union",reference:In,expects:Cn(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){let a,i,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];Ee(this,"type",r,n,{issues:mi(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ee(this,"type",r,n,{issues:mi(o)})}return r}}}function qt(){return{kind:"schema",type:"unknown",reference:qt,expects:"unknown",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function vi(e,t,r){return{kind:"schema",type:"variant",reference:vi,expects:"Object",async:!1,key:e,options:t,message:r,get"~standard"(){return we(this)},"~run"(n,a){let i=n.value;if(i&&typeof i=="object"){let o,s=0,l=this.key,c=[],f=(u,b)=>{for(let p of u.options){if(p.type==="variant")f(p,new Set(b).add(p.key));else{let g=!0,v=0;for(let x of b){let C=p.entries[x];if(x in i?C["~run"]({typed:!1,value:i[x]},{abortEarly:!0}).issues:C.type!=="exact_optional"&&C.type!=="optional"&&C.type!=="nullish"){g=!1,l!==x&&(s<v||s===v&&x in i&&!(l in i))&&(s=v,l=x,c=[]),l===x&&c.push(p.entries[x].expects);break}v++}if(g){let x=p["~run"]({value:i},a);(!o||!o.typed&&x.typed)&&(o=x)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;Ee(this,"type",n,a,{input:i[l],expected:Cn(c,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else Ee(this,"type",n,a);return n}}}function vc(...e){return{...e[0],pipe:e,get"~standard"(){return we(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function cr(e,t,r){let n=e["~run"]({value:t},di(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var wc=e=>({ok:!0,err:!1,val:e}),yc=e=>({err:!0,ok:!1,val:e}),Tn=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function Dn(e,t,r){var o,s;let n=e.find(l=>l.type==="pre-apply-result");if(!n)return;let a=(o=t[n.data.participationKey])==null?void 0:o.value,i={};if(a===!0)for(let l of Tn(e)){let c=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(c)&&c.length===1&&(c=c[0]),(typeof c=="boolean"||typeof c=="string")&&(i[l.data.key]=c)}return{node_id:n.id,flow_session_id:r,participation:a,answers:i}}function _c(e,t){let r=Dn(e,t,""),n=Tn(e).map(i=>{let o=i.data.preApply,s=r==null?void 0:r.answers[i.data.key],l=i.type==="question-boolean"?typeof s=="boolean":i.data.options.some(c=>c.value===s);return{key:i.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),a=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&n.length>0&&n.every(i=>i.valid)?"completed":"unavailable";return{status:a,hasHardConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="hard"):null,hasAdvisoryConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="advisory"):null,answers:a==="completed"?n:[]}}function xc(e,t){let r=new Set(Tn(e).map(n=>n.data.key));for(let n of e)n.type==="pre-apply-result"&&(r.add(n.data.key),r.add(n.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([n])=>!r.has(n)))}var kc=()=>{try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return typeof e=="string"&&e.length>0?e:void 0}catch{return}},ht=class extends Error{constructor(){super("Aborted")}},ur=(e,t)=>{if(t.length===0)return;let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n]}return r},Sc=(e,t="all")=>{let r={},n=t==="all"?null:new Set(t);for(let a in e){let i=e[a];i&&(n&&!n.has(a)||(r[a]=i.value))}return r},wi=(e,t)=>{let r=new Set(e.flatMap(n=>n.type==="add-submission"?[n.data.key]:[]));return Object.entries(t).some(([n,a])=>a!==void 0&&a.type!=="integration"&&!r.has(n))},Cc=({key:e,submissions:t})=>{var n;let r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},yi=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let a=ur(n,t);switch(typeof a){case"string":return{type:"string",value:a};case"number":return{type:"number",value:a};case"boolean":return{type:"boolean",value:a};default:console.warn(`Unexpected type for $context.${t.join(".")}`,a);return}}return r[e]},Ec=e=>{let t=e.split(".").pop();return t?wc(t?"."+t:""):yc("No file extension found")},_i=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let a=Ec(n.name);return a.ok&&r.includes(a.val.toLowerCase())})},Ht=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Vr=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,$c=Q({integration_response:Q({data:Q({redirect_url:be(),message:_e($t(be())),button_text:_e($t(be()))})})}),jn=e=>cr($c,e).success,Ac=Q({integration_response:Q({status:_e(qt()),error:Q({message:be(),data:_e(qt())})})}),xi=e=>cr(Ac,e).success,Ic=Q({success:$e(!0),integration_response:Q({data:Q({outcome:$e("pending"),message:_e(qt())}),error:_e(bi())})}),Mn=e=>{let t=cr(Ic,e);if(!t.success||jn(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};Q({success:$e(!1),message:_e(qt())});var Tc=Q({error:$e("Validation failed"),messages:Q({})}),Dc=(e,t)=>t===422&&cr(Tc,e).success,ki=(e,t)=>{if(!xi(e))return;let r=e.integration_response,n=r.error.data,a=typeof n=="object"&&n!==null?n:{},i=g=>typeof a[g]=="string"?a[g]:void 0,o=g=>typeof a[g]=="boolean"?a[g]:void 0,s=g=>{let v=a[g];return Number.isSafeInteger(v)&&v>=0?v:void 0},l=g=>{let v=i(g),x=v===void 0?NaN:Date.parse(v);return Number.isFinite(x)?x:void 0},c=typeof r.status=="number"?r.status:t,f=i("phase"),u=i("verdict"),b=i("code"),p=c===409&&f==="submit"&&u==="confirmed"?"duplicate":c===410&&b==="job_closed"?"closed":f==="submit"&&u==="unknown"?"unknown":void 0;return{message:r.error.message,status:c,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:u,code:b,reason:i("reason"),maintenanceUntil:l("maintenance_until"),field:i("field"),outcome:p}},jc=vi("reason",[Q({outcome:$e("sent"),reason:$e("sandbox"),ats_label:$t(be())}),Q({outcome:$e("held"),reason:gi(["production_connection","no_sandbox_known","company_hold"]),ats_label:$t(be())}),Q({outcome:$e("internal"),reason:$e("internal"),ats_label:$t(be())}),Q({outcome:$e("held"),reason:$e("redirect"),ats_label:be()})]),Mc=e=>{let t=cr(Q({staging_destination:jc}),e);if(!t.success)return;let r=t.output.staging_destination;switch(r.reason){case"sandbox":return`Staging: sent to ${r.ats_label===null?"the ATS":r.ats_label} sandbox`;case"production_connection":return"Staging: held, production connection";case"no_sandbox_known":return"Staging: held, no sandbox known";case"company_hold":return"Staging: held, company set to hold all";case"internal":return"Staging: saved in inploi (no ATS)";case"redirect":return`Staging: held, redirect to ${r.ats_label}`}},Si=3e4,Oc=2e4,Lc=6e4,On=12e4,Ci=360*6e4,Fc=60*6e4,Ei=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,r=t===void 0?0:t-Date.now();return r>0&&r<=Ci?t:void 0},Nc=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=Ei(e);return t===void 0?{}:{until:t}},$i=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Rc=(e,t)=>{let r=Ei(t);if(r!==void 0)return{waitMs:r-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:Si};let n=(e??0)+1,a=Math.min(n*Oc,Lc),i=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(a,i),On),throttles:n}},Ai=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Pc=e=>{if(!xi(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},Vc=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",Bc=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",zc=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,Uc=(e,t)=>{if(typeof e!="object"||e===null)return null;let r=e.integration_response;if(typeof r!="object"||r===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 n=r;if(typeof n.status!="number"||n.service!==void 0&&typeof n.service!="string")return null;let a="data"in n,i=n.error,o=typeof i=="object"&&i!==null&&typeof i.message=="string"&&"data"in i;if(!a&&!o)return null;let s=a?n.data:i.data??null;return{service:n.service??"INVALID_SERVICE",response:{status:n.status,payload:s},...Mn(e)&&{outcome:"pending"}}},qc=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},Hc=(e,t)=>{if(!qc(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},Wc=e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>{if(typeof n.result!="string"||!n.result)return r(new Error("Invalid file"));t(n.result)},n.onerror=r,n.readAsDataURL(e)}),Ii=e=>typeof e=="object"&&e!==null&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Ln=(e,t)=>e?{...e,...Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>{let a=e[r];return[r,Ii(a)&&Ii(n)?Ln(a,n):n]}))}:t,Kc=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let a=t[n];if(!a)continue;let i=ur(e,n.split("."));if(a.required&&i==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(i!=null)switch(a.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:a.type}}},Ti={uk:"gb","great britain":"gb",england:"gb",scotland:"gb",wales:"gb","northern ireland":"gb",lincolnshire:"gb",surrey:"gb","republic of ireland":"ie",eire:"ie","hong kong sar":"hk","united states of america":"us",turkey:"tr","czech republic":"cz",burma:"mm",kosovo:"xk",xk:"xk"},Gc=`adand aeare afafg agatg aiaia alalb amarm aoago aqata ararg asasm ataut auaus awabw axala azaze babih bbbrb bdbgd bebel
|
|
15
|
+
indexedDB serviceWorker clipboard cookie`,Fl=["The operation is insecure.","The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.","The user aborted a request.","The operation was aborted.","signal is aborted without reason","Fetch is aborted","The quota has been exceeded.","The object is in an invalid state.","The string did not match the expected pattern.","The object can not be found here.","The operation is not supported.","The database connection is closing.","The transaction has finished.","The transaction is not active.","The transaction was aborted, so the request cannot be fulfilled.","One of the specified object stores was not found.","Connection to Indexed Database server lost. Refresh the page to try again","Attempt to get a record from database without an in-progress transaction","Database deleted by request of the user","An internal error was encountered in the Indexed Database server","Internal error opening backing store for indexedDB.open.","Access is denied for this document.","Access to the IndexedDB API is denied in this context.","The document is sandboxed and lacks the 'allow-same-origin' flag.","The play() request was interrupted by a call to pause().","The play() request was interrupted because the media was removed from the document.","play() failed because the user didn't interact with the document first.","The network connection was lost.","The request timed out.","The Internet connection appears to be offline.","A server with the specified hostname could not be found.","Network request failed","Illegal invocation","cancelled"],Ol=/^Failed to (?:execute|read|set|construct) (?:the )?'([\w$]{1,40})'(?: (?:on|property (?:from|on)|from) '([\w$]{1,40})')?(?:: (.*))?$/,ai,Nl=e=>{let{apis:t,sentences:r}=ai??(ai={apis:new Set(jl.split(/\s+/)),sentences:new Set(Fl)});if(r.has(e))return e;let n=Ol.exec(e);if(!n)return"";let[,a,i,o]=n;return t.has(a)&&(i===void 0||t.has(i))&&(o===void 0||r.has(o))?e:""},Pl=/^\s*at\s|@(?:[a-z][\w+.-]*:\/\/|\[native code\])/i,Rl=/\b(?:chrome|moz|safari|safari-web|ms-browser)-extension:\/\//,Vl=/\[native code\]|<anonymous>|\(native\)/,Bl=e=>Rl.test(e)?"extension":Vl.test(e)?"native":"script",ii=/^(Failed to fetch dynamically imported module|error loading dynamically imported module)/,zl=/^((?:[\w-]{1,20}\/){0,3}[\w.-]{1,80}\.js)(?:\?retry=\d{1,3})?:(\d{1,7})(?::(\d{1,7}))?\)?$/,Ul=/^ResizeObserver loop (?:completed with undelivered notifications\.|limit exceeded)$/,ql=({error:e,message:t})=>e==null&&Ul.test(t),jr=e=>e instanceof Error?Ve.has(e.name)?e.name:"Error":typeof e,Wl=new Set(["DOMException","Object","Array","Promise","Event","ErrorEvent","PromiseRejectionEvent","ProgressEvent","CloseEvent","MessageEvent","Response","Request","XMLHttpRequest"]),Hl=e=>{var n,a;let t=e===null?"null":typeof e,r={message:"",stack:"",thrown:{type:t,ctor:"",keys:0,message_length:0,stack_lines:0}};if(typeof e=="string")return{...r,thrown:{...r.thrown,message_length:e.length}};if(typeof e!="object"||e===null)return r;try{let{message:i,stack:o}=e,s=(a=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor)==null?void 0:a.name,l=typeof s!="string"?"":Ve.has(s)||Wl.has(s)?s:"other",c=typeof i=="string"?i:"",f=typeof o=="string"?o:"";return{message:e instanceof Error||Ve.has(l)||l==="DOMException"?c:"",stack:f,thrown:{type:t,ctor:l,keys:Object.keys(e).length,message_length:c.length,stack_lines:f?f.split(`
|
|
16
|
+
`,1e3).length:0}}}catch{return r}},Kl=(e,t,r="")=>{let n=jr(e),{message:a,stack:i,thrown:o}=Hl(e),s=(e==null?r:a).slice(0,300),l=Ut.some(h=>h.test(s))?s:ii.test(s)?ii.exec(s)[1]:Nl(s),c=[],f=new Set;for(let h of i.split(`
|
|
17
|
+
`,60)){let p=h.indexOf(t),g=p!==-1&&(p===0||" (@".includes(h[p-1])),v=g?zl.exec(h.slice(p+t.length).trim()):null;v?c.push([v[1],v[2],v[3]].filter(Boolean).join(":")):g?f.add("build"):Pl.test(h)&&f.add(Bl(h))}c.splice(10);let d={name:n,message:l,stack:c,foreign:[...f].sort(),thrown:o};for(;JSON.stringify(d).length>1400&&d.stack.length;)d.stack.pop();return d},oi="inploi-candidate-beacon-seed",Gl=()=>{try{return typeof sessionStorage>"u"?void 0:sessionStorage}catch{return}},Yl=()=>({host:"s2811583.eu-central-1a.betterstackdata.com",token:"LHJqsZXu82MrkgUP44JHAwvU",sampleRate:Math.min(1,Math.max(0,1))}),si=e=>{let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=Math.imul(t^a,2654435761),r=Math.imul(r^a,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&r)+(t>>>0)},Jl=(e,t)=>{try{let r=e==null?void 0:e.getItem(oi);if(r)return r;let n=t();return e==null||e.setItem(oi,n),n}catch{return t()}},Zl=[["facebook",/\bFB(?:AN|AV|_IAB)\b/],["instagram",/\bInstagram (\d+)/],["linkedin",/\bLinkedInApp\b/],["tiktok",/\b(?:musical_ly|BytedanceWebview|TikTok)\b/],["samsung",/\bSamsungBrowser\/(\d+)/],["edge",/\bEdg(?:e|A|iOS)?\/(\d+)/],["opera",/\bOPR\/(\d+)/],["firefox",/\b(?:Firefox|FxiOS)\/(\d+)/],["chrome",/\b(?:Chrome|CriOS)\/(\d+)/],["safari",/\bVersion\/(\d+)[\d.]* (?:Mobile\/\S+ )?Safari\//]],Xl=[["ios",/\b(?:iPhone|iPad|iPod)\b/],["android",/\bAndroid\b/],["windows",/\bWindows\b/],["chromeos",/\bCrOS\b/],["mac",/\bMacintosh\b/],["linux",/\bLinux\b/]],Ql=e=>{var n,a;let t=Zl.find(([,i])=>i.test(e)),r=(n=t==null?void 0:t[1].exec(e))==null?void 0:n[1];return{browser:t?[t[0],r].filter(Boolean).join(" "):"other",platform:((a=Xl.find(([,i])=>i.test(e)))==null?void 0:a[0])??"other"}},ec=(e=typeof document>"u"?void 0:document)=>{var i,o;let t=()=>typeof performance>"u"?0:Math.round(performance.now()),r=(e==null?void 0:e.visibilityState)==="hidden"?t():null,n=null,a=!1;return e==null||e.addEventListener("visibilitychange",()=>{e.visibilityState==="hidden"?r=t():r!==null&&(n=t())}),(i=e==null?void 0:e.defaultView)==null||i.addEventListener("pagehide",()=>a=!0),(o=e==null?void 0:e.defaultView)==null||o.addEventListener("pageshow",()=>a=!1),()=>{var c;let s=typeof navigator>"u"?void 0:navigator,l=(c=s==null?void 0:s.connection)==null?void 0:c.effectiveType;return{visibility:(e==null?void 0:e.visibilityState)??"unknown",was_hidden:r!==null,hidden_at_ms:r,shown_at_ms:n,unloading:a,online:typeof(s==null?void 0:s.onLine)=="boolean"?s.onLine:null,connection:typeof l=="string"?l.slice(0,8):null,...Ql((s==null?void 0:s.userAgent)??""),page_ms:t()}}},tc=new Set(["boot_failed","fatal","submit_blocked"]),rc=(e,t,r)=>{if(t.unloading||t.visibility==="hidden")return!0;if(e!=="boot_failed"||t.hidden_at_ms===null)return!1;if(r.elapsed_ms===void 0)return!0;let n=t.page_ms-r.elapsed_ms;return t.hidden_at_ms>=n||t.shown_at_ms!==null&&t.shown_at_ms>=n},nc=(e,t,r,n,a)=>{var o;if(t)return"abandoned";if(a.online===!1)return"offline";let i=[n.phase,n.stage,r==null?void 0:r.slice(0,40),n.http_status??((o=n.error)==null?void 0:o.name)];return[...new Set(i.filter(s=>s!==void 0&&s!=="").map(String))].join(":")||e},ac=({config:e,version:t,env:r,seed:n,automated:a=typeof navigator<"u"&&navigator.webdriver===!0,company:i,page:o=ec(),now:s=Date.now,post:l=(c,f)=>fetch(c,f)})=>{let c=si(n),f=s(),d=e!==void 0&&c%1e4<e.sampleRate*1e4,h=new Set;return{send:(p,g,v={})=>{if(!e||!d||!t)return;let _=o(),S=tc.has(p),x=S&&rc(p,_,v),L=x?`${p}:abandoned`:p;if(h.has(L))return;h.add(L);let{error:j,...F}=v,V={dt:new Date(s()).toISOString(),message:"Candidate widget beacon",kind:p,version:t,company_slug:(i==null?void 0:i())??null,env:r==="production"?"production":"staging",mode:a?"test":"live",seed_hash:c.toString(36),sample_rate:e.sampleRate,...g&&{reason:g.slice(0,40)},...S&&{abandoned:x,cause:nc(p,x,g,v,_).slice(0,60)},since_start_ms:Math.max(0,Math.round(s()-f)),..._,...F,...j&&{error:j,error_message:j.message,error_frame:j.stack[0]??null}};l(`https://${e.host}`,{method:"POST",keepalive:!0,headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify(V)}).catch(()=>{})}}},He,ic={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function li(e){return!e&&!He?ic:{lang:(e==null?void 0:e.lang)??(He==null?void 0:He.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(He==null?void 0:He.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(He==null?void 0:He.abortPipeEarly)}}var kn;function oc(e){return kn==null?void 0:kn.get(e)}var Sn;function sc(e){return Sn==null?void 0:Sn.get(e)}var Cn;function lc(e,t){var r;return(r=Cn==null?void 0:Cn.get(e))==null?void 0:r.get(t)}function En(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function De(e,t,r,n,a){let i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??En(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??lc(e.reference,l.lang)??(c?sc(l.lang):null)??n.message??oc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}var ci=new WeakMap;function xe(e){let t=ci.get(e);return t||(t={version:1,vendor:"valibot",validate(r){return e["~run"]({value:r},li())}},ci.set(e,t)),t}function cc(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function $n(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function di(e){return{kind:"transformation",type:"transform",reference:di,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}var dc={abortEarly:!0};function uc(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function An(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function ui(){return{kind:"schema",type:"any",reference:ui,expects:"any",async:!1,get"~standard"(){return xe(this)},"~run"(e){return e.typed=!0,e}}}function fi(e,t){return{kind:"schema",type:"array",reference:fi,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){var i;let a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){let s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:a,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else De(this,"type",r,n);return r}}}function In(e){return{kind:"schema",type:"boolean",reference:In,expects:"boolean",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:De(this,"type",t,r),t}}}function Me(e,t){return{kind:"schema",type:"literal",reference:Me,expects:En(e),async:!1,literal:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:De(this,"type",r,n),r}}}function pi(e){return{kind:"schema",type:"null",reference:pi,expects:"null",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return t.value===null?t.typed=!0:De(this,"type",t,r),t}}}function St(e,t){return{kind:"schema",type:"nullable",reference:St,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=An(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Fr(e){return{kind:"schema",type:"number",reference:Fr,expects:"number",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:De(this,"type",t,r),t}}}function re(e,t){return{kind:"schema",type:"object",reference:re,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){var i;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in a?a[o]:An(s),c=s["~run"]({value:l},n);if(c.issues){let f={type:"object",origin:"value",input:a,key:o,value:l};for(let d of c.issues)d.path?d.path.unshift(f):d.path=[f],(i=r.issues)==null||i.push(d);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=uc(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(De(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else De(this,"type",r,n);return r}}}function Se(e,t){return{kind:"schema",type:"optional",reference:Se,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=An(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function hi(e,t){return{kind:"schema",type:"picklist",reference:hi,expects:$n(e.map(En),"|"),async:!1,options:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:De(this,"type",r,n),r}}}function Tn(e,t,r){return{kind:"schema",type:"record",reference:Tn,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return xe(this)},"~run"(n,a){var o,s;let i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(let l in i)if(cc(i,l)){let c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){let h={type:"object",origin:"key",input:i,key:l,value:c};for(let p of f.issues)p.path=[h],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}let d=this.value["~run"]({value:c},a);if(d.issues){let h={type:"object",origin:"value",input:i,key:l,value:c};for(let p of d.issues)p.path?p.path.unshift(h):p.path=[h],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else De(this,"type",n,a);return n}}}function we(e){return{kind:"schema",type:"string",reference:we,expects:"string",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:De(this,"type",t,r),t}}}function gi(e){let t;if(e)for(let r of e)if(t)for(let n of r.issues)t.push(n);else t=r.issues;return t}function Dn(e,t){return{kind:"schema",type:"union",reference:Dn,expects:$n(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){let a,i,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];De(this,"type",r,n,{issues:gi(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];De(this,"type",r,n,{issues:gi(o)})}return r}}}function qt(){return{kind:"schema",type:"unknown",reference:qt,expects:"unknown",async:!1,get"~standard"(){return xe(this)},"~run"(e){return e.typed=!0,e}}}function bi(e,t,r){return{kind:"schema",type:"variant",reference:bi,expects:"Object",async:!1,key:e,options:t,message:r,get"~standard"(){return xe(this)},"~run"(n,a){let i=n.value;if(i&&typeof i=="object"){let o,s=0,l=this.key,c=[],f=(d,h)=>{for(let p of d.options){if(p.type==="variant")f(p,new Set(h).add(p.key));else{let g=!0,v=0;for(let _ of h){let S=p.entries[_];if(_ in i?S["~run"]({typed:!1,value:i[_]},dc).issues:S.type!=="exact_optional"&&S.type!=="optional"&&S.type!=="nullish"){g=!1,l!==_&&(s<v||s===v&&_ in i&&!(l in i))&&(s=v,l=_,c=[]),l===_&&c.push(p.entries[_].expects);break}v++}if(g){let _=p["~run"]({value:i},a);(!o||!o.typed&&_.typed)&&(o=_)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;De(this,"type",n,a,{input:i[l],expected:$n(c,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else De(this,"type",n,a);return n}}}function fc(...e){return{...e[0],pipe:e,get"~standard"(){return xe(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function ir(e,t,r){let n=e["~run"]({value:t},li(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var pc=e=>({ok:!0,err:!1,val:e}),hc=e=>({err:!0,ok:!1,val:e}),Mn=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function Ln(e,t,r){var o,s;let n=e.find(l=>l.type==="pre-apply-result");if(!n)return;let a=(o=t[n.data.participationKey])==null?void 0:o.value,i={};if(a===!0)for(let l of Mn(e)){let c=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(c)&&c.length===1&&(c=c[0]),(typeof c=="boolean"||typeof c=="string")&&(i[l.data.key]=c)}return{node_id:n.id,flow_session_id:r,participation:a,answers:i}}function gc(e,t){let r=Ln(e,t,""),n=Mn(e).map(i=>{let o=i.data.preApply,s=r==null?void 0:r.answers[i.data.key],l=i.type==="question-boolean"?typeof s=="boolean":i.data.options.some(c=>c.value===s);return{key:i.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),a=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&n.length>0&&n.every(i=>i.valid)?"completed":"unavailable";return{status:a,hasHardConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="hard"):null,hasAdvisoryConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="advisory"):null,answers:a==="completed"?n:[]}}function bc(e,t){let r=new Set(Mn(e).map(n=>n.data.key));for(let n of e)n.type==="pre-apply-result"&&(r.add(n.data.key),r.add(n.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([n])=>!r.has(n)))}var mc=()=>{try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return typeof e=="string"&&e.length>0?e:void 0}catch{return}},pt=class extends Error{constructor(){super("Aborted")}},or=(e,t)=>{if(t.length===0)return;let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n]}return r},vc=(e,t="all")=>{let r={},n=t==="all"?null:new Set(t);for(let a in e){let i=e[a];i&&(n&&!n.has(a)||(r[a]=i.value))}return r},mi=(e,t)=>{let r=new Set(e.flatMap(n=>n.type==="add-submission"?[n.data.key]:[]));return Object.entries(t).some(([n,a])=>a!==void 0&&a.type!=="integration"&&!r.has(n))},wc=({key:e,submissions:t})=>{var n;let r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},vi=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let a=or(n,t);switch(typeof a){case"string":return{type:"string",value:a};case"number":return{type:"number",value:a};case"boolean":return{type:"boolean",value:a};default:console.warn(`Unexpected type for $context.${t.join(".")}`,a);return}}return r[e]},yc=e=>{let t=e.split(".").pop();return t?pc(t?"."+t:""):hc("No file extension found")},Or=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let a=yc(n.name);return a.ok&&r.includes(a.val.toLowerCase())})},jn={".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".rtf":"application/rtf",".odt":"application/vnd.oasis.opendocument.text",".txt":"text/plain",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png"},_c=e=>[...new Set([...e,...e.map(t=>jn[t.toLowerCase()]).filter(t=>t!==void 0)])].join(","),xc=64*1024,kc=1024,Sc=[208,207,17,224,161,177,26,225],Cc=[80,75,3,4],Fn=(e,t)=>t.every((r,n)=>e[n]===r),wi=(e,t,r=e.length)=>{let n=Array.from(t,i=>i.charCodeAt(0)),a=Math.min(r,e.length)-n.length;for(let i=0;i<=a;i++)if(Fn(e.subarray(i),n))return!0;return!1},Ec=e=>{if(wi(e,"%PDF-",kc))return".pdf";if(Fn(e,Sc))return".doc";if(Fn(e,Cc)&&wi(e,"word/"))return".docx"},$c=async(e,t)=>{if(Or([e],t))return e;let r=e.name.lastIndexOf(".");if((r===-1?"":e.name.slice(r).toLowerCase())in jn)return e;let n=Ec(new Uint8Array(await e.slice(0,xc).arrayBuffer()));return!n||!t.some(a=>a.toLowerCase()===n)?e:new File([e],`${e.name}${n}`,{type:jn[n],lastModified:e.lastModified})},Wt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Nr=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,Ac=re({integration_response:re({data:re({redirect_url:we(),message:Se(St(we())),button_text:Se(St(we()))})})}),Pr=e=>ir(Ac,e).success,Ic=re({integration_response:re({status:Se(qt()),error:re({message:we(),data:Se(qt())})})}),yi=e=>ir(Ic,e).success,Tc=re({success:Me(!0),integration_response:re({data:re({outcome:Me("pending"),message:Se(qt())}),error:Se(pi())})}),Rr=e=>{let t=ir(Tc,e);if(!t.success||Pr(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};re({success:Me(!1),message:Se(qt())});var Dc=re({error:Me("Validation failed"),messages:re({})}),Mc=(e,t)=>t===422&&ir(Dc,e).success,On=(e,t)=>{if(!yi(e))return;let r=e.integration_response,n=r.error.data,a=typeof n=="object"&&n!==null?n:{},i=g=>typeof a[g]=="string"?a[g]:void 0,o=g=>typeof a[g]=="boolean"?a[g]:void 0,s=g=>{let v=a[g];return Number.isSafeInteger(v)&&v>=0?v:void 0},l=g=>{let v=i(g),_=v===void 0?NaN:Date.parse(v);return Number.isFinite(_)?_:void 0},c=typeof r.status=="number"?r.status:t,f=i("phase"),d=i("verdict"),h=i("code"),p=c===409&&f==="submit"&&d==="confirmed"?"duplicate":c===410&&h==="job_closed"?"closed":f==="submit"&&d==="unknown"?"unknown":void 0;return{message:r.error.message,status:c,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:d,code:h,reason:i("reason"),maintenanceUntil:l("maintenance_until"),field:i("field"),outcome:p}},Lc=bi("reason",[re({outcome:Me("sent"),reason:Me("sandbox"),ats_label:St(we())}),re({outcome:Me("held"),reason:hi(["production_connection","no_sandbox_known","company_hold"]),ats_label:St(we())}),re({outcome:Me("internal"),reason:Me("internal"),ats_label:St(we())}),re({outcome:Me("held"),reason:Me("redirect"),ats_label:we()})]),jc=e=>{let t=ir(re({staging_destination:Lc}),e);if(!t.success)return;let r=t.output.staging_destination;switch(r.reason){case"sandbox":return`Staging: sent to ${r.ats_label===null?"the ATS":r.ats_label} sandbox`;case"production_connection":return"Staging: held, production connection";case"no_sandbox_known":return"Staging: held, no sandbox known";case"company_hold":return"Staging: held, company set to hold all";case"internal":return"Staging: saved in inploi (no ATS)";case"redirect":return`Staging: held, redirect to ${r.ats_label}`}},_i=3e4,Fc=2e4,Oc=6e4,Nn=12e4,xi=360*6e4,ki=60*6e4,Si=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,r=t===void 0?0:t-Date.now();return r>0&&r<=xi?t:void 0},Nc=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=Si(e);return t===void 0?{}:{until:t}},Ci=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Pc=(e,t)=>{let r=Si(t);if(r!==void 0)return{waitMs:r-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:_i};let n=(e??0)+1,a=Math.min(n*Fc,Oc),i=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(a,i),Nn),throttles:n}},Ei=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Rc=e=>{if(!yi(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},Vc=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",Bc=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",zc=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,Uc=(e,t)=>{if(typeof e!="object"||e===null)return null;let r=e.integration_response;if(typeof r!="object"||r===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 n=r;if(typeof n.status!="number"||n.service!==void 0&&typeof n.service!="string")return null;let a="data"in n,i=n.error,o=typeof i=="object"&&i!==null&&typeof i.message=="string"&&"data"in i;if(!a&&!o)return null;let s=a?n.data:i.data??null;return{service:n.service??"INVALID_SERVICE",response:{status:n.status,payload:s},...Rr(e)&&{outcome:"pending"}}},qc=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},Wc=(e,t)=>{if(!qc(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},Hc=e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>{if(typeof n.result!="string"||!n.result)return r(new Error("Invalid file"));t(n.result)},n.onerror=r,n.readAsDataURL(e)}),$i=e=>typeof e=="object"&&e!==null&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Pn=(e,t)=>e?{...e,...Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>{let a=e[r];return[r,$i(a)&&$i(n)?Pn(a,n):n]}))}:t,Kc=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let a=t[n];if(!a)continue;let i=or(e,n.split("."));if(a.required&&i==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(i!=null)switch(a.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:a.type}}},Ai={uk:"gb","great britain":"gb",england:"gb",scotland:"gb",wales:"gb","northern ireland":"gb",lincolnshire:"gb",surrey:"gb","republic of ireland":"ie",eire:"ie","hong kong sar":"hk","united states of america":"us",turkey:"tr","czech republic":"cz",burma:"mm",kosovo:"xk",xk:"xk"},Gc=`adand aeare afafg agatg aiaia alalb amarm aoago aqata ararg asasm ataut auaus awabw axala azaze babih bbbrb bdbgd bebel
|
|
18
18
|
bfbfa bgbgr bhbhr bibdi bjben blblm bmbmu bnbrn bobol bqbes brbra bsbhs btbtn bvbvt bwbwa byblr bzblz cacan cccck cdcod
|
|
19
19
|
cfcaf cgcog chche ciciv ckcok clchl cmcmr cnchn cocol crcri cucub cvcpv cwcuw cxcxr cycyp czcze dedeu djdji dkdnk dmdma
|
|
20
20
|
dodom dzdza ececu eeest egegy ehesh ereri esesp eteth fifin fjfji fkflk fmfsm fofro frfra gagab gbgbr gdgrd gegeo gfguf
|
|
@@ -26,12 +26,12 @@ ncncl nener nfnfk ngnga ninic nlnld nonor npnpl nrnru nuniu nznzl omomn papan pe
|
|
|
26
26
|
pnpcn prpri pspse ptprt pwplw pypry qaqat rereu rorou rssrb rurus rwrwa sasau sbslb scsyc sdsdn seswe sgsgp shshn sisvn
|
|
27
27
|
sjsjm sksvk slsle smsmr snsen sosom srsur ssssd ststp svslv sxsxm sysyr szswz tctca tdtcd tfatf tgtgo ththa tjtjk tktkl
|
|
28
28
|
tltls tmtkm tntun toton trtur tttto tvtuv twtwn tztza uaukr uguga umumi ususa uyury uzuzb vavat vcvct veven vgvgb vivir
|
|
29
|
-
vnvnm vuvut wfwlf wswsm yeyem ytmyt zazaf zmzmb zwzwe`,At,Yc=()=>{if(At)return At;At=new Map;let e=new Intl.DisplayNames(["en"],{type:"region",fallback:"none"});for(let t of Gc.split(/\s+/)){let r=t.slice(0,2),n=e.of(r.toUpperCase());n&&At.set(n.toLowerCase(),r),At.set(r,r),At.set(t.slice(2),r)}return At},Jc=e=>{let t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(Ti,t))return Ti[t];let r=/^[a-z]{2}-[a-z0-9]{1,3}$/.test(t)?t.slice(0,2):t;return Yc().get(r)},Zc=e=>[...new Set(e.flatMap(t=>Jc(t)??[]))].sort();let et;function Di(e){return{lang:(e==null?void 0:e.lang)??(et==null?void 0:et.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(et==null?void 0:et.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(et==null?void 0:et.abortPipeEarly)}}let Fn;function Xc(e){return Fn==null?void 0:Fn.get(e)}let Nn;function Qc(e){return Nn==null?void 0:Nn.get(e)}let Rn;function eu(e,t){var r;return(r=Rn==null?void 0:Rn.get(e))==null?void 0:r.get(t)}function Pn(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function Ae(e,t,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??Pn(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??eu(e.reference,l.lang)??(c?Qc(l.lang):null)??n.message??Xc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Ie(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Di())}}}function tu(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ji(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}const ru=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Mi(e){return{kind:"validation",type:"email",reference:Mi,expects:null,async:!1,requirement:ru,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&Ae(this,"email",t,r),t}}}function Vn(e,t){return{kind:"validation",type:"max_length",reference:Vn,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&Ae(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Br(e,t){return{kind:"validation",type:"min_length",reference:Br,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&Ae(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Oi(e){return{kind:"transformation",type:"transform",reference:Oi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Bn(){return{kind:"transformation",type:"trim",reference:Bn,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function nu(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function zr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ur(e,t){return{kind:"schema",type:"array",reference:Ur,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:a,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Ae(this,"type",r,n);return r}}}function zn(e){return{kind:"schema",type:"boolean",reference:zn,expects:"boolean",async:!1,message:e,get"~standard"(){return Ie(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ae(this,"type",t,r),t}}}function Li(e,t){return{kind:"schema",type:"literal",reference:Li,expects:Pn(e),async:!1,literal:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Ae(this,"type",r,n),r}}}function J(e,t){return{kind:"schema",type:"nullable",reference:J,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ie(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function tt(e,t){return{kind:"schema",type:"nullish",reference:tt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ie(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Ve(e){return{kind:"schema",type:"number",reference:Ve,expects:"number",async:!1,message:e,get"~standard"(){return Ie(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ae(this,"type",t,r),t}}}function pe(e,t){return{kind:"schema",type:"object",reference:pe,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:zr(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:a,key:o,value:l};for(const u of c.issues)u.path?u.path.unshift(f):u.path=[f],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=nu(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ae(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else Ae(this,"type",r,n);return r}}}function rt(e,t){return{kind:"schema",type:"optional",reference:rt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ie(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function bt(e,t){return{kind:"schema",type:"picklist",reference:bt,expects:ji(e.map(Pn),"|"),async:!1,options:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Ae(this,"type",r,n),r}}}function qr(e,t,r){return{kind:"schema",type:"record",reference:qr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Ie(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if(tu(i,l)){const c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){const b={type:"object",origin:"key",input:i,key:l,value:c};for(const p of f.issues)p.path=[b],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:c},a);if(u.issues){const b={type:"object",origin:"value",input:i,key:l,value:c};for(const p of u.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else Ae(this,"type",n,a);return n}}}function R(e){return{kind:"schema",type:"string",reference:R,expects:"string",async:!1,message:e,get"~standard"(){return Ie(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ae(this,"type",t,r),t}}}function Fi(e){let t;if(e)for(const r of e)t?t.push(...r.issues):t=r.issues;return t}function Ni(e,t){return{kind:"schema",type:"union",reference:Ni,expects:ji(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){let a,i,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];Ae(this,"type",r,n,{issues:Fi(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ae(this,"type",r,n,{issues:Fi(o)})}return r}}}function Ri(){return{kind:"schema",type:"unknown",reference:Ri,expects:"unknown",async:!1,get"~standard"(){return Ie(this)},"~run"(e){return e.typed=!0,e}}}function Wt(...e){return{...e[0],pipe:e,get"~standard"(){return Ie(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Un(e,t,r){const n=e["~run"]({value:t},Di(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var au=e=>e,iu=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},ou=class extends iu{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},su={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},lu=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16));function qn(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function lg(e){return e}var cu=["agent","sdk","form","integration","migration"],uu=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],du=["screening","cv_match","interview","overall"],fu=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],pu=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Pi=bt(cu),hu=bt(uu),bu=Wt(R(),Bn(),Br(1),Vn(100)),gu=bt(du),mu=bt(fu),vu=Wt(R(),Bn(),Br(1),Vn(100)),wu=bt(pu),Vi=pe({id:R(),email:J(R()),firstName:J(R()),lastName:J(R()),phone:J(R()),source:J(Pi),identifiedAt:J(R()),createdAt:R(),updatedAt:R()}),Bi=Wt(R(),Br(1)),Hn=qr(R(),Ri()),yu=pe({id:R(),applicationId:R(),status:mu,scheduledAt:J(R()),completedAt:J(R()),meta:J(Hn),createdAt:R(),updatedAt:R()}),_u=pe({score:Ve(),reason:R(),confidence:Ve()}),zi=pe({id:R(),candidateId:R(),jobId:Ve(),stage:bu,stageGroup:hu,stageEnteredAt:R(),rating:J(Ve()),disqualifiedAt:J(R()),disqualificationReason:J(vu),disqualificationNote:J(R()),source:wu,sourceDetail:J(R()),sessionId:J(Ve()),externalApplicationId:J(R()),meta:J(Hn),context:J(Hn),scoredAt:J(R()),createdAt:R(),updatedAt:R()}),xu=pe({id:R(),applicationId:R(),scoreType:gu,score:J(Ve()),reason:J(R()),categories:J(qr(R(),_u)),scoredBy:J(R()),createdAt:R()});({...zi.entries},{...Vi.entries});var ku=pe({anonymousId:Bi,email:Bi,firstName:tt(R()),lastName:tt(R()),phone:tt(R()),source:tt(Pi)}),Su=pe({candidateId:R(),isNew:zn()}),Cu=pe({id:R(),stageGroup:R(),createdAt:R()}),Eu=pe({isDuplicate:zn(),existingApplication:rt(Cu)}),$u=({environment:e,publishableKey:t,logger:r})=>{let n=su[e];return{async checkDuplicate(a){try{let i=new URLSearchParams({email:a.email,scope:a.scope});a.scope==="job"&&a.jobId!=null&&i.set("job_id",String(a.jobId));let o=await fetch(`${n}/applications/check-duplicate?${i}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Un(Eu,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(i){return r.error("[TalentBankClient] checkDuplicate failed:",i),{isDuplicate:!1}}},async identify(a){try{if(!a.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let i={email:a.email,firstName:a.firstName,lastName:a.lastName,phone:a.phone,anonymousId:a.anonymousId,source:a.source??"sdk"},o=Un(ku,i);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${n}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Un(Su,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(i){return r.error("[TalentBankClient] identify failed:",i),null}}}},Au=["DAILY","WEEKLY","MONTHLY"],Iu=qr(R(),Ni([R(),Ur(R()),pe({type:Li("provided"),lat:Ve(),lng:Ve(),radius:Ve(),unit:rt(bt(["miles","km"])),label:rt(R())})])),Tu={pathname:"/job/:id",method:"GET",schema:{response:pe({id:Ve(),external_id:tt(R()),city:tt(R()),town:tt(R()),category:tt(R())})}};async function Du(e,{contact:t,job:r}){var a;let n={};if(r){let i=await e.request(Tu,{params:{id:r.id}});if((r.id_type==="internal"?String(i.id):i.external_id)!==r.id)throw new Error("Job lookup returned a different role");for(let o of["city","town","category"]){let s=(a=i[o])==null?void 0:a.trim();s&&(n[o]=[s])}}await e.request(ju,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var ju={pathname:"/search/save",method:"POST",schema:{response:qn(),body:pe({contact:pe({email:Wt(rt(R()),R(),Mi()),first_name:rt(R()),last_name:rt(R())}),alerts:Wt(rt(R()),R(),bt(Au)),filters:Iu})}},Mu=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:Wt(pe({country:rt(Ur(pe({value:R()})),[])}),Oi(({country:r})=>r.map(({value:n})=>n))),searchParams:qn()}};return e.request(t,{searchParams:{filters:{country:null}}})},Hr=new WeakMap,Ui=e=>(Hr.has(e)||(Hr.set(e,void 0),Mu(e).then(async t=>{let{jobCountryCodes:r}=await Promise.resolve().then(()=>ap);Hr.set(e,r(t).join(",")||void 0)}).catch(()=>{})),Hr.get(e)),Ou=(e,t)=>{let r=new Set,n=[];for(let a=0;a<Math.max(e.length,t.length);a++)for(let i of[e[a],t[a]]){if(!i)continue;let o=i.mapbox_id||i.full_address||[i.name,i.place_formatted].filter(Boolean).join(", ");if(!r.has(o)&&(r.add(o),n.push(i),n.length===5))return n}return n},Lu=600,Fu=async(e,t,r)=>{if(r==null||r.throwIfAborted(),!t){let n=await e();return r==null||r.throwIfAborted(),n}return new Promise((n,a)=>{let i,o,s,l=!1,c=()=>{l=!0,clearTimeout(s),r==null||r.removeEventListener("abort",f)},f=()=>{c(),a(r==null?void 0:r.reason)},u=()=>{c(),(i==null?void 0:i.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(Ou(i.value,o.value)):(i==null?void 0:i.status)==="fulfilled"?n(i.value):(o==null?void 0:o.status)==="fulfilled"?n(o.value):(i==null?void 0:i.status)==="rejected"&&a(i.reason)},b=(p,g)=>{l||(p?i=g:o=g,i&&o?u():g.status==="fulfilled"&&g.value.length>0&&(s=setTimeout(u,Lu)))};r==null||r.addEventListener("abort",f,{once:!0});for(let p of[!0,!1])e(p?t:void 0).then(g=>b(p,{status:"fulfilled",value:g}),g=>b(p,{status:"rejected",reason:g}))})},qi=vc(In([be(),Pr()]),fi(String)),Hi=Q({id:qi,version:Pr(),build:Pr(),nodes:hi(pi()),context_schema:_e($t(An(be(),Q({required:$n(),type:In([$e("string"),$e("number")])}))))}),Nu=Q({flow:Hi}),Ru=Q({company:Q({name:be()}),context:_e(An(be(),qt())),flow:Hi,job:Q({id:qi,title:be()}),user:_e(Q({city:_e(be()),country:_e(be()),isEU:_e($n()),continent:_e(be())}))}),Pu=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),Vu={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:qn(),response:Ru}},Bu={pathname:"/flow/id/:id",method:"GET",schema:{response:Nu}},dr,F,Wi,Ki,It,Gi,Yi,Wn,Ji,Kt={},Zi=[],zu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Wr=Array.isArray;function nt(e,t){for(var r in t)e[r]=t[r];return e}function Xi(e){var t=e.parentNode;t&&t.removeChild(e)}function Oe(e,t,r){var n,a,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?dr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return fr(e,o,n,a,null)}function fr(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Wi};return a==null&&F.vnode!=null&&F.vnode(i),i}function Uu(){return{current:null}}function ie(e){return e.children}function Be(e,t){this.props=e,this.context=t}function Kr(e,t){if(t==null)return e.__?Kr(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Kr(e):null}function Qi(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Qi(e)}}function Kn(e){(!e.__d&&(e.__d=!0)&&It.push(e)&&!Gr.__r++||Gi!==F.debounceRendering)&&((Gi=F.debounceRendering)||Yi)(Gr)}function Gr(){var e,t,r,n,a,i,o,s,l;for(It.sort(Wn);e=It.shift();)e.__d&&(t=It.length,n=void 0,a=void 0,i=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],a=[],(i=nt({},o)).__v=o.__v+1,Gn(l,o,i,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??Kr(o),o.__h,a),oo(n,o,a),o.__e!=s&&Qi(o)),It.length>t&&It.sort(Wn));Gr.__r=0}function eo(e,t,r,n,a,i,o,s,l,c,f){var u,b,p,g,v,x,C,_,M,j,D=0,z=n&&n.__k||Zi,A=z.length,S=A,k=t.length;for(r.__k=[],u=0;u<k;u++)(g=r.__k[u]=(g=t[u])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?fr(null,g,null,null,g):Wr(g)?fr(ie,{children:g},null,null,null):g.__b>0?fr(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(_=qu(g,z,C=u+D,S))===-1?p=Kt:(p=z[_]||Kt,z[_]=void 0,S--),Gn(e,g,p,a,i,o,s,l,c,f),v=g.__e,(b=g.ref)&&p.ref!=b&&(p.ref&&Yn(p.ref,null,g),f.push(b,g.__c||v,g)),v!=null&&(x==null&&(x=v),j=!(M=p===Kt||p.__v===null)&&_===C,M?_==-1&&D--:_!==C&&(_===C+1?(D++,j=!0):_>C?S>k-C?(D+=_-C,j=!0):D--:D=_<C&&_==C-1?_-C:0),C=u+D,j=j||_==u&&!M,typeof g.type!="function"||_===C&&p.__k!==g.__k?typeof g.type=="function"||j?g.__d!==void 0?(l=g.__d,g.__d=void 0):l=v.nextSibling:l=ro(e,v,l):l=to(g,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=x,u=A;u--;)z[u]!=null&&(typeof r.type=="function"&&z[u].__e!=null&&z[u].__e==r.__d&&(r.__d=z[u].__e.nextSibling),so(z[u],z[u]))}function to(e,t,r){for(var n,a=e.__k,i=0;a&&i<a.length;i++)(n=a[i])&&(n.__=e,t=typeof n.type=="function"?to(n,t,r):ro(r,n.__e,t));return t}function at(e,t){return t=t||[],e==null||typeof e=="boolean"||(Wr(e)?e.some(function(r){at(r,t)}):t.push(e)),t}function ro(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function qu(e,t,r,n){var a=e.key,i=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&a==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&a==l.key&&i===l.type)return o;o--}if(s<t.length){if((l=t[s])&&a==l.key&&i===l.type)return s;s++}}return-1}function Hu(e,t,r,n,a){var i;for(i in r)i==="children"||i==="key"||i in t||Yr(e,i,null,r[i],n);for(i in t)a&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||Yr(e,i,t[i],r[i],n)}function no(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||zu.test(t)?r:r+"px"}function Yr(e,t,r,n,a){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||no(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||no(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?io:ao,i):e.removeEventListener(t,i?io:ao,i);else if(t!=="dangerouslySetInnerHTML"){if(a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function ao(e){return this.l[e.type+!1](F.event?F.event(e):e)}function io(e){return this.l[e.type+!0](F.event?F.event(e):e)}function Gn(e,t,r,n,a,i,o,s,l,c){var f,u,b,p,g,v,x,C,_,M,j,D,z,A,S,k=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=F.__b)&&f(t);try{e:if(typeof k=="function"){if(C=t.props,_=(f=k.contextType)&&n[f.__c],M=f?_?_.props.value:f.__:n,r.__c?x=(u=t.__c=r.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(C,M):(t.__c=u=new Be(C,M),u.constructor=k,u.render=Ku),_&&_.sub(u),u.props=C,u.state||(u.state={}),u.context=M,u.__n=n,b=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),k.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=nt({},u.__s)),nt(u.__s,k.getDerivedStateFromProps(C,u.__s))),p=u.props,g=u.state,u.__v=t,b)k.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k.getDerivedStateFromProps==null&&C!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(C,M),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(C,u.__s,M)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=C,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(E){E&&(E.__=t)}),j=0;j<u._sb.length;j++)u.__h.push(u._sb[j]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(C,u.__s,M),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,g,v)})}if(u.context=M,u.props=C,u.__P=e,u.__e=!1,D=F.__r,z=0,"prototype"in k&&k.prototype.render){for(u.state=u.__s,u.__d=!1,D&&D(t),f=u.render(u.props,u.state,u.context),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[]}else do u.__d=!1,D&&D(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++z<25);u.state=u.__s,u.getChildContext!=null&&(n=nt(nt({},n),u.getChildContext())),b||u.getSnapshotBeforeUpdate==null||(v=u.getSnapshotBeforeUpdate(p,g)),eo(e,Wr(S=f!=null&&f.type===ie&&f.key==null?f.props.children:f)?S:[S],t,r,n,a,i,o,s,l,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),x&&(u.__E=u.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Wu(r.__e,t,r,n,a,i,o,l,c);(f=F.diffed)&&f(t)}catch(E){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),F.__e(E,t,r)}}function oo(e,t,r){for(var n=0;n<r.length;n++)Yn(r[n],r[++n],r[++n]);F.__c&&F.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){F.__e(i,a.__v)}})}function Wu(e,t,r,n,a,i,o,s,l){var c,f,u,b=r.props,p=t.props,g=t.type,v=0;if(g==="svg"&&(a=!0),i!=null){for(;v<i.length;v++)if((c=i[v])&&"setAttribute"in c==!!g&&(g?c.localName===g:c.nodeType===3)){e=c,i[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(p);e=a?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),i=null,s=!1}if(g===null)b===p||s&&e.data===p||(e.data=p);else{if(i=i&&dr.call(e.childNodes),f=(b=r.props||Kt).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(i!=null)for(b={},v=0;v<e.attributes.length;v++)b[e.attributes[v].name]=e.attributes[v].value;(u||f)&&(u&&(f&&u.__html==f.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(Hu(e,p,b,a,s),u)t.__k=[];else if(eo(e,Wr(v=t.props.children)?v:[v],t,r,n,a&&g!=="foreignObject",i,o,i?i[0]:r.__k&&Kr(r,0),s,l),i!=null)for(v=i.length;v--;)i[v]!=null&&Xi(i[v]);s||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||g==="progress"&&!v||g==="option"&&v!==b.value)&&Yr(e,"value",v,b.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&Yr(e,"checked",v,b.checked,!1))}return e}function Yn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){F.__e(n,r)}}function so(e,t,r){var n,a;if(F.unmount&&F.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Yn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){F.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&&so(n[a],t,r||typeof e.type!="function");r||e.__e==null||Xi(e.__e),e.__=e.__e=e.__d=void 0}function Ku(e,t,r){return this.constructor(e,r)}function Tt(e,t,r){var n,a,i,o;F.__&&F.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],o=[],Gn(t,e=(!n&&r||t).__k=Oe(ie,null,[e]),a||Kt,Kt,t.ownerSVGElement!==void 0,!n&&r?[r]:a?null:t.firstChild?dr.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,o),oo(i,e,o)}function lo(e,t){Tt(e,t,lo)}function Gu(e,t,r){var n,a,i,o,s=nt({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?dr.call(arguments,2):r),fr(e.type,s,n||e.key,a||e.ref,null)}function co(e,t){var r={__c:t="__cC"+Ji++,__:e,Consumer:function(n,a){return n.children(a)},Provider:function(n){var a,i;return this.getChildContext||(a=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&a.some(function(s){s.__e=!0,Kn(s)})},this.sub=function(o){a.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){a.splice(a.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}dr=Zi.slice,F={__e:function(e,t,r,n){for(var a,i,o;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),o=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),o=a.__d),o)return a.__E=a}catch(s){e=s}throw e}},Wi=0,Ki=function(e){return e!=null&&e.constructor===void 0},Be.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=nt({},this.state),typeof e=="function"&&(e=e(nt({},r),this.props)),e&&nt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Kn(this))},Be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Kn(this))},Be.prototype.render=ie,It=[],Yi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wn=function(e,t){return e.__v.__b-t.__v.__b},Gr.__r=0,Ji=0;var gt,ee,Jn,uo,Gt=0,fo=[],Jr=[],po=F.__b,ho=F.__r,bo=F.diffed,go=F.__c,mo=F.unmount;function Yt(e,t){F.__h&&F.__h(ee,e,Gt||t),Gt=0;var r=ee.__H||(ee.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Jr}),r.__[e]}function ze(e){return Gt=1,vo(_o,e)}function vo(e,t,r){var n=Yt(gt++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):_o(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=ee,!ee.u)){var a=function(s,l,c){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(b){return b.__c});if(f.every(function(b){return!b.__N}))return!i||i.call(this,s,l,c);var u=!1;return f.forEach(function(b){if(b.__N){var p=b.__[0];b.__=b.__N,b.__N=void 0,p!==b.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!i||i.call(this,s,l,c))};ee.u=!0;var i=ee.shouldComponentUpdate,o=ee.componentWillUpdate;ee.componentWillUpdate=function(s,l,c){if(this.__e){var f=i;i=void 0,a(s,l,c),i=f}o&&o.call(this,s,l,c)},ee.shouldComponentUpdate=a}return n.__N||n.__}function Dt(e,t){var r=Yt(gt++,3);!F.__s&&Xn(r.__H,t)&&(r.__=e,r.i=t,ee.__H.__h.push(r))}function Te(e,t){var r=Yt(gt++,4);!F.__s&&Xn(r.__H,t)&&(r.__=e,r.i=t,ee.__h.push(r))}function he(e){return Gt=5,mt(function(){return{current:e}},[])}function Yu(e,t,r){Gt=6,Te(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function mt(e,t){var r=Yt(gt++,7);return Xn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Ju(e,t){return Gt=8,mt(function(){return e},t)}function wo(e){var t=ee.context[e.__c],r=Yt(gt++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(ee)),t.props.value):e.__}function Zu(e,t){F.useDebugValue&&F.useDebugValue(t?t(e):e)}function Xu(){var e=Yt(gt++,11);if(!e.__){for(var t=ee.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Qu(){for(var e;e=fo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Zr),e.__H.__h.forEach(Zn),e.__H.__h=[]}catch(t){e.__H.__h=[],F.__e(t,e.__v)}}F.__b=function(e){ee=null,po&&po(e)},F.__r=function(e){ho&&ho(e),gt=0;var t=(ee=e.__c).__H;t&&(Jn===ee?(t.__h=[],ee.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Jr,r.__N=r.i=void 0})):(t.__h.forEach(Zr),t.__h.forEach(Zn),t.__h=[],gt=0)),Jn=ee},F.diffed=function(e){bo&&bo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fo.push(t)!==1&&uo===F.requestAnimationFrame||((uo=F.requestAnimationFrame)||ed)(Qu)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Jr&&(r.__=r.__V),r.i=void 0,r.__V=Jr})),Jn=ee=null},F.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Zr),r.__h=r.__h.filter(function(n){return!n.__||Zn(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],F.__e(n,r.__v)}}),go&&go(e,t)},F.unmount=function(e){mo&&mo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Zr(n)}catch(a){t=a}}),r.__H=void 0,t&&F.__e(t,r.__v))};var yo=typeof requestAnimationFrame=="function";function ed(e){var t,r=function(){clearTimeout(n),yo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);yo&&(t=requestAnimationFrame(r))}function Zr(e){var t=ee,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),ee=t}function Zn(e){var t=ee;e.__c=e.__(),ee=t}function Xn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function _o(e,t){return typeof t=="function"?t(e):t}var td=Symbol.for("preact-signals");function Qn(){if(Jt>1)Jt--;else{for(var e,t=!1;pr!==void 0;){var r=pr;for(pr=void 0,ea++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ko(r))try{r.c()}catch(a){t||(e=a,t=!0)}r=n}}if(ea=0,Jt--,t)throw e}}var Z=void 0,pr=void 0,Jt=0,ea=0,Xr=0;function xo(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function ge(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ge.prototype.brand=td,ge.prototype.h=function(){return!0},ge.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)},ge.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ge.prototype.subscribe=function(e){var t=this;return ra(function(){var r=t.value,n=Z;Z=void 0;try{e(r)}finally{Z=n}})},ge.prototype.valueOf=function(){return this.value},ge.prototype.toString=function(){return this.value+""},ge.prototype.toJSON=function(){return this.value},ge.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(ge.prototype,"value",{get:function(){var e=xo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ea>100)throw new Error("Cycle detected");this.v=e,this.i++,Xr++,Jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Qn()}}}});function Le(e){return new ge(e)}function ko(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 So(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Co(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Zt(e){ge.call(this,void 0),this.x=e,this.s=void 0,this.g=Xr-1,this.f=4}(Zt.prototype=new ge).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Xr))return!0;if(this.g=Xr,this.f|=1,this.i>0&&!ko(this))return this.f&=-2,!0;var e=Z;try{So(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Z=e,Co(this),this.f&=-2,!0},Zt.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)}ge.prototype.S.call(this,e)},Zt.prototype.U=function(e){if(this.t!==void 0&&(ge.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)}},Zt.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(Zt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=xo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function rd(e){return new Zt(e)}function Eo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Jt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,ta(e),n}finally{Z=r,Qn()}}}function ta(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Eo(e)}function nd(e){if(Z!==this)throw new Error("Out-of-order effect");Co(this),Z=e,this.f&=-2,8&this.f&&ta(this),Qn()}function hr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}hr.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()}},hr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Eo(this),So(this),Jt++;var e=Z;return Z=this,nd.bind(this,e)},hr.prototype.N=function(){2&this.f||(this.f|=2,this.o=pr,pr=this)},hr.prototype.d=function(){this.f|=8,1&this.f||ta(this)};function ra(e){var t=new hr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var na;function Xt(e,t){F[e]=t.bind(null,F[e]||function(){})}function Qr(e){na&&na(),na=e&&e.S()}function $o(e){var t=this,r=e.data,n=id(r);n.value=r;var a=mt(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Ki(a.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=a.peek():(t.__$f|=1,t.setState({}))},rd(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return a.value}$o.displayName="_st",Object.defineProperties(ge.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:$o},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Xt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var a in n)if(a!=="children"){var i=n[a];i instanceof ge&&(r||(t.__np=r={}),r[a]=i,n[a]=i.peek())}}e(t)}),Xt("__r",function(e,t){Qr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(a){var i;return ra(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),Qr(r),e(t)}),Xt("__e",function(e,t,r,n){Qr(),e(t,r,n)}),Xt("diffed",function(e,t){Qr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,a=t.props;if(n){var i=r.U;if(i)for(var o in i){var s=i[o];s!==void 0&&!(o in n)&&(s.d(),i[o]=void 0)}else r.U=i={};for(var l in n){var c=i[l],f=n[l];c===void 0?(c=ad(r,l,f,a),i[l]=c):c.o(f,a)}}}e(t)});function ad(e,t,r,n){var a=t in e&&e.ownerSVGElement===void 0,i=Le(r);return{o:function(o,s){i.value=o,n=s},d:ra(function(){var o=i.value.value;n[t]!==o&&(n[t]=o,a?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Xt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var a in n){var i=n[a];i&&i.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Xt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Be.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function id(e){return mt(function(){return Le(e)},[])}const xe=Symbol.for("@ts-pattern/matcher"),Ao=Symbol.for("@ts-pattern/isVariadic"),en="@ts-pattern/anonymous-select-key",aa=e=>!!(e&&typeof e=="object"),tn=e=>e&&!!e[xe],se=(e,t,r)=>{if(tn(e)){const n=e[xe](),{matched:a,selections:i}=n.match(t);return a&&i&&Object.keys(i).forEach(o=>r(o,i[o])),a}if(aa(e)){if(!aa(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],a=[],i=[];for(const o of e.keys()){const s=e[o];tn(s)&&s[Ao]?i.push(s):i.length?a.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+a.length)return!1;const o=t.slice(0,n.length),s=a.length===0?[]:t.slice(-a.length),l=t.slice(n.length,a.length===0?1/0:-a.length);return n.every((c,f)=>se(c,o[f],r))&&a.every((c,f)=>se(c,s[f],r))&&(i.length===0||se(i[0],l,r))}return e.length===t.length&&e.every((o,s)=>se(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const a=e[n];return(n in t||tn(i=a)&&i[xe]().matcherType==="optional")&&se(a,t[n],r);var i})}return Object.is(t,e)},ke=e=>{var t,r,n;return aa(e)?tn(e)?(t=(r=(n=e[xe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?br(e,ke):br(Object.values(e),ke):[]},br=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Io(...e){if(e.length===1){const[t]=e;return r=>se(t,r,()=>{})}if(e.length===2){const[t,r]=e;return se(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ue(e){return Object.assign(e,{optional:()=>oa(e),and:t=>te(e,t),or:t=>To(e,t),select:t=>t===void 0?gr(e):gr(t,e)})}function ia(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[Ao]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var a;return(a=n[r++])!=null?a:n.at(-1)}}}}))(e),{optional:()=>ia(oa(e)),select:t=>ia(t===void 0?gr(e):gr(t,e))})}function oa(e){return ue({[xe]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return t===void 0?(ke(e).forEach(a=>n(a,void 0)),{matched:!0,selections:r}):{matched:se(e,t,n),selections:r}},getSelectionKeys:()=>ke(e),matcherType:"optional"})})}const od=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},sd=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},ld=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function te(...e){return ue({[xe]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return{matched:e.every(a=>se(a,t,n)),selections:r}},getSelectionKeys:()=>br(e,ke),matcherType:"and"})})}function To(...e){return ue({[xe]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return br(e,ke).forEach(a=>n(a,void 0)),{matched:e.some(a=>se(a,t,n)),selections:r}},getSelectionKeys:()=>br(e,ke),matcherType:"or"})})}function H(e){return{[xe]:()=>({match:t=>({matched:!!e(t)})})}}function gr(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ue({[xe]:()=>({match:n=>{let a={[t??en]:n};return{matched:r===void 0||se(r,n,(i,o)=>{a[i]=o}),selections:a}},getSelectionKeys:()=>[t??en].concat(r===void 0?[]:ke(r))})})}function Do(e){return!0}function We(e){return typeof e=="number"}function vt(e){return typeof e=="string"}function wt(e){return typeof e=="bigint"}const jo=ue(H(Do)),cd=ue(H(Do)),ud=jo,yt=e=>Object.assign(ue(e),{startsWith:t=>{return yt(te(e,(r=t,H(n=>vt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return yt(te(e,(r=t,H(n=>vt(n)&&n.endsWith(r)))));var r},minLength:t=>yt(te(e,(r=>H(n=>vt(n)&&n.length>=r))(t))),length:t=>yt(te(e,(r=>H(n=>vt(n)&&n.length===r))(t))),maxLength:t=>yt(te(e,(r=>H(n=>vt(n)&&n.length<=r))(t))),includes:t=>{return yt(te(e,(r=t,H(n=>vt(n)&&n.includes(r)))));var r},regex:t=>{return yt(te(e,(r=t,H(n=>vt(n)&&!!n.match(r)))));var r}}),Mo=yt(H(vt)),Ke=e=>Object.assign(ue(e),{between:(t,r)=>Ke(te(e,((n,a)=>H(i=>We(i)&&n<=i&&a>=i))(t,r))),lt:t=>Ke(te(e,(r=>H(n=>We(n)&&n<r))(t))),gt:t=>Ke(te(e,(r=>H(n=>We(n)&&n>r))(t))),lte:t=>Ke(te(e,(r=>H(n=>We(n)&&n<=r))(t))),gte:t=>Ke(te(e,(r=>H(n=>We(n)&&n>=r))(t))),int:()=>Ke(te(e,H(t=>We(t)&&Number.isInteger(t)))),finite:()=>Ke(te(e,H(t=>We(t)&&Number.isFinite(t)))),positive:()=>Ke(te(e,H(t=>We(t)&&t>0))),negative:()=>Ke(te(e,H(t=>We(t)&&t<0)))}),dd=Ke(H(We)),_t=e=>Object.assign(ue(e),{between:(t,r)=>_t(te(e,((n,a)=>H(i=>wt(i)&&n<=i&&a>=i))(t,r))),lt:t=>_t(te(e,(r=>H(n=>wt(n)&&n<r))(t))),gt:t=>_t(te(e,(r=>H(n=>wt(n)&&n>r))(t))),lte:t=>_t(te(e,(r=>H(n=>wt(n)&&n<=r))(t))),gte:t=>_t(te(e,(r=>H(n=>wt(n)&&n>=r))(t))),positive:()=>_t(te(e,H(t=>wt(t)&&t>0))),negative:()=>_t(te(e,H(t=>wt(t)&&t<0)))}),fd=_t(H(wt)),pd=ue(H(function(e){return typeof e=="boolean"})),hd=ue(H(function(e){return typeof e=="symbol"})),bd=ue(H(function(e){return e==null})),gd=ue(H(function(e){return e!=null}));var jt={__proto__:null,matcher:xe,optional:oa,array:function(...e){return ia({[xe]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return ke(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const a=(i,o)=>{n[i]=(n[i]||[]).concat([o])};return{matched:t.every(i=>se(r,i,a)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ke(e[0])})})},set:function(...e){return ue({[xe]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,o)=>{r[i]=(r[i]||[]).concat([o])},a=e[0];return{matched:od(t,i=>se(a,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ke(e[0])})})},map:function(...e){return ue({[xe]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var a;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=e[0])==null?void 0:a.toString()}`);const[i,o]=e;return{matched:sd(t,(s,l)=>{const c=se(i,l,n),f=se(o,s,n);return c&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ke(e[0]),...ke(e[1])]})})},record:function(...e){return ue({[xe]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const a=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[i,o]=e.length===1?[Mo,e[0]]:e;return{matched:ld(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=c!==null&&se(i,c,a),u=se(i,s,a),b=se(o,l,a);return(u||f)&&b}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...ke(e[0]),...ke(e[1])]})})},intersection:te,union:To,not:function(e){return ue({[xe]:()=>({match:t=>({matched:!se(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:H,select:gr,any:jo,unknown:cd,_:ud,string:Mo,number:dd,bigint:fd,boolean:pd,symbol:hd,nullish:bd,nonNullable:gd,instanceOf:function(e){return ue(H((function(t){return r=>r instanceof t})(e)))},shape:function(e){return ue(H(Io(e)))}};let md=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}};const sa={matched:!1,value:void 0};function rn(e){return new vd(e,sa)}let vd=class oi{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let a;t.length===3&&typeof t[1]=="function"?a=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,o={};const s=(c,f)=>{i=!0,o[c]=f},l=!n.some(c=>se(c,this.input,s))||a&&!a(this.input)?sa:{matched:!0,value:r(i?en in o?o[en]:o:this.input,this.input)};return new oi(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new oi(this.input,n?{matched:!0,value:r(this.input,this.input)}:sa)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=wd){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function wd(e){throw new md(e)}var yd=0;function d(e,t,r,n,a,i){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--yd,__source:a,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return F.vnode&&F.vnode(c),c}function Oo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Oo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Oo(e))&&(n&&(n+=" "),n+=t);return n}const Lo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fo=it,Mt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Fo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(c=>{const f=r==null?void 0:r[c],u=i==null?void 0:i[c];if(f===null)return null;const b=Lo(f)||Lo(u);return a[c][b]}),s=r&&Object.entries(r).reduce((c,f)=>{let[u,b]=f;return b===void 0||(c[u]=b),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:u,className:b,...p}=f;return Object.entries(p).every(g=>{let[v,x]=g;return Array.isArray(x)?x.includes({...i,...s}[v]):{...i,...s}[v]===x})?[...c,u,b]:c},[]);return Fo(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function No(e,t){for(var r in t)e[r]=t[r];return e}function la(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function ca(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ua(e){this.props=e}function _d(e,t){function r(a){var i=this.props.ref,o=i==a.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,a)||!o:la(this.props,a)}function n(a){return this.shouldComponentUpdate=r,Oe(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ua.prototype=new Be).isPureReactComponent=!0,ua.prototype.shouldComponentUpdate=function(e,t){return la(this.props,e)||la(this.state,t)};var Ro=F.__b;F.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ro&&Ro(e)};var xd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function da(e){function t(r){var n=No({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=xd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Po=function(e,t){return e==null?null:at(at(e).map(t))},kd={map:Po,forEach:Po,count:function(e){return e?at(e).length:0},only:function(e){var t=at(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:at},Sd=F.__e;F.__e=function(e,t,r,n){if(e.then){for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),a.__c(e,t)}Sd(e,t,r,n)};var Vo=F.unmount;function Bo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=No({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Bo(n,t,r)})),e}function zo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return zo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function mr(){this.__u=0,this.t=null,this.__b=null}function Uo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function qo(e){var t,r,n;function a(i){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return Oe(r,i)}return a.displayName="Lazy",a.__f=!0,a}function vr(){this.u=null,this.o=null}F.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Vo&&Vo(e)},(mr.prototype=new Be).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var a=Uo(n.__v),i=!1,o=function(){i||(i=!0,r.__R=null,a?a(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=zo(c,c.__c.__P,c.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},mr.prototype.componentWillUnmount=function(){this.t=[]},mr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Bo(this.__b,r,n.__O=n.__P)}this.__b=null}var a=t.__a&&Oe(ie,null,e.fallback);return a&&(a.__h=null),[Oe(ie,null,t.__a?null:e.children),a]};var Ho=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Cd(e){return this.getChildContext=function(){return e.context},e.children}function Ed(e){var t=this,r=e.i;t.componentWillUnmount=function(){Tt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,a){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),Tt(Oe(Cd,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function $d(e,t){var r=Oe(Ed,{__v:e,i:t});return r.containerInfo=t,r}(vr.prototype=new Be).__a=function(e){var t=this,r=Uo(t.__v),n=t.o.get(e);return n[0]++,function(a){var i=function(){t.props.revealOrder?(n.push(a),Ho(t,e,n)):a()};r?r(i):i()}},vr.prototype.render=function(e){this.u=null,this.o=new Map;var t=at(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},vr.prototype.componentDidUpdate=vr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ho(e,r,t)})};var Wo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ad=/^(?: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]/,Id=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Td=/[A-Z0-9]/g,Dd=typeof document<"u",jd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Md(e,t,r){return t.__k==null&&(t.textContent=""),Tt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Od(e,t,r){return lo(e,t),typeof r=="function"&&r(),e?e.__c:null}Be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ko=F.event;function Ld(){}function Fd(){return this.cancelBubble}function Nd(){return this.defaultPrevented}F.event=function(e){return Ko&&(e=Ko(e)),e.persist=Ld,e.isPropagationStopped=Fd,e.isDefaultPrevented=Nd,e.nativeEvent=e};var fa,Rd={enumerable:!1,configurable:!0,get:function(){return this.class}},Go=F.vnode;F.vnode=function(e){typeof e.type=="string"&&(function(t){var r=t.props,n=t.type,a={};for(var i in r){var o=r[i];if(!(i==="value"&&"defaultValue"in r&&o==null||Dd&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||jd(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Id.test(i)?i=s:n.indexOf("-")===-1&&Ad.test(i)?i=i.replace(Td,"-$&").toLowerCase():o===null&&(o=void 0):s=i="oninput",s==="oninput"&&a[i=s]&&(i="oninputCapture"),a[i]=o}}n=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.value.indexOf(l.props.value)!=-1})),n=="select"&&a.defaultValue!=null&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.multiple?a.defaultValue.indexOf(l.props.value)!=-1:a.defaultValue==l.props.value})),r.class&&!r.className?(a.class=r.class,Object.defineProperty(a,"className",Rd)):(r.className&&!r.class||r.class&&r.className)&&(a.class=a.className=r.className),t.props=a})(e),e.$$typeof=Wo,Go&&Go(e)};var Yo=F.__r;F.__r=function(e){Yo&&Yo(e),fa=e.__c};var Jo=F.diffed;F.diffed=function(e){Jo&&Jo(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),fa=null};var Pd={ReactCurrentDispatcher:{current:{readContext:function(e){return fa.__n[e.__c].props.value}}}};function Vd(e){return Oe.bind(null,e)}function Zo(e){return!!e&&e.$$typeof===Wo}function Bd(e){return Zo(e)?Gu.apply(null,arguments):e}function zd(e){return!!e.__k&&(Tt(null,e),!0)}function Ud(e){return e&&(e.base||e.nodeType===1&&e)||null}var qd=function(e,t){return e(t)},Hd=function(e,t){return e(t)},Wd=ie;function Xo(e){e()}function Kd(e){return e}function Gd(){return[!1,Xo]}var Yd=Te;function Jd(e,t){var r=t(),n=ze({h:{__:r,v:t}}),a=n[0].h,i=n[1];return Te(function(){a.__=r,a.v=t,ca(a.__,t())||i({h:a})},[e,r,t]),Dt(function(){return ca(a.__,a.v())||i({h:a}),e(function(){ca(a.__,a.v())||i({h:a})})},[e]),r}var Se={useState:ze,useId:Xu,useReducer:vo,useEffect:Dt,useLayoutEffect:Te,useInsertionEffect:Yd,useTransition:Gd,useDeferredValue:Kd,useSyncExternalStore:Jd,startTransition:Xo,useRef:he,useImperativeHandle:Yu,useMemo:mt,useCallback:Ju,useContext:wo,useDebugValue:Zu,version:"17.0.2",Children:kd,render:Md,hydrate:Od,unmountComponentAtNode:zd,createPortal:$d,createElement:Oe,createContext:co,createFactory:Vd,cloneElement:Bd,createRef:Uu,Fragment:ie,isValidElement:Zo,findDOMNode:Ud,Component:Be,PureComponent:ua,memo:_d,forwardRef:da,flushSync:Hd,unstable_batchedUpdates:qd,StrictMode:Wd,Suspense:mr,SuspenseList:vr,lazy:qo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Pd},Zd=["other","few","many","two","one","zero"],Qo=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function a(i,o){const s=(t==null?void 0:t[i])??e[i];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,c)=>{var f;return((f=o==null?void 0:o[c])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${i.toString()}”`);let l=n.select(o.count);if(!(l in s)){const c=Zd.find(f=>f in s);if(!c)throw new Error(`Missing plural rule for translation key “${i.toString()}”`);l=c}return s[l].replace(/{{(\w+)}}/g,(c,f)=>{var u;return((u=o==null?void 0:o[f])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${i.toString()}”.`)}}return a},es=co(null),ts=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const a=mt(()=>Qo({locale:n,terms:e,overrides:t}),[t,n]);return d(es.Provider,{value:{t:a,locale:n},children:r})},useTranslation:()=>{const t=wo(es);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>Qo({terms:e,overrides:t,locale:r})}),Xd={conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"Sorry, this role closed while you were applying.",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"},{defaultTerms:Qd}=ts({submission_redirect_message:"One last step: finish your application on the employer's site.",complete_submission:"Continue on the employer's site",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:ef,useTranslation:oe,createTFunction:tf}=ts({...Qd,...Xd,error_heading:"Something unexpected happened",flow_closed:"This role is no longer accepting applications.",undo:"Change answer",job_alerts_offer:"Want to hear about similar roles? We can email you at {{email}} when new ones open.",job_alerts_accept:"Get job alerts",job_alerts_decline:"No thanks",job_alerts_privacy:"We'll use your email only for these alerts. You can unsubscribe at any time.",job_alerts_privacy_sender:"{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.",job_alerts_success:"Done. We'll email you about similar roles.",job_alerts_error:"Sorry, we couldn't set that up. Please try again later.",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"}});function ot(e,t){if(!e)throw new Error(t)}var wr=/\b(?:GIR\s*0AA|[a-z]{1,2}\d[\da-z]?\s*\d[a-z]{2}|[a-z](?:\d{2}|\d[a-z])\s*[\da-z]{4})\b/i,rs=/^(?:GIR0AA|[A-Z]{1,2}\d[\dA-Z]?\d[A-Z]{2})$/,ns=/^[A-Z](?:\d{2}|\d[A-Z])[\dA-Z]{4}$/,as=({postcode:e,label:t="",state:r,country:n})=>{var s,l,c;const a=((e==null?void 0:e.trim())||((s=t.match(wr))==null?void 0:s[0])||"").replace(/\s/g,"").toUpperCase();if(rs.test(a))return a.startsWith("BT")?"ni":"gb";if(ns.test(a))return"ie";const i=f=>f.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim();if(i(r??"")==="northern ireland"||t.split(",").some(f=>i(f)==="northern ireland"))return"ni";const o=(c=(n==null?void 0:n.trim())||((l=t.split(",").at(-1))==null?void 0:l.trim()))==null?void 0:c.toLowerCase();return o==="united kingdom"||o==="gb"?"gb":o==="ireland"||o==="ie"?"ie":null},rf="https://maps.inploi.com/address",nf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim(),is=e=>e.split(",").map(t=>nf(t).replace(/^\d+[a-z]?(?:\s*[-/]\s*\d+[a-z]?)?(?:\s+|$)/,"").trim()),os=e=>rs.test(e)?`gb:${e.slice(0,-3)}`:ns.test(e)?`ie:${e.slice(0,3)}`:null,af=(e,t,r)=>{const[n="",a=""]=is(e),i=os(t),o=a.replace(wr,"").trim(),s=o&&!["united kingdom","ireland","england","scotland","wales","northern ireland"].includes(o);if(!n||!i&&!s)return null;const l=r.slice(0,3).findIndex(c=>{var p;const f=is(c);if(!f.includes(n))return!1;const u=((p=c.match(wr))==null?void 0:p[0].replace(/\s/g,"").toUpperCase())??"",b=os(u);return i&&b?i===b:!!(s&&f.some(g=>g.replace(wr,"").trim()===o))});return l===-1?null:l+1},of=async({query:e,country:t,pickedLabel:r,pickedPostcode:n,pickedCountry:a,pickedState:i,log:o})=>{var l,c,f;if(!t||!t.split(",").every(u=>/^(gb|ie)$/i.test(u.trim())))return;let s;try{const u=new AbortController;s=setTimeout(()=>u.abort(),1500);const b=new URL(rf);b.search=new URLSearchParams({q:e,country:t,limit:"5"}).toString();const p=await fetch(b.href,{signal:u.signal});if(!p.ok)return;const g=await p.json();if(typeof g!="object"||g===null||!("results"in g)||!Array.isArray(g.results)||!("source"in g)||g.source!=="photon"&&g.source!=="mapbox")return;const v=g.results,x=[];for(const A of v){if(typeof A!="object"||A===null||!("label"in A)||typeof A.label!="string")return;x.push(A.label)}const C=((n==null?void 0:n.trim())||((l=r.match(wr))==null?void 0:l[0])||"").replace(/\s/g,"").toUpperCase(),_=af(r,C,x),M=(f=(c=p.headers.get("Server-Timing"))==null?void 0:c.match(/(?:^|,)\s*lookup\s*;\s*dur=([\d.]+)/))==null?void 0:f[1],j=M===void 0?null:Number(M),D=p.headers.get("X-Geo-Fallback"),z=as({postcode:n,label:r,state:i,country:a});await o({hit:_!==null,rank:_,results:x.length,source:g.source,fallback:D&&/^[a-z0-9_-]{1,64}$/i.test(D)?D:null,ms:j!==null&&Number.isFinite(j)?j:null,region:z})}catch{}finally{clearTimeout(s)}},sf="https://maps.inploi.com",lf=async(e,t,r=Date.now()+2500)=>{t==null||t.throwIfAborted();const n=new AbortController,a=()=>n.abort(t==null?void 0:t.reason);t==null||t.addEventListener("abort",a,{once:!0});let i;try{const o=new Promise((l,c)=>{n.signal.addEventListener("abort",()=>c(n.signal.reason),{once:!0}),i=setTimeout(()=>n.abort(),Math.max(0,r-Date.now()))}),s=await Promise.race([e(n.signal),o]);return t==null||t.throwIfAborted(),s}catch{t==null||t.throwIfAborted();return}finally{clearTimeout(i),t==null||t.removeEventListener("abort",a)}},cf=async(e,t,r)=>await lf(async a=>{const{lookupAddress:i}=await Promise.resolve().then(()=>up);return a.throwIfAborted(),i({...e,signal:a})},e.signal,r)??{results:await t(),arm:"direct",source:"direct"},uf=e=>{try{const t=new URL("/outcome",sf);t.search=new URLSearchParams({kind:e.kind,surface:e.surface,arm:e.arm,picked:e.picked?"1":"0"}).toString(),t.searchParams.set("source",e.source),e.picked&&e.edited!==void 0&&t.searchParams.set("edited",e.edited?"1":"0"),e.region&&t.searchParams.set("region",e.region),fetch(t.href,{keepalive:!0}).catch(()=>{})}catch{}},pa=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(pa):Object.keys(e).sort().reduce((t,r)=>(t[r]=pa(e[r]),t),{}),df=e=>{let t=JSON.stringify(pa(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const ha=(e,t)=>t.some(r=>e instanceof r);let ss,ls;function ff(){return ss||(ss=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function pf(){return ls||(ls=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ba=new WeakMap,ga=new WeakMap,nn=new WeakMap;function hf(e){const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{r(Ot(e.result)),a()},o=()=>{n(e.error),a()};e.addEventListener("success",i),e.addEventListener("error",o)});return nn.set(t,e),t}function bf(e){if(ba.has(e))return;const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{r(),a()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),a()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});ba.set(e,t)}let ma={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return ba.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ot(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function cs(e){ma=e(ma)}function gf(e){return pf().includes(e)?function(...t){return e.apply(va(this),t),Ot(this.request)}:function(...t){return Ot(e.apply(va(this),t))}}function mf(e){return typeof e=="function"?gf(e):(e instanceof IDBTransaction&&bf(e),ha(e,ff())?new Proxy(e,ma):e)}function Ot(e){if(e instanceof IDBRequest)return hf(e);if(ga.has(e))return ga.get(e);const t=mf(e);return t!==e&&(ga.set(e,t),nn.set(t,e)),t}const va=e=>nn.get(e);function vf(e,t,{blocked:r,upgrade:n,blocking:a,terminated:i}={}){const o=indexedDB.open(e,t),s=Ot(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ot(o.result),l.oldVersion,l.newVersion,Ot(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),a&&l.addEventListener("versionchange",c=>a(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const wf=["get","getKey","getAll","getAllKeys","count"],yf=["put","add","delete","clear"],wa=new Map;function us(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(wa.get(t))return wa.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,a=yf.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(a||wf.includes(r)))return;const i=async function(o,...s){const l=this.transaction(o,a?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),a&&l.done]))[0]};return wa.set(t,i),i}cs(e=>({...e,get:(t,r,n)=>us(t,r)||e.get(t,r,n),has:(t,r)=>!!us(t,r)||e.has(t,r)}));const _f=["continue","continuePrimaryKey","advance"],ds={},ya=new WeakMap,fs=new WeakMap,xf={get(e,t){if(!_f.includes(t))return e[t];let r=ds[t];return r||(r=ds[t]=function(...n){ya.set(this,fs.get(this)[t](...n))}),r}};async function*kf(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,xf);for(fs.set(r,t),nn.set(r,va(t));t;)yield r,t=await(ya.get(r)||t.continue()),ya.delete(r)}function ps(e,t){return t===Symbol.asyncIterator&&ha(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ha(e,[IDBIndex,IDBObjectStore])}cs(e=>({...e,get(t,r,n){return ps(t,r)?kf:e.get(t,r,n)},has(t,r){return ps(t,r)||e.has(t,r)}}));const yr=typeof indexedDB>"u"?void 0:vf("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Sf=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let an,_a,_r;const hs=()=>{if(!an)return _r;const e=an;an=void 0;const t=sn(e),r=yr==null?void 0:yr.then(n=>n.put("state",Sf(e.data),t)).finally(()=>{_r===r&&(_r=void 0)});return _r=r,_r},Fe={getStateData:async(e,t,r)=>{var a;const n=sn({...e,flowKeys:t,context:r});return(a=await yr)==null?void 0:a.get("state",n)},getAllStateData:async()=>{var e;return((e=await yr)==null?void 0:e.getAll("state"))??[]},setStateData:e=>{an=e,clearTimeout(_a),_a=setTimeout(()=>void hs(),1e3)},flushStateData:()=>(clearTimeout(_a),hs()??Promise.resolve())},Qt=e=>t=>t?t.type===e:!1,Cf=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),bs=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Cf()}),Ef=e=>rn(e).with({nativeEvent:{submitter:jt.select(jt.union(jt.instanceOf(HTMLButtonElement),jt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),on=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const a=e.find(c=>c.id===t.nextId);if(a===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,o=e.find(c=>c.id===i),s=t.type.includes("question")?1:0;if(o){const c=s+Math.max(on(e,a,r,n+s).remainingSteps,on(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}}const l=s+on(e,a,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},$f=e=>{const t={},r=e.find(n=>n.isHead);return r&&on(e,r,(n,a)=>{t[n]=a}),t},sn=e=>[...e.flowKeys,e.id,e.version,e.build,df(e.hostContext??e.context)].join("/"),Af=({data:e,nodes:t})=>{const r=e.startedWriteNodeIds===void 0?t.some(n=>n.type==="integration-application-submit"&&e.nodeHistory.includes(n.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!r&&wi(t,e.submissions)},gs=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||wi(t,e.submissions))},Ge=Le({state:"idle"}),xa=new Set,Lt=e=>{const{state:t,flow:r}=Ge.value;if(t!=="loaded")return;ot(r,"No flow to update");const n=e(r.data);r.data=n,Ge.value={state:t,flow:r},Fe.setStateData(r)},P={current$:Ge,viewState$:Le("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:a,title:i,analytics:o,job:s,employer:l,locationOrigin:c})=>{await Fe.flushStateData().catch(()=>{});const f=await Fe.getStateData(t,a,r),u=f??bs(),b=sn({...t,flowKeys:a,context:r}),p=f!==void 0&&!xa.has(b)&&Af({data:u,nodes:t.nodes});return p||xa.add(b),{jobAlerts:e,data:u,offerResume:p,startedAt:new Date,nodeIdToProgress:$f(t.nodes),flowKeys:a,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:n===void 0?r:Ln(n,r),hostContext:n===void 0?void 0:r,title:i,analytics:o,job:s,employer:l,locationOrigin:c}},commitFlow:e=>{Ge.value={state:"loaded",flow:e},Fe.setStateData(e)},settleResume:e=>{e.offerResume=!1,xa.add(sn(e))},cancelCurrentFlow:()=>{Ge.value={state:"idle"},P.viewState$.value="closed"},markAsFinished:()=>Lt(e=>({...e,isFinished:!0})),markAsInteracted:()=>Lt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Lt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{Lt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Fe.flushStateData()},restart:()=>{const{state:e,flow:t}=Ge.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r={...bs(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},n={...t,data:r,startedAt:new Date,offerResume:!1};Ge.value={state:e,flow:n},Fe.setStateData(n)},addMessage:(e,t)=>{const r={...e,groupId:t};return Lt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ge.value;ot(t==="loaded","Application not loaded");const n=r.data.messages.filter(a=>!a.groupId||!e.includes(a.groupId));r.data.messages=n,Fe.setStateData(r)},setSubmission:(e,t)=>Lt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Lt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Ge.peek().flow===e&&(Ge.value={state:"loaded",flow:e}),Fe.setStateData(e),await Fe.flushStateData()}},ms=({heading:e})=>{const{t}=oe();return d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:d("p",{class:"text-error-11 font-bold",children:t(e)})})]})},ln=e=>{const{t}=oe();return d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:t("loading")}),d("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},vs=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(ln,{class:"text-neutral-6 h-8 w-8"})}),If=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Tf=Mt("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"}}),xr=({class:e,children:t,variant:r,...n})=>d("button",{class:it(Tf({variant:r}),e),...n,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),ws=()=>d("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Df=()=>{if(P.current$.value.state!=="loaded")return null;const e=P.current$.value.flow.nodeIdToProgress,t=P.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:If(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},jf=({children:e,params:t,analytics:r,feedbackReady:n})=>{const{t:a}=oe(),i=P.viewState$,o=!!t.feedback&&P.current$.value.state==="loaded"&&i.value==="maximised",s=o&&n.value,l=he(!1);return Dt(()=>{var c,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(c=P.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:f.customProperties}))},[s,r]),d(ie,{children:d("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[d("div",{class:"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:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{"aria-label":a("minimize"),onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ka,children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?d("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:it({hidden:!o}),children:d("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,P.current$.value.state==="loaded"&&d(xr,{class:"mx-1","aria-label":a("restart"),onClick:()=>{P.restart()},children:[d("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(xr,{class:"view-switch mx-1",onTouchStart:ka,"aria-label":a("minimize"),onClick:()=>i.value="minimised",children:d(ws,{})},"minmax")]})]}),d(Df,{})]})})};function ka(){}const Mf=qo(()=>Promise.resolve().then(()=>rg).then(e=>e.ChatbotBody)),ys=Mt("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"}}}),_s=Mt("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"}}}),Of=({open:e,...t})=>{const r=he(null);return Te(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),d("dialog",{ref:r,...t})},Lf=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:a,talentBankClient:i,params:o,feedbackReady:s})=>{const{state:l,flow:c}=P.current$.value,f=P.viewState$.value,u=l!=="idle"&&f==="maximised",b=he(null),p=c?[...c.data.nodeHistory].reverse().map(g=>c.nodes.find(v=>v.id===g)).find(g=>(g==null?void 0:g.type)==="flow-section"):void 0;return d(ef,{terms:o.terms,locale:void 0,children:[d(Of,{open:u,onClose:()=>P.viewState$.value="minimised",children:d("div",{ref:b,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:ys({view:"maximised"}),children:d("div",{class:_s({view:"maximised"}),children:[d(jf,{params:o,analytics:a,feedbackReady:s,children:p?d(ie,{children:[d("span",{class:"block",children:p.data.title}),d("span",{class:"block truncate text-xs font-normal",children:c==null?void 0:c.title})]}):c==null?void 0:c.title}),rn({state:l,view:f}).with({state:"idle"},()=>null).with({state:"loading"},()=>d(vs,{},"loading")).with({state:"loaded"},()=>d(mr,{fallback:d(vs,{},"loading"),children:d(Mf,{env:e,rpcClient:n,analytics:a,apiClient:r,logger:t,talentBankClient:i})})).with({state:"closed"},()=>d(ms,{heading:"flow_closed"})).with({state:"error"},()=>d(ms,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?d(Ff,{flow:c}):null]})},Ff=({flow:e})=>{const{t}=oe();return d("div",{class:ys({view:"minimised",class:"z-100 isolate"}),children:d("div",{class:_s({view:"minimised"}),children:[d("button",{onClick:()=>{P.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ka,children:d("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),d("div",{class:"flex items-center px-0.5",children:d(xr,{class:"mx-1","aria-label":t("close_application"),onClick:P.cancelCurrentFlow,variant:"white",children:d("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},xs="14.18.1",Nf=(e,t=xs)=>t===void 0?e:{fetch:(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=new Headers(n==null?void 0:n.headers);return a.set("x-inploi-widget-version",t),e.fetch(r,{...n,headers:Object.fromEntries(a.entries())})}};let kr,ks,cn;const Rf=e=>{const t=e.slice(0,e.lastIndexOf("/")+1);return/^https:\/\/[^/?#]+\/@inploi\/plugin-chatbot(?:@[\w.-]+)?\/cdn\/$/.test(t)?t:void 0},Ss=(e,t,r)=>{const n=tc(e,t??`
|
|
30
|
-
`,r);return{...n,stack:n.stack.filter(a=>a.startsWith("index.js:"))}},Sa=e=>Ss(e,cn),Cs=e=>typeof e=="object"&&e!==null&&"status"in e&&typeof e.status=="number"?e.status:void 0,er=(e,t,r={})=>kr==null?void 0:kr.send(e,t,{...r,message:"Chatbot widget beacon",widget:"chatbot",key_hash:ks}),Pf=e=>{const t=(r,n,a)=>{if(P.viewState$.value==="closed")return;const i=Ss(n,e,a);i.stack.length&&er("fatal",Rr(n),{phase:"render",error:{...i,via:r}})};window.addEventListener("error",r=>{Xl(r)||t("error",r.error,r.message)}),window.addEventListener("unhandledrejection",r=>t("rejection",r.reason))},Vf=(e,t,r=Xe&&Xe.tagName.toUpperCase()==="SCRIPT"&&Xe.src||new URL("index.js",document.baseURI).href)=>{const n=nc();kr||!n||!e||(ks=t?ui(t).toString(36):void 0,kr=fc({config:n,version:xs,env:e,seed:ac(rc(),lu)}),cn=Rf(r),cn&&Pf(cn))},Bf=e=>{let t={application:void 0,attempts:0,blocked:!1};return{fetch:async(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=P.current$.value.flow;a!==t.application&&(t={application:a,attempts:0,blocked:!1});const i=t,o=++i.attempts,s=performance.now(),l=await e.fetch(r,n).catch(c=>{throw Cs(c)===void 0&&!(c instanceof Error&&c.name==="AbortError")&&(i.blocked=!0,er("submit_blocked",Rr(c),{phase:"submit",error:Sa(c),endpoint:"flow_submit",attempt:o,elapsed_ms:Math.round(performance.now()-s),body_kb:typeof(n==null?void 0:n.body)=="string"?Math.round(n.body.length/1024):void 0})),c});return i.blocked&&er("submit_recovered",void 0,{phase:"submit",endpoint:"flow_submit",attempt:o}),l}}},zf='[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-\\[44px\\]{min-height:44px}[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-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] .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}}',Es="inploi-chatbot",Ca=`[data-widget='${Es}']`,Uf=()=>({getChatbotElement:()=>document.querySelector(Ca),getOrCreateChatbotElement:()=>{const e=document.querySelector(Ca);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Es,t}}),qf=25,$s=Le(()=>{}),As=["wheel","touchmove","keydown"],Hf=(e,t)=>new Promise((r,n)=>{if(t!=null&&t.aborted)return n(new ht);const a=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(a),n(new ht)},{once:!0})}),re={onSubmitSuccessFn$:Le(()=>{}),onInteractionFn$:Le(()=>{}),isBotTyping$:Le(!1),captchaVisible$:Le(!1),themeMode$:Le("light"),isReadingHistory$:Le(!1),scrollToEnd:()=>$s.value()},Wf=()=>{const e=he(null),t=he(-1/0);Te(()=>{const n=e.current;if(!n)return;const a=()=>{re.isReadingHistory$.value=!1,n.scrollTo({top:n.scrollHeight,behavior:"instant"})};$s.value=a;const i=()=>t.current=performance.now(),o=()=>{n.scrollHeight-n.scrollTop-n.clientHeight<=24?re.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(re.isReadingHistory$.value=!0)};n.addEventListener("scroll",o,{passive:!0});for(const l of As)n.addEventListener(l,i,{passive:!0});const s=new ResizeObserver(()=>{re.isReadingHistory$.peek()||a()});return s.observe(n),n.firstElementChild&&s.observe(n.firstElementChild),()=>{n.removeEventListener("scroll",o);for(const l of As)n.removeEventListener(l,i);s.disconnect()}},[]);const r=mt(()=>({setSubmission:(a,i)=>P.setSubmission(a,i),captcha:{container:()=>{var a;return((a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))??null},get theme(){return re.themeMode$.peek()},reveal:a=>{re.captchaVisible$.value=a,a&&requestAnimationFrame(()=>{var i,o;(o=(i=e.current)==null?void 0:i.querySelector("[data-captcha-slot]"))==null||o.focus(),re.scrollToEnd()})}},send:async({message:a,signal:i,groupId:o})=>{if(await rn(a).with({author:"bot",type:"text"},async s=>{if(i!=null&&i.aborted)throw new ht;re.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*qf;try{await Hf(l,i)}finally{re.isBotTyping$.value=!1}}).otherwise(async()=>{}),i!=null&&i.aborted)throw new ht;P.addMessage(a,o)},input:(({input:a,signal:i})=>{if(i!=null&&i.aborted)throw new ht;return P.setInput(a),new Promise(o=>{const s=l=>{if(i!=null&&i.aborted)throw new ht;t.current=-1/0,P.setInput(void 0),a.key&&P.setSubmission(a.key,l),o(l)};re.onSubmitSuccessFn$.value=s})})}),[]);return{chatRef:e,chatService:r}};var Kf=["1","2","3","4","5","6","7","8","9","10","11","12"],Gf={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]}},Yf=(e,t=1,r)=>n=>{const[a,i]=Gf[r][n];return"oklch("+a+"% "+i*t+" "+e+")"},Ea=e=>{const t=Yf(e.hue,e.chroma,e.mode);return Object.fromEntries(Kf.map(r=>[e.prefix+r,e.transform(t(r))]))},$a=e=>e,Jf=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(a=>{const i=n[a];return[`${String(r)}.${a}`,i]}):[[r,n]]});return Object.fromEntries(t)},un=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Aa=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(un(e)&&un(r))for(const n in r){const a=r[n];if(un(a)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];un(i)&&Aa(i,a)}else Object.assign(e,{[n]:r[n]})}return Aa(e,...t)},Zf=e=>{function t(r,n){const a=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${a}`:`var(--${a})`}return t},Xf=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:a,getToken:i}=n,o=b=>i("reference",b.toString()),s=e({theme:a}),l=t({theme:a,core:o,raw:{core:s}}),c=r({theme:a,core:o,semantic:o,raw:{core:s,semantic:l}}),f=Jf(Aa(s,l,c)),u=([b,p],g)=>{const v=[g,b].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(x=>u(x,v)):[[n.getToken("declaration",v),p]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(b=>u(b))),ref:b=>i("reference",b.toString())}}})})})});const[Ia,Ta,Is]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Qf=Xf().core(({theme:e})=>({color:{black:Ia,white:Ta,lowest:e.mode==="light"?Ta:Ia,highest:e.mode==="light"?Ia:Ta,...Ea({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:$a}),...Ea({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:$a}),...Ea({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:$a})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(a,i)=>t.core.color[a].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Is,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const a=(i,o)=>e.core.color[i].replace(")",` / ${o})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:a("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":a("a-9",.05)},"status-bar":{bg:a("n-2",.8),"bg-button":Is,"bg-button-hover":a("n-10",.4),"bg-button-active":a("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),ep=Zf({prefix:"i-"}),tp=e=>{const t=Qf.from({theme:e,getToken:ep}),r=Object.entries(t.declarations).map(([n,a])=>`${n}: ${a};`);return`${Ca} {
|
|
31
|
-
${r.concat(r).join(`
|
|
32
|
-
`)}
|
|
33
|
-
}`};class Ts extends ou{}const rp=({_internal_domManager:e=Uf(),theme:t,terms:r,feedback:n,jobAlerts:a})=>au(({apiClient:i,rpcClient:o,logger:s,analytics:l,publishableKey:c,env:f})=>{let u=!1,b=0;Vf(f,c);const p=Bf(Nf(i));let g=0;const v=new WeakMap,x=(A,S)=>{const k=++g,E=performance.now();return S.catch(N=>{throw typeof N=="object"&&N!==null&&v.set(N,{endpoint:A,attempt:k,elapsed_ms:Math.round(performance.now()-E)}),N})},C=(A,S)=>{const k=Cs(A);k===404||k===410||er("fatal","application_unavailable",{phase:"flow",stage:S,error:Sa(A),http_status:k,...S==="flow_fetch"&&typeof A=="object"&&A!==null&&v.get(A)})},_=c&&f?$u({environment:f,publishableKey:c,logger:s}):void 0,M=A=>A===b,j=()=>{if(typeof window>"u")return;b++,Fe.flushStateData().catch(()=>{}),P.cancelCurrentFlow(),re.isBotTyping$.value=!1;const A=e.getChatbotElement();A&&(Tt(null,A),A.remove()),u=!1,s.info("Chatbot plugin destroyed")},D=()=>{if(typeof window>"u")return;const A=b,S=[Oe("style",{id:"inploi-chatbot-styles"},zf),Oe("style",{id:"inploi-chatbot-theme"},tp(t))],k=e.getOrCreateChatbotElement();re.themeMode$.value=t.mode;const E=Le(!1);if(Tt(Oe(ie,{},[S,Oe(Lf,{env:f,rpcClient:o,apiClient:p,logger:s,analytics:l,talentBankClient:_,params:{theme:t,terms:r,feedback:n},feedbackReady:E})]),k),n){const N=I=>{var q,B;if(!M(A))return;const V=(q=e.getChatbotElement())==null?void 0:q.querySelector("dialog");V&&np({instance:I({rpcClient:o,apiClient:i,logger:s,analytics:l}),theme:t,terms:((B=n.params)==null?void 0:B.terms)??{},host:V}).then(()=>void(E.value=!0),G=>s.error("Error rendering feedback plugin",G))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:I})=>{N(I())}).catch(I=>{s.error("Error preparing feedback plugin",I)}):N(n.plugin)}u=!0},z=async(A,S)=>{if(!M(S))return;Kc({context:Ln(A.jobContext,A.context||{}),schema:A.flow.context_schema,logger:s});const k=await P.prepareFlow({...A,jobAlerts:A.jobAlerts??a});M(S)&&P.commitFlow(k)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(u)return;D(),s.info("Chatbot plugin prepared")}catch(A){s.error("Error preparing chatbot plugin",A)}},fetchFlowByJobId:async(A,S)=>{const k=(S==null?void 0:S.idType)==="inploi"?"internal":"external";return x("flow_by_job",o.request(Vu,{params:{id:A},searchParams:{id_type:k}})).catch(E=>{throw Io({name:"ApiError",message:jt.string,status:410,data:jt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},E)?new Ts(E.message,E.status,E.data):E}).then(E=>({flow:E.flow,title:E.job.title,flowKeys:[E.job.id,...(S==null?void 0:S.flowKeys)??[]],job:Pu(E,{id:A,idType:k}),employer:E.company.name,...S,jobContext:E.context,context:{user:E.user,...S==null?void 0:S.context}}))},fetchFlowById:async(A,S)=>x("flow_by_id",o.request(Bu,{params:{id:A}})).then(k=>{var E;return{flow:k.flow,title:"Chatbot",flowKeys:(S==null?void 0:S.flowKeys)??[],...S,analytics:{customProperties:{flow_id:k.flow.id,flow_version:k.flow.version,...(E=S==null?void 0:S.analytics)==null?void 0:E.customProperties}}}}),open:async A=>{if(typeof window>"u")return;const S=performance.now();try{P.cancelCurrentFlow(),P.viewState$.value="maximised",u||D()}catch(E){s.error("Error starting flow",E),er("boot_failed",Rr(E),{phase:"config",error:Sa(E),elapsed_ms:Math.round(performance.now()-S)});return}er("boot");const k=b;if(A instanceof Promise){P.current$.value={state:"loading"};const E=N=>I=>{M(k)&&(s.error("Error loading flow",I),P.current$.value={state:I instanceof Ts?"closed":"error"},C(I,N))};A.then(N=>z(N,k).catch(E("create")),E("flow_fetch"))}else await z(A,k).catch(E=>{s.error("Error starting flow",E),C(E,"create")})},hasApplicationInProgress:async A=>{const S=await Fe.getStateData(A.flow,A.flowKeys,A.context??{});return S!==void 0&&gs({data:S,nodes:A.flow.nodes})},hasAnyApplicationInProgress:async()=>(await Fe.getAllStateData()).some(A=>gs({data:A,nodes:[]})),close:async()=>{typeof window>"u"||(P.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:j}});function np({instance:e,terms:t,theme:r,host:n}){return e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=rp;const ap=Object.freeze(Object.defineProperty({__proto__:null,jobCountryCodes:Zc},Symbol.toStringTag,{value:"Module"}));var ip="https://maps.inploi.com",op=(e,t)=>{const r=new URL(`/${e}`,ip);return r.search=new URLSearchParams({q:t.query,limit:"5",surface:t.surface,seed:t.seed}).toString(),t.country&&r.searchParams.set("country",t.country),r},Da=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),sp=e=>{if(!Da(e)||typeof e.label!="string"||!Da(e.address)||e.country!==void 0&&typeof e.country!="string")return;const t={};for(const r of["line1","line2","line3","city","state","postcode","country"]){const n=e.address[r];if(n!==void 0&&typeof n!="string")return;n!==void 0&&(t[r]=n)}return{id:e.label,label:e.label,country:e.country,address:t}},lp=async(e,t,r)=>{const n=await fetch(e.href,{signal:r});if(!n.ok)return;const a=n.headers.get("X-Geo-Arm"),i=await n.json();if(a!=="inploi"&&a!=="mapbox"||!Da(i)||!Array.isArray(i.results)||i.source!=="photon"&&i.source!=="mapbox"&&i.source!=="places"||typeof i.attribution!="string")return;const o=[];for(const s of i.results){const l=t(s);if(l===void 0)return;o.push(l)}return{results:o,arm:a,source:i.source}},cp=e=>{const t=op("address",{...e,seed:e.session});return t.searchParams.set("session",e.session),e.lat!==void 0&&e.lng!==void 0&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&e.lat>=-90&&e.lat<=90&&e.lng>=-180&&e.lng<=180&&(t.searchParams.set("lat",String(e.lat)),t.searchParams.set("lng",String(e.lng))),lp(t,sp,e.signal)};const up=Object.freeze(Object.defineProperty({__proto__:null,lookupAddress:cp},Symbol.toStringTag,{value:"Module"}));var dp="9.13.1",Ds=`https://sdk.inploi.com/@inploi/flows@${dp}/cdn/captcha/index.html`,fp=new URL(Ds).origin,js=3e4,pp=5*6e4,hp=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",ja=new WeakMap,bp=e=>{let t=ja.get(e);return t||(t=e.fetch("/flow/captcha").then(r=>{let n=r==null?void 0:r.site_key;return typeof n=="string"&&n!==""?n:void 0}).catch(r=>{throw ja.delete(e),r}),ja.set(e,t)),t},gp=(e,t={})=>new Promise((r,n)=>{let{signal:a,container:i=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,c=()=>{},f=v=>{l||(l=!0,clearTimeout(p),a==null||a.removeEventListener("abort",b),c(),v())},u=v=>f(()=>n(new Error(v))),b=()=>u("Captcha aborted"),p,g=v=>{clearTimeout(p),p=setTimeout(()=>u("Captcha timed out"),v)};if(g(js),a==null?void 0:a.aborted)return b();a==null||a.addEventListener("abort",b),(async()=>{let v=await bp(e);if(v===void 0)return f(()=>r(void 0));if(l)return;let x=document.createElement("iframe");x.src=`${Ds}?${new URLSearchParams({sitekey:v,origin:window.location.origin,...o&&{theme:o}}).toString()}`,x.title="Cloudflare security check",x.style.cssText=`display:block;border:0;width:${i?"100%":"300px"};height:0;color-scheme:normal`,i?i.appendChild(x):(x.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(x));let C=!1,_=M=>{if(!x.contentWindow||M.source!==x.contentWindow||M.origin!==fp||!hp(M.data))return;let j=M.data;switch(j.type){case"token":return f(()=>r(j.token));case"resize":x.style.height=`${Math.max(0,Math.ceil(j.height))}px`;return;case"before-interactive":return C=!0,g(pp),s==null?void 0:s();case"after-interactive":return C=!1,g(js);case"error":!C&&!j.interactive&&u("Captcha failed");return;case"expired":return u("Captcha expired");case"timeout":return u("Captcha timed out")}};window.addEventListener("message",_),c=()=>{window.removeEventListener("message",_),x.remove()}})().catch(v=>f(()=>n(v)))}),Ms=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[a,...i]=e.compareKey.split(".");if(!a)return!1;let o=yi({context:t,key:a,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=ur(o.value,i);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=ur(o.value,i),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return Sr(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Sr(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Sr(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(c=>typeof c=="string")?Sr(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"?Vr(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 ${n.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}},Sr=(e,{context:t,submissions:r})=>{let n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let a of n)if(Ms({condition:a,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let a of n)if(!Ms({condition:a,context:t,submissions:r,ifBlock:e}))return!1;return!0}},mp=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,vp=(e,{context:t,submissions:r})=>e.replace(mp,(n,a,i="")=>{let[o,...s]=a.trim().split("."),l=yi({key:o,path:s,submissions:r,context:t});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(c=>`${c.name} (${Ht(c.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(c=>c&&c.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"phone":return Vr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=ur(l.value,s);switch(typeof c){case"boolean":return c===!0?"true":"false";case"string":return c;case"number":return c.toString();case"object":if(Array.isArray(c)&&c.every(f=>typeof f=="string"))return c.join(", ")}break}}return i});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function wp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ma(e,t,r=""){const n=wp(e),a=e==null?void 0:e.length;if(!n||t!==void 0){const o=r&&`"${r}" `,s="",l=n?`length=${a}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Os(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 yp(e,t){Ma(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function Oa(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function La(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ye(e,t){return e<<32-t|e>>>t}const _p=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",xp=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function kp(e){if(Ma(e),_p)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=xp[e[r]];return t}function Sp(e,t={}){const r=(a,i)=>e(i).update(a).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=a=>e(a),Object.assign(r,t),Object.freeze(r)}const Cp=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Ep(e,t,r){return e&t^~e&r}function $p(e,t,r){return e&t^e&r^t&r}class Ap{constructor(t,r,n,a){fe(this,"blockLen");fe(this,"outputLen");fe(this,"padOffset");fe(this,"isLE");fe(this,"buffer");fe(this,"view");fe(this,"finished",!1);fe(this,"length",0);fe(this,"pos",0);fe(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=a,this.buffer=new Uint8Array(t),this.view=La(this.buffer)}update(t){Os(this),Ma(t);const{view:r,buffer:n,blockLen:a}=this,i=t.length;for(let o=0;o<i;){const s=Math.min(a-this.pos,i-o);if(s===a){const l=La(t);for(;a<=i-o;o+=a)this.process(l,o);continue}n.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===a&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Os(this),yp(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:a,isLE:i}=this;let{pos:o}=this;r[o++]=128,Oa(this.buffer.subarray(o)),this.padOffset>a-o&&(this.process(n,0),o=0);for(let u=o;u<a;u++)r[u]=0;n.setBigUint64(a-8,BigInt(this.length*8),i),this.process(n,0);const s=La(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<c;u++)s.setUint32(4*u,f[u],i)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:a,finished:i,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=i,t.length=a,t.pos=s,a%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const xt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ip=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]),kt=new Uint32Array(64);class Tp extends Ap{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:r,C:n,D:a,E:i,F:o,G:s,H:l}=this;return[t,r,n,a,i,o,s,l]}set(t,r,n,a,i,o,s,l){this.A=t|0,this.B=r|0,this.C=n|0,this.D=a|0,this.E=i|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,r){for(let u=0;u<16;u++,r+=4)kt[u]=t.getUint32(r,!1);for(let u=16;u<64;u++){const b=kt[u-15],p=kt[u-2],g=Ye(b,7)^Ye(b,18)^b>>>3,v=Ye(p,17)^Ye(p,19)^p>>>10;kt[u]=v+kt[u-7]+g+kt[u-16]|0}let{A:n,B:a,C:i,D:o,E:s,F:l,G:c,H:f}=this;for(let u=0;u<64;u++){const b=Ye(s,6)^Ye(s,11)^Ye(s,25),p=f+b+Ep(s,l,c)+Ip[u]+kt[u]|0,v=(Ye(n,2)^Ye(n,13)^Ye(n,22))+$p(n,a,i)|0;f=c,c=l,l=s,s=o+p|0,o=i,i=a,a=n,n=p+v|0}n=n+this.A|0,a=a+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(n,a,i,o,s,l,c,f)}roundClean(){Oa(kt)}destroy(){this.set(0,0,0,0,0,0,0,0),Oa(this.buffer)}}class Dp extends Tp{constructor(){super(32);fe(this,"A",xt[0]|0);fe(this,"B",xt[1]|0);fe(this,"C",xt[2]|0);fe(this,"D",xt[3]|0);fe(this,"E",xt[4]|0);fe(this,"F",xt[5]|0);fe(this,"G",xt[6]|0);fe(this,"H",xt[7]|0)}}const jp=Sp(()=>new Dp,Cp(1));var Ls=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Fa=e=>{var t,r;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(r=[...e.data.messages].reverse().find(n=>n.groupId&&e.nodes.some(a=>a.id===n.groupId&&a.type.startsWith("question-"))&&(n.type==="system"||"author"in n&&n.author==="user")))==null?void 0:r.groupId},Na=e=>Array.isArray(e)?e.map(Na):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,Na(r)])):typeof e=="function"?void 0:e,Mp=e=>kp(jp(new TextEncoder().encode(JSON.stringify(Na(e)))));function Op(e,t,r,n){var a;if(n!=null&&n.aborted)return;let i=Mp(r),o=(a=e.data).preApplyFingerprints??(a.preApplyFingerprints=[]);if(o.includes(i))return;o.push(i);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(r)}).catch(()=>{let c=o.indexOf(i);c!==-1&&o.splice(c,1)}).finally(()=>{clearTimeout(l)})}var Fs=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Ue=(e,t)=>vp(e,Fs(t)),Lp=(e,t)=>Sr(e,Fs(t)),Ns=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;let n=e.nextId?t.find(a=>a.id===e.nextId):void 0;if(n)return Ns({node:n,nodes:t,stopWhen:r})},Fp=({childNode:e,nodes:t})=>{let r=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;let a=t.find(o=>o.id===n.branchId);if(!a)return!1;let i=Ns({node:a,nodes:t,stopWhen:o=>o.id===e.id});return!(!i||i.id!==e.id)});if(r!=null&&r.nextId)return t.find(n=>n.id===r.nextId)},Np=3,Rp=({flow:e,analytics:t,logger:r,talentBankClient:n,context:a,apiClient:i,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:f,onSubmitNetworkError:u,closedRoleBehaviour:b,settledOutcomes:p=b,dateEchoLocale:g,onFlowEnd:v,onInterpret:x,forceSubmitConfirmation:C,flowType:_,t:M})=>{var j;let D=new AbortController,z={submitAccepted:!1};(j=e.data).startedWriteNodeIds??(j.startedWriteNodeIds=e.nodes.flatMap(k=>{var N,I;if(k.type!=="integration-application-submit"||!e.data.nodeHistory.includes(k.id))return[];let E=k.data.key?(N=o())==null?void 0:N[k.data.key]:void 0;return(E==null?void 0:E.type)==="integration"&&((I=ki(E.value))==null?void 0:I.verdict)==="not_submitted"?[]:[k.id]}));let A={...t.service,log:k=>t.service.log({...k,customProperties:{...k.customProperties,...t.customProperties}})},S=async(k,E)=>{let N=D.signal;if(N.aborted)return;let I=o(),V=s(),q=(V==null?void 0:V.submitNodeId)===k.id?e.nodes.find(B=>{var G;return B.id===V.fileQuestionNodeId&&B.type==="question-file"&&((G=I==null?void 0:I[B.data.key])==null?void 0:G.type)!=="file"}):void 0;if(q)return S(q,E);x==null||x(k,E);try{await Pp({flow:e,analytics:A,logger:r,talentBankClient:n,apiClient:i,context:a,node:k,submissions:I,applicationRecovery:V,setApplicationRecovery:async B=>{if(!N.aborted)try{await l(B)}catch(G){r.error("Failed to persist application recovery",G)}},forceSubmitConfirmation:C||(V==null?void 0:V.submitNodeId)===k.id,run:z,persistWriteBarrier:f,onSubmitNetworkError:u,settledOutcomes:p,dateEchoLocale:g,flowType:_,signal:N,t:M,chat:{sendMessage:async B=>c.send({groupId:k.id,message:B,signal:N}),userInput:async B=>c.input({input:B,signal:N}),setSubmission:(B,G)=>{N.aborted||c.setSubmission(B,G)},captcha:c.captcha},next:B=>{if(N.aborted)return;let G=(V==null?void 0:V.fileQuestionNodeId)===k.id?V.submitNodeId:B,Y=G?e.nodes.find(me=>me.id===G):Fp({childNode:k,nodes:e.nodes});return Y?S(Y,k):v==null?void 0:v(k)},end:()=>{N.aborted||(v==null||v(k))}})}catch(B){if(B instanceof ht)return;throw B}};return{interpret:async k=>{let E=e.nodes.find(N=>N.id===k)??Ls(e.nodes);return S(E)},undo:k=>{var G;if(delete e.data.reviewReplay,((G=e.data.startedWriteNodeIds)==null?void 0:G.length)||e.data.isFinished)return{removed:0};let E=Fa(e),N=E?k.lastIndexOf(E):-1,I=e.nodes.find(Y=>Y.id===E);if(N===-1||!I)return{removed:0};let V=e.nodes.find(Y=>Y.id===k[k.length-1]);D.abort();let q=k.splice(N);e.data.messages=e.data.messages.filter(Y=>!Y.groupId||!q.includes(Y.groupId)),e.data.currentInput=null;let B=o();for(let Y of q.slice(1)){let me=e.nodes.find(Re=>Re.id===Y);if(!(!me||!B||me.id===E)&&("key"in me.data&&me.data.key&&delete B[me.data.key],"keys"in me.data))for(let Re of Object.values(me.data.keys))typeof Re=="string"&&delete B[Re]}return D=new AbortController,S(I,V),{removed:q.length}},abort:()=>{D.abort()}}};async function Pp(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 uh({...e,node:t});case"text":return eh({...e,node:t});case"image":return th({...e,node:t});case"question-text":return rh({...e,node:t});case"question-enum":return ih({...e,node:t});case"question-number":return nh({...e,node:t});case"question-phone":return ah({...e,node:t});case"question-boolean":return oh({...e,node:t});case"question-file":return lh({...e,node:t});case"question-address":return sh({...e,node:t});case"end-flow":return ch({...e,node:t});case"if-block":return Qp({...e,node:t});case"jump":return zp({...e,node:t});case"link":return Xp({...e,node:t});case"integration-application-submit":return Yp({...e,node:t});case"add-submission":return Up({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Bp({...e,node:t});case"feedback":return Vp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Vp({next:e,node:t}){e(t.nextId)}async function Bp({next:e,node:t,talentBankClient:r,submissions:n,flow:a,logger:i,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){let c=t.data.scope==="job"?(l=a.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||c!=null)try{s=await r.checkDuplicate({email:Cc({key:t.data.email,submissions:n}).toString(),jobId:c,scope:t.data.scope})}catch(f){i.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function zp({next:e,node:t}){e(t.data.targetId)}async function Up({next:e,node:t,logger:r,submissions:n,context:a}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Ue(t.data.value,{submissions:n,context:a})},e(t.nextId)}var qp=5e3,Hp=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Wp=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?Ci:e.throttles?On:Si)),Kp=(e,t,r)=>{let{waitMs:n,throttles:a,maintenance:i}=Rc(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...a!==void 0&&{throttles:a},...i&&{maintenance:i}}},Gp=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Ra=e=>e instanceof Error&&Gp.includes(e.name)?e:void 0,Rs=e=>{let t=Ra(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Yp({chat:e,next:t,end:r,node:n,logger:a,apiClient:i,submissions:o,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:f,forceSubmitConfirmation:u,flowType:b,run:p,persistWriteBarrier:g,signal:v,onSubmitNetworkError:x,settledOutcomes:C,t:_}){var S,k;let M=async({redirect_url:E,message:N,button_text:I})=>{let{anonymous_id:V,session_id:q}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:N??_("submission_redirect_message")});try{let B=new URL(E);V&&!B.searchParams.has("anonymous_id")&&B.searchParams.set("anonymous_id",V),await e.sendMessage({type:"link",href:B.toString(),text:I??_("complete_submission"),onClick:()=>{if(!q){a.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:B.toString(),job:l.job}})}})}catch(B){a.error(`Invalid redirect URL: ${E}`,B),e.sendMessage({type:"system",variant:"error",text:_("redirect_url_error")})}};if((S=l.data.startedWriteNodeIds)!=null&&S.includes(n.id)&&(c==null?void 0:c.submitNodeId)!==n.id){let E=(k=l.data.submitRedirects)==null?void 0:k[n.id];return E?(await M(E),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:_("submission_unknown")}),r())}let j=Hp(n.id,l.job),D=0,z=p.submitAccepted&&n.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==n.id,A=async E=>{var wn,yn,ni,Nr,h,m,w,T,$;let N=((wn=l.data.submitCooldown)==null?void 0:wn.key)===j?l.data.submitCooldown:void 0;N&&(N.until=Wp(N));let I=N==null?void 0:N.until;(l.data.reviewRequiresSend===!0&&!z||E!==!0||I!==void 0&&I>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:n.data.submitLabel,...I!==void 0&&{availableAt:I}}}),z=!1;let V;if(n.data.captcha){let y=e.captcha,L=!0;try{V=await gp(i,{signal:v,container:(y==null?void 0:y.container())??null,theme:y==null?void 0:y.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:_("captcha_check")}).catch(()=>{}).then(()=>{L&&(y==null||y.reveal(!0))})}})}catch(W){if(a.error("Captcha check failed",W),v.aborted)return}finally{L=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:_("submitting")});let{anonymous_id:q,session_id:B}=s.getSessionInfo();if(v.aborted)return;let G=((yn=l.data.startedWriteNodeIds)==null?void 0:yn.includes(n.id))===!0;if((c==null?void 0:c.submitNodeId)===n.id&&await f(void 0),G||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],n.id]),await g().catch(y=>a.error("Failed to persist application write barrier",y)),v.aborted)return;let Y,me=setTimeout(()=>{Y=e.sendMessage({type:"loading",semantic:"submission-still-working",text:_("submission_still_working")}).catch(y=>a.error("Failed to send submission progress message",y))},qp),Re=kc(),Me,ne=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({...Re!==void 0&&{browser_timezone:Re},log_submit:!1,integration_id:n.data.integrationId,anonymous_id:q,session_id:B,job:l.job,flow_build:l.build,...V!==void 0&&{captcha_token:V},submissions:xc(l.nodes,Sc(o||{},n.data.submitKeys)),pre_apply:Dn(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{Me=y;let L=Rs(y);return(L==null?void 0:L.data)!==void 0?L.data:y});if(clearTimeout(me),await Y,v.aborted)return;if(Me!==void 0&&!Ra(Me)&&x)return await x(Me,v),A(!0);l.data.stagingDestination=Mc(ne),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:ne});let Dr=(ni=Rs(Me))==null?void 0:ni.status,jr=typeof Dr=="number"?Dr:void 0,U=ki(ne,jr),Mr=U===void 0&&jr===429,Rt=C==="terminal"&&((U==null?void 0:U.outcome)==="closed"||(U==null?void 0:U.outcome)==="duplicate"),Pt=l.data.failedAttemptAt,ft=Pt==null?void 0:Pt[j];Pt&&ft!==void 0&&ft>Date.now()&&(ft=Pt[j]=Date.now());let Or=ft!==void 0&&Date.now()-ft<Fc||((Nr=l.data.unconfirmedAttemptKeys)==null?void 0:Nr.includes(j))===!0,lr=(h=Ra(Me))==null?void 0:h.status,pt=Uc(ne,typeof lr=="number"?lr:void 0);pt&&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:pt.service,response:pt.response,captured:(ne==null?void 0:ne.captured)===!0,flow_type:(b==null?void 0:b())??"CHATBOT_DRAWER",job:l.job,...(U==null?void 0:U.outcome)==="duplicate"&&{outcome:Or?"duplicate_after_own_attempt":"duplicate"},...pt.outcome&&{outcome:pt.outcome}}});let vn=jn(ne)||(ne==null?void 0:ne.success)===!0;if((vn||Mn(ne))&&(p.submitAccepted=!0),vn&&((m=l.data.submitCooldown)==null?void 0:m.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(y=>a.error("Failed to persist submit cooldown reset",y))),jn(ne)){let{redirect_url:y,message:L,button_text:W}=ne.integration_response.data,K={redirect_url:y,message:L,button_text:W};return v.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:K},await g().catch(ve=>a.error("Failed to persist submit redirect",ve)),await M(K),t(n.nextId))}let Lr=Mn(ne);if(Lr)return await e.sendMessage({type:"system",variant:"success",text:Lr.message??_("submission_pending")}),t(n.nextId);if((ne==null?void 0:ne.success)===!0)return n.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:_("submission_completed")}),t(n.nextId);let Fr=zc(U),Vt=Fr!==void 0&&((w=o==null?void 0:o[Fr])==null?void 0:w.type)==="file"?Fr:void 0,Bt=Vt===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===Vt);if(!Bt&&!Rt&&!Ai(U)&&(l.data.submitCooldown=Kp(j,N,U)),(U==null?void 0:U.outcome)!=="duplicate"&&!Mr&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[j]:Date.now()},(T=l.data.unconfirmedAttemptKeys)!=null&&T.includes(j)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==j))),(U==null?void 0:U.verdict)==="not_submitted"||(U==null?void 0:U.outcome)==="duplicate"||(U==null?void 0:U.outcome)==="closed"||Mr||Dc(ne,jr)?(G||(l.data.startedWriteNodeIds=($=l.data.startedWriteNodeIds)==null?void 0:$.filter(y=>y!==n.id)),(c==null?void 0:c.submitNodeId)===n.id&&await f(c),await g().catch(y=>a.error("Failed to persist application write barrier release",y))):await g().catch(y=>a.error("Failed to persist submit cooldown",y)),U){if(a.error(Me??U.message),Bt&&Vt!==void 0)return e.setSubmission(Vt,null),await f({fileQuestionNodeId:Bt.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:_("submission_unreadable_document")}),t(Bt.id);if(U.outcome==="duplicate")return await e.sendMessage({type:"system",variant:Rt?"success":"info",semantic:"submission-duplicate",text:_(Or?"submission_duplicate_earlier_attempt":"submission_duplicate")}),Rt?(delete l.data.submitCooldown,r()):A(!1);if(U.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:_("submission_closed")}),Rt?(delete l.data.submitCooldown,r()):A(!1);let y=Nc(U);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?_("submission_provider_maintenance_later"):_("submission_provider_maintenance",{time:$i(y.until,void 0)})}),A(!1)):U.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:_(Bc(U)?"submission_unknown_do_not_resubmit":"submission_unknown")}),A(!1)):Ai(U)?Pc(ne)?(await e.sendMessage({type:"text",author:"bot",text:U.message}),A(!1)):(D===0&&await e.sendMessage({type:"system",variant:"warning",text:_("captcha_failed")}),D++,A(D<=Np)):Vc(U)?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),A(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())}return a.error(Me??ne),Mr?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),A(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())};await A(u===!0&&!z?!1:n.data.skipConfirmation)}var Jp=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,Zp=(e,t)=>{if(!Jp.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function Xp({chat:e,next:t,node:r,submissions:n,context:a,analytics:i,flow:o}){let s=Ue(r.data.href,{submissions:n,context:a}),{flowSessionId:l}=o.data;await e.sendMessage({type:"link",href:s,text:Ue(r.data.cta,{submissions:n,context:a}),...Zp(r.data.href,s)&&{onClick:()=>{i.log({event:"FLOW_REDIRECT",properties:{flow_build:o.build,flow_id:o.id,flow_session_id:l,flow_version:o.version,href:s,job:o.job}})}}}),t(r.nextId)}async function Qp({submissions:e,next:t,node:r,context:n}){t(Lp(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function eh({chat:e,next:t,node:r,submissions:n,context:a}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.text,{submissions:n,context:a})}),t(r.nextId)}async function th({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function rh({chat:e,next:t,node:r,submissions:n,context:a,t:i,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let s=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars,multiline:r.data.format==="text"&&r.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Vr(s.value):r.data.format==="date"&&o!==void 0?Hc(s.value,o):s.value}),t(r.nextId)}async function nh({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function ah({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Vr(o.value):o.value}),t(r.nextId)}async function ih({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function oh({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function sh({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});let a=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,line2Required:r.data.line2Required,placeholder:r.data.placeholder}});if(a===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:n("skipped")});else{let i=Object.values(a.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:i})}return t(r.nextId)}async function lh({node:e,chat:t,next:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Ue(e.data.question,{submissions:n,context:a})});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:i("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function ch({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function uh({node:e,flow:t,submissions:r,chat:n,next:a,apiClient:i,analytics:o,signal:s,context:l}){let c=_c(t.nodes,r||{}),{answers:f,...u}=c;if(n.setSubmission(e.data.key,{type:"integration",value:u}),Op(t,i,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:Dn(t.nodes,r||{},t.data.flowSessionId)},s),c.status!=="skipped"){let b=[c.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":c.hasHardConcerns?e.data.messages.hard:c.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let p of["hard","advisory"]){let g=f.filter(v=>!v.matched&&v.severity===p);g.length&&b.push((p==="hard"?"Role requirements":"Other things to consider")+`
|
|
29
|
+
vnvnm vuvut wfwlf wswsm yeyem ytmyt zazaf zmzmb zwzwe`,Ct,Yc=()=>{if(Ct)return Ct;Ct=new Map;let e=new Intl.DisplayNames(["en"],{type:"region",fallback:"none"});for(let t of Gc.split(/\s+/)){let r=t.slice(0,2),n=e.of(r.toUpperCase());n&&Ct.set(n.toLowerCase(),r),Ct.set(r,r),Ct.set(t.slice(2),r)}return Ct},Jc=e=>{let t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(Ai,t))return Ai[t];let r=/^[a-z]{2}-[a-z0-9]{1,3}$/.test(t)?t.slice(0,2):t;return Yc().get(r)},Zc=e=>[...new Set(e.flatMap(t=>Jc(t)??[]))].sort();let Ke;const Xc={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Vr(e){return!e&&!Ke?Xc:{lang:(e==null?void 0:e.lang)??(Ke==null?void 0:Ke.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ke==null?void 0:Ke.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ke==null?void 0:Ke.abortPipeEarly)}}let Rn;function Qc(e){return Rn==null?void 0:Rn.get(e)}let Vn;function ed(e){return Vn==null?void 0:Vn.get(e)}let Bn;function td(e,t){var r;return(r=Bn==null?void 0:Bn.get(e))==null?void 0:r.get(t)}function Et(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function he(e,t,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??Et(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??td(e.reference,l.lang)??(c?ed(l.lang):null)??n.message??Qc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}const Ii=new WeakMap;function Ce(e){let t=Ii.get(e);return t||(t={version:1,vendor:"valibot",validate(r){return e["~run"]({value:r},Vr())}},Ii.set(e,t)),t}function rd(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Ti(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function nd(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Di=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};const ad=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Mi(e,t){return{kind:"validation",type:"check",reference:Mi,async:!1,expects:null,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&he(this,"input",r,n),r}}}function zn(e){return{kind:"validation",type:"email",reference:zn,expects:null,async:!1,requirement:ad,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&he(this,"email",t,r),t}}}function $t(e,t){return{kind:"validation",type:"max_length",reference:$t,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&he(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Li(e,t){return{kind:"validation",type:"max_value",reference:Li,async:!1,expects:`<=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&he(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function et(e,t){return{kind:"validation",type:"min_length",reference:et,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&he(this,"length",r,n,{received:`${r.value.length}`}),r}}}function ji(e,t){return{kind:"validation",type:"min_value",reference:ji,async:!1,expects:`>=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&he(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function Un(e,t){return{kind:"validation",type:"regex",reference:Un,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&he(this,"format",r,n),r}}}function Br(e){return{kind:"transformation",type:"transform",reference:Br,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function qn(){return{kind:"transformation",type:"trim",reference:qn,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Fi(e){return{kind:"validation",type:"url",reference:Fi,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&he(this,"URL",t,r),t}}}function id(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function zr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function sr(e,t){return{kind:"schema",type:"array",reference:sr,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:a,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else he(this,"type",r,n);return r}}}function Ur(e){return{kind:"schema",type:"boolean",reference:Ur,expects:"boolean",async:!1,message:e,get"~standard"(){return Ce(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:he(this,"type",t,r),t}}}function Oi(e,t){return{kind:"schema",type:"literal",reference:Oi,expects:Et(e),async:!1,literal:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:he(this,"type",r,n),r}}}function J(e,t){return{kind:"schema",type:"nullable",reference:J,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ce(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function tt(e,t){return{kind:"schema",type:"nullish",reference:tt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ce(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Re(e){return{kind:"schema",type:"number",reference:Re,expects:"number",async:!1,message:e,get"~standard"(){return Ce(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:he(this,"type",t,r),t}}}function te(e,t){return{kind:"schema",type:"object",reference:te,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:zr(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:a,key:o,value:l};for(const d of c.issues)d.path?d.path.unshift(f):d.path=[f],(i=r.issues)==null||i.push(d);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=id(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(he(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else he(this,"type",r,n);return r}}}function Le(e,t){return{kind:"schema",type:"optional",reference:Le,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ce(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function rt(e,t){return{kind:"schema",type:"picklist",reference:rt,expects:Ti(e.map(Et),"|"),async:!1,options:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:he(this,"type",r,n),r}}}function lr(e,t,r){return{kind:"schema",type:"record",reference:lr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Ce(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if(rd(i,l)){const c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){const h={type:"object",origin:"key",input:i,key:l,value:c};for(const p of f.issues)p.path=[h],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}const d=this.value["~run"]({value:c},a);if(d.issues){const h={type:"object",origin:"value",input:i,key:l,value:c};for(const p of d.issues)p.path?p.path.unshift(h):p.path=[h],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else he(this,"type",n,a);return n}}}function M(e){return{kind:"schema",type:"string",reference:M,expects:"string",async:!1,message:e,get"~standard"(){return Ce(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:he(this,"type",t,r),t}}}function Ni(e){let t;if(e)for(const r of e)if(t)for(const n of r.issues)t.push(n);else t=r.issues;return t}function Pi(e,t){return{kind:"schema",type:"union",reference:Pi,expects:Ti(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){let a,i,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];he(this,"type",r,n,{issues:Ni(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];he(this,"type",r,n,{issues:Ni(o)})}return r}}}function Ri(){return{kind:"schema",type:"unknown",reference:Ri,expects:"unknown",async:!1,get"~standard"(){return Ce(this)},"~run"(e){return e.typed=!0,e}}}function Vi(e,t,r){const n=e["~run"]({value:t},Vr(r));if(n.issues)throw new Di(n.issues);return n.value}function od(e,t){const r={};for(const n in e.entries)r[n]=Le(e.entries[n]);return{...e,entries:r,get"~standard"(){return Ce(this)}}}function je(...e){return{...e[0],pipe:e,get"~standard"(){return Ce(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Wn(e,t,r){const n=e["~run"]({value:t},Vr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}async function sd(e,t,r){const n=await e["~run"]({value:t},Vr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var ld=e=>e,cd=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},dd=class extends cd{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},ud={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},fd=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16));function Hn(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function sb(e){return e}var pd=["agent","sdk","form","integration","migration"],hd=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],gd=["screening","cv_match","interview","overall"],bd=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],md=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Bi=rt(pd),vd=rt(hd),wd=je(M(),qn(),et(1),$t(100)),yd=rt(gd),_d=rt(bd),xd=je(M(),qn(),et(1),$t(100)),kd=rt(md),zi=te({id:M(),email:J(M()),firstName:J(M()),lastName:J(M()),phone:J(M()),source:J(Bi),identifiedAt:J(M()),createdAt:M(),updatedAt:M()}),Ui=je(M(),et(1)),Kn=lr(M(),Ri()),Sd=te({id:M(),applicationId:M(),status:_d,scheduledAt:J(M()),completedAt:J(M()),meta:J(Kn),createdAt:M(),updatedAt:M()}),Cd=te({score:Re(),reason:M(),confidence:Re()}),qi=te({id:M(),candidateId:M(),jobId:Re(),stage:wd,stageGroup:vd,stageEnteredAt:M(),rating:J(Re()),disqualifiedAt:J(M()),disqualificationReason:J(xd),disqualificationNote:J(M()),source:kd,sourceDetail:J(M()),sessionId:J(Re()),externalApplicationId:J(M()),meta:J(Kn),context:J(Kn),scoredAt:J(M()),createdAt:M(),updatedAt:M()}),Ed=te({id:M(),applicationId:M(),scoreType:yd,score:J(Re()),reason:J(M()),categories:J(lr(M(),Cd)),scoredBy:J(M()),createdAt:M()});({...qi.entries},{...zi.entries});var $d=te({anonymousId:Ui,email:Ui,firstName:tt(M()),lastName:tt(M()),phone:tt(M()),source:tt(Bi)}),Ad=te({candidateId:M(),isNew:Ur()}),Id=te({id:M(),stageGroup:M(),createdAt:M()}),Td=te({isDuplicate:Ur(),existingApplication:Le(Id)}),Dd=({environment:e,publishableKey:t,logger:r})=>{let n=ud[e];return{async checkDuplicate(a){try{let i=new URLSearchParams({email:a.email,scope:a.scope});a.scope==="job"&&a.jobId!=null&&i.set("job_id",String(a.jobId));let o=await fetch(`${n}/applications/check-duplicate?${i}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Wn(Td,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(i){return r.error("[TalentBankClient] checkDuplicate failed:",i),{isDuplicate:!1}}},async identify(a){try{if(!a.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let i={email:a.email,firstName:a.firstName,lastName:a.lastName,phone:a.phone,anonymousId:a.anonymousId,source:a.source??"sdk"},o=Wn($d,i);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${n}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Wn(Ad,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(i){return r.error("[TalentBankClient] identify failed:",i),null}}}},Md=["DAILY","WEEKLY","MONTHLY"],Ld=lr(M(),Pi([M(),sr(M()),te({type:Oi("provided"),lat:Re(),lng:Re(),radius:Re(),unit:Le(rt(["miles","km"])),label:Le(M())})])),jd={pathname:"/job/:id",method:"GET",schema:{response:te({id:Re(),external_id:tt(M()),city:tt(M()),town:tt(M()),category:tt(M())})}};async function Fd(e,{contact:t,job:r}){var a;let n={};if(r){let i=await e.request(jd,{params:{id:r.id}});if((r.id_type==="internal"?String(i.id):i.external_id)!==r.id)throw new Error("Job lookup returned a different role");for(let o of["city","town","category"]){let s=(a=i[o])==null?void 0:a.trim();s&&(n[o]=[s])}}await e.request(Od,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var Od={pathname:"/search/save",method:"POST",schema:{response:Hn(),body:te({contact:te({email:je(Le(M()),M(),zn()),first_name:Le(M()),last_name:Le(M())}),alerts:je(Le(M()),M(),rt(Md)),filters:Ld})}},Nd=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:je(te({country:Le(sr(te({value:M()})),[])}),Br(({country:r})=>r.map(({value:n})=>n))),searchParams:Hn()}};return e.request(t,{searchParams:{filters:{country:null}}})},qr=new WeakMap,Wi=e=>(qr.has(e)||(qr.set(e,void 0),Nd(e).then(async t=>{let{jobCountryCodes:r}=await Promise.resolve().then(()=>ph);qr.set(e,r(t).join(",")||void 0)}).catch(()=>{})),qr.get(e)),Pd=(e,t)=>{let r=new Set,n=[];for(let a=0;a<Math.max(e.length,t.length);a++)for(let i of[e[a],t[a]]){if(!i)continue;let o=i.mapbox_id||i.full_address||[i.name,i.place_formatted].filter(Boolean).join(", ");if(!r.has(o)&&(r.add(o),n.push(i),n.length===5))return n}return n},Rd=600,Vd=async(e,t,r)=>{if(r==null||r.throwIfAborted(),!t){let n=await e();return r==null||r.throwIfAborted(),n}return new Promise((n,a)=>{let i,o,s,l=!1,c=()=>{l=!0,clearTimeout(s),r==null||r.removeEventListener("abort",f)},f=()=>{c(),a(r==null?void 0:r.reason)},d=()=>{c(),(i==null?void 0:i.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(Pd(i.value,o.value)):(i==null?void 0:i.status)==="fulfilled"?n(i.value):(o==null?void 0:o.status)==="fulfilled"?n(o.value):(i==null?void 0:i.status)==="rejected"&&a(i.reason)},h=(p,g)=>{l||(p?i=g:o=g,i&&o?d():g.status==="fulfilled"&&g.value.length>0&&(s=setTimeout(d,Rd)))};r==null||r.addEventListener("abort",f,{once:!0});for(let p of[!0,!1])e(p?t:void 0).then(g=>h(p,{status:"fulfilled",value:g}),g=>h(p,{status:"rejected",reason:g}))})},Hi=fc(Dn([we(),Fr()]),di(String)),Ki=re({id:Hi,version:Fr(),build:Fr(),nodes:fi(ui()),context_schema:Se(St(Tn(we(),re({required:In(),type:Dn([Me("string"),Me("number")])}))))}),Bd=re({flow:Ki}),zd=re({company:re({name:we()}),context:Se(Tn(we(),qt())),flow:Ki,job:re({id:Hi,title:we()}),user:Se(re({city:Se(we()),country:Se(we()),isEU:Se(In()),continent:Se(we())}))}),Ud=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),qd={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Hn(),response:zd}},Wd={pathname:"/flow/id/:id",method:"GET",schema:{response:Bd}},cr,R,Gi,Yi,At,Ji,Zi,Gn,Xi,Ht={},Qi=[],Hd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Wr=Array.isArray;function nt(e,t){for(var r in t)e[r]=t[r];return e}function eo(e){var t=e.parentNode;t&&t.removeChild(e)}function Oe(e,t,r){var n,a,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?cr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return dr(e,o,n,a,null)}function dr(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Gi};return a==null&&R.vnode!=null&&R.vnode(i),i}function Kd(){return{current:null}}function ce(e){return e.children}function Be(e,t){this.props=e,this.context=t}function Hr(e,t){if(t==null)return e.__?Hr(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Hr(e):null}function to(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return to(e)}}function Yn(e){(!e.__d&&(e.__d=!0)&&At.push(e)&&!Kr.__r++||Ji!==R.debounceRendering)&&((Ji=R.debounceRendering)||Zi)(Kr)}function Kr(){var e,t,r,n,a,i,o,s,l;for(At.sort(Gn);e=At.shift();)e.__d&&(t=At.length,n=void 0,a=void 0,i=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],a=[],(i=nt({},o)).__v=o.__v+1,Jn(l,o,i,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??Hr(o),o.__h,a),lo(n,o,a),o.__e!=s&&to(o)),At.length>t&&At.sort(Gn));Kr.__r=0}function ro(e,t,r,n,a,i,o,s,l,c,f){var d,h,p,g,v,_,S,x,L,j,F=0,V=n&&n.__k||Qi,B=V.length,k=B,C=t.length;for(r.__k=[],d=0;d<C;d++)(g=r.__k[d]=(g=t[d])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?dr(null,g,null,null,g):Wr(g)?dr(ce,{children:g},null,null,null):g.__b>0?dr(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(x=Gd(g,V,S=d+F,k))===-1?p=Ht:(p=V[x]||Ht,V[x]=void 0,k--),Jn(e,g,p,a,i,o,s,l,c,f),v=g.__e,(h=g.ref)&&p.ref!=h&&(p.ref&&Zn(p.ref,null,g),f.push(h,g.__c||v,g)),v!=null&&(_==null&&(_=v),j=!(L=p===Ht||p.__v===null)&&x===S,L?x==-1&&F--:x!==S&&(x===S+1?(F++,j=!0):x>S?k>C-S?(F+=x-S,j=!0):F--:F=x<S&&x==S-1?x-S:0),S=d+F,j=j||x==d&&!L,typeof g.type!="function"||x===S&&p.__k!==g.__k?typeof g.type=="function"||j?g.__d!==void 0?(l=g.__d,g.__d=void 0):l=v.nextSibling:l=ao(e,v,l):l=no(g,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,d=B;d--;)V[d]!=null&&(typeof r.type=="function"&&V[d].__e!=null&&V[d].__e==r.__d&&(r.__d=V[d].__e.nextSibling),co(V[d],V[d]))}function no(e,t,r){for(var n,a=e.__k,i=0;a&&i<a.length;i++)(n=a[i])&&(n.__=e,t=typeof n.type=="function"?no(n,t,r):ao(r,n.__e,t));return t}function at(e,t){return t=t||[],e==null||typeof e=="boolean"||(Wr(e)?e.some(function(r){at(r,t)}):t.push(e)),t}function ao(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function Gd(e,t,r,n){var a=e.key,i=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&a==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&a==l.key&&i===l.type)return o;o--}if(s<t.length){if((l=t[s])&&a==l.key&&i===l.type)return s;s++}}return-1}function Yd(e,t,r,n,a){var i;for(i in r)i==="children"||i==="key"||i in t||Gr(e,i,null,r[i],n);for(i in t)a&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||Gr(e,i,t[i],r[i],n)}function io(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Hd.test(t)?r:r+"px"}function Gr(e,t,r,n,a){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||io(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||io(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?so:oo,i):e.removeEventListener(t,i?so:oo,i);else if(t!=="dangerouslySetInnerHTML"){if(a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function oo(e){return this.l[e.type+!1](R.event?R.event(e):e)}function so(e){return this.l[e.type+!0](R.event?R.event(e):e)}function Jn(e,t,r,n,a,i,o,s,l,c){var f,d,h,p,g,v,_,S,x,L,j,F,V,B,k,C=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=R.__b)&&f(t);try{e:if(typeof C=="function"){if(S=t.props,x=(f=C.contextType)&&n[f.__c],L=f?x?x.props.value:f.__:n,r.__c?_=(d=t.__c=r.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(S,L):(t.__c=d=new Be(S,L),d.constructor=C,d.render=Zd),x&&x.sub(d),d.props=S,d.state||(d.state={}),d.context=L,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),C.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=nt({},d.__s)),nt(d.__s,C.getDerivedStateFromProps(S,d.__s))),p=d.props,g=d.state,d.__v=t,h)C.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(C.getDerivedStateFromProps==null&&S!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(S,L),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(S,d.__s,L)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=S,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(I){I&&(I.__=t)}),j=0;j<d._sb.length;j++)d.__h.push(d._sb[j]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(S,d.__s,L),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,g,v)})}if(d.context=L,d.props=S,d.__P=e,d.__e=!1,F=R.__r,V=0,"prototype"in C&&C.prototype.render){for(d.state=d.__s,d.__d=!1,F&&F(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,F&&F(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++V<25);d.state=d.__s,d.getChildContext!=null&&(n=nt(nt({},n),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(v=d.getSnapshotBeforeUpdate(p,g)),ro(e,Wr(k=f!=null&&f.type===ce&&f.key==null?f.props.children:f)?k:[k],t,r,n,a,i,o,s,l,c),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),_&&(d.__E=d.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Jd(r.__e,t,r,n,a,i,o,l,c);(f=R.diffed)&&f(t)}catch(I){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),R.__e(I,t,r)}}function lo(e,t,r){for(var n=0;n<r.length;n++)Zn(r[n],r[++n],r[++n]);R.__c&&R.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){R.__e(i,a.__v)}})}function Jd(e,t,r,n,a,i,o,s,l){var c,f,d,h=r.props,p=t.props,g=t.type,v=0;if(g==="svg"&&(a=!0),i!=null){for(;v<i.length;v++)if((c=i[v])&&"setAttribute"in c==!!g&&(g?c.localName===g:c.nodeType===3)){e=c,i[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(p);e=a?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),i=null,s=!1}if(g===null)h===p||s&&e.data===p||(e.data=p);else{if(i=i&&cr.call(e.childNodes),f=(h=r.props||Ht).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!s){if(i!=null)for(h={},v=0;v<e.attributes.length;v++)h[e.attributes[v].name]=e.attributes[v].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(Yd(e,p,h,a,s),d)t.__k=[];else if(ro(e,Wr(v=t.props.children)?v:[v],t,r,n,a&&g!=="foreignObject",i,o,i?i[0]:r.__k&&Hr(r,0),s,l),i!=null)for(v=i.length;v--;)i[v]!=null&&eo(i[v]);s||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||g==="progress"&&!v||g==="option"&&v!==h.value)&&Gr(e,"value",v,h.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&Gr(e,"checked",v,h.checked,!1))}return e}function Zn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){R.__e(n,r)}}function co(e,t,r){var n,a;if(R.unmount&&R.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Zn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){R.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&&co(n[a],t,r||typeof e.type!="function");r||e.__e==null||eo(e.__e),e.__=e.__e=e.__d=void 0}function Zd(e,t,r){return this.constructor(e,r)}function It(e,t,r){var n,a,i,o;R.__&&R.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],o=[],Jn(t,e=(!n&&r||t).__k=Oe(ce,null,[e]),a||Ht,Ht,t.ownerSVGElement!==void 0,!n&&r?[r]:a?null:t.firstChild?cr.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,o),lo(i,e,o)}function uo(e,t){It(e,t,uo)}function Xd(e,t,r){var n,a,i,o,s=nt({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?cr.call(arguments,2):r),dr(e.type,s,n||e.key,a||e.ref,null)}function fo(e,t){var r={__c:t="__cC"+Xi++,__:e,Consumer:function(n,a){return n.children(a)},Provider:function(n){var a,i;return this.getChildContext||(a=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&a.some(function(s){s.__e=!0,Yn(s)})},this.sub=function(o){a.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){a.splice(a.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}cr=Qi.slice,R={__e:function(e,t,r,n){for(var a,i,o;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),o=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),o=a.__d),o)return a.__E=a}catch(s){e=s}throw e}},Gi=0,Yi=function(e){return e!=null&&e.constructor===void 0},Be.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=nt({},this.state),typeof e=="function"&&(e=e(nt({},r),this.props)),e&&nt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Yn(this))},Be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Yn(this))},Be.prototype.render=ce,At=[],Zi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gn=function(e,t){return e.__v.__b-t.__v.__b},Kr.__r=0,Xi=0;var ht,ne,Xn,po,Kt=0,ho=[],Yr=[],go=R.__b,bo=R.__r,mo=R.diffed,vo=R.__c,wo=R.unmount;function Gt(e,t){R.__h&&R.__h(ne,e,Kt||t),Kt=0;var r=ne.__H||(ne.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Yr}),r.__[e]}function ze(e){return Kt=1,yo(ko,e)}function yo(e,t,r){var n=Gt(ht++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):ko(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=ne,!ne.u)){var a=function(s,l,c){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!i||i.call(this,s,l,c);var d=!1;return f.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=!0)}}),!(!d&&n.__c.props===s)&&(!i||i.call(this,s,l,c))};ne.u=!0;var i=ne.shouldComponentUpdate,o=ne.componentWillUpdate;ne.componentWillUpdate=function(s,l,c){if(this.__e){var f=i;i=void 0,a(s,l,c),i=f}o&&o.call(this,s,l,c)},ne.shouldComponentUpdate=a}return n.__N||n.__}function Tt(e,t){var r=Gt(ht++,3);!R.__s&&ea(r.__H,t)&&(r.__=e,r.i=t,ne.__H.__h.push(r))}function Ee(e,t){var r=Gt(ht++,4);!R.__s&&ea(r.__H,t)&&(r.__=e,r.i=t,ne.__h.push(r))}function ge(e){return Kt=5,gt(function(){return{current:e}},[])}function Qd(e,t,r){Kt=6,Ee(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function gt(e,t){var r=Gt(ht++,7);return ea(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function eu(e,t){return Kt=8,gt(function(){return e},t)}function _o(e){var t=ne.context[e.__c],r=Gt(ht++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(ne)),t.props.value):e.__}function tu(e,t){R.useDebugValue&&R.useDebugValue(t?t(e):e)}function ru(){var e=Gt(ht++,11);if(!e.__){for(var t=ne.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function nu(){for(var e;e=ho.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Jr),e.__H.__h.forEach(Qn),e.__H.__h=[]}catch(t){e.__H.__h=[],R.__e(t,e.__v)}}R.__b=function(e){ne=null,go&&go(e)},R.__r=function(e){bo&&bo(e),ht=0;var t=(ne=e.__c).__H;t&&(Xn===ne?(t.__h=[],ne.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Yr,r.__N=r.i=void 0})):(t.__h.forEach(Jr),t.__h.forEach(Qn),t.__h=[],ht=0)),Xn=ne},R.diffed=function(e){mo&&mo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ho.push(t)!==1&&po===R.requestAnimationFrame||((po=R.requestAnimationFrame)||au)(nu)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Yr&&(r.__=r.__V),r.i=void 0,r.__V=Yr})),Xn=ne=null},R.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Jr),r.__h=r.__h.filter(function(n){return!n.__||Qn(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],R.__e(n,r.__v)}}),vo&&vo(e,t)},R.unmount=function(e){wo&&wo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Jr(n)}catch(a){t=a}}),r.__H=void 0,t&&R.__e(t,r.__v))};var xo=typeof requestAnimationFrame=="function";function au(e){var t,r=function(){clearTimeout(n),xo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);xo&&(t=requestAnimationFrame(r))}function Jr(e){var t=ne,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),ne=t}function Qn(e){var t=ne;e.__c=e.__(),ne=t}function ea(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function ko(e,t){return typeof t=="function"?t(e):t}var iu=Symbol.for("preact-signals");function ta(){if(Yt>1)Yt--;else{for(var e,t=!1;ur!==void 0;){var r=ur;for(ur=void 0,ra++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Co(r))try{r.c()}catch(a){t||(e=a,t=!0)}r=n}}if(ra=0,Yt--,t)throw e}}var Z=void 0,ur=void 0,Yt=0,ra=0,Zr=0;function So(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function ye(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ye.prototype.brand=iu,ye.prototype.h=function(){return!0},ye.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)},ye.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ye.prototype.subscribe=function(e){var t=this;return Xr(function(){var r=t.value,n=Z;Z=void 0;try{e(r)}finally{Z=n}})},ye.prototype.valueOf=function(){return this.value},ye.prototype.toString=function(){return this.value+""},ye.prototype.toJSON=function(){return this.value},ye.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(ye.prototype,"value",{get:function(){var e=So(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ra>100)throw new Error("Cycle detected");this.v=e,this.i++,Zr++,Yt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ta()}}}});function Ne(e){return new ye(e)}function Co(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 Eo(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function $o(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Jt(e){ye.call(this,void 0),this.x=e,this.s=void 0,this.g=Zr-1,this.f=4}(Jt.prototype=new ye).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Zr))return!0;if(this.g=Zr,this.f|=1,this.i>0&&!Co(this))return this.f&=-2,!0;var e=Z;try{Eo(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Z=e,$o(this),this.f&=-2,!0},Jt.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)}ye.prototype.S.call(this,e)},Jt.prototype.U=function(e){if(this.t!==void 0&&(ye.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)}},Jt.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(Jt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=So(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ou(e){return new Jt(e)}function Ao(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Yt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,na(e),n}finally{Z=r,ta()}}}function na(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ao(e)}function su(e){if(Z!==this)throw new Error("Out-of-order effect");$o(this),Z=e,this.f&=-2,8&this.f&&na(this),ta()}function fr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}fr.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()}},fr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ao(this),Eo(this),Yt++;var e=Z;return Z=this,su.bind(this,e)},fr.prototype.N=function(){2&this.f||(this.f|=2,this.o=ur,ur=this)},fr.prototype.d=function(){this.f|=8,1&this.f||na(this)};function Xr(e){var t=new fr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var aa;function Zt(e,t){R[e]=t.bind(null,R[e]||function(){})}function Qr(e){aa&&aa(),aa=e&&e.S()}function Io(e){var t=this,r=e.data,n=cu(r);n.value=r;var a=gt(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Yi(a.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=a.peek():(t.__$f|=1,t.setState({}))},ou(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return a.value}Io.displayName="_st",Object.defineProperties(ye.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Io},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Zt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var a in n)if(a!=="children"){var i=n[a];i instanceof ye&&(r||(t.__np=r={}),r[a]=i,n[a]=i.peek())}}e(t)}),Zt("__r",function(e,t){Qr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(a){var i;return Xr(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),Qr(r),e(t)}),Zt("__e",function(e,t,r,n){Qr(),e(t,r,n)}),Zt("diffed",function(e,t){Qr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,a=t.props;if(n){var i=r.U;if(i)for(var o in i){var s=i[o];s!==void 0&&!(o in n)&&(s.d(),i[o]=void 0)}else r.U=i={};for(var l in n){var c=i[l],f=n[l];c===void 0?(c=lu(r,l,f,a),i[l]=c):c.o(f,a)}}}e(t)});function lu(e,t,r,n){var a=t in e&&e.ownerSVGElement===void 0,i=Ne(r);return{o:function(o,s){i.value=o,n=s},d:Xr(function(){var o=i.value.value;n[t]!==o&&(n[t]=o,a?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Zt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var a in n){var i=n[a];i&&i.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Zt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Be.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function cu(e){return gt(function(){return Ne(e)},[])}const $e=Symbol.for("@ts-pattern/matcher"),To=Symbol.for("@ts-pattern/isVariadic"),en="@ts-pattern/anonymous-select-key",ia=e=>!!(e&&typeof e=="object"),tn=e=>e&&!!e[$e],ue=(e,t,r)=>{if(tn(e)){const n=e[$e](),{matched:a,selections:i}=n.match(t);return a&&i&&Object.keys(i).forEach(o=>r(o,i[o])),a}if(ia(e)){if(!ia(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],a=[],i=[];for(const o of e.keys()){const s=e[o];tn(s)&&s[To]?i.push(s):i.length?a.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+a.length)return!1;const o=t.slice(0,n.length),s=a.length===0?[]:t.slice(-a.length),l=t.slice(n.length,a.length===0?1/0:-a.length);return n.every((c,f)=>ue(c,o[f],r))&&a.every((c,f)=>ue(c,s[f],r))&&(i.length===0||ue(i[0],l,r))}return e.length===t.length&&e.every((o,s)=>ue(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const a=e[n];return(n in t||tn(i=a)&&i[$e]().matcherType==="optional")&&ue(a,t[n],r);var i})}return Object.is(t,e)},Ae=e=>{var t,r,n;return ia(e)?tn(e)?(t=(r=(n=e[$e]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?pr(e,Ae):pr(Object.values(e),Ae):[]},pr=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Do(...e){if(e.length===1){const[t]=e;return r=>ue(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ue(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function be(e){return Object.assign(e,{optional:()=>sa(e),and:t=>ae(e,t),or:t=>Mo(e,t),select:t=>t===void 0?hr(e):hr(t,e)})}function oa(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[To]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var a;return(a=n[r++])!=null?a:n.at(-1)}}}}))(e),{optional:()=>oa(sa(e)),select:t=>oa(t===void 0?hr(e):hr(t,e))})}function sa(e){return be({[$e]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return t===void 0?(Ae(e).forEach(a=>n(a,void 0)),{matched:!0,selections:r}):{matched:ue(e,t,n),selections:r}},getSelectionKeys:()=>Ae(e),matcherType:"optional"})})}const du=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},uu=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},fu=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function ae(...e){return be({[$e]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return{matched:e.every(a=>ue(a,t,n)),selections:r}},getSelectionKeys:()=>pr(e,Ae),matcherType:"and"})})}function Mo(...e){return be({[$e]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return pr(e,Ae).forEach(a=>n(a,void 0)),{matched:e.some(a=>ue(a,t,n)),selections:r}},getSelectionKeys:()=>pr(e,Ae),matcherType:"or"})})}function W(e){return{[$e]:()=>({match:t=>({matched:!!e(t)})})}}function hr(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return be({[$e]:()=>({match:n=>{let a={[t??en]:n};return{matched:r===void 0||ue(r,n,(i,o)=>{a[i]=o}),selections:a}},getSelectionKeys:()=>[t??en].concat(r===void 0?[]:Ae(r))})})}function Lo(e){return!0}function Ge(e){return typeof e=="number"}function bt(e){return typeof e=="string"}function mt(e){return typeof e=="bigint"}const jo=be(W(Lo)),pu=be(W(Lo)),hu=jo,vt=e=>Object.assign(be(e),{startsWith:t=>{return vt(ae(e,(r=t,W(n=>bt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return vt(ae(e,(r=t,W(n=>bt(n)&&n.endsWith(r)))));var r},minLength:t=>vt(ae(e,(r=>W(n=>bt(n)&&n.length>=r))(t))),length:t=>vt(ae(e,(r=>W(n=>bt(n)&&n.length===r))(t))),maxLength:t=>vt(ae(e,(r=>W(n=>bt(n)&&n.length<=r))(t))),includes:t=>{return vt(ae(e,(r=t,W(n=>bt(n)&&n.includes(r)))));var r},regex:t=>{return vt(ae(e,(r=t,W(n=>bt(n)&&!!n.match(r)))));var r}}),Fo=vt(W(bt)),Ye=e=>Object.assign(be(e),{between:(t,r)=>Ye(ae(e,((n,a)=>W(i=>Ge(i)&&n<=i&&a>=i))(t,r))),lt:t=>Ye(ae(e,(r=>W(n=>Ge(n)&&n<r))(t))),gt:t=>Ye(ae(e,(r=>W(n=>Ge(n)&&n>r))(t))),lte:t=>Ye(ae(e,(r=>W(n=>Ge(n)&&n<=r))(t))),gte:t=>Ye(ae(e,(r=>W(n=>Ge(n)&&n>=r))(t))),int:()=>Ye(ae(e,W(t=>Ge(t)&&Number.isInteger(t)))),finite:()=>Ye(ae(e,W(t=>Ge(t)&&Number.isFinite(t)))),positive:()=>Ye(ae(e,W(t=>Ge(t)&&t>0))),negative:()=>Ye(ae(e,W(t=>Ge(t)&&t<0)))}),gu=Ye(W(Ge)),wt=e=>Object.assign(be(e),{between:(t,r)=>wt(ae(e,((n,a)=>W(i=>mt(i)&&n<=i&&a>=i))(t,r))),lt:t=>wt(ae(e,(r=>W(n=>mt(n)&&n<r))(t))),gt:t=>wt(ae(e,(r=>W(n=>mt(n)&&n>r))(t))),lte:t=>wt(ae(e,(r=>W(n=>mt(n)&&n<=r))(t))),gte:t=>wt(ae(e,(r=>W(n=>mt(n)&&n>=r))(t))),positive:()=>wt(ae(e,W(t=>mt(t)&&t>0))),negative:()=>wt(ae(e,W(t=>mt(t)&&t<0)))}),bu=wt(W(mt)),mu=be(W(function(e){return typeof e=="boolean"})),vu=be(W(function(e){return typeof e=="symbol"})),wu=be(W(function(e){return e==null})),yu=be(W(function(e){return e!=null}));var Dt={__proto__:null,matcher:$e,optional:sa,array:function(...e){return oa({[$e]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return Ae(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const a=(i,o)=>{n[i]=(n[i]||[]).concat([o])};return{matched:t.every(i=>ue(r,i,a)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ae(e[0])})})},set:function(...e){return be({[$e]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,o)=>{r[i]=(r[i]||[]).concat([o])},a=e[0];return{matched:du(t,i=>ue(a,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Ae(e[0])})})},map:function(...e){return be({[$e]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var a;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=e[0])==null?void 0:a.toString()}`);const[i,o]=e;return{matched:uu(t,(s,l)=>{const c=ue(i,l,n),f=ue(o,s,n);return c&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...Ae(e[0]),...Ae(e[1])]})})},record:function(...e){return be({[$e]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const a=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[i,o]=e.length===1?[Fo,e[0]]:e;return{matched:fu(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=c!==null&&ue(i,c,a),d=ue(i,s,a),h=ue(o,l,a);return(d||f)&&h}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Ae(e[0]),...Ae(e[1])]})})},intersection:ae,union:Mo,not:function(e){return be({[$e]:()=>({match:t=>({matched:!ue(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:W,select:hr,any:jo,unknown:pu,_:hu,string:Fo,number:gu,bigint:bu,boolean:mu,symbol:vu,nullish:wu,nonNullable:yu,instanceOf:function(e){return be(W((function(t){return r=>r instanceof t})(e)))},shape:function(e){return be(W(Do(e)))}};let _u=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}};const la={matched:!1,value:void 0};function rn(e){return new xu(e,la)}let xu=class ni{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let a;t.length===3&&typeof t[1]=="function"?a=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,o={};const s=(c,f)=>{i=!0,o[c]=f},l=!n.some(c=>ue(c,this.input,s))||a&&!a(this.input)?la:{matched:!0,value:r(i?en in o?o[en]:o:this.input,this.input)};return new ni(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new ni(this.input,n?{matched:!0,value:r(this.input,this.input)}:la)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=ku){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function ku(e){throw new _u(e)}var Su=0;function u(e,t,r,n,a,i){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Su,__source:a,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return R.vnode&&R.vnode(c),c}function Oo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Oo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Oo(e))&&(n&&(n+=" "),n+=t);return n}const No=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Po=it,Mt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Po(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(c=>{const f=r==null?void 0:r[c],d=i==null?void 0:i[c];if(f===null)return null;const h=No(f)||No(d);return a[c][h]}),s=r&&Object.entries(r).reduce((c,f)=>{let[d,h]=f;return h===void 0||(c[d]=h),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:d,className:h,...p}=f;return Object.entries(p).every(g=>{let[v,_]=g;return Array.isArray(_)?_.includes({...i,...s}[v]):{...i,...s}[v]===_})?[...c,d,h]:c},[]);return Po(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function Ro(e,t){for(var r in t)e[r]=t[r];return e}function ca(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function da(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ua(e){this.props=e}function Cu(e,t){function r(a){var i=this.props.ref,o=i==a.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,a)||!o:ca(this.props,a)}function n(a){return this.shouldComponentUpdate=r,Oe(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ua.prototype=new Be).isPureReactComponent=!0,ua.prototype.shouldComponentUpdate=function(e,t){return ca(this.props,e)||ca(this.state,t)};var Vo=R.__b;R.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Vo&&Vo(e)};var Eu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function fa(e){function t(r){var n=Ro({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Eu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Bo=function(e,t){return e==null?null:at(at(e).map(t))},$u={map:Bo,forEach:Bo,count:function(e){return e?at(e).length:0},only:function(e){var t=at(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:at},Au=R.__e;R.__e=function(e,t,r,n){if(e.then){for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),a.__c(e,t)}Au(e,t,r,n)};var zo=R.unmount;function Uo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Ro({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Uo(n,t,r)})),e}function qo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return qo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function gr(){this.__u=0,this.t=null,this.__b=null}function Wo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ho(e){var t,r,n;function a(i){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return Oe(r,i)}return a.displayName="Lazy",a.__f=!0,a}function br(){this.u=null,this.o=null}R.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),zo&&zo(e)},(gr.prototype=new Be).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var a=Wo(n.__v),i=!1,o=function(){i||(i=!0,r.__R=null,a?a(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=qo(c,c.__c.__P,c.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},gr.prototype.componentWillUnmount=function(){this.t=[]},gr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Uo(this.__b,r,n.__O=n.__P)}this.__b=null}var a=t.__a&&Oe(ce,null,e.fallback);return a&&(a.__h=null),[Oe(ce,null,t.__a?null:e.children),a]};var Ko=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Iu(e){return this.getChildContext=function(){return e.context},e.children}function Tu(e){var t=this,r=e.i;t.componentWillUnmount=function(){It(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,a){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),It(Oe(Iu,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Du(e,t){var r=Oe(Tu,{__v:e,i:t});return r.containerInfo=t,r}(br.prototype=new Be).__a=function(e){var t=this,r=Wo(t.__v),n=t.o.get(e);return n[0]++,function(a){var i=function(){t.props.revealOrder?(n.push(a),Ko(t,e,n)):a()};r?r(i):i()}},br.prototype.render=function(e){this.u=null,this.o=new Map;var t=at(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},br.prototype.componentDidUpdate=br.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ko(e,r,t)})};var Go=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Mu=/^(?: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]/,Lu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ju=/[A-Z0-9]/g,Fu=typeof document<"u",Ou=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Nu(e,t,r){return t.__k==null&&(t.textContent=""),It(e,t),typeof r=="function"&&r(),e?e.__c:null}function Pu(e,t,r){return uo(e,t),typeof r=="function"&&r(),e?e.__c:null}Be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Yo=R.event;function Ru(){}function Vu(){return this.cancelBubble}function Bu(){return this.defaultPrevented}R.event=function(e){return Yo&&(e=Yo(e)),e.persist=Ru,e.isPropagationStopped=Vu,e.isDefaultPrevented=Bu,e.nativeEvent=e};var pa,zu={enumerable:!1,configurable:!0,get:function(){return this.class}},Jo=R.vnode;R.vnode=function(e){typeof e.type=="string"&&(function(t){var r=t.props,n=t.type,a={};for(var i in r){var o=r[i];if(!(i==="value"&&"defaultValue"in r&&o==null||Fu&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Ou(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Lu.test(i)?i=s:n.indexOf("-")===-1&&Mu.test(i)?i=i.replace(ju,"-$&").toLowerCase():o===null&&(o=void 0):s=i="oninput",s==="oninput"&&a[i=s]&&(i="oninputCapture"),a[i]=o}}n=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.value.indexOf(l.props.value)!=-1})),n=="select"&&a.defaultValue!=null&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.multiple?a.defaultValue.indexOf(l.props.value)!=-1:a.defaultValue==l.props.value})),r.class&&!r.className?(a.class=r.class,Object.defineProperty(a,"className",zu)):(r.className&&!r.class||r.class&&r.className)&&(a.class=a.className=r.className),t.props=a})(e),e.$$typeof=Go,Jo&&Jo(e)};var Zo=R.__r;R.__r=function(e){Zo&&Zo(e),pa=e.__c};var Xo=R.diffed;R.diffed=function(e){Xo&&Xo(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),pa=null};var Uu={ReactCurrentDispatcher:{current:{readContext:function(e){return pa.__n[e.__c].props.value}}}};function qu(e){return Oe.bind(null,e)}function Qo(e){return!!e&&e.$$typeof===Go}function Wu(e){return Qo(e)?Xd.apply(null,arguments):e}function Hu(e){return!!e.__k&&(It(null,e),!0)}function Ku(e){return e&&(e.base||e.nodeType===1&&e)||null}var Gu=function(e,t){return e(t)},Yu=function(e,t){return e(t)},Ju=ce;function es(e){e()}function Zu(e){return e}function Xu(){return[!1,es]}var Qu=Ee;function ef(e,t){var r=t(),n=ze({h:{__:r,v:t}}),a=n[0].h,i=n[1];return Ee(function(){a.__=r,a.v=t,da(a.__,t())||i({h:a})},[e,r,t]),Tt(function(){return da(a.__,a.v())||i({h:a}),e(function(){da(a.__,a.v())||i({h:a})})},[e]),r}var Ie={useState:ze,useId:ru,useReducer:yo,useEffect:Tt,useLayoutEffect:Ee,useInsertionEffect:Qu,useTransition:Xu,useDeferredValue:Zu,useSyncExternalStore:ef,startTransition:es,useRef:ge,useImperativeHandle:Qd,useMemo:gt,useCallback:eu,useContext:_o,useDebugValue:tu,version:"17.0.2",Children:$u,render:Nu,hydrate:Pu,unmountComponentAtNode:Hu,createPortal:Du,createElement:Oe,createContext:fo,createFactory:qu,cloneElement:Wu,createRef:Kd,Fragment:ce,isValidElement:Qo,findDOMNode:Ku,Component:Be,PureComponent:ua,memo:Cu,forwardRef:fa,flushSync:Yu,unstable_batchedUpdates:Gu,StrictMode:Ju,Suspense:gr,SuspenseList:br,lazy:Ho,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Uu},tf=["other","few","many","two","one","zero"],ts=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function a(i,o){const s=(t==null?void 0:t[i])??e[i];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,c)=>{var f;return((f=o==null?void 0:o[c])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${i.toString()}”`);let l=n.select(o.count);if(!(l in s)){const c=tf.find(f=>f in s);if(!c)throw new Error(`Missing plural rule for translation key “${i.toString()}”`);l=c}return s[l].replace(/{{(\w+)}}/g,(c,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 “${i.toString()}”.`)}}return a},rs=fo(null),ns=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const a=gt(()=>ts({locale:n,terms:e,overrides:t}),[t,n]);return u(rs.Provider,{value:{t:a,locale:n},children:r})},useTranslation:()=>{const t=_o(rs);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>ts({terms:e,overrides:t,locale:r})}),rf={conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"Sorry, this role closed while you were applying.",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"},{defaultTerms:nf}=ns({submission_redirect_message:"One last step: finish your application on the employer's site.",complete_submission:"Continue on the employer's site",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:af,useTranslation:de,createTFunction:of}=ns({...nf,...rf,error_heading:"Something unexpected happened",flow_closed:"This role is no longer accepting applications.",undo:"Change answer",job_alerts_offer:"Want to hear about similar roles? We can email you at {{email}} when new ones open.",job_alerts_accept:"Get job alerts",job_alerts_decline:"No thanks",job_alerts_privacy:"We'll use your email only for these alerts. You can unsubscribe at any time.",job_alerts_privacy_sender:"{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.",job_alerts_success:"Done. We'll email you about similar roles.",job_alerts_error:"Sorry, we couldn't set that up. Please try again later.",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"}});function ot(e,t){if(!e)throw new Error(t)}var mr=/\b(?:GIR\s*0AA|[a-z]{1,2}\d[\da-z]?\s*\d[a-z]{2}|[a-z](?:\d{2}|\d[a-z])\s*[\da-z]{4})\b/i,as=/^(?:GIR0AA|[A-Z]{1,2}\d[\dA-Z]?\d[A-Z]{2})$/,is=/^[A-Z](?:\d{2}|\d[A-Z])[\dA-Z]{4}$/,os=({postcode:e,label:t="",state:r,country:n})=>{var s,l,c;const a=((e==null?void 0:e.trim())||((s=t.match(mr))==null?void 0:s[0])||"").replace(/\s/g,"").toUpperCase();if(as.test(a))return a.startsWith("BT")?"ni":"gb";if(is.test(a))return"ie";const i=f=>f.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim();if(i(r??"")==="northern ireland"||t.split(",").some(f=>i(f)==="northern ireland"))return"ni";const o=(c=(n==null?void 0:n.trim())||((l=t.split(",").at(-1))==null?void 0:l.trim()))==null?void 0:c.toLowerCase();return o==="united kingdom"||o==="gb"?"gb":o==="ireland"||o==="ie"?"ie":null},sf="https://maps.inploi.com/address",lf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim(),ss=e=>e.split(",").map(t=>lf(t).replace(/^\d+[a-z]?(?:\s*[-/]\s*\d+[a-z]?)?(?:\s+|$)/,"").trim()),ls=e=>as.test(e)?`gb:${e.slice(0,-3)}`:is.test(e)?`ie:${e.slice(0,3)}`:null,cf=(e,t,r)=>{const[n="",a=""]=ss(e),i=ls(t),o=a.replace(mr,"").trim(),s=o&&!["united kingdom","ireland","england","scotland","wales","northern ireland"].includes(o);if(!n||!i&&!s)return null;const l=r.slice(0,3).findIndex(c=>{var p;const f=ss(c);if(!f.includes(n))return!1;const d=((p=c.match(mr))==null?void 0:p[0].replace(/\s/g,"").toUpperCase())??"",h=ls(d);return i&&h?i===h:!!(s&&f.some(g=>g.replace(mr,"").trim()===o))});return l===-1?null:l+1},df=async({query:e,country:t,pickedLabel:r,pickedPostcode:n,pickedCountry:a,pickedState:i,log:o})=>{var l,c,f;if(!t||!t.split(",").every(d=>/^(gb|ie)$/i.test(d.trim())))return;let s;try{const d=new AbortController;s=setTimeout(()=>d.abort(),1500);const h=new URL(sf);h.search=new URLSearchParams({q:e,country:t,limit:"5"}).toString();const p=await fetch(h.href,{signal:d.signal});if(!p.ok)return;const g=await p.json();if(typeof g!="object"||g===null||!("results"in g)||!Array.isArray(g.results)||!("source"in g)||g.source!=="photon"&&g.source!=="mapbox")return;const v=g.results,_=[];for(const B of v){if(typeof B!="object"||B===null||!("label"in B)||typeof B.label!="string")return;_.push(B.label)}const S=((n==null?void 0:n.trim())||((l=r.match(mr))==null?void 0:l[0])||"").replace(/\s/g,"").toUpperCase(),x=cf(r,S,_),L=(f=(c=p.headers.get("Server-Timing"))==null?void 0:c.match(/(?:^|,)\s*lookup\s*;\s*dur=([\d.]+)/))==null?void 0:f[1],j=L===void 0?null:Number(L),F=p.headers.get("X-Geo-Fallback"),V=os({postcode:n,label:r,state:i,country:a});await o({hit:x!==null,rank:x,results:_.length,source:g.source,fallback:F&&/^[a-z0-9_-]{1,64}$/i.test(F)?F:null,ms:j!==null&&Number.isFinite(j)?j:null,region:V})}catch{}finally{clearTimeout(s)}},uf="https://maps.inploi.com",ff=async(e,t,r=Date.now()+2500)=>{t==null||t.throwIfAborted();const n=new AbortController,a=()=>n.abort(t==null?void 0:t.reason);t==null||t.addEventListener("abort",a,{once:!0});let i;try{const o=new Promise((l,c)=>{n.signal.addEventListener("abort",()=>c(n.signal.reason),{once:!0}),i=setTimeout(()=>n.abort(),Math.max(0,r-Date.now()))}),s=await Promise.race([e(n.signal),o]);return t==null||t.throwIfAborted(),s}catch{t==null||t.throwIfAborted();return}finally{clearTimeout(i),t==null||t.removeEventListener("abort",a)}},pf=async(e,t,r)=>await ff(async a=>{const{lookupAddress:i}=await Promise.resolve().then(()=>wh);return a.throwIfAborted(),i({...e,signal:a})},e.signal,r)??{results:await t(),arm:"direct",source:"direct"},hf=e=>{try{const t=new URL("/outcome",uf);t.search=new URLSearchParams({kind:e.kind,surface:e.surface,arm:e.arm,picked:e.picked?"1":"0"}).toString(),t.searchParams.set("source",e.source),e.picked&&e.edited!==void 0&&t.searchParams.set("edited",e.edited?"1":"0"),e.region&&t.searchParams.set("region",e.region),fetch(t.href,{keepalive:!0}).catch(()=>{})}catch{}},ha=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(ha):Object.keys(e).sort().reduce((t,r)=>(t[r]=ha(e[r]),t),{}),gf=e=>{let t=JSON.stringify(ha(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const ga=(e,t)=>t.some(r=>e instanceof r);let cs,ds;function bf(){return cs||(cs=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function mf(){return ds||(ds=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ba=new WeakMap,ma=new WeakMap,nn=new WeakMap;function vf(e){const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{r(Lt(e.result)),a()},o=()=>{n(e.error),a()};e.addEventListener("success",i),e.addEventListener("error",o)});return nn.set(t,e),t}function wf(e){if(ba.has(e))return;const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{r(),a()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),a()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});ba.set(e,t)}let va={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return ba.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Lt(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function us(e){va=e(va)}function yf(e){return mf().includes(e)?function(...t){return e.apply(wa(this),t),Lt(this.request)}:function(...t){return Lt(e.apply(wa(this),t))}}function _f(e){return typeof e=="function"?yf(e):(e instanceof IDBTransaction&&wf(e),ga(e,bf())?new Proxy(e,va):e)}function Lt(e){if(e instanceof IDBRequest)return vf(e);if(ma.has(e))return ma.get(e);const t=_f(e);return t!==e&&(ma.set(e,t),nn.set(t,e)),t}const wa=e=>nn.get(e);function xf(e,t,{blocked:r,upgrade:n,blocking:a,terminated:i}={}){const o=indexedDB.open(e,t),s=Lt(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Lt(o.result),l.oldVersion,l.newVersion,Lt(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),a&&l.addEventListener("versionchange",c=>a(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const kf=["get","getKey","getAll","getAllKeys","count"],Sf=["put","add","delete","clear"],ya=new Map;function fs(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ya.get(t))return ya.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,a=Sf.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(a||kf.includes(r)))return;const i=async function(o,...s){const l=this.transaction(o,a?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),a&&l.done]))[0]};return ya.set(t,i),i}us(e=>({...e,get:(t,r,n)=>fs(t,r)||e.get(t,r,n),has:(t,r)=>!!fs(t,r)||e.has(t,r)}));const Cf=["continue","continuePrimaryKey","advance"],ps={},_a=new WeakMap,hs=new WeakMap,Ef={get(e,t){if(!Cf.includes(t))return e[t];let r=ps[t];return r||(r=ps[t]=function(...n){_a.set(this,hs.get(this)[t](...n))}),r}};async function*$f(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Ef);for(hs.set(r,t),nn.set(r,wa(t));t;)yield r,t=await(_a.get(r)||t.continue()),_a.delete(r)}function gs(e,t){return t===Symbol.asyncIterator&&ga(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ga(e,[IDBIndex,IDBObjectStore])}us(e=>({...e,get(t,r,n){return gs(t,r)?$f:e.get(t,r,n)},has(t,r){return gs(t,r)||e.has(t,r)}}));const bs=()=>xf("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let an;const xa=async e=>{if(typeof indexedDB>"u")return;const t=an??(an=bs());try{return await e(await t)}catch(r){if(!(r instanceof Error&&r.name==="InvalidStateError"))throw r;return an===t&&(an=bs()),e(await an)}},Af=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let on,ka,vr;const ms=()=>{if(!on)return vr;const e=on;on=void 0;const t=ln(e),r=xa(n=>n.put("state",Af(e.data),t)).finally(()=>{vr===r&&(vr=void 0)});return vr=r,vr},ke={getStateData:async(e,t,r)=>{const n=ln({...e,flowKeys:t,context:r});return xa(a=>a.get("state",n))},getAllStateData:async()=>await xa(e=>e.getAll("state"))??[],setStateData:e=>{on=e,clearTimeout(ka),ka=setTimeout(()=>{ms()},1e3)},flushStateData:()=>(clearTimeout(ka),ms()??Promise.resolve())},Xt=e=>t=>t?t.type===e:!1,If=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),vs=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:If()}),Tf=e=>rn(e).with({nativeEvent:{submitter:Dt.select(Dt.union(Dt.instanceOf(HTMLButtonElement),Dt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),sn=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const a=e.find(c=>c.id===t.nextId);if(a===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,o=e.find(c=>c.id===i),s=t.type.includes("question")?1:0;if(o){const c=s+Math.max(sn(e,a,r,n+s).remainingSteps,sn(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}}const l=s+sn(e,a,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Df=e=>{const t={},r=e.find(n=>n.isHead);return r&&sn(e,r,(n,a)=>{t[n]=a}),t},ln=e=>[...e.flowKeys,e.id,e.version,e.build,gf(e.hostContext??e.context)].join("/"),Mf=({data:e,nodes:t})=>{const r=e.startedWriteNodeIds===void 0?t.some(n=>n.type==="integration-application-submit"&&e.nodeHistory.includes(n.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!r&&mi(t,e.submissions)},ws=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||mi(t,e.submissions))},Je=Ne({state:"idle"}),Sa=new Set,jt=e=>{const{state:t,flow:r}=Je.value;if(t!=="loaded")return;ot(r,"No flow to update");const n=e(r.data);r.data=n,Je.value={state:t,flow:r},ke.setStateData(r)},O={current$:Je,viewState$:Ne("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:a,title:i,analytics:o,job:s,employer:l,locationOrigin:c})=>{await ke.flushStateData().catch(()=>{});const f=await ke.getStateData(t,a,r),d=f??vs(),h=ln({...t,flowKeys:a,context:r}),p=f!==void 0&&!Sa.has(h)&&Mf({data:d,nodes:t.nodes});return p||Sa.add(h),{jobAlerts:e,data:d,offerResume:p,startedAt:new Date,nodeIdToProgress:Df(t.nodes),flowKeys:a,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:n===void 0?r:Pn(n,r),hostContext:n===void 0?void 0:r,title:i,analytics:o,job:s,employer:l,locationOrigin:c}},commitFlow:e=>{Je.value={state:"loaded",flow:e},ke.setStateData(e)},settleResume:e=>{e.offerResume=!1,Sa.add(ln(e))},cancelCurrentFlow:()=>{Je.value={state:"idle"},O.viewState$.value="closed"},markAsFinished:()=>jt(e=>({...e,isFinished:!0})),markAsInteracted:()=>jt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>jt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{jt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await ke.flushStateData()},restart:()=>{const{state:e,flow:t}=Je.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r={...vs(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},n={...t,data:r,startedAt:new Date,offerResume:!1};Je.value={state:e,flow:n},ke.setStateData(n)},addMessage:(e,t)=>{const r={...e,groupId:t};return jt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Je.value;ot(t==="loaded","Application not loaded");const n=r.data.messages.filter(a=>!a.groupId||!e.includes(a.groupId));r.data.messages=n,ke.setStateData(r)},setSubmission:(e,t)=>jt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>jt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Je.peek().flow===e&&(Je.value={state:"loaded",flow:e}),ke.setStateData(e),await ke.flushStateData()}},ys=({heading:e})=>{const{t}=de();return u("div",{class:"flex flex-grow flex-col items-center justify-center",children:[u("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[u("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),u("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),u("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),u("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),u("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),u("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),u("path",{d:"M38 56h19"})]}),u("div",{class:"flex flex-col gap-2 text-center",children:u("p",{class:"text-error-11 font-bold",children:t(e)})})]})},cn=e=>{const{t}=de();return u("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[u("title",{children:t("loading")}),u("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),u("g",{id:"s1",transform:"translate(12,0)",children:u("g",{id:"s2",transform:"scale(0,0)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s3",transform:"translate(12,12)",children:u("g",{id:"s4",transform:"scale(1,1)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s5",transform:"translate(12,0)",children:u("g",{id:"s6",transform:"scale(0,0)",children:u("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),u("g",{id:"s7",transform:"translate(12,0)",children:u("g",{id:"s8",transform:"scale(0,0)",children:u("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},_s=()=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(cn,{class:"text-neutral-6 h-8 w-8"})}),Lf=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},jf=Mt("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"}}),wr=({class:e,children:t,variant:r,...n})=>u("button",{class:it(jf({variant:r}),e),...n,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),xs=()=>u("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Ff=()=>{if(O.current$.value.state!=="loaded")return null;const e=O.current$.value.flow.nodeIdToProgress,t=O.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return u("div",{class:"bg-accent-3",children:u("div",{style:{width:Lf(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Of=({children:e,params:t,analytics:r,feedbackReady:n})=>{const{t:a}=de(),i=O.viewState$,o=!!t.feedback&&O.current$.value.state==="loaded"&&i.value==="maximised",s=o&&n.value,l=ge(!1);return Tt(()=>{var c,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(c=O.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:f.customProperties}))},[s,r]),u(ce,{children:u("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[u("div",{class:"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:[u("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),u("button",{"aria-label":a("minimize"),onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ca,children:u("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),u("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?u("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:it({hidden:!o}),children:u("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,O.current$.value.state==="loaded"&&u(wr,{class:"mx-1","aria-label":a("restart"),onClick:()=>{O.restart()},children:[u("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),u("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),u(wr,{class:"view-switch mx-1",onTouchStart:Ca,"aria-label":a("minimize"),onClick:()=>i.value="minimised",children:u(xs,{})},"minmax")]})]}),u(Ff,{})]})})};function Ca(){}const Nf=Ho(()=>Promise.resolve().then(()=>tb).then(e=>e.ChatbotBody)),ks=Mt("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"}}}),Ss=Mt("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"}}}),Pf=({open:e,...t})=>{const r=ge(null);return Ee(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),u("dialog",{ref:r,...t})},Rf=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:a,talentBankClient:i,params:o,feedbackReady:s})=>{const{state:l,flow:c}=O.current$.value,f=O.viewState$.value,d=l!=="idle"&&f==="maximised",h=ge(null),p=c?[...c.data.nodeHistory].reverse().map(g=>c.nodes.find(v=>v.id===g)).find(g=>(g==null?void 0:g.type)==="flow-section"):void 0;return u(af,{terms:o.terms,locale:void 0,children:[u(Pf,{open:d,onClose:()=>O.viewState$.value="minimised",children:u("div",{ref:h,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:ks({view:"maximised"}),children:u("div",{class:Ss({view:"maximised"}),children:[u(Of,{params:o,analytics:a,feedbackReady:s,children:p?u(ce,{children:[u("span",{class:"block",children:p.data.title}),u("span",{class:"block truncate text-xs font-normal",children:c==null?void 0:c.title})]}):c==null?void 0:c.title}),rn({state:l,view:f}).with({state:"idle"},()=>null).with({state:"loading"},()=>u(_s,{},"loading")).with({state:"loaded"},()=>u(gr,{fallback:u(_s,{},"loading"),children:u(Nf,{env:e,rpcClient:n,analytics:a,apiClient:r,logger:t,talentBankClient:i})})).with({state:"closed"},()=>u(ys,{heading:"flow_closed"})).with({state:"error"},()=>u(ys,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?u(Vf,{flow:c}):null]})},Vf=({flow:e})=>{const{t}=de();return u("div",{class:ks({view:"minimised",class:"z-100 isolate"}),children:u("div",{class:Ss({view:"minimised"}),children:[u("button",{onClick:()=>{O.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ca,children:u("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),u("div",{class:"flex items-center px-0.5",children:u(wr,{class:"mx-1","aria-label":t("close_application"),onClick:O.cancelCurrentFlow,variant:"white",children:u("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Cs="14.19.0",Bf=(e,t=Cs)=>t===void 0?e:{fetch:(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=new Headers(n==null?void 0:n.headers);return a.set("x-inploi-widget-version",t),e.fetch(r,{...n,headers:Object.fromEntries(a.entries())})}};let yr,Es,dn;const zf=e=>{const t=e.slice(0,e.lastIndexOf("/")+1);return/^https:\/\/[^/?#]+\/@inploi\/plugin-chatbot(?:@[\w.-]+)?\/cdn\/$/.test(t)?t:void 0},$s=(e,t,r)=>{const n=Kl(e,t??`
|
|
30
|
+
`,r);return{...n,stack:n.stack.filter(a=>a.startsWith("index.js:"))}},Ea=e=>$s(e,dn),As=e=>typeof e=="object"&&e!==null&&"status"in e&&typeof e.status=="number"?e.status:void 0,Qt=(e,t,r={})=>yr==null?void 0:yr.send(e,t,{...r,message:"Chatbot widget beacon",widget:"chatbot",key_hash:Es}),Uf=e=>{const t=(r,n,a)=>{if(O.viewState$.value==="closed")return;const i=$s(n,e,a);i.stack.length&&Qt("fatal",jr(n),{phase:"render",error:{...i,via:r}})};window.addEventListener("error",r=>{ql(r)||t("error",r.error,r.message)}),window.addEventListener("unhandledrejection",r=>t("rejection",r.reason))},qf=(e,t,r=Qe&&Qe.tagName.toUpperCase()==="SCRIPT"&&Qe.src||new URL("index.js",document.baseURI).href)=>{const n=Yl();yr||!n||!e||(Es=t?si(t).toString(36):void 0,yr=ac({config:n,version:Cs,env:e,seed:Jl(Gl(),fd)}),dn=zf(r),dn&&Uf(dn))},Wf=e=>{let t={application:void 0,attempts:0,blocked:!1};return{fetch:async(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=O.current$.value.flow;a!==t.application&&(t={application:a,attempts:0,blocked:!1});const i=t,o=++i.attempts,s=performance.now(),l=await e.fetch(r,n).catch(c=>{throw As(c)===void 0&&!(c instanceof Error&&c.name==="AbortError")&&(i.blocked=!0,Qt("submit_blocked",jr(c),{phase:"submit",error:Ea(c),endpoint:"flow_submit",attempt:o,elapsed_ms:Math.round(performance.now()-s),body_kb:typeof(n==null?void 0:n.body)=="string"?Math.round(n.body.length/1024):void 0})),c});return i.blocked&&Qt("submit_recovered",void 0,{phase:"submit",endpoint:"flow_submit",attempt:o}),l}}},Hf='[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-\\[44px\\]{min-height:44px}[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-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] .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}}',Is="inploi-chatbot",$a=`[data-widget='${Is}']`,Kf=()=>({getChatbotElement:()=>document.querySelector($a),getOrCreateChatbotElement:()=>{const e=document.querySelector($a);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Is,t}});var Gf="9.15.0",Ts=`https://sdk.inploi.com/@inploi/flows@${Gf}/cdn/captcha/index.html`,Yf=new URL(Ts).origin,Ds=3e4,Jf=5*6e4,Zf=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",Aa=new WeakMap,Xf=e=>{let t=Aa.get(e);return t||(t=e.fetch("/flow/captcha").then(r=>{let n=r==null?void 0:r.site_key;return typeof n=="string"&&n!==""?n:void 0}).catch(r=>{throw Aa.delete(e),r}),Aa.set(e,t)),t},Qf=(e,t={})=>new Promise((r,n)=>{let{signal:a,container:i=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,c=()=>{},f=v=>{l||(l=!0,clearTimeout(p),a==null||a.removeEventListener("abort",h),c(),v())},d=v=>f(()=>n(new Error(v))),h=()=>d("Captcha aborted"),p,g=v=>{clearTimeout(p),p=setTimeout(()=>d("Captcha timed out"),v)};if(g(Ds),a==null?void 0:a.aborted)return h();a==null||a.addEventListener("abort",h),(async()=>{let v=await Xf(e);if(v===void 0)return f(()=>r(void 0));if(l)return;let _=document.createElement("iframe");_.src=`${Ts}?${new URLSearchParams({sitekey:v,origin:window.location.origin,...o&&{theme:o}}).toString()}`,_.title="Cloudflare security check",_.style.cssText=`display:block;border:0;width:${i?"100%":"300px"};height:0;color-scheme:normal`,i?i.appendChild(_):(_.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(_));let S=!1,x=L=>{if(!_.contentWindow||L.source!==_.contentWindow||L.origin!==Yf||!Zf(L.data))return;let j=L.data;switch(j.type){case"token":return f(()=>r(j.token));case"resize":_.style.height=`${Math.max(0,Math.ceil(j.height))}px`;return;case"before-interactive":return S=!0,g(Jf),s==null?void 0:s();case"after-interactive":return S=!1,g(Ds);case"error":!S&&!j.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("Captcha timed out")}};window.addEventListener("message",x),c=()=>{window.removeEventListener("message",x),_.remove()}})().catch(v=>f(()=>n(v)))}),Ms=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[a,...i]=e.compareKey.split(".");if(!a)return!1;let o=vi({context:t,key:a,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=or(o.value,i);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=or(o.value,i),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return _r(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return _r(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return _r(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(c=>typeof c=="string")?_r(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"?Nr(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 ${n.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}},_r=(e,{context:t,submissions:r})=>{let n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let a of n)if(Ms({condition:a,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let a of n)if(!Ms({condition:a,context:t,submissions:r,ifBlock:e}))return!1;return!0}},ep=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,tp=(e,{context:t,submissions:r})=>e.replace(ep,(n,a,i="")=>{let[o,...s]=a.trim().split("."),l=vi({key:o,path:s,submissions:r,context:t});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(c=>`${c.name} (${Wt(c.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(c=>c&&c.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"phone":return Nr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=or(l.value,s);switch(typeof c){case"boolean":return c===!0?"true":"false";case"string":return c;case"number":return c.toString();case"object":if(Array.isArray(c)&&c.every(f=>typeof f=="string"))return c.join(", ")}break}}return i});function rp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ia(e,t,r=""){const n=rp(e),a=e==null?void 0:e.length;if(!n||t!==void 0){const o=r&&`"${r}" `,s="",l=n?`length=${a}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Ls(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 np(e,t){Ia(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function Ta(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Da(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ze(e,t){return e<<32-t|e>>>t}const ap=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ip=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function op(e){if(Ia(e),ap)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=ip[e[r]];return t}function sp(e,t={}){const r=(a,i)=>e(i).update(a).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=a=>e(a),Object.assign(r,t),Object.freeze(r)}const lp=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function cp(e,t,r){return e&t^~e&r}function dp(e,t,r){return e&t^e&r^t&r}class up{constructor(t,r,n,a){ve(this,"blockLen");ve(this,"outputLen");ve(this,"padOffset");ve(this,"isLE");ve(this,"buffer");ve(this,"view");ve(this,"finished",!1);ve(this,"length",0);ve(this,"pos",0);ve(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=a,this.buffer=new Uint8Array(t),this.view=Da(this.buffer)}update(t){Ls(this),Ia(t);const{view:r,buffer:n,blockLen:a}=this,i=t.length;for(let o=0;o<i;){const s=Math.min(a-this.pos,i-o);if(s===a){const l=Da(t);for(;a<=i-o;o+=a)this.process(l,o);continue}n.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===a&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ls(this),np(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:a,isLE:i}=this;let{pos:o}=this;r[o++]=128,Ta(this.buffer.subarray(o)),this.padOffset>a-o&&(this.process(n,0),o=0);for(let d=o;d<a;d++)r[d]=0;n.setBigUint64(a-8,BigInt(this.length*8),i),this.process(n,0);const s=Da(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<c;d++)s.setUint32(4*d,f[d],i)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:a,finished:i,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=i,t.length=a,t.pos=s,a%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const yt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),fp=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]),_t=new Uint32Array(64);class pp extends up{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:r,C:n,D:a,E:i,F:o,G:s,H:l}=this;return[t,r,n,a,i,o,s,l]}set(t,r,n,a,i,o,s,l){this.A=t|0,this.B=r|0,this.C=n|0,this.D=a|0,this.E=i|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,r){for(let d=0;d<16;d++,r+=4)_t[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const h=_t[d-15],p=_t[d-2],g=Ze(h,7)^Ze(h,18)^h>>>3,v=Ze(p,17)^Ze(p,19)^p>>>10;_t[d]=v+_t[d-7]+g+_t[d-16]|0}let{A:n,B:a,C:i,D:o,E:s,F:l,G:c,H:f}=this;for(let d=0;d<64;d++){const h=Ze(s,6)^Ze(s,11)^Ze(s,25),p=f+h+cp(s,l,c)+fp[d]+_t[d]|0,v=(Ze(n,2)^Ze(n,13)^Ze(n,22))+dp(n,a,i)|0;f=c,c=l,l=s,s=o+p|0,o=i,i=a,a=n,n=p+v|0}n=n+this.A|0,a=a+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(n,a,i,o,s,l,c,f)}roundClean(){Ta(_t)}destroy(){this.set(0,0,0,0,0,0,0,0),Ta(this.buffer)}}class hp extends pp{constructor(){super(32);ve(this,"A",yt[0]|0);ve(this,"B",yt[1]|0);ve(this,"C",yt[2]|0);ve(this,"D",yt[3]|0);ve(this,"E",yt[4]|0);ve(this,"F",yt[5]|0);ve(this,"G",yt[6]|0);ve(this,"H",yt[7]|0)}}const gp=sp(()=>new hp,lp(1));var js=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Ma=e=>{var t,r;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(r=[...e.data.messages].reverse().find(n=>n.groupId&&e.nodes.some(a=>a.id===n.groupId&&a.type.startsWith("question-"))&&(n.type==="system"||"author"in n&&n.author==="user")))==null?void 0:r.groupId},La=e=>Array.isArray(e)?e.map(La):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,La(r)])):typeof e=="function"?void 0:e,bp=e=>op(gp(new TextEncoder().encode(JSON.stringify(La(e)))));function mp(e,t,r,n){var a;if(n!=null&&n.aborted)return;let i=bp(r),o=(a=e.data).preApplyFingerprints??(a.preApplyFingerprints=[]);if(o.includes(i))return;o.push(i);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(r)}).catch(()=>{let c=o.indexOf(i);c!==-1&&o.splice(c,1)}).finally(()=>{clearTimeout(l)})}var Fs=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Ue=(e,t)=>tp(e,Fs(t)),vp=(e,t)=>_r(e,Fs(t)),Os=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;let n=e.nextId?t.find(a=>a.id===e.nextId):void 0;if(n)return Os({node:n,nodes:t,stopWhen:r})},wp=({childNode:e,nodes:t})=>{let r=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;let a=t.find(o=>o.id===n.branchId);if(!a)return!1;let i=Os({node:a,nodes:t,stopWhen:o=>o.id===e.id});return!(!i||i.id!==e.id)});if(r!=null&&r.nextId)return t.find(n=>n.id===r.nextId)},yp=3,_p=({flow:e,analytics:t,logger:r,talentBankClient:n,context:a,apiClient:i,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:f,onSubmitNetworkError:d,closedRoleBehaviour:h,settledOutcomes:p=h,dateEchoLocale:g,onFlowEnd:v,onInterpret:_,holdBefore:S,forceSubmitConfirmation:x,flowType:L,t:j})=>{var F;let V=new AbortController,B={submitAccepted:!1};(F=e.data).startedWriteNodeIds??(F.startedWriteNodeIds=e.nodes.flatMap(E=>{var T,z;if(E.type!=="integration-application-submit"||!e.data.nodeHistory.includes(E.id))return[];let $=E.data.key?(T=o())==null?void 0:T[E.data.key]:void 0;return($==null?void 0:$.type)==="integration"&&((z=On($.value))==null?void 0:z.verdict)==="not_submitted"?[]:[E.id]}));let k={...t.service,log:E=>t.service.log({...E,customProperties:{...E.customProperties,...t.customProperties}})},C=(E,$)=>{if($.aborted)return;let T=S==null?void 0:S(void 0);return T?T.then(()=>{if(!$.aborted)return v==null?void 0:v(E)}):v==null?void 0:v(E)},I=async(E,$)=>{let T=V.signal;if(T.aborted)return;let z=S==null?void 0:S(E);if(z&&(await z,T.aborted))return;let U=o(),H=s(),oe=(H==null?void 0:H.submitNodeId)===E.id?e.nodes.find(Q=>{var ee;return Q.id===H.fileQuestionNodeId&&Q.type==="question-file"&&((ee=U==null?void 0:U[Q.data.key])==null?void 0:ee.type)!=="file"}):void 0;if(oe)return I(oe,$);_==null||_(E,$);try{await xp({flow:e,analytics:k,logger:r,talentBankClient:n,apiClient:i,context:a,node:E,submissions:U,applicationRecovery:H,setApplicationRecovery:async Q=>{if(!T.aborted)try{await l(Q)}catch(ee){r.error("Failed to persist application recovery",ee)}},forceSubmitConfirmation:x||(H==null?void 0:H.submitNodeId)===E.id,run:B,persistWriteBarrier:f,onSubmitNetworkError:d,settledOutcomes:p,dateEchoLocale:g,flowType:L,signal:T,t:j,chat:{sendMessage:async Q=>c.send({groupId:E.id,message:Q,signal:T}),userInput:async Q=>c.input({input:Q,signal:T}),setSubmission:(Q,ee)=>{T.aborted||c.setSubmission(Q,ee)},captcha:c.captcha},next:Q=>{if(T.aborted)return;let ee=(H==null?void 0:H.fileQuestionNodeId)===E.id?H.submitNodeId:Q,se=ee?e.nodes.find(Y=>Y.id===ee):wp({childNode:E,nodes:e.nodes});return se?I(se,E):C(E,T)},end:()=>{C(E,T)}})}catch(Q){if(Q instanceof pt)return;throw Q}};return{interpret:async E=>{let $=e.nodes.find(T=>T.id===E)??js(e.nodes);return I($)},undo:E=>{var Q;if(delete e.data.reviewReplay,((Q=e.data.startedWriteNodeIds)==null?void 0:Q.length)||e.data.isFinished)return{removed:0};let $=Ma(e),T=$?E.lastIndexOf($):-1,z=e.nodes.find(ee=>ee.id===$);if(T===-1||!z)return{removed:0};let U=e.nodes.find(ee=>ee.id===E[E.length-1]);V.abort();let H=E.splice(T);e.data.messages=e.data.messages.filter(ee=>!ee.groupId||!H.includes(ee.groupId)),e.data.currentInput=null;let oe=o();for(let ee of H.slice(1)){let se=e.nodes.find(Y=>Y.id===ee);if(!(!se||!oe||se.id===$)&&("key"in se.data&&se.data.key&&delete oe[se.data.key],"keys"in se.data))for(let Y of Object.values(se.data.keys))typeof Y=="string"&&delete oe[Y]}return V=new AbortController,I(z,U),{removed:H.length}},abort:()=>{V.abort()}}};async function xp(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 Wp({...e,node:t});case"text":return Fp({...e,node:t});case"image":return Op({...e,node:t});case"question-text":return Np({...e,node:t});case"question-enum":return Vp({...e,node:t});case"question-number":return Pp({...e,node:t});case"question-phone":return Rp({...e,node:t});case"question-boolean":return Bp({...e,node:t});case"question-file":return Up({...e,node:t});case"question-address":return zp({...e,node:t});case"end-flow":return qp({...e,node:t});case"if-block":return jp({...e,node:t});case"jump":return Cp({...e,node:t});case"link":return Lp({...e,node:t});case"integration-application-submit":return Dp({...e,node:t});case"add-submission":return Ep({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Sp({...e,node:t});case"feedback":return kp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function kp({next:e,node:t}){e(t.nextId)}async function Sp({next:e,node:t,talentBankClient:r,submissions:n,flow:a,logger:i,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){let c=t.data.scope==="job"?(l=a.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||c!=null)try{s=await r.checkDuplicate({email:wc({key:t.data.email,submissions:n}).toString(),jobId:c,scope:t.data.scope})}catch(f){i.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Cp({next:e,node:t}){e(t.data.targetId)}async function Ep({next:e,node:t,logger:r,submissions:n,context:a}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Ue(t.data.value,{submissions:n,context:a})},e(t.nextId)}var $p=5e3,Ns=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Ap=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?xi:e.throttles?Nn:_i)),Ip=(e,t,r)=>{let{waitMs:n,throttles:a,maintenance:i}=Pc(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...a!==void 0&&{throttles:a},...i&&{maintenance:i}}},Tp=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],ja=e=>e instanceof Error&&Tp.includes(e.name)?e:void 0,Ps=e=>{let t=ja(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Dp({chat:e,next:t,end:r,node:n,logger:a,apiClient:i,submissions:o,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:f,forceSubmitConfirmation:d,flowType:h,run:p,persistWriteBarrier:g,signal:v,onSubmitNetworkError:_,settledOutcomes:S,t:x}){var k,C;let L=async({redirect_url:I,message:E,button_text:$})=>{let{anonymous_id:T,session_id:z}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:E??x("submission_redirect_message")});try{let U=new URL(I);T&&!U.searchParams.has("anonymous_id")&&U.searchParams.set("anonymous_id",T),await e.sendMessage({type:"link",href:U.toString(),text:$??x("complete_submission"),onClick:()=>{if(!z){a.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:z,flow_version:l.version,href:U.toString(),job:l.job}})}})}catch(U){a.error(`Invalid redirect URL: ${I}`,U),e.sendMessage({type:"system",variant:"error",text:x("redirect_url_error")})}};if((k=l.data.startedWriteNodeIds)!=null&&k.includes(n.id)&&(c==null?void 0:c.submitNodeId)!==n.id){let I=(C=l.data.submitRedirects)==null?void 0:C[n.id];return I?(await L(I),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:x("submission_unknown")}),r())}let j=Ns(n.id,l.job),F=0,V=p.submitAccepted&&n.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==n.id,B=async I=>{var _n,xn,ei,Lr,b,m,w,D,A;let E=((_n=l.data.submitCooldown)==null?void 0:_n.key)===j?l.data.submitCooldown:void 0;E&&(E.until=Ap(E));let $=E==null?void 0:E.until;(l.data.reviewRequiresSend===!0&&!V||I!==!0||$!==void 0&&$>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:n.data.submitLabel,...$!==void 0&&{availableAt:$}}}),V=!1;let T;if(n.data.captcha){let y=e.captcha,P=!0;try{T=await Qf(i,{signal:v,container:(y==null?void 0:y.container())??null,theme:y==null?void 0:y.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:x("captcha_check")}).catch(()=>{}).then(()=>{P&&(y==null||y.reveal(!0))})}})}catch(K){if(a.error("Captcha check failed",K),v.aborted)return}finally{P=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:x("submitting")});let{anonymous_id:z,session_id:U}=s.getSessionInfo();if(v.aborted)return;let H=((xn=l.data.startedWriteNodeIds)==null?void 0:xn.includes(n.id))===!0;if((c==null?void 0:c.submitNodeId)===n.id&&await f(void 0),H||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],n.id]),await g().catch(y=>a.error("Failed to persist application write barrier",y)),v.aborted)return;let oe,Q=setTimeout(()=>{oe=e.sendMessage({type:"loading",semantic:"submission-still-working",text:x("submission_still_working")}).catch(y=>a.error("Failed to send submission progress message",y))},$p),ee=mc(),se,Y=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({...ee!==void 0&&{browser_timezone:ee},log_submit:!1,integration_id:n.data.integrationId,anonymous_id:z,session_id:U,job:l.job,flow_build:l.build,...T!==void 0&&{captcha_token:T},submissions:bc(l.nodes,vc(o||{},n.data.submitKeys)),pre_apply:Ln(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{se=y;let P=Ps(y);return(P==null?void 0:P.data)!==void 0?P.data:y});if(clearTimeout(Q),await oe,v.aborted)return;if(se!==void 0&&!ja(se)&&_)return await _(se,v),B(!0);l.data.stagingDestination=jc(Y),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:Y});let $r=(ei=Ps(se))==null?void 0:ei.status,Ar=typeof $r=="number"?$r:void 0,q=On(Y,Ar),Ir=q===void 0&&Ar===429,Pt=S==="terminal"&&((q==null?void 0:q.outcome)==="closed"||(q==null?void 0:q.outcome)==="duplicate"),Rt=l.data.failedAttemptAt,ut=Rt==null?void 0:Rt[j];Rt&&ut!==void 0&&ut>Date.now()&&(ut=Rt[j]=Date.now());let Tr=ut!==void 0&&Date.now()-ut<ki||((Lr=l.data.unconfirmedAttemptKeys)==null?void 0:Lr.includes(j))===!0,ar=(b=ja(se))==null?void 0:b.status,ft=Uc(Y,typeof ar=="number"?ar:void 0);ft&&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:ft.service,response:ft.response,captured:(Y==null?void 0:Y.captured)===!0,flow_type:(h==null?void 0:h())??"CHATBOT_DRAWER",job:l.job,...(q==null?void 0:q.outcome)==="duplicate"&&{outcome:Tr?"duplicate_after_own_attempt":"duplicate"},...ft.outcome&&{outcome:ft.outcome}}});let yn=Pr(Y)||(Y==null?void 0:Y.success)===!0;if((yn||Rr(Y))&&(p.submitAccepted=!0),yn&&((m=l.data.submitCooldown)==null?void 0:m.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(y=>a.error("Failed to persist submit cooldown reset",y))),Pr(Y)){let{redirect_url:y,message:P,button_text:K}=Y.integration_response.data,G={redirect_url:y,message:P,button_text:K};return v.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:G},await g().catch(_e=>a.error("Failed to persist submit redirect",_e)),await L(G),t(n.nextId))}let Dr=Rr(Y);if(Dr)return await e.sendMessage({type:"system",variant:"success",text:Dr.message??x("submission_pending")}),t(n.nextId);if((Y==null?void 0:Y.success)===!0)return n.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:x("submission_completed")}),t(n.nextId);let Mr=zc(q),Vt=Mr!==void 0&&((w=o==null?void 0:o[Mr])==null?void 0:w.type)==="file"?Mr:void 0,Bt=Vt===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===Vt);if(!Bt&&!Pt&&!Ei(q)&&(l.data.submitCooldown=Ip(j,E,q)),(q==null?void 0:q.outcome)!=="duplicate"&&!Ir&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[j]:Date.now()},(D=l.data.unconfirmedAttemptKeys)!=null&&D.includes(j)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==j))),(q==null?void 0:q.verdict)==="not_submitted"||(q==null?void 0:q.outcome)==="duplicate"||(q==null?void 0:q.outcome)==="closed"||Ir||Mc(Y,Ar)?(H||(l.data.startedWriteNodeIds=(A=l.data.startedWriteNodeIds)==null?void 0:A.filter(y=>y!==n.id)),(c==null?void 0:c.submitNodeId)===n.id&&await f(c),await g().catch(y=>a.error("Failed to persist application write barrier release",y))):await g().catch(y=>a.error("Failed to persist submit cooldown",y)),q){if(a.error(se??q.message),Bt&&Vt!==void 0)return e.setSubmission(Vt,null),await f({fileQuestionNodeId:Bt.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:x("submission_unreadable_document")}),t(Bt.id);if(q.outcome==="duplicate")return await e.sendMessage({type:"system",variant:Pt?"success":"info",semantic:"submission-duplicate",text:x(Tr?"submission_duplicate_earlier_attempt":"submission_duplicate")}),Pt?(delete l.data.submitCooldown,r()):B(!1);if(q.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:x("submission_closed")}),Pt?(delete l.data.submitCooldown,r()):B(!1);let y=Nc(q);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?x("submission_provider_maintenance_later"):x("submission_provider_maintenance",{time:Ci(y.until,void 0)})}),B(!1)):q.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:x(Bc(q)?"submission_unknown_do_not_resubmit":"submission_unknown")}),B(!1)):Ei(q)?Rc(Y)?(await e.sendMessage({type:"text",author:"bot",text:q.message}),B(!1)):(F===0&&await e.sendMessage({type:"system",variant:"warning",text:x("captcha_failed")}),F++,B(F<=yp)):Vc(q)?(await e.sendMessage({type:"system",variant:"error",text:x("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:x("submission_failed")}),r())}return a.error(se??Y),Ir?(await e.sendMessage({type:"system",variant:"error",text:x("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:x("submission_failed")}),r())};await B(d===!0&&!V?!1:n.data.skipConfirmation)}var Mp=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,Rs=(e,t)=>{if(!Mp.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function Lp({chat:e,next:t,node:r,submissions:n,context:a,analytics:i,flow:o}){let s=Ue(r.data.href,{submissions:n,context:a}),{flowSessionId:l}=o.data;await e.sendMessage({type:"link",href:s,text:Ue(r.data.cta,{submissions:n,context:a}),...Rs(r.data.href,s)&&{onClick:()=>{i.log({event:"FLOW_REDIRECT",properties:{flow_build:o.build,flow_id:o.id,flow_session_id:l,flow_version:o.version,href:s,job:o.job}})}}}),t(r.nextId)}async function jp({submissions:e,next:t,node:r,context:n}){t(vp(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Fp({chat:e,next:t,node:r,submissions:n,context:a}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.text,{submissions:n,context:a})}),t(r.nextId)}async function Op({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Np({chat:e,next:t,node:r,submissions:n,context:a,t:i,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let s=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars,multiline:r.data.format==="text"&&r.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Nr(s.value):r.data.format==="date"&&o!==void 0?Wc(s.value,o):s.value}),t(r.nextId)}async function Pp({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Rp({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Nr(o.value):o.value}),t(r.nextId)}async function Vp({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function Bp({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function zp({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});let a=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,line2Required:r.data.line2Required,placeholder:r.data.placeholder}});if(a===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:n("skipped")});else{let i=Object.values(a.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:i})}return t(r.nextId)}async function Up({node:e,chat:t,next:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Ue(e.data.question,{submissions:n,context:a})});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:i("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function qp({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function Wp({node:e,flow:t,submissions:r,chat:n,next:a,apiClient:i,analytics:o,signal:s,context:l}){let c=gc(t.nodes,r||{}),{answers:f,...d}=c;if(n.setSubmission(e.data.key,{type:"integration",value:d}),mp(t,i,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:Ln(t.nodes,r||{},t.data.flowSessionId)},s),c.status!=="skipped"){let h=[c.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":c.hasHardConcerns?e.data.messages.hard:c.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let p of["hard","advisory"]){let g=f.filter(v=>!v.matched&&v.severity===p);g.length&&h.push((p==="hard"?"Role requirements":"Other things to consider")+`
|
|
34
31
|
`+g.map(v=>`• ${v.message}`).join(`
|
|
35
|
-
`))}await n.sendMessage({type:"text",author:"bot",text:
|
|
32
|
+
`))}await n.sendMessage({type:"text",author:"bot",text:h.join(`
|
|
36
33
|
|
|
37
|
-
`)}),c.hasHardConcerns&&e.data.alternativeLink&&await n.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await n.userInput({type:"submit",key:void 0,config:{label:Ue(e.data.continueLabel,{submissions:r,context:l})}})}return a(e.nextId)}const Ps=(e,t,r)=>{var n;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(n=t.analytics)==null?void 0:n.customProperties})},Pa="resume-prompt",dh=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:Pa,signal:r});const n=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:r});return P.removeMessagesSentByNodeIds([Pa]),(n==null?void 0:n.value)!==!1},Ft=({class:e,...t})=>{const{t:r}=oe();return d("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:r("send")}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})})};var st;function Va(e){return{lang:(e==null?void 0:e.lang)??(st==null?void 0:st.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(st==null?void 0:st.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(st==null?void 0:st.abortPipeEarly)}}var Ba;function fh(e){return Ba==null?void 0:Ba.get(e)}var za;function ph(e){return za==null?void 0:za.get(e)}var Ua;function hh(e,t){var r;return(r=Ua==null?void 0:Ua.get(e))==null?void 0:r.get(t)}function tr(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function ye(e,t,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??tr(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??hh(e.reference,l.lang)??(c?ph(l.lang):null)??n.message??fh(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Je(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Va())}}}function bh(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function gh(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function mh(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Vs=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},vh=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Bs(e,t){return{kind:"validation",type:"check",reference:Bs,async:!1,expects:null,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&ye(this,"input",r,n),r}}}function zs(e){return{kind:"validation",type:"email",reference:zs,expects:null,async:!1,requirement:vh,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&ye(this,"email",t,r),t}}}function Cr(e,t){return{kind:"validation",type:"max_length",reference:Cr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&ye(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Us(e,t){return{kind:"validation",type:"max_value",reference:Us,async:!1,expects:`<=${e instanceof Date?e.toJSON():tr(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&ye(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():tr(r.value)}),r}}}function rr(e,t){return{kind:"validation",type:"min_length",reference:rr,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&ye(this,"length",r,n,{received:`${r.value.length}`}),r}}}function qs(e,t){return{kind:"validation",type:"min_value",reference:qs,async:!1,expects:`>=${e instanceof Date?e.toJSON():tr(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&ye(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():tr(r.value)}),r}}}function qa(e,t){return{kind:"validation",type:"regex",reference:qa,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&ye(this,"format",r,n),r}}}function Ha(e){return{kind:"transformation",type:"transform",reference:Ha,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Hs(e){return{kind:"validation",type:"url",reference:Hs,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&ye(this,"URL",t,r),t}}}function wh(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Ws(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ks(e,t){return{kind:"schema",type:"array",reference:Ks,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Je(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:a,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else ye(this,"type",r,n);return r}}}function Gs(e){return{kind:"schema",type:"boolean",reference:Gs,expects:"boolean",async:!1,message:e,get"~standard"(){return Je(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:ye(this,"type",t,r),t}}}function Ys(e){return{kind:"schema",type:"number",reference:Ys,expects:"number",async:!1,message:e,get"~standard"(){return Je(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ye(this,"type",t,r),t}}}function lt(e,t){return{kind:"schema",type:"object",reference:lt,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Je(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:Ws(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:a,key:o,value:l};for(const u of c.issues)u.path?u.path.unshift(f):u.path=[f],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=wh(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(ye(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else ye(this,"type",r,n);return r}}}function nr(e,t){return{kind:"schema",type:"optional",reference:nr,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Je(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Ws(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Js(e,t){return{kind:"schema",type:"picklist",reference:Js,expects:gh(e.map(tr),"|"),async:!1,options:e,message:t,get"~standard"(){return Je(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ye(this,"type",r,n),r}}}function Zs(e,t,r){return{kind:"schema",type:"record",reference:Zs,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Je(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if(bh(i,l)){const c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){const b={type:"object",origin:"key",input:i,key:l,value:c};for(const p of f.issues)p.path=[b],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:c},a);if(u.issues){const b={type:"object",origin:"value",input:i,key:l,value:c};for(const p of u.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else ye(this,"type",n,a);return n}}}function De(e){return{kind:"schema",type:"string",reference:De,expects:"string",async:!1,message:e,get"~standard"(){return Je(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:ye(this,"type",t,r),t}}}function Xs(e,t,r){const n=e["~run"]({value:t},Va(r));if(n.issues)throw new Vs(n.issues);return n.value}function yh(e,t){const r={};for(const n in e.entries)r[n]=nr(e.entries[n]);return{...e,entries:r,get"~standard"(){return Je(this)}}}function St(...e){return{...e[0],pipe:e,get"~standard"(){return Je(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}async function _h(e,t,r){const n=await e["~run"]({value:t},Va(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const ar=({error:e})=>!e||!e.message?null:d("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[d("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:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"break-words pr-1 text-sm",children:e.message})]}),ct=({class:e,...t})=>{const{t:r}=oe();return d("button",{type:"button",class:it("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:[d("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:[d("title",{children:r("skip")}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Wa={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"},xh=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(Wa).find(n=>e.startsWith(n))??"",r=e.replace(t,"");return/^\d+$/.test(r)?{countryCode:t,phoneNumber:r}:{countryCode:"",phoneNumber:""}};const ir=Mt("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}}),kh="https://api.mapbox.com/search/searchbox/v1/suggest",Sh="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Ch=e=>atob(e).split("").reverse().join(""),ut=lt({name:De()}),Eh=lt({suggestions:Ks(lt({feature_type:nr(De()),full_address:nr(De()),place_formatted:nr(De()),name:nr(De()),mapbox_id:De(),context:yh(lt({address:ut,street:ut,neighborhood:ut,locality:ut,district:ut,place:ut,region:ut,postcode:ut,country:ut}))}))}),$h=e=>(Dt(()=>{e&&Ui(e)},[e]),mt(()=>{var r;const t=(r=P.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,a)=>{var c;const i=e&&Ui(e),o=(c=P.current$.peek().flow)==null?void 0:c.locationOrigin,s=o&&o.lat!==void 0&&o.lng!==void 0&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180;return{...await cf({query:n,country:i,session:t,surface:"chatbot",...s?{lat:o.lat,lng:o.lng}:{},signal:a},async()=>{const f=new URL(kh);return f.searchParams.set("q",n),f.searchParams.set("session_token",t),f.searchParams.set("limit","5"),s&&f.searchParams.set("proximity",`${o.lng},${o.lat}`),f.searchParams.set("access_token",Ch(Sh)),(await Fu(async p=>{const g=new URL(f);p&&g.searchParams.set("country",p);const v=await fetch(g.href,{signal:a});if(!v.ok)throw new Error(`Address lookup failed with ${v.status}`);return Xs(Eh,await v.json()).suggestions},i,a)).map(p=>{var g,v,x,C,_,M,j,D,z;return{country:i,label:p.full_address??([p.name,p.place_formatted].filter(Boolean).join(", ")||p.mapbox_id),id:p.mapbox_id,address:{line1:((g=p.context.address)==null?void 0:g.name)??((v=p.context.street)==null?void 0:v.name),line2:void 0,line3:((x=p.context.neighborhood)==null?void 0:x.name)??((C=p.context.locality)==null?void 0:C.name),city:((_=p.context.place)==null?void 0:_.name)??((M=p.context.district)==null?void 0:M.name),state:(j=p.context.region)==null?void 0:j.name,postcode:((D=p.context.postcode)==null?void 0:D.name)??(p.feature_type==="postcode"?p.name:void 0),country:(z=p.context.country)==null?void 0:z.name}}})}),country:i}}}:{enabled:!1}},[e])),Qs=e=>{const{t}=oe();return d("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:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:t("back")})]})},Ah=({input:e,onSubmitSuccess:t,logger:r,analytics:n,rpcClient:a})=>{const{t:i}=oe(),[o,s]=ze(),{enabled:l,getPredictions:c}=$h(a),[f,u]=ze(l?"query":"manual"),[b,p]=ze(""),[g,v]=ze(),x=he(),C=()=>{var S;(S=x.current)==null||S.controller.abort(),x.current=void 0};Dt(()=>C,[]);const _=he(),M=he(),j=he(!1),D=S=>{const k=S!==null?_.current:void 0,E=(k==null?void 0:k.lookup)??M.current;if(E&&!j.current){j.current=!0;const N=q=>{const B=e.config.keys[q];return S&&B?S.value[B]:void 0},I=N("country")??(k==null?void 0:k.suggestion.address.country)??(k==null?void 0:k.suggestion.country),V=S&&as({postcode:N("postcode")??(k!=null&&k.edited||o==null?void 0:o.postcode),label:k!=null&&k.edited||k==null?void 0:k.suggestion.label,state:N("state")??(k!=null&&k.edited||o==null?void 0:o.state),country:I});uf({kind:"address",surface:"chatbot",...E,picked:!!k,...k?{edited:k.edited}:{},region:V??(I!=null&&I.trim()?"other":null)})}t(S)},z=S=>{var E;if(ot(l,"Query state should not be enabled"),S=S.trim(),S===((E=x.current)==null?void 0:E.query)||S===(g==null?void 0:g.query)&&g.status==="done")return;if(C(),p(S),S===""){v(void 0);return}const k=x.current={query:S,controller:new AbortController};v({query:S,status:"pending"}),c(S,k.controller.signal).then(N=>{x.current===k&&(x.current=void 0,M.current={arm:N.arm,source:N.source},v({query:S,status:"done",items:N.results,...M.current,country:N.country}))},N=>{x.current===k&&(x.current=void 0,M.current={arm:"direct",source:"direct"},r.error("Failed to get address details",N instanceof Vs?"Unexpected response":N),v({query:S,status:"failed",error:i("address_error")}))})},A=(S,k)=>{_.current&&(o==null?void 0:o[S])!==k&&(_.current.edited=!0),s(E=>({...E,[S]:k}))};switch(f){case"query":return ot(l,"Query state should not be enabled"),d(Ih,{input:e,onSkip:()=>D(null),onAddressSelect:(S,k)=>{var N;if(S===""){x.current&&(C(),v(void 0)),u("manual");return}if((g==null?void 0:g.status)!=="done")return;const E=g.items.find(I=>I.id===S);E&&(g.arm!=="inploi"&&of({query:k,country:g.country,pickedLabel:E.label,pickedPostcode:E.address.postcode,pickedCountry:E.address.country,pickedState:E.address.state,log:I=>n.log({event:"ADDRESS_SHADOW_COMPARED",properties:I})}),((N=_.current)==null?void 0:N.suggestion.id)!==S?(s(E.address),_.current={suggestion:E,lookup:{arm:g.arm,source:g.source},edited:!1}):_.current.lookup={arm:g.arm,source:g.source},u("details"))},onAddressSearch:z,lookup:g,query:b});case"details":return ot(o!==void 0),d(el,{input:e,logger:r,onSubmitSuccess:D,addressFields:o,onFieldChange:A,actions:d(Qs,{onClick:()=>{u("query")}})});case"manual":return d(el,{logger:r,input:e,onSubmitSuccess:D,addressFields:o??{},onFieldChange:A,actions:l?d(Qs,{onClick:()=>{u("query")}}):e.config.optional?d(ct,{onClick:()=>D(null)}):void 0})}},Ih=({input:e,onSkip:t,lookup:r,onAddressSelect:n,query:a,onAddressSearch:i})=>{const{t:o}=oe(),s=he(null);return Te(()=>{s.current&&(s.current.focus(),s.current.select())},[]),d(ie,{children:[d("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&i(f)},class:"flex gap-2 p-2.5",children:[d("div",{class:"group relative flex-1",children:[d("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:a,class:ir({optional:!!e.config.optional,className:"w-full rounded-full"})}),d("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:[d("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[d("circle",{cx:"7",cy:"7",r:"4"}),d("path",{d:"M10 10L13 13"})]})}),d("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&d(ct,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?d(ar,{error:{message:r.error}}):null,d("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?d(ie,{children:[d(ln,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),d("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var c;n(l.id,((c=s.current)==null?void 0:c.value)??a??"")},children:[d("span",{class:"flex-grow",children:l.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var l;n("",((l=s.current)==null?void 0:l.value)??a??"")},children:d("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},Ka=["line1","line2","line3","city","state","postcode","country"],el=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:n,input:a})=>{const i=he(null);Te(()=>{if(i.current){const l=i.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(Wa),{t:s}=oe();return d("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{l.preventDefault();const c=l.currentTarget,f=[...c.querySelectorAll("input")].filter(p=>p.value!==""&&!p.value.trim());for(const p of f){p.value="";const g=Ka.find(v=>a.config.keys[v]===p.name);g&&t(g,"")}if(f.length>0&&!c.checkValidity()){c.reportValidity();return}const u=new FormData(c),b=Object.fromEntries(u.entries());r({type:"address",value:b})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:i,children:Ka.map((l,c)=>{const f=`isdk_${l}`,u=a.config.keys[l];return u?d(ie,{children:[d("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)}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:u,id:f,defaultValue:e[l],onChange:b=>t(l,b.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?d("option",{value:e[l],children:e[l]}):d("option",{value:"",children:s("select_country")}),o.map(b=>d("option",{value:b,children:b},b))]}),d("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:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:c===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:u,id:f,defaultValue:e[l],onInput:b=>t(l,b.currentTarget.value),required:l==="line2"?a.config.line2Required===!0:l!=="line3"}),c===Ka.length-1?d("hr",{class:"m-0 w-full border-b border-b-transparent"}):d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),d("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[n,d(Ft,{class:"ml-auto"})]})]})},Ga=()=>{const e=he(null);return Dt(()=>{var t;(t=e.current)==null||t.focus()},[]),e},tl=["true","false"],Th=Js(tl),Dh="answer",rl="flex items-center flex-wrap gap-2 p-2.5",nl="min-w-0 max-w-full flex-auto",al=da(({label:e,...t},r)=>d("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:d("p",{class:"text-center text-base",children:e})})),jh=({input:e,onSubmitSuccess:t})=>{const r=Ga();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const a=Ef(n).value,i=Xs(Th,a);t({type:"boolean",value:i==="true"})},children:[d("ul",{class:rl,children:tl.map((n,a)=>d("li",{class:nl,children:d(al,{ref:a===0?r:null,type:"submit",name:Dh,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(ct,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},il=e=>e.reduce((t,r)=>t+r.sizeKb,0),Mh=Qt("file"),ol=3,dn=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Oh=({file:e,class:t,...r})=>{const{t:n}=oe(),[a,i]=dn(e.name);return d("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"sr-only",children:[n("file_name"),": "]}),d("span",{class:"block truncate",children:a}),d("span",{children:i})]}),d("p",{class:"text-accent-11",children:[d("span",{class:"sr-only",children:[n("file_size"),": "]}),Ht(e.sizeKb)]})]})},sl=({class:e,...t})=>d("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Lh=(e,t)=>{const[r,n]=dn(e);return`${r.slice(0,t)}${n}`},ll=e=>({name:Lh(e.name,42),sizeKb:e.size/1e3}),Fh=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Nh=(e,t,r)=>{const n=dn(t.name)[1].toLowerCase(),a=[...r.map(o=>o.toLowerCase()),...Fh],i=n===""?"none":a.includes(n)?n:"other";return`chatbot-file-refused:${e}:${i}`},Rh=({input:e,onSubmitSuccess:t,analytics:r})=>{var x;const n=(x=P.current$.value.flow)==null?void 0:x.data.submissions[e.key],[a,i]=ze(Mh(n)&&n.value.length?{status:"ready",files:n.value}:{status:"empty"}),o=he(0),s=a.status==="ready"?a.files:[],l=a.status==="ready"||a.status==="pending"?a.files:[],c=a.status==="error"?a.error:void 0,f=l.length-ol,u=il(l),b=Ga(),{t:p}=oe(),g=C=>{if(!C.length)return{reason:"required",error:{type:"required",message:p("validation_file")}};if(!_i(C,e.config.extensions))return{reason:"type",file:C.find(_=>!_i([_],e.config.extensions)),error:{type:"validate",message:p("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(C.some(_=>_.sizeKb===0))return{reason:"empty",file:C.find(_=>_.sizeKb===0),error:{type:"validate",message:p("validation_file_empty")}};if(e.config.fileSizeLimitKib&&il(C)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:p("validation_file_size",{size:Ht(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&C.length>1)return{reason:"count",error:{type:"invalid",message:p("validation_file_max",{count:1})}}},v=(C,_)=>{var M,j;return r.log({event:"INTERACTION",properties:{tag:Nh(C,_,e.config.extensions)},customProperties:(j=(M=P.current$.peek().flow)==null?void 0:M.analytics)==null?void 0:j.customProperties})};return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:C=>{if(C.preventDefault(),a.status==="pending"||a.status==="error")return;const _=g(s);_?i({status:"error",error:_.error}):t({type:"file",value:s})},children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:b,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?d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,ol).map(C=>{const[_,M]=dn(C.name);return d(sl,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:_}),d("span",{children:M})]})}),f>0?d(sl,{children:p("file_more",{count:f})}):null]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-11 text-xs",children:["(",p("file_max_size",{size:Ht(e.config.fileSizeLimitKib)}),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(C=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:C.replace(".","")}))})]})]}),d("p",{role:"status",class:it("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:a.status==="pending"?d(ie,{children:[d(ln,{"aria-hidden":"true",class:"h-4 w-4"}),p("file_preparing",{count:l.length})]}):a.status==="ready"?d(ie,{children:[s.length>1?p("file_total_size",{size:Ht(u)}):Ht(u),d("span",{class:"sr-only",children:[". ",p("file_ready",{count:s.length})]})]}):null}),d("input",{id:"dropzone-file","aria-label":p("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async C=>{ot(C.target instanceof HTMLInputElement);const _=C.target.files?Array.from(C.target.files):[];C.target.value="";const[M]=_;if(!M)return;const j=++o.current,D=a.status==="ready",z=_.map(ll),A=g(z);if(A)return v(A.reason,A.file??M),i({status:"error",error:A.error});i({status:"pending",files:z});let S;try{const k=await Promise.all(_.map(async E=>{try{return{...ll(E),data:await Wc(E)}}catch(N){throw S??(S=E),N}}));o.current===j&&i({status:"ready",files:k})}catch{if(o.current!==j)return;v("unreadable",S??M),i({status:"error",error:{type:"invalid",message:p(D?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(Ft,{disabled:s.length===0}),e.config.optional&&d(ct,{class:"relative",onClick:()=>t(null)})]})]}),d(ar,{error:c})]})};var Er=e=>e.type==="checkbox",Nt=e=>e instanceof Date,je=e=>e==null;const cl=e=>typeof e=="object";var le=e=>!je(e)&&!Array.isArray(e)&&cl(e)&&!Nt(e),Ph=e=>le(e)&&e.target?Er(e.target)?e.target.checked:e.target.value:e,Vh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bh=(e,t)=>e.has(Vh(t)),zh=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},Ya=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function de(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ya&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(le(e)&&zh(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=de(e[a]));return n}var fn=e=>/^\w*$/.test(e),ae=e=>e===void 0,Ja=e=>Array.isArray(e)?e.filter(Boolean):[],Za=e=>Ja(e.replace(/["|']|\]/g,"").split(/\.|\[/)),O=(e,t,r)=>{if(!t||!le(e))return r;const n=(fn(t)?[t]:Za(t)).reduce((a,i)=>je(a)?a:a[i],e);return ae(n)||n===e?ae(e[t])?r:e[t]:n},Ze=e=>typeof e=="boolean",qe=e=>typeof e=="function",X=(e,t,r)=>{let n=-1;const a=fn(t)?[t]:Za(t),i=a.length,o=i-1;for(;++n<i;){const s=a[n];let l=r;if(n!==o){const c=e[s];l=le(c)||Array.isArray(c)?c:isNaN(+a[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ul={BLUR:"blur",FOCUS_OUT:"focusout"},He={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Uh=Se.createContext(null);Uh.displayName="HookFormControlContext";var qh=(e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==He.all&&(t._proxyFormState[o]=!n||He.all),e[o]}});return a};const Hh=typeof window<"u"?Se.useLayoutEffect:Se.useEffect;var Ne=e=>typeof e=="string",Wh=(e,t,r,n,a)=>Ne(e)?(n&&t.watch.add(e),O(r,e,a)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),O(r,i))):(n&&(t.watchAll=!0),r),Xa=e=>je(e)||!cl(e);function Ct(e,t,r=new WeakSet){if(Xa(e)||Xa(t))return Object.is(e,t);if(Nt(e)&&Nt(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const o=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Nt(o)&&Nt(s)||le(o)&&le(s)||Array.isArray(o)&&Array.isArray(s)?!Ct(o,s,r):!Object.is(o,s))return!1}}return!0}const Kh=Se.createContext(null);Kh.displayName="HookFormContext";var dl=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{},$r=e=>Array.isArray(e)?e:[e],fl=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function pl(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const a=e[n],i=t[n];if(a&&le(a)&&i){const o=pl(a,i);le(o)&&(r[n]=o)}else e[n]&&(r[n]=i)}return r}var Ce=e=>le(e)&&!Object.keys(e).length,Qa=e=>e.type==="file",pn=e=>{if(!Ya)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hl=e=>e.type==="select-multiple",ei=e=>e.type==="radio",Gh=e=>ei(e)||Er(e),ti=e=>pn(e)&&e.isConnected;function Yh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=ae(e)?n++:e[t[n++]];return e}function Jh(e){for(const t in e)if(e.hasOwnProperty(t)&&!ae(e[t]))return!1;return!0}function ce(e,t){const r=Array.isArray(t)?t:fn(t)?[t]:Za(t),n=r.length===1?e:Yh(e,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(le(n)&&Ce(n)||Array.isArray(n)&&Jh(n))&&ce(e,r.slice(0,-1)),e}var Zh=e=>{for(const t in e)if(qe(e[t]))return!0;return!1};function bl(e){return Array.isArray(e)||le(e)&&!Zh(e)}function ri(e,t={}){for(const r in e){const n=e[r];bl(n)?(t[r]=Array.isArray(n)?[]:{},ri(n,t[r])):ae(n)||(t[r]=!0)}return t}function or(e,t,r){r||(r=ri(t));for(const n in e){const a=e[n];if(bl(a))ae(t)||Xa(r[n])?r[n]=ri(a,Array.isArray(a)?[]:{}):or(a,je(t)?{}:t[n],r[n]);else{const i=t[n];r[n]=!Ct(a,i)}}return r}const gl={value:!1,isValid:!1},ml={value:!0,isValid:!0};var vl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ae(e[0].attributes.value)?ae(e[0].value)||e[0].value===""?ml:{value:e[0].value,isValid:!0}:ml:gl}return gl},wl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>ae(e)?e:t?e===""?NaN:e&&+e:r&&Ne(e)?new Date(e):n?n(e):e;const yl={isValid:!1,value:null};var _l=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,yl):yl;function xl(e){const t=e.ref;return Qa(t)?t.files:ei(t)?_l(e.refs).value:hl(t)?[...t.selectedOptions].map(({value:r})=>r):Er(t)?vl(e.refs).value:wl(ae(t.value)?e.ref.value:t.value,e)}var Xh=(e,t,r,n)=>{const a={};for(const i of e){const o=O(t,i);o&&X(a,i,o._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}},hn=e=>e instanceof RegExp,Ar=e=>ae(e)?e:hn(e)?e.source:le(e)?hn(e.value)?e.value.source:e.value:e,kl=e=>({isOnSubmit:!e||e===He.onSubmit,isOnBlur:e===He.onBlur,isOnChange:e===He.onChange,isOnAll:e===He.all,isOnTouch:e===He.onTouched});const Sl="AsyncFunction";var Qh=e=>!!e&&!!e.validate&&!!(qe(e.validate)&&e.validate.constructor.name===Sl||le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Sl)),eb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Cl=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Ir=(e,t,r,n)=>{for(const a of r||Object.keys(e)){const i=O(e,a);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Ir(s,t))break}else if(le(s)&&Ir(s,t))break}}};function El(e,t,r){const n=O(e,r);if(n||fn(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=O(t,i),s=O(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};if(s&&s.root&&s.root.type)return{name:`${i}.root`,error:s.root};a.pop()}return{name:r}}var tb=(e,t,r,n)=>{r(e);const{name:a,...i}=e;return Ce(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||He.all))},rb=(e,t,r)=>!e||!t||e===t||$r(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),nb=(e,t,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:(r?n.isOnChange:a.isOnChange)?e:!0,ab=(e,t)=>!Ja(O(e,t)).length&&ce(e,t),ib=(e,t,r)=>{const n=$r(O(e,r));return X(n,"root",t[r]),X(e,r,n),e};function $l(e,t,r="validate"){if(Ne(e)||Array.isArray(e)&&e.every(Ne)||Ze(e)&&!e)return{type:r,message:Ne(e)?e:"",ref:t}}var sr=e=>le(e)&&!hn(e)?e:{value:e,message:""},Al=async(e,t,r,n,a,i)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:f,min:u,max:b,pattern:p,validate:g,name:v,valueAsNumber:x,mount:C}=e._f,_=O(r,v);if(!C||t.has(v))return{};const M=s?s[0]:o,j=I=>{a&&M.reportValidity&&(M.setCustomValidity(Ze(I)?"":I||""),M.reportValidity())},D={},z=ei(o),A=Er(o),S=z||A,k=(x||Qa(o))&&ae(o.value)&&ae(_)||pn(o)&&o.value===""||_===""||Array.isArray(_)&&!_.length,E=dl.bind(null,v,n,D),N=(I,V,q,B=dt.maxLength,G=dt.minLength)=>{const Y=I?V:q;D[v]={type:I?B:G,message:Y,ref:o,...E(I?B:G,Y)}};if(i?!Array.isArray(_)||!_.length:l&&(!S&&(k||je(_))||Ze(_)&&!_||A&&!vl(s).isValid||z&&!_l(s).isValid)){const{value:I,message:V}=Ne(l)?{value:!!l,message:l}:sr(l);if(I&&(D[v]={type:dt.required,message:V,ref:M,...E(dt.required,V)},!n))return j(V),D}if(!k&&(!je(u)||!je(b))){let I,V;const q=sr(b),B=sr(u);if(!je(_)&&!isNaN(_)){const G=o.valueAsNumber||_&&+_;je(q.value)||(I=G>q.value),je(B.value)||(V=G<B.value)}else{const G=o.valueAsDate||new Date(_),Y=Me=>new Date(new Date().toDateString()+" "+Me),me=o.type=="time",Re=o.type=="week";Ne(q.value)&&_&&(I=me?Y(_)>Y(q.value):Re?_>q.value:G>new Date(q.value)),Ne(B.value)&&_&&(V=me?Y(_)<Y(B.value):Re?_<B.value:G<new Date(B.value))}if((I||V)&&(N(!!I,q.message,B.message,dt.max,dt.min),!n))return j(D[v].message),D}if((c||f)&&!k&&(Ne(_)||i&&Array.isArray(_))){const I=sr(c),V=sr(f),q=!je(I.value)&&_.length>+I.value,B=!je(V.value)&&_.length<+V.value;if((q||B)&&(N(q,I.message,V.message),!n))return j(D[v].message),D}if(p&&!k&&Ne(_)){const{value:I,message:V}=sr(p);if(hn(I)&&!_.match(I)&&(D[v]={type:dt.pattern,message:V,ref:o,...E(dt.pattern,V)},!n))return j(V),D}if(g){if(qe(g)){const I=await g(_,r),V=$l(I,M);if(V&&(D[v]={...V,...E(dt.validate,V.message)},!n))return j(V.message),D}else if(le(g)){let I={};for(const V in g){if(!Ce(I)&&!n)break;const q=$l(await g[V](_,r),M,V);q&&(I={...q,...E(V,q.message)},j(q.message),n&&(D[v]=I))}if(!Ce(I)&&(D[v]={ref:M,...I},!n))return D}}return j(!0),D};const ob={mode:He.onSubmit,reValidateMode:He.onChange,shouldFocusError:!0};function sb(e={}){let t={...ob,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:qe(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},a=le(t.defaultValues)||le(t.values)?de(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:de(a),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,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={...f};let b={...u};const p={array:fl(),state:fl()},g=t.criteriaMode===He.all,v=h=>m=>{clearTimeout(c),c=setTimeout(h,m)},x=async h=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||b.isValid||h)){let m;t.resolver?(m=Ce((await S()).errors),C()):m=await E(n,!0),m!==r.isValid&&p.state.next({isValid:m})}},C=(h,m)=>{!t.disabled&&(u.isValidating||u.validatingFields||b.isValidating||b.validatingFields)&&((h||Array.from(s.mount)).forEach(w=>{w&&(m?X(r.validatingFields,w,m):ce(r.validatingFields,w))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Ce(r.validatingFields)}))},_=(h,m=[],w,T,$=!0,y=!0)=>{if(T&&w&&!t.disabled){if(o.action=!0,y&&Array.isArray(O(n,h))){const L=w(O(n,h),T.argA,T.argB);$&&X(n,h,L)}if(y&&Array.isArray(O(r.errors,h))){const L=w(O(r.errors,h),T.argA,T.argB);$&&X(r.errors,h,L),ab(r.errors,h)}if((u.touchedFields||b.touchedFields)&&y&&Array.isArray(O(r.touchedFields,h))){const L=w(O(r.touchedFields,h),T.argA,T.argB);$&&X(r.touchedFields,h,L)}(u.dirtyFields||b.dirtyFields)&&(r.dirtyFields=or(a,i)),p.state.next({name:h,isDirty:I(h,m),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else X(i,h,m)},M=(h,m)=>{X(r.errors,h,m),p.state.next({errors:r.errors})},j=h=>{r.errors=h,p.state.next({errors:r.errors,isValid:!1})},D=(h,m,w,T)=>{const $=O(n,h);if($){const y=O(i,h,ae(w)?O(a,h):w);ae(y)||T&&T.defaultChecked||m?X(i,h,m?y:xl($._f)):B(h,y),o.mount&&!o.action&&x()}},z=(h,m,w,T,$)=>{let y=!1,L=!1;const W={name:h};if(!t.disabled){if(!w||T){(u.isDirty||b.isDirty)&&(L=r.isDirty,r.isDirty=W.isDirty=I(),y=L!==W.isDirty);const K=Ct(O(a,h),m);L=!!O(r.dirtyFields,h),K?ce(r.dirtyFields,h):X(r.dirtyFields,h,!0),W.dirtyFields=r.dirtyFields,y=y||(u.dirtyFields||b.dirtyFields)&&L!==!K}if(w){const K=O(r.touchedFields,h);K||(X(r.touchedFields,h,w),W.touchedFields=r.touchedFields,y=y||(u.touchedFields||b.touchedFields)&&K!==w)}y&&$&&p.state.next(W)}return y?W:{}},A=(h,m,w,T)=>{const $=O(r.errors,h),y=(u.isValid||b.isValid)&&Ze(m)&&r.isValid!==m;if(t.delayError&&w?(l=v(()=>M(h,w)),l(t.delayError)):(clearTimeout(c),l=null,w?X(r.errors,h,w):ce(r.errors,h)),(w?!Ct($,w):$)||!Ce(T)||y){const L={...T,...y&&Ze(m)?{isValid:m}:{},errors:r.errors,name:h};r={...r,...L},p.state.next(L)}},S=async h=>(C(h,!0),await t.resolver(i,t.context,Xh(h||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),k=async h=>{const{errors:m}=await S(h);if(C(h),h)for(const w of h){const T=O(m,w);T?X(r.errors,w,T):ce(r.errors,w)}else r.errors=m;return m},E=async(h,m,w={valid:!0})=>{for(const T in h){const $=h[T];if($){const{_f:y,...L}=$;if(y){const W=s.array.has(y.name),K=$._f&&Qh($._f);K&&u.validatingFields&&C([y.name],!0);const ve=await Al($,s.disabled,i,g,t.shouldUseNativeValidation&&!m,W);if(K&&u.validatingFields&&C([y.name]),ve[y.name]&&(w.valid=!1,m||e.shouldUseNativeValidation))break;!m&&(O(ve,y.name)?W?ib(r.errors,ve,y.name):X(r.errors,y.name,ve[y.name]):ce(r.errors,y.name))}!Ce(L)&&await E(L,m,w)}}return w.valid},N=()=>{for(const h of s.unMount){const m=O(n,h);m&&(m._f.refs?m._f.refs.every(w=>!ti(w)):!ti(m._f.ref))&&ft(h)}s.unMount=new Set},I=(h,m)=>!t.disabled&&(h&&m&&X(i,h,m),!Ct(ne(),a)),V=(h,m,w)=>Wh(h,s,{...o.mount?i:ae(m)?a:Ne(h)?{[h]:m}:m},w,m),q=h=>Ja(O(o.mount?i:a,h,t.shouldUnregister?O(a,h,[]):[])),B=(h,m,w={})=>{const T=O(n,h);let $=m;if(T){const y=T._f;y&&(!y.disabled&&X(i,h,wl(m,y)),$=pn(y.ref)&&je(m)?"":m,hl(y.ref)?[...y.ref.options].forEach(L=>L.selected=$.includes(L.value)):y.refs?Er(y.ref)?y.refs.forEach(L=>{(!L.defaultChecked||!L.disabled)&&(Array.isArray($)?L.checked=!!$.find(W=>W===L.value):L.checked=$===L.value||!!$)}):y.refs.forEach(L=>L.checked=L.value===$):Qa(y.ref)?y.ref.value="":(y.ref.value=$,y.ref.type||p.state.next({name:h,values:de(i)})))}(w.shouldDirty||w.shouldTouch)&&z(h,$,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&Me(h)},G=(h,m,w)=>{for(const T in m){if(!m.hasOwnProperty(T))return;const $=m[T],y=h+"."+T,L=O(n,y);(s.array.has(h)||le($)||L&&!L._f)&&!Nt($)?G(y,$,w):B(y,$,w)}},Y=(h,m,w={})=>{const T=O(n,h),$=s.array.has(h),y=de(m);X(i,h,y),$?(p.array.next({name:h,values:de(i)}),(u.isDirty||u.dirtyFields||b.isDirty||b.dirtyFields)&&w.shouldDirty&&p.state.next({name:h,dirtyFields:or(a,i),isDirty:I(h,y)})):T&&!T._f&&!je(y)?G(h,y,w):B(h,y,w),Cl(h,s)?p.state.next({...r,name:h,values:de(i)}):p.state.next({name:o.mount?h:void 0,values:de(i)})},me=async h=>{o.mount=!0;const m=h.target;let w=m.name,T=!0;const $=O(n,w),y=K=>{T=Number.isNaN(K)||Nt(K)&&isNaN(K.getTime())||Ct(K,O(i,w,K))},L=kl(t.mode),W=kl(t.reValidateMode);if($){let K,ve;const zt=m.type?xl($._f):Ph(h),Et=h.type===ul.BLUR||h.type===ul.FOCUS_OUT,ng=!eb($._f)&&!t.resolver&&!O(r.errors,w)&&!$._f.deps||nb(Et,O(r.touchedFields,w),r.isSubmitted,W,L),ai=Cl(w,s,Et);X(i,w,zt),Et?(!m||!m.readOnly)&&($._f.onBlur&&$._f.onBlur(h),l&&l(0)):$._f.onChange&&$._f.onChange(h);const ii=z(w,zt,Et),ag=!Ce(ii)||ai;if(!Et&&p.state.next({name:w,type:h.type,values:de(i)}),ng)return(u.isValid||b.isValid)&&(t.mode==="onBlur"?Et&&x():Et||x()),ag&&p.state.next({name:w,...ai?{}:ii});if(!Et&&ai&&p.state.next({...r}),t.resolver){const{errors:Vl}=await S([w]);if(C([w]),y(zt),T){const ig=El(r.errors,n,w),Bl=El(Vl,n,ig.name||w);K=Bl.error,w=Bl.name,ve=Ce(Vl)}}else C([w],!0),K=(await Al($,s.disabled,i,g,t.shouldUseNativeValidation))[w],C([w]),y(zt),T&&(K?ve=!1:(u.isValid||b.isValid)&&(ve=await E(n,!0)));T&&($._f.deps&&(!Array.isArray($._f.deps)||$._f.deps.length>0)&&Me($._f.deps),A(w,ve,K,ii))}},Re=(h,m)=>{if(O(r.errors,m)&&h.focus)return h.focus(),1},Me=async(h,m={})=>{let w,T;const $=$r(h);if(t.resolver){const y=await k(ae(h)?h:$);w=Ce(y),T=h?!$.some(L=>O(y,L)):w}else h?(T=(await Promise.all($.map(async y=>{const L=O(n,y);return await E(L&&L._f?{[y]:L}:L)}))).every(Boolean),!(!T&&!r.isValid)&&x()):T=w=await E(n);return p.state.next({...!Ne(h)||(u.isValid||b.isValid)&&w!==r.isValid?{}:{name:h},...t.resolver||!h?{isValid:w}:{},errors:r.errors}),m.shouldFocus&&!T&&Ir(n,Re,h?$:s.mount),T},ne=(h,m)=>{let w={...o.mount?i:a};return m&&(w=pl(m.dirtyFields?r.dirtyFields:r.touchedFields,w)),ae(h)?w:Ne(h)?O(w,h):h.map(T=>O(w,T))},Dr=(h,m)=>({invalid:!!O((m||r).errors,h),isDirty:!!O((m||r).dirtyFields,h),error:O((m||r).errors,h),isValidating:!!O(r.validatingFields,h),isTouched:!!O((m||r).touchedFields,h)}),jr=h=>{const m=h?$r(h):void 0;m==null||m.forEach(w=>ce(r.errors,w)),m?m.forEach(w=>{p.state.next({name:w,errors:r.errors})}):p.state.next({errors:{}})},U=(h,m,w)=>{const T=(O(n,h,{_f:{}})._f||{}).ref,$=O(r.errors,h)||{},{ref:y,message:L,type:W,...K}=$;X(r.errors,h,{...K,...m,ref:T}),p.state.next({name:h,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&T&&T.focus&&T.focus()},Mr=(h,m)=>qe(h)?p.state.subscribe({next:w=>"values"in w&&h(V(void 0,m),w)}):V(h,m,!0),Rt=h=>p.state.subscribe({next:m=>{rb(h.name,m.name,h.exact)&&tb(m,h.formState||u,yn,h.reRenderRoot)&&h.callback({values:{...i},...r,...m,defaultValues:a})}}).unsubscribe,Pt=h=>(o.mount=!0,b={...b,...h.formState},Rt({...h,formState:{...f,...h.formState}})),ft=(h,m={})=>{for(const w of h?$r(h):s.mount)s.mount.delete(w),s.array.delete(w),m.keepValue||(ce(n,w),ce(i,w)),!m.keepError&&ce(r.errors,w),!m.keepDirty&&ce(r.dirtyFields,w),!m.keepTouched&&ce(r.touchedFields,w),!m.keepIsValidating&&ce(r.validatingFields,w),!t.shouldUnregister&&!m.keepDefaultValue&&ce(a,w);p.state.next({values:de(i)}),p.state.next({...r,...m.keepDirty?{isDirty:I()}:{}}),!m.keepIsValid&&x()},Or=({disabled:h,name:m})=>{if(Ze(h)&&o.mount||h||s.disabled.has(m)){const $=s.disabled.has(m)!==!!h;h?s.disabled.add(m):s.disabled.delete(m),$&&o.mount&&!o.action&&x()}},lr=(h,m={})=>{let w=O(n,h);const T=Ze(m.disabled)||Ze(t.disabled);return X(n,h,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:h}},name:h,mount:!0,...m}}),s.mount.add(h),w?Or({disabled:Ze(m.disabled)?m.disabled:t.disabled,name:h}):D(h,!0,m.value),{...T?{disabled:m.disabled||t.disabled}:{},...t.progressive?{required:!!m.required,min:Ar(m.min),max:Ar(m.max),minLength:Ar(m.minLength),maxLength:Ar(m.maxLength),pattern:Ar(m.pattern)}:{},name:h,onChange:me,onBlur:me,ref:$=>{if($){lr(h,m),w=O(n,h);const y=ae($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,L=Gh(y),W=w._f.refs||[];if(L?W.find(K=>K===y):y===w._f.ref)return;X(n,h,{_f:{...w._f,...L?{refs:[...W.filter(ti),y,...Array.isArray(O(a,h))?[{}]:[]],ref:{type:y.type,name:h}}:{ref:y}}}),D(h,!1,void 0,y)}else w=O(n,h,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||m.shouldUnregister)&&!(Bh(s.array,h)&&o.action)&&s.unMount.add(h)}}},pt=()=>t.shouldFocusError&&Ir(n,Re,s.mount),vn=h=>{Ze(h)&&(p.state.next({disabled:h}),Ir(n,(m,w)=>{const T=O(n,w);T&&(m.disabled=T._f.disabled||h,Array.isArray(T._f.refs)&&T._f.refs.forEach($=>{$.disabled=T._f.disabled||h}))},0,!1))},Lr=(h,m)=>async w=>{let T;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let $=de(i);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:y,values:L}=await S();C(),r.errors=y,$=de(L)}else await E(n);if(s.disabled.size)for(const y of s.disabled)ce($,y);if(ce(r.errors,"root"),Ce(r.errors)){p.state.next({errors:{}});try{await h($,w)}catch(y){T=y}}else m&&await m({...r.errors},w),pt(),setTimeout(pt);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ce(r.errors)&&!T,submitCount:r.submitCount+1,errors:r.errors}),T)throw T},Fr=(h,m={})=>{O(n,h)&&(ae(m.defaultValue)?Y(h,de(O(a,h))):(Y(h,m.defaultValue),X(a,h,de(m.defaultValue))),m.keepTouched||ce(r.touchedFields,h),m.keepDirty||(ce(r.dirtyFields,h),r.isDirty=m.defaultValue?I(h,de(O(a,h))):I()),m.keepError||(ce(r.errors,h),u.isValid&&x()),p.state.next({...r}))},Vt=(h,m={})=>{const w=h?de(h):a,T=de(w),$=Ce(h),y=$?a:T;if(m.keepDefaultValues||(a=w),!m.keepValues){if(m.keepDirtyValues){const L=new Set([...s.mount,...Object.keys(or(a,i))]);for(const W of Array.from(L)){const K=O(r.dirtyFields,W),ve=O(i,W),zt=O(y,W);K&&!ae(ve)?X(y,W,ve):!K&&!ae(zt)&&Y(W,zt)}}else{if(Ya&&ae(h))for(const L of s.mount){const W=O(n,L);if(W&&W._f){const K=Array.isArray(W._f.refs)?W._f.refs[0]:W._f.ref;if(pn(K)){const ve=K.closest("form");if(ve){ve.reset();break}}}}if(m.keepFieldsRef)for(const L of s.mount)Y(L,O(y,L));else n={}}i=t.shouldUnregister?m.keepDefaultValues?de(a):{}:de(y),p.array.next({values:{...y}}),p.state.next({values:{...y}})}s={mount:m.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!m.keepIsValid||!!m.keepDirtyValues||!t.shouldUnregister&&!Ce(y),o.watch=!!t.shouldUnregister,o.keepIsValid=!!m.keepIsValid,o.action=!1,m.keepErrors||(r.errors={}),p.state.next({submitCount:m.keepSubmitCount?r.submitCount:0,isDirty:$?!1:m.keepDirty?r.isDirty:!!(m.keepDefaultValues&&!Ct(h,a)),isSubmitted:m.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:$?{}:m.keepDirtyValues?m.keepDefaultValues&&i?or(a,i):r.dirtyFields:m.keepDefaultValues&&h?or(a,h):m.keepDirty?r.dirtyFields:{},touchedFields:m.keepTouched?r.touchedFields:{},errors:m.keepErrors?r.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Bt=(h,m)=>Vt(qe(h)?h(i):h,{...t.resetOptions,...m}),wn=(h,m={})=>{const w=O(n,h),T=w&&w._f;if(T){const $=T.refs?T.refs[0]:T.ref;$.focus&&setTimeout(()=>{$.focus(),m.shouldSelect&&qe($.select)&&$.select()})}},yn=h=>{r={...r,...h}},Nr={control:{register:lr,unregister:ft,getFieldState:Dr,handleSubmit:Lr,setError:U,_subscribe:Rt,_runSchema:S,_updateIsValidating:C,_focusError:pt,_getWatch:V,_getDirty:I,_setValid:x,_setFieldArray:_,_setDisabledField:Or,_setErrors:j,_getFieldArray:q,_reset:Vt,_resetDefaultValues:()=>qe(t.defaultValues)&&t.defaultValues().then(h=>{Bt(h,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:N,_disableForm:vn,_subjects:p,_proxyFormState:u,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(h){o=h},get _defaultValues(){return a},get _names(){return s},set _names(h){s=h},get _formState(){return r},get _options(){return t},set _options(h){t={...t,...h}}},subscribe:Pt,trigger:Me,register:lr,handleSubmit:Lr,watch:Mr,setValue:Y,getValues:ne,reset:Bt,resetField:Fr,clearErrors:jr,unregister:ft,setError:U,setFocus:wn,getFieldState:Dr};return{...Nr,formControl:Nr}}function bn(e={}){const t=Se.useRef(void 0),r=Se.useRef(void 0),[n,a]=Se.useState({isDirty:!1,isValidating:!1,isLoading:qe(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:qe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!qe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=sb(e);t.current={...s,formState:n}}const i=t.current.control;return i._options=e,Hh(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(s=>({...s,isReady:!0})),i._formState.isReady=!0,o},[i]),Se.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Se.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),Se.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),Se.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),Se.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),Se.useEffect(()=>{var o;e.values&&!Ct(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((o=i._options.resetOptions)===null||o===void 0)&&o.keepIsValid||i._setValid(),r.current=e.values,a(s=>({...s}))):i._resetDefaultValues()},[i,e.values]),Se.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Se.useMemo(()=>qh(n,i),[i,n]),t.current}const Il=(e,t,r)=>{if(e&&"reportValidity"in e){const n=O(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},lb=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Il(n.ref,r,e):n.refs&&n.refs.forEach(a=>Il(a,r,e))}},cb=(e,t)=>{t.shouldUseNativeValidation&&lb(e,t);const r={};for(const n in e){const a=O(t.fields,n),i=Object.assign(e[n]||{},{ref:a&&a.ref});if(ub(t.names||Object.keys(e),n)){const o=Object.assign({},O(r,n));X(o,"root",i),X(r,n,o)}else X(r,n,i)}return r},ub=(e,t)=>e.some(r=>r.startsWith(t+"."));var gn=function(e,t,r){return r===void 0&&(r={}),function(n,a,i){try{var o=!i.shouldUseNativeValidation&&i.criteriaMode==="all";return Promise.resolve(_h(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var c=s.issues[0],f=mh(c);if(f&&(l[f]||(l[f]={message:c.message,type:c.type}),o)){var u=l[f].types,b=u&&u[c.type];l[f]=dl(f,o,l,c.type,b?[].concat(b,c.message):c.message)}s.issues.shift()}return{values:{},errors:cb(l,i)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Tl=27,Dl=12,jl=10,db=Qt("enum"),fb=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return gn(lt({checked:St(Zs(De(),Gs()),Ha(n=>Object.entries(n).filter(([a,i])=>i).map(([a,i])=>a)),Cr(r.max,t("validation_multiple_choice_max",{count:r.max})),rr(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},pb=da(({option:e,...t},r)=>d(ie,{children:[d("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),d("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})]})),Ml=Mt("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:rl}}}),hb=({input:e,onSubmitSuccess:t})=>{var f,u;const r=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.maxSelected===1,a=n&&e.config.options.length===2,{t:i}=oe(),{register:o,handleSubmit:s,formState:{errors:l}}=bn({defaultValues:{checked:n?{}:db(r)?Object.fromEntries(r.value.map(b=>[b,!0])):{}},resolver:fb(e.config,i)}),c=Ga();return a?d(ie,{children:[d("ul",{style:{maxHeight:6.5*Tl+5*Dl+2*jl},class:Ml({variant:"booleanLike"}),children:e.config.options.map((b,p)=>d("li",{class:nl,children:d(al,{type:"submit",ref:g=>{g&&p===0&&(c.current=g)},label:b.label,value:"true",onClick:()=>t({type:"enum",value:[b.value]})})},b.value))}),e.config.minSelected===0&&d("div",{class:"px-2 pb-2",children:d(ct,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):d("form",{noValidate:!0,onSubmit:b=>s(p=>{const g=p.checked;t({type:"enum",value:g})})(b),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*Tl+5*Dl+2*jl},class:Ml({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((b,p)=>{const g=`checked.${b.value}`,{ref:v,...x}=o(g);return d("li",{class:"relative",children:d(pb,{option:b,autoFocus:p===0,ref:C=>{C&&p===0&&(c.current=C),v(C)},id:g,...x,onClick:n?()=>t({type:"enum",value:[b.value]}):void 0})},b.value)})}),d("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:d(Ft,{}),e.config.minSelected===0&&d(ct,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(ar,{error:(u=l.checked)==null?void 0:u.root})})]})},bb=Qt("number"),gb=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,a=e.decimalCases??0;return gn(lt({number:St(Ys(t("validation_number")),qs(r,t("validation_number_min",{min:r})),Us(n,t("validation_number_max",{max:n})),Bs(i=>i===Number(i.toFixed(a)),t("validation_number_decimal_cases",{count:a})))}))},mb=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,n=e.key?(u=P.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:a}=oe(),{register:i,handleSubmit:o,formState:{errors:s}}=bn({defaultValues:{number:bb(n)?n.value:r?Number(r):void 0},resolver:gb(e.config,a)}),{ref:l,...c}=i("number",{required:!e.config.optional,valueAsNumber:!0}),f=he();return Te(()=>{f.current&&(f.current.focus(),f.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(b=>{b.number!==void 0&&t({type:"number",value:b.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...c,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:b=>{b&&(f.current=b),l(b)},type:"text",min:e.config.min,max:e.config.max,class:ir({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&&d(ct,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Ft,{})]}),d(ar,{error:s.number})]})},vb="44",wb=/^[0-9 ]+$/,yb=Qt("string"),_b=Qt("phone"),xb=e=>{const t=St(De(e("validation_country_code")),qa(wb,e("validation_country_code"))),r=St(De(e("validation_phone")),rr(1,e("validation_phone")),Ha(n=>n.replace(/[^0-9]/g,"")));return gn(lt({countryCode:t,phoneNumber:r}))},kb=({input:e,onSubmitSuccess:t})=>{var v;const r=e.key?(v=P.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,{t:n}=oe(),[a,i]=ze(),o=yb(r)?xh(r.value):_b(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:c},watch:f}=bn({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??vb,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:xb(n)}),{ref:u,...b}=s("phoneNumber",{required:!e.config.optional}),p=he(),g=f("countryCode");return Te(()=>{p.current&&(p.current.focus(),p.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(x=>{const C=x.phoneNumber.replace(/[^0-9]/g,""),_=x.countryCode.replace(/[^0-9]/g,"");i(void 0);const M=e.config.minChars??7,j=C.length+_.length;if(j<M)return i(n("validation_phone_min_chars",{count:M}));const D=e.config.maxChars;if(D!=null&&j>D)return i(n("validation_max_chars",{count:D}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:_,phoneNumber:C}}):t({type:"string",value:g+x.phoneNumber})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[d("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:[d("span",{children:["+",g]}),d("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Wa).map(([x,C])=>d("option",{value:C,children:[x," (+",C,")"]},x))})]}),d("input",{...b,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(p.current=x),u(x)},class:ir({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&d(ct,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),d(Ft,{})]}),d(ar,{error:c.countryCode||c.phoneNumber||{message:a}})]})},mn=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),Ol=(e,t,r,n)=>r!==void 0&&n*1e3>On?e("submission_available_at",{time:$i(r,t)}):e("submission_cooldown",{count:n}),Sb=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},Cb=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=oe(),{availableAt:a}=e.config,[i,o]=ze(()=>mn(a)),[s,l]=ze("");Dt(()=>{const f=mn(a);if(o(f),f===0)return;l(Ol(r,n,a,f));const u=setInterval(()=>{const b=mn(a);o(b),!(b>0)&&(clearInterval(u),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(u)},[a,n,r]);const c=i>0;return d("div",{class:"flex flex-col items-center gap-2 py-3",children:[d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 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":c,"aria-describedby":c?"submit-cooldown":void 0,onClick:()=>{mn(a)>0||t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:Sb(e.config.label,r)}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})}),c&&d("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:Ol(r,n,a,i)}),d("p",{role:"status",class:"sr-only",children:s})]})},Eb=160,Ll=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Eb)}px`},$b={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Ab=Qt("string"),Ib=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return gn(lt({text:{date:St(De(t("validation_date")),qa(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:St(De(t("validation_email")),zs(t("validation_email")),rr(e.minChars??1,r.minLength),Cr(e.maxChars??1/0,r.maxLength)),text:St(De(),rr(e.minChars??1,r.minLength),Cr(e.maxChars??1/0,r.maxLength)),url:St(De(t("validation_url")),Hs(t("validation_url")),rr(e.minChars??1,r.minLength),Cr(e.maxChars??1/0,r.maxLength))}[e.format]}))},Tb={text:({input:e,onSubmitSuccess:t})=>{var v;const{t:r}=oe(),n=e.key?(v=P.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,a=e.config.defaultValue,i=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:c}}=bn({defaultValues:{text:Ab(n)?n.value:a??""},resolver:Ib(e.config,r)}),{ref:f,...u}=o("text",{required:!e.config.optional}),b=he();Te(()=>{b.current&&(b.current instanceof HTMLTextAreaElement&&Ll(b.current),b.current.focus(),b.current.select())},[]);const p=e.config.maxChars,g=i&&p!==void 0?l("text").length:void 0;return d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(x=>{t({type:"string",value:x.text})}),children:[d("div",{class:i?"flex items-end gap-2":"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-1",children:[i?d("textarea",{id:"chat-input",...u,rows:2,maxLength:p,autoFocus:!0,"aria-describedby":g!==void 0?"chat-input-count":void 0,onInput:x=>Ll(x.currentTarget),onKeyDown:x=>{var C;x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&(x.preventDefault(),(C=x.currentTarget.form)==null||C.requestSubmit())},ref:x=>{x&&(b.current=x),f(x)},placeholder:e.config.placeholder,class:ir({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):d("input",{id:"chat-input",...u,...$b[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(b.current=x),f(x)},placeholder:e.config.placeholder,class:ir({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&d(ct,{class:i?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Ft,{})]}),g!==void 0&&p!==void 0&&d("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[g,"/",p]}),d(ar,{error:c.text})]})},phone:kb,"multiple-choice":hb,boolean:jh,file:Rh,submit:Cb,address:Ah,number:mb},Db=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=P.current$.value.flow)==null?void 0:o.data.currentInput,a=he(null),i=()=>re.onInteractionFn$.value();return Te(()=>{var s;(s=a.current)==null||s.scrollTo({top:0})},[n]),d("div",{ref:a,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:d("div",{class:"flex flex-col",onPointerDownCapture:n?i:void 0,onKeyDownCapture:n?i:void 0,children:n?(()=>{const s=Tb[n.type];return d(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:re.onSubmitSuccessFn$.value,input:n})})():d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:ir({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),d(Ft,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function jb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mb=function(e){return e instanceof RegExp},Ob=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Fl=function(e){return typeof e=="string"},Lb=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Fb(e,t,r){var n=0,a=0;if(e==="")return e;if(!e||!Fl(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=t;Mb(i)||(i=new RegExp("("+Ob(i)+")","gi"));for(var o=e.split(i),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}a=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=a}return o}var Nb=function(t,r,n){return Array.isArray(t)||(t=[t]),Lb(t.map(function(a){return Fl(a)?Fb(a,r,n):a}))};const Tr=jb(Nb),Rb=/(\[[^\]]+\]\([^)]+\))/g,Pb=/\[([^\]]+)\]\(([^)]+)\)/,Vb=/(https?:\/\/[^\s]+)/g,Bb=/_(.*?)_/g,zb=/\*\*(.*?)\*\*/g,Ub=/(\\n|\n)/g,Nl="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",qb=e=>{const t=Tr(e,Rb,(s,l)=>{const[,c,f]=s.match(Pb)??[];return f?d("a",{class:Nl,href:f,children:c??f},f+l):d("span",{children:"INVALID LINK"})}),r=Tr(t,Vb,(s,l)=>d("a",{class:Nl,href:s,children:s},s+l)),n=Tr(r,Bb,(s,l)=>d("em",{children:s},s+l)),a=Tr(n,zb,(s,l)=>d("strong",{children:s},s+l));let i=0;return Tr(a,Ub,()=>d("br",{},`br-${i++}`))},Hb=Mt("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"}}),Wb=({children:e,className:t,animate:r,side:n,...a})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Hb({className:t,side:n,animate:r}),...a,children:e}),Rl=new Map,Pl=tf({overrides:{},locale:void 0}),Kb=(e,t)=>{const r=t==null?void 0:t.trim();if(!r)return e("job_alerts_privacy");const n=e("job_alerts_privacy_sender",{employer:r});return e("job_alerts_privacy")!==Pl("job_alerts_privacy")&&n===Pl("job_alerts_privacy_sender",{employer:r})?e("job_alerts_privacy"):n},Gb=({flow:e,rpcClient:t})=>{const{t:r}=oe(),n=e.data.flowSessionId,a=Rl.get(n)??Le("offer");Rl.set(n,a);const i=l=>{const c=e.data.submissions[l];return(c==null?void 0:c.type)==="string"?c.value.trim():void 0},o=i("email")||e.nodes.flatMap(l=>l.type==="question-text"&&l.data.format==="email"?[i(l.data.key)]:[]).find(l=>!!l);if(!o||a.value==="declined")return null;if(a.value==="success")return d("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(a.value!=="offer"&&a.value!=="error")){a.value="saving";try{await Du(t,{contact:{email:o,first_name:i("first_name"),last_name:i("last_name")},job:e.job}),a.value="success"}catch{a.value="error"}}};return d("div",{class:"bg-neutral-2 flex flex-col gap-2 rounded-xl p-3 text-sm",children:[d("p",{children:r("job_alerts_offer",{email:o})}),a.value==="error"?d("p",{role:"alert",children:r("job_alerts_error")}):null,d("div",{class:"flex gap-2",children:[d("button",{type:"button",class:"bg-accent-9 min-h-[44px] rounded-lg px-3 py-2 text-white",disabled:a.value==="saving",onClick:s,children:r("job_alerts_accept")}),d("button",{type:"button",class:"min-h-[44px] rounded-lg px-3 py-2",disabled:a.value==="saving",onClick:()=>{a.value!=="offer"&&a.value!=="error"||(a.value="declined")},children:r("job_alerts_decline")})]}),d("p",{class:"text-xs",children:Kb(r,e.employer)})]})},Yb=({message:e})=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("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,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Jb=({className:e,...t})=>d("div",{"aria-hidden":!0,children:re.isBotTyping$.value===!0?d("div",{"data-testid":"typing-indicator",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0}),Zb={bot:"left",user:"right"},Xb=Mt("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"}}}),Qb=({env:e,lastSentMessageFooter:t,rpcClient:r})=>{const{t:n}=oe(),a=P.current$.value.flow,i=(a==null?void 0:a.data.messages)??[],o=i.findIndex(l=>l.type==="system"&&l.semantic==="submission-closed"),s=a?Fa(a):void 0;return d("ol",{"aria-label":n("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[i.map((l,c)=>d(ie,{children:[d("li",{class:"flex",tabIndex:c===i.length-1?-1:void 0,children:[s&&l.groupId===s&&!i.slice(c+1).some(f=>f.groupId===s)?t:null,rn(l).with({type:"system"},f=>d("p",{class:Xb({variant:f.variant}),children:f.text})).with({type:"text",author:jt.union("bot","user")},f=>{const u=c===i.length-1,b=f.author==="bot"?qb(f.text):f.text;return d(ie,{children:d(Wb,{animate:u,side:Zb[f.author],children:b},c)})}).with({type:"link"},f=>d(Yb,{message:f})).with({type:"image"},f=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:f.url,style:{aspectRatio:f.width/f.height}})).with({type:"file"},f=>d(Oh,{class:f.author==="bot"?void 0:"ml-auto",file:{name:f.fileName,sizeKb:f.fileSizeKb}})).with({type:"loading"},f=>{const u=i[i.length-1];return!(f===u)||re.isBotTyping$.value||a!=null&&a.data.isFinished?null:d("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[d(ln,{"aria-hidden":f.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),f.text?d("p",{role:"status",class:"text-neutral-11 text-sm",children:f.text}):null]})}).exhaustive()]}),c===o&&(a!=null&&a.jobAlerts)&&r?d("li",{children:d(Gb,{flow:a,rpcClient:r},a.data.flowSessionId)}):null]},c)),e&&e!=="production"&&(a==null?void 0:a.data.isFinished)&&a.data.stagingDestination&&d("li",{class:"text-neutral-11 text-center text-xs",children:a.data.stagingDestination}),d("li",{class:re.captchaVisible$.value?"flex":"hidden",children:d("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":n("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),d(Jb,{},"typing")]})},eg=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:a,env:i})=>{const{flow:o}=P.current$.value;ot(o,"Flow is required to exist to show chatbot body");const s=P.viewState$.value,{chatRef:l,chatService:c}=Wf(),{t:f}=oe(),[u,b]=ze();return Te(()=>{s==="maximised"&&re.scrollToEnd()},[s]),Te(()=>{var A;const{state:p,flow:g}=P.current$.peek();if(p!=="loaded")throw new Error(f("invalid_state"));let v=g.data.nodeHistory.at(-1);if(re.scrollToEnd(),P.setInput(void 0),g.data.isFinished)return;const x=()=>{const S=P.current$.peek().flow;!S||S.data.hasInteracted||(P.markAsInteracted(),Ps(n,S,"FLOW_INTERACT"))};re.onInteractionFn$.value=x,v===void 0?(v=Ls(o.nodes).id,P.setCurrentNodeId(v),Ps(n,g,"FLOW_START")):P.removeMessagesSentByNodeIds([v,Pa]);const{interpret:C,abort:_,undo:M}=Rp({context:o.context,analytics:{service:n,customProperties:(A=o.analytics)==null?void 0:A.customProperties},apiClient:t,logger:e,talentBankClient:a,flow:o,chatService:c,t:f,getApplicationRecovery:()=>{var S;return(S=P.current$.peek().flow)==null?void 0:S.data.applicationRecovery},setApplicationRecovery:P.setApplicationRecovery,persistWriteBarrier:()=>P.persistWriteBarrier(g),getSubmissions:()=>{var S;return(S=P.current$.peek().flow)==null?void 0:S.data.submissions},onInterpret:S=>P.setCurrentNodeId(S.id),onFlowEnd:async()=>{var k;P.markAsFinished();const S=P.current$.peek().flow;ot(S),n.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:S.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(k=o.analytics)==null?void 0:k.customProperties})}}),j=v,D=()=>{b(()=>M),C(j)},z=new AbortController;return g.offerResume?dh({chatService:c,t:f,signal:z.signal}).then(S=>(P.settleResume(g),S?D():(P.restart(),Fe.flushStateData()))).catch(S=>{S instanceof ht||e.error("Resume prompt failed",S)}):D(),()=>{z.abort(),re.onInteractionFn$.value===x&&(re.onInteractionFn$.value=()=>{}),_()}},[n,t,c,e,o,a,f]),d(ie,{children:[d("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[d("div",{ref:l,role:"region","aria-label":f("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:d(Qb,{env:i,rpcClient:r,lastSentMessageFooter:!Fa(o)||!u?null:d(tg,{undoFn:u})})}),re.isReadingHistory$.value&&!o.data.isFinished&&!re.isBotTyping$.value&&d("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:d(xr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var g,v;re.scrollToEnd(),(v=((g=l.current)==null?void 0:g.querySelector('li[tabindex="-1"]'))??l.current)==null||v.focus({preventScroll:!0})},children:d(ws,{})})})]}),d(Db,{logger:e,analytics:n,rpcClient:r})]})},tg=({undoFn:e})=>{const{t}=oe();return d("div",{class:"flex flex-1 items-center justify-end px-1",children:d(xr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=P.current$.peek();ot(r),e(r.data.nodeHistory)},children:d("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"})})})},rg=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:eg},Symbol.toStringTag,{value:"Module"}))})();
|
|
34
|
+
`)}),c.hasHardConcerns&&e.data.alternativeLink&&await n.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await n.userInput({type:"submit",key:void 0,config:{label:Ue(e.data.continueLabel,{submissions:r,context:l})}})}return a(e.nextId)}var Hp=new TextEncoder,Fa=e=>{if(e==null)return 2;if(typeof e=="boolean")return 4;if(typeof e=="number")return Number.isInteger(e)?3+String(e).length:3+String(e).length+17;if(typeof e=="string"){let r=Hp.encode(e).length;return 6+String(r).length+r}let t=Array.isArray(e)?e.map((r,n)=>[n,r]):Object.entries(e);return 5+String(t.length).length+t.reduce((r,[n,a])=>r+Fa(n)+Fa(a),0)},Kp=e=>{let t=e;for(;t.length>1&&Fa(t)>8e3;)t=t.slice(1);return{steps:t.map(r=>({...r})),omitted:e.length-t.length}},Gp=()=>{let e=typeof screen>"u"?0:screen.width;return{pointer:typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches?"coarse":"fine",width:e<480?"xs":e<768?"s":e<1024?"m":"l"}},Yp=(e,t=Date.now,r,n)=>{let a=()=>{var h;return(h=e()).path??(h.path={steps:[],attempts:0})},i,o=t(),s,l=()=>{a().unsent=!0,r==null||r()},c=()=>{o=t(),l()},f=()=>{let h=a().steps.at(-1);return h&&h.o===void 0?h:void 0},d=(h,p)=>{let g=a();if(!g.unsent)return;let{steps:v,omitted:_}=Kp(g.steps);return{trigger:h,steps:v,..._>0&&{steps_omitted:_},...p!==void 0&&{to_node_id:p},idle_ms:t()-o,submit_attempts:g.attempts,...g.result!==void 0&&{submit_result:g.result},...g.cv&&{cv:g.cv},device:Gp(),...g.redirect}};return{shown:h=>{var g;if(i=t(),((g=f())==null?void 0:g.k)===h.key)return;let{steps:p}=a();p.push({k:h.key,i:p.length+1,t:h.inputType}),l()},answered:(h,p)=>{let g=f();!g||p!==void 0&&g.k!==p||(g.o=h?"s":"a",i!==void 0&&(g.ms=t()-i),c())},refused:()=>{let h=f();h&&(h.e=(h.e??0)+1,c())},revised:h=>{let p=h===void 0?void 0:a().steps.findLast(g=>g.k===h);p&&(p.r=(p.r??0)+1,c())},active:()=>{o=t()},cv:h=>{let p=a();p.cv===h||p.cv==="attached"||(p.cv=h,h==="attached"?c():l())},submitted:h=>{let p=a();p.attempts++,p.result=h,h==="redirect"&&(s=t()),l()},redirected:()=>{let h=s===void 0,p=a();p.redirect||(p.redirect={redirect_clicked:!0,...h?{redirect_revisit:!0}:s!==void 0&&{redirect_ms:t()-s}},c())},summary:(h,p)=>{let g=d(h,p);return delete a().unsent,g},peek:d,reset:()=>{e().path={steps:[],attempts:0},i=void 0,s=void 0,o=t()}}};const Vs=new WeakMap,st=e=>{let t=Vs.get(e);return t||(t=Yp(()=>e.data,Date.now,()=>ke.setStateData(e)),Vs.set(e,t)),t},Ft=(e,t,r)=>{var a;const n=st(t).summary(r,t.data.nodeHistory.at(-1));if(n){try{e.log({event:"FLOW_NODE",properties:{flow_id:t.id,flow_version:t.version,flow_build:t.build,flow_session_id:t.data.flowSessionId,flow_type:"CHATBOT_DRAWER",job:t.job,...n},customProperties:(a=t.analytics)==null?void 0:a.customProperties,...(r==="hidden"||r==="pagehide"||r==="redirect")&&{keepalive:!0}}).catch(()=>{})}catch{}ke.setStateData(t)}},Jp=e=>{let t,r;const n=Xr(()=>{const i=O.current$.value.flow,o=O.viewState$.value;t&&t!==i?Ft(e,t,"restart"):i&&o==="minimised"&&r!==o&&Ft(e,i,"minimise"),t=i,r=o}),a=i=>{const o=O.current$.peek().flow;o&&(i.type==="pagehide"?Ft(e,o,"pagehide"):document.visibilityState==="hidden"&&Ft(e,o,"hidden"),ke.flushStateData().catch(()=>{}))};return document.addEventListener("visibilitychange",a),window.addEventListener("pagehide",a),()=>{n(),document.removeEventListener("visibilitychange",a),window.removeEventListener("pagehide",a)}},Zp=(e,t,r)=>({fetch:async(n,a)=>{if(n!=="/flow/submit")return e.fetch(n,a);const i=r.data.nodeHistory.at(-1),o=i===void 0?void 0:Ns(i,r.job),s=(l,c,f=!1)=>{var v,_,S;if((v=a==null?void 0:a.signal)!=null&&v.aborted||O.current$.peek().flow!==r)return;const d=On(l,c),h=o===void 0||(_=r.data.failedAttemptAt)==null?void 0:_[o],p=h!==void 0&&Date.now()-Math.min(h,Date.now())<ki||o!==void 0&&((S=r.data.unconfirmedAttemptKeys)==null?void 0:S.includes(o))===!0,g=f?"network_error":Pr(l)?"redirect":Rr(l)?"pending":typeof l=="object"&&l!==null&&"success"in l&&l.success===!0?"success":(d==null?void 0:d.outcome)==="duplicate"?p?"duplicate_after_own_attempt":"duplicate":(d==null?void 0:d.outcome)??"failed";st(r).submitted(g),Ft(t,r,"submit")};try{const l=await e.fetch(n,a);return s(l),l}catch(l){if(!(l instanceof Error&&l.name==="AbortError")){const c=typeof l=="object"&&l!==null&&"status"in l&&typeof l.status=="number"?l.status:void 0,f=typeof l=="object"&&l!==null&&"data"in l?l.data:void 0;s(f,c,c===void 0)}throw l}}});var Xp=e=>e.type.startsWith("question-");const Qp=25,Bs=Ne(()=>{}),zs=["wheel","touchmove","keydown"],eh=(e,t)=>new Promise((r,n)=>{if(t!=null&&t.aborted)return n(new pt);const a=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(a),n(new pt)},{once:!0})}),ie={onSubmitSuccessFn$:Ne(()=>{}),onInteractionFn$:Ne(()=>{}),isBotTyping$:Ne(!1),captchaVisible$:Ne(!1),themeMode$:Ne("light"),isReadingHistory$:Ne(!1),scrollToEnd:()=>Bs.value()},th=()=>{const e=ge(null),t=ge(-1/0);Ee(()=>{const n=e.current;if(!n)return;const a=()=>{ie.isReadingHistory$.value=!1,n.scrollTo({top:n.scrollHeight,behavior:"instant"})};Bs.value=a;const i=()=>t.current=performance.now(),o=()=>{n.scrollHeight-n.scrollTop-n.clientHeight<=24?ie.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(ie.isReadingHistory$.value=!0)};n.addEventListener("scroll",o,{passive:!0});for(const l of zs)n.addEventListener(l,i,{passive:!0});const s=new ResizeObserver(()=>{ie.isReadingHistory$.peek()||a()});return s.observe(n),n.firstElementChild&&s.observe(n.firstElementChild),()=>{n.removeEventListener("scroll",o);for(const l of zs)n.removeEventListener(l,i);s.disconnect()}},[]);const r=gt(()=>({setSubmission:(a,i)=>O.setSubmission(a,i),captcha:{container:()=>{var a;return((a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))??null},get theme(){return ie.themeMode$.peek()},reveal:a=>{ie.captchaVisible$.value=a,a&&requestAnimationFrame(()=>{var i,o;(o=(i=e.current)==null?void 0:i.querySelector("[data-captcha-slot]"))==null||o.focus(),ie.scrollToEnd()})}},send:async({message:a,signal:i,groupId:o})=>{if(await rn(a).with({author:"bot",type:"text"},async s=>{if(i!=null&&i.aborted)throw new pt;ie.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*Qp;try{await eh(l,i)}finally{ie.isBotTyping$.value=!1}}).otherwise(async()=>{}),i!=null&&i.aborted)throw new pt;O.addMessage(a,o)},input:(({input:a,signal:i})=>{if(i!=null&&i.aborted)throw new pt;const o=O.current$.peek().flow,s=o==null?void 0:o.nodes.find(c=>c.id===o.data.nodeHistory.at(-1)),l=o&&s&&Xp(s)&&s.data.key===a.key?s:void 0;return o&&l&&st(o).shown({key:l.data.key,inputType:l.type.slice(9)}),O.setInput(a),new Promise(c=>{const f=d=>{if(i!=null&&i.aborted)throw new pt;o&&l&&st(o).answered(d===null||d.type==="enum"&&d.value.length===0),t.current=-1/0,O.setInput(void 0),a.key&&O.setSubmission(a.key,d),c(d)};ie.onSubmitSuccessFn$.value=f})})}),[]);return{chatRef:e,chatService:r}};var rh=["1","2","3","4","5","6","7","8","9","10","11","12"],nh={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]}},ah=(e,t=1,r)=>n=>{const[a,i]=nh[r][n];return"oklch("+a+"% "+i*t+" "+e+")"},Oa=e=>{const t=ah(e.hue,e.chroma,e.mode);return Object.fromEntries(rh.map(r=>[e.prefix+r,e.transform(t(r))]))},Na=e=>e,ih=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(a=>{const i=n[a];return[`${String(r)}.${a}`,i]}):[[r,n]]});return Object.fromEntries(t)},un=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Pa=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(un(e)&&un(r))for(const n in r){const a=r[n];if(un(a)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];un(i)&&Pa(i,a)}else Object.assign(e,{[n]:r[n]})}return Pa(e,...t)},oh=e=>{function t(r,n){const a=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${a}`:`var(--${a})`}return t},sh=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:a,getToken:i}=n,o=h=>i("reference",h.toString()),s=e({theme:a}),l=t({theme:a,core:o,raw:{core:s}}),c=r({theme:a,core:o,semantic:o,raw:{core:s,semantic:l}}),f=ih(Pa(s,l,c)),d=([h,p],g)=>{const v=[g,h].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(_=>d(_,v)):[[n.getToken("declaration",v),p]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(h=>d(h))),ref:h=>i("reference",h.toString())}}})})})});const[Ra,Va,Us]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],lh=sh().core(({theme:e})=>({color:{black:Ra,white:Va,lowest:e.mode==="light"?Va:Ra,highest:e.mode==="light"?Ra:Va,...Oa({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Na}),...Oa({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Na}),...Oa({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Na})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(a,i)=>t.core.color[a].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Us,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const a=(i,o)=>e.core.color[i].replace(")",` / ${o})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:a("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":a("a-9",.05)},"status-bar":{bg:a("n-2",.8),"bg-button":Us,"bg-button-hover":a("n-10",.4),"bg-button-active":a("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),ch=oh({prefix:"i-"}),dh=e=>{const t=lh.from({theme:e,getToken:ch}),r=Object.entries(t.declarations).map(([n,a])=>`${n}: ${a};`);return`${$a} {
|
|
35
|
+
${r.concat(r).join(`
|
|
36
|
+
`)}
|
|
37
|
+
}`};class qs extends dd{}const uh=({_internal_domManager:e=Kf(),theme:t,terms:r,feedback:n,jobAlerts:a})=>ld(({apiClient:i,rpcClient:o,logger:s,analytics:l,publishableKey:c,env:f})=>{let d=!1,h=0,p;qf(f,c);const g=Wf(Bf(i));let v=0;const _=new WeakMap,S=(k,C)=>{const I=++v,E=performance.now();return C.catch($=>{throw typeof $=="object"&&$!==null&&_.set($,{endpoint:k,attempt:I,elapsed_ms:Math.round(performance.now()-E)}),$})},x=(k,C)=>{const I=As(k);I===404||I===410||Qt("fatal","application_unavailable",{phase:"flow",stage:C,error:Ea(k),http_status:I,...C==="flow_fetch"&&typeof k=="object"&&k!==null&&_.get(k)})},L=c&&f?Dd({environment:f,publishableKey:c,logger:s}):void 0,j=k=>k===h,F=()=>{if(typeof window>"u")return;h++,p==null||p(),p=void 0,ke.flushStateData().catch(()=>{}),O.cancelCurrentFlow(),ie.isBotTyping$.value=!1;const k=e.getChatbotElement();k&&(It(null,k),k.remove()),d=!1,s.info("Chatbot plugin destroyed")},V=()=>{if(typeof window>"u")return;const k=h,C=[Oe("style",{id:"inploi-chatbot-styles"},Hf),Oe("style",{id:"inploi-chatbot-theme"},dh(t))],I=e.getOrCreateChatbotElement();ie.themeMode$.value=t.mode;const E=Ne(!1);if(It(Oe(ce,{},[C,Oe(Rf,{env:f,rpcClient:o,apiClient:g,logger:s,analytics:l,talentBankClient:L,params:{theme:t,terms:r,feedback:n},feedbackReady:E})]),I),n){const $=T=>{var U,H;if(!j(k))return;const z=(U=e.getChatbotElement())==null?void 0:U.querySelector("dialog");z&&fh({instance:T({rpcClient:o,apiClient:i,logger:s,analytics:l}),theme:t,terms:((H=n.params)==null?void 0:H.terms)??{},host:z}).then(()=>{E.value=!0},oe=>s.error("Error rendering feedback plugin",oe))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:T})=>{$(T())}).catch(T=>{s.error("Error preparing feedback plugin",T)}):$(n.plugin)}p??(p=Jp(l)),d=!0},B=async(k,C)=>{if(!j(C))return;Kc({context:Pn(k.jobContext,k.context||{}),schema:k.flow.context_schema,logger:s});const I=await O.prepareFlow({...k,jobAlerts:k.jobAlerts??a});j(C)&&O.commitFlow(I)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(d)return;V(),s.info("Chatbot plugin prepared")}catch(k){s.error("Error preparing chatbot plugin",k)}},fetchFlowByJobId:async(k,C)=>{const I=(C==null?void 0:C.idType)==="inploi"?"internal":"external";return S("flow_by_job",o.request(qd,{params:{id:k},searchParams:{id_type:I}})).catch(E=>{throw Do({name:"ApiError",message:Dt.string,status:410,data:Dt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},E)?new qs(E.message,E.status,E.data):E}).then(E=>({flow:E.flow,title:E.job.title,flowKeys:[E.job.id,...(C==null?void 0:C.flowKeys)??[]],job:Ud(E,{id:k,idType:I}),employer:E.company.name,...C,jobContext:E.context,context:{user:E.user,...C==null?void 0:C.context}}))},fetchFlowById:async(k,C)=>S("flow_by_id",o.request(Wd,{params:{id:k}})).then(I=>{var E;return{flow:I.flow,title:"Chatbot",flowKeys:(C==null?void 0:C.flowKeys)??[],...C,analytics:{customProperties:{flow_id:I.flow.id,flow_version:I.flow.version,...(E=C==null?void 0:C.analytics)==null?void 0:E.customProperties}}}}),open:async k=>{if(typeof window>"u")return;const C=performance.now();try{O.cancelCurrentFlow(),O.viewState$.value="maximised",d||V()}catch(E){s.error("Error starting flow",E),Qt("boot_failed",jr(E),{phase:"config",error:Ea(E),elapsed_ms:Math.round(performance.now()-C)});return}Qt("boot");const I=h;if(k instanceof Promise){O.current$.value={state:"loading"};const E=$=>T=>{j(I)&&(s.error("Error loading flow",T),O.current$.value={state:T instanceof qs?"closed":"error"},x(T,$))};k.then($=>B($,I).catch(E("create")),E("flow_fetch"))}else await B(k,I).catch(E=>{s.error("Error starting flow",E),x(E,"create")})},hasApplicationInProgress:async k=>{const C=await ke.getStateData(k.flow,k.flowKeys,k.context??{});return C!==void 0&&ws({data:C,nodes:k.flow.nodes})},hasAnyApplicationInProgress:async()=>(await ke.getAllStateData()).some(k=>ws({data:k,nodes:[]})),close:async()=>{typeof window>"u"||(O.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:F}});function fh({instance:e,terms:t,theme:r,host:n}){return e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=uh;const ph=Object.freeze(Object.defineProperty({__proto__:null,jobCountryCodes:Zc},Symbol.toStringTag,{value:"Module"}));var hh="https://maps.inploi.com",gh=(e,t)=>{const r=new URL(`/${e}`,hh);return r.search=new URLSearchParams({q:t.query,limit:"5",surface:t.surface,seed:t.seed}).toString(),t.country&&r.searchParams.set("country",t.country),r},Ba=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),bh=e=>{if(!Ba(e)||typeof e.label!="string"||!Ba(e.address)||e.country!==void 0&&typeof e.country!="string")return;const t={};for(const r of["line1","line2","line3","city","state","postcode","country"]){const n=e.address[r];if(n!==void 0&&typeof n!="string")return;n!==void 0&&(t[r]=n)}return{id:e.label,label:e.label,country:e.country,address:t}},mh=async(e,t,r)=>{const n=await fetch(e.href,{signal:r});if(!n.ok)return;const a=n.headers.get("X-Geo-Arm"),i=await n.json();if(a!=="inploi"&&a!=="mapbox"||!Ba(i)||!Array.isArray(i.results)||i.source!=="photon"&&i.source!=="mapbox"&&i.source!=="places"||typeof i.attribution!="string")return;const o=[];for(const s of i.results){const l=t(s);if(l===void 0)return;o.push(l)}return{results:o,arm:a,source:i.source}},vh=e=>{const t=gh("address",{...e,seed:e.session});return t.searchParams.set("session",e.session),e.lat!==void 0&&e.lng!==void 0&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&e.lat>=-90&&e.lat<=90&&e.lng>=-180&&e.lng<=180&&(t.searchParams.set("lat",String(e.lat)),t.searchParams.set("lng",String(e.lng))),mh(t,bh,e.signal)};const wh=Object.freeze(Object.defineProperty({__proto__:null,lookupAddress:vh},Symbol.toStringTag,{value:"Module"})),Ws=(e,t,r)=>{var n;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(n=t.analytics)==null?void 0:n.customProperties})},za="resume-prompt",yh=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:za,signal:r});const n=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:r});return O.removeMessagesSentByNodeIds([za]),(n==null?void 0:n.value)!==!1},Ot=({class:e,...t})=>{const{t:r}=de();return u("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[u("title",{children:r("send")}),u("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),u("path",{d:"M8 4V13"})]})})},er=({error:e,refusal:t=!1})=>{const r=e==null?void 0:e.message;return Ee(()=>{const n=O.current$.peek().flow;t&&r&&n&&st(n).refused()},[r,t]),!e||!e.message?null:u("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[u("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:[u("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),u("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),u("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),u("p",{class:"break-words pr-1 text-sm",children:e.message})]})},lt=({class:e,...t})=>{const{t:r}=de();return u("button",{type:"button",class:it("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:[u("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:[u("title",{children:r("skip")}),u("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),u("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Ua={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"},_h=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(Ua).find(n=>e.startsWith(n))??"",r=e.replace(t,"");return/^\d+$/.test(r)?{countryCode:t,phoneNumber:r}:{countryCode:"",phoneNumber:""}};const tr=Mt("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}}),xh="https://api.mapbox.com/search/searchbox/v1/suggest",kh="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Sh=e=>atob(e).split("").reverse().join(""),ct=te({name:M()}),Ch=te({suggestions:sr(te({feature_type:Le(M()),full_address:Le(M()),place_formatted:Le(M()),name:Le(M()),mapbox_id:M(),context:od(te({address:ct,street:ct,neighborhood:ct,locality:ct,district:ct,place:ct,region:ct,postcode:ct,country:ct}))}))}),Eh=e=>(Tt(()=>{e&&Wi(e)},[e]),gt(()=>{var r;const t=(r=O.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,a)=>{var c;const i=e&&Wi(e),o=(c=O.current$.peek().flow)==null?void 0:c.locationOrigin,s=o&&o.lat!==void 0&&o.lng!==void 0&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180;return{...await pf({query:n,country:i,session:t,surface:"chatbot",...s?{lat:o.lat,lng:o.lng}:{},signal:a},async()=>{const f=new URL(xh);return f.searchParams.set("q",n),f.searchParams.set("session_token",t),f.searchParams.set("limit","5"),s&&f.searchParams.set("proximity",`${o.lng},${o.lat}`),f.searchParams.set("access_token",Sh(kh)),(await Vd(async p=>{const g=new URL(f);p&&g.searchParams.set("country",p);const v=await fetch(g.href,{signal:a});if(!v.ok)throw new Error(`Address lookup failed with ${v.status}`);return Vi(Ch,await v.json()).suggestions},i,a)).map(p=>{var g,v,_,S,x,L,j,F,V;return{country:i,label:p.full_address??([p.name,p.place_formatted].filter(Boolean).join(", ")||p.mapbox_id),id:p.mapbox_id,address:{line1:((g=p.context.address)==null?void 0:g.name)??((v=p.context.street)==null?void 0:v.name),line2:void 0,line3:((_=p.context.neighborhood)==null?void 0:_.name)??((S=p.context.locality)==null?void 0:S.name),city:((x=p.context.place)==null?void 0:x.name)??((L=p.context.district)==null?void 0:L.name),state:(j=p.context.region)==null?void 0:j.name,postcode:((F=p.context.postcode)==null?void 0:F.name)??(p.feature_type==="postcode"?p.name:void 0),country:(V=p.context.country)==null?void 0:V.name}}})}),country:i}}}:{enabled:!1}},[e])),Hs=e=>{const{t}=de();return u("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:[u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M10 3L5 8L10 13"})}),u("span",{children:t("back")})]})},$h=({input:e,onSubmitSuccess:t,logger:r,analytics:n,rpcClient:a})=>{const{t:i}=de(),[o,s]=ze(),{enabled:l,getPredictions:c}=Eh(a),[f,d]=ze(l?"query":"manual"),[h,p]=ze(""),[g,v]=ze(),_=ge(),S=()=>{var k;(k=_.current)==null||k.controller.abort(),_.current=void 0};Tt(()=>S,[]);const x=ge(),L=ge(),j=ge(!1),F=k=>{const C=k!==null?x.current:void 0,I=(C==null?void 0:C.lookup)??L.current;if(I&&!j.current){j.current=!0;const E=z=>{const U=e.config.keys[z];return k&&U?k.value[U]:void 0},$=E("country")??(C==null?void 0:C.suggestion.address.country)??(C==null?void 0:C.suggestion.country),T=k&&os({postcode:E("postcode")??(C!=null&&C.edited||o==null?void 0:o.postcode),label:C!=null&&C.edited||C==null?void 0:C.suggestion.label,state:E("state")??(C!=null&&C.edited||o==null?void 0:o.state),country:$});hf({kind:"address",surface:"chatbot",...I,picked:!!C,...C?{edited:C.edited}:{},region:T??($!=null&&$.trim()?"other":null)})}t(k)},V=k=>{var I;if(ot(l,"Query state should not be enabled"),k=k.trim(),k===((I=_.current)==null?void 0:I.query)||k===(g==null?void 0:g.query)&&g.status==="done")return;if(S(),p(k),k===""){v(void 0);return}const C=_.current={query:k,controller:new AbortController};v({query:k,status:"pending"}),c(k,C.controller.signal).then(E=>{_.current===C&&(_.current=void 0,L.current={arm:E.arm,source:E.source},v({query:k,status:"done",items:E.results,...L.current,country:E.country}))},E=>{_.current===C&&(_.current=void 0,L.current={arm:"direct",source:"direct"},r.error("Failed to get address details",E instanceof Di?"Unexpected response":E),v({query:k,status:"failed",error:i("address_error")}))})},B=(k,C)=>{x.current&&(o==null?void 0:o[k])!==C&&(x.current.edited=!0),s(I=>({...I,[k]:C}))};switch(f){case"query":return ot(l,"Query state should not be enabled"),u(Ah,{input:e,onSkip:()=>F(null),onAddressSelect:(k,C)=>{var E;if(k===""){_.current&&(S(),v(void 0)),d("manual");return}if((g==null?void 0:g.status)!=="done")return;const I=g.items.find($=>$.id===k);I&&(g.arm!=="inploi"&&df({query:C,country:g.country,pickedLabel:I.label,pickedPostcode:I.address.postcode,pickedCountry:I.address.country,pickedState:I.address.state,log:$=>n.log({event:"ADDRESS_SHADOW_COMPARED",properties:$})}),((E=x.current)==null?void 0:E.suggestion.id)!==k?(s(I.address),x.current={suggestion:I,lookup:{arm:g.arm,source:g.source},edited:!1}):x.current.lookup={arm:g.arm,source:g.source},d("details"))},onAddressSearch:V,lookup:g,query:h});case"details":return ot(o!==void 0),u(Ks,{input:e,logger:r,onSubmitSuccess:F,addressFields:o,onFieldChange:B,actions:u(Hs,{onClick:()=>{d("query")}})});case"manual":return u(Ks,{logger:r,input:e,onSubmitSuccess:F,addressFields:o??{},onFieldChange:B,actions:l?u(Hs,{onClick:()=>{d("query")}}):e.config.optional?u(lt,{onClick:()=>F(null)}):void 0})}},Ah=({input:e,onSkip:t,lookup:r,onAddressSelect:n,query:a,onAddressSearch:i})=>{const{t:o}=de(),s=ge(null);return Ee(()=>{s.current&&(s.current.focus(),s.current.select())},[]),u(ce,{children:[u("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&i(f)},class:"flex gap-2 p-2.5",children:[u("div",{class:"group relative flex-1",children:[u("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:a,class:tr({optional:!!e.config.optional,className:"w-full rounded-full"})}),u("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[u("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[u("circle",{cx:"7",cy:"7",r:"4"}),u("path",{d:"M10 10L13 13"})]})}),u("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&u(lt,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?u(er,{error:{message:r.error}}):null,u("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?u(ce,{children:[u(cn,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),u("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var c;n(l.id,((c=s.current)==null?void 0:c.value)??a??"")},children:[u("span",{class:"flex-grow",children:l.label}),u("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var l;n("",((l=s.current)==null?void 0:l.value)??a??"")},children:u("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},qa=["line1","line2","line3","city","state","postcode","country"],Ks=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:n,input:a})=>{const i=ge(null),o=ge(!1);Ee(()=>{if(i.current){const c=i.current.querySelector("input");c&&(c.focus(),c.select())}},[]);const s=Object.keys(Ua),{t:l}=de();return u("form",{class:"flex flex-col px-2 pt-2",onInputCapture:()=>{o.current=!1},onInvalidCapture:()=>{const c=O.current$.peek().flow;!o.current&&c&&st(c).refused(),o.current=!0},onSubmit:c=>{c.preventDefault();const f=c.currentTarget,d=[...f.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of d){g.value="";const v=qa.find(_=>a.config.keys[_]===g.name);v&&t(v,"")}if(d.length>0&&!f.checkValidity()){f.reportValidity();return}const h=new FormData(f),p=Object.fromEntries(h.entries());r({type:"address",value:p})},children:[u("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:i,children:qa.map((c,f)=>{const d=`isdk_${c}`,h=a.config.keys[c];return h?u(ce,{children:[u("label",{for:d,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:l(c)}),u("div",{class:"flex flex-col items-stretch gap-1.5",children:[c==="country"?u("div",{class:"relative",children:[u("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:h,id:d,defaultValue:e[c],onChange:p=>t(c,p.currentTarget.value),required:!0,children:[e.country&&!s.includes(e.country)?u("option",{value:e[c],children:e[c]}):u("option",{value:"",children:l("select_country")}),s.map(p=>u("option",{value:p,children:p},p))]}),u("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):u("input",{autoFocus:f===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:h,id:d,defaultValue:e[c],onInput:p=>t(c,p.currentTarget.value),required:c==="line2"?a.config.line2Required===!0:c!=="line3"}),f===qa.length-1?u("hr",{class:"m-0 w-full border-b border-b-transparent"}):u("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),u("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[n,u(Ot,{class:"ml-auto"})]})]})},Wa=()=>{const e=ge(null);return Tt(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Gs=["true","false"],Ih=rt(Gs),Th="answer",Ys="flex items-center flex-wrap gap-2 p-2.5",Js="min-w-0 max-w-full flex-auto",Zs=fa(({label:e,...t},r)=>u("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:u("p",{class:"text-center text-base",children:e})})),Dh=({input:e,onSubmitSuccess:t})=>{const r=Wa();return u("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const a=Tf(n).value,i=Vi(Ih,a);t({type:"boolean",value:i==="true"})},children:[u("ul",{class:Ys,children:Gs.map((n,a)=>u("li",{class:Js,children:u(Zs,{ref:a===0?r:null,type:"submit",name:Th,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&u("div",{class:"px-2 pb-2",children:u(lt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},Xs=e=>e.reduce((t,r)=>t+r.sizeKb,0),Mh=Xt("file"),Qs=3,fn=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Lh=({file:e,class:t,...r})=>{const{t:n}=de(),[a,i]=fn(e.name);return u("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[u("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[u("span",{class:"sr-only",children:[n("file_name"),": "]}),u("span",{class:"block truncate",children:a}),u("span",{children:i})]}),u("p",{class:"text-accent-11",children:[u("span",{class:"sr-only",children:[n("file_size"),": "]}),Wt(e.sizeKb)]})]})},el=({class:e,...t})=>u("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),jh=(e,t)=>{const[r,n]=fn(e);return`${r.slice(0,t)}${n}`},pn=e=>({name:jh(e.name,42),sizeKb:e.size/1e3}),Fh=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Oh=(e,t,r)=>{const n=fn(t.name)[1].toLowerCase(),a=[...r.map(o=>o.toLowerCase()),...Fh],i=n===""?"none":a.includes(n)?n:"other";return`chatbot-file-refused:${e}:${i}`},Nh=({input:e,onSubmitSuccess:t,analytics:r})=>{var _;const n=(_=O.current$.value.flow)==null?void 0:_.data.submissions[e.key],[a,i]=ze(Mh(n)&&n.value.length?{status:"ready",files:n.value}:{status:"empty"}),o=ge(0),s=a.status==="ready"?a.files:[],l=a.status==="ready"||a.status==="pending"?a.files:[],c=a.status==="error"?a.error:void 0,f=l.length-Qs,d=Xs(l),h=Wa(),{t:p}=de(),g=(S,x=e.config.extensions)=>{if(!S.length)return{reason:"required",error:{type:"required",message:p("validation_file")}};if(!Or(S,x))return{reason:"type",file:S.find(L=>!Or([L],x)),error:{type:"validate",message:p("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(S.some(L=>L.sizeKb===0))return{reason:"empty",file:S.find(L=>L.sizeKb===0),error:{type:"validate",message:p("validation_file_empty")}};if(e.config.fileSizeLimitKib&&Xs(S)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:p("validation_file_size",{size:Wt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&S.length>1)return{reason:"count",error:{type:"invalid",message:p("validation_file_max",{count:1})}}},v=(S,x)=>{var L,j;return r.log({event:"INTERACTION",properties:{tag:Oh(S,x,e.config.extensions)},customProperties:(j=(L=O.current$.peek().flow)==null?void 0:L.analytics)==null?void 0:j.customProperties})};return u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:S=>{if(S.preventDefault(),a.status==="pending"||a.status==="error")return;const x=g(s);x?i({status:"error",error:x.error}):t({type:"file",value:s})},children:[u("div",{class:"flex items-center gap-2",children:[u("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?u("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,Qs).map(S=>{const[x,L]=fn(S.name);return u(el,{class:"flex overflow-hidden",children:[u("span",{class:"block truncate",children:x}),u("span",{children:L})]})}),f>0?u(el,{children:p("file_more",{count:f})}):null]}):u("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[u("header",{class:"flex flex-col items-center gap-0",children:[u("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:u("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),u("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?u("p",{class:"text-neutral-11 text-xs",children:["(",p("file_max_size",{size:Wt(e.config.fileSizeLimitKib)}),")"]}):null]}),u("aside",{class:"flex flex-col items-center gap-2",children:[u("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),u("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(S=>u("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(".","")}))})]})]}),u("p",{role:"status",class:it("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:a.status==="pending"?u(ce,{children:[u(cn,{"aria-hidden":"true",class:"h-4 w-4"}),p("file_preparing",{count:l.length})]}):a.status==="ready"?u(ce,{children:[s.length>1?p("file_total_size",{size:Wt(d)}):Wt(d),u("span",{class:"sr-only",children:[". ",p("file_ready",{count:s.length})]})]}):null}),u("input",{id:"dropzone-file","aria-label":p("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async S=>{ot(S.target instanceof HTMLInputElement);const x=S.target.files?Array.from(S.target.files):[];if(S.target.value="",!x[0])return;const L=++o.current,j=a.status==="ready";let F=x;if(!Or(x,e.config.extensions)){const I=g(x.map(pn),[]);if(I)return v(I.reason,I.file??x[0]),i({status:"error",error:I.error});i({status:"pending",files:x.map(pn)});let E;try{F=await Promise.all(x.map($=>$c($,e.config.extensions).catch(T=>{throw E??(E=$),T})))}catch{return o.current!==L?void 0:(v("unreadable",E??x[0]),i({status:"error",error:{type:"invalid",message:p(j?"file_read_error_replacement":"file_read_error")}}))}}const[V]=F;if(!V||o.current!==L)return;const B=F.map(pn),k=g(B);if(k)return v(k.reason,k.file??V),i({status:"error",error:k.error});i({status:"pending",files:B});let C;try{const I=await Promise.all(F.map(async E=>{try{return{...pn(E),data:await Hc(E)}}catch($){throw C??(C=E),$}}));o.current===L&&i({status:"ready",files:I})}catch{if(o.current!==L)return;v("unreadable",C??V),i({status:"error",error:{type:"invalid",message:p(j?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:_c(e.config.extensions),type:"file",class:"sr-only"})]}),u("div",{class:"flex h-full flex-col items-center gap-2",children:[u(Ot,{disabled:s.length===0}),e.config.optional&&u(lt,{class:"relative",onClick:()=>t(null)})]})]}),u(er,{error:c,refusal:!0})]})};var xr=e=>e.type==="checkbox",Nt=e=>e instanceof Date,Fe=e=>e==null;const tl=e=>typeof e=="object";var fe=e=>!Fe(e)&&!Array.isArray(e)&&tl(e)&&!Nt(e),Ph=e=>fe(e)&&e.target?xr(e.target)?e.target.checked:e.target.value:e,Rh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Vh=(e,t)=>e.has(Rh(t)),Bh=e=>{const t=e.constructor&&e.constructor.prototype;return fe(t)&&t.hasOwnProperty("isPrototypeOf")},Ha=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function me(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ha&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(fe(e)&&Bh(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=me(e[a]));return n}var hn=e=>/^\w*$/.test(e),le=e=>e===void 0,Ka=e=>Array.isArray(e)?e.filter(Boolean):[],Ga=e=>Ka(e.replace(/["|']|\]/g,"").split(/\.|\[/)),N=(e,t,r)=>{if(!t||!fe(e))return r;const n=(hn(t)?[t]:Ga(t)).reduce((a,i)=>Fe(a)?a:a[i],e);return le(n)||n===e?le(e[t])?r:e[t]:n},Xe=e=>typeof e=="boolean",qe=e=>typeof e=="function",X=(e,t,r)=>{let n=-1;const a=hn(t)?[t]:Ga(t),i=a.length,o=i-1;for(;++n<i;){const s=a[n];let l=r;if(n!==o){const c=e[s];l=fe(c)||Array.isArray(c)?c:isNaN(+a[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const rl={BLUR:"blur",FOCUS_OUT:"focusout"},We={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zh=Ie.createContext(null);zh.displayName="HookFormControlContext";var Uh=(e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==We.all&&(t._proxyFormState[o]=!n||We.all),e[o]}});return a};const qh=typeof window<"u"?Ie.useLayoutEffect:Ie.useEffect;var Pe=e=>typeof e=="string",Wh=(e,t,r,n,a)=>Pe(e)?(n&&t.watch.add(e),N(r,e,a)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),N(r,i))):(n&&(t.watchAll=!0),r),Ya=e=>Fe(e)||!tl(e);function xt(e,t,r=new WeakSet){if(Ya(e)||Ya(t))return Object.is(e,t);if(Nt(e)&&Nt(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const o=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Nt(o)&&Nt(s)||fe(o)&&fe(s)||Array.isArray(o)&&Array.isArray(s)?!xt(o,s,r):!Object.is(o,s))return!1}}return!0}const Hh=Ie.createContext(null);Hh.displayName="HookFormContext";var nl=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{},kr=e=>Array.isArray(e)?e:[e],al=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function il(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const a=e[n],i=t[n];if(a&&fe(a)&&i){const o=il(a,i);fe(o)&&(r[n]=o)}else e[n]&&(r[n]=i)}return r}var Te=e=>fe(e)&&!Object.keys(e).length,Ja=e=>e.type==="file",gn=e=>{if(!Ha)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ol=e=>e.type==="select-multiple",Za=e=>e.type==="radio",Kh=e=>Za(e)||xr(e),Xa=e=>gn(e)&&e.isConnected;function Gh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=le(e)?n++:e[t[n++]];return e}function Yh(e){for(const t in e)if(e.hasOwnProperty(t)&&!le(e[t]))return!1;return!0}function pe(e,t){const r=Array.isArray(t)?t:hn(t)?[t]:Ga(t),n=r.length===1?e:Gh(e,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(fe(n)&&Te(n)||Array.isArray(n)&&Yh(n))&&pe(e,r.slice(0,-1)),e}var Jh=e=>{for(const t in e)if(qe(e[t]))return!0;return!1};function sl(e){return Array.isArray(e)||fe(e)&&!Jh(e)}function Qa(e,t={}){for(const r in e){const n=e[r];sl(n)?(t[r]=Array.isArray(n)?[]:{},Qa(n,t[r])):le(n)||(t[r]=!0)}return t}function rr(e,t,r){r||(r=Qa(t));for(const n in e){const a=e[n];if(sl(a))le(t)||Ya(r[n])?r[n]=Qa(a,Array.isArray(a)?[]:{}):rr(a,Fe(t)?{}:t[n],r[n]);else{const i=t[n];r[n]=!xt(a,i)}}return r}const ll={value:!1,isValid:!1},cl={value:!0,isValid:!0};var dl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!le(e[0].attributes.value)?le(e[0].value)||e[0].value===""?cl:{value:e[0].value,isValid:!0}:cl:ll}return ll},ul=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>le(e)?e:t?e===""?NaN:e&&+e:r&&Pe(e)?new Date(e):n?n(e):e;const fl={isValid:!1,value:null};var pl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,fl):fl;function hl(e){const t=e.ref;return Ja(t)?t.files:Za(t)?pl(e.refs).value:ol(t)?[...t.selectedOptions].map(({value:r})=>r):xr(t)?dl(e.refs).value:ul(le(t.value)?e.ref.value:t.value,e)}var Zh=(e,t,r,n)=>{const a={};for(const i of e){const o=N(t,i);o&&X(a,i,o._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}},bn=e=>e instanceof RegExp,Sr=e=>le(e)?e:bn(e)?e.source:fe(e)?bn(e.value)?e.value.source:e.value:e,gl=e=>({isOnSubmit:!e||e===We.onSubmit,isOnBlur:e===We.onBlur,isOnChange:e===We.onChange,isOnAll:e===We.all,isOnTouch:e===We.onTouched});const bl="AsyncFunction";var Xh=e=>!!e&&!!e.validate&&!!(qe(e.validate)&&e.validate.constructor.name===bl||fe(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===bl)),Qh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ml=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Cr=(e,t,r,n)=>{for(const a of r||Object.keys(e)){const i=N(e,a);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Cr(s,t))break}else if(fe(s)&&Cr(s,t))break}}};function vl(e,t,r){const n=N(e,r);if(n||hn(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=N(t,i),s=N(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};if(s&&s.root&&s.root.type)return{name:`${i}.root`,error:s.root};a.pop()}return{name:r}}var eg=(e,t,r,n)=>{r(e);const{name:a,...i}=e;return Te(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||We.all))},tg=(e,t,r)=>!e||!t||e===t||kr(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),rg=(e,t,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:(r?n.isOnChange:a.isOnChange)?e:!0,ng=(e,t)=>!Ka(N(e,t)).length&&pe(e,t),ag=(e,t,r)=>{const n=kr(N(e,r));return X(n,"root",t[r]),X(e,r,n),e};function wl(e,t,r="validate"){if(Pe(e)||Array.isArray(e)&&e.every(Pe)||Xe(e)&&!e)return{type:r,message:Pe(e)?e:"",ref:t}}var nr=e=>fe(e)&&!bn(e)?e:{value:e,message:""},yl=async(e,t,r,n,a,i)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:f,min:d,max:h,pattern:p,validate:g,name:v,valueAsNumber:_,mount:S}=e._f,x=N(r,v);if(!S||t.has(v))return{};const L=s?s[0]:o,j=$=>{a&&L.reportValidity&&(L.setCustomValidity(Xe($)?"":$||""),L.reportValidity())},F={},V=Za(o),B=xr(o),k=V||B,C=(_||Ja(o))&&le(o.value)&&le(x)||gn(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,I=nl.bind(null,v,n,F),E=($,T,z,U=dt.maxLength,H=dt.minLength)=>{const oe=$?T:z;F[v]={type:$?U:H,message:oe,ref:o,...I($?U:H,oe)}};if(i?!Array.isArray(x)||!x.length:l&&(!k&&(C||Fe(x))||Xe(x)&&!x||B&&!dl(s).isValid||V&&!pl(s).isValid)){const{value:$,message:T}=Pe(l)?{value:!!l,message:l}:nr(l);if($&&(F[v]={type:dt.required,message:T,ref:L,...I(dt.required,T)},!n))return j(T),F}if(!C&&(!Fe(d)||!Fe(h))){let $,T;const z=nr(h),U=nr(d);if(!Fe(x)&&!isNaN(x)){const H=o.valueAsNumber||x&&+x;Fe(z.value)||($=H>z.value),Fe(U.value)||(T=H<U.value)}else{const H=o.valueAsDate||new Date(x),oe=se=>new Date(new Date().toDateString()+" "+se),Q=o.type=="time",ee=o.type=="week";Pe(z.value)&&x&&($=Q?oe(x)>oe(z.value):ee?x>z.value:H>new Date(z.value)),Pe(U.value)&&x&&(T=Q?oe(x)<oe(U.value):ee?x<U.value:H<new Date(U.value))}if(($||T)&&(E(!!$,z.message,U.message,dt.max,dt.min),!n))return j(F[v].message),F}if((c||f)&&!C&&(Pe(x)||i&&Array.isArray(x))){const $=nr(c),T=nr(f),z=!Fe($.value)&&x.length>+$.value,U=!Fe(T.value)&&x.length<+T.value;if((z||U)&&(E(z,$.message,T.message),!n))return j(F[v].message),F}if(p&&!C&&Pe(x)){const{value:$,message:T}=nr(p);if(bn($)&&!x.match($)&&(F[v]={type:dt.pattern,message:T,ref:o,...I(dt.pattern,T)},!n))return j(T),F}if(g){if(qe(g)){const $=await g(x,r),T=wl($,L);if(T&&(F[v]={...T,...I(dt.validate,T.message)},!n))return j(T.message),F}else if(fe(g)){let $={};for(const T in g){if(!Te($)&&!n)break;const z=wl(await g[T](x,r),L,T);z&&($={...z,...I(T,z.message)},j(z.message),n&&(F[v]=$))}if(!Te($)&&(F[v]={ref:L,...$},!n))return F}}return j(!0),F};const ig={mode:We.onSubmit,reValidateMode:We.onChange,shouldFocusError:!0};function og(e={}){let t={...ig,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:qe(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},a=fe(t.defaultValues)||fe(t.values)?me(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:me(a),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,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...f};let h={...d};const p={array:al(),state:al()},g=t.criteriaMode===We.all,v=b=>m=>{clearTimeout(c),c=setTimeout(b,m)},_=async b=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||b)){let m;t.resolver?(m=Te((await k()).errors),S()):m=await I(n,!0),m!==r.isValid&&p.state.next({isValid:m})}},S=(b,m)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((b||Array.from(s.mount)).forEach(w=>{w&&(m?X(r.validatingFields,w,m):pe(r.validatingFields,w))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Te(r.validatingFields)}))},x=(b,m=[],w,D,A=!0,y=!0)=>{if(D&&w&&!t.disabled){if(o.action=!0,y&&Array.isArray(N(n,b))){const P=w(N(n,b),D.argA,D.argB);A&&X(n,b,P)}if(y&&Array.isArray(N(r.errors,b))){const P=w(N(r.errors,b),D.argA,D.argB);A&&X(r.errors,b,P),ng(r.errors,b)}if((d.touchedFields||h.touchedFields)&&y&&Array.isArray(N(r.touchedFields,b))){const P=w(N(r.touchedFields,b),D.argA,D.argB);A&&X(r.touchedFields,b,P)}(d.dirtyFields||h.dirtyFields)&&(r.dirtyFields=rr(a,i)),p.state.next({name:b,isDirty:$(b,m),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else X(i,b,m)},L=(b,m)=>{X(r.errors,b,m),p.state.next({errors:r.errors})},j=b=>{r.errors=b,p.state.next({errors:r.errors,isValid:!1})},F=(b,m,w,D)=>{const A=N(n,b);if(A){const y=N(i,b,le(w)?N(a,b):w);le(y)||D&&D.defaultChecked||m?X(i,b,m?y:hl(A._f)):U(b,y),o.mount&&!o.action&&_()}},V=(b,m,w,D,A)=>{let y=!1,P=!1;const K={name:b};if(!t.disabled){if(!w||D){(d.isDirty||h.isDirty)&&(P=r.isDirty,r.isDirty=K.isDirty=$(),y=P!==K.isDirty);const G=xt(N(a,b),m);P=!!N(r.dirtyFields,b),G?pe(r.dirtyFields,b):X(r.dirtyFields,b,!0),K.dirtyFields=r.dirtyFields,y=y||(d.dirtyFields||h.dirtyFields)&&P!==!G}if(w){const G=N(r.touchedFields,b);G||(X(r.touchedFields,b,w),K.touchedFields=r.touchedFields,y=y||(d.touchedFields||h.touchedFields)&&G!==w)}y&&A&&p.state.next(K)}return y?K:{}},B=(b,m,w,D)=>{const A=N(r.errors,b),y=(d.isValid||h.isValid)&&Xe(m)&&r.isValid!==m;if(t.delayError&&w?(l=v(()=>L(b,w)),l(t.delayError)):(clearTimeout(c),l=null,w?X(r.errors,b,w):pe(r.errors,b)),(w?!xt(A,w):A)||!Te(D)||y){const P={...D,...y&&Xe(m)?{isValid:m}:{},errors:r.errors,name:b};r={...r,...P},p.state.next(P)}},k=async b=>(S(b,!0),await t.resolver(i,t.context,Zh(b||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),C=async b=>{const{errors:m}=await k(b);if(S(b),b)for(const w of b){const D=N(m,w);D?X(r.errors,w,D):pe(r.errors,w)}else r.errors=m;return m},I=async(b,m,w={valid:!0})=>{for(const D in b){const A=b[D];if(A){const{_f:y,...P}=A;if(y){const K=s.array.has(y.name),G=A._f&&Xh(A._f);G&&d.validatingFields&&S([y.name],!0);const _e=await yl(A,s.disabled,i,g,t.shouldUseNativeValidation&&!m,K);if(G&&d.validatingFields&&S([y.name]),_e[y.name]&&(w.valid=!1,m||e.shouldUseNativeValidation))break;!m&&(N(_e,y.name)?K?ag(r.errors,_e,y.name):X(r.errors,y.name,_e[y.name]):pe(r.errors,y.name))}!Te(P)&&await I(P,m,w)}}return w.valid},E=()=>{for(const b of s.unMount){const m=N(n,b);m&&(m._f.refs?m._f.refs.every(w=>!Xa(w)):!Xa(m._f.ref))&&ut(b)}s.unMount=new Set},$=(b,m)=>!t.disabled&&(b&&m&&X(i,b,m),!xt(Y(),a)),T=(b,m,w)=>Wh(b,s,{...o.mount?i:le(m)?a:Pe(b)?{[b]:m}:m},w,m),z=b=>Ka(N(o.mount?i:a,b,t.shouldUnregister?N(a,b,[]):[])),U=(b,m,w={})=>{const D=N(n,b);let A=m;if(D){const y=D._f;y&&(!y.disabled&&X(i,b,ul(m,y)),A=gn(y.ref)&&Fe(m)?"":m,ol(y.ref)?[...y.ref.options].forEach(P=>P.selected=A.includes(P.value)):y.refs?xr(y.ref)?y.refs.forEach(P=>{(!P.defaultChecked||!P.disabled)&&(Array.isArray(A)?P.checked=!!A.find(K=>K===P.value):P.checked=A===P.value||!!A)}):y.refs.forEach(P=>P.checked=P.value===A):Ja(y.ref)?y.ref.value="":(y.ref.value=A,y.ref.type||p.state.next({name:b,values:me(i)})))}(w.shouldDirty||w.shouldTouch)&&V(b,A,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&se(b)},H=(b,m,w)=>{for(const D in m){if(!m.hasOwnProperty(D))return;const A=m[D],y=b+"."+D,P=N(n,y);(s.array.has(b)||fe(A)||P&&!P._f)&&!Nt(A)?H(y,A,w):U(y,A,w)}},oe=(b,m,w={})=>{const D=N(n,b),A=s.array.has(b),y=me(m);X(i,b,y),A?(p.array.next({name:b,values:me(i)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&w.shouldDirty&&p.state.next({name:b,dirtyFields:rr(a,i),isDirty:$(b,y)})):D&&!D._f&&!Fe(y)?H(b,y,w):U(b,y,w),ml(b,s)?p.state.next({...r,name:b,values:me(i)}):p.state.next({name:o.mount?b:void 0,values:me(i)})},Q=async b=>{o.mount=!0;const m=b.target;let w=m.name,D=!0;const A=N(n,w),y=G=>{D=Number.isNaN(G)||Nt(G)&&isNaN(G.getTime())||xt(G,N(i,w,G))},P=gl(t.mode),K=gl(t.reValidateMode);if(A){let G,_e;const zt=m.type?hl(A._f):Ph(b),kt=b.type===rl.BLUR||b.type===rl.FOCUS_OUT,rb=!Qh(A._f)&&!t.resolver&&!N(r.errors,w)&&!A._f.deps||rg(kt,N(r.touchedFields,w),r.isSubmitted,K,P),ti=ml(w,s,kt);X(i,w,zt),kt?(!m||!m.readOnly)&&(A._f.onBlur&&A._f.onBlur(b),l&&l(0)):A._f.onChange&&A._f.onChange(b);const ri=V(w,zt,kt),nb=!Te(ri)||ti;if(!kt&&p.state.next({name:w,type:b.type,values:me(i)}),rb)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?kt&&_():kt||_()),nb&&p.state.next({name:w,...ti?{}:ri});if(!kt&&ti&&p.state.next({...r}),t.resolver){const{errors:Ml}=await k([w]);if(S([w]),y(zt),D){const ab=vl(r.errors,n,w),Ll=vl(Ml,n,ab.name||w);G=Ll.error,w=Ll.name,_e=Te(Ml)}}else S([w],!0),G=(await yl(A,s.disabled,i,g,t.shouldUseNativeValidation))[w],S([w]),y(zt),D&&(G?_e=!1:(d.isValid||h.isValid)&&(_e=await I(n,!0)));D&&(A._f.deps&&(!Array.isArray(A._f.deps)||A._f.deps.length>0)&&se(A._f.deps),B(w,_e,G,ri))}},ee=(b,m)=>{if(N(r.errors,m)&&b.focus)return b.focus(),1},se=async(b,m={})=>{let w,D;const A=kr(b);if(t.resolver){const y=await C(le(b)?b:A);w=Te(y),D=b?!A.some(P=>N(y,P)):w}else b?(D=(await Promise.all(A.map(async y=>{const P=N(n,y);return await I(P&&P._f?{[y]:P}:P)}))).every(Boolean),!(!D&&!r.isValid)&&_()):D=w=await I(n);return p.state.next({...!Pe(b)||(d.isValid||h.isValid)&&w!==r.isValid?{}:{name:b},...t.resolver||!b?{isValid:w}:{},errors:r.errors}),m.shouldFocus&&!D&&Cr(n,ee,b?A:s.mount),D},Y=(b,m)=>{let w={...o.mount?i:a};return m&&(w=il(m.dirtyFields?r.dirtyFields:r.touchedFields,w)),le(b)?w:Pe(b)?N(w,b):b.map(D=>N(w,D))},$r=(b,m)=>({invalid:!!N((m||r).errors,b),isDirty:!!N((m||r).dirtyFields,b),error:N((m||r).errors,b),isValidating:!!N(r.validatingFields,b),isTouched:!!N((m||r).touchedFields,b)}),Ar=b=>{const m=b?kr(b):void 0;m==null||m.forEach(w=>pe(r.errors,w)),m?m.forEach(w=>{p.state.next({name:w,errors:r.errors})}):p.state.next({errors:{}})},q=(b,m,w)=>{const D=(N(n,b,{_f:{}})._f||{}).ref,A=N(r.errors,b)||{},{ref:y,message:P,type:K,...G}=A;X(r.errors,b,{...G,...m,ref:D}),p.state.next({name:b,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&D&&D.focus&&D.focus()},Ir=(b,m)=>qe(b)?p.state.subscribe({next:w=>"values"in w&&b(T(void 0,m),w)}):T(b,m,!0),Pt=b=>p.state.subscribe({next:m=>{tg(b.name,m.name,b.exact)&&eg(m,b.formState||d,xn,b.reRenderRoot)&&b.callback({values:{...i},...r,...m,defaultValues:a})}}).unsubscribe,Rt=b=>(o.mount=!0,h={...h,...b.formState},Pt({...b,formState:{...f,...b.formState}})),ut=(b,m={})=>{for(const w of b?kr(b):s.mount)s.mount.delete(w),s.array.delete(w),m.keepValue||(pe(n,w),pe(i,w)),!m.keepError&&pe(r.errors,w),!m.keepDirty&&pe(r.dirtyFields,w),!m.keepTouched&&pe(r.touchedFields,w),!m.keepIsValidating&&pe(r.validatingFields,w),!t.shouldUnregister&&!m.keepDefaultValue&&pe(a,w);p.state.next({values:me(i)}),p.state.next({...r,...m.keepDirty?{isDirty:$()}:{}}),!m.keepIsValid&&_()},Tr=({disabled:b,name:m})=>{if(Xe(b)&&o.mount||b||s.disabled.has(m)){const A=s.disabled.has(m)!==!!b;b?s.disabled.add(m):s.disabled.delete(m),A&&o.mount&&!o.action&&_()}},ar=(b,m={})=>{let w=N(n,b);const D=Xe(m.disabled)||Xe(t.disabled);return X(n,b,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:b}},name:b,mount:!0,...m}}),s.mount.add(b),w?Tr({disabled:Xe(m.disabled)?m.disabled:t.disabled,name:b}):F(b,!0,m.value),{...D?{disabled:m.disabled||t.disabled}:{},...t.progressive?{required:!!m.required,min:Sr(m.min),max:Sr(m.max),minLength:Sr(m.minLength),maxLength:Sr(m.maxLength),pattern:Sr(m.pattern)}:{},name:b,onChange:Q,onBlur:Q,ref:A=>{if(A){ar(b,m),w=N(n,b);const y=le(A.value)&&A.querySelectorAll&&A.querySelectorAll("input,select,textarea")[0]||A,P=Kh(y),K=w._f.refs||[];if(P?K.find(G=>G===y):y===w._f.ref)return;X(n,b,{_f:{...w._f,...P?{refs:[...K.filter(Xa),y,...Array.isArray(N(a,b))?[{}]:[]],ref:{type:y.type,name:b}}:{ref:y}}}),F(b,!1,void 0,y)}else w=N(n,b,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||m.shouldUnregister)&&!(Vh(s.array,b)&&o.action)&&s.unMount.add(b)}}},ft=()=>t.shouldFocusError&&Cr(n,ee,s.mount),yn=b=>{Xe(b)&&(p.state.next({disabled:b}),Cr(n,(m,w)=>{const D=N(n,w);D&&(m.disabled=D._f.disabled||b,Array.isArray(D._f.refs)&&D._f.refs.forEach(A=>{A.disabled=D._f.disabled||b}))},0,!1))},Dr=(b,m)=>async w=>{let D;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let A=me(i);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:y,values:P}=await k();S(),r.errors=y,A=me(P)}else await I(n);if(s.disabled.size)for(const y of s.disabled)pe(A,y);if(pe(r.errors,"root"),Te(r.errors)){p.state.next({errors:{}});try{await b(A,w)}catch(y){D=y}}else m&&await m({...r.errors},w),ft(),setTimeout(ft);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Te(r.errors)&&!D,submitCount:r.submitCount+1,errors:r.errors}),D)throw D},Mr=(b,m={})=>{N(n,b)&&(le(m.defaultValue)?oe(b,me(N(a,b))):(oe(b,m.defaultValue),X(a,b,me(m.defaultValue))),m.keepTouched||pe(r.touchedFields,b),m.keepDirty||(pe(r.dirtyFields,b),r.isDirty=m.defaultValue?$(b,me(N(a,b))):$()),m.keepError||(pe(r.errors,b),d.isValid&&_()),p.state.next({...r}))},Vt=(b,m={})=>{const w=b?me(b):a,D=me(w),A=Te(b),y=A?a:D;if(m.keepDefaultValues||(a=w),!m.keepValues){if(m.keepDirtyValues){const P=new Set([...s.mount,...Object.keys(rr(a,i))]);for(const K of Array.from(P)){const G=N(r.dirtyFields,K),_e=N(i,K),zt=N(y,K);G&&!le(_e)?X(y,K,_e):!G&&!le(zt)&&oe(K,zt)}}else{if(Ha&&le(b))for(const P of s.mount){const K=N(n,P);if(K&&K._f){const G=Array.isArray(K._f.refs)?K._f.refs[0]:K._f.ref;if(gn(G)){const _e=G.closest("form");if(_e){_e.reset();break}}}}if(m.keepFieldsRef)for(const P of s.mount)oe(P,N(y,P));else n={}}i=t.shouldUnregister?m.keepDefaultValues?me(a):{}:me(y),p.array.next({values:{...y}}),p.state.next({values:{...y}})}s={mount:m.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!m.keepIsValid||!!m.keepDirtyValues||!t.shouldUnregister&&!Te(y),o.watch=!!t.shouldUnregister,o.keepIsValid=!!m.keepIsValid,o.action=!1,m.keepErrors||(r.errors={}),p.state.next({submitCount:m.keepSubmitCount?r.submitCount:0,isDirty:A?!1:m.keepDirty?r.isDirty:!!(m.keepDefaultValues&&!xt(b,a)),isSubmitted:m.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:A?{}:m.keepDirtyValues?m.keepDefaultValues&&i?rr(a,i):r.dirtyFields:m.keepDefaultValues&&b?rr(a,b):m.keepDirty?r.dirtyFields:{},touchedFields:m.keepTouched?r.touchedFields:{},errors:m.keepErrors?r.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Bt=(b,m)=>Vt(qe(b)?b(i):b,{...t.resetOptions,...m}),_n=(b,m={})=>{const w=N(n,b),D=w&&w._f;if(D){const A=D.refs?D.refs[0]:D.ref;A.focus&&setTimeout(()=>{A.focus(),m.shouldSelect&&qe(A.select)&&A.select()})}},xn=b=>{r={...r,...b}},Lr={control:{register:ar,unregister:ut,getFieldState:$r,handleSubmit:Dr,setError:q,_subscribe:Pt,_runSchema:k,_updateIsValidating:S,_focusError:ft,_getWatch:T,_getDirty:$,_setValid:_,_setFieldArray:x,_setDisabledField:Tr,_setErrors:j,_getFieldArray:z,_reset:Vt,_resetDefaultValues:()=>qe(t.defaultValues)&&t.defaultValues().then(b=>{Bt(b,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:E,_disableForm:yn,_subjects:p,_proxyFormState:d,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(b){o=b},get _defaultValues(){return a},get _names(){return s},set _names(b){s=b},get _formState(){return r},get _options(){return t},set _options(b){t={...t,...b}}},subscribe:Rt,trigger:se,register:ar,handleSubmit:Dr,watch:Ir,setValue:oe,getValues:Y,reset:Bt,resetField:Mr,clearErrors:Ar,unregister:ut,setError:q,setFocus:_n,getFieldState:$r};return{...Lr,formControl:Lr}}function mn(e={}){const t=Ie.useRef(void 0),r=Ie.useRef(void 0),[n,a]=Ie.useState({isDirty:!1,isValidating:!1,isLoading:qe(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:qe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!qe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=og(e);t.current={...s,formState:n}}const i=t.current.control;return i._options=e,qh(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(s=>({...s,isReady:!0})),i._formState.isReady=!0,o},[i]),Ie.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Ie.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),Ie.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),Ie.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),Ie.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),Ie.useEffect(()=>{var o;e.values&&!xt(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((o=i._options.resetOptions)===null||o===void 0)&&o.keepIsValid||i._setValid(),r.current=e.values,a(s=>({...s}))):i._resetDefaultValues()},[i,e.values]),Ie.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Ie.useMemo(()=>Uh(n,i),[i,n]),t.current}const _l=(e,t,r)=>{if(e&&"reportValidity"in e){const n=N(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},sg=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?_l(n.ref,r,e):n.refs&&n.refs.forEach(a=>_l(a,r,e))}},lg=(e,t)=>{t.shouldUseNativeValidation&&sg(e,t);const r={};for(const n in e){const a=N(t.fields,n),i=Object.assign(e[n]||{},{ref:a&&a.ref});if(cg(t.names||Object.keys(e),n)){const o=Object.assign({},N(r,n));X(o,"root",i),X(r,n,o)}else X(r,n,i)}return r},cg=(e,t)=>e.some(r=>r.startsWith(t+"."));var vn=function(e,t,r){return r===void 0&&(r={}),function(n,a,i){try{var o=!i.shouldUseNativeValidation&&i.criteriaMode==="all";return Promise.resolve(sd(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var c=s.issues[0],f=nd(c);if(f&&(l[f]||(l[f]={message:c.message,type:c.type}),o)){var d=l[f].types,h=d&&d[c.type];l[f]=nl(f,o,l,c.type,h?[].concat(h,c.message):c.message)}s.issues.shift()}return{values:{},errors:lg(l,i)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const xl=27,kl=12,Sl=10,dg=Xt("enum"),ug=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return vn(te({checked:je(lr(M(),Ur()),Br(n=>Object.entries(n).filter(([a,i])=>i).map(([a,i])=>a)),$t(r.max,t("validation_multiple_choice_max",{count:r.max})),et(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},fg=fa(({option:e,...t},r)=>u(ce,{children:[u("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),u("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Cl=Mt("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:Ys}}}),pg=({input:e,onSubmitSuccess:t})=>{var f,d;const r=e.key?(f=O.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.maxSelected===1,a=n&&e.config.options.length===2,{t:i}=de(),{register:o,handleSubmit:s,formState:{errors:l}}=mn({defaultValues:{checked:n?{}:dg(r)?Object.fromEntries(r.value.map(h=>[h,!0])):{}},resolver:ug(e.config,i)}),c=Wa();return a?u(ce,{children:[u("ul",{style:{maxHeight:6.5*xl+5*kl+2*Sl},class:Cl({variant:"booleanLike"}),children:e.config.options.map((h,p)=>u("li",{class:Js,children:u(Zs,{type:"submit",ref:g=>{g&&p===0&&(c.current=g)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}),e.config.minSelected===0&&u("div",{class:"px-2 pb-2",children:u(lt,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):u("form",{noValidate:!0,onSubmit:h=>s(p=>{const g=p.checked;t({type:"enum",value:g})})(h),children:[u("div",{class:"flex items-center gap-1",children:[u("ul",{style:{maxHeight:6.5*xl+5*kl+2*Sl},class:Cl({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,p)=>{const g=`checked.${h.value}`,{ref:v,..._}=o(g);return u("li",{class:"relative",children:u(fg,{option:h,autoFocus:p===0,ref:S=>{S&&p===0&&(c.current=S),v(S)},id:g,..._,onClick:n?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),u("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:u(Ot,{}),e.config.minSelected===0&&u(lt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),u("div",{class:"px-1",children:u(er,{error:(d=l.checked)==null?void 0:d.root,refusal:!0})})]})},hg=Xt("number"),gg=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,a=e.decimalCases??0;return vn(te({number:je(Re(t("validation_number")),ji(r,t("validation_number_min",{min:r})),Li(n,t("validation_number_max",{max:n})),Mi(i=>i===Number(i.toFixed(a)),t("validation_number_decimal_cases",{count:a})))}))},bg=({input:e,onSubmitSuccess:t})=>{var d;const r=e.config.defaultValue,n=e.key?(d=O.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:a}=de(),{register:i,handleSubmit:o,formState:{errors:s}}=mn({defaultValues:{number:hg(n)?n.value:r?Number(r):void 0},resolver:gg(e.config,a)}),{ref:l,...c}=i("number",{required:!e.config.optional,valueAsNumber:!0}),f=ge();return Ee(()=>{f.current&&(f.current.focus(),f.current.select())},[]),u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-grow",children:[u("input",{...c,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:tr({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&&u(lt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),u(Ot,{})]}),u(er,{error:s.number,refusal:!0})]})},mg="44",vg=/^[0-9 ]+$/,wg=Xt("string"),yg=Xt("phone"),_g=e=>{const t=je(M(e("validation_country_code")),Un(vg,e("validation_country_code"))),r=je(M(e("validation_phone")),et(1,e("validation_phone")),Br(n=>n.replace(/[^0-9]/g,"")));return vn(te({countryCode:t,phoneNumber:r}))},xg=({input:e,onSubmitSuccess:t})=>{var v;const r=e.key?(v=O.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,{t:n}=de(),[a,i]=ze(),o=wg(r)?_h(r.value):yg(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:c},watch:f}=mn({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??mg,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:_g(n)}),{ref:d,...h}=s("phoneNumber",{required:!e.config.optional}),p=ge(),g=f("countryCode");return Ee(()=>{p.current&&(p.current.focus(),p.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(_=>{const S=_.phoneNumber.replace(/[^0-9]/g,""),x=_.countryCode.replace(/[^0-9]/g,"");i(void 0);const L=e.config.minChars??7,j=S.length+x.length;if(j<L)return i(n("validation_phone_min_chars",{count:L}));const F=e.config.maxChars;if(F!=null&&j>F)return i(n("validation_max_chars",{count:F}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:x,phoneNumber:S}}):t({type:"string",value:g+_.phoneNumber})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[u("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[u("span",{children:["+",g]}),u("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Ua).map(([_,S])=>u("option",{value:S,children:[_," (+",S,")"]},_))})]}),u("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:_=>{_&&(p.current=_),d(_)},class:tr({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&u(lt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),u(Ot,{})]}),u(er,{error:c.countryCode||c.phoneNumber||{message:a},refusal:!0})]})},wn=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),El=(e,t,r,n)=>r!==void 0&&n*1e3>Nn?e("submission_available_at",{time:Ci(r,t)}):e("submission_cooldown",{count:n}),kg=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},Sg=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=de(),{availableAt:a}=e.config,[i,o]=ze(()=>wn(a)),[s,l]=ze("");Tt(()=>{const f=wn(a);if(o(f),f===0)return;l(El(r,n,a,f));const d=setInterval(()=>{const h=wn(a);o(h),!(h>0)&&(clearInterval(d),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(d)},[a,n,r]);const c=i>0;return u("div",{class:"flex flex-col items-center gap-2 py-3",children:[u("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 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":c,"aria-describedby":c?"submit-cooldown":void 0,onClick:()=>{wn(a)>0||t(null)},children:u("span",{class:"flex items-center gap-1.5",children:[u("span",{class:"inline-flex items-center text-sm font-medium",children:kg(e.config.label,r)}),u("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("path",{d:"M4 8L8 4L12 8"}),u("path",{d:"M8 4V13"})]})]})}),c&&u("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:El(r,n,a,i)}),u("p",{role:"status",class:"sr-only",children:s})]})},Cg=160,$l=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Cg)}px`},Eg={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},$g=Xt("string"),Ag=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return vn(te({text:{date:je(M(t("validation_date")),Un(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:je(M(t("validation_email")),zn(t("validation_email")),et(e.minChars??1,r.minLength),$t(e.maxChars??1/0,r.maxLength)),text:je(M(),et(e.minChars??1,r.minLength),$t(e.maxChars??1/0,r.maxLength)),url:je(M(t("validation_url")),Fi(t("validation_url")),et(e.minChars??1,r.minLength),$t(e.maxChars??1/0,r.maxLength))}[e.format]}))},Ig={text:({input:e,onSubmitSuccess:t})=>{var v;const{t:r}=de(),n=e.key?(v=O.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,a=e.config.defaultValue,i=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:c}}=mn({defaultValues:{text:$g(n)?n.value:a??""},resolver:Ag(e.config,r)}),{ref:f,...d}=o("text",{required:!e.config.optional}),h=ge();Ee(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&$l(h.current),h.current.focus(),h.current.select())},[]);const p=e.config.maxChars,g=i&&p!==void 0?l("text").length:void 0;return u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(_=>{t({type:"string",value:_.text})}),children:[u("div",{class:i?"flex items-end gap-2":"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-1",children:[i?u("textarea",{id:"chat-input",...d,rows:2,maxLength:p,autoFocus:!0,"aria-describedby":g!==void 0?"chat-input-count":void 0,onInput:_=>$l(_.currentTarget),onKeyDown:_=>{var S;_.key==="Enter"&&(_.ctrlKey||_.metaKey)&&(_.preventDefault(),(S=_.currentTarget.form)==null||S.requestSubmit())},ref:_=>{_&&(h.current=_),f(_)},placeholder:e.config.placeholder,class:tr({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):u("input",{id:"chat-input",...d,...Eg[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:_=>{_&&(h.current=_),f(_)},placeholder:e.config.placeholder,class:tr({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&u(lt,{class:i?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),u(Ot,{})]}),g!==void 0&&p!==void 0&&u("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[g,"/",p]}),u(er,{error:c.text,refusal:!0})]})},phone:xg,"multiple-choice":pg,boolean:Dh,file:Nh,submit:Sg,address:$h,number:bg},Tg=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=O.current$.value.flow)==null?void 0:o.data.currentInput,a=ge(null),i=()=>ie.onInteractionFn$.value();return Ee(()=>{var s;(s=a.current)==null||s.scrollTo({top:0})},[n]),u("div",{ref:a,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:u("div",{class:"flex flex-col",onPointerDownCapture:n?i:void 0,onKeyDownCapture:n?i:void 0,onInputCapture:n?i:void 0,children:n?(()=>{const s=Ig[n.type];return u(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:ie.onSubmitSuccessFn$.value,input:n})})():u("div",{class:"flex items-center gap-2 p-2.5",children:[u("input",{"aria-hidden":"true",id:"chat-input",class:tr({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),u(Ot,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Dg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mg=function(e){return e instanceof RegExp},Lg=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Al=function(e){return typeof e=="string"},jg=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Fg(e,t,r){var n=0,a=0;if(e==="")return e;if(!e||!Al(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=t;Mg(i)||(i=new RegExp("("+Lg(i)+")","gi"));for(var o=e.split(i),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}a=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=a}return o}var Og=function(t,r,n){return Array.isArray(t)||(t=[t]),jg(t.map(function(a){return Al(a)?Fg(a,r,n):a}))};const Er=Dg(Og),Ng=/(\[[^\]]+\]\([^)]+\))/g,Pg=/\[([^\]]+)\]\(([^)]+)\)/,Rg=/(https?:\/\/[^\s]+)/g,Vg=/_(.*?)_/g,Bg=/\*\*(.*?)\*\*/g,zg=/(\\n|\n)/g,Il="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Ug=e=>{const t=Er(e,Ng,(s,l)=>{const[,c,f]=s.match(Pg)??[];return f?u("a",{class:Il,href:f,children:c??f},f+l):u("span",{children:"INVALID LINK"})}),r=Er(t,Rg,(s,l)=>u("a",{class:Il,href:s,children:s},s+l)),n=Er(r,Vg,(s,l)=>u("em",{children:s},s+l)),a=Er(n,Bg,(s,l)=>u("strong",{children:s},s+l));let i=0;return Er(a,zg,()=>u("br",{},`br-${i++}`))},qg=Mt("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"}}),Wg=({children:e,className:t,animate:r,side:n,...a})=>u("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:qg({className:t,side:n,animate:r}),...a,children:e}),Tl=new Map,Dl=of({overrides:{},locale:void 0}),Hg=(e,t)=>{const r=t==null?void 0:t.trim();if(!r)return e("job_alerts_privacy");const n=e("job_alerts_privacy_sender",{employer:r});return e("job_alerts_privacy")!==Dl("job_alerts_privacy")&&n===Dl("job_alerts_privacy_sender",{employer:r})?e("job_alerts_privacy"):n},Kg=({flow:e,rpcClient:t})=>{const{t:r}=de(),n=e.data.flowSessionId,a=Tl.get(n)??Ne("offer");Tl.set(n,a);const i=l=>{const c=e.data.submissions[l];return(c==null?void 0:c.type)==="string"?c.value.trim():void 0},o=i("email")||e.nodes.flatMap(l=>l.type==="question-text"&&l.data.format==="email"?[i(l.data.key)]:[]).find(l=>!!l);if(!o||a.value==="declined")return null;if(a.value==="success")return u("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(a.value!=="offer"&&a.value!=="error")){a.value="saving";try{await Fd(t,{contact:{email:o,first_name:i("first_name"),last_name:i("last_name")},job:e.job}),a.value="success"}catch{a.value="error"}}};return u("div",{class:"bg-neutral-2 flex flex-col gap-2 rounded-xl p-3 text-sm",children:[u("p",{children:r("job_alerts_offer",{email:o})}),a.value==="error"?u("p",{role:"alert",children:r("job_alerts_error")}):null,u("div",{class:"flex gap-2",children:[u("button",{type:"button",class:"bg-accent-9 min-h-[44px] rounded-lg px-3 py-2 text-white",disabled:a.value==="saving",onClick:s,children:r("job_alerts_accept")}),u("button",{type:"button",class:"min-h-[44px] rounded-lg px-3 py-2",disabled:a.value==="saving",onClick:()=>{a.value!=="offer"&&a.value!=="error"||(a.value="declined")},children:r("job_alerts_decline")})]}),u("p",{class:"text-xs",children:Hg(r,e.employer)})]})},Gg=({message:e,analytics:t})=>u("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:u("a",{onClick:()=>{var a;const r=O.current$.peek().flow,n=r==null?void 0:r.nodes.find(i=>i.id===e.groupId);r&&((n==null?void 0:n.type)==="integration-application-submit"||(n==null?void 0:n.type)==="link"&&Rs(n.data.href,e.href))&&(st(r).redirected(),Ft(t,r,"redirect")),(a=e.onClick)==null||a.call(e)},class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,u("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Yg=({className:e,...t})=>u("div",{"aria-hidden":!0,children:ie.isBotTyping$.value===!0?u("div",{"data-testid":"typing-indicator",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>u("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0}),Jg={bot:"left",user:"right"},Zg=Mt("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"}}}),Xg=({env:e,lastSentMessageFooter:t,rpcClient:r,analytics:n})=>{const{t:a}=de(),i=O.current$.value.flow,o=(i==null?void 0:i.data.messages)??[],s=o.findIndex(c=>c.type==="system"&&c.semantic==="submission-closed"),l=i?Ma(i):void 0;return u("ol",{"aria-label":a("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[o.map((c,f)=>u(ce,{children:[u("li",{class:"flex",tabIndex:f===o.length-1?-1:void 0,children:[l&&c.groupId===l&&!o.slice(f+1).some(d=>d.groupId===l)?t:null,rn(c).with({type:"system"},d=>u("p",{class:Zg({variant:d.variant}),children:d.text})).with({type:"text",author:Dt.union("bot","user")},d=>{const h=f===o.length-1,p=d.author==="bot"?Ug(d.text):d.text;return u(ce,{children:u(Wg,{animate:h,side:Jg[d.author],children:p},f)})}).with({type:"link"},d=>u(Gg,{message:d,analytics:n})).with({type:"image"},d=>u("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:d.url,style:{aspectRatio:d.width/d.height}})).with({type:"file"},d=>u(Lh,{class:d.author==="bot"?void 0:"ml-auto",file:{name:d.fileName,sizeKb:d.fileSizeKb}})).with({type:"loading"},d=>{const h=o[o.length-1];return!(d===h)||ie.isBotTyping$.value||i!=null&&i.data.isFinished?null:u("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[u(cn,{"aria-hidden":d.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),d.text?u("p",{role:"status",class:"text-neutral-11 text-sm",children:d.text}):null]})}).exhaustive()]}),f===s&&(i!=null&&i.jobAlerts)&&r?u("li",{children:u(Kg,{flow:i,rpcClient:r},i.data.flowSessionId)}):null]},f)),e&&e!=="production"&&(i==null?void 0:i.data.isFinished)&&i.data.stagingDestination&&u("li",{class:"text-neutral-11 text-center text-xs",children:i.data.stagingDestination}),u("li",{class:ie.captchaVisible$.value?"flex":"hidden",children:u("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":a("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),u(Yg,{},"typing")]})},Qg=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:a,env:i})=>{const{flow:o}=O.current$.value;ot(o,"Flow is required to exist to show chatbot body");const s=O.viewState$.value,{chatRef:l,chatService:c}=th(),{t:f}=de(),[d,h]=ze();return Ee(()=>{s==="maximised"&&ie.scrollToEnd()},[s]),Ee(()=>{var B;const{state:p,flow:g}=O.current$.peek();if(p!=="loaded")throw new Error(f("invalid_state"));let v=g.data.nodeHistory.at(-1);if(ie.scrollToEnd(),O.setInput(void 0),g.data.isFinished)return;const _=()=>{const k=O.current$.peek().flow;k&&st(k).active(),!(!k||k.data.hasInteracted)&&(O.markAsInteracted(),Ws(n,k,"FLOW_INTERACT"))};ie.onInteractionFn$.value=_,v===void 0?(v=js(o.nodes).id,O.setCurrentNodeId(v),Ws(n,g,"FLOW_START")):O.removeMessagesSentByNodeIds([v,za]);const{interpret:S,abort:x,undo:L}=_p({context:o.context,analytics:{service:n,customProperties:(B=o.analytics)==null?void 0:B.customProperties},apiClient:Zp(t,n,g),logger:e,talentBankClient:a,flow:o,chatService:c,t:f,getApplicationRecovery:()=>{var k;return(k=O.current$.peek().flow)==null?void 0:k.data.applicationRecovery},setApplicationRecovery:O.setApplicationRecovery,persistWriteBarrier:()=>O.persistWriteBarrier(g),getSubmissions:()=>{var k;return(k=O.current$.peek().flow)==null?void 0:k.data.submissions},onInterpret:k=>O.setCurrentNodeId(k.id),onFlowEnd:async()=>{var C;O.markAsFinished(),Ft(n,g,"submit");const k=O.current$.peek().flow;ot(k),n.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:k.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(C=o.analytics)==null?void 0:C.customProperties})}}),j=v,F=()=>{h(()=>L),S(j)},V=new AbortController;return g.offerResume?yh({chatService:c,t:f,signal:V.signal}).then(k=>(O.settleResume(g),k?F():(O.restart(),ke.flushStateData()))).catch(k=>{k instanceof pt||e.error("Resume prompt failed",k)}):F(),()=>{V.abort(),ie.onInteractionFn$.value===_&&(ie.onInteractionFn$.value=()=>{}),x()}},[n,t,c,e,o,a,f]),u(ce,{children:[u("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[u("div",{ref:l,role:"region","aria-label":f("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:u(Xg,{analytics:n,env:i,rpcClient:r,lastSentMessageFooter:!Ma(o)||!d?null:u(eb,{undoFn:d})})}),ie.isReadingHistory$.value&&!o.data.isFinished&&!ie.isBotTyping$.value&&u("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:u(wr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var g,v;ie.scrollToEnd(),(v=((g=l.current)==null?void 0:g.querySelector('li[tabindex="-1"]'))??l.current)==null||v.focus({preventScroll:!0})},children:u(xs,{})})})]}),u(Tg,{logger:e,analytics:n,rpcClient:r})]})},eb=({undoFn:e})=>{const{t}=de();return u("div",{class:"flex flex-1 items-center justify-end px-1",children:u(wr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=O.current$.peek();ot(r),st(r).active(),e(r.data.nodeHistory)},children:u("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"})})})},tb=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Qg},Symbol.toStringTag,{value:"Module"}))})();
|