@inploi/plugin-chatbot 14.17.3 → 14.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -1
- package/cdn/index.js +34 -6
- package/cdn/style.css +1 -1
- package/dist/chatbot-body-DjE1hhPI.js +4309 -0
- package/dist/chatbot-body-Y8XV3f3-.cjs +5 -0
- package/dist/common.geo-transport-CJGUJXTA-BsgnqoTX.js +41 -0
- package/dist/common.geo-transport-CJGUJXTA-DQyNyTXw.cjs +1 -0
- package/dist/index-C8Gr0Ijn.js +3198 -0
- package/dist/index-DSa7ZKqt.cjs +21 -0
- package/dist/index.d.cts +547 -0
- package/dist/index.d.ts +547 -2
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +2 -3
- package/dist/style.css +1 -1
- package/package.json +18 -13
- package/dist/accessible-labels.test.d.ts +0 -1
- package/dist/chatbot-body-2942441d.cjs +0 -5
- package/dist/chatbot-body-73450740.js +0 -4523
- package/dist/chatbot.analytics.d.ts +0 -37
- package/dist/chatbot.analytics.test.d.ts +0 -1
- package/dist/chatbot.api.d.ts +0 -26
- package/dist/chatbot.constants.d.ts +0 -2
- package/dist/chatbot.context.test.d.ts +0 -1
- package/dist/chatbot.d.ts +0 -104
- package/dist/chatbot.dom.d.ts +0 -5
- package/dist/chatbot.idb.d.ts +0 -73
- package/dist/chatbot.lifecycle.test.d.ts +0 -1
- package/dist/chatbot.resume.d.ts +0 -15
- package/dist/chatbot.resume.test.d.ts +0 -1
- package/dist/chatbot.state.d.ts +0 -78
- package/dist/chatbot.state.test.d.ts +0 -1
- package/dist/chatbot.storage.test.d.ts +0 -1
- package/dist/chatbot.utils.d.ts +0 -8
- package/dist/components/chat-bubble.d.ts +0 -11
- package/dist/components/chat-error.d.ts +0 -3
- package/dist/components/chat-input/chat-input.address-countries.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.address.d.ts +0 -5
- package/dist/components/chat-input/chat-input.address.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.boolean.d.ts +0 -11
- package/dist/components/chat-input/chat-input.constants.d.ts +0 -1
- package/dist/components/chat-input/chat-input.d.ts +0 -12
- package/dist/components/chat-input/chat-input.file.d.ts +0 -8
- package/dist/components/chat-input/chat-input.file.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.multiple-choice.d.ts +0 -4
- package/dist/components/chat-input/chat-input.multiple-choice.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.number.d.ts +0 -4
- package/dist/components/chat-input/chat-input.phone-number.d.ts +0 -4
- package/dist/components/chat-input/chat-input.submit.d.ts +0 -4
- package/dist/components/chat-input/chat-input.submit.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.text.d.ts +0 -5
- package/dist/components/chat-input/chat-input.text.test.d.ts +0 -1
- package/dist/components/chat-input/input-style.d.ts +0 -3
- package/dist/components/chat-loading.d.ts +0 -1
- package/dist/components/chatbot-body.d.ts +0 -12
- package/dist/components/chatbot-body.lifecycle.test.d.ts +0 -1
- package/dist/components/chatbot.d.ts +0 -17
- package/dist/components/conversation.d.ts +0 -8
- package/dist/components/correction.test.d.ts +0 -1
- package/dist/components/input-error.d.ts +0 -5
- package/dist/components/job-alerts-offer.d.ts +0 -13
- package/dist/components/job-alerts-offer.test.d.ts +0 -1
- package/dist/components/job-alerts-privacy-line.test.d.ts +0 -1
- package/dist/components/loading-indicator.d.ts +0 -3
- package/dist/components/message.link.d.ts +0 -5
- package/dist/components/palette-debugger.d.ts +0 -1
- package/dist/components/send-button.d.ts +0 -3
- package/dist/components/skip-button.d.ts +0 -3
- package/dist/components/status-bar.d.ts +0 -22
- package/dist/components/status-bar.test.d.ts +0 -1
- package/dist/components/transition.d.ts +0 -1
- package/dist/components/typing-indicator.d.ts +0 -3
- package/dist/components/useChatService.d.ts +0 -17
- package/dist/components/useChatService.test.d.ts +0 -1
- package/dist/components/useFocus.d.ts +0 -1
- package/dist/i18n.d.ts +0 -776
- package/dist/index-0685e04a.cjs +0 -5
- package/dist/index-8df73cbc.js +0 -3530
- package/dist/index.cdn.d.ts +0 -9
- package/dist/index.dev.d.ts +0 -8
- package/dist/interpreter.test.d.ts +0 -1
- package/dist/md.d.ts +0 -1
- package/dist/md.test.d.ts +0 -1
- package/dist/mocks/browser.d.ts +0 -1
- package/dist/mocks/flows.mocks.d.ts +0 -77
- package/dist/mocks/handlers.d.ts +0 -14
- package/dist/mocks/mocks.utils.d.ts +0 -5
- package/dist/mocks/pre-apply.mock.d.ts +0 -296
- package/dist/phone.test.d.ts +0 -1
- package/dist/progress.d.ts +0 -12
- package/dist/progress.test.d.ts +0 -1
- package/dist/rpc.d.ts +0 -1
- package/dist/style/theme.d.ts +0 -3
- package/dist/style/theme.utils.d.ts +0 -6
- package/dist/style/tokens.d.ts +0 -86
- package/dist/widget-version.d.ts +0 -7
- package/dist/widget-version.test.d.ts +0 -1
package/cdn/index.js
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
var tg=Object.defineProperty;var rg=(_e,We,Xe)=>We in _e?tg(_e,We,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):_e[We]=Xe;var pe=(_e,We,Xe)=>(rg(_e,typeof We!="symbol"?We+"":We,Xe),Xe);(function(){"use strict";var _e;function We(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 Cl(e){return Xe==null?void 0:Xe.get(e)}var bn;function El(e){return bn==null?void 0:bn.get(e)}var vn;function $l(e,t){var r;return(r=vn==null?void 0:vn.get(e))==null?void 0:r.get(t)}function wn(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 Ae(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)??wn(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??$l(e.reference,l.lang)??(c?El(l.lang):null)??n.message??Cl(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},We())}}}function Al(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function mn(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function ea(e){return{kind:"transformation",type:"transform",reference:ea,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Il(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function yn(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function ta(){return{kind:"schema",type:"any",reference:ta,expects:"any",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function ra(e,t){return{kind:"schema",type:"array",reference:ra,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 Ae(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:Ae(this,"type",t,r),t}}}function Ie(e,t){return{kind:"schema",type:"literal",reference:Ie,expects:wn(e),async:!1,literal:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Ae(this,"type",r,n),r}}}function na(e){return{kind:"schema",type:"null",reference:na,expects:"null",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return t.value===null?t.typed=!0:Ae(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=yn(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Lr(e){return{kind:"schema",type:"number",reference:Lr,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:Ae(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]:yn(s),c=s["~run"]({value:l},n);if(c.issues){let f={type:"object",origin:"value",input:i,key:o,value:l};for(let u of c.issues)u.path?u.path.unshift(f):u.path=[f],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=Il(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ae(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else Ae(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=yn(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ia(e,t){return{kind:"schema",type:"picklist",reference:ia,expects:mn(e.map(wn),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Ae(this,"type",r,n),r}}}function xn(e,t,r){return{kind:"schema",type:"record",reference:xn,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(Al(a,l)){let c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){let h={type:"object",origin:"key",input:a,key:l,value:c};for(let g of f.issues)g.path=[h],(o=n.issues)==null||o.push(g);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}let u=this.value["~run"]({value:c},i);if(u.issues){let h={type:"object",origin:"value",input:a,key:l,value:c};for(let g of u.issues)g.path?g.path.unshift(h):g.path=[h],(s=n.issues)==null||s.push(g);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 Ae(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:Ae(this,"type",t,r),t}}}function aa(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function kn(e,t){return{kind:"schema",type:"union",reference:kn,expects:mn(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];Ae(this,"type",r,n,{issues:aa(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ae(this,"type",r,n,{issues:aa(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 oa(e,t,r){return{kind:"schema",type:"variant",reference:oa,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=(u,h)=>{for(let g of u.options){if(g.type==="variant")f(g,new Set(h).add(g.key));else{let b=!0,w=0;for(let _ of h){let k=g.entries[_];if(_ in a?k["~run"]({typed:!1,value:a[_]},{abortEarly:!0}).issues:k.type!=="exact_optional"&&k.type!=="optional"&&k.type!=="nullish"){b=!1,l!==_&&(s<w||s===w&&_ in a&&!(l in a))&&(s=w,l=_,c=[]),l===_&&c.push(g.entries[_].expects);break}w++}if(b){let _=g["~run"]({value:a},i);(!o||!o.typed&&_.typed)&&(o=_)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;Ae(this,"type",n,i,{input:a[l],expected:mn(c,"|"),path:[{type:"object",origin:"value",input:a,key:l,value:a[l]}]})}else Ae(this,"type",n,i);return n}}}function Tl(...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},We(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var Dl=e=>({ok:!0,err:!1,val:e}),Fl=e=>({err:!0,ok:!1,val:e}),Sn=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function Cn(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 Sn(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 Nl(e,t){let r=Cn(e,t,""),n=Sn(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 Ll(e,t){let r=new Set(Sn(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},jl=(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},sa=(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))},Ol=({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},la=({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]},Ml=e=>{let t=e.split(".").pop();return t?Dl(t?"."+t:""):Fl("No file extension found")},ca=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let i=Ml(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}`,Pl=ee({integration_response:ee({data:ee({redirect_url:ge(),message:xe(Et(ge())),button_text:xe(Et(ge()))})})}),En=e=>dr(Pl,e).success,Vl=ee({integration_response:ee({status:xe(Vt()),error:ee({message:ge(),data:xe(Vt())})})}),da=e=>dr(Vl,e).success,Rl=ee({success:Ie(!0),integration_response:ee({data:ee({outcome:Ie("pending"),message:xe(Vt())}),error:xe(na())})}),$n=e=>{let t=dr(Rl,e);if(!t.success||En(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};ee({success:Ie(!1),message:xe(Vt())});var Bl=ee({error:Ie("Validation failed"),messages:ee({})}),zl=(e,t)=>t===422&&dr(Bl,e).success,ua=(e,t)=>{if(!da(e))return;let r=e.integration_response,n=r.error.data,i=typeof n=="object"&&n!==null?n:{},a=b=>typeof i[b]=="string"?i[b]:void 0,o=b=>typeof i[b]=="boolean"?i[b]:void 0,s=b=>{let w=i[b];return Number.isSafeInteger(w)&&w>=0?w:void 0},l=b=>{let w=a(b),_=w===void 0?NaN:Date.parse(w);return Number.isFinite(_)?_:void 0},c=typeof r.status=="number"?r.status:t,f=a("phase"),u=a("verdict"),h=a("code"),g=c===409&&f==="submit"&&u==="confirmed"?"duplicate":c===410&&h==="job_closed"?"closed":f==="submit"&&u==="unknown"?"unknown":void 0;return{message:r.error.message,status:c,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:u,code:h,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:g}},Ul=oa("reason",[ee({outcome:Ie("sent"),reason:Ie("sandbox"),ats_label:Et(ge())}),ee({outcome:Ie("held"),reason:ia(["production_connection","no_sandbox_known","company_hold"]),ats_label:Et(ge())}),ee({outcome:Ie("internal"),reason:Ie("internal"),ats_label:Et(ge())}),ee({outcome:Ie("held"),reason:Ie("redirect"),ats_label:ge()})]),Hl=e=>{let t=dr(ee({staging_destination:Ul}),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}`}},fa=3e4,Wl=2e4,ql=6e4,An=12e4,pa=6*60*6e4,Kl=60*6e4,ha=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<=pa?t:void 0},Gl=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=ha(e);return t===void 0?{}:{until:t}},ga=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Yl=(e,t)=>{let r=ha(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:fa};let n=(e??0)+1,i=Math.min(n*Wl,ql),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(i,a),An),throttles:n}},ba=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Zl=e=>{if(!da(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},Jl=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",Xl=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",Ql=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,ec=(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},...$n(e)&&{outcome:"pending"}}},tc=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},rc=(e,t)=>{if(!tc(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},nc=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)}),va=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,va(i)&&va(n)?In(i,n):n]}))}:t,ic=({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 wa(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 Tn;function ac(e){return Tn==null?void 0:Tn.get(e)}let Dn;function oc(e){return Dn==null?void 0:Dn.get(e)}let Fn;function sc(e,t){var r;return(r=Fn==null?void 0:Fn.get(e))==null?void 0:r.get(t)}function Nn(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)??Nn(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??sc(e.reference,l.lang)??(c?oc(l.lang):null)??n.message??ac(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 De(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},wa())}}}function lc(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ma(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}const cc=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function ya(e){return{kind:"validation",type:"email",reference:ya,expects:null,async:!1,requirement:cc,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 Or(e,t){return{kind:"validation",type:"min_length",reference:Or,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 _a(e){return{kind:"transformation",type:"transform",reference:_a,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function jn(){return{kind:"transformation",type:"trim",reference:jn,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function dc(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Mr(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 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 Te(this,"type",r,n);return r}}}function On(e){return{kind:"schema",type:"boolean",reference:On,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 xa(e,t){return{kind:"schema",type:"literal",reference:xa,expects:Nn(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=Mr(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=Mr(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]:Mr(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:i,key:o,value:l};for(const u of c.issues)u.path?u.path.unshift(f):u.path=[f],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=dc(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=Mr(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:ma(e.map(Nn),"|"),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(lc(a,l)){const c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){const h={type:"object",origin:"key",input:a,key:l,value:c};for(const g of f.issues)g.path=[h],(o=n.issues)==null||o.push(g);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:c},i);if(u.issues){const h={type:"object",origin:"value",input:a,key:l,value:c};for(const g of u.issues)g.path?g.path.unshift(h):g.path=[h],(s=n.issues)==null||s.push(g);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 L(e){return{kind:"schema",type:"string",reference:L,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 ka(e){let t;if(e)for(const r of e)t?t.push(...r.issues):t=r.issues;return t}function Sa(e,t){return{kind:"schema",type:"union",reference:Sa,expects:ma(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:ka(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Te(this,"type",r,n,{issues:ka(o)})}return r}}}function Ca(){return{kind:"schema",type:"unknown",reference:Ca,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},wa(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var uc=e=>e,fc=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},pc=class extends fc{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},hc={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Pn(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function ng(e){return e}var gc=["agent","sdk","form","integration","migration"],bc=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],vc=["screening","cv_match","interview","overall"],wc=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],mc=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Ea=pt(gc),yc=pt(bc),_c=Bt(L(),jn(),Or(1),Ln(100)),xc=pt(vc),kc=pt(wc),Sc=Bt(L(),jn(),Or(1),Ln(100)),Cc=pt(mc),$a=he({id:L(),email:Y(L()),firstName:Y(L()),lastName:Y(L()),phone:Y(L()),source:Y(Ea),identifiedAt:Y(L()),createdAt:L(),updatedAt:L()}),Aa=Bt(L(),Or(1)),Vn=Vr(L(),Ca()),Ec=he({id:L(),applicationId:L(),status:kc,scheduledAt:Y(L()),completedAt:Y(L()),meta:Y(Vn),createdAt:L(),updatedAt:L()}),$c=he({score:Ve(),reason:L(),confidence:Ve()}),Ia=he({id:L(),candidateId:L(),jobId:Ve(),stage:_c,stageGroup:yc,stageEnteredAt:L(),rating:Y(Ve()),disqualifiedAt:Y(L()),disqualificationReason:Y(Sc),disqualificationNote:Y(L()),source:Cc,sourceDetail:Y(L()),sessionId:Y(Ve()),externalApplicationId:Y(L()),meta:Y(Vn),context:Y(Vn),scoredAt:Y(L()),createdAt:L(),updatedAt:L()}),Ac=he({id:L(),applicationId:L(),scoreType:xc,score:Y(Ve()),reason:Y(L()),categories:Y(Vr(L(),$c)),scoredBy:Y(L()),createdAt:L()});({...Ia.entries},{...$a.entries});var Ic=he({anonymousId:Aa,email:Aa,firstName:et(L()),lastName:et(L()),phone:et(L()),source:et(Ea)}),Tc=he({candidateId:L(),isNew:On()}),Dc=he({id:L(),stageGroup:L(),createdAt:L()}),Fc=he({isDuplicate:On(),existingApplication:tt(Dc)}),Nc=({environment:e,publishableKey:t,logger:r})=>{let n=hc[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(Fc,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(Ic,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(Tc,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}}}},Lc=["DAILY","WEEKLY","MONTHLY"],jc=Vr(L(),Sa([L(),Pr(L()),he({type:xa("provided"),lat:Ve(),lng:Ve(),radius:Ve(),unit:tt(pt(["miles","km"])),label:tt(L())})])),Oc={pathname:"/job/:id",method:"GET",schema:{response:he({id:Ve(),external_id:et(L()),city:et(L()),town:et(L()),category:et(L())})}};async function Mc(e,{contact:t,job:r}){var i;let n={};if(r){let a=await e.request(Oc,{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(Pc,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var Pc={pathname:"/search/save",method:"POST",schema:{response:Pn(),body:he({contact:he({email:Bt(tt(L()),L(),ya()),first_name:tt(L()),last_name:tt(L())}),alerts:Bt(tt(L()),L(),pt(Lc)),filters:jc})}},Vc=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:Bt(he({country:tt(Pr(he({value:L()})),[])}),_a(({country:r})=>r.map(({value:n})=>n))),searchParams:Pn()}};return e.request(t,{searchParams:{filters:{country:null}}})},Ta={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"},Rc=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,Bc=()=>{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(Rc.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},zc=e=>{let t=e.trim().toLowerCase();return Object.prototype.hasOwnProperty.call(Ta,t)?Ta[t]:Bc().get(t)},Uc=e=>[...new Set(e.flatMap(t=>zc(t)??[]))].sort(),Rr=new WeakMap,Da=e=>(Rr.has(e)||(Rr.set(e,void 0),Vc(e).then(t=>{Rr.set(e,Uc(t).join(",")||void 0)}).catch(()=>{})),Rr.get(e)),Hc=(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},Wc=600,qc=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)},u=()=>{c(),(a==null?void 0:a.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(Hc(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)},h=(g,b)=>{l||(g?a=b:o=b,a&&o?u():b.status==="fulfilled"&&b.value.length>0&&(s=setTimeout(u,Wc)))};r==null||r.addEventListener("abort",f,{once:!0});for(let g of[!0,!1])e(g?t:void 0).then(b=>h(g,{status:"fulfilled",value:b}),b=>h(g,{status:"rejected",reason:b}))})},Fa=Tl(kn([ge(),Lr()]),ea(String)),Na=ee({id:Fa,version:Lr(),build:Lr(),nodes:ra(ta()),context_schema:xe(Et(xn(ge(),ee({required:_n(),type:kn([Ie("string"),Ie("number")])}))))}),Kc=ee({flow:Na}),Gc=ee({company:ee({name:ge()}),context:xe(xn(ge(),Vt())),flow:Na,job:ee({id:Fa,title:ge()}),user:xe(ee({city:xe(ge()),country:xe(ge()),isEU:xe(_n()),continent:xe(ge())}))}),Yc=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),Zc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Pn(),response:Gc}},Jc={pathname:"/flow/id/:id",method:"GET",schema:{response:Kc}},fr,N,La,ja,$t,Oa,Ma,Rn,Pa,Ut={},Va=[],Xc=/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 Ra(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??++La};return i==null&&N.vnode!=null&&N.vnode(a),a}function Qc(){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 Ba(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 Ba(e)}}function Bn(e){(!e.__d&&(e.__d=!0)&&$t.push(e)&&!Ur.__r++||Oa!==N.debounceRendering)&&((Oa=N.debounceRendering)||Ma)(Ur)}function Ur(){var e,t,r,n,i,a,o,s,l;for($t.sort(Rn);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,zn(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??zr(o),o.__h,i),Ga(n,o,i),o.__e!=s&&Ba(o)),$t.length>t&&$t.sort(Rn));Ur.__r=0}function za(e,t,r,n,i,a,o,s,l,c,f){var u,h,g,b,w,_,k,x,$,E,C=0,F=n&&n.__k||Va,V=F.length,T=V,I=t.length;for(r.__k=[],u=0;u<I;u++)(b=r.__k[u]=(b=t[u])==null||typeof b=="boolean"||typeof b=="function"?null:typeof b=="string"||typeof b=="number"||typeof b=="bigint"?pr(null,b,null,null,b):Br(b)?pr(ae,{children:b},null,null,null):b.__b>0?pr(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)!=null&&(b.__=r,b.__b=r.__b+1,(x=ed(b,F,k=u+C,T))===-1?g=Ut:(g=F[x]||Ut,F[x]=void 0,T--),zn(e,b,g,i,a,o,s,l,c,f),w=b.__e,(h=b.ref)&&g.ref!=h&&(g.ref&&Un(g.ref,null,b),f.push(h,b.__c||w,b)),w!=null&&(_==null&&(_=w),E=!($=g===Ut||g.__v===null)&&x===k,$?x==-1&&C--:x!==k&&(x===k+1?(C++,E=!0):x>k?T>I-k?(C+=x-k,E=!0):C--:C=x<k&&x==k-1?x-k:0),k=u+C,E=E||x==u&&!$,typeof b.type!="function"||x===k&&g.__k!==b.__k?typeof b.type=="function"||E?b.__d!==void 0?(l=b.__d,b.__d=void 0):l=w.nextSibling:l=Ha(e,w,l):l=Ua(b,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,u=V;u--;)F[u]!=null&&(typeof r.type=="function"&&F[u].__e!=null&&F[u].__e==r.__d&&(r.__d=F[u].__e.nextSibling),Ya(F[u],F[u]))}function Ua(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"?Ua(n,t,r):Ha(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 Ha(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 ed(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 td(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 Wa(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Xc.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||Wa(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Wa(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?Ka:qa,a):e.removeEventListener(t,a?Ka:qa,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 qa(e){return this.l[e.type+!1](N.event?N.event(e):e)}function Ka(e){return this.l[e.type+!0](N.event?N.event(e):e)}function zn(e,t,r,n,i,a,o,s,l,c){var f,u,h,g,b,w,_,k,x,$,E,C,F,V,T,I=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=N.__b)&&f(t);try{e:if(typeof I=="function"){if(k=t.props,x=(f=I.contextType)&&n[f.__c],$=f?x?x.props.value:f.__:n,r.__c?_=(u=t.__c=r.__c).__=u.__E:("prototype"in I&&I.prototype.render?t.__c=u=new I(k,$):(t.__c=u=new Re(k,$),u.constructor=I,u.render=nd),x&&x.sub(u),u.props=k,u.state||(u.state={}),u.context=$,u.__n=n,h=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),I.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=rt({},u.__s)),rt(u.__s,I.getDerivedStateFromProps(k,u.__s))),g=u.props,b=u.state,u.__v=t,h)I.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(I.getDerivedStateFromProps==null&&k!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(k,$),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(k,u.__s,$)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=k,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(P){P&&(P.__=t)}),E=0;E<u._sb.length;E++)u.__h.push(u._sb[E]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(k,u.__s,$),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,b,w)})}if(u.context=$,u.props=k,u.__P=e,u.__e=!1,C=N.__r,F=0,"prototype"in I&&I.prototype.render){for(u.state=u.__s,u.__d=!1,C&&C(t),f=u.render(u.props,u.state,u.context),V=0;V<u._sb.length;V++)u.__h.push(u._sb[V]);u._sb=[]}else do u.__d=!1,C&&C(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++F<25);u.state=u.__s,u.getChildContext!=null&&(n=rt(rt({},n),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(w=u.getSnapshotBeforeUpdate(g,b)),za(e,Br(T=f!=null&&f.type===ae&&f.key==null?f.props.children:f)?T:[T],t,r,n,i,a,o,s,l,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),_&&(u.__E=u.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=rd(r.__e,t,r,n,i,a,o,l,c);(f=N.diffed)&&f(t)}catch(P){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),N.__e(P,t,r)}}function Ga(e,t,r){for(var n=0;n<r.length;n++)Un(r[n],r[++n],r[++n]);N.__c&&N.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){N.__e(a,i.__v)}})}function rd(e,t,r,n,i,a,o,s,l){var c,f,u,h=r.props,g=t.props,b=t.type,w=0;if(b==="svg"&&(i=!0),a!=null){for(;w<a.length;w++)if((c=a[w])&&"setAttribute"in c==!!b&&(b?c.localName===b:c.nodeType===3)){e=c,a[w]=null;break}}if(e==null){if(b===null)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,g.is&&g),a=null,s=!1}if(b===null)h===g||s&&e.data===g||(e.data=g);else{if(a=a&&fr.call(e.childNodes),f=(h=r.props||Ut).dangerouslySetInnerHTML,u=g.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},w=0;w<e.attributes.length;w++)h[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(td(e,g,h,i,s),u)t.__k=[];else if(za(e,Br(w=t.props.children)?w:[w],t,r,n,i&&b!=="foreignObject",a,o,a?a[0]:r.__k&&zr(r,0),s,l),a!=null)for(w=a.length;w--;)a[w]!=null&&Ra(a[w]);s||("value"in g&&(w=g.value)!==void 0&&(w!==e.value||b==="progress"&&!w||b==="option"&&w!==h.value)&&Hr(e,"value",w,h.value,!1),"checked"in g&&(w=g.checked)!==void 0&&w!==e.checked&&Hr(e,"checked",w,h.checked,!1))}return e}function Un(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){N.__e(n,r)}}function Ya(e,t,r){var n,i;if(N.unmount&&N.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Un(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){N.__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]&&Ya(n[i],t,r||typeof e.type!="function");r||e.__e==null||Ra(e.__e),e.__=e.__e=e.__d=void 0}function nd(e,t,r){return this.constructor(e,r)}function At(e,t,r){var n,i,a,o;N.__&&N.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],zn(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),Ga(a,e,o)}function Za(e,t){At(e,t,Za)}function id(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 Ja(e,t){var r={__c:t="__cC"+Pa++,__: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,Bn(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=Va.slice,N={__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}},La=0,ja=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),Bn(this))},Re.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Bn(this))},Re.prototype.render=ae,$t=[],Ma=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rn=function(e,t){return e.__v.__b-t.__v.__b},Ur.__r=0,Pa=0;var ht,te,Hn,Xa,Ht=0,Qa=[],Wr=[],eo=N.__b,to=N.__r,ro=N.diffed,no=N.__c,io=N.unmount;function Wt(e,t){N.__h&&N.__h(te,e,Ht||t),Ht=0;var r=te.__H||(te.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Wr}),r.__[e]}function Be(e){return Ht=1,ao(lo,e)}function ao(e,t,r){var n=Wt(ht++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):lo(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(h){return h.__c});if(f.every(function(h){return!h.__N}))return!a||a.call(this,s,l,c);var u=!1;return f.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(u=!0)}}),!(!u&&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 It(e,t){var r=Wt(ht++,3);!N.__s&&qn(r.__H,t)&&(r.__=e,r.i=t,te.__H.__h.push(r))}function Fe(e,t){var r=Wt(ht++,4);!N.__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 ad(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=Wt(ht++,7);return qn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function od(e,t){return Ht=8,gt(function(){return e},t)}function oo(e){var t=te.context[e.__c],r=Wt(ht++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(te)),t.props.value):e.__}function sd(e,t){N.useDebugValue&&N.useDebugValue(t?t(e):e)}function ld(){var e=Wt(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 cd(){for(var e;e=Qa.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(qr),e.__H.__h.forEach(Wn),e.__H.__h=[]}catch(t){e.__H.__h=[],N.__e(t,e.__v)}}N.__b=function(e){te=null,eo&&eo(e)},N.__r=function(e){to&&to(e),ht=0;var t=(te=e.__c).__H;t&&(Hn===te?(t.__h=[],te.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Wr,r.__N=r.i=void 0})):(t.__h.forEach(qr),t.__h.forEach(Wn),t.__h=[],ht=0)),Hn=te},N.diffed=function(e){ro&&ro(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Qa.push(t)!==1&&Xa===N.requestAnimationFrame||((Xa=N.requestAnimationFrame)||dd)(cd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Wr&&(r.__=r.__V),r.i=void 0,r.__V=Wr})),Hn=te=null},N.__c=function(e,t){t.some(function(r){try{r.__h.forEach(qr),r.__h=r.__h.filter(function(n){return!n.__||Wn(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],N.__e(n,r.__v)}}),no&&no(e,t)},N.unmount=function(e){io&&io(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{qr(n)}catch(i){t=i}}),r.__H=void 0,t&&N.__e(t,r.__v))};var so=typeof requestAnimationFrame=="function";function dd(e){var t,r=function(){clearTimeout(n),so&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);so&&(t=requestAnimationFrame(r))}function qr(e){var t=te,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),te=t}function Wn(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 lo(e,t){return typeof t=="function"?t(e):t}var ud=Symbol.for("preact-signals");function Kn(){if(qt>1)qt--;else{for(var e,t=!1;hr!==void 0;){var r=hr;for(hr=void 0,Gn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&uo(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Gn=0,qt--,t)throw e}}var Z=void 0,hr=void 0,qt=0,Gn=0,Kr=0;function co(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=ud,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 Zn(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=co(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Gn>100)throw new Error("Cycle detected");this.v=e,this.i++,Kr++,qt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Kn()}}}});function Oe(e){return new be(e)}function uo(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 fo(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 po(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&&!uo(this))return this.f&=-2,!0;var e=Z;try{fo(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,po(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=co(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function fd(e){return new Kt(e)}function ho(e){var t=e.u;if(e.u=void 0,typeof t=="function"){qt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Yn(e),n}finally{Z=r,Kn()}}}function Yn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ho(e)}function pd(e){if(Z!==this)throw new Error("Out-of-order effect");po(this),Z=e,this.f&=-2,8&this.f&&Yn(this),Kn()}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,ho(this),fo(this),qt++;var e=Z;return Z=this,pd.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||Yn(this)};function Zn(e){var t=new gr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Jn;function Gt(e,t){N[e]=t.bind(null,N[e]||function(){})}function Gr(e){Jn&&Jn(),Jn=e&&e.S()}function go(e){var t=this,r=e.data,n=gd(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;!ja(i.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},fd(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}go.displayName="_st",Object.defineProperties(be.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:go},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 Zn(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 c=a[l],f=n[l];c===void 0?(c=hd(r,l,f,i),a[l]=c):c.o(f,i)}}}e(t)});function hd(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,a=Oe(r);return{o:function(o,s){a.value=o,n=s},d:Zn(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 gd(e){return gt(function(){return Oe(e)},[])}const ke=Symbol.for("@ts-pattern/matcher"),bo=Symbol.for("@ts-pattern/isVariadic"),Yr="@ts-pattern/anonymous-select-key",Xn=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(Xn(e)){if(!Xn(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[bo]?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||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 Xn(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 vo(...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:()=>ei(e),and:t=>re(e,t),or:t=>wo(e,t),select:t=>t===void 0?vr(e):vr(t,e)})}function Qn(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[bo]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var i;return(i=n[r++])!=null?i:n.at(-1)}}}}))(e),{optional:()=>Qn(ei(e)),select:t=>Qn(t===void 0?vr(e):vr(t,e))})}function ei(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 bd=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},vd=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},wd=(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 wo(...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 mo(e){return!0}function qe(e){return typeof e=="number"}function bt(e){return typeof e=="string"}function vt(e){return typeof e=="bigint"}const yo=de(H(mo)),md=de(H(mo)),yd=yo,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}}),_o=wt(H(bt)),Ke=e=>Object.assign(de(e),{between:(t,r)=>Ke(re(e,((n,i)=>H(a=>qe(a)&&n<=a&&i>=a))(t,r))),lt:t=>Ke(re(e,(r=>H(n=>qe(n)&&n<r))(t))),gt:t=>Ke(re(e,(r=>H(n=>qe(n)&&n>r))(t))),lte:t=>Ke(re(e,(r=>H(n=>qe(n)&&n<=r))(t))),gte:t=>Ke(re(e,(r=>H(n=>qe(n)&&n>=r))(t))),int:()=>Ke(re(e,H(t=>qe(t)&&Number.isInteger(t)))),finite:()=>Ke(re(e,H(t=>qe(t)&&Number.isFinite(t)))),positive:()=>Ke(re(e,H(t=>qe(t)&&t>0))),negative:()=>Ke(re(e,H(t=>qe(t)&&t<0)))}),_d=Ke(H(qe)),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)))}),xd=mt(H(vt)),kd=de(H(function(e){return typeof e=="boolean"})),Sd=de(H(function(e){return typeof e=="symbol"})),Cd=de(H(function(e){return e==null})),Ed=de(H(function(e){return e!=null}));var Tt={__proto__:null,matcher:ke,optional:ei,array:function(...e){return Qn({[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:bd(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:vd(t,(s,l)=>{const c=se(a,l,n),f=se(o,s,n);return c&&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?[_o,e[0]]:e;return{matched:wd(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=c!==null&&se(a,c,i),u=se(a,s,i),h=se(o,l,i);return(u||f)&&h}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Se(e[0]),...Se(e[1])]})})},intersection:re,union:wo,not:function(e){return de({[ke]:()=>({match:t=>({matched:!se(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:H,select:vr,any:yo,unknown:md,_:yd,string:_o,number:_d,bigint:xd,boolean:kd,symbol:Sd,nullish:Cd,nonNullable:Ed,instanceOf:function(e){return de(H(function(t){return r=>r instanceof t}(e)))},shape:function(e){return de(H(vo(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 ti={matched:!1,value:void 0};function Jr(e){return new Ad(e,ti)}let Ad=class Qi{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)?ti:{matched:!0,value:r(a?Yr in o?o[Yr]:o:this.input,this.input)};return new Qi(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Qi(this.input,n?{matched:!0,value:r(this.input,this.input)}:ti)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=Id){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function Id(e){throw new $d(e)}function xo(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=xo(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=xo(e))&&(n&&(n+=" "),n+=t);return n}const ko=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,So=it,Dt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return So(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],u=a==null?void 0:a[c];if(f===null)return null;const h=ko(f)||ko(u);return i[c][h]}),s=r&&Object.entries(r).reduce((c,f)=>{let[u,h]=f;return h===void 0||(c[u]=h),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:u,className:h,...g}=f;return Object.entries(g).every(b=>{let[w,_]=b;return Array.isArray(_)?_.includes({...a,...s}[w]):{...a,...s}[w]===_})?[...c,u,h]:c},[]);return So(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function Co(e,t){for(var r in t)e[r]=t[r];return e}function ri(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 ni(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ii(e){this.props=e}function Td(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:ri(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}(ii.prototype=new Re).isPureReactComponent=!0,ii.prototype.shouldComponentUpdate=function(e,t){return ri(this.props,e)||ri(this.state,t)};var Eo=N.__b;N.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Eo&&Eo(e)};var Dd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ai(e){function t(r){var n=Co({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Dd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $o=function(e,t){return e==null?null:nt(nt(e).map(t))},Fd={map:$o,forEach:$o,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},Nd=N.__e;N.__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)}Nd(e,t,r,n)};var Ao=N.unmount;function Io(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=Co({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Io(n,t,r)})),e}function To(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return To(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 Do(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Fo(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}N.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ao&&Ao(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=Do(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]=To(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)},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]=Io(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 No=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 Ld(e){return this.getChildContext=function(){return e.context},e.children}function jd(e){var t=this,r=e.i;t.componentWillUnmount=function(){At(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)}}),At(je(Ld,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Od(e,t){var r=je(jd,{__v:e,i:t});return r.containerInfo=t,r}(mr.prototype=new Re).__a=function(e){var t=this,r=Do(t.__v),n=t.o.get(e);return n[0]++,function(i){var a=function(){t.props.revealOrder?(n.push(i),No(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){No(e,r,t)})};var Lo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Md=/^(?: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]/,Pd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Vd=/[A-Z0-9]/g,Rd=typeof document<"u",Bd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function zd(e,t,r){return t.__k==null&&(t.textContent=""),At(e,t),typeof r=="function"&&r(),e?e.__c:null}function Ud(e,t,r){return Za(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 jo=N.event;function Hd(){}function Wd(){return this.cancelBubble}function qd(){return this.defaultPrevented}N.event=function(e){return jo&&(e=jo(e)),e.persist=Hd,e.isPropagationStopped=Wd,e.isDefaultPrevented=qd,e.nativeEvent=e};var oi,Kd={enumerable:!1,configurable:!0,get:function(){return this.class}},Oo=N.vnode;N.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||Rd&&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"||Bd(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Pd.test(a)?a=s:n.indexOf("-")===-1&&Md.test(a)?a=a.replace(Vd,"-$&").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",Kd)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Lo,Oo&&Oo(e)};var Mo=N.__r;N.__r=function(e){Mo&&Mo(e),oi=e.__c};var Po=N.diffed;N.diffed=function(e){Po&&Po(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),oi=null};var Gd={ReactCurrentDispatcher:{current:{readContext:function(e){return oi.__n[e.__c].props.value}}}};function Yd(e){return je.bind(null,e)}function Vo(e){return!!e&&e.$$typeof===Lo}function Zd(e){return Vo(e)?id.apply(null,arguments):e}function Jd(e){return!!e.__k&&(At(null,e),!0)}function Xd(e){return e&&(e.base||e.nodeType===1&&e)||null}var Qd=function(e,t){return e(t)},eu=function(e,t){return e(t)},tu=ae;function Ro(e){e()}function ru(e){return e}function nu(){return[!1,Ro]}var iu=Fe;function au(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,ni(i.__,t())||a({h:i})},[e,r,t]),It(function(){return ni(i.__,i.v())||a({h:i}),e(function(){ni(i.__,i.v())||a({h:i})})},[e]),r}var Ce={useState:Be,useId:ld,useReducer:ao,useEffect:It,useLayoutEffect:Fe,useInsertionEffect:iu,useTransition:nu,useDeferredValue:ru,useSyncExternalStore:au,startTransition:Ro,useRef:me,useImperativeHandle:ad,useMemo:gt,useCallback:od,useContext:oo,useDebugValue:sd,version:"17.0.2",Children:Fd,render:zd,hydrate:Ud,unmountComponentAtNode:Jd,createPortal:Od,createElement:je,createContext:Ja,createFactory:Yd,cloneElement:Zd,createRef:Qc,Fragment:ae,isValidElement:Vo,findDOMNode:Xd,Component:Re,PureComponent:ii,memo:Td,forwardRef:ai,flushSync:eu,unstable_batchedUpdates:Qd,StrictMode:tu,Suspense:wr,SuspenseList:mr,lazy:Fo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Gd},ou=["other","few","many","two","one","zero"],Bo=({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=ou.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 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},su=0;function d(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:--su,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return N.vnode&&N.vnode(c),c}var zo=Ja(null),Uo=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const i=gt(()=>Bo({locale:n,terms:e,overrides:t}),[t,n]);return d(zo.Provider,{value:{t:i,locale:n},children:r})},useTranslation:()=>{const t=oo(zo);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>Bo({terms:e,overrides:t,locale:r})}),lu={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:ig,useTranslation:ag,createTFunction:og,defaultTerms:cu}=Uo({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:du,useTranslation:oe,createTFunction:uu}=Uo({...cu,...lu,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"}}),sg="";function at(e,t){if(!e)throw new Error(t)}var fu="https://maps.inploi.com/address",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,Ho=/^(?:GIR0AA|[A-Z]{1,2}\d[\dA-Z]?\d[A-Z]{2})$/,Wo=/^[A-Z](?:\d{2}|\d[A-Z])[\dA-Z]{4}$/,si=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim(),qo=e=>e.split(",").map(t=>si(t).replace(/^\d+[a-z]?(?:\s*[-/]\s*\d+[a-z]?)?(?:\s+|$)/,"").trim()),Ko=e=>Ho.test(e)?`gb:${e.slice(0,-3)}`:Wo.test(e)?`ie:${e.slice(0,3)}`:null,pu=(e,t,r)=>{const[n="",i=""]=qo(e),a=Ko(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 g;const f=qo(c);if(!f.includes(n))return!1;const u=((g=c.match(Xr))==null?void 0:g[0].replace(/\s/g,"").toUpperCase())??"",h=Ko(u);return a&&h?a===h:!!(s&&f.some(b=>b.replace(Xr,"").trim()===o))});return l===-1?null:l+1},hu=async({query:e,country:t,pickedLabel:r,pickedPostcode:n,pickedCountry:i,pickedState:a,log:o})=>{var l,c,f,u,h;if(!t||!t.split(",").every(g=>/^(gb|ie)$/i.test(g.trim())))return;let s;try{const g=new AbortController;s=setTimeout(()=>g.abort(),1500);const b=new URL(fu);b.search=new URLSearchParams({q:e,country:t,limit:"5"}).toString();const w=await fetch(b.href,{signal:g.signal});if(!w.ok)return;const _=await w.json();if(typeof _!="object"||_===null||!("results"in _)||!Array.isArray(_.results)||!("source"in _)||_.source!=="photon"&&_.source!=="mapbox")return;const k=_.results,x=[];for(const P of k){if(typeof P!="object"||P===null||!("label"in P)||typeof P.label!="string")return;x.push(P.label)}const $=((n==null?void 0:n.trim())||((l=r.match(Xr))==null?void 0:l[0])||"").replace(/\s/g,"").toUpperCase(),E=pu(r,$,x),C=(f=(c=w.headers.get("Server-Timing"))==null?void 0:c.match(/(?:^|,)\s*lookup\s*;\s*dur=([\d.]+)/))==null?void 0:f[1],F=C===void 0?null:Number(C),V=w.headers.get("X-Geo-Fallback"),T=(h=(i==null?void 0:i.trim())||((u=r.split(",").at(-1))==null?void 0:u.trim()))==null?void 0:h.toLowerCase();let I=null;Ho.test($)?I=$.startsWith("BT")?"ni":"gb":Wo.test($)?I="ie":si(a??"")==="northern ireland"||r.split(",").some(P=>si(P)==="northern ireland")?I="ni":T==="united kingdom"||T==="gb"?I="gb":(T==="ireland"||T==="ie")&&(I="ie"),await o({hit:E!==null,rank:E,results:x.length,source:_.source,fallback:V&&/^[a-z0-9_-]{1,64}$/i.test(V)?V:null,ms:F!==null&&Number.isFinite(F)?F:null,region:I})}catch{}finally{clearTimeout(s)}},li=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(li):Object.keys(e).sort().reduce((t,r)=>(t[r]=li(e[r]),t),{}),gu=e=>{let t=JSON.stringify(li(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const ci=(e,t)=>t.some(r=>e instanceof r);let Go,Yo;function bu(){return Go||(Go=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function vu(){return Yo||(Yo=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const di=new WeakMap,ui=new WeakMap,Qr=new WeakMap;function wu(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 Qr.set(t,e),t}function mu(e){if(di.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)});di.set(e,t)}let fi={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return di.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 Zo(e){fi=e(fi)}function yu(e){return vu().includes(e)?function(...t){return e.apply(pi(this),t),Ft(this.request)}:function(...t){return Ft(e.apply(pi(this),t))}}function _u(e){return typeof e=="function"?yu(e):(e instanceof IDBTransaction&&mu(e),ci(e,bu())?new Proxy(e,fi):e)}function Ft(e){if(e instanceof IDBRequest)return wu(e);if(ui.has(e))return ui.get(e);const t=_u(e);return t!==e&&(ui.set(e,t),Qr.set(t,e)),t}const pi=e=>Qr.get(e);function xu(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",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const ku=["get","getKey","getAll","getAllKeys","count"],Su=["put","add","delete","clear"],hi=new Map;function Jo(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(hi.get(t))return hi.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=Su.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||ku.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 hi.set(t,a),a}Zo(e=>({...e,get:(t,r,n)=>Jo(t,r)||e.get(t,r,n),has:(t,r)=>!!Jo(t,r)||e.has(t,r)}));const Cu=["continue","continuePrimaryKey","advance"],Xo={},gi=new WeakMap,Qo=new WeakMap,Eu={get(e,t){if(!Cu.includes(t))return e[t];let r=Xo[t];return r||(r=Xo[t]=function(...n){gi.set(this,Qo.get(this)[t](...n))}),r}};async function*$u(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Eu);for(Qo.set(r,t),Qr.set(r,pi(t));t;)yield r,t=await(gi.get(r)||t.continue()),gi.delete(r)}function es(e,t){return t===Symbol.asyncIterator&&ci(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ci(e,[IDBIndex,IDBObjectStore])}Zo(e=>({...e,get(t,r,n){return es(t,r)?$u:e.get(t,r,n)},has(t,r){return es(t,r)||e.has(t,r)}}));const yr=typeof indexedDB>"u"?void 0:xu("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Au=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let en,bi,_r;const ts=()=>{if(!en)return _r;const e=en;en=void 0;const t=rn(e),r=yr==null?void 0:yr.then(n=>n.put("state",Au(e.data),t)).finally(()=>{_r===r&&(_r=void 0)});return _r=r,_r},Me={getStateData:async(e,t,r)=>{var i;const n=rn({...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=>{en=e,clearTimeout(bi),bi=setTimeout(()=>void ts(),1e3)},flushStateData:()=>(clearTimeout(bi),ts()??Promise.resolve())},Yt=e=>t=>t?t.type===e:!1,Iu=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),rs=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Iu()}),Tu=e=>Jr(e).with({nativeEvent:{submitter:Tt.select(Tt.union(Tt.instanceOf(HTMLButtonElement),Tt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),tn=(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(tn(e,i,r,n+s).remainingSteps,tn(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}}const l=s+tn(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Du=e=>{const t={},r=e.find(n=>n.isHead);return r&&tn(e,r,(n,i)=>{t[n]=i}),t},rn=e=>[...e.flowKeys,e.id,e.version,e.build,gu(e.hostContext??e.context)].join("/"),Fu=({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&&sa(t,e.submissions)},ns=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||sa(t,e.submissions))},Ge=Oe({state:"idle"}),vi=new Set,Nt=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},Me.setStateData(r)},O={current$:Ge,viewState$:Oe("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:i,title:a,analytics:o,job:s,employer:l,locationOrigin:c})=>{await Me.flushStateData().catch(()=>{});const f=await Me.getStateData(t,i,r),u=f??rs(),h=rn({...t,flowKeys:i,context:r}),g=f!==void 0&&!vi.has(h)&&Fu({data:u,nodes:t.nodes});return g||vi.add(h),{jobAlerts:e,data:u,offerResume:g,startedAt:new Date,nodeIdToProgress:Du(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:c}},commitFlow:e=>{Ge.value={state:"loaded",flow:e},Me.setStateData(e)},settleResume:e=>{e.offerResume=!1,vi.add(rn(e))},cancelCurrentFlow:()=>{Ge.value={state:"idle"},O.viewState$.value="closed"},markAsFinished:()=>Nt(e=>({...e,isFinished:!0})),markAsInteracted:()=>Nt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Nt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{Nt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Me.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={...rs(),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},Me.setStateData(n)},addMessage:(e,t)=>{const r={...e,groupId:t};return Nt(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,Me.setStateData(r)},setSubmission:(e,t)=>Nt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Nt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Ge.peek().flow===e&&(Ge.value={state:"loaded",flow:e}),Me.setStateData(e),await Me.flushStateData()}},is=({heading:e})=>{const{t}=oe();return d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:d("p",{class:"text-error-11 font-bold",children:t(e)})})]})},nn=e=>{const{t}=oe();return d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:t("loading")}),d("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},as=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(nn,{class:"text-neutral-6 h-8 w-8"})}),Nu=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)}%`},Lu=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})=>d("button",{class:it(Lu({variant:r}),e),...n,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),os=()=>d("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),ju=()=>{if(O.current$.value.state!=="loaded")return null;const e=O.current$.value.flow.nodeIdToProgress,t=O.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:Nu(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Ou=({children:e,params:t,analytics:r,feedbackReady:n})=>{const{t:i}=oe(),a=O.viewState$,o=!!t.feedback&&O.current$.value.state==="loaded"&&a.value==="maximised",s=o&&n.value,l=me(!1);return It(()=>{var c,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(c=O.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:f.customProperties}))},[s,r]),d(ae,{children:d("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[d("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{"aria-label":i("minimize"),onClick:()=>{a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:wi,children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?d("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:it({hidden:!o}),children:d("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,O.current$.value.state==="loaded"&&d(xr,{class:"mx-1","aria-label":i("restart"),onClick:()=>{O.restart()},children:[d("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(xr,{class:"view-switch mx-1",onTouchStart:wi,"aria-label":i("minimize"),onClick:()=>a.value="minimised",children:d(os,{})},"minmax")]})]}),d(ju,{})]})})};function wi(){}const Mu=Fo(()=>Promise.resolve().then(()=>Jh).then(e=>e.ChatbotBody)),ss=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"}}}),ls=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"}}}),Pu=({open:e,...t})=>{const r=me(null);return Fe(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),d("dialog",{ref:r,...t})},Vu=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:i,talentBankClient:a,params:o,feedbackReady:s})=>{const{state:l,flow:c}=O.current$.value,f=O.viewState$.value,u=l!=="idle"&&f==="maximised",h=me(null),g=c?[...c.data.nodeHistory].reverse().map(b=>c.nodes.find(w=>w.id===b)).find(b=>(b==null?void 0:b.type)==="flow-section"):void 0;return d(du,{terms:o.terms,locale:void 0,children:[d(Pu,{open:u,onClose:()=>O.viewState$.value="minimised",children:d("div",{ref:h,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:ss({view:"maximised"}),children:d("div",{class:ls({view:"maximised"}),children:[d(Ou,{params:o,analytics:i,feedbackReady:s,children:g?d(ae,{children:[d("span",{class:"block",children:g.data.title}),d("span",{class:"block truncate text-xs font-normal",children:c==null?void 0:c.title})]}):c==null?void 0:c.title}),Jr({state:l,view:f}).with({state:"idle"},()=>null).with({state:"loading"},()=>d(as,{},"loading")).with({state:"loaded"},()=>d(wr,{fallback:d(as,{},"loading"),children:d(Mu,{env:e,rpcClient:n,analytics:i,apiClient:r,logger:t,talentBankClient:a})})).with({state:"closed"},()=>d(is,{heading:"flow_closed"})).with({state:"error"},()=>d(is,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?d(Ru,{flow:c}):null]})},Ru=({flow:e})=>{const{t}=oe();return d("div",{class:ss({view:"minimised",class:"z-100 isolate"}),children:d("div",{class:ls({view:"minimised"}),children:[d("button",{onClick:()=>{O.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:wi,children:d("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),d("div",{class:"flex items-center px-0.5",children:d(xr,{class:"mx-1","aria-label":t("close_application"),onClick:O.cancelCurrentFlow,variant:"white",children:d("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Bu=`[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 og=Object.defineProperty;var sg=(Xe,Pe,Ut)=>Pe in Xe?og(Xe,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Xe[Pe]=Ut;var fe=(Xe,Pe,Ut)=>sg(Xe,typeof Pe!="symbol"?Pe+"":Pe,Ut);(function(){"use strict";var Xe=typeof document<"u"?document.currentScript:null,Pe=new Set(["Error","TypeError","RangeError","ReferenceError","SyntaxError","URIError","EvalError","AggregateError","AbortError","TimeoutError","NetworkError","NotAllowedError","NotFoundError","NotSupportedError","InvalidStateError","QuotaExceededError","SecurityError","DataCloneError","ChunkLoadError"]),Ut=[/^Cannot (?:read|set) properties of (?:undefined|null) \((?:reading|setting) '[\w$]{1,40}'\)$/,/^[\w$.]{1,60} is (?:not a function|not iterable|not defined|not a constructor|undefined|null)$/,/^(?:undefined|null) is not an object \(evaluating '[\w$.]{1,60}'\)$/,/^can't access property "[\w$]{1,40}", [\w$.]{1,60} is (?:undefined|null)$/,/^(?:Script error\.|Assignment to constant variable\.|Maximum call stack size exceeded|Invalid array length|Invalid time value|Failed to fetch|Load failed|Importing a module script failed\.|NetworkError when attempting to fetch resource\.)$/],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})')?(?:: (.*))?$/,si,Hl=e=>{let{apis:t,sentences:r}=si??(si={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[,a,i,o]=n;return t.has(a)&&(i===void 0||t.has(i))&&(o===void 0||r.has(o))?e:""},Wl=/^\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",li=/^(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?Pe.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,a;let t=e===null?"null":typeof e,r={message:"",stack:"",thrown:{type:t,ctor:"",keys:0,message_length:0,stack_lines:0}};if(typeof e=="string")return{...r,thrown:{...r.thrown,message_length:e.length}};if(typeof e!="object"||e===null)return r;try{let{message:i,stack:o}=e,s=(a=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor)==null?void 0:a.name,l=typeof s!="string"?"":Pe.has(s)||Ql.has(s)?s:"other",c=typeof i=="string"?i:"",f=typeof o=="string"?o:"";return{message:e instanceof Error||Pe.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:a,stack:i,thrown:o}=ec(e),s=(e==null?r:a).slice(0,300),l=Ut.some(b=>b.test(s))?s:li.test(s)?li.exec(s)[1]:Hl(s),c=[],f=new Set;for(let b of i.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"):Wl.test(b)&&f.add(Yl(b))}c.splice(10);let u={name:n,message:l,stack:c,foreign:[...f].sort(),thrown:o};for(;JSON.stringify(u).length>1400&&u.stack.length;)u.stack.pop();return u},ci="inploi-candidate-beacon-seed",rc=()=>{try{return typeof sessionStorage>"u"?void 0:sessionStorage}catch{return}},nc=()=>({host:"s2811583.eu-central-1a.betterstackdata.com",token:"LHJqsZXu82MrkgUP44JHAwvU",sampleRate:Math.min(1,Math.max(0,1))}),ui=e=>{let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=Math.imul(t^a,2654435761),r=Math.imul(r^a,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&r)+(t>>>0)},ac=(e,t)=>{try{let r=e==null?void 0:e.getItem(ci);if(r)return r;let n=t();return e==null||e.setItem(ci,n),n}catch{return t()}},ic=[["facebook",/\bFB(?:AN|AV|_IAB)\b/],["instagram",/\bInstagram (\d+)/],["linkedin",/\bLinkedInApp\b/],["tiktok",/\b(?:musical_ly|BytedanceWebview|TikTok)\b/],["samsung",/\bSamsungBrowser\/(\d+)/],["edge",/\bEdg(?:e|A|iOS)?\/(\d+)/],["opera",/\bOPR\/(\d+)/],["firefox",/\b(?:Firefox|FxiOS)\/(\d+)/],["chrome",/\b(?:Chrome|CriOS)\/(\d+)/],["safari",/\bVersion\/(\d+)[\d.]* (?:Mobile\/\S+ )?Safari\//]],oc=[["ios",/\b(?:iPhone|iPad|iPod)\b/],["android",/\bAndroid\b/],["windows",/\bWindows\b/],["chromeos",/\bCrOS\b/],["mac",/\bMacintosh\b/],["linux",/\bLinux\b/]],sc=e=>{var n,a;let t=ic.find(([,i])=>i.test(e)),r=(n=t==null?void 0:t[1].exec(e))==null?void 0:n[1];return{browser:t?[t[0],r].filter(Boolean).join(" "):"other",platform:((a=oc.find(([,i])=>i.test(e)))==null?void 0:a[0])??"other"}},lc=(e=typeof document>"u"?void 0:document)=>{var i,o;let t=()=>typeof performance>"u"?0:Math.round(performance.now()),r=(e==null?void 0:e.visibilityState)==="hidden"?t():null,n=null,a=!1;return e==null||e.addEventListener("visibilitychange",()=>{e.visibilityState==="hidden"?r=t():r!==null&&(n=t())}),(i=e==null?void 0:e.defaultView)==null||i.addEventListener("pagehide",()=>a=!0),(o=e==null?void 0:e.defaultView)==null||o.addEventListener("pageshow",()=>a=!1),()=>{var c;let s=typeof navigator>"u"?void 0:navigator,l=(c=s==null?void 0:s.connection)==null?void 0:c.effectiveType;return{visibility:(e==null?void 0:e.visibilityState)??"unknown",was_hidden:r!==null,hidden_at_ms:r,shown_at_ms:n,unloading:a,online:typeof(s==null?void 0:s.onLine)=="boolean"?s.onLine:null,connection:typeof l=="string"?l.slice(0,8):null,...sc((s==null?void 0:s.userAgent)??""),page_ms:t()}}},cc=new Set(["boot_failed","fatal","submit_blocked"]),uc=(e,t,r)=>{if(t.unloading||t.visibility==="hidden")return!0;if(e!=="boot_failed"||t.hidden_at_ms===null)return!1;if(r.elapsed_ms===void 0)return!0;let n=t.page_ms-r.elapsed_ms;return t.hidden_at_ms>=n||t.shown_at_ms!==null&&t.shown_at_ms>=n},dc=(e,t,r,n,a)=>{var o;if(t)return"abandoned";if(a.online===!1)return"offline";let i=[n.phase,n.stage,r==null?void 0:r.slice(0,40),n.http_status??((o=n.error)==null?void 0:o.name)];return[...new Set(i.filter(s=>s!==void 0&&s!=="").map(String))].join(":")||e},fc=({config:e,version:t,env:r,seed:n,automated:a=typeof navigator<"u"&&navigator.webdriver===!0,company:i,page:o=lc(),now:s=Date.now,post:l=(c,f)=>fetch(c,f)})=>{let c=ui(n),f=s(),u=e!==void 0&&c%1e4<e.sampleRate*1e4,b=new Set;return{send:(p,g,v={})=>{if(!e||!u||!t)return;let x=o(),C=cc.has(p),_=C&&uc(p,x,v),M=_?`${p}:abandoned`:p;if(b.has(M))return;b.add(M);let{error:j,...D}=v,z={dt:new Date(s()).toISOString(),message:"Candidate widget beacon",kind:p,version:t,company_slug:(i==null?void 0:i())??null,env:r==="production"?"production":"staging",mode:a?"test":"live",seed_hash:c.toString(36),sample_rate:e.sampleRate,...g&&{reason:g.slice(0,40)},...C&&{abandoned:_,cause:dc(p,_,g,v,x).slice(0,60)},since_start_ms:Math.max(0,Math.round(s()-f)),...x,...D,...j&&{error:j,error_message:j.message,error_frame:j.stack[0]??null}};l(`https://${e.host}`,{method:"POST",keepalive:!0,headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify(z)}).catch(()=>{})}}},Qe;function di(e){return{lang:(e==null?void 0:e.lang)??(Qe==null?void 0:Qe.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Qe==null?void 0:Qe.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Qe==null?void 0:Qe.abortPipeEarly)}}var _n;function pc(e){return _n==null?void 0:_n.get(e)}var xn;function hc(e){return xn==null?void 0:xn.get(e)}var kn;function bc(e,t){var r;return(r=kn==null?void 0:kn.get(e))==null?void 0:r.get(t)}function Sn(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function Ee(e,t,r,n,a){let i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??Sn(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??bc(e.reference,l.lang)??(c?hc(l.lang):null)??n.message??pc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function we(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},di())}}}function gc(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Cn(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function fi(e){return{kind:"transformation",type:"transform",reference:fi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function mc(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function En(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function pi(){return{kind:"schema",type:"any",reference:pi,expects:"any",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function hi(e,t){return{kind:"schema",type:"array",reference:hi,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var i;let a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){let s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:a,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Ee(this,"type",r,n);return r}}}function $n(e){return{kind:"schema",type:"boolean",reference:$n,expects:"boolean",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ee(this,"type",t,r),t}}}function $e(e,t){return{kind:"schema",type:"literal",reference:$e,expects:Sn(e),async:!1,literal:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Ee(this,"type",r,n),r}}}function bi(e){return{kind:"schema",type:"null",reference:bi,expects:"null",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return t.value===null?t.typed=!0:Ee(this,"type",t,r),t}}}function $t(e,t){return{kind:"schema",type:"nullable",reference:$t,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=En(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Pr(e){return{kind:"schema",type:"number",reference:Pr,expects:"number",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ee(this,"type",t,r),t}}}function Q(e,t){return{kind:"schema",type:"object",reference:Q,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var i;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in a?a[o]:En(s),c=s["~run"]({value:l},n);if(c.issues){let f={type:"object",origin:"value",input:a,key:o,value:l};for(let u of c.issues)u.path?u.path.unshift(f):u.path=[f],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=mc(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ee(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else Ee(this,"type",r,n);return r}}}function _e(e,t){return{kind:"schema",type:"optional",reference:_e,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=En(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function gi(e,t){return{kind:"schema",type:"picklist",reference:gi,expects:Cn(e.map(Sn),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Ee(this,"type",r,n),r}}}function An(e,t,r){return{kind:"schema",type:"record",reference:An,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return we(this)},"~run"(n,a){var o,s;let i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(let l in i)if(gc(i,l)){let c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){let b={type:"object",origin:"key",input:i,key:l,value:c};for(let p of f.issues)p.path=[b],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}let u=this.value["~run"]({value:c},a);if(u.issues){let b={type:"object",origin:"value",input:i,key:l,value:c};for(let p of u.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else Ee(this,"type",n,a);return n}}}function be(e){return{kind:"schema",type:"string",reference:be,expects:"string",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ee(this,"type",t,r),t}}}function mi(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function In(e,t){return{kind:"schema",type:"union",reference:In,expects:Cn(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){let a,i,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];Ee(this,"type",r,n,{issues:mi(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ee(this,"type",r,n,{issues:mi(o)})}return r}}}function qt(){return{kind:"schema",type:"unknown",reference:qt,expects:"unknown",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function vi(e,t,r){return{kind:"schema",type:"variant",reference:vi,expects:"Object",async:!1,key:e,options:t,message:r,get"~standard"(){return we(this)},"~run"(n,a){let i=n.value;if(i&&typeof i=="object"){let o,s=0,l=this.key,c=[],f=(u,b)=>{for(let p of u.options){if(p.type==="variant")f(p,new Set(b).add(p.key));else{let g=!0,v=0;for(let x of b){let C=p.entries[x];if(x in i?C["~run"]({typed:!1,value:i[x]},{abortEarly:!0}).issues:C.type!=="exact_optional"&&C.type!=="optional"&&C.type!=="nullish"){g=!1,l!==x&&(s<v||s===v&&x in i&&!(l in i))&&(s=v,l=x,c=[]),l===x&&c.push(p.entries[x].expects);break}v++}if(g){let x=p["~run"]({value:i},a);(!o||!o.typed&&x.typed)&&(o=x)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;Ee(this,"type",n,a,{input:i[l],expected:Cn(c,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else Ee(this,"type",n,a);return n}}}function vc(...e){return{...e[0],pipe:e,get"~standard"(){return we(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function cr(e,t,r){let n=e["~run"]({value:t},di(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var wc=e=>({ok:!0,err:!1,val:e}),yc=e=>({err:!0,ok:!1,val:e}),Tn=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function Dn(e,t,r){var o,s;let n=e.find(l=>l.type==="pre-apply-result");if(!n)return;let a=(o=t[n.data.participationKey])==null?void 0:o.value,i={};if(a===!0)for(let l of Tn(e)){let c=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(c)&&c.length===1&&(c=c[0]),(typeof c=="boolean"||typeof c=="string")&&(i[l.data.key]=c)}return{node_id:n.id,flow_session_id:r,participation:a,answers:i}}function _c(e,t){let r=Dn(e,t,""),n=Tn(e).map(i=>{let o=i.data.preApply,s=r==null?void 0:r.answers[i.data.key],l=i.type==="question-boolean"?typeof s=="boolean":i.data.options.some(c=>c.value===s);return{key:i.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),a=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&n.length>0&&n.every(i=>i.valid)?"completed":"unavailable";return{status:a,hasHardConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="hard"):null,hasAdvisoryConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="advisory"):null,answers:a==="completed"?n:[]}}function xc(e,t){let r=new Set(Tn(e).map(n=>n.data.key));for(let n of e)n.type==="pre-apply-result"&&(r.add(n.data.key),r.add(n.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([n])=>!r.has(n)))}var kc=()=>{try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return typeof e=="string"&&e.length>0?e:void 0}catch{return}},ht=class extends Error{constructor(){super("Aborted")}},ur=(e,t)=>{if(t.length===0)return;let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n]}return r},Sc=(e,t="all")=>{let r={},n=t==="all"?null:new Set(t);for(let a in e){let i=e[a];i&&(n&&!n.has(a)||(r[a]=i.value))}return r},wi=(e,t)=>{let r=new Set(e.flatMap(n=>n.type==="add-submission"?[n.data.key]:[]));return Object.entries(t).some(([n,a])=>a!==void 0&&a.type!=="integration"&&!r.has(n))},Cc=({key:e,submissions:t})=>{var n;let r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},yi=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let a=ur(n,t);switch(typeof a){case"string":return{type:"string",value:a};case"number":return{type:"number",value:a};case"boolean":return{type:"boolean",value:a};default:console.warn(`Unexpected type for $context.${t.join(".")}`,a);return}}return r[e]},Ec=e=>{let t=e.split(".").pop();return t?wc(t?"."+t:""):yc("No file extension found")},_i=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let a=Ec(n.name);return a.ok&&r.includes(a.val.toLowerCase())})},Ht=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Vr=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,$c=Q({integration_response:Q({data:Q({redirect_url:be(),message:_e($t(be())),button_text:_e($t(be()))})})}),jn=e=>cr($c,e).success,Ac=Q({integration_response:Q({status:_e(qt()),error:Q({message:be(),data:_e(qt())})})}),xi=e=>cr(Ac,e).success,Ic=Q({success:$e(!0),integration_response:Q({data:Q({outcome:$e("pending"),message:_e(qt())}),error:_e(bi())})}),Mn=e=>{let t=cr(Ic,e);if(!t.success||jn(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};Q({success:$e(!1),message:_e(qt())});var Tc=Q({error:$e("Validation failed"),messages:Q({})}),Dc=(e,t)=>t===422&&cr(Tc,e).success,ki=(e,t)=>{if(!xi(e))return;let r=e.integration_response,n=r.error.data,a=typeof n=="object"&&n!==null?n:{},i=g=>typeof a[g]=="string"?a[g]:void 0,o=g=>typeof a[g]=="boolean"?a[g]:void 0,s=g=>{let v=a[g];return Number.isSafeInteger(v)&&v>=0?v:void 0},l=g=>{let v=i(g),x=v===void 0?NaN:Date.parse(v);return Number.isFinite(x)?x:void 0},c=typeof r.status=="number"?r.status:t,f=i("phase"),u=i("verdict"),b=i("code"),p=c===409&&f==="submit"&&u==="confirmed"?"duplicate":c===410&&b==="job_closed"?"closed":f==="submit"&&u==="unknown"?"unknown":void 0;return{message:r.error.message,status:c,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:u,code:b,reason:i("reason"),maintenanceUntil:l("maintenance_until"),field:i("field"),outcome:p}},jc=vi("reason",[Q({outcome:$e("sent"),reason:$e("sandbox"),ats_label:$t(be())}),Q({outcome:$e("held"),reason:gi(["production_connection","no_sandbox_known","company_hold"]),ats_label:$t(be())}),Q({outcome:$e("internal"),reason:$e("internal"),ats_label:$t(be())}),Q({outcome:$e("held"),reason:$e("redirect"),ats_label:be()})]),Mc=e=>{let t=cr(Q({staging_destination:jc}),e);if(!t.success)return;let r=t.output.staging_destination;switch(r.reason){case"sandbox":return`Staging: sent to ${r.ats_label===null?"the ATS":r.ats_label} sandbox`;case"production_connection":return"Staging: held, production connection";case"no_sandbox_known":return"Staging: held, no sandbox known";case"company_hold":return"Staging: held, company set to hold all";case"internal":return"Staging: saved in inploi (no ATS)";case"redirect":return`Staging: held, redirect to ${r.ats_label}`}},Si=3e4,Oc=2e4,Lc=6e4,On=12e4,Ci=360*6e4,Fc=60*6e4,Ei=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,r=t===void 0?0:t-Date.now();return r>0&&r<=Ci?t:void 0},Nc=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=Ei(e);return t===void 0?{}:{until:t}},$i=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Rc=(e,t)=>{let r=Ei(t);if(r!==void 0)return{waitMs:r-Date.now(),throttles:(e??0)+1,maintenance:!0};if(!((t==null?void 0:t.reason)==="provider_maintenance"||(t==null?void 0:t.retryable)===!0&&(t.providerStatus===429||t.providerStatus!==void 0&&t.providerStatus>=500||t.phase==="workflow"&&t.verdict==="not_submitted")))return{waitMs:Si};let n=(e??0)+1,a=Math.min(n*Oc,Lc),i=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(a,i),On),throttles:n}},Ai=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Pc=e=>{if(!xi(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},Vc=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",Bc=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",zc=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,Uc=(e,t)=>{if(typeof e!="object"||e===null)return null;let r=e.integration_response;if(typeof r!="object"||r===null){if(t===void 0)return null;let l="code"in e&&typeof e.code=="string"?e.code:void 0;return{service:"API",response:{status:t,payload:l===void 0?{}:{code:l}}}}let n=r;if(typeof n.status!="number"||n.service!==void 0&&typeof n.service!="string")return null;let a="data"in n,i=n.error,o=typeof i=="object"&&i!==null&&typeof i.message=="string"&&"data"in i;if(!a&&!o)return null;let s=a?n.data:i.data??null;return{service:n.service??"INVALID_SERVICE",response:{status:n.status,payload:s},...Mn(e)&&{outcome:"pending"}}},qc=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isFinite(t.getTime())&&t.toISOString().slice(0,10)===e},Hc=(e,t)=>{if(!qc(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},Wc=e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>{if(typeof n.result!="string"||!n.result)return r(new Error("Invalid file"));t(n.result)},n.onerror=r,n.readAsDataURL(e)}),Ii=e=>typeof e=="object"&&e!==null&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Ln=(e,t)=>e?{...e,...Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>{let a=e[r];return[r,Ii(a)&&Ii(n)?Ln(a,n):n]}))}:t,Kc=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let a=t[n];if(!a)continue;let i=ur(e,n.split("."));if(a.required&&i==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(i!=null)switch(a.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:a.type}}},Ti={uk:"gb","great britain":"gb",england:"gb",scotland:"gb",wales:"gb","northern ireland":"gb",lincolnshire:"gb",surrey:"gb","republic of ireland":"ie",eire:"ie","hong kong sar":"hk","united states of america":"us",turkey:"tr","czech republic":"cz",burma:"mm",kosovo:"xk",xk:"xk"},Gc=`adand aeare afafg agatg aiaia alalb amarm aoago aqata ararg asasm ataut auaus awabw axala azaze babih bbbrb bdbgd bebel
|
|
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,Yc=()=>{if(At)return At;At=new Map;let e=new Intl.DisplayNames(["en"],{type:"region",fallback:"none"});for(let t of Gc.split(/\s+/)){let r=t.slice(0,2),n=e.of(r.toUpperCase());n&&At.set(n.toLowerCase(),r),At.set(r,r),At.set(t.slice(2),r)}return At},Jc=e=>{let t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(Ti,t))return Ti[t];let r=/^[a-z]{2}-[a-z0-9]{1,3}$/.test(t)?t.slice(0,2):t;return Yc().get(r)},Zc=e=>[...new Set(e.flatMap(t=>Jc(t)??[]))].sort();let et;function Di(e){return{lang:(e==null?void 0:e.lang)??(et==null?void 0:et.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(et==null?void 0:et.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(et==null?void 0:et.abortPipeEarly)}}let Fn;function Xc(e){return Fn==null?void 0:Fn.get(e)}let Nn;function Qc(e){return Nn==null?void 0:Nn.get(e)}let Rn;function eu(e,t){var r;return(r=Rn==null?void 0:Rn.get(e))==null?void 0:r.get(t)}function Pn(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function Ae(e,t,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??Pn(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??eu(e.reference,l.lang)??(c?Qc(l.lang):null)??n.message??Xc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Ie(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Di())}}}function tu(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ji(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}const ru=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Mi(e){return{kind:"validation",type:"email",reference:Mi,expects:null,async:!1,requirement:ru,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&Ae(this,"email",t,r),t}}}function Vn(e,t){return{kind:"validation",type:"max_length",reference:Vn,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&Ae(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Br(e,t){return{kind:"validation",type:"min_length",reference:Br,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&Ae(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Oi(e){return{kind:"transformation",type:"transform",reference:Oi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Bn(){return{kind:"transformation",type:"trim",reference:Bn,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function nu(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function zr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ur(e,t){return{kind:"schema",type:"array",reference:Ur,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:a,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Ae(this,"type",r,n);return r}}}function zn(e){return{kind:"schema",type:"boolean",reference:zn,expects:"boolean",async:!1,message:e,get"~standard"(){return Ie(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ae(this,"type",t,r),t}}}function Li(e,t){return{kind:"schema",type:"literal",reference:Li,expects:Pn(e),async:!1,literal:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Ae(this,"type",r,n),r}}}function J(e,t){return{kind:"schema",type:"nullable",reference:J,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ie(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function tt(e,t){return{kind:"schema",type:"nullish",reference:tt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ie(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Ve(e){return{kind:"schema",type:"number",reference:Ve,expects:"number",async:!1,message:e,get"~standard"(){return Ie(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ae(this,"type",t,r),t}}}function pe(e,t){return{kind:"schema",type:"object",reference:pe,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:zr(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:a,key:o,value:l};for(const u of c.issues)u.path?u.path.unshift(f):u.path=[f],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=nu(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ae(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else Ae(this,"type",r,n);return r}}}function rt(e,t){return{kind:"schema",type:"optional",reference:rt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ie(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function bt(e,t){return{kind:"schema",type:"picklist",reference:bt,expects:ji(e.map(Pn),"|"),async:!1,options:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Ae(this,"type",r,n),r}}}function qr(e,t,r){return{kind:"schema",type:"record",reference:qr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Ie(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if(tu(i,l)){const c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){const b={type:"object",origin:"key",input:i,key:l,value:c};for(const p of f.issues)p.path=[b],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:c},a);if(u.issues){const b={type:"object",origin:"value",input:i,key:l,value:c};for(const p of u.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else Ae(this,"type",n,a);return n}}}function R(e){return{kind:"schema",type:"string",reference:R,expects:"string",async:!1,message:e,get"~standard"(){return Ie(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ae(this,"type",t,r),t}}}function Fi(e){let t;if(e)for(const r of e)t?t.push(...r.issues):t=r.issues;return t}function Ni(e,t){return{kind:"schema",type:"union",reference:Ni,expects:ji(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Ie(this)},"~run"(r,n){let a,i,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];Ae(this,"type",r,n,{issues:Fi(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ae(this,"type",r,n,{issues:Fi(o)})}return r}}}function Ri(){return{kind:"schema",type:"unknown",reference:Ri,expects:"unknown",async:!1,get"~standard"(){return Ie(this)},"~run"(e){return e.typed=!0,e}}}function Wt(...e){return{...e[0],pipe:e,get"~standard"(){return Ie(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Un(e,t,r){const n=e["~run"]({value:t},Di(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var au=e=>e,iu=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},ou=class extends iu{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},su={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},lu=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16));function qn(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function lg(e){return e}var cu=["agent","sdk","form","integration","migration"],uu=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],du=["screening","cv_match","interview","overall"],fu=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],pu=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Pi=bt(cu),hu=bt(uu),bu=Wt(R(),Bn(),Br(1),Vn(100)),gu=bt(du),mu=bt(fu),vu=Wt(R(),Bn(),Br(1),Vn(100)),wu=bt(pu),Vi=pe({id:R(),email:J(R()),firstName:J(R()),lastName:J(R()),phone:J(R()),source:J(Pi),identifiedAt:J(R()),createdAt:R(),updatedAt:R()}),Bi=Wt(R(),Br(1)),Hn=qr(R(),Ri()),yu=pe({id:R(),applicationId:R(),status:mu,scheduledAt:J(R()),completedAt:J(R()),meta:J(Hn),createdAt:R(),updatedAt:R()}),_u=pe({score:Ve(),reason:R(),confidence:Ve()}),zi=pe({id:R(),candidateId:R(),jobId:Ve(),stage:bu,stageGroup:hu,stageEnteredAt:R(),rating:J(Ve()),disqualifiedAt:J(R()),disqualificationReason:J(vu),disqualificationNote:J(R()),source:wu,sourceDetail:J(R()),sessionId:J(Ve()),externalApplicationId:J(R()),meta:J(Hn),context:J(Hn),scoredAt:J(R()),createdAt:R(),updatedAt:R()}),xu=pe({id:R(),applicationId:R(),scoreType:gu,score:J(Ve()),reason:J(R()),categories:J(qr(R(),_u)),scoredBy:J(R()),createdAt:R()});({...zi.entries},{...Vi.entries});var ku=pe({anonymousId:Bi,email:Bi,firstName:tt(R()),lastName:tt(R()),phone:tt(R()),source:tt(Pi)}),Su=pe({candidateId:R(),isNew:zn()}),Cu=pe({id:R(),stageGroup:R(),createdAt:R()}),Eu=pe({isDuplicate:zn(),existingApplication:rt(Cu)}),$u=({environment:e,publishableKey:t,logger:r})=>{let n=su[e];return{async checkDuplicate(a){try{let i=new URLSearchParams({email:a.email,scope:a.scope});a.scope==="job"&&a.jobId!=null&&i.set("job_id",String(a.jobId));let o=await fetch(`${n}/applications/check-duplicate?${i}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Un(Eu,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(i){return r.error("[TalentBankClient] checkDuplicate failed:",i),{isDuplicate:!1}}},async identify(a){try{if(!a.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let i={email:a.email,firstName:a.firstName,lastName:a.lastName,phone:a.phone,anonymousId:a.anonymousId,source:a.source??"sdk"},o=Un(ku,i);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${n}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Un(Su,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(i){return r.error("[TalentBankClient] identify failed:",i),null}}}},Au=["DAILY","WEEKLY","MONTHLY"],Iu=qr(R(),Ni([R(),Ur(R()),pe({type:Li("provided"),lat:Ve(),lng:Ve(),radius:Ve(),unit:rt(bt(["miles","km"])),label:rt(R())})])),Tu={pathname:"/job/:id",method:"GET",schema:{response:pe({id:Ve(),external_id:tt(R()),city:tt(R()),town:tt(R()),category:tt(R())})}};async function Du(e,{contact:t,job:r}){var a;let n={};if(r){let i=await e.request(Tu,{params:{id:r.id}});if((r.id_type==="internal"?String(i.id):i.external_id)!==r.id)throw new Error("Job lookup returned a different role");for(let o of["city","town","category"]){let s=(a=i[o])==null?void 0:a.trim();s&&(n[o]=[s])}}await e.request(ju,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var ju={pathname:"/search/save",method:"POST",schema:{response:qn(),body:pe({contact:pe({email:Wt(rt(R()),R(),Mi()),first_name:rt(R()),last_name:rt(R())}),alerts:Wt(rt(R()),R(),bt(Au)),filters:Iu})}},Mu=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:Wt(pe({country:rt(Ur(pe({value:R()})),[])}),Oi(({country:r})=>r.map(({value:n})=>n))),searchParams:qn()}};return e.request(t,{searchParams:{filters:{country:null}}})},Hr=new WeakMap,Ui=e=>(Hr.has(e)||(Hr.set(e,void 0),Mu(e).then(async t=>{let{jobCountryCodes:r}=await Promise.resolve().then(()=>ap);Hr.set(e,r(t).join(",")||void 0)}).catch(()=>{})),Hr.get(e)),Ou=(e,t)=>{let r=new Set,n=[];for(let a=0;a<Math.max(e.length,t.length);a++)for(let i of[e[a],t[a]]){if(!i)continue;let o=i.mapbox_id||i.full_address||[i.name,i.place_formatted].filter(Boolean).join(", ");if(!r.has(o)&&(r.add(o),n.push(i),n.length===5))return n}return n},Lu=600,Fu=async(e,t,r)=>{if(r==null||r.throwIfAborted(),!t){let n=await e();return r==null||r.throwIfAborted(),n}return new Promise((n,a)=>{let i,o,s,l=!1,c=()=>{l=!0,clearTimeout(s),r==null||r.removeEventListener("abort",f)},f=()=>{c(),a(r==null?void 0:r.reason)},u=()=>{c(),(i==null?void 0:i.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(Ou(i.value,o.value)):(i==null?void 0:i.status)==="fulfilled"?n(i.value):(o==null?void 0:o.status)==="fulfilled"?n(o.value):(i==null?void 0:i.status)==="rejected"&&a(i.reason)},b=(p,g)=>{l||(p?i=g:o=g,i&&o?u():g.status==="fulfilled"&&g.value.length>0&&(s=setTimeout(u,Lu)))};r==null||r.addEventListener("abort",f,{once:!0});for(let p of[!0,!1])e(p?t:void 0).then(g=>b(p,{status:"fulfilled",value:g}),g=>b(p,{status:"rejected",reason:g}))})},qi=vc(In([be(),Pr()]),fi(String)),Hi=Q({id:qi,version:Pr(),build:Pr(),nodes:hi(pi()),context_schema:_e($t(An(be(),Q({required:$n(),type:In([$e("string"),$e("number")])}))))}),Nu=Q({flow:Hi}),Ru=Q({company:Q({name:be()}),context:_e(An(be(),qt())),flow:Hi,job:Q({id:qi,title:be()}),user:_e(Q({city:_e(be()),country:_e(be()),isEU:_e($n()),continent:_e(be())}))}),Pu=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),Vu={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:qn(),response:Ru}},Bu={pathname:"/flow/id/:id",method:"GET",schema:{response:Nu}},dr,F,Wi,Ki,It,Gi,Yi,Wn,Ji,Kt={},Zi=[],zu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Wr=Array.isArray;function nt(e,t){for(var r in t)e[r]=t[r];return e}function Xi(e){var t=e.parentNode;t&&t.removeChild(e)}function Oe(e,t,r){var n,a,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?dr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return fr(e,o,n,a,null)}function fr(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Wi};return a==null&&F.vnode!=null&&F.vnode(i),i}function Uu(){return{current:null}}function ie(e){return e.children}function Be(e,t){this.props=e,this.context=t}function Kr(e,t){if(t==null)return e.__?Kr(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Kr(e):null}function Qi(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Qi(e)}}function Kn(e){(!e.__d&&(e.__d=!0)&&It.push(e)&&!Gr.__r++||Gi!==F.debounceRendering)&&((Gi=F.debounceRendering)||Yi)(Gr)}function Gr(){var e,t,r,n,a,i,o,s,l;for(It.sort(Wn);e=It.shift();)e.__d&&(t=It.length,n=void 0,a=void 0,i=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],a=[],(i=nt({},o)).__v=o.__v+1,Gn(l,o,i,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??Kr(o),o.__h,a),oo(n,o,a),o.__e!=s&&Qi(o)),It.length>t&&It.sort(Wn));Gr.__r=0}function eo(e,t,r,n,a,i,o,s,l,c,f){var u,b,p,g,v,x,C,_,M,j,D=0,z=n&&n.__k||Zi,A=z.length,S=A,k=t.length;for(r.__k=[],u=0;u<k;u++)(g=r.__k[u]=(g=t[u])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?fr(null,g,null,null,g):Wr(g)?fr(ie,{children:g},null,null,null):g.__b>0?fr(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(_=qu(g,z,C=u+D,S))===-1?p=Kt:(p=z[_]||Kt,z[_]=void 0,S--),Gn(e,g,p,a,i,o,s,l,c,f),v=g.__e,(b=g.ref)&&p.ref!=b&&(p.ref&&Yn(p.ref,null,g),f.push(b,g.__c||v,g)),v!=null&&(x==null&&(x=v),j=!(M=p===Kt||p.__v===null)&&_===C,M?_==-1&&D--:_!==C&&(_===C+1?(D++,j=!0):_>C?S>k-C?(D+=_-C,j=!0):D--:D=_<C&&_==C-1?_-C:0),C=u+D,j=j||_==u&&!M,typeof g.type!="function"||_===C&&p.__k!==g.__k?typeof g.type=="function"||j?g.__d!==void 0?(l=g.__d,g.__d=void 0):l=v.nextSibling:l=ro(e,v,l):l=to(g,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=x,u=A;u--;)z[u]!=null&&(typeof r.type=="function"&&z[u].__e!=null&&z[u].__e==r.__d&&(r.__d=z[u].__e.nextSibling),so(z[u],z[u]))}function to(e,t,r){for(var n,a=e.__k,i=0;a&&i<a.length;i++)(n=a[i])&&(n.__=e,t=typeof n.type=="function"?to(n,t,r):ro(r,n.__e,t));return t}function at(e,t){return t=t||[],e==null||typeof e=="boolean"||(Wr(e)?e.some(function(r){at(r,t)}):t.push(e)),t}function ro(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function qu(e,t,r,n){var a=e.key,i=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&a==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&a==l.key&&i===l.type)return o;o--}if(s<t.length){if((l=t[s])&&a==l.key&&i===l.type)return s;s++}}return-1}function Hu(e,t,r,n,a){var i;for(i in r)i==="children"||i==="key"||i in t||Yr(e,i,null,r[i],n);for(i in t)a&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||Yr(e,i,t[i],r[i],n)}function no(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||zu.test(t)?r:r+"px"}function Yr(e,t,r,n,a){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||no(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||no(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?io:ao,i):e.removeEventListener(t,i?io:ao,i);else if(t!=="dangerouslySetInnerHTML"){if(a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function ao(e){return this.l[e.type+!1](F.event?F.event(e):e)}function io(e){return this.l[e.type+!0](F.event?F.event(e):e)}function Gn(e,t,r,n,a,i,o,s,l,c){var f,u,b,p,g,v,x,C,_,M,j,D,z,A,S,k=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=F.__b)&&f(t);try{e:if(typeof k=="function"){if(C=t.props,_=(f=k.contextType)&&n[f.__c],M=f?_?_.props.value:f.__:n,r.__c?x=(u=t.__c=r.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(C,M):(t.__c=u=new Be(C,M),u.constructor=k,u.render=Ku),_&&_.sub(u),u.props=C,u.state||(u.state={}),u.context=M,u.__n=n,b=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),k.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=nt({},u.__s)),nt(u.__s,k.getDerivedStateFromProps(C,u.__s))),p=u.props,g=u.state,u.__v=t,b)k.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k.getDerivedStateFromProps==null&&C!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(C,M),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(C,u.__s,M)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=C,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(E){E&&(E.__=t)}),j=0;j<u._sb.length;j++)u.__h.push(u._sb[j]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(C,u.__s,M),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,g,v)})}if(u.context=M,u.props=C,u.__P=e,u.__e=!1,D=F.__r,z=0,"prototype"in k&&k.prototype.render){for(u.state=u.__s,u.__d=!1,D&&D(t),f=u.render(u.props,u.state,u.context),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[]}else do u.__d=!1,D&&D(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++z<25);u.state=u.__s,u.getChildContext!=null&&(n=nt(nt({},n),u.getChildContext())),b||u.getSnapshotBeforeUpdate==null||(v=u.getSnapshotBeforeUpdate(p,g)),eo(e,Wr(S=f!=null&&f.type===ie&&f.key==null?f.props.children:f)?S:[S],t,r,n,a,i,o,s,l,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),x&&(u.__E=u.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Wu(r.__e,t,r,n,a,i,o,l,c);(f=F.diffed)&&f(t)}catch(E){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),F.__e(E,t,r)}}function oo(e,t,r){for(var n=0;n<r.length;n++)Yn(r[n],r[++n],r[++n]);F.__c&&F.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){F.__e(i,a.__v)}})}function Wu(e,t,r,n,a,i,o,s,l){var c,f,u,b=r.props,p=t.props,g=t.type,v=0;if(g==="svg"&&(a=!0),i!=null){for(;v<i.length;v++)if((c=i[v])&&"setAttribute"in c==!!g&&(g?c.localName===g:c.nodeType===3)){e=c,i[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(p);e=a?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),i=null,s=!1}if(g===null)b===p||s&&e.data===p||(e.data=p);else{if(i=i&&dr.call(e.childNodes),f=(b=r.props||Kt).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(i!=null)for(b={},v=0;v<e.attributes.length;v++)b[e.attributes[v].name]=e.attributes[v].value;(u||f)&&(u&&(f&&u.__html==f.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(Hu(e,p,b,a,s),u)t.__k=[];else if(eo(e,Wr(v=t.props.children)?v:[v],t,r,n,a&&g!=="foreignObject",i,o,i?i[0]:r.__k&&Kr(r,0),s,l),i!=null)for(v=i.length;v--;)i[v]!=null&&Xi(i[v]);s||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||g==="progress"&&!v||g==="option"&&v!==b.value)&&Yr(e,"value",v,b.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&Yr(e,"checked",v,b.checked,!1))}return e}function Yn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){F.__e(n,r)}}function so(e,t,r){var n,a;if(F.unmount&&F.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Yn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){F.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&&so(n[a],t,r||typeof e.type!="function");r||e.__e==null||Xi(e.__e),e.__=e.__e=e.__d=void 0}function Ku(e,t,r){return this.constructor(e,r)}function Tt(e,t,r){var n,a,i,o;F.__&&F.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],o=[],Gn(t,e=(!n&&r||t).__k=Oe(ie,null,[e]),a||Kt,Kt,t.ownerSVGElement!==void 0,!n&&r?[r]:a?null:t.firstChild?dr.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,o),oo(i,e,o)}function lo(e,t){Tt(e,t,lo)}function Gu(e,t,r){var n,a,i,o,s=nt({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?dr.call(arguments,2):r),fr(e.type,s,n||e.key,a||e.ref,null)}function co(e,t){var r={__c:t="__cC"+Ji++,__:e,Consumer:function(n,a){return n.children(a)},Provider:function(n){var a,i;return this.getChildContext||(a=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&a.some(function(s){s.__e=!0,Kn(s)})},this.sub=function(o){a.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){a.splice(a.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}dr=Zi.slice,F={__e:function(e,t,r,n){for(var a,i,o;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),o=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),o=a.__d),o)return a.__E=a}catch(s){e=s}throw e}},Wi=0,Ki=function(e){return e!=null&&e.constructor===void 0},Be.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=nt({},this.state),typeof e=="function"&&(e=e(nt({},r),this.props)),e&&nt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Kn(this))},Be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Kn(this))},Be.prototype.render=ie,It=[],Yi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wn=function(e,t){return e.__v.__b-t.__v.__b},Gr.__r=0,Ji=0;var gt,ee,Jn,uo,Gt=0,fo=[],Jr=[],po=F.__b,ho=F.__r,bo=F.diffed,go=F.__c,mo=F.unmount;function Yt(e,t){F.__h&&F.__h(ee,e,Gt||t),Gt=0;var r=ee.__H||(ee.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Jr}),r.__[e]}function ze(e){return Gt=1,vo(_o,e)}function vo(e,t,r){var n=Yt(gt++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):_o(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=ee,!ee.u)){var a=function(s,l,c){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(b){return b.__c});if(f.every(function(b){return!b.__N}))return!i||i.call(this,s,l,c);var u=!1;return f.forEach(function(b){if(b.__N){var p=b.__[0];b.__=b.__N,b.__N=void 0,p!==b.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!i||i.call(this,s,l,c))};ee.u=!0;var i=ee.shouldComponentUpdate,o=ee.componentWillUpdate;ee.componentWillUpdate=function(s,l,c){if(this.__e){var f=i;i=void 0,a(s,l,c),i=f}o&&o.call(this,s,l,c)},ee.shouldComponentUpdate=a}return n.__N||n.__}function Dt(e,t){var r=Yt(gt++,3);!F.__s&&Xn(r.__H,t)&&(r.__=e,r.i=t,ee.__H.__h.push(r))}function Te(e,t){var r=Yt(gt++,4);!F.__s&&Xn(r.__H,t)&&(r.__=e,r.i=t,ee.__h.push(r))}function he(e){return Gt=5,mt(function(){return{current:e}},[])}function Yu(e,t,r){Gt=6,Te(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function mt(e,t){var r=Yt(gt++,7);return Xn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Ju(e,t){return Gt=8,mt(function(){return e},t)}function wo(e){var t=ee.context[e.__c],r=Yt(gt++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(ee)),t.props.value):e.__}function Zu(e,t){F.useDebugValue&&F.useDebugValue(t?t(e):e)}function Xu(){var e=Yt(gt++,11);if(!e.__){for(var t=ee.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Qu(){for(var e;e=fo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Zr),e.__H.__h.forEach(Zn),e.__H.__h=[]}catch(t){e.__H.__h=[],F.__e(t,e.__v)}}F.__b=function(e){ee=null,po&&po(e)},F.__r=function(e){ho&&ho(e),gt=0;var t=(ee=e.__c).__H;t&&(Jn===ee?(t.__h=[],ee.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Jr,r.__N=r.i=void 0})):(t.__h.forEach(Zr),t.__h.forEach(Zn),t.__h=[],gt=0)),Jn=ee},F.diffed=function(e){bo&&bo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fo.push(t)!==1&&uo===F.requestAnimationFrame||((uo=F.requestAnimationFrame)||ed)(Qu)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Jr&&(r.__=r.__V),r.i=void 0,r.__V=Jr})),Jn=ee=null},F.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Zr),r.__h=r.__h.filter(function(n){return!n.__||Zn(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],F.__e(n,r.__v)}}),go&&go(e,t)},F.unmount=function(e){mo&&mo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Zr(n)}catch(a){t=a}}),r.__H=void 0,t&&F.__e(t,r.__v))};var yo=typeof requestAnimationFrame=="function";function ed(e){var t,r=function(){clearTimeout(n),yo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);yo&&(t=requestAnimationFrame(r))}function Zr(e){var t=ee,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),ee=t}function Zn(e){var t=ee;e.__c=e.__(),ee=t}function Xn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function _o(e,t){return typeof t=="function"?t(e):t}var td=Symbol.for("preact-signals");function Qn(){if(Jt>1)Jt--;else{for(var e,t=!1;pr!==void 0;){var r=pr;for(pr=void 0,ea++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ko(r))try{r.c()}catch(a){t||(e=a,t=!0)}r=n}}if(ea=0,Jt--,t)throw e}}var Z=void 0,pr=void 0,Jt=0,ea=0,Xr=0;function xo(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function ge(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ge.prototype.brand=td,ge.prototype.h=function(){return!0},ge.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},ge.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ge.prototype.subscribe=function(e){var t=this;return ra(function(){var r=t.value,n=Z;Z=void 0;try{e(r)}finally{Z=n}})},ge.prototype.valueOf=function(){return this.value},ge.prototype.toString=function(){return this.value+""},ge.prototype.toJSON=function(){return this.value},ge.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(ge.prototype,"value",{get:function(){var e=xo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ea>100)throw new Error("Cycle detected");this.v=e,this.i++,Xr++,Jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Qn()}}}});function Le(e){return new ge(e)}function ko(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function So(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Co(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Zt(e){ge.call(this,void 0),this.x=e,this.s=void 0,this.g=Xr-1,this.f=4}(Zt.prototype=new ge).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Xr))return!0;if(this.g=Xr,this.f|=1,this.i>0&&!ko(this))return this.f&=-2,!0;var e=Z;try{So(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Z=e,Co(this),this.f&=-2,!0},Zt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ge.prototype.S.call(this,e)},Zt.prototype.U=function(e){if(this.t!==void 0&&(ge.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Zt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Zt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=xo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function rd(e){return new Zt(e)}function Eo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Jt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,ta(e),n}finally{Z=r,Qn()}}}function ta(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Eo(e)}function nd(e){if(Z!==this)throw new Error("Out-of-order effect");Co(this),Z=e,this.f&=-2,8&this.f&&ta(this),Qn()}function hr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}hr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},hr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Eo(this),So(this),Jt++;var e=Z;return Z=this,nd.bind(this,e)},hr.prototype.N=function(){2&this.f||(this.f|=2,this.o=pr,pr=this)},hr.prototype.d=function(){this.f|=8,1&this.f||ta(this)};function ra(e){var t=new hr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var na;function Xt(e,t){F[e]=t.bind(null,F[e]||function(){})}function Qr(e){na&&na(),na=e&&e.S()}function $o(e){var t=this,r=e.data,n=id(r);n.value=r;var a=mt(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Ki(a.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=a.peek():(t.__$f|=1,t.setState({}))},rd(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return a.value}$o.displayName="_st",Object.defineProperties(ge.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:$o},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Xt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var a in n)if(a!=="children"){var i=n[a];i instanceof ge&&(r||(t.__np=r={}),r[a]=i,n[a]=i.peek())}}e(t)}),Xt("__r",function(e,t){Qr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(a){var i;return ra(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),Qr(r),e(t)}),Xt("__e",function(e,t,r,n){Qr(),e(t,r,n)}),Xt("diffed",function(e,t){Qr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,a=t.props;if(n){var i=r.U;if(i)for(var o in i){var s=i[o];s!==void 0&&!(o in n)&&(s.d(),i[o]=void 0)}else r.U=i={};for(var l in n){var c=i[l],f=n[l];c===void 0?(c=ad(r,l,f,a),i[l]=c):c.o(f,a)}}}e(t)});function ad(e,t,r,n){var a=t in e&&e.ownerSVGElement===void 0,i=Le(r);return{o:function(o,s){i.value=o,n=s},d:ra(function(){var o=i.value.value;n[t]!==o&&(n[t]=o,a?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Xt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var a in n){var i=n[a];i&&i.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Xt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Be.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function id(e){return mt(function(){return Le(e)},[])}const xe=Symbol.for("@ts-pattern/matcher"),Ao=Symbol.for("@ts-pattern/isVariadic"),en="@ts-pattern/anonymous-select-key",aa=e=>!!(e&&typeof e=="object"),tn=e=>e&&!!e[xe],se=(e,t,r)=>{if(tn(e)){const n=e[xe](),{matched:a,selections:i}=n.match(t);return a&&i&&Object.keys(i).forEach(o=>r(o,i[o])),a}if(aa(e)){if(!aa(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],a=[],i=[];for(const o of e.keys()){const s=e[o];tn(s)&&s[Ao]?i.push(s):i.length?a.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+a.length)return!1;const o=t.slice(0,n.length),s=a.length===0?[]:t.slice(-a.length),l=t.slice(n.length,a.length===0?1/0:-a.length);return n.every((c,f)=>se(c,o[f],r))&&a.every((c,f)=>se(c,s[f],r))&&(i.length===0||se(i[0],l,r))}return e.length===t.length&&e.every((o,s)=>se(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const a=e[n];return(n in t||tn(i=a)&&i[xe]().matcherType==="optional")&&se(a,t[n],r);var i})}return Object.is(t,e)},ke=e=>{var t,r,n;return aa(e)?tn(e)?(t=(r=(n=e[xe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?br(e,ke):br(Object.values(e),ke):[]},br=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Io(...e){if(e.length===1){const[t]=e;return r=>se(t,r,()=>{})}if(e.length===2){const[t,r]=e;return se(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ue(e){return Object.assign(e,{optional:()=>oa(e),and:t=>te(e,t),or:t=>To(e,t),select:t=>t===void 0?gr(e):gr(t,e)})}function ia(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[Ao]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var a;return(a=n[r++])!=null?a:n.at(-1)}}}}))(e),{optional:()=>ia(oa(e)),select:t=>ia(t===void 0?gr(e):gr(t,e))})}function oa(e){return ue({[xe]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return t===void 0?(ke(e).forEach(a=>n(a,void 0)),{matched:!0,selections:r}):{matched:se(e,t,n),selections:r}},getSelectionKeys:()=>ke(e),matcherType:"optional"})})}const od=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},sd=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},ld=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function te(...e){return ue({[xe]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return{matched:e.every(a=>se(a,t,n)),selections:r}},getSelectionKeys:()=>br(e,ke),matcherType:"and"})})}function To(...e){return ue({[xe]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return br(e,ke).forEach(a=>n(a,void 0)),{matched:e.some(a=>se(a,t,n)),selections:r}},getSelectionKeys:()=>br(e,ke),matcherType:"or"})})}function H(e){return{[xe]:()=>({match:t=>({matched:!!e(t)})})}}function gr(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ue({[xe]:()=>({match:n=>{let a={[t??en]:n};return{matched:r===void 0||se(r,n,(i,o)=>{a[i]=o}),selections:a}},getSelectionKeys:()=>[t??en].concat(r===void 0?[]:ke(r))})})}function Do(e){return!0}function We(e){return typeof e=="number"}function vt(e){return typeof e=="string"}function wt(e){return typeof e=="bigint"}const jo=ue(H(Do)),cd=ue(H(Do)),ud=jo,yt=e=>Object.assign(ue(e),{startsWith:t=>{return yt(te(e,(r=t,H(n=>vt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return yt(te(e,(r=t,H(n=>vt(n)&&n.endsWith(r)))));var r},minLength:t=>yt(te(e,(r=>H(n=>vt(n)&&n.length>=r))(t))),length:t=>yt(te(e,(r=>H(n=>vt(n)&&n.length===r))(t))),maxLength:t=>yt(te(e,(r=>H(n=>vt(n)&&n.length<=r))(t))),includes:t=>{return yt(te(e,(r=t,H(n=>vt(n)&&n.includes(r)))));var r},regex:t=>{return yt(te(e,(r=t,H(n=>vt(n)&&!!n.match(r)))));var r}}),Mo=yt(H(vt)),Ke=e=>Object.assign(ue(e),{between:(t,r)=>Ke(te(e,((n,a)=>H(i=>We(i)&&n<=i&&a>=i))(t,r))),lt:t=>Ke(te(e,(r=>H(n=>We(n)&&n<r))(t))),gt:t=>Ke(te(e,(r=>H(n=>We(n)&&n>r))(t))),lte:t=>Ke(te(e,(r=>H(n=>We(n)&&n<=r))(t))),gte:t=>Ke(te(e,(r=>H(n=>We(n)&&n>=r))(t))),int:()=>Ke(te(e,H(t=>We(t)&&Number.isInteger(t)))),finite:()=>Ke(te(e,H(t=>We(t)&&Number.isFinite(t)))),positive:()=>Ke(te(e,H(t=>We(t)&&t>0))),negative:()=>Ke(te(e,H(t=>We(t)&&t<0)))}),dd=Ke(H(We)),_t=e=>Object.assign(ue(e),{between:(t,r)=>_t(te(e,((n,a)=>H(i=>wt(i)&&n<=i&&a>=i))(t,r))),lt:t=>_t(te(e,(r=>H(n=>wt(n)&&n<r))(t))),gt:t=>_t(te(e,(r=>H(n=>wt(n)&&n>r))(t))),lte:t=>_t(te(e,(r=>H(n=>wt(n)&&n<=r))(t))),gte:t=>_t(te(e,(r=>H(n=>wt(n)&&n>=r))(t))),positive:()=>_t(te(e,H(t=>wt(t)&&t>0))),negative:()=>_t(te(e,H(t=>wt(t)&&t<0)))}),fd=_t(H(wt)),pd=ue(H(function(e){return typeof e=="boolean"})),hd=ue(H(function(e){return typeof e=="symbol"})),bd=ue(H(function(e){return e==null})),gd=ue(H(function(e){return e!=null}));var jt={__proto__:null,matcher:xe,optional:oa,array:function(...e){return ia({[xe]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return ke(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const a=(i,o)=>{n[i]=(n[i]||[]).concat([o])};return{matched:t.every(i=>se(r,i,a)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ke(e[0])})})},set:function(...e){return ue({[xe]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,o)=>{r[i]=(r[i]||[]).concat([o])},a=e[0];return{matched:od(t,i=>se(a,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ke(e[0])})})},map:function(...e){return ue({[xe]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var a;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=e[0])==null?void 0:a.toString()}`);const[i,o]=e;return{matched:sd(t,(s,l)=>{const c=se(i,l,n),f=se(o,s,n);return c&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ke(e[0]),...ke(e[1])]})})},record:function(...e){return ue({[xe]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const a=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[i,o]=e.length===1?[Mo,e[0]]:e;return{matched:ld(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=c!==null&&se(i,c,a),u=se(i,s,a),b=se(o,l,a);return(u||f)&&b}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...ke(e[0]),...ke(e[1])]})})},intersection:te,union:To,not:function(e){return ue({[xe]:()=>({match:t=>({matched:!se(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:H,select:gr,any:jo,unknown:cd,_:ud,string:Mo,number:dd,bigint:fd,boolean:pd,symbol:hd,nullish:bd,nonNullable:gd,instanceOf:function(e){return ue(H((function(t){return r=>r instanceof t})(e)))},shape:function(e){return ue(H(Io(e)))}};let md=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}};const sa={matched:!1,value:void 0};function rn(e){return new vd(e,sa)}let vd=class oi{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let a;t.length===3&&typeof t[1]=="function"?a=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,o={};const s=(c,f)=>{i=!0,o[c]=f},l=!n.some(c=>se(c,this.input,s))||a&&!a(this.input)?sa:{matched:!0,value:r(i?en in o?o[en]:o:this.input,this.input)};return new oi(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new oi(this.input,n?{matched:!0,value:r(this.input,this.input)}:sa)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=wd){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function wd(e){throw new md(e)}var yd=0;function d(e,t,r,n,a,i){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--yd,__source:a,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return F.vnode&&F.vnode(c),c}function Oo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Oo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Oo(e))&&(n&&(n+=" "),n+=t);return n}const Lo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fo=it,Mt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Fo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(c=>{const f=r==null?void 0:r[c],u=i==null?void 0:i[c];if(f===null)return null;const b=Lo(f)||Lo(u);return a[c][b]}),s=r&&Object.entries(r).reduce((c,f)=>{let[u,b]=f;return b===void 0||(c[u]=b),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:u,className:b,...p}=f;return Object.entries(p).every(g=>{let[v,x]=g;return Array.isArray(x)?x.includes({...i,...s}[v]):{...i,...s}[v]===x})?[...c,u,b]:c},[]);return Fo(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function No(e,t){for(var r in t)e[r]=t[r];return e}function la(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function ca(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ua(e){this.props=e}function _d(e,t){function r(a){var i=this.props.ref,o=i==a.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,a)||!o:la(this.props,a)}function n(a){return this.shouldComponentUpdate=r,Oe(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ua.prototype=new Be).isPureReactComponent=!0,ua.prototype.shouldComponentUpdate=function(e,t){return la(this.props,e)||la(this.state,t)};var Ro=F.__b;F.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ro&&Ro(e)};var xd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function da(e){function t(r){var n=No({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=xd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Po=function(e,t){return e==null?null:at(at(e).map(t))},kd={map:Po,forEach:Po,count:function(e){return e?at(e).length:0},only:function(e){var t=at(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:at},Sd=F.__e;F.__e=function(e,t,r,n){if(e.then){for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),a.__c(e,t)}Sd(e,t,r,n)};var Vo=F.unmount;function Bo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=No({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Bo(n,t,r)})),e}function zo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return zo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function mr(){this.__u=0,this.t=null,this.__b=null}function Uo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function qo(e){var t,r,n;function a(i){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return Oe(r,i)}return a.displayName="Lazy",a.__f=!0,a}function vr(){this.u=null,this.o=null}F.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Vo&&Vo(e)},(mr.prototype=new Be).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var a=Uo(n.__v),i=!1,o=function(){i||(i=!0,r.__R=null,a?a(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=zo(c,c.__c.__P,c.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},mr.prototype.componentWillUnmount=function(){this.t=[]},mr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Bo(this.__b,r,n.__O=n.__P)}this.__b=null}var a=t.__a&&Oe(ie,null,e.fallback);return a&&(a.__h=null),[Oe(ie,null,t.__a?null:e.children),a]};var Ho=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Cd(e){return this.getChildContext=function(){return e.context},e.children}function Ed(e){var t=this,r=e.i;t.componentWillUnmount=function(){Tt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,a){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),Tt(Oe(Cd,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function $d(e,t){var r=Oe(Ed,{__v:e,i:t});return r.containerInfo=t,r}(vr.prototype=new Be).__a=function(e){var t=this,r=Uo(t.__v),n=t.o.get(e);return n[0]++,function(a){var i=function(){t.props.revealOrder?(n.push(a),Ho(t,e,n)):a()};r?r(i):i()}},vr.prototype.render=function(e){this.u=null,this.o=new Map;var t=at(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},vr.prototype.componentDidUpdate=vr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ho(e,r,t)})};var Wo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ad=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Id=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Td=/[A-Z0-9]/g,Dd=typeof document<"u",jd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Md(e,t,r){return t.__k==null&&(t.textContent=""),Tt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Od(e,t,r){return lo(e,t),typeof r=="function"&&r(),e?e.__c:null}Be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ko=F.event;function Ld(){}function Fd(){return this.cancelBubble}function Nd(){return this.defaultPrevented}F.event=function(e){return Ko&&(e=Ko(e)),e.persist=Ld,e.isPropagationStopped=Fd,e.isDefaultPrevented=Nd,e.nativeEvent=e};var fa,Rd={enumerable:!1,configurable:!0,get:function(){return this.class}},Go=F.vnode;F.vnode=function(e){typeof e.type=="string"&&(function(t){var r=t.props,n=t.type,a={};for(var i in r){var o=r[i];if(!(i==="value"&&"defaultValue"in r&&o==null||Dd&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||jd(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Id.test(i)?i=s:n.indexOf("-")===-1&&Ad.test(i)?i=i.replace(Td,"-$&").toLowerCase():o===null&&(o=void 0):s=i="oninput",s==="oninput"&&a[i=s]&&(i="oninputCapture"),a[i]=o}}n=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.value.indexOf(l.props.value)!=-1})),n=="select"&&a.defaultValue!=null&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.multiple?a.defaultValue.indexOf(l.props.value)!=-1:a.defaultValue==l.props.value})),r.class&&!r.className?(a.class=r.class,Object.defineProperty(a,"className",Rd)):(r.className&&!r.class||r.class&&r.className)&&(a.class=a.className=r.className),t.props=a})(e),e.$$typeof=Wo,Go&&Go(e)};var Yo=F.__r;F.__r=function(e){Yo&&Yo(e),fa=e.__c};var Jo=F.diffed;F.diffed=function(e){Jo&&Jo(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),fa=null};var Pd={ReactCurrentDispatcher:{current:{readContext:function(e){return fa.__n[e.__c].props.value}}}};function Vd(e){return Oe.bind(null,e)}function Zo(e){return!!e&&e.$$typeof===Wo}function Bd(e){return Zo(e)?Gu.apply(null,arguments):e}function zd(e){return!!e.__k&&(Tt(null,e),!0)}function Ud(e){return e&&(e.base||e.nodeType===1&&e)||null}var qd=function(e,t){return e(t)},Hd=function(e,t){return e(t)},Wd=ie;function Xo(e){e()}function Kd(e){return e}function Gd(){return[!1,Xo]}var Yd=Te;function Jd(e,t){var r=t(),n=ze({h:{__:r,v:t}}),a=n[0].h,i=n[1];return Te(function(){a.__=r,a.v=t,ca(a.__,t())||i({h:a})},[e,r,t]),Dt(function(){return ca(a.__,a.v())||i({h:a}),e(function(){ca(a.__,a.v())||i({h:a})})},[e]),r}var Se={useState:ze,useId:Xu,useReducer:vo,useEffect:Dt,useLayoutEffect:Te,useInsertionEffect:Yd,useTransition:Gd,useDeferredValue:Kd,useSyncExternalStore:Jd,startTransition:Xo,useRef:he,useImperativeHandle:Yu,useMemo:mt,useCallback:Ju,useContext:wo,useDebugValue:Zu,version:"17.0.2",Children:kd,render:Md,hydrate:Od,unmountComponentAtNode:zd,createPortal:$d,createElement:Oe,createContext:co,createFactory:Vd,cloneElement:Bd,createRef:Uu,Fragment:ie,isValidElement:Zo,findDOMNode:Ud,Component:Be,PureComponent:ua,memo:_d,forwardRef:da,flushSync:Hd,unstable_batchedUpdates:qd,StrictMode:Wd,Suspense:mr,SuspenseList:vr,lazy:qo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Pd},Zd=["other","few","many","two","one","zero"],Qo=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function a(i,o){const s=(t==null?void 0:t[i])??e[i];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,c)=>{var f;return((f=o==null?void 0:o[c])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${i.toString()}”`);let l=n.select(o.count);if(!(l in s)){const c=Zd.find(f=>f in s);if(!c)throw new Error(`Missing plural rule for translation key “${i.toString()}”`);l=c}return s[l].replace(/{{(\w+)}}/g,(c,f)=>{var u;return((u=o==null?void 0:o[f])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${i.toString()}”.`)}}return a},es=co(null),ts=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const a=mt(()=>Qo({locale:n,terms:e,overrides:t}),[t,n]);return d(es.Provider,{value:{t:a,locale:n},children:r})},useTranslation:()=>{const t=wo(es);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>Qo({terms:e,overrides:t,locale:r})}),Xd={conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"Sorry, this role closed while you were applying.",submission_duplicate_earlier_attempt:"You've already applied for this role. If that doesn't sound right, it's most likely a hiccup from your earlier attempt — don't worry, we have your application.",submission_failed:"We couldn't submit your application. Choose Restart to try again.",submission_unknown_do_not_resubmit:"We couldn't confirm whether your application went through, and submitting it again won't help. Please don't keep resubmitting — check your email for a confirmation, or contact the employer if nothing arrives.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",submission_cooldown:{one:"Submit will be available again in {{count}} second.",other:"Submit will be available again in {{count}} seconds."},submission_cooldown_ready:"Submit is available again.",captcha_check:"One quick check before we send your application",submission_still_working:"Sending your application, this can take up to a minute. Please keep this page open.",file_preparing:{one:"Preparing your file…",other:"Preparing your files…"},file_ready:{one:"Your file is ready to send",other:"Your files are ready to send"},file_read_error:"We couldn't read this file. Select it again or choose another file.",file_read_error_replacement:"We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.",address_error:"We couldn't search for that address. Try again, or fill it in manually.",address_searching:"Searching addresses…",address_no_results:"We couldn't find that address. Check the spelling or postcode, or fill it in manually.",restart:"Restart",chat_messages:"Chat messages",file_name:"File name",file_size:"File size",file_total_size:"{{size}} total",loading:"Loading",minimize:"Minimise"},{defaultTerms:Qd}=ts({submission_redirect_message:"One last step: finish your application on the employer's site.",complete_submission:"Continue on the employer's site",submission_completed:"Submission completed!",submission_pending:"Thanks, we've received your application and are processing it.",submission_failed:"Failed to submit",submission_provider_maintenance:"Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_provider_maintenance_later:"Sorry, our recruitment system is down for scheduled maintenance until later today. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_available_at:"Submit will be available again at {{time}}.",resume_prompt:"You have an unfinished application for this role. Continue where you left off?",resume_continue:"Continue",resume_start_again:"Start again",captcha_failed:"Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.",close_application:"Close application",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_empty:"Please enter a value",validation_date:"Please enter a valid date (YYYY-MM-DD)",validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_whole:"Enter a whole number",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_min:{one:"Please upload at least one file",other:"Please only upload at least {{count}} files"},validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_file_size:"Your file is too big. Please upload a file smaller than {{size}}",validation_file_empty:"This file is empty. If it’s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.",validation_required:"This field is required.",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"},optional:"optional"});const{TranslationProvider:ef,useTranslation:oe,createTFunction:tf}=ts({...Qd,...Xd,error_heading:"Something unexpected happened",flow_closed:"This role is no longer accepting applications.",undo:"Change answer",job_alerts_offer:"Want to hear about similar roles? We can email you at {{email}} when new ones open.",job_alerts_accept:"Get job alerts",job_alerts_decline:"No thanks",job_alerts_privacy:"We'll use your email only for these alerts. You can unsubscribe at any time.",job_alerts_privacy_sender:"{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.",job_alerts_success:"Done. We'll email you about similar roles.",job_alerts_error:"Sorry, we couldn't set that up. Please try again later.",submission_duplicate:"You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.",submission_retryable:"We couldn't submit your application. Please try again.",submission_unknown:"We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.",maximize:"Maximise",submit:"Submit",file_more:{one:"+{{count}} file",other:"+{{count}} files"}});function ot(e,t){if(!e)throw new Error(t)}var wr=/\b(?:GIR\s*0AA|[a-z]{1,2}\d[\da-z]?\s*\d[a-z]{2}|[a-z](?:\d{2}|\d[a-z])\s*[\da-z]{4})\b/i,rs=/^(?:GIR0AA|[A-Z]{1,2}\d[\dA-Z]?\d[A-Z]{2})$/,ns=/^[A-Z](?:\d{2}|\d[A-Z])[\dA-Z]{4}$/,as=({postcode:e,label:t="",state:r,country:n})=>{var s,l,c;const a=((e==null?void 0:e.trim())||((s=t.match(wr))==null?void 0:s[0])||"").replace(/\s/g,"").toUpperCase();if(rs.test(a))return a.startsWith("BT")?"ni":"gb";if(ns.test(a))return"ie";const i=f=>f.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim();if(i(r??"")==="northern ireland"||t.split(",").some(f=>i(f)==="northern ireland"))return"ni";const o=(c=(n==null?void 0:n.trim())||((l=t.split(",").at(-1))==null?void 0:l.trim()))==null?void 0:c.toLowerCase();return o==="united kingdom"||o==="gb"?"gb":o==="ireland"||o==="ie"?"ie":null},rf="https://maps.inploi.com/address",nf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim(),is=e=>e.split(",").map(t=>nf(t).replace(/^\d+[a-z]?(?:\s*[-/]\s*\d+[a-z]?)?(?:\s+|$)/,"").trim()),os=e=>rs.test(e)?`gb:${e.slice(0,-3)}`:ns.test(e)?`ie:${e.slice(0,3)}`:null,af=(e,t,r)=>{const[n="",a=""]=is(e),i=os(t),o=a.replace(wr,"").trim(),s=o&&!["united kingdom","ireland","england","scotland","wales","northern ireland"].includes(o);if(!n||!i&&!s)return null;const l=r.slice(0,3).findIndex(c=>{var p;const f=is(c);if(!f.includes(n))return!1;const u=((p=c.match(wr))==null?void 0:p[0].replace(/\s/g,"").toUpperCase())??"",b=os(u);return i&&b?i===b:!!(s&&f.some(g=>g.replace(wr,"").trim()===o))});return l===-1?null:l+1},of=async({query:e,country:t,pickedLabel:r,pickedPostcode:n,pickedCountry:a,pickedState:i,log:o})=>{var l,c,f;if(!t||!t.split(",").every(u=>/^(gb|ie)$/i.test(u.trim())))return;let s;try{const u=new AbortController;s=setTimeout(()=>u.abort(),1500);const b=new URL(rf);b.search=new URLSearchParams({q:e,country:t,limit:"5"}).toString();const p=await fetch(b.href,{signal:u.signal});if(!p.ok)return;const g=await p.json();if(typeof g!="object"||g===null||!("results"in g)||!Array.isArray(g.results)||!("source"in g)||g.source!=="photon"&&g.source!=="mapbox")return;const v=g.results,x=[];for(const A of v){if(typeof A!="object"||A===null||!("label"in A)||typeof A.label!="string")return;x.push(A.label)}const C=((n==null?void 0:n.trim())||((l=r.match(wr))==null?void 0:l[0])||"").replace(/\s/g,"").toUpperCase(),_=af(r,C,x),M=(f=(c=p.headers.get("Server-Timing"))==null?void 0:c.match(/(?:^|,)\s*lookup\s*;\s*dur=([\d.]+)/))==null?void 0:f[1],j=M===void 0?null:Number(M),D=p.headers.get("X-Geo-Fallback"),z=as({postcode:n,label:r,state:i,country:a});await o({hit:_!==null,rank:_,results:x.length,source:g.source,fallback:D&&/^[a-z0-9_-]{1,64}$/i.test(D)?D:null,ms:j!==null&&Number.isFinite(j)?j:null,region:z})}catch{}finally{clearTimeout(s)}},sf="https://maps.inploi.com",lf=async(e,t,r=Date.now()+2500)=>{t==null||t.throwIfAborted();const n=new AbortController,a=()=>n.abort(t==null?void 0:t.reason);t==null||t.addEventListener("abort",a,{once:!0});let i;try{const o=new Promise((l,c)=>{n.signal.addEventListener("abort",()=>c(n.signal.reason),{once:!0}),i=setTimeout(()=>n.abort(),Math.max(0,r-Date.now()))}),s=await Promise.race([e(n.signal),o]);return t==null||t.throwIfAborted(),s}catch{t==null||t.throwIfAborted();return}finally{clearTimeout(i),t==null||t.removeEventListener("abort",a)}},cf=async(e,t,r)=>await lf(async a=>{const{lookupAddress:i}=await Promise.resolve().then(()=>up);return a.throwIfAborted(),i({...e,signal:a})},e.signal,r)??{results:await t(),arm:"direct",source:"direct"},uf=e=>{try{const t=new URL("/outcome",sf);t.search=new URLSearchParams({kind:e.kind,surface:e.surface,arm:e.arm,picked:e.picked?"1":"0"}).toString(),t.searchParams.set("source",e.source),e.picked&&e.edited!==void 0&&t.searchParams.set("edited",e.edited?"1":"0"),e.region&&t.searchParams.set("region",e.region),fetch(t.href,{keepalive:!0}).catch(()=>{})}catch{}},pa=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(pa):Object.keys(e).sort().reduce((t,r)=>(t[r]=pa(e[r]),t),{}),df=e=>{let t=JSON.stringify(pa(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const ha=(e,t)=>t.some(r=>e instanceof r);let ss,ls;function ff(){return ss||(ss=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function pf(){return ls||(ls=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ba=new WeakMap,ga=new WeakMap,nn=new WeakMap;function hf(e){const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{r(Ot(e.result)),a()},o=()=>{n(e.error),a()};e.addEventListener("success",i),e.addEventListener("error",o)});return nn.set(t,e),t}function bf(e){if(ba.has(e))return;const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{r(),a()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),a()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});ba.set(e,t)}let ma={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return ba.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ot(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function cs(e){ma=e(ma)}function gf(e){return pf().includes(e)?function(...t){return e.apply(va(this),t),Ot(this.request)}:function(...t){return Ot(e.apply(va(this),t))}}function mf(e){return typeof e=="function"?gf(e):(e instanceof IDBTransaction&&bf(e),ha(e,ff())?new Proxy(e,ma):e)}function Ot(e){if(e instanceof IDBRequest)return hf(e);if(ga.has(e))return ga.get(e);const t=mf(e);return t!==e&&(ga.set(e,t),nn.set(t,e)),t}const va=e=>nn.get(e);function vf(e,t,{blocked:r,upgrade:n,blocking:a,terminated:i}={}){const o=indexedDB.open(e,t),s=Ot(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ot(o.result),l.oldVersion,l.newVersion,Ot(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),a&&l.addEventListener("versionchange",c=>a(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const wf=["get","getKey","getAll","getAllKeys","count"],yf=["put","add","delete","clear"],wa=new Map;function us(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(wa.get(t))return wa.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,a=yf.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(a||wf.includes(r)))return;const i=async function(o,...s){const l=this.transaction(o,a?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),a&&l.done]))[0]};return wa.set(t,i),i}cs(e=>({...e,get:(t,r,n)=>us(t,r)||e.get(t,r,n),has:(t,r)=>!!us(t,r)||e.has(t,r)}));const _f=["continue","continuePrimaryKey","advance"],ds={},ya=new WeakMap,fs=new WeakMap,xf={get(e,t){if(!_f.includes(t))return e[t];let r=ds[t];return r||(r=ds[t]=function(...n){ya.set(this,fs.get(this)[t](...n))}),r}};async function*kf(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,xf);for(fs.set(r,t),nn.set(r,va(t));t;)yield r,t=await(ya.get(r)||t.continue()),ya.delete(r)}function ps(e,t){return t===Symbol.asyncIterator&&ha(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ha(e,[IDBIndex,IDBObjectStore])}cs(e=>({...e,get(t,r,n){return ps(t,r)?kf:e.get(t,r,n)},has(t,r){return ps(t,r)||e.has(t,r)}}));const yr=typeof indexedDB>"u"?void 0:vf("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Sf=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let an,_a,_r;const hs=()=>{if(!an)return _r;const e=an;an=void 0;const t=sn(e),r=yr==null?void 0:yr.then(n=>n.put("state",Sf(e.data),t)).finally(()=>{_r===r&&(_r=void 0)});return _r=r,_r},Fe={getStateData:async(e,t,r)=>{var a;const n=sn({...e,flowKeys:t,context:r});return(a=await yr)==null?void 0:a.get("state",n)},getAllStateData:async()=>{var e;return((e=await yr)==null?void 0:e.getAll("state"))??[]},setStateData:e=>{an=e,clearTimeout(_a),_a=setTimeout(()=>void hs(),1e3)},flushStateData:()=>(clearTimeout(_a),hs()??Promise.resolve())},Qt=e=>t=>t?t.type===e:!1,Cf=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),bs=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Cf()}),Ef=e=>rn(e).with({nativeEvent:{submitter:jt.select(jt.union(jt.instanceOf(HTMLButtonElement),jt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),on=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const a=e.find(c=>c.id===t.nextId);if(a===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,o=e.find(c=>c.id===i),s=t.type.includes("question")?1:0;if(o){const c=s+Math.max(on(e,a,r,n+s).remainingSteps,on(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}}const l=s+on(e,a,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},$f=e=>{const t={},r=e.find(n=>n.isHead);return r&&on(e,r,(n,a)=>{t[n]=a}),t},sn=e=>[...e.flowKeys,e.id,e.version,e.build,df(e.hostContext??e.context)].join("/"),Af=({data:e,nodes:t})=>{const r=e.startedWriteNodeIds===void 0?t.some(n=>n.type==="integration-application-submit"&&e.nodeHistory.includes(n.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!r&&wi(t,e.submissions)},gs=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||wi(t,e.submissions))},Ge=Le({state:"idle"}),xa=new Set,Lt=e=>{const{state:t,flow:r}=Ge.value;if(t!=="loaded")return;ot(r,"No flow to update");const n=e(r.data);r.data=n,Ge.value={state:t,flow:r},Fe.setStateData(r)},P={current$:Ge,viewState$:Le("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:a,title:i,analytics:o,job:s,employer:l,locationOrigin:c})=>{await Fe.flushStateData().catch(()=>{});const f=await Fe.getStateData(t,a,r),u=f??bs(),b=sn({...t,flowKeys:a,context:r}),p=f!==void 0&&!xa.has(b)&&Af({data:u,nodes:t.nodes});return p||xa.add(b),{jobAlerts:e,data:u,offerResume:p,startedAt:new Date,nodeIdToProgress:$f(t.nodes),flowKeys:a,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:n===void 0?r:Ln(n,r),hostContext:n===void 0?void 0:r,title:i,analytics:o,job:s,employer:l,locationOrigin:c}},commitFlow:e=>{Ge.value={state:"loaded",flow:e},Fe.setStateData(e)},settleResume:e=>{e.offerResume=!1,xa.add(sn(e))},cancelCurrentFlow:()=>{Ge.value={state:"idle"},P.viewState$.value="closed"},markAsFinished:()=>Lt(e=>({...e,isFinished:!0})),markAsInteracted:()=>Lt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Lt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{Lt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Fe.flushStateData()},restart:()=>{const{state:e,flow:t}=Ge.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r={...bs(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},n={...t,data:r,startedAt:new Date,offerResume:!1};Ge.value={state:e,flow:n},Fe.setStateData(n)},addMessage:(e,t)=>{const r={...e,groupId:t};return Lt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ge.value;ot(t==="loaded","Application not loaded");const n=r.data.messages.filter(a=>!a.groupId||!e.includes(a.groupId));r.data.messages=n,Fe.setStateData(r)},setSubmission:(e,t)=>Lt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Lt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Ge.peek().flow===e&&(Ge.value={state:"loaded",flow:e}),Fe.setStateData(e),await Fe.flushStateData()}},ms=({heading:e})=>{const{t}=oe();return d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:d("p",{class:"text-error-11 font-bold",children:t(e)})})]})},ln=e=>{const{t}=oe();return d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:t("loading")}),d("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},vs=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(ln,{class:"text-neutral-6 h-8 w-8"})}),If=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Tf=Mt("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),xr=({class:e,children:t,variant:r,...n})=>d("button",{class:it(Tf({variant:r}),e),...n,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),ws=()=>d("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Df=()=>{if(P.current$.value.state!=="loaded")return null;const e=P.current$.value.flow.nodeIdToProgress,t=P.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:If(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},jf=({children:e,params:t,analytics:r,feedbackReady:n})=>{const{t:a}=oe(),i=P.viewState$,o=!!t.feedback&&P.current$.value.state==="loaded"&&i.value==="maximised",s=o&&n.value,l=he(!1);return Dt(()=>{var c,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(c=P.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:f.customProperties}))},[s,r]),d(ie,{children:d("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[d("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{"aria-label":a("minimize"),onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ka,children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?d("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:it({hidden:!o}),children:d("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,P.current$.value.state==="loaded"&&d(xr,{class:"mx-1","aria-label":a("restart"),onClick:()=>{P.restart()},children:[d("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(xr,{class:"view-switch mx-1",onTouchStart:ka,"aria-label":a("minimize"),onClick:()=>i.value="minimised",children:d(ws,{})},"minmax")]})]}),d(Df,{})]})})};function ka(){}const Mf=qo(()=>Promise.resolve().then(()=>rg).then(e=>e.ChatbotBody)),ys=Mt("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),_s=Mt("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),Of=({open:e,...t})=>{const r=he(null);return Te(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),d("dialog",{ref:r,...t})},Lf=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:a,talentBankClient:i,params:o,feedbackReady:s})=>{const{state:l,flow:c}=P.current$.value,f=P.viewState$.value,u=l!=="idle"&&f==="maximised",b=he(null),p=c?[...c.data.nodeHistory].reverse().map(g=>c.nodes.find(v=>v.id===g)).find(g=>(g==null?void 0:g.type)==="flow-section"):void 0;return d(ef,{terms:o.terms,locale:void 0,children:[d(Of,{open:u,onClose:()=>P.viewState$.value="minimised",children:d("div",{ref:b,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:ys({view:"maximised"}),children:d("div",{class:_s({view:"maximised"}),children:[d(jf,{params:o,analytics:a,feedbackReady:s,children:p?d(ie,{children:[d("span",{class:"block",children:p.data.title}),d("span",{class:"block truncate text-xs font-normal",children:c==null?void 0:c.title})]}):c==null?void 0:c.title}),rn({state:l,view:f}).with({state:"idle"},()=>null).with({state:"loading"},()=>d(vs,{},"loading")).with({state:"loaded"},()=>d(mr,{fallback:d(vs,{},"loading"),children:d(Mf,{env:e,rpcClient:n,analytics:a,apiClient:r,logger:t,talentBankClient:i})})).with({state:"closed"},()=>d(ms,{heading:"flow_closed"})).with({state:"error"},()=>d(ms,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?d(Ff,{flow:c}):null]})},Ff=({flow:e})=>{const{t}=oe();return d("div",{class:ys({view:"minimised",class:"z-100 isolate"}),children:d("div",{class:_s({view:"minimised"}),children:[d("button",{onClick:()=>{P.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ka,children:d("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),d("div",{class:"flex items-center px-0.5",children:d(xr,{class:"mx-1","aria-label":t("close_application"),onClick:P.cancelCurrentFlow,variant:"white",children:d("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},xs="14.18.1",Nf=(e,t=xs)=>t===void 0?e:{fetch:(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=new Headers(n==null?void 0:n.headers);return a.set("x-inploi-widget-version",t),e.fetch(r,{...n,headers:Object.fromEntries(a.entries())})}};let kr,ks,cn;const Rf=e=>{const t=e.slice(0,e.lastIndexOf("/")+1);return/^https:\/\/[^/?#]+\/@inploi\/plugin-chatbot(?:@[\w.-]+)?\/cdn\/$/.test(t)?t:void 0},Ss=(e,t,r)=>{const n=tc(e,t??`
|
|
30
|
+
`,r);return{...n,stack:n.stack.filter(a=>a.startsWith("index.js:"))}},Sa=e=>Ss(e,cn),Cs=e=>typeof e=="object"&&e!==null&&"status"in e&&typeof e.status=="number"?e.status:void 0,er=(e,t,r={})=>kr==null?void 0:kr.send(e,t,{...r,message:"Chatbot widget beacon",widget:"chatbot",key_hash:ks}),Pf=e=>{const t=(r,n,a)=>{if(P.viewState$.value==="closed")return;const i=Ss(n,e,a);i.stack.length&&er("fatal",Rr(n),{phase:"render",error:{...i,via:r}})};window.addEventListener("error",r=>{Xl(r)||t("error",r.error,r.message)}),window.addEventListener("unhandledrejection",r=>t("rejection",r.reason))},Vf=(e,t,r=Xe&&Xe.tagName.toUpperCase()==="SCRIPT"&&Xe.src||new URL("index.js",document.baseURI).href)=>{const n=nc();kr||!n||!e||(ks=t?ui(t).toString(36):void 0,kr=fc({config:n,version:xs,env:e,seed:ac(rc(),lu)}),cn=Rf(r),cn&&Pf(cn))},Bf=e=>{let t={application:void 0,attempts:0,blocked:!1};return{fetch:async(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=P.current$.value.flow;a!==t.application&&(t={application:a,attempts:0,blocked:!1});const i=t,o=++i.attempts,s=performance.now(),l=await e.fetch(r,n).catch(c=>{throw Cs(c)===void 0&&!(c instanceof Error&&c.name==="AbortError")&&(i.blocked=!0,er("submit_blocked",Rr(c),{phase:"submit",error:Sa(c),endpoint:"flow_submit",attempt:o,elapsed_ms:Math.round(performance.now()-s),body_kb:typeof(n==null?void 0:n.body)=="string"?Math.round(n.body.length/1024):void 0})),c});return i.blocked&&er("submit_recovered",void 0,{phase:"submit",endpoint:"flow_submit",attempt:o}),l}}},zf='[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height: calc(100vh - 64px) ;--content-height: calc(100svh - 64px) }@media screen and (min-width:768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px) );--content-height: min(640px, calc(100svh - 16px) ) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media(min-width:640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media(min-width:768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media(min-width:1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media(min-width:1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media(min-width:1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .\\!visible{visibility:visible!important}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-1{bottom:4px}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[44px\\]{min-height:44px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-none{resize:none}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-end{align-items:flex-end}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media(pointer:coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}',Es="inploi-chatbot",Ca=`[data-widget='${Es}']`,Uf=()=>({getChatbotElement:()=>document.querySelector(Ca),getOrCreateChatbotElement:()=>{const e=document.querySelector(Ca);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Es,t}}),qf=25,$s=Le(()=>{}),As=["wheel","touchmove","keydown"],Hf=(e,t)=>new Promise((r,n)=>{if(t!=null&&t.aborted)return n(new ht);const a=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(a),n(new ht)},{once:!0})}),re={onSubmitSuccessFn$:Le(()=>{}),onInteractionFn$:Le(()=>{}),isBotTyping$:Le(!1),captchaVisible$:Le(!1),themeMode$:Le("light"),isReadingHistory$:Le(!1),scrollToEnd:()=>$s.value()},Wf=()=>{const e=he(null),t=he(-1/0);Te(()=>{const n=e.current;if(!n)return;const a=()=>{re.isReadingHistory$.value=!1,n.scrollTo({top:n.scrollHeight,behavior:"instant"})};$s.value=a;const i=()=>t.current=performance.now(),o=()=>{n.scrollHeight-n.scrollTop-n.clientHeight<=24?re.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(re.isReadingHistory$.value=!0)};n.addEventListener("scroll",o,{passive:!0});for(const l of As)n.addEventListener(l,i,{passive:!0});const s=new ResizeObserver(()=>{re.isReadingHistory$.peek()||a()});return s.observe(n),n.firstElementChild&&s.observe(n.firstElementChild),()=>{n.removeEventListener("scroll",o);for(const l of As)n.removeEventListener(l,i);s.disconnect()}},[]);const r=mt(()=>({setSubmission:(a,i)=>P.setSubmission(a,i),captcha:{container:()=>{var a;return((a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))??null},get theme(){return re.themeMode$.peek()},reveal:a=>{re.captchaVisible$.value=a,a&&requestAnimationFrame(()=>{var i,o;(o=(i=e.current)==null?void 0:i.querySelector("[data-captcha-slot]"))==null||o.focus(),re.scrollToEnd()})}},send:async({message:a,signal:i,groupId:o})=>{if(await rn(a).with({author:"bot",type:"text"},async s=>{if(i!=null&&i.aborted)throw new ht;re.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*qf;try{await Hf(l,i)}finally{re.isBotTyping$.value=!1}}).otherwise(async()=>{}),i!=null&&i.aborted)throw new ht;P.addMessage(a,o)},input:(({input:a,signal:i})=>{if(i!=null&&i.aborted)throw new ht;return P.setInput(a),new Promise(o=>{const s=l=>{if(i!=null&&i.aborted)throw new ht;t.current=-1/0,P.setInput(void 0),a.key&&P.setSubmission(a.key,l),o(l)};re.onSubmitSuccessFn$.value=s})})}),[]);return{chatRef:e,chatService:r}};var Kf=["1","2","3","4","5","6","7","8","9","10","11","12"],Gf={light:{1:[98.8,.015],2:[97.8,.018],3:[95.8,.025],4:[92,.04],5:[89,.05],6:[85,.07],7:[80.5,.08],8:[74,.11],9:[60,.22],10:[56,.23],11:[50,.19],12:[25,.18]},dark:{1:[19,.015],2:[21,.018],3:[25.5,.055],4:[29.3,.084],5:[33.5,.098],6:[39.05,.107],7:[45,.11],8:[55,.13],9:[60,.22],10:[67,.18],11:[79.3,.12],12:[95,.04]}},Yf=(e,t=1,r)=>n=>{const[a,i]=Gf[r][n];return"oklch("+a+"% "+i*t+" "+e+")"},Ea=e=>{const t=Yf(e.hue,e.chroma,e.mode);return Object.fromEntries(Kf.map(r=>[e.prefix+r,e.transform(t(r))]))},$a=e=>e,Jf=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(a=>{const i=n[a];return[`${String(r)}.${a}`,i]}):[[r,n]]});return Object.fromEntries(t)},un=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Aa=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(un(e)&&un(r))for(const n in r){const a=r[n];if(un(a)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];un(i)&&Aa(i,a)}else Object.assign(e,{[n]:r[n]})}return Aa(e,...t)},Zf=e=>{function t(r,n){const a=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${a}`:`var(--${a})`}return t},Xf=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:a,getToken:i}=n,o=b=>i("reference",b.toString()),s=e({theme:a}),l=t({theme:a,core:o,raw:{core:s}}),c=r({theme:a,core:o,semantic:o,raw:{core:s,semantic:l}}),f=Jf(Aa(s,l,c)),u=([b,p],g)=>{const v=[g,b].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(x=>u(x,v)):[[n.getToken("declaration",v),p]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(b=>u(b))),ref:b=>i("reference",b.toString())}}})})})});const[Ia,Ta,Is]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Qf=Xf().core(({theme:e})=>({color:{black:Ia,white:Ta,lowest:e.mode==="light"?Ta:Ia,highest:e.mode==="light"?Ia:Ta,...Ea({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:$a}),...Ea({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:$a}),...Ea({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:$a})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(a,i)=>t.core.color[a].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Is,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const a=(i,o)=>e.core.color[i].replace(")",` / ${o})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:a("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":a("a-9",.05)},"status-bar":{bg:a("n-2",.8),"bg-button":Is,"bg-button-hover":a("n-10",.4),"bg-button-active":a("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),ep=Zf({prefix:"i-"}),tp=e=>{const t=Qf.from({theme:e,getToken:ep}),r=Object.entries(t.declarations).map(([n,a])=>`${n}: ${a};`);return`${Ca} {
|
|
3
31
|
${r.concat(r).join(`
|
|
4
32
|
`)}
|
|
5
|
-
}`},tf="14.17.3",rf=(e,t=tf)=>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 ps extends pc{}const nf=({_internal_domManager:e=zu(),theme:t,terms:r,feedback:n,jobAlerts:i})=>uc(({apiClient:a,rpcClient:o,logger:s,analytics:l,publishableKey:c,env:f})=>{let u=!1,h=0;const g=rf(a),b=c&&f?Nc({environment:f,publishableKey:c,logger:s}):void 0,w=$=>$===h,_=()=>{if(typeof window>"u")return;h++,Me.flushStateData().catch(()=>{}),O.cancelCurrentFlow(),ne.isBotTyping$.value=!1;const $=e.getChatbotElement();$&&(At(null,$),$.remove()),u=!1,s.info("Chatbot plugin destroyed")},k=()=>{if(typeof window>"u")return;const $=h,E=[je("style",{id:"inploi-chatbot-styles"},Bu),je("style",{id:"inploi-chatbot-theme"},ef(t))],C=e.getOrCreateChatbotElement();ne.themeMode$.value=t.mode;const F=Oe(!1);if(At(je(ae,{},[E,je(Vu,{env:f,rpcClient:o,apiClient:g,logger:s,analytics:l,talentBankClient:b,params:{theme:t,terms:r,feedback:n},feedbackReady:F})]),C),n){const V=T=>{var P,U;if(!w($))return;const I=(P=e.getChatbotElement())==null?void 0:P.querySelector("dialog");I&&af({instance:T({rpcClient:o,apiClient:a,logger:s,analytics:l}),theme:t,terms:((U=n.params)==null?void 0:U.terms)??{},host:I}).then(()=>void(F.value=!0),M=>s.error("Error rendering feedback plugin",M))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:T})=>{V(T())}).catch(T=>{s.error("Error preparing feedback plugin",T)}):V(n.plugin)}u=!0},x=async($,E)=>{if(!w(E))return;ic({context:In($.jobContext,$.context||{}),schema:$.flow.context_schema,logger:s});const C=await O.prepareFlow({...$,jobAlerts:$.jobAlerts??i});w(E)&&O.commitFlow(C)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(u)return;k(),s.info("Chatbot plugin prepared")}catch($){s.error("Error preparing chatbot plugin",$)}},fetchFlowByJobId:async($,E)=>{const C=(E==null?void 0:E.idType)==="inploi"?"internal":"external";return o.request(Zc,{params:{id:$},searchParams:{id_type:C}}).catch(F=>{throw vo({name:"ApiError",message:Tt.string,status:410,data:Tt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},F)?new ps(F.message,F.status,F.data):F}).then(F=>({flow:F.flow,title:F.job.title,flowKeys:[F.job.id,...(E==null?void 0:E.flowKeys)??[]],job:Yc(F,{id:$,idType:C}),employer:F.company.name,...E,jobContext:F.context,context:{user:F.user,...E==null?void 0:E.context}}))},fetchFlowById:async($,E)=>o.request(Jc,{params:{id:$}}).then(C=>{var F;return{flow:C.flow,title:"Chatbot",flowKeys:(E==null?void 0:E.flowKeys)??[],...E,analytics:{customProperties:{flow_id:C.flow.id,flow_version:C.flow.version,...(F=E==null?void 0:E.analytics)==null?void 0:F.customProperties}}}}),open:async $=>{if(!(typeof window>"u"))try{O.cancelCurrentFlow(),O.viewState$.value="maximised",u||k();const E=h;$ instanceof Promise?(O.current$.value={state:"loading"},$.then(C=>x(C,E)).catch(C=>{w(E)&&(s.error("Error loading flow",C),O.current$.value={state:C instanceof ps?"closed":"error"})})):await x($,E)}catch(E){s.error("Error starting flow",E)}},hasApplicationInProgress:async $=>{const E=await Me.getStateData($.flow,$.flowKeys,$.context??{});return E!==void 0&&ns({data:E,nodes:$.flow.nodes})},hasAnyApplicationInProgress:async()=>(await Me.getAllStateData()).some($=>ns({data:$,nodes:[]})),close:async()=>{typeof window>"u"||(O.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:_}});function af({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=nf;var of="9.12.0",hs=`https://sdk.inploi.com/@inploi/flows@${of}/cdn/captcha/index.html`,sf=new URL(hs).origin,gs=3e4,lf=5*6e4,cf=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",Ci=new WeakMap,df=e=>{let t=Ci.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 Ci.delete(e),r}),Ci.set(e,t)),t},uf=(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=w=>{l||(l=!0,clearTimeout(g),i==null||i.removeEventListener("abort",h),c(),w())},u=w=>f(()=>n(new Error(w))),h=()=>u("Captcha aborted"),g,b=w=>{clearTimeout(g),g=setTimeout(()=>u("Captcha timed out"),w)};if(b(gs),i==null?void 0:i.aborted)return h();i==null||i.addEventListener("abort",h),(async()=>{let w=await df(e);if(w===void 0)return f(()=>r(void 0));if(l)return;let _=document.createElement("iframe");_.src=`${hs}?${new URLSearchParams({sitekey:w,origin:window.location.origin,...o&&{theme:o}}).toString()}`,_.title="Cloudflare security check",_.style.cssText=`display:block;border:0;width:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(_):(_.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(_));let k=!1,x=$=>{if(!_.contentWindow||$.source!==_.contentWindow||$.origin!==sf||!cf($.data))return;let E=$.data;switch(E.type){case"token":return f(()=>r(E.token));case"resize":_.style.height=`${Math.max(0,Math.ceil(E.height))}px`;return;case"before-interactive":return k=!0,b(lf),s==null?void 0:s();case"after-interactive":return k=!1,b(gs);case"error":!k&&!E.interactive&&u("Captcha failed");return;case"expired":return u("Captcha expired");case"timeout":return u("Captcha timed out")}};window.addEventListener("message",x),c=()=>{window.removeEventListener("message",x),_.remove()}})().catch(w=>f(()=>n(w)))}),bs=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[i,...a]=e.compareKey.split(".");if(!i)return!1;let o=la({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(c=>typeof c=="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(bs({condition:i,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let i of n)if(!bs({condition:i,context:t,submissions:r,ifBlock:e}))return!1;return!0}},ff=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,pf=(e,{context:t,submissions:r})=>e.replace(ff,(n,i,a="")=>{let[o,...s]=i.trim().split("."),l=la({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} (${Rt(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 jr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=ur(l.value,s);switch(typeof c){case"boolean":return c===!0?"true":"false";case"string":return c;case"number":return c.toString();case"object":if(Array.isArray(c)&&c.every(f=>typeof f=="string"))return c.join(", ")}break}}return a});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function hf(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ei(e,t,r=""){const n=hf(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 vs(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 gf(e,t){Ei(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 $i(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ai(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ye(e,t){return e<<32-t|e>>>t}const bf=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),vf=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function wf(e){if(Ei(e),bf)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=vf[e[r]];return t}function mf(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 yf=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function _f(e,t,r){return e&t^~e&r}function xf(e,t,r){return e&t^e&r^t&r}class kf{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=Ai(this.buffer)}update(t){vs(this),Ei(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=Ai(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){vs(this),gf(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:a}=this;let{pos:o}=this;r[o++]=128,$i(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=Ai(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<c;u++)s.setUint32(4*u,f[u],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]),Sf=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 Cf extends kf{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 h=_t[u-15],g=_t[u-2],b=Ye(h,7)^Ye(h,18)^h>>>3,w=Ye(g,17)^Ye(g,19)^g>>>10;_t[u]=w+_t[u-7]+b+_t[u-16]|0}let{A:n,B:i,C:a,D:o,E:s,F:l,G:c,H:f}=this;for(let u=0;u<64;u++){const h=Ye(s,6)^Ye(s,11)^Ye(s,25),g=f+h+_f(s,l,c)+Sf[u]+_t[u]|0,w=(Ye(n,2)^Ye(n,13)^Ye(n,22))+xf(n,i,a)|0;f=c,c=l,l=s,s=o+g|0,o=a,a=i,i=n,n=g+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,c=c+this.G|0,f=f+this.H|0,this.set(n,i,a,o,s,l,c,f)}roundClean(){$i(_t)}destroy(){this.set(0,0,0,0,0,0,0,0),$i(this.buffer)}}class Ef extends Cf{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 $f=mf(()=>new Ef,yf(1));var ws=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Ii=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},Ti=e=>Array.isArray(e)?e.map(Ti):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,Ti(r)])):typeof e=="function"?void 0:e,Af=e=>wf($f(new TextEncoder().encode(JSON.stringify(Ti(e)))));function If(e,t,r,n){var i;if(n!=null&&n.aborted)return;let a=Af(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 ms=({context:e,submissions:t})=>({context:e,submissions:t??{}}),ze=(e,t)=>pf(e,ms(t)),Tf=(e,t)=>kr(e,ms(t)),ys=({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 ys({node:n,nodes:t,stopWhen:r})},Df=({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=ys({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)},Ff=3,Nf=({flow:e,analytics:t,logger:r,talentBankClient:n,context:i,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:f,onSubmitNetworkError:u,closedRoleBehaviour:h,settledOutcomes:g=h,dateEchoLocale:b,onFlowEnd:w,onInterpret:_,forceSubmitConfirmation:k,flowType:x,t:$})=>{var E;let C=new AbortController,F={submitAccepted:!1};(E=e.data).startedWriteNodeIds??(E.startedWriteNodeIds=e.nodes.flatMap(I=>{var U,M;if(I.type!=="integration-application-submit"||!e.data.nodeHistory.includes(I.id))return[];let P=I.data.key?(U=o())==null?void 0:U[I.data.key]:void 0;return(P==null?void 0:P.type)==="integration"&&((M=ua(P.value))==null?void 0:M.verdict)==="not_submitted"?[]:[I.id]}));let V={...t.service,log:I=>t.service.log({...I,customProperties:{...I.customProperties,...t.customProperties}})},T=async(I,P)=>{let U=C.signal;if(U.aborted)return;let M=o(),R=s(),q=(R==null?void 0:R.submitNodeId)===I.id?e.nodes.find(B=>{var X;return B.id===R.fileQuestionNodeId&&B.type==="question-file"&&((X=M==null?void 0:M[B.data.key])==null?void 0:X.type)!=="file"}):void 0;if(q)return T(q,P);_==null||_(I,P);try{await Lf({flow:e,analytics:V,logger:r,talentBankClient:n,apiClient:a,context:i,node:I,submissions:M,applicationRecovery:R,setApplicationRecovery:async B=>{if(!U.aborted)try{await l(B)}catch(X){r.error("Failed to persist application recovery",X)}},forceSubmitConfirmation:k||(R==null?void 0:R.submitNodeId)===I.id,run:F,persistWriteBarrier:f,onSubmitNetworkError:u,settledOutcomes:g,dateEchoLocale:b,flowType:x,signal:U,t:$,chat:{sendMessage:async B=>c.send({groupId:I.id,message:B,signal:U}),userInput:async B=>c.input({input:B,signal:U}),setSubmission:(B,X)=>{U.aborted||c.setSubmission(B,X)},captcha:c.captcha},next:B=>{if(U.aborted)return;let X=(R==null?void 0:R.fileQuestionNodeId)===I.id?R.submitNodeId:B,G=X?e.nodes.find(ve=>ve.id===X):Df({childNode:I,nodes:e.nodes});return G?T(G,I):w==null?void 0:w(I)},end:()=>{U.aborted||(w==null||w(I))}})}catch(B){if(B instanceof ft)return;throw B}};return{interpret:async I=>{let P=e.nodes.find(U=>U.id===I)??ws(e.nodes);return T(P)},undo:I=>{var X;if(delete e.data.reviewReplay,((X=e.data.startedWriteNodeIds)==null?void 0:X.length)||e.data.isFinished)return{removed:0};let P=Ii(e),U=P?I.lastIndexOf(P):-1,M=e.nodes.find(G=>G.id===P);if(U===-1||!M)return{removed:0};let R=e.nodes.find(G=>G.id===I[I.length-1]);C.abort();let q=I.splice(U);e.data.messages=e.data.messages.filter(G=>!G.groupId||!q.includes(G.groupId)),e.data.currentInput=null;let B=o();for(let G of q.slice(1)){let ve=e.nodes.find(fe=>fe.id===G);if(!(!ve||!B||ve.id===P)&&("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 C=new AbortController,T(M,R),{removed:q.length}},abort:()=>{C.abort()}}};async function Lf(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 ap({...e,node:t});case"text":return Yf({...e,node:t});case"image":return Zf({...e,node:t});case"question-text":return Jf({...e,node:t});case"question-enum":return ep({...e,node:t});case"question-number":return Xf({...e,node:t});case"question-phone":return Qf({...e,node:t});case"question-boolean":return tp({...e,node:t});case"question-file":return np({...e,node:t});case"question-address":return rp({...e,node:t});case"end-flow":return ip({...e,node:t});case"if-block":return Gf({...e,node:t});case"jump":return Mf({...e,node:t});case"link":return Kf({...e,node:t});case"integration-application-submit":return Hf({...e,node:t});case"add-submission":return Pf({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Of({...e,node:t});case"feedback":return jf({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function jf({next:e,node:t}){e(t.nextId)}async function Of({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:Ol({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 Mf({next:e,node:t}){e(t.data.targetId)}async function Pf({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 Vf=5e3,Rf=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Bf=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?pa:e.throttles?An:fa)),zf=(e,t,r)=>{let{waitMs:n,throttles:i,maintenance:a}=Yl(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...i!==void 0&&{throttles:i},...a&&{maintenance:a}}},Uf=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Di=e=>e instanceof Error&&Uf.includes(e.name)?e:void 0,_s=e=>{let t=Di(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Hf({chat:e,next:t,end:r,node:n,logger:i,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:f,forceSubmitConfirmation:u,flowType:h,run:g,persistWriteBarrier:b,signal:w,onSubmitNetworkError:_,settledOutcomes:k,t:x}){var T,I;let $=async({redirect_url:P,message:U,button_text:M})=>{let{anonymous_id:R,session_id:q}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:U??x("submission_redirect_message")});try{let B=new URL(P);R&&!B.searchParams.has("anonymous_id")&&B.searchParams.set("anonymous_id",R),await e.sendMessage({type:"link",href:B.toString(),text:M??x("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: ${P}`,B),e.sendMessage({type:"system",variant:"error",text:x("redirect_url_error")})}};if((T=l.data.startedWriteNodeIds)!=null&&T.includes(n.id)&&(c==null?void 0:c.submitNodeId)!==n.id){let P=(I=l.data.submitRedirects)==null?void 0:I[n.id];return P?(await $(P),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:x("submission_unknown")}),r())}let E=Rf(n.id,l.job),C=0,F=g.submitAccepted&&n.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==n.id,V=async P=>{var Fr,hn,gn,Zi,Nr,p,v,m,A;let U=((Fr=l.data.submitCooldown)==null?void 0:Fr.key)===E?l.data.submitCooldown:void 0;U&&(U.until=Bf(U));let M=U==null?void 0:U.until;(l.data.reviewRequiresSend===!0&&!F||P!==!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}}}),F=!1;let R;if(n.data.captcha){let y=e.captcha,S=!0;try{R=await uf(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:x("captcha_check")}).catch(()=>{}).then(()=>{S&&(y==null||y.reveal(!0))})}})}catch(j){if(i.error("Captcha check failed",j),w.aborted)return}finally{S=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:x("submitting")});let{anonymous_id:q,session_id:B}=s.getSessionInfo();if(w.aborted)return;let X=((hn=l.data.startedWriteNodeIds)==null?void 0:hn.includes(n.id))===!0;if((c==null?void 0:c.submitNodeId)===n.id&&await f(void 0),X||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],n.id]),await b().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:x("submission_still_working")}).catch(y=>i.error("Failed to send submission progress message",y))},Vf),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,...R!==void 0&&{captcha_token:R},submissions:Ll(l.nodes,jl(o||{},n.data.submitKeys)),pre_apply:Cn(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{fe=y;let S=_s(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&&!Di(fe)&&_)return await _(fe,w),V(!0);l.data.stagingDestination=Hl(Q),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:Q});let Tr=(gn=_s(fe))==null?void 0:gn.status,nr=typeof Tr=="number"?Tr:void 0,z=ua(Q,nr),ir=z===void 0&&nr===429,ar=k==="terminal"&&((z==null?void 0:z.outcome)==="closed"||(z==null?void 0:z.outcome)==="duplicate"),St=l.data.failedAttemptAt,Ot=St==null?void 0:St[E];St&&Ot!==void 0&&Ot>Date.now()&&(Ot=St[E]=Date.now());let or=Ot!==void 0&&Date.now()-Ot<Kl||((Zi=l.data.unconfirmedAttemptKeys)==null?void 0:Zi.includes(E))===!0,Dr=(Nr=Di(fe))==null?void 0:Nr.status,ut=ec(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:(h==null?void 0:h())??"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=En(Q)||(Q==null?void 0:Q.success)===!0;if((sr||$n(Q))&&(g.submitAccepted=!0),sr&&((p=l.data.submitCooldown)==null?void 0:p.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await b().catch(y=>i.error("Failed to persist submit cooldown reset",y))),En(Q)){let{redirect_url:y,message:S,button_text:j}=Q.integration_response.data,W={redirect_url:y,message:S,button_text:j};return w.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:W},await b().catch(K=>i.error("Failed to persist submit redirect",K)),await $(W),t(n.nextId))}let pn=$n(Q);if(pn)return await e.sendMessage({type:"system",variant:"success",text:pn.message??x("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:x("submission_completed")}),t(n.nextId);let lr=Ql(z),cr=lr!==void 0&&((v=o==null?void 0:o[lr])==null?void 0:v.type)==="file"?lr:void 0,Mt=cr===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===cr);if(!Mt&&!ar&&!ba(z)&&(l.data.submitCooldown=zf(E,U,z)),(z==null?void 0:z.outcome)!=="duplicate"&&!ir&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[E]:Date.now()},(m=l.data.unconfirmedAttemptKeys)!=null&&m.includes(E)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==E))),(z==null?void 0:z.verdict)==="not_submitted"||(z==null?void 0:z.outcome)==="duplicate"||(z==null?void 0:z.outcome)==="closed"||ir||zl(Q,nr)?(X||(l.data.startedWriteNodeIds=(A=l.data.startedWriteNodeIds)==null?void 0:A.filter(y=>y!==n.id)),(c==null?void 0:c.submitNodeId)===n.id&&await f(c),await b().catch(y=>i.error("Failed to persist application write barrier release",y))):await b().catch(y=>i.error("Failed to persist submit cooldown",y)),z){if(i.error(fe??z.message),Mt&&cr!==void 0)return e.setSubmission(cr,null),await f({fileQuestionNodeId:Mt.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:x("submission_unreadable_document")}),t(Mt.id);if(z.outcome==="duplicate")return await e.sendMessage({type:"system",variant:ar?"success":"info",semantic:"submission-duplicate",text:x(or?"submission_duplicate_earlier_attempt":"submission_duplicate")}),ar?(delete l.data.submitCooldown,r()):V(!1);if(z.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:x("submission_closed")}),ar?(delete l.data.submitCooldown,r()):V(!1);let y=Gl(z);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?x("submission_provider_maintenance_later"):x("submission_provider_maintenance",{time:ga(y.until,void 0)})}),V(!1)):z.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:x(Xl(z)?"submission_unknown_do_not_resubmit":"submission_unknown")}),V(!1)):ba(z)?Zl(Q)?(await e.sendMessage({type:"text",author:"bot",text:z.message}),V(!1)):(C===0&&await e.sendMessage({type:"system",variant:"warning",text:x("captcha_failed")}),C++,V(C<=Ff)):Jl(z)?(await e.sendMessage({type:"system",variant:"error",text:x("submission_retryable")}),V(!1)):(await e.sendMessage({type:"system",variant:"error",text:x("submission_failed")}),r())}return i.error(fe??Q),ir?(await e.sendMessage({type:"system",variant:"error",text:x("submission_retryable")}),V(!1)):(await e.sendMessage({type:"system",variant:"error",text:x("submission_failed")}),r())};await V(u===!0&&!F?!1:n.data.skipConfirmation)}var Wf=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,qf=(e,t)=>{if(!Wf.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function Kf({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}),...qf(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 Gf({submissions:e,next:t,node:r,context:n}){t(Tf(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Yf({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 Zf({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 Jf({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?rc(s.value,o):s.value}),t(r.nextId)}async function Xf({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 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:"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 ep({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 tp({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 rp({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 np({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 ip({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function ap({node:e,flow:t,submissions:r,chat:n,next:i,apiClient:a,analytics:o,signal:s,context:l}){let c=Nl(t.nodes,r||{}),{answers:f,...u}=c;if(n.setSubmission(e.data.key,{type:"integration",value:u}),If(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:Cn(t.nodes,r||{},t.data.flowSessionId)},s),c.status!=="skipped"){let h=[c.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":c.hasHardConcerns?e.data.messages.hard:c.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let g of["hard","advisory"]){let b=f.filter(w=>!w.matched&&w.severity===g);b.length&&h.push((g==="hard"?"Role requirements":"Other things to consider")+`
|
|
6
|
-
`+
|
|
7
|
-
`))}await n.sendMessage({type:"text",author:"bot",text:
|
|
33
|
+
}`};class Ts extends ou{}const rp=({_internal_domManager:e=Uf(),theme:t,terms:r,feedback:n,jobAlerts:a})=>au(({apiClient:i,rpcClient:o,logger:s,analytics:l,publishableKey:c,env:f})=>{let u=!1,b=0;Vf(f,c);const p=Bf(Nf(i));let g=0;const v=new WeakMap,x=(A,S)=>{const k=++g,E=performance.now();return S.catch(N=>{throw typeof N=="object"&&N!==null&&v.set(N,{endpoint:A,attempt:k,elapsed_ms:Math.round(performance.now()-E)}),N})},C=(A,S)=>{const k=Cs(A);k===404||k===410||er("fatal","application_unavailable",{phase:"flow",stage:S,error:Sa(A),http_status:k,...S==="flow_fetch"&&typeof A=="object"&&A!==null&&v.get(A)})},_=c&&f?$u({environment:f,publishableKey:c,logger:s}):void 0,M=A=>A===b,j=()=>{if(typeof window>"u")return;b++,Fe.flushStateData().catch(()=>{}),P.cancelCurrentFlow(),re.isBotTyping$.value=!1;const A=e.getChatbotElement();A&&(Tt(null,A),A.remove()),u=!1,s.info("Chatbot plugin destroyed")},D=()=>{if(typeof window>"u")return;const A=b,S=[Oe("style",{id:"inploi-chatbot-styles"},zf),Oe("style",{id:"inploi-chatbot-theme"},tp(t))],k=e.getOrCreateChatbotElement();re.themeMode$.value=t.mode;const E=Le(!1);if(Tt(Oe(ie,{},[S,Oe(Lf,{env:f,rpcClient:o,apiClient:p,logger:s,analytics:l,talentBankClient:_,params:{theme:t,terms:r,feedback:n},feedbackReady:E})]),k),n){const N=I=>{var q,B;if(!M(A))return;const V=(q=e.getChatbotElement())==null?void 0:q.querySelector("dialog");V&&np({instance:I({rpcClient:o,apiClient:i,logger:s,analytics:l}),theme:t,terms:((B=n.params)==null?void 0:B.terms)??{},host:V}).then(()=>void(E.value=!0),G=>s.error("Error rendering feedback plugin",G))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:I})=>{N(I())}).catch(I=>{s.error("Error preparing feedback plugin",I)}):N(n.plugin)}u=!0},z=async(A,S)=>{if(!M(S))return;Kc({context:Ln(A.jobContext,A.context||{}),schema:A.flow.context_schema,logger:s});const k=await P.prepareFlow({...A,jobAlerts:A.jobAlerts??a});M(S)&&P.commitFlow(k)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(u)return;D(),s.info("Chatbot plugin prepared")}catch(A){s.error("Error preparing chatbot plugin",A)}},fetchFlowByJobId:async(A,S)=>{const k=(S==null?void 0:S.idType)==="inploi"?"internal":"external";return x("flow_by_job",o.request(Vu,{params:{id:A},searchParams:{id_type:k}})).catch(E=>{throw Io({name:"ApiError",message:jt.string,status:410,data:jt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},E)?new Ts(E.message,E.status,E.data):E}).then(E=>({flow:E.flow,title:E.job.title,flowKeys:[E.job.id,...(S==null?void 0:S.flowKeys)??[]],job:Pu(E,{id:A,idType:k}),employer:E.company.name,...S,jobContext:E.context,context:{user:E.user,...S==null?void 0:S.context}}))},fetchFlowById:async(A,S)=>x("flow_by_id",o.request(Bu,{params:{id:A}})).then(k=>{var E;return{flow:k.flow,title:"Chatbot",flowKeys:(S==null?void 0:S.flowKeys)??[],...S,analytics:{customProperties:{flow_id:k.flow.id,flow_version:k.flow.version,...(E=S==null?void 0:S.analytics)==null?void 0:E.customProperties}}}}),open:async A=>{if(typeof window>"u")return;const S=performance.now();try{P.cancelCurrentFlow(),P.viewState$.value="maximised",u||D()}catch(E){s.error("Error starting flow",E),er("boot_failed",Rr(E),{phase:"config",error:Sa(E),elapsed_ms:Math.round(performance.now()-S)});return}er("boot");const k=b;if(A instanceof Promise){P.current$.value={state:"loading"};const E=N=>I=>{M(k)&&(s.error("Error loading flow",I),P.current$.value={state:I instanceof Ts?"closed":"error"},C(I,N))};A.then(N=>z(N,k).catch(E("create")),E("flow_fetch"))}else await z(A,k).catch(E=>{s.error("Error starting flow",E),C(E,"create")})},hasApplicationInProgress:async A=>{const S=await Fe.getStateData(A.flow,A.flowKeys,A.context??{});return S!==void 0&&gs({data:S,nodes:A.flow.nodes})},hasAnyApplicationInProgress:async()=>(await Fe.getAllStateData()).some(A=>gs({data:A,nodes:[]})),close:async()=>{typeof window>"u"||(P.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:j}});function np({instance:e,terms:t,theme:r,host:n}){return e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=rp;const ap=Object.freeze(Object.defineProperty({__proto__:null,jobCountryCodes:Zc},Symbol.toStringTag,{value:"Module"}));var ip="https://maps.inploi.com",op=(e,t)=>{const r=new URL(`/${e}`,ip);return r.search=new URLSearchParams({q:t.query,limit:"5",surface:t.surface,seed:t.seed}).toString(),t.country&&r.searchParams.set("country",t.country),r},Da=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),sp=e=>{if(!Da(e)||typeof e.label!="string"||!Da(e.address)||e.country!==void 0&&typeof e.country!="string")return;const t={};for(const r of["line1","line2","line3","city","state","postcode","country"]){const n=e.address[r];if(n!==void 0&&typeof n!="string")return;n!==void 0&&(t[r]=n)}return{id:e.label,label:e.label,country:e.country,address:t}},lp=async(e,t,r)=>{const n=await fetch(e.href,{signal:r});if(!n.ok)return;const a=n.headers.get("X-Geo-Arm"),i=await n.json();if(a!=="inploi"&&a!=="mapbox"||!Da(i)||!Array.isArray(i.results)||i.source!=="photon"&&i.source!=="mapbox"&&i.source!=="places"||typeof i.attribution!="string")return;const o=[];for(const s of i.results){const l=t(s);if(l===void 0)return;o.push(l)}return{results:o,arm:a,source:i.source}},cp=e=>{const t=op("address",{...e,seed:e.session});return t.searchParams.set("session",e.session),e.lat!==void 0&&e.lng!==void 0&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&e.lat>=-90&&e.lat<=90&&e.lng>=-180&&e.lng<=180&&(t.searchParams.set("lat",String(e.lat)),t.searchParams.set("lng",String(e.lng))),lp(t,sp,e.signal)};const up=Object.freeze(Object.defineProperty({__proto__:null,lookupAddress:cp},Symbol.toStringTag,{value:"Module"}));var dp="9.13.1",Ds=`https://sdk.inploi.com/@inploi/flows@${dp}/cdn/captcha/index.html`,fp=new URL(Ds).origin,js=3e4,pp=5*6e4,hp=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",ja=new WeakMap,bp=e=>{let t=ja.get(e);return t||(t=e.fetch("/flow/captcha").then(r=>{let n=r==null?void 0:r.site_key;return typeof n=="string"&&n!==""?n:void 0}).catch(r=>{throw ja.delete(e),r}),ja.set(e,t)),t},gp=(e,t={})=>new Promise((r,n)=>{let{signal:a,container:i=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,c=()=>{},f=v=>{l||(l=!0,clearTimeout(p),a==null||a.removeEventListener("abort",b),c(),v())},u=v=>f(()=>n(new Error(v))),b=()=>u("Captcha aborted"),p,g=v=>{clearTimeout(p),p=setTimeout(()=>u("Captcha timed out"),v)};if(g(js),a==null?void 0:a.aborted)return b();a==null||a.addEventListener("abort",b),(async()=>{let v=await bp(e);if(v===void 0)return f(()=>r(void 0));if(l)return;let x=document.createElement("iframe");x.src=`${Ds}?${new URLSearchParams({sitekey:v,origin:window.location.origin,...o&&{theme:o}}).toString()}`,x.title="Cloudflare security check",x.style.cssText=`display:block;border:0;width:${i?"100%":"300px"};height:0;color-scheme:normal`,i?i.appendChild(x):(x.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(x));let C=!1,_=M=>{if(!x.contentWindow||M.source!==x.contentWindow||M.origin!==fp||!hp(M.data))return;let j=M.data;switch(j.type){case"token":return f(()=>r(j.token));case"resize":x.style.height=`${Math.max(0,Math.ceil(j.height))}px`;return;case"before-interactive":return C=!0,g(pp),s==null?void 0:s();case"after-interactive":return C=!1,g(js);case"error":!C&&!j.interactive&&u("Captcha failed");return;case"expired":return u("Captcha expired");case"timeout":return u("Captcha timed out")}};window.addEventListener("message",_),c=()=>{window.removeEventListener("message",_),x.remove()}})().catch(v=>f(()=>n(v)))}),Ms=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[a,...i]=e.compareKey.split(".");if(!a)return!1;let o=yi({context:t,key:a,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=ur(o.value,i);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=ur(o.value,i),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return Sr(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Sr(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Sr(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(c=>typeof c=="string")?Sr(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?Vr(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},Sr=(e,{context:t,submissions:r})=>{let n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let a of n)if(Ms({condition:a,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let a of n)if(!Ms({condition:a,context:t,submissions:r,ifBlock:e}))return!1;return!0}},mp=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,vp=(e,{context:t,submissions:r})=>e.replace(mp,(n,a,i="")=>{let[o,...s]=a.trim().split("."),l=yi({key:o,path:s,submissions:r,context:t});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(c=>`${c.name} (${Ht(c.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(c=>c&&c.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"phone":return Vr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=ur(l.value,s);switch(typeof c){case"boolean":return c===!0?"true":"false";case"string":return c;case"number":return c.toString();case"object":if(Array.isArray(c)&&c.every(f=>typeof f=="string"))return c.join(", ")}break}}return i});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function wp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ma(e,t,r=""){const n=wp(e),a=e==null?void 0:e.length;if(!n||t!==void 0){const o=r&&`"${r}" `,s="",l=n?`length=${a}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Os(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function yp(e,t){Ma(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function Oa(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function La(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ye(e,t){return e<<32-t|e>>>t}const _p=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",xp=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function kp(e){if(Ma(e),_p)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=xp[e[r]];return t}function Sp(e,t={}){const r=(a,i)=>e(i).update(a).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=a=>e(a),Object.assign(r,t),Object.freeze(r)}const Cp=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Ep(e,t,r){return e&t^~e&r}function $p(e,t,r){return e&t^e&r^t&r}class Ap{constructor(t,r,n,a){fe(this,"blockLen");fe(this,"outputLen");fe(this,"padOffset");fe(this,"isLE");fe(this,"buffer");fe(this,"view");fe(this,"finished",!1);fe(this,"length",0);fe(this,"pos",0);fe(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=a,this.buffer=new Uint8Array(t),this.view=La(this.buffer)}update(t){Os(this),Ma(t);const{view:r,buffer:n,blockLen:a}=this,i=t.length;for(let o=0;o<i;){const s=Math.min(a-this.pos,i-o);if(s===a){const l=La(t);for(;a<=i-o;o+=a)this.process(l,o);continue}n.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===a&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Os(this),yp(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:a,isLE:i}=this;let{pos:o}=this;r[o++]=128,Oa(this.buffer.subarray(o)),this.padOffset>a-o&&(this.process(n,0),o=0);for(let u=o;u<a;u++)r[u]=0;n.setBigUint64(a-8,BigInt(this.length*8),i),this.process(n,0);const s=La(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<c;u++)s.setUint32(4*u,f[u],i)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:a,finished:i,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=i,t.length=a,t.pos=s,a%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const xt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ip=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),kt=new Uint32Array(64);class Tp extends Ap{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:r,C:n,D:a,E:i,F:o,G:s,H:l}=this;return[t,r,n,a,i,o,s,l]}set(t,r,n,a,i,o,s,l){this.A=t|0,this.B=r|0,this.C=n|0,this.D=a|0,this.E=i|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,r){for(let u=0;u<16;u++,r+=4)kt[u]=t.getUint32(r,!1);for(let u=16;u<64;u++){const b=kt[u-15],p=kt[u-2],g=Ye(b,7)^Ye(b,18)^b>>>3,v=Ye(p,17)^Ye(p,19)^p>>>10;kt[u]=v+kt[u-7]+g+kt[u-16]|0}let{A:n,B:a,C:i,D:o,E:s,F:l,G:c,H:f}=this;for(let u=0;u<64;u++){const b=Ye(s,6)^Ye(s,11)^Ye(s,25),p=f+b+Ep(s,l,c)+Ip[u]+kt[u]|0,v=(Ye(n,2)^Ye(n,13)^Ye(n,22))+$p(n,a,i)|0;f=c,c=l,l=s,s=o+p|0,o=i,i=a,a=n,n=p+v|0}n=n+this.A|0,a=a+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(n,a,i,o,s,l,c,f)}roundClean(){Oa(kt)}destroy(){this.set(0,0,0,0,0,0,0,0),Oa(this.buffer)}}class Dp extends Tp{constructor(){super(32);fe(this,"A",xt[0]|0);fe(this,"B",xt[1]|0);fe(this,"C",xt[2]|0);fe(this,"D",xt[3]|0);fe(this,"E",xt[4]|0);fe(this,"F",xt[5]|0);fe(this,"G",xt[6]|0);fe(this,"H",xt[7]|0)}}const jp=Sp(()=>new Dp,Cp(1));var Ls=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Fa=e=>{var t,r;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(r=[...e.data.messages].reverse().find(n=>n.groupId&&e.nodes.some(a=>a.id===n.groupId&&a.type.startsWith("question-"))&&(n.type==="system"||"author"in n&&n.author==="user")))==null?void 0:r.groupId},Na=e=>Array.isArray(e)?e.map(Na):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,Na(r)])):typeof e=="function"?void 0:e,Mp=e=>kp(jp(new TextEncoder().encode(JSON.stringify(Na(e)))));function Op(e,t,r,n){var a;if(n!=null&&n.aborted)return;let i=Mp(r),o=(a=e.data).preApplyFingerprints??(a.preApplyFingerprints=[]);if(o.includes(i))return;o.push(i);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(r)}).catch(()=>{let c=o.indexOf(i);c!==-1&&o.splice(c,1)}).finally(()=>{clearTimeout(l)})}var Fs=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Ue=(e,t)=>vp(e,Fs(t)),Lp=(e,t)=>Sr(e,Fs(t)),Ns=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;let n=e.nextId?t.find(a=>a.id===e.nextId):void 0;if(n)return Ns({node:n,nodes:t,stopWhen:r})},Fp=({childNode:e,nodes:t})=>{let r=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;let a=t.find(o=>o.id===n.branchId);if(!a)return!1;let i=Ns({node:a,nodes:t,stopWhen:o=>o.id===e.id});return!(!i||i.id!==e.id)});if(r!=null&&r.nextId)return t.find(n=>n.id===r.nextId)},Np=3,Rp=({flow:e,analytics:t,logger:r,talentBankClient:n,context:a,apiClient:i,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:f,onSubmitNetworkError:u,closedRoleBehaviour:b,settledOutcomes:p=b,dateEchoLocale:g,onFlowEnd:v,onInterpret:x,forceSubmitConfirmation:C,flowType:_,t:M})=>{var j;let D=new AbortController,z={submitAccepted:!1};(j=e.data).startedWriteNodeIds??(j.startedWriteNodeIds=e.nodes.flatMap(k=>{var N,I;if(k.type!=="integration-application-submit"||!e.data.nodeHistory.includes(k.id))return[];let E=k.data.key?(N=o())==null?void 0:N[k.data.key]:void 0;return(E==null?void 0:E.type)==="integration"&&((I=ki(E.value))==null?void 0:I.verdict)==="not_submitted"?[]:[k.id]}));let A={...t.service,log:k=>t.service.log({...k,customProperties:{...k.customProperties,...t.customProperties}})},S=async(k,E)=>{let N=D.signal;if(N.aborted)return;let I=o(),V=s(),q=(V==null?void 0:V.submitNodeId)===k.id?e.nodes.find(B=>{var G;return B.id===V.fileQuestionNodeId&&B.type==="question-file"&&((G=I==null?void 0:I[B.data.key])==null?void 0:G.type)!=="file"}):void 0;if(q)return S(q,E);x==null||x(k,E);try{await Pp({flow:e,analytics:A,logger:r,talentBankClient:n,apiClient:i,context:a,node:k,submissions:I,applicationRecovery:V,setApplicationRecovery:async B=>{if(!N.aborted)try{await l(B)}catch(G){r.error("Failed to persist application recovery",G)}},forceSubmitConfirmation:C||(V==null?void 0:V.submitNodeId)===k.id,run:z,persistWriteBarrier:f,onSubmitNetworkError:u,settledOutcomes:p,dateEchoLocale:g,flowType:_,signal:N,t:M,chat:{sendMessage:async B=>c.send({groupId:k.id,message:B,signal:N}),userInput:async B=>c.input({input:B,signal:N}),setSubmission:(B,G)=>{N.aborted||c.setSubmission(B,G)},captcha:c.captcha},next:B=>{if(N.aborted)return;let G=(V==null?void 0:V.fileQuestionNodeId)===k.id?V.submitNodeId:B,Y=G?e.nodes.find(me=>me.id===G):Fp({childNode:k,nodes:e.nodes});return Y?S(Y,k):v==null?void 0:v(k)},end:()=>{N.aborted||(v==null||v(k))}})}catch(B){if(B instanceof ht)return;throw B}};return{interpret:async k=>{let E=e.nodes.find(N=>N.id===k)??Ls(e.nodes);return S(E)},undo:k=>{var G;if(delete e.data.reviewReplay,((G=e.data.startedWriteNodeIds)==null?void 0:G.length)||e.data.isFinished)return{removed:0};let E=Fa(e),N=E?k.lastIndexOf(E):-1,I=e.nodes.find(Y=>Y.id===E);if(N===-1||!I)return{removed:0};let V=e.nodes.find(Y=>Y.id===k[k.length-1]);D.abort();let q=k.splice(N);e.data.messages=e.data.messages.filter(Y=>!Y.groupId||!q.includes(Y.groupId)),e.data.currentInput=null;let B=o();for(let Y of q.slice(1)){let me=e.nodes.find(Re=>Re.id===Y);if(!(!me||!B||me.id===E)&&("key"in me.data&&me.data.key&&delete B[me.data.key],"keys"in me.data))for(let Re of Object.values(me.data.keys))typeof Re=="string"&&delete B[Re]}return D=new AbortController,S(I,V),{removed:q.length}},abort:()=>{D.abort()}}};async function Pp(e){let t=e.node;switch(t.type){case"flow-section":return await e.chat.sendMessage({type:"system",variant:"info",text:t.data.title}),e.next(t.nextId);case"pre-apply-result":return uh({...e,node:t});case"text":return eh({...e,node:t});case"image":return th({...e,node:t});case"question-text":return rh({...e,node:t});case"question-enum":return ih({...e,node:t});case"question-number":return nh({...e,node:t});case"question-phone":return ah({...e,node:t});case"question-boolean":return oh({...e,node:t});case"question-file":return lh({...e,node:t});case"question-address":return sh({...e,node:t});case"end-flow":return ch({...e,node:t});case"if-block":return Qp({...e,node:t});case"jump":return zp({...e,node:t});case"link":return Xp({...e,node:t});case"integration-application-submit":return Yp({...e,node:t});case"add-submission":return Up({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Bp({...e,node:t});case"feedback":return Vp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Vp({next:e,node:t}){e(t.nextId)}async function Bp({next:e,node:t,talentBankClient:r,submissions:n,flow:a,logger:i,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){let c=t.data.scope==="job"?(l=a.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||c!=null)try{s=await r.checkDuplicate({email:Cc({key:t.data.email,submissions:n}).toString(),jobId:c,scope:t.data.scope})}catch(f){i.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function zp({next:e,node:t}){e(t.data.targetId)}async function Up({next:e,node:t,logger:r,submissions:n,context:a}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Ue(t.data.value,{submissions:n,context:a})},e(t.nextId)}var qp=5e3,Hp=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Wp=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?Ci:e.throttles?On:Si)),Kp=(e,t,r)=>{let{waitMs:n,throttles:a,maintenance:i}=Rc(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...a!==void 0&&{throttles:a},...i&&{maintenance:i}}},Gp=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Ra=e=>e instanceof Error&&Gp.includes(e.name)?e:void 0,Rs=e=>{let t=Ra(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Yp({chat:e,next:t,end:r,node:n,logger:a,apiClient:i,submissions:o,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:f,forceSubmitConfirmation:u,flowType:b,run:p,persistWriteBarrier:g,signal:v,onSubmitNetworkError:x,settledOutcomes:C,t:_}){var S,k;let M=async({redirect_url:E,message:N,button_text:I})=>{let{anonymous_id:V,session_id:q}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:N??_("submission_redirect_message")});try{let B=new URL(E);V&&!B.searchParams.has("anonymous_id")&&B.searchParams.set("anonymous_id",V),await e.sendMessage({type:"link",href:B.toString(),text:I??_("complete_submission"),onClick:()=>{if(!q){a.error("session_id not set, cannot log FLOW_REDIRECT event");return}s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:q,flow_version:l.version,href:B.toString(),job:l.job}})}})}catch(B){a.error(`Invalid redirect URL: ${E}`,B),e.sendMessage({type:"system",variant:"error",text:_("redirect_url_error")})}};if((S=l.data.startedWriteNodeIds)!=null&&S.includes(n.id)&&(c==null?void 0:c.submitNodeId)!==n.id){let E=(k=l.data.submitRedirects)==null?void 0:k[n.id];return E?(await M(E),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:_("submission_unknown")}),r())}let j=Hp(n.id,l.job),D=0,z=p.submitAccepted&&n.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==n.id,A=async E=>{var wn,yn,ni,Nr,h,m,w,T,$;let N=((wn=l.data.submitCooldown)==null?void 0:wn.key)===j?l.data.submitCooldown:void 0;N&&(N.until=Wp(N));let I=N==null?void 0:N.until;(l.data.reviewRequiresSend===!0&&!z||E!==!0||I!==void 0&&I>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:n.data.submitLabel,...I!==void 0&&{availableAt:I}}}),z=!1;let V;if(n.data.captcha){let y=e.captcha,L=!0;try{V=await gp(i,{signal:v,container:(y==null?void 0:y.container())??null,theme:y==null?void 0:y.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:_("captcha_check")}).catch(()=>{}).then(()=>{L&&(y==null||y.reveal(!0))})}})}catch(W){if(a.error("Captcha check failed",W),v.aborted)return}finally{L=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:_("submitting")});let{anonymous_id:q,session_id:B}=s.getSessionInfo();if(v.aborted)return;let G=((yn=l.data.startedWriteNodeIds)==null?void 0:yn.includes(n.id))===!0;if((c==null?void 0:c.submitNodeId)===n.id&&await f(void 0),G||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],n.id]),await g().catch(y=>a.error("Failed to persist application write barrier",y)),v.aborted)return;let Y,me=setTimeout(()=>{Y=e.sendMessage({type:"loading",semantic:"submission-still-working",text:_("submission_still_working")}).catch(y=>a.error("Failed to send submission progress message",y))},qp),Re=kc(),Me,ne=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({...Re!==void 0&&{browser_timezone:Re},log_submit:!1,integration_id:n.data.integrationId,anonymous_id:q,session_id:B,job:l.job,flow_build:l.build,...V!==void 0&&{captcha_token:V},submissions:xc(l.nodes,Sc(o||{},n.data.submitKeys)),pre_apply:Dn(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{Me=y;let L=Rs(y);return(L==null?void 0:L.data)!==void 0?L.data:y});if(clearTimeout(me),await Y,v.aborted)return;if(Me!==void 0&&!Ra(Me)&&x)return await x(Me,v),A(!0);l.data.stagingDestination=Mc(ne),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:ne});let Dr=(ni=Rs(Me))==null?void 0:ni.status,jr=typeof Dr=="number"?Dr:void 0,U=ki(ne,jr),Mr=U===void 0&&jr===429,Rt=C==="terminal"&&((U==null?void 0:U.outcome)==="closed"||(U==null?void 0:U.outcome)==="duplicate"),Pt=l.data.failedAttemptAt,ft=Pt==null?void 0:Pt[j];Pt&&ft!==void 0&&ft>Date.now()&&(ft=Pt[j]=Date.now());let Or=ft!==void 0&&Date.now()-ft<Fc||((Nr=l.data.unconfirmedAttemptKeys)==null?void 0:Nr.includes(j))===!0,lr=(h=Ra(Me))==null?void 0:h.status,pt=Uc(ne,typeof lr=="number"?lr:void 0);pt&&s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,service:pt.service,response:pt.response,captured:(ne==null?void 0:ne.captured)===!0,flow_type:(b==null?void 0:b())??"CHATBOT_DRAWER",job:l.job,...(U==null?void 0:U.outcome)==="duplicate"&&{outcome:Or?"duplicate_after_own_attempt":"duplicate"},...pt.outcome&&{outcome:pt.outcome}}});let vn=jn(ne)||(ne==null?void 0:ne.success)===!0;if((vn||Mn(ne))&&(p.submitAccepted=!0),vn&&((m=l.data.submitCooldown)==null?void 0:m.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(y=>a.error("Failed to persist submit cooldown reset",y))),jn(ne)){let{redirect_url:y,message:L,button_text:W}=ne.integration_response.data,K={redirect_url:y,message:L,button_text:W};return v.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:K},await g().catch(ve=>a.error("Failed to persist submit redirect",ve)),await M(K),t(n.nextId))}let Lr=Mn(ne);if(Lr)return await e.sendMessage({type:"system",variant:"success",text:Lr.message??_("submission_pending")}),t(n.nextId);if((ne==null?void 0:ne.success)===!0)return n.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:_("submission_completed")}),t(n.nextId);let Fr=zc(U),Vt=Fr!==void 0&&((w=o==null?void 0:o[Fr])==null?void 0:w.type)==="file"?Fr:void 0,Bt=Vt===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===Vt);if(!Bt&&!Rt&&!Ai(U)&&(l.data.submitCooldown=Kp(j,N,U)),(U==null?void 0:U.outcome)!=="duplicate"&&!Mr&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[j]:Date.now()},(T=l.data.unconfirmedAttemptKeys)!=null&&T.includes(j)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==j))),(U==null?void 0:U.verdict)==="not_submitted"||(U==null?void 0:U.outcome)==="duplicate"||(U==null?void 0:U.outcome)==="closed"||Mr||Dc(ne,jr)?(G||(l.data.startedWriteNodeIds=($=l.data.startedWriteNodeIds)==null?void 0:$.filter(y=>y!==n.id)),(c==null?void 0:c.submitNodeId)===n.id&&await f(c),await g().catch(y=>a.error("Failed to persist application write barrier release",y))):await g().catch(y=>a.error("Failed to persist submit cooldown",y)),U){if(a.error(Me??U.message),Bt&&Vt!==void 0)return e.setSubmission(Vt,null),await f({fileQuestionNodeId:Bt.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:_("submission_unreadable_document")}),t(Bt.id);if(U.outcome==="duplicate")return await e.sendMessage({type:"system",variant:Rt?"success":"info",semantic:"submission-duplicate",text:_(Or?"submission_duplicate_earlier_attempt":"submission_duplicate")}),Rt?(delete l.data.submitCooldown,r()):A(!1);if(U.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:_("submission_closed")}),Rt?(delete l.data.submitCooldown,r()):A(!1);let y=Nc(U);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?_("submission_provider_maintenance_later"):_("submission_provider_maintenance",{time:$i(y.until,void 0)})}),A(!1)):U.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:_(Bc(U)?"submission_unknown_do_not_resubmit":"submission_unknown")}),A(!1)):Ai(U)?Pc(ne)?(await e.sendMessage({type:"text",author:"bot",text:U.message}),A(!1)):(D===0&&await e.sendMessage({type:"system",variant:"warning",text:_("captcha_failed")}),D++,A(D<=Np)):Vc(U)?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),A(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())}return a.error(Me??ne),Mr?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),A(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())};await A(u===!0&&!z?!1:n.data.skipConfirmation)}var Jp=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,Zp=(e,t)=>{if(!Jp.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function Xp({chat:e,next:t,node:r,submissions:n,context:a,analytics:i,flow:o}){let s=Ue(r.data.href,{submissions:n,context:a}),{flowSessionId:l}=o.data;await e.sendMessage({type:"link",href:s,text:Ue(r.data.cta,{submissions:n,context:a}),...Zp(r.data.href,s)&&{onClick:()=>{i.log({event:"FLOW_REDIRECT",properties:{flow_build:o.build,flow_id:o.id,flow_session_id:l,flow_version:o.version,href:s,job:o.job}})}}}),t(r.nextId)}async function Qp({submissions:e,next:t,node:r,context:n}){t(Lp(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function eh({chat:e,next:t,node:r,submissions:n,context:a}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.text,{submissions:n,context:a})}),t(r.nextId)}async function th({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function rh({chat:e,next:t,node:r,submissions:n,context:a,t:i,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let s=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars,multiline:r.data.format==="text"&&r.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Vr(s.value):r.data.format==="date"&&o!==void 0?Hc(s.value,o):s.value}),t(r.nextId)}async function nh({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function ah({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Vr(o.value):o.value}),t(r.nextId)}async function ih({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function oh({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function sh({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});let a=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,line2Required:r.data.line2Required,placeholder:r.data.placeholder}});if(a===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:n("skipped")});else{let i=Object.values(a.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:i})}return t(r.nextId)}async function lh({node:e,chat:t,next:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Ue(e.data.question,{submissions:n,context:a})});let o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function ch({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function uh({node:e,flow:t,submissions:r,chat:n,next:a,apiClient:i,analytics:o,signal:s,context:l}){let c=_c(t.nodes,r||{}),{answers:f,...u}=c;if(n.setSubmission(e.data.key,{type:"integration",value:u}),Op(t,i,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:Dn(t.nodes,r||{},t.data.flowSessionId)},s),c.status!=="skipped"){let b=[c.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":c.hasHardConcerns?e.data.messages.hard:c.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let p of["hard","advisory"]){let g=f.filter(v=>!v.matched&&v.severity===p);g.length&&b.push((p==="hard"?"Role requirements":"Other things to consider")+`
|
|
34
|
+
`+g.map(v=>`• ${v.message}`).join(`
|
|
35
|
+
`))}await n.sendMessage({type:"text",author:"bot",text:b.join(`
|
|
8
36
|
|
|
9
|
-
`)}),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 xs=(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})},Fi="resume-prompt",op=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:Fi,signal:r});const n=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:r});return O.removeMessagesSentByNodeIds([Fi]),(n==null?void 0:n.value)!==!1},Lt=({class:e,...t})=>{const{t:r}=oe();return d("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:r("send")}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})})};var ot;function Ni(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 Li;function sp(e){return Li==null?void 0:Li.get(e)}var ji;function lp(e){return ji==null?void 0:ji.get(e)}var Oi;function cp(e,t){var r;return(r=Oi==null?void 0:Oi.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},c=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??cp(e.reference,l.lang)??(c?lp(l.lang):null)??n.message??sp(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 Ze(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Ni())}}}function dp(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function up(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function fp(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 ks=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},pp=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Ss(e,t){return{kind:"validation",type:"check",reference:Ss,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 Cs(e){return{kind:"validation",type:"email",reference:Cs,expects:null,async:!1,requirement:pp,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 Es(e,t){return{kind:"validation",type:"max_value",reference:Es,async:!1,expects:`<=${e instanceof Date?e.toJSON():Zt(e)}`,requirement:e,message:t,"~run"(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 Mi(e,t){return{kind:"validation",type:"regex",reference:Mi,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 Pi(e){return{kind:"transformation",type:"transform",reference:Pi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function As(e){return{kind:"validation",type:"url",reference:As,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 hp(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Is(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ts(e,t){return{kind:"schema",type:"array",reference:Ts,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 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 Ds(e){return{kind:"schema",type:"boolean",reference:Ds,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 Fs(e){return{kind:"schema",type:"number",reference:Fs,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]:Is(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:i,key:o,value:l};for(const u of c.issues)u.path?u.path.unshift(f):u.path=[f],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=hp(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=Is(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Ns(e,t){return{kind:"schema",type:"picklist",reference:Ns,expects:up(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 Ls(e,t,r){return{kind:"schema",type:"record",reference:Ls,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(dp(a,l)){const c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){const h={type:"object",origin:"key",input:a,key:l,value:c};for(const g of f.issues)g.path=[h],(o=n.issues)==null||o.push(g);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:c},i);if(u.issues){const h={type:"object",origin:"value",input:a,key:l,value:c};for(const g of u.issues)g.path?g.path.unshift(h):g.path=[h],(s=n.issues)==null||s.push(g);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 Ne(e){return{kind:"schema",type:"string",reference:Ne,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 js(e,t,r){const n=e["~run"]({value:t},Ni(r));if(n.issues)throw new ks(n.issues);return n.value}function gp(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 bp(e,t,r){const n=await e["~run"]({value:t},Ni(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const Qt=({error:e})=>!e||!e.message?null:d("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[d("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"break-words pr-1 text-sm",children:e.message})]}),lt=({class:e,...t})=>{const{t:r}=oe();return d("button",{type:"button",class:it("fr touch-hitbox text-neutral-11 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[d("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:r("skip")}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Vi={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"},vp=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(Vi).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}}),wp="https://api.mapbox.com/search/searchbox/v1/suggest",mp="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",yp=e=>atob(e).split("").reverse().join(""),ct=st({name:Ne()}),_p=st({suggestions:Ts(st({feature_type:Xt(Ne()),full_address:Xt(Ne()),place_formatted:Xt(Ne()),name:Xt(Ne()),mapbox_id:Ne(),context:gp(st({address:ct,street:ct,neighborhood:ct,locality:ct,district:ct,place:ct,region:ct,postcode:ct,country:ct}))}))}),xp=e=>(It(()=>{e&&Da(e)},[e]),gt(()=>{var r;const t=(r=O.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,i)=>{var u;const a=new URL(wp);a.searchParams.set("q",n),a.searchParams.set("session_token",t);const o=e&&Da(e);a.searchParams.set("limit","5");const s=(u=O.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",yp(mp)),(await qc(async h=>{const g=new URL(a);h&&g.searchParams.set("country",h);const b=await fetch(g.href,{signal:i});if(!b.ok)throw new Error(`Address lookup failed with ${b.status}`);return js(_p,await b.json()).suggestions},o,i)).map(h=>{var g,b,w,_,k,x,$,E,C;return{country:o,label:h.full_address??([h.name,h.place_formatted].filter(Boolean).join(", ")||h.mapbox_id),id:h.mapbox_id,address:{line1:((g=h.context.address)==null?void 0:g.name)??((b=h.context.street)==null?void 0:b.name),line2:void 0,line3:((w=h.context.neighborhood)==null?void 0:w.name)??((_=h.context.locality)==null?void 0:_.name),city:((k=h.context.place)==null?void 0:k.name)??((x=h.context.district)==null?void 0:x.name),state:($=h.context.region)==null?void 0:$.name,postcode:((E=h.context.postcode)==null?void 0:E.name)??(h.feature_type==="postcode"?h.name:void 0),country:(C=h.context.country)==null?void 0:C.name}}})}}:{enabled:!1}},[e])),Os=e=>{const{t}=oe();return d("button",{type:"button",class:"touch-hitbox text-neutral-11 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:t("back")})]})},kp=({input:e,onSubmitSuccess:t,logger:r,analytics:n,rpcClient:i})=>{const{t:a}=oe(),[o,s]=Be(),{enabled:l,getPredictions:c}=xp(i),[f,u]=Be(l?"query":"manual"),[h,g]=Be(""),[b,w]=Be(),_=me(),k=()=>{var C;(C=_.current)==null||C.controller.abort(),_.current=void 0};It(()=>k,[]);const x=me(),$=C=>{var V;if(at(l,"Query state should not be enabled"),C=C.trim(),C===((V=_.current)==null?void 0:V.query)||C===(b==null?void 0:b.query)&&b.status==="done")return;if(k(),g(C),C===""){w(void 0);return}const F=_.current={query:C,controller:new AbortController};w({query:C,status:"pending"}),c(C,F.controller.signal).then(T=>{_.current===F&&(_.current=void 0,w({query:C,status:"done",items:T}))},T=>{_.current===F&&(_.current=void 0,r.error("Failed to get address details",T instanceof ks?"Unexpected response":T),w({query:C,status:"failed",error:a("address_error")}))})},E=(C,F)=>{s(V=>({...V,[C]:F}))};switch(f){case"query":return at(l,"Query state should not be enabled"),d(Sp,{input:e,onSkip:()=>t(null),onAddressSelect:(C,F)=>{if(C===""){_.current&&(k(),w(void 0)),u("manual");return}const V=(b==null?void 0:b.status)==="done"?b.items.find(T=>T.id===C):void 0;V&&(hu({query:F,country:V.country,pickedLabel:V.label,pickedPostcode:V.address.postcode,pickedCountry:V.address.country,pickedState:V.address.state,log:T=>n.log({event:"ADDRESS_SHADOW_COMPARED",properties:T})}),x.current!==C&&s(V.address),x.current=C,u("details"))},onAddressSearch:$,lookup:b,query:h});case"details":return at(o!==void 0),d(Ms,{input:e,logger:r,onSubmitSuccess:t,addressFields:o,onFieldChange:E,actions:d(Os,{onClick:()=>{u("query")}})});case"manual":return d(Ms,{logger:r,input:e,onSubmitSuccess:t,addressFields:o??{},onFieldChange:E,actions:l?d(Os,{onClick:()=>{u("query")}}):e.config.optional?d(lt,{onClick:()=>t(null)}):void 0})}},Sp=({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())},[]),d(ae,{children:[d("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:[d("div",{class:"group relative flex-1",children:[d("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:i,class:er({optional:!!e.config.optional,className:"w-full rounded-full"})}),d("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[d("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[d("circle",{cx:"7",cy:"7",r:"4"}),d("path",{d:"M10 10L13 13"})]})}),d("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&d(lt,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?d(Qt,{error:{message:r.error}}):null,d("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?d(ae,{children:[d(nn,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),d("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var c;n(l.id,((c=s.current)==null?void 0:c.value)??i??"")},children:[d("span",{class:"flex-grow",children:l.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var l;n("",((l=s.current)==null?void 0:l.value)??i??"")},children:d("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},Ri=["line1","line2","line3","city","state","postcode","country"],Ms=({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(Vi),{t:s}=oe();return d("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{l.preventDefault();const c=l.currentTarget,f=[...c.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of f){g.value="";const b=Ri.find(w=>i.config.keys[w]===g.name);b&&t(b,"")}if(f.length>0&&!c.checkValidity()){c.reportValidity();return}const u=new FormData(c),h=Object.fromEntries(u.entries());r({type:"address",value:h})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:Ri.map((l,c)=>{const f=`isdk_${l}`,u=i.config.keys[l];return u?d(ae,{children:[d("label",{for:f,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:s(l)}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:u,id:f,defaultValue:e[l],onChange:h=>t(l,h.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?d("option",{value:e[l],children:e[l]}):d("option",{value:"",children:s("select_country")}),o.map(h=>d("option",{value:h,children:h},h))]}),d("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:c===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:u,id:f,defaultValue:e[l],onInput:h=>t(l,h.currentTarget.value),required:l==="line2"?i.config.line2Required===!0:l!=="line3"}),c===Ri.length-1?d("hr",{class:"m-0 w-full border-b border-b-transparent"}):d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),d("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[n,d(Lt,{class:"ml-auto"})]})]})},Bi=()=>{const e=me(null);return It(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Ps=["true","false"],Cp=Ns(Ps),Ep="answer",Vs="flex items-center flex-wrap gap-2 p-2.5",Rs="min-w-0 max-w-full flex-auto",Bs=ai(({label:e,...t},r)=>d("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:d("p",{class:"text-center text-base",children:e})})),$p=({input:e,onSubmitSuccess:t})=>{const r=Bi();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=Tu(n).value,a=js(Cp,i);t({type:"boolean",value:a==="true"})},children:[d("ul",{class:Vs,children:Ps.map((n,i)=>d("li",{class:Rs,children:d(Bs,{ref:i===0?r:null,type:"submit",name:Ep,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(lt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},zs=e=>e.reduce((t,r)=>t+r.sizeKb,0),Ap=Yt("file"),Us=3,on=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Ip=({file:e,class:t,...r})=>{const{t:n}=oe(),[i,a]=on(e.name);return d("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"sr-only",children:[n("file_name"),": "]}),d("span",{class:"block truncate",children:i}),d("span",{children:a})]}),d("p",{class:"text-accent-11",children:[d("span",{class:"sr-only",children:[n("file_size"),": "]}),Rt(e.sizeKb)]})]})},Hs=({class:e,...t})=>d("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Tp=(e,t)=>{const[r,n]=on(e);return`${r.slice(0,t)}${n}`},Ws=e=>({name:Tp(e.name,42),sizeKb:e.size/1e3}),Dp=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Fp=(e,t,r)=>{const n=on(t.name)[1].toLowerCase(),i=[...r.map(o=>o.toLowerCase()),...Dp],a=n===""?"none":i.includes(n)?n:"other";return`chatbot-file-refused:${e}:${a}`},Np=({input:e,onSubmitSuccess:t,analytics:r})=>{var _;const n=(_=O.current$.value.flow)==null?void 0:_.data.submissions[e.key],[i,a]=Be(Ap(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:[],c=i.status==="error"?i.error:void 0,f=l.length-Us,u=zs(l),h=Bi(),{t:g}=oe(),b=k=>{if(!k.length)return{reason:"required",error:{type:"required",message:g("validation_file")}};if(!ca(k,e.config.extensions))return{reason:"type",file:k.find(x=>!ca([x],e.config.extensions)),error:{type:"validate",message:g("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(k.some(x=>x.sizeKb===0))return{reason:"empty",file:k.find(x=>x.sizeKb===0),error:{type:"validate",message:g("validation_file_empty")}};if(e.config.fileSizeLimitKib&&zs(k)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:g("validation_file_size",{size:Rt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&k.length>1)return{reason:"count",error:{type:"invalid",message:g("validation_file_max",{count:1})}}},w=(k,x)=>{var $,E;return r.log({event:"INTERACTION",properties:{tag:Fp(k,x,e.config.extensions)},customProperties:(E=($=O.current$.peek().flow)==null?void 0:$.analytics)==null?void 0:E.customProperties})};return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:k=>{if(k.preventDefault(),i.status==="pending"||i.status==="error")return;const x=b(s);x?a({status:"error",error:x.error}):t({type:"file",value:s})},children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:h,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,Us).map(k=>{const[x,$]=on(k.name);return d(Hs,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:x}),d("span",{children:$})]})}),f>0?d(Hs,{children:g("file_more",{count:f})}):null]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:g("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-11 text-xs",children:["(",g("file_max_size",{size:Rt(e.config.fileSizeLimitKib)}),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:g("file_extensions")}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(k=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:k.replace(".","")}))})]})]}),d("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"?d(ae,{children:[d(nn,{"aria-hidden":"true",class:"h-4 w-4"}),g("file_preparing",{count:l.length})]}):i.status==="ready"?d(ae,{children:[s.length>1?g("file_total_size",{size:Rt(u)}):Rt(u),d("span",{class:"sr-only",children:[". ",g("file_ready",{count:s.length})]})]}):null}),d("input",{id:"dropzone-file","aria-label":g("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async k=>{at(k.target instanceof HTMLInputElement);const x=k.target.files?Array.from(k.target.files):[];k.target.value="";const[$]=x;if(!$)return;const E=++o.current,C=i.status==="ready",F=x.map(Ws),V=b(F);if(V)return w(V.reason,V.file??$),a({status:"error",error:V.error});a({status:"pending",files:F});let T;try{const I=await Promise.all(x.map(async P=>{try{return{...Ws(P),data:await nc(P)}}catch(U){throw T??(T=P),U}}));o.current===E&&a({status:"ready",files:I})}catch{if(o.current!==E)return;w("unreadable",T??$),a({status:"error",error:{type:"invalid",message:g(C?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(Lt,{disabled:s.length===0}),e.config.optional&&d(lt,{class:"relative",onClick:()=>t(null)})]})]}),d(Qt,{error:c})]})};var Cr=e=>e.type==="checkbox",jt=e=>e instanceof Date,Le=e=>e==null;const qs=e=>typeof e=="object";var le=e=>!Le(e)&&!Array.isArray(e)&&qs(e)&&!jt(e),Lp=e=>le(e)&&e.target?Cr(e.target)?e.target.checked:e.target.value:e,jp=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Op=(e,t)=>e.has(jp(t)),Mp=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},zi=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(zi&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(le(e)&&Mp(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 sn=e=>/^\w*$/.test(e),ie=e=>e===void 0,Ui=e=>Array.isArray(e)?e.filter(Boolean):[],Hi=e=>Ui(e.replace(/["|']|\]/g,"").split(/\.|\[/)),D=(e,t,r)=>{if(!t||!le(e))return r;const n=(sn(t)?[t]:Hi(t)).reduce((i,a)=>Le(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=sn(t)?[t]:Hi(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 Ks={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"},Pp=Ce.createContext(null);Pp.displayName="HookFormControlContext";var Vp=(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 Rp=typeof window<"u"?Ce.useLayoutEffect:Ce.useEffect;var Pe=e=>typeof e=="string",Bp=(e,t,r,n,i)=>Pe(e)?(n&&t.watch.add(e),D(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),D(r,a))):(n&&(t.watchAll=!0),r),Wi=e=>Le(e)||!qs(e);function kt(e,t,r=new WeakSet){if(Wi(e)||Wi(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 zp=Ce.createContext(null);zp.displayName="HookFormContext";var Gs=(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],Ys=()=>{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 Zs(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=Zs(i,a);le(o)&&(r[n]=o)}else e[n]&&(r[n]=a)}return r}var Ee=e=>le(e)&&!Object.keys(e).length,qi=e=>e.type==="file",ln=e=>{if(!zi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Js=e=>e.type==="select-multiple",Ki=e=>e.type==="radio",Up=e=>Ki(e)||Cr(e),Gi=e=>ln(e)&&e.isConnected;function Hp(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 Wp(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:sn(t)?[t]:Hi(t),n=r.length===1?e:Hp(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(le(n)&&Ee(n)||Array.isArray(n)&&Wp(n))&&ce(e,r.slice(0,-1)),e}var qp=e=>{for(const t in e)if(Ue(e[t]))return!0;return!1};function Xs(e){return Array.isArray(e)||le(e)&&!qp(e)}function Yi(e,t={}){for(const r in e){const n=e[r];Xs(n)?(t[r]=Array.isArray(n)?[]:{},Yi(n,t[r])):ie(n)||(t[r]=!0)}return t}function tr(e,t,r){r||(r=Yi(t));for(const n in e){const i=e[n];if(Xs(i))ie(t)||Wi(r[n])?r[n]=Yi(i,Array.isArray(i)?[]:{}):tr(i,Le(t)?{}:t[n],r[n]);else{const a=t[n];r[n]=!kt(i,a)}}return r}const Qs={value:!1,isValid:!1},el={value:!0,isValid:!0};var tl=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===""?el:{value:e[0].value,isValid:!0}:el:Qs}return Qs},rl=(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 nl={isValid:!1,value:null};var il=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,nl):nl;function al(e){const t=e.ref;return qi(t)?t.files:Ki(t)?il(e.refs).value:Js(t)?[...t.selectedOptions].map(({value:r})=>r):Cr(t)?tl(e.refs).value:rl(ie(t.value)?e.ref.value:t.value,e)}var Kp=(e,t,r,n)=>{const i={};for(const a of e){const o=D(t,a);o&&J(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},cn=e=>e instanceof RegExp,$r=e=>ie(e)?e:cn(e)?e.source:le(e)?cn(e.value)?e.value.source:e.value:e,ol=e=>({isOnSubmit:!e||e===He.onSubmit,isOnBlur:e===He.onBlur,isOnChange:e===He.onChange,isOnAll:e===He.all,isOnTouch:e===He.onTouched});const sl="AsyncFunction";var Gp=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)),Yp=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ll=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Ar=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=D(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(Ar(s,t))break}else if(le(s)&&Ar(s,t))break}}};function cl(e,t,r){const n=D(e,r);if(n||sn(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=D(t,a),s=D(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 Zp=(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))},Jp=(e,t,r)=>!e||!t||e===t||Er(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Xp=(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,Qp=(e,t)=>!Ui(D(e,t)).length&&ce(e,t),eh=(e,t,r)=>{const n=Er(D(e,r));return J(n,"root",t[r]),J(e,r,n),e};function dl(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)&&!cn(e)?e:{value:e,message:""},ul=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:f,min:u,max:h,pattern:g,validate:b,name:w,valueAsNumber:_,mount:k}=e._f,x=D(r,w);if(!k||t.has(w))return{};const $=s?s[0]:o,E=M=>{i&&$.reportValidity&&($.setCustomValidity(Je(M)?"":M||""),$.reportValidity())},C={},F=Ki(o),V=Cr(o),T=F||V,I=(_||qi(o))&&ie(o.value)&&ie(x)||ln(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,P=Gs.bind(null,w,n,C),U=(M,R,q,B=dt.maxLength,X=dt.minLength)=>{const G=M?R:q;C[w]={type:M?B:X,message:G,ref:o,...P(M?B:X,G)}};if(a?!Array.isArray(x)||!x.length:l&&(!T&&(I||Le(x))||Je(x)&&!x||V&&!tl(s).isValid||F&&!il(s).isValid)){const{value:M,message:R}=Pe(l)?{value:!!l,message:l}:rr(l);if(M&&(C[w]={type:dt.required,message:R,ref:$,...P(dt.required,R)},!n))return E(R),C}if(!I&&(!Le(u)||!Le(h))){let M,R;const q=rr(h),B=rr(u);if(!Le(x)&&!isNaN(x)){const X=o.valueAsNumber||x&&+x;Le(q.value)||(M=X>q.value),Le(B.value)||(R=X<B.value)}else{const X=o.valueAsDate||new Date(x),G=Q=>new Date(new Date().toDateString()+" "+Q),ve=o.type=="time",fe=o.type=="week";Pe(q.value)&&x&&(M=ve?G(x)>G(q.value):fe?x>q.value:X>new Date(q.value)),Pe(B.value)&&x&&(R=ve?G(x)<G(B.value):fe?x<B.value:X<new Date(B.value))}if((M||R)&&(U(!!M,q.message,B.message,dt.max,dt.min),!n))return E(C[w].message),C}if((c||f)&&!I&&(Pe(x)||a&&Array.isArray(x))){const M=rr(c),R=rr(f),q=!Le(M.value)&&x.length>+M.value,B=!Le(R.value)&&x.length<+R.value;if((q||B)&&(U(q,M.message,R.message),!n))return E(C[w].message),C}if(g&&!I&&Pe(x)){const{value:M,message:R}=rr(g);if(cn(M)&&!x.match(M)&&(C[w]={type:dt.pattern,message:R,ref:o,...P(dt.pattern,R)},!n))return E(R),C}if(b){if(Ue(b)){const M=await b(x,r),R=dl(M,$);if(R&&(C[w]={...R,...P(dt.validate,R.message)},!n))return E(R.message),C}else if(le(b)){let M={};for(const R in b){if(!Ee(M)&&!n)break;const q=dl(await b[R](x,r),$,R);q&&(M={...q,...P(R,q.message)},E(q.message),n&&(C[w]=M))}if(!Ee(M)&&(C[w]={ref:$,...M},!n))return C}}return E(!0),C};const th={mode:He.onSubmit,reValidateMode:He.onChange,shouldFocusError:!0};function rh(e={}){let t={...th,...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},u={...f};let h={...u};const g={array:Ys(),state:Ys()},b=t.criteriaMode===He.all,w=p=>v=>{clearTimeout(c),c=setTimeout(p,v)},_=async p=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||h.isValid||p)){let v;t.resolver?(v=Ee((await T()).errors),k()):v=await P(n,!0),v!==r.isValid&&g.state.next({isValid:v})}},k=(p,v)=>{!t.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((p||Array.from(s.mount)).forEach(m=>{m&&(v?J(r.validatingFields,m,v):ce(r.validatingFields,m))}),g.state.next({validatingFields:r.validatingFields,isValidating:!Ee(r.validatingFields)}))},x=(p,v=[],m,A,y=!0,S=!0)=>{if(A&&m&&!t.disabled){if(o.action=!0,S&&Array.isArray(D(n,p))){const j=m(D(n,p),A.argA,A.argB);y&&J(n,p,j)}if(S&&Array.isArray(D(r.errors,p))){const j=m(D(r.errors,p),A.argA,A.argB);y&&J(r.errors,p,j),Qp(r.errors,p)}if((u.touchedFields||h.touchedFields)&&S&&Array.isArray(D(r.touchedFields,p))){const j=m(D(r.touchedFields,p),A.argA,A.argB);y&&J(r.touchedFields,p,j)}(u.dirtyFields||h.dirtyFields)&&(r.dirtyFields=tr(i,a)),g.state.next({name:p,isDirty:M(p,v),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else J(a,p,v)},$=(p,v)=>{J(r.errors,p,v),g.state.next({errors:r.errors})},E=p=>{r.errors=p,g.state.next({errors:r.errors,isValid:!1})},C=(p,v,m,A)=>{const y=D(n,p);if(y){const S=D(a,p,ie(m)?D(i,p):m);ie(S)||A&&A.defaultChecked||v?J(a,p,v?S:al(y._f)):B(p,S),o.mount&&!o.action&&_()}},F=(p,v,m,A,y)=>{let S=!1,j=!1;const W={name:p};if(!t.disabled){if(!m||A){(u.isDirty||h.isDirty)&&(j=r.isDirty,r.isDirty=W.isDirty=M(),S=j!==W.isDirty);const K=kt(D(i,p),v);j=!!D(r.dirtyFields,p),K?ce(r.dirtyFields,p):J(r.dirtyFields,p,!0),W.dirtyFields=r.dirtyFields,S=S||(u.dirtyFields||h.dirtyFields)&&j!==!K}if(m){const K=D(r.touchedFields,p);K||(J(r.touchedFields,p,m),W.touchedFields=r.touchedFields,S=S||(u.touchedFields||h.touchedFields)&&K!==m)}S&&y&&g.state.next(W)}return S?W:{}},V=(p,v,m,A)=>{const y=D(r.errors,p),S=(u.isValid||h.isValid)&&Je(v)&&r.isValid!==v;if(t.delayError&&m?(l=w(()=>$(p,m)),l(t.delayError)):(clearTimeout(c),l=null,m?J(r.errors,p,m):ce(r.errors,p)),(m?!kt(y,m):y)||!Ee(A)||S){const j={...A,...S&&Je(v)?{isValid:v}:{},errors:r.errors,name:p};r={...r,...j},g.state.next(j)}},T=async p=>(k(p,!0),await t.resolver(a,t.context,Kp(p||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),I=async p=>{const{errors:v}=await T(p);if(k(p),p)for(const m of p){const A=D(v,m);A?J(r.errors,m,A):ce(r.errors,m)}else r.errors=v;return v},P=async(p,v,m={valid:!0})=>{for(const A in p){const y=p[A];if(y){const{_f:S,...j}=y;if(S){const W=s.array.has(S.name),K=y._f&&Gp(y._f);K&&u.validatingFields&&k([S.name],!0);const $e=await ul(y,s.disabled,a,b,t.shouldUseNativeValidation&&!v,W);if(K&&u.validatingFields&&k([S.name]),$e[S.name]&&(m.valid=!1,v||e.shouldUseNativeValidation))break;!v&&(D($e,S.name)?W?eh(r.errors,$e,S.name):J(r.errors,S.name,$e[S.name]):ce(r.errors,S.name))}!Ee(j)&&await P(j,v,m)}}return m.valid},U=()=>{for(const p of s.unMount){const v=D(n,p);v&&(v._f.refs?v._f.refs.every(m=>!Gi(m)):!Gi(v._f.ref))&&or(p)}s.unMount=new Set},M=(p,v)=>!t.disabled&&(p&&v&&J(a,p,v),!kt(Tr(),i)),R=(p,v,m)=>Bp(p,s,{...o.mount?a:ie(v)?i:Pe(p)?{[p]:v}:v},m,v),q=p=>Ui(D(o.mount?a:i,p,t.shouldUnregister?D(i,p,[]):[])),B=(p,v,m={})=>{const A=D(n,p);let y=v;if(A){const S=A._f;S&&(!S.disabled&&J(a,p,rl(v,S)),y=ln(S.ref)&&Le(v)?"":v,Js(S.ref)?[...S.ref.options].forEach(j=>j.selected=y.includes(j.value)):S.refs?Cr(S.ref)?S.refs.forEach(j=>{(!j.defaultChecked||!j.disabled)&&(Array.isArray(y)?j.checked=!!y.find(W=>W===j.value):j.checked=y===j.value||!!y)}):S.refs.forEach(j=>j.checked=j.value===y):qi(S.ref)?S.ref.value="":(S.ref.value=y,S.ref.type||g.state.next({name:p,values:ue(a)})))}(m.shouldDirty||m.shouldTouch)&&F(p,y,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&Q(p)},X=(p,v,m)=>{for(const A in v){if(!v.hasOwnProperty(A))return;const y=v[A],S=p+"."+A,j=D(n,S);(s.array.has(p)||le(y)||j&&!j._f)&&!jt(y)?X(S,y,m):B(S,y,m)}},G=(p,v,m={})=>{const A=D(n,p),y=s.array.has(p),S=ue(v);J(a,p,S),y?(g.array.next({name:p,values:ue(a)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&m.shouldDirty&&g.state.next({name:p,dirtyFields:tr(i,a),isDirty:M(p,S)})):A&&!A._f&&!Le(S)?X(p,S,m):B(p,S,m),ll(p,s)?g.state.next({...r,name:p,values:ue(a)}):g.state.next({name:o.mount?p:void 0,values:ue(a)})},ve=async p=>{o.mount=!0;const v=p.target;let m=v.name,A=!0;const y=D(n,m),S=K=>{A=Number.isNaN(K)||jt(K)&&isNaN(K.getTime())||kt(K,D(a,m,K))},j=ol(t.mode),W=ol(t.reValidateMode);if(y){let K,$e;const Pt=v.type?al(y._f):Lp(p),Ct=p.type===Ks.BLUR||p.type===Ks.FOCUS_OUT,Xh=!Yp(y._f)&&!t.resolver&&!D(r.errors,m)&&!y._f.deps||Xp(Ct,D(r.touchedFields,m),r.isSubmitted,W,j),Ji=ll(m,s,Ct);J(a,m,Pt),Ct?(!v||!v.readOnly)&&(y._f.onBlur&&y._f.onBlur(p),l&&l(0)):y._f.onChange&&y._f.onChange(p);const Xi=F(m,Pt,Ct),Qh=!Ee(Xi)||Ji;if(!Ct&&g.state.next({name:m,type:p.type,values:ue(a)}),Xh)return(u.isValid||h.isValid)&&(t.mode==="onBlur"?Ct&&_():Ct||_()),Qh&&g.state.next({name:m,...Ji?{}:Xi});if(!Ct&&Ji&&g.state.next({...r}),t.resolver){const{errors:kl}=await T([m]);if(k([m]),S(Pt),A){const eg=cl(r.errors,n,m),Sl=cl(kl,n,eg.name||m);K=Sl.error,m=Sl.name,$e=Ee(kl)}}else k([m],!0),K=(await ul(y,s.disabled,a,b,t.shouldUseNativeValidation))[m],k([m]),S(Pt),A&&(K?$e=!1:(u.isValid||h.isValid)&&($e=await P(n,!0)));A&&(y._f.deps&&(!Array.isArray(y._f.deps)||y._f.deps.length>0)&&Q(y._f.deps),V(m,$e,K,Xi))}},fe=(p,v)=>{if(D(r.errors,v)&&p.focus)return p.focus(),1},Q=async(p,v={})=>{let m,A;const y=Er(p);if(t.resolver){const S=await I(ie(p)?p:y);m=Ee(S),A=p?!y.some(j=>D(S,j)):m}else p?(A=(await Promise.all(y.map(async S=>{const j=D(n,S);return await P(j&&j._f?{[S]:j}:j)}))).every(Boolean),!(!A&&!r.isValid)&&_()):A=m=await P(n);return g.state.next({...!Pe(p)||(u.isValid||h.isValid)&&m!==r.isValid?{}:{name:p},...t.resolver||!p?{isValid:m}:{},errors:r.errors}),v.shouldFocus&&!A&&Ar(n,fe,p?y:s.mount),A},Tr=(p,v)=>{let m={...o.mount?a:i};return v&&(m=Zs(v.dirtyFields?r.dirtyFields:r.touchedFields,m)),ie(p)?m:Pe(p)?D(m,p):p.map(A=>D(m,A))},nr=(p,v)=>({invalid:!!D((v||r).errors,p),isDirty:!!D((v||r).dirtyFields,p),error:D((v||r).errors,p),isValidating:!!D(r.validatingFields,p),isTouched:!!D((v||r).touchedFields,p)}),z=p=>{const v=p?Er(p):void 0;v==null||v.forEach(m=>ce(r.errors,m)),v?v.forEach(m=>{g.state.next({name:m,errors:r.errors})}):g.state.next({errors:{}})},ir=(p,v,m)=>{const A=(D(n,p,{_f:{}})._f||{}).ref,y=D(r.errors,p)||{},{ref:S,message:j,type:W,...K}=y;J(r.errors,p,{...K,...v,ref:A}),g.state.next({name:p,errors:r.errors,isValid:!1}),m&&m.shouldFocus&&A&&A.focus&&A.focus()},ar=(p,v)=>Ue(p)?g.state.subscribe({next:m=>"values"in m&&p(R(void 0,v),m)}):R(p,v,!0),St=p=>g.state.subscribe({next:v=>{Jp(p.name,v.name,p.exact)&&Zp(v,p.formState||u,gn,p.reRenderRoot)&&p.callback({values:{...a},...r,...v,defaultValues:i})}}).unsubscribe,Ot=p=>(o.mount=!0,h={...h,...p.formState},St({...p,formState:{...f,...p.formState}})),or=(p,v={})=>{for(const m of p?Er(p):s.mount)s.mount.delete(m),s.array.delete(m),v.keepValue||(ce(n,m),ce(a,m)),!v.keepError&&ce(r.errors,m),!v.keepDirty&&ce(r.dirtyFields,m),!v.keepTouched&&ce(r.touchedFields,m),!v.keepIsValidating&&ce(r.validatingFields,m),!t.shouldUnregister&&!v.keepDefaultValue&&ce(i,m);g.state.next({values:ue(a)}),g.state.next({...r,...v.keepDirty?{isDirty:M()}:{}}),!v.keepIsValid&&_()},Dr=({disabled:p,name:v})=>{if(Je(p)&&o.mount||p||s.disabled.has(v)){const y=s.disabled.has(v)!==!!p;p?s.disabled.add(v):s.disabled.delete(v),y&&o.mount&&!o.action&&_()}},ut=(p,v={})=>{let m=D(n,p);const A=Je(v.disabled)||Je(t.disabled);return J(n,p,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:p}},name:p,mount:!0,...v}}),s.mount.add(p),m?Dr({disabled:Je(v.disabled)?v.disabled:t.disabled,name:p}):C(p,!0,v.value),{...A?{disabled:v.disabled||t.disabled}:{},...t.progressive?{required:!!v.required,min:$r(v.min),max:$r(v.max),minLength:$r(v.minLength),maxLength:$r(v.maxLength),pattern:$r(v.pattern)}:{},name:p,onChange:ve,onBlur:ve,ref:y=>{if(y){ut(p,v),m=D(n,p);const S=ie(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,j=Up(S),W=m._f.refs||[];if(j?W.find(K=>K===S):S===m._f.ref)return;J(n,p,{_f:{...m._f,...j?{refs:[...W.filter(Gi),S,...Array.isArray(D(i,p))?[{}]:[]],ref:{type:S.type,name:p}}:{ref:S}}}),C(p,!1,void 0,S)}else m=D(n,p,{}),m._f&&(m._f.mount=!1),(t.shouldUnregister||v.shouldUnregister)&&!(Op(s.array,p)&&o.action)&&s.unMount.add(p)}}},sr=()=>t.shouldFocusError&&Ar(n,fe,s.mount),pn=p=>{Je(p)&&(g.state.next({disabled:p}),Ar(n,(v,m)=>{const A=D(n,m);A&&(v.disabled=A._f.disabled||p,Array.isArray(A._f.refs)&&A._f.refs.forEach(y=>{y.disabled=A._f.disabled||p}))},0,!1))},lr=(p,v)=>async m=>{let A;m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let y=ue(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:S,values:j}=await T();k(),r.errors=S,y=ue(j)}else await P(n);if(s.disabled.size)for(const S of s.disabled)ce(y,S);if(ce(r.errors,"root"),Ee(r.errors)){g.state.next({errors:{}});try{await p(y,m)}catch(S){A=S}}else v&&await v({...r.errors},m),sr(),setTimeout(sr);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ee(r.errors)&&!A,submitCount:r.submitCount+1,errors:r.errors}),A)throw A},cr=(p,v={})=>{D(n,p)&&(ie(v.defaultValue)?G(p,ue(D(i,p))):(G(p,v.defaultValue),J(i,p,ue(v.defaultValue))),v.keepTouched||ce(r.touchedFields,p),v.keepDirty||(ce(r.dirtyFields,p),r.isDirty=v.defaultValue?M(p,ue(D(i,p))):M()),v.keepError||(ce(r.errors,p),u.isValid&&_()),g.state.next({...r}))},Mt=(p,v={})=>{const m=p?ue(p):i,A=ue(m),y=Ee(p),S=y?i:A;if(v.keepDefaultValues||(i=m),!v.keepValues){if(v.keepDirtyValues){const j=new Set([...s.mount,...Object.keys(tr(i,a))]);for(const W of Array.from(j)){const K=D(r.dirtyFields,W),$e=D(a,W),Pt=D(S,W);K&&!ie($e)?J(S,W,$e):!K&&!ie(Pt)&&G(W,Pt)}}else{if(zi&&ie(p))for(const j of s.mount){const W=D(n,j);if(W&&W._f){const K=Array.isArray(W._f.refs)?W._f.refs[0]:W._f.ref;if(ln(K)){const $e=K.closest("form");if($e){$e.reset();break}}}}if(v.keepFieldsRef)for(const j of s.mount)G(j,D(S,j));else n={}}a=t.shouldUnregister?v.keepDefaultValues?ue(i):{}:ue(S),g.array.next({values:{...S}}),g.state.next({values:{...S}})}s={mount:v.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!v.keepIsValid||!!v.keepDirtyValues||!t.shouldUnregister&&!Ee(S),o.watch=!!t.shouldUnregister,o.keepIsValid=!!v.keepIsValid,o.action=!1,v.keepErrors||(r.errors={}),g.state.next({submitCount:v.keepSubmitCount?r.submitCount:0,isDirty:y?!1:v.keepDirty?r.isDirty:!!(v.keepDefaultValues&&!kt(p,i)),isSubmitted:v.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:y?{}:v.keepDirtyValues?v.keepDefaultValues&&a?tr(i,a):r.dirtyFields:v.keepDefaultValues&&p?tr(i,p):v.keepDirty?r.dirtyFields:{},touchedFields:v.keepTouched?r.touchedFields:{},errors:v.keepErrors?r.errors:{},isSubmitSuccessful:v.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Fr=(p,v)=>Mt(Ue(p)?p(a):p,{...t.resetOptions,...v}),hn=(p,v={})=>{const m=D(n,p),A=m&&m._f;if(A){const y=A.refs?A.refs[0]:A.ref;y.focus&&setTimeout(()=>{y.focus(),v.shouldSelect&&Ue(y.select)&&y.select()})}},gn=p=>{r={...r,...p}},Nr={control:{register:ut,unregister:or,getFieldState:nr,handleSubmit:lr,setError:ir,_subscribe:St,_runSchema:T,_updateIsValidating:k,_focusError:sr,_getWatch:R,_getDirty:M,_setValid:_,_setFieldArray:x,_setDisabledField:Dr,_setErrors:E,_getFieldArray:q,_reset:Mt,_resetDefaultValues:()=>Ue(t.defaultValues)&&t.defaultValues().then(p=>{Fr(p,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:pn,_subjects:g,_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:Ot,trigger:Q,register:ut,handleSubmit:lr,watch:ar,setValue:G,getValues:Tr,reset:Fr,resetField:cr,clearErrors:z,unregister:or,setError:ir,setFocus:hn,getFieldState:nr};return{...Nr,formControl:Nr}}function dn(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}=rh(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,Rp(()=>{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(()=>Vp(n,a),[a,n]),t.current}const fl=(e,t,r)=>{if(e&&"reportValidity"in e){const n=D(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},nh=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?fl(n.ref,r,e):n.refs&&n.refs.forEach(i=>fl(i,r,e))}},ih=(e,t)=>{t.shouldUseNativeValidation&&nh(e,t);const r={};for(const n in e){const i=D(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(ah(t.names||Object.keys(e),n)){const o=Object.assign({},D(r,n));J(o,"root",a),J(r,n,o)}else J(r,n,a)}return r},ah=(e,t)=>e.some(r=>r.startsWith(t+"."));var un=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(bp(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=fp(c);if(f&&(l[f]||(l[f]={message:c.message,type:c.type}),o)){var u=l[f].types,h=u&&u[c.type];l[f]=Gs(f,o,l,c.type,h?[].concat(h,c.message):c.message)}s.issues.shift()}return{values:{},errors:ih(l,a)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const pl=27,hl=12,gl=10,oh=Yt("enum"),sh=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return un(st({checked:xt(Ls(Ne(),Ds()),Pi(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})))}))},lh=ai(({option:e,...t},r)=>d(ae,{children:[d("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),bl=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:Vs}}}),ch=({input:e,onSubmitSuccess:t})=>{var f,u;const r=e.key?(f=O.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}}=dn({defaultValues:{checked:n?{}:oh(r)?Object.fromEntries(r.value.map(h=>[h,!0])):{}},resolver:sh(e.config,a)}),c=Bi();return i?d(ae,{children:[d("ul",{style:{maxHeight:6.5*pl+5*hl+2*gl},class:bl({variant:"booleanLike"}),children:e.config.options.map((h,g)=>d("li",{class:Rs,children:d(Bs,{type:"submit",ref:b=>{b&&g===0&&(c.current=b)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}),e.config.minSelected===0&&d("div",{class:"px-2 pb-2",children:d(lt,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):d("form",{noValidate:!0,onSubmit:h=>s(g=>{const b=g.checked;t({type:"enum",value:b})})(h),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*pl+5*hl+2*gl},class:bl({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,g)=>{const b=`checked.${h.value}`,{ref:w,..._}=o(b);return d("li",{class:"relative",children:d(lh,{option:h,autoFocus:g===0,ref:k=>{k&&g===0&&(c.current=k),w(k)},id:b,..._,onClick:n?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),d("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:d(Lt,{}),e.config.minSelected===0&&d(lt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(Qt,{error:(u=l.checked)==null?void 0:u.root})})]})},dh=Yt("number"),uh=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,i=e.decimalCases??0;return un(st({number:xt(Fs(t("validation_number")),$s(r,t("validation_number_min",{min:r})),Es(n,t("validation_number_max",{max:n})),Ss(a=>a===Number(a.toFixed(i)),t("validation_number_decimal_cases",{count:i})))}))},fh=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,n=e.key?(u=O.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:i}=oe(),{register:a,handleSubmit:o,formState:{errors:s}}=dn({defaultValues:{number:dh(n)?n.value:r?Number(r):void 0},resolver:uh(e.config,i)}),{ref:l,...c}=a("number",{required:!e.config.optional,valueAsNumber:!0}),f=me();return Fe(()=>{f.current&&(f.current.focus(),f.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...c,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(f.current=h),l(h)},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&&d(lt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Lt,{})]}),d(Qt,{error:s.number})]})},ph="44",hh=/^[0-9 ]+$/,gh=Yt("string"),bh=Yt("phone"),vh=e=>{const t=xt(Ne(e("validation_country_code")),Mi(hh,e("validation_country_code"))),r=xt(Ne(e("validation_phone")),Jt(1,e("validation_phone")),Pi(n=>n.replace(/[^0-9]/g,"")));return un(st({countryCode:t,phoneNumber:r}))},wh=({input:e,onSubmitSuccess:t})=>{var w;const r=e.key?(w=O.current$.value.flow)==null?void 0:w.data.submissions[e.key]:void 0,{t:n}=oe(),[i,a]=Be(),o=gh(r)?vp(r.value):bh(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:c},watch:f}=dn({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??ph,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:vh(n)}),{ref:u,...h}=s("phoneNumber",{required:!e.config.optional}),g=me(),b=f("countryCode");return Fe(()=>{g.current&&(g.current.focus(),g.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(_=>{const k=_.phoneNumber.replace(/[^0-9]/g,""),x=_.countryCode.replace(/[^0-9]/g,"");a(void 0);const $=e.config.minChars??7,E=k.length+x.length;if(E<$)return a(n("validation_phone_min_chars",{count:$}));const C=e.config.maxChars;if(C!=null&&E>C)return a(n("validation_max_chars",{count:C}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:x,phoneNumber:k}}):t({type:"string",value:b+_.phoneNumber})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[d("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[d("span",{children:["+",b]}),d("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Vi).map(([_,k])=>d("option",{value:k,children:[_," (+",k,")"]},_))})]}),d("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:_=>{_&&(g.current=_),u(_)},class:er({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&d(lt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),d(Lt,{})]}),d(Qt,{error:c.countryCode||c.phoneNumber||{message:i}})]})},fn=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),vl=(e,t,r,n)=>r!==void 0&&n*1e3>An?e("submission_available_at",{time:ga(r,t)}):e("submission_cooldown",{count:n}),mh=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},yh=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=oe(),{availableAt:i}=e.config,[a,o]=Be(()=>fn(i)),[s,l]=Be("");It(()=>{const f=fn(i);if(o(f),f===0)return;l(vl(r,n,i,f));const u=setInterval(()=>{const h=fn(i);o(h),!(h>0)&&(clearInterval(u),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(u)},[i,n,r]);const c=a>0;return d("div",{class:"flex flex-col items-center gap-2 py-3",children:[d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":c,"aria-describedby":c?"submit-cooldown":void 0,onClick:()=>{fn(i)>0||t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:mh(e.config.label,r)}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})}),c&&d("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:vl(r,n,i,a)}),d("p",{role:"status",class:"sr-only",children:s})]})},_h=160,wl=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,_h)}px`},xh={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},kh=Yt("string"),Sh=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return un(st({text:{date:xt(Ne(t("validation_date")),Mi(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:xt(Ne(t("validation_email")),Cs(t("validation_email")),Jt(e.minChars??1,r.minLength),Sr(e.maxChars??1/0,r.maxLength)),text:xt(Ne(),Jt(e.minChars??1,r.minLength),Sr(e.maxChars??1/0,r.maxLength)),url:xt(Ne(t("validation_url")),As(t("validation_url")),Jt(e.minChars??1,r.minLength),Sr(e.maxChars??1/0,r.maxLength))}[e.format]}))},Ch={text:({input:e,onSubmitSuccess:t})=>{var w;const{t:r}=oe(),n=e.key?(w=O.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:c}}=dn({defaultValues:{text:kh(n)?n.value:i??""},resolver:Sh(e.config,r)}),{ref:f,...u}=o("text",{required:!e.config.optional}),h=me();Fe(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&wl(h.current),h.current.focus(),h.current.select())},[]);const g=e.config.maxChars,b=a&&g!==void 0?l("text").length:void 0;return d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(_=>{t({type:"string",value:_.text})}),children:[d("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-1",children:[a?d("textarea",{id:"chat-input",...u,rows:2,maxLength:g,autoFocus:!0,"aria-describedby":b!==void 0?"chat-input-count":void 0,onInput:_=>wl(_.currentTarget),onKeyDown:_=>{var k;_.key==="Enter"&&(_.ctrlKey||_.metaKey)&&(_.preventDefault(),(k=_.currentTarget.form)==null||k.requestSubmit())},ref:_=>{_&&(h.current=_),f(_)},placeholder:e.config.placeholder,class:er({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):d("input",{id:"chat-input",...u,...xh[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:_=>{_&&(h.current=_),f(_)},placeholder:e.config.placeholder,class:er({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&d(lt,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Lt,{})]}),b!==void 0&&g!==void 0&&d("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[b,"/",g]}),d(Qt,{error:c.text})]})},phone:wh,"multiple-choice":ch,boolean:$p,file:Np,submit:yh,address:kp,number:fh},Eh=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=O.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]),d("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:d("div",{class:"flex flex-col",onPointerDownCapture:n?a:void 0,onKeyDownCapture:n?a:void 0,children:n?(()=>{const s=Ch[n.type];return d(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:ne.onSubmitSuccessFn$.value,input:n})})():d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:er({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),d(Lt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function $h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ah=function(e){return e instanceof RegExp},Ih=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},ml=function(e){return typeof e=="string"},Th=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Dh(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!ml(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Ah(a)||(a=new RegExp("("+Ih(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 Fh=function(t,r,n){return Array.isArray(t)||(t=[t]),Th(t.map(function(i){return ml(i)?Dh(i,r,n):i}))};const Ir=$h(Fh),Nh=/(\[[^\]]+\]\([^)]+\))/g,Lh=/\[([^\]]+)\]\(([^)]+)\)/,jh=/(https?:\/\/[^\s]+)/g,Oh=/_(.*?)_/g,Mh=/\*\*(.*?)\*\*/g,Ph=/(\\n|\n)/g,yl="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Vh=e=>{const t=Ir(e,Nh,(s,l)=>{const[,c,f]=s.match(Lh)??[];return f?d("a",{class:yl,href:f,children:c??f},f+l):d("span",{children:"INVALID LINK"})}),r=Ir(t,jh,(s,l)=>d("a",{class:yl,href:s,children:s},s+l)),n=Ir(r,Oh,(s,l)=>d("em",{children:s},s+l)),i=Ir(n,Mh,(s,l)=>d("strong",{children:s},s+l));let a=0;return Ir(i,Ph,()=>d("br",{},`br-${a++}`))},Rh=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"}}),Bh=({children:e,className:t,animate:r,side:n,...i})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Rh({className:t,side:n,animate:r}),...i,children:e}),_l=new Map,xl=uu({overrides:{},locale:void 0}),zh=(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")!==xl("job_alerts_privacy")&&n===xl("job_alerts_privacy_sender",{employer:r})?e("job_alerts_privacy"):n},Uh=({flow:e,rpcClient:t})=>{const{t:r}=oe(),n=e.data.flowSessionId,i=_l.get(n)??Oe("offer");_l.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 d("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(i.value!=="offer"&&i.value!=="error")){i.value="saving";try{await Mc(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 d("div",{class:"bg-neutral-2 flex flex-col gap-2 rounded-xl p-3 text-sm",children:[d("p",{children:r("job_alerts_offer",{email:o})}),i.value==="error"?d("p",{role:"alert",children:r("job_alerts_error")}):null,d("div",{class:"flex gap-2",children:[d("button",{type:"button",class:"bg-accent-9 min-h-[44px] rounded-lg px-3 py-2 text-white",disabled:i.value==="saving",onClick:s,children:r("job_alerts_accept")}),d("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")})]}),d("p",{class:"text-xs",children:zh(r,e.employer)})]})},Hh=({message:e})=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Wh=({className:e,...t})=>d("div",{"aria-hidden":!0,children:ne.isBotTyping$.value===!0?d("div",{"data-testid":"typing-indicator",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0}),qh={bot:"left",user:"right"},Kh=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"}}}),Gh=({env:e,lastSentMessageFooter:t,rpcClient:r})=>{const{t:n}=oe(),i=O.current$.value.flow,a=(i==null?void 0:i.data.messages)??[],o=a.findIndex(l=>l.type==="system"&&l.semantic==="submission-closed"),s=i?Ii(i):void 0;return d("ol",{"aria-label":n("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[a.map((l,c)=>d(ae,{children:[d("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,Jr(l).with({type:"system"},f=>d("p",{class:Kh({variant:f.variant}),children:f.text})).with({type:"text",author:Tt.union("bot","user")},f=>{const u=c===a.length-1,h=f.author==="bot"?Vh(f.text):f.text;return d(ae,{children:d(Bh,{animate:u,side:qh[f.author],children:h},c)})}).with({type:"link"},f=>d(Hh,{message:f})).with({type:"image"},f=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:f.url,style:{aspectRatio:f.width/f.height}})).with({type:"file"},f=>d(Ip,{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:d("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[d(nn,{"aria-hidden":f.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),f.text?d("p",{role:"status",class:"text-neutral-11 text-sm",children:f.text}):null]})}).exhaustive()]}),c===o&&(i!=null&&i.jobAlerts)&&r?d("li",{children:d(Uh,{flow:i,rpcClient:r},i.data.flowSessionId)}):null]},c)),e&&e!=="production"&&(i==null?void 0:i.data.isFinished)&&i.data.stagingDestination&&d("li",{class:"text-neutral-11 text-center text-xs",children:i.data.stagingDestination}),d("li",{class:ne.captchaVisible$.value?"flex":"hidden",children:d("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":n("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),d(Wh,{},"typing")]})},Yh=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:i,env:a})=>{const{flow:o}=O.current$.value;at(o,"Flow is required to exist to show chatbot body");const s=O.viewState$.value,{chatRef:l,chatService:c}=Wu(),{t:f}=oe(),[u,h]=Be();return Fe(()=>{s==="maximised"&&ne.scrollToEnd()},[s]),Fe(()=>{var V;const{state:g,flow:b}=O.current$.peek();if(g!=="loaded")throw new Error(f("invalid_state"));let w=b.data.nodeHistory.at(-1);if(ne.scrollToEnd(),O.setInput(void 0),b.data.isFinished)return;const _=()=>{const T=O.current$.peek().flow;!T||T.data.hasInteracted||(O.markAsInteracted(),xs(n,T,"FLOW_INTERACT"))};ne.onInteractionFn$.value=_,w===void 0?(w=ws(o.nodes).id,O.setCurrentNodeId(w),xs(n,b,"FLOW_START")):O.removeMessagesSentByNodeIds([w,Fi]);const{interpret:k,abort:x,undo:$}=Nf({context:o.context,analytics:{service:n,customProperties:(V=o.analytics)==null?void 0:V.customProperties},apiClient:t,logger:e,talentBankClient:i,flow:o,chatService:c,t:f,getApplicationRecovery:()=>{var T;return(T=O.current$.peek().flow)==null?void 0:T.data.applicationRecovery},setApplicationRecovery:O.setApplicationRecovery,persistWriteBarrier:()=>O.persistWriteBarrier(b),getSubmissions:()=>{var T;return(T=O.current$.peek().flow)==null?void 0:T.data.submissions},onInterpret:T=>O.setCurrentNodeId(T.id),onFlowEnd:async()=>{var I;O.markAsFinished();const T=O.current$.peek().flow;at(T),n.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:T.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(I=o.analytics)==null?void 0:I.customProperties})}}),E=w,C=()=>{h(()=>$),k(E)},F=new AbortController;return b.offerResume?op({chatService:c,t:f,signal:F.signal}).then(T=>(O.settleResume(b),T?C():(O.restart(),Me.flushStateData()))).catch(T=>{T instanceof ft||e.error("Resume prompt failed",T)}):C(),()=>{F.abort(),ne.onInteractionFn$.value===_&&(ne.onInteractionFn$.value=()=>{}),x()}},[n,t,c,e,o,i,f]),d(ae,{children:[d("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[d("div",{ref:l,role:"region","aria-label":f("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:d(Gh,{env:a,rpcClient:r,lastSentMessageFooter:!Ii(o)||!u?null:d(Zh,{undoFn:u})})}),ne.isReadingHistory$.value&&!o.data.isFinished&&!ne.isBotTyping$.value&&d("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:d(xr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var b,w;ne.scrollToEnd(),(w=((b=l.current)==null?void 0:b.querySelector('li[tabindex="-1"]'))??l.current)==null||w.focus({preventScroll:!0})},children:d(os,{})})})]}),d(Eh,{logger:e,analytics:n,rpcClient:r})]})},Zh=({undoFn:e})=>{const{t}=oe();return d("div",{class:"flex flex-1 items-center justify-end px-1",children:d(xr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=O.current$.peek();at(r),e(r.data.nodeHistory)},children:d("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},Jh=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Yh},Symbol.toStringTag,{value:"Module"}))})();
|
|
37
|
+
`)}),c.hasHardConcerns&&e.data.alternativeLink&&await n.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await n.userInput({type:"submit",key:void 0,config:{label:Ue(e.data.continueLabel,{submissions:r,context:l})}})}return a(e.nextId)}const Ps=(e,t,r)=>{var n;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(n=t.analytics)==null?void 0:n.customProperties})},Pa="resume-prompt",dh=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:Pa,signal:r});const n=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:r});return P.removeMessagesSentByNodeIds([Pa]),(n==null?void 0:n.value)!==!1},Ft=({class:e,...t})=>{const{t:r}=oe();return d("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:r("send")}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})})};var st;function Va(e){return{lang:(e==null?void 0:e.lang)??(st==null?void 0:st.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(st==null?void 0:st.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(st==null?void 0:st.abortPipeEarly)}}var Ba;function fh(e){return Ba==null?void 0:Ba.get(e)}var za;function ph(e){return za==null?void 0:za.get(e)}var Ua;function hh(e,t){var r;return(r=Ua==null?void 0:Ua.get(e))==null?void 0:r.get(t)}function tr(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function ye(e,t,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??tr(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??hh(e.reference,l.lang)??(c?ph(l.lang):null)??n.message??fh(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Je(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Va())}}}function bh(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function gh(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function mh(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Vs=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},vh=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Bs(e,t){return{kind:"validation",type:"check",reference:Bs,async:!1,expects:null,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&ye(this,"input",r,n),r}}}function zs(e){return{kind:"validation",type:"email",reference:zs,expects:null,async:!1,requirement:vh,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&ye(this,"email",t,r),t}}}function Cr(e,t){return{kind:"validation",type:"max_length",reference:Cr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&ye(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Us(e,t){return{kind:"validation",type:"max_value",reference:Us,async:!1,expects:`<=${e instanceof Date?e.toJSON():tr(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&ye(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():tr(r.value)}),r}}}function rr(e,t){return{kind:"validation",type:"min_length",reference:rr,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&ye(this,"length",r,n,{received:`${r.value.length}`}),r}}}function qs(e,t){return{kind:"validation",type:"min_value",reference:qs,async:!1,expects:`>=${e instanceof Date?e.toJSON():tr(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&ye(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():tr(r.value)}),r}}}function qa(e,t){return{kind:"validation",type:"regex",reference:qa,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&ye(this,"format",r,n),r}}}function Ha(e){return{kind:"transformation",type:"transform",reference:Ha,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Hs(e){return{kind:"validation",type:"url",reference:Hs,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&ye(this,"URL",t,r),t}}}function wh(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Ws(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ks(e,t){return{kind:"schema",type:"array",reference:Ks,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Je(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:a,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else ye(this,"type",r,n);return r}}}function Gs(e){return{kind:"schema",type:"boolean",reference:Gs,expects:"boolean",async:!1,message:e,get"~standard"(){return Je(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:ye(this,"type",t,r),t}}}function Ys(e){return{kind:"schema",type:"number",reference:Ys,expects:"number",async:!1,message:e,get"~standard"(){return Je(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ye(this,"type",t,r),t}}}function lt(e,t){return{kind:"schema",type:"object",reference:lt,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Je(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:Ws(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:a,key:o,value:l};for(const u of c.issues)u.path?u.path.unshift(f):u.path=[f],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=wh(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(ye(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else ye(this,"type",r,n);return r}}}function nr(e,t){return{kind:"schema",type:"optional",reference:nr,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Je(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Ws(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Js(e,t){return{kind:"schema",type:"picklist",reference:Js,expects:gh(e.map(tr),"|"),async:!1,options:e,message:t,get"~standard"(){return Je(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ye(this,"type",r,n),r}}}function Zs(e,t,r){return{kind:"schema",type:"record",reference:Zs,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Je(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if(bh(i,l)){const c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){const b={type:"object",origin:"key",input:i,key:l,value:c};for(const p of f.issues)p.path=[b],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:c},a);if(u.issues){const b={type:"object",origin:"value",input:i,key:l,value:c};for(const p of u.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else ye(this,"type",n,a);return n}}}function De(e){return{kind:"schema",type:"string",reference:De,expects:"string",async:!1,message:e,get"~standard"(){return Je(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:ye(this,"type",t,r),t}}}function Xs(e,t,r){const n=e["~run"]({value:t},Va(r));if(n.issues)throw new Vs(n.issues);return n.value}function yh(e,t){const r={};for(const n in e.entries)r[n]=nr(e.entries[n]);return{...e,entries:r,get"~standard"(){return Je(this)}}}function St(...e){return{...e[0],pipe:e,get"~standard"(){return Je(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}async function _h(e,t,r){const n=await e["~run"]({value:t},Va(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const ar=({error:e})=>!e||!e.message?null:d("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[d("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"break-words pr-1 text-sm",children:e.message})]}),ct=({class:e,...t})=>{const{t:r}=oe();return d("button",{type:"button",class:it("fr touch-hitbox text-neutral-11 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[d("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:r("skip")}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Wa={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"},xh=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(Wa).find(n=>e.startsWith(n))??"",r=e.replace(t,"");return/^\d+$/.test(r)?{countryCode:t,phoneNumber:r}:{countryCode:"",phoneNumber:""}};const ir=Mt("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),kh="https://api.mapbox.com/search/searchbox/v1/suggest",Sh="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Ch=e=>atob(e).split("").reverse().join(""),ut=lt({name:De()}),Eh=lt({suggestions:Ks(lt({feature_type:nr(De()),full_address:nr(De()),place_formatted:nr(De()),name:nr(De()),mapbox_id:De(),context:yh(lt({address:ut,street:ut,neighborhood:ut,locality:ut,district:ut,place:ut,region:ut,postcode:ut,country:ut}))}))}),$h=e=>(Dt(()=>{e&&Ui(e)},[e]),mt(()=>{var r;const t=(r=P.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,a)=>{var c;const i=e&&Ui(e),o=(c=P.current$.peek().flow)==null?void 0:c.locationOrigin,s=o&&o.lat!==void 0&&o.lng!==void 0&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180;return{...await cf({query:n,country:i,session:t,surface:"chatbot",...s?{lat:o.lat,lng:o.lng}:{},signal:a},async()=>{const f=new URL(kh);return f.searchParams.set("q",n),f.searchParams.set("session_token",t),f.searchParams.set("limit","5"),s&&f.searchParams.set("proximity",`${o.lng},${o.lat}`),f.searchParams.set("access_token",Ch(Sh)),(await Fu(async p=>{const g=new URL(f);p&&g.searchParams.set("country",p);const v=await fetch(g.href,{signal:a});if(!v.ok)throw new Error(`Address lookup failed with ${v.status}`);return Xs(Eh,await v.json()).suggestions},i,a)).map(p=>{var g,v,x,C,_,M,j,D,z;return{country:i,label:p.full_address??([p.name,p.place_formatted].filter(Boolean).join(", ")||p.mapbox_id),id:p.mapbox_id,address:{line1:((g=p.context.address)==null?void 0:g.name)??((v=p.context.street)==null?void 0:v.name),line2:void 0,line3:((x=p.context.neighborhood)==null?void 0:x.name)??((C=p.context.locality)==null?void 0:C.name),city:((_=p.context.place)==null?void 0:_.name)??((M=p.context.district)==null?void 0:M.name),state:(j=p.context.region)==null?void 0:j.name,postcode:((D=p.context.postcode)==null?void 0:D.name)??(p.feature_type==="postcode"?p.name:void 0),country:(z=p.context.country)==null?void 0:z.name}}})}),country:i}}}:{enabled:!1}},[e])),Qs=e=>{const{t}=oe();return d("button",{type:"button",class:"touch-hitbox text-neutral-11 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:t("back")})]})},Ah=({input:e,onSubmitSuccess:t,logger:r,analytics:n,rpcClient:a})=>{const{t:i}=oe(),[o,s]=ze(),{enabled:l,getPredictions:c}=$h(a),[f,u]=ze(l?"query":"manual"),[b,p]=ze(""),[g,v]=ze(),x=he(),C=()=>{var S;(S=x.current)==null||S.controller.abort(),x.current=void 0};Dt(()=>C,[]);const _=he(),M=he(),j=he(!1),D=S=>{const k=S!==null?_.current:void 0,E=(k==null?void 0:k.lookup)??M.current;if(E&&!j.current){j.current=!0;const N=q=>{const B=e.config.keys[q];return S&&B?S.value[B]:void 0},I=N("country")??(k==null?void 0:k.suggestion.address.country)??(k==null?void 0:k.suggestion.country),V=S&&as({postcode:N("postcode")??(k!=null&&k.edited||o==null?void 0:o.postcode),label:k!=null&&k.edited||k==null?void 0:k.suggestion.label,state:N("state")??(k!=null&&k.edited||o==null?void 0:o.state),country:I});uf({kind:"address",surface:"chatbot",...E,picked:!!k,...k?{edited:k.edited}:{},region:V??(I!=null&&I.trim()?"other":null)})}t(S)},z=S=>{var E;if(ot(l,"Query state should not be enabled"),S=S.trim(),S===((E=x.current)==null?void 0:E.query)||S===(g==null?void 0:g.query)&&g.status==="done")return;if(C(),p(S),S===""){v(void 0);return}const k=x.current={query:S,controller:new AbortController};v({query:S,status:"pending"}),c(S,k.controller.signal).then(N=>{x.current===k&&(x.current=void 0,M.current={arm:N.arm,source:N.source},v({query:S,status:"done",items:N.results,...M.current,country:N.country}))},N=>{x.current===k&&(x.current=void 0,M.current={arm:"direct",source:"direct"},r.error("Failed to get address details",N instanceof Vs?"Unexpected response":N),v({query:S,status:"failed",error:i("address_error")}))})},A=(S,k)=>{_.current&&(o==null?void 0:o[S])!==k&&(_.current.edited=!0),s(E=>({...E,[S]:k}))};switch(f){case"query":return ot(l,"Query state should not be enabled"),d(Ih,{input:e,onSkip:()=>D(null),onAddressSelect:(S,k)=>{var N;if(S===""){x.current&&(C(),v(void 0)),u("manual");return}if((g==null?void 0:g.status)!=="done")return;const E=g.items.find(I=>I.id===S);E&&(g.arm!=="inploi"&&of({query:k,country:g.country,pickedLabel:E.label,pickedPostcode:E.address.postcode,pickedCountry:E.address.country,pickedState:E.address.state,log:I=>n.log({event:"ADDRESS_SHADOW_COMPARED",properties:I})}),((N=_.current)==null?void 0:N.suggestion.id)!==S?(s(E.address),_.current={suggestion:E,lookup:{arm:g.arm,source:g.source},edited:!1}):_.current.lookup={arm:g.arm,source:g.source},u("details"))},onAddressSearch:z,lookup:g,query:b});case"details":return ot(o!==void 0),d(el,{input:e,logger:r,onSubmitSuccess:D,addressFields:o,onFieldChange:A,actions:d(Qs,{onClick:()=>{u("query")}})});case"manual":return d(el,{logger:r,input:e,onSubmitSuccess:D,addressFields:o??{},onFieldChange:A,actions:l?d(Qs,{onClick:()=>{u("query")}}):e.config.optional?d(ct,{onClick:()=>D(null)}):void 0})}},Ih=({input:e,onSkip:t,lookup:r,onAddressSelect:n,query:a,onAddressSearch:i})=>{const{t:o}=oe(),s=he(null);return Te(()=>{s.current&&(s.current.focus(),s.current.select())},[]),d(ie,{children:[d("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&i(f)},class:"flex gap-2 p-2.5",children:[d("div",{class:"group relative flex-1",children:[d("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:a,class:ir({optional:!!e.config.optional,className:"w-full rounded-full"})}),d("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[d("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[d("circle",{cx:"7",cy:"7",r:"4"}),d("path",{d:"M10 10L13 13"})]})}),d("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&d(ct,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?d(ar,{error:{message:r.error}}):null,d("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?d(ie,{children:[d(ln,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),d("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var c;n(l.id,((c=s.current)==null?void 0:c.value)??a??"")},children:[d("span",{class:"flex-grow",children:l.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var l;n("",((l=s.current)==null?void 0:l.value)??a??"")},children:d("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},Ka=["line1","line2","line3","city","state","postcode","country"],el=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:n,input:a})=>{const i=he(null);Te(()=>{if(i.current){const l=i.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(Wa),{t:s}=oe();return d("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{l.preventDefault();const c=l.currentTarget,f=[...c.querySelectorAll("input")].filter(p=>p.value!==""&&!p.value.trim());for(const p of f){p.value="";const g=Ka.find(v=>a.config.keys[v]===p.name);g&&t(g,"")}if(f.length>0&&!c.checkValidity()){c.reportValidity();return}const u=new FormData(c),b=Object.fromEntries(u.entries());r({type:"address",value:b})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:i,children:Ka.map((l,c)=>{const f=`isdk_${l}`,u=a.config.keys[l];return u?d(ie,{children:[d("label",{for:f,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:s(l)}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:u,id:f,defaultValue:e[l],onChange:b=>t(l,b.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?d("option",{value:e[l],children:e[l]}):d("option",{value:"",children:s("select_country")}),o.map(b=>d("option",{value:b,children:b},b))]}),d("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:c===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:u,id:f,defaultValue:e[l],onInput:b=>t(l,b.currentTarget.value),required:l==="line2"?a.config.line2Required===!0:l!=="line3"}),c===Ka.length-1?d("hr",{class:"m-0 w-full border-b border-b-transparent"}):d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),d("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[n,d(Ft,{class:"ml-auto"})]})]})},Ga=()=>{const e=he(null);return Dt(()=>{var t;(t=e.current)==null||t.focus()},[]),e},tl=["true","false"],Th=Js(tl),Dh="answer",rl="flex items-center flex-wrap gap-2 p-2.5",nl="min-w-0 max-w-full flex-auto",al=da(({label:e,...t},r)=>d("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:d("p",{class:"text-center text-base",children:e})})),jh=({input:e,onSubmitSuccess:t})=>{const r=Ga();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const a=Ef(n).value,i=Xs(Th,a);t({type:"boolean",value:i==="true"})},children:[d("ul",{class:rl,children:tl.map((n,a)=>d("li",{class:nl,children:d(al,{ref:a===0?r:null,type:"submit",name:Dh,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(ct,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},il=e=>e.reduce((t,r)=>t+r.sizeKb,0),Mh=Qt("file"),ol=3,dn=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Oh=({file:e,class:t,...r})=>{const{t:n}=oe(),[a,i]=dn(e.name);return d("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"sr-only",children:[n("file_name"),": "]}),d("span",{class:"block truncate",children:a}),d("span",{children:i})]}),d("p",{class:"text-accent-11",children:[d("span",{class:"sr-only",children:[n("file_size"),": "]}),Ht(e.sizeKb)]})]})},sl=({class:e,...t})=>d("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Lh=(e,t)=>{const[r,n]=dn(e);return`${r.slice(0,t)}${n}`},ll=e=>({name:Lh(e.name,42),sizeKb:e.size/1e3}),Fh=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Nh=(e,t,r)=>{const n=dn(t.name)[1].toLowerCase(),a=[...r.map(o=>o.toLowerCase()),...Fh],i=n===""?"none":a.includes(n)?n:"other";return`chatbot-file-refused:${e}:${i}`},Rh=({input:e,onSubmitSuccess:t,analytics:r})=>{var x;const n=(x=P.current$.value.flow)==null?void 0:x.data.submissions[e.key],[a,i]=ze(Mh(n)&&n.value.length?{status:"ready",files:n.value}:{status:"empty"}),o=he(0),s=a.status==="ready"?a.files:[],l=a.status==="ready"||a.status==="pending"?a.files:[],c=a.status==="error"?a.error:void 0,f=l.length-ol,u=il(l),b=Ga(),{t:p}=oe(),g=C=>{if(!C.length)return{reason:"required",error:{type:"required",message:p("validation_file")}};if(!_i(C,e.config.extensions))return{reason:"type",file:C.find(_=>!_i([_],e.config.extensions)),error:{type:"validate",message:p("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(C.some(_=>_.sizeKb===0))return{reason:"empty",file:C.find(_=>_.sizeKb===0),error:{type:"validate",message:p("validation_file_empty")}};if(e.config.fileSizeLimitKib&&il(C)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:p("validation_file_size",{size:Ht(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&C.length>1)return{reason:"count",error:{type:"invalid",message:p("validation_file_max",{count:1})}}},v=(C,_)=>{var M,j;return r.log({event:"INTERACTION",properties:{tag:Nh(C,_,e.config.extensions)},customProperties:(j=(M=P.current$.peek().flow)==null?void 0:M.analytics)==null?void 0:j.customProperties})};return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:C=>{if(C.preventDefault(),a.status==="pending"||a.status==="error")return;const _=g(s);_?i({status:"error",error:_.error}):t({type:"file",value:s})},children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:b,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,ol).map(C=>{const[_,M]=dn(C.name);return d(sl,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:_}),d("span",{children:M})]})}),f>0?d(sl,{children:p("file_more",{count:f})}):null]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-11 text-xs",children:["(",p("file_max_size",{size:Ht(e.config.fileSizeLimitKib)}),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(C=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:C.replace(".","")}))})]})]}),d("p",{role:"status",class:it("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:a.status==="pending"?d(ie,{children:[d(ln,{"aria-hidden":"true",class:"h-4 w-4"}),p("file_preparing",{count:l.length})]}):a.status==="ready"?d(ie,{children:[s.length>1?p("file_total_size",{size:Ht(u)}):Ht(u),d("span",{class:"sr-only",children:[". ",p("file_ready",{count:s.length})]})]}):null}),d("input",{id:"dropzone-file","aria-label":p("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async C=>{ot(C.target instanceof HTMLInputElement);const _=C.target.files?Array.from(C.target.files):[];C.target.value="";const[M]=_;if(!M)return;const j=++o.current,D=a.status==="ready",z=_.map(ll),A=g(z);if(A)return v(A.reason,A.file??M),i({status:"error",error:A.error});i({status:"pending",files:z});let S;try{const k=await Promise.all(_.map(async E=>{try{return{...ll(E),data:await Wc(E)}}catch(N){throw S??(S=E),N}}));o.current===j&&i({status:"ready",files:k})}catch{if(o.current!==j)return;v("unreadable",S??M),i({status:"error",error:{type:"invalid",message:p(D?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(Ft,{disabled:s.length===0}),e.config.optional&&d(ct,{class:"relative",onClick:()=>t(null)})]})]}),d(ar,{error:c})]})};var Er=e=>e.type==="checkbox",Nt=e=>e instanceof Date,je=e=>e==null;const cl=e=>typeof e=="object";var le=e=>!je(e)&&!Array.isArray(e)&&cl(e)&&!Nt(e),Ph=e=>le(e)&&e.target?Er(e.target)?e.target.checked:e.target.value:e,Vh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bh=(e,t)=>e.has(Vh(t)),zh=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},Ya=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function de(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ya&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(le(e)&&zh(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=de(e[a]));return n}var fn=e=>/^\w*$/.test(e),ae=e=>e===void 0,Ja=e=>Array.isArray(e)?e.filter(Boolean):[],Za=e=>Ja(e.replace(/["|']|\]/g,"").split(/\.|\[/)),O=(e,t,r)=>{if(!t||!le(e))return r;const n=(fn(t)?[t]:Za(t)).reduce((a,i)=>je(a)?a:a[i],e);return ae(n)||n===e?ae(e[t])?r:e[t]:n},Ze=e=>typeof e=="boolean",qe=e=>typeof e=="function",X=(e,t,r)=>{let n=-1;const a=fn(t)?[t]:Za(t),i=a.length,o=i-1;for(;++n<i;){const s=a[n];let l=r;if(n!==o){const c=e[s];l=le(c)||Array.isArray(c)?c:isNaN(+a[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ul={BLUR:"blur",FOCUS_OUT:"focusout"},He={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Uh=Se.createContext(null);Uh.displayName="HookFormControlContext";var qh=(e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==He.all&&(t._proxyFormState[o]=!n||He.all),e[o]}});return a};const Hh=typeof window<"u"?Se.useLayoutEffect:Se.useEffect;var Ne=e=>typeof e=="string",Wh=(e,t,r,n,a)=>Ne(e)?(n&&t.watch.add(e),O(r,e,a)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),O(r,i))):(n&&(t.watchAll=!0),r),Xa=e=>je(e)||!cl(e);function Ct(e,t,r=new WeakSet){if(Xa(e)||Xa(t))return Object.is(e,t);if(Nt(e)&&Nt(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const o=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Nt(o)&&Nt(s)||le(o)&&le(s)||Array.isArray(o)&&Array.isArray(s)?!Ct(o,s,r):!Object.is(o,s))return!1}}return!0}const Kh=Se.createContext(null);Kh.displayName="HookFormContext";var dl=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{},$r=e=>Array.isArray(e)?e:[e],fl=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function pl(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const a=e[n],i=t[n];if(a&&le(a)&&i){const o=pl(a,i);le(o)&&(r[n]=o)}else e[n]&&(r[n]=i)}return r}var Ce=e=>le(e)&&!Object.keys(e).length,Qa=e=>e.type==="file",pn=e=>{if(!Ya)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hl=e=>e.type==="select-multiple",ei=e=>e.type==="radio",Gh=e=>ei(e)||Er(e),ti=e=>pn(e)&&e.isConnected;function Yh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=ae(e)?n++:e[t[n++]];return e}function Jh(e){for(const t in e)if(e.hasOwnProperty(t)&&!ae(e[t]))return!1;return!0}function ce(e,t){const r=Array.isArray(t)?t:fn(t)?[t]:Za(t),n=r.length===1?e:Yh(e,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(le(n)&&Ce(n)||Array.isArray(n)&&Jh(n))&&ce(e,r.slice(0,-1)),e}var Zh=e=>{for(const t in e)if(qe(e[t]))return!0;return!1};function bl(e){return Array.isArray(e)||le(e)&&!Zh(e)}function ri(e,t={}){for(const r in e){const n=e[r];bl(n)?(t[r]=Array.isArray(n)?[]:{},ri(n,t[r])):ae(n)||(t[r]=!0)}return t}function or(e,t,r){r||(r=ri(t));for(const n in e){const a=e[n];if(bl(a))ae(t)||Xa(r[n])?r[n]=ri(a,Array.isArray(a)?[]:{}):or(a,je(t)?{}:t[n],r[n]);else{const i=t[n];r[n]=!Ct(a,i)}}return r}const gl={value:!1,isValid:!1},ml={value:!0,isValid:!0};var vl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ae(e[0].attributes.value)?ae(e[0].value)||e[0].value===""?ml:{value:e[0].value,isValid:!0}:ml:gl}return gl},wl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>ae(e)?e:t?e===""?NaN:e&&+e:r&&Ne(e)?new Date(e):n?n(e):e;const yl={isValid:!1,value:null};var _l=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,yl):yl;function xl(e){const t=e.ref;return Qa(t)?t.files:ei(t)?_l(e.refs).value:hl(t)?[...t.selectedOptions].map(({value:r})=>r):Er(t)?vl(e.refs).value:wl(ae(t.value)?e.ref.value:t.value,e)}var Xh=(e,t,r,n)=>{const a={};for(const i of e){const o=O(t,i);o&&X(a,i,o._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}},hn=e=>e instanceof RegExp,Ar=e=>ae(e)?e:hn(e)?e.source:le(e)?hn(e.value)?e.value.source:e.value:e,kl=e=>({isOnSubmit:!e||e===He.onSubmit,isOnBlur:e===He.onBlur,isOnChange:e===He.onChange,isOnAll:e===He.all,isOnTouch:e===He.onTouched});const Sl="AsyncFunction";var Qh=e=>!!e&&!!e.validate&&!!(qe(e.validate)&&e.validate.constructor.name===Sl||le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Sl)),eb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Cl=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Ir=(e,t,r,n)=>{for(const a of r||Object.keys(e)){const i=O(e,a);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Ir(s,t))break}else if(le(s)&&Ir(s,t))break}}};function El(e,t,r){const n=O(e,r);if(n||fn(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=O(t,i),s=O(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};if(s&&s.root&&s.root.type)return{name:`${i}.root`,error:s.root};a.pop()}return{name:r}}var tb=(e,t,r,n)=>{r(e);const{name:a,...i}=e;return Ce(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||He.all))},rb=(e,t,r)=>!e||!t||e===t||$r(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),nb=(e,t,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:(r?n.isOnChange:a.isOnChange)?e:!0,ab=(e,t)=>!Ja(O(e,t)).length&&ce(e,t),ib=(e,t,r)=>{const n=$r(O(e,r));return X(n,"root",t[r]),X(e,r,n),e};function $l(e,t,r="validate"){if(Ne(e)||Array.isArray(e)&&e.every(Ne)||Ze(e)&&!e)return{type:r,message:Ne(e)?e:"",ref:t}}var sr=e=>le(e)&&!hn(e)?e:{value:e,message:""},Al=async(e,t,r,n,a,i)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:f,min:u,max:b,pattern:p,validate:g,name:v,valueAsNumber:x,mount:C}=e._f,_=O(r,v);if(!C||t.has(v))return{};const M=s?s[0]:o,j=I=>{a&&M.reportValidity&&(M.setCustomValidity(Ze(I)?"":I||""),M.reportValidity())},D={},z=ei(o),A=Er(o),S=z||A,k=(x||Qa(o))&&ae(o.value)&&ae(_)||pn(o)&&o.value===""||_===""||Array.isArray(_)&&!_.length,E=dl.bind(null,v,n,D),N=(I,V,q,B=dt.maxLength,G=dt.minLength)=>{const Y=I?V:q;D[v]={type:I?B:G,message:Y,ref:o,...E(I?B:G,Y)}};if(i?!Array.isArray(_)||!_.length:l&&(!S&&(k||je(_))||Ze(_)&&!_||A&&!vl(s).isValid||z&&!_l(s).isValid)){const{value:I,message:V}=Ne(l)?{value:!!l,message:l}:sr(l);if(I&&(D[v]={type:dt.required,message:V,ref:M,...E(dt.required,V)},!n))return j(V),D}if(!k&&(!je(u)||!je(b))){let I,V;const q=sr(b),B=sr(u);if(!je(_)&&!isNaN(_)){const G=o.valueAsNumber||_&&+_;je(q.value)||(I=G>q.value),je(B.value)||(V=G<B.value)}else{const G=o.valueAsDate||new Date(_),Y=Me=>new Date(new Date().toDateString()+" "+Me),me=o.type=="time",Re=o.type=="week";Ne(q.value)&&_&&(I=me?Y(_)>Y(q.value):Re?_>q.value:G>new Date(q.value)),Ne(B.value)&&_&&(V=me?Y(_)<Y(B.value):Re?_<B.value:G<new Date(B.value))}if((I||V)&&(N(!!I,q.message,B.message,dt.max,dt.min),!n))return j(D[v].message),D}if((c||f)&&!k&&(Ne(_)||i&&Array.isArray(_))){const I=sr(c),V=sr(f),q=!je(I.value)&&_.length>+I.value,B=!je(V.value)&&_.length<+V.value;if((q||B)&&(N(q,I.message,V.message),!n))return j(D[v].message),D}if(p&&!k&&Ne(_)){const{value:I,message:V}=sr(p);if(hn(I)&&!_.match(I)&&(D[v]={type:dt.pattern,message:V,ref:o,...E(dt.pattern,V)},!n))return j(V),D}if(g){if(qe(g)){const I=await g(_,r),V=$l(I,M);if(V&&(D[v]={...V,...E(dt.validate,V.message)},!n))return j(V.message),D}else if(le(g)){let I={};for(const V in g){if(!Ce(I)&&!n)break;const q=$l(await g[V](_,r),M,V);q&&(I={...q,...E(V,q.message)},j(q.message),n&&(D[v]=I))}if(!Ce(I)&&(D[v]={ref:M,...I},!n))return D}}return j(!0),D};const ob={mode:He.onSubmit,reValidateMode:He.onChange,shouldFocusError:!0};function sb(e={}){let t={...ob,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:qe(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},a=le(t.defaultValues)||le(t.values)?de(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:de(a),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={...f};let b={...u};const p={array:fl(),state:fl()},g=t.criteriaMode===He.all,v=h=>m=>{clearTimeout(c),c=setTimeout(h,m)},x=async h=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||b.isValid||h)){let m;t.resolver?(m=Ce((await S()).errors),C()):m=await E(n,!0),m!==r.isValid&&p.state.next({isValid:m})}},C=(h,m)=>{!t.disabled&&(u.isValidating||u.validatingFields||b.isValidating||b.validatingFields)&&((h||Array.from(s.mount)).forEach(w=>{w&&(m?X(r.validatingFields,w,m):ce(r.validatingFields,w))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Ce(r.validatingFields)}))},_=(h,m=[],w,T,$=!0,y=!0)=>{if(T&&w&&!t.disabled){if(o.action=!0,y&&Array.isArray(O(n,h))){const L=w(O(n,h),T.argA,T.argB);$&&X(n,h,L)}if(y&&Array.isArray(O(r.errors,h))){const L=w(O(r.errors,h),T.argA,T.argB);$&&X(r.errors,h,L),ab(r.errors,h)}if((u.touchedFields||b.touchedFields)&&y&&Array.isArray(O(r.touchedFields,h))){const L=w(O(r.touchedFields,h),T.argA,T.argB);$&&X(r.touchedFields,h,L)}(u.dirtyFields||b.dirtyFields)&&(r.dirtyFields=or(a,i)),p.state.next({name:h,isDirty:I(h,m),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else X(i,h,m)},M=(h,m)=>{X(r.errors,h,m),p.state.next({errors:r.errors})},j=h=>{r.errors=h,p.state.next({errors:r.errors,isValid:!1})},D=(h,m,w,T)=>{const $=O(n,h);if($){const y=O(i,h,ae(w)?O(a,h):w);ae(y)||T&&T.defaultChecked||m?X(i,h,m?y:xl($._f)):B(h,y),o.mount&&!o.action&&x()}},z=(h,m,w,T,$)=>{let y=!1,L=!1;const W={name:h};if(!t.disabled){if(!w||T){(u.isDirty||b.isDirty)&&(L=r.isDirty,r.isDirty=W.isDirty=I(),y=L!==W.isDirty);const K=Ct(O(a,h),m);L=!!O(r.dirtyFields,h),K?ce(r.dirtyFields,h):X(r.dirtyFields,h,!0),W.dirtyFields=r.dirtyFields,y=y||(u.dirtyFields||b.dirtyFields)&&L!==!K}if(w){const K=O(r.touchedFields,h);K||(X(r.touchedFields,h,w),W.touchedFields=r.touchedFields,y=y||(u.touchedFields||b.touchedFields)&&K!==w)}y&&$&&p.state.next(W)}return y?W:{}},A=(h,m,w,T)=>{const $=O(r.errors,h),y=(u.isValid||b.isValid)&&Ze(m)&&r.isValid!==m;if(t.delayError&&w?(l=v(()=>M(h,w)),l(t.delayError)):(clearTimeout(c),l=null,w?X(r.errors,h,w):ce(r.errors,h)),(w?!Ct($,w):$)||!Ce(T)||y){const L={...T,...y&&Ze(m)?{isValid:m}:{},errors:r.errors,name:h};r={...r,...L},p.state.next(L)}},S=async h=>(C(h,!0),await t.resolver(i,t.context,Xh(h||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),k=async h=>{const{errors:m}=await S(h);if(C(h),h)for(const w of h){const T=O(m,w);T?X(r.errors,w,T):ce(r.errors,w)}else r.errors=m;return m},E=async(h,m,w={valid:!0})=>{for(const T in h){const $=h[T];if($){const{_f:y,...L}=$;if(y){const W=s.array.has(y.name),K=$._f&&Qh($._f);K&&u.validatingFields&&C([y.name],!0);const ve=await Al($,s.disabled,i,g,t.shouldUseNativeValidation&&!m,W);if(K&&u.validatingFields&&C([y.name]),ve[y.name]&&(w.valid=!1,m||e.shouldUseNativeValidation))break;!m&&(O(ve,y.name)?W?ib(r.errors,ve,y.name):X(r.errors,y.name,ve[y.name]):ce(r.errors,y.name))}!Ce(L)&&await E(L,m,w)}}return w.valid},N=()=>{for(const h of s.unMount){const m=O(n,h);m&&(m._f.refs?m._f.refs.every(w=>!ti(w)):!ti(m._f.ref))&&ft(h)}s.unMount=new Set},I=(h,m)=>!t.disabled&&(h&&m&&X(i,h,m),!Ct(ne(),a)),V=(h,m,w)=>Wh(h,s,{...o.mount?i:ae(m)?a:Ne(h)?{[h]:m}:m},w,m),q=h=>Ja(O(o.mount?i:a,h,t.shouldUnregister?O(a,h,[]):[])),B=(h,m,w={})=>{const T=O(n,h);let $=m;if(T){const y=T._f;y&&(!y.disabled&&X(i,h,wl(m,y)),$=pn(y.ref)&&je(m)?"":m,hl(y.ref)?[...y.ref.options].forEach(L=>L.selected=$.includes(L.value)):y.refs?Er(y.ref)?y.refs.forEach(L=>{(!L.defaultChecked||!L.disabled)&&(Array.isArray($)?L.checked=!!$.find(W=>W===L.value):L.checked=$===L.value||!!$)}):y.refs.forEach(L=>L.checked=L.value===$):Qa(y.ref)?y.ref.value="":(y.ref.value=$,y.ref.type||p.state.next({name:h,values:de(i)})))}(w.shouldDirty||w.shouldTouch)&&z(h,$,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&Me(h)},G=(h,m,w)=>{for(const T in m){if(!m.hasOwnProperty(T))return;const $=m[T],y=h+"."+T,L=O(n,y);(s.array.has(h)||le($)||L&&!L._f)&&!Nt($)?G(y,$,w):B(y,$,w)}},Y=(h,m,w={})=>{const T=O(n,h),$=s.array.has(h),y=de(m);X(i,h,y),$?(p.array.next({name:h,values:de(i)}),(u.isDirty||u.dirtyFields||b.isDirty||b.dirtyFields)&&w.shouldDirty&&p.state.next({name:h,dirtyFields:or(a,i),isDirty:I(h,y)})):T&&!T._f&&!je(y)?G(h,y,w):B(h,y,w),Cl(h,s)?p.state.next({...r,name:h,values:de(i)}):p.state.next({name:o.mount?h:void 0,values:de(i)})},me=async h=>{o.mount=!0;const m=h.target;let w=m.name,T=!0;const $=O(n,w),y=K=>{T=Number.isNaN(K)||Nt(K)&&isNaN(K.getTime())||Ct(K,O(i,w,K))},L=kl(t.mode),W=kl(t.reValidateMode);if($){let K,ve;const zt=m.type?xl($._f):Ph(h),Et=h.type===ul.BLUR||h.type===ul.FOCUS_OUT,ng=!eb($._f)&&!t.resolver&&!O(r.errors,w)&&!$._f.deps||nb(Et,O(r.touchedFields,w),r.isSubmitted,W,L),ai=Cl(w,s,Et);X(i,w,zt),Et?(!m||!m.readOnly)&&($._f.onBlur&&$._f.onBlur(h),l&&l(0)):$._f.onChange&&$._f.onChange(h);const ii=z(w,zt,Et),ag=!Ce(ii)||ai;if(!Et&&p.state.next({name:w,type:h.type,values:de(i)}),ng)return(u.isValid||b.isValid)&&(t.mode==="onBlur"?Et&&x():Et||x()),ag&&p.state.next({name:w,...ai?{}:ii});if(!Et&&ai&&p.state.next({...r}),t.resolver){const{errors:Vl}=await S([w]);if(C([w]),y(zt),T){const ig=El(r.errors,n,w),Bl=El(Vl,n,ig.name||w);K=Bl.error,w=Bl.name,ve=Ce(Vl)}}else C([w],!0),K=(await Al($,s.disabled,i,g,t.shouldUseNativeValidation))[w],C([w]),y(zt),T&&(K?ve=!1:(u.isValid||b.isValid)&&(ve=await E(n,!0)));T&&($._f.deps&&(!Array.isArray($._f.deps)||$._f.deps.length>0)&&Me($._f.deps),A(w,ve,K,ii))}},Re=(h,m)=>{if(O(r.errors,m)&&h.focus)return h.focus(),1},Me=async(h,m={})=>{let w,T;const $=$r(h);if(t.resolver){const y=await k(ae(h)?h:$);w=Ce(y),T=h?!$.some(L=>O(y,L)):w}else h?(T=(await Promise.all($.map(async y=>{const L=O(n,y);return await E(L&&L._f?{[y]:L}:L)}))).every(Boolean),!(!T&&!r.isValid)&&x()):T=w=await E(n);return p.state.next({...!Ne(h)||(u.isValid||b.isValid)&&w!==r.isValid?{}:{name:h},...t.resolver||!h?{isValid:w}:{},errors:r.errors}),m.shouldFocus&&!T&&Ir(n,Re,h?$:s.mount),T},ne=(h,m)=>{let w={...o.mount?i:a};return m&&(w=pl(m.dirtyFields?r.dirtyFields:r.touchedFields,w)),ae(h)?w:Ne(h)?O(w,h):h.map(T=>O(w,T))},Dr=(h,m)=>({invalid:!!O((m||r).errors,h),isDirty:!!O((m||r).dirtyFields,h),error:O((m||r).errors,h),isValidating:!!O(r.validatingFields,h),isTouched:!!O((m||r).touchedFields,h)}),jr=h=>{const m=h?$r(h):void 0;m==null||m.forEach(w=>ce(r.errors,w)),m?m.forEach(w=>{p.state.next({name:w,errors:r.errors})}):p.state.next({errors:{}})},U=(h,m,w)=>{const T=(O(n,h,{_f:{}})._f||{}).ref,$=O(r.errors,h)||{},{ref:y,message:L,type:W,...K}=$;X(r.errors,h,{...K,...m,ref:T}),p.state.next({name:h,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&T&&T.focus&&T.focus()},Mr=(h,m)=>qe(h)?p.state.subscribe({next:w=>"values"in w&&h(V(void 0,m),w)}):V(h,m,!0),Rt=h=>p.state.subscribe({next:m=>{rb(h.name,m.name,h.exact)&&tb(m,h.formState||u,yn,h.reRenderRoot)&&h.callback({values:{...i},...r,...m,defaultValues:a})}}).unsubscribe,Pt=h=>(o.mount=!0,b={...b,...h.formState},Rt({...h,formState:{...f,...h.formState}})),ft=(h,m={})=>{for(const w of h?$r(h):s.mount)s.mount.delete(w),s.array.delete(w),m.keepValue||(ce(n,w),ce(i,w)),!m.keepError&&ce(r.errors,w),!m.keepDirty&&ce(r.dirtyFields,w),!m.keepTouched&&ce(r.touchedFields,w),!m.keepIsValidating&&ce(r.validatingFields,w),!t.shouldUnregister&&!m.keepDefaultValue&&ce(a,w);p.state.next({values:de(i)}),p.state.next({...r,...m.keepDirty?{isDirty:I()}:{}}),!m.keepIsValid&&x()},Or=({disabled:h,name:m})=>{if(Ze(h)&&o.mount||h||s.disabled.has(m)){const $=s.disabled.has(m)!==!!h;h?s.disabled.add(m):s.disabled.delete(m),$&&o.mount&&!o.action&&x()}},lr=(h,m={})=>{let w=O(n,h);const T=Ze(m.disabled)||Ze(t.disabled);return X(n,h,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:h}},name:h,mount:!0,...m}}),s.mount.add(h),w?Or({disabled:Ze(m.disabled)?m.disabled:t.disabled,name:h}):D(h,!0,m.value),{...T?{disabled:m.disabled||t.disabled}:{},...t.progressive?{required:!!m.required,min:Ar(m.min),max:Ar(m.max),minLength:Ar(m.minLength),maxLength:Ar(m.maxLength),pattern:Ar(m.pattern)}:{},name:h,onChange:me,onBlur:me,ref:$=>{if($){lr(h,m),w=O(n,h);const y=ae($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,L=Gh(y),W=w._f.refs||[];if(L?W.find(K=>K===y):y===w._f.ref)return;X(n,h,{_f:{...w._f,...L?{refs:[...W.filter(ti),y,...Array.isArray(O(a,h))?[{}]:[]],ref:{type:y.type,name:h}}:{ref:y}}}),D(h,!1,void 0,y)}else w=O(n,h,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||m.shouldUnregister)&&!(Bh(s.array,h)&&o.action)&&s.unMount.add(h)}}},pt=()=>t.shouldFocusError&&Ir(n,Re,s.mount),vn=h=>{Ze(h)&&(p.state.next({disabled:h}),Ir(n,(m,w)=>{const T=O(n,w);T&&(m.disabled=T._f.disabled||h,Array.isArray(T._f.refs)&&T._f.refs.forEach($=>{$.disabled=T._f.disabled||h}))},0,!1))},Lr=(h,m)=>async w=>{let T;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let $=de(i);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:y,values:L}=await S();C(),r.errors=y,$=de(L)}else await E(n);if(s.disabled.size)for(const y of s.disabled)ce($,y);if(ce(r.errors,"root"),Ce(r.errors)){p.state.next({errors:{}});try{await h($,w)}catch(y){T=y}}else m&&await m({...r.errors},w),pt(),setTimeout(pt);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ce(r.errors)&&!T,submitCount:r.submitCount+1,errors:r.errors}),T)throw T},Fr=(h,m={})=>{O(n,h)&&(ae(m.defaultValue)?Y(h,de(O(a,h))):(Y(h,m.defaultValue),X(a,h,de(m.defaultValue))),m.keepTouched||ce(r.touchedFields,h),m.keepDirty||(ce(r.dirtyFields,h),r.isDirty=m.defaultValue?I(h,de(O(a,h))):I()),m.keepError||(ce(r.errors,h),u.isValid&&x()),p.state.next({...r}))},Vt=(h,m={})=>{const w=h?de(h):a,T=de(w),$=Ce(h),y=$?a:T;if(m.keepDefaultValues||(a=w),!m.keepValues){if(m.keepDirtyValues){const L=new Set([...s.mount,...Object.keys(or(a,i))]);for(const W of Array.from(L)){const K=O(r.dirtyFields,W),ve=O(i,W),zt=O(y,W);K&&!ae(ve)?X(y,W,ve):!K&&!ae(zt)&&Y(W,zt)}}else{if(Ya&&ae(h))for(const L of s.mount){const W=O(n,L);if(W&&W._f){const K=Array.isArray(W._f.refs)?W._f.refs[0]:W._f.ref;if(pn(K)){const ve=K.closest("form");if(ve){ve.reset();break}}}}if(m.keepFieldsRef)for(const L of s.mount)Y(L,O(y,L));else n={}}i=t.shouldUnregister?m.keepDefaultValues?de(a):{}:de(y),p.array.next({values:{...y}}),p.state.next({values:{...y}})}s={mount:m.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!m.keepIsValid||!!m.keepDirtyValues||!t.shouldUnregister&&!Ce(y),o.watch=!!t.shouldUnregister,o.keepIsValid=!!m.keepIsValid,o.action=!1,m.keepErrors||(r.errors={}),p.state.next({submitCount:m.keepSubmitCount?r.submitCount:0,isDirty:$?!1:m.keepDirty?r.isDirty:!!(m.keepDefaultValues&&!Ct(h,a)),isSubmitted:m.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:$?{}:m.keepDirtyValues?m.keepDefaultValues&&i?or(a,i):r.dirtyFields:m.keepDefaultValues&&h?or(a,h):m.keepDirty?r.dirtyFields:{},touchedFields:m.keepTouched?r.touchedFields:{},errors:m.keepErrors?r.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Bt=(h,m)=>Vt(qe(h)?h(i):h,{...t.resetOptions,...m}),wn=(h,m={})=>{const w=O(n,h),T=w&&w._f;if(T){const $=T.refs?T.refs[0]:T.ref;$.focus&&setTimeout(()=>{$.focus(),m.shouldSelect&&qe($.select)&&$.select()})}},yn=h=>{r={...r,...h}},Nr={control:{register:lr,unregister:ft,getFieldState:Dr,handleSubmit:Lr,setError:U,_subscribe:Rt,_runSchema:S,_updateIsValidating:C,_focusError:pt,_getWatch:V,_getDirty:I,_setValid:x,_setFieldArray:_,_setDisabledField:Or,_setErrors:j,_getFieldArray:q,_reset:Vt,_resetDefaultValues:()=>qe(t.defaultValues)&&t.defaultValues().then(h=>{Bt(h,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:N,_disableForm:vn,_subjects:p,_proxyFormState:u,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(h){o=h},get _defaultValues(){return a},get _names(){return s},set _names(h){s=h},get _formState(){return r},get _options(){return t},set _options(h){t={...t,...h}}},subscribe:Pt,trigger:Me,register:lr,handleSubmit:Lr,watch:Mr,setValue:Y,getValues:ne,reset:Bt,resetField:Fr,clearErrors:jr,unregister:ft,setError:U,setFocus:wn,getFieldState:Dr};return{...Nr,formControl:Nr}}function bn(e={}){const t=Se.useRef(void 0),r=Se.useRef(void 0),[n,a]=Se.useState({isDirty:!1,isValidating:!1,isLoading:qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:qe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!qe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=sb(e);t.current={...s,formState:n}}const i=t.current.control;return i._options=e,Hh(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(s=>({...s,isReady:!0})),i._formState.isReady=!0,o},[i]),Se.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Se.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),Se.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),Se.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),Se.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),Se.useEffect(()=>{var o;e.values&&!Ct(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((o=i._options.resetOptions)===null||o===void 0)&&o.keepIsValid||i._setValid(),r.current=e.values,a(s=>({...s}))):i._resetDefaultValues()},[i,e.values]),Se.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Se.useMemo(()=>qh(n,i),[i,n]),t.current}const Il=(e,t,r)=>{if(e&&"reportValidity"in e){const n=O(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},lb=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Il(n.ref,r,e):n.refs&&n.refs.forEach(a=>Il(a,r,e))}},cb=(e,t)=>{t.shouldUseNativeValidation&&lb(e,t);const r={};for(const n in e){const a=O(t.fields,n),i=Object.assign(e[n]||{},{ref:a&&a.ref});if(ub(t.names||Object.keys(e),n)){const o=Object.assign({},O(r,n));X(o,"root",i),X(r,n,o)}else X(r,n,i)}return r},ub=(e,t)=>e.some(r=>r.startsWith(t+"."));var gn=function(e,t,r){return r===void 0&&(r={}),function(n,a,i){try{var o=!i.shouldUseNativeValidation&&i.criteriaMode==="all";return Promise.resolve(_h(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var c=s.issues[0],f=mh(c);if(f&&(l[f]||(l[f]={message:c.message,type:c.type}),o)){var u=l[f].types,b=u&&u[c.type];l[f]=dl(f,o,l,c.type,b?[].concat(b,c.message):c.message)}s.issues.shift()}return{values:{},errors:cb(l,i)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Tl=27,Dl=12,jl=10,db=Qt("enum"),fb=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return gn(lt({checked:St(Zs(De(),Gs()),Ha(n=>Object.entries(n).filter(([a,i])=>i).map(([a,i])=>a)),Cr(r.max,t("validation_multiple_choice_max",{count:r.max})),rr(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},pb=da(({option:e,...t},r)=>d(ie,{children:[d("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Ml=Mt("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:rl}}}),hb=({input:e,onSubmitSuccess:t})=>{var f,u;const r=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.maxSelected===1,a=n&&e.config.options.length===2,{t:i}=oe(),{register:o,handleSubmit:s,formState:{errors:l}}=bn({defaultValues:{checked:n?{}:db(r)?Object.fromEntries(r.value.map(b=>[b,!0])):{}},resolver:fb(e.config,i)}),c=Ga();return a?d(ie,{children:[d("ul",{style:{maxHeight:6.5*Tl+5*Dl+2*jl},class:Ml({variant:"booleanLike"}),children:e.config.options.map((b,p)=>d("li",{class:nl,children:d(al,{type:"submit",ref:g=>{g&&p===0&&(c.current=g)},label:b.label,value:"true",onClick:()=>t({type:"enum",value:[b.value]})})},b.value))}),e.config.minSelected===0&&d("div",{class:"px-2 pb-2",children:d(ct,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):d("form",{noValidate:!0,onSubmit:b=>s(p=>{const g=p.checked;t({type:"enum",value:g})})(b),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*Tl+5*Dl+2*jl},class:Ml({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((b,p)=>{const g=`checked.${b.value}`,{ref:v,...x}=o(g);return d("li",{class:"relative",children:d(pb,{option:b,autoFocus:p===0,ref:C=>{C&&p===0&&(c.current=C),v(C)},id:g,...x,onClick:n?()=>t({type:"enum",value:[b.value]}):void 0})},b.value)})}),d("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:d(Ft,{}),e.config.minSelected===0&&d(ct,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(ar,{error:(u=l.checked)==null?void 0:u.root})})]})},bb=Qt("number"),gb=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,a=e.decimalCases??0;return gn(lt({number:St(Ys(t("validation_number")),qs(r,t("validation_number_min",{min:r})),Us(n,t("validation_number_max",{max:n})),Bs(i=>i===Number(i.toFixed(a)),t("validation_number_decimal_cases",{count:a})))}))},mb=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,n=e.key?(u=P.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:a}=oe(),{register:i,handleSubmit:o,formState:{errors:s}}=bn({defaultValues:{number:bb(n)?n.value:r?Number(r):void 0},resolver:gb(e.config,a)}),{ref:l,...c}=i("number",{required:!e.config.optional,valueAsNumber:!0}),f=he();return Te(()=>{f.current&&(f.current.focus(),f.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(b=>{b.number!==void 0&&t({type:"number",value:b.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...c,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:b=>{b&&(f.current=b),l(b)},type:"text",min:e.config.min,max:e.config.max,class:ir({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&d(ct,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Ft,{})]}),d(ar,{error:s.number})]})},vb="44",wb=/^[0-9 ]+$/,yb=Qt("string"),_b=Qt("phone"),xb=e=>{const t=St(De(e("validation_country_code")),qa(wb,e("validation_country_code"))),r=St(De(e("validation_phone")),rr(1,e("validation_phone")),Ha(n=>n.replace(/[^0-9]/g,"")));return gn(lt({countryCode:t,phoneNumber:r}))},kb=({input:e,onSubmitSuccess:t})=>{var v;const r=e.key?(v=P.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,{t:n}=oe(),[a,i]=ze(),o=yb(r)?xh(r.value):_b(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:c},watch:f}=bn({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??vb,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:xb(n)}),{ref:u,...b}=s("phoneNumber",{required:!e.config.optional}),p=he(),g=f("countryCode");return Te(()=>{p.current&&(p.current.focus(),p.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(x=>{const C=x.phoneNumber.replace(/[^0-9]/g,""),_=x.countryCode.replace(/[^0-9]/g,"");i(void 0);const M=e.config.minChars??7,j=C.length+_.length;if(j<M)return i(n("validation_phone_min_chars",{count:M}));const D=e.config.maxChars;if(D!=null&&j>D)return i(n("validation_max_chars",{count:D}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:_,phoneNumber:C}}):t({type:"string",value:g+x.phoneNumber})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[d("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[d("span",{children:["+",g]}),d("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Wa).map(([x,C])=>d("option",{value:C,children:[x," (+",C,")"]},x))})]}),d("input",{...b,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(p.current=x),u(x)},class:ir({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&d(ct,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),d(Ft,{})]}),d(ar,{error:c.countryCode||c.phoneNumber||{message:a}})]})},mn=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),Ol=(e,t,r,n)=>r!==void 0&&n*1e3>On?e("submission_available_at",{time:$i(r,t)}):e("submission_cooldown",{count:n}),Sb=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},Cb=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=oe(),{availableAt:a}=e.config,[i,o]=ze(()=>mn(a)),[s,l]=ze("");Dt(()=>{const f=mn(a);if(o(f),f===0)return;l(Ol(r,n,a,f));const u=setInterval(()=>{const b=mn(a);o(b),!(b>0)&&(clearInterval(u),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(u)},[a,n,r]);const c=i>0;return d("div",{class:"flex flex-col items-center gap-2 py-3",children:[d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":c,"aria-describedby":c?"submit-cooldown":void 0,onClick:()=>{mn(a)>0||t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:Sb(e.config.label,r)}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})}),c&&d("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:Ol(r,n,a,i)}),d("p",{role:"status",class:"sr-only",children:s})]})},Eb=160,Ll=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Eb)}px`},$b={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Ab=Qt("string"),Ib=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return gn(lt({text:{date:St(De(t("validation_date")),qa(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:St(De(t("validation_email")),zs(t("validation_email")),rr(e.minChars??1,r.minLength),Cr(e.maxChars??1/0,r.maxLength)),text:St(De(),rr(e.minChars??1,r.minLength),Cr(e.maxChars??1/0,r.maxLength)),url:St(De(t("validation_url")),Hs(t("validation_url")),rr(e.minChars??1,r.minLength),Cr(e.maxChars??1/0,r.maxLength))}[e.format]}))},Tb={text:({input:e,onSubmitSuccess:t})=>{var v;const{t:r}=oe(),n=e.key?(v=P.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,a=e.config.defaultValue,i=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:c}}=bn({defaultValues:{text:Ab(n)?n.value:a??""},resolver:Ib(e.config,r)}),{ref:f,...u}=o("text",{required:!e.config.optional}),b=he();Te(()=>{b.current&&(b.current instanceof HTMLTextAreaElement&&Ll(b.current),b.current.focus(),b.current.select())},[]);const p=e.config.maxChars,g=i&&p!==void 0?l("text").length:void 0;return d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(x=>{t({type:"string",value:x.text})}),children:[d("div",{class:i?"flex items-end gap-2":"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-1",children:[i?d("textarea",{id:"chat-input",...u,rows:2,maxLength:p,autoFocus:!0,"aria-describedby":g!==void 0?"chat-input-count":void 0,onInput:x=>Ll(x.currentTarget),onKeyDown:x=>{var C;x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&(x.preventDefault(),(C=x.currentTarget.form)==null||C.requestSubmit())},ref:x=>{x&&(b.current=x),f(x)},placeholder:e.config.placeholder,class:ir({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):d("input",{id:"chat-input",...u,...$b[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(b.current=x),f(x)},placeholder:e.config.placeholder,class:ir({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&d(ct,{class:i?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Ft,{})]}),g!==void 0&&p!==void 0&&d("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[g,"/",p]}),d(ar,{error:c.text})]})},phone:kb,"multiple-choice":hb,boolean:jh,file:Rh,submit:Cb,address:Ah,number:mb},Db=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=P.current$.value.flow)==null?void 0:o.data.currentInput,a=he(null),i=()=>re.onInteractionFn$.value();return Te(()=>{var s;(s=a.current)==null||s.scrollTo({top:0})},[n]),d("div",{ref:a,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:d("div",{class:"flex flex-col",onPointerDownCapture:n?i:void 0,onKeyDownCapture:n?i:void 0,children:n?(()=>{const s=Tb[n.type];return d(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:re.onSubmitSuccessFn$.value,input:n})})():d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:ir({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),d(Ft,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function jb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mb=function(e){return e instanceof RegExp},Ob=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Fl=function(e){return typeof e=="string"},Lb=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Fb(e,t,r){var n=0,a=0;if(e==="")return e;if(!e||!Fl(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=t;Mb(i)||(i=new RegExp("("+Ob(i)+")","gi"));for(var o=e.split(i),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}a=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=a}return o}var Nb=function(t,r,n){return Array.isArray(t)||(t=[t]),Lb(t.map(function(a){return Fl(a)?Fb(a,r,n):a}))};const Tr=jb(Nb),Rb=/(\[[^\]]+\]\([^)]+\))/g,Pb=/\[([^\]]+)\]\(([^)]+)\)/,Vb=/(https?:\/\/[^\s]+)/g,Bb=/_(.*?)_/g,zb=/\*\*(.*?)\*\*/g,Ub=/(\\n|\n)/g,Nl="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",qb=e=>{const t=Tr(e,Rb,(s,l)=>{const[,c,f]=s.match(Pb)??[];return f?d("a",{class:Nl,href:f,children:c??f},f+l):d("span",{children:"INVALID LINK"})}),r=Tr(t,Vb,(s,l)=>d("a",{class:Nl,href:s,children:s},s+l)),n=Tr(r,Bb,(s,l)=>d("em",{children:s},s+l)),a=Tr(n,zb,(s,l)=>d("strong",{children:s},s+l));let i=0;return Tr(a,Ub,()=>d("br",{},`br-${i++}`))},Hb=Mt("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Wb=({children:e,className:t,animate:r,side:n,...a})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Hb({className:t,side:n,animate:r}),...a,children:e}),Rl=new Map,Pl=tf({overrides:{},locale:void 0}),Kb=(e,t)=>{const r=t==null?void 0:t.trim();if(!r)return e("job_alerts_privacy");const n=e("job_alerts_privacy_sender",{employer:r});return e("job_alerts_privacy")!==Pl("job_alerts_privacy")&&n===Pl("job_alerts_privacy_sender",{employer:r})?e("job_alerts_privacy"):n},Gb=({flow:e,rpcClient:t})=>{const{t:r}=oe(),n=e.data.flowSessionId,a=Rl.get(n)??Le("offer");Rl.set(n,a);const i=l=>{const c=e.data.submissions[l];return(c==null?void 0:c.type)==="string"?c.value.trim():void 0},o=i("email")||e.nodes.flatMap(l=>l.type==="question-text"&&l.data.format==="email"?[i(l.data.key)]:[]).find(l=>!!l);if(!o||a.value==="declined")return null;if(a.value==="success")return d("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(a.value!=="offer"&&a.value!=="error")){a.value="saving";try{await Du(t,{contact:{email:o,first_name:i("first_name"),last_name:i("last_name")},job:e.job}),a.value="success"}catch{a.value="error"}}};return d("div",{class:"bg-neutral-2 flex flex-col gap-2 rounded-xl p-3 text-sm",children:[d("p",{children:r("job_alerts_offer",{email:o})}),a.value==="error"?d("p",{role:"alert",children:r("job_alerts_error")}):null,d("div",{class:"flex gap-2",children:[d("button",{type:"button",class:"bg-accent-9 min-h-[44px] rounded-lg px-3 py-2 text-white",disabled:a.value==="saving",onClick:s,children:r("job_alerts_accept")}),d("button",{type:"button",class:"min-h-[44px] rounded-lg px-3 py-2",disabled:a.value==="saving",onClick:()=>{a.value!=="offer"&&a.value!=="error"||(a.value="declined")},children:r("job_alerts_decline")})]}),d("p",{class:"text-xs",children:Kb(r,e.employer)})]})},Yb=({message:e})=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Jb=({className:e,...t})=>d("div",{"aria-hidden":!0,children:re.isBotTyping$.value===!0?d("div",{"data-testid":"typing-indicator",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0}),Zb={bot:"left",user:"right"},Xb=Mt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-11",warning:"text-system-warning",error:"text-error-11",success:"text-system-success"}}}),Qb=({env:e,lastSentMessageFooter:t,rpcClient:r})=>{const{t:n}=oe(),a=P.current$.value.flow,i=(a==null?void 0:a.data.messages)??[],o=i.findIndex(l=>l.type==="system"&&l.semantic==="submission-closed"),s=a?Fa(a):void 0;return d("ol",{"aria-label":n("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[i.map((l,c)=>d(ie,{children:[d("li",{class:"flex",tabIndex:c===i.length-1?-1:void 0,children:[s&&l.groupId===s&&!i.slice(c+1).some(f=>f.groupId===s)?t:null,rn(l).with({type:"system"},f=>d("p",{class:Xb({variant:f.variant}),children:f.text})).with({type:"text",author:jt.union("bot","user")},f=>{const u=c===i.length-1,b=f.author==="bot"?qb(f.text):f.text;return d(ie,{children:d(Wb,{animate:u,side:Zb[f.author],children:b},c)})}).with({type:"link"},f=>d(Yb,{message:f})).with({type:"image"},f=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:f.url,style:{aspectRatio:f.width/f.height}})).with({type:"file"},f=>d(Oh,{class:f.author==="bot"?void 0:"ml-auto",file:{name:f.fileName,sizeKb:f.fileSizeKb}})).with({type:"loading"},f=>{const u=i[i.length-1];return!(f===u)||re.isBotTyping$.value||a!=null&&a.data.isFinished?null:d("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[d(ln,{"aria-hidden":f.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),f.text?d("p",{role:"status",class:"text-neutral-11 text-sm",children:f.text}):null]})}).exhaustive()]}),c===o&&(a!=null&&a.jobAlerts)&&r?d("li",{children:d(Gb,{flow:a,rpcClient:r},a.data.flowSessionId)}):null]},c)),e&&e!=="production"&&(a==null?void 0:a.data.isFinished)&&a.data.stagingDestination&&d("li",{class:"text-neutral-11 text-center text-xs",children:a.data.stagingDestination}),d("li",{class:re.captchaVisible$.value?"flex":"hidden",children:d("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":n("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),d(Jb,{},"typing")]})},eg=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:a,env:i})=>{const{flow:o}=P.current$.value;ot(o,"Flow is required to exist to show chatbot body");const s=P.viewState$.value,{chatRef:l,chatService:c}=Wf(),{t:f}=oe(),[u,b]=ze();return Te(()=>{s==="maximised"&&re.scrollToEnd()},[s]),Te(()=>{var A;const{state:p,flow:g}=P.current$.peek();if(p!=="loaded")throw new Error(f("invalid_state"));let v=g.data.nodeHistory.at(-1);if(re.scrollToEnd(),P.setInput(void 0),g.data.isFinished)return;const x=()=>{const S=P.current$.peek().flow;!S||S.data.hasInteracted||(P.markAsInteracted(),Ps(n,S,"FLOW_INTERACT"))};re.onInteractionFn$.value=x,v===void 0?(v=Ls(o.nodes).id,P.setCurrentNodeId(v),Ps(n,g,"FLOW_START")):P.removeMessagesSentByNodeIds([v,Pa]);const{interpret:C,abort:_,undo:M}=Rp({context:o.context,analytics:{service:n,customProperties:(A=o.analytics)==null?void 0:A.customProperties},apiClient:t,logger:e,talentBankClient:a,flow:o,chatService:c,t:f,getApplicationRecovery:()=>{var S;return(S=P.current$.peek().flow)==null?void 0:S.data.applicationRecovery},setApplicationRecovery:P.setApplicationRecovery,persistWriteBarrier:()=>P.persistWriteBarrier(g),getSubmissions:()=>{var S;return(S=P.current$.peek().flow)==null?void 0:S.data.submissions},onInterpret:S=>P.setCurrentNodeId(S.id),onFlowEnd:async()=>{var k;P.markAsFinished();const S=P.current$.peek().flow;ot(S),n.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:S.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(k=o.analytics)==null?void 0:k.customProperties})}}),j=v,D=()=>{b(()=>M),C(j)},z=new AbortController;return g.offerResume?dh({chatService:c,t:f,signal:z.signal}).then(S=>(P.settleResume(g),S?D():(P.restart(),Fe.flushStateData()))).catch(S=>{S instanceof ht||e.error("Resume prompt failed",S)}):D(),()=>{z.abort(),re.onInteractionFn$.value===x&&(re.onInteractionFn$.value=()=>{}),_()}},[n,t,c,e,o,a,f]),d(ie,{children:[d("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[d("div",{ref:l,role:"region","aria-label":f("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:d(Qb,{env:i,rpcClient:r,lastSentMessageFooter:!Fa(o)||!u?null:d(tg,{undoFn:u})})}),re.isReadingHistory$.value&&!o.data.isFinished&&!re.isBotTyping$.value&&d("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:d(xr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var g,v;re.scrollToEnd(),(v=((g=l.current)==null?void 0:g.querySelector('li[tabindex="-1"]'))??l.current)==null||v.focus({preventScroll:!0})},children:d(ws,{})})})]}),d(Db,{logger:e,analytics:n,rpcClient:r})]})},tg=({undoFn:e})=>{const{t}=oe();return d("div",{class:"flex flex-1 items-center justify-end px-1",children:d(xr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=P.current$.peek();ot(r),e(r.data.nodeHistory)},children:d("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},rg=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:eg},Symbol.toStringTag,{value:"Module"}))})();
|