1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="53e2861e-4826-4dbe-8f21-a8023489c420",e._sentryDebugIdIdentifier="sentry-dbid-53e2861e-4826-4dbe-8f21-a8023489c420")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1556,1735,4455,4459,9153],{10696:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/job/apply/wizard/file-upload/[id]",function(){return i(66638)}])},13880:(e,t,i)=>{"use strict";i.d(t,{A:()=>l,m:()=>n});var r=i(37876);i(14232);let a=e=>"currentColor"===e?"":`var(--color-${e})`,s=({title:e,theme:t=null,titleId:i="",...a})=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"1em",height:"1em","aria-labelledby":i,...a,children:[e?(0,r.jsx)("title",{id:i,children:e}):null,(0,r.jsx)("path",{d:"M32 2a30 30 0 1 0 30 30A30.034 30.034 0 0 0 32 2Zm4.576 47.367A18.587 18.587 0 0 1 30.613 51a3.942 3.942 0 0 1-2.969-1.028 4.036 4.036 0 0 1-.891-3.727c.347-2.184 2.671-10.488 3.318-13.944.177-.942.4-2.851-.271-3.529-.856-.857-3.515-.294-4.68.012l.371-1.583a17.893 17.893 0 0 1 5.886-1.707 3.9 3.9 0 0 1 2.943.966 4.385 4.385 0 0 1 .816 3.814c-.128.992-.035.486-2.926 12.061-.4 1.589-1.146 4.39.015 5.35 1.144.947 4.045.35 4.721.1ZM35 19a3 3 0 1 1 3-3 3 3 0 0 1-3 3Z",className:"info_svg__nc-icon-wrapper"})]}),n=({color:e="currentColor",title:t,fill:i,...n})=>(0,r.jsx)(s,{color:a(e),className:"currentColor"===e?"icon-current-color":"",..."currentColor"!==e?{style:{color:a(e),fill:a(e)}}:null,fill:i??a(e),title:t,...n}),l=n},21179:(e,t,i)=>{"use strict";i.d(t,{R:()=>l});var r=i(37876);i(14232);var a=i(54802),s=i.n(a),n=i(71326);function l({content:e,children:t=null}){return(0,r.jsxs)("div",{className:s().formDescription,children:[e&&(0,r.jsx)(n.B,{format:"full_html",content:e}),t]})}},28099:e=>{e.exports={formLabel:"formLabel_formLabel__Bf7rz",required:"formLabel_required__EtFG5",error:"formLabel_error__FVj8T"}},34952:(e,t,i)=>{"use strict";i.d(t,{A:()=>m,P:()=>p});var r=i(37876),a=i(14232),s=i(10582),n=i(35581),l=i(47562),o=i(78805),d=i(91098);i(85202);var u=i(66742),c=i.n(u);let p=a.forwardRef(({id:e,content:t="",placeholder:u="",onChange:p,onBlur:m,onFocus:f,rows:j=3,maxLength:h},v)=>{var g;let x=(0,a.useContext)(l.Rs),{locale:b}=(0,a.useContext)(s.B),{USER:_}=(0,n.WV)(),[y,A]=(0,a.useState)(null),{CKEditor:k,ClassicEditor:w}=y||{},S=(0,a.useMemo)(()=>"en"===b?"en-gb":"es-419"===b?"es":b,[b]);(0,a.useEffect)(()=>{let e=!0;return Promise.all([i.e(1804).then(i.bind(i,31804)),Promise.all([i.e(8882),i.e(4799),i.e(1384),i.e(4955),i.e(3869),i.e(629),i.e(7273),i.e(8220),i.e(9549)]).then(i.bind(i,49897)),i(36388)(`./${S}.js`).catch(()=>(e&&console.error(`CKEditor does not support ${b} language config.`),null))]).then(([t,i,r])=>{e&&A({CKEditor:t.CKEditor,ClassicEditor:i.ClassicEditor,plugins:[i.Autoformat,i.BlockQuote,i.Bold,i.Essentials,i.Heading,i.Indent,i.Italic,i.Link,i.List,i.MediaEmbed,i.Paragraph,i.PasteFromOffice,i.Table,i.TableToolbar],translations:r?.default})}).catch(t=>{e&&console.error("Failed to load CKEditor.",t)}),()=>{e=!1}},[b,S]),(0,a.useEffect)(()=>{document.documentElement.style.setProperty("--ck-editor-rows",j.toString())},[j]);let I=(g=x.user,g?(0,o.vT)(g)||(0,o.Gv)(g)?_.APPLICANT.editor:(0,o.Gv)(g)?_.RECRUITER.editor:(0,o.qc)(g)?_.ADMIN.editor:null:_.ANON.editor),C=(0,a.useMemo)(()=>({...I,licenseKey:"GPL",plugins:y?.plugins||[],ui:{height:"300px",viewportOffset:{top:0}},toolbar:{items:I.toolbar},language:S,...y?.translations?{translations:y.translations}:{},placeholder:u}),[I,y,S,u]);return(0,r.jsx)("div",{className:c().editorWrapper,children:k&&w?(0,r.jsx)(k,{ref:v,editor:w,onReady:e=>{window.CKEDITOR=e},data:t,config:C,onChange:p,onBlur:m,onFocus:f},e):(0,r.jsx)(d.T,{rows:j,disabled:!0,maxLength:h},e)})}),m=p},35856:(e,t,i)=>{"use strict";function r(e,t){let i=(e,t)=>t&&e&&Array.isArray(t)?t.includes(e):void 0!==e&&void 0!==t&&(e===t||null===e&&null===t);return i(e,t)||i(e?.tid?.toString(),t?.tid)||i(e?.parent?.tid?.toString(),t?.tid)||i(e?.name,t?.name)||i(e?.parent?.name,t?.name)||i(e?.label,t?.name)||i(e?.parent?.label,t?.name)}i.d(t,{bA:()=>s});let a=(e,t,i,a)=>
1{if(i?.[t]?.[e]){for(let s in i?.[t]?.[e])if(Array.isArray(a[s])){if(JSON.stringify(a[s])===JSON.stringify(i?.[t]?.[e][s]))return!0;for(let n of a[s])if(r(n,i?.[t]?.[e][s]))return!0}else if(r(a[s],i?.[t]?.[e][s]))return!0}return!1};function s(e,t,i){let s,n=a("hidden",e,i,t),l=a("disabled",e,i,t);return{hidden:n,disabled:l,required:a("required",e,i,t),hideSubTreeElements:(s=[],i?.[e]?.hideTerms&&i[e].hideTerms.forEach(({terms:e,rule:i})=>{for(let a in i)if(t[a])if(Array.isArray(t[a]))for(let n of t[a])r(n,i[a])&&(s=[...s,...e]);else r(t[a],i[a])&&(s=[...s,...e])}),s.length>0?s:null)}}},36388:(e,t,i)=>{var r={"./af.js":[12716,2716],"./af.umd.js":[94132,4132],"./ar.js":[25624,5624],"./ar.umd.js":[62992,2992],"./ast.js":[42793,2793],"./ast.umd.js":[55189,5189],"./az.js":[79072,9072],"./az.umd.js":[38456,8456],"./be.js":[61510,1510],"./be.umd.js":[82754,2754],"./bg.js":[80260,260],"./bg.umd.js":[56844,6844],"./bn.js":[59263,9263],"./bn.umd.js":[25551,5551],"./bs.js":[70064,64],"./bs.umd.js":[78408,8408],"./ca.js":[8727,8727],"./ca.umd.js":[99911,9911],"./cs.js":[22305,2305],"./cs.umd.js":[96589,6589],"./da.js":[50676,676],"./da.umd.js":[93148,3148],"./de-ch.js":[14884,4884],"./de-ch.umd.js":[72460,2460],"./de.js":[91984,1984],"./de.umd.js":[12712,2712],"./el.js":[44186,4186],"./el.umd.js":[74662,4662],"./en-au.js":[5673,5673],"./en-au.umd.js":[46101,6101],"./en-gb.js":[52466,2466],"./en-gb.umd.js":[27742,7742],"./en.js":[94840,4840],"./en.umd.js":[59440,9440],"./eo.js":[28043,8043],"./eo.umd.js":[667,667],"./es-co.js":[49188,9188],"./es-co.umd.js":[78828,8828],"./es.js":[76535,6535],"./es.umd.js":[64615,4615],"./et.js":[75826,5826],"./et.umd.js":[31774,1774],"./eu.js":[39549,1930],"./eu.umd.js":[78057,8057],"./fa.js":[22974,2974],"./fa.umd.js":[8890,8890],"./fi.js":[52614,2614],"./fi.umd.js":[92706,2706],"./fr.js":[42031,2031],"./fr.umd.js":[1663,1663],"./gl.js":[75868,5868],"./gl.umd.js":[77508,7508],"./gu.js":[44471,4471],"./gu.umd.js":[96679,6679],"./he.js":[80132,132],"./he.umd.js":[10604,604],"./hi.js":[23576,3576],"./hi.umd.js":[56080,6080],"./hr.js":[30973,973],"./hr.umd.js":[6057,6057],"./hu.js":[53140,3140],"./hu.umd.js":[77404,7404],"./hy.js":[75912,3531],"./hy.umd.js":[98816,8816],"./id.js":[32470,2470],"./id.umd.js":[13682,3682],"./it.js":[55302,5302],"./it.umd.js":[78914,8914],"./ja.js":[35626,5626],"./ja.umd.js":[58390,8390],"./jv.js":[54495,4495],"./jv.umd.js":[20975,975],"./kk.js":[96289,6289],"./kk.umd.js":[54490,2109],"./km.js":[85651,5651],"./km.umd.js":[42435,2435],"./kn.js":[37026,7026],"./kn.umd.js":[3438,3438],"./ko.js":[85325,5325],"./ko.umd.js":[21049,1049],"./ku.js":[41243,1243],"./ku.umd.js":[92587,2587],"./lt.js":[99611,9611],"./lt.umd.js":[38123,8123],"./lv.js":[87669,7669],"./lv.umd.js":[85953,5953],"./ms.js":[52447,2447],"./ms.umd.js":[97711,7711],"./nb.js":[59783,9783],"./nb.umd.js":[46647,6647],"./ne.js":[36578,6578],"./ne.umd.js":[66254,6254],"./nl.js":[27493,7493],"./nl.umd.js":[79281,9281],"./no.js":[55256,5256],"./no.umd.js":[6576,6576],"./oc.js":[11637,1637],"./oc.umd.js":[43521,3521],"./pl.js":[64343,4343],"./pl.umd.js":[40423,423],"./pt-br.js":[21990,1990],"./pt-br.umd.js":[74402,4402],"./pt.js":[73759,3759],"./pt.umd.js":[24079,4079],"./ro.js":[32588,2588],"./ro.umd.js":[21524,1524],"./ru.js":[96454,6454],"./ru.umd.js":[77666,7666],"./si.js":[17247,7247],"./si.umd.js":[71631,1631],"./sk.js":[21497,1497],"./sk.umd.js":[47621,7621],"./sl.js":[21528,1528],"./sl.umd.js":[32816,2816],"./sq.js":[37527,7527],"./sq.umd.js":[76871,6871],"./sr-latn.js":[13860,3860],"./sr-latn.umd.js":[28108,8108],"./sr.js":[34166,4166],"./sr.umd.js":[82098,2098],"./sv.js":[27602,7602],"./sv.umd.js":[92926,2926],"./th.js":[50399,399],"./th.umd.js":[90799,799],"./ti.js":[11996,1996],"./ti.umd.js":[58180,8180],"./tk.js":[80414,414],"./tk.umd.js":[85946,5946],"./tr.js":[77745,7745],"./tr.umd.js":[70141,141],"./tt.js":[41827,1827],"./tt.umd.js":[58995,8995],"./ug.js":[90211,211],"./ug.umd.js":[88787,8787],"./uk.js":[83823,3823],"./uk.umd.js":[79711,9711],"./ur.js":[4,4],"./ur.umd.js":[54348,4348],"./uz.js":[62428,2428],"./uz.umd.js":[38884,8884],"./vi.js":[63414,3414],"./vi.umd.js":[58610,8610],"./zh-cn.js":[43729,3729],"./zh-cn.umd.js":[82269,2269],"./zh.js":[24717,4717],"./zh.umd.js":[70553,553]};function a(e){if(!i.o(r,e))return Promise.resolve().then(()=>{var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=r[e],a=t[0];return i.e(t[1]).then(()=>i(a))}a.keys=()=>Object.keys(r),a.id=36388,e.exports=a},38110:e=>{var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getJobApplicationConfig"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"entityDefinition"},arguments:[{kind:"Argument",name:{kind:"Name",value:"bundle"},value:{kind:"StringValue",value:"job_application",block:!1}},{kind:"Argument",name:{kind:"Name",value:"entity_type"},value:{kind:"StringValue",value:"node",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxNumItems"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:153}};t.loc.source={body:'query getJobApplicationConfig {\n entityDefinition(bundle: "job_application", entity_type: "node") {\n fields {\n id\n maxNumItems\n }\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var i=0;i<e.definitions.length;i++){var r=e.definitions[i];if(r.name&&r.name.value==t)return r}}t.definitions.forEach(function(e){if(e.name){var t=new Set;!function e(t,i){if("FragmentSpread"===t.kind)i.add(t.name.value);
1else if("VariableDefinition"===t.kind){var r=t.type;"NamedType"===r.kind&&i.add(r.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(t){e(t,i)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(t){e(t,i)}),t.definitions&&t.definitions.forEach(function(t){e(t,i)})}(e,t),i[e.name.value]=t}}),e.exports=t,e.exports.getJobApplicationConfig=function(e,t){var a={kind:e.kind,definitions:[r(e,t)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var s=i[t]||new Set,n=new Set,l=new Set;for(s.forEach(function(e){l.add(e)});l.size>0;){var o=l;l=new Set,o.forEach(function(e){n.has(e)||(n.add(e),(i[e]||new Set).forEach(function(e){l.add(e)}))})}return n.forEach(function(t){var i=r(e,t);i&&a.definitions.push(i)}),a}(t,"getJobApplicationConfig")},38713:e=>{e.exports={inputIcon:"textarea_inputIcon__DX2s2",inputWrapper:"textarea_inputWrapper__NUcxM",iconStart:"textarea_iconStart__ms5Xd",iconEnd:"textarea_iconEnd__uCDcG",jclInputClear:"textarea_jclInputClear__vxe1c",input:"textarea_input__HU2QO",inputError:"textarea_inputError__gpSWx",inputIconEnd:"textarea_inputIconEnd__lPSfe",inputIconStart:"textarea_inputIconStart__5HyZa",textarea:"textarea_textarea__OXKs9"}},39994:e=>{e.exports={wrapper:"styles_wrapper__xOKys",multiple:"styles_multiple__TfVLg",previewIcon:"styles_previewIcon__95zCO",preview:"styles_preview__rgVIv",boxFilePreviewWrapper:"styles_boxFilePreviewWrapper__5QugD",filePreviewWrapper:"styles_filePreviewWrapper__hKEpB",imagePreviewInfoLabel:"styles_imagePreviewInfoLabel__LT4yF",previewInfo:"styles_previewInfo__oTFXj",imagePreviewWrapper:"styles_imagePreviewWrapper__vQHDo",removeFileButton:"styles_removeFileButton__oMGJ_",fileWidgetInput:"styles_fileWidgetInput__LytL9"}},42576:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(31167),a=i(38110),s=i.n(a);let n=function(e){let{data:t}=(0,r.I)(s()),i=t?.entityDefinition.fields??[];return e?e.map(e=>i.find(t=>t.id===e)):i}},43220:e=>{e.exports={formItem:"formItem_formItem__cwsfG"}},45062:(e,t,i)=>{"use strict";i.d(t,{A:()=>d,l:()=>o});var r=i(37876);i(14232);var a=i(17175),s=i(28099),n=i.n(s);let l=(0,a.F)([n().formLabel],{variants:{required:{true:n().required},error:{true:n().error}}}),o=({children:e,error:t,required:i,...a})=>(0,r.jsx)("label",{className:l({error:t,required:i}),...a,children:e}),d=o},54802:e=>{e.exports={formDescription:"formDescription_formDescription__tkpcZ"}},57738:(e,t,i)=>{"use strict";i.d(t,{A:()=>l,e:()=>n});var r=i(37876);i(14232);var a=i(43220),s=i.n(a);let n=({children:e})=>(0,r.jsx)("div",{className:s().formItem,children:e}),l=n},64560:(e,t,i)=>{"use strict";i.d(t,{A:()=>l,s:()=>n});var r=i(37876);i(14232);let a=e=>"currentColor"===e?"":`var(--color-${e})`,s=({title:e,theme:t=null,titleId:i="",...a})=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",xmlSpace:"preserve",width:"1em",height:"1em","aria-labelledby":i,...a,children:[e?(0,r.jsx)("title",{id:i,children:e}):null,(0,r.jsxs)("g",{className:"download_svg__nc-icon-wrapper",children:[(0,r.jsx)("path",{d:"m62.906 37.587.003-.003L52.82 16.173A1.998 1.998 0 0 0 51 15h-9v4h7.712l8.637 18H42v7a2 2 0 0 1-2 2H24a2 2 0 0 1-2-2v-7H5.652l8.637-18H22v-4h-9c-.784 0-1.496.458-1.82 1.173L1.091 37.584l.003.003A.988.988 0 0 0 1 38v19a3 3 0 0 0 3 3h56a3 3 0 0 0 3-3V38a.988.988 0 0 0-.094-.413z"}),(0,r.jsx)("path",{"data-color":"color-2",d:"M31.226 35.633a1 1 0 0 0 1.548 0l9-11A1 1 0 0 0 41 23h-8V4a1 1 0 1 0-2 0v19h-8a1 1 0 0 0-.774 1.633l9 11z"})]})]}),n=({color:e="currentColor",title:t,fill:i,...n})=>(0,r.jsx)(s,{color:a(e),className:"currentColor"===e?"icon-current-color":"",..."currentColor"!==e?{style:{color:a(e),fill:a(e)}}:null,fill:i??a(e),title:t,...n}),l=n},66638:(e,t,i)=>{"use strict";i.r(t),i.d(t,{__N_SSP:()=>G,default:()=>K});var r=i(37876),a=i(14232),s=i(47562),n=i(11744),l=i(89099),o=i.n(l),d=i(63424),u=i(10711),c=i(65656),p=i(7785),m=i(15105),f=i(66386),j=i(62864),h=i(77742),v=i(61074),g=i(72201),x=i(42576),b=i(45062),_=i(8733),y=i(34952),A=i(91267),k=i(57738),w=i(76421),S=i(97973);let I="attachments";function C({methods:e,attachmentsRequired:t=!0,showCoverLetter:i=!0,showAttachment:s=!0,attachments:n}){let l=(0,h.A)(),{control:o,setValue:d,getValues:u}=e,{defaultValues:p,handleRemoveExistingFile:m}=(0,S.C)(n?.map(e=>
1e?.url).filter(Boolean),!0);return(0,a.useEffect)(()=>{let e=u(I)??[];d(I,Array.from(new Set((e=e.filter(e=>e instanceof File||!n?.some(t=>t?.url===e))).concat(p))),{shouldValidate:!1})},[p,n]),(0,r.jsxs)(r.Fragment,{children:[i&&(0,r.jsx)(f.xI,{control:o,name:"coverLetter",render:({field:e,fieldState:{error:t}})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(k.e,{children:[(0,r.jsx)(b.l,{required:!0,children:(0,r.jsx)(_.A,{id:"cover_letter",defaultMessage:"Cover letter"})}),(0,r.jsx)(y.A,{id:e.name,rows:10,...e,onChange:(t,i)=>{d(e.name,i.getData(),{shouldValidate:!0})},content:e.value?e.value:""})]}),t&&(0,r.jsx)(w.W,{message:t.message})]})}),s&&(0,r.jsx)(f.xI,{control:o,name:I,render:({field:e,fieldState:{error:i}})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(A.z,{...e,required:t,id:e.name,error:!!i,multiple:!0,label:l.formatMessage({id:"job_application_attachments_placeholder",defaultMessage:"Upload attachments"}),placeholder:l.formatMessage({id:"job_application_attachments_placeholder",defaultMessage:"Upload attachments"}),description:l.formatMessage({id:"job_application_attachments_description",defaultMessage:`Choose from your computer or drag and drop attachments here. 2 Allowed files are .pdf, .doc, .docx and .txt files.`}),fileTypes:[".doc",".docx",".pdf",".txt"],onChange:()=>{},onAdd:t=>{d(e.name,[...e.value??[],...t],{shouldValidate:!0})},onRemove:t=>{d(e.name,e.value.filter(e=>e.name!==t.name),{shouldValidate:!0})},defaultViewFileLabel:l.formatMessage({id:"view_file_btn_text",defaultMessage:"View file"}),defaultFiles:p,onRemoveExistingFile:m}),i&&(0,r.jsx)(w.W,{message:i.message})]})}),(0,r.jsx)(c.K,{})]})}function N({jobApplication:e,step:t,onSubmit:i,ErrorList:a,mutationSubmitting:s}){let n=(0,h.A)(),l=(0,x.A)(["field_job_application_attachment"])[0]?.maxNumItems,o=(0,f.mN)({mode:"onChange",defaultValues:{...e?.job?.applicationRequireCoverLetter&&{coverLetter:e.coverLetter}},resolver:(0,v.t)(j.object().shape({...e?.job?.applicationRequireCoverLetter&&{coverLetter:j.string().required(n.formatMessage({id:"cover_letter_required",defaultMessage:"Cover letter is required"}))},...e?.job?.applicationRequireCv&&{attachments:(0,g.getYupMultipleFilesValidation)(j,n,"5 MB",l,!0)}}))}),{trigger:b,formState:{isSubmitting:_}}=o;return(0,r.jsxs)(d.I,{size:"large",Steps:(0,r.jsx)(u.A,{job:e.job}),children:[(0,r.jsx)("h1",{children:t.title}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.A,{}),a,(0,r.jsx)(c.A,{})]}),e?.job&&(0,r.jsxs)(p.A,{job:e?.job,children:[(0,r.jsx)(f.Op,{...o,children:(0,r.jsx)(C,{showAttachment:e?.job?.applicationRequireCv??!0,showCoverLetter:e?.job?.applicationRequireCoverLetter??!0,attachmentsRequired:!0,methods:o,attachments:e?.job?.applicationRequireCv?e?.attachments:void 0})}),(0,r.jsx)(c.A,{size:"large"}),(0,r.jsx)(m.A,{job:e.job,disabled:_||s,orientation:"left",onSubmit:()=>{b().then(e=>{e&&i({...o.getValues()})})}})]}),(0,r.jsx)(c.A,{})]})}var E=i(31167),F=i(64177),L=i(97620),z=i.n(L),M=i(53248),D=i(80841),q=i(94911),P=i(53988),R=i(70699),V=i(49513),T=i(37232),U=i(88772),W=i(75913),O=i(63200),B=i(17163),J=i(35581);function $({jobApplicationId:e}){let t=null,{JOBS:i}=(0,J.WV)(),{getConfigByName:d}=(0,W.UK)(),u=!!d("job_application_data_deletion.status")?.value[0],c=(0,O.o)(),p=(0,h.A)(),m=(0,l.useRouter)(),{data:f,error:j}=(0,E.I)((0,T.w)(u,i.ANALYTICS.SOURCE_ENABLED),{variables:{id:e,anonymousUserToken:(0,P.So)()},ssr:!1,skip:!e,fetchPolicy:"no-cache",onCompleted:e=>{(0,B.I)(e,p,c,m)}}),v=f?.jobApplicationById?.content,g=(0,q.R)(v?.job),x=(0,a.useContext)(s.Rs),{currentStep:b}=(0,n.A)(v?.job);(0,n.R)(g,b,v?.job?.id,v?.id);let[y,{data:A,error:k,loading:w}]=(0,F.n)(z());j&&(t=(0,r.jsx)(D.s,{alertStyle:"danger",type:"assertive",children:(0,r.jsx)(_.A,{id:"job_application_success_load_error",defaultMessage:"Error getting this job application."})})),f?.jobApplicationById?.errors?.length>0&&(t=(0,r.jsx)(M.k,{errors:f?.jobApplicationById?.errors})),A&&A.updateJobApplicationUpload&&A.updateJobApplicationUpload.errors&&A.updateJobApplicationUpload.errors.length>0&&(t=(0,r.jsx)(M.k,{errors:A.updateJobApplicationUpload.errors})),k&&(t=(0,r.jsx)(D.s,{alertStyle:"danger",type:"assertive",children:(0,r.jsx)(_.A,{id:"job_application_quick_apply_update_files_error",defaultMessage:"There was an error updating your job application."})}));let S=v?.job?(0,U.V)(v.job,x.user):void 0;return(0,R.O)(v?.id,V.qY.QA_FILE_UPLOAD_PAGE_VIEW,S),v?.job?(0,r.jsx)(N,{jobApplication:v,user:x.user,step:g[b],ErrorList:t,mutationSubmitting:w,onSubmit:e=>{e.anonymousUserToken=(0,P.So)(),y({variables:{applicationId:v.id,data:e}}).then(e=>{e?.data?.updateJobApplicationUpload?.errors?.length||o().push({pathname:g[b+1].page,query:{id:v?.id}})})}}):null}var G=!0;let K=({jobApplicationId:e})=>(0,r.jsx)($,{jobApplicationId:e})},66742:e=>{e.exports={editorWrapper:"wysiwyg_editorWrapper__meioL"}},72201:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>j,getFileTypeCorrectNames:()=>m,getYupMultipleFilesValidation:()=>f});var r=i(37876),a=i(14232),s=i(77742),n=i(66386),l=i(81068),o=i(91267),d=i(76421),u=i(62478),c=i(97973),p=i(35856);let m=e=>e.map(e=>`.${e}`);function f(e,t,i="",r=null,a=!1){let s=e.mixed();if(a)try{s=s.test("required",(0,u.w)().FIELD_REQUIRED,e=>e?.length!==0&&null!=e)}catch(e){}if(i)try{s=s.test("fileSize",t.formatMessage({id:"files_upload_size_exceeded_msg",defaultMessage:"Maximum upload size is {maxUploadSize}"},{maxUploadSize:i}),e=>{let t=1024*Number(i.split(" ").shift())*1024;return!(e&&(Array.isArray(e)?e:[e]).reduce((e,t)=>
2e+t.size,0)>t)&&!0})}catch(e){console.error(`Error while extracting MB size from argument: ${i}`,e)}return r&&r>0&&(s=s.test("filesNumber",t.formatMessage({id:"multiple_files_upload_files_number_exceeded_msg",defaultMessage:"Too many files selected: Attach up to {filesAmountLimit} files"},{filesAmountLimit:r}),e=>!(e&&Array.isArray(e))||e.length<=r)),s}let j=({entityField:e,fieldRules:t={},value:i,...u})=>{let f=(0,s.A)(),{control:j,setValue:h,getValues:v,formState:{isSubmitted:g,touchedFields:x}}=(0,n.xW)(),[b,_]=a.useState(!1),{defaultValues:y,handleRemoveExistingFile:A}=(0,c.C)(Array.isArray(i)?i?.map(e=>e?.url).filter(Boolean):i,e.multiple),k=v(),{hidden:w,disabled:S,required:I}=(0,p.bA)(e.id,k,t),C=(0,a.useMemo)(()=>(0,l.P)("file_extensions",e),[e.settings]),N=g||x[e.id];function E(t){h(e.id,t,{shouldValidate:!0})}return((0,a.useEffect)(()=>{let t=k[e.id],i=t??[];Array.isArray(i)?(E(Array.from(new Set([...i.filter(e=>(e.name||e.url)&&!y.some(t=>e.url?t===e.url:t===e)),...y]))),_(!1)):t instanceof File||E(y[0])},[y,e.id,b]),(0,a.useEffect)(()=>{w&&k[e.id]&&h(e.id,null)},[w,k,e]),w)?null:(0,r.jsx)(n.xI,{name:e.id,control:j,render:({field:t,fieldState:{error:i}})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.z,{...t,defaultFiles:y,id:t.name,type:e.type,required:e.required||I,disabled:e.disabled||S,error:!!i&&N,label:e.label,defaultViewFileLabel:f.formatMessage({id:"view_file_btn_text",defaultMessage:"View file"}),multiple:e.multiple,placeholder:f.formatMessage({id:"choose_file_btn_text",defaultMessage:"Upload"}),description:e.description,...C?{fileTypes:m(C.split(" "))}:null,...u,onAdd:i=>{_(!0),e.multiple?E([...t.value??[],...i]):(A(0),E(i[0]))},onRemove:i=>{e.multiple?E(t.value.filter(e=>e.name!==i.name)):E(null)},onRemoveExistingFile:A}),!!i&&N&&(0,r.jsx)(d.A,{message:i.message})]})})}},72864:(e,t,i)=>{"use strict";i.d(t,{A:()=>l,w:()=>n});var r=i(37876);i(14232);let a=e=>"currentColor"===e?"":`var(--color-${e})`,s=({title:e,theme:t=null,titleId:i="",...a})=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"1em",height:"1em","aria-labelledby":i,...a,children:[e?(0,r.jsx)("title",{id:i,children:e}):null,(0,r.jsxs)("g",{className:"job_per_file_svg__nc-icon-wrapper",children:[(0,r.jsx)("path",{"data-color":"color-2",d:"M45 1.586V13h11.414z"}),(0,r.jsx)("path",{d:"M44 15a1 1 0 0 1-1-1V1H9a2 2 0 0 0-2 2v58a2 2 0 0 0 2 2h46a2 2 0 0 0 2-2V15H44zm-4 18h-7v7a1 1 0 1 1-2 0v-7h-7a1 1 0 1 1 0-2h7v-7a1 1 0 1 1 2 0v7h7a1 1 0 1 1 0 2z"})]})]}),n=({color:e="currentColor",title:t,fill:i,...n})=>(0,r.jsx)(s,{color:a(e),className:"currentColor"===e?"icon-current-color":"",..."currentColor"!==e?{style:{color:a(e),fill:a(e)}}:null,fill:i??a(e),title:t,...n}),l=n},81068:(e,t,i)=>{"use strict";i.d(t,{G:()=>a,P:()=>r});let r=(e,t)=>{let i=t.settings.filter(t=>t.key===e);return i.length>0&&i[0].value?i[0].value:null},a=e=>{let t=r("form_settings",e);return t&&t.placeholder?t.placeholder:""}},85202:()=>{},91098:(e,t,i)=>{"use strict";i.d(t,{T:()=>d});var r=i(37876),a=i(57738),s=i(45062),n=i(21179);i(14232);var l=i(38713),o=i.n(l);let d=({label:e,id:t,description:i,rows:l=10,columns:d,disabled:u=!1,required:c=!1,error:p=!1,...m})=>e?(0,r.jsxs)(a.e,{children:[(0,r.jsx)(s.l,{htmlFor:t,error:p,required:c,children:e}),(0,r.jsx)("textarea",{className:o().textarea,id:t,rows:l,style:{borderColor:p?"var(--color-danger)":"var(--input-border-color)",opacity:u?.5:1},required:c,disabled:u,...m}),i&&(0,r.jsx)(n.R,{children:i})]}):(0,r.jsx)("textarea",{className:o().textarea,id:t,rows:l,style:{borderColor:p?"var(--color-danger)":"var(--input-border-color)",opacity:u?.5:1},required:c,disabled:u,...m})},91267:(e,t,i)=>{"use strict";i.d(t,{A:()=>b,z:()=>x});var r=i(37876),a=i(14232),s=i(12140),n=i(64560),l=i(13880),o=i(72864),d=i(3098),u=i(56897),c=i(65656),p=i(44319),m=i(92347),f=i(76421),j=i(45062),h=i(21179),v=i(39994),g=i.n(v);class x extends a.Component{constructor(e){super(e),this.state={files:[],errors:[]},this.handleClick=()=>{this.fileInput.current&&this.fileInput.current.click()},this.handleChange=e=>{let t=Array.from(e.target.files),{maxSizeMessage:i="File is too large"}=this.props;this.props.onAdd?.(t),this.setState({errors:t.filter(e=>this.props.maxSize&&e.size>1024*this.props.maxSize*1024).map(e=>`${e.name} : ${i}`),files:[...this.props.multiple?this.state.files:[],...t.filter(e=>!this.props.maxSize||this.props.maxSize&&e.size<=1024*this.props.maxSize*1024).map(e=>({file:"image"===e.type.substring(0,5)?URL.createObjectURL(e):null,originalFile:e,name:e.name,filename:e.name,fileSize:e.size}))]},()=>{this.props.multiple?(this.props.onChange&&this.props.onChange(t),!1===this.props.showSelection&&this.fileInput.current&&(this.fileInput.current.value="")):(this.props.onChange&&this.props.onChange(t[0]),!1==!this.props.showSelection&&this.fileInput.current&&(this.fileInput.current.value=""))})},this.removeFile=e=>{this.props.onRemove?.(this.state.files[e]),this.setState({files:this.state.files.filter((t,i)=>i!==e).map(e=>({file:e.file,originalFile:e.originalFile,name:e.filename,filename:e.filename,fileSize:e.fileSize}))},()=>{this.props.multiple?this.props.onChange&&this.props.onChange(this.state.files.map(e=>e.originalFile)):this.props.onChange&&this.props.onChange(this.state.files.map(e=>e.originalFile)),(!this.state.files||0===this.state.files.length)&&this.fileInput.current&&(this.fileInput.current.value="")}
2)},this.fileInput=a.createRef()}render(){let{label:e="File",placeholder:t="Choose file",defaultViewFileLabel:i="View file",id:a,description:v,fileTypes:x,error:b=!1,required:_=!1,disabled:y=!1,multiple:A=!1,buttonStyle:k="default",onClick:w,showSelection:S=!0,removeLabel:I="Remove file",defaultFiles:C=[],onRemoveExistingFile:N}=this.props;return(0,r.jsxs)(r.Fragment,{children:[e&&A&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j.A,{error:b,required:_,htmlFor:a,children:e}),(0,r.jsx)(c.A,{})]}),(0,r.jsxs)("div",{className:`${g().wrapper} ${A&&g().multiple}`,children:[A&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.A,{"aria-hidden":"true",height:"100px",width:"100px",color:"gray2"}),(0,r.jsx)(c.A,{})]}),(0,r.jsxs)(r.Fragment,{children:[e&&!A&&(0,r.jsx)(j.A,{error:b,required:_,htmlFor:a,children:e}),v&&A&&(0,r.jsx)(p.A,{tag:"p",color:"gray3",textAlign:"center",children:v}),(0,r.jsx)(c.A,{}),(0,r.jsx)(d.A,{children:(0,r.jsxs)("div",{children:[(0,r.jsx)("input",{className:g().fileWidgetInput,ref:this.fileInput,onChange:this.handleChange,type:"file",...x?{accept:x.join(", ")}:null,id:a,name:a,onClick:w,multiple:A,disabled:y,...!e&&{"aria-labelledby":`${a}-btn`}}),(0,r.jsx)(m.Ay,{onClick:this.handleClick,"data-testid":"trigger",buttonStyle:k,type:"button",id:`${a}-btn`,disabled:y,children:t})]})}),v&&!A&&(0,r.jsx)(h.R,{children:v}),S&&(0,r.jsx)(d.A,{flexWrap:"wrap",alignItems:"center",children:this.state.files.map((t,i)=>(0,r.jsx)(u.A,{margin:4,children:(0,r.jsxs)("div",{className:g().boxFilePreviewWrapper,children:[!y&&(0,r.jsx)("div",{className:g().removeFileButton,children:(0,r.jsx)("button",{type:"button",onClick:()=>this.removeFile(i),children:(0,r.jsx)(s.A,{title:I})})}),(0,r.jsxs)("div",{className:g().filePreviewWrapper,children:[(0,r.jsx)("div",{className:g().imagePreviewWrapper,children:(0,r.jsx)(o.A,{"aria-hidden":"true"})}),(0,r.jsx)("div",{className:g().previewInfo,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:g().imagePreviewInfoLabel,children:(0,r.jsx)("span",{className:g().previewIcon,...e&&{title:e}})}),(0,r.jsx)("div",{children:t.filename}),(t.fileSize/1e3).toFixed(2)," kB"]})})]})]})},i))}),C.length>0&&(0,r.jsx)(d.A,{flexWrap:"wrap",alignItems:"center",children:C.map((e,t)=>(0,r.jsx)(u.A,{margin:4,children:(0,r.jsxs)("div",{className:g().boxFilePreviewWrapper,children:[!y&&(0,r.jsx)("div",{className:g().removeFileButton,children:(0,r.jsx)("button",{type:"button",onClick:()=>N?.(t),children:(0,r.jsx)(s.A,{title:I})})}),(0,r.jsx)("div",{className:g().filePreviewWrapper,children:(0,r.jsxs)("div",{className:g().imagePreviewWrapper,children:[(0,r.jsx)(o.A,{"aria-hidden":"true",color:"gray4"}),(0,r.jsx)("div",{className:g().previewInfo,children:(0,r.jsx)("div",{children:(0,r.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:e.startsWith("http")?new URL(e)?.pathname.split("/").pop():i})})})]})})]})},t))}),this.state.errors&&this.state.errors.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)(c.A,{}),(0,r.jsxs)(d.A,{alignItems:"center",children:[(0,r.jsxs)(u.A,{marginRight:4,children:[(0,r.jsx)(l.A,{"aria-hidden":"true",color:"danger"})," "]}),(0,r.jsx)(f.A,{message:e})]})]}))]})]})]})}}let b=x},97620:e=>{var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateJobApplicationUpload"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"applicationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NamedType",name:{kind:"Name",value:"JobApplicationUploadInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateJobApplicationUpload"},arguments:[{kind:"Argument",name:{kind:"Name",value:"applicationId"},value:{kind:"Variable",name:{kind:"Name",value:"applicationId"}}},{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"JobApplication"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:260}};t.loc.source={body:"mutation updateJobApplicationUpload(\n $applicationId: Int!\n $data: JobApplicationUploadInput\n) {\n updateJobApplicationUpload(applicationId: $applicationId, data: $data) {\n errors\n content {\n ... on JobApplication {\n id\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var i=0;i<e.definitions.length;i++){var r=e.definitions[i];if(r.name&&r.name.value==t)return r}}t.definitions.forEach(function(e){if(e.name){var t=new Set;!function e(t,i){if("FragmentSpread"===t.kind)i.add(t.name.value);
2else if("VariableDefinition"===t.kind){var r=t.type;"NamedType"===r.kind&&i.add(r.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(t){e(t,i)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(t){e(t,i)}),t.definitions&&t.definitions.forEach(function(t){e(t,i)})}(e,t),i[e.name.value]=t}}),e.exports=t,e.exports.updateJobApplicationUpload=function(e,t){var a={kind:e.kind,definitions:[r(e,t)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var s=i[t]||new Set,n=new Set,l=new Set;for(s.forEach(function(e){l.add(e)});l.size>0;){var o=l;l=new Set,o.forEach(function(e){n.has(e)||(n.add(e),(i[e]||new Set).forEach(function(e){l.add(e)}))})}return n.forEach(function(t){var i=r(e,t);i&&a.definitions.push(i)}),a}(t,"updateJobApplicationUpload")},97973:(e,t,i)=>{"use strict";i.d(t,{C:()=>a});var r=i(14232);function a(e,t){let[i,a]=(0,r.useState)(e?Array.isArray(e)?e:[e]:[]);return{defaultValues:i,setDefaultValues:a,handleRemoveExistingFile:function(e){t?a(i.filter((t,i)=>i!==e)):a([])}}}}},e=>{e.O(0,[8230,4587,9307,3012,4133,7302,7579,8564,8618,2557,2243,7069,636,6593,8792],()=>e(e.s=10696)),_N_E=e.O()}]); 3//# sourceMappingURL=[id]-1fba2a7f08c249af.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.