@inploi/plugin-chatbot 14.17.2 → 14.18.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 -1
- package/cdn/index.js +35 -6
- package/dist/chatbot-body-568f8bdb.cjs +5 -0
- package/dist/chatbot-body-b81136fe.cjs +5 -0
- package/dist/chatbot-body-c8f256af.js +4637 -0
- package/dist/chatbot-body-e611f2c7.js +4637 -0
- package/dist/chatbot.beacon.d.ts +40 -0
- package/dist/chatbot.beacon.test.d.ts +1 -0
- package/dist/common.geo-transport-CJGUJXTA-1d0a086a.js +41 -0
- package/dist/common.geo-transport-CJGUJXTA-2b8bbb52.cjs +1 -0
- package/dist/components/chat-input/chat-input.address-geo.test.d.ts +1 -0
- package/dist/components/chat-input/chat-input.address.d.ts +1 -1
- package/dist/index-0fbc8442.js +3756 -0
- package/dist/{index-c55803dd.js → index-19a00d2c.js} +1871 -1644
- package/dist/index-495ec66b.cjs +22 -0
- package/dist/index-90fa15a1.cjs +22 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/widget-version.d.ts +2 -0
- package/package.json +5 -5
- package/dist/chatbot-body-045352bb.cjs +0 -5
- package/dist/chatbot-body-977addfb.js +0 -4447
- package/dist/index-62545280.cjs +0 -5
package/cdn/index.js
CHANGED
|
@@ -1,9 +1,38 @@
|
|
|
1
|
-
var Wh=Object.defineProperty;var Kh=(_e,qe,Xe)=>qe in _e?Wh(_e,qe,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):_e[qe]=Xe;var pe=(_e,qe,Xe)=>(Kh(_e,typeof qe!="symbol"?qe+"":qe,Xe),Xe);(function(){"use strict";var _e;function qe(e){return{lang:(e==null?void 0:e.lang)??(_e==null?void 0:_e.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(_e==null?void 0:_e.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(_e==null?void 0:_e.abortPipeEarly)}}var Xe;function ml(e){return Xe==null?void 0:Xe.get(e)}var gn;function yl(e){return gn==null?void 0:gn.get(e)}var bn;function _l(e,t){var r;return(r=bn==null?void 0:bn.get(e))==null?void 0:r.get(t)}function vn(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 Ie(e,t,r,n,i){let a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??vn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},d=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??_l(e.reference,l.lang)??(d?yl(l.lang):null)??n.message??ml(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),d&&(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},qe())}}}function xl(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function wn(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function Xi(e){return{kind:"transformation",type:"transform",reference:Xi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function kl(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function mn(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Qi(){return{kind:"schema",type:"any",reference:Qi,expects:"any",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function ea(e,t){return{kind:"schema",type:"array",reference:ea,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var a;let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){let s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){let d={type:"array",origin:"value",input:i,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(d):f.path=[d],(a=r.issues)==null||a.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 Ie(this,"type",r,n);return r}}}function yn(e){return{kind:"schema",type:"boolean",reference:yn,expects:"boolean",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ie(this,"type",t,r),t}}}function Ae(e,t){return{kind:"schema",type:"literal",reference:Ae,expects:vn(e),async:!1,literal:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Ie(this,"type",r,n),r}}}function ta(e){return{kind:"schema",type:"null",reference:ta,expects:"null",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return t.value===null?t.typed=!0:Ie(this,"type",t,r),t}}}function Et(e,t){return{kind:"schema",type:"nullable",reference:Et,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=mn(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Nr(e){return{kind:"schema",type:"number",reference:Nr,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:Ie(this,"type",t,r),t}}}function ee(e,t){return{kind:"schema",type:"object",reference:ee,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var a;let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in i?i[o]:mn(s),d=s["~run"]({value:l},n);if(d.issues){let f={type:"object",origin:"value",input:i,key:o,value:l};for(let u of d.issues)u.path?u.path.unshift(f):u.path=[f],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=kl(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ie(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else Ie(this,"type",r,n);return r}}}function xe(e,t){return{kind:"schema",type:"optional",reference:xe,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=mn(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ra(e,t){return{kind:"schema",type:"picklist",reference:ra,expects:wn(e.map(vn),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Ie(this,"type",r,n),r}}}function _n(e,t,r){return{kind:"schema",type:"record",reference:_n,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return we(this)},"~run"(n,i){var o,s;let a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(let l in a)if(xl(a,l)){let d=a[l],f=this.key["~run"]({value:l},i);if(f.issues){let g={type:"object",origin:"key",input:a,key:l,value:d};for(let h of f.issues)h.path=[g],(o=n.issues)==null||o.push(h);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}let u=this.value["~run"]({value:d},i);if(u.issues){let g={type:"object",origin:"value",input:a,key:l,value:d};for(let h of u.issues)h.path?h.path.unshift(g):h.path=[g],(s=n.issues)==null||s.push(h);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else Ie(this,"type",n,i);return n}}}function ge(e){return{kind:"schema",type:"string",reference:ge,expects:"string",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ie(this,"type",t,r),t}}}function na(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function xn(e,t){return{kind:"schema",type:"union",reference:xn,expects:wn(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){let i,a,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];Ie(this,"type",r,n,{issues:na(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ie(this,"type",r,n,{issues:na(o)})}return r}}}function Vt(){return{kind:"schema",type:"unknown",reference:Vt,expects:"unknown",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function ia(e,t,r){return{kind:"schema",type:"variant",reference:ia,expects:"Object",async:!1,key:e,options:t,message:r,get"~standard"(){return we(this)},"~run"(n,i){let a=n.value;if(a&&typeof a=="object"){let o,s=0,l=this.key,d=[],f=(u,g)=>{for(let h of u.options){if(h.type==="variant")f(h,new Set(g).add(h.key));else{let v=!0,w=0;for(let k of g){let C=h.entries[k];if(k in a?C["~run"]({typed:!1,value:a[k]},{abortEarly:!0}).issues:C.type!=="exact_optional"&&C.type!=="optional"&&C.type!=="nullish"){v=!1,l!==k&&(s<w||s===w&&k in a&&!(l in a))&&(s=w,l=k,d=[]),l===k&&d.push(h.entries[k].expects);break}w++}if(v){let k=h["~run"]({value:a},i);(!o||!o.typed&&k.typed)&&(o=k)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;Ie(this,"type",n,i,{input:a[l],expected:wn(d,"|"),path:[{type:"object",origin:"value",input:a,key:l,value:a[l]}]})}else Ie(this,"type",n,i);return n}}}function Sl(...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 dr(e,t,r){let n=e["~run"]({value:t},qe(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var Cl=e=>({ok:!0,err:!1,val:e}),El=e=>({err:!0,ok:!1,val:e}),kn=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function Sn(e,t,r){var o,s;let n=e.find(l=>l.type==="pre-apply-result");if(!n)return;let i=(o=t[n.data.participationKey])==null?void 0:o.value,a={};if(i===!0)for(let l of kn(e)){let d=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(d)&&d.length===1&&(d=d[0]),(typeof d=="boolean"||typeof d=="string")&&(a[l.data.key]=d)}return{node_id:n.id,flow_session_id:r,participation:i,answers:a}}function $l(e,t){let r=Sn(e,t,""),n=kn(e).map(a=>{let o=a.data.preApply,s=r==null?void 0:r.answers[a.data.key],l=a.type==="question-boolean"?typeof s=="boolean":a.data.options.some(d=>d.value===s);return{key:a.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),i=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&n.length>0&&n.every(a=>a.valid)?"completed":"unavailable";return{status:i,hasHardConcerns:i==="completed"?n.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:i==="completed"?n.some(a=>!a.matched&&a.severity==="advisory"):null,answers:i==="completed"?n:[]}}function Il(e,t){let r=new Set(kn(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 ft=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},Al=(e,t="all")=>{let r={},n=t==="all"?null:new Set(t);for(let i in e){let a=e[i];a&&(n&&!n.has(i)||(r[i]=a.value))}return r},aa=(e,t)=>{let r=new Set(e.flatMap(n=>n.type==="add-submission"?[n.data.key]:[]));return Object.entries(t).some(([n,i])=>i!==void 0&&i.type!=="integration"&&!r.has(n))},Tl=({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},oa=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let i=ur(n,t);switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r[e]},Dl=e=>{let t=e.split(".").pop();return t?Cl(t?"."+t:""):El("No file extension found")},sa=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let i=Dl(n.name);return i.ok&&r.includes(i.val.toLowerCase())})},Rt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,jr=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,Fl=ee({integration_response:ee({data:ee({redirect_url:ge(),message:xe(Et(ge())),button_text:xe(Et(ge()))})})}),Cn=e=>dr(Fl,e).success,Ll=ee({integration_response:ee({status:xe(Vt()),error:ee({message:ge(),data:xe(Vt())})})}),la=e=>dr(Ll,e).success,Nl=ee({success:Ae(!0),integration_response:ee({data:ee({outcome:Ae("pending"),message:xe(Vt())}),error:xe(ta())})}),En=e=>{let t=dr(Nl,e);if(!t.success||Cn(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};ee({success:Ae(!1),message:xe(Vt())});var jl=ee({error:Ae("Validation failed"),messages:ee({})}),Ml=(e,t)=>t===422&&dr(jl,e).success,ca=(e,t)=>{if(!la(e))return;let r=e.integration_response,n=r.error.data,i=typeof n=="object"&&n!==null?n:{},a=v=>typeof i[v]=="string"?i[v]:void 0,o=v=>typeof i[v]=="boolean"?i[v]:void 0,s=v=>{let w=i[v];return Number.isSafeInteger(w)&&w>=0?w:void 0},l=v=>{let w=a(v),k=w===void 0?NaN:Date.parse(w);return Number.isFinite(k)?k:void 0},d=typeof r.status=="number"?r.status:t,f=a("phase"),u=a("verdict"),g=a("code"),h=d===409&&f==="submit"&&u==="confirmed"?"duplicate":d===410&&g==="job_closed"?"closed":f==="submit"&&u==="unknown"?"unknown":void 0;return{message:r.error.message,status:d,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:u,code:g,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:h}},Ol=ia("reason",[ee({outcome:Ae("sent"),reason:Ae("sandbox"),ats_label:Et(ge())}),ee({outcome:Ae("held"),reason:ra(["production_connection","no_sandbox_known","company_hold"]),ats_label:Et(ge())}),ee({outcome:Ae("internal"),reason:Ae("internal"),ats_label:Et(ge())}),ee({outcome:Ae("held"),reason:Ae("redirect"),ats_label:ge()})]),Pl=e=>{let t=dr(ee({staging_destination:Ol}),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}`}},da=3e4,Vl=2e4,Rl=6e4,$n=12e4,ua=6*60*6e4,Bl=60*6e4,fa=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<=ua?t:void 0},zl=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=fa(e);return t===void 0?{}:{until:t}},pa=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Ul=(e,t)=>{let r=fa(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:da};let n=(e??0)+1,i=Math.min(n*Vl,Rl),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(i,a),$n),throttles:n}},ha=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Hl=e=>{if(!la(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},ql=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",Wl=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",Kl=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,Gl=(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 i="data"in n,a=n.error,o=typeof a=="object"&&a!==null&&typeof a.message=="string"&&"data"in a;if(!i&&!o)return null;let s=i?n.data:a.data??null;return{service:n.service??"INVALID_SERVICE",response:{status:n.status,payload:s},...En(e)&&{outcome:"pending"}}},Yl=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},Zl=(e,t)=>{if(!Yl(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},Jl=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)}),ga=e=>typeof e=="object"&&e!==null&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),In=(e,t)=>e?{...e,...Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>{let i=e[r];return[r,ga(i)&&ga(n)?In(i,n):n]}))}:t,Xl=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let i=t[n];if(!i)continue;let a=ur(e,n.split("."));if(i.required&&a==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(a!=null)switch(i.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}};let Qe;function ba(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)}}let An;function Ql(e){return An==null?void 0:An.get(e)}let Tn;function ec(e){return Tn==null?void 0:Tn.get(e)}let Dn;function tc(e,t){var r;return(r=Dn==null?void 0:Dn.get(e))==null?void 0:r.get(t)}function Fn(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 Te(e,t,r,n,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Fn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},d=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??tc(e.reference,l.lang)??(d?ec(l.lang):null)??n.message??Ql(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function De(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ba())}}}function rc(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function va(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}const nc=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function wa(e){return{kind:"validation",type:"email",reference:wa,expects:null,async:!1,requirement:nc,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&Te(this,"email",t,r),t}}}function Ln(e,t){return{kind:"validation",type:"max_length",reference:Ln,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&Te(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Mr(e,t){return{kind:"validation",type:"min_length",reference:Mr,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&Te(this,"length",r,n,{received:`${r.value.length}`}),r}}}function ma(e){return{kind:"transformation",type:"transform",reference:ma,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Nn(){return{kind:"transformation",type:"trim",reference:Nn,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function ic(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Or(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Pr(e,t){return{kind:"schema",type:"array",reference:Pr,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const d={type:"array",origin:"value",input:i,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(d):f.path=[d],(a=r.issues)==null||a.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 Te(this,"type",r,n);return r}}}function jn(e){return{kind:"schema",type:"boolean",reference:jn,expects:"boolean",async:!1,message:e,get"~standard"(){return De(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Te(this,"type",t,r),t}}}function ya(e,t){return{kind:"schema",type:"literal",reference:ya,expects:Fn(e),async:!1,literal:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Te(this,"type",r,n),r}}}function Y(e,t){return{kind:"schema",type:"nullable",reference:Y,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return De(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=Or(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function et(e,t){return{kind:"schema",type:"nullish",reference:et,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return De(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=Or(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 De(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Te(this,"type",t,r),t}}}function he(e,t){return{kind:"schema",type:"object",reference:he,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:Or(s),d=s["~run"]({value:l},n);if(d.issues){const f={type:"object",origin:"value",input:i,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(f):u.path=[f],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=ic(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Te(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else Te(this,"type",r,n);return r}}}function tt(e,t){return{kind:"schema",type:"optional",reference:tt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return De(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Or(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function pt(e,t){return{kind:"schema",type:"picklist",reference:pt,expects:va(e.map(Fn),"|"),async:!1,options:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Te(this,"type",r,n),r}}}function Vr(e,t,r){return{kind:"schema",type:"record",reference:Vr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return De(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(rc(a,l)){const d=a[l],f=this.key["~run"]({value:l},i);if(f.issues){const g={type:"object",origin:"key",input:a,key:l,value:d};for(const h of f.issues)h.path=[g],(o=n.issues)==null||o.push(h);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:d},i);if(u.issues){const g={type:"object",origin:"value",input:a,key:l,value:d};for(const h of u.issues)h.path?h.path.unshift(g):h.path=[g],(s=n.issues)==null||s.push(h);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else Te(this,"type",n,i);return n}}}function F(e){return{kind:"schema",type:"string",reference:F,expects:"string",async:!1,message:e,get"~standard"(){return De(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Te(this,"type",t,r),t}}}function _a(e){let t;if(e)for(const r of e)t?t.push(...r.issues):t=r.issues;return t}function xa(e,t){return{kind:"schema",type:"union",reference:xa,expects:va(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){let i,a,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];Te(this,"type",r,n,{issues:_a(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Te(this,"type",r,n,{issues:_a(o)})}return r}}}function ka(){return{kind:"schema",type:"unknown",reference:ka,expects:"unknown",async:!1,get"~standard"(){return De(this)},"~run"(e){return e.typed=!0,e}}}function Bt(...e){return{...e[0],pipe:e,get"~standard"(){return De(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 Mn(e,t,r){const n=e["~run"]({value:t},ba(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var ac=e=>e,oc=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},sc=class extends oc{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},lc={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function On(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function Gh(e){return e}var cc=["agent","sdk","form","integration","migration"],dc=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],uc=["screening","cv_match","interview","overall"],fc=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],pc=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Sa=pt(cc),hc=pt(dc),gc=Bt(F(),Nn(),Mr(1),Ln(100)),bc=pt(uc),vc=pt(fc),wc=Bt(F(),Nn(),Mr(1),Ln(100)),mc=pt(pc),Ca=he({id:F(),email:Y(F()),firstName:Y(F()),lastName:Y(F()),phone:Y(F()),source:Y(Sa),identifiedAt:Y(F()),createdAt:F(),updatedAt:F()}),Ea=Bt(F(),Mr(1)),Pn=Vr(F(),ka()),yc=he({id:F(),applicationId:F(),status:vc,scheduledAt:Y(F()),completedAt:Y(F()),meta:Y(Pn),createdAt:F(),updatedAt:F()}),_c=he({score:Ve(),reason:F(),confidence:Ve()}),$a=he({id:F(),candidateId:F(),jobId:Ve(),stage:gc,stageGroup:hc,stageEnteredAt:F(),rating:Y(Ve()),disqualifiedAt:Y(F()),disqualificationReason:Y(wc),disqualificationNote:Y(F()),source:mc,sourceDetail:Y(F()),sessionId:Y(Ve()),externalApplicationId:Y(F()),meta:Y(Pn),context:Y(Pn),scoredAt:Y(F()),createdAt:F(),updatedAt:F()}),xc=he({id:F(),applicationId:F(),scoreType:bc,score:Y(Ve()),reason:Y(F()),categories:Y(Vr(F(),_c)),scoredBy:Y(F()),createdAt:F()});({...$a.entries},{...Ca.entries});var kc=he({anonymousId:Ea,email:Ea,firstName:et(F()),lastName:et(F()),phone:et(F()),source:et(Sa)}),Sc=he({candidateId:F(),isNew:jn()}),Cc=he({id:F(),stageGroup:F(),createdAt:F()}),Ec=he({isDuplicate:jn(),existingApplication:tt(Cc)}),$c=({environment:e,publishableKey:t,logger:r})=>{let n=lc[e];return{async checkDuplicate(i){try{let a=new URLSearchParams({email:i.email,scope:i.scope});i.scope==="job"&&i.jobId!=null&&a.set("job_id",String(i.jobId));let o=await fetch(`${n}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Mn(Ec,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(i){try{if(!i.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:i.email,firstName:i.firstName,lastName:i.lastName,phone:i.phone,anonymousId:i.anonymousId,source:i.source??"sdk"},o=Mn(kc,a);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=Mn(Sc,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},Ic=["DAILY","WEEKLY","MONTHLY"],Ac=Vr(F(),xa([F(),Pr(F()),he({type:ya("provided"),lat:Ve(),lng:Ve(),radius:Ve(),unit:tt(pt(["miles","km"])),label:tt(F())})])),Tc={pathname:"/job/:id",method:"GET",schema:{response:he({id:Ve(),external_id:et(F()),city:et(F()),town:et(F()),category:et(F())})}};async function Dc(e,{contact:t,job:r}){var i;let n={};if(r){let a=await e.request(Tc,{params:{id:r.id}});if((r.id_type==="internal"?String(a.id):a.external_id)!==r.id)throw new Error("Job lookup returned a different role");for(let o of["city","town","category"]){let s=(i=a[o])==null?void 0:i.trim();s&&(n[o]=[s])}}await e.request(Fc,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var Fc={pathname:"/search/save",method:"POST",schema:{response:On(),body:he({contact:he({email:Bt(tt(F()),F(),wa()),first_name:tt(F()),last_name:tt(F())}),alerts:Bt(tt(F()),F(),pt(Ic)),filters:Ac})}},Lc=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:Bt(he({country:tt(Pr(he({value:F()})),[])}),ma(({country:r})=>r.map(({value:n})=>n))),searchParams:On()}};return e.request(t,{searchParams:{filters:{country:null}}})},Ia={uk:"gb","great britain":"gb",england:"gb",scotland:"gb",wales:"gb","northern ireland":"gb","republic of ireland":"ie",eire:"ie","hong kong sar":"hk",usa:"us","united states of america":"us",turkey:"tr","czech republic":"cz",burma:"mm"},Nc=new Set(["AC","CP","CQ","DG","EA","EU","EZ","IC","QO","TA","UN","XA","XB","ZZ","AN","BU","CS","DD","DY","FX","HV","NH","RH","SU","TP","UK","VD","YD","YU","ZR"]),zt,jc=()=>{if(zt)return zt;zt=new Map;let e=new Intl.DisplayNames(["en"],{type:"region",fallback:"none"});for(let t=65;t<=90;t++)for(let r=65;r<=90;r++){let n=String.fromCharCode(t,r);if(Nc.has(n))continue;let i=e.of(n);!i||i===n||(zt.set(i.toLowerCase(),n.toLowerCase()),zt.set(n.toLowerCase(),n.toLowerCase()))}return zt},Mc=e=>{let t=e.trim().toLowerCase();return Object.prototype.hasOwnProperty.call(Ia,t)?Ia[t]:jc().get(t)},Oc=e=>[...new Set(e.flatMap(t=>Mc(t)??[]))].sort(),Rr=new WeakMap,Aa=e=>(Rr.has(e)||(Rr.set(e,void 0),Lc(e).then(t=>{Rr.set(e,Oc(t).join(",")||void 0)}).catch(()=>{})),Rr.get(e)),Pc=(e,t)=>{let r=new Set,n=[];for(let i=0;i<Math.max(e.length,t.length);i++)for(let a of[e[i],t[i]]){if(!a)continue;let o=a.mapbox_id||a.full_address||[a.name,a.place_formatted].filter(Boolean).join(", ");if(!r.has(o)&&(r.add(o),n.push(a),n.length===5))return n}return n},Vc=600,Rc=async(e,t,r)=>{if(r==null||r.throwIfAborted(),!t){let n=await e();return r==null||r.throwIfAborted(),n}return new Promise((n,i)=>{let a,o,s,l=!1,d=()=>{l=!0,clearTimeout(s),r==null||r.removeEventListener("abort",f)},f=()=>{d(),i(r==null?void 0:r.reason)},u=()=>{d(),(a==null?void 0:a.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(Pc(a.value,o.value)):(a==null?void 0:a.status)==="fulfilled"?n(a.value):(o==null?void 0:o.status)==="fulfilled"?n(o.value):(a==null?void 0:a.status)==="rejected"&&i(a.reason)},g=(h,v)=>{l||(h?a=v:o=v,a&&o?u():v.status==="fulfilled"&&v.value.length>0&&(s=setTimeout(u,Vc)))};r==null||r.addEventListener("abort",f,{once:!0});for(let h of[!0,!1])e(h?t:void 0).then(v=>g(h,{status:"fulfilled",value:v}),v=>g(h,{status:"rejected",reason:v}))})},Ta=Sl(xn([ge(),Nr()]),Xi(String)),Da=ee({id:Ta,version:Nr(),build:Nr(),nodes:ea(Qi()),context_schema:xe(Et(_n(ge(),ee({required:yn(),type:xn([Ae("string"),Ae("number")])}))))}),Bc=ee({flow:Da}),zc=ee({company:ee({name:ge()}),context:xe(_n(ge(),Vt())),flow:Da,job:ee({id:Ta,title:ge()}),user:xe(ee({city:xe(ge()),country:xe(ge()),isEU:xe(yn()),continent:xe(ge())}))}),Uc=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),Hc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:On(),response:zc}},qc={pathname:"/flow/id/:id",method:"GET",schema:{response:Bc}},fr,T,Fa,La,$t,Na,ja,Vn,Ma,Ut={},Oa=[],Wc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Br=Array.isArray;function rt(e,t){for(var r in t)e[r]=t[r];return e}function Pa(e){var t=e.parentNode;t&&t.removeChild(e)}function je(e,t,r){var n,i,a,o={};for(a in t)a=="key"?n=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?fr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return pr(e,o,n,i,null)}function pr(e,t,r,n,i){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Fa};return i==null&&T.vnode!=null&&T.vnode(a),a}function Kc(){return{current:null}}function ae(e){return e.children}function Re(e,t){this.props=e,this.context=t}function zr(e,t){if(t==null)return e.__?zr(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"?zr(e):null}function Va(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 Va(e)}}function Rn(e){(!e.__d&&(e.__d=!0)&&$t.push(e)&&!Ur.__r++||Na!==T.debounceRendering)&&((Na=T.debounceRendering)||ja)(Ur)}function Ur(){var e,t,r,n,i,a,o,s,l;for($t.sort(Vn);e=$t.shift();)e.__d&&(t=$t.length,n=void 0,i=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(a=rt({},o)).__v=o.__v+1,Bn(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??zr(o),o.__h,i),Wa(n,o,i),o.__e!=s&&Va(o)),$t.length>t&&$t.sort(Vn));Ur.__r=0}function Ra(e,t,r,n,i,a,o,s,l,d,f){var u,g,h,v,w,k,C,_,E,x,$=0,L=n&&n.__k||Oa,B=L.length,O=B,D=t.length;for(r.__k=[],u=0;u<D;u++)(v=r.__k[u]=(v=t[u])==null||typeof v=="boolean"||typeof v=="function"?null:typeof v=="string"||typeof v=="number"||typeof v=="bigint"?pr(null,v,null,null,v):Br(v)?pr(ae,{children:v},null,null,null):v.__b>0?pr(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null&&(v.__=r,v.__b=r.__b+1,(_=Gc(v,L,C=u+$,O))===-1?h=Ut:(h=L[_]||Ut,L[_]=void 0,O--),Bn(e,v,h,i,a,o,s,l,d,f),w=v.__e,(g=v.ref)&&h.ref!=g&&(h.ref&&zn(h.ref,null,v),f.push(g,v.__c||w,v)),w!=null&&(k==null&&(k=w),x=!(E=h===Ut||h.__v===null)&&_===C,E?_==-1&&$--:_!==C&&(_===C+1?($++,x=!0):_>C?O>D-C?($+=_-C,x=!0):$--:$=_<C&&_==C-1?_-C:0),C=u+$,x=x||_==u&&!E,typeof v.type!="function"||_===C&&h.__k!==v.__k?typeof v.type=="function"||x?v.__d!==void 0?(l=v.__d,v.__d=void 0):l=w.nextSibling:l=za(e,w,l):l=Ba(v,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=k,u=B;u--;)L[u]!=null&&(typeof r.type=="function"&&L[u].__e!=null&&L[u].__e==r.__d&&(r.__d=L[u].__e.nextSibling),Ka(L[u],L[u]))}function Ba(e,t,r){for(var n,i=e.__k,a=0;i&&a<i.length;a++)(n=i[a])&&(n.__=e,t=typeof n.type=="function"?Ba(n,t,r):za(r,n.__e,t));return t}function nt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Br(e)?e.some(function(r){nt(r,t)}):t.push(e)),t}function za(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 Gc(e,t,r,n){var i=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&a===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&i==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&i==l.key&&a===l.type)return s;s++}}return-1}function Yc(e,t,r,n,i){var a;for(a in r)a==="children"||a==="key"||a in t||Hr(e,a,null,r[a],n);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||Hr(e,a,t[a],r[a],n)}function Ua(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Wc.test(t)?r:r+"px"}function Hr(e,t,r,n,i){var a;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||Ua(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Ua(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n||e.addEventListener(t,a?qa:Ha,a):e.removeEventListener(t,a?qa:Ha,a);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Ha(e){return this.l[e.type+!1](T.event?T.event(e):e)}function qa(e){return this.l[e.type+!0](T.event?T.event(e):e)}function Bn(e,t,r,n,i,a,o,s,l,d){var f,u,g,h,v,w,k,C,_,E,x,$,L,B,O,D=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(f=T.__b)&&f(t);try{e:if(typeof D=="function"){if(C=t.props,_=(f=D.contextType)&&n[f.__c],E=f?_?_.props.value:f.__:n,r.__c?k=(u=t.__c=r.__c).__=u.__E:("prototype"in D&&D.prototype.render?t.__c=u=new D(C,E):(t.__c=u=new Re(C,E),u.constructor=D,u.render=Jc),_&&_.sub(u),u.props=C,u.state||(u.state={}),u.context=E,u.__n=n,g=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),D.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=rt({},u.__s)),rt(u.__s,D.getDerivedStateFromProps(C,u.__s))),h=u.props,v=u.state,u.__v=t,g)D.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(D.getDerivedStateFromProps==null&&C!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(C,E),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(C,u.__s,E)===!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(V){V&&(V.__=t)}),x=0;x<u._sb.length;x++)u.__h.push(u._sb[x]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(C,u.__s,E),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,v,w)})}if(u.context=E,u.props=C,u.__P=e,u.__e=!1,$=T.__r,L=0,"prototype"in D&&D.prototype.render){for(u.state=u.__s,u.__d=!1,$&&$(t),f=u.render(u.props,u.state,u.context),B=0;B<u._sb.length;B++)u.__h.push(u._sb[B]);u._sb=[]}else do u.__d=!1,$&&$(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++L<25);u.state=u.__s,u.getChildContext!=null&&(n=rt(rt({},n),u.getChildContext())),g||u.getSnapshotBeforeUpdate==null||(w=u.getSnapshotBeforeUpdate(h,v)),Ra(e,Br(O=f!=null&&f.type===ae&&f.key==null?f.props.children:f)?O:[O],t,r,n,i,a,o,s,l,d),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),k&&(u.__E=u.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Zc(r.__e,t,r,n,i,a,o,l,d);(f=T.diffed)&&f(t)}catch(V){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),T.__e(V,t,r)}}function Wa(e,t,r){for(var n=0;n<r.length;n++)zn(r[n],r[++n],r[++n]);T.__c&&T.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){T.__e(a,i.__v)}})}function Zc(e,t,r,n,i,a,o,s,l){var d,f,u,g=r.props,h=t.props,v=t.type,w=0;if(v==="svg"&&(i=!0),a!=null){for(;w<a.length;w++)if((d=a[w])&&"setAttribute"in d==!!v&&(v?d.localName===v:d.nodeType===3)){e=d,a[w]=null;break}}if(e==null){if(v===null)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,h.is&&h),a=null,s=!1}if(v===null)g===h||s&&e.data===h||(e.data=h);else{if(a=a&&fr.call(e.childNodes),f=(g=r.props||Ut).dangerouslySetInnerHTML,u=h.dangerouslySetInnerHTML,!s){if(a!=null)for(g={},w=0;w<e.attributes.length;w++)g[e.attributes[w].name]=e.attributes[w].value;(u||f)&&(u&&(f&&u.__html==f.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(Yc(e,h,g,i,s),u)t.__k=[];else if(Ra(e,Br(w=t.props.children)?w:[w],t,r,n,i&&v!=="foreignObject",a,o,a?a[0]:r.__k&&zr(r,0),s,l),a!=null)for(w=a.length;w--;)a[w]!=null&&Pa(a[w]);s||("value"in h&&(w=h.value)!==void 0&&(w!==e.value||v==="progress"&&!w||v==="option"&&w!==g.value)&&Hr(e,"value",w,g.value,!1),"checked"in h&&(w=h.checked)!==void 0&&w!==e.checked&&Hr(e,"checked",w,g.checked,!1))}return e}function zn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){T.__e(n,r)}}function Ka(e,t,r){var n,i;if(T.unmount&&T.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(a){T.__e(a,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Ka(n[i],t,r||typeof e.type!="function");r||e.__e==null||Pa(e.__e),e.__=e.__e=e.__d=void 0}function Jc(e,t,r){return this.constructor(e,r)}function It(e,t,r){var n,i,a,o;T.__&&T.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Bn(t,e=(!n&&r||t).__k=je(ae,null,[e]),i||Ut,Ut,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?fr.call(t.childNodes):null,a,!n&&r?r:i?i.__e:t.firstChild,n,o),Wa(a,e,o)}function Ga(e,t){It(e,t,Ga)}function Xc(e,t,r){var n,i,a,o,s=rt({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?n=t[a]:a=="ref"?i=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?fr.call(arguments,2):r),pr(e.type,s,n||e.key,i||e.ref,null)}function Ya(e,t){var r={__c:t="__cC"+Ma++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,Rn(s)})},this.sub=function(o){i.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}fr=Oa.slice,T={__e:function(e,t,r,n){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(s){e=s}throw e}},Fa=0,La=function(e){return e!=null&&e.constructor===void 0},Re.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=rt({},this.state),typeof e=="function"&&(e=e(rt({},r),this.props)),e&&rt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Rn(this))},Re.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Rn(this))},Re.prototype.render=ae,$t=[],ja=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vn=function(e,t){return e.__v.__b-t.__v.__b},Ur.__r=0,Ma=0;var ht,te,Un,Za,Ht=0,Ja=[],qr=[],Xa=T.__b,Qa=T.__r,eo=T.diffed,to=T.__c,ro=T.unmount;function qt(e,t){T.__h&&T.__h(te,e,Ht||t),Ht=0;var r=te.__H||(te.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:qr}),r.__[e]}function Be(e){return Ht=1,no(oo,e)}function no(e,t,r){var n=qt(ht++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):oo(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],d=n.t(l,s);l!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=te,!te.u)){var i=function(s,l,d){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(g){return g.__c});if(f.every(function(g){return!g.__N}))return!a||a.call(this,s,l,d);var u=!1;return f.forEach(function(g){if(g.__N){var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!a||a.call(this,s,l,d))};te.u=!0;var a=te.shouldComponentUpdate,o=te.componentWillUpdate;te.componentWillUpdate=function(s,l,d){if(this.__e){var f=a;a=void 0,i(s,l,d),a=f}o&&o.call(this,s,l,d)},te.shouldComponentUpdate=i}return n.__N||n.__}function At(e,t){var r=qt(ht++,3);!T.__s&&qn(r.__H,t)&&(r.__=e,r.i=t,te.__H.__h.push(r))}function Fe(e,t){var r=qt(ht++,4);!T.__s&&qn(r.__H,t)&&(r.__=e,r.i=t,te.__h.push(r))}function me(e){return Ht=5,gt(function(){return{current:e}},[])}function Qc(e,t,r){Ht=6,Fe(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=qt(ht++,7);return qn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ed(e,t){return Ht=8,gt(function(){return e},t)}function io(e){var t=te.context[e.__c],r=qt(ht++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(te)),t.props.value):e.__}function td(e,t){T.useDebugValue&&T.useDebugValue(t?t(e):e)}function rd(){var e=qt(ht++,11);if(!e.__){for(var t=te.__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 nd(){for(var e;e=Ja.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Wr),e.__H.__h.forEach(Hn),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){te=null,Xa&&Xa(e)},T.__r=function(e){Qa&&Qa(e),ht=0;var t=(te=e.__c).__H;t&&(Un===te?(t.__h=[],te.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=qr,r.__N=r.i=void 0})):(t.__h.forEach(Wr),t.__h.forEach(Hn),t.__h=[],ht=0)),Un=te},T.diffed=function(e){eo&&eo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ja.push(t)!==1&&Za===T.requestAnimationFrame||((Za=T.requestAnimationFrame)||id)(nd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==qr&&(r.__=r.__V),r.i=void 0,r.__V=qr})),Un=te=null},T.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Wr),r.__h=r.__h.filter(function(n){return!n.__||Hn(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],T.__e(n,r.__v)}}),to&&to(e,t)},T.unmount=function(e){ro&&ro(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Wr(n)}catch(i){t=i}}),r.__H=void 0,t&&T.__e(t,r.__v))};var ao=typeof requestAnimationFrame=="function";function id(e){var t,r=function(){clearTimeout(n),ao&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ao&&(t=requestAnimationFrame(r))}function Wr(e){var t=te,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),te=t}function Hn(e){var t=te;e.__c=e.__(),te=t}function qn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function oo(e,t){return typeof t=="function"?t(e):t}var ad=Symbol.for("preact-signals");function Wn(){if(Wt>1)Wt--;else{for(var e,t=!1;hr!==void 0;){var r=hr;for(hr=void 0,Kn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&lo(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Kn=0,Wt--,t)throw e}}var Z=void 0,hr=void 0,Wt=0,Kn=0,Kr=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 be(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}be.prototype.brand=ad,be.prototype.h=function(){return!0},be.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)},be.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)}},be.prototype.subscribe=function(e){var t=this;return Yn(function(){var r=t.value,n=Z;Z=void 0;try{e(r)}finally{Z=n}})},be.prototype.valueOf=function(){return this.value},be.prototype.toString=function(){return this.value+""},be.prototype.toJSON=function(){return this.value},be.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(be.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(Kn>100)throw new Error("Cycle detected");this.v=e,this.i++,Kr++,Wt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Wn()}}}});function Me(e){return new be(e)}function lo(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 co(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 uo(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 Kt(e){be.call(this,void 0),this.x=e,this.s=void 0,this.g=Kr-1,this.f=4}(Kt.prototype=new be).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Kr))return!0;if(this.g=Kr,this.f|=1,this.i>0&&!lo(this))return this.f&=-2,!0;var e=Z;try{co(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,uo(this),this.f&=-2,!0},Kt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}be.prototype.S.call(this,e)},Kt.prototype.U=function(e){if(this.t!==void 0&&(be.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Kt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Kt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=so(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function od(e){return new Kt(e)}function fo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Wt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Gn(e),n}finally{Z=r,Wn()}}}function Gn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,fo(e)}function sd(e){if(Z!==this)throw new Error("Out-of-order effect");uo(this),Z=e,this.f&=-2,8&this.f&&Gn(this),Wn()}function gr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}gr.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()}},gr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,fo(this),co(this),Wt++;var e=Z;return Z=this,sd.bind(this,e)},gr.prototype.N=function(){2&this.f||(this.f|=2,this.o=hr,hr=this)},gr.prototype.d=function(){this.f|=8,1&this.f||Gn(this)};function Yn(e){var t=new gr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Zn;function Gt(e,t){T[e]=t.bind(null,T[e]||function(){})}function Gr(e){Zn&&Zn(),Zn=e&&e.S()}function po(e){var t=this,r=e.data,n=cd(r);n.value=r;var i=gt(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!La(i.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},od(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}po.displayName="_st",Object.defineProperties(be.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:po},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Gt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var a=n[i];a instanceof be&&(r||(t.__np=r={}),r[i]=a,n[i]=a.peek())}}e(t)}),Gt("__r",function(e,t){Gr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var a;return Yn(function(){a=this}),a.c=function(){n.__$f|=1,n.setState({})},a}())),Gr(r),e(t)}),Gt("__e",function(e,t,r,n){Gr(),e(t,r,n)}),Gt("diffed",function(e,t){Gr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in n)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in n){var d=a[l],f=n[l];d===void 0?(d=ld(r,l,f,i),a[l]=d):d.o(f,i)}}}e(t)});function ld(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,a=Me(r);return{o:function(o,s){a.value=o,n=s},d:Yn(function(){var o=a.value.value;n[t]!==o&&(n[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Gt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var a=n[i];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Gt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Re.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function cd(e){return gt(function(){return Me(e)},[])}const ke=Symbol.for("@ts-pattern/matcher"),ho=Symbol.for("@ts-pattern/isVariadic"),Yr="@ts-pattern/anonymous-select-key",Jn=e=>!!(e&&typeof e=="object"),Zr=e=>e&&!!e[ke],se=(e,t,r)=>{if(Zr(e)){const n=e[ke](),{matched:i,selections:a}=n.match(t);return i&&a&&Object.keys(a).forEach(o=>r(o,a[o])),i}if(Jn(e)){if(!Jn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],a=[];for(const o of e.keys()){const s=e[o];Zr(s)&&s[ho]?a.push(s):a.length?i.push(s):n.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const o=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((d,f)=>se(d,o[f],r))&&i.every((d,f)=>se(d,s[f],r))&&(a.length===0||se(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>se(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const i=e[n];return(n in t||Zr(a=i)&&a[ke]().matcherType==="optional")&&se(i,t[n],r);var a})}return Object.is(t,e)},Se=e=>{var t,r,n;return Jn(e)?Zr(e)?(t=(r=(n=e[ke]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?br(e,Se):br(Object.values(e),Se):[]},br=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function go(...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 de(e){return Object.assign(e,{optional:()=>Qn(e),and:t=>re(e,t),or:t=>bo(e,t),select:t=>t===void 0?vr(e):vr(t,e)})}function Xn(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[ho]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var i;return(i=n[r++])!=null?i:n.at(-1)}}}}))(e),{optional:()=>Xn(Qn(e)),select:t=>Xn(t===void 0?vr(e):vr(t,e))})}function Qn(e){return de({[ke]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return t===void 0?(Se(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:se(e,t,n),selections:r}},getSelectionKeys:()=>Se(e),matcherType:"optional"})})}const dd=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},ud=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},fd=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function re(...e){return de({[ke]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return{matched:e.every(i=>se(i,t,n)),selections:r}},getSelectionKeys:()=>br(e,Se),matcherType:"and"})})}function bo(...e){return de({[ke]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return br(e,Se).forEach(i=>n(i,void 0)),{matched:e.some(i=>se(i,t,n)),selections:r}},getSelectionKeys:()=>br(e,Se),matcherType:"or"})})}function H(e){return{[ke]:()=>({match:t=>({matched:!!e(t)})})}}function vr(...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 de({[ke]:()=>({match:n=>{let i={[t??Yr]:n};return{matched:r===void 0||se(r,n,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??Yr].concat(r===void 0?[]:Se(r))})})}function vo(e){return!0}function We(e){return typeof e=="number"}function bt(e){return typeof e=="string"}function vt(e){return typeof e=="bigint"}const wo=de(H(vo)),pd=de(H(vo)),hd=wo,wt=e=>Object.assign(de(e),{startsWith:t=>{return wt(re(e,(r=t,H(n=>bt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return wt(re(e,(r=t,H(n=>bt(n)&&n.endsWith(r)))));var r},minLength:t=>wt(re(e,(r=>H(n=>bt(n)&&n.length>=r))(t))),length:t=>wt(re(e,(r=>H(n=>bt(n)&&n.length===r))(t))),maxLength:t=>wt(re(e,(r=>H(n=>bt(n)&&n.length<=r))(t))),includes:t=>{return wt(re(e,(r=t,H(n=>bt(n)&&n.includes(r)))));var r},regex:t=>{return wt(re(e,(r=t,H(n=>bt(n)&&!!n.match(r)))));var r}}),mo=wt(H(bt)),Ke=e=>Object.assign(de(e),{between:(t,r)=>Ke(re(e,((n,i)=>H(a=>We(a)&&n<=a&&i>=a))(t,r))),lt:t=>Ke(re(e,(r=>H(n=>We(n)&&n<r))(t))),gt:t=>Ke(re(e,(r=>H(n=>We(n)&&n>r))(t))),lte:t=>Ke(re(e,(r=>H(n=>We(n)&&n<=r))(t))),gte:t=>Ke(re(e,(r=>H(n=>We(n)&&n>=r))(t))),int:()=>Ke(re(e,H(t=>We(t)&&Number.isInteger(t)))),finite:()=>Ke(re(e,H(t=>We(t)&&Number.isFinite(t)))),positive:()=>Ke(re(e,H(t=>We(t)&&t>0))),negative:()=>Ke(re(e,H(t=>We(t)&&t<0)))}),gd=Ke(H(We)),mt=e=>Object.assign(de(e),{between:(t,r)=>mt(re(e,((n,i)=>H(a=>vt(a)&&n<=a&&i>=a))(t,r))),lt:t=>mt(re(e,(r=>H(n=>vt(n)&&n<r))(t))),gt:t=>mt(re(e,(r=>H(n=>vt(n)&&n>r))(t))),lte:t=>mt(re(e,(r=>H(n=>vt(n)&&n<=r))(t))),gte:t=>mt(re(e,(r=>H(n=>vt(n)&&n>=r))(t))),positive:()=>mt(re(e,H(t=>vt(t)&&t>0))),negative:()=>mt(re(e,H(t=>vt(t)&&t<0)))}),bd=mt(H(vt)),vd=de(H(function(e){return typeof e=="boolean"})),wd=de(H(function(e){return typeof e=="symbol"})),md=de(H(function(e){return e==null})),yd=de(H(function(e){return e!=null}));var Tt={__proto__:null,matcher:ke,optional:Qn,array:function(...e){return Xn({[ke]:()=>({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 Se(r).forEach(a=>{n[a]=[]}),{matched:!0,selections:n};const i=(a,o)=>{n[a]=(n[a]||[]).concat([o])};return{matched:t.every(a=>se(r,a,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Se(e[0])})})},set:function(...e){return de({[ke]:()=>({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=(a,o)=>{r[a]=(r[a]||[]).concat([o])},i=e[0];return{matched:dd(t,a=>se(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Se(e[0])})})},map:function(...e){return de({[ke]:()=>({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 i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:ud(t,(s,l)=>{const d=se(a,l,n),f=se(o,s,n);return d&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...Se(e[0]),...Se(e[1])]})})},record:function(...e){return de({[ke]:()=>({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 i=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[a,o]=e.length===1?[mo,e[0]]:e;return{matched:fd(t,(s,l)=>{const d=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=d!==null&&se(a,d,i),u=se(a,s,i),g=se(o,l,i);return(u||f)&&g}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Se(e[0]),...Se(e[1])]})})},intersection:re,union:bo,not:function(e){return de({[ke]:()=>({match:t=>({matched:!se(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:H,select:vr,any:wo,unknown:pd,_:hd,string:mo,number:gd,bigint:bd,boolean:vd,symbol:wd,nullish:md,nonNullable:yd,instanceOf:function(e){return de(H(function(t){return r=>r instanceof t}(e)))},shape:function(e){return de(H(go(e)))}};let _d=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 ei={matched:!1,value:void 0};function Jr(e){return new xd(e,ei)}let xd=class Ji{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(d,f)=>{a=!0,o[d]=f},l=!n.some(d=>se(d,this.input,s))||i&&!i(this.input)?ei:{matched:!0,value:r(a?Yr in o?o[Yr]:o:this.input,this.input)};return new Ji(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Ji(this.input,n?{matched:!0,value:r(this.input,this.input)}:ei)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=kd){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function kd(e){throw new _d(e)}function yo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=yo(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="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=yo(e))&&(n&&(n+=" "),n+=t);return n}const _o=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xo=it,Dt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return xo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(d=>{const f=r==null?void 0:r[d],u=a==null?void 0:a[d];if(f===null)return null;const g=_o(f)||_o(u);return i[d][g]}),s=r&&Object.entries(r).reduce((d,f)=>{let[u,g]=f;return g===void 0||(d[u]=g),d},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:u,className:g,...h}=f;return Object.entries(h).every(v=>{let[w,k]=v;return Array.isArray(k)?k.includes({...a,...s}[w]):{...a,...s}[w]===k})?[...d,u,g]:d},[]);return xo(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function ko(e,t){for(var r in t)e[r]=t[r];return e}function ti(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function ri(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ni(e){this.props=e}function Sd(e,t){function r(i){var a=this.props.ref,o=a==i.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!o:ti(this.props,i)}function n(i){return this.shouldComponentUpdate=r,je(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ni.prototype=new Re).isPureReactComponent=!0,ni.prototype.shouldComponentUpdate=function(e,t){return ti(this.props,e)||ti(this.state,t)};var So=T.__b;T.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),So&&So(e)};var Cd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ii(e){function t(r){var n=ko({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Cd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Co=function(e,t){return e==null?null:nt(nt(e).map(t))},Ed={map:Co,forEach:Co,count:function(e){return e?nt(e).length:0},only:function(e){var t=nt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:nt},$d=T.__e;T.__e=function(e,t,r,n){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}$d(e,t,r,n)};var Eo=T.unmount;function $o(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=ko({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return $o(n,t,r)})),e}function Io(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Io(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 wr(){this.__u=0,this.t=null,this.__b=null}function Ao(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function To(e){var t,r,n;function i(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return je(r,a)}return i.displayName="Lazy",i.__f=!0,i}function mr(){this.u=null,this.o=null}T.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Eo&&Eo(e)},(wr.prototype=new Re).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Ao(n.__v),a=!1,o=function(){a||(a=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var d=n.state.__a;n.__v.__k[0]=Io(d,d.__c.__P,d.__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)},wr.prototype.componentWillUnmount=function(){this.t=[]},wr.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]=$o(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&je(ae,null,e.fallback);return i&&(i.__h=null),[je(ae,null,t.__a?null:e.children),i]};var Do=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 Id(e){return this.getChildContext=function(){return e.context},e.children}function Ad(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,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),It(je(Id,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Td(e,t){var r=je(Ad,{__v:e,i:t});return r.containerInfo=t,r}(mr.prototype=new Re).__a=function(e){var t=this,r=Ao(t.__v),n=t.o.get(e);return n[0]++,function(i){var a=function(){t.props.revealOrder?(n.push(i),Do(t,e,n)):i()};r?r(a):a()}},mr.prototype.render=function(e){this.u=null,this.o=new Map;var t=nt(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},mr.prototype.componentDidUpdate=mr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Do(e,r,t)})};var Fo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Dd=/^(?: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]/,Fd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ld=/[A-Z0-9]/g,Nd=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=""),It(e,t),typeof r=="function"&&r(),e?e.__c:null}function Od(e,t,r){return Ga(e,t),typeof r=="function"&&r(),e?e.__c:null}Re.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Re.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Lo=T.event;function Pd(){}function Vd(){return this.cancelBubble}function Rd(){return this.defaultPrevented}T.event=function(e){return Lo&&(e=Lo(e)),e.persist=Pd,e.isPropagationStopped=Vd,e.isDefaultPrevented=Rd,e.nativeEvent=e};var ai,Bd={enumerable:!1,configurable:!0,get:function(){return this.class}},No=T.vnode;T.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||Nd&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||jd(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Fd.test(a)?a=s:n.indexOf("-")===-1&&Dd.test(a)?a=a.replace(Ld,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&i[a=s]&&(a="oninputCapture"),i[a]=o}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=nt(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=nt(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",Bd)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Fo,No&&No(e)};var jo=T.__r;T.__r=function(e){jo&&jo(e),ai=e.__c};var Mo=T.diffed;T.diffed=function(e){Mo&&Mo(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),ai=null};var zd={ReactCurrentDispatcher:{current:{readContext:function(e){return ai.__n[e.__c].props.value}}}};function Ud(e){return je.bind(null,e)}function Oo(e){return!!e&&e.$$typeof===Fo}function Hd(e){return Oo(e)?Xc.apply(null,arguments):e}function qd(e){return!!e.__k&&(It(null,e),!0)}function Wd(e){return e&&(e.base||e.nodeType===1&&e)||null}var Kd=function(e,t){return e(t)},Gd=function(e,t){return e(t)},Yd=ae;function Po(e){e()}function Zd(e){return e}function Jd(){return[!1,Po]}var Xd=Fe;function Qd(e,t){var r=t(),n=Be({h:{__:r,v:t}}),i=n[0].h,a=n[1];return Fe(function(){i.__=r,i.v=t,ri(i.__,t())||a({h:i})},[e,r,t]),At(function(){return ri(i.__,i.v())||a({h:i}),e(function(){ri(i.__,i.v())||a({h:i})})},[e]),r}var Ce={useState:Be,useId:rd,useReducer:no,useEffect:At,useLayoutEffect:Fe,useInsertionEffect:Xd,useTransition:Jd,useDeferredValue:Zd,useSyncExternalStore:Qd,startTransition:Po,useRef:me,useImperativeHandle:Qc,useMemo:gt,useCallback:ed,useContext:io,useDebugValue:td,version:"17.0.2",Children:Ed,render:Md,hydrate:Od,unmountComponentAtNode:qd,createPortal:Td,createElement:je,createContext:Ya,createFactory:Ud,cloneElement:Hd,createRef:Kc,Fragment:ae,isValidElement:Oo,findDOMNode:Wd,Component:Re,PureComponent:ni,memo:Sd,forwardRef:ii,flushSync:Gd,unstable_batchedUpdates:Kd,StrictMode:Yd,Suspense:wr,SuspenseList:mr,lazy:To,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:zd},eu=["other","few","many","two","one","zero"],Vo=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function i(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,d)=>{var f;return((f=o==null?void 0:o[d])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=n.select(o.count);if(!(l in s)){const d=eu.find(f=>f in s);if(!d)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=d}return s[l].replace(/{{(\w+)}}/g,(d,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 “${a.toString()}”.`)}}return i},tu=0;function c(e,t,r,n,i,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var d={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--tu,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return T.vnode&&T.vnode(d),d}var Ro=Ya(null),Bo=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const i=gt(()=>Vo({locale:n,terms:e,overrides:t}),[t,n]);return c(Ro.Provider,{value:{t:i,locale:n},children:r})},useTranslation:()=>{const t=io(Ro);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>Vo({terms:e,overrides:t,locale:r})}),ru={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"},{TranslationProvider:Yh,useTranslation:Zh,createTFunction:Jh,defaultTerms:nu}=Bo({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:iu,useTranslation:oe,createTFunction:au}=Bo({...nu,...ru,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"}}),Xh="";function at(e,t){if(!e)throw new Error(t)}var oi=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(oi):Object.keys(e).sort().reduce((t,r)=>(t[r]=oi(e[r]),t),{}),ou=e=>{let t=JSON.stringify(oi(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const si=(e,t)=>t.some(r=>e instanceof r);let zo,Uo;function su(){return zo||(zo=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function lu(){return Uo||(Uo=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const li=new WeakMap,ci=new WeakMap,Xr=new WeakMap;function cu(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(Ft(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return Xr.set(t,e),t}function du(e){if(li.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});li.set(e,t)}let di={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return li.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ft(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 Ho(e){di=e(di)}function uu(e){return lu().includes(e)?function(...t){return e.apply(ui(this),t),Ft(this.request)}:function(...t){return Ft(e.apply(ui(this),t))}}function fu(e){return typeof e=="function"?uu(e):(e instanceof IDBTransaction&&du(e),si(e,su())?new Proxy(e,di):e)}function Ft(e){if(e instanceof IDBRequest)return cu(e);if(ci.has(e))return ci.get(e);const t=fu(e);return t!==e&&(ci.set(e,t),Xr.set(t,e)),t}const ui=e=>Xr.get(e);function pu(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=Ft(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ft(o.result),l.oldVersion,l.newVersion,Ft(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const hu=["get","getKey","getAll","getAllKeys","count"],gu=["put","add","delete","clear"],fi=new Map;function qo(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(fi.get(t))return fi.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=gu.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||hu.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let d=l.store;return n&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),i&&l.done]))[0]};return fi.set(t,a),a}Ho(e=>({...e,get:(t,r,n)=>qo(t,r)||e.get(t,r,n),has:(t,r)=>!!qo(t,r)||e.has(t,r)}));const bu=["continue","continuePrimaryKey","advance"],Wo={},pi=new WeakMap,Ko=new WeakMap,vu={get(e,t){if(!bu.includes(t))return e[t];let r=Wo[t];return r||(r=Wo[t]=function(...n){pi.set(this,Ko.get(this)[t](...n))}),r}};async function*wu(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,vu);for(Ko.set(r,t),Xr.set(r,ui(t));t;)yield r,t=await(pi.get(r)||t.continue()),pi.delete(r)}function Go(e,t){return t===Symbol.asyncIterator&&si(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&si(e,[IDBIndex,IDBObjectStore])}Ho(e=>({...e,get(t,r,n){return Go(t,r)?wu:e.get(t,r,n)},has(t,r){return Go(t,r)||e.has(t,r)}}));const yr=typeof indexedDB>"u"?void 0:pu("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),mu=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let Qr,hi,_r;const Yo=()=>{if(!Qr)return _r;const e=Qr;Qr=void 0;const t=tn(e),r=yr==null?void 0:yr.then(n=>n.put("state",mu(e.data),t)).finally(()=>{_r===r&&(_r=void 0)});return _r=r,_r},Oe={getStateData:async(e,t,r)=>{var i;const n=tn({...e,flowKeys:t,context:r});return(i=await yr)==null?void 0:i.get("state",n)},getAllStateData:async()=>{var e;return((e=await yr)==null?void 0:e.getAll("state"))??[]},setStateData:e=>{Qr=e,clearTimeout(hi),hi=setTimeout(()=>void Yo(),1e3)},flushStateData:()=>(clearTimeout(hi),Yo()??Promise.resolve())},Yt=e=>t=>t?t.type===e:!1,yu=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Zo=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:yu()}),_u=e=>Jr(e).with({nativeEvent:{submitter:Tt.select(Tt.union(Tt.instanceOf(HTMLButtonElement),Tt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),en=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(d=>d.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(d=>d.id===a),s=t.type.includes("question")?1:0;if(o){const d=s+Math.max(en(e,i,r,n+s).remainingSteps,en(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:d}),{stepsMade:n,remainingSteps:d}}const l=s+en(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},xu=e=>{const t={},r=e.find(n=>n.isHead);return r&&en(e,r,(n,i)=>{t[n]=i}),t},tn=e=>[...e.flowKeys,e.id,e.version,e.build,ou(e.hostContext??e.context)].join("/"),ku=({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&&aa(t,e.submissions)},Jo=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||aa(t,e.submissions))},Ge=Me({state:"idle"}),gi=new Set,Lt=e=>{const{state:t,flow:r}=Ge.value;if(t!=="loaded")return;at(r,"No flow to update");const n=e(r.data);r.data=n,Ge.value={state:t,flow:r},Oe.setStateData(r)},j={current$:Ge,viewState$:Me("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:i,title:a,analytics:o,job:s,employer:l,locationOrigin:d})=>{await Oe.flushStateData().catch(()=>{});const f=await Oe.getStateData(t,i,r),u=f??Zo(),g=tn({...t,flowKeys:i,context:r}),h=f!==void 0&&!gi.has(g)&&ku({data:u,nodes:t.nodes});return h||gi.add(g),{jobAlerts:e,data:u,offerResume:h,startedAt:new Date,nodeIdToProgress:xu(t.nodes),flowKeys:i,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:n===void 0?r:In(n,r),hostContext:n===void 0?void 0:r,title:a,analytics:o,job:s,employer:l,locationOrigin:d}},commitFlow:e=>{Ge.value={state:"loaded",flow:e},Oe.setStateData(e)},settleResume:e=>{e.offerResume=!1,gi.add(tn(e))},cancelCurrentFlow:()=>{Ge.value={state:"idle"},j.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 Oe.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={...Zo(),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},Oe.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;at(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,Oe.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}),Oe.setStateData(e),await Oe.flushStateData()}},Xo=({heading:e})=>{const{t}=oe();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:c("p",{class:"text-error-11 font-bold",children:t(e)})})]})},rn=e=>{const{t}=oe();return c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:t("loading")}),c("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},Qo=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(rn,{class:"text-neutral-6 h-8 w-8"})}),Su=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)}%`},Cu=Dt("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})=>c("button",{class:it(Cu({variant:r}),e),...n,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),es=()=>c("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Eu=()=>{if(j.current$.value.state!=="loaded")return null;const e=j.current$.value.flow.nodeIdToProgress,t=j.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 c("div",{class:"bg-accent-3",children:c("div",{style:{width:Su(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},$u=({children:e,params:t,analytics:r,feedbackReady:n})=>{const{t:i}=oe(),a=j.viewState$,o=!!t.feedback&&j.current$.value.state==="loaded"&&a.value==="maximised",s=o&&n.value,l=me(!1);return At(()=>{var d,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(d=j.current$.peek().flow)==null?void 0:d.analytics)==null?void 0:f.customProperties}))},[s,r]),c(ae,{children:c("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{"aria-label":i("minimize"),onClick:()=>{a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:bi,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:it({hidden:!o}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,j.current$.value.state==="loaded"&&c(xr,{class:"mx-1","aria-label":i("restart"),onClick:()=>{j.restart()},children:[c("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(xr,{class:"view-switch mx-1",onTouchStart:bi,"aria-label":i("minimize"),onClick:()=>a.value="minimised",children:c(es,{})},"minmax")]})]}),c(Eu,{})]})})};function bi(){}const Iu=To(()=>Promise.resolve().then(()=>zh).then(e=>e.ChatbotBody)),ts=Dt("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"}}}),rs=Dt("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"}}}),Au=({open:e,...t})=>{const r=me(null);return Fe(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),c("dialog",{ref:r,...t})},Tu=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:i,talentBankClient:a,params:o,feedbackReady:s})=>{const{state:l,flow:d}=j.current$.value,f=j.viewState$.value,u=l!=="idle"&&f==="maximised",g=me(null),h=d?[...d.data.nodeHistory].reverse().map(v=>d.nodes.find(w=>w.id===v)).find(v=>(v==null?void 0:v.type)==="flow-section"):void 0;return c(iu,{terms:o.terms,locale:void 0,children:[c(Au,{open:u,onClose:()=>j.viewState$.value="minimised",children:c("div",{ref:g,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:ts({view:"maximised"}),children:c("div",{class:rs({view:"maximised"}),children:[c($u,{params:o,analytics:i,feedbackReady:s,children:h?c(ae,{children:[c("span",{class:"block",children:h.data.title}),c("span",{class:"block truncate text-xs font-normal",children:d==null?void 0:d.title})]}):d==null?void 0:d.title}),Jr({state:l,view:f}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Qo,{},"loading")).with({state:"loaded"},()=>c(wr,{fallback:c(Qo,{},"loading"),children:c(Iu,{env:e,rpcClient:n,analytics:i,apiClient:r,logger:t,talentBankClient:a})})).with({state:"closed"},()=>c(Xo,{heading:"flow_closed"})).with({state:"error"},()=>c(Xo,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?c(Du,{flow:d}):null]})},Du=({flow:e})=>{const{t}=oe();return c("div",{class:ts({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:rs({view:"minimised"}),children:[c("button",{onClick:()=>{j.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:bi,children:c("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),c("div",{class:"flex items-center px-0.5",children:c(xr,{class:"mx-1","aria-label":t("close_application"),onClick:j.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Fu=`[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-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (pointer: coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}
|
|
2
|
-
|
|
1
|
+
var ag=Object.defineProperty;var og=(ut,Re,Et)=>Re in ut?ag(ut,Re,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ut[Re]=Et;var pe=(ut,Re,Et)=>(og(ut,typeof Re!="symbol"?Re+"":Re,Et),Et);(function(){"use strict";var ut=typeof document<"u"?document.currentScript:null,Re=new Set(["Error","TypeError","RangeError","ReferenceError","SyntaxError","URIError","EvalError","AggregateError","AbortError","TimeoutError","NetworkError","NotAllowedError","NotFoundError","NotSupportedError","InvalidStateError","QuotaExceededError","SecurityError","DataCloneError","ChunkLoadError"]),Et=[/^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\.)$/],zl=`IDBDatabase IDBObjectStore IDBTransaction IDBFactory IDBRequest IDBOpenDBRequest IDBIndex IDBCursor IDBKeyRange
|
|
2
|
+
Storage StorageManager Window Document Element HTMLElement HTMLIFrameElement HTMLMediaElement HTMLFormElement
|
|
3
|
+
HTMLInputElement Node EventTarget Navigator Clipboard ServiceWorkerContainer ServiceWorkerRegistration Response
|
|
4
|
+
Request Headers URL URLSearchParams Blob File FileReader FormData MessagePort Worker Cache CacheStorage History
|
|
5
|
+
Location CustomElementRegistry ReadableStream WritableStream AbortSignal Performance Crypto SubtleCrypto
|
|
6
|
+
MediaDevices ResizeObserver IntersectionObserver MutationObserver Notification Permissions LockManager
|
|
7
|
+
DOMTokenList ShadowRoot Selection Range TextDecoder TextEncoder WebSocket XMLHttpRequest
|
|
8
|
+
transaction objectStore createObjectStore deleteObjectStore createIndex index put get getAll getKey delete add
|
|
9
|
+
clear count openCursor open deleteDatabase setItem getItem removeItem key postMessage fetch json text arrayBuffer
|
|
10
|
+
blob formData querySelector querySelectorAll appendChild removeChild insertBefore replaceChild append prepend
|
|
11
|
+
remove contains observe unobserve disconnect play pause writeText readText write read share register
|
|
12
|
+
getRegistration requestStorageAccess focus blur scrollTo scrollIntoView setAttribute getAttribute
|
|
13
|
+
getBoundingClientRect attachShadow define pushState replaceState assign replace reload send close abort
|
|
14
|
+
requestAnimationFrame matchMedia getComputedStyle createElement structuredClone localStorage sessionStorage
|
|
15
|
+
indexedDB serviceWorker clipboard cookie`,Ul=["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"],ql=/^Failed to (?:execute|read|set|construct) (?:the )?'([\w$]{1,40})'(?: (?:on|property (?:from|on)|from) '([\w$]{1,40})')?(?:: (.*))?$/,sa,Wl=e=>{let{apis:t,sentences:r}=sa??(sa={apis:new Set(zl.split(/\s+/)),sentences:new Set(Ul)});if(r.has(e))return e;let n=ql.exec(e);if(!n)return"";let[,i,a,o]=n;return t.has(i)&&(a===void 0||t.has(a))&&(o===void 0||r.has(o))?e:""},Hl=/^\s*at\s|@(?:[a-z][\w+.-]*:\/\/|\[native code\])/i,Kl=/\b(?:chrome|moz|safari|safari-web|ms-browser)-extension:\/\//,Gl=/\[native code\]|<anonymous>|\(native\)/,Yl=e=>Kl.test(e)?"extension":Gl.test(e)?"native":"script",la=/^(Failed to fetch dynamically imported module|error loading dynamically imported module)/,Jl=/^((?:[\w-]{1,20}\/){0,3}[\w.-]{1,80}\.js)(?:\?retry=\d{1,3})?:(\d{1,7})(?::(\d{1,7}))?\)?$/,Zl=/^ResizeObserver loop (?:completed with undelivered notifications\.|limit exceeded)$/,Xl=({error:e,message:t})=>e==null&&Zl.test(t),Rr=e=>e instanceof Error?Re.has(e.name)?e.name:"Error":typeof e,Ql=new Set(["DOMException","Object","Array","Promise","Event","ErrorEvent","PromiseRejectionEvent","ProgressEvent","CloseEvent","MessageEvent","Response","Request","XMLHttpRequest"]),ec=e=>{var n,i;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:a,stack:o}=e,s=(i=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor)==null?void 0:i.name,l=typeof s!="string"?"":Re.has(s)||Ql.has(s)?s:"other",c=typeof a=="string"?a:"",f=typeof o=="string"?o:"";return{message:e instanceof Error||Re.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}},tc=(e,t,r="")=>{let n=Rr(e),{message:i,stack:a,thrown:o}=ec(e),s=(e==null?r:i).slice(0,300),l=Et.some(b=>b.test(s))?s:la.test(s)?la.exec(s)[1]:Wl(s),c=[],f=new Set;for(let b of a.split(`
|
|
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"):Hl.test(b)&&f.add(Yl(b))}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},ca="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))}),da=e=>{let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);t=Math.imul(t^i,2654435761),r=Math.imul(r^i,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)},ic=(e,t)=>{try{let r=e==null?void 0:e.getItem(ca);if(r)return r;let n=t();return e==null||e.setItem(ca,n),n}catch{return t()}},ac=[["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,i;let t=ac.find(([,a])=>a.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:((i=oc.find(([,a])=>a.test(e)))==null?void 0:i[0])??"other"}},lc=(e=typeof document>"u"?void 0:document)=>{var a,o;let t=()=>typeof performance>"u"?0:Math.round(performance.now()),r=(e==null?void 0:e.visibilityState)==="hidden"?t():null,n=null,i=!1;return e==null||e.addEventListener("visibilitychange",()=>{e.visibilityState==="hidden"?r=t():r!==null&&(n=t())}),(a=e==null?void 0:e.defaultView)==null||a.addEventListener("pagehide",()=>i=!0),(o=e==null?void 0:e.defaultView)==null||o.addEventListener("pageshow",()=>i=!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:i,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"]),dc=(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},uc=(e,t,r,n,i)=>{var o;if(t)return"abandoned";if(i.online===!1)return"offline";let a=[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(a.filter(s=>s!==void 0&&s!=="").map(String))].join(":")||e},fc=({config:e,version:t,env:r,seed:n,automated:i=typeof navigator<"u"&&navigator.webdriver===!0,company:a,page:o=lc(),now:s=Date.now,post:l=(c,f)=>fetch(c,f)})=>{let c=da(n),f=s(),d=e!==void 0&&c%1e4<e.sampleRate*1e4,b=new Set;return{send:(p,g,v={})=>{if(!e||!d||!t)return;let x=o(),C=cc.has(p),_=C&&dc(p,x,v),M=_?`${p}:abandoned`:p;if(b.has(M))return;b.add(M);let{error:D,...j}=v,z={dt:new Date(s()).toISOString(),message:"Candidate widget beacon",kind:p,version:t,company_slug:(a==null?void 0:a())??null,env:r==="production"?"production":"staging",mode:i?"test":"live",seed_hash:c.toString(36),sample_rate:e.sampleRate,...g&&{reason:g.slice(0,40)},...C&&{abandoned:_,cause:uc(p,_,g,v,x).slice(0,60)},since_start_ms:Math.max(0,Math.round(s()-f)),...x,...j,...D&&{error:D,error_message:D.message,error_frame:D.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(()=>{})}}},Ze;function ua(e){return{lang:(e==null?void 0:e.lang)??(Ze==null?void 0:Ze.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ze==null?void 0:Ze.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ze==null?void 0:Ze.abortPipeEarly)}}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 $e(e,t,r,n,i){let a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Sn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(i==null?void 0:i.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},ua())}}}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 fa(e){return{kind:"transformation",type:"transform",reference:fa,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 pa(){return{kind:"schema",type:"any",reference:pa,expects:"any",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function ha(e,t){return{kind:"schema",type:"array",reference:ha,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var a;let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){let s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:i,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(c):f.path=[c],(a=r.issues)==null||a.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 $e(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:$e(this,"type",t,r),t}}}function Ae(e,t){return{kind:"schema",type:"literal",reference:Ae,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:$e(this,"type",r,n),r}}}function ba(e){return{kind:"schema",type:"null",reference:ba,expects:"null",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return t.value===null?t.typed=!0:$e(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:$e(this,"type",t,r),t}}}function ee(e,t){return{kind:"schema",type:"object",reference:ee,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var a;let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in i?i[o]:En(s),c=s["~run"]({value:l},n);if(c.issues){let f={type:"object",origin:"value",input:i,key:o,value:l};for(let d of c.issues)d.path?d.path.unshift(f):d.path=[f],(a=r.issues)==null||a.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]=mc(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&($e(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else $e(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 ga(e,t){return{kind:"schema",type:"picklist",reference:ga,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:$e(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,i){var o,s;let a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(let l in a)if(gc(a,l)){let c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){let b={type:"object",origin:"key",input:a,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),i.abortEarly){n.typed=!1;break}}let d=this.value["~run"]({value:c},i);if(d.issues){let b={type:"object",origin:"value",input:a,key:l,value:c};for(let p of d.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else $e(this,"type",n,i);return n}}}function ge(e){return{kind:"schema",type:"string",reference:ge,expects:"string",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:$e(this,"type",t,r),t}}}function ma(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 i,a,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];$e(this,"type",r,n,{issues:ma(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];$e(this,"type",r,n,{issues:ma(o)})}return r}}}function Bt(){return{kind:"schema",type:"unknown",reference:Bt,expects:"unknown",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function va(e,t,r){return{kind:"schema",type:"variant",reference:va,expects:"Object",async:!1,key:e,options:t,message:r,get"~standard"(){return we(this)},"~run"(n,i){let a=n.value;if(a&&typeof a=="object"){let o,s=0,l=this.key,c=[],f=(d,b)=>{for(let p of d.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 a?C["~run"]({typed:!1,value:a[x]},{abortEarly:!0}).issues:C.type!=="exact_optional"&&C.type!=="optional"&&C.type!=="nullish"){g=!1,l!==x&&(s<v||s===v&&x in a&&!(l in a))&&(s=v,l=x,c=[]),l===x&&c.push(p.entries[x].expects);break}v++}if(g){let x=p["~run"]({value:a},i);(!o||!o.typed&&x.typed)&&(o=x)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;$e(this,"type",n,i,{input:a[l],expected:Cn(c,"|"),path:[{type:"object",origin:"value",input:a,key:l,value:a[l]}]})}else $e(this,"type",n,i);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 fr(e,t,r){let n=e["~run"]({value:t},ua(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 jn(e,t,r){var o,s;let n=e.find(l=>l.type==="pre-apply-result");if(!n)return;let i=(o=t[n.data.participationKey])==null?void 0:o.value,a={};if(i===!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")&&(a[l.data.key]=c)}return{node_id:n.id,flow_session_id:r,participation:i,answers:a}}function _c(e,t){let r=jn(e,t,""),n=Tn(e).map(a=>{let o=a.data.preApply,s=r==null?void 0:r.answers[a.data.key],l=a.type==="question-boolean"?typeof s=="boolean":a.data.options.some(c=>c.value===s);return{key:a.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),i=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&n.length>0&&n.every(a=>a.valid)?"completed":"unavailable";return{status:i,hasHardConcerns:i==="completed"?n.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:i==="completed"?n.some(a=>!a.matched&&a.severity==="advisory"):null,answers:i==="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 ft=class extends Error{constructor(){super("Aborted")}},pr=(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},kc=(e,t="all")=>{let r={},n=t==="all"?null:new Set(t);for(let i in e){let a=e[i];a&&(n&&!n.has(i)||(r[i]=a.value))}return r},wa=(e,t)=>{let r=new Set(e.flatMap(n=>n.type==="add-submission"?[n.data.key]:[]));return Object.entries(t).some(([n,i])=>i!==void 0&&i.type!=="integration"&&!r.has(n))},Sc=({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},ya=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let i=pr(n,t);switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r[e]},Cc=e=>{let t=e.split(".").pop();return t?wc(t?"."+t:""):yc("No file extension found")},_a=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let i=Cc(n.name);return i.ok&&r.includes(i.val.toLowerCase())})},zt=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}`,Ec=ee({integration_response:ee({data:ee({redirect_url:ge(),message:_e($t(ge())),button_text:_e($t(ge()))})})}),Dn=e=>fr(Ec,e).success,$c=ee({integration_response:ee({status:_e(Bt()),error:ee({message:ge(),data:_e(Bt())})})}),xa=e=>fr($c,e).success,Ac=ee({success:Ae(!0),integration_response:ee({data:ee({outcome:Ae("pending"),message:_e(Bt())}),error:_e(ba())})}),Mn=e=>{let t=fr(Ac,e);if(!t.success||Dn(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};ee({success:Ae(!1),message:_e(Bt())});var Ic=ee({error:Ae("Validation failed"),messages:ee({})}),Tc=(e,t)=>t===422&&fr(Ic,e).success,ka=(e,t)=>{if(!xa(e))return;let r=e.integration_response,n=r.error.data,i=typeof n=="object"&&n!==null?n:{},a=g=>typeof i[g]=="string"?i[g]:void 0,o=g=>typeof i[g]=="boolean"?i[g]:void 0,s=g=>{let v=i[g];return Number.isSafeInteger(v)&&v>=0?v:void 0},l=g=>{let v=a(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=a("phase"),d=a("verdict"),b=a("code"),p=c===409&&f==="submit"&&d==="confirmed"?"duplicate":c===410&&b==="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:b,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:p}},jc=va("reason",[ee({outcome:Ae("sent"),reason:Ae("sandbox"),ats_label:$t(ge())}),ee({outcome:Ae("held"),reason:ga(["production_connection","no_sandbox_known","company_hold"]),ats_label:$t(ge())}),ee({outcome:Ae("internal"),reason:Ae("internal"),ats_label:$t(ge())}),ee({outcome:Ae("held"),reason:Ae("redirect"),ats_label:ge()})]),Dc=e=>{let t=fr(ee({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}`}},Sa=3e4,Mc=2e4,Oc=6e4,On=12e4,Ca=6*60*6e4,Lc=60*6e4,Ea=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<=Ca?t:void 0},Fc=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=Ea(e);return t===void 0?{}:{until:t}},$a=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Nc=(e,t)=>{let r=Ea(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:Sa};let n=(e??0)+1,i=Math.min(n*Mc,Oc),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(i,a),On),throttles:n}},Aa=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Rc=e=>{if(!xa(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},Pc=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",Vc=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",Bc=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,zc=(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 i="data"in n,a=n.error,o=typeof a=="object"&&a!==null&&typeof a.message=="string"&&"data"in a;if(!i&&!o)return null;let s=i?n.data:a.data??null;return{service:n.service??"INVALID_SERVICE",response:{status:n.status,payload:s},...Mn(e)&&{outcome:"pending"}}},Uc=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},qc=(e,t)=>{if(!Uc(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)}),Ia=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 i=e[r];return[r,Ia(i)&&Ia(n)?Ln(i,n):n]}))}:t,Hc=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let i=t[n];if(!i)continue;let a=pr(e,n.split("."));if(i.required&&a==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(a!=null)switch(i.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}},Ta={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"},Kc=`adand aeare afafg agatg aiaia alalb amarm aoago aqata ararg asasm ataut auaus awabw axala azaze babih bbbrb bdbgd bebel
|
|
18
|
+
bfbfa bgbgr bhbhr bibdi bjben blblm bmbmu bnbrn bobol bqbes brbra bsbhs btbtn bvbvt bwbwa byblr bzblz cacan cccck cdcod
|
|
19
|
+
cfcaf cgcog chche ciciv ckcok clchl cmcmr cnchn cocol crcri cucub cvcpv cwcuw cxcxr cycyp czcze dedeu djdji dkdnk dmdma
|
|
20
|
+
dodom dzdza ececu eeest egegy ehesh ereri esesp eteth fifin fjfji fkflk fmfsm fofro frfra gagab gbgbr gdgrd gegeo gfguf
|
|
21
|
+
ggggy ghgha gigib glgrl gmgmb gngin gpglp gqgnq grgrc gssgs gtgtm gugum gwgnb gyguy hkhkg hmhmd hnhnd hrhrv hthti huhun
|
|
22
|
+
ididn ieirl ilisr imimn inind ioiot iqirq irirn isisl itita jejey jmjam jojor jpjpn keken kgkgz khkhm kikir kmcom knkna
|
|
23
|
+
kpprk krkor kwkwt kycym kzkaz lalao lblbn lclca lilie lklka lrlbr lslso ltltu lulux lvlva lylby mamar mcmco mdmda memne
|
|
24
|
+
mfmaf mgmdg mhmhl mkmkd mlmli mmmmr mnmng momac mpmnp mqmtq mrmrt msmsr mtmlt mumus mvmdv mwmwi mxmex mymys mzmoz nanam
|
|
25
|
+
ncncl nener nfnfk ngnga ninic nlnld nonor npnpl nrnru nuniu nznzl omomn papan peper pfpyf pgpng phphl pkpak plpol pmspm
|
|
26
|
+
pnpcn prpri pspse ptprt pwplw pypry qaqat rereu rorou rssrb rurus rwrwa sasau sbslb scsyc sdsdn seswe sgsgp shshn sisvn
|
|
27
|
+
sjsjm sksvk slsle smsmr snsen sosom srsur ssssd ststp svslv sxsxm sysyr szswz tctca tdtcd tfatf tgtgo ththa tjtjk tktkl
|
|
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,Gc=()=>{if(At)return At;At=new Map;let e=new Intl.DisplayNames(["en"],{type:"region",fallback:"none"});for(let t of Kc.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},Yc=e=>{let t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(Ta,t))return Ta[t];let r=/^[a-z]{2}-[a-z0-9]{1,3}$/.test(t)?t.slice(0,2):t;return Gc().get(r)},Jc=e=>[...new Set(e.flatMap(t=>Yc(t)??[]))].sort();let Xe;function ja(e){return{lang:(e==null?void 0:e.lang)??(Xe==null?void 0:Xe.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Xe==null?void 0:Xe.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Xe==null?void 0:Xe.abortPipeEarly)}}let Fn;function Zc(e){return Fn==null?void 0:Fn.get(e)}let Nn;function Xc(e){return Nn==null?void 0:Nn.get(e)}let Rn;function Qc(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 Ie(e,t,r,n,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Pn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??Qc(e.reference,l.lang)??(c?Xc(l.lang):null)??n.message??Zc(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 Te(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ja())}}}function ed(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Da(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}const td=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Ma(e){return{kind:"validation",type:"email",reference:Ma,expects:null,async:!1,requirement:td,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&Ie(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&&Ie(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&&Ie(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Oa(e){return{kind:"transformation",type:"transform",reference:Oa,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 rd(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 Te(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:i,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(a=r.issues)==null||a.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 Ie(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 Te(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ie(this,"type",t,r),t}}}function La(e,t){return{kind:"schema",type:"literal",reference:La,expects:Pn(e),async:!1,literal:e,message:t,get"~standard"(){return Te(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Ie(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 Te(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 Qe(e,t){return{kind:"schema",type:"nullish",reference:Qe,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Te(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 Pe(e){return{kind:"schema",type:"number",reference:Pe,expects:"number",async:!1,message:e,get"~standard"(){return Te(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ie(this,"type",t,r),t}}}function he(e,t){return{kind:"schema",type:"object",reference:he,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Te(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:zr(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:i,key:o,value:l};for(const d of c.issues)d.path?d.path.unshift(f):d.path=[f],(a=r.issues)==null||a.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]=rd(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ie(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else Ie(this,"type",r,n);return r}}}function et(e,t){return{kind:"schema",type:"optional",reference:et,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Te(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 pt(e,t){return{kind:"schema",type:"picklist",reference:pt,expects:Da(e.map(Pn),"|"),async:!1,options:e,message:t,get"~standard"(){return Te(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Ie(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 Te(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(ed(a,l)){const c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){const b={type:"object",origin:"key",input:a,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),i.abortEarly){n.typed=!1;break}}const d=this.value["~run"]({value:c},i);if(d.issues){const b={type:"object",origin:"value",input:a,key:l,value:c};for(const p of d.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else Ie(this,"type",n,i);return n}}}function N(e){return{kind:"schema",type:"string",reference:N,expects:"string",async:!1,message:e,get"~standard"(){return Te(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ie(this,"type",t,r),t}}}function Fa(e){let t;if(e)for(const r of e)t?t.push(...r.issues):t=r.issues;return t}function Na(e,t){return{kind:"schema",type:"union",reference:Na,expects:Da(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Te(this)},"~run"(r,n){let i,a,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];Ie(this,"type",r,n,{issues:Fa(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ie(this,"type",r,n,{issues:Fa(o)})}return r}}}function Ra(){return{kind:"schema",type:"unknown",reference:Ra,expects:"unknown",async:!1,get"~standard"(){return Te(this)},"~run"(e){return e.typed=!0,e}}}function Ut(...e){return{...e[0],pipe:e,get"~standard"(){return Te(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},ja(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var nd=e=>e,id=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},ad=class extends id{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},od={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},sd=()=>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 sg(e){return e}var ld=["agent","sdk","form","integration","migration"],cd=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],dd=["screening","cv_match","interview","overall"],ud=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],fd=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Pa=pt(ld),pd=pt(cd),hd=Ut(N(),Bn(),Br(1),Vn(100)),bd=pt(dd),gd=pt(ud),md=Ut(N(),Bn(),Br(1),Vn(100)),vd=pt(fd),Va=he({id:N(),email:J(N()),firstName:J(N()),lastName:J(N()),phone:J(N()),source:J(Pa),identifiedAt:J(N()),createdAt:N(),updatedAt:N()}),Ba=Ut(N(),Br(1)),Wn=qr(N(),Ra()),wd=he({id:N(),applicationId:N(),status:gd,scheduledAt:J(N()),completedAt:J(N()),meta:J(Wn),createdAt:N(),updatedAt:N()}),yd=he({score:Pe(),reason:N(),confidence:Pe()}),za=he({id:N(),candidateId:N(),jobId:Pe(),stage:hd,stageGroup:pd,stageEnteredAt:N(),rating:J(Pe()),disqualifiedAt:J(N()),disqualificationReason:J(md),disqualificationNote:J(N()),source:vd,sourceDetail:J(N()),sessionId:J(Pe()),externalApplicationId:J(N()),meta:J(Wn),context:J(Wn),scoredAt:J(N()),createdAt:N(),updatedAt:N()}),_d=he({id:N(),applicationId:N(),scoreType:bd,score:J(Pe()),reason:J(N()),categories:J(qr(N(),yd)),scoredBy:J(N()),createdAt:N()});({...za.entries},{...Va.entries});var xd=he({anonymousId:Ba,email:Ba,firstName:Qe(N()),lastName:Qe(N()),phone:Qe(N()),source:Qe(Pa)}),kd=he({candidateId:N(),isNew:zn()}),Sd=he({id:N(),stageGroup:N(),createdAt:N()}),Cd=he({isDuplicate:zn(),existingApplication:et(Sd)}),Ed=({environment:e,publishableKey:t,logger:r})=>{let n=od[e];return{async checkDuplicate(i){try{let a=new URLSearchParams({email:i.email,scope:i.scope});i.scope==="job"&&i.jobId!=null&&a.set("job_id",String(i.jobId));let o=await fetch(`${n}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Un(Cd,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(i){try{if(!i.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:i.email,firstName:i.firstName,lastName:i.lastName,phone:i.phone,anonymousId:i.anonymousId,source:i.source??"sdk"},o=Un(xd,a);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(kd,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},$d=["DAILY","WEEKLY","MONTHLY"],Ad=qr(N(),Na([N(),Ur(N()),he({type:La("provided"),lat:Pe(),lng:Pe(),radius:Pe(),unit:et(pt(["miles","km"])),label:et(N())})])),Id={pathname:"/job/:id",method:"GET",schema:{response:he({id:Pe(),external_id:Qe(N()),city:Qe(N()),town:Qe(N()),category:Qe(N())})}};async function Td(e,{contact:t,job:r}){var i;let n={};if(r){let a=await e.request(Id,{params:{id:r.id}});if((r.id_type==="internal"?String(a.id):a.external_id)!==r.id)throw new Error("Job lookup returned a different role");for(let o of["city","town","category"]){let s=(i=a[o])==null?void 0:i.trim();s&&(n[o]=[s])}}await e.request(jd,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var jd={pathname:"/search/save",method:"POST",schema:{response:qn(),body:he({contact:he({email:Ut(et(N()),N(),Ma()),first_name:et(N()),last_name:et(N())}),alerts:Ut(et(N()),N(),pt($d)),filters:Ad})}},Dd=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:Ut(he({country:et(Ur(he({value:N()})),[])}),Oa(({country:r})=>r.map(({value:n})=>n))),searchParams:qn()}};return e.request(t,{searchParams:{filters:{country:null}}})},Wr=new WeakMap,Ua=e=>(Wr.has(e)||(Wr.set(e,void 0),Dd(e).then(async t=>{let{jobCountryCodes:r}=await Promise.resolve().then(()=>np);Wr.set(e,r(t).join(",")||void 0)}).catch(()=>{})),Wr.get(e)),Md=(e,t)=>{let r=new Set,n=[];for(let i=0;i<Math.max(e.length,t.length);i++)for(let a of[e[i],t[i]]){if(!a)continue;let o=a.mapbox_id||a.full_address||[a.name,a.place_formatted].filter(Boolean).join(", ");if(!r.has(o)&&(r.add(o),n.push(a),n.length===5))return n}return n},Od=600,Ld=async(e,t,r)=>{if(r==null||r.throwIfAborted(),!t){let n=await e();return r==null||r.throwIfAborted(),n}return new Promise((n,i)=>{let a,o,s,l=!1,c=()=>{l=!0,clearTimeout(s),r==null||r.removeEventListener("abort",f)},f=()=>{c(),i(r==null?void 0:r.reason)},d=()=>{c(),(a==null?void 0:a.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(Md(a.value,o.value)):(a==null?void 0:a.status)==="fulfilled"?n(a.value):(o==null?void 0:o.status)==="fulfilled"?n(o.value):(a==null?void 0:a.status)==="rejected"&&i(a.reason)},b=(p,g)=>{l||(p?a=g:o=g,a&&o?d():g.status==="fulfilled"&&g.value.length>0&&(s=setTimeout(d,Od)))};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}))})},qa=vc(In([ge(),Pr()]),fa(String)),Wa=ee({id:qa,version:Pr(),build:Pr(),nodes:ha(pa()),context_schema:_e($t(An(ge(),ee({required:$n(),type:In([Ae("string"),Ae("number")])}))))}),Fd=ee({flow:Wa}),Nd=ee({company:ee({name:ge()}),context:_e(An(ge(),Bt())),flow:Wa,job:ee({id:qa,title:ge()}),user:_e(ee({city:_e(ge()),country:_e(ge()),isEU:_e($n()),continent:_e(ge())}))}),Rd=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),Pd={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:qn(),response:Nd}},Vd={pathname:"/flow/id/:id",method:"GET",schema:{response:Fd}},hr,L,Ha,Ka,It,Ga,Ya,Hn,Ja,qt={},Za=[],Bd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Hr=Array.isArray;function tt(e,t){for(var r in t)e[r]=t[r];return e}function Xa(e){var t=e.parentNode;t&&t.removeChild(e)}function Oe(e,t,r){var n,i,a,o={};for(a in t)a=="key"?n=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?hr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return br(e,o,n,i,null)}function br(e,t,r,n,i){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Ha};return i==null&&L.vnode!=null&&L.vnode(a),a}function zd(){return{current:null}}function ae(e){return e.children}function Ve(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 Qa(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 Qa(e)}}function Kn(e){(!e.__d&&(e.__d=!0)&&It.push(e)&&!Gr.__r++||Ga!==L.debounceRendering)&&((Ga=L.debounceRendering)||Ya)(Gr)}function Gr(){var e,t,r,n,i,a,o,s,l;for(It.sort(Hn);e=It.shift();)e.__d&&(t=It.length,n=void 0,i=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(a=tt({},o)).__v=o.__v+1,Gn(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??Kr(o),o.__h,i),oo(n,o,i),o.__e!=s&&Qa(o)),It.length>t&&It.sort(Hn));Gr.__r=0}function eo(e,t,r,n,i,a,o,s,l,c,f){var d,b,p,g,v,x,C,_,M,D,j=0,z=n&&n.__k||Za,A=z.length,S=A,k=t.length;for(r.__k=[],d=0;d<k;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"?br(null,g,null,null,g):Hr(g)?br(ae,{children:g},null,null,null):g.__b>0?br(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(_=Ud(g,z,C=d+j,S))===-1?p=qt:(p=z[_]||qt,z[_]=void 0,S--),Gn(e,g,p,i,a,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),D=!(M=p===qt||p.__v===null)&&_===C,M?_==-1&&j--:_!==C&&(_===C+1?(j++,D=!0):_>C?S>k-C?(j+=_-C,D=!0):j--:j=_<C&&_==C-1?_-C:0),C=d+j,D=D||_==d&&!M,typeof g.type!="function"||_===C&&p.__k!==g.__k?typeof g.type=="function"||D?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,d=A;d--;)z[d]!=null&&(typeof r.type=="function"&&z[d].__e!=null&&z[d].__e==r.__d&&(r.__d=z[d].__e.nextSibling),so(z[d],z[d]))}function to(e,t,r){for(var n,i=e.__k,a=0;i&&a<i.length;a++)(n=i[a])&&(n.__=e,t=typeof n.type=="function"?to(n,t,r):ro(r,n.__e,t));return t}function rt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Hr(e)?e.some(function(r){rt(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 Ud(e,t,r,n){var i=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&a===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&i==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&i==l.key&&a===l.type)return s;s++}}return-1}function qd(e,t,r,n,i){var a;for(a in r)a==="children"||a==="key"||a in t||Yr(e,a,null,r[a],n);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||Yr(e,a,t[a],r[a],n)}function no(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Bd.test(t)?r:r+"px"}function Yr(e,t,r,n,i){var a;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")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n||e.addEventListener(t,a?ao:io,a):e.removeEventListener(t,a?ao:io,a);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function io(e){return this.l[e.type+!1](L.event?L.event(e):e)}function ao(e){return this.l[e.type+!0](L.event?L.event(e):e)}function Gn(e,t,r,n,i,a,o,s,l,c){var f,d,b,p,g,v,x,C,_,M,D,j,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,a=[s]),(f=L.__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=(d=t.__c=r.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(C,M):(t.__c=d=new Ve(C,M),d.constructor=k,d.render=Hd),_&&_.sub(d),d.props=C,d.state||(d.state={}),d.context=M,d.__n=n,b=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),k.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=tt({},d.__s)),tt(d.__s,k.getDerivedStateFromProps(C,d.__s))),p=d.props,g=d.state,d.__v=t,b)k.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(k.getDerivedStateFromProps==null&&C!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(C,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(C,d.__s,M)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=C,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function($){$&&($.__=t)}),D=0;D<d._sb.length;D++)d.__h.push(d._sb[D]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(C,d.__s,M),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,g,v)})}if(d.context=M,d.props=C,d.__P=e,d.__e=!1,j=L.__r,z=0,"prototype"in k&&k.prototype.render){for(d.state=d.__s,d.__d=!1,j&&j(t),f=d.render(d.props,d.state,d.context),A=0;A<d._sb.length;A++)d.__h.push(d._sb[A]);d._sb=[]}else do d.__d=!1,j&&j(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++z<25);d.state=d.__s,d.getChildContext!=null&&(n=tt(tt({},n),d.getChildContext())),b||d.getSnapshotBeforeUpdate==null||(v=d.getSnapshotBeforeUpdate(p,g)),eo(e,Hr(S=f!=null&&f.type===ae&&f.key==null?f.props.children:f)?S:[S],t,r,n,i,a,o,s,l,c),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),x&&(d.__E=d.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Wd(r.__e,t,r,n,i,a,o,l,c);(f=L.diffed)&&f(t)}catch($){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),L.__e($,t,r)}}function oo(e,t,r){for(var n=0;n<r.length;n++)Yn(r[n],r[++n],r[++n]);L.__c&&L.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){L.__e(a,i.__v)}})}function Wd(e,t,r,n,i,a,o,s,l){var c,f,d,b=r.props,p=t.props,g=t.type,v=0;if(g==="svg"&&(i=!0),a!=null){for(;v<a.length;v++)if((c=a[v])&&"setAttribute"in c==!!g&&(g?c.localName===g:c.nodeType===3)){e=c,a[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),a=null,s=!1}if(g===null)b===p||s&&e.data===p||(e.data=p);else{if(a=a&&hr.call(e.childNodes),f=(b=r.props||qt).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!s){if(a!=null)for(b={},v=0;v<e.attributes.length;v++)b[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(qd(e,p,b,i,s),d)t.__k=[];else if(eo(e,Hr(v=t.props.children)?v:[v],t,r,n,i&&g!=="foreignObject",a,o,a?a[0]:r.__k&&Kr(r,0),s,l),a!=null)for(v=a.length;v--;)a[v]!=null&&Xa(a[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){L.__e(n,r)}}function so(e,t,r){var n,i;if(L.unmount&&L.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(a){L.__e(a,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&so(n[i],t,r||typeof e.type!="function");r||e.__e==null||Xa(e.__e),e.__=e.__e=e.__d=void 0}function Hd(e,t,r){return this.constructor(e,r)}function Tt(e,t,r){var n,i,a,o;L.__&&L.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Gn(t,e=(!n&&r||t).__k=Oe(ae,null,[e]),i||qt,qt,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?hr.call(t.childNodes):null,a,!n&&r?r:i?i.__e:t.firstChild,n,o),oo(a,e,o)}function lo(e,t){Tt(e,t,lo)}function Kd(e,t,r){var n,i,a,o,s=tt({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?n=t[a]:a=="ref"?i=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?hr.call(arguments,2):r),br(e.type,s,n||e.key,i||e.ref,null)}function co(e,t){var r={__c:t="__cC"+Ja++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,Kn(s)})},this.sub=function(o){i.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}hr=Za.slice,L={__e:function(e,t,r,n){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(s){e=s}throw e}},Ha=0,Ka=function(e){return e!=null&&e.constructor===void 0},Ve.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=tt({},this.state),typeof e=="function"&&(e=e(tt({},r),this.props)),e&&tt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Kn(this))},Ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Kn(this))},Ve.prototype.render=ae,It=[],Ya=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hn=function(e,t){return e.__v.__b-t.__v.__b},Gr.__r=0,Ja=0;var ht,te,Jn,uo,Wt=0,fo=[],Jr=[],po=L.__b,ho=L.__r,bo=L.diffed,go=L.__c,mo=L.unmount;function Ht(e,t){L.__h&&L.__h(te,e,Wt||t),Wt=0;var r=te.__H||(te.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Jr}),r.__[e]}function Be(e){return Wt=1,vo(_o,e)}function vo(e,t,r){var n=Ht(ht++,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=te,!te.u)){var i=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!a||a.call(this,s,l,c);var d=!1;return f.forEach(function(b){if(b.__N){var p=b.__[0];b.__=b.__N,b.__N=void 0,p!==b.__[0]&&(d=!0)}}),!(!d&&n.__c.props===s)&&(!a||a.call(this,s,l,c))};te.u=!0;var a=te.shouldComponentUpdate,o=te.componentWillUpdate;te.componentWillUpdate=function(s,l,c){if(this.__e){var f=a;a=void 0,i(s,l,c),a=f}o&&o.call(this,s,l,c)},te.shouldComponentUpdate=i}return n.__N||n.__}function jt(e,t){var r=Ht(ht++,3);!L.__s&&Xn(r.__H,t)&&(r.__=e,r.i=t,te.__H.__h.push(r))}function je(e,t){var r=Ht(ht++,4);!L.__s&&Xn(r.__H,t)&&(r.__=e,r.i=t,te.__h.push(r))}function be(e){return Wt=5,bt(function(){return{current:e}},[])}function Gd(e,t,r){Wt=6,je(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 bt(e,t){var r=Ht(ht++,7);return Xn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Yd(e,t){return Wt=8,bt(function(){return e},t)}function wo(e){var t=te.context[e.__c],r=Ht(ht++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(te)),t.props.value):e.__}function Jd(e,t){L.useDebugValue&&L.useDebugValue(t?t(e):e)}function Zd(){var e=Ht(ht++,11);if(!e.__){for(var t=te.__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 Xd(){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=[],L.__e(t,e.__v)}}L.__b=function(e){te=null,po&&po(e)},L.__r=function(e){ho&&ho(e),ht=0;var t=(te=e.__c).__H;t&&(Jn===te?(t.__h=[],te.__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=[],ht=0)),Jn=te},L.diffed=function(e){bo&&bo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fo.push(t)!==1&&uo===L.requestAnimationFrame||((uo=L.requestAnimationFrame)||Qd)(Xd)),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=te=null},L.__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(i){i.__h&&(i.__h=[])}),t=[],L.__e(n,r.__v)}}),go&&go(e,t)},L.unmount=function(e){mo&&mo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Zr(n)}catch(i){t=i}}),r.__H=void 0,t&&L.__e(t,r.__v))};var yo=typeof requestAnimationFrame=="function";function Qd(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=te,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),te=t}function Zn(e){var t=te;e.__c=e.__(),te=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 eu=Symbol.for("preact-signals");function Qn(){if(Kt>1)Kt--;else{for(var e,t=!1;gr!==void 0;){var r=gr;for(gr=void 0,ei++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ko(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(ei=0,Kt--,t)throw e}}var Z=void 0,gr=void 0,Kt=0,ei=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 me(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}me.prototype.brand=eu,me.prototype.h=function(){return!0},me.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)},me.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)}},me.prototype.subscribe=function(e){var t=this;return ri(function(){var r=t.value,n=Z;Z=void 0;try{e(r)}finally{Z=n}})},me.prototype.valueOf=function(){return this.value},me.prototype.toString=function(){return this.value+""},me.prototype.toJSON=function(){return this.value},me.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(me.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(ei>100)throw new Error("Cycle detected");this.v=e,this.i++,Xr++,Kt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Qn()}}}});function Le(e){return new me(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 Gt(e){me.call(this,void 0),this.x=e,this.s=void 0,this.g=Xr-1,this.f=4}(Gt.prototype=new me).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},Gt.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)}me.prototype.S.call(this,e)},Gt.prototype.U=function(e){if(this.t!==void 0&&(me.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)}},Gt.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(Gt.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 tu(e){return new Gt(e)}function Eo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Kt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,ti(e),n}finally{Z=r,Qn()}}}function ti(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 ru(e){if(Z!==this)throw new Error("Out-of-order effect");Co(this),Z=e,this.f&=-2,8&this.f&&ti(this),Qn()}function mr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}mr.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()}},mr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Eo(this),So(this),Kt++;var e=Z;return Z=this,ru.bind(this,e)},mr.prototype.N=function(){2&this.f||(this.f|=2,this.o=gr,gr=this)},mr.prototype.d=function(){this.f|=8,1&this.f||ti(this)};function ri(e){var t=new mr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var ni;function Yt(e,t){L[e]=t.bind(null,L[e]||function(){})}function Qr(e){ni&&ni(),ni=e&&e.S()}function $o(e){var t=this,r=e.data,n=iu(r);n.value=r;var i=bt(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Ka(i.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},tu(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}$o.displayName="_st",Object.defineProperties(me.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}}),Yt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var a=n[i];a instanceof me&&(r||(t.__np=r={}),r[i]=a,n[i]=a.peek())}}e(t)}),Yt("__r",function(e,t){Qr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var a;return ri(function(){a=this}),a.c=function(){n.__$f|=1,n.setState({})},a}())),Qr(r),e(t)}),Yt("__e",function(e,t,r,n){Qr(),e(t,r,n)}),Yt("diffed",function(e,t){Qr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in n)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in n){var c=a[l],f=n[l];c===void 0?(c=nu(r,l,f,i),a[l]=c):c.o(f,i)}}}e(t)});function nu(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,a=Le(r);return{o:function(o,s){a.value=o,n=s},d:ri(function(){var o=a.value.value;n[t]!==o&&(n[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Yt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var a=n[i];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Yt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Ve.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function iu(e){return bt(function(){return Le(e)},[])}const xe=Symbol.for("@ts-pattern/matcher"),Ao=Symbol.for("@ts-pattern/isVariadic"),en="@ts-pattern/anonymous-select-key",ii=e=>!!(e&&typeof e=="object"),tn=e=>e&&!!e[xe],se=(e,t,r)=>{if(tn(e)){const n=e[xe](),{matched:i,selections:a}=n.match(t);return i&&a&&Object.keys(a).forEach(o=>r(o,a[o])),i}if(ii(e)){if(!ii(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],a=[];for(const o of e.keys()){const s=e[o];tn(s)&&s[Ao]?a.push(s):a.length?i.push(s):n.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const o=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((c,f)=>se(c,o[f],r))&&i.every((c,f)=>se(c,s[f],r))&&(a.length===0||se(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>se(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const i=e[n];return(n in t||tn(a=i)&&a[xe]().matcherType==="optional")&&se(i,t[n],r);var a})}return Object.is(t,e)},ke=e=>{var t,r,n;return ii(e)?tn(e)?(t=(r=(n=e[xe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?vr(e,ke):vr(Object.values(e),ke):[]},vr=(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 de(e){return Object.assign(e,{optional:()=>oi(e),and:t=>re(e,t),or:t=>To(e,t),select:t=>t===void 0?wr(e):wr(t,e)})}function ai(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 i;return(i=n[r++])!=null?i:n.at(-1)}}}}))(e),{optional:()=>ai(oi(e)),select:t=>ai(t===void 0?wr(e):wr(t,e))})}function oi(e){return de({[xe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return t===void 0?(ke(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:se(e,t,n),selections:r}},getSelectionKeys:()=>ke(e),matcherType:"optional"})})}const au=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},ou=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},su=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function re(...e){return de({[xe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return{matched:e.every(i=>se(i,t,n)),selections:r}},getSelectionKeys:()=>vr(e,ke),matcherType:"and"})})}function To(...e){return de({[xe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return vr(e,ke).forEach(i=>n(i,void 0)),{matched:e.some(i=>se(i,t,n)),selections:r}},getSelectionKeys:()=>vr(e,ke),matcherType:"or"})})}function W(e){return{[xe]:()=>({match:t=>({matched:!!e(t)})})}}function wr(...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 de({[xe]:()=>({match:n=>{let i={[t??en]:n};return{matched:r===void 0||se(r,n,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??en].concat(r===void 0?[]:ke(r))})})}function jo(e){return!0}function We(e){return typeof e=="number"}function gt(e){return typeof e=="string"}function mt(e){return typeof e=="bigint"}const Do=de(W(jo)),lu=de(W(jo)),cu=Do,vt=e=>Object.assign(de(e),{startsWith:t=>{return vt(re(e,(r=t,W(n=>gt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return vt(re(e,(r=t,W(n=>gt(n)&&n.endsWith(r)))));var r},minLength:t=>vt(re(e,(r=>W(n=>gt(n)&&n.length>=r))(t))),length:t=>vt(re(e,(r=>W(n=>gt(n)&&n.length===r))(t))),maxLength:t=>vt(re(e,(r=>W(n=>gt(n)&&n.length<=r))(t))),includes:t=>{return vt(re(e,(r=t,W(n=>gt(n)&&n.includes(r)))));var r},regex:t=>{return vt(re(e,(r=t,W(n=>gt(n)&&!!n.match(r)))));var r}}),Mo=vt(W(gt)),He=e=>Object.assign(de(e),{between:(t,r)=>He(re(e,((n,i)=>W(a=>We(a)&&n<=a&&i>=a))(t,r))),lt:t=>He(re(e,(r=>W(n=>We(n)&&n<r))(t))),gt:t=>He(re(e,(r=>W(n=>We(n)&&n>r))(t))),lte:t=>He(re(e,(r=>W(n=>We(n)&&n<=r))(t))),gte:t=>He(re(e,(r=>W(n=>We(n)&&n>=r))(t))),int:()=>He(re(e,W(t=>We(t)&&Number.isInteger(t)))),finite:()=>He(re(e,W(t=>We(t)&&Number.isFinite(t)))),positive:()=>He(re(e,W(t=>We(t)&&t>0))),negative:()=>He(re(e,W(t=>We(t)&&t<0)))}),du=He(W(We)),wt=e=>Object.assign(de(e),{between:(t,r)=>wt(re(e,((n,i)=>W(a=>mt(a)&&n<=a&&i>=a))(t,r))),lt:t=>wt(re(e,(r=>W(n=>mt(n)&&n<r))(t))),gt:t=>wt(re(e,(r=>W(n=>mt(n)&&n>r))(t))),lte:t=>wt(re(e,(r=>W(n=>mt(n)&&n<=r))(t))),gte:t=>wt(re(e,(r=>W(n=>mt(n)&&n>=r))(t))),positive:()=>wt(re(e,W(t=>mt(t)&&t>0))),negative:()=>wt(re(e,W(t=>mt(t)&&t<0)))}),uu=wt(W(mt)),fu=de(W(function(e){return typeof e=="boolean"})),pu=de(W(function(e){return typeof e=="symbol"})),hu=de(W(function(e){return e==null})),bu=de(W(function(e){return e!=null}));var Dt={__proto__:null,matcher:xe,optional:oi,array:function(...e){return ai({[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(a=>{n[a]=[]}),{matched:!0,selections:n};const i=(a,o)=>{n[a]=(n[a]||[]).concat([o])};return{matched:t.every(a=>se(r,a,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ke(e[0])})})},set:function(...e){return de({[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=(a,o)=>{r[a]=(r[a]||[]).concat([o])},i=e[0];return{matched:au(t,a=>se(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ke(e[0])})})},map:function(...e){return de({[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 i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:ou(t,(s,l)=>{const c=se(a,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 de({[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 i=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[a,o]=e.length===1?[Mo,e[0]]:e;return{matched:su(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=c!==null&&se(a,c,i),d=se(a,s,i),b=se(o,l,i);return(d||f)&&b}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...ke(e[0]),...ke(e[1])]})})},intersection:re,union:To,not:function(e){return de({[xe]:()=>({match:t=>({matched:!se(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:W,select:wr,any:Do,unknown:lu,_:cu,string:Mo,number:du,bigint:uu,boolean:fu,symbol:pu,nullish:hu,nonNullable:bu,instanceOf:function(e){return de(W(function(t){return r=>r instanceof t}(e)))},shape:function(e){return de(W(Io(e)))}};let gu=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 si={matched:!1,value:void 0};function rn(e){return new mu(e,si)}let mu=class oa{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(c,f)=>{a=!0,o[c]=f},l=!n.some(c=>se(c,this.input,s))||i&&!i(this.input)?si:{matched:!0,value:r(a?en in o?o[en]:o:this.input,this.input)};return new oa(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new oa(this.input,n?{matched:!0,value:r(this.input,this.input)}:si)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=vu){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function vu(e){throw new gu(e)}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 i=e.length;for(t=0;t<i;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 nt(){for(var e,t,r=0,n="",i=arguments.length;r<i;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=nt,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:i,defaultVariants:a}=t,o=Object.keys(i).map(c=>{const f=r==null?void 0:r[c],d=a==null?void 0:a[c];if(f===null)return null;const b=Lo(f)||Lo(d);return i[c][b]}),s=r&&Object.entries(r).reduce((c,f)=>{let[d,b]=f;return b===void 0||(c[d]=b),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:d,className:b,...p}=f;return Object.entries(p).every(g=>{let[v,x]=g;return Array.isArray(x)?x.includes({...a,...s}[v]):{...a,...s}[v]===x})?[...c,d,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 li(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 ci(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function di(e){this.props=e}function wu(e,t){function r(i){var a=this.props.ref,o=a==i.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!o:li(this.props,i)}function n(i){return this.shouldComponentUpdate=r,Oe(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(di.prototype=new Ve).isPureReactComponent=!0,di.prototype.shouldComponentUpdate=function(e,t){return li(this.props,e)||li(this.state,t)};var Ro=L.__b;L.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ro&&Ro(e)};var yu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ui(e){function t(r){var n=No({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=yu,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:rt(rt(e).map(t))},_u={map:Po,forEach:Po,count:function(e){return e?rt(e).length:0},only:function(e){var t=rt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:rt},xu=L.__e;L.__e=function(e,t,r,n){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}xu(e,t,r,n)};var Vo=L.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 yr(){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 i(a){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,a)}return i.displayName="Lazy",i.__f=!0,i}function _r(){this.u=null,this.o=null}L.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Vo&&Vo(e)},(yr.prototype=new Ve).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Uo(n.__v),a=!1,o=function(){a||(a=!0,r.__R=null,i?i(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)},yr.prototype.componentWillUnmount=function(){this.t=[]},yr.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 i=t.__a&&Oe(ae,null,e.fallback);return i&&(i.__h=null),[Oe(ae,null,t.__a?null:e.children),i]};var Wo=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 ku(e){return this.getChildContext=function(){return e.context},e.children}function Su(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,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),Tt(Oe(ku,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Cu(e,t){var r=Oe(Su,{__v:e,i:t});return r.containerInfo=t,r}(_r.prototype=new Ve).__a=function(e){var t=this,r=Uo(t.__v),n=t.o.get(e);return n[0]++,function(i){var a=function(){t.props.revealOrder?(n.push(i),Wo(t,e,n)):i()};r?r(a):a()}},_r.prototype.render=function(e){this.u=null,this.o=new Map;var t=rt(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},_r.prototype.componentDidUpdate=_r.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Wo(e,r,t)})};var Ho=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Eu=/^(?: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]/,$u=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Au=/[A-Z0-9]/g,Iu=typeof document<"u",Tu=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function ju(e,t,r){return t.__k==null&&(t.textContent=""),Tt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Du(e,t,r){return lo(e,t),typeof r=="function"&&r(),e?e.__c:null}Ve.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ve.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ko=L.event;function Mu(){}function Ou(){return this.cancelBubble}function Lu(){return this.defaultPrevented}L.event=function(e){return Ko&&(e=Ko(e)),e.persist=Mu,e.isPropagationStopped=Ou,e.isDefaultPrevented=Lu,e.nativeEvent=e};var fi,Fu={enumerable:!1,configurable:!0,get:function(){return this.class}},Go=L.vnode;L.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||Iu&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Tu(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":$u.test(a)?a=s:n.indexOf("-")===-1&&Eu.test(a)?a=a.replace(Au,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&i[a=s]&&(a="oninputCapture"),i[a]=o}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=rt(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=rt(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",Fu)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Ho,Go&&Go(e)};var Yo=L.__r;L.__r=function(e){Yo&&Yo(e),fi=e.__c};var Jo=L.diffed;L.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),fi=null};var Nu={ReactCurrentDispatcher:{current:{readContext:function(e){return fi.__n[e.__c].props.value}}}};function Ru(e){return Oe.bind(null,e)}function Zo(e){return!!e&&e.$$typeof===Ho}function Pu(e){return Zo(e)?Kd.apply(null,arguments):e}function Vu(e){return!!e.__k&&(Tt(null,e),!0)}function Bu(e){return e&&(e.base||e.nodeType===1&&e)||null}var zu=function(e,t){return e(t)},Uu=function(e,t){return e(t)},qu=ae;function Xo(e){e()}function Wu(e){return e}function Hu(){return[!1,Xo]}var Ku=je;function Gu(e,t){var r=t(),n=Be({h:{__:r,v:t}}),i=n[0].h,a=n[1];return je(function(){i.__=r,i.v=t,ci(i.__,t())||a({h:i})},[e,r,t]),jt(function(){return ci(i.__,i.v())||a({h:i}),e(function(){ci(i.__,i.v())||a({h:i})})},[e]),r}var Se={useState:Be,useId:Zd,useReducer:vo,useEffect:jt,useLayoutEffect:je,useInsertionEffect:Ku,useTransition:Hu,useDeferredValue:Wu,useSyncExternalStore:Gu,startTransition:Xo,useRef:be,useImperativeHandle:Gd,useMemo:bt,useCallback:Yd,useContext:wo,useDebugValue:Jd,version:"17.0.2",Children:_u,render:ju,hydrate:Du,unmountComponentAtNode:Vu,createPortal:Cu,createElement:Oe,createContext:co,createFactory:Ru,cloneElement:Pu,createRef:zd,Fragment:ae,isValidElement:Zo,findDOMNode:Bu,Component:Ve,PureComponent:di,memo:wu,forwardRef:ui,flushSync:Uu,unstable_batchedUpdates:zu,StrictMode:qu,Suspense:yr,SuspenseList:_r,lazy:qo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Nu},Yu=["other","few","many","two","one","zero"],Qo=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function i(a,o){const s=(t==null?void 0:t[a])??e[a];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 “${a.toString()}”`);let l=n.select(o.count);if(!(l in s)){const c=Yu.find(f=>f in s);if(!c)throw new Error(`Missing plural rule for translation key “${a.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 “${a.toString()}”.`)}}return i},Ju=0;function u(e,t,r,n,i,a){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:--Ju,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return L.vnode&&L.vnode(c),c}var es=co(null),ts=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const i=bt(()=>Qo({locale:n,terms:e,overrides:t}),[t,n]);return u(es.Provider,{value:{t:i,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})}),Zu={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"},{TranslationProvider:lg,useTranslation:cg,createTFunction:dg,defaultTerms:Xu}=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:Qu,useTranslation:oe,createTFunction:ef}=ts({...Xu,...Zu,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"}}),ug="";function it(e,t){if(!e)throw new Error(t)}var xr=/\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}$/,is=({postcode:e,label:t="",state:r,country:n})=>{var s,l,c;const i=((e==null?void 0:e.trim())||((s=t.match(xr))==null?void 0:s[0])||"").replace(/\s/g,"").toUpperCase();if(rs.test(i))return i.startsWith("BT")?"ni":"gb";if(ns.test(i))return"ie";const a=f=>f.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim();if(a(r??"")==="northern ireland"||t.split(",").some(f=>a(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},tf="https://maps.inploi.com/address",rf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim(),as=e=>e.split(",").map(t=>rf(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,nf=(e,t,r)=>{const[n="",i=""]=as(e),a=os(t),o=i.replace(xr,"").trim(),s=o&&!["united kingdom","ireland","england","scotland","wales","northern ireland"].includes(o);if(!n||!a&&!s)return null;const l=r.slice(0,3).findIndex(c=>{var p;const f=as(c);if(!f.includes(n))return!1;const d=((p=c.match(xr))==null?void 0:p[0].replace(/\s/g,"").toUpperCase())??"",b=os(d);return a&&b?a===b:!!(s&&f.some(g=>g.replace(xr,"").trim()===o))});return l===-1?null:l+1},af=async({query:e,country:t,pickedLabel:r,pickedPostcode:n,pickedCountry:i,pickedState:a,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 b=new URL(tf);b.search=new URLSearchParams({q:e,country:t,limit:"5"}).toString();const p=await fetch(b.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,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(xr))==null?void 0:l[0])||"").replace(/\s/g,"").toUpperCase(),_=nf(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],D=M===void 0?null:Number(M),j=p.headers.get("X-Geo-Fallback"),z=is({postcode:n,label:r,state:a,country:i});await o({hit:_!==null,rank:_,results:x.length,source:g.source,fallback:j&&/^[a-z0-9_-]{1,64}$/i.test(j)?j:null,ms:D!==null&&Number.isFinite(D)?D:null,region:z})}catch{}finally{clearTimeout(s)}},of="https://maps.inploi.com",sf=async(e,t,r=Date.now()+2500)=>{t==null||t.throwIfAborted();const n=new AbortController,i=()=>n.abort(t==null?void 0:t.reason);t==null||t.addEventListener("abort",i,{once:!0});let a;try{const o=new Promise((l,c)=>{n.signal.addEventListener("abort",()=>c(n.signal.reason),{once:!0}),a=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(a),t==null||t.removeEventListener("abort",i)}},lf=async(e,t,r)=>await sf(async i=>{const{lookupAddress:a}=await Promise.resolve().then(()=>cp);return i.throwIfAborted(),a({...e,signal:i})},e.signal,r)??{results:await t(),arm:"direct",source:"direct"},cf=e=>{try{const t=new URL("/outcome",of);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{}},pi=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(pi):Object.keys(e).sort().reduce((t,r)=>(t[r]=pi(e[r]),t),{}),df=e=>{let t=JSON.stringify(pi(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const hi=(e,t)=>t.some(r=>e instanceof r);let ss,ls;function uf(){return ss||(ss=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ff(){return ls||(ls=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bi=new WeakMap,gi=new WeakMap,nn=new WeakMap;function pf(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(Ot(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return nn.set(t,e),t}function hf(e){if(bi.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});bi.set(e,t)}let mi={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return bi.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){mi=e(mi)}function bf(e){return ff().includes(e)?function(...t){return e.apply(vi(this),t),Ot(this.request)}:function(...t){return Ot(e.apply(vi(this),t))}}function gf(e){return typeof e=="function"?bf(e):(e instanceof IDBTransaction&&hf(e),hi(e,uf())?new Proxy(e,mi):e)}function Ot(e){if(e instanceof IDBRequest)return pf(e);if(gi.has(e))return gi.get(e);const t=gf(e);return t!==e&&(gi.set(e,t),nn.set(t,e)),t}const vi=e=>nn.get(e);function mf(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){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=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const vf=["get","getKey","getAll","getAllKeys","count"],wf=["put","add","delete","clear"],wi=new Map;function ds(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(wi.get(t))return wi.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=wf.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||vf.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),i&&l.done]))[0]};return wi.set(t,a),a}cs(e=>({...e,get:(t,r,n)=>ds(t,r)||e.get(t,r,n),has:(t,r)=>!!ds(t,r)||e.has(t,r)}));const yf=["continue","continuePrimaryKey","advance"],us={},yi=new WeakMap,fs=new WeakMap,_f={get(e,t){if(!yf.includes(t))return e[t];let r=us[t];return r||(r=us[t]=function(...n){yi.set(this,fs.get(this)[t](...n))}),r}};async function*xf(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,_f);for(fs.set(r,t),nn.set(r,vi(t));t;)yield r,t=await(yi.get(r)||t.continue()),yi.delete(r)}function ps(e,t){return t===Symbol.asyncIterator&&hi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&hi(e,[IDBIndex,IDBObjectStore])}cs(e=>({...e,get(t,r,n){return ps(t,r)?xf:e.get(t,r,n)},has(t,r){return ps(t,r)||e.has(t,r)}}));const kr=typeof indexedDB>"u"?void 0:mf("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),kf=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let an,_i,Sr;const hs=()=>{if(!an)return Sr;const e=an;an=void 0;const t=sn(e),r=kr==null?void 0:kr.then(n=>n.put("state",kf(e.data),t)).finally(()=>{Sr===r&&(Sr=void 0)});return Sr=r,Sr},Fe={getStateData:async(e,t,r)=>{var i;const n=sn({...e,flowKeys:t,context:r});return(i=await kr)==null?void 0:i.get("state",n)},getAllStateData:async()=>{var e;return((e=await kr)==null?void 0:e.getAll("state"))??[]},setStateData:e=>{an=e,clearTimeout(_i),_i=setTimeout(()=>void hs(),1e3)},flushStateData:()=>(clearTimeout(_i),hs()??Promise.resolve())},Jt=e=>t=>t?t.type===e:!1,Sf=()=>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:Sf()}),Cf=e=>rn(e).with({nativeEvent:{submitter:Dt.select(Dt.union(Dt.instanceOf(HTMLButtonElement),Dt.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 i=e.find(c=>c.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(c=>c.id===a),s=t.type.includes("question")?1:0;if(o){const c=s+Math.max(on(e,i,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,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Ef=e=>{const t={},r=e.find(n=>n.isHead);return r&&on(e,r,(n,i)=>{t[n]=i}),t},sn=e=>[...e.flowKeys,e.id,e.version,e.build,df(e.hostContext??e.context)].join("/"),$f=({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&&wa(t,e.submissions)},gs=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||wa(t,e.submissions))},Ke=Le({state:"idle"}),xi=new Set,Lt=e=>{const{state:t,flow:r}=Ke.value;if(t!=="loaded")return;it(r,"No flow to update");const n=e(r.data);r.data=n,Ke.value={state:t,flow:r},Fe.setStateData(r)},R={current$:Ke,viewState$:Le("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:i,title:a,analytics:o,job:s,employer:l,locationOrigin:c})=>{await Fe.flushStateData().catch(()=>{});const f=await Fe.getStateData(t,i,r),d=f??bs(),b=sn({...t,flowKeys:i,context:r}),p=f!==void 0&&!xi.has(b)&&$f({data:d,nodes:t.nodes});return p||xi.add(b),{jobAlerts:e,data:d,offerResume:p,startedAt:new Date,nodeIdToProgress:Ef(t.nodes),flowKeys:i,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:a,analytics:o,job:s,employer:l,locationOrigin:c}},commitFlow:e=>{Ke.value={state:"loaded",flow:e},Fe.setStateData(e)},settleResume:e=>{e.offerResume=!1,xi.add(sn(e))},cancelCurrentFlow:()=>{Ke.value={state:"idle"},R.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}=Ke.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};Ke.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}=Ke.value;it(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.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=>{Ke.peek().flow===e&&(Ke.value={state:"loaded",flow:e}),Fe.setStateData(e),await Fe.flushStateData()}},ms=({heading:e})=>{const{t}=oe();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)})})]})},ln=e=>{const{t}=oe();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"})})})]})},vs=()=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(ln,{class:"text-neutral-6 h-8 w-8"})}),Af=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)}%`},If=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"}}),Cr=({class:e,children:t,variant:r,...n})=>u("button",{class:nt(If({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})}),ws=()=>u("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Tf=()=>{if(R.current$.value.state!=="loaded")return null;const e=R.current$.value.flow.nodeIdToProgress,t=R.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:Af(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:i}=oe(),a=R.viewState$,o=!!t.feedback&&R.current$.value.state==="loaded"&&a.value==="maximised",s=o&&n.value,l=be(!1);return jt(()=>{var c,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(c=R.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:f.customProperties}))},[s,r]),u(ae,{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":i("minimize"),onClick:()=>{a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ki,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:nt({hidden:!o}),children:u("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,R.current$.value.state==="loaded"&&u(Cr,{class:"mx-1","aria-label":i("restart"),onClick:()=>{R.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(Cr,{class:"view-switch mx-1",onTouchStart:ki,"aria-label":i("minimize"),onClick:()=>a.value="minimised",children:u(ws,{})},"minmax")]})]}),u(Tf,{})]})})};function ki(){}const Df=qo(()=>Promise.resolve().then(()=>tg).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"}}}),Mf=({open:e,...t})=>{const r=be(null);return je(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),u("dialog",{ref:r,...t})},Of=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:i,talentBankClient:a,params:o,feedbackReady:s})=>{const{state:l,flow:c}=R.current$.value,f=R.viewState$.value,d=l!=="idle"&&f==="maximised",b=be(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(Qu,{terms:o.terms,locale:void 0,children:[u(Mf,{open:d,onClose:()=>R.viewState$.value="minimised",children:u("div",{ref:b,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:ys({view:"maximised"}),children:u("div",{class:_s({view:"maximised"}),children:[u(jf,{params:o,analytics:i,feedbackReady:s,children:p?u(ae,{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(vs,{},"loading")).with({state:"loaded"},()=>u(yr,{fallback:u(vs,{},"loading"),children:u(Df,{env:e,rpcClient:n,analytics:i,apiClient:r,logger:t,talentBankClient:a})})).with({state:"closed"},()=>u(ms,{heading:"flow_closed"})).with({state:"error"},()=>u(ms,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?u(Lf,{flow:c}):null]})},Lf=({flow:e})=>{const{t}=oe();return u("div",{class:ys({view:"minimised",class:"z-100 isolate"}),children:u("div",{class:_s({view:"minimised"}),children:[u("button",{onClick:()=>{R.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ki,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(Cr,{class:"mx-1","aria-label":t("close_application"),onClick:R.cancelCurrentFlow,variant:"white",children:u("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},xs="14.18.0",Ff=(e,t=xs)=>t===void 0?e:{fetch:(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const i=new Headers(n==null?void 0:n.headers);return i.set("x-inploi-widget-version",t),e.fetch(r,{...n,headers:Object.fromEntries(i.entries())})}};let Er,ks,cn;const Nf=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(i=>i.startsWith("index.js:"))}},Si=e=>Ss(e,cn),Cs=e=>typeof e=="object"&&e!==null&&"status"in e&&typeof e.status=="number"?e.status:void 0,Zt=(e,t,r={})=>Er==null?void 0:Er.send(e,t,{...r,message:"Chatbot widget beacon",widget:"chatbot",key_hash:ks}),Rf=e=>{const t=(r,n,i)=>{if(R.viewState$.value==="closed")return;const a=Ss(n,e,i);a.stack.length&&Zt("fatal",Rr(n),{phase:"render",error:{...a,via:r}})};window.addEventListener("error",r=>{Xl(r)||t("error",r.error,r.message)}),window.addEventListener("unhandledrejection",r=>t("rejection",r.reason))},Pf=(e,t,r=ut&&ut.src||new URL("index.js",document.baseURI).href)=>{const n=nc();Er||!n||!e||(ks=t?da(t).toString(36):void 0,Er=fc({config:n,version:xs,env:e,seed:ic(rc(),sd)}),cn=Nf(r),cn&&Rf(cn))},Vf=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 i=R.current$.value.flow;i!==t.application&&(t={application:i,attempts:0,blocked:!1});const a=t,o=++a.attempts,s=performance.now(),l=await e.fetch(r,n).catch(c=>{throw Cs(c)===void 0&&!(c instanceof Error&&c.name==="AbortError")&&(a.blocked=!0,Zt("submit_blocked",Rr(c),{phase:"submit",error:Si(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 a.blocked&&Zt("submit_recovered",void 0,{phase:"submit",endpoint:"flow_submit",attempt:o}),l}}},Bf=`[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-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (pointer: coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}
|
|
31
|
+
`,Es="inploi-chatbot",Ci=`[data-widget='${Es}']`,zf=()=>({getChatbotElement:()=>document.querySelector(Ci),getOrCreateChatbotElement:()=>{const e=document.querySelector(Ci);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Es,t}}),Uf=25,$s=Le(()=>{}),As=["wheel","touchmove","keydown"],qf=(e,t)=>new Promise((r,n)=>{if(t!=null&&t.aborted)return n(new ft);const i=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(i),n(new ft)},{once:!0})}),ne={onSubmitSuccessFn$:Le(()=>{}),onInteractionFn$:Le(()=>{}),isBotTyping$:Le(!1),captchaVisible$:Le(!1),themeMode$:Le("light"),isReadingHistory$:Le(!1),scrollToEnd:()=>$s.value()},Wf=()=>{const e=be(null),t=be(-1/0);je(()=>{const n=e.current;if(!n)return;const i=()=>{ne.isReadingHistory$.value=!1,n.scrollTo({top:n.scrollHeight,behavior:"instant"})};$s.value=i;const a=()=>t.current=performance.now(),o=()=>{n.scrollHeight-n.scrollTop-n.clientHeight<=24?ne.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(ne.isReadingHistory$.value=!0)};n.addEventListener("scroll",o,{passive:!0});for(const l of As)n.addEventListener(l,a,{passive:!0});const s=new ResizeObserver(()=>{ne.isReadingHistory$.peek()||i()});return s.observe(n),n.firstElementChild&&s.observe(n.firstElementChild),()=>{n.removeEventListener("scroll",o);for(const l of As)n.removeEventListener(l,a);s.disconnect()}},[]);const r=bt(()=>({setSubmission:(i,a)=>R.setSubmission(i,a),captcha:{container:()=>{var i;return((i=e.current)==null?void 0:i.querySelector("[data-captcha-slot]"))??null},get theme(){return ne.themeMode$.peek()},reveal:i=>{ne.captchaVisible$.value=i,i&&requestAnimationFrame(()=>{var a,o;(o=(a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))==null||o.focus(),ne.scrollToEnd()})}},send:async({message:i,signal:a,groupId:o})=>{if(await rn(i).with({author:"bot",type:"text"},async s=>{if(a!=null&&a.aborted)throw new ft;ne.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*Uf;try{await qf(l,a)}finally{ne.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new ft;R.addMessage(i,o)},input:({input:i,signal:a})=>{if(a!=null&&a.aborted)throw new ft;return R.setInput(i),new Promise(o=>{const s=l=>{if(a!=null&&a.aborted)throw new ft;t.current=-1/0,R.setInput(void 0),i.key&&R.setSubmission(i.key,l),o(l)};ne.onSubmitSuccessFn$.value=s})}}),[]);return{chatRef:e,chatService:r}};var Hf=["1","2","3","4","5","6","7","8","9","10","11","12"],Kf={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]}},Gf=(e,t=1,r)=>n=>{const[i,a]=Kf[r][n];return"oklch("+i+"% "+a*t+" "+e+")"},Ei=e=>{const t=Gf(e.hue,e.chroma,e.mode);return Object.fromEntries(Hf.map(r=>[e.prefix+r,e.transform(t(r))]))},$i=e=>e,Yf=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(i=>{const a=n[i];return[`${String(r)}.${i}`,a]}):[[r,n]]});return Object.fromEntries(t)},dn=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Ai=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(dn(e)&&dn(r))for(const n in r){const i=r[n];if(dn(i)){e[n]||Object.assign(e,{[n]:{}});const a=e[n];dn(a)&&Ai(a,i)}else Object.assign(e,{[n]:r[n]})}return Ai(e,...t)},Jf=e=>{function t(r,n){const i=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return t},Zf=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:i,getToken:a}=n,o=b=>a("reference",b.toString()),s=e({theme:i}),l=t({theme:i,core:o,raw:{core:s}}),c=r({theme:i,core:o,semantic:o,raw:{core:s,semantic:l}}),f=Yf(Ai(s,l,c)),d=([b,p],g)=>{const v=[g,b].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(x=>d(x,v)):[[n.getToken("declaration",v),p]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(b=>d(b))),ref:b=>a("reference",b.toString())}}})})})});const[Ii,Ti,Is]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Xf=Zf().core(({theme:e})=>({color:{black:Ii,white:Ti,lowest:e.mode==="light"?Ti:Ii,highest:e.mode==="light"?Ii:Ti,...Ei({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:$i}),...Ei({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:$i}),...Ei({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:$i})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(i,a)=>t.core.color[i].replace(")",` / ${a})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider: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 i=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":Is,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),Qf=Jf({prefix:"i-"}),ep=e=>{const t=Xf.from({theme:e,getToken:Qf}),r=Object.entries(t.declarations).map(([n,i])=>`${n}: ${i};`);return`${Ci} {
|
|
3
32
|
${r.concat(r).join(`
|
|
4
33
|
`)}
|
|
5
|
-
}`},Wu="14.17.2",Ku=(e,t=Wu)=>t===void 0?e:{fetch:(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const i=new Headers(n==null?void 0:n.headers);return i.set("x-inploi-widget-version",t),e.fetch(r,{...n,headers:Object.fromEntries(i.entries())})}};class ss extends sc{}const Gu=({_internal_domManager:e=Lu(),theme:t,terms:r,feedback:n,jobAlerts:i})=>ac(({apiClient:a,rpcClient:o,logger:s,analytics:l,publishableKey:d,env:f})=>{let u=!1,g=0;const h=Ku(a),v=d&&f?$c({environment:f,publishableKey:d,logger:s}):void 0,w=E=>E===g,k=()=>{if(typeof window>"u")return;g++,Oe.flushStateData().catch(()=>{}),j.cancelCurrentFlow(),ne.isBotTyping$.value=!1;const E=e.getChatbotElement();E&&(It(null,E),E.remove()),u=!1,s.info("Chatbot plugin destroyed")},C=()=>{if(typeof window>"u")return;const E=g,x=[je("style",{id:"inploi-chatbot-styles"},Fu),je("style",{id:"inploi-chatbot-theme"},qu(t))],$=e.getOrCreateChatbotElement();ne.themeMode$.value=t.mode;const L=Me(!1);if(It(je(ae,{},[x,je(Tu,{env:f,rpcClient:o,apiClient:h,logger:s,analytics:l,talentBankClient:v,params:{theme:t,terms:r,feedback:n},feedbackReady:L})]),$),n){const B=O=>{var V,U;if(!w(E))return;const D=(V=e.getChatbotElement())==null?void 0:V.querySelector("dialog");D&&Yu({instance:O({rpcClient:o,apiClient:a,logger:s,analytics:l}),theme:t,terms:((U=n.params)==null?void 0:U.terms)??{},host:D}).then(()=>void(L.value=!0),M=>s.error("Error rendering feedback plugin",M))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:O})=>{B(O())}).catch(O=>{s.error("Error preparing feedback plugin",O)}):B(n.plugin)}u=!0},_=async(E,x)=>{if(!w(x))return;Xl({context:In(E.jobContext,E.context||{}),schema:E.flow.context_schema,logger:s});const $=await j.prepareFlow({...E,jobAlerts:E.jobAlerts??i});w(x)&&j.commitFlow($)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(u)return;C(),s.info("Chatbot plugin prepared")}catch(E){s.error("Error preparing chatbot plugin",E)}},fetchFlowByJobId:async(E,x)=>{const $=(x==null?void 0:x.idType)==="inploi"?"internal":"external";return o.request(Hc,{params:{id:E},searchParams:{id_type:$}}).catch(L=>{throw go({name:"ApiError",message:Tt.string,status:410,data:Tt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},L)?new ss(L.message,L.status,L.data):L}).then(L=>({flow:L.flow,title:L.job.title,flowKeys:[L.job.id,...(x==null?void 0:x.flowKeys)??[]],job:Uc(L,{id:E,idType:$}),employer:L.company.name,...x,jobContext:L.context,context:{user:L.user,...x==null?void 0:x.context}}))},fetchFlowById:async(E,x)=>o.request(qc,{params:{id:E}}).then($=>{var L;return{flow:$.flow,title:"Chatbot",flowKeys:(x==null?void 0:x.flowKeys)??[],...x,analytics:{customProperties:{flow_id:$.flow.id,flow_version:$.flow.version,...(L=x==null?void 0:x.analytics)==null?void 0:L.customProperties}}}}),open:async E=>{if(!(typeof window>"u"))try{j.cancelCurrentFlow(),j.viewState$.value="maximised",u||C();const x=g;E instanceof Promise?(j.current$.value={state:"loading"},E.then($=>_($,x)).catch($=>{w(x)&&(s.error("Error loading flow",$),j.current$.value={state:$ instanceof ss?"closed":"error"})})):await _(E,x)}catch(x){s.error("Error starting flow",x)}},hasApplicationInProgress:async E=>{const x=await Oe.getStateData(E.flow,E.flowKeys,E.context??{});return x!==void 0&&Jo({data:x,nodes:E.flow.nodes})},hasAnyApplicationInProgress:async()=>(await Oe.getAllStateData()).some(E=>Jo({data:E,nodes:[]})),close:async()=>{typeof window>"u"||(j.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:k}});function Yu({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=Gu;var Zu="9.12.0",ls=`https://sdk.inploi.com/@inploi/flows@${Zu}/cdn/captcha/index.html`,Ju=new URL(ls).origin,cs=3e4,Xu=5*6e4,Qu=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",ki=new WeakMap,ef=e=>{let t=ki.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 ki.delete(e),r}),ki.set(e,t)),t},tf=(e,t={})=>new Promise((r,n)=>{let{signal:i,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,d=()=>{},f=w=>{l||(l=!0,clearTimeout(h),i==null||i.removeEventListener("abort",g),d(),w())},u=w=>f(()=>n(new Error(w))),g=()=>u("Captcha aborted"),h,v=w=>{clearTimeout(h),h=setTimeout(()=>u("Captcha timed out"),w)};if(v(cs),i==null?void 0:i.aborted)return g();i==null||i.addEventListener("abort",g),(async()=>{let w=await ef(e);if(w===void 0)return f(()=>r(void 0));if(l)return;let k=document.createElement("iframe");k.src=`${ls}?${new URLSearchParams({sitekey:w,origin:window.location.origin,...o&&{theme:o}}).toString()}`,k.title="Cloudflare security check",k.style.cssText=`display:block;border:0;width:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(k):(k.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(k));let C=!1,_=E=>{if(!k.contentWindow||E.source!==k.contentWindow||E.origin!==Ju||!Qu(E.data))return;let x=E.data;switch(x.type){case"token":return f(()=>r(x.token));case"resize":k.style.height=`${Math.max(0,Math.ceil(x.height))}px`;return;case"before-interactive":return C=!0,v(Xu),s==null?void 0:s();case"after-interactive":return C=!1,v(cs);case"error":!C&&!x.interactive&&u("Captcha failed");return;case"expired":return u("Captcha expired");case"timeout":return u("Captcha timed out")}};window.addEventListener("message",_),d=()=>{window.removeEventListener("message",_),k.remove()}})().catch(w=>f(()=>n(w)))}),ds=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[i,...a]=e.compareKey.split(".");if(!i)return!1;let o=oa({context:t,key:i,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=ur(o.value,a);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=ur(o.value,a),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return kr(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return kr(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return kr(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(d=>typeof d=="string")?kr(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"?jr(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}},kr=(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 i of n)if(ds({condition:i,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let i of n)if(!ds({condition:i,context:t,submissions:r,ifBlock:e}))return!1;return!0}},rf=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,nf=(e,{context:t,submissions:r})=>e.replace(rf,(n,i,a="")=>{let[o,...s]=i.trim().split("."),l=oa({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Rt(d.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return jr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let d=ur(l.value,s);switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(f=>typeof f=="string"))return d.join(", ")}break}}return a});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function af(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Si(e,t,r=""){const n=af(e),i=e==null?void 0:e.length,a=t!==void 0;if(!n||a&&i!==t){const o=r&&`"${r}" `,s=a?` of length ${t}`:"",l=n?`length=${i}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function us(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 of(e,t){Si(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 Ci(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ei(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ye(e,t){return e<<32-t|e>>>t}const sf=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),lf=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function cf(e){if(Si(e),sf)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=lf[e[r]];return t}function df(e,t={}){const r=(i,a)=>e(a).update(i).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=i=>e(i),Object.assign(r,t),Object.freeze(r)}const uf=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function ff(e,t,r){return e&t^~e&r}function pf(e,t,r){return e&t^e&r^t&r}class hf{constructor(t,r,n,i){pe(this,"blockLen");pe(this,"outputLen");pe(this,"padOffset");pe(this,"isLE");pe(this,"buffer");pe(this,"view");pe(this,"finished",!1);pe(this,"length",0);pe(this,"pos",0);pe(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(t),this.view=Ei(this.buffer)}update(t){us(this),Si(t);const{view:r,buffer:n,blockLen:i}=this,a=t.length;for(let o=0;o<a;){const s=Math.min(i-this.pos,a-o);if(s===i){const l=Ei(t);for(;i<=a-o;o+=i)this.process(l,o);continue}n.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){us(this),of(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:a}=this;let{pos:o}=this;r[o++]=128,Ci(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let u=o;u<i;u++)r[u]=0;n.setBigUint64(i-8,BigInt(this.length*8),a),this.process(n,0);const s=Ei(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const d=l/4,f=this.get();if(d>f.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<d;u++)s.setUint32(4*u,f[u],a)}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:i,finished:a,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=a,t.length=i,t.pos=s,i%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const yt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),gf=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 bf extends hf{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:r,C:n,D:i,E:a,F:o,G:s,H:l}=this;return[t,r,n,i,a,o,s,l]}set(t,r,n,i,a,o,s,l){this.A=t|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|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)_t[u]=t.getUint32(r,!1);for(let u=16;u<64;u++){const g=_t[u-15],h=_t[u-2],v=Ye(g,7)^Ye(g,18)^g>>>3,w=Ye(h,17)^Ye(h,19)^h>>>10;_t[u]=w+_t[u-7]+v+_t[u-16]|0}let{A:n,B:i,C:a,D:o,E:s,F:l,G:d,H:f}=this;for(let u=0;u<64;u++){const g=Ye(s,6)^Ye(s,11)^Ye(s,25),h=f+g+ff(s,l,d)+gf[u]+_t[u]|0,w=(Ye(n,2)^Ye(n,13)^Ye(n,22))+pf(n,i,a)|0;f=d,d=l,l=s,s=o+h|0,o=a,a=i,i=n,n=h+w|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,d=d+this.G|0,f=f+this.H|0,this.set(n,i,a,o,s,l,d,f)}roundClean(){Ci(_t)}destroy(){this.set(0,0,0,0,0,0,0,0),Ci(this.buffer)}}class vf extends bf{constructor(){super(32);pe(this,"A",yt[0]|0);pe(this,"B",yt[1]|0);pe(this,"C",yt[2]|0);pe(this,"D",yt[3]|0);pe(this,"E",yt[4]|0);pe(this,"F",yt[5]|0);pe(this,"G",yt[6]|0);pe(this,"H",yt[7]|0)}}const wf=df(()=>new vf,uf(1));var fs=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},$i=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(i=>i.id===n.groupId&&i.type.startsWith("question-"))&&(n.type==="system"||"author"in n&&n.author==="user")))==null?void 0:r.groupId},Ii=e=>Array.isArray(e)?e.map(Ii):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,Ii(r)])):typeof e=="function"?void 0:e,mf=e=>cf(wf(new TextEncoder().encode(JSON.stringify(Ii(e)))));function yf(e,t,r,n){var i;if(n!=null&&n.aborted)return;let a=mf(r),o=(i=e.data).preApplyFingerprints??(i.preApplyFingerprints=[]);if(o.includes(a))return;o.push(a);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(r)}).catch(()=>{let d=o.indexOf(a);d!==-1&&o.splice(d,1)}).finally(()=>{clearTimeout(l)})}var ps=({context:e,submissions:t})=>({context:e,submissions:t??{}}),ze=(e,t)=>nf(e,ps(t)),_f=(e,t)=>kr(e,ps(t)),hs=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;let n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return hs({node:n,nodes:t,stopWhen:r})},xf=({childNode:e,nodes:t})=>{let r=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;let i=t.find(o=>o.id===n.branchId);if(!i)return!1;let a=hs({node:i,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(r!=null&&r.nextId)return t.find(n=>n.id===r.nextId)},kf=3,Sf=({flow:e,analytics:t,logger:r,talentBankClient:n,context:i,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:d,persistWriteBarrier:f,onSubmitNetworkError:u,closedRoleBehaviour:g,settledOutcomes:h=g,dateEchoLocale:v,onFlowEnd:w,onInterpret:k,forceSubmitConfirmation:C,flowType:_,t:E})=>{var x;let $=new AbortController,L={submitAccepted:!1};(x=e.data).startedWriteNodeIds??(x.startedWriteNodeIds=e.nodes.flatMap(D=>{var U,M;if(D.type!=="integration-application-submit"||!e.data.nodeHistory.includes(D.id))return[];let V=D.data.key?(U=o())==null?void 0:U[D.data.key]:void 0;return(V==null?void 0:V.type)==="integration"&&((M=ca(V.value))==null?void 0:M.verdict)==="not_submitted"?[]:[D.id]}));let B={...t.service,log:D=>t.service.log({...D,customProperties:{...D.customProperties,...t.customProperties}})},O=async(D,V)=>{let U=$.signal;if(U.aborted)return;let M=o(),P=s(),W=(P==null?void 0:P.submitNodeId)===D.id?e.nodes.find(R=>{var X;return R.id===P.fileQuestionNodeId&&R.type==="question-file"&&((X=M==null?void 0:M[R.data.key])==null?void 0:X.type)!=="file"}):void 0;if(W)return O(W,V);k==null||k(D,V);try{await Cf({flow:e,analytics:B,logger:r,talentBankClient:n,apiClient:a,context:i,node:D,submissions:M,applicationRecovery:P,setApplicationRecovery:async R=>{if(!U.aborted)try{await l(R)}catch(X){r.error("Failed to persist application recovery",X)}},forceSubmitConfirmation:C||(P==null?void 0:P.submitNodeId)===D.id,run:L,persistWriteBarrier:f,onSubmitNetworkError:u,settledOutcomes:h,dateEchoLocale:v,flowType:_,signal:U,t:E,chat:{sendMessage:async R=>d.send({groupId:D.id,message:R,signal:U}),userInput:async R=>d.input({input:R,signal:U}),setSubmission:(R,X)=>{U.aborted||d.setSubmission(R,X)},captcha:d.captcha},next:R=>{if(U.aborted)return;let X=(P==null?void 0:P.fileQuestionNodeId)===D.id?P.submitNodeId:R,G=X?e.nodes.find(ve=>ve.id===X):xf({childNode:D,nodes:e.nodes});return G?O(G,D):w==null?void 0:w(D)},end:()=>{U.aborted||(w==null||w(D))}})}catch(R){if(R instanceof ft)return;throw R}};return{interpret:async D=>{let V=e.nodes.find(U=>U.id===D)??fs(e.nodes);return O(V)},undo:D=>{var X;if(delete e.data.reviewReplay,((X=e.data.startedWriteNodeIds)==null?void 0:X.length)||e.data.isFinished)return{removed:0};let V=$i(e),U=V?D.lastIndexOf(V):-1,M=e.nodes.find(G=>G.id===V);if(U===-1||!M)return{removed:0};let P=e.nodes.find(G=>G.id===D[D.length-1]);$.abort();let W=D.splice(U);e.data.messages=e.data.messages.filter(G=>!G.groupId||!W.includes(G.groupId)),e.data.currentInput=null;let R=o();for(let G of W.slice(1)){let ve=e.nodes.find(fe=>fe.id===G);if(!(!ve||!R||ve.id===V)&&("key"in ve.data&&ve.data.key&&delete R[ve.data.key],"keys"in ve.data))for(let fe of Object.values(ve.data.keys))typeof fe=="string"&&delete R[fe]}return $=new AbortController,O(M,P),{removed:W.length}},abort:()=>{$.abort()}}};async function Cf(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 Zf({...e,node:t});case"text":return Rf({...e,node:t});case"image":return Bf({...e,node:t});case"question-text":return zf({...e,node:t});case"question-enum":return qf({...e,node:t});case"question-number":return Uf({...e,node:t});case"question-phone":return Hf({...e,node:t});case"question-boolean":return Wf({...e,node:t});case"question-file":return Gf({...e,node:t});case"question-address":return Kf({...e,node:t});case"end-flow":return Yf({...e,node:t});case"if-block":return Vf({...e,node:t});case"jump":return If({...e,node:t});case"link":return Pf({...e,node:t});case"integration-application-submit":return jf({...e,node:t});case"add-submission":return Af({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return $f({...e,node:t});case"feedback":return Ef({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Ef({next:e,node:t}){e(t.nextId)}async function $f({next:e,node:t,talentBankClient:r,submissions:n,flow:i,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){let d=t.data.scope==="job"?(l=i.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||d!=null)try{s=await r.checkDuplicate({email:Tl({key:t.data.email,submissions:n}).toString(),jobId:d,scope:t.data.scope})}catch(f){a.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function If({next:e,node:t}){e(t.data.targetId)}async function Af({next:e,node:t,logger:r,submissions:n,context:i}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:ze(t.data.value,{submissions:n,context:i})},e(t.nextId)}var Tf=5e3,Df=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Ff=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?ua:e.throttles?$n:da)),Lf=(e,t,r)=>{let{waitMs:n,throttles:i,maintenance:a}=Ul(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...i!==void 0&&{throttles:i},...a&&{maintenance:a}}},Nf=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Ai=e=>e instanceof Error&&Nf.includes(e.name)?e:void 0,gs=e=>{let t=Ai(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function jf({chat:e,next:t,end:r,node:n,logger:i,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:d,setApplicationRecovery:f,forceSubmitConfirmation:u,flowType:g,run:h,persistWriteBarrier:v,signal:w,onSubmitNetworkError:k,settledOutcomes:C,t:_}){var O,D;let E=async({redirect_url:V,message:U,button_text:M})=>{let{anonymous_id:P,session_id:W}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:U??_("submission_redirect_message")});try{let R=new URL(V);P&&!R.searchParams.has("anonymous_id")&&R.searchParams.set("anonymous_id",P),await e.sendMessage({type:"link",href:R.toString(),text:M??_("complete_submission"),onClick:()=>{if(!W){i.error("session_id not set, cannot log FLOW_REDIRECT event");return}s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:W,flow_version:l.version,href:R.toString(),job:l.job}})}})}catch(R){i.error(`Invalid redirect URL: ${V}`,R),e.sendMessage({type:"system",variant:"error",text:_("redirect_url_error")})}};if((O=l.data.startedWriteNodeIds)!=null&&O.includes(n.id)&&(d==null?void 0:d.submitNodeId)!==n.id){let V=(D=l.data.submitRedirects)==null?void 0:D[n.id];return V?(await E(V),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:_("submission_unknown")}),r())}let x=Df(n.id,l.job),$=0,L=h.submitAccepted&&n.data.skipConfirmation===!0&&(d==null?void 0:d.submitNodeId)!==n.id,B=async V=>{var Fr,pn,hn,Gi,Lr,p,b,m,I;let U=((Fr=l.data.submitCooldown)==null?void 0:Fr.key)===x?l.data.submitCooldown:void 0;U&&(U.until=Ff(U));let M=U==null?void 0:U.until;(l.data.reviewRequiresSend===!0&&!L||V!==!0||M!==void 0&&M>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:n.data.submitLabel,...M!==void 0&&{availableAt:M}}}),L=!1;let P;if(n.data.captcha){let y=e.captcha,S=!0;try{P=await tf(a,{signal:w,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(()=>{S&&(y==null||y.reveal(!0))})}})}catch(N){if(i.error("Captcha check failed",N),w.aborted)return}finally{S=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:_("submitting")});let{anonymous_id:W,session_id:R}=s.getSessionInfo();if(w.aborted)return;let X=((pn=l.data.startedWriteNodeIds)==null?void 0:pn.includes(n.id))===!0;if((d==null?void 0:d.submitNodeId)===n.id&&await f(void 0),X||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],n.id]),await v().catch(y=>i.error("Failed to persist application write barrier",y)),w.aborted)return;let G,ve=setTimeout(()=>{G=e.sendMessage({type:"loading",semantic:"submission-still-working",text:_("submission_still_working")}).catch(y=>i.error("Failed to send submission progress message",y))},Tf),fe,Q=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:n.data.integrationId,anonymous_id:W,session_id:R,job:l.job,flow_build:l.build,...P!==void 0&&{captcha_token:P},submissions:Il(l.nodes,Al(o||{},n.data.submitKeys)),pre_apply:Sn(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{fe=y;let S=gs(y);return(S==null?void 0:S.data)!==void 0?S.data:y});if(clearTimeout(ve),await G,w.aborted)return;if(fe!==void 0&&!Ai(fe)&&k)return await k(fe,w),B(!0);l.data.stagingDestination=Pl(Q),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:Q});let Tr=(hn=gs(fe))==null?void 0:hn.status,nr=typeof Tr=="number"?Tr:void 0,z=ca(Q,nr),ir=z===void 0&&nr===429,ar=C==="terminal"&&((z==null?void 0:z.outcome)==="closed"||(z==null?void 0:z.outcome)==="duplicate"),St=l.data.failedAttemptAt,Mt=St==null?void 0:St[x];St&&Mt!==void 0&&Mt>Date.now()&&(Mt=St[x]=Date.now());let or=Mt!==void 0&&Date.now()-Mt<Bl||((Gi=l.data.unconfirmedAttemptKeys)==null?void 0:Gi.includes(x))===!0,Dr=(Lr=Ai(fe))==null?void 0:Lr.status,ut=Gl(Q,typeof Dr=="number"?Dr:void 0);ut&&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:ut.service,response:ut.response,captured:(Q==null?void 0:Q.captured)===!0,flow_type:(g==null?void 0:g())??"CHATBOT_DRAWER",job:l.job,...(z==null?void 0:z.outcome)==="duplicate"&&{outcome:or?"duplicate_after_own_attempt":"duplicate"},...ut.outcome&&{outcome:ut.outcome}}});let sr=Cn(Q)||(Q==null?void 0:Q.success)===!0;if((sr||En(Q))&&(h.submitAccepted=!0),sr&&((p=l.data.submitCooldown)==null?void 0:p.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await v().catch(y=>i.error("Failed to persist submit cooldown reset",y))),Cn(Q)){let{redirect_url:y,message:S,button_text:N}=Q.integration_response.data,q={redirect_url:y,message:S,button_text:N};return w.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:q},await v().catch(K=>i.error("Failed to persist submit redirect",K)),await E(q),t(n.nextId))}let fn=En(Q);if(fn)return await e.sendMessage({type:"system",variant:"success",text:fn.message??_("submission_pending")}),t(n.nextId);if((Q==null?void 0:Q.success)===!0)return n.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:_("submission_completed")}),t(n.nextId);let lr=Kl(z),cr=lr!==void 0&&((b=o==null?void 0:o[lr])==null?void 0:b.type)==="file"?lr:void 0,Ot=cr===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===cr);if(!Ot&&!ar&&!ha(z)&&(l.data.submitCooldown=Lf(x,U,z)),(z==null?void 0:z.outcome)!=="duplicate"&&!ir&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[x]:Date.now()},(m=l.data.unconfirmedAttemptKeys)!=null&&m.includes(x)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==x))),(z==null?void 0:z.verdict)==="not_submitted"||(z==null?void 0:z.outcome)==="duplicate"||(z==null?void 0:z.outcome)==="closed"||ir||Ml(Q,nr)?(X||(l.data.startedWriteNodeIds=(I=l.data.startedWriteNodeIds)==null?void 0:I.filter(y=>y!==n.id)),(d==null?void 0:d.submitNodeId)===n.id&&await f(d),await v().catch(y=>i.error("Failed to persist application write barrier release",y))):await v().catch(y=>i.error("Failed to persist submit cooldown",y)),z){if(i.error(fe??z.message),Ot&&cr!==void 0)return e.setSubmission(cr,null),await f({fileQuestionNodeId:Ot.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:_("submission_unreadable_document")}),t(Ot.id);if(z.outcome==="duplicate")return await e.sendMessage({type:"system",variant:ar?"success":"info",semantic:"submission-duplicate",text:_(or?"submission_duplicate_earlier_attempt":"submission_duplicate")}),ar?(delete l.data.submitCooldown,r()):B(!1);if(z.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:_("submission_closed")}),ar?(delete l.data.submitCooldown,r()):B(!1);let y=zl(z);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?_("submission_provider_maintenance_later"):_("submission_provider_maintenance",{time:pa(y.until,void 0)})}),B(!1)):z.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:_(Wl(z)?"submission_unknown_do_not_resubmit":"submission_unknown")}),B(!1)):ha(z)?Hl(Q)?(await e.sendMessage({type:"text",author:"bot",text:z.message}),B(!1)):($===0&&await e.sendMessage({type:"system",variant:"warning",text:_("captcha_failed")}),$++,B($<=kf)):ql(z)?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())}return i.error(fe??Q),ir?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())};await B(u===!0&&!L?!1:n.data.skipConfirmation)}var Mf=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,Of=(e,t)=>{if(!Mf.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function Pf({chat:e,next:t,node:r,submissions:n,context:i,analytics:a,flow:o}){let s=ze(r.data.href,{submissions:n,context:i}),{flowSessionId:l}=o.data;await e.sendMessage({type:"link",href:s,text:ze(r.data.cta,{submissions:n,context:i}),...Of(r.data.href,s)&&{onClick:()=>{a.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 Vf({submissions:e,next:t,node:r,context:n}){t(_f(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Rf({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function Bf({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 zf({chat:e,next:t,node:r,submissions:n,context:i,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?jr(s.value):r.data.format==="date"&&o!==void 0?Zl(s.value,o):s.value}),t(r.nextId)}async function Uf({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Hf({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?jr(o.value):o.value}),t(r.nextId)}async function qf({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function Wf({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Kf({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});let i=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(i===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:n("skipped")});else{let a=Object.values(i.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function Gf({node:e,chat:t,next:r,submissions:n,context:i,t:a}){await t.sendMessage({author:"bot",type:"text",text:ze(e.data.question,{submissions:n,context:i})});let o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function Yf({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function Zf({node:e,flow:t,submissions:r,chat:n,next:i,apiClient:a,analytics:o,signal:s,context:l}){let d=$l(t.nodes,r||{}),{answers:f,...u}=d;if(n.setSubmission(e.data.key,{type:"integration",value:u}),yf(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:Sn(t.nodes,r||{},t.data.flowSessionId)},s),d.status!=="skipped"){let g=[d.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":d.hasHardConcerns?e.data.messages.hard:d.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let h of["hard","advisory"]){let v=f.filter(w=>!w.matched&&w.severity===h);v.length&&g.push((h==="hard"?"Role requirements":"Other things to consider")+`
|
|
6
|
-
`+
|
|
7
|
-
`))}await n.sendMessage({type:"text",author:"bot",text:
|
|
34
|
+
}`};class Ts extends ad{}const tp=({_internal_domManager:e=zf(),theme:t,terms:r,feedback:n,jobAlerts:i})=>nd(({apiClient:a,rpcClient:o,logger:s,analytics:l,publishableKey:c,env:f})=>{let d=!1,b=0;Pf(f,c);const p=Vf(Ff(a));let g=0;const v=new WeakMap,x=(A,S)=>{const k=++g,$=performance.now();return S.catch(F=>{throw typeof F=="object"&&F!==null&&v.set(F,{endpoint:A,attempt:k,elapsed_ms:Math.round(performance.now()-$)}),F})},C=(A,S)=>{const k=Cs(A);k===404||k===410||Zt("fatal","application_unavailable",{phase:"flow",stage:S,error:Si(A),http_status:k,...S==="flow_fetch"&&typeof A=="object"&&A!==null&&v.get(A)})},_=c&&f?Ed({environment:f,publishableKey:c,logger:s}):void 0,M=A=>A===b,D=()=>{if(typeof window>"u")return;b++,Fe.flushStateData().catch(()=>{}),R.cancelCurrentFlow(),ne.isBotTyping$.value=!1;const A=e.getChatbotElement();A&&(Tt(null,A),A.remove()),d=!1,s.info("Chatbot plugin destroyed")},j=()=>{if(typeof window>"u")return;const A=b,S=[Oe("style",{id:"inploi-chatbot-styles"},Bf),Oe("style",{id:"inploi-chatbot-theme"},ep(t))],k=e.getOrCreateChatbotElement();ne.themeMode$.value=t.mode;const $=Le(!1);if(Tt(Oe(ae,{},[S,Oe(Of,{env:f,rpcClient:o,apiClient:p,logger:s,analytics:l,talentBankClient:_,params:{theme:t,terms:r,feedback:n},feedbackReady:$})]),k),n){const F=I=>{var q,B;if(!M(A))return;const V=(q=e.getChatbotElement())==null?void 0:q.querySelector("dialog");V&&rp({instance:I({rpcClient:o,apiClient:a,logger:s,analytics:l}),theme:t,terms:((B=n.params)==null?void 0:B.terms)??{},host:V}).then(()=>void($.value=!0),G=>s.error("Error rendering feedback plugin",G))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:I})=>{F(I())}).catch(I=>{s.error("Error preparing feedback plugin",I)}):F(n.plugin)}d=!0},z=async(A,S)=>{if(!M(S))return;Hc({context:Ln(A.jobContext,A.context||{}),schema:A.flow.context_schema,logger:s});const k=await R.prepareFlow({...A,jobAlerts:A.jobAlerts??i});M(S)&&R.commitFlow(k)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(d)return;j(),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(Pd,{params:{id:A},searchParams:{id_type:k}})).catch($=>{throw Io({name:"ApiError",message:Dt.string,status:410,data:Dt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},$)?new Ts($.message,$.status,$.data):$}).then($=>({flow:$.flow,title:$.job.title,flowKeys:[$.job.id,...(S==null?void 0:S.flowKeys)??[]],job:Rd($,{id:A,idType:k}),employer:$.company.name,...S,jobContext:$.context,context:{user:$.user,...S==null?void 0:S.context}}))},fetchFlowById:async(A,S)=>x("flow_by_id",o.request(Vd,{params:{id:A}})).then(k=>{var $;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,...($=S==null?void 0:S.analytics)==null?void 0:$.customProperties}}}}),open:async A=>{if(typeof window>"u")return;const S=performance.now();try{R.cancelCurrentFlow(),R.viewState$.value="maximised",d||j()}catch($){s.error("Error starting flow",$),Zt("boot_failed",Rr($),{phase:"config",error:Si($),elapsed_ms:Math.round(performance.now()-S)});return}Zt("boot");const k=b;if(A instanceof Promise){R.current$.value={state:"loading"};const $=F=>I=>{M(k)&&(s.error("Error loading flow",I),R.current$.value={state:I instanceof Ts?"closed":"error"},C(I,F))};A.then(F=>z(F,k).catch($("create")),$("flow_fetch"))}else await z(A,k).catch($=>{s.error("Error starting flow",$),C($,"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"||(R.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:D}});function rp({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=tp;const np=Object.freeze(Object.defineProperty({__proto__:null,jobCountryCodes:Jc},Symbol.toStringTag,{value:"Module"}));var ip="https://maps.inploi.com",ap=(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},ji=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),op=e=>{if(!ji(e)||typeof e.label!="string"||!ji(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}},sp=async(e,t,r)=>{const n=await fetch(e.href,{signal:r});if(!n.ok)return;const i=n.headers.get("X-Geo-Arm"),a=await n.json();if(i!=="inploi"&&i!=="mapbox"||!ji(a)||!Array.isArray(a.results)||a.source!=="photon"&&a.source!=="mapbox"&&a.source!=="places"||typeof a.attribution!="string")return;const o=[];for(const s of a.results){const l=t(s);if(l===void 0)return;o.push(l)}return{results:o,arm:i,source:a.source}},lp=e=>{const t=ap("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))),sp(t,op,e.signal)};const cp=Object.freeze(Object.defineProperty({__proto__:null,lookupAddress:lp},Symbol.toStringTag,{value:"Module"}));var dp="9.13.0",js=`https://sdk.inploi.com/@inploi/flows@${dp}/cdn/captcha/index.html`,up=new URL(js).origin,Ds=3e4,fp=5*6e4,pp=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",Di=new WeakMap,hp=e=>{let t=Di.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 Di.delete(e),r}),Di.set(e,t)),t},bp=(e,t={})=>new Promise((r,n)=>{let{signal:i,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,c=()=>{},f=v=>{l||(l=!0,clearTimeout(p),i==null||i.removeEventListener("abort",b),c(),v())},d=v=>f(()=>n(new Error(v))),b=()=>d("Captcha aborted"),p,g=v=>{clearTimeout(p),p=setTimeout(()=>d("Captcha timed out"),v)};if(g(Ds),i==null?void 0:i.aborted)return b();i==null||i.addEventListener("abort",b),(async()=>{let v=await hp(e);if(v===void 0)return f(()=>r(void 0));if(l)return;let x=document.createElement("iframe");x.src=`${js}?${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:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.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!==up||!pp(M.data))return;let D=M.data;switch(D.type){case"token":return f(()=>r(D.token));case"resize":x.style.height=`${Math.max(0,Math.ceil(D.height))}px`;return;case"before-interactive":return C=!0,g(fp),s==null?void 0:s();case"after-interactive":return C=!1,g(Ds);case"error":!C&&!D.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("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[i,...a]=e.compareKey.split(".");if(!i)return!1;let o=ya({context:t,key:i,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=pr(o.value,a);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=pr(o.value,a),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"?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}},$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 i of n)if(Ms({condition:i,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let i of n)if(!Ms({condition:i,context:t,submissions:r,ifBlock:e}))return!1;return!0}},gp=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,mp=(e,{context:t,submissions:r})=>e.replace(gp,(n,i,a="")=>{let[o,...s]=i.trim().split("."),l=ya({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(c=>`${c.name} (${zt(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():a;case"phone":return Vr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=pr(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 a});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function vp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Mi(e,t,r=""){const n=vp(e),i=e==null?void 0:e.length,a=t!==void 0;if(!n||a&&i!==t){const o=r&&`"${r}" `,s=a?` of length ${t}`:"",l=n?`length=${i}`:`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 wp(e,t){Mi(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 Oi(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Li(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ge(e,t){return e<<32-t|e>>>t}const yp=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),_p=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function xp(e){if(Mi(e),yp)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=_p[e[r]];return t}function kp(e,t={}){const r=(i,a)=>e(a).update(i).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=i=>e(i),Object.assign(r,t),Object.freeze(r)}const Sp=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 Ep(e,t,r){return e&t^e&r^t&r}class $p{constructor(t,r,n,i){pe(this,"blockLen");pe(this,"outputLen");pe(this,"padOffset");pe(this,"isLE");pe(this,"buffer");pe(this,"view");pe(this,"finished",!1);pe(this,"length",0);pe(this,"pos",0);pe(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(t),this.view=Li(this.buffer)}update(t){Os(this),Mi(t);const{view:r,buffer:n,blockLen:i}=this,a=t.length;for(let o=0;o<a;){const s=Math.min(i-this.pos,a-o);if(s===i){const l=Li(t);for(;i<=a-o;o+=i)this.process(l,o);continue}n.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Os(this),wp(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:a}=this;let{pos:o}=this;r[o++]=128,Oi(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;n.setBigUint64(i-8,BigInt(this.length*8),a),this.process(n,0);const s=Li(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],a)}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:i,finished:a,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=a,t.length=i,t.pos=s,i%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const yt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ap=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 Ip extends $p{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:r,C:n,D:i,E:a,F:o,G:s,H:l}=this;return[t,r,n,i,a,o,s,l]}set(t,r,n,i,a,o,s,l){this.A=t|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|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 b=_t[d-15],p=_t[d-2],g=Ge(b,7)^Ge(b,18)^b>>>3,v=Ge(p,17)^Ge(p,19)^p>>>10;_t[d]=v+_t[d-7]+g+_t[d-16]|0}let{A:n,B:i,C:a,D:o,E:s,F:l,G:c,H:f}=this;for(let d=0;d<64;d++){const b=Ge(s,6)^Ge(s,11)^Ge(s,25),p=f+b+Cp(s,l,c)+Ap[d]+_t[d]|0,v=(Ge(n,2)^Ge(n,13)^Ge(n,22))+Ep(n,i,a)|0;f=c,c=l,l=s,s=o+p|0,o=a,a=i,i=n,n=p+v|0}n=n+this.A|0,i=i+this.B|0,a=a+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,i,a,o,s,l,c,f)}roundClean(){Oi(_t)}destroy(){this.set(0,0,0,0,0,0,0,0),Oi(this.buffer)}}class Tp extends Ip{constructor(){super(32);pe(this,"A",yt[0]|0);pe(this,"B",yt[1]|0);pe(this,"C",yt[2]|0);pe(this,"D",yt[3]|0);pe(this,"E",yt[4]|0);pe(this,"F",yt[5]|0);pe(this,"G",yt[6]|0);pe(this,"H",yt[7]|0)}}const jp=kp(()=>new Tp,Sp(1));var Ls=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Fi=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(i=>i.id===n.groupId&&i.type.startsWith("question-"))&&(n.type==="system"||"author"in n&&n.author==="user")))==null?void 0:r.groupId},Ni=e=>Array.isArray(e)?e.map(Ni):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,Ni(r)])):typeof e=="function"?void 0:e,Dp=e=>xp(jp(new TextEncoder().encode(JSON.stringify(Ni(e)))));function Mp(e,t,r,n){var i;if(n!=null&&n.aborted)return;let a=Dp(r),o=(i=e.data).preApplyFingerprints??(i.preApplyFingerprints=[]);if(o.includes(a))return;o.push(a);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(r)}).catch(()=>{let c=o.indexOf(a);c!==-1&&o.splice(c,1)}).finally(()=>{clearTimeout(l)})}var Fs=({context:e,submissions:t})=>({context:e,submissions:t??{}}),ze=(e,t)=>mp(e,Fs(t)),Op=(e,t)=>$r(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(i=>i.id===e.nextId):void 0;if(n)return Ns({node:n,nodes:t,stopWhen:r})},Lp=({childNode:e,nodes:t})=>{let r=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;let i=t.find(o=>o.id===n.branchId);if(!i)return!1;let a=Ns({node:i,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(r!=null&&r.nextId)return t.find(n=>n.id===r.nextId)},Fp=3,Np=({flow:e,analytics:t,logger:r,talentBankClient:n,context:i,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:f,onSubmitNetworkError:d,closedRoleBehaviour:b,settledOutcomes:p=b,dateEchoLocale:g,onFlowEnd:v,onInterpret:x,forceSubmitConfirmation:C,flowType:_,t:M})=>{var D;let j=new AbortController,z={submitAccepted:!1};(D=e.data).startedWriteNodeIds??(D.startedWriteNodeIds=e.nodes.flatMap(k=>{var F,I;if(k.type!=="integration-application-submit"||!e.data.nodeHistory.includes(k.id))return[];let $=k.data.key?(F=o())==null?void 0:F[k.data.key]:void 0;return($==null?void 0:$.type)==="integration"&&((I=ka($.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,$)=>{let F=j.signal;if(F.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,$);x==null||x(k,$);try{await Rp({flow:e,analytics:A,logger:r,talentBankClient:n,apiClient:a,context:i,node:k,submissions:I,applicationRecovery:V,setApplicationRecovery:async B=>{if(!F.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:d,settledOutcomes:p,dateEchoLocale:g,flowType:_,signal:F,t:M,chat:{sendMessage:async B=>c.send({groupId:k.id,message:B,signal:F}),userInput:async B=>c.input({input:B,signal:F}),setSubmission:(B,G)=>{F.aborted||c.setSubmission(B,G)},captcha:c.captcha},next:B=>{if(F.aborted)return;let G=(V==null?void 0:V.fileQuestionNodeId)===k.id?V.submitNodeId:B,Y=G?e.nodes.find(ve=>ve.id===G):Lp({childNode:k,nodes:e.nodes});return Y?S(Y,k):v==null?void 0:v(k)},end:()=>{F.aborted||(v==null||v(k))}})}catch(B){if(B instanceof ft)return;throw B}};return{interpret:async k=>{let $=e.nodes.find(F=>F.id===k)??Ls(e.nodes);return S($)},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 $=Fi(e),F=$?k.lastIndexOf($):-1,I=e.nodes.find(Y=>Y.id===$);if(F===-1||!I)return{removed:0};let V=e.nodes.find(Y=>Y.id===k[k.length-1]);j.abort();let q=k.splice(F);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 ve=e.nodes.find(fe=>fe.id===Y);if(!(!ve||!B||ve.id===$)&&("key"in ve.data&&ve.data.key&&delete B[ve.data.key],"keys"in ve.data))for(let fe of Object.values(ve.data.keys))typeof fe=="string"&&delete B[fe]}return j=new AbortController,S(I,V),{removed:q.length}},abort:()=>{j.abort()}}};async function Rp(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 ch({...e,node:t});case"text":return Qp({...e,node:t});case"image":return eh({...e,node:t});case"question-text":return th({...e,node:t});case"question-enum":return ih({...e,node:t});case"question-number":return rh({...e,node:t});case"question-phone":return nh({...e,node:t});case"question-boolean":return ah({...e,node:t});case"question-file":return sh({...e,node:t});case"question-address":return oh({...e,node:t});case"end-flow":return lh({...e,node:t});case"if-block":return Xp({...e,node:t});case"jump":return Bp({...e,node:t});case"link":return Zp({...e,node:t});case"integration-application-submit":return Gp({...e,node:t});case"add-submission":return zp({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Vp({...e,node:t});case"feedback":return Pp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Pp({next:e,node:t}){e(t.nextId)}async function Vp({next:e,node:t,talentBankClient:r,submissions:n,flow:i,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){let c=t.data.scope==="job"?(l=i.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||c!=null)try{s=await r.checkDuplicate({email:Sc({key:t.data.email,submissions:n}).toString(),jobId:c,scope:t.data.scope})}catch(f){a.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Bp({next:e,node:t}){e(t.data.targetId)}async function zp({next:e,node:t,logger:r,submissions:n,context:i}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:ze(t.data.value,{submissions:n,context:i})},e(t.nextId)}var Up=5e3,qp=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Wp=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?Ca:e.throttles?On:Sa)),Hp=(e,t,r)=>{let{waitMs:n,throttles:i,maintenance:a}=Nc(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...i!==void 0&&{throttles:i},...a&&{maintenance:a}}},Kp=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Ri=e=>e instanceof Error&&Kp.includes(e.name)?e:void 0,Rs=e=>{let t=Ri(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Gp({chat:e,next:t,end:r,node:n,logger:i,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:f,forceSubmitConfirmation:d,flowType:b,run:p,persistWriteBarrier:g,signal:v,onSubmitNetworkError:x,settledOutcomes:C,t:_}){var S,k;let M=async({redirect_url:$,message:F,button_text:I})=>{let{anonymous_id:V,session_id:q}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:F??_("submission_redirect_message")});try{let B=new URL($);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){i.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){i.error(`Invalid redirect URL: ${$}`,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 $=(k=l.data.submitRedirects)==null?void 0:k[n.id];return $?(await M($),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:_("submission_unknown")}),r())}let D=qp(n.id,l.job),j=0,z=p.submitAccepted&&n.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==n.id,A=async $=>{var Fr,wn,yn,na,Nr,h,m,w,T;let F=((Fr=l.data.submitCooldown)==null?void 0:Fr.key)===D?l.data.submitCooldown:void 0;F&&(F.until=Wp(F));let I=F==null?void 0:F.until;(l.data.reviewRequiresSend===!0&&!z||$!==!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,E=!0;try{V=await bp(a,{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(()=>{E&&(y==null||y.reveal(!0))})}})}catch(P){if(i.error("Captcha check failed",P),v.aborted)return}finally{E=!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=((wn=l.data.startedWriteNodeIds)==null?void 0:wn.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=>i.error("Failed to persist application write barrier",y)),v.aborted)return;let Y,ve=setTimeout(()=>{Y=e.sendMessage({type:"loading",semantic:"submission-still-working",text:_("submission_still_working")}).catch(y=>i.error("Failed to send submission progress message",y))},Up),fe,Q=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({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,kc(o||{},n.data.submitKeys)),pre_apply:jn(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{fe=y;let E=Rs(y);return(E==null?void 0:E.data)!==void 0?E.data:y});if(clearTimeout(ve),await Y,v.aborted)return;if(fe!==void 0&&!Ri(fe)&&x)return await x(fe,v),A(!0);l.data.stagingDestination=Dc(Q),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:Q});let Or=(yn=Rs(fe))==null?void 0:yn.status,ar=typeof Or=="number"?Or:void 0,U=ka(Q,ar),or=U===void 0&&ar===429,sr=C==="terminal"&&((U==null?void 0:U.outcome)==="closed"||(U==null?void 0:U.outcome)==="duplicate"),St=l.data.failedAttemptAt,Rt=St==null?void 0:St[D];St&&Rt!==void 0&&Rt>Date.now()&&(Rt=St[D]=Date.now());let lr=Rt!==void 0&&Date.now()-Rt<Lc||((na=l.data.unconfirmedAttemptKeys)==null?void 0:na.includes(D))===!0,Lr=(Nr=Ri(fe))==null?void 0:Nr.status,dt=zc(Q,typeof Lr=="number"?Lr:void 0);dt&&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:dt.service,response:dt.response,captured:(Q==null?void 0:Q.captured)===!0,flow_type:(b==null?void 0:b())??"CHATBOT_DRAWER",job:l.job,...(U==null?void 0:U.outcome)==="duplicate"&&{outcome:lr?"duplicate_after_own_attempt":"duplicate"},...dt.outcome&&{outcome:dt.outcome}}});let cr=Dn(Q)||(Q==null?void 0:Q.success)===!0;if((cr||Mn(Q))&&(p.submitAccepted=!0),cr&&((h=l.data.submitCooldown)==null?void 0:h.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(y=>i.error("Failed to persist submit cooldown reset",y))),Dn(Q)){let{redirect_url:y,message:E,button_text:P}=Q.integration_response.data,H={redirect_url:y,message:E,button_text:P};return v.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:H},await g().catch(K=>i.error("Failed to persist submit redirect",K)),await M(H),t(n.nextId))}let vn=Mn(Q);if(vn)return await e.sendMessage({type:"system",variant:"success",text:vn.message??_("submission_pending")}),t(n.nextId);if((Q==null?void 0:Q.success)===!0)return n.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:_("submission_completed")}),t(n.nextId);let dr=Bc(U),ur=dr!==void 0&&((m=o==null?void 0:o[dr])==null?void 0:m.type)==="file"?dr:void 0,Pt=ur===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===ur);if(!Pt&&!sr&&!Aa(U)&&(l.data.submitCooldown=Hp(D,F,U)),(U==null?void 0:U.outcome)!=="duplicate"&&!or&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[D]:Date.now()},(w=l.data.unconfirmedAttemptKeys)!=null&&w.includes(D)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==D))),(U==null?void 0:U.verdict)==="not_submitted"||(U==null?void 0:U.outcome)==="duplicate"||(U==null?void 0:U.outcome)==="closed"||or||Tc(Q,ar)?(G||(l.data.startedWriteNodeIds=(T=l.data.startedWriteNodeIds)==null?void 0:T.filter(y=>y!==n.id)),(c==null?void 0:c.submitNodeId)===n.id&&await f(c),await g().catch(y=>i.error("Failed to persist application write barrier release",y))):await g().catch(y=>i.error("Failed to persist submit cooldown",y)),U){if(i.error(fe??U.message),Pt&&ur!==void 0)return e.setSubmission(ur,null),await f({fileQuestionNodeId:Pt.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:_("submission_unreadable_document")}),t(Pt.id);if(U.outcome==="duplicate")return await e.sendMessage({type:"system",variant:sr?"success":"info",semantic:"submission-duplicate",text:_(lr?"submission_duplicate_earlier_attempt":"submission_duplicate")}),sr?(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")}),sr?(delete l.data.submitCooldown,r()):A(!1);let y=Fc(U);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?_("submission_provider_maintenance_later"):_("submission_provider_maintenance",{time:$a(y.until,void 0)})}),A(!1)):U.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:_(Vc(U)?"submission_unknown_do_not_resubmit":"submission_unknown")}),A(!1)):Aa(U)?Rc(Q)?(await e.sendMessage({type:"text",author:"bot",text:U.message}),A(!1)):(j===0&&await e.sendMessage({type:"system",variant:"warning",text:_("captcha_failed")}),j++,A(j<=Fp)):Pc(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 i.error(fe??Q),or?(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(d===!0&&!z?!1:n.data.skipConfirmation)}var Yp=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,Jp=(e,t)=>{if(!Yp.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function Zp({chat:e,next:t,node:r,submissions:n,context:i,analytics:a,flow:o}){let s=ze(r.data.href,{submissions:n,context:i}),{flowSessionId:l}=o.data;await e.sendMessage({type:"link",href:s,text:ze(r.data.cta,{submissions:n,context:i}),...Jp(r.data.href,s)&&{onClick:()=>{a.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 Xp({submissions:e,next:t,node:r,context:n}){t(Op(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Qp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function eh({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 th({chat:e,next:t,node:r,submissions:n,context:i,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Vr(s.value):r.data.format==="date"&&o!==void 0?qc(s.value,o):s.value}),t(r.nextId)}async function rh({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function nh({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("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:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function ah({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});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:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function oh({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});let i=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(i===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:n("skipped")});else{let a=Object.values(i.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function sh({node:e,chat:t,next:r,submissions:n,context:i,t:a}){await t.sendMessage({author:"bot",type:"text",text:ze(e.data.question,{submissions:n,context:i})});let o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function lh({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function ch({node:e,flow:t,submissions:r,chat:n,next:i,apiClient:a,analytics:o,signal:s,context:l}){let c=_c(t.nodes,r||{}),{answers:f,...d}=c;if(n.setSubmission(e.data.key,{type:"integration",value:d}),Mp(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:jn(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")+`
|
|
35
|
+
`+g.map(v=>`• ${v.message}`).join(`
|
|
36
|
+
`))}await n.sendMessage({type:"text",author:"bot",text:b.join(`
|
|
8
37
|
|
|
9
|
-
`)}),d.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:ze(e.data.continueLabel,{submissions:r,context:l})}})}return i(e.nextId)}const bs=(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})},Ti="resume-prompt",Jf=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:Ti,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 j.removeMessagesSentByNodeIds([Ti]),(n==null?void 0:n.value)!==!1},Nt=({class:e,...t})=>{const{t:r}=oe();return c("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:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var ot;function Di(e){return{lang:(e==null?void 0:e.lang)??(ot==null?void 0:ot.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(ot==null?void 0:ot.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(ot==null?void 0:ot.abortPipeEarly)}}var Fi;function Xf(e){return Fi==null?void 0:Fi.get(e)}var Li;function Qf(e){return Li==null?void 0:Li.get(e)}var Ni;function ep(e,t){var r;return(r=Ni==null?void 0:Ni.get(e))==null?void 0:r.get(t)}function Zt(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,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Zt(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},d=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??ep(e.reference,l.lang)??(d?Qf(l.lang):null)??n.message??Xf(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Ze(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Di())}}}function tp(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function rp(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function np(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}},ip=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function ws(e,t){return{kind:"validation",type:"check",reference:ws,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 ms(e){return{kind:"validation",type:"email",reference:ms,expects:null,async:!1,requirement:ip,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&ye(this,"email",t,r),t}}}function Sr(e,t){return{kind:"validation",type:"max_length",reference:Sr,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 ys(e,t){return{kind:"validation",type:"max_value",reference:ys,async:!1,expects:`<=${e instanceof Date?e.toJSON():Zt(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():Zt(r.value)}),r}}}function Jt(e,t){return{kind:"validation",type:"min_length",reference:Jt,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 _s(e,t){return{kind:"validation",type:"min_value",reference:_s,async:!1,expects:`>=${e instanceof Date?e.toJSON():Zt(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():Zt(r.value)}),r}}}function ji(e,t){return{kind:"validation",type:"regex",reference:ji,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 Mi(e){return{kind:"transformation",type:"transform",reference:Mi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function xs(e){return{kind:"validation",type:"url",reference:xs,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 ap(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function ks(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ss(e,t){return{kind:"schema",type:"array",reference:Ss,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ze(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const d={type:"array",origin:"value",input:i,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(d):f.path=[d],(a=r.issues)==null||a.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 Cs(e){return{kind:"schema",type:"boolean",reference:Cs,expects:"boolean",async:!1,message:e,get"~standard"(){return Ze(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:ye(this,"type",t,r),t}}}function Es(e){return{kind:"schema",type:"number",reference:Es,expects:"number",async:!1,message:e,get"~standard"(){return Ze(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ye(this,"type",t,r),t}}}function st(e,t){return{kind:"schema",type:"object",reference:st,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ze(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:ks(s),d=s["~run"]({value:l},n);if(d.issues){const f={type:"object",origin:"value",input:i,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(f):u.path=[f],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=ap(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:i,key:o,value:i[o]}]}),n.abortEarly))break}}else ye(this,"type",r,n);return r}}}function Xt(e,t){return{kind:"schema",type:"optional",reference:Xt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ze(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=ks(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function $s(e,t){return{kind:"schema",type:"picklist",reference:$s,expects:rp(e.map(Zt),"|"),async:!1,options:e,message:t,get"~standard"(){return Ze(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ye(this,"type",r,n),r}}}function Is(e,t,r){return{kind:"schema",type:"record",reference:Is,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Ze(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(tp(a,l)){const d=a[l],f=this.key["~run"]({value:l},i);if(f.issues){const g={type:"object",origin:"key",input:a,key:l,value:d};for(const h of f.issues)h.path=[g],(o=n.issues)==null||o.push(h);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:d},i);if(u.issues){const g={type:"object",origin:"value",input:a,key:l,value:d};for(const h of u.issues)h.path?h.path.unshift(g):h.path=[g],(s=n.issues)==null||s.push(h);if(n.issues||(n.issues=u.issues),i.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,i);return n}}}function Le(e){return{kind:"schema",type:"string",reference:Le,expects:"string",async:!1,message:e,get"~standard"(){return Ze(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:ye(this,"type",t,r),t}}}function As(e,t,r){const n=e["~run"]({value:t},Di(r));if(n.issues)throw new vs(n.issues);return n.value}function op(e,t){const r={};for(const n in e.entries)r[n]=!t||t.includes(n)?Xt(e.entries[n]):e.entries[n];return{...e,entries:r,get"~standard"(){return Ze(this)}}}function xt(...e){return{...e[0],pipe:e,get"~standard"(){return Ze(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 sp(e,t,r){const n=await e["~run"]({value:t},Di(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const Qt=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[c("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"break-words pr-1 text-sm",children:e.message})]}),lt=({class:e,...t})=>{const{t:r}=oe();return c("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:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Oi={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"},lp=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(Oi).find(n=>e.startsWith(n))??"",r=e.replace(t,"");return/^\d+$/.test(r)?{countryCode:t,phoneNumber:r}:{countryCode:"",phoneNumber:""}};const er=Dt("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}}),cp="https://api.mapbox.com/search/searchbox/v1/suggest",dp="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",up=e=>atob(e).split("").reverse().join(""),ct=st({name:Le()}),fp=st({suggestions:Ss(st({feature_type:Xt(Le()),full_address:Xt(Le()),place_formatted:Xt(Le()),name:Xt(Le()),mapbox_id:Le(),context:op(st({address:ct,street:ct,neighborhood:ct,locality:ct,district:ct,place:ct,region:ct,postcode:ct,country:ct}))}))}),pp=e=>(At(()=>{e&&Aa(e)},[e]),gt(()=>{var r;const t=(r=j.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,i)=>{var u;const a=new URL(cp);a.searchParams.set("q",n),a.searchParams.set("session_token",t);const o=e&&Aa(e);a.searchParams.set("limit","5");const s=(u=j.current$.peek().flow)==null?void 0:u.locationOrigin;return s&&s.lat!==void 0&&s.lng!==void 0&&s.lat>=-90&&s.lat<=90&&s.lng>=-180&&s.lng<=180&&a.searchParams.set("proximity",`${s.lng},${s.lat}`),a.searchParams.set("access_token",up(dp)),(await Rc(async g=>{const h=new URL(a);g&&h.searchParams.set("country",g);const v=await fetch(h.href,{signal:i});if(!v.ok)throw new Error(`Address lookup failed with ${v.status}`);return As(fp,await v.json()).suggestions},o,i)).map(g=>{var h,v,w,k,C,_,E,x,$;return{label:g.full_address??([g.name,g.place_formatted].filter(Boolean).join(", ")||g.mapbox_id),id:g.mapbox_id,address:{line1:((h=g.context.address)==null?void 0:h.name)??((v=g.context.street)==null?void 0:v.name),line2:void 0,line3:((w=g.context.neighborhood)==null?void 0:w.name)??((k=g.context.locality)==null?void 0:k.name),city:((C=g.context.place)==null?void 0:C.name)??((_=g.context.district)==null?void 0:_.name),state:(E=g.context.region)==null?void 0:E.name,postcode:((x=g.context.postcode)==null?void 0:x.name)??(g.feature_type==="postcode"?g.name:void 0),country:($=g.context.country)==null?void 0:$.name}}})}}:{enabled:!1}},[e])),Ts=e=>{const{t}=oe();return c("button",{type:"button",class:"touch-hitbox text-neutral-11 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},hp=({input:e,onSubmitSuccess:t,logger:r,rpcClient:n})=>{const{t:i}=oe(),[a,o]=Be(),{enabled:s,getPredictions:l}=pp(n),[d,f]=Be(s?"query":"manual"),[u,g]=Be(""),[h,v]=Be(),w=me(),k=()=>{var x;(x=w.current)==null||x.controller.abort(),w.current=void 0};At(()=>k,[]);const C=me(),_=x=>{var L;if(at(s,"Query state should not be enabled"),x=x.trim(),x===((L=w.current)==null?void 0:L.query)||x===(h==null?void 0:h.query)&&h.status==="done")return;if(k(),g(x),x===""){v(void 0);return}const $=w.current={query:x,controller:new AbortController};v({query:x,status:"pending"}),l(x,$.controller.signal).then(B=>{w.current===$&&(w.current=void 0,v({query:x,status:"done",items:B}))},B=>{w.current===$&&(w.current=void 0,r.error("Failed to get address details",B instanceof vs?"Unexpected response":B),v({query:x,status:"failed",error:i("address_error")}))})},E=(x,$)=>{o(L=>({...L,[x]:$}))};switch(d){case"query":return at(s,"Query state should not be enabled"),c(gp,{input:e,onSkip:()=>t(null),onAddressSelect:x=>{if(x===""){w.current&&(k(),v(void 0)),f("manual");return}const $=(h==null?void 0:h.status)==="done"?h.items.find(L=>L.id===x):void 0;$&&(C.current!==x&&o($.address),C.current=x,f("details"))},onAddressSearch:_,lookup:h,query:u});case"details":return at(a!==void 0),c(Ds,{input:e,logger:r,onSubmitSuccess:t,addressFields:a,onFieldChange:E,actions:c(Ts,{onClick:()=>{f("query")}})});case"manual":return c(Ds,{logger:r,input:e,onSubmitSuccess:t,addressFields:a??{},onFieldChange:E,actions:s?c(Ts,{onClick:()=>{f("query")}}):e.config.optional?c(lt,{onClick:()=>t(null)}):void 0})}},gp=({input:e,onSkip:t,lookup:r,onAddressSelect:n,query:i,onAddressSearch:a})=>{const{t:o}=oe(),s=me(null);return Fe(()=>{s.current&&(s.current.focus(),s.current.select())},[]),c(ae,{children:[c("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&a(f)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:i,class:er({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[c("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]})}),c("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&c(lt,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?c(Qt,{error:{message:r.error}}):null,c("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?c(ae,{children:[c(rn,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),c("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(l.id)},children:[c("span",{class:"flex-grow",children:l.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n("")},children:c("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},Pi=["line1","line2","line3","city","state","postcode","country"],Ds=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:n,input:i})=>{const a=me(null);Fe(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(Oi),{t:s}=oe();return c("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{l.preventDefault();const d=l.currentTarget,f=[...d.querySelectorAll("input")].filter(h=>h.value!==""&&!h.value.trim());for(const h of f){h.value="";const v=Pi.find(w=>i.config.keys[w]===h.name);v&&t(v,"")}if(f.length>0&&!d.checkValidity()){d.reportValidity();return}const u=new FormData(d),g=Object.fromEntries(u.entries());r({type:"address",value:g})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:Pi.map((l,d)=>{const f=`isdk_${l}`,u=i.config.keys[l];return u?c(ae,{children:[c("label",{for:f,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:s(l)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:u,id:f,defaultValue:e[l],onChange:g=>t(l,g.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?c("option",{value:e[l],children:e[l]}):c("option",{value:"",children:s("select_country")}),o.map(g=>c("option",{value:g,children:g},g))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:d===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:u,id:f,defaultValue:e[l],onInput:g=>t(l,g.currentTarget.value),required:l==="line2"?i.config.line2Required===!0:l!=="line3"}),d===Pi.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[n,c(Nt,{class:"ml-auto"})]})]})},Vi=()=>{const e=me(null);return At(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Fs=["true","false"],bp=$s(Fs),vp="answer",Ls="flex items-center flex-wrap gap-2 p-2.5",Ns="min-w-0 max-w-full flex-auto",js=ii(({label:e,...t},r)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:c("p",{class:"text-center text-base",children:e})})),wp=({input:e,onSubmitSuccess:t})=>{const r=Vi();return c("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=_u(n).value,a=As(bp,i);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:Ls,children:Fs.map((n,i)=>c("li",{class:Ns,children:c(js,{ref:i===0?r:null,type:"submit",name:vp,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(lt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},Ms=e=>e.reduce((t,r)=>t+r.sizeKb,0),mp=Yt("file"),Os=3,an=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},yp=({file:e,class:t,...r})=>{const{t:n}=oe(),[i,a]=an(e.name);return c("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:[c("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"sr-only",children:[n("file_name"),": "]}),c("span",{class:"block truncate",children:i}),c("span",{children:a})]}),c("p",{class:"text-accent-11",children:[c("span",{class:"sr-only",children:[n("file_size"),": "]}),Rt(e.sizeKb)]})]})},Ps=({class:e,...t})=>c("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}),_p=(e,t)=>{const[r,n]=an(e);return`${r.slice(0,t)}${n}`},Vs=e=>({name:_p(e.name,42),sizeKb:e.size/1e3}),xp=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],kp=(e,t,r)=>{const n=an(t.name)[1].toLowerCase(),i=[...r.map(o=>o.toLowerCase()),...xp],a=n===""?"none":i.includes(n)?n:"other";return`chatbot-file-refused:${e}:${a}`},Sp=({input:e,onSubmitSuccess:t,analytics:r})=>{var k;const n=(k=j.current$.value.flow)==null?void 0:k.data.submissions[e.key],[i,a]=Be(mp(n)&&n.value.length?{status:"ready",files:n.value}:{status:"empty"}),o=me(0),s=i.status==="ready"?i.files:[],l=i.status==="ready"||i.status==="pending"?i.files:[],d=i.status==="error"?i.error:void 0,f=l.length-Os,u=Ms(l),g=Vi(),{t:h}=oe(),v=C=>{if(!C.length)return{reason:"required",error:{type:"required",message:h("validation_file")}};if(!sa(C,e.config.extensions))return{reason:"type",file:C.find(_=>!sa([_],e.config.extensions)),error:{type:"validate",message:h("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:h("validation_file_empty")}};if(e.config.fileSizeLimitKib&&Ms(C)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:h("validation_file_size",{size:Rt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&C.length>1)return{reason:"count",error:{type:"invalid",message:h("validation_file_max",{count:1})}}},w=(C,_)=>{var E,x;return r.log({event:"INTERACTION",properties:{tag:kp(C,_,e.config.extensions)},customProperties:(x=(E=j.current$.peek().flow)==null?void 0:E.analytics)==null?void 0:x.customProperties})};return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:C=>{if(C.preventDefault(),i.status==="pending"||i.status==="error")return;const _=v(s);_?a({status:"error",error:_.error}):t({type:"file",value:s})},children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:g,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,Os).map(C=>{const[_,E]=an(C.name);return c(Ps,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:_}),c("span",{children:E})]})}),f>0?c(Ps,{children:h("file_more",{count:f})}):null]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:h("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-11 text-xs",children:["(",h("file_max_size",{size:Rt(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:h("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(C=>c("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:C.replace(".","")}))})]})]}),c("p",{role:"status",class:it("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:i.status==="pending"?c(ae,{children:[c(rn,{"aria-hidden":"true",class:"h-4 w-4"}),h("file_preparing",{count:l.length})]}):i.status==="ready"?c(ae,{children:[s.length>1?h("file_total_size",{size:Rt(u)}):Rt(u),c("span",{class:"sr-only",children:[". ",h("file_ready",{count:s.length})]})]}):null}),c("input",{id:"dropzone-file","aria-label":h("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async C=>{at(C.target instanceof HTMLInputElement);const _=C.target.files?Array.from(C.target.files):[];C.target.value="";const[E]=_;if(!E)return;const x=++o.current,$=i.status==="ready",L=_.map(Vs),B=v(L);if(B)return w(B.reason,B.file??E),a({status:"error",error:B.error});a({status:"pending",files:L});let O;try{const D=await Promise.all(_.map(async V=>{try{return{...Vs(V),data:await Jl(V)}}catch(U){throw O??(O=V),U}}));o.current===x&&a({status:"ready",files:D})}catch{if(o.current!==x)return;w("unreadable",O??E),a({status:"error",error:{type:"invalid",message:h($?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(Nt,{disabled:s.length===0}),e.config.optional&&c(lt,{class:"relative",onClick:()=>t(null)})]})]}),c(Qt,{error:d})]})};var Cr=e=>e.type==="checkbox",jt=e=>e instanceof Date,Ne=e=>e==null;const Rs=e=>typeof e=="object";var le=e=>!Ne(e)&&!Array.isArray(e)&&Rs(e)&&!jt(e),Cp=e=>le(e)&&e.target?Cr(e.target)?e.target.checked:e.target.value:e,Ep=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,$p=(e,t)=>e.has(Ep(t)),Ip=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},Ri=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ue(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ri&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(le(e)&&Ip(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=ue(e[i]));return n}var on=e=>/^\w*$/.test(e),ie=e=>e===void 0,Bi=e=>Array.isArray(e)?e.filter(Boolean):[],zi=e=>Bi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),A=(e,t,r)=>{if(!t||!le(e))return r;const n=(on(t)?[t]:zi(t)).reduce((i,a)=>Ne(i)?i:i[a],e);return ie(n)||n===e?ie(e[t])?r:e[t]:n},Je=e=>typeof e=="boolean",Ue=e=>typeof e=="function",J=(e,t,r)=>{let n=-1;const i=on(t)?[t]:zi(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const d=e[s];l=le(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const Bs={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},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"},Ap=Ce.createContext(null);Ap.displayName="HookFormControlContext";var Tp=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==He.all&&(t._proxyFormState[o]=!n||He.all),r&&(r[o]=!0),e[o]}});return i};const Dp=typeof window<"u"?Ce.useLayoutEffect:Ce.useEffect;var Pe=e=>typeof e=="string",Fp=(e,t,r,n,i)=>Pe(e)?(n&&t.watch.add(e),A(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),A(r,a))):(n&&(t.watchAll=!0),r),Ui=e=>Ne(e)||!Rs(e);function kt(e,t,r=new WeakSet){if(Ui(e)||Ui(t))return Object.is(e,t);if(jt(e)&&jt(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const o=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const s=t[a];if(jt(o)&&jt(s)||le(o)&&le(s)||Array.isArray(o)&&Array.isArray(s)?!kt(o,s,r):!Object.is(o,s))return!1}}return!0}const Lp=Ce.createContext(null);Lp.displayName="HookFormContext";var zs=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Er=e=>Array.isArray(e)?e:[e],Us=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}};function Hs(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t[n];if(i&&le(i)&&a){const o=Hs(i,a);le(o)&&(r[n]=o)}else e[n]&&(r[n]=a)}return r}var Ee=e=>le(e)&&!Object.keys(e).length,Hi=e=>e.type==="file",sn=e=>{if(!Ri)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},qs=e=>e.type==="select-multiple",qi=e=>e.type==="radio",Np=e=>qi(e)||Cr(e),Wi=e=>sn(e)&&e.isConnected;function jp(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=ie(e)?n++:e[t[n++]];return e}function Mp(e){for(const t in e)if(e.hasOwnProperty(t)&&!ie(e[t]))return!1;return!0}function ce(e,t){const r=Array.isArray(t)?t:on(t)?[t]:zi(t),n=r.length===1?e:jp(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(le(n)&&Ee(n)||Array.isArray(n)&&Mp(n))&&ce(e,r.slice(0,-1)),e}var Op=e=>{for(const t in e)if(Ue(e[t]))return!0;return!1};function Ws(e){return Array.isArray(e)||le(e)&&!Op(e)}function Ki(e,t={}){for(const r in e){const n=e[r];Ws(n)?(t[r]=Array.isArray(n)?[]:{},Ki(n,t[r])):ie(n)||(t[r]=!0)}return t}function tr(e,t,r){r||(r=Ki(t));for(const n in e){const i=e[n];if(Ws(i))ie(t)||Ui(r[n])?r[n]=Ki(i,Array.isArray(i)?[]:{}):tr(i,Ne(t)?{}:t[n],r[n]);else{const a=t[n];r[n]=!kt(i,a)}}return r}const Ks={value:!1,isValid:!1},Gs={value:!0,isValid:!0};var Ys=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ie(e[0].attributes.value)?ie(e[0].value)||e[0].value===""?Gs:{value:e[0].value,isValid:!0}:Gs:Ks}return Ks},Zs=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>ie(e)?e:t?e===""?NaN:e&&+e:r&&Pe(e)?new Date(e):n?n(e):e;const Js={isValid:!1,value:null};var Xs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Js):Js;function Qs(e){const t=e.ref;return Hi(t)?t.files:qi(t)?Xs(e.refs).value:qs(t)?[...t.selectedOptions].map(({value:r})=>r):Cr(t)?Ys(e.refs).value:Zs(ie(t.value)?e.ref.value:t.value,e)}var Pp=(e,t,r,n)=>{const i={};for(const a of e){const o=A(t,a);o&&J(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},ln=e=>e instanceof RegExp,$r=e=>ie(e)?e:ln(e)?e.source:le(e)?ln(e.value)?e.value.source:e.value:e,el=e=>({isOnSubmit:!e||e===He.onSubmit,isOnBlur:e===He.onBlur,isOnChange:e===He.onChange,isOnAll:e===He.all,isOnTouch:e===He.onTouched});const tl="AsyncFunction";var Vp=e=>!!e&&!!e.validate&&!!(Ue(e.validate)&&e.validate.constructor.name===tl||le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===tl)),Rp=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),rl=(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 i of r||Object.keys(e)){const a=A(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!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 nl(e,t,r){const n=A(e,r);if(n||on(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=A(t,a),s=A(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var Bp=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Ee(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||He.all))},zp=(e,t,r)=>!e||!t||e===t||Er(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Up=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Hp=(e,t)=>!Bi(A(e,t)).length&&ce(e,t),qp=(e,t,r)=>{const n=Er(A(e,r));return J(n,"root",t[r]),J(e,r,n),e};function il(e,t,r="validate"){if(Pe(e)||Array.isArray(e)&&e.every(Pe)||Je(e)&&!e)return{type:r,message:Pe(e)?e:"",ref:t}}var rr=e=>le(e)&&!ln(e)?e:{value:e,message:""},al=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:d,minLength:f,min:u,max:g,pattern:h,validate:v,name:w,valueAsNumber:k,mount:C}=e._f,_=A(r,w);if(!C||t.has(w))return{};const E=s?s[0]:o,x=M=>{i&&E.reportValidity&&(E.setCustomValidity(Je(M)?"":M||""),E.reportValidity())},$={},L=qi(o),B=Cr(o),O=L||B,D=(k||Hi(o))&&ie(o.value)&&ie(_)||sn(o)&&o.value===""||_===""||Array.isArray(_)&&!_.length,V=zs.bind(null,w,n,$),U=(M,P,W,R=dt.maxLength,X=dt.minLength)=>{const G=M?P:W;$[w]={type:M?R:X,message:G,ref:o,...V(M?R:X,G)}};if(a?!Array.isArray(_)||!_.length:l&&(!O&&(D||Ne(_))||Je(_)&&!_||B&&!Ys(s).isValid||L&&!Xs(s).isValid)){const{value:M,message:P}=Pe(l)?{value:!!l,message:l}:rr(l);if(M&&($[w]={type:dt.required,message:P,ref:E,...V(dt.required,P)},!n))return x(P),$}if(!D&&(!Ne(u)||!Ne(g))){let M,P;const W=rr(g),R=rr(u);if(!Ne(_)&&!isNaN(_)){const X=o.valueAsNumber||_&&+_;Ne(W.value)||(M=X>W.value),Ne(R.value)||(P=X<R.value)}else{const X=o.valueAsDate||new Date(_),G=Q=>new Date(new Date().toDateString()+" "+Q),ve=o.type=="time",fe=o.type=="week";Pe(W.value)&&_&&(M=ve?G(_)>G(W.value):fe?_>W.value:X>new Date(W.value)),Pe(R.value)&&_&&(P=ve?G(_)<G(R.value):fe?_<R.value:X<new Date(R.value))}if((M||P)&&(U(!!M,W.message,R.message,dt.max,dt.min),!n))return x($[w].message),$}if((d||f)&&!D&&(Pe(_)||a&&Array.isArray(_))){const M=rr(d),P=rr(f),W=!Ne(M.value)&&_.length>+M.value,R=!Ne(P.value)&&_.length<+P.value;if((W||R)&&(U(W,M.message,P.message),!n))return x($[w].message),$}if(h&&!D&&Pe(_)){const{value:M,message:P}=rr(h);if(ln(M)&&!_.match(M)&&($[w]={type:dt.pattern,message:P,ref:o,...V(dt.pattern,P)},!n))return x(P),$}if(v){if(Ue(v)){const M=await v(_,r),P=il(M,E);if(P&&($[w]={...P,...V(dt.validate,P.message)},!n))return x(P.message),$}else if(le(v)){let M={};for(const P in v){if(!Ee(M)&&!n)break;const W=il(await v[P](_,r),E,P);W&&(M={...W,...V(P,W.message)},x(W.message),n&&($[w]=M))}if(!Ee(M)&&($[w]={ref:E,...M},!n))return $}}return x(!0),$};const Wp={mode:He.onSubmit,reValidateMode:He.onChange,shouldFocusError:!0};function Kp(e={}){let t={...Wp,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ue(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=le(t.defaultValues)||le(t.values)?ue(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ue(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={...f};let g={...u};const h={array:Us(),state:Us()},v=t.criteriaMode===He.all,w=p=>b=>{clearTimeout(d),d=setTimeout(p,b)},k=async p=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||g.isValid||p)){let b;t.resolver?(b=Ee((await O()).errors),C()):b=await V(n,!0),b!==r.isValid&&h.state.next({isValid:b})}},C=(p,b)=>{!t.disabled&&(u.isValidating||u.validatingFields||g.isValidating||g.validatingFields)&&((p||Array.from(s.mount)).forEach(m=>{m&&(b?J(r.validatingFields,m,b):ce(r.validatingFields,m))}),h.state.next({validatingFields:r.validatingFields,isValidating:!Ee(r.validatingFields)}))},_=(p,b=[],m,I,y=!0,S=!0)=>{if(I&&m&&!t.disabled){if(o.action=!0,S&&Array.isArray(A(n,p))){const N=m(A(n,p),I.argA,I.argB);y&&J(n,p,N)}if(S&&Array.isArray(A(r.errors,p))){const N=m(A(r.errors,p),I.argA,I.argB);y&&J(r.errors,p,N),Hp(r.errors,p)}if((u.touchedFields||g.touchedFields)&&S&&Array.isArray(A(r.touchedFields,p))){const N=m(A(r.touchedFields,p),I.argA,I.argB);y&&J(r.touchedFields,p,N)}(u.dirtyFields||g.dirtyFields)&&(r.dirtyFields=tr(i,a)),h.state.next({name:p,isDirty:M(p,b),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else J(a,p,b)},E=(p,b)=>{J(r.errors,p,b),h.state.next({errors:r.errors})},x=p=>{r.errors=p,h.state.next({errors:r.errors,isValid:!1})},$=(p,b,m,I)=>{const y=A(n,p);if(y){const S=A(a,p,ie(m)?A(i,p):m);ie(S)||I&&I.defaultChecked||b?J(a,p,b?S:Qs(y._f)):R(p,S),o.mount&&!o.action&&k()}},L=(p,b,m,I,y)=>{let S=!1,N=!1;const q={name:p};if(!t.disabled){if(!m||I){(u.isDirty||g.isDirty)&&(N=r.isDirty,r.isDirty=q.isDirty=M(),S=N!==q.isDirty);const K=kt(A(i,p),b);N=!!A(r.dirtyFields,p),K?ce(r.dirtyFields,p):J(r.dirtyFields,p,!0),q.dirtyFields=r.dirtyFields,S=S||(u.dirtyFields||g.dirtyFields)&&N!==!K}if(m){const K=A(r.touchedFields,p);K||(J(r.touchedFields,p,m),q.touchedFields=r.touchedFields,S=S||(u.touchedFields||g.touchedFields)&&K!==m)}S&&y&&h.state.next(q)}return S?q:{}},B=(p,b,m,I)=>{const y=A(r.errors,p),S=(u.isValid||g.isValid)&&Je(b)&&r.isValid!==b;if(t.delayError&&m?(l=w(()=>E(p,m)),l(t.delayError)):(clearTimeout(d),l=null,m?J(r.errors,p,m):ce(r.errors,p)),(m?!kt(y,m):y)||!Ee(I)||S){const N={...I,...S&&Je(b)?{isValid:b}:{},errors:r.errors,name:p};r={...r,...N},h.state.next(N)}},O=async p=>(C(p,!0),await t.resolver(a,t.context,Pp(p||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),D=async p=>{const{errors:b}=await O(p);if(C(p),p)for(const m of p){const I=A(b,m);I?J(r.errors,m,I):ce(r.errors,m)}else r.errors=b;return b},V=async(p,b,m={valid:!0})=>{for(const I in p){const y=p[I];if(y){const{_f:S,...N}=y;if(S){const q=s.array.has(S.name),K=y._f&&Vp(y._f);K&&u.validatingFields&&C([S.name],!0);const $e=await al(y,s.disabled,a,v,t.shouldUseNativeValidation&&!b,q);if(K&&u.validatingFields&&C([S.name]),$e[S.name]&&(m.valid=!1,b||e.shouldUseNativeValidation))break;!b&&(A($e,S.name)?q?qp(r.errors,$e,S.name):J(r.errors,S.name,$e[S.name]):ce(r.errors,S.name))}!Ee(N)&&await V(N,b,m)}}return m.valid},U=()=>{for(const p of s.unMount){const b=A(n,p);b&&(b._f.refs?b._f.refs.every(m=>!Wi(m)):!Wi(b._f.ref))&&or(p)}s.unMount=new Set},M=(p,b)=>!t.disabled&&(p&&b&&J(a,p,b),!kt(Tr(),i)),P=(p,b,m)=>Fp(p,s,{...o.mount?a:ie(b)?i:Pe(p)?{[p]:b}:b},m,b),W=p=>Bi(A(o.mount?a:i,p,t.shouldUnregister?A(i,p,[]):[])),R=(p,b,m={})=>{const I=A(n,p);let y=b;if(I){const S=I._f;S&&(!S.disabled&&J(a,p,Zs(b,S)),y=sn(S.ref)&&Ne(b)?"":b,qs(S.ref)?[...S.ref.options].forEach(N=>N.selected=y.includes(N.value)):S.refs?Cr(S.ref)?S.refs.forEach(N=>{(!N.defaultChecked||!N.disabled)&&(Array.isArray(y)?N.checked=!!y.find(q=>q===N.value):N.checked=y===N.value||!!y)}):S.refs.forEach(N=>N.checked=N.value===y):Hi(S.ref)?S.ref.value="":(S.ref.value=y,S.ref.type||h.state.next({name:p,values:ue(a)})))}(m.shouldDirty||m.shouldTouch)&&L(p,y,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&Q(p)},X=(p,b,m)=>{for(const I in b){if(!b.hasOwnProperty(I))return;const y=b[I],S=p+"."+I,N=A(n,S);(s.array.has(p)||le(y)||N&&!N._f)&&!jt(y)?X(S,y,m):R(S,y,m)}},G=(p,b,m={})=>{const I=A(n,p),y=s.array.has(p),S=ue(b);J(a,p,S),y?(h.array.next({name:p,values:ue(a)}),(u.isDirty||u.dirtyFields||g.isDirty||g.dirtyFields)&&m.shouldDirty&&h.state.next({name:p,dirtyFields:tr(i,a),isDirty:M(p,S)})):I&&!I._f&&!Ne(S)?X(p,S,m):R(p,S,m),rl(p,s)?h.state.next({...r,name:p,values:ue(a)}):h.state.next({name:o.mount?p:void 0,values:ue(a)})},ve=async p=>{o.mount=!0;const b=p.target;let m=b.name,I=!0;const y=A(n,m),S=K=>{I=Number.isNaN(K)||jt(K)&&isNaN(K.getTime())||kt(K,A(a,m,K))},N=el(t.mode),q=el(t.reValidateMode);if(y){let K,$e;const Pt=b.type?Qs(y._f):Cp(p),Ct=p.type===Bs.BLUR||p.type===Bs.FOCUS_OUT,Uh=!Rp(y._f)&&!t.resolver&&!A(r.errors,m)&&!y._f.deps||Up(Ct,A(r.touchedFields,m),r.isSubmitted,q,N),Yi=rl(m,s,Ct);J(a,m,Pt),Ct?(!b||!b.readOnly)&&(y._f.onBlur&&y._f.onBlur(p),l&&l(0)):y._f.onChange&&y._f.onChange(p);const Zi=L(m,Pt,Ct),Hh=!Ee(Zi)||Yi;if(!Ct&&h.state.next({name:m,type:p.type,values:ue(a)}),Uh)return(u.isValid||g.isValid)&&(t.mode==="onBlur"?Ct&&k():Ct||k()),Hh&&h.state.next({name:m,...Yi?{}:Zi});if(!Ct&&Yi&&h.state.next({...r}),t.resolver){const{errors:vl}=await O([m]);if(C([m]),S(Pt),I){const qh=nl(r.errors,n,m),wl=nl(vl,n,qh.name||m);K=wl.error,m=wl.name,$e=Ee(vl)}}else C([m],!0),K=(await al(y,s.disabled,a,v,t.shouldUseNativeValidation))[m],C([m]),S(Pt),I&&(K?$e=!1:(u.isValid||g.isValid)&&($e=await V(n,!0)));I&&(y._f.deps&&(!Array.isArray(y._f.deps)||y._f.deps.length>0)&&Q(y._f.deps),B(m,$e,K,Zi))}},fe=(p,b)=>{if(A(r.errors,b)&&p.focus)return p.focus(),1},Q=async(p,b={})=>{let m,I;const y=Er(p);if(t.resolver){const S=await D(ie(p)?p:y);m=Ee(S),I=p?!y.some(N=>A(S,N)):m}else p?(I=(await Promise.all(y.map(async S=>{const N=A(n,S);return await V(N&&N._f?{[S]:N}:N)}))).every(Boolean),!(!I&&!r.isValid)&&k()):I=m=await V(n);return h.state.next({...!Pe(p)||(u.isValid||g.isValid)&&m!==r.isValid?{}:{name:p},...t.resolver||!p?{isValid:m}:{},errors:r.errors}),b.shouldFocus&&!I&&Ir(n,fe,p?y:s.mount),I},Tr=(p,b)=>{let m={...o.mount?a:i};return b&&(m=Hs(b.dirtyFields?r.dirtyFields:r.touchedFields,m)),ie(p)?m:Pe(p)?A(m,p):p.map(I=>A(m,I))},nr=(p,b)=>({invalid:!!A((b||r).errors,p),isDirty:!!A((b||r).dirtyFields,p),error:A((b||r).errors,p),isValidating:!!A(r.validatingFields,p),isTouched:!!A((b||r).touchedFields,p)}),z=p=>{const b=p?Er(p):void 0;b==null||b.forEach(m=>ce(r.errors,m)),b?b.forEach(m=>{h.state.next({name:m,errors:r.errors})}):h.state.next({errors:{}})},ir=(p,b,m)=>{const I=(A(n,p,{_f:{}})._f||{}).ref,y=A(r.errors,p)||{},{ref:S,message:N,type:q,...K}=y;J(r.errors,p,{...K,...b,ref:I}),h.state.next({name:p,errors:r.errors,isValid:!1}),m&&m.shouldFocus&&I&&I.focus&&I.focus()},ar=(p,b)=>Ue(p)?h.state.subscribe({next:m=>"values"in m&&p(P(void 0,b),m)}):P(p,b,!0),St=p=>h.state.subscribe({next:b=>{zp(p.name,b.name,p.exact)&&Bp(b,p.formState||u,hn,p.reRenderRoot)&&p.callback({values:{...a},...r,...b,defaultValues:i})}}).unsubscribe,Mt=p=>(o.mount=!0,g={...g,...p.formState},St({...p,formState:{...f,...p.formState}})),or=(p,b={})=>{for(const m of p?Er(p):s.mount)s.mount.delete(m),s.array.delete(m),b.keepValue||(ce(n,m),ce(a,m)),!b.keepError&&ce(r.errors,m),!b.keepDirty&&ce(r.dirtyFields,m),!b.keepTouched&&ce(r.touchedFields,m),!b.keepIsValidating&&ce(r.validatingFields,m),!t.shouldUnregister&&!b.keepDefaultValue&&ce(i,m);h.state.next({values:ue(a)}),h.state.next({...r,...b.keepDirty?{isDirty:M()}:{}}),!b.keepIsValid&&k()},Dr=({disabled:p,name:b})=>{if(Je(p)&&o.mount||p||s.disabled.has(b)){const y=s.disabled.has(b)!==!!p;p?s.disabled.add(b):s.disabled.delete(b),y&&o.mount&&!o.action&&k()}},ut=(p,b={})=>{let m=A(n,p);const I=Je(b.disabled)||Je(t.disabled);return J(n,p,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:p}},name:p,mount:!0,...b}}),s.mount.add(p),m?Dr({disabled:Je(b.disabled)?b.disabled:t.disabled,name:p}):$(p,!0,b.value),{...I?{disabled:b.disabled||t.disabled}:{},...t.progressive?{required:!!b.required,min:$r(b.min),max:$r(b.max),minLength:$r(b.minLength),maxLength:$r(b.maxLength),pattern:$r(b.pattern)}:{},name:p,onChange:ve,onBlur:ve,ref:y=>{if(y){ut(p,b),m=A(n,p);const S=ie(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,N=Np(S),q=m._f.refs||[];if(N?q.find(K=>K===S):S===m._f.ref)return;J(n,p,{_f:{...m._f,...N?{refs:[...q.filter(Wi),S,...Array.isArray(A(i,p))?[{}]:[]],ref:{type:S.type,name:p}}:{ref:S}}}),$(p,!1,void 0,S)}else m=A(n,p,{}),m._f&&(m._f.mount=!1),(t.shouldUnregister||b.shouldUnregister)&&!($p(s.array,p)&&o.action)&&s.unMount.add(p)}}},sr=()=>t.shouldFocusError&&Ir(n,fe,s.mount),fn=p=>{Je(p)&&(h.state.next({disabled:p}),Ir(n,(b,m)=>{const I=A(n,m);I&&(b.disabled=I._f.disabled||p,Array.isArray(I._f.refs)&&I._f.refs.forEach(y=>{y.disabled=I._f.disabled||p}))},0,!1))},lr=(p,b)=>async m=>{let I;m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let y=ue(a);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:S,values:N}=await O();C(),r.errors=S,y=ue(N)}else await V(n);if(s.disabled.size)for(const S of s.disabled)ce(y,S);if(ce(r.errors,"root"),Ee(r.errors)){h.state.next({errors:{}});try{await p(y,m)}catch(S){I=S}}else b&&await b({...r.errors},m),sr(),setTimeout(sr);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ee(r.errors)&&!I,submitCount:r.submitCount+1,errors:r.errors}),I)throw I},cr=(p,b={})=>{A(n,p)&&(ie(b.defaultValue)?G(p,ue(A(i,p))):(G(p,b.defaultValue),J(i,p,ue(b.defaultValue))),b.keepTouched||ce(r.touchedFields,p),b.keepDirty||(ce(r.dirtyFields,p),r.isDirty=b.defaultValue?M(p,ue(A(i,p))):M()),b.keepError||(ce(r.errors,p),u.isValid&&k()),h.state.next({...r}))},Ot=(p,b={})=>{const m=p?ue(p):i,I=ue(m),y=Ee(p),S=y?i:I;if(b.keepDefaultValues||(i=m),!b.keepValues){if(b.keepDirtyValues){const N=new Set([...s.mount,...Object.keys(tr(i,a))]);for(const q of Array.from(N)){const K=A(r.dirtyFields,q),$e=A(a,q),Pt=A(S,q);K&&!ie($e)?J(S,q,$e):!K&&!ie(Pt)&&G(q,Pt)}}else{if(Ri&&ie(p))for(const N of s.mount){const q=A(n,N);if(q&&q._f){const K=Array.isArray(q._f.refs)?q._f.refs[0]:q._f.ref;if(sn(K)){const $e=K.closest("form");if($e){$e.reset();break}}}}if(b.keepFieldsRef)for(const N of s.mount)G(N,A(S,N));else n={}}a=t.shouldUnregister?b.keepDefaultValues?ue(i):{}:ue(S),h.array.next({values:{...S}}),h.state.next({values:{...S}})}s={mount:b.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!b.keepIsValid||!!b.keepDirtyValues||!t.shouldUnregister&&!Ee(S),o.watch=!!t.shouldUnregister,o.keepIsValid=!!b.keepIsValid,o.action=!1,b.keepErrors||(r.errors={}),h.state.next({submitCount:b.keepSubmitCount?r.submitCount:0,isDirty:y?!1:b.keepDirty?r.isDirty:!!(b.keepDefaultValues&&!kt(p,i)),isSubmitted:b.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:y?{}:b.keepDirtyValues?b.keepDefaultValues&&a?tr(i,a):r.dirtyFields:b.keepDefaultValues&&p?tr(i,p):b.keepDirty?r.dirtyFields:{},touchedFields:b.keepTouched?r.touchedFields:{},errors:b.keepErrors?r.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Fr=(p,b)=>Ot(Ue(p)?p(a):p,{...t.resetOptions,...b}),pn=(p,b={})=>{const m=A(n,p),I=m&&m._f;if(I){const y=I.refs?I.refs[0]:I.ref;y.focus&&setTimeout(()=>{y.focus(),b.shouldSelect&&Ue(y.select)&&y.select()})}},hn=p=>{r={...r,...p}},Lr={control:{register:ut,unregister:or,getFieldState:nr,handleSubmit:lr,setError:ir,_subscribe:St,_runSchema:O,_updateIsValidating:C,_focusError:sr,_getWatch:P,_getDirty:M,_setValid:k,_setFieldArray:_,_setDisabledField:Dr,_setErrors:x,_getFieldArray:W,_reset:Ot,_resetDefaultValues:()=>Ue(t.defaultValues)&&t.defaultValues().then(p=>{Fr(p,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:fn,_subjects:h,_proxyFormState:u,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(p){o=p},get _defaultValues(){return i},get _names(){return s},set _names(p){s=p},get _formState(){return r},get _options(){return t},set _options(p){t={...t,...p}}},subscribe:Mt,trigger:Q,register:ut,handleSubmit:lr,watch:ar,setValue:G,getValues:Tr,reset:Fr,resetField:cr,clearErrors:z,unregister:or,setError:ir,setFocus:pn,getFieldState:nr};return{...Lr,formControl:Lr}}function cn(e={}){const t=Ce.useRef(void 0),r=Ce.useRef(void 0),[n,i]=Ce.useState({isDirty:!1,isValidating:!1,isLoading:Ue(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:Ue(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ue(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=Kp(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,Dp(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),Ce.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),Ce.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),Ce.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),Ce.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),Ce.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),Ce.useEffect(()=>{var o;e.values&&!kt(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),Ce.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=Ce.useMemo(()=>Tp(n,a),[a,n]),t.current}const ol=(e,t,r)=>{if(e&&"reportValidity"in e){const n=A(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Gp=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ol(n.ref,r,e):n.refs&&n.refs.forEach(i=>ol(i,r,e))}},Yp=(e,t)=>{t.shouldUseNativeValidation&&Gp(e,t);const r={};for(const n in e){const i=A(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(Zp(t.names||Object.keys(e),n)){const o=Object.assign({},A(r,n));J(o,"root",a),J(r,n,o)}else J(r,n,a)}return r},Zp=(e,t)=>e.some(r=>r.startsWith(t+"."));var dn=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(sp(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var d=s.issues[0],f=np(d);if(f&&(l[f]||(l[f]={message:d.message,type:d.type}),o)){var u=l[f].types,g=u&&u[d.type];l[f]=zs(f,o,l,d.type,g?[].concat(g,d.message):d.message)}s.issues.shift()}return{values:{},errors:Yp(l,a)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const sl=27,ll=12,cl=10,Jp=Yt("enum"),Xp=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return dn(st({checked:xt(Is(Le(),Cs()),Mi(n=>Object.entries(n).filter(([i,a])=>a).map(([i,a])=>i)),Sr(r.max,t("validation_multiple_choice_max",{count:r.max})),Jt(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},Qp=ii(({option:e,...t},r)=>c(ae,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),dl=Dt("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:Ls}}}),eh=({input:e,onSubmitSuccess:t})=>{var f,u;const r=e.key?(f=j.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.maxSelected===1,i=n&&e.config.options.length===2,{t:a}=oe(),{register:o,handleSubmit:s,formState:{errors:l}}=cn({defaultValues:{checked:n?{}:Jp(r)?Object.fromEntries(r.value.map(g=>[g,!0])):{}},resolver:Xp(e.config,a)}),d=Vi();return i?c(ae,{children:[c("ul",{style:{maxHeight:6.5*sl+5*ll+2*cl},class:dl({variant:"booleanLike"}),children:e.config.options.map((g,h)=>c("li",{class:Ns,children:c(js,{type:"submit",ref:v=>{v&&h===0&&(d.current=v)},label:g.label,value:"true",onClick:()=>t({type:"enum",value:[g.value]})})},g.value))}),e.config.minSelected===0&&c("div",{class:"px-2 pb-2",children:c(lt,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):c("form",{noValidate:!0,onSubmit:g=>s(h=>{const v=h.checked;t({type:"enum",value:v})})(g),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*sl+5*ll+2*cl},class:dl({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((g,h)=>{const v=`checked.${g.value}`,{ref:w,...k}=o(v);return c("li",{class:"relative",children:c(Qp,{option:g,autoFocus:h===0,ref:C=>{C&&h===0&&(d.current=C),w(C)},id:v,...k,onClick:n?()=>t({type:"enum",value:[g.value]}):void 0})},g.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:c(Nt,{}),e.config.minSelected===0&&c(lt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(Qt,{error:(u=l.checked)==null?void 0:u.root})})]})},th=Yt("number"),rh=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,i=e.decimalCases??0;return dn(st({number:xt(Es(t("validation_number")),_s(r,t("validation_number_min",{min:r})),ys(n,t("validation_number_max",{max:n})),ws(a=>a===Number(a.toFixed(i)),t("validation_number_decimal_cases",{count:i})))}))},nh=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,n=e.key?(u=j.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:i}=oe(),{register:a,handleSubmit:o,formState:{errors:s}}=cn({defaultValues:{number:th(n)?n.value:r?Number(r):void 0},resolver:rh(e.config,i)}),{ref:l,...d}=a("number",{required:!e.config.optional,valueAsNumber:!0}),f=me();return Fe(()=>{f.current&&(f.current.focus(),f.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(g=>{g.number!==void 0&&t({type:"number",value:g.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...d,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:g=>{g&&(f.current=g),l(g)},type:"text",min:e.config.min,max:e.config.max,class:er({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&c(lt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(Nt,{})]}),c(Qt,{error:s.number})]})},ih="44",ah=/^[0-9 ]+$/,oh=Yt("string"),sh=Yt("phone"),lh=e=>{const t=xt(Le(e("validation_country_code")),ji(ah,e("validation_country_code"))),r=xt(Le(e("validation_phone")),Jt(1,e("validation_phone")),Mi(n=>n.replace(/[^0-9]/g,"")));return dn(st({countryCode:t,phoneNumber:r}))},ch=({input:e,onSubmitSuccess:t})=>{var w;const r=e.key?(w=j.current$.value.flow)==null?void 0:w.data.submissions[e.key]:void 0,{t:n}=oe(),[i,a]=Be(),o=oh(r)?lp(r.value):sh(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:d},watch:f}=cn({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??ih,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:lh(n)}),{ref:u,...g}=s("phoneNumber",{required:!e.config.optional}),h=me(),v=f("countryCode");return Fe(()=>{h.current&&(h.current.focus(),h.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(k=>{const C=k.phoneNumber.replace(/[^0-9]/g,""),_=k.countryCode.replace(/[^0-9]/g,"");a(void 0);const E=e.config.minChars??7,x=C.length+_.length;if(x<E)return a(n("validation_phone_min_chars",{count:E}));const $=e.config.maxChars;if($!=null&&x>$)return a(n("validation_max_chars",{count:$}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:_,phoneNumber:C}}):t({type:"string",value:v+k.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[c("span",{children:["+",v]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Oi).map(([k,C])=>c("option",{value:C,children:[k," (+",C,")"]},k))})]}),c("input",{...g,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(h.current=k),u(k)},class:er({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(lt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(Nt,{})]}),c(Qt,{error:d.countryCode||d.phoneNumber||{message:i}})]})},un=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),ul=(e,t,r,n)=>r!==void 0&&n*1e3>$n?e("submission_available_at",{time:pa(r,t)}):e("submission_cooldown",{count:n}),dh=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},uh=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=oe(),{availableAt:i}=e.config,[a,o]=Be(()=>un(i)),[s,l]=Be("");At(()=>{const f=un(i);if(o(f),f===0)return;l(ul(r,n,i,f));const u=setInterval(()=>{const g=un(i);o(g),!(g>0)&&(clearInterval(u),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(u)},[i,n,r]);const d=a>0;return c("div",{class:"flex flex-col items-center gap-2 py-3",children:[c("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":d,"aria-describedby":d?"submit-cooldown":void 0,onClick:()=>{un(i)>0||t(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:dh(e.config.label,r)}),c("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})}),d&&c("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:ul(r,n,i,a)}),c("p",{role:"status",class:"sr-only",children:s})]})},fh=160,fl=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,fh)}px`},ph={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},hh=Yt("string"),gh=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return dn(st({text:{date:xt(Le(t("validation_date")),ji(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:xt(Le(t("validation_email")),ms(t("validation_email")),Jt(e.minChars??1,r.minLength),Sr(e.maxChars??1/0,r.maxLength)),text:xt(Le(),Jt(e.minChars??1,r.minLength),Sr(e.maxChars??1/0,r.maxLength)),url:xt(Le(t("validation_url")),xs(t("validation_url")),Jt(e.minChars??1,r.minLength),Sr(e.maxChars??1/0,r.maxLength))}[e.format]}))},bh={text:({input:e,onSubmitSuccess:t})=>{var w;const{t:r}=oe(),n=e.key?(w=j.current$.value.flow)==null?void 0:w.data.submissions[e.key]:void 0,i=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:d}}=cn({defaultValues:{text:hh(n)?n.value:i??""},resolver:gh(e.config,r)}),{ref:f,...u}=o("text",{required:!e.config.optional}),g=me();Fe(()=>{g.current&&(g.current instanceof HTMLTextAreaElement&&fl(g.current),g.current.focus(),g.current.select())},[]);const h=e.config.maxChars,v=a&&h!==void 0?l("text").length:void 0;return c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(k=>{t({type:"string",value:k.text})}),children:[c("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[a?c("textarea",{id:"chat-input",...u,rows:2,maxLength:h,autoFocus:!0,"aria-describedby":v!==void 0?"chat-input-count":void 0,onInput:k=>fl(k.currentTarget),onKeyDown:k=>{var C;k.key==="Enter"&&(k.ctrlKey||k.metaKey)&&(k.preventDefault(),(C=k.currentTarget.form)==null||C.requestSubmit())},ref:k=>{k&&(g.current=k),f(k)},placeholder:e.config.placeholder,class:er({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):c("input",{id:"chat-input",...u,...ph[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(g.current=k),f(k)},placeholder:e.config.placeholder,class:er({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(lt,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(Nt,{})]}),v!==void 0&&h!==void 0&&c("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[v,"/",h]}),c(Qt,{error:d.text})]})},phone:ch,"multiple-choice":eh,boolean:wp,file:Sp,submit:uh,address:hp,number:nh},vh=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=j.current$.value.flow)==null?void 0:o.data.currentInput,i=me(null),a=()=>ne.onInteractionFn$.value();return Fe(()=>{var s;(s=i.current)==null||s.scrollTo({top:0})},[n]),c("div",{ref:i,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:c("div",{class:"flex flex-col",onPointerDownCapture:n?a:void 0,onKeyDownCapture:n?a:void 0,children:n?(()=>{const s=bh[n.type];return c(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:ne.onSubmitSuccessFn$.value,input:n})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:er({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(Nt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function wh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mh=function(e){return e instanceof RegExp},yh=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},pl=function(e){return typeof e=="string"},_h=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function xh(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!pl(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;mh(a)||(a=new RegExp("("+yh(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=i}return o}var kh=function(t,r,n){return Array.isArray(t)||(t=[t]),_h(t.map(function(i){return pl(i)?xh(i,r,n):i}))};const Ar=wh(kh),Sh=/(\[[^\]]+\]\([^)]+\))/g,Ch=/\[([^\]]+)\]\(([^)]+)\)/,Eh=/(https?:\/\/[^\s]+)/g,$h=/_(.*?)_/g,Ih=/\*\*(.*?)\*\*/g,Ah=/(\\n|\n)/g,hl="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Th=e=>{const t=Ar(e,Sh,(s,l)=>{const[,d,f]=s.match(Ch)??[];return f?c("a",{class:hl,href:f,children:d??f},f+l):c("span",{children:"INVALID LINK"})}),r=Ar(t,Eh,(s,l)=>c("a",{class:hl,href:s,children:s},s+l)),n=Ar(r,$h,(s,l)=>c("em",{children:s},s+l)),i=Ar(n,Ih,(s,l)=>c("strong",{children:s},s+l));let a=0;return Ar(i,Ah,()=>c("br",{},`br-${a++}`))},Dh=Dt("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"}}),Fh=({children:e,className:t,animate:r,side:n,...i})=>c("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Dh({className:t,side:n,animate:r}),...i,children:e}),gl=new Map,bl=au({overrides:{},locale:void 0}),Lh=(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")!==bl("job_alerts_privacy")&&n===bl("job_alerts_privacy_sender",{employer:r})?e("job_alerts_privacy"):n},Nh=({flow:e,rpcClient:t})=>{const{t:r}=oe(),n=e.data.flowSessionId,i=gl.get(n)??Me("offer");gl.set(n,i);const a=l=>{const d=e.data.submissions[l];return(d==null?void 0:d.type)==="string"?d.value.trim():void 0},o=a("email")||e.nodes.flatMap(l=>l.type==="question-text"&&l.data.format==="email"?[a(l.data.key)]:[]).find(l=>!!l);if(!o||i.value==="declined")return null;if(i.value==="success")return c("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(i.value!=="offer"&&i.value!=="error")){i.value="saving";try{await Dc(t,{contact:{email:o,first_name:a("first_name"),last_name:a("last_name")},job:e.job}),i.value="success"}catch{i.value="error"}}};return c("div",{class:"bg-neutral-2 flex flex-col gap-2 rounded-xl p-3 text-sm",children:[c("p",{children:r("job_alerts_offer",{email:o})}),i.value==="error"?c("p",{role:"alert",children:r("job_alerts_error")}):null,c("div",{class:"flex gap-2",children:[c("button",{type:"button",class:"bg-accent-9 min-h-[44px] rounded-lg px-3 py-2 text-white",disabled:i.value==="saving",onClick:s,children:r("job_alerts_accept")}),c("button",{type:"button",class:"min-h-[44px] rounded-lg px-3 py-2",disabled:i.value==="saving",onClick:()=>{i.value!=="offer"&&i.value!=="error"||(i.value="declined")},children:r("job_alerts_decline")})]}),c("p",{class:"text-xs",children:Lh(r,e.employer)})]})},jh=({message:e})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Mh=({className:e,...t})=>c("div",{"aria-hidden":!0,children:ne.isBotTyping$.value===!0?c("div",{"data-testid":"typing-indicator",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0}),Oh={bot:"left",user:"right"},Ph=Dt("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"}}}),Vh=({env:e,lastSentMessageFooter:t,rpcClient:r})=>{const{t:n}=oe(),i=j.current$.value.flow,a=(i==null?void 0:i.data.messages)??[],o=a.findIndex(l=>l.type==="system"&&l.semantic==="submission-closed"),s=i?$i(i):void 0;return c("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:[a.map((l,d)=>c(ae,{children:[c("li",{class:"flex",tabIndex:d===a.length-1?-1:void 0,children:[s&&l.groupId===s&&!a.slice(d+1).some(f=>f.groupId===s)?t:null,Jr(l).with({type:"system"},f=>c("p",{class:Ph({variant:f.variant}),children:f.text})).with({type:"text",author:Tt.union("bot","user")},f=>{const u=d===a.length-1,g=f.author==="bot"?Th(f.text):f.text;return c(ae,{children:c(Fh,{animate:u,side:Oh[f.author],children:g},d)})}).with({type:"link"},f=>c(jh,{message:f})).with({type:"image"},f=>c("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=>c(yp,{class:f.author==="bot"?void 0:"ml-auto",file:{name:f.fileName,sizeKb:f.fileSizeKb}})).with({type:"loading"},f=>{const u=a[a.length-1];return!(f===u)||ne.isBotTyping$.value||i!=null&&i.data.isFinished?null:c("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[c(rn,{"aria-hidden":f.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),f.text?c("p",{role:"status",class:"text-neutral-11 text-sm",children:f.text}):null]})}).exhaustive()]}),d===o&&(i!=null&&i.jobAlerts)&&r?c("li",{children:c(Nh,{flow:i,rpcClient:r},i.data.flowSessionId)}):null]},d)),e&&e!=="production"&&(i==null?void 0:i.data.isFinished)&&i.data.stagingDestination&&c("li",{class:"text-neutral-11 text-center text-xs",children:i.data.stagingDestination}),c("li",{class:ne.captchaVisible$.value?"flex":"hidden",children:c("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"),c(Mh,{},"typing")]})},Rh=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:i,env:a})=>{const{flow:o}=j.current$.value;at(o,"Flow is required to exist to show chatbot body");const s=j.viewState$.value,{chatRef:l,chatService:d}=Mu(),{t:f}=oe(),[u,g]=Be();return Fe(()=>{s==="maximised"&&ne.scrollToEnd()},[s]),Fe(()=>{var B;const{state:h,flow:v}=j.current$.peek();if(h!=="loaded")throw new Error(f("invalid_state"));let w=v.data.nodeHistory.at(-1);if(ne.scrollToEnd(),j.setInput(void 0),v.data.isFinished)return;const k=()=>{const O=j.current$.peek().flow;!O||O.data.hasInteracted||(j.markAsInteracted(),bs(n,O,"FLOW_INTERACT"))};ne.onInteractionFn$.value=k,w===void 0?(w=fs(o.nodes).id,j.setCurrentNodeId(w),bs(n,v,"FLOW_START")):j.removeMessagesSentByNodeIds([w,Ti]);const{interpret:C,abort:_,undo:E}=Sf({context:o.context,analytics:{service:n,customProperties:(B=o.analytics)==null?void 0:B.customProperties},apiClient:t,logger:e,talentBankClient:i,flow:o,chatService:d,t:f,getApplicationRecovery:()=>{var O;return(O=j.current$.peek().flow)==null?void 0:O.data.applicationRecovery},setApplicationRecovery:j.setApplicationRecovery,persistWriteBarrier:()=>j.persistWriteBarrier(v),getSubmissions:()=>{var O;return(O=j.current$.peek().flow)==null?void 0:O.data.submissions},onInterpret:O=>j.setCurrentNodeId(O.id),onFlowEnd:async()=>{var D;j.markAsFinished();const O=j.current$.peek().flow;at(O),n.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:O.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(D=o.analytics)==null?void 0:D.customProperties})}}),x=w,$=()=>{g(()=>E),C(x)},L=new AbortController;return v.offerResume?Jf({chatService:d,t:f,signal:L.signal}).then(O=>(j.settleResume(v),O?$():(j.restart(),Oe.flushStateData()))).catch(O=>{O instanceof ft||e.error("Resume prompt failed",O)}):$(),()=>{L.abort(),ne.onInteractionFn$.value===k&&(ne.onInteractionFn$.value=()=>{}),_()}},[n,t,d,e,o,i,f]),c(ae,{children:[c("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[c("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:c(Vh,{env:a,rpcClient:r,lastSentMessageFooter:!$i(o)||!u?null:c(Bh,{undoFn:u})})}),ne.isReadingHistory$.value&&!o.data.isFinished&&!ne.isBotTyping$.value&&c("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:c(xr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var v,w;ne.scrollToEnd(),(w=((v=l.current)==null?void 0:v.querySelector('li[tabindex="-1"]'))??l.current)==null||w.focus({preventScroll:!0})},children:c(es,{})})})]}),c(vh,{logger:e,analytics:n,rpcClient:r})]})},Bh=({undoFn:e})=>{const{t}=oe();return c("div",{class:"flex flex-1 items-center justify-end px-1",children:c(xr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=j.current$.peek();at(r),e(r.data.nodeHistory)},children:c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},zh=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Rh},Symbol.toStringTag,{value:"Module"}))})();
|
|
38
|
+
`)}),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:ze(e.data.continueLabel,{submissions:r,context:l})}})}return i(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})},Pi="resume-prompt",dh=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:Pi,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 R.removeMessagesSentByNodeIds([Pi]),(n==null?void 0:n.value)!==!1},Ft=({class:e,...t})=>{const{t:r}=oe();return u("button",{class:nt("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"})]})})};var at;function Vi(e){return{lang:(e==null?void 0:e.lang)??(at==null?void 0:at.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(at==null?void 0:at.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(at==null?void 0:at.abortPipeEarly)}}var Bi;function uh(e){return Bi==null?void 0:Bi.get(e)}var zi;function fh(e){return zi==null?void 0:zi.get(e)}var Ui;function ph(e,t){var r;return(r=Ui==null?void 0:Ui.get(e))==null?void 0:r.get(t)}function Xt(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,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Xt(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??ph(e.reference,l.lang)??(c?fh(l.lang):null)??n.message??uh(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 Ye(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Vi())}}}function hh(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function bh(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function gh(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}},mh=/^[\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:mh,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&ye(this,"email",t,r),t}}}function Ar(e,t){return{kind:"validation",type:"max_length",reference:Ar,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():Xt(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():Xt(r.value)}),r}}}function Qt(e,t){return{kind:"validation",type:"min_length",reference:Qt,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():Xt(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():Xt(r.value)}),r}}}function qi(e,t){return{kind:"validation",type:"regex",reference:qi,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 Wi(e){return{kind:"transformation",type:"transform",reference:Wi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Ws(e){return{kind:"validation",type:"url",reference:Ws,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 vh(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Hs(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 Ye(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:i,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(a=r.issues)==null||a.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 Ye(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 Ye(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ye(this,"type",t,r),t}}}function ot(e,t){return{kind:"schema",type:"object",reference:ot,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ye(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:Hs(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:i,key:o,value:l};for(const d of c.issues)d.path?d.path.unshift(f):d.path=[f],(a=r.issues)==null||a.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]=vh(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:i,key:o,value:i[o]}]}),n.abortEarly))break}}else ye(this,"type",r,n);return r}}}function er(e,t){return{kind:"schema",type:"optional",reference:er,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ye(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Hs(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:bh(e.map(Xt),"|"),async:!1,options:e,message:t,get"~standard"(){return Ye(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 Ye(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(hh(a,l)){const c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){const b={type:"object",origin:"key",input:a,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),i.abortEarly){n.typed=!1;break}}const d=this.value["~run"]({value:c},i);if(d.issues){const b={type:"object",origin:"value",input:a,key:l,value:c};for(const p of d.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else ye(this,"type",n,i);return n}}}function De(e){return{kind:"schema",type:"string",reference:De,expects:"string",async:!1,message:e,get"~standard"(){return Ye(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},Vi(r));if(n.issues)throw new Vs(n.issues);return n.value}function wh(e,t){const r={};for(const n in e.entries)r[n]=!t||t.includes(n)?er(e.entries[n]):e.entries[n];return{...e,entries:r,get"~standard"(){return Ye(this)}}}function xt(...e){return{...e[0],pipe:e,get"~standard"(){return Ye(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 yh(e,t,r){const n=await e["~run"]({value:t},Vi(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const tr=({error:e})=>!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})]}),st=({class:e,...t})=>{const{t:r}=oe();return u("button",{type:"button",class:nt("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 Hi={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(Hi).find(n=>e.startsWith(n))??"",r=e.replace(t,"");return/^\d+$/.test(r)?{countryCode:t,phoneNumber:r}:{countryCode:"",phoneNumber:""}};const rr=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(""),lt=ot({name:De()}),Ch=ot({suggestions:Ks(ot({feature_type:er(De()),full_address:er(De()),place_formatted:er(De()),name:er(De()),mapbox_id:De(),context:wh(ot({address:lt,street:lt,neighborhood:lt,locality:lt,district:lt,place:lt,region:lt,postcode:lt,country:lt}))}))}),Eh=e=>(jt(()=>{e&&Ua(e)},[e]),bt(()=>{var r;const t=(r=R.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,i)=>{var c;const a=e&&Ua(e),o=(c=R.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 lf({query:n,country:a,session:t,surface:"chatbot",...s?{lat:o.lat,lng:o.lng}:{},signal:i},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 Ld(async p=>{const g=new URL(f);p&&g.searchParams.set("country",p);const v=await fetch(g.href,{signal:i});if(!v.ok)throw new Error(`Address lookup failed with ${v.status}`);return Xs(Ch,await v.json()).suggestions},a,i)).map(p=>{var g,v,x,C,_,M,D,j,z;return{country:a,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:(D=p.context.region)==null?void 0:D.name,postcode:((j=p.context.postcode)==null?void 0:j.name)??(p.feature_type==="postcode"?p.name:void 0),country:(z=p.context.country)==null?void 0:z.name}}})}),country:a}}}:{enabled:!1}},[e])),Qs=e=>{const{t}=oe();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:i})=>{const{t:a}=oe(),[o,s]=Be(),{enabled:l,getPredictions:c}=Eh(i),[f,d]=Be(l?"query":"manual"),[b,p]=Be(""),[g,v]=Be(),x=be(),C=()=>{var S;(S=x.current)==null||S.controller.abort(),x.current=void 0};jt(()=>C,[]);const _=be(),M=be(),D=be(!1),j=S=>{const k=S!==null?_.current:void 0,$=(k==null?void 0:k.lookup)??M.current;if($&&!D.current){D.current=!0;const F=q=>{const B=e.config.keys[q];return S&&B?S.value[B]:void 0},I=F("country")??(k==null?void 0:k.suggestion.address.country)??(k==null?void 0:k.suggestion.country),V=S&&is({postcode:F("postcode")??(k!=null&&k.edited||o==null?void 0:o.postcode),label:k!=null&&k.edited||k==null?void 0:k.suggestion.label,state:F("state")??(k!=null&&k.edited||o==null?void 0:o.state),country:I});cf({kind:"address",surface:"chatbot",...$,picked:!!k,...k?{edited:k.edited}:{},region:V??(I!=null&&I.trim()?"other":null)})}t(S)},z=S=>{var $;if(it(l,"Query state should not be enabled"),S=S.trim(),S===(($=x.current)==null?void 0:$.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(F=>{x.current===k&&(x.current=void 0,M.current={arm:F.arm,source:F.source},v({query:S,status:"done",items:F.results,...M.current,country:F.country}))},F=>{x.current===k&&(x.current=void 0,M.current={arm:"direct",source:"direct"},r.error("Failed to get address details",F instanceof Vs?"Unexpected response":F),v({query:S,status:"failed",error:a("address_error")}))})},A=(S,k)=>{_.current&&(o==null?void 0:o[S])!==k&&(_.current.edited=!0),s($=>({...$,[S]:k}))};switch(f){case"query":return it(l,"Query state should not be enabled"),u(Ah,{input:e,onSkip:()=>j(null),onAddressSelect:(S,k)=>{var F;if(S===""){x.current&&(C(),v(void 0)),d("manual");return}if((g==null?void 0:g.status)!=="done")return;const $=g.items.find(I=>I.id===S);$&&(g.arm!=="inploi"&&af({query:k,country:g.country,pickedLabel:$.label,pickedPostcode:$.address.postcode,pickedCountry:$.address.country,pickedState:$.address.state,log:I=>n.log({event:"ADDRESS_SHADOW_COMPARED",properties:I})}),((F=_.current)==null?void 0:F.suggestion.id)!==S?(s($.address),_.current={suggestion:$,lookup:{arm:g.arm,source:g.source},edited:!1}):_.current.lookup={arm:g.arm,source:g.source},d("details"))},onAddressSearch:z,lookup:g,query:b});case"details":return it(o!==void 0),u(el,{input:e,logger:r,onSubmitSuccess:j,addressFields:o,onFieldChange:A,actions:u(Qs,{onClick:()=>{d("query")}})});case"manual":return u(el,{logger:r,input:e,onSubmitSuccess:j,addressFields:o??{},onFieldChange:A,actions:l?u(Qs,{onClick:()=>{d("query")}}):e.config.optional?u(st,{onClick:()=>j(null)}):void 0})}},Ah=({input:e,onSkip:t,lookup:r,onAddressSelect:n,query:i,onAddressSearch:a})=>{const{t:o}=oe(),s=be(null);return je(()=>{s.current&&(s.current.focus(),s.current.select())},[]),u(ae,{children:[u("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&a(f)},class:"flex gap-2 p-2.5",children:[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:i,class:rr({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(st,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?u(tr,{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(ae,{children:[u(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}),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)??i??"")},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)??i??"")},children:u("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},Ki=["line1","line2","line3","city","state","postcode","country"],el=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:n,input:i})=>{const a=be(null);je(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(Hi),{t:s}=oe();return u("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=Ki.find(v=>i.config.keys[v]===p.name);g&&t(g,"")}if(f.length>0&&!c.checkValidity()){c.reportValidity();return}const d=new FormData(c),b=Object.fromEntries(d.entries());r({type:"address",value:b})},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:a,children:Ki.map((l,c)=>{const f=`isdk_${l}`,d=i.config.keys[l];return d?u(ae,{children:[u("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)}),u("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="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:d,id:f,defaultValue:e[l],onChange:b=>t(l,b.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?u("option",{value:e[l],children:e[l]}):u("option",{value:"",children:s("select_country")}),o.map(b=>u("option",{value:b,children:b},b))]}),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: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:d,id:f,defaultValue:e[l],onInput:b=>t(l,b.currentTarget.value),required:l==="line2"?i.config.line2Required===!0:l!=="line3"}),c===Ki.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(Ft,{class:"ml-auto"})]})]})},Gi=()=>{const e=be(null);return jt(()=>{var t;(t=e.current)==null||t.focus()},[]),e},tl=["true","false"],Ih=Js(tl),Th="answer",rl="flex items-center flex-wrap gap-2 p-2.5",nl="min-w-0 max-w-full flex-auto",il=ui(({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})})),jh=({input:e,onSubmitSuccess:t})=>{const r=Gi();return u("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=Cf(n).value,a=Xs(Ih,i);t({type:"boolean",value:a==="true"})},children:[u("ul",{class:rl,children:tl.map((n,i)=>u("li",{class:nl,children:u(il,{ref:i===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(st,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},al=e=>e.reduce((t,r)=>t+r.sizeKb,0),Dh=Jt("file"),ol=3,un=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Mh=({file:e,class:t,...r})=>{const{t:n}=oe(),[i,a]=un(e.name);return u("div",{class:nt("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:i}),u("span",{children:a})]}),u("p",{class:"text-accent-11",children:[u("span",{class:"sr-only",children:[n("file_size"),": "]}),zt(e.sizeKb)]})]})},sl=({class:e,...t})=>u("li",{class:nt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Oh=(e,t)=>{const[r,n]=un(e);return`${r.slice(0,t)}${n}`},ll=e=>({name:Oh(e.name,42),sizeKb:e.size/1e3}),Lh=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Fh=(e,t,r)=>{const n=un(t.name)[1].toLowerCase(),i=[...r.map(o=>o.toLowerCase()),...Lh],a=n===""?"none":i.includes(n)?n:"other";return`chatbot-file-refused:${e}:${a}`},Nh=({input:e,onSubmitSuccess:t,analytics:r})=>{var x;const n=(x=R.current$.value.flow)==null?void 0:x.data.submissions[e.key],[i,a]=Be(Dh(n)&&n.value.length?{status:"ready",files:n.value}:{status:"empty"}),o=be(0),s=i.status==="ready"?i.files:[],l=i.status==="ready"||i.status==="pending"?i.files:[],c=i.status==="error"?i.error:void 0,f=l.length-ol,d=al(l),b=Gi(),{t:p}=oe(),g=C=>{if(!C.length)return{reason:"required",error:{type:"required",message:p("validation_file")}};if(!_a(C,e.config.extensions))return{reason:"type",file:C.find(_=>!_a([_],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&&al(C)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:p("validation_file_size",{size:zt(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,D;return r.log({event:"INTERACTION",properties:{tag:Fh(C,_,e.config.extensions)},customProperties:(D=(M=R.current$.peek().flow)==null?void 0:M.analytics)==null?void 0:D.customProperties})};return u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:C=>{if(C.preventDefault(),i.status==="pending"||i.status==="error")return;const _=g(s);_?a({status:"error",error:_.error}):t({type:"file",value:s})},children:[u("div",{class:"flex items-center gap-2",children:[u("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?u("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]=un(C.name);return u(sl,{class:"flex overflow-hidden",children:[u("span",{class:"block truncate",children:_}),u("span",{children:M})]})}),f>0?u(sl,{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:zt(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(C=>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:C.replace(".","")}))})]})]}),u("p",{role:"status",class:nt("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:i.status==="pending"?u(ae,{children:[u(ln,{"aria-hidden":"true",class:"h-4 w-4"}),p("file_preparing",{count:l.length})]}):i.status==="ready"?u(ae,{children:[s.length>1?p("file_total_size",{size:zt(d)}):zt(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 C=>{it(C.target instanceof HTMLInputElement);const _=C.target.files?Array.from(C.target.files):[];C.target.value="";const[M]=_;if(!M)return;const D=++o.current,j=i.status==="ready",z=_.map(ll),A=g(z);if(A)return v(A.reason,A.file??M),a({status:"error",error:A.error});a({status:"pending",files:z});let S;try{const k=await Promise.all(_.map(async $=>{try{return{...ll($),data:await Wc($)}}catch(F){throw S??(S=$),F}}));o.current===D&&a({status:"ready",files:k})}catch{if(o.current!==D)return;v("unreadable",S??M),a({status:"error",error:{type:"invalid",message:p(j?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),u("div",{class:"flex h-full flex-col items-center gap-2",children:[u(Ft,{disabled:s.length===0}),e.config.optional&&u(st,{class:"relative",onClick:()=>t(null)})]})]}),u(tr,{error:c})]})};var Ir=e=>e.type==="checkbox",Nt=e=>e instanceof Date,Me=e=>e==null;const cl=e=>typeof e=="object";var le=e=>!Me(e)&&!Array.isArray(e)&&cl(e)&&!Nt(e),Rh=e=>le(e)&&e.target?Ir(e.target)?e.target.checked:e.target.value:e,Ph=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Vh=(e,t)=>e.has(Ph(t)),Bh=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},Yi=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ue(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Yi&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(le(e)&&Bh(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=ue(e[i]));return n}var fn=e=>/^\w*$/.test(e),ie=e=>e===void 0,Ji=e=>Array.isArray(e)?e.filter(Boolean):[],Zi=e=>Ji(e.replace(/["|']|\]/g,"").split(/\.|\[/)),O=(e,t,r)=>{if(!t||!le(e))return r;const n=(fn(t)?[t]:Zi(t)).reduce((i,a)=>Me(i)?i:i[a],e);return ie(n)||n===e?ie(e[t])?r:e[t]:n},Je=e=>typeof e=="boolean",Ue=e=>typeof e=="function",X=(e,t,r)=>{let n=-1;const i=fn(t)?[t]:Zi(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const c=e[s];l=le(c)||Array.isArray(c)?c:isNaN(+i[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const dl={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},qe={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ct={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zh=Se.createContext(null);zh.displayName="HookFormControlContext";var Uh=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==qe.all&&(t._proxyFormState[o]=!n||qe.all),r&&(r[o]=!0),e[o]}});return i};const qh=typeof window<"u"?Se.useLayoutEffect:Se.useEffect;var Ne=e=>typeof e=="string",Wh=(e,t,r,n,i)=>Ne(e)?(n&&t.watch.add(e),O(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),O(r,a))):(n&&(t.watchAll=!0),r),Xi=e=>Me(e)||!cl(e);function kt(e,t,r=new WeakSet){if(Xi(e)||Xi(t))return Object.is(e,t);if(Nt(e)&&Nt(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const o=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const s=t[a];if(Nt(o)&&Nt(s)||le(o)&&le(s)||Array.isArray(o)&&Array.isArray(s)?!kt(o,s,r):!Object.is(o,s))return!1}}return!0}const Hh=Se.createContext(null);Hh.displayName="HookFormContext";var ul=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Tr=e=>Array.isArray(e)?e:[e],fl=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}};function pl(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t[n];if(i&&le(i)&&a){const o=pl(i,a);le(o)&&(r[n]=o)}else e[n]&&(r[n]=a)}return r}var Ce=e=>le(e)&&!Object.keys(e).length,Qi=e=>e.type==="file",pn=e=>{if(!Yi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hl=e=>e.type==="select-multiple",ea=e=>e.type==="radio",Kh=e=>ea(e)||Ir(e),ta=e=>pn(e)&&e.isConnected;function Gh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=ie(e)?n++:e[t[n++]];return e}function Yh(e){for(const t in e)if(e.hasOwnProperty(t)&&!ie(e[t]))return!1;return!0}function ce(e,t){const r=Array.isArray(t)?t:fn(t)?[t]:Zi(t),n=r.length===1?e:Gh(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(le(n)&&Ce(n)||Array.isArray(n)&&Yh(n))&&ce(e,r.slice(0,-1)),e}var Jh=e=>{for(const t in e)if(Ue(e[t]))return!0;return!1};function bl(e){return Array.isArray(e)||le(e)&&!Jh(e)}function ra(e,t={}){for(const r in e){const n=e[r];bl(n)?(t[r]=Array.isArray(n)?[]:{},ra(n,t[r])):ie(n)||(t[r]=!0)}return t}function nr(e,t,r){r||(r=ra(t));for(const n in e){const i=e[n];if(bl(i))ie(t)||Xi(r[n])?r[n]=ra(i,Array.isArray(i)?[]:{}):nr(i,Me(t)?{}:t[n],r[n]);else{const a=t[n];r[n]=!kt(i,a)}}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&&!ie(e[0].attributes.value)?ie(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})=>ie(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 Qi(t)?t.files:ea(t)?_l(e.refs).value:hl(t)?[...t.selectedOptions].map(({value:r})=>r):Ir(t)?vl(e.refs).value:wl(ie(t.value)?e.ref.value:t.value,e)}var Zh=(e,t,r,n)=>{const i={};for(const a of e){const o=O(t,a);o&&X(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},hn=e=>e instanceof RegExp,jr=e=>ie(e)?e:hn(e)?e.source:le(e)?hn(e.value)?e.value.source:e.value:e,kl=e=>({isOnSubmit:!e||e===qe.onSubmit,isOnBlur:e===qe.onBlur,isOnChange:e===qe.onChange,isOnAll:e===qe.all,isOnTouch:e===qe.onTouched});const Sl="AsyncFunction";var Xh=e=>!!e&&!!e.validate&&!!(Ue(e.validate)&&e.validate.constructor.name===Sl||le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Sl)),Qh=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 Dr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=O(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Dr(s,t))break}else if(le(s)&&Dr(s,t))break}}};function El(e,t,r){const n=O(e,r);if(n||fn(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=O(t,a),s=O(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var eb=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Ce(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||qe.all))},tb=(e,t,r)=>!e||!t||e===t||Tr(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),rb=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,nb=(e,t)=>!Ji(O(e,t)).length&&ce(e,t),ib=(e,t,r)=>{const n=Tr(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)||Je(e)&&!e)return{type:r,message:Ne(e)?e:"",ref:t}}var ir=e=>le(e)&&!hn(e)?e:{value:e,message:""},Al=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:f,min:d,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,D=I=>{i&&M.reportValidity&&(M.setCustomValidity(Je(I)?"":I||""),M.reportValidity())},j={},z=ea(o),A=Ir(o),S=z||A,k=(x||Qi(o))&&ie(o.value)&&ie(_)||pn(o)&&o.value===""||_===""||Array.isArray(_)&&!_.length,$=ul.bind(null,v,n,j),F=(I,V,q,B=ct.maxLength,G=ct.minLength)=>{const Y=I?V:q;j[v]={type:I?B:G,message:Y,ref:o,...$(I?B:G,Y)}};if(a?!Array.isArray(_)||!_.length:l&&(!S&&(k||Me(_))||Je(_)&&!_||A&&!vl(s).isValid||z&&!_l(s).isValid)){const{value:I,message:V}=Ne(l)?{value:!!l,message:l}:ir(l);if(I&&(j[v]={type:ct.required,message:V,ref:M,...$(ct.required,V)},!n))return D(V),j}if(!k&&(!Me(d)||!Me(b))){let I,V;const q=ir(b),B=ir(d);if(!Me(_)&&!isNaN(_)){const G=o.valueAsNumber||_&&+_;Me(q.value)||(I=G>q.value),Me(B.value)||(V=G<B.value)}else{const G=o.valueAsDate||new Date(_),Y=Q=>new Date(new Date().toDateString()+" "+Q),ve=o.type=="time",fe=o.type=="week";Ne(q.value)&&_&&(I=ve?Y(_)>Y(q.value):fe?_>q.value:G>new Date(q.value)),Ne(B.value)&&_&&(V=ve?Y(_)<Y(B.value):fe?_<B.value:G<new Date(B.value))}if((I||V)&&(F(!!I,q.message,B.message,ct.max,ct.min),!n))return D(j[v].message),j}if((c||f)&&!k&&(Ne(_)||a&&Array.isArray(_))){const I=ir(c),V=ir(f),q=!Me(I.value)&&_.length>+I.value,B=!Me(V.value)&&_.length<+V.value;if((q||B)&&(F(q,I.message,V.message),!n))return D(j[v].message),j}if(p&&!k&&Ne(_)){const{value:I,message:V}=ir(p);if(hn(I)&&!_.match(I)&&(j[v]={type:ct.pattern,message:V,ref:o,...$(ct.pattern,V)},!n))return D(V),j}if(g){if(Ue(g)){const I=await g(_,r),V=$l(I,M);if(V&&(j[v]={...V,...$(ct.validate,V.message)},!n))return D(V.message),j}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,...$(V,q.message)},D(q.message),n&&(j[v]=I))}if(!Ce(I)&&(j[v]={ref:M,...I},!n))return j}}return D(!0),j};const ab={mode:qe.onSubmit,reValidateMode:qe.onChange,shouldFocusError:!0};function ob(e={}){let t={...ab,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ue(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=le(t.defaultValues)||le(t.values)?ue(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ue(i),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 b={...d};const p={array:fl(),state:fl()},g=t.criteriaMode===qe.all,v=h=>m=>{clearTimeout(c),c=setTimeout(h,m)},x=async h=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||b.isValid||h)){let m;t.resolver?(m=Ce((await S()).errors),C()):m=await $(n,!0),m!==r.isValid&&p.state.next({isValid:m})}},C=(h,m)=>{!t.disabled&&(d.isValidating||d.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,y=!0,E=!0)=>{if(T&&w&&!t.disabled){if(o.action=!0,E&&Array.isArray(O(n,h))){const P=w(O(n,h),T.argA,T.argB);y&&X(n,h,P)}if(E&&Array.isArray(O(r.errors,h))){const P=w(O(r.errors,h),T.argA,T.argB);y&&X(r.errors,h,P),nb(r.errors,h)}if((d.touchedFields||b.touchedFields)&&E&&Array.isArray(O(r.touchedFields,h))){const P=w(O(r.touchedFields,h),T.argA,T.argB);y&&X(r.touchedFields,h,P)}(d.dirtyFields||b.dirtyFields)&&(r.dirtyFields=nr(i,a)),p.state.next({name:h,isDirty:I(h,m),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else X(a,h,m)},M=(h,m)=>{X(r.errors,h,m),p.state.next({errors:r.errors})},D=h=>{r.errors=h,p.state.next({errors:r.errors,isValid:!1})},j=(h,m,w,T)=>{const y=O(n,h);if(y){const E=O(a,h,ie(w)?O(i,h):w);ie(E)||T&&T.defaultChecked||m?X(a,h,m?E:xl(y._f)):B(h,E),o.mount&&!o.action&&x()}},z=(h,m,w,T,y)=>{let E=!1,P=!1;const H={name:h};if(!t.disabled){if(!w||T){(d.isDirty||b.isDirty)&&(P=r.isDirty,r.isDirty=H.isDirty=I(),E=P!==H.isDirty);const K=kt(O(i,h),m);P=!!O(r.dirtyFields,h),K?ce(r.dirtyFields,h):X(r.dirtyFields,h,!0),H.dirtyFields=r.dirtyFields,E=E||(d.dirtyFields||b.dirtyFields)&&P!==!K}if(w){const K=O(r.touchedFields,h);K||(X(r.touchedFields,h,w),H.touchedFields=r.touchedFields,E=E||(d.touchedFields||b.touchedFields)&&K!==w)}E&&y&&p.state.next(H)}return E?H:{}},A=(h,m,w,T)=>{const y=O(r.errors,h),E=(d.isValid||b.isValid)&&Je(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?!kt(y,w):y)||!Ce(T)||E){const P={...T,...E&&Je(m)?{isValid:m}:{},errors:r.errors,name:h};r={...r,...P},p.state.next(P)}},S=async h=>(C(h,!0),await t.resolver(a,t.context,Zh(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},$=async(h,m,w={valid:!0})=>{for(const T in h){const y=h[T];if(y){const{_f:E,...P}=y;if(E){const H=s.array.has(E.name),K=y._f&&Xh(y._f);K&&d.validatingFields&&C([E.name],!0);const Ee=await Al(y,s.disabled,a,g,t.shouldUseNativeValidation&&!m,H);if(K&&d.validatingFields&&C([E.name]),Ee[E.name]&&(w.valid=!1,m||e.shouldUseNativeValidation))break;!m&&(O(Ee,E.name)?H?ib(r.errors,Ee,E.name):X(r.errors,E.name,Ee[E.name]):ce(r.errors,E.name))}!Ce(P)&&await $(P,m,w)}}return w.valid},F=()=>{for(const h of s.unMount){const m=O(n,h);m&&(m._f.refs?m._f.refs.every(w=>!ta(w)):!ta(m._f.ref))&&lr(h)}s.unMount=new Set},I=(h,m)=>!t.disabled&&(h&&m&&X(a,h,m),!kt(Or(),i)),V=(h,m,w)=>Wh(h,s,{...o.mount?a:ie(m)?i:Ne(h)?{[h]:m}:m},w,m),q=h=>Ji(O(o.mount?a:i,h,t.shouldUnregister?O(i,h,[]):[])),B=(h,m,w={})=>{const T=O(n,h);let y=m;if(T){const E=T._f;E&&(!E.disabled&&X(a,h,wl(m,E)),y=pn(E.ref)&&Me(m)?"":m,hl(E.ref)?[...E.ref.options].forEach(P=>P.selected=y.includes(P.value)):E.refs?Ir(E.ref)?E.refs.forEach(P=>{(!P.defaultChecked||!P.disabled)&&(Array.isArray(y)?P.checked=!!y.find(H=>H===P.value):P.checked=y===P.value||!!y)}):E.refs.forEach(P=>P.checked=P.value===y):Qi(E.ref)?E.ref.value="":(E.ref.value=y,E.ref.type||p.state.next({name:h,values:ue(a)})))}(w.shouldDirty||w.shouldTouch)&&z(h,y,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&Q(h)},G=(h,m,w)=>{for(const T in m){if(!m.hasOwnProperty(T))return;const y=m[T],E=h+"."+T,P=O(n,E);(s.array.has(h)||le(y)||P&&!P._f)&&!Nt(y)?G(E,y,w):B(E,y,w)}},Y=(h,m,w={})=>{const T=O(n,h),y=s.array.has(h),E=ue(m);X(a,h,E),y?(p.array.next({name:h,values:ue(a)}),(d.isDirty||d.dirtyFields||b.isDirty||b.dirtyFields)&&w.shouldDirty&&p.state.next({name:h,dirtyFields:nr(i,a),isDirty:I(h,E)})):T&&!T._f&&!Me(E)?G(h,E,w):B(h,E,w),Cl(h,s)?p.state.next({...r,name:h,values:ue(a)}):p.state.next({name:o.mount?h:void 0,values:ue(a)})},ve=async h=>{o.mount=!0;const m=h.target;let w=m.name,T=!0;const y=O(n,w),E=K=>{T=Number.isNaN(K)||Nt(K)&&isNaN(K.getTime())||kt(K,O(a,w,K))},P=kl(t.mode),H=kl(t.reValidateMode);if(y){let K,Ee;const Vt=m.type?xl(y._f):Rh(h),Ct=h.type===dl.BLUR||h.type===dl.FOCUS_OUT,rg=!Qh(y._f)&&!t.resolver&&!O(r.errors,w)&&!y._f.deps||rb(Ct,O(r.touchedFields,w),r.isSubmitted,H,P),ia=Cl(w,s,Ct);X(a,w,Vt),Ct?(!m||!m.readOnly)&&(y._f.onBlur&&y._f.onBlur(h),l&&l(0)):y._f.onChange&&y._f.onChange(h);const aa=z(w,Vt,Ct),ng=!Ce(aa)||ia;if(!Ct&&p.state.next({name:w,type:h.type,values:ue(a)}),rg)return(d.isValid||b.isValid)&&(t.mode==="onBlur"?Ct&&x():Ct||x()),ng&&p.state.next({name:w,...ia?{}:aa});if(!Ct&&ia&&p.state.next({...r}),t.resolver){const{errors:Vl}=await S([w]);if(C([w]),E(Vt),T){const ig=El(r.errors,n,w),Bl=El(Vl,n,ig.name||w);K=Bl.error,w=Bl.name,Ee=Ce(Vl)}}else C([w],!0),K=(await Al(y,s.disabled,a,g,t.shouldUseNativeValidation))[w],C([w]),E(Vt),T&&(K?Ee=!1:(d.isValid||b.isValid)&&(Ee=await $(n,!0)));T&&(y._f.deps&&(!Array.isArray(y._f.deps)||y._f.deps.length>0)&&Q(y._f.deps),A(w,Ee,K,aa))}},fe=(h,m)=>{if(O(r.errors,m)&&h.focus)return h.focus(),1},Q=async(h,m={})=>{let w,T;const y=Tr(h);if(t.resolver){const E=await k(ie(h)?h:y);w=Ce(E),T=h?!y.some(P=>O(E,P)):w}else h?(T=(await Promise.all(y.map(async E=>{const P=O(n,E);return await $(P&&P._f?{[E]:P}:P)}))).every(Boolean),!(!T&&!r.isValid)&&x()):T=w=await $(n);return p.state.next({...!Ne(h)||(d.isValid||b.isValid)&&w!==r.isValid?{}:{name:h},...t.resolver||!h?{isValid:w}:{},errors:r.errors}),m.shouldFocus&&!T&&Dr(n,fe,h?y:s.mount),T},Or=(h,m)=>{let w={...o.mount?a:i};return m&&(w=pl(m.dirtyFields?r.dirtyFields:r.touchedFields,w)),ie(h)?w:Ne(h)?O(w,h):h.map(T=>O(w,T))},ar=(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)}),U=h=>{const m=h?Tr(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:{}})},or=(h,m,w)=>{const T=(O(n,h,{_f:{}})._f||{}).ref,y=O(r.errors,h)||{},{ref:E,message:P,type:H,...K}=y;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()},sr=(h,m)=>Ue(h)?p.state.subscribe({next:w=>"values"in w&&h(V(void 0,m),w)}):V(h,m,!0),St=h=>p.state.subscribe({next:m=>{tb(h.name,m.name,h.exact)&&eb(m,h.formState||d,yn,h.reRenderRoot)&&h.callback({values:{...a},...r,...m,defaultValues:i})}}).unsubscribe,Rt=h=>(o.mount=!0,b={...b,...h.formState},St({...h,formState:{...f,...h.formState}})),lr=(h,m={})=>{for(const w of h?Tr(h):s.mount)s.mount.delete(w),s.array.delete(w),m.keepValue||(ce(n,w),ce(a,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(i,w);p.state.next({values:ue(a)}),p.state.next({...r,...m.keepDirty?{isDirty:I()}:{}}),!m.keepIsValid&&x()},Lr=({disabled:h,name:m})=>{if(Je(h)&&o.mount||h||s.disabled.has(m)){const y=s.disabled.has(m)!==!!h;h?s.disabled.add(m):s.disabled.delete(m),y&&o.mount&&!o.action&&x()}},dt=(h,m={})=>{let w=O(n,h);const T=Je(m.disabled)||Je(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?Lr({disabled:Je(m.disabled)?m.disabled:t.disabled,name:h}):j(h,!0,m.value),{...T?{disabled:m.disabled||t.disabled}:{},...t.progressive?{required:!!m.required,min:jr(m.min),max:jr(m.max),minLength:jr(m.minLength),maxLength:jr(m.maxLength),pattern:jr(m.pattern)}:{},name:h,onChange:ve,onBlur:ve,ref:y=>{if(y){dt(h,m),w=O(n,h);const E=ie(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,P=Kh(E),H=w._f.refs||[];if(P?H.find(K=>K===E):E===w._f.ref)return;X(n,h,{_f:{...w._f,...P?{refs:[...H.filter(ta),E,...Array.isArray(O(i,h))?[{}]:[]],ref:{type:E.type,name:h}}:{ref:E}}}),j(h,!1,void 0,E)}else w=O(n,h,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||m.shouldUnregister)&&!(Vh(s.array,h)&&o.action)&&s.unMount.add(h)}}},cr=()=>t.shouldFocusError&&Dr(n,fe,s.mount),vn=h=>{Je(h)&&(p.state.next({disabled:h}),Dr(n,(m,w)=>{const T=O(n,w);T&&(m.disabled=T._f.disabled||h,Array.isArray(T._f.refs)&&T._f.refs.forEach(y=>{y.disabled=T._f.disabled||h}))},0,!1))},dr=(h,m)=>async w=>{let T;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let y=ue(a);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:E,values:P}=await S();C(),r.errors=E,y=ue(P)}else await $(n);if(s.disabled.size)for(const E of s.disabled)ce(y,E);if(ce(r.errors,"root"),Ce(r.errors)){p.state.next({errors:{}});try{await h(y,w)}catch(E){T=E}}else m&&await m({...r.errors},w),cr(),setTimeout(cr);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ce(r.errors)&&!T,submitCount:r.submitCount+1,errors:r.errors}),T)throw T},ur=(h,m={})=>{O(n,h)&&(ie(m.defaultValue)?Y(h,ue(O(i,h))):(Y(h,m.defaultValue),X(i,h,ue(m.defaultValue))),m.keepTouched||ce(r.touchedFields,h),m.keepDirty||(ce(r.dirtyFields,h),r.isDirty=m.defaultValue?I(h,ue(O(i,h))):I()),m.keepError||(ce(r.errors,h),d.isValid&&x()),p.state.next({...r}))},Pt=(h,m={})=>{const w=h?ue(h):i,T=ue(w),y=Ce(h),E=y?i:T;if(m.keepDefaultValues||(i=w),!m.keepValues){if(m.keepDirtyValues){const P=new Set([...s.mount,...Object.keys(nr(i,a))]);for(const H of Array.from(P)){const K=O(r.dirtyFields,H),Ee=O(a,H),Vt=O(E,H);K&&!ie(Ee)?X(E,H,Ee):!K&&!ie(Vt)&&Y(H,Vt)}}else{if(Yi&&ie(h))for(const P of s.mount){const H=O(n,P);if(H&&H._f){const K=Array.isArray(H._f.refs)?H._f.refs[0]:H._f.ref;if(pn(K)){const Ee=K.closest("form");if(Ee){Ee.reset();break}}}}if(m.keepFieldsRef)for(const P of s.mount)Y(P,O(E,P));else n={}}a=t.shouldUnregister?m.keepDefaultValues?ue(i):{}:ue(E),p.array.next({values:{...E}}),p.state.next({values:{...E}})}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&&!Ce(E),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:y?!1:m.keepDirty?r.isDirty:!!(m.keepDefaultValues&&!kt(h,i)),isSubmitted:m.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:y?{}:m.keepDirtyValues?m.keepDefaultValues&&a?nr(i,a):r.dirtyFields:m.keepDefaultValues&&h?nr(i,h):m.keepDirty?r.dirtyFields:{},touchedFields:m.keepTouched?r.touchedFields:{},errors:m.keepErrors?r.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Fr=(h,m)=>Pt(Ue(h)?h(a):h,{...t.resetOptions,...m}),wn=(h,m={})=>{const w=O(n,h),T=w&&w._f;if(T){const y=T.refs?T.refs[0]:T.ref;y.focus&&setTimeout(()=>{y.focus(),m.shouldSelect&&Ue(y.select)&&y.select()})}},yn=h=>{r={...r,...h}},Nr={control:{register:dt,unregister:lr,getFieldState:ar,handleSubmit:dr,setError:or,_subscribe:St,_runSchema:S,_updateIsValidating:C,_focusError:cr,_getWatch:V,_getDirty:I,_setValid:x,_setFieldArray:_,_setDisabledField:Lr,_setErrors:D,_getFieldArray:q,_reset:Pt,_resetDefaultValues:()=>Ue(t.defaultValues)&&t.defaultValues().then(h=>{Fr(h,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:F,_disableForm:vn,_subjects:p,_proxyFormState:d,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(h){o=h},get _defaultValues(){return i},get _names(){return s},set _names(h){s=h},get _formState(){return r},get _options(){return t},set _options(h){t={...t,...h}}},subscribe:Rt,trigger:Q,register:dt,handleSubmit:dr,watch:sr,setValue:Y,getValues:Or,reset:Fr,resetField:ur,clearErrors:U,unregister:lr,setError:or,setFocus:wn,getFieldState:ar};return{...Nr,formControl:Nr}}function bn(e={}){const t=Se.useRef(void 0),r=Se.useRef(void 0),[n,i]=Se.useState({isDirty:!1,isValidating:!1,isLoading:Ue(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:Ue(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ue(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=ob(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,qh(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),Se.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),Se.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),Se.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),Se.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),Se.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),Se.useEffect(()=>{var o;e.values&&!kt(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),Se.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=Se.useMemo(()=>Uh(n,a),[a,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()}},sb=(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(i=>Il(i,r,e))}},lb=(e,t)=>{t.shouldUseNativeValidation&&sb(e,t);const r={};for(const n in e){const i=O(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(cb(t.names||Object.keys(e),n)){const o=Object.assign({},O(r,n));X(o,"root",a),X(r,n,o)}else X(r,n,a)}return r},cb=(e,t)=>e.some(r=>r.startsWith(t+"."));var gn=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(yh(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=gh(c);if(f&&(l[f]||(l[f]={message:c.message,type:c.type}),o)){var d=l[f].types,b=d&&d[c.type];l[f]=ul(f,o,l,c.type,b?[].concat(b,c.message):c.message)}s.issues.shift()}return{values:{},errors:lb(l,a)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Tl=27,jl=12,Dl=10,db=Jt("enum"),ub=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return gn(ot({checked:xt(Zs(De(),Gs()),Wi(n=>Object.entries(n).filter(([i,a])=>a).map(([i,a])=>i)),Ar(r.max,t("validation_multiple_choice_max",{count:r.max})),Qt(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},fb=ui(({option:e,...t},r)=>u(ae,{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})]})),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}}}),pb=({input:e,onSubmitSuccess:t})=>{var f,d;const r=e.key?(f=R.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.maxSelected===1,i=n&&e.config.options.length===2,{t:a}=oe(),{register:o,handleSubmit:s,formState:{errors:l}}=bn({defaultValues:{checked:n?{}:db(r)?Object.fromEntries(r.value.map(b=>[b,!0])):{}},resolver:ub(e.config,a)}),c=Gi();return i?u(ae,{children:[u("ul",{style:{maxHeight:6.5*Tl+5*jl+2*Dl},class:Ml({variant:"booleanLike"}),children:e.config.options.map((b,p)=>u("li",{class:nl,children:u(il,{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&&u("div",{class:"px-2 pb-2",children:u(st,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):u("form",{noValidate:!0,onSubmit:b=>s(p=>{const g=p.checked;t({type:"enum",value:g})})(b),children:[u("div",{class:"flex items-center gap-1",children:[u("ul",{style:{maxHeight:6.5*Tl+5*jl+2*Dl},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 u("li",{class:"relative",children:u(fb,{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)})}),u("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:u(Ft,{}),e.config.minSelected===0&&u(st,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),u("div",{class:"px-1",children:u(tr,{error:(d=l.checked)==null?void 0:d.root})})]})},hb=Jt("number"),bb=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,i=e.decimalCases??0;return gn(ot({number:xt(Ys(t("validation_number")),qs(r,t("validation_number_min",{min:r})),Us(n,t("validation_number_max",{max:n})),Bs(a=>a===Number(a.toFixed(i)),t("validation_number_decimal_cases",{count:i})))}))},gb=({input:e,onSubmitSuccess:t})=>{var d;const r=e.config.defaultValue,n=e.key?(d=R.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:i}=oe(),{register:a,handleSubmit:o,formState:{errors:s}}=bn({defaultValues:{number:hb(n)?n.value:r?Number(r):void 0},resolver:bb(e.config,i)}),{ref:l,...c}=a("number",{required:!e.config.optional,valueAsNumber:!0}),f=be();return je(()=>{f.current&&(f.current.focus(),f.current.select())},[]),u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(b=>{b.number!==void 0&&t({type:"number",value:b.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:b=>{b&&(f.current=b),l(b)},type:"text",min:e.config.min,max:e.config.max,class:rr({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(st,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),u(Ft,{})]}),u(tr,{error:s.number})]})},mb="44",vb=/^[0-9 ]+$/,wb=Jt("string"),yb=Jt("phone"),_b=e=>{const t=xt(De(e("validation_country_code")),qi(vb,e("validation_country_code"))),r=xt(De(e("validation_phone")),Qt(1,e("validation_phone")),Wi(n=>n.replace(/[^0-9]/g,"")));return gn(ot({countryCode:t,phoneNumber:r}))},xb=({input:e,onSubmitSuccess:t})=>{var v;const r=e.key?(v=R.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,{t:n}=oe(),[i,a]=Be(),o=wb(r)?_h(r.value):yb(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??mb,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:_b(n)}),{ref:d,...b}=s("phoneNumber",{required:!e.config.optional}),p=be(),g=f("countryCode");return je(()=>{p.current&&(p.current.focus(),p.current.select())},[]),u("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,"");a(void 0);const M=e.config.minChars??7,D=C.length+_.length;if(D<M)return a(n("validation_phone_min_chars",{count:M}));const j=e.config.maxChars;if(j!=null&&D>j)return a(n("validation_max_chars",{count:j}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:_,phoneNumber:C}}):t({type:"string",value:g+x.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(Hi).map(([x,C])=>u("option",{value:C,children:[x," (+",C,")"]},x))})]}),u("input",{...b,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(p.current=x),d(x)},class:rr({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&u(st,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),u(Ft,{})]}),u(tr,{error:c.countryCode||c.phoneNumber||{message:i}})]})},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:$a(r,t)}):e("submission_cooldown",{count:n}),kb=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},Sb=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=oe(),{availableAt:i}=e.config,[a,o]=Be(()=>mn(i)),[s,l]=Be("");jt(()=>{const f=mn(i);if(o(f),f===0)return;l(Ol(r,n,i,f));const d=setInterval(()=>{const b=mn(i);o(b),!(b>0)&&(clearInterval(d),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(d)},[i,n,r]);const c=a>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:()=>{mn(i)>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:kb(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:Ol(r,n,i,a)}),u("p",{role:"status",class:"sr-only",children:s})]})},Cb=160,Ll=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Cb)}px`},Eb={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},$b=Jt("string"),Ab=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return gn(ot({text:{date:xt(De(t("validation_date")),qi(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:xt(De(t("validation_email")),zs(t("validation_email")),Qt(e.minChars??1,r.minLength),Ar(e.maxChars??1/0,r.maxLength)),text:xt(De(),Qt(e.minChars??1,r.minLength),Ar(e.maxChars??1/0,r.maxLength)),url:xt(De(t("validation_url")),Ws(t("validation_url")),Qt(e.minChars??1,r.minLength),Ar(e.maxChars??1/0,r.maxLength))}[e.format]}))},Ib={text:({input:e,onSubmitSuccess:t})=>{var v;const{t:r}=oe(),n=e.key?(v=R.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,i=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:c}}=bn({defaultValues:{text:$b(n)?n.value:i??""},resolver:Ab(e.config,r)}),{ref:f,...d}=o("text",{required:!e.config.optional}),b=be();je(()=>{b.current&&(b.current instanceof HTMLTextAreaElement&&Ll(b.current),b.current.focus(),b.current.select())},[]);const p=e.config.maxChars,g=a&&p!==void 0?l("text").length:void 0;return u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(x=>{t({type:"string",value:x.text})}),children:[u("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-1",children:[a?u("textarea",{id:"chat-input",...d,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:rr({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):u("input",{id:"chat-input",...d,...Eb[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(b.current=x),f(x)},placeholder:e.config.placeholder,class:rr({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&u(st,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),u(Ft,{})]}),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(tr,{error:c.text})]})},phone:xb,"multiple-choice":pb,boolean:jh,file:Nh,submit:Sb,address:$h,number:gb},Tb=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=R.current$.value.flow)==null?void 0:o.data.currentInput,i=be(null),a=()=>ne.onInteractionFn$.value();return je(()=>{var s;(s=i.current)==null||s.scrollTo({top:0})},[n]),u("div",{ref:i,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?a:void 0,onKeyDownCapture:n?a:void 0,children:n?(()=>{const s=Ib[n.type];return u(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:ne.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:rr({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),u(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 Db=function(e){return e instanceof RegExp},Mb=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"},Ob=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Lb(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!Fl(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Db(a)||(a=new RegExp("("+Mb(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=i}return o}var Fb=function(t,r,n){return Array.isArray(t)||(t=[t]),Ob(t.map(function(i){return Fl(i)?Lb(i,r,n):i}))};const Mr=jb(Fb),Nb=/(\[[^\]]+\]\([^)]+\))/g,Rb=/\[([^\]]+)\]\(([^)]+)\)/,Pb=/(https?:\/\/[^\s]+)/g,Vb=/_(.*?)_/g,Bb=/\*\*(.*?)\*\*/g,zb=/(\\n|\n)/g,Nl="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Ub=e=>{const t=Mr(e,Nb,(s,l)=>{const[,c,f]=s.match(Rb)??[];return f?u("a",{class:Nl,href:f,children:c??f},f+l):u("span",{children:"INVALID LINK"})}),r=Mr(t,Pb,(s,l)=>u("a",{class:Nl,href:s,children:s},s+l)),n=Mr(r,Vb,(s,l)=>u("em",{children:s},s+l)),i=Mr(n,Bb,(s,l)=>u("strong",{children:s},s+l));let a=0;return Mr(i,zb,()=>u("br",{},`br-${a++}`))},qb=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,...i})=>u("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:qb({className:t,side:n,animate:r}),...i,children:e}),Rl=new Map,Pl=ef({overrides:{},locale:void 0}),Hb=(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},Kb=({flow:e,rpcClient:t})=>{const{t:r}=oe(),n=e.data.flowSessionId,i=Rl.get(n)??Le("offer");Rl.set(n,i);const a=l=>{const c=e.data.submissions[l];return(c==null?void 0:c.type)==="string"?c.value.trim():void 0},o=a("email")||e.nodes.flatMap(l=>l.type==="question-text"&&l.data.format==="email"?[a(l.data.key)]:[]).find(l=>!!l);if(!o||i.value==="declined")return null;if(i.value==="success")return u("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(i.value!=="offer"&&i.value!=="error")){i.value="saving";try{await Td(t,{contact:{email:o,first_name:a("first_name"),last_name:a("last_name")},job:e.job}),i.value="success"}catch{i.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})}),i.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:i.value==="saving",onClick:s,children:r("job_alerts_accept")}),u("button",{type:"button",class:"min-h-[44px] rounded-lg px-3 py-2",disabled:i.value==="saving",onClick:()=>{i.value!=="offer"&&i.value!=="error"||(i.value="declined")},children:r("job_alerts_decline")})]}),u("p",{class:"text-xs",children:Hb(r,e.employer)})]})},Gb=({message:e})=>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: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,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"})})]})}),Yb=({className:e,...t})=>u("div",{"aria-hidden":!0,children:ne.isBotTyping$.value===!0?u("div",{"data-testid":"typing-indicator",class:nt("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}),Jb={bot:"left",user:"right"},Zb=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"}}}),Xb=({env:e,lastSentMessageFooter:t,rpcClient:r})=>{const{t:n}=oe(),i=R.current$.value.flow,a=(i==null?void 0:i.data.messages)??[],o=a.findIndex(l=>l.type==="system"&&l.semantic==="submission-closed"),s=i?Fi(i):void 0;return u("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:[a.map((l,c)=>u(ae,{children:[u("li",{class:"flex",tabIndex:c===a.length-1?-1:void 0,children:[s&&l.groupId===s&&!a.slice(c+1).some(f=>f.groupId===s)?t:null,rn(l).with({type:"system"},f=>u("p",{class:Zb({variant:f.variant}),children:f.text})).with({type:"text",author:Dt.union("bot","user")},f=>{const d=c===a.length-1,b=f.author==="bot"?Ub(f.text):f.text;return u(ae,{children:u(Wb,{animate:d,side:Jb[f.author],children:b},c)})}).with({type:"link"},f=>u(Gb,{message:f})).with({type:"image"},f=>u("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=>u(Mh,{class:f.author==="bot"?void 0:"ml-auto",file:{name:f.fileName,sizeKb:f.fileSizeKb}})).with({type:"loading"},f=>{const d=a[a.length-1];return!(f===d)||ne.isBotTyping$.value||i!=null&&i.data.isFinished?null:u("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[u(ln,{"aria-hidden":f.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),f.text?u("p",{role:"status",class:"text-neutral-11 text-sm",children:f.text}):null]})}).exhaustive()]}),c===o&&(i!=null&&i.jobAlerts)&&r?u("li",{children:u(Kb,{flow:i,rpcClient:r},i.data.flowSessionId)}):null]},c)),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:ne.captchaVisible$.value?"flex":"hidden",children:u("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"),u(Yb,{},"typing")]})},Qb=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:i,env:a})=>{const{flow:o}=R.current$.value;it(o,"Flow is required to exist to show chatbot body");const s=R.viewState$.value,{chatRef:l,chatService:c}=Wf(),{t:f}=oe(),[d,b]=Be();return je(()=>{s==="maximised"&&ne.scrollToEnd()},[s]),je(()=>{var A;const{state:p,flow:g}=R.current$.peek();if(p!=="loaded")throw new Error(f("invalid_state"));let v=g.data.nodeHistory.at(-1);if(ne.scrollToEnd(),R.setInput(void 0),g.data.isFinished)return;const x=()=>{const S=R.current$.peek().flow;!S||S.data.hasInteracted||(R.markAsInteracted(),Ps(n,S,"FLOW_INTERACT"))};ne.onInteractionFn$.value=x,v===void 0?(v=Ls(o.nodes).id,R.setCurrentNodeId(v),Ps(n,g,"FLOW_START")):R.removeMessagesSentByNodeIds([v,Pi]);const{interpret:C,abort:_,undo:M}=Np({context:o.context,analytics:{service:n,customProperties:(A=o.analytics)==null?void 0:A.customProperties},apiClient:t,logger:e,talentBankClient:i,flow:o,chatService:c,t:f,getApplicationRecovery:()=>{var S;return(S=R.current$.peek().flow)==null?void 0:S.data.applicationRecovery},setApplicationRecovery:R.setApplicationRecovery,persistWriteBarrier:()=>R.persistWriteBarrier(g),getSubmissions:()=>{var S;return(S=R.current$.peek().flow)==null?void 0:S.data.submissions},onInterpret:S=>R.setCurrentNodeId(S.id),onFlowEnd:async()=>{var k;R.markAsFinished();const S=R.current$.peek().flow;it(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})}}),D=v,j=()=>{b(()=>M),C(D)},z=new AbortController;return g.offerResume?dh({chatService:c,t:f,signal:z.signal}).then(S=>(R.settleResume(g),S?j():(R.restart(),Fe.flushStateData()))).catch(S=>{S instanceof ft||e.error("Resume prompt failed",S)}):j(),()=>{z.abort(),ne.onInteractionFn$.value===x&&(ne.onInteractionFn$.value=()=>{}),_()}},[n,t,c,e,o,i,f]),u(ae,{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(Xb,{env:a,rpcClient:r,lastSentMessageFooter:!Fi(o)||!d?null:u(eg,{undoFn:d})})}),ne.isReadingHistory$.value&&!o.data.isFinished&&!ne.isBotTyping$.value&&u("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:u(Cr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var g,v;ne.scrollToEnd(),(v=((g=l.current)==null?void 0:g.querySelector('li[tabindex="-1"]'))??l.current)==null||v.focus({preventScroll:!0})},children:u(ws,{})})})]}),u(Tb,{logger:e,analytics:n,rpcClient:r})]})},eg=({undoFn:e})=>{const{t}=oe();return u("div",{class:"flex flex-1 items-center justify-end px-1",children:u(Cr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=R.current$.peek();it(r),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"})})})},tg=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Qb},Symbol.toStringTag,{value:"Module"}))})();
|