1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2719],{1175:function(e,t,i){var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var i,n,o,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){var c=[l,s];if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(!(o=(o=r.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){r=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(6===c[0]&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(e){c=[6,e],n=0}finally{i=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=void 0;var a=i(77759),l=i(46298);t.getUrl=function(e,i){for(var s=[],c=2;c<arguments.length;c++)s[c-2]=arguments[c];return n(void 0,r([e,i],s,!0),void 0,function(e,i,n){var r,s,c,d,p,u,m;return void 0===n&&(n=0),o(this,function(o){switch(o.label){case 0:if("function"!=typeof e)return[3,10];o.label=1;case 1:return o.trys.push([1,3,,9]),[4,e()];case 2:return r=o.sent(),[3,9];case 3:var h;if(o.sent(),!i.current.retryOnError)return[3,7];if(s=null!=(p=i.current.reconnectAttempts)?p:l.DEFAULT_RECONNECT_LIMIT,!(n<s))return[3,5];return[4,(h=null!=(c="function"==typeof i.current.reconnectInterval?i.current.reconnectInterval(n):i.current.reconnectInterval)?c:l.DEFAULT_RECONNECT_INTERVAL_MS,new Promise(function(e){return window.setTimeout(e,h)}))];case 4:return o.sent(),[2,(0,t.getUrl)(e,i,n+1)];case 5:return null==(m=(u=i.current).onReconnectStop)||m.call(u,n),[2,null];case 6:return[3,8];case 7:return[2,null];case 8:return[3,9];case 9:return[3,11];case 10:r=e,o.label=11;case 11:return d=i.current.fromSocketIO?(0,a.parseSocketIOUrl)(r):r,[2,i.current.queryParams?(0,a.appendQueryParams)(d,i.current.queryParams):d]}})})}},2129:(e,t,i)=>{i.d(t,{A:()=>s,n:()=>l});var n=i(14232),o=i(25894),r=i(18550),a=i(72655);let l=()=>{let{pageUiEnvironment:{window:e,document:t}}=(0,o.p)(),{headerHeight:i}=(0,r.A)(),l=(0,n.useRef)(i);(0,n.useEffect)(()=>{l.current=i},[i]);let s=(0,n.useCallback)((t,i="smooth")=>{null==e||e.scrollTo({top:t,behavior:i})},[e]),c=(0,n.useCallback)((t,i,n)=>{if(!t||!e)return;let o=t.getBoundingClientRect().top+e.pageYOffset;o&&s(o-(i||0),n)},[s,e]),d=(0,n.useCallback)((e,i=100)=>{let n=null==t?void 0:t.querySelector(".page-builder-build-wrapper");if(!n||!e)return;let o=n.getBoundingClientRect().top,r=e.getBoundingClientRect().top;n.scrollTo({top:n.scrollTop+(r-o)-i,behavior:"smooth"})},[t]),p=(0,n.useCallback)((e,n=0,o)=>{if(void 0===e)return;let r=null==t?void 0:t.querySelector(`[data-widget-id="${e}"]`);if(r)c(r,n+(1===a.N.getIndexById(e)?0:i),o)},[t,i,c]),u=(0,n.useCallback)(i=>{let n=null==t?void 0:t.querySelector(i);if(!n)return;let o=0,r=()=>Math.floor(n.getBoundingClientRect().top+e.scrollY-l.current),a=r(),c=()=>{let t=Date.now(),i=setInterval(()=>{let n=r(),l=Math.abs(n-e.scrollY);o<10&&(l>10||n!==a)?(clearInterval(i),a=n,s(n),o++,requestAnimationFrame(c)):(n===a||Date.now()-t>1e3)&&clearInterval(i)},100)};s(a),requestAnimationFrame(c)},[i]),m=(0,n.useCallback)((e,n=0)=>{let o=null==t?void 0:t.querySelector(`[data-widget="${e}"]`);o&&c(o,n+i)},[t,i,c]);return{scrollToPosition:s,scrollToElement:c,scrollToWidget:p,smoothTrackScrollToElement:u,scrollToElementInBuilder:d,scrollToWidgetByType:m}},s=l},7223:(e,t)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.resetWebSockets=t.sharedWebSockets=void 0,t.sharedWebSockets={},t.resetWebSockets=function(e){if(e&&t.sharedWebSockets.hasOwnProperty(e))delete t.sharedWebSockets[e];else for(var i in t.sharedWebSockets)t.sharedWebSockets.hasOwnProperty(i)&&delete t.sharedWebSockets[i]}},10554:(e,t,i)=>{i.d(t,{b:()=>b});var n=i(37876),o=i(14232),r=i(5646),a=i(14453),l=i(61959),s=i(43085),c=i(32251),d=i(17370),p=i(38924),u=i(27506),m=i(34846);let h=r.Ay.div.withConfig({displayName:"HeaderLogo__Container",componentId:"sc-1111br0-0"})(["flex-shrink:0;margin-right:auto;height:auto;max-height:100%;min-height:0;display:flex;align-items:center;justify-content:center;@media ","{min-height:72px;}@media ",",print{margin-right:0;min-height:80px;}"],d.bp.p,d.bp.t),f=r.Ay.div.withConfig({displayName:"HeaderLogo__Brand",componentId:"sc-1111br0-1"})(["display:block;border:0;",""],({$noPadding:e})=>!e&&(0,r.AH)(["padding:",";@media ","{padding:",";}@media ",",print{padding:"," ",";}"],(0,p.ls)(1),d.bp.p,(0,p.ls)(1.5),d.bp.t,(0,p.ls)(2),(0,p.ls)(3))),g=r.Ay.div.withConfig({displayName:"HeaderLogo__Logo",componentId:"sc-1111br0-2"})(["display:flex;align-items:center;min-height:",";width:",";@media ","{min-height:",";width:",";}@media ",",print{min-height:",";width:",";}"],(0,p.ls)(4),({$sizeFactor:e})=>`calc(${(0,p.ls)(12)} * ${e})`,d.bp.p,(0,p.ls)(5),({$sizeFactor:e})=>`calc(${(0,p.ls)(14)} * ${e})`,d.bp.t,(0,p.ls)(6),({$sizeFactor:e})=>`calc(${(0,p.ls)(17)} * ${e})`),v=(0,r.Ay)(u._).withConfig({displayName:"HeaderLogo__Picture",componentId:"sc-1111br0-3"})(["display:block;flex:1 0 0%;max-width:100%;max-height:48px;@media ",",print{max-height:96px;}img{object-fit:contain;","}
1"],d.bp.p,({$application:e})=>e?(0,r.AH)(["object-position:center;@media ","{object-position:left center;}"],d.bp.d):(0,r.AH)(["object-position:left center;"])),b=({link:e,minSize:t=s.x,maxSize:i=s.T,noPadding:r,altText:d,ariaLabel:p,application:u})=>{let{t:b}=(0,m.Bd)(),{design:y,apiData:x}=(0,c.N)(),{logo:_,logoSizeFactor:w,activateLogoScale:j}=y,{0:S,1:C}=(0,o.useState)({width:_.width||0,height:_.height||0});(0,o.useEffect)(()=>{!function(e,t,i,n){new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})}(void 0,void 0,void 0,function*(){try{let e=yield(0,a.vX)(_.src);C(e)}catch(e){console.error(e)}})},[_]);let A=j.checked?(0,l.k)(Number(w.value),t,i):t,k=!!S.height&&!!S.width,I=e?p||b("widget.header.aria_label.internal_link"):void 0;return(0,n.jsx)(h,{children:(0,n.jsx)(f,{$noPadding:r,children:(0,n.jsx)(g,{as:e?"a":"div",href:e,$sizeFactor:A,"aria-label":I,children:k&&(0,n.jsx)(v,Object.assign({src:_.src,useImageRatio:!0},S,{showBlur:!1,alt:d||x.companyData.companyName,$application:u}))})})})}},12719:(e,t,i)=>{let n;i.r(t),i.d(t,{WidgetApplication:()=>oh,default:()=>of});var o,r,a,l,s,c,d=i(37876),p=i(14232),u=i(34846),m=i(35854),h=i(19598),f=i(32251),g=i(954),v=i(25894),b=i(59698),y=i(88161),x=i(71671),_=i(36877),w=i(5646),j=i(38924),S=i(21845),C=i(17370),A=i(45031),k=i(42044),I=i(85882),O=i(79870);let E={0:{[k.K6.x1]:{width:400,height:420}},480:{[k.K6.x1]:{width:480,height:420}},640:{[k.K6.x1]:{width:640,height:320}},800:{[k.K6.x1]:{width:800,height:490}},1024:{[k.K6.x1]:{width:800,height:490},[k.K6.x2]:{width:1600,height:980}},1260:{[k.K6.x1]:{width:1080,height:1080}}},N=w.Ay.div.withConfig({displayName:"ApplicationStepContainer__Container",componentId:"sc-mgbzit-0"})([""," display:",";flex-direction:column;justify-content:space-between;padding:"," "," ",";background-size:cover;background-position:center;background-repeat:no-repeat;position:relative;z-index:1;flex-grow:1;"," "," @media (orientation:portrait) and (","){height:416px;}@media ","{padding:",";}@media ","{display:flex;justify-content:center;align-items:center;z-index:3;position:fixed;left:0;top:0;height:100%;width:416px;padding:"," ",";}@media ","{width:480px;}@media ","{width:512px;}@media ","{width:576px;}@media ","{width:1024px;}"],({$imageSrc:e})=>(0,j.pr)({imageSrc:e,breakpoints:E}),({$isStepsVisible:e})=>e?"flex":"none",(0,j.ls)(8),(0,j.ls)(2),(0,j.ls)(4),({$isBuilderBuild:e})=>e&&(0,w.AH)(["top:62px !important;"]),({$isStepsVisible:e,$isOverlayEnabled:t,$overlayOpacity:i})=>t&&e&&(0,w.AH)(['&:before{content:"";',";background-color:",";}"],j.Pu,(0,_.B3)(S.a.Black,i)),C.JB.p,C.bp.p,(0,j.ls)(8),C.bp.d,(0,j.ls)(5.5),(0,j.ls)(4),C.bp.d_l,C.bp.d_xl,C.bp.hd,C.bp.qhd),P=w.Ay.h2.withConfig({displayName:"ApplicationStepContainer__Title",componentId:"sc-mgbzit-1"})(["",";font-size:1.5rem;line-height:1.25;color:",";text-align:center;z-index:2;margin-bottom:",";@media ","{font-size:2rem;}@media ","{font-size:1.25rem;line-height:1.3;max-width:384px;margin-bottom:",";@media (max-height:680px){display:none;}}@media ","{font-size:1.5rem;margin-bottom:",";}"],O.gQ,S.a.White,(0,j.ls)(5),C.bp.p,C.bp.d,(0,j.ls)(8),C.bp.d_l,(0,j.bJ)(5)),T=w.Ay.ol.withConfig({displayName:"ApplicationStepContainer__Steps",componentId:"sc-mgbzit-2"})(["list-style:none;display:flex;justify-content:center;column-gap:",";@media ","{align-items:center;column-gap:",";}@media ","{flex-direction:column;row-gap:",";}@media ","{row-gap:",";}"],(0,j.ls)(4),C.bp.p,(0,j.ls)(8),C.bp.d,(0,j.ls)(6),C.bp.d_l,(0,j.bJ)(6)),D=(0,w.AH)(["",""],({theme:e})=>(0,w.AH)(["background:radial-gradient( 50% 50% at 50% 50%,"," 53.85%,"," 100% );border-color:",";color:",";"],(0,_.B3)((0,j.sG)(e),0),(0,_.B3)((0,j.sG)(e),.35),(0,j.sG)(e),S.a.White)),R=w.Ay.li.withConfig({displayName:"ApplicationStepContainer__StepItem",componentId:"sc-mgbzit-3"})(["display:flex;flex-direction:column;align-items:center;"]),L=w.Ay.button.withConfig({displayName:"ApplicationStepContainer__StepButton",componentId:"sc-mgbzit-4"})(["",";",";position:relative;height:64px;width:64px;flex-shrink:0;border-radius:50%;border:2px solid ",";color:",";transition:border-color 0.35s ease-in-out,background ",";@media ","{height:156px;width:156px;display:block;text-align:center;}@media ","{height:128px;width:128px;}@media ","{height:156px;width:156px;@media (max-height:680px){height:",";width:",";}}&:hover{","}",""],j.GS,j.tP,(0,_.B3)(S.a.White,.25),(0,_.B3)(S.a.White,.5),A.xf,C.bp.p,C.bp.d,C.bp.d_l,(0,j.bJ)(24),(0,j.bJ)(24),D,({$isActive:e})=>e&&(0,w.AH)(["@media ","{pointer-events:none;","}"],C.bp.d,D)),F=w.Ay.div.withConfig({displayName:"ApplicationStepContainer__StepsButtonValue",componentId:"sc-mgbzit-5"})(["font-size:28px;"," line-height:1.14;transition:color ",";@media ","{font-size:52px;line-height:0.6;}@media ","{font-size:42px;line-height:0.8;}@media ","{font-size:52px;line-height:0.6;@media (max-height:680px){font-size:",";}}"],(0,j.Jl)(),A.xf,C.bp.p,C.bp.d,C.bp.d_l,(0,j.bJ)(9)),M=w.Ay.div.withConfig({displayName:"ApplicationStepContainer__StepsButtonTitle",componentId:"sc-mgbzit-6"})(["position:relative;z-index:1;text-align:center;margin-top:",";font-size:0.625rem;word-break:break-word;display:none;line-height:1.3;color:",";@media ","{display:block;font-size:0.875rem;max-width:86%;width:100%;margin:16px auto 0;}@media ","{font-size:0.75rem;margin:12px auto 0;}@media ","{font-size:0.875rem;margin:16px auto 0;@media (max-height:680px){margin-top:",";font-size:",";}}"],A.X,S.a.White,C.bp.p,C.bp.d,C.bp.d_l,(0,j.bJ)(3),(0,j.bJ)(2)),z=(0,w.Ay)(M).withConfig({displayName:"ApplicationStepContainer__MobileStepButtonTitle",componentId:"sc-mgbzit-7"})(["display:block;width:80px;@media ","{display:none;}"],C.bp.p);!function(e){e.First="first_step_form",e.Second="second_step_form",e.Third="third_step_form"}(o||(o={}));let $=({title:e="",steps:t,selectedStep:i,isOverlayEnabled:n,overlayOpacity:o=0,backgroundSrc:r,onSelect:a})=>{let{mode:l}=(0,f.N)(),s=!!t.length;return(0,d.jsx)(N,{$isStepsVisible:s,$imageSrc:r,$isOverlayEnabled:n,$overlayOpacity:o,$isBuilderBuild:l===I.q5.Build,children:s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(P,{children:e}),(0,d.jsx)(T,{children:t.map(({label:e,anchorName:t},n)=>{let o=n+1;return(0,d.jsxs)(R,{children:[(0,d.jsxs)(L,{$isActive:i===t,onClick:e=>{e.preventDefault(),a(t)},children:[(0,d.jsx)(F,{$noCaption:!!e,children:o}),e&&(0,d.jsx)(M,{children:e})]}),e&&(0,d.jsx)(z,{children:e})]},o)})})]})})};var q=i(90347),B=i(52295),V=i(98755),U=i(28023),W=i(45680),H=i(93223),J=i(76954),K=i(84840),G=i(2091),Q=i(78116),X=i(88992),Y=i(77390),Z=i(99665);let ee={applicationData:{coverLetterText:"",sex:"",academictitle:"",firstname:"",lastname:"",email:"",ph
1one:"",answers:[],privacyPolicyAccepted:!0,applicationFeedbackConsent:!1,languages:[],educations:[],experiences:[],dateofbirth:"",imported:"",locale:"",nationality:"",country:"",region:"",city:"",street:"",zip:""},cv:void 0,profileImage:void 0,attachments:void 0,"f-captcha-solution":void 0,isSkipServerCodeErrors:!1};!function(e){e.NOT_ACTIVE="application_status_not_active",e.VERIFICATION_BAD_REQUEST="verification-bad-request",e.FAILED_CAPTCHA_SOLUTION="failed-captcha-solution"}(r||(r={}));var et=i(31562),ei=i(31579),en=i.n(ei);let eo=e=>{let t=typeof e;return null!==e&&("object"===t||"function"===t)},er=new Set(["__proto__","prototype","constructor"]),ea=new Set("0123456789");var el=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let es=["applicationData.sex","applicationData.coverLetterText","applicationData.academictitle","applicationData.firstname","applicationData.lastname","applicationData.email","applicationData.phone","applicationData.applicationSource.id"],ec=p.createContext({jobId:"",viewableSection:o.First,setFistViewableSection:()=>{},setSecondViewableSection:()=>{},setThirdViewableSection:()=>{},disabledSecondStep:!0,setDisabledSecondStep:()=>{},disabledThirdStep:!0,setDisabledThirdStep:()=>{},customFormData:{applicationData:{}},onCustomInput:()=>{},isActiveSteps:!0,dropzone:{},videoApplication:{visible:!1},coverLetter:{},cv:{},attachments:{},salutation:{},academicTitle:{},firstName:{},lastName:{},email:{},phone:{},applicationSource:{},additionalLocation:{},questions:[],privacyPolicy:{},feedbackConsent:{},withCaptcha:!1,formSecondSectionHeadline:"",formThirdSectionHeadline:"",showQuestions:!1,showFeedbackModalInBuilder:!1}),ed=e=>{var{children:t,jobId:i="",isActiveSteps:n}=e,r=el(e,["children","jobId","isActiveSteps"]);let{0:a,1:l}=(0,p.useState)(o.First),{0:s,1:c}=(0,p.useState)(n),{0:u,1:m}=(0,p.useState)(n);(0,p.useEffect)(()=>{n!==s&&c(n),n!==u&&m(n)},[n]);let h=(0,p.useRef)({applicationData:{}});return(0,d.jsx)(ec.Provider,{value:Object.assign({jobId:i,viewableSection:a,setFistViewableSection:e=>{e&&l(o.First)},setSecondViewableSection:e=>{e&&l(o.Second)},setThirdViewableSection:e=>{e&&l(o.Third)},disabledSecondStep:s,setDisabledSecondStep:c,disabledThirdStep:u,setDisabledThirdStep:m,customFormData:h.current,onCustomInput:e=>{var t;let i=e.target,n=(null==i?void 0:i.name)||(null==(t=null==i?void 0:i.getAttribute)?void 0:t.call(i,"name"));if(n&&es.includes(n)){if(!(null==i?void 0:i.value))return void function(e,t){if(!eo(e)||"string"!=typeof t)return;let i=function(e){let t=[],i="",n="start",o=!1;for(let r of e)switch(r){case"\\":if("index"===n)throw Error("Invalid character in an index");if("indexEnd"===n)throw Error("Invalid character after an index");o&&(i+=r),n="property",o=!o;break;case".":if("index"===n)throw Error("Invalid character in an index");if("indexEnd"===n){n="property";break}if(o){o=!1,i+=r;break}if(er.has(i))return[];t.push(i),i="",n="property";break;case"[":if("index"===n)throw Error("Invalid character in an index");if("indexEnd"===n){n="index";break}if(o){o=!1,i+=r;break}if("property"===n){if(er.has(i))return[];t.push(i),i=""}n="index";break;case"]":if("index"===n){t.push(Number.parseInt(i,10)),i="",n="indexEnd";break}if("indexEnd"===n)throw Error("Invalid character after an index");default:if("index"===n&&!ea.has(r))throw Error("Invalid character in an index");if("indexEnd"===n)throw Error("Invalid character after an index");"start"===n&&(n="property"),o&&(o=!1,i+="\\"),i+=r}switch(o&&(i+="\\"),n){case"property":if(er.has(i))return[];t.push(i);break;case"index":throw Error("Index was not closed");case"start":t.push("")}return t}(t);for(let t=0;t<i.length;t++){let n=i[t];if(function(e,t){if("number"!=typeof t&&Array.isArray(e)){let i=Number.parseInt(t,10);return Number.isInteger(i)&&e[i]===e[t]}return!1}(e,n))throw Error("Cannot use string index");if(t===i.length-1)return delete e[n],!0;if(!eo(e=e[n]))return!1}}(h.current,n);en()(h.current,n,null==i?void 0:i.value)}},isActiveSteps:n},r),children:t})},ep=()=>(0,p.useContext)(ec);var eu=i(44543);let em=e=>(e?new Date(e):new Date).toJSON().replace("Z","+0000"),eh=e=>{var t,i,n,o;((null==e?void 0:e.ref)instanceof HTMLElement||"object"==typeof(null==e?void 0:e.ref))&&(null==(i=(t=e.ref).scrollIntoView)||i.call(t,{behavior:"smooth",block:"center"}),null==(o=(n=e.ref).focus)||o.call(n,{preventScroll:!0}))};var ef=i(25999),eg=i(15318),ev=i(8943),eb=i(94410),ey=i.n(eb),ex=i(40625),e_=i(10406),ew=i(95153),ej=i(65614),eS=i(62191),eC=i(20104);let eA=w.Ay.div.withConfig({displayName:"ApplicationFormSection__ApplicationFormMainContainer",componentId:"sc-1k5lex4-0"})(["padding-top:","px;padding-bottom:","px;min-height:",";@media ","{padding-top:","px;}@media ","{padding-top:","px;}"],({$stepsEnable:e})=>e?100:24,({$stepsEnable:e})=>e?48:24,({$stepsEnable:e})=>e?(0,j.bJ)(100):"auto",C.bp.p,({$stepsEnable:e})=>e?180:24,C.bp.d,({$stepsEnable:e})=>e?76:24),ek=w.Ay.div.withConfig({displayName:"ApplicationFormSection__ApplicationFormLayout",componentId:"sc-1k5lex4-1"})(["width:100%;margin:0 auto;padding:0 ",";@media ","{padding:0 ",";}@media ","{padding-left:0;padding-right:0;max-width:608px;}& > *:last-child{margin-bottom:0;}"],(0,j.QA)(2),C.bp.p,(0,j.QA)(5),C.bp.d),eI=w.Ay.h2.withConfig({displayName:"ApplicationFormSection__ApplicationStepTitle",componentId:"sc-1k5lex4-2"})([""," margin:0 auto ",";font-size:1.125rem;line-height:1.25;text-align:center;color:",";@media ","{font-size:1.375rem;line-height:1;}@media ","{max-width:608px;}"],O.gQ,(0,j.ls)(6),({theme:e})=>(0,j.EA)(e),C.bp.t,C.bp.d);!function(e){e.ExtraSmall="ExtraSmall",e.Small="Small",e.Flex="Flex",e.Centered="Centered"}(a||(a={}));let eO=w.Ay.p.withConfig({displayName:"ApplicationFormSection__ApplicationStepSubtitle",componentId:"sc-1k5lex4-3"})(["color:",";font-size:0.875rem;line-height:1.3;margin-bottom:",";@media ","{font-size:1rem;line-height:1.25;}",""],S.a.Label,(0,j.ls)(3),C.bp.t,({$variant:e})=>(e=>{switch(e){case a.ExtraSmall:return(0,w.AH)(["margin-bottom:",";"],A.X);case a.Small:return(0,w.AH)(["margin-bottom:calc(2 * ",");"],A.X);case a.Flex:return(0,w.AH)(["display:flex;justify-content:space-between;align-items:center;"]);case a.Centered:return(0,w.AH)(["text-align:center;"])}})(e)),eE=w.Ay.div.withConfig({displayName:"ApplicationFormSection__ApplicationButtonContainer",componentId:"sc-1k5lex4-4"})(["display:inline-flex;justify-content:center;width:100%;margin:"," 0 0;"],(0,j.ls)(6)),eN=w.Ay.div.withConfig({displayName:"ApplicationFormSection__ApplicationExtraForm",componentId:"sc-1k5lex4-5"})(["margin:"," ",";background-color:",";padding:"," ",";@media ","{","}p{font-size:0.875rem;line-height:1.3;@media ","{font-size:1rem;line-height:1.25;}}"],(0,j.ls)(1.5),(0,j.ls)(-2),(0,_.B3)(S.a.Blue,.1),(0,j.ls)(3),(0,j.ls)(2),C.bp.p,(0,j.hD)(A.kM,A.Sw),C.bp.t),eP=w.Ay.div.withConfig({displayName:"ApplicationFormSection__ApplicationFormLinkContainer",componentId:"sc-1k5lex4-6"})(["display:flex;justify-content:center;align-items:center;column-gap:12px;margin-top:24px;"]),eT=w.Ay.div.withConfig({displayName:"ApplicationFormSection__ApplicationFieldRow",componentId:"sc-1k5lex4-7"})(["display:flex;flex-wrap:wrap;align-items:flex-start;gap:",";margin-top:",";"],(0,j.ls)(3),(0,j.ls)(3)),eD=w.Ay.div.withConfig({displayName:"ApplicationFormSection__ApplicationFieldCol",componentId:"sc-1k5lex4-8"})(["width:100%;",""],({$colMd6:e})=>e&&(0,w.AH)(["@media ","{flex:1 0 0%;}"],C.bp.t)),eR=w.Ay.div.withConfig({displayName:"ApplicationFormSection__ApplicationFormItem",componentId:"sc-1k5lex4-9"})(["margin-bottom:",";",";",";"],(0,j.ls)(6),({$marginSM:e})=>e&&(0,w.AH)(["margin-bottom:",";"],(0,j.ls)(3)),({$centered:e})=>e&&(0,w.AH)(["display:flex;justify-content:center;"]));var eL=i(60250),eF=i(48080),eM=i(58931),ez=i(28064),e$=i(26984),eq=i(45270),eB=i(37631);let eV=(0,p.createContext)(void 0),eU=({children:e,initialStep:t=0})=>{let{0:i,1:n}=(0,p.useState)(t);return(0,d.jsx)(eV.Provider,{value:{currentStep:i,setStep:e=>{n(e)},nextStep:()=>{n(e=>e+1)},prevStep:()=>{n(e=>e-1)}},children:e})},eW=()=>{let e=(0,p.useContext)(eV);if(!e)throw Error("useStep must be used within a StepProvider");return e};var eH=i(8924),eJ=i(60015),eK=i(97144);let eG=(0,w.AH)(["opacity:0.25;visibility:visible;transition:border-radius ",",transform 0.5s ease-in-out,opacity 0.5s ease-in-out,visibility 0s linear;"],A.xf),eQ=(0,w.AH)(["opacity:0;visibility:hidden;transition:border-radius ",",transform 0.5s ease-in-out,opacity 0.5s ease-in-out,visibility 0s linear 0.5s;"],A.xf),eX=w.Ay.div.withConfig({displayName:"Tile__Container",componentId:"sc-2b3fwf-0"})(["position:relative;display:flex;flex-direction:column;min-height:448px;background:",";",";width:auto;min-width:calc(100% - 32px);margin:0 16px;overflow:hidden;box-shadow:0px 32px 52px rgba(0,0,0,0.05),0px 40px 48px rgba(0,0,0,0.1);"," "," @media ","{margin:0;width:488px;min-width:488px;}"],S.a.White,(0,j.hD)(A.aM,A.sS),({$isVisible:e})=>e?eG:eQ,({$isActive:e})=>e&&(0,w.AH)(["opacity:1;pointer-events:initial;"]),C.bp.p),eY=w.Ay.button.withConfig({displayName:"Tile__Overlay",componentId:"sc-2b3fwf-1"})([""," "," z-index:100;"],j.GS,j.Pu),eZ=({isActive:e,isFinal:t=!1,className:i,children:n,onClick:o})=>{let{currentStep:r}=eW();return(0,d.jsxs)(eX,{$isActive:e,$isVisible:t&&3===r||!t&&r<3,className:i,"aria-hidden":!e,children:[!e&&(0,d.jsx)(eY,{onClick:o,tabIndex:-1,type:"button"}),n]})};var e0=i(55952),e1=i(27298);let e2=w.Ay.div.withConfig({displayName:"TileComponents__Content",componentId:"sc-13qev70-0"})(["display:flex;flex-direction:column;flex:1 0 0%;padding:20px 20px 24px;"]),e5=w.Ay.div.withConfig({displayName:"TileComponents__Description",componentId:"sc-13qev70-1"})([""," display:flex;flex-direction:column;justify-content:center;flex:1 0 0%;font-size:0.875rem;letter-spacing:0.015em;line-height:1.4;color:",";"],e0.fm,S.a.Text),e4=w.Ay.div.withConfig({displayName:"TileComponents__ButtonContainer",componentId:"sc-13qev70-2"})(["display:flex;align-items:center;justify-content:center;margin-top:20px;",""],({$isVisible:e})=>e?j.qG:j.Xn),e3=w.Ay.div.withConfig({displayName:"TileComponents__LoaderContainer",componentId:"sc-13qev70-3"})(["",";display:flex;justify-content:center;align-items:center;z-index:15;background-color:",";",""],j.Pu,S.a.Grey,({$isVisible:e})=>e?j.qG:j.Xn),e8=({isVisible:e=!1})=>(0,d.jsx)(e3,{$isVisible:e,children:(0,d.jsx)(e1.a,{})}),e6=w.Ay.div.withConfig({displayName:"TileComponents__MediaContainer",componentId:"sc-13qev70-4"})(["position:relative;width:100%;aspect-ratio:16/9;z-index:1;background-color:",";"],S.a.Grey),e7=w.Ay.img.withConfig({displayName:"TileComponents__Image",componentId:"sc-13qev70-5"})(["",";z-index:1;object-fit:cover;"],j.Pu),e9=w.Ay.div.withConfig({displayName:"TileComponents__VideoOverlay",componentId:"sc-13qev70-6"})(["",";z-index:10;display:flex;align-items:center;justify-content:center;",""],j.Pu,({$isVisible:e})=>e?j.qG:j.Xn);w.Ay.img.withConfig({displayName:"TileComponents__Poster",componentId:"sc-13qev70-7"})(["",";object-fit:cover;"],j.Pu);var te=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let tt=({stepIndex:e,onDeleteVideo:t,children:i})=>{let{currentStep:n,setStep:o}=eW(),{t:r}=(0,u.Bd)(),a=n===e,l=r("widget.application.first_step.video_uploaded_de
1scription")||"";return(0,d.jsxs)(eZ,{isActive:a,isFinal:!0,onClick:()=>o(e),children:[i,(0,d.jsxs)(e2,{children:[(0,d.jsx)(e5,{children:(0,d.jsx)(eK.E,{options:{transform:{a:e=>{var{href:t="",children:i}=e,n=te(e,["href","children"]);return(0,d.jsx)("a",Object.assign({href:t,target:"blank"},n,{tabIndex:a?0:-1,children:i}))}}},children:l})}),(0,d.jsx)(e4,{$isVisible:a,children:(0,d.jsx)(eC.$n,{size:eC.Mp.Small,label:r("widget.application.first_step.video_delete_btn"),onClick:()=>{o(0),null==t||t()},color:S.a.White,textColor:S.a.Label,tabIndex:a?0:-1})})]})]})},ti=({stepIndex:e,description:t="",children:i})=>{let{currentStep:n,setStep:o,nextStep:r}=eW(),{t:a}=(0,u.Bd)(),l=n===e;return(0,d.jsxs)(eZ,{isActive:l,onClick:()=>o(e),children:[i,(0,d.jsxs)(e2,{children:[(0,d.jsx)(e5,{dangerouslySetInnerHTML:{__html:t}}),(0,d.jsx)(e4,{$isVisible:l,children:(0,d.jsx)(eC.$n,{type:"button",size:eC.Mp.Small,variant:eC.Ak.Outline,label:a("widget.application.first_step.video_try_this_btn"),onClick:r,tabIndex:l?0:-1})})]})]})};var tn=i(28468),to=i(73401),tr=i(99742);let ta=tr.env.REACT_APP_ADD_PIPE_ACCOUNT_HASH||tr.env.STORYBOOK_ADD_PIPE_ACCOUNT_HASH||"9dc2ab63efd4ac72d7076cd53aaa2b2c",tl=tr.env.REACT_APP_ADD_PIPE_ID||tr.env.STORYBOOK_ADD_PIPE_ID||"7Mdp02";console.log({REACT_APP_ADD_PIPE_CSS_URL:tr.env.REACT_APP_ADD_PIPE_CSS_URL,STORYBOOK_ADD_PIPE_CSS_URL:tr.env.STORYBOOK_ADD_PIPE_CSS_URL,NEXT_PUBLIC_ADD_PIPE_CSS_URL:"https://static.softgarden.de/thirdparty/pcw/addpipe/2.3/pipe.css"});let ts=`${tr.env.REACT_APP_ADD_PIPE_CSS_URL||tr.env.STORYBOOK_ADD_PIPE_CSS_URL||"https://static.softgarden.de/thirdparty/pcw/addpipe/2.3/pipe.css"}${tr.env.REACT_APP_ADD_PIPE_V?`?v=${tr.env.REACT_APP_ADD_PIPE_V}`:""}`;console.log({REACT_APP_ADD_PIPE_JS_URL:tr.env.REACT_APP_ADD_PIPE_JS_URL,STORYBOOK_ADD_PIPE_JS_URL:tr.env.STORYBOOK_ADD_PIPE_JS_URL,NEXT_PUBLIC_ADD_PIPE_JS_URL:"https://static.softgarden.de/thirdparty/pcw/addpipe/2.3/pipe.js"});let tc=`${tr.env.REACT_APP_ADD_PIPE_JS_URL||tr.env.STORYBOOK_ADD_PIPE_JS_URL||"https://static.softgarden.de/thirdparty/pcw/addpipe/2.3/pipe.js"}${tr.env.REACT_APP_ADD_PIPE_V?`?v=${tr.env.REACT_APP_ADD_PIPE_V}`:""}`;var td=i(81344),tp=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let tu=w.Ay.div.withConfig({displayName:"Message__Container",componentId:"sc-1sgk8ky-0"})(["display:flex;align-items:center;column-gap:0.25rem;font-size:0.6875rem;color:",";background-color:",";padding:0.375rem;border-radius:0.75rem;text-align:center;"],S.a.White,(0,_.B3)(S.a.Black,.5));function tm({countStart:e,countStop:t=0,intervalMs:i=1e3,isIncrement:n=!1,onEnd:o}){var r,a;let{count:l,increment:s,decrement:c,reset:d}=function(e){let{0:t,1:i}=(0,p.useState)(e),n=(0,p.useCallback)(()=>i(e=>e+1),[]);return{count:t,increment:n,decrement:(0,p.useCallback)(()=>i(e=>e-1),[]),reset:(0,p.useCallback)(()=>i(e),[e])}}(e),{0:u,1:m}=(0,p.useState)(!1),h=(0,p.useCallback)(()=>{m(!0)},[]),f=(0,p.useCallback)(()=>{m(!1)},[]),g=(0,p.useCallback)(()=>{f(),d()},[f,d]);return r=(0,p.useCallback)(()=>{if(l===t){f(),null==o||o();return}n?s():c()},[l,t,c,s,n,f]),a=u?i:null,(0,p.useEffect)(()=>{if(null!==a){let e=setInterval(r,a);return()=>clearInterval(e)}},[r,a]),[l,{start:h,stop:f,reset:g}]}var th=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let tf=(0,w.i7)(["0%{transform:translate(-50%,-50%);opacity:1;}100%{transform:translate(-50%,-50%) scale(2);opacity:0;}"]),tg=w.Ay.div.withConfig({displayName:"PulseCountdown__Container",componentId:"sc-6w2yk5-0"})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:2rem;"," z-index:1;color:",';&:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);height:80px;width:80px;border-radius:50%;background-color:',";opacity:0;transform-origin:center;animation:"," 1s forwards;animation-iteration-count:",";}"],(0,j.ji)(),S.a.White,(0,_.B3)(S.a.Orange,.5),tf,({$count:e})=>e),tv=e=>{var{initialTime:t=5,onEnd:i}=e,n=th(e,["initialTime","onEnd"]);let[o,{start:r}]=tm({onEnd:i,countStart:t-1});return(0,p.useEffect)(()=>{r()},[]),(0,d.jsx)(tg,Object.assign({$count:t},n,{children:o+1}))};var tb=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let ty=w.Ay.span.withConfig({displayName:"Countdown__Container",componentId:"sc-bfuy8p-0"})([""]),tx=e=>{var{initialTime:t,onEnd:i}=e,n=tb(e,["initialTime","onEnd"]);let[o,{start:r}]=tm({onEnd:i,countStart:t});return(0,p.useEffect)(()=>{r()},[]),(0,d.jsx)(ty,Object.assign({},n,{children:(e=>{let t=Math.floor(e/60);return`${t.toString().padStart(2,"0")}:${(e%60).toString().padStart(2,"0")}`})(o)}))};var t_=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let tw=w.Ay.div.withConfig({displayName:"RecorderStatus__Container",componentId:"sc-1qgs586-0"})(["display:flex;align-items:center;column-gap:0.25rem;font-size:0.6875rem;color:",";background-color:",";padding:0.375rem;border-radius:0.75rem;"],S.a.White,(0,_.B3)(S.a.Black,.5)),tj=w.Ay.span.withConfig({displayName:"RecorderStatus__Label",componentId:"sc-1qgs586-1"})([""]),tS=w.Ay.i.withConfig({displayName:"RecorderStatus__Indicator",componentId:"sc-1qgs586-2"})(["height:0.75rem;width:0.75rem;border-radius:50%;background-color:",";"],({$color:e})=>e);var tC=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let tA=w.Ay.div.withConfig({displayName:"ShowDelayedButton__Container",componentId:"sc-1i2w2m8-0"})(["",""],({$isVisible:e})=>e?j.qG:j.Xn),tk=e=>{var{showDelay:t=0}=e,i=tC(e,["showDelay"]);let{0:n,1:o}=(0,p.useState)(!1),r=(0,p.useRef)();return(0,p.useEffect)(()=>(r.current=window.setTimeout(()=>{o(!0)},t),()=>clearTimeout(r.current)),[]),(0,d.jsx)(tA,{$isVisible:n,children:(0,d.jsx)(eC.$n,Object.assign({},i))})};
1var tI=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})},tO=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let tE="pipe-recorder",tN={size:{width:"100%"},qualityurl:"avq/720p.xml",accountHash:ta,eid:tl,mrt:120,mv:1,asv:0,ssb:0,avrec:1,sis:1,cornerradius:0,showMenu:0},tP=(0,w.DU)(["#","{height:100%!important;width:100%!important;}#pipeVideoInput-pipe-recorder{border-radius:0 !important;}#pipeVrec-pipe-recorder{height:100%;align-items:center;justify-content:center;}#pipeVideoPlayback-pipe-recorder{border-radius:0 !important;left:50% !important;top:50% !important;transform:translate(-50%,-50%);}#pipeClickPowered-pipe-recorder{display:none;}#pipeSafariNotification-pipe-recorder{margin-top:64px !important;}#pipeError-pipe-recorder{padding:4px;position:absolute;top:100%;left:0;background-color:transparent;margin-top:14px;text-align:center;p,strong{font-size:0.75rem;line-height:1.2;color:",";position:static;transform:none;width:100%;}}#label-pipe-file-input-pipe-recorder{",";background-color:",";border:none;color:",";height:auto;white-space:initial;margin-top:1rem;padding:8px 32px;font-size:1rem;"," letter-spacing:0.01em;display:inline-flex;}.pipeTimer{display:none;}"],tE,S.a.Error,j.GS,S.a.Orange,S.a.White,(0,j.hD)(A.kM,A.Sw)),tT=w.Ay.div.withConfig({displayName:"Recorder__Container",componentId:"sc-vbvk2c-0"})(["height:100%;width:100%;"]),tD=w.Ay.div.withConfig({displayName:"Recorder__RecContainer",componentId:"sc-vbvk2c-1"})(["",";display:flex;align-items:center;justify-content:center;background-color:",";",";@media ","{","}"],j.Pu,S.a.Black,(0,j.hD)(A.aM,A.sS),C.bp.p,({theme:e})=>e.isCollapsed&&(0,w.AH)(["border-top-left-radius:0;border-bottom-left-radius:0;"])),tR=(0,w.Ay)(e=>{var{isRecording:t,initialTime:i=10,readyLabel:n,onEnd:o}=e,r=t_(e,["isRecording","initialTime","readyLabel","onEnd"]);return(0,d.jsxs)(tw,Object.assign({},r,{children:[t?(0,d.jsx)(tx,{initialTime:i,onEnd:o}):(0,d.jsx)(tj,{children:n}),(0,d.jsx)(tS,{$color:t?S.a.Orange:S.a.Green})]}))}).withConfig({displayName:"Recorder__Status",componentId:"sc-vbvk2c-2"})(["position:absolute;top:12px;right:50%;transform:translateX(50%);z-index:10;"," @media ","{right:12px;transform:none;}"],({$isVisible:e})=>e?j.qG:j.Xn,C.bp.p),tL=(0,w.Ay)(e=>{var{children:t}=e,i=tp(e,["children"]);return(0,d.jsx)(tu,Object.assign({},i,{children:t}))}).withConfig({displayName:"Recorder__VideoMessage",componentId:"sc-vbvk2c-3"})(["z-index:10;position:absolute;top:12px;left:50%;transform:translateX(-50%);max-width:100%;",""],({$isVisible:e})=>e?j.qG:j.Xn),tF=w.Ay.div.withConfig({displayName:"Recorder__Actions",componentId:"sc-vbvk2c-4"})(["position:absolute;width:100%;bottom:24px;padding:0 16px;display:flex;justify-content:center;align-items:center;column-gap:16px;& > :only-child{margin:0 auto;}@media ","{justify-content:space-between;}"],C.bp.p),tM=(0,w.Ay)(to.x).withConfig({displayName:"Recorder__StyledPlayButton",componentId:"sc-vbvk2c-5"})(["",""],j.F);!function(e){e.AwaitingAccess="AwaitingAccess",e.Ready="Ready",e.RecordRequest="RecordRequest",e.Recording="Recording",e.Recorded="Recorded",e.Playing="Playing",e.Pause="Pause",e.Stopped="Stopped",e.Completed="Completed"}(l||(l={}));let tz=e=>{var{onComplete:t,payload:i,applicationUserAccessTokenApiParams:n,onReady:o,onDestroy:r}=e,a=tO(e,["onComplete","payload","applicationUserAccessTokenApiParams","onReady","onDestroy"]);let{t:s}=(0,u.Bd)(),{createUserAccessToken:c}=(()=>{let[{data:e,loading:t,error:i},n]=(0,h.bP)({url:`${m.Q}/widgets/application/user`},{manual:!0,withAccessToken:!0});return{createUserAccessToken:(0,p.useCallback)(e=>n({params:e}).then(({data:e})=>{var t,i,n;return(null==(i=null==(t=null==e?void 0:e.data)?void 0:t.token)?void 0:i.expires_in)&&Z.F.set(null==(n=e.data)?void 0:n.token),e}),[n]),data:e,error:i,isLoading:t}})(),f=(0,p.useRef)(`addPipeScriptOnLoad_${Date.now()}`),v=(0,p.useRef)(null),{0:b,1:y}=(0,p.useState)(l.AwaitingAccess),{components:{HeadInjection:x}}=(0,g.uq)(),w=()=>tI(void 0,void 0,void 0,function*(){var e;return yield null==(e=v.current)?void 0:e.remove()}),j=()=>{var e;y(l.Recorded),null==(e=v.current)||e.stopVideo()},C=()=>{y(l.Ready),o()},A=()=>tI(void 0,void 0,void 0,function*(){return yield c(n)}),k=()=>{y(l.Completed),t()},I=()=>{window.PipeSDK.insert(tE,Object.assign(Object.assign({},tN),{payload:JSON.stringify(i)}),e=>{v.current=e,v.current.onDestroyRecorder=w,v.current.onRecordingStarted=()=>y(l.Recording),v.current.onPlaybackComplete=()=>y(l.Recorded),v.current.onSaveOk=k,v.current.onReadyToRecord=C,td.yS&&(v.current.onVideoUploadStarted=A,v.current.onVideoUploadSuccess=k)})};(0,p.useEffect)(()=>(window[f.current]=()=>{window.PipeSDK&&I()},()=>{td.yS||w(),r(),delete window[f.current]}),[]);let O=b===l.Ready,E=b===l.Recording,N=b===l.Recorded,P=b===l.Playing,T=b===l.Pause,D=b===l.RecordRequest;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(tn.mg,{children:[(0,d.jsx)("script",{src:tc,className:"cmpignoremutation",onLoad:`window.${f.current}()`}),(0,d.jsx)("link",{rel:"stylesheet",href:ts})]}),(0,d.jsxs)(tT,Object.assign({},a,{children:[(0,d.jsx)(tP,{}),(0,d.jsx)(tR,{$isVisible:O||E,isRecording:E,readyLabel:s("widget.application.first_step.video_camera_is_ready"),onEnd:j,initialTime:120}),D&&(0,d.jsx)(tv,{initialTime:3,onEnd:()=>tI(void 0,void 0,void 0,function*(){var e,t,i;try{yield A(),null==(e=v.current)||e.record()}catch(e){alert(`Handle Record Error: ${null==(i=null==(t=e.response)?void 0:t.data)?void 0:i.errorMessage}`)}})}),(0,d.jsx)(tL,{$isVisible:N,children:s("widget.application.first_step.video_recorded")}),(0,d.jsx)(tD,{children:(0,d.jsx)("div",{id:tE})}),(N||P||T)&&(0,d.jsx)(tM,{isPause:P,onPlay:()=>{var e;y(l.Playing),null==(e=v.current)||e.playVideo()},onPause:()=>{var e;y(l.Pause),null==(e=v.current)||e.pause()}}),(0,d.jsxs)(tF,{children:[O&&(0,d.jsx)(eC.$n,{label:s("widget.application.first_step.video_record_btn"),onClick:()=>{y(l.RecordRequest)},size:eC.Mp.Small}),E&&(0,d.jsx)(tk,{label:s("widget.application.first_step.video_stop_btn"),onClick:j,size:eC.Mp.Small,variant:eC.Ak.Outline,color:S.a.White,textColor:S.a.White,showDelay:2e3}),(N||T)&&(0,d.jsx)(eC.$n,{label:s("widget.application.first_step.video_discard_btn"),onClick:()=>{y(l.Ready),w(),I()},size:eC.Mp.Small,color:(0,_.B3)(S.a.White,.15)}),(N||T)&&(0,d.jsx)(eC.$n,{label:s("widget.application.first_step.video_upload_btn"),onClick:()=>{var e;return null==(e=v.current)?void 0:e.save()},size:eC.Mp.Small})]})]}))]})};var t$=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let tq=(0,w.i7)(["100%{transform:scale(2.5);opacity:0;}"]),tB=w.Ay.button.withConfig({displayName:"PulseButton__Container",componentId:"sc-18yx9an-0"})([""," font-size:0.8125rem;line-height:1rem;height:150px;width:150px;position:relative;z-index:1;background:#dc3700;padding:12px;border-radius:50%;display:grid;place-items:center;color:",';text-align:center;cursor:pointer;&:before,&:after{content:"";position:absolute;height:100%;width:100%;background-color:#dc3700;border-radius:50%;z-index:-1;opacity:0.7;animation:'," 2s ease-out infinite;}&:after{animation-delay:1s;}"],j.GS,S.a.White,tq),tV=e=>{var{label:t,onClick:i}=e,n=t$(e,["label","onClick"]);return(0,d.jsx)(tB,Object.assign({onClick:i,tabIndex:-1},n,{type:"button",children:t}))};var tU=i(98189);let tW=(0,w.Ay)(eZ).withConfig({displayName:"RecordingTile__Container",componentId:"sc-1b9ar0l-0"})(["overflow:visible;"]),tH=w.Ay.div.withConfig({displayName:"RecordingTile__Content",componentId:"sc-1b9ar0l-1"})(["",";z-index:2;display:flex;flex-direction:column;justify-content:flex-end;padding:32px 24px;height:100%;background-color:",";",";@media ","{padding:40px 32px 24px;","}"],j.Pu,S.a.White,(0,j.hD)(A.aM,A.sS),C.bp.p,({theme:e})=>e.isCollapsed&&(0,w.AH)(["border-top-left-radius:0;border-bottom-left-radius:0;"])),tJ=w.Ay.div.withConfig({displayName:"RecordingTile__RecorderContent",componentId:"sc-1b9ar0l-2"})(["height:100%;"]),tK=w.Ay.div.withConfig({displayName:"RecordingTile__PulseContainer",componentId:"sc-1b9ar0l-3"})(["",";display:flex;align-items:center;justify-content:center;
1"],j.Pu),tG=w.Ay.div.withConfig({displayName:"RecordingTile__ButtonContainer",componentId:"sc-1b9ar0l-4"})(["display:flex;align-items:center;justify-content:center;margin-top:20px;position:relative;z-index:1;",""],({$isVisible:e})=>e?j.qG:j.Xn),tQ=({stepIndex:e,payload:t,applicationUserAccessTokenApiParams:i})=>{let{t:n}=(0,u.Bd)(),{isBuilderEnv:o}=(0,f.N)(),{triggerPageEvent:r}=(0,et.K)(),{currentStep:a,setStep:l,nextStep:s}=eW(),c=a===e,{0:m,1:h}=(0,p.useState)(!1),{0:g,1:v}=(0,p.useState)(!1),b=e=>{if(e.preventDefault(),o)return r(tU.C.RestrictedBuilderEvent,{widgetType:"application",eventName:"init-video-application"});h(!0),td.yS&&v(!0)};return(0,p.useEffect)(()=>{!c&&m&&h(!1)},[c]),(0,d.jsx)(w.NP,{theme:{isCollapsed:a>=e},children:(0,d.jsxs)(tW,{isActive:c,onClick:()=>l(e),children:[!g&&(0,d.jsxs)(tH,{children:[(0,d.jsx)(tK,{children:(0,d.jsx)(tV,{onClick:b,label:n("widget.application.first_step.video_pulse"),"tab-index":c?0:-1})}),(0,d.jsx)(tG,{$isVisible:c,children:(0,d.jsx)(eC.$n,{size:eC.Mp.Small,variant:eC.Ak.Outline,label:n("widget.application.first_step.video_activate_camera_btn"),onClick:b,"tab-index":c?0:-1})})]}),m&&(0,d.jsx)(tJ,{children:(0,d.jsx)(tz,{payload:t,applicationUserAccessTokenApiParams:i,onComplete:s,onReady:()=>{v(!0)},onDestroy:()=>{v(!1)}})})]})})};var tX=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let tY=(0,w.Ay)(eZ).withConfig({displayName:"TextTile__Container",componentId:"sc-11io6mr-0"})(["display:flex;flex-direction:column;padding:32px 24px;height:100%;@media ","{padding:40px 32px 24px;","}"],C.bp.p,({$isCollapsed:e})=>e&&(0,w.AH)(["transform:translateX(24px);border-top-right-radius:0;border-bottom-right-radius:0;"])),tZ=w.Ay.div.withConfig({displayName:"TextTile__Content",componentId:"sc-11io6mr-1"})(["flex:1 0 0%;display:flex;flex-direction:column;justify-content:space-between;"]),t0=w.Ay.div.withConfig({displayName:"TextTile__Title",componentId:"sc-11io6mr-2"})([""," "," "," font-size:0.875rem;line-height:1.25;margin-bottom:24px;color:",";@media ","{font-size:1rem;letter-spacing:0.01em;}"],e0.fm,(0,j.cn)(),(0,j.ji)(),S.a.Text,C.bp.p),t1=w.Ay.ul.withConfig({displayName:"TextTile__List",componentId:"sc-11io6mr-3"})([""," display:flex;flex-direction:column;row-gap:1rem;padding-top:0.375rem;margin-bottom:14px;list-style:none;counter-reset:step-counter;"],e0.fm),t2=w.Ay.li.withConfig({displayName:"TextTile__Item",componentId:"sc-11io6mr-4"})(["display:flex;font-size:0.75rem;line-height:1.4;letter-spacing:0.01em;color:",";@media ","{font-size:0.875rem;}&:before{height:1.75rem;width:1.75rem;flex-shrink:0;border-radius:50%;display:flex;justify-content:center;align-items:center;content:counter(step-counter,upper-latin);counter-increment:step-counter;margin-right:0.75rem;margin-top:-0.375rem;line-height:1.25;color:",";list-style-type:upper-latin;background-color:",";"," @media ","{height:2rem;width:2rem;}}"],S.a.Text,C.bp.p,S.a.White,({theme:e})=>(0,j.sG)(e),(0,j.ji)(),C.bp.p),t5=w.Ay.div.withConfig({displayName:"TextTile__Description",componentId:"sc-11io6mr-5"})(["font-size:0.75rem;line-height:1.3;a{"," display:inline;}"],j.tP),t4=w.Ay.div.withConfig({displayName:"TextTile__ButtonContainer",componentId:"sc-11io6mr-6"})(["display:flex;align-items:center;justify-content:center;margin-top:20px;",""],({$isVisible:e})=>e?j.qG:j.Xn),t3=({stepIndex:e,title:t,list:i,description:n,buttonLabel:o})=>{let{currentStep:r,setStep:a,nextStep:l}=eW(),s=[e,e+1].includes(r),c=r>=e+1,p={transform:{a:e=>{var{href:t="",children:i}=e,n=tX(e,["href","children"]);return(0,d.jsx)("a",Object.assign({href:t,target:"blank"},n,{tabIndex:s?0:-1,children:i}))}}};return(0,d.jsxs)(tY,{isActive:s,$isCollapsed:c,onClick:()=>a(e),children:[(0,d.jsxs)(tZ,{children:[(0,d.jsx)(t0,{children:(0,d.jsx)(eK.E,{children:t})}),(0,d.jsx)(t1,{children:i.map((e,t)=>(0,d.jsx)(t2,{children:(0,d.jsx)(eK.E,{options:p,children:e})},t))}),(0,d.jsx)(t5,{children:(0,d.jsx)(eK.E,{options:p,children:n})})]}),(0,d.jsx)(t4,{$isVisible:s&&!c,children:(0,d.jsx)(eC.$n,{label:o,size:eC.Mp.Small,variant:eC.Ak.Outline,onClick:l})})]})},t8=w.Ay.video.withConfig({displayName:"Video__StyledVideo",componentId:"sc-1a1er97-0"})(["",";z-index:1;object-fit:cover;"],j.Pu),t6=({poster:e,src:t,caption:i,isReset:n,isFocusable:o=!0})=>{let r=(0,p.useRef)(null),{0:a,1:l}=(0,p.useState)(!1),{0:s,1:c}=(0,p.useState)(!1),u=(0,e$.w)();return(0,p.useEffect)(()=>{s&&r.current&&(r.current.pause(),r.current.currentTime=0,c(!1))},[n]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(e8,{isVisible:!a}),(0,d.jsxs)(e6,{children:[(0,d.jsx)(e9,{$isVisible:a&&!s,children:(0,d.jsx)(to.x,{isLoading:!1,onPlay:()=>{var e,t;return c(!0),null==(t=null==(e=r.current)?void 0:e.play)?void 0:t.call(e)},tabIndex:o?0:-1})}),t&&!u&&(0,d.jsxs)(t8,{preload:"metadata",ref:r,controls:s,playsInl
1ine:!0,onLoadedMetadata:()=>{l(!0)},poster:e,children:[(0,d.jsx)("source",{src:t,type:"video/mp4"}),i&&(0,d.jsx)("track",{src:i.src,kind:"captions",srcLang:i.srcLang,label:i.label})]})]})]})};var t7=i(9867),t9=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let ie=w.Ay.div.withConfig({displayName:"VideoApplication__Wrapper",componentId:"sc-1uheyxn-0"})(["width:100%;display:flex;justify-content:center;align-items:center;"]),it=w.Ay.div.withConfig({displayName:"VideoApplication__Container",componentId:"sc-1uheyxn-1"})(["margin-bottom:calc(6 * ",");position:relative;z-index:",';transform:translateX(100%);opacity:0;width:100%;max-width:488px;transition:transform 0.7s cubic-bezier(0.83,0,0.17,1),opacity 0.25s linear;&:before{content:"";position:fixed;top:0;left:0;bottom:0;right:0;background-color:',";z-index:",";opacity:",";pointer-events:",";backdrop-filter:blur(12px);transition:opacity 0.25s ease-in-out,background-color 0.25s ease-in-out;}",""],A.X,({theme:e})=>e.isActive?20:3,(0,_.B3)(S.a.Black,.65),({theme:e})=>e.isActive?0:-1,({theme:e})=>+!!e.isActive,({theme:e})=>e.isActive?"all":"none",({theme:e})=>e.isLoaded&&(0,w.AH)(["transform:none;opacity:1;transition-delay:0.5s;"])),ii=(0,w.Ay)(eI).withConfig({displayName:"VideoApplication__Title",componentId:"sc-1uheyxn-2"})(["position:relative;z-index:1;text-align:center;color:",";"],({theme:e})=>e.isActive?S.a.White:(0,j.EA)(e)),io=(0,w.Ay)(eH.In).withConfig({displayName:"VideoApplication__ButtonIcon",componentId:"sc-1uheyxn-3"})(["height:16px;width:16px;fill:",";"],S.a.Label),ir=w.Ay.button.withConfig({displayName:"VideoApplication__Button",componentId:"sc-1uheyxn-4"})([""," "," position:fixed;top:8px;z-index:1;height:32px;width:32px;border-radius:50%;background-color:",";box-shadow:0 0 32px rgba(0,0,0,0.15);",""],j.GS,j.tP,S.a.White,({$isVisible:e})=>e?j.qG:j.Xn),ia=(0,w.Ay)(ir).withConfig({displayName:"VideoApplication__BackButton",componentId:"sc-1uheyxn-5"})(["left:16px;"]),il=(0,w.Ay)(ir).withConfig({displayName:"VideoApplication__CloseButton",componentId:"sc-1uheyxn-6"})(["right:16px;","{height:10px;width:10px;}"],io),is=w.Ay.div.withConfig({displayName:"VideoApplication__Tiles",componentId:"sc-1uheyxn-7"})(["display:flex;column-gap:24px;transition:transform 0.7s cubic-bezier(0.83,0,0.17,1);"," ",";"],({$activeStep:e})=>(0,w.AH)(["transform:translateX(calc(","% - ","px));"],-100*e,24*e),({$isClosing:e})=>e&&(0,w.AH)(["transition-duration:1.4s;"]));!function(e){e.video_copied_pipe_s3="video_copied_pipe_s3",e.video_copied_s3="video_copied_s3"}(s||(s={}));let ic=({className:e,jobId:t,locale:i,headline:n,introSection:o,questionSection:r,finalSection:a})=>{let{pageUiEnvironment:{window:l}}=(0,v.p)(),{frontendOAuthClientId:c}=(0,f.N)(),{storeVideo:u}=(()=>{let[{loading:e,error:t},i]=(0,h.bP)({url:`${m.Q}/widgets/application/video`,method:"post"},{manual:!0,withAccessToken:!0});return{storeVideo:(0,p.useCallback)(e=>i({data:Object.assign({},e)}).then(({data:e})=>{var t;return(null==(t=e.data.token)?void 0:t.expires_in)&&Z.F.set(e.data.token),e.data.video}),[i]),error:t,isLoading:e}})(),{removeVideo:g}=(()=>{let[{loading:e,error:t},i]=(0,h.bP)({url:`${m.Q}/widgets/application/video`,method:"delete"},{manual:!0});return{removeVideo:(0,p.useCallback)(e=>i({data:e}).then(({data:e})=>e),[i]),error:t,isLoading:e}})(),{currentStep:y,setStep:_,prevStep:j}=eW(),S=(0,p.useRef)({}),{0:C,1:A}=(0,p.useState)(!1),{0:k,1:I}=(0,p.useState)(),O=(0,H.z)(),E=(0,e$.w)(),N=(0,p.useRef)(null),P=(0,p.useRef)((0,ez.A)()),{0:T}=(0,p.useState)((0,q.SE)(m.Q)),{sendJsonMessage:D,lastJsonMessage:R,readyState:L}=(0,eM.Ay)(`${"http:"===O.protocol?"ws://":"wss://"}${T}/ws`,{shouldReconnect:()=>!0},!b.k),F=(0,p.useMemo)(()=>[1,2].includes(y),[y]);return(0,eq._)("Escape",{onPressDown:()=>_(0)}),(0,p.useEffect)(()=>{E||A(!0)},[E]),(0,p.useEffect)(()=>{var e;if(!l||((e=>{var t;null==(t=null==l?void 0:l.parent)||t.postMessage({eventName:x.N,payload:{value:e}},"*")})(!F),!F))return;let t=null==(e=N.current)?void 0:e.getBoundingClientRect();if(!t)return;
1let i=(l.pageYOffset||document.documentElement.scrollTop)+t.top+t.height/2-l.innerHeight/2;l.scrollTo({top:i,behavior:"smooth"})},[F]),(0,p.useEffect)(()=>{var e;null!==R&&R.event===s.video_copied_s3&&(S.current=R.data,u({userId:c,jobId:t,redirect_uri:l.location.href,recordedVideoId:R.data.id,data:{videoId:R.data.videoName,headlineQuestion:[{locale:i,headline:(0,B.Pm)(r.title||"")}],subQuestions:[{locale:i,questions:null==(e=r.list)?void 0:e.map(e=>(0,B.Pm)(e))}],portraitMode:!1}}).then(e=>{I(Object.assign(Object.assign({},e),{recordedVideoId:R.data.id}))}).catch(e=>{var t,i;alert(`Store Video Error: ${null==(i=null==(t=e.response)?void 0:t.data)?void 0:i.errorMessage}`)}))},[R]),(0,p.useEffect)(()=>{L===eM.vj.OPEN&&D({connectionId:P.current,event:"ACTIVE_CONNECTION"})},[L,D]),(0,d.jsx)(w.NP,{theme:{isActive:F,isLoaded:C},children:(0,d.jsx)(ie,{className:e,children:(0,d.jsxs)(it,{children:[(0,d.jsx)(ia,{onClick:j,$isVisible:2===y,type:"button",children:(0,d.jsx)(io,{name:eJ.kj.ChevronLeft})}),(0,d.jsx)(il,{onClick:()=>_(0),$isVisible:F,type:"button",children:(0,d.jsx)(io,{name:eJ.kj.CancelSmall})}),(0,d.jsx)(ii,{children:n}),(0,d.jsxs)(is,{ref:N,$activeStep:y,$isClosing:!1,children:[(0,d.jsxs)(ti,{stepIndex:0,description:o.description,children:[o.mediaType===eB.z.SoftgardenVideo&&(0,d.jsx)(t6,{poster:o.sgPosterSrc,src:o.sgVideoSrc,ariaLabel:o.sgAriaLabel,isReset:0!==y,isFocusable:0===y,caption:o.caption}),o.mediaType===eB.z.Video&&(0,d.jsx)(t7.G,{src:o.videoLinkVideoSrc,originSrc:o.videoLinkOriginalSrc,posterSrc:o.videoLinkPosterSrc,isActive:0!==y}),o.mediaType===eB.z.Image&&(0,d.jsx)(e6,{children:(0,d.jsx)(e7,{src:o.imageSrc})})]}),(0,d.jsx)(t3,{stepIndex:1,title:r.title,list:r.list,description:r.description,buttonLabel:r.buttonLabel}),(0,d.jsx)(tQ,{stepIndex:2,applicationUserAccessTokenApiParams:{userId:c,jobId:t,redirect_uri:O.href},payload:{connectionId:P.current}}),(0,d.jsx)(tt,{stepIndex:3,onDeleteVideo:()=>(function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})})(void 0,void 0,void 0,function*(){var e,t;I(void 0);try{(null==k?void 0:k.recordedVideoId)&&(yield g({recordedVideoId:k.recordedVideoId,videoId:S.current.videoName,userId:c}))}catch(i){alert(`Delete Video Error: ${null==(t=null==(e=i.response)?void 0:e.data)?void 0:t.errorMessage}`)}}),children:(0,d.jsx)(t6,{poster:null==k?void 0:k.previewImageUrl,src:(null==k?void 0:k.videoUrl)||"",ariaLabel:a.ariaLabel,isReset:4!==y,isFocusable:3===y})})]})]})})})},id=e=>{var t=t9(e,[]);return(0,d.jsx)(eU,{children:(0,d.jsx)(ic,Object.assign({},t))})};var ip=i(20714),iu=i(56422),im=i(33844),ih=i(72752),ig=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})};let iv=!1;var ib=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})};let iy=(0,p.forwardRef)(({error:e,removeImportedData:t,setImportedData:i},o)=>{let{setValue:r}=(0,X.xW)(),{t:a}=(0,u.Bd)(),{frontendOAuthClientId:l,isBuilderEnv:s}=(0,f.N)(),{triggerPageEvent:c}=(0,et.K)(),{jobId:g,cv:v,dropzone:b}=ep(),{loadImportedUserData:x}=(e=>{let t=(0,H.z)(),i=(0,p.useRef)(null),o=(0,p.useRef)(),r=(0,p.useRef)(),{getUrlForImportUserDataFromProvider:a}=(()=>{let[{data:e,loading:t,error:i},n]=(0,h.bP)({url:`${m.Q}/widgets/application/import-user-data-provider`,method:"get"},{manual:!0,withAccessToken:!0});return{getUrlForImportUserDataFromProvider:(0,p.useCallback)(e=>n({params:e}).then(({data:e})=>{var t;return(null==(t=e.token)?void 0:t.expires_in)&&Z.F.set(e.token),e.data}),[n]),data:e,error:i,isLoading:t}})(),{importProfile:l}=(()=>{let[{data:e,loading:t,error:i},n]=(0,h.bP)({url:`${m.Q}
1/widgets/application/imported-profile`,method:"get"},{manual:!0,withAccessToken:!0});return{importProfile:(0,p.useCallback)(e=>n({params:e}).then(({data:e})=>e.data),[n]),data:e,error:i,isLoading:t}})(),s=(0,p.useCallback)(()=>ig(void 0,void 0,void 0,function*(){var t,i;try{let t,i=yield l({jobId:e});if(i.profileImageUrl)try{t=yield(0,ih.yE)(i.profileImageUrl)}catch(e){}o.current={applicationData:i.applicationData,profileImage:t}}catch(e){r.current=e.response?Error(null==(i=null==(t=e.response)?void 0:t.data)?void 0:i.errorMessage):e}}),[]);return{loadImportedUserData:l=>ig(void 0,[l],void 0,function*({providerId:l,userId:c}){var d,p,u;o.current=void 0,r.current=void 0,i.current=null==window?void 0:window.open("about:blank","","scrollbars=1,width=640,height=940");try{let{url:d,aid:p}=yield a({userId:c,providerId:l,jobId:e,redirect_uri:t.href});if(!i.current)throw Error();return(!n||iv)&&(iv=!1,(n=new BroadcastChannel(y.GF)).onmessage=function(e){var t,i;e.isTrusted&&e.data===`${y.i}_${p}`?(null==(t=null==n?void 0:n.postMessage)||t.call(n,`${y.px}_${p}`),null==(i=null==n?void 0:n.close)||i.call(n),iv=!0,s()):console.log("Received broadcast event",e)}),i.current.location.href=d,new Promise((e,t)=>{let i=setInterval(()=>{r.current?(t(r.current),clearInterval(i)):o.current&&(e(o.current),clearInterval(i))},100)})}catch(e){throw null==(d=i.current)||d.close(),Error(null==(u=null==(p=e.response)?void 0:p.data)?void 0:u.errorMessage)}})}})(g),{parseCV:_}=(()=>{let[{loading:e,error:t},i]=(0,h.bP)({url:`${m.Q}/widgets/application/cv`,method:"post"},{manual:!0,withAccessToken:!0});return{parseCV:(0,p.useCallback)(({cv:e,userId:t,jobId:n,redirect_uri:o})=>{let r=new FormData;return r.append("cv",e),r.append("userId",t),r.append("redirect_uri",o),r.append("jobId",n),i({data:r,headers:{"Content-Type":"multipart/form-data"}}).then(({data:e})=>{var t;return(null==(t=e.token)?void 0:t.expires_in)&&Z.F.set(e.token),{data:e}})},[i]),error:t,isLoading:e}})(),{removeCV:w,isLoading:j}=(()=>{let[{loading:e,error:t},i]=(0,h.bP)({url:`${m.Q}/widgets/application/cv`,method:"delete"},{manual:!0,withAccessToken:!0});return{removeCV:(0,p.useCallback)(({userId:e,jobId:t,redirect_uri:n})=>i({data:{userId:e,jobId:t,redirect_uri:n}}).then(({data:e})=>e),[i]),error:t,isLoading:e}})(),{applicationImportProviders:S}=(({userId:e})=>{let[{data:t,loading:i,error:n},o]=(0,h.bP)({method:"get",url:`${m.Q}/widgets/application/import-providers`,params:{userId:e}});return{applicationImportProviders:t,refetch:o,error:n,isLoading:i}})({userId:l}),{0:C,1:A}=(0,p.useState)(),{0:k,1:I}=(0,p.useState)(void 0),O=(null==S?void 0:S.data.map(({id:e})=>e))||[];(0,p.useEffect)(()=>{I(j?iu.d.DOCUMENT:void 0)},[j]);let E=e=>ib(void 0,void 0,void 0,function*(){switch(I(e),e){case iu.d.DOCUMENT:yield T();break;case iu.d.LINKEDIN:case iu.d.XING:t()}A(void 0),I(void 0)}),N=()=>s?(P(),!1):(!C||!!confirm(a("widget.application.first_step.provider-import-confirmation")))&&(C&&E(C),!0),P=()=>c("restricted_event_in_the_builder",{widgetType:"application",eventName:"icon-for-get-user-data-click"}),T=()=>ib(void 0,void 0,void 0,function*(){try{yield w({jobId:g,userId:l,redirect_uri:window.location.href})}catch(e){console.log("[ERROR: handleRemoveCV]",e)}A(void 0),t()});return(0,p.useImperativeHandle)(o,()=>({clearCvConnector:T})),(0,d.jsx)(im.wz,{avaliableConnectors:[...O,iu.d.LINKEDIN],fileTypes:b.fileTypes,selectedConnector:C,languagesArray:v.languagesArray,loadingConnector:k,onChangeCV:e=>ib(void 0,void 0,void 0,function*(){if(e&&N()){r("cvLoading",!0),I(iu.d.DOCUMENT);try{let{data:{profileImage:t,applicationData:n}}=yield ib(void 0,void 0,void 0,function*(){return yield _({cv:e,jobId:g,userId:l,redirect_uri:window.location.href})}),o={cv:e,applicationData:n,profileImage:(0,ih.BF)(t)};i(o)}catch(t){console.error("[ERROR: handleChangeCV]",t),i({cv:e})}finally{A(iu.d.DOCUMENT),I(void 0),r("cvLoading",!1)}}}),onChangeLinkedIn:e=>{N()&&(i(e),A(iu.d.LINKEDIN))},onChangeProvider:e=>ib(void 0,void 0,void 0,function*(){if(N())try{let t=yield x({providerId:e,userId:l});i(t),A(e)}catch(e){alert("Error: failed to retrieve user data from provider")}}),onRemove:E,error:e})}),ix=w.Ay.div.withConfig({displayName:"FormFirstSection__Container",componentId:"sc-10nwr0p-0"})(["padding-bottom:","px;min-height:",";"],({$stepsEnable:e})=>e?48:24,({$stepsEnable:e})=>e?(0,j.bJ)(100):"auto"),i_=w.Ay.div.withConfig({displayName:"FormFirstSection__ConnectorsSection",componentId:"sc-10nwr0p-1"})(["padding:","px 0 48px;background-color:",";@media ","{padding-top:8px;}"],({$withSteps:e})=>e?48:24,S.a.White,C.bp.d),iw=w.Ay.div.withConfig({displayName:"FormFirstSection__ConnectorsContainer",componentId:"sc-10nwr0p-2"})([""]),ij=(0,w.Ay)(ek).withConfig({displayName:"FormFirstSection__ConnectorsHeaderLayout",componentId:"sc-10nwr0p-3"})(["margin-bottom:24px;"]),iS=(0,w.Ay)(ek).withConfig({displayName:"FormFirstSection__ConnectorsMainLayout",componentId:"sc-10nwr0p-4"})(["margin-bottom:",";"],(0,j.ls)(2)),iC=(0,w.Ay)(eL.$).withConfig({displayName:"FormFirstSection__FileListContainer",componentId:"sc-10nwr0p-5"})(["margin-bottom:",";"],(0,j.ls)(4)),iA=w.Ay.div.withConfig({displayName:"FormFirstSection__DropzoneContainer",componentId:"sc-10nwr0p-6"})(["display:flex;justify-content:center;align-items:center;"]),ik=w.Ay.div.withConfig({displayName:"FormFirstSection__VideoAppSection",componentId:"sc-10nwr0p-7"})(["max-width:100%;padding-top:",";"],(0,j.ls)(6)),iI=(0,w.Ay)(ek).withConfig({displayName:"FormFirstSection__CoverletterContainer",componentId:"sc-10nwr0p-8"})(["padding-bottom:0.75rem;"]),iO=(0,p.forwardRef)((e,t)=>{let{t:i}=(0,u.Bd)(),{locale:n}=(0,f.N)(),{isActiveSteps:r,jobId:l,videoApplication:s,cv:c,attachments:m,coverLetter:h,dropzone:g,customFormData:v,setFistViewableSection:b}=ep(),y=(0,p.useRef)({}),x=(0,p.useRef)(null),{scrollTo:_}=(0,ef.L)(),{ref:w}=(0,ex.Wx)({threshold:.5,onChange:b}),{register:j,watch:S,control:C,getValues:A,setValue:k,formState:{errors:I,isSubmitted:O}}=(0,X.xW)(),{fields:E,append:N,remove:P}=(0,X.jz)({control:C,name:"attachments"}),T=c.visible||m.visible&&!m.isBelowPersonalData,D=S("cv"),R=S("profileImage"),L=(0,ev.lB)(()=>{let e=[];return D&&e.push({id:"cv",data:D}),R&&e.push({id:"profileImage",dynamicContentAddition:!0,data:R}),e},[D,R]),F=m.isBelowPersonalData?L:[...L,...E],M=({cv:e,profileImage:t,applicationData:i,isShowExtraFields:n=!1}
1)=>{y.current=Object.assign({},i||{}),k("cv",e),k("profileImage",t),i&&k("applicationData",(0,ew.SY)(i,(0,ew.SY)(A("applicationData"),v.applicationData)),{shouldValidate:O}),c.required&&k("resumeUploaded",1,{shouldValidate:!0}),void 0!==n&&k("isShowExtraFields",n)},z=()=>{(0,ew.LP)(y.current||{}),k("cv",void 0),k("profileImage",void 0),k("applicationData",ey()(A("applicationData"),(0,ew.SY)(Object.assign({},y.current),v.applicationData),{arrayMerge:(e,t)=>t}),{shouldValidate:O}),c.required&&k("resumeUploaded",void 0,{shouldValidate:O}),k("isShowExtraFields",!1)};return(0,d.jsxs)(ix,{ref:(0,e_.P)([t,r?w:null]),$stepsEnable:r,children:[T&&(0,d.jsxs)(i_,{$withSteps:r,children:[c.visible?(0,d.jsx)(iS,{children:(()=>{var e;return(0,d.jsxs)(iw,{children:[(0,d.jsxs)(ij,{children:[c.headline&&(0,d.jsx)(eI,{children:c.headline}),c.subheadline&&(0,d.jsx)(eO,{$variant:a.Centered,children:c.subheadline}),c.required&&(0,d.jsx)(ej.U,Object.assign({tabIndex:-1,style:{width:0,height:0,background:"transparent",border:"none"},autoComplete:"resume-uploaded"},j("resumeUploaded",{required:i("widget.application.first_step.upload_resume_error_message")})))]}),(0,d.jsx)(iy,{ref:x,error:null==(e=I.resumeUploaded)?void 0:e.message,removeImportedData:z,setImportedData:M})]})})()}):m.visible&&!m.isBelowPersonalData?(0,d.jsx)(iw,{children:(0,d.jsx)(ij,{children:c.headline&&(0,d.jsx)(eI,{children:c.headline})})}):null,(0,d.jsxs)(ek,{children:[!!F.length&&(0,d.jsx)(iC,{title:m.title,fileList:F,onDelete:e=>{var t;let i=E.findIndex(({id:t})=>t===e.id);if(-1===i){if("profileImage"===e.id)return void k("profileImage",void 0);else if("cv"===e.id){null==(t=null==x?void 0:x.current)||t.clearCvConnector();return}}P(i)}}),m.visible&&!m.isBelowPersonalData&&(0,d.jsx)(iA,{children:(0,d.jsx)(eF.G,Object.assign({},g,{name:"attachments",onChange:e=>{N(e.map(e=>({data:e})))}}))})]})]}),(s.visible||h.visible||r)&&(0,d.jsxs)(ik,{children:[s.visible&&(0,d.jsx)(id,Object.assign({jobId:l,locale:n},s)),!s.visible&&h.visible&&(0,d.jsx)(iI,{children:(0,d.jsx)(ip.X,{Component:eS.T,name:"applicationData.coverLetterText",inputLabel:h.placeholder,rules:{required:h.required&&i("widget.application.first_step.covering_letter_error_message")},note:h.note})}),r&&(0,d.jsx)(eE,{children:(0,d.jsx)(eC.$n,{onClick:()=>_(o.Second),label:i("widget.application.first_step.btn_next_step")})})]})]})});iO.displayName="FormFirstSection";var iE=i(43603),iN=i(56458),iP=i(6962),iT=i(35382),iD=i(52116),iR=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})};let iL=({jobId:e,onDisableForm:t,value:i,label:n,name:o,error:r,autoComplete:l,onChange:s},c)=>{var g,v,b;let{frontendOAuthClientId:y}=(0,f.N)(),{t:x}=(0,u.Bd)(),{0:_,1:w}=(0,p.useState)(!1),{0:j,1:S}=(0,p.useState)(!1),{checkMailForExistence:C}=(()=>{let[{data:e,loading:t,error:i},n]=(0,h.bP)({url:`${m.Q}/widgets/application/email-exists`,method:"get"},{manual:!0});return{checkMailForExistence:(0,p.useCallback)(e=>n({params:e}).then(({data:e})=>e),[n]),data:e,error:i,isLoading:t}})(),{resetPassword:A,error:k}=(()=>{let[{data:e,loading:t,error:i},n]=(0,h.bP)({url:`${m.Q}/widgets/application/password`,method:"post"},{manual:!0});return{resetPassword:(0,p.useCallback)(e=>n({data:e}).then(({data:e})=>e),[n]),data:e,error:i,isLoading:t}})(),{signIn:I,error:O}=(()=>{let[{data:e,loading:t,error:i},n]=(0,h.bP)({url:`${m.Q}/widgets/application/sign-in`,method:"post"},{manual:!0,withAccessToken:!0});return{signIn:(0,p.useCallback)(e=>n({data:e}).then(({data:e})=>{var t;return(null==(t=e.data.token)?void 0:t.expires_in)&&Z.F.set(e.data.token),e}),[n]),data:e,error:i,isLoading:t}})(),{register:E,handleSubmit:N,formState:P}=(0,X.mN)({defaultValues:{uname:"",password:""}}),{register:T,setError:D,handleSubmit:R,formState:{errors:L}}=(0,X.mN)({defaultValues:{email:""}});(0,p.useEffect)(()=>{k&&D("email",{type:"api_response",message:k.message})},[k]);let F=()=>{S(!1),w(!0)},M=(0,p.useCallback)(e=>iR(void 0,[e],void 0,function*({email:e}){try{yield A({userId:y,email:e}),F()}catch(e){}}),[]),z=(0,p.useCallback)(i=>iR(void 0,void 0,void 0,function*(){try{let n=yield I(Object.assign(Object.assign({},i),{jobId:e,userId:y}));w(!1),n.data.isApplicantHasAlreadyApplied||null==t||t(!1)}catch(e){}}),[e,y,I,t]);return(0,p.useEffect)(()=>{(null==i?void 0:i.length)&&String(i).toLowerCase().match(iE.H)?C({userId:y,email:i}).then(e=>{null==t||t(e.data.isExist),w(e.data.isExist),S(!1)}).catch(()=>{}):(null==t||t(!0),w(!1),S(!1))},[i]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(iT.z,{error:_||j?"":null==r?void 0:r.message,children:(0,d.jsx)(iP.k,{label:n,name:o,onChange:s,autoComplete:l,ref:c})})})}),_&&(0,d.jsxs)(eN,{children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{children:x("widget.application.first_step.sign_in_form_title")}),(0,d.jsx)(eO,{$variant:a.Small,children:x("widget.application.second_step.sign_in_form_description")})]}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(g=P.errors.uname)?void 0:g.message,children:(0,d.jsx)(iP.k,Object.assign({label:x("widget.application.second_step.sign_in_form_uname_placeholder")},E("uname",{required:x("widget.application.second_step.sign_in_form_user_name_error_message")})))})})}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(v=P.errors.password)?void 0:v.message,children:(0,d.jsx)(iP.k,Object.assign({type:"password",label:x("widget.application.second_step.sign_in_form_password_placeholder")},E("password",{required:x("widget.application.second_step.sign_in_form_password_error_message")})))})})}),O&&(0,d.jsx)(iT.z,{error:x("widget.application.first_step.sign_in_form_error_user_name_or_password")}
1),(0,d.jsx)(eE,{children:(0,d.jsx)(eC.$n,{label:x("widget.application.second_step.sign_in_form_submit_btn"),onClick:N(z)})}),(0,d.jsx)(eP,{children:(0,d.jsx)(iD.z,{onClick:()=>{w(!1),S(!0)},label:x("widget.application.second_step.sign_in_form_tooltip_title"),tooltip:x("widget.application.second_step.sign_in_form_tooltip_description")})})]}),j&&(0,d.jsxs)(eN,{children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{children:x("widget.application.second_step.reset_password_form_title")}),(0,d.jsx)(eO,{$variant:a.Small,children:x("widget.application.second_step.reset_password_form_description")})]}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(b=L.email)?void 0:b.message,children:(0,d.jsx)(iP.k,Object.assign({label:x("widget.application.second_step.sign_in_form_uname_placeholder")},T("email",{required:x("widget.application.second_step.reset_password_form_error_message"),pattern:{value:iE.H,message:x("widget.application.second_step.reset_password_form_error_message")}})))})})}),(0,d.jsx)(eE,{children:(0,d.jsx)(eC.$n,{label:x("widget.application.second_step.reset_password_form_submit_btn"),onClick:R(M)})}),(0,d.jsx)(eP,{children:(0,d.jsx)(iD.z,{onClick:F,label:x("widget.application.second_step.reset_password_form_cancel_btn")})})]})]})};iL.displayName="EmailFieldInput";let iF=(0,p.forwardRef)(iL);var iM=i(38038),iz=i(37850);let i$=w.Ay.div.withConfig({displayName:"FormFooter__Container",componentId:"sc-1t9wyip-0"})(["margin-top:48px;"]),iq=w.Ay.div.withConfig({displayName:"FormFooter__CheckboxContainer",componentId:"sc-1t9wyip-1"})(["display:flex;flex-direction:column;row-gap:24px;"]),iB=w.Ay.span.withConfig({displayName:"FormFooter__Label",componentId:"sc-1t9wyip-2"})(["display:block;position:relative;font-size:0.75rem;line-height:1.33;user-select:none;color:",";&&{a{",";display:inline;}}"],S.a.Label,j.tP),iV=()=>{let{t:e}=(0,u.Bd)(),{privacyPolicy:t,feedbackConsent:i}=ep(),{0:n,1:o}=(0,p.useState)(!1),{withCaptcha:r}=ep(),{register:a,setValue:l,watch:s,formState:{errors:c}}=(0,X.xW)();return r&&a("f-captcha-solution",{required:!0}),(0,p.useEffect)(()=>{n||o(!!s("applicationData.email"))},[s("applicationData.email")]),(0,d.jsxs)(i$,{children:[(0,d.jsxs)(iq,{children:[(0,d.jsx)(iB,{children:(0,d.jsx)("span",{children:t&&(0,d.jsx)(eK.E,{children:t})})}),i.visible&&(0,d.jsx)(iT.z,{children:(0,d.jsx)(iM.S,Object.assign({label:i.label},a("applicationData.applicationFeedbackConsent")))}),(0,d.jsx)(iB,{children:(0,d.jsx)("span",{children:e("widget.application.footer.mandatory_description")})}),r&&(0,d.jsx)(iz.K,{visible:n,onSolved:e=>l("f-captcha-solution",e,{shouldValidate:!0})})]}),(0,d.jsx)(eE,{children:(0,d.jsx)(eC.$n,{disabled:s("cvLoading"),type:"submit",label:e("widget.application.second_step.sign_in_form_submit_btn")})})]})},iU=w.Ay.div.withConfig({displayName:"FormCard__Container",componentId:"sc-11wxgl8-0"})(["display:flex;flex-direction:column;background-color:",";"," padding:16px 52px 16px 16px;position:relative;@media ","{padding:20px 52px 20px 20px;}"],S.a.White,(0,j.hD)(A.kM,A.Sw),C.bp.p),iW=w.Ay.span.withConfig({displayName:"FormCard__FormCardTopLine",componentId:"sc-11wxgl8-1"})(["display:block;min-height:1.5rem;font-size:0.75rem;line-height:1.33;padding-bottom:0.5rem;"," @media ","{font-size:0.875rem;}"],(0,j.ji)(),C.bp.p),iH=w.Ay.span.withConfig({displayName:"FormCard__FormCardTitle",componentId:"sc-11wxgl8-2"})(["display:block;font-size:1.125rem;line-height:1.22;",""],(0,j.ji)()),iJ=w.Ay.span.withConfig({displayName:"FormCard__FormCardSubtitle",componentId:"sc-11wxgl8-3"})(["display:block;margin-top:0.25rem;font-size:0.875rem;line-height:1.28;color:",";@media ","{font-size:1rem;margin-top:0.5rem;}"],S.a.Label,C.bp.p),iK=w.Ay.span.withConfig({displayName:"FormCard__FormCardDescription",componentId:"sc-11wxgl8-4"})(["display:block;margin-top:0.5rem;font-size:0.75rem;line-height:1.33;color:",";@media ","{margin-top:1rem;font-size:0.875rem;}"],S.a.Label,C.bp.p),iG=w.Ay.button.withConfig({displayName:"FormCard__EditButton",componentId:"sc-11wxgl8-5"})([""," "," align-items:center;justify-content:center;position:absolute;top:16px;right:12px;width:28px;height:28px;transition:opacity ",";&:hover{opacity:0.8;}"],j.tP,j.GS,A.xf),iQ=(0,w.Ay)(eH.In).withConfig({displayName:"FormCard__EditIcon",componentId:"sc-11wxgl8-6"})(["fill:",";"],S.a.Label),iX=({onEdit:e,children:t})=>(0,d.jsxs)(iU,{children:[(0,d.jsx)(iG,{type:"button",onClick:t=>{t.stopPropagation(),t.preventDefault(),e()},children:(0,d.jsx)(iQ,{name:eJ.kj.Pencil})}),t]});var iY=i(16258);let iZ=w.Ay.div.withConfig({displayName:"ModalLayout__Container",componentId:"sc-1aux3hv-0"})(["flex:initial;pointer-events:none;"]),i0=w.Ay.div.withConfig({displayName:"ModalLayout__Inner",componentId:"sc-1aux3hv-1"})(["position:relative;pointer-events:initial;background:",";border-radius:0.5rem;padding:4rem 1rem 2rem;width:100%;@media ","{padding:4rem 2rem 2rem;}
1"],S.a.Background,C.bp.p),i1=w.Ay.button.withConfig({displayName:"ModalLayout__CloseButton",componentId:"sc-1aux3hv-2"})([""," "," position:absolute;top:8px;right:8px;z-index:1;border-radius:50%;height:32px;width:32px;background-color:",";box-shadow:0 0 32px rgba(0,0,0,0.15);"],j.GS,j.tP,S.a.White),i2=(0,w.Ay)(eH.In).withConfig({displayName:"ModalLayout__CancelIcon",componentId:"sc-1aux3hv-3"})(["height:10px;width:10px;fill:",";"],S.a.Label),i5=w.Ay.div.withConfig({displayName:"ModalLayout__View",componentId:"sc-1aux3hv-4"})([""]),i4=({children:e,onClose:t})=>{let i=(0,p.useRef)(null);return(0,eq._)("Escape",{onPressDown:t}),(0,d.jsx)(iZ,{children:(0,d.jsxs)(i0,{ref:i,children:[(0,d.jsx)(i1,{onClick:t,children:(0,d.jsx)(i2,{name:eJ.kj.CancelSmall,size:eJ.lK.Medium})}),(0,d.jsx)(i5,{children:e})]})})};var i3=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let i8=(0,w.Ay)(iY.a).withConfig({displayName:"FormModal__StyledModal",componentId:"sc-1arf51o-0"})(["right:0;width:auto;@media ","{left:416px;}@media ","{left:480px;}@media ","{left:512px;}@media ","{left:576px;}@media ","{left:1024px;}"],C.bp.d,C.bp.d_l,C.bp.d_xl,C.bp.hd,C.bp.qhd),i6=e=>{var{children:t}=e,i=i3(e,["children"]);return(0,d.jsx)(i8,Object.assign({size:iY.r.Medium},i,{children:(0,d.jsx)(i4,{onClose:i.onClose,children:t})}))},i7=w.Ay.div.withConfig({displayName:"FormList__List",componentId:"sc-vt8ne8-0"})(["display:flex;flex-direction:column;row-gap:",";"],(0,j.ls)(3));function i9({items:e,onSubmit:t,onRemove:i,CardComponent:n,FormComponent:o,FooterComponent:r}){let{0:a,1:l}=(0,p.useState)(void 0),{0:s,1:c}=(0,p.useState)(!1),u=e=>{l(e),c(!0)};return(0,d.jsxs)(d.Fragment,{children:[e.length>0&&(0,d.jsx)(i7,{children:e.map(e=>(0,d.jsx)(n,{item:e,onEdit:u},e.id))}),(0,d.jsx)(i6,{isOpen:s,onClose:()=>{c(!1)},onCloseEnd:()=>{l(void 0)},children:(0,d.jsx)(o,{item:a,isVisible:s,onSubmit:e=>{t(e),c(!1)},onRemove:e=>{e&&i(e),c(!1)}})}),(0,d.jsx)(r,{onAddNew:()=>{c(!0)}})]})}var ne=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};!function(e){e.Solid="Solid",e.Outline="Outline"}(c||(c={}));let nt=(0,w.AH)(["border-color:",";"],S.a.Error),ni=w.Ay.input.withConfig({displayName:"Datepicker__Input",componentId:"sc-1bvsl0x-0"})(["",""],({theme:e})=>(0,w.AH)([""," ",";",";",";width:100%;appearance:none;line-height:1;transition:border-color ",",background-color ",";"," &::placeholder{color:",";}&:disabled{background-color:transparent;color:transparent;border:2px solid ",";}&::-webkit-calendar-picker-indicator{cursor:pointer;opacity:1;filter:invert(0.6);}"],j.m1,j.tP,(0,w.AH)(["padding:0 1rem;height:2.5rem;font-size:1rem;"," @media ","{padding:0 1.25rem;height:3.25rem;font-size:1.125rem;}"],(0,j.hD)(A.kM,A.Sw),C.bp.t),(e=>{switch(e){case c.Solid:return(0,w.AH)(["background-color:",";color:",";border:1px solid transparent;"],S.a.White,S.a.Text);case c.Outline:return(0,w.AH)(["background-color:",";color:",";border:1px solid ",";"],(0,_.B3)(S.a.White,.25),S.a.Text,(0,_.B3)(S.a.White,.5))}})(e.variant),A.xf,A.xf,e.isError&&nt,S.a.Label,(0,_.B3)(S.a.White,.5))),nn=(0,p.forwardRef)((e,t)=>{var{variant:i=c.Solid,label:n,ariaLabel:o,error:r,isRequired:a=!1}=e,l=ne(e,["variant","label","ariaLabel","error","isRequired"]);let s=a?`${n}*`:n,p=!!r;return(0,d.jsx)(w.NP,{theme:{variant:i,isError:p},children:(0,d.jsx)(ni,Object.assign({type:"date",ref:t,placeholder:s||"yyyy-mm-dd","aria-label":o||n,"aria-invalid":p,"aria-errormessage":r},l))})});nn.displayName="Datepicker";var no=i(26344);let nr=w.Ay.div.withConfig({displayName:"FormSecondSectionExtraData__Container",componentId:"sc-fnqokx-0"})(["display:flex;flex-direction:column;"]),na=w.Ay.div.withConfig({displayName:"FormSecondSectionExtraData__Item",componentId:"sc-fnqokx-1"})(["margin-top:",";"],(0,j.ls)(6)),nl=w.Ay.div.withConfig({displayName:"FormSecondSectionExtraData__Footer",componentId:"sc-fnqokx-2"})(["display:flex;justify-content:center;margin-top:",";"],(0,j.ls)(3)),ns=w.Ay.div.withConfig({displayName:"FormSecondSectionExtraData__EditFormButtonContainer",componentId:"sc-fnqokx-3"})(["display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:calc(4 * ",");"],A.X),nc=w.Ay.div.withConfig({displayName:"FormSecondSectionExtraData__FormWrapper",componentId:"sc-fnqokx-4"})(["@media ","{min-width:calc(100vw - 3rem);}@media ","{min-width:calc(374px - 2rem);}@media ","{min-width:calc(406px - 4rem);}@media ","{min-width:calc(460px - 4rem);}"],C.bp.i,C.bp.sm_l,C.bp.p,C.bp.t),nd=e=>{let t=(0,p.useRef)(!0);(0,p.useEffect)(()=>{var i;!e!==t.current&&(t.current=!e,null==(i=null==window?void 0:window.parent)||i.postMessage({eventName:x.N,payload:{value:!e}},"*"))},[e])},np=({languagesData:e,languagesSkillData:t,item:i,onEdit:n})=>{let o=null==e?void 0:e[i.locale];if(!o)return null;let r=(null==i?void 0:i.skill)?null==t?void 0:t[null==i?void 0:i.skill]:"";return(0,d.jsxs)(iX,{onEdit:()=>n(i),children:[o&&(0,d.jsx)(iH,{children:o}),r&&(0,d.jsx)(iJ,{children:r})]})},nu={id:"",locale:"",skill:""},nm=({isVisible:e,languagesData:t,languagesSkillData:i,item:n,onSubmit:o,onRemove:r})=>{var a,l;let{t:s}=(0,u.Bd)(),{register:c,reset:m,watch:h,handleSubmit:f,formState:{errors:g}}=(0,X.mN)({defaultValues:n||nu});(0,p.useEffect)(()=>{m(n||nu)},[n,m]),nd(e);let v=Object.entries(t||{}).map(([e,t])=>({value:e,label:t})),b=Object.entries(i||{}).map(([e,t])=>({value:e,label:t}));return(0,d.jsxs)(nc,{children:[(0,d.jsx)(eI,{children:s("widget.application.second_step.extra_data_edit_experiences_title")}),(0,d.jsxs)(eT,{children:[(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(iT.z,{error:null==(a=g.locale)?void 0:a.message,children:(0,d.jsx)(iN.l,Object.assign({options:v,label:s("widget.application.second_step.extra_data_form_language_name_placeholder")},c("locale",{required:s("widget.application.second_step.extra_data_form_language_name_error_message")}),{value:h("locale"),clearable:!1,menuZIndex:201,muiView:!0}))})}),(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(iT.z,{error:null==(l=g.locale)?void 0:l.message,children:(0,d.jsx)(iN.l,Object.assign({options:b,label:s("widget.application.second_step.extra_data_form_language_proficiency_placeholder")},c("skill",{required:s("widget.application.second_step.extra_data_form_language_proficiency_error_message")}),{value:h("skill"),clearable:!1,menuZIndex:201,muiView:!0}))})})]}),(0,d.jsxs)(ns,{children:[(0,d.jsx)(iD.z,{onClick:()=>r(n),label:s("widget.application.second_step.extra_data_form_delete_experience_btn")}),(0,d.jsx)(eC.$n,{label:s("widget.application.second_step.extra_data_form_save_btn"),onClick:f(e=>{o(e)})})]})]})},nh=({item:e,onEdit:t})=>{let{t:i}=(0,u.Bd)(),{locale:n}=(0,f.N)(),o=new Intl.DateTimeFormat(n,{month:"long",year:"numeric"}),r=(null==e?void 0:e.startDate)?o.format(new Date(e.startDate)):e.startDate,a=(null==e?void 0:e.isCurrent)?i("widget.application.second_step.extra_data_card_date_now"):(null==e?void 0:e.endDate)?o.format(new Date(e.endDate)):e.endDate;return(0,d.jsxs)(iX,{onEdit:()=>t(e),children:[(0,d.jsx)(iW,{children:`${r} - ${a}`}),e.company&&(0,d.jsx)(iH,{children:e.company}),e.title&&(0,d.jsx)(iJ,{children:e.title}),e.description&&(0,d.jsx)(iK,{children:e.description})]})},nf={id:"",startDate:"",endDate:"",company:"",title:"",description:"",isCurrent:!1},ng=({item:e,isVisible:t,onSubmit:i,onRemove:n})=>{var o,r,a,l;let{t:s}=(0,u.Bd)(),{watch:c,reset:m,register:h,handleSubmit:f,formState:{errors:g}}=(0,X.mN)({defaultValues:e||nf});return(0,p.useEffect)(()=>{m(e||nf)},[e,m]),nd(t),(0,d.jsxs)(nc,{children:[(0,d.jsx)(eI,{children:s("widget.application.second_step.extra_data_edit_experiences_title")}),(0,d.jsxs)(eT,{children:[(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(iT.z,{label:s("widget.application.second_step.extra_data_form_start_date"),error:null==(o=g.startDate)?void 0:o.message,children:(0,d.jsx)(nn,Object.assign({autoFocus:!0},h("startDate",{required:s("widget.application.second_step.extra_data_form_start_date_error_message")})))})}),(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(iT.z,{label:s("widget.application.second_step.extra_data_form_end_date"),renderRightContent:()=>(0,d.jsx)(no.d,Object.assign({label:s("widget.application.second_step.extra_data_form_date_now"),isReverseLayout:!0},h("isCurrent"))),children:(0,d.jsx)(nn,Object.assign({},h("endDate"),{disabled:c("isCurrent")}))})})]}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(r=g.company)?void 0:r.message,label:s("widget.application.second_step.extra_data_form_company_title"),children:(0,d.jsx)(iP.k,Object.assign({},h("company",{required:s("widget.application.second_step.extra_data_form_company_error_message")})))})})}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(a=g.title)?void 0:a.message,label:s("widget.application.second_step.extra_data_form_speciality_title"),children:(0,d.jsx)(iP.k,Object.assign({},h("title",{required:s("widget.application.second_step.extra_data_form_title_error_message")})))})})}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(l=g.description)?void 0:l.message,label:s("widget.application.second_step.extra_data_form_description_title"),children:(0,d.jsx)(iP.k,Object.assign({},h("description")))})})}),(0,d.jsxs)(ns,{children:[(0,d.jsx)(iD.z,{onClick:()=>n(e),label:s("widget.application.second_step.extra_data_form_delete_experience_btn")}),(0,d.jsx)(eC.$n,{label:s("widget.application.second_step.extra_data_form_save_btn"),onClick:f(e=>
1{e.endDate||(e.endDate=new Date().toISOString().slice(0,10)),i(e)})})]})]})},nv=({item:e,onEdit:t})=>{let{t:i}=(0,u.Bd)(),{locale:n}=(0,f.N)(),o=new Intl.DateTimeFormat(n,{month:"long",year:"numeric"}),r=(null==e?void 0:e.startDate)?o.format(new Date(e.startDate)):e.startDate,a=(null==e?void 0:e.isCurrent)?i("widget.application.second_step.extra_data_card_date_now"):(null==e?void 0:e.endDate)?o.format(new Date(e.endDate)):e.endDate;return(0,d.jsxs)(iX,{onEdit:()=>t(e),children:[(0,d.jsx)(iW,{children:`${r} - ${a}`}),e.degree&&(0,d.jsx)(iH,{children:e.degree}),e.field&&(0,d.jsx)(iJ,{children:e.field}),e.university&&(0,d.jsx)(iJ,{children:e.university}),e.specialization&&(0,d.jsx)(iK,{children:e.specialization})]})},nb={id:"",startDate:"",endDate:"",university:"",field:"",degree:"",specialization:"",isCurrent:!1},ny=({item:e,isVisible:t,onSubmit:i,onRemove:n})=>{var o,r,a,l,s;let{t:c}=(0,u.Bd)(),{reset:m,watch:h,register:f,handleSubmit:g,formState:{errors:v}}=(0,X.mN)({defaultValues:e||nb});return(0,p.useEffect)(()=>{m(e||nb)},[e,m]),nd(t),(0,d.jsxs)(nc,{children:[(0,d.jsx)(eI,{children:c("widget.application.second_step.extra_data_edit_educations_title")}),(0,d.jsxs)(eT,{children:[(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(iT.z,{label:c("widget.application.second_step.extra_data_form_start_date"),error:null==(o=v.startDate)?void 0:o.message,children:(0,d.jsx)(nn,Object.assign({},f("startDate",{required:c("widget.application.second_step.extra_data_form_start_date_error_message")})))})}),(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(iT.z,{label:c("widget.application.second_step.extra_data_form_end_date"),renderRightContent:()=>(0,d.jsx)(no.d,Object.assign({label:c("widget.application.second_step.extra_data_form_date_now"),isReverseLayout:!0},f("isCurrent"))),children:(0,d.jsx)(nn,Object.assign({},f("endDate"),{disabled:h("isCurrent")}))})})]}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(r=v.field)?void 0:r.message,label:c("widget.application.second_step.extra_data_form_field_of_study_title"),children:(0,d.jsx)(iP.k,Object.assign({},f("field",{required:c("widget.application.second_step.extra_data_form_field_of_study_error_message")})))})})}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(a=v.university)?void 0:a.message,label:c("widget.application.second_step.extra_data_form_school_name_title"),children:(0,d.jsx)(iP.k,Object.assign({},f("university",{required:c("widget.application.second_step.extra_data_form_university_error_message")})))})})}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(l=v.degree)?void 0:l.message,label:c("widget.application.second_step.extra_data_form_degree_title"),children:(0,d.jsx)(iP.k,Object.assign({},f("degree",{required:c("widget.application.second_step.extra_data_form_degree_error_message")})))})})}),(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(iT.z,{error:null==(s=v.degree)?void 0:s.message,label:c("widget.application.second_step.extra_data_form_notes_title"),children:(0,d.jsx)(eS.T,Object.assign({},f("specialization")))})})}),(0,d.jsxs)(ns,{children:[(0,d.jsx)(iD.z,{onClick:()=>n(e),label:c("widget.application.second_step.extra_data_form_delete_education_btn")}),(0,d.jsx)(eC.$n,{label:c("widget.application.second_step.extra_data_form_save_btn"),onClick:g(e=>{e.endDate||(e.endDate=new Date().toISOString().slice(0,10)),i(e)})})]})]})},nx=({onAddNew:e})=>{let{t}=(0,u.Bd)();return(0,d.jsx)(nl,{children:(0,d.jsx)(iD.z,{onClick:e,label:t("widget.application.second_step.extra_data_add_item_btn")})})},n_=({languagesData:e,languagesSkillData:t})=>{let{t:i}=(0,u.Bd)(),{control:n}
1=(0,X.xW)(),{fields:o,remove:r,replace:a}=(0,X.jz)({control:n,name:"applicationData.educations"}),{fields:l,replace:s,remove:c}=(0,X.jz)({control:n,name:"applicationData.experiences"}),{fields:p,replace:m,remove:h}=(0,X.jz)({control:n,name:"applicationData.languages"});return(0,d.jsxs)(nr,{children:[(0,d.jsxs)(na,{children:[(0,d.jsx)(eI,{children:i("widget.application.second_step.extra_data_title_educations")}),(0,d.jsx)(i9,{onSubmit:e=>{let t=o.concat();return e.id?t[o.findIndex(({id:t})=>t===e.id)]=e:t.push(e),a((0,U.I5)(t,"startDate"))},onRemove:e=>r(o.findIndex(({id:t})=>t===e.id)),items:o,CardComponent:nv,FormComponent:ny,FooterComponent:nx})]}),(0,d.jsxs)(na,{children:[(0,d.jsx)(eI,{children:i("widget.application.second_step.extra_data_title_experiences")}),(0,d.jsx)(i9,{onSubmit:e=>{let t=l.concat();return e.id?t[l.findIndex(({id:t})=>t===e.id)]=e:t.push(e),s((0,U.I5)(t,"startDate"))},onRemove:e=>c(l.findIndex(({id:t})=>t===e.id)),items:l,CardComponent:nh,FormComponent:ng,FooterComponent:nx})]}),(0,d.jsxs)(na,{children:[(0,d.jsx)(eI,{children:i("widget.application.second_step.extra_data_title_languages")}),(0,d.jsx)(i9,{onSubmit:e=>{let t=p.concat();if(e.id){let i=t.findIndex(({id:t})=>t===e.id);t[i]=e}else t.push(e);return m((0,U.I5)(t,"locale"))},onRemove:e=>h(l.findIndex(({id:t})=>t===e.id)),items:p,CardComponent:i=>(0,d.jsx)(np,Object.assign({languagesData:e,languagesSkillData:t},i)),FormComponent:i=>(0,d.jsx)(nm,Object.assign({languagesData:e,languagesSkillData:t},i)),FooterComponent:nx})]})]})},nw=w.Ay.div.withConfig({displayName:"FormSecondSection__AttachmentsContainer",componentId:"sc-i0dlo3-0"})(["margin-top:",";"],(0,j.ls)(3)),nj=(0,w.Ay)(eL.$).withConfig({displayName:"FormSecondSection__StyledFileList",componentId:"sc-i0dlo3-1"})(["margin-bottom:",";"],(0,j.ls)(6)),nS=(0,w.Ay)(eF.G).withConfig({displayName:"FormSecondSection__Dropzone",componentId:"sc-i0dlo3-2"})(["width:100%;"]),nC=(0,p.forwardRef)(({},e)=>{let{t}=(0,u.Bd)(),{scrollTo:i}=(0,ef.L)(),{jobId:n,formSecondSectionHeadline:r,isActiveSteps:a,salutation:l,academicTitle:s,attachments:c,dropzone:p,firstName:m,lastName:h,email:f,phone:g,applicationSource:v,disabledSecondStep:b,languagesData:y,languagesSkillData:x,showQuestions:_,setSecondViewableSection:w}=ep(),{ref:j}=(0,ex.Wx)({threshold:.5,onChange:w}),{register:S,watch:C,setValue:A,control:k,formState:{errors:I,isSubmitted:O}}=(0,X.xW)(),{fields:E,append:N,remove:P}=(0,X.jz)({control:k,name:"attachments"}),T=e=>{A("allowApplied",e?void 0:"1",{shouldValidate:O})};return b?null:(0,d.jsx)(eA,{ref:(0,e_.P)([e,a?j:null]),$stepsEnable:a,children:(0,d.jsxs)(ek,{children:[r&&(0,d.jsx)(eI,{children:r}),(l.visible||s.visible)&&(0,d.jsxs)(eT,{children:[l.visible&&(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(ip.X,{Component:iN.l,name:"applicationData.sex",inputLabel:l.placeholder,options:l.options,rules:{required:l.required&&l.errorMessage},muiView:!0})}),s.visible&&(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(ip.X,{Component:iN.l,name:"applicationData.academictitle",inputLabel:s.placeholder,options:s.options,rules:{required:s.required&&s.errorMessage},muiView:!0})})]}),(0,d.jsxs)(eT,{children:[(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(ip.X,{Component:iP.k,name:"applicationData.firstname",inputLabel:m.placeholder,autoComplete:"given-name",rules:{required:m.required&&m.errorMessage}})}),(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(ip.X,{Component:iP.k,name:"applicationData.lastname",inputLabel:h.placeholder,autoComplete:"family-name",rules:{required:h.required&&h.errorMessage}})})]}),(0,d.jsx)(ej.U,Object.assign({tabIndex:-1,autoComplete:"allow-applied"},S("allowApplied",{required:t("widget.application.second_step.application_has_already_submitted")}))),(0,d.jsx)(X.xI,{name:"applicationData.email",control:k,rules:{required:f.required&&f.errorMessage,pattern:{value:iE.H,message:f.errorMessage}},render:({field:e,fieldState:{error:t}})=>(0,d.jsx)(iF,Object.assign({jobId:n,label:f.placeholder,autoComplete:"email"},e,{error:t||I.allowApplied,onDisableForm:T}))}),g.visible&&(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{$colMd6:!0,children:(0,d.jsx)(ip.X,{Component:iP.k,name:"applicationData.phone",type:"tel",autoComplete:"tel",inputLabel:g.placeholder,rules:{required:g.required&&g.errorMessage,pattern:{value:iE.P,message:g.errorMessage}}})})}),v.visible&&(0,d.jsx)(eT,{children:(0,d.jsx)(eD,{children:(0,d.jsx)(ip.X,{Component:iN.l,name:"applicationData.applicationSource.id",input
1Label:v.placeholder,options:v.options,rules:{required:v.required&&v.errorMessage},muiView:!0})})}),c.isBelowPersonalData&&(0,d.jsxs)(nw,{children:[c.visible&&!!E.length&&(0,d.jsx)(nj,{title:c.title,fileList:E,isInvertedLineColor:!0,onDelete:e=>{P(E.findIndex(({id:t})=>t===e.id))}}),(0,d.jsx)(nS,Object.assign({},p,{name:"attachments",onChange:e=>{N(e.map(e=>({data:e})))}}))]}),C("isShowExtraFields")?(0,d.jsx)(n_,{languagesData:y,languagesSkillData:x}):null,_?a?(0,d.jsx)(eE,{children:(0,d.jsx)(eC.$n,{onClick:()=>i(o.Third),label:t("widget.application.second_step.btn_next_step")})}):null:(0,d.jsx)(iV,{})]})})});nC.displayName="FormSecondSection";var nA=i(42259),nk=i(74630);let nI=(0,p.forwardRef)(({},e)=>{let{isActiveSteps:t,formThirdSectionHeadline:i,questions:n,disabledThirdStep:o,additionalLocation:r,setThirdViewableSection:a}=ep(),{ref:l}=(0,ex.Wx)({threshold:.5,onChange:a}),{register:s,formState:{errors:c}}=(0,X.xW)();return o?null:(0,d.jsx)(eA,{ref:(0,e_.P)([e,t?l:null]),$stepsEnable:t,children:(0,d.jsxs)(ek,{children:[!!i&&(0,d.jsx)(eI,{children:i}),null==n?void 0:n.map(({type:e,question:t,answerCatalog:i},n)=>{var o,r,a,l,p,u;return(0,d.jsx)(eR,{children:(0,d.jsx)(nA.fp,{type:e,question:`${t}*`,answerCatalog:i,error:e===nA.eN.MULTISELECT?null==(a=null==(r=null==(o=null==c?void 0:c.applicationData)?void 0:o.answers)?void 0:r[n])?void 0:a.multiSelectAnswers:null==(u=null==(p=null==(l=null==c?void 0:c.applicationData)?void 0:l.answers)?void 0:p[n])?void 0:u.answer,questionIdInputProps:s(`applicationData.answers.${n}.questionId`),answerInputProps:s(`applicationData.answers.${n}.${e===nA.eN.MULTISELECT?"multiSelectAnswers":"answer"}`,{required:!0})},n)},n)}),r.visible?(0,d.jsxs)(eR,{children:[(0,d.jsx)(nA.Y0,{children:r.placeholder}),(0,d.jsx)(ip.X,{Component:nk.c,name:"applicationData.preferredJobLocations.0",options:r.options,rules:{required:r.required&&r.errorMessage}})]}):null,(0,d.jsx)(iV,{})]})})});nI.displayName="FormThirdSection";var nO=i(44789);let nE=w.Ay.main.withConfig({displayName:"Form__Main",componentId:"sc-1q4qkh9-0"})(["background-color:",";padding-bottom:",";min-height:calc("," - ",");@media ","{min-height:calc("," - ",");}@media ","{min-height:calc("," - ",");}"],S.a.Grey,(0,j.ls)(6),(0,j.bJ)(100),(0,j.ls)(12.5),C.bp.p,(0,j.bJ)(100),(0,j.ls)(22.5),C.bp.d,(0,j.bJ)(100),(0,j.ls)(9.5)),nN=w.Ay.div.withConfig({displayName:"Form__ContentStartElement",componentId:"sc-1q4qkh9-1"})(["height:0;width:0;opacity:0;"]),nP=({widgetId:e,onSubmitEnd:t})=>{let i=(0,p.useRef)(null),n=(0,p.useRef)(null),a=(0,p.useRef)(null),{register:l}=(0,ef.L)(),{isActiveSteps:s,withCaptcha:c,showQuestions:g}=ep(),{trackApplicationStep:v}=(0,eg.c)(),{questions:b,onCustomInput:y,setDisabledSecondStep:x,setDisabledThirdStep:_}=ep(),{exist:w,reset:j,start:S}=(0,eu.X)(),{submit:C}=(({widgetId:e,withCaptcha:t})=>{let{t:i}=(0,u.Bd)(),{isBuilderEnv:n,frontendOAuthClientId:o,pageId:a}=(0,f.N)(),{jobId:l}=ep(),{trackerSubmitApplicationEvent:s}=(0,W.s)(),{triggerRestrictedEventOfSubmittingApplicationForm:c}=(0,et.K)(),{submitApplication:d}=(()=>{let[{loading:e,error:t},i]=(0,h.bP)({url:`${m.Q}/widgets/application/application`,method:"post"},{manual:!0,withAccessToken:!0});return{submitApplication:(0,p.useCallback)(e=>{let{cv:t,profileImage:n,attachments:o,applicationData:a,userId:l,pageId:s,referrer:c,widgetId:d,jobId:p,redirect_uri:u,isSkipServerCodeErrors:m=!1}=e,h=new FormData;return t&&h.append("cv",t),n&&h.append("profileImage",n),null==o||o.forEach((e,t)=>{h.append(`attachment-${t}`,e.data)}),h.append("applicationData",JSON.stringify(a)),h.append("jobId",p),h.append("userId",l),h.append("pageId",s),h.append("widgetId",String(d)),(null==c?void 0:c.length)>256?h.append("referrer",c.slice(0,252)+"..."):h.append("referrer",c),h.append("redirect_uri",u),e["f-captcha-solution"]&&(h.append("f-captcha-solution",e["f-captcha-solution"]),h.append("isSkipServerCodeErrors",JSON.stringify(m))),i({data:h,headers:{"Content-Type":"multipart/form-data"}}).then(({data:e})=>(Z.F.remove(),e)).catch(e=>{throw e.response.data.errorCode===r.NOT_ACTIVE&&Z.F.remove(),e})},[i]),error:t,isLoading:e}})(),{exist:g,valid:v,reset:b}=(0,eu.X)(),y=(p,u)=>
1(function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})})(void 0,void 0,void 0,function*(){var m,h,f,x,_,w,j,S,C,A,k,I,O,E,N,P,T,D,R,L,F;if(n)return c();try{if(t&&!v)return;p.applicationData.educations=null==(m=p.applicationData.educations)?void 0:m.map(e=>(void 0!==e.startDate&&(e.startDate=em(e.startDate)),void 0!==e.endDate&&(e.endDate=e.isCurrent?"":em(e.endDate)),e)),p.applicationData.experiences=null==(h=p.applicationData.experiences)?void 0:h.map(e=>(void 0!==e.startDate&&(e.startDate=em(e.startDate)),void 0!==e.endDate&&(e.endDate=e.isCurrent?"":em(e.endDate)),e)),p.applicationData.preferredJobLocations&&p.applicationData.preferredJobLocations.length&&(p.applicationData.preferredJobLocations=p.applicationData.preferredJobLocations.filter(e=>void 0!==e),p.applicationData.preferredJobLocations.length?p.applicationData.preferredJobLocations=p.applicationData.preferredJobLocations.map(e=>JSON.parse(e)):delete p.applicationData.preferredJobLocations);let i=yield d(Object.assign(Object.assign({},p),{jobId:l,userId:o,pageId:a,widgetId:e,referrer:document.referrer,redirect_uri:window.location.href}));s(l,i.data.submitNum),null==u||u(i.data)}catch(t){if((null==(x=null==(f=t.response)?void 0:f.data)?void 0:x.errorCode)===r.VERIFICATION_BAD_REQUEST){if(g)if(confirm(i("widget.application.verification_bad_request")))return y(Object.assign(Object.assign({},p),{isSkipServerCodeErrors:!0}));else return null==b?void 0:b()}else if((null==(w=null==(_=t.response)?void 0:_.data)?void 0:w.errorCode)===r.FAILED_CAPTCHA_SOLUTION)return null==b?void 0:b();let e="";throw(null==(C=null==(S=null==(j=t.response)?void 0:j.data)?void 0:S.data)?void 0:C.confirmation)&&(null==(I=null==(k=null==(A=t.response)?void 0:A.data)?void 0:k.data)?void 0:I.messageKey)&&(e=i(t.response.data.data.messageKey)),e||(e=(null==(E=null==(O=t.response)?void 0:O.data)?void 0:E.errorCode)&&i(`widget.application.submit.${null==(T=null==(P=null==(N=t.response)?void 0:N.data)?void 0:P.errorCode)?void 0:T.toLowerCase()}_error_message`,{defaultValue:null==(R=null==(D=t.response)?void 0:D.data)?void 0:R.errorMessage})||(null==(F=null==(L=t.response)?void 0:L.data)?void 0:F.errorMessage)||i("widget.application.request.error_message")),Error(e)}});return{submit:y}})({withCaptcha:c,widgetId:e}),{setValue:A,handleSubmit:k}=(0,X.xW)();return(()=>{let{formState:{errors:e,submitCount:t}}=(0,X.xW)();(0,p.useEffect)(()=>{var t,i,n,o;if("applicationData"===Object.keys(e)[0]){let r=Object.keys(e.applicationData)[0];return"answers"===r&&(null==(t=e.applicationData)?void 0:t.answers)?eh(Object.values(e.applicationData.answers.filter(e=>e)[0])[0]):"applicationSource"===r&&(null==(i=e.applicationData)?void 0:i.applicationSource)?eh(null==(o=null==(n=e.applicationData)?void 0:n.applicationSource)?void 0:o.id):eh(Object.values(e.applicationData)[0])}return eh(Object.values(e)[0])},[e,t])})(),(0,p.useEffect)(()=>{s&&(l(i,o.First,()=>{v(1)}),l(n,o.Second,()=>{x(()=>!1),v(2)}),l(a,o.Third,()=>{x(()=>!1),_(()=>!1),v(3)}))},[s]),(0,p.useEffect)(()=>{b.length&&A("applicationData.answers",null==b?void 0:b.map(({id:e,type:t})=>t===nA.eN.MULTISELECT?{questionId:e,multiSelectAnswers:[]}:{questionId:e,answer:""}))},[b]),(0,d.jsxs)(nE,{children:[(0,d.jsx)(nN,{tabIndex:-1,className:nO.T}),(0,d.jsxs)("form",{onSubmit:k(e=>(function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})})(void 0,void 0,void 0,function*(){try{yield C(e,t)}catch(e){throw w&&(A("f-captcha-solution",void 0),null==j||j(),null==S||S()),alert(e.message),e}})),onInput:y,children:[(0,d.jsx)(iO,{ref:i}),(0,d.jsx)(nC,{ref:n}),g&&(0,d.jsx)(nI,{ref:a})]})]})};var nT=i(73028),nD=i(61959);let nR=w.Ay.aside.withConfig({displayName:"ApplicationAsideContainer",componentId:"sc-35rwre-0"})(["display:flex;flex-direction:column;background-color:",";width:100%;z-index:11;transition:transform 0.5s;will-change:transform;@media (orientation:portrait) and (","){min-height:auto;}@media ","{min-height:",";}@media ","{position:static;height:auto;width:auto;min-height:auto;will-change:auto;}"],S.a.White,C.JB.p,C.bp.p,({$isActiveSteps:e})=>e?"100svh":"auto",C.bp.d);var nL=i(2129),nF=i(10554),nM=i(95792);let nz=w.Ay.header.withConfig({displayName:"ApplicationHeader__Container",componentId:"sc-1i9vkmq-0"})(["display:flex;flex-direction:column;align-items:center;position:relative;padding:"," ",";row-gap:",";@media ","{padding:"," "," ",";row-gap:",";}@media ","{background-color:",";flex-direction:row;padding:0 56px 0 0;justify-content:space-between;}"],(0,j.ls)(4),(0,j.QA)(2),(0,j.ls)(4),C.bp.p,(0,j.ls)(4),(0,j.QA)(5),(0,j.ls)(6),(0,j.ls)(6),C.bp.d,S.y.White),n$=w.Ay.h1.withConfig({displayName:"ApplicationHeader__Title",componentId:"sc-1i9vkmq-1"})([""," font-size:0.875rem;line-height:1.4;text-align:center;color:",";@media ","{text-align:right;}"],O.gQ,S.a.Text,C.bp.d),nq=(0,w.Ay)(nM.o).withConfig({displayName:"ApplicationHeader__SkipToContentButton",componentId:"sc-1i9vkmq-2"})(["position:absolute;top:0;left:0;right:0;height:100%;"]),nB=({title:e,altText:t})=>{let{scrollToElement:i}=(0,nL.n)();return(0,d.jsxs)(nz,{children:[(0,d.jsx)(nq,{onSkip:()=>{let e=null==document?void 0:document.querySelector("main");e&&((0,nO.i)(e),i(e))}}),(0,d.jsx)("div",{children:(0,d.jsx)(nF.b,{altText:t,application:!0}
1)}),!!e&&(0,d.jsx)(n$,{children:e})]})},nV={0:{[k.K6.x1]:{width:480,height:480}},480:{[k.K6.x1]:{width:720,height:480}},720:{[k.K6.x1]:{width:960,height:600}},960:{[k.K6.x1]:{width:1280,height:848}},1280:{[k.K6.x1]:{width:1440,height:848}},1440:{[k.K6.x1]:{width:1600,height:848}},1600:{[k.K6.x1]:{width:1920,height:848}},1920:{[k.K6.x1]:{width:1920,height:848}},2560:{[k.K6.x1]:{width:2560,height:1131},[k.K6.x2]:{width:3840,height:1696}},2880:{[k.K6.x1]:{width:2880,height:1272},[k.K6.x2]:{width:3840,height:1696}},3200:{[k.K6.x1]:{width:3200,height:1696},[k.K6.x2]:{width:3840,height:1696}},3840:{[k.K6.x1]:{width:3840,height:1696},[k.K6.x2]:{width:3840,height:1696}}},nU=({title:e,steps:t,logoScale:i,logoAltText:n,applicationHeadline:o,overlayOpacityPercentage:r,backgroundSrc:a})=>{let{design:l}=(0,f.N)(),{scrollTo:s}=(0,ef.L)(),{viewableSection:c}=ep(),p=!!t.length,u=i?(0,nD.k)(i,1,1.5):1,m=void 0!==r,h=(0,nD.k)(m?r:1,A.ah,A.uG);return(0,d.jsxs)(nR,{$isActiveSteps:p,children:[(0,d.jsx)(nB,{title:e,logoSrc:l.logo.src,altText:n,logoSizeFactor:u}),(0,d.jsx)($,{title:o,selectedStep:c,steps:p?t:[],isOverlayEnabled:m,overlayOpacity:h,backgroundSrc:a,onSelect:s})]})};var nW=i(25907);let nH=w.Ay.div.withConfig({displayName:"ApplicationFeedbackModal__ModalContainer",componentId:"sc-4wl80a-0"})(["background-size:cover;background-position:center;background-repeat:no-repeat;background-color:",";overflow:auto;padding:"," ",";z-index:15;display:flex;flex-direction:column;position:fixed;top:0;bottom:0;width:100%;left:100%;transform:translateX(",");transition:transform 0.6s cubic-bezier(0.83,0,0.17,1);",""],S.a.ShadowSlate,(0,j.ls)(6),(0,j.ls)(2),({$isActive:e})=>e?"-100%":0,({$imageSrc:e,$breakpoints:t})=>(0,j.pr)({imageSrc:e,breakpoints:t})),nJ=w.Ay.div.withConfig({displayName:"ApplicationFeedbackModal__Container",componentId:"sc-4wl80a-1"})(["margin:auto;display:flex;flex-direction:column;align-items:center;max-width:560px;width:100%;padding:"," ",";backdrop-filter:blur(8px);background-color:",";"," @media ","{padding:",";max-width:720px;}"],(0,j.ls)(4),(0,j.ls)(3),(0,_.B3)(S.a.White,.85),(0,j.hD)(A.aM,A.sS),C.bp.t,(0,j.ls)(6.5)),nK=w.Ay.div.withConfig({displayName:"ApplicationFeedbackModal__Title",componentId:"sc-4wl80a-2"})(["",";font-size:0.875rem;margin-bottom:",";line-height:1.4;text-align:center;color:",";@media ","{margin-bottom:8px;font-size:1.375rem;line-height:1.27;}"],O.gQ,A.X,({theme:e})=>(0,j.EA)(e),C.bp.t),nG=w.Ay.p.withConfig({displayName:"ApplicationFeedbackModal__Text",componentId:"sc-4wl80a-3"})(["color:",";font-size:0.75rem;line-height:1.33;text-align:center;margin-bottom:",";"],S.a.Label,(0,j.ls)(3)),nQ=w.Ay.div.withConfig({displayName:"ApplicationFeedbackModal__Content",componentId:"sc-4wl80a-4"})(["width:100%;display:flex;flex-direction:column;transition:opacity 0.3s ease-in-out;"]),nX=w.Ay.div.withConfig({displayName:"ApplicationFeedbackModal__Divider",componentId:"sc-4wl80a-5"})(["height:2px;width:100%;background-color:",";margin:24px 0 24px;"],S.a.Loader),nY=(0,w.Ay)(eH.In).withConfig({displayName:"ApplicationFeedbackModal__SurveyIcon",componentId:"sc-4wl80a-6"})(["fill:",";"],({theme:e})=>(0,j.EA)(e)),nZ=(0,w.Ay)(nG).withConfig({displayName:"ApplicationFeedbackModal__SurveyDescription",componentId:"sc-4wl80a-7"})(["margin-top:",";margin-bottom:0;padding:0 12px;"],(0,j.ls)(2)),n0=w.Ay.div.withConfig({displayName:"ApplicationFeedbackModal__Links",componentId:"sc-4wl80a-8"})(["display:flex;flex-direction:column;gap:24px;@media ","{flex-direction:row;}"],C.bp.t),n1=w.Ay.div.withConfig({displayName:"ApplicationFeedbackModal__LinksItem",componentId:"sc-4wl80a-9"})(["display:flex;flex-direction:column;align-items:center;max-width:320px;@media ","{flex:1 0 0%;}"],C.bp.t),n2=w.Ay.a.withConfig({displayName:"ApplicationFeedbackModal__Link",componentId:"sc-4wl80a-10"})(["margin-top:12px;font-size:0.625rem;color:",";border-bottom:1px solid currentColor;"],({theme:e})=>(0,j.EA)(e)),n5=({isActive:e=!1,title:t,description:i,backgroundSrc:n,rating:o,survey:r,imageBreakpoints:a,children:l})=>(0,d.jsx)(nH,{$isActive:e,$imageSrc:n,$breakpoints:a,children:(0,d.jsxs)(nJ,{children:[(0,d.jsxs)(nQ,{role:"status",children:[(0,d.jsx)(nK,{children:t}),(0,d.jsx)(nG,{children:i}),l]}),(o.visible||r.visible)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(nX,{}),(0,d.jsxs)(n0,{children:[o.visible&&(0,d.jsxs)(n1,{children:[(0,d.jsx)(nY,{name:eJ.kj.Rating,size:eJ.lK.Huge}),(0,d.jsx)(nZ,{children:o.description}),(0,d.jsx)(n2,{href:o.href,target:"_blank",rel:"noopener noreferrer",children:o.label})]}),r.visible&&(0,d.jsxs)(n1,{children:[(0,d.jsx)(nY,{name:eJ.kj.Survey,size:eJ.lK.Huge}),(0,d.jsx)(nZ,{children:r.description}),(0,d.jsx)(n2,{href:r.href,target:"_blank",rel:"noopener noreferrer",children:r.label})]})]})]})]})}),n4=["EUR","USD","CHF","CNY","CZK","DKK","GBP","HRK","HUF","JPY","NOK","PLN","RUB","SEK","PKR","INR"],n3=["year","month","hour"],n8=w.Ay.form.withConfig({displayName:"ApplicationFeedbackSalaryForm__Form",componentId:"sc-1bsijld-0"})(["display:flex;flex-direction:column;row-gap:24px;"]),n6=w.Ay.h3.withConfig({displayName:"ApplicationFeedbackSalaryForm__Title",componentId:"sc-1bsijld-1"})(["",";color:",";font-size:0.875rem;line-height:1.4;text-align:center;margin-top:10px;@media ","{margin-top:30px;font-size:1rem;line-height:1.25;}"],O.gQ,S.a.Text,C.bp.t),n7=w.Ay.div.withConfig({displayName:"ApplicationFeedbackSalaryForm__Description",componentId:"sc-1bsijld-2"})(["color:",";font-size:0.75rem;line-height:1.33;text-align:center;"],S.a.Label),n9=w.Ay.div.withConfig({displayName:"ApplicationFeedbackSalaryForm__Fields",componentId:"sc-1bsijld-3"})(["display:flex;align-items:flex-start;flex-wrap:wrap;width:100%;row-gap:12px;@media ","{flex-wrap:nowrap;justify-content:space-between;column-gap:24px;}"],C.bp.t),oe=w.Ay.div.withConfig({displayName:"ApplicationFeedbackSalaryForm__SalaryFields",componentId:"sc-1bsijld-4"})(["display:flex;align-items:flex-start;width:100%;column-gap:4px;@media ","{width:auto;margin-bottom:0;}"],C.bp.t),ot=w.Ay.div.withConfig({displayName:"ApplicationFeedbackSalaryForm__SalaryValue",componentId:"sc-1bsijld-5"})(["flex-grow:1;@media ","{flex-grow:initial;
1width:200px;}"],C.bp.t),oi=w.Ay.div.withConfig({displayName:"ApplicationFeedbackSalaryForm__SalaryCurrency",componentId:"sc-1bsijld-6"})(["width:140px;"]),on=w.Ay.div.withConfig({displayName:"ApplicationFeedbackSalaryForm__SalaryGross",componentId:"sc-1bsijld-7"})(["width:100%;@media ","{max-width:240px;}"],C.bp.t),oo=w.Ay.div.withConfig({displayName:"ApplicationFeedbackSalaryForm__ButtonContainer",componentId:"sc-1bsijld-8"})(["display:flex;justify-content:center;"]),or=w.Ay.div.withConfig({displayName:"ApplicationFeedbackSalaryForm__Disclaimer",componentId:"sc-1bsijld-9"})(["color:",";font-size:0.625rem;line-height:1.4;text-align:center;"],S.a.Label),oa=({className:e,onSubmit:t})=>{let{t:i}=(0,u.Bd)(),n=i("widget.application.feedback.title"),o=i("widget.application.feedback.description"),r=i("widget.application.feedback.placeholderSalary_error_message"),a=(0,p.useMemo)(()=>n4.map(e=>({value:e,label:i(`widget.application.feedback.currencyCode${e}`)})),[]),l=(0,p.useMemo)(()=>n3.map(e=>({value:e,label:i(`widget.application.feedback.${e}PaymentPeriod`)})),[]),{handleSubmit:s,register:c,watch:m,formState:{errors:h}}=(0,X.mN)({defaultValues:{grossSalary:void 0,currencyCode:"EUR",paymentPeriod:"year"}});return(0,d.jsxs)(n8,{className:e,onSubmit:s(t),children:[(0,d.jsx)(n6,{children:n}),(0,d.jsx)(n7,{children:o}),(0,d.jsxs)(n9,{children:[(0,d.jsxs)(oe,{children:[(0,d.jsx)(ot,{children:(0,d.jsx)(iT.z,{error:h.grossSalary?r:void 0,children:(0,d.jsx)(iP.k,Object.assign({type:"number",min:"0",label:i("widget.application.feedback.placeholderSalary")},c("grossSalary",{required:!0})))})}),(0,d.jsx)(oi,{children:(0,d.jsx)(iT.z,{error:h.currencyCode?r:void 0,children:(0,d.jsx)(iN.l,Object.assign({options:a,value:m("currencyCode"),label:i("widget.application.feedback.placeholderCurrencyCode")},c("currencyCode"),{clearable:!1,muiView:!0}))})})]}),(0,d.jsx)(on,{children:(0,d.jsx)(iT.z,{error:h.paymentPeriod?r:void 0,children:(0,d.jsx)(iN.l,Object.assign({options:l,value:m("paymentPeriod"),label:i("widget.application.feedback.placeholderPaymentPeriod")},c("paymentPeriod"),{clearable:!1,muiView:!0}))})})]}),(0,d.jsx)(oo,{children:(0,d.jsx)(eC.$n,{type:"submit",label:i("widget.application.feedback.submitBtn")})}),(0,d.jsx)(or,{children:i("widget.application.feedback.infoHelper")})]})},ol=({title:e,description:t,backgroundSrc:i,isExistSalaryQuestionForm:n,rating:o,survey:r,thankYouPageNum:a,token:l,applicationId:s})=>{let{submitFeedback:c}=(()=>{let[{data:e,loading:t,error:i},n]=(0,h.bP)({url:`${m.Q}/widgets/application/feedback`,method:"post"},{manual:!0});return{submitFeedback:(0,p.useCallback)(e=>n({data:e}).then(({data:e})=>e.data),[n]),data:e,error:i,isLoading:t}})(),{showFeedbackModalInBuilder:u,jobId:f}=ep(),{trackerViewApplicationThankYouPageView:g}=(0,W.s)(),{0:v,1:b}=(0,p.useState)(!1),{formState:{isSubmitSuccessful:y}}=(0,X.xW)();return(0,nW.g)({skip:!y,thankYouPageNum:a}),(0,p.useEffect)(()=>{y&&g(f)},[y]),(0,d.jsx)(n5,{isActive:y||u,title:e,description:t,rating:o,survey:r,backgroundSrc:i,imageBreakpoints:nV,children:!v&&n&&(0,d.jsx)(oa,{onSubmit:e=>(function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})})(void 0,void 0,void 0,function*(){try{yield c(Object.assign(Object.assign({},e),{token:l,applicationId:s})),b(!0)}catch(e){console.error(e)}})})})},os=(0,w.Ay)(Y.Z).withConfig({displayName:"Application__PreloaderStyles",componentId:"sc-hzjdav-0"})(["&{position:fixed;}"]),oc=({isVisible:e})=>{let{formState:{isSubmitting:t}}=(0,X.xW)(),i=!(0,e$.w)()&&window&&window.self!==window.top;return(0,d.jsx)(os,{isVisible:!i&&e||t,isTransparent:t})},od=w.Ay.section.withConfig({displayName:"Application__Section",componentId:"sc-hzjdav-1"})(["overflow-x:hidden;a{","}"],j.e4),op=w.Ay.div.withConfig({displayName:"Application__ApplicationWrapper",componentId:"sc-hzjdav-2"})(["position:relative;transition:transform 0.45s ease-in-out;@media ","{margin-left:416px;}@media ","{margin-left:480px;}@media ","{margin-left:512px;}@media ","{margin-left:576px;}@media (min-width:2560px){margin-left:1024px;}"],C.bp.d,C.bp.d_l,C.bp.d_xl,C.bp.hd),ou=({showFeedbackModalInBuilder:e,jobId:t,widgetId:i,buttonColor:n,headlineColor:o,isLoading:r,aside:a,isActiveSteps:l,dropzone:s,videoApplication:c,coverLetter:u,cv:m,attachments:h,salutation:g,academicTitle:v,firstName:b,lastName:y,email:x,phone:_,applicationSource:j,additionalLocation:C,privacyPolicy:A,feedbackConsent:k,withCaptcha:I,languagesData:O,languagesSkillData:E,stepTwoHeadline:N,stepThreeHeadline:P,showQuestions:T,questions:D,footer:R,feedbackModal:L,captcha:F})=>{let{isBuilderEnv:M}=(0,f.N)(),{0:z,1:$}=(0,p.useState)(),q=(0,X.mN)({shouldFocusError:!1,defaultValues:ee});return(0,d.jsx)(ed,{jobId:t,isActiveSteps:l,dropzone:s,videoApplication:c,coverLetter:u,cv:m,attachments:h,salutation:g,academicTitle:v,firstName:b,lastName:y,email:x,phone:_,applicationSource:j,additionalLocation:C,privacyPolicy:A,feedbackConsent:k,withCaptcha:I,languagesData:O,languagesSkillData:E,formSecondSectionHeadline:N,formThirdSectionHeadline:P,showQuestions:T,questions:D,showFeedbackModalInBuilder:e,children:(0,d.jsx)(eu.P,Object.assign({},F,{children:(0,d.jsx)(w.NP,{theme:{buttonColor:n,headlineColor:o,outlineColor:S.a.GreyOutline},children:(0,d.jsxs)(X.Op,Object.assign({},q,{children:[(0,d.jsx)(oc,{isVisible:r}),(0,d.jsx)(od,{"data-widget":Q.x.Application,children:(0,d.jsxs)(op,{children:[(0,d.jsx)(nU,Object.assign({},a)),(0,d.jsx)(nP,{widgetId:i,onSubmitEnd:e=>$(e)}),(0,d.jsx)(nT.w,Object.assign({}
1,R)),(0,d.jsx)(ol,{title:L.title,description:L.description,backgroundSrc:L.backgroundSrc,isExistSalaryQuestionForm:L.isActiveSalaryQuestionForm&&(M||!!(null==z?void 0:z.salaryCollectingEnabled)),rating:Object.assign(Object.assign({},L.rating),{visible:(M||!!(null==z?void 0:z.ekomiSurveyUrl))&&L.isActiveRating,href:(null==z?void 0:z.ekomiSurveyUrl)||""}),survey:Object.assign(Object.assign({},L.survey),{visible:(M||!!(null==z?void 0:z.marketingSurveyUrl))&&L.isActiveSurvey,href:(null==z?void 0:z.marketingSurveyUrl)||""}),thankYouPageNum:null==z?void 0:z.thankYouPageNum,token:(null==z?void 0:z.token)||"",applicationId:(null==z?void 0:z.applicationId)||""})]})})]}))})}))})},om=RegExp("/application/[a-zA-Z0-9-]+/([0-9]+)/?$");function oh({formData:e,widgetId:t}){var i,n,r,a,l,s,c,_,w,j,C,A,k,I,O,E,N,P,T,D,R,L,F,M,z,$,X,Y,Z,ee,et,ei,en,eo,er,ea,el,es,ec,ed,ep,eu,em,eh,ef,eg,ev,eb,ey,ex,e_;let{t:ew}=(0,u.Bd)(),{frontendOAuthClientId:ej,locale:eS,user:eC,design:eA,apiData:ek,featureMatrix:eI,companySettings:eO,isBuilderEnv:eE}=(0,f.N)(),{0:eN,1:eP}=(0,p.useState)(!1),{0:eT,1:eD}=(0,p.useState)(!eE),{trackerViewApplicationEvent:eR}=(0,W.s)(),{components:{HeadInjection:eL}}=(0,g.uq)(),eF=(0,H.z)(),{pageUiEnvironment:{window:eM}}=(0,v.p)();(0,J.k)({widgetType:Q.x.Application,widgetId:t,events:{onTabSelected:e=>"feedback"===e.tabId?eP(!0):eP(!1),onFormClosed:()=>eP(!1)}});let ez=(0,p.useMemo)(()=>{var e;return eE?"":(null==(e=om.exec(eF.pathname))?void 0:e[1])||(0,q.I3)("jobId",eF.search)},[eF.pathname,eF.search]);(0,p.useEffect)(()=>{if(!b.k&&(null==eM?void 0:eM.location)){let e=new URL(eM.location.href).searchParams.get("aid");if(!e)return;let t=new BroadcastChannel(y.GF);t.onmessage=function(i){i.isTrusted&&i.data===`${y.px}_${e}`?(t.close(),eM.close()):console.log("Received broadcast event",i)},t.postMessage(`${y.i}_${e}`)}},[eM,b.k]);let e$=e.activateSalutationField.checked,eq=e.activateAcademicTitleField.checked,eB=e.activateApplicationSourcesField.checked,{isLoading:eV,jobAdInfo:eU}=(({params:e,jobAdMockData:t})=>{let i=(0,p.useMemo)(()=>{if(!t)return;let e={};try{e=JSON.parse(t)}catch(e){}return e},[t]),[{data:n={data:{}},loading:o,error:r},a]=(0,h.bP)({method:"get",url:`${m.Q}/widgets/application/job-info`,params:e});return i&&(null==n?void 0:n.data)&&(n.data=Object.assign(Object.assign({},null==n?void 0:n.data),{job:Object.assign(Object.assign({},null==n?void 0:n.data.job),{title:i.jobTitle,additionalLocation:i.additionalLocation||[]}),multiLocationInformation:{multiLocationEnabled:!1,mandatory:!1},questions:i.questions})),{jobAdInfo:n,refetch:a,error:r,isLoading:o}})({params:{userId:ej,jobId:ez,locale:eS,academicTitle:+!!eq,applicationSources:+!!eB},jobAdMockData:eE?ew("widget.application.builder.job_information",{defaultValue:void 0}):void 0});(0,p.useEffect)(()=>{b.k||eE||eD(eV)},[eV,eT,eD]),(0,p.useEffect)(()=>{var e,t;b.k||eE||eT||null==(t=null==(e=null==eM?void 0:eM.parent)?void 0:e.postMessage)||t.call(e,{eventName:x.Q.ApplicationFormInIframeReadyEventName},"*")},[eT]);let eW=(null==(n=null==(i=null==eU?void 0:eU.data)?void 0:i.job)?void 0:n.additionalLocation)||[],eH=(null==(r=e.activatePreferredLocationField)?void 0:r.checked)&&!!eW.length,eJ=e.enableSteps.checked,eK=e.activateUseCustomQuestions.checked,eG=e.activateCoverLetterField.checked,eQ=e.activateUseCustomFormLabels.checked,eX=e.makeRequiredCoverLetterField.checked,eY=(0,K.G)(eA.colorSchema),eZ=ew("widget.application.header.metatitle").replace("%jobTitle%",(null==(l=null==(a=null==eU?void 0:eU.data)?void 0:a.job)?void 0:l.title)||"");(0,p.useEffect)(()=>{eV||eE||eR(ez,eZ)},[eV]);let e0=!!(eE?eC.videoApplicationActive:eC.videoApplicationActive||(null==(s=null==eC?void 0:eC.metadata)?void 0:s.videoApplicationActive))&&e.activateVideoApplicationField.checked,e1=e.activateUseCustomStepsHeadlines.checked?e.stepOneHeadline.value:ew("widget.application.first_step.header"),e2=e.activateMandatoryUploadResume.checked,e5=e.activateUseCustomStepsHeadlines.checked?e.stepOneSubHeadline.value:e2?ew("widget.application.first_step.upload_resume_title_mandatory"):ew("widget.application.first_step.upload_resume_title"),e4=eQ?e.coverLetterPlaceholder.value:ew(`widget.application.first_step.covering_letter_placeholder${eX?"_mandatory":""}`),e3=eQ?e.coverLetterNote.value:ew("widget.application.first_step.covering_letter_tip"),e8=e.activateUseCustomStepsHeadlines.checked?e.stepTwoHeadline.value:ew("widget.application.second_step.header"),e6=null==(c=null==eU?void 0:eU.data)?void 0:c.questions,e7=!!(null==e6?void 0:e6.length)||eH,e9=e7&&(!eE||eJ),te=(0,G.b)(e.buttonColor,eY,null==(_=eA.colorSchema.highlight)?void 0:_.value),tt=(0,G.b)(e.headlineColor,eY,null==(w=eA.colorSchema.highlight)?void 0:w.value),ti=!ek.friendlyCaptcha.isDisables&&e.activateFriendlyCaptcha.checked,tn=null==eU?void 0:eU.data.languagesData,to=null==eU?void 0:eU.data.languagesSkillData,tr=(0,p.useMemo)(()=>Object.entries((null==eU?void 0:eU.data.languagesData)||{}).map(([e,t])=>({code:e,name:t})),[null==eU?void 0:eU.data.languagesData]),ta=eE?(null==eO?void 0:eO.footer)?[...eO.footer.importantLinks,...(null==(j=null==eO?void 0:eO.footer)?void 0:j.links)||[]]:ek.footer:null==(A=null==(C=null==eU?void 0:eU.data)?void 0:C.footer)?void 0:A.links,tl=eE?(null==eO?void 0:eO.footer)?(null==(k=null==eO?void 0:eO.footer)?void 0:k.showPoweredBy)&&
1!(null==eI?void 0:eI.isWhiteLabel):!(null==eI?void 0:eI.isWhiteLabel):null==(O=null==(I=null==eU?void 0:eU.data)?void 0:I.footer)?void 0:O.showPoweredBy,ts=eE?(null==eO?void 0:eO.footer)?(null==(E=null==eO?void 0:eO.footer)?void 0:E.showJobsFeedLink)&&!(null==eI?void 0:eI.isWhiteLabel):!(null==eI?void 0:eI.isWhiteLabel):null==(P=null==(N=null==eU?void 0:eU.data)?void 0:N.footer)?void 0:P.showJobsFeedLink,tc=null==(T=null==ta?void 0:ta[1])?void 0:T.href,td={visible:e0,headline:ew("widget.application.first_step.video_headline"),introSection:{description:e.activateUseCustomWelcomeVideoDescription.checked?(0,B.jJ)(e.welcomeVideoDescription.value,eY,S.a.Text):ew("widget.application.first_step.video_welcome_description"),mediaType:e.selectGreetingType.value,sgPosterSrc:ew("widget.application.first_step.video_welcome_sg_video_thumbnail_url"),sgVideoSrc:ew("widget.application.first_step.video_welcome_sg_video_link"),sgAriaLabel:ew("widget.video.aria_label.play"),caption:{src:"./tracks/example.vtt",srcLang:"en",label:"English track label "},videoLinkPosterSrc:e.welcomeVideo.thumbnailUrl,videoLinkVideoSrc:e.welcomeVideo.videoLink,videoLinkOriginalSrc:e.welcomeVideo.value,imageSrc:e.welcomeImage.image.src},questionSection:{title:eK?(0,B.jJ)(e.questionsVideoHeadline.value,eY,S.a.Text):ew("widget.application.first_step.video_questions_headline"),list:eK?e.questions.forms.map(e=>(0,B.jJ)(e.question.value,eY,S.a.Text)):[ew("widget.application.first_step.video_question_1"),ew("widget.application.first_step.video_question_2"),ew("widget.application.first_step.video_question_3")],description:(0,V.Y)(ew("widget.application.first_step.video_questions_description"),{dataSecurityURL:(0,q.Wj)(tc)}),buttonLabel:ew("widget.application.first_step.video_get_started_btn")},finalSection:{ariaLabel:ew("widget.video.aria_label.play")}},tp=null==(R=null==(D=null==eU?void 0:eU.data)?void 0:D.job)?void 0:R.title,tu=eJ&&e.activateUseCustomHeadlinesInImageArea.checked,tm=(0,p.useMemo)(()=>eJ?[{anchorName:o.First,label:tu?e.stepOneCaption.value:ew("widget.application.steps.first")},{anchorName:o.Second,label:tu?e.stepTwoCaption.value:ew("widget.application.steps.second")},...(0,U.kP)(e7,{anchorName:o.Third,label:tu?e.stepThreeCaption.value:ew("widget.application.steps.third")})]:[],[eJ,tu,ew,e7,e.stepOneCaption.value,e.stepTwoCaption.value,e.stepThreeCaption.value]),th=tu?e.applicationHeadline.value:e7?ew("widget.application.steps.header_for_three_steps"):ew("widget.application.steps.header_for_two_steps"),tf=e.activateOverlay.checked?e.transparency.value:void 0,tg=(e=>{let{t}=(0,u.Bd)();return(0,p.useMemo)(()=>{if(!(null==e?void 0:e.askForConsent))return"";let i=t("widget.application.third_step.feedback_consent",{defaultValue:"",ownConsentLink:null==e?void 0:e.ownConsentLink});if(!i)return"";let n=new DOMParser().parseFromString(i,"text/html");return n.querySelectorAll("a").forEach(e=>{let t=e.getAttribute("href");if(t&&""!==t.trim()){let t=e.parentNode;null==t||t.removeChild(e)}}),n.body.innerHTML},[null==e?void 0:e.askForConsent])})(null==eU?void 0:eU.data.feedbackConsent),tv=!!(null==(F=null==(L=null==eU?void 0:eU.data)?void 0:L.feedbackConsent)?void 0:F.askForConsent),tb=ew("widget.application.third_step.privacy_policy_accepted").replace("%dataSecurityURL%",tc),ty=e.activateUseCustomStepsHeadlines.checked?e.stepThreeHeadline.value:ew("widget.application.third_step.header");return(0,d.jsxs)(d.Fragment,{children:[!eE&&(0,d.jsx)(eL,{children:(0,d.jsx)("title",{children:eZ})}),(0,d.jsx)(ou,{showFeedbackModalInBuilder:eN,jobId:ez,withCaptcha:ti,widgetId:t,isLoading:eT,buttonColor:te,headlineColor:tt,aside:{title:tp,steps:tm,logoScale:Number(eA.logoSizeFactor.value),logoAltText:null==(M=e.logoAltText)?void 0:M.value,applicationHeadline:th,overlayOpacityPercentage:tf,backgroundSrc:e.image.image.src},isActiveSteps:eJ,dropzone:{tooltipText:ew("widget.application.first_step.upload_attachments_tooltip").replace("%qty%",(null==($=null==(z=null==eU?void 0:eU.data)?void 0:z.fileUploadInformation)?void 0:$.displayMaxSize)||"10").replace("%fileTypes%",`.${((null==(Y=null==(X=null==eU?void 0:eU.data)?void 0:X.fileUploadInformation)?void 0:Y.filetypes)||["pdf","doc","docx","svg"]).join(", .")}`),label:eQ?e.attachmentsLabel.value:ew("widget.application.first_step.upload_attachments_title"),maxSize:(null==(ee=null==(Z=null==eU?void 0:eU.data)?void 0:Z.fileUploadInformation)?void 0:ee.maxSize)?Number(null==(ei=null==(et=null==eU?void 0:eU.data)?void 0:et.fileUploadInformation)?void 0:ei.maxSize):void 0,fileTypes:null==(eo=null==(en=null==eU?void 0:eU.data)?void 0:en.fileUploadInformation)?void 0:eo.filetypes,displayMaxSize:(null==(ea=null==(er=null==eU?void 0:eU.data)?void 0:er.fileUploadInformation)?void 0:ea.displayMaxSize)||"10"},videoApplication:td,coverLetter:{visible:eG,required:eX,placeholder:e4,note:e3},cv:{visible:e.activateUploadResumeField.checked,headline:e1,subheadline:e5,required:e2,languagesArray:tr},attachments:{visible:e.activateAttachmentsField.checked,isBelowPersonalData:e.activateAttachmentsField.checked&&e.activateShowAttachmentsFieldBelowPersonalData.checked,title:ew("widget.application.first_step.attachments_title")},salutation:{visible:e$,required:e.makeRequiredSalutationField.checked,placeholder:ew(`widget.application.second_step.sex_placeholder${e.makeRequiredSalutationField.checked?"_mandatory":""}`),errorMessage:ew("widget.application.second_step.sex_error_message"),options:[{value:"0",label:ew("widget.application.second_step.sex_not_specified")},{value:"1",label:ew("widget.application.second_step.sex_mr")},{value:"2",label:ew("widget.application.second_step.sex_ms")},{value:"3",label:ew("widget.application.second_step.sex_div")}]},academicTitle:{visible:eq,required:e.makeRequiredAcademicTitleField.checked,placeholder:ew(`widget.application.second_step.academic_placeholder${e.makeRequiredAcademicTitleField.checked?"_mandatory":""}`),errorMessage:ew("widget.application.second_step.academic_error_message"),options:(null==eU?void 0:eU.data.academicTitle)?Object.entries(eU.data.academicTitle).map(([e,t])=>({value:t,label:t})).sort((e,t)=>
1Number(e.value)-Number(t.value)):[]},firstName:{placeholder:ew("widget.application.second_step.first_name_placeholder"),required:!0,errorMessage:ew("widget.application.second_step.first_name_error_message")},lastName:{placeholder:ew("widget.application.second_step.last_name_placeholder"),required:!0,errorMessage:ew("widget.application.second_step.last_name_error_message")},email:{placeholder:ew("widget.application.second_step.email_placeholder"),required:!0,errorMessage:ew("widget.application.second_step.email_error_message")},phone:{visible:e.activateTelephoneField.checked,required:e.makeRequiredTelephoneField.checked,placeholder:ew(`widget.application.second_step.phone_placeholder${e.makeRequiredTelephoneField.checked?"_mandatory":""}`),errorMessage:ew("widget.application.second_step.phone_error_message")},applicationSource:{visible:eB&&!!(null==(es=null==(el=null==eU?void 0:eU.data)?void 0:el.applicationSource)?void 0:es.length),required:e.makeRequiredApplicationSourcesField.checked,placeholder:`${ew(`widget.application.second_step.application_source_${ek.companyData.informalFrontend?"informal_":""}placeholder`)}${e.makeRequiredApplicationSourcesField.checked?"*":""}`,errorMessage:ew("widget.application.second_step.application_source_error_message"),options:((null==(ec=null==eU?void 0:eU.data)?void 0:ec.applicationSource)||[]).map(({id:e,value:t})=>({value:e,label:t}))},showQuestions:e9,questions:e6||[],additionalLocation:{visible:eH,required:null==(ed=e.makeRequiredPreferredLocationField)?void 0:ed.checked,placeholder:(null==(ep=e.makeRequiredPreferredLocationField)?void 0:ep.checked)?`${(null==(em=null==(eu=null==eU?void 0:eU.data)?void 0:eu.multiLocationInformation)?void 0:em.preferredLocationQuestions)||ew("widget.application.questions.preferredLocation.label")}*`:(null==(ef=null==(eh=null==eU?void 0:eU.data)?void 0:eh.multiLocationInformation)?void 0:ef.preferredLocationQuestions)||ew("widget.application.questions.preferredLocation.label"),errorMessage:ew("widget.application.questions.catalog_error_message"),options:eW.map(e=>({value:JSON.stringify(e),label:e.geoName}))},privacyPolicy:tb,feedbackConsent:{visible:tv,label:tg},languagesData:tn,languagesSkillData:to,stepTwoHeadline:e8,stepThreeHeadline:ty,footer:{links:ta,poweredVisible:tl,jobsFeedLinkVisible:ts,jobsFeedLinkLink:eF.pathname.endsWith("/application/")?"../jobs.feed.json":"../../jobs.feed.json",poweredLink:ew("widget.footer.poweredLink"),poweredLabel:ew("widget.footer.powered")},captcha:{siteKey:ek.friendlyCaptcha.siteKey,puzzleEndpoint:ek.friendlyCaptcha.puzzleEndpoint,language:eS},feedbackModal:{title:ew("widget.application.successSubmit.title"),description:ew("widget.application.successSubmit.description"),backgroundSrc:e.feedbackImage.image.src,isActiveSalaryQuestionForm:(null==(eg=eO.surveySettings)?void 0:eg.isGlobalSurveySettingsForApplicationEnabled)?null==(ev=eO.surveySettings)?void 0:ev.isSalarySurveyEnabled:e.activateSalaryQuestionForm.checked,isActiveRating:(null==(eb=eO.surveySettings)?void 0:eb.isGlobalSurveySettingsForApplicationEnabled)?null==(ey=eO.surveySettings)?void 0:ey.isRatingSurveyEnabled:e.isActivatedRatingForThankPage.checked,rating:{label:ew("widget.application.feedback.rating_submit"),description:ew("widget.application.feedback.rating_description")},isActiveSurvey:(null==(ex=eO.surveySettings)?void 0:ex.isGlobalSurveySettingsForApplicationEnabled)?null==(e_=eO.surveySettings)?void 0:e_.isMarketingSurveyEnabled:e.isActivatedSurveyForThankPage.checked,survey:{label:ew("widget.application.feedback.survey_submit"),description:ew("widget.application.feedback.survey_description")}}})]})}let of=oh},14093:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsWebSocket=function(e,t){if(!t&&e instanceof WebSocket==!1)throw Error("")},t.resetGlobalState=function(e){(0,o.resetSubscribers)(e),(0,n.resetWebSockets)(e)};var n=i(7223),o=i(76984)},15239:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.heartbeat=function(e,t,i){var o=i||{},r=o.interval,a=void 0===r?n.DEFAULT_HEARTBEAT.interval:r,l=o.timeout,s=void 0===l?n.DEFAULT_HEARTBEAT.timeout:l,c=o.message,d=void 0===c?n.DEFAULT_HEARTBEAT.message:c,p=Math.max(100,a/10),u=Date.now(),m=setInterval(function(){var i=Date.now(),n=Array.isArray(t)?t.reduce(function(e,t){return e.current>t.current?e:t}).current:t.current;if(n+s<=i)console.warn("Heartbeat timed out, closing connection, last message received ".concat(i-n,"ms ago, last ping sent ").concat(i-u,"ms ago")),e.close();else if(n+a<=i&&u+a<=i)try{"function"==typeof d?e.send(d()):e.send(d),u=i}catch(t){console.error("Heartbeat failed, closing connection",t instanceof Error?t.message:t),e.close()}},p);return e.addEventListener("close",function(){clearInterval(m)}
1),function(){}};var n=i(46298)},16258:(e,t,i)=>{i.d(t,{a:()=>_,r:()=>n});var n,o=i(37876),r=i(14232),a=i(5646),l=i(36877),s=i(5027),c=i.n(s),d=i(38924),p=i(21845),u=i(51580),m=i(39140),h=i(83984),f=i(8924),g=i(60015);!function(e){e.Small="Small",e.Medium="Medium",e.Large="Large",e.FullWidth="FullWidth"}(n||(n={}));let v=a.Ay.dialog.withConfig({displayName:"Modal__Container",componentId:"sc-1p58f1a-0"})([""," "," border:none;background-color:",";position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:200;overflow-y:auto;padding:2rem 0.5rem;"],d.Pu,({$isOpen:e})=>e?d.qG:d.Xn,(0,l.B3)(p.a.MidnightBlue,.95)),b=a.Ay.button.withConfig({displayName:"Modal__CloseButton",componentId:"sc-1p58f1a-1"})([""," "," position:absolute;top:8px;right:8px;background-color:",";height:32px;width:32px;border-radius:50%;"],d.GS,d.tP,p.a.Black),y=(0,a.Ay)(f.In).withConfig({displayName:"Modal__CloseIcon",componentId:"sc-1p58f1a-2"})(["fill:",";svg{fill:",";}"],p.a.White,p.a.White),x=a.Ay.div.withConfig({displayName:"Modal__Content",componentId:"sc-1p58f1a-3"})(["width:100%;display:flex;align-items:center;justify-content:center;",""],c()("size",{[n.Small]:(0,a.AH)(["max-width:360px;"]),[n.Medium]:(0,a.AH)(["max-width:552px;"]),[n.Large]:(0,a.AH)(["max-width:960px;"]),[n.FullWidth]:(0,a.AH)(["max-width:100%;"])})),_=({isOpen:e=!1,size:t=n.Medium,children:i,showCloseButton:l=!1,onClose:s,onCloseEnd:c,onOpenEnd:d,closeOnOverlayClick:p=!1,ariaLabel:f,className:_})=>{let{0:w,1:j}=(0,r.useState)(!1);(0,r.useEffect)(()=>{e?(m.m.lockPage(),j(!0)):m.m.unlockPage()},[e]);let S=(0,u.K)(()=>{e?null==d||d():(null==c||c(),j(!1))});return w||e?(0,o.jsx)(h.Z,{children:(0,o.jsx)(a.NP,{theme:{size:t},children:(0,o.jsxs)(v,Object.assign({$isOpen:e&&w,onClick:()=>{p&&s()},role:"dialog","aria-modal":!0,"aria-labelledby":f,className:_},S,{children:[l&&(0,o.jsx)(b,{onClick:s,children:(0,o.jsx)(y,{name:g.kj.Cancel,size:g.lK.Tiny})}),(0,o.jsx)(x,{onClick:e=>e.stopPropagation(),children:i})]}))})}):null}},21475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.websocketWrapper=void 0,t.websocketWrapper=function(e,t){return new Proxy(e,{get:function(e,i){var n=e[i];return"reconnect"===i?t:"function"==typeof n?(console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."),function(){}):n},set:function(e,t,i){return/^on/.test(t)?(console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."),!1):(e[t]=i,!0)}})},t.default=t.websocketWrapper},26344:(e,t,i)=>{i.d(t,{d:()=>v});var n=i(37876),o=i(14232),r=i(5646),a=i(10406),l=i(21845),s=i(17370),c=i(45031),d=i(38924),p=i(97144),u=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let m=r.Ay.label.withConfig({displayName:"Switch__Label",componentId:"sc-16vi7u4
1-0"})(["display:flex;flex-direction:",";text-align:",";column-gap:0.625rem;font-size:0.875rem;line-height:1.125rem;color:",";@media ","{font-size:1rem;}"],({$isReversed:e})=>e?"row-reverse":"row",({$isReversed:e})=>e?"right":"left",l.a.Label,s.bp.t),h=r.Ay.div.withConfig({displayName:"Switch__Box",componentId:"sc-16vi7u4-1"})(["flex-shrink:0;position:relative;width:2rem;height:1.125rem;"]),f=r.Ay.div.withConfig({displayName:"Switch__SwitchSlider",componentId:"sc-16vi7u4-2"})(["height:100%;width:100%;position:relative;background-color:",";border-radius:0.625rem;cursor:pointer;transition:background-color ",";outline:2px solid ",';&:before{content:"";width:0.875rem;height:0.875rem;background-color:',";border-radius:50%;position:absolute;top:0.125rem;left:0.125rem;transition:transform ",";}"],l.a.Label,c.xf,({theme:e})=>e.isError?l.a.Error:"transparent",l.a.White,c.xf),g=r.Ay.input.withConfig({displayName:"Switch__Input",componentId:"sc-16vi7u4-3"})(["cursor:inherit;cursor:pointer;position:absolute;opacity:0;width:100%;height:100%;top:0;left:0;padding:0;margin:0;z-index:1;&:checked ~ ","{background-color:",";}&:checked ~ ",":before{transform:translateX(0.875rem);}&:focus-visible ~ ","{"," outline-offset:0;}"],f,({theme:e})=>e.design.colorSchema.highlightColor,f,f,d.ED),v=(0,o.forwardRef)((e,t)=>{var{error:i,name:l,onChange:s,defaultChecked:c=!1,required:d,label:v,isReverseLayout:b,className:y}=e,x=u(e,["error","name","onChange","defaultChecked","required","label","isReverseLayout","className"]);let{0:_,1:w}=(0,o.useState)(c||!1),j=(0,o.useRef)(null),S=d?`${v}*`:v,C=!!i;return(0,n.jsx)(r.NP,{theme:{isError:C},children:(0,n.jsxs)(m,{className:y,$isReversed:b,children:[(0,n.jsxs)(h,{children:[(0,n.jsx)(g,Object.assign({type:"checkbox",required:d,"aria-invalid":C,"aria-errormessage":i,name:l,ref:(0,a.P)([j,t]),onChange:e=>{w(e.target.checked),s(e)},checked:_},x)),(0,n.jsx)(f,{})]}),(0,n.jsx)("div",{children:v&&(0,n.jsx)(p.E,{children:S})})]})})});v.displayName="Switch"},31579:(e,t,i)=>{let{deleteProperty:n}=Reflect,o=i(32947),r=i(88836),a=e=>"object"==typeof e&&null!==e||"function"==typeof e,l=e=>{if(!o(e))throw TypeError("Object keys must be strings or symbols");if((e=>"__proto__"===e||"constructor"===e||"prototype"===e)(e))throw Error(`Cannot set unsafe key: "${e}"`)},s=(e,t)=>t&&"function"==typeof t.split?t.split(e):"symbol"==typeof e?[e]:Array.isArray(e)?e:((e,t,i)=>{let n=(e=>Array.isArray(e)?e.flat().map(String).join(","):e)(t?((e,t)=>{if("string"!=typeof e||!t)return e;let i=e+";";return void 0!==t.arrays&&(i+=`arrays=${t.arrays};`),void 0!==t.separator&&(i+=`separator=${t.separator};`),void 0!==t.split&&(i+=`split=${t.split};`),void 0!==t.merge&&(i+=`merge=${t.merge};`),void 0!==t.preservePaths&&(i+=`preservePaths=${t.preservePaths};`),i})(e,t):e);l(n);let o=d.cache.get(n)||i();return d.cache.set(n,o),o})(e,t,()=>((e,t={})=>{let i=t.separator||".",n="/"!==i&&t.preservePaths;if("string"==typeof e&&!1!==n&&/\//.test(e))return[e];let o=[],r="",a=e=>{let t;""!==e.trim()&&Number.isInteger(t=Number(e))?o.push(t):o.push(e)};for(let t=0;t<e.length;t++){let n=e[t];if("\\"===n){r+=e[++t];continue}if(n===i){a(r),r="";continue}r+=n}return r&&a(r),o})(e,t)),c=(e,t,i,o)=>{if(l(t),void 0===i)n(e,t);else if(o&&o.merge){let n="function"===o.merge?o.merge:Object.assign;n&&r(e[t])&&r(i)?e[t]=n(e[t],i):e[t]=i}else e[t]=i;return e},d=(e,t,i,n)=>{if(!t||!a(e))return e;let o=s(t,n),r=e;for(let e=0;e<o.length;e++){let t=o[e],s=o[e+1];if(l(t),void 0===s){c(r,t,i,n);break}if("number"==typeof s&&!Array.isArray(r[t])){r=r[t]=[];continue}a(r[t])||(r[t]={}),r=r[t]}return e};d.split=s,d.cache=new Map,d.clear=()=>{d.cache=new Map},e.exports=d},32947:e=>{e.exports=function(e){return"object"==typeof e?null===e:"function"!=typeof e}},37631:(e,t,i)=>{var n;i.d(t,{z:()=>n}),function(e){e.SoftgardenVideo="sg-video",e.Video="video",e.Image="image",e.IframeVideo="link",e.ShortVideo="short-video"}(n||(n={}))},40625:(e,t,i)=>{i.d(t,{Wx:()=>d});var n,o,r=i(14232),a=Object.defineProperty,l=new Map,s=new WeakMap,c=0;function d({threshold:e,delay:t,trackVisibility:i,rootMargin:o,root:a,triggerOnce:p,skip:u,initialInView:m,fallbackInView:h,onChange:f}={}){var g;let[v,b]=r.useState(null),y=r.useRef(f),x=r.useRef(m),[_,w]=r.useState({inView:!!m,entry:void 0});y.current=f,r.useEffect(()=>{let r;if(void 0===x.current&&(x.current=m),!u&&v)return r=function(e,t,i={},o=n){if(void 0===window.IntersectionObserver&&void 0!==o){let n=e.getBoundingClientRect();return t(o,{isIntersecting:o,target:e,intersectionRatio:"number"==typeof i.threshold?i.threshold:0,time:0,boundingClientRect:n,intersectionRect:n,rootBounds:n}
1),()=>{}}let{id:r,observer:a,elements:d}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var i;return`${t}_${"root"===t?!(i=e.root)?"0":(s.has(i)||(c+=1,s.set(i,c.toString())),s.get(i)):e[t]}`}).toString(),i=l.get(t);if(!i){let n,o=new Map,r=new IntersectionObserver(t=>{t.forEach(t=>{var i;let r=t.isIntersecting&&n.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=r),[...null!=(i=o.get(t.target))?i:[]].forEach(e=>{e(r,t)})})},e);n=r.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),i={id:t,observer:r,elements:o},l.set(t,i)}return i}(i),p=d.get(e)||[];return d.has(e)||d.set(e,p),p.push(t),a.observe(e),function(){p.splice(p.indexOf(t),1),0===p.length&&(d.delete(e),a.unobserve(e)),0===d.size&&(a.disconnect(),l.delete(r))}}(v,(e,t)=>{let i=x.current;x.current=e,(void 0!==i||e)&&(w({inView:e,entry:t}),y.current&&y.current(e,t),t.isIntersecting&&p&&r&&(r(),r=void 0))},{root:a,rootMargin:o,threshold:e,trackVisibility:i,delay:t},h),()=>{r&&r()}},[Array.isArray(e)?e.toString():e,v,a,o,p,u,i,h,t]);let j=null==(g=_.entry)?void 0:g.target,S=r.useRef(void 0);v||!j||p||u||S.current===j||(S.current=j,w({inView:!!m,entry:void 0}),x.current=m);let C=[b,_.inView,_.entry];return C.ref=C[0],C.inView=C[1],C.entry=C[2],C}r.Component,null!=(null!=(o=r.useInsertionEffect)?o:r.useLayoutEffect)||r.useEffect},42259:(e,t,i)=>{i.d(t,{fp:()=>N,Y0:()=>E,eN:()=>n});var n,o=i(37876),r=i(5646),a=i(34846),l=i(21845),s=i(38924),c=i(35382),d=i(62191),p=i(6962),u=i(14232),m=i(36877),h=i(45031),f=i(65107),g=i(10406),v=i(97144),b=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let y=r.Ay.div.withConfig({displayName:"Radio__Box",componentId:"sc-1hnzdxy-0"})(["position:relative;height:2rem;width:2rem;flex-shrink:0;border:1px solid ",";border-radius:50%;"],(0,m.B3)(l.a.Black,.5)),x=r.Ay.div.withConfig({displayName:"Radio__RadioMark",componentId:"sc-1hnzdxy-1"})(["height:100%;width:100%;border-radius:50%;background-color:",";transition:box-shadow ",";&::before{",';content:"";opacity:0;height:1rem;width:1rem;border-radius:50%;background-color:',";}"],l.a.White,h.xf,s.F,({theme:e})=>e.design.colorSchema.highlightColor),_=r.Ay.span.withConfig({displayName:"Radio__Label",componentId:"sc-1hnzdxy-2"})(["",""],(0,s.Jl)()),w=r.Ay.input.withConfig({displayName:"Radio__Input",componentId:"sc-1hnzdxy-3"})(["cursor:inherit;position:absolute;opacity:0;width:100%;height:100%;top:0px;left:0px;margin:0px;padding:0px;z-index:1;&:checked ~ ","::before{opacity:1;}&:checked ~ ","{color:",";}&:focus-visible ~ ","{"," outline-offset:-1px;}"],x,_,({theme:e})=>e.design.colorSchema.highlightColor,x,s.ED),j=r.Ay.label.withConfig({displayName:"Radio__Container",componentId:"sc-1hnzdxy-4"})(["cursor:pointer;text-transform:uppercase;font-size:0.875rem;letter-spacing:0.1em;color:",";display:flex;align-items:center;gap:0.75rem;transition:color ",";&:hover{color:",";","{box-shadow:0 0 16px rgba(0,0,0,0.1);color:",";}}"],l.a.Label,h.xf,({theme:e})=>e.design.colorSchema.highlightColor,x,({theme:e})=>e.design.colorSchema.highlightColor),S=(e,t)=>{var{label:i,className:n}=e,r=b(e,["label","className"]);let a=(0,u.useRef)(null);return(0,f.B)(a.current),(0,o.jsxs)(j,{className:n,children:[(0,o.jsxs)(y,{children:[(0,o.jsx)(w,Object.assign({ref:(0,g.P)([a,t]),type:"radio"},r)),(0,o.jsx)(x,{})]}),(0,o.jsx)(_,{children:i&&(0,o.jsx)(v.E,{children:i})})]})};S.displayName="Radio";let C=(0,u.forwardRef)(S);var A=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let k=r.Ay.div.withConfig({displayName:"RadioGroup__Container",componentId:"sc-14nrfdo-0"})(["display:flex;gap:2rem 4rem;flex-wrap:wrap;"]),I=(0,u.forwardRef)((e,t)=>{var{value:i,options:n,className:r}
1=e,a=A(e,["value","options","className"]);return(0,o.jsx)(k,{className:r,children:n.map(e=>(0,o.jsx)(C,Object.assign({ref:t,label:e.label,value:e.value},a),e.value))})});var O=i(74630);let E=r.Ay.div.withConfig({displayName:"ApplicationQuestion__Text",componentId:"sc-8u7pcn-0"})(["color:",";font-size:1rem;line-height:1.25;margin-bottom:",";"],l.a.Text,(0,s.ls)(2));!function(e){e.TEXTAREA="TEXTAREA",e.TEXT="TEXT",e.YESNO="YESNO",e.CATALOG="CATALOG",e.MULTISELECT="MULTISELECT"}(n||(n={}));let N=({question:e,type:t,answerCatalog:i,error:r,questionIdInputProps:l,answerInputProps:s})=>{let{t:u}=(0,a.Bd)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(E,{children:e}),(0,o.jsx)("input",Object.assign({type:"hidden"},l)),t===n.TEXTAREA&&(0,o.jsx)(c.z,{error:r?u("widget.application.questions.text_error_message"):"",children:(0,o.jsx)(d.T,Object.assign({},s))}),t===n.TEXT&&(0,o.jsx)(c.z,{error:r?u("widget.application.questions.text_error_message"):"",children:(0,o.jsx)(p.k,Object.assign({},s))}),t===n.YESNO&&(0,o.jsx)(c.z,{error:r?u("widget.application.questions.yesno_error_message"):"",children:(0,o.jsx)(I,Object.assign({options:(null==i?void 0:i.map(e=>({value:e,label:e})))||[]},s))}),t===n.CATALOG&&(0,o.jsx)(c.z,{error:r?u("widget.application.questions.catalog_error_message"):"",children:(0,o.jsx)(O.c,Object.assign({options:(null==i?void 0:i.map(e=>({value:e,label:e})))||[]},s))}),t===n.MULTISELECT&&(0,o.jsx)(c.z,{error:r?u("widget.application.questions.catalog_error_message"):"",children:(0,o.jsx)(O.c,Object.assign({multiple:!0,options:(null==i?void 0:i.map(e=>({value:e,label:e})))||[]},s))})]})}},43085:(e,t,i)=>{i.d(t,{T:()=>o,x:()=>n});let n=1,o=1.5},43603:(e,t,i)=>{i.d(t,{H:()=>n,P:()=>o});let n=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,o=/^[+\d-() ]*$/},44336:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createOrJoinSocket=void 0;var n=i(7223),o=i(46298),r=i(45315),a=i(93090),l=i(76984);t.createOrJoinSocket=function(e,t,i,s,c,d,p,u,m){if(!o.isEventSourceSupported&&s.current.eventSourceOptions)if(o.isReactNative)throw Error("EventSource is not supported in ReactNative");else throw Error("EventSource is not supported");if(s.current.share){var h,f=null;void 0===n.sharedWebSockets[t]?(n.sharedWebSockets[t]=s.current.eventSourceOptions?new EventSource(t,s.current.eventSourceOptions):new WebSocket(t,s.current.protocols),e.current=n.sharedWebSockets[t],i(o.ReadyState.CONNECTING),f=(0,a.attachSharedListeners)(n.sharedWebSockets[t],t,s,m)):(e.current=n.sharedWebSockets[t],i(n.sharedWebSockets[t].readyState));var g={setLastMessage:c,setReadyState:i,optionsRef:s,reconnectCount:p,lastMessageTime:u,reconnect:d};return(0,l.addSubscriber)(t,g),h=f,function(){if((0,l.removeSubscriber)(t,g),!(0,l.hasSubscribers)(t)){try{var e=n.sharedWebSockets[t];e instanceof WebSocket&&(e.onclose=function(e){s.current.onClose&&s.current.onClose(e),i(o.ReadyState.CLOSED)}),e.close()}catch(e){}h&&h(),delete n.sharedWebSockets[t]}}}if(e.current=s.current.eventSourceOptions?new EventSource(t,s.current.eventSourceOptions):new WebSocket(t,s.current.protocols),i(o.ReadyState.CONNECTING),!e.current)throw Error("WebSocket failed to be created");return(0,r.attachListeners)(e.current,{setLastMessage:c,setReadyState:i},s,d.current,p,u,m)}},45315:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.attachListeners=void 0;var o=i(77759),r=i(15239),a=i(46298),l=i(14093),s=function(e,t,i,n){e.onmessage=function(e){var o;t.current.onMessage&&t.current.onMessage(e),"number"==typeof(null==n?void 0:n.current)&&(n.current=Date.now()),("function"!=typeof t.current.filter||!0===t.current.filter(e))&&(t.current.heartbeat&&"boolean"!=typeof t.current.heartbeat&&(null==(o=t.current.heartbeat)?void 0:o.returnMessage)===e.data||i(e))}},c=function(e,t,i,n,o){e.onopen=function(l){if(t.current.onOpen&&t.current.onOpen(l),n.current=0,i(a.ReadyState.OPEN),t.current.heartbeat&&e instanceof WebSocket){var s="boolean"==typeof t.current.heartbeat?void 0:t.current.heartbeat;o.current=Date.now(),(0,r.heartbeat)(e,o,s)}}},d=function(e,t,i,n,o){var r;
1return a.isEventSourceSupported&&e instanceof EventSource?function(){}:((0,l.assertIsWebSocket)(e,t.current.skipAssert),e.onclose=function(e){var l;if(t.current.onClose&&t.current.onClose(e),i(a.ReadyState.CLOSED),t.current.shouldReconnect&&t.current.shouldReconnect(e)){var s=null!=(l=t.current.reconnectAttempts)?l:a.DEFAULT_RECONNECT_LIMIT;if(o.current<s){var c="function"==typeof t.current.reconnectInterval?t.current.reconnectInterval(o.current):t.current.reconnectInterval;r=window.setTimeout(function(){o.current++,n()},null!=c?c:a.DEFAULT_RECONNECT_INTERVAL_MS)}else t.current.onReconnectStop&&t.current.onReconnectStop(s),console.warn("Max reconnect attempts of ".concat(s," exceeded"))}},function(){return r&&window.clearTimeout(r)})},p=function(e,t,i,o,r){var l;return e.onerror=function(s){var c;if(t.current.onError&&t.current.onError(s),a.isEventSourceSupported&&e instanceof EventSource&&(t.current.onClose&&t.current.onClose(n(n({},s),{code:1006,reason:"An error occurred with the EventSource: ".concat(s),wasClean:!1})),i(a.ReadyState.CLOSED),e.close()),t.current.retryOnError)if(r.current<(null!=(c=t.current.reconnectAttempts)?c:a.DEFAULT_RECONNECT_LIMIT)){var d="function"==typeof t.current.reconnectInterval?t.current.reconnectInterval(r.current):t.current.reconnectInterval;l=window.setTimeout(function(){r.current++,o()},null!=d?d:a.DEFAULT_RECONNECT_INTERVAL_MS)}else t.current.onReconnectStop&&t.current.onReconnectStop(t.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(t.current.reconnectAttempts," exceeded"))},function(){return l&&window.clearTimeout(l)}};t.attachListeners=function(e,t,i,n,r,l,u){var m,h,f,g=t.setLastMessage,v=t.setReadyState;return i.current.fromSocketIO&&(m=(0,o.setUpSocketIOPing)(u)),s(e,i,g,l),c(e,i,v,r,l),h=d(e,i,v,n,r),f=p(e,i,v,n,r),function(){v(a.ReadyState.CLOSING),h(),f(),e.close(),m&&clearInterval(m)}}},45680:(e,t,i)=>{i.d(t,{s:()=>s});var n=i(15318),o=i(37675),r=i(32251),a=i(25907),l=i(59698);let s=()=>{let{isBuilderEnv:e}=(0,r.N)(),{trackSubmitApplicationForm:t}=(0,n.c)(),{trackSubmitApplicationForm:i,trackViewApplicationForm:s,trackViewJobAdPage:c}=(0,o.j)(),{trackSubmitApplicationForm:d}=(0,a.v)(),p=(e,t)=>{let i=new CustomEvent("analytics",{detail:{payload:t,type:e}});document.dispatchEvent(i)};return{trackerEvent:p,trackerViewApplicationThankYouPageView:t=>{e||p("application-thank-you-page-view",{event_category:"Application Form",event_label:document.title,job_ad_id:t})},trackerSubmitApplicationEvent:(n,o)=>{!e&&(p("application-submit",{event_category:"Application Form",event_label:document.title,job_ad_id:n}),t(),i(),o&&d(o))},trackerViewApplicationEvent:(t,i)=>{e||l.k||(p("application-view",{event_category:"Application Form",event_label:i,job_ad_id:t}),s())},trackerViewJobAdEvent:(t,i)=>{e||l.k||(p("job-ad-view",{event_category:"Job Ads",event_label:i,job_ad_id:t}),c())}}}},46298:(e,t)=>
1{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.isEventSourceSupported=t.isReactNative=t.ReadyState=t.DEFAULT_HEARTBEAT=t.UNPARSABLE_JSON_OBJECT=t.DEFAULT_RECONNECT_INTERVAL_MS=t.DEFAULT_RECONNECT_LIMIT=t.SOCKET_IO_PING_CODE=t.SOCKET_IO_PATH=t.SOCKET_IO_PING_INTERVAL=t.DEFAULT_EVENT_SOURCE_OPTIONS=t.EMPTY_EVENT_HANDLERS=t.DEFAULT_OPTIONS=void 0,t.DEFAULT_OPTIONS={},t.EMPTY_EVENT_HANDLERS={},t.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:t.EMPTY_EVENT_HANDLERS},t.SOCKET_IO_PING_INTERVAL=25e3,t.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket",t.SOCKET_IO_PING_CODE="2",t.DEFAULT_RECONNECT_LIMIT=20,t.DEFAULT_RECONNECT_INTERVAL_MS=5e3,t.UNPARSABLE_JSON_OBJECT={},t.DEFAULT_HEARTBEAT={message:"ping",timeout:6e4,interval:25e3},function(e){e[e.UNINSTANTIATED=-1]="UNINSTANTIATED",e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"}(i||(t.ReadyState=i={})),t.isReactNative="undefined"!=typeof navigator&&"ReactNative"===navigator.product,t.isEventSourceSupported=!t.isReactNative&&function(){try{return"EventSource"in globalThis}catch(e){return!1}}()},51817:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};Object.defineProperty(t,"__esModule",{value:!0}),t.useEventSource=void 0;var r=i(14232),a=i(98918),l=i(46298);t.useEventSource=function(e,t,i){void 0===t&&(t=l.DEFAULT_EVENT_SOURCE_OPTIONS);
1var s=t.withCredentials,c=t.events,d=o(t,["withCredentials","events"]);void 0===i&&(i=!0);var p=n(n({},d),{eventSourceOptions:{withCredentials:s}}),u=(0,r.useRef)(l.EMPTY_EVENT_HANDLERS);c&&(u.current=c);var m=(0,a.useWebSocket)(e,p,i),h=m.lastMessage,f=m.readyState,g=m.getWebSocket;return(0,r.useEffect)(function(){(null==h?void 0:h.type)&&Object.entries(u.current).forEach(function(e){var t=e[0],i=e[1];t===h.type&&i(h)})},[h]),{lastEvent:h,readyState:f,getEventSource:g}}},58931:(e,t,i)=>{t.vj=t.Ay=void 0;var n=i(98918);Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return n.useWebSocket}}),i(87585);var o=i(46298);Object.defineProperty(t,"vj",{enumerable:!0,get:function(){return o.ReadyState}}),i(51817),i(14093)},73028:(e,t,i)=>{i.d(t,{v:()=>n,w:()=>C});var n,o=i(37876),r=i(5646),a=i(36877),l=i(21845),s=i(17370),c=i(38924),d=i(45031),p=i(5027),u=i.n(p),m=i(31562),h=i(98189),f=i(90347),g=i(32251),v=i(34846);!function(e){e.Light="Light",e.Dark="Dark"}(n||(n={}));let b=r.Ay.footer.withConfig({displayName:"Footer__Container",componentId:"sc-1o08s39-0"})(["display:flex;align-items:center;justify-content:center;background-color:",";padding:28px 16px;"," @media ","{padding:28px ",";}@media print{display:none;}"],l.a.MidnightBlue,u()("footerTheme",{[n.Light]:(0,r.AH)(["background-color:",";color:",";"],l.a.White,l.a.Text),[n.Dark]:(0,r.AH)(["background-color:",";color:",";"],l.a.MidnightBlue,(0,a.B3)(l.a.White,.5))}),s.bp.p,(0,c.QA)(1)),y=r.Ay.div.withConfig({displayName:"Footer__Content",componentId:"sc-1o08s39-1"})([""," flex:1 0 0%;display:flex;flex-direction:column;row-gap:1rem;@media ","{flex-direction:row;justify-content:space-between;}"],c.kL,s.bp.p),x=r.Ay.div.withConfig({displayName:"Footer__List",componentId:"sc-1o08s39-2"})(["display:flex;align-items:center;justify-content:center;flex-wrap:wrap;row-gap:0.5rem;@media ","{justify-content:flex-start;}"],s.bp.p),_=(0,r.AH)(["border-right:1px solid currentColor;margin-top:0;margin-right:10px;padding-right:10px;"]),w=r.Ay.div.withConfig({displayName:"Footer__Item",componentId:"sc-1o08s39-3"})(["&:not(:last-child){",";}"],_),j=r.Ay.div.withConfig({displayName:"Footer__PoweredItem",componentId:"sc-1o08s39-4"})(["white-space:nowrap;margin-bottom:auto;text-align:center;@media ","{text-align:right;}"],s.bp.p),S=r.Ay.a.withConfig({displayName:"Footer__Link",componentId:"sc-1o08s39-5"})(["&&{",";color:currentColor;font-size:0.875rem;border-bottom:0;transition:color ",";text-decoration:underline;text-decoration-color:color-mix(in srgb,currentColor 30%,transparent);text-decoration-thickness:1px;text-underline-offset:0.3em;"," @media ","{font-size:1rem;}}"],(0,c.Qb)(6),d.xf,u()("footerTheme",{[n.Light]:(0,r.AH)(["&:hover{color:",";}"],l.a.Label),[n.Dark]:(0,r.AH)(["&:hover{color:",";}"],l.a.White)}),s.bp.p),C=({links:e=[],poweredVisible:t=!0,jobsFeedLinkVisible:i=!0,jobsFeedLinkLink:a="/jobs.feed.json",poweredLink:l,poweredLabel:s,theme:c=n.Dark,className:d})=>{let{t:p}=(0,v.Bd)(),{triggerPageEvent:u}=(0,m.K)(),{isBuilderEnv:_}=(0,g.N)();return(0,o.jsx)(r.NP,{theme:{footerTheme:c},children:(0,o.jsx)(b,{className:d,children:(0,o.jsxs)(y,{children:[(0,o.jsxs)(x,{children:[e.map(({href:e,isBlank:t,label:i},n)=>{let r=(0,f.AY)(e);return(0,o.jsx)(w,{children:(0,o.jsx)(S,{href:r?e:encodeURIComponent(e),target:t?"_blank":"_self",onClick:e=>((e,t)=>{if(_&&!t){e.preventDefault(),u(h.C.ExternalLinkClick,{});return}})(e,t),rel:t?"noopener noreferrer":"",children:i})},n)}),i&&(0,o.jsx)(w,{children:(0,o.jsx)(S,{href:a,target:"_blank",rel:"noopener noreferrer",children:p("widget.footer.jobFeedJson")})},e.length+1)]}),t&&(0,o.jsx)(j,{children:(0,o.jsx)(S,{href:l,target:"_blank",rel:"noopener noreferrer sponsored",children:s})})]})})})}},74630:(e,t,i)=>{i.d(t,{c:()=>v});var n=i(37876),o=i(14232),r=i(10406),a=i(5646),l=i(38924),s=i(45031),c=i(21845),d=i(17370),p=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i};let u=a.Ay.div.withConfig({displayName:"PickList__Container",componentId:"sc-f6s74w-0"})(["position:relative;"]),m=a.Ay.div.withConfig({displayName:"PickList__Options",componentId:"sc-f6s74w-1"})(["display:flex;flex-direction:column;row-gap:1rem;"]),h=a.Ay.button.withConfig({displayName:"PickList__Option",componentId:"sc-f6s74w-2"})(["",";"],({theme:e,$isActive:t})=>(0,a.AH)([""," "," "," justify-content:flex-start;text-align:left;width:100%;counter-increment:counter;position:relative;font-size:1rem;line-height:1.25;padding:1rem 1.5rem 1rem 4.5rem;background-color:",";color:",";transition:background-color ",",color ",";&:before{position:absolute;top:50%;transform:translateY(-50%);left:1.5rem;color:",";content:counter(counter,upper-alpha);font-size:1.25rem;"," transition:color ",";@media ",'{font-size:1.5rem;}}&:after{content:"";',";z-index:0;pointer-events:none;box-shadow:",";
1transition:box-shadow ",";border-radius:inherit;}&:focus-visible{&:after{outline:2px solid ",";outline-offset:-4px;}}&:hover{&:before{color:",";}&:after{box-shadow:",";}}@media ","{padding:1.5rem 1.5rem 1.5rem 4.5rem;}"],l.GS,l.tP,(0,l.hD)(s.kM,s.Sw),t?e.design.colorSchema.highlightColor:c.a.White,t?c.a.White:c.a.Label,s.xf,s.xf,t?c.a.White:c.a.Label,(0,l.ji)(),s.xf,d.bp.t,l.Pu,s.FR.cardShadow,s.xf,c.a.OutlineSecondary,t?c.a.White:e.design.colorSchema.highlightColor,s.FR.hoverCardShadow,d.bp.t)),f=a.Ay.input.withConfig({displayName:"PickList__HiddenInput",componentId:"sc-f6s74w-3"})(["position:absolute;pointer-events:none;border:none;z-index:-100;width:100%;height:0;opacity:0;"]),g=(e,t)=>{var{defaultValue:i,options:a,multiple:l=!1,onChange:s}=e,c=p(e,["defaultValue","options","multiple","onChange"]);let{0:d,1:g}=(0,o.useState)(l?i?Array.isArray(i)?i:[i]:[]:i||""),v=(0,o.useRef)(null);return(0,n.jsxs)(u,Object.assign({},c,{children:[(0,n.jsx)(f,Object.assign({ref:(0,r.P)([v,t]),type:"text",defaultValue:i,readOnly:!0},c,{tabIndex:-1})),(0,n.jsx)(m,{children:a.map((e,t)=>{let i=l?d.includes(e.value):e.value===d;return(0,n.jsx)(h,{onClick:()=>(e=>{let t,i={target:{value:t=l?d.includes(e)?d.filter(t=>t!==e):[...d,e]:e,name:c.name},type:"change"};v.current&&(v.current.value=l?(null==t?void 0:t.length)>0?JSON.stringify(t):"":String(t)),g(t),null==s||s(i)})(e.value),$isActive:i,type:"button",children:e.label},t)})})]}))};g.displayName="PickList";let v=(0,o.forwardRef)(g)},76954:(e,t,i)=>{i.d(t,{k:()=>l});var n=i(14232),o=i(85882),r=i(32251);let a="page-builder-react",l=({widgetType:e,widgetId:t,events:i})=>{let{isBuilderEnv:l,mode:s}=(0,r.N)(),c=(0,n.useCallback)(function(e){return i=>{t&&i.detail.payload.widgetId===t&&e(i.detail.payload)}},[]);(0,n.useEffect)(()=>{if(s!==o.q5.Build&&!l)return;let t=`${a}:${e}:tabSelected`,n=i.onTabSelected?c(i.onTabSelected):void 0;n&&document.addEventListener(t,n);let r=`${a}:${e}:formClosed`,d=i.onFormClosed?c(i.onFormClosed):void 0;d&&document.addEventListener(r,d);let p=`${a}:${e}:formOpened`,u=i.onFormOpened?c(i.onFormOpened):void 0;u&&document.addEventListener(p,u);let m=`${a}:${e}:listItemSelected`,h=i.onListItemSelected?c(i.onListItemSelected):void 0;h&&document.addEventListener(m,h);let f=`${a}:${e}:listItemUpdated`,g=i.onListItemUpdated?c(i.onListItemUpdated):void 0;g&&document.addEventListener(f,g);let v=`${a}:${e}:listItemClosed`,b=i.onListItemClosed?c(i.onListItemClosed):void 0;return b&&document.addEventListener(v,b),()=>{n&&document.removeEventListener(t,n),d&&document.removeEventListener(r,d),u&&document.removeEventListener(p,u),h&&document.removeEventListener(m,h),g&&document.removeEventListener(f,g),b&&document.removeEventListener(v,b)}},[])}},76984:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resetSubscribers=t.removeSubscriber=t.addSubscriber=t.hasSubscribers=t.getSubscribers=void 0;var i={},n=[];t.getSubscribers=function(e){return(0,t.hasSubscribers)(e)?Array.from(i[e]):n},t.hasSubscribers=function(e){var t;return(null==(t=i[e])?void 0:t.size)>0},t.addSubscriber=function(e,t){i[e]=i[e]||new Set,i[e].add(t)},t.removeSubscriber=function(e,t){i[e].delete(t)},t.resetSubscribers=function(e){if(e&&i.hasOwnProperty(e))delete i[e];else for(var t in i)i.hasOwnProperty(t)&&delete i[t]}},77759:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setUpSocketIOPing=t.appendQueryParams=t.parseSocketIOUrl=void 0;var n=i(46298);t.parseSocketIOUrl=function(e){if(e){var t=/^https|wss/.test(e),i=e.replace(/^(https?|wss?)(:\/\/)?/,"").replace(/\/$/,""),o=t?"wss":"ws";return"".concat(o,"://").concat(i).concat(n.SOCKET_IO_PATH)}if(""===e){var t=/^https/.test(window.location.protocol),o=t?"wss":"ws",r=window.location.port?":".concat(window.location.port):"";return"".concat(o,"://").concat(window.location.hostname).concat(r).concat(n.SOCKET_IO_PATH)}return e},t.appendQueryParams=function(e,t){void 0===t&&(t={});var i=/\?([\w]+=[\w]+)/.test(e),n="".concat(Object.entries(t).reduce(function(e,t){var i=t[0],n=t[1];return e+"".concat(i,"=").concat(n,"&")},"").slice(0,-1));return"".concat(e).concat(i?"&":"?").concat(n)},t.setUpSocketIOPing=function(e,t){return void 0===t&&(t=n.SOCKET_IO_PING_INTERVAL),window.setInterval(function(){return e(n.SOCKET_IO_PING_CODE)},t)}},81344:(e,t,i)=>{i.d(t,{Xj:()=>a,is:()=>l,pz:()=>r,yS:()=>o});var n=i(59698);let o=!n.k&&(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&"ontouchend"in document),r=!n.k&&/iPhone|iPad|iPod/i.test(navigator.userAgent),a=!n.k&&/Android/i.test(navigator.userAgent),l=(()=>{var e;return!!(!n.k&&("ontouchstart"in window||(null==window?void 0:window.DocumentTouch)&&document instanceof(null==window?void 0:window.DocumentTouch)))||(e="("+" -webkit- -moz- -o- -ms- ".split(" ").join("touch-enabled),(")+"heartz)",!n.k&&window.matchMedia(e).matches)})()},82944:e=>{e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},87585:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.useSocketIO=void 0;var o=i(14232),r=i(98918),a=i(46298),l={type:"empty",payload:null},s=function(e){if(!e||!e.data)return l;var t=e.data.match(/\[.*]/);if(!t)return l;var i=JSON.parse(t);return Array.isArray(i)&&i[1]?{type:i[0],payload:i[1]}:l};t.useSocketIO=function(e,t,i){void 0===t&&(t=a.DEFAULT_OPTIONS),void 0===i&&(i=!0);var l=(0,o.useMemo)(function(){return n(n({},t),{fromSocketIO:!0})},[]),c=(0,r.useWebSocket)(e,l,i),d=c.sendMessage,p=c.sendJsonMessage,u=c.lastMessage,m=c.readyState,h=c.getWebSocket,f=(0,o.useMemo)(function(){return s(u)},[u]);return{sendMessage:d,sendJsonMessage:p,lastMessage:f,lastJsonMessage:f,readyState:m,getWebSocket:h}}},88836:(e,t,i)=>{var n=i(82944);function o(e){return!0===n(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,i;return!1!==o(e)&&"function"==typeof(t=e.constructor)&&!1!==o(i=t.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},93090:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.attachSharedListeners=void 0;var o=i(7223),r=i(46298),a=i(76984),l=i(77759),s=i(15239),c=function(e,t,i){e.onmessage=function(e){(0,a.getSubscribers)(t).forEach(function(t){var n;t.optionsRef.current.onMessage&&t.optionsRef.current.onMessage(e),"number"==typeof(null==(n=null==t?void 0:t.lastMessageTime)?void 0:n.current)&&(t.lastMessageTime.current=Date.now()),("function"!=typeof t.optionsRef.current.filter||!0===t.optionsRef.current.filter(e))&&(i&&"boolean"!=typeof i&&(null==i?void 0:i.returnMessage)===e.data||t.setLastMessage(e))})}},d=function(e,t,i){e.onopen=function(n){var o=(0,a.getSubscribers)(t);o.forEach(function(t){t.reconnectCount.current=0,t.optionsRef.current.onOpen&&t.optionsRef.current.onOpen(n),t.setReadyState(r.ReadyState.OPEN),i&&e instanceof WebSocket&&(t.lastMessageTime.current=Date.now())}),i&&e instanceof WebSocket&&(0,s.heartbeat)(e,o.map(function(e){return e.lastMessageTime}),"boolean"==typeof i?void 0:i)}},p=function(e,t){e instanceof WebSocket&&(e.onclose=function(e){(0,a.getSubscribers)(t).forEach(function(t){t.optionsRef.current.onClose&&t.optionsRef.current.onClose(e),t.setReadyState(r.ReadyState.CLOSED)}),delete o.sharedWebSockets[t],(0,a.getSubscribers)(t).forEach(function(t){var i;if(t.optionsRef.current.shouldReconnect&&t.optionsRef.current.shouldReconnect(e)){var n=null!=(i=t.optionsRef.current.reconnectAttempts)?i:r.DEFAULT_RECONNECT_LIMIT;if(t.reconnectCount.current<n){var o="function"==typeof t.optionsRef.current.reconnectInterval?t.optionsRef.current.reconnectInterval(t.reconnectCount.current):t.optionsRef.current.reconnectInterval;setTimeout(function(){t.reconnectCount.current++,t.reconnect.current()},null!=o?o:r.DEFAULT_RECONNECT_INTERVAL_MS)}else t.optionsRef.current.onReconnectStop&&t.optionsRef.current.onReconnectStop(t.optionsRef.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(n," exceeded"))}})})},u=function(e,t){e.onerror=function(i){(0,a.getSubscribers)(t).forEach(function(t){t.optionsRef.current.onError&&t.optionsRef.current.onError(i),r.isEventSourceSupported&&e instanceof EventSource&&(t.optionsRef.current.onClose&&t.optionsRef.current.onClose(n(n({},i),{code:1006,reason:"An error occurred with the EventSource: ".concat(i),wasClean:!1})),t.setReadyState(r.ReadyState.CLOSED))}),r.isEventSourceSupported&&e instanceof EventSource&&e.close()}};t.attachSharedListeners=function(e,t,i,n){var o;return i.current.fromSocketIO&&(o=(0,l.setUpSocketIOPing)(n)),c(e,t,i.current.heartbeat),p(e,t),d(e,t,i.current.heartbeat),u(e,t),function(){o&&clearInterval(o)}}},93223:(e,t,i)=>{i.d(t,{z:()=>o});var n=i(32251);let o=()=>{let{location:e}=(0,n.N)();return window.location}},95792:(e,t,i)=>{i.d(t,{o:()=>p});var n=i(37876),o=i(34846),r=i(5646),a=i(85882),l=i(32251),s=i(21845),c=i(38924);let d=r.Ay.button.withConfig({displayName:"SkipToContent__SkipButton",componentId:"sc-1dt76sz-0"})(["opacity:0;z-index:-1;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;text-decoration:underline;text-decoration-color:currentColor;text-decoration-thickness:1px;text-underline-offset:0.25em;background-color:",";box-shadow:0 0 32px rgba(0,0,0,0.15);width:0;&:focus-visible{z-index:1000;opacity:1;width:initial;}",";
1"],s.a.Background,(0,c.Qb)(-3)),p=({title:e,onSkip:t,onFocus:i,onBlur:r,className:s})=>{let{t:c}=(0,o.Bd)(),{mode:p}=(0,l.N)(),u=p===a.q5.Build,m=c("widget.header.skip_navigation.title");return u?null:(0,n.jsx)(d,{onClick:e=>{e.preventDefault(),t()},onFocus:i,onBlur:r,className:s,children:e||m})}},98755:(e,t,i)=>{i.d(t,{Y:()=>n});let n=(e,t)=>Object.keys(t).reduce((e,i)=>e.replace(RegExp(`%${i}%`,"g"),t[i]),e)},98918:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var i,n,o,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){var c=[l,s];if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(!(o=(o=r.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){r=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(6===c[0]&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(e){c=[6,e],n=0}finally{i=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useWebSocket=void 0;var l=i(14232),s=i(98477),c=i(46298),d=i(44336),p=i(1175),u=a(i(21475)),m=i(14093);t.useWebSocket=function(e,t,i){void 0===t&&(t=c.DEFAULT_OPTIONS),void 0===i&&(i=!0);var a=(0,l.useState)(null),h=a[0],f=a[1],g=(0,l.useState)({}),v=g[0],b=g[1],y=(0,l.useMemo)(function(){if(!t.disableJson&&h)try{return JSON.parse(h.data)}catch(e){return c.UNPARSABLE_JSON_OBJECT}return null},[h,t.disableJson]),x=(0,l.useRef)(null),_=(0,l.useRef)(null),w=(0,l.useRef)(function(){}),j=(0,l.useRef)(0),S=(0,l.useRef)(Date.now()),C=(0,l.useRef)([]),A=(0,l.useRef)(null),k=(0,l.useRef)(t);k.current=t;var I=x.current&&void 0!==v[x.current]?v[x.current]:null!==e&&!0===i?c.ReadyState.CONNECTING:c.ReadyState.UNINSTANTIATED,O=t.queryParams?JSON.stringify(t.queryParams):null,E=(0,l.useCallback)(function(e,t){var i;if(void 0===t&&(t=!0),c.isEventSourceSupported&&_.current instanceof EventSource)return void console.warn("Unable to send a message from an eventSource");(null==(i=_.current)?void 0:i.readyState)===c.ReadyState.OPEN?((0,m.assertIsWebSocket)(_.current,k.current.skipAssert),_.current.send(e)):t&&C.current.push(e)},[]),N=(0,l.useCallback)(function(e,t){void 0===t&&(t=!0),E(JSON.stringify(e),t)},[E]),P=(0,l.useCallback)(function(){return!0!==k.current.share||c.isEventSourceSupported&&_.current instanceof EventSource?_.current:(null===A.current&&_.current&&((0,m.assertIsWebSocket)(_.current,k.current.skipAssert),A.current=(0,u.default)(_.current,w)),A.current)},[]);return(0,l.useEffect)(function(){if(null!==e&&!0===i){var t,a=!1,l=!0,u=function(){return o(void 0,void 0,void 0,function(){var i,o,u;return r(this,function(r){switch(r.label){case 0:return i=x,[4,(0,p.getUrl)(e,k)];case 1:if(i.current=r.sent(),null===x.current)return console.error("Failed to get a valid URL. WebSocket connection aborted."),x.current="ABORTED",(0,s.flushSync)(function(){return b(function(e){return n(n({},e),{ABORTED:c.ReadyState.CLOSED})})}),[2];return o=function(e){a||(0,s.flushSync)(function(){return f(e)})},u=function(e){a||(0,s.flushSync)(function(){return b(function(t){var i;return n(n({},t),x.current&&((i={})[x.current]=e,i))})})},l&&(t=(0,d.createOrJoinSocket)(_,x.current,u,k,o,w,j,S,E)),[2]}})})};return w.current=function(){a||(A.current&&(A.current=null),null==t||t(),u())},u(),function(){a=!0,l=!1,A.current&&(A.current=null),null==t||t(),f(null)}}(null===e||!1===i)&&(j.current=0,b(function(e){var t;return n(n({},e),x.current&&((t={})[x.current]=c.ReadyState.CLOSED,t))}))},[e,i,O,E]),(0,l.useEffect)(function(){I===c.ReadyState.OPEN&&C.current.splice(0).forEac
1h(function(e){E(e)})},[I]),{sendMessage:E,sendJsonMessage:N,lastMessage:h,lastJsonMessage:y,readyState:I,getWebSocket:P}}}}]);
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.