@flarehr/workflows-app 4.45.0 → 4.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/workflows-app.js +1 -1
- package/package.json +1 -1
package/dist/workflows-app.js
CHANGED
|
@@ -806,7 +806,7 @@ Thoth.Json.Net only support the following enum types:
|
|
|
806
806
|
- int
|
|
807
807
|
- uint32
|
|
808
808
|
If you can't use one of these types, please pass an extra decoder.
|
|
809
|
-
`))(c);return h=>p(h)}}else if(Uu(r))if(Oo(r)){const f=ar(c=>Et(e,t,!1,c),Yu(r));return c=>p=>Array.isArray(p)?Ct(h=>Gm(ur(h)),fh(0,f,c,p)):new m(1,[[c,new B(0,["an array",p])]])}else switch(ge(zu(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=Et(e,t,!0,ne(0,it(r))),c=>p=>bv(te(s),c,p);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=Et(e,t,!1,ne(0,it(r))),c=>p=>lh(te(i),c,p);case"System.Collections.Generic.IEnumerable`1[System.Object]":return o=Et(e,t,!1,ne(0,it(r))),c=>p=>Cv(te(o),c,p);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const c=Et(e,t,!1,ne(0,it(r))),p=Et(e,t,!1,ne(1,it(r)));let h;const $=y([g=>w=>Pv(te(c),te(p),g,w),(a=Iv(te(c),te(p)),g=>w=>lh(te(a),g,w))]);return h=g=>w=>Sv($,g,w),g=>w=>xv(Av,te(h),g,w)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const c=Et(e,t,!1,ne(0,it(r)));return p=>h=>{const $=uh(te(c),p,h);return $.tag===0?new m(0,[Ev($.fields[0])]):new m(1,[$.fields[0]])}}default:return hh(e,t,n,r)}else switch(l){case"System.Boolean":return f=>c=>$v(f,c);case"Microsoft.FSharp.Core.Unit":return f=>c=>pv(f,c);case"System.String":return f=>c=>eh(f,c);case"System.Char":return f=>c=>hv(f,c);case"System.SByte":return th;case"System.Byte":return nh;case"System.Int16":return rh;case"System.UInt16":return sh;case"System.Int32":return ih;case"System.UInt32":return oh;case"System.Double":return f=>c=>gv(f,c);case"System.Single":return f=>c=>wv(f,c);case"System.DateTime":return f=>c=>yv(f,c);case"System.DateTimeOffset":return f=>c=>_v(f,c);case"System.TimeSpan":return f=>c=>vv(f,c);case"System.Guid":return f=>c=>mv(f,c);case"System.Object":return f=>c=>new m(0,[c]);default:return hh(e,t,n,r)}else{const f=u;return c=>p=>f.contents(c)(p)}}function Mv(e){return pl({Compare:zs})}function sn(e,t,n){const r=Ee(t,new Ge(0,[]));return Et(Mv(),r,!1,e)}class Ov{constructor(t){this.magicLink=t,this.backendUrl=`${jn}/workflows/public-backend/invites/${this.magicLink.InviteToken}`}}function Dv(e){return new Ov(e)}function Nv(e){return E.Delay(()=>{let t,n;const r=Ss(e,(t=tn(new Ft(1,[]),en(`${e.backendUrl}/magic-link/validate`)),yn(new Qt(1,[(n=new C0(e.magicLink.MagicCode),_n(0,vn(j_(),new Ge(1,[]),void 0,void 0)(n)))]),t)));return E.Bind(r,s=>{const i=s;if(i.tag===1)return E.Return(new m(1,[i.fields[0]]));{let o;const a=i.fields[0];return o=a.statusCode===200?rn(te(sn(q_(),new Ge(1,[]))),a.responseText):new m(1,["Unexpected response from backend"]),E.Return(o)}})})}function Rv(e,t){return E.Delay(()=>{let n,r;const s=Ss(e,(n=tn(new Ft(1,[]),en(`${e.backendUrl}/magic-link/reissue`)),yn(new Qt(1,[(r=new S0(e.magicLink.MagicCode,t),_n(0,vn(J_(),new Ge(1,[]),void 0,void 0)(r)))]),n)));return E.Bind(s,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?rn(te(sn(Q_(),new Ge(1,[]))),l.responseText):new m(1,["Unexpected response from backend"]),E.Return(a)}})})}function Bv(e,t){return E.Delay(()=>{let n,r;const s=Ss(e,(n=tn(new Ft(1,[]),en(`${e.backendUrl}/one-time-code/issue`)),yn(new Qt(1,[(r=new k0(e.magicLink.MagicCode,t),_n(0,vn(e2(),new Ge(1,[]),void 0,void 0)(r)))]),n)));return E.Bind(s,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?rn(te(sn(s2(),new Ge(1,[]))),l.responseText):new m(1,["Unexpected response from backend"]),E.Return(a)}})})}function Lv(e,t){return E.Delay(()=>{let n,r;const s=Ss(e,(n=tn(new Ft(1,[]),en(`${e.backendUrl}/one-time-code/validate`)),yn(new Qt(1,[(r=new x0(t),_n(0,vn(i2(),new Ge(1,[]),void 0,void 0)(r)))]),n)));return E.Bind(s,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?rn(te(sn(u2(),new Ge(1,[]))),l.responseText):new m(1,["Unexpected response from backend"]),E.Return(a)}})})}function Vv(e,t){return E.Delay(()=>{let n,r;const s=Ss(e,(n=tn(new Ft(1,[]),en(`${e.backendUrl}/progress`)),yn(new Qt(1,[(r=new I0(e.magicLink.MagicCode,t),_n(0,vn(c2(),new Ge(1,[]),void 0,void 0)(r)))]),n)));return E.Bind(s,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?rn(te(sn(m2(),new Ge(1,[]))),l.responseText):new m(1,["Unexpected response from backend"]),E.Return(a)}})})}function Ss(e,t){return E.Delay(()=>{let n;const r=vs(t);return n=E.Bind(r,s=>E.Return(new m(0,[s]))),E.Bind(n,s=>{const i=s;if(i.tag===1)return E.Return(new m(1,[i.fields[0]]));{const o=i.fields[0];if(o.statusCode===429||o.statusCode>=500){let a;const l=_i(2e3);return a=E.Bind(l,u=>E.Return(new m(0,[u]))),E.Bind(a,u=>{const f=u;if(f.tag===1)return E.Return(new m(1,[f.fields[0]]));{const c=vs(t);return E.Bind(c,p=>E.Return(new m(0,[p])))}})}else return E.Return(new m(0,[o]))}})})}class Fv extends R{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AuthCode"]}}function gl(e){return new Fv(e)}function Wv(e){return e.fields[0]}class mh extends L{constructor(t,n,r,s,i,o){super(),this.id_token=t,this.access_token=n,this.expires_in=r,this.refresh_token=s,this.scope=i,this.token_type=o}}function wl(){return ue("Workflows.UI.Auth.Types.Credentials",[],mh,()=>[["id_token",z],["access_token",z],["expires_in",Fm],["refresh_token",Z(z)],["scope",z],["token_type",z]])}let Hn=class extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["SignIn","SignInWithCurrentAuth","NavigateToOnboarding"]}};function jv(){return[new ul(ce(),new H(0,[]),void 0,new v0(0,[new b0(void 0)])),I(e=>{e(new j(1,[new Ce(0,[])]))})]}function Uv(e,t,n,r,s){let i,o,a,l,u,f,c;const p=Dv(e);switch(r.tag){case 1:if(r.fields[0].tag===1){if(r.fields[0].fields[0].tag===1)return[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})];{let h;const $=r.fields[0].fields[0].fields[0].Outcome;switch($.tag){case 1:{const g=$.fields[0],w=g.OneTimeCodeOptionAvailable;h=g.IsInitialMagicLinkUsed?w?new j(0,[new H(1,[g.FirstName,new ll(1,[])])]):new j(0,[new H(1,[g.FirstName,new ll(0,[])])]):w?new j(3,[!1,new Ce(0,[])]):new j(0,[new H(4,[])]);break}case 4:{h=new j(0,[new H(5,[])]);break}case 2:case 7:{h=new j(0,[new H(6,[new re(2,[])])]);break}case 3:{h=new j(0,[new H(6,[new re(4,[])])]);break}case 5:{h=new j(0,[new H(6,[new re(3,[])])]);break}case 6:{h=new j(0,[new H(6,[new re(1,[])])]);break}default:{const g=$.fields[0];g.IsInitialMagicLinkUsed?(n(gl(g.AuthCode)),h=new j(0,[new H(1,[g.FirstName,new ll(2,[])])])):h=new j(6,[g.AuthCode])}}return[new ul(r.fields[0].fields[0].fields[0].CssOverrides,s.Page,H_(r.fields[0].fields[0].fields[0].Outcome),Ee(G_(r.fields[0].fields[0].fields[0].Outcome),s.JourneyType)),I(g=>{g(h)})]}}else return[s,It(h=>{He(h)},()=>Nv(p),void 0,h=>new j(1,[new Ce(1,[h])]),h=>new j(1,[new Ce(1,[new m(1,[h.message])])]))];case 2:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})]:[s,(i=new j(0,[(o=r.fields[1].fields[0].fields[0].Outcome,o.tag===2?new H(2,[o.fields[0].MaskedEmail]):o.tag===1?new H(6,[new re(2,[])]):o.tag===5?new H(6,[new re(2,[])]):o.tag===3?new H(6,[new re(4,[])]):o.tag===4?new H(6,[new re(1,[])]):o.tag===6?new H(5,[]):o.tag===7?new H(6,[new re(3,[])]):new H(2,[o.fields[0].MaskedEmail]))]),I(h=>{h(i)}))]:[s,It(h=>{He(h)},h=>Rv(p,h),r.fields[0],h=>new j(2,[r.fields[0],new Ce(1,[h])]),h=>new j(2,[r.fields[0],new Ce(1,[new m(1,[h.message])])]))];case 3:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})]:[s,(a=new j(0,[(l=r.fields[1].fields[0].fields[0].Outcome,l.tag===1?new H(4,[]):l.tag===2?new H(6,[new re(0,[])]):l.tag===3?r.fields[0]?s.Page:new H(3,[l.fields[0].MaskedPhone]):l.tag===4?new H(6,[new re(2,[])]):l.tag===7?new H(6,[new re(2,[])]):l.tag===5?new H(6,[new re(4,[])]):l.tag===6?new H(6,[new re(1,[])]):l.tag===8?new H(5,[]):l.tag===9?new H(6,[new re(3,[])]):r.fields[0]?s.Page:new H(3,[l.fields[0].MaskedPhone]))]),I(h=>{h(a)}))]:[s,It(h=>{He(h)},h=>Bv(p,h),r.fields[0],h=>new j(3,[r.fields[0],new Ce(1,[h])]),h=>new j(3,[r.fields[0],new Ce(1,[new m(1,[h.message])])]))];case 4:return r.fields[2].tag===1?r.fields[2].fields[0].tag===1?[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})]:[s,(u=r.fields[2].fields[0].fields[0].Outcome,u.tag===1?u.fields[0].RemainingAttempts>0?(r.fields[1]({AttemptsRemaining:u.fields[0].RemainingAttempts}),J()):I(h=>{h(new j(0,[new H(6,[new re(0,[])])]))}):u.tag===5?I(h=>{h(new j(0,[new H(6,[new re(0,[])])]))}):u.tag===2?(r.fields[1]({}),J()):u.tag===3?(r.fields[1]({}),J()):u.tag===4?(r.fields[1]({}),J()):u.tag===6?I(h=>{h(new j(0,[new H(6,[new re(4,[])])]))}):u.tag===7?I(h=>{h(new j(0,[new H(6,[new re(1,[])])]))}):u.tag===8?I(h=>{h(new j(0,[new H(6,[new re(2,[])])]))}):u.tag===9?I(h=>{h(new j(0,[new H(5,[])]))}):u.tag===10?I(h=>{h(new j(0,[new H(6,[new re(0,[])])]))}):I(h=>{h(new j(6,[u.fields[0].AuthCode]))}))]:[s,It(h=>{He(h)},h=>Lv(p,h),r.fields[0],h=>new j(4,[r.fields[0],r.fields[1],new Ce(1,[h])]),h=>new j(4,[r.fields[0],r.fields[1],new Ce(1,[new m(1,[h.message])])]))];case 5:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})]:[s,(f=(c=r.fields[1].fields[0].fields[0].Outcome,c.tag===1?new j(0,[new H(6,[new re(2,[])])]):c.tag===4?new j(0,[new H(6,[new re(2,[])])]):c.tag===2?new j(0,[new H(6,[new re(4,[])])]):c.tag===3?new j(0,[new H(6,[new re(1,[])])]):c.tag===5?new j(0,[new H(5,[])]):c.tag===6?new j(0,[new H(6,[new re(0,[])])]):r.fields[0].tag===1?new j(3,[!1,new Ce(0,[])]):r.fields[0].tag===2?new j(6,[void 0]):new j(2,[!1,new Ce(0,[])])),I(h=>{h(f)}))]:[s,It(h=>{He(h)},h=>Vv(p,h),r.fields[0].tag===1?!1:r.fields[0].tag===2,h=>new j(5,[r.fields[0],new Ce(1,[h])]),h=>new j(5,[r.fields[0],new Ce(1,[new m(1,[h.message])])]))];case 6:return t(Le(gl,r.fields[0])),[s,J()];default:return[new ul(s.CssOverrides,r.fields[0],s.Branding,s.JourneyType),J()]}}function zv(e,t,n,r){const s=hi(!1),i=Le(l=>d("span",{className:"font-semibold",children:`${l}`}),cn(l=>l.CompanyName,t)),o=n.tag===1?`Hi, ${e}`:n.tag===2?`${e}, join your workplace benefits program`:n.tag===3?`Hi, ${e}`:n.tag===4?`Hi, ${e}`:`Welcome, ${e}`,a=pe(A(()=>{let l,u;return V((l=n,l.tag===1?_(fi([])):l.tag===2?_(d("div",C(y([["className","sm:w-[700px]"],(u=[d("img",{src:"/workflows/app/app-invite/welcome.png"})],["children",b.Children.toArray(Array.from(u))])])))):l.tag===3?_(fi([])):l.tag===4?_(fi([])):_(fi([]))),A(()=>V(_(hn(o)),A(()=>{let f;return V(_(d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(f=pe(A(()=>{let c;return n.tag===1?V(_(Ee(i,d("span",{children:["Your employer"]}))),A(()=>V(_(d("span",{children:[" has requested additional information from you."]})),A(()=>_(d("p",{children:["Sign in to complete your information request."]})))))):n.tag===2?_((c="Your employer has partnered with Flare Benefits to give you exclusive access to savings and perks from Australia’s most-loved brands, plus special offers to help you save on bigger expenses like household utilities, health insurance and more.",d("p",{children:[c]}))):n.tag===3?_(d("p",{children:["Sign in to start setting up your benefits."]})):n.tag===4?_(d("p",{children:["Sign in to start setting up your benefits."]})):V(_(d("p",{children:["Congratulations on the new role!"]})),A(()=>{let p;return _((p=y([d("span",{children:["Sign in to complete your onboarding with "]}),Ee(i,d("span",{children:["your employer"]})),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(p))})))}))})),["children",b.Children.toArray(Array.from(f))])])))),A(()=>_(Xo(void 0,()=>{s[1](!0),r()},s[0],[d("span",{children:[n.tag===1?"Sign in":n.tag===2?"Continue":(n.tag===3||n.tag===4,"Sign in")]})]))))}))))}));return d(Ie,{},...a)}function Hv(e,t){let n,r,s,i;const o=[$p([]),hn("Check your inbox"),d("div",C(y([(n="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",n]),(r=[(s=y([d("span",{children:["We’ve sent a temporary access link to "]}),d("span",{className:"font-semibold",children:$c(e,"*","•")}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(s))})),d("p",{children:["Click the link to confirm your email address and sign in. The link is valid for 5 minutes."]})],["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className","text-sm text-gray-900 whitespace-pre-wrap mt-10 sm:mt-14 space-y-4 leading-5"],(i=pe(A(()=>V(_(d("p",{children:["Can’t see the email? Check your spam folder."]})),A(()=>{const a=t;return a==null?_(ee()):_(rs(a))})))),["children",b.Children.toArray(Array.from(i))])])))];return d(Ie,{},...o)}let on=class extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ResendTimerTick","SignIn","IncorrectOneTimeCodeCallback","SetCodeInvalid","SetCodeInputValue","SetReissueLinkInProgress"]}},Gn=class extends L{constructor(t,n,r,s,i,o){super(),this.AttemptsRemaining=t,this.CodeInvalid=n,this.CodeInputValue=r,this.ResendTimer=s,this.SignInInProgress=i,this.ReissueLinkInProgress=o}};function Gv(){return[new Gn(void 0,!1,"",void 0,!1,!1),J()]}function Yv(e,t,n){let r;switch(t.tag){case 1:{const s=Lo(oa,n.CodeInputValue);return s.length===6?(e([Zo(s,511,!1,32),t.fields[0]]),[new Gn(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,n.ResendTimer,!0,n.ReissueLinkInProgress),J()]):[n,I(i=>{i(new on(3,[!0]))})]}case 2:return[new Gn(t.fields[0],n.CodeInvalid,n.CodeInputValue,n.ResendTimer,n.SignInInProgress,n.ReissueLinkInProgress),I(s=>{s(new on(3,[!0]))})];case 3:{const s=t.fields[0];return[new Gn(n.AttemptsRemaining,s,s?"":n.CodeInputValue,n.ResendTimer,!1,n.ReissueLinkInProgress),J()]}case 4:return[new Gn(n.AttemptsRemaining,n.CodeInvalid,t.fields[0],n.ResendTimer,n.SignInInProgress,n.ReissueLinkInProgress),J()];case 5:return[new Gn(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,n.ResendTimer,n.SignInInProgress,!0),J()];default:{const s=Bi(a=>{He(a)},()=>E.Delay(()=>E.Bind(_i(1e3),()=>E.Return(void 0))),void 0,()=>new on(0,[]));let i;const o=n.ResendTimer;return i=o!=null?o>0?(r=o|0,[r-1,s]):[void 0,J()]:[20,s],[new Gn(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,i[0],n.SignInInProgress,n.ReissueLinkInProgress),i[1]]}}}function Yi(e){e.target.id==="one-time-code-input"||e.key!=="Enter"&&document.getElementById("one-time-code-input").focus()}function qv(){document.addEventListener("keypress",e=>{Yi(e)}),document.addEventListener("paste",e=>{Yi(e)})}const Jv={Dispose(){document.removeEventListener("keypress",e=>{Yi(e)}),document.removeEventListener("paste",e=>{Yi(e)})}};function Zv(e){const t=e.reissueLink,n=e.reissueOneTimeCode,r=e.validateOneTimeCode,s=e.maskedPhone,i=il(()=>Li(Gv,(f,c)=>Yv(r,f,c),(f,c)=>{}),void 0,void 0),o=i[0],a=i[1];Ko(()=>(qv(),Jv),new Array(0));const l=()=>{a(new on(1,[f=>{a(new on(2,[f.AttemptsRemaining]))}]))},u=pe(A(()=>V(_(pp([])),A(()=>V(_(hn("Enter your security code")),A(()=>{let f,c,p;return V(_(d("div",C(y([(f="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",f]),(c=[(p=y([d("span",{children:["We’ve sent a security code to your mobile number ending in •••"]}),d("span",{className:"font-semibold",children:Lo(oa,s)}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(p))})),d("p",{children:["Enter your code to sign in."]})],["children",b.Children.toArray(Array.from(c))])])))),A(()=>{let h;return V(_(d("div",C(y([["className","mt-8 flex relative"],(h=pe(A(()=>{let $;return V(_(d("input",C(y([["className","absolute w-full h-full peer z-10 opacity-0"],["id","one-time-code-input"],["type","text"],["autoComplete","one-time-code"],["maxLength",6],["onClick",g=>{const w=g.target;w.selectionStart=o.CodeInputValue.length|0,w.selectionEnd=o.CodeInputValue.length|0,a(new on(3,[!1]))}],["onChange",g=>{const w=Lo(oa,g.target.value);a(new on(4,[w])),w.length===6&&l()}],($=o.CodeInputValue,["ref",g=>{g!=null&&!O(g.value,$)&&(g.value=$)}])])))),A(()=>Ic(g=>{const w=Le(S=>S,yc(g,o.CodeInputValue.split(""))),v=Le(S=>S,yc(g-1,o.CodeInputValue.split("")));return _(d("div",{key:g,className:ye(" ",pe(A(()=>V(_("flex justify-center items-center text-xl w-10 h-12 rounded-md ring-inset ring-1 transition ease-in"),A(()=>V(o.CodeInvalid?_("ring-red-600"):_("ring-gray-400"),A(()=>V(_(g===2?"mr-4":g===5?"":"mr-2"),A(()=>w!=null||v!=null||g===0?_("peer-focus:ring-2 peer-focus:ring-primary-base"):dr()))))))))),children:Ee(w,"")}))},h0(0,1,5))))})),["children",b.Children.toArray(Array.from(h))])])))),A(()=>{let $;return V(o.CodeInvalid?_(d("p",C(y([["className","w-[288px] text-red-600 mt-2 leading-5"],($=pe(A(()=>V(_("The code you entered is invalid"),A(()=>{let g;return V((g=o.AttemptsRemaining,g==null?_(ee()):_(`, you have ${g} attempts remaining`)),A(()=>V(_("."),A(()=>o.AttemptsRemaining==null?_(" Try again or click on the link below to resend the code."):_(ee())))))})))),["children",b.Children.toArray(Array.from($))])])))):dr(),A(()=>V(_(Xo("sm:w-[288px] mt-6",l,o.SignInInProgress,[d("span",{children:["Continue"]})])),A(()=>{let g;return _(d("div",C(y([["className","mt-8 sm:mt-14 text-sm text-gray-900 whitespace-pre-wrap leading-5 space-y-4"],(g=pe(A(()=>{let w,v;return V((w=o.ResendTimer,w!=null?_(d("p",{children:[`Message sent. Wait ${w} seconds before trying again.`]})):_((v=y([d("span",{children:["Didn’t get the code? "]}),d("span",{className:"text-primary-base underline underline-offset-3 cursor-pointer",onClick:S=>{n(),a(new on(0,[]))},children:"Resend message"}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(v))})))),A(()=>{let S;return _((S=y([d("span",{children:["Still having trouble? "]}),d("span",{className:"text-primary-base underline underline-offset-3 cursor-pointer",onClick:N=>{o.ReissueLinkInProgress||(a(new on(5,[])),t())},children:"Sign in with email instead"}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(S))})))}))})),["children",b.Children.toArray(Array.from(g))])]))))}))))}))}))}))))));return d(Ie,{},...u)}function Xv(e){const t=e.reissueLink,n=e.brandingOption,r=hi(!1),s=pe(A(()=>V(_(gp([])),A(()=>V(_(hn("Access link timed-out")),A(()=>{let i,o;return V(_(d("div",C(y([(i="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",i]),(o=[d("p",{children:["Your 5-minute temporary access link has timed-out."]}),d("p",{children:["Get a new link to continue."]})],["children",b.Children.toArray(Array.from(o))])])))),A(()=>V(_(Xo("mt-8 mb-8 sm:mb-14",()=>{r[1](!0),t()},r[0],[d("span",{children:["Get a new link"]})])),A(()=>{const a=n;return a==null?_(ee()):_(rs(a))}))))}))))));return d(Ie,{},...s)}function qi(e,t){const n=Ee(cn(s=>s.CompanyName,e),"your employer"),r=pe(A(()=>V(_(qo([])),A(()=>V(_(hn("You’re all done")),A(()=>{let s;return V(_(d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(s=[d("p",{children:[`Your ${t} is now complete and your pay information has now been submitted to ${n}.`]}),d("p",{children:["You can now close this window."]})],["children",b.Children.toArray(Array.from(s))])])))),A(()=>{const i=e;return i==null?_(ee()):_(rs(i))}))}))))));return d(Ie,{},...r)}function ph(){let e,t,n,r,s,i,o,a,l;return d("div",C(y([["className","flex lg:min-w-[1024px] xl:min-w-[1280px] max-w-screen-xl justify-center"],(e=[d("div",C(y([["className","flex flex-col justify-center items-center"],(t=[qo([]),hn("You’re all set!"),d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(n=[d("p",{children:["Access your exclusive benefits by downloading the Flare app."]}),d("div",C(y([["className","hidden lg:flex justify-center lg:py-8"],(r=[d("img",{className:"h-40",src:"/workflows/app/app-invite/qr.png"})],["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className","flex items-center justify-center lg:hidden"],(s=[d("img",{className:"w-[280px]",src:"/workflows/app/app-invite/completed.png"})],["children",b.Children.toArray(Array.from(s))])]))),d("p",C(y([["className","font-semibold pt-5 lg:pt-0"],(i=[d("span",{className:"lg:hidden",children:"Download the Flare App"}),d("span",{className:"hidden lg:block",children:"Scan to download"})],["children",b.Children.toArray(Array.from(i))])]))),d("p",{children:"Available on iOS and Android"})],["children",b.Children.toArray(Array.from(n))])]))),d("div",C(y([["className","flex space-x-6"],(o=[d("a",C(y([["href","https://apps.apple.com/us/app/flare/id1587276031"],["target","_blank"],["rel","noreferrer"],(a=[d("img",{className:"h-10 cursor-pointer",src:"/workflows/app/app-invite/app-store.png"})],["children",b.Children.toArray(Array.from(a))])]))),d("a",C(y([["href","https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits"],["target","_blank"],["rel","noreferrer"],(l=[d("img",{className:"h-10 cursor-pointer",src:"/workflows/app/app-invite/google-play.png"})],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(t))])]))),d("img",{className:"hidden lg:block w-[640px]",src:"/workflows/app/app-invite/completed.png"})],["children",b.Children.toArray(Array.from(e))])])))}function $h(){let e;const t=[qo([]),hn("You’re all done"),d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(e=[d("p",{children:["You’ve finished setting up your benefits."]}),d("p",{children:["You can now close this window."]})],["children",b.Children.toArray(Array.from(e))])]))),rs(new al("Flare",void 0,new ol("support@flarehr.com",void 0)))];return d(Ie,{},...t)}function Kv(e){const t=e.startAuthCodeExchangeBackground,n=e.navigateAuthCodeExchangePage,r=e.magicLink,s=il(()=>Li(jv,(l,u)=>Uv(r,n,t,l,u),(l,u)=>{}),void 0,void 0),i=s[0],o=s[1],a=pe(A(()=>V(ke(l=>d("style",{children:[l]}),i.CssOverrides),A(()=>{const l=i.Page;switch(l.tag){case 1:return _(zv(l.fields[0],i.Branding,i.JourneyType,()=>{o(new j(5,[l.fields[1],new Ce(0,[])]))}));case 2:return _(Hv(l.fields[0],i.Branding));case 3:return _(d(Zv,{maskedPhone:l.fields[0],validateOneTimeCode:u=>{o(new j(4,[u[0],u[1],new Ce(0,[])]))},reissueOneTimeCode:()=>{o(new j(3,[!0,new Ce(0,[])]))},reissueLink:()=>{o(new j(2,[!0,new Ce(0,[])]))}}));case 4:return _(d(Xv,{brandingOption:Qs(i.Branding),reissueLink:()=>{o(new j(2,[!1,new Ce(0,[])]))}}));case 5:switch(i.JourneyType.tag){case 1:return _(qi(i.Branding,"information request"));case 2:return _(ph());case 3:case 4:return _($h());default:return _(qi(i.Branding,"onboarding"))}case 6:return l.fields[0].tag===1?_(jp()):l.fields[0].tag===0?_(d(Wp,{reissueMagicLink:()=>{o(new j(2,[!0,new Ce(0,[])]))}})):l.fields[0].tag===5?_(ta()):l.fields[0].tag===2?_(Mc(i.Branding)):l.fields[0].tag===3?_(Up(i.Branding)):_(zp(i.Branding));default:return _(xp)}}))));return d(Ie,{},...a)}function Qv(e){let t,n,r;const s=e.startAuthCodeExchangeBackground,i=e.navigateAuthCodeExchangePage,o=e.inviteCode;return pr(()=>{qt(0)}),d("div",C(y([(t="min-h-full flex flex-col items-center justify-between w-full mx-auto text-center pt-8 sm:pt-20 pb-6 sm:pb-8 px-4 bg-white",["className",t]),(n=[d("div",C(y([["className","flex flex-col items-center justify-center sm:max-w-[640px]"],(r=pe(A(()=>{const a=$2(o);return a.tag===0?_(d(Kv,{magicLink:a.fields[0],navigateAuthCodeExchangePage:i,startAuthCodeExchangeBackground:s})):_(Mc(void 0))})),["children",b.Children.toArray(Array.from(r))])]))),ra],["children",b.Children.toArray(Array.from(n))])])))}class W extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Home","LegacyInvite","InviteV2","AuthCodeExchange","AuthCodeExchangeWithCurrentAuth","NotFound","LoggedOut"]}}function eb(e){let t,n,r;if(M(e))t=2;else if(k(e)==="workflows")if(M(P(e)))t=2;else switch(k(P(e))){case"app":{t=0,n=P(P(e));break}case"embed":{M(P(P(e)))?t=2:k(P(P(e)))==="v1.0"?(t=1,r=P(P(P(e)))):t=2;break}default:t=2}else t=2;switch(t){case 0:return new pa(1,[n]);case 1:return new pa(0,[r]);default:return new pa(2,[void 0])}}function tb(e){const t=wn(e);if(t!=null)return Le(r=>r[1],es(r=>r[0]==="code",t))}function gh(e){let t,n,r,s,i,o,a;const l=eb(e);switch(l.tag){case 1:return[M(l.fields[0])?M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):(t=wn(k(l.fields[0])),t!=null?M(t)?M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):k(t)[0]==="invite"?M(P(t))?M(P(l.fields[0]))?(n=k(t)[1],r=zc(n),r.tag===1?new W(5,[]):new W(1,[])):M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[]))),new Tr(1,[])];case 2:return[new W(5,[]),new Tr(2,[])];default:return[M(l.fields[0])?new W(0,[]):M(P(l.fields[0]))?new W(0,[]):(o=tb(k(P(l.fields[0]))),o!=null?M(P(P(l.fields[0])))?(a=o,new W(3,[gl(a)])):new W(0,[]):new W(0,[])),new Tr(0,[])]}}let Yn=class extends L{constructor(t,n,r){super(),this.CurrentPage=t,this.Credentials=n,this.AppMode=r}},bn=class extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UrlChanged","NavigateAuthCodeExchangePage","NavigateAuthCodeExchangePageWithCurrentAuth","AuthMsg","StartAuthCodeExchangeBackground","DisplayLoggedOut"]}};function nb(){let e;return pr(()=>{qt(0)}),d("div",C(y([["className","w-full sm:max-w-md mt-5 mx-1 text-center mx-auto"],(e=[d("h4",{className:"text-2xl",children:"You have been logged out of your onboarding due to inactivity"}),d("br",{}),d("p",{children:["To continue your onboarding, please find your onboarding invite email and click the link again."]})],["children",b.Children.toArray(Array.from(e))])])))}class ks extends Error{}ks.prototype.name="InvalidTokenError";function rb(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function sb(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return rb(t)}catch{return atob(t)}}function ib(e,t){if(typeof e!="string")throw new ks("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new ks(`Invalid token specified: missing part #${n+1}`);let s;try{s=sb(r)}catch(i){throw new ks(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new ks(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function ob(e,t,n){e:for(;;){const r=e,s=t,i=n;if(M(i)){const o=r;return o.tag===1?new m(1,[o.fields[0]]):new m(0,[cr(o.fields[0])])}else{let o;const a=s(k(i));if(a.tag===1)o=new m(1,[a.fields[0]]);else{const l=r;o=l.tag===1?new m(1,[l.fields[0]]):new m(0,[et(a.fields[0],l.fields[0])])}if(o.tag===1)return o;e=o,t=s,n=P(i);continue e}}}function ab(e,t){return ob(new m(0,[ce()]),e,t)}function Or(e){return ab(t=>t,e)}class lb extends L{constructor(t,n,r){super(),this.CompanyName=t,this.Logo=n,this.Support=r}}function ub(){return ue("Workflows.Business.Aggregates.CommonDto.InviteBrandingDto",[],lb,()=>[["CompanyName",Z(z)],["Logo",Z(z)],["Support",Z(fb())]])}class cb extends L{constructor(t,n){super(),this.Email=t,this.Phone=n}}function fb(){return ue("Workflows.Business.Aggregates.CommonDto.SupportDto",[],cb,()=>[["Email",Z(z)],["Phone",Z(z)]])}function db(e){let t;const n=e.Email;if(n!=null){const r=Yc(n);t=r.tag===1?new m(1,[r.fields[0]]):new m(0,[r.fields[0]])}else t=new m(0,[void 0]);if(t.tag===1)return new m(1,[t.fields[0]]);{let r;const s=e.Phone;if(s!=null){const i=qc(s);r=i.tag===1?new m(1,[i.fields[0]]):new m(0,[i.fields[0]])}else r=new m(0,[void 0]);return r.tag===1?new m(1,[r.fields[0]]):new m(0,[new Gc(t.fields[0],r.fields[0])])}}function hb(e){let t;const n=e.Logo;if(n!=null){const r=Zc(n);t=r.tag===1?new m(1,[r.fields[0]]):new m(0,[r.fields[0]])}else t=new m(0,[void 0]);if(t.tag===1)return new m(1,[t.fields[0]]);{let r;const s=e.CompanyName;if(s!=null){const i=Jc(s);r=i.tag===1?new m(1,[i.fields[0]]):new m(0,[i.fields[0]])}else r=new m(0,[void 0]);if(r.tag===1)return new m(1,[r.fields[0]]);{let i;const o=e.Support;if(o!=null){const a=db(o);i=a.tag===1?new m(1,[a.fields[0]]):new m(0,[a.fields[0]])}else i=new m(0,[void 0]);return i.tag===1?new m(1,[i.fields[0]]):new m(0,[new Hc(r.fields[0],t.fields[0],i.fields[0])])}}}class mb extends L{constructor(t,n,r,s){super(),this.Code=t,this.DateIssued=n,this.NumberOfAttempts=r|0,this.DateOfLastAttempt=s}}function pb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Invite.Dto.SecondFactorDto",[],mb,()=>[["Code",z],["DateIssued",Gt("System.DateTime")],["NumberOfAttempts",Ks],["DateOfLastAttempt",Z(Gt("System.DateTime"))]])}function $b(e){return new b$(v$(e.Code),e.DateIssued,e.NumberOfAttempts,e.DateOfLastAttempt)}class gb extends L{constructor(t,n,r,s){super(),this.Code=t,this.DateIssued=n,this.SecondFactor=r,this.Branding=s}}function wb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Invite.Dto.InviteDto",[],gb,()=>[["Code",z],["DateIssued",Gt("System.DateTime")],["SecondFactor",Z(pb())],["Branding",Z(ub())]])}function yb(e){const t=zc(e.Code);if(t.tag===1)return new m(1,[t.fields[0]]);{let n;const r=e.SecondFactor;n=r==null?void 0:$b(r);let s;const i=e.Branding;if(i!=null){const o=hb(i);s=o.tag===1?new m(1,[o.fields[0]]):new m(0,[o.fields[0]])}else s=new m(0,[void 0]);return s.tag===1?new m(1,[s.fields[0]]):new m(0,[new C$(t.fields[0],e.DateIssued,n,s.fields[0])])}}class _b extends L{constructor(t,n,r){super(),this.Id=t,this.DisplayName=n,this.ComponentTagName=r}}function vb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessStepConfigDto",[],_b,()=>[["Id",z],["DisplayName",z],["ComponentTagName",z]])}function bb(e){return new m(0,[new Rt(Xc(e.Id),e.DisplayName,e.ComponentTagName)])}function Cb(e){return Or(tt(bb,e))}class Sb extends L{constructor(t,n){super(),this.ActivatedDates=t,this.CompletedSteps=n}}function kb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ActiveProcessInstanceDto",[],Sb,()=>[["ActivatedDates",un(Gt("System.DateTime"))],["CompletedSteps",un(Lm(z,Gt("System.DateTime")))]])}function xb(e){const t=Or(tt(n=>new m(0,[[Xc(n[0]),n[1]]]),e.CompletedSteps));return t.tag===1?new m(1,[t.fields[0]]):new m(0,[new pf(e.ActivatedDates,t.fields[0])])}class Ib extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Inactive","Active","Complete","Abandoned"]}}function Ab(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessInstanceStatusDto",[],Ib,()=>[[],[["Item",kb()]],[["Item",Gt("System.DateTime")]],[["Item",Gt("System.DateTime")]]])}function Eb(e){switch(e.tag){case 1:{const t=xb(e.fields[0]);return t.tag===1?new m(1,[t.fields[0]]):new m(0,[new us(1,[t.fields[0]])])}case 2:return new m(0,[new us(2,[e.fields[0]])]);case 3:return new m(0,[new us(3,[e.fields[0]])]);default:return new m(0,[new us(0,[])])}}class Tb extends L{constructor(t,n,r){super(),this.Id=t,this.Name=n,this.Steps=r}}function Pb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessConfigDto",[],Tb,()=>[["Id",Gt("System.Guid")],["Name",z],["Steps",un(vb())]])}function Mb(e){const t=Cb(e.Steps);if(t.tag===1)return new m(1,[t.fields[0]]);{const n=I$(e.Id);return n.tag===1?new m(1,[n.fields[0]]):new m(0,[new Ne(n.fields[0],e.Name,t.fields[0])])}}class Ob extends L{constructor(t,n){super(),this.Name=t,this.Value=n}}function Db(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.TagDto",[],Ob,()=>[["Name",z],["Value",z]])}function Nb(e){return D$(e.Name,e.Value)}class Rb extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["WhenEnabled","Always"]}}function Bb(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.Dto.BenefitsOnboardingShowOptionsDto",[],Rb,()=>[[],[]])}class Lb extends L{constructor(t){super(),this.BenefitsOnboarding=t}}function Vb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.StepsConfigurationDto",[],Lb,()=>[["BenefitsOnboarding",Z(Qe(["Show",Bb()]))]])}function Fb(e){let t,n;return new R$((t=e.BenefitsOnboarding,t==null?void 0:(n=t,{Show:n.Show.tag===1?new wf(1,[]):new wf(0,[])})))}class Wb extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Default","InfoRequest","AppInvite","BenefitsExisting","BenefitsOnboarding"]}}function jb(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.Dto.JourneyTypeDto",[],Wb,()=>[[["Item",xs()]],[["Item",xs()]],[["Item",xs()]],[["Item",xs()]],[["Item",xs()]]])}class Ub extends L{constructor(t){super(),this.Category=t}}function xs(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.JourneyTypeDetailsDto",[],Ub,()=>[["Category",Z(z)]])}function Is(e){return new gf(e.Category)}function zb(e){if(e==null)return new gr(0,[new gf(void 0)]);switch(e.tag){case 1:{const t=e.fields[0];return new gr(1,[Is(t)])}case 2:{const t=e.fields[0];return new gr(2,[Is(t)])}case 3:{const t=e.fields[0];return new gr(3,[Is(t)])}case 4:{const t=e.fields[0];return new gr(4,[Is(t)])}default:{const t=e.fields[0];return new gr(0,[Is(t)])}}}class Hb extends L{constructor(t,n,r,s,i,o,a,l,u,f,c){super(),this.Id=t|0,this.DateCreated=n,this.Configuration=r,this.Status=s,this.Invite=i,this.Tags=o,this.Creator=a,this.StepsConfiguration=l,this.JourneyType=u,this.IsBenefitsStepEnabled=f,this.PaySetupComplete=c}}function wh(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessInstanceDto",[],Hb,()=>[["Id",Ks],["DateCreated",Gt("System.DateTime")],["Configuration",Pb()],["Status",Ab()],["Invite",Z(wb())],["Tags",Z(un(Db()))],["Creator",Z(z)],["StepsConfiguration",Z(Vb())],["JourneyType",Z(jb())],["IsBenefitsStepEnabled",Z(ht)],["PaySetupComplete",Z(ht)]])}function yh(e){let t,n;const r=Mb(e.Configuration);if(r.tag===1)return new m(1,[r.fields[0]]);{const s=r.fields[0],i=Eb(e.Status);if(i.tag===1)return new m(1,[i.fields[0]]);{const o=i.fields[0];let a;if(o.tag===1){const l=o.fields[0],u=Or(tt(f=>{const c=[f[0],f[1]],p=c[0];return Cc(h=>O(h.Id,p),s.Steps)?new m(0,[[p,c[1]]]):new m(1,["Step id is not configured for this Process Instance."])},l.CompletedSteps));a=u.tag===1?new m(1,[u.fields[0]]):new m(0,[new us(1,[new pf(l.ActivatedDates,u.fields[0])])])}else a=new m(0,[o]);if(a.tag===1)return new m(1,[a.fields[0]]);{let l;const u=e.Invite;if(u!=null){const f=yb(u);l=f.tag===1?new m(1,[f.fields[0]]):new m(0,[f.fields[0]])}else l=new m(0,[void 0]);if(l.tag===1)return new m(1,[l.fields[0]]);{let f;const c=e.Tags;if(c!=null){const p=Or(tt(Nb,c));f=p.tag===1?new m(1,[p.fields[0]]):new m(0,[p.fields[0]])}else f=new m(0,[void 0]);return f.tag===1?new m(1,[f.fields[0]]):new m(0,[new N$($f(e.Id),s,e.DateCreated,a.fields[0],l.fields[0],f.fields[0],(t=e.Creator,t==null?void 0:jc(t)),(n=e.StepsConfiguration,n==null?void 0:Fb(n)),zb(e.JourneyType),e.IsBenefitsStepEnabled,e.PaySetupComplete)])}}}}}class As extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["CompleteStep","CompleteStepV2","Complete","ViewPaySetupPage","CompletePaySetup","ResumePaySetup"]}}class Gb extends L{constructor(t,n,r,s){super(),this.CssOverrides=t,this.ProcessInstance=n,this.IsBenefitsEnabled=r,this.Branding=s}}class qn extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["CompleteStep","CompleteStepV2","Complete","ViewPaySetupPage","CompletePaySetup","ResumePaySetup"]}}function Yb(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.ProcessInstanceCommandDto",[],qn,()=>[[["Item",z]],[["Item",z]],[],[["Item",ht]],[["Item",ht]],[["Item",ht]]])}function qb(e){switch(e.tag){case 1:return new qn(1,[ls(e.fields[0])]);case 2:return new qn(2,[]);case 3:return new qn(3,[e.fields[0]]);case 4:return new qn(4,[e.fields[0]]);case 5:return new qn(5,[e.fields[0]]);default:return new qn(0,[ls(e.fields[0])])}}const Jb=yh;class Zb extends L{constructor(t,n,r,s){super(),this.CssOverrides=t,this.ProcessInstanceDto=n,this.IsBenefitsEnabled=r,this.Branding=s}}function Xb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.ProcessInstanceContextDto",[],Zb,()=>[["CssOverrides",un(z)],["ProcessInstanceDto",wh()],["IsBenefitsEnabled",ht],["Branding",Z(Qb())]])}class Kb extends L{constructor(t,n,r){super(),this.CompanyName=t,this.Logo=n,this.Support=r}}function Qb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.Branding",[],Kb,()=>[["CompanyName",Z(z)],["Logo",Z(z)],["Support",Z(tC())]])}class eC extends L{constructor(t,n){super(),this.Email=t,this.Phone=n}}function tC(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.Support",[],eC,()=>[["Email",Z(z)],["Phone",Z(z)]])}function nC(e){let t,n,r,s,i,o,a,l,u,f,c,p,h,$,g,w,v,S;return new Hc((t=(n=(r=e.CompanyName,r==null?void 0:Jc(r)),n!=null?(s=n,s.tag===1?new m(1,[s.fields[0]]):new m(0,[s.fields[0]])):new m(0,[void 0])),t.tag===1?void 0:t.fields[0]),(i=(o=(a=e.Logo,a==null?void 0:Zc(a)),o!=null?(l=o,l.tag===1?new m(1,[l.fields[0]]):new m(0,[l.fields[0]])):new m(0,[void 0])),i.tag===1?void 0:i.fields[0]),(u=e.Support,u==null?void 0:(f=u,new Gc((c=(p=(h=f.Email,h==null?void 0:Yc(h)),p!=null?($=p,$.tag===1?new m(1,[$.fields[0]]):new m(0,[$.fields[0]])):new m(0,[void 0])),c.tag===1?void 0:c.fields[0]),(g=(w=(v=f.Phone,v==null?void 0:qc(v)),w!=null?(S=w,S.tag===1?new m(1,[S.fields[0]]):new m(0,[S.fields[0]])):new m(0,[void 0])),g.tag===1?void 0:g.fields[0])))))}function rC(e){let t,n;return new Gb(e.CssOverrides,(t=yh(e.ProcessInstanceDto),t.tag===1?(()=>{throw new Error(t.fields[0])})():t.fields[0]),e.IsBenefitsEnabled,(n=e.Branding,n==null?void 0:nC(n)))}class Dr extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["WorkflowInstanceStepActivated","BenefitsStepActivated","BenefitsStepCompleted"]}}function sC(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Write.WorkflowAnalyticsEventDto",[],Dr,()=>[[["Item",z]],[],[]])}class an extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}class Se extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PersonalDetails","EmergencyContacts","Bank","Tax","Super","WorkplaceLinking","BenefitsOnboarding","WorkplacePolicies","DiscreteBenefits"]}}class Es extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Hidden","Incomplete","Complete"]}}function yl(e){return e?new Es(1,[]):new Es(0,[])}class ie extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Completed","Disabled","Active","Locked","CompletedAndDisabled"]}}function _h(e){return O(e,Ye)?new m(0,[new Se(0,[])]):O(e,mt)?new m(0,[new Se(1,[])]):O(e,pt)?new m(0,[new Se(2,[])]):O(e,$t)?new m(0,[new Se(3,[])]):O(e,Oe)?new m(0,[new Se(4,[])]):O(e,On)?new m(0,[new Se(5,[])]):O(e,Yt)?new m(0,[new Se(7,[])]):O(e,Dn)?new m(0,[new Se(8,[])]):new m(1,["Invalid step"])}function vh(e){switch(e.tag){case 1:return mt;case 2:return pt;case 3:return $t;case 4:return Oe;case 5:return On;case 6:return as;case 7:return Yt;case 8:return Dn;default:return Ye}}function bh(e){switch(e.tag){case 1:return"Emergency contacts";case 2:return"Bank details";case 3:return"Tax declaration";case 4:return"Super nomination";case 5:return On.DisplayName;case 6:return"Workplace benefits";case 7:return"Fair Work";case 8:return Dn.DisplayName;default:return"Employee profile"}}function Ch(e){switch(e.tag){case 1:return"Contacts";case 2:return"Bank";case 3:return"Tax";case 4:return"Super";case 5:return On.DisplayName;case 6:return"Benefits";case 7:return"Fair Work";case 8:return Dn.DisplayName;default:return"Profile"}}function Sh(e){switch(e.tag){case 1:return mt;case 2:return pt;case 3:return $t;case 4:return Oe;case 5:return On;case 6:return as;case 7:return Yt;case 8:return Dn;default:return Ye}}function iC(e){switch(e.tag){case 5:case 6:case 8:return!1;default:return!0}}function oC(e,t){return e.tag===0?t:vt(t,I(new Se(6,[])))}class Nr extends L{constructor(t,n){super(),this.Id=t,this.Status=n}}function Jn(e){return bh(e.Id)}function aC(e){return Ch(e.Id)}function lC(e){return Sh(e.Id).ComponentTagName}function uC(e){return Sh(e.Id).Id}function cC(e){return iC(e.Id)}function fC(e){if(e.Id.tag===0)return e}function dC(e){if(e.Id.tag===1)return e}function hC(e){return es(t=>O(t.Status,new ie(2,[])),e)}function mC(e){return((n,r)=>{e:for(;;){const s=n,i=r;if(M(s))return i;if(O(k(s).Status,new ie(2,[])))return Wo([i,I(k(s)),P(s)]);if(O(k(s).Status,new ie(1,[])))return Wo([i,I(new Nr(k(s).Id,new ie(2,[]))),P(s)]);n=P(s),r=vt(i,I(k(s)));continue e}})(e,ce())}function _l(e,t){const n=Ee(e.PaySetupComplete,!1);let r;const s=Or(tt(_h,e.Configuration.Steps));if(r=s.tag===1?new m(1,[s.fields[0]]):new m(0,[oC(t,s.fields[0])]),r.tag===1)return new m(1,[r.fields[0]]);{const i=Or(tt(_h,L$(e)));return i.tag===1?new m(1,[i.fields[0]]):new m(0,[mC(tt(o=>n&&cC(o)&&O(o.Status,new ie(0,[]))?new Nr(o.Id,new ie(4,[])):o,tt(o=>Cc(a=>O(a,o.Id),i.fields[0])?new Nr(o.Id,new ie(0,[])):o,tt(o=>O(o.Id,new Se(6,[]))&&!n?new Nr(o.Id,new ie(3,[])):o,tt(o=>new Nr(o,new ie(1,[])),r.fields[0])))))])}}class kh extends L{constructor(t,n,r,s,i,o,a,l,u,f,c){super(),this.AppMode=t,this.JourneyType=n,this.Branding=r,this.IsBenefitsStepEnabled=s,this.IsPaySetupCompatible=i,this.IsPaySetupComplete=o,this.Status=a,this.ProcessInstanceId=l,this.InstanceName=u,this.ProcessConfigId=f,this.Steps=c}}function xh(e){switch(e.Status.tag){case 3:return!1;case 0:return!1;case 1:return Ee(e.PaySetupComplete,!1);default:return!0}}function pC(e,t){let n;const r=[t.ProcessInstance,yl(t.IsBenefitsEnabled)];return n=_l(r[0],r[1]),n.tag===1?new m(1,[n.fields[0]]):new m(0,[new kh(e,t.ProcessInstance.JourneyType,t.Branding,t.IsBenefitsEnabled,x$(t.ProcessInstance.Configuration),xh(t.ProcessInstance),t.ProcessInstance.Status,t.ProcessInstance.Id,t.ProcessInstance.Configuration.Name,t.ProcessInstance.Configuration.Id,n.fields[0])])}function $C(e,t){let n;const r=[t,yl(e.IsBenefitsStepEnabled)];return n=_l(r[0],r[1]),n.tag===1?new m(1,[n.fields[0]]):new m(0,[new kh(e.AppMode,e.JourneyType,e.Branding,e.IsBenefitsStepEnabled,e.IsPaySetupCompatible,xh(t),t.Status,e.ProcessInstanceId,e.InstanceName,e.ProcessConfigId,n.fields[0])])}class Tt extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialising","Loaded","Error"]}}function vl(e,t){const n=e;if(n.tag===1)return new Tt(2,[n.fields[0]]);switch(t.tag){case 2:return t;case 0:return t;default:{const r=$C(t.fields[0],n.fields[0]);return r.tag===1?new Tt(2,[r.fields[0]]):new Tt(1,[r.fields[0]])}}}let fe=class extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialising","StepList","Step","PaySetupCompleteConfirmation","Oops","AllDone"]}};class U extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Activate","ActivateCallback","ChangeCurrentView","CloseStepListView","StepCompletionEventCallback","CompleteStep","ConfirmPaySetupComplete","ResumePaySetup","CompletePaySetup","PaySetupCompleted","CompleteWorkflow","ShowAllDoneAndNotifyComplete","SendAnalyticsEvent","AppendTrailingSlashToUrl","CompleteBenefitsOnboardingStep","CommandSuccess","CommandFailure"]}}class nt extends L{constructor(t,n,r,s,i,o){super(),this.ProfileId=t,this.ProcessInstanceId=n,this.WorkflowDetail=r,this.CurrentView=s,this.CssOverrides=i,this.BenefitsOnboarding=o}}function bl(e){switch(e.tag){case 1:return"Information request";case 2:return"Workflow";case 3:return"Benefits Onboarding";case 4:return"Benefits Onboarding";default:return"Onboarding"}}function Cl(e){if(e<640)return Ae(void 0)}function Sl(e){return((n,r)=>{e:for(;;){const s=n,i=r;let o,a,l,u;if(M(s))o=0;else{const f=fC(k(s));if(f!=null)if(M(P(s)))o=2;else{const c=dC(k(P(s)));c!=null?(o=1,a=c,l=f,u=P(P(s))):o=2}else o=2}switch(o){case 0:return i;case 1:{n=u,r=vt(i,I(O(a.Status,new ie(2,[]))?new Nr(l.Id,new ie(2,[])):l));continue e}default:if(M(s))throw new Error("Match failure");n=P(s),r=vt(i,I(k(s)));continue e}}})(e,ce())}function Ts(e){let t,n;return d("div",C(y([(t="absolute inset-0 min-h-full flex flex-col items-center justify-between w-full mx-auto text-center pt-8 sm:pt-20 pb-6 sm:pb-8 px-4 bg-white",["className",t]),(n=[d("div",{className:"mt-5 px-4 flex flex-col items-center justify-center sm:max-w-[640px]",children:b.Children.toArray([e])}),ra],["children",b.Children.toArray(Array.from(n))])])))}function gC(e,t){let n;const r=e.tag===2?e.fields[0]:void 0;let s;if(r==null)s=void 0;else{const u=r;s=cn(f=>L1(f+1,t.Steps),ui(f=>O(u,f),t.Steps))}const i=Le(u=>new U(2,[new fe(2,[u])]),es(u=>O(u.Status,new ie(2,[])),t.Steps));let o,a,l;switch(r!=null&&s!=null?(n=s,O(r.Status,new ie(2,[]))&&(O(n.Status,new ie(1,[]))?!0:O(n.Status,new ie(3,[])))?(o=0,a=r):(o=1,l=s)):o=2,o){case 0:return new U(2,[new fe(2,[a])]);case 1:return O(l.Status,new ie(3,[]))?void 0:new U(2,[new fe(2,[l])]);default:return i}}function wC(e,t){const n=e.IsPaySetupCompatible&&!e.IsPaySetupComplete&&lr(e.Steps)!==1;let r;if(n)switch(t.tag){case 1:case 0:{r=0;break}default:r=1}else r=1;switch(r){case 0:return new U(6,[{Branding:Qs(e.Branding),InjectedBenefits:e.IsBenefitsStepEnabled}]);default:return}}function yC(e){if(ua(e.Status))return new U(11,[e])}function kl(e,t,n){return Ee(Ku(Ku(yC(t),gC(e,t)),wC(t,n)),new U(10,[new an(0,[])]))}function _C(e){const t=$r(e)|0;return je(We("%s/workflows/backend/%i"))(jn)(t)}function vC(e){const t=$r(e)|0;return je(We("%s/workflows/backend/process-instances/%i/activate"))(jn)(t)}function bC(e){const t=$r(e)|0;return je(We("%s/workflows/backend/process-instances/%i/analytics-events"))(jn)(t)}function xl(e,t){return E.Delay(()=>{const n=Hi(z2(je(We("Bearer %s"))(e)),t);let r;const s=vs(n);return r=E.Bind(s,i=>E.Return(new m(0,[i]))),E.Bind(r,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{const a=o.fields[0];if(a.statusCode===429||a.statusCode>=500){const l=vs(n);return E.Bind(l,u=>E.Return(new m(0,[u])))}else return E.Return(new m(0,[a]))}})})}function Ps(e,t,n){return E.Delay(()=>{let r,s;const i=xl(n,(r=yn(new Qt(1,[(s=I(qb(e)),_n(0,vn(un(Yb()),new Ge(1,[]),void 0,void 0)(s)))]),tn(new Ft(1,[]),en(_C(t)))),Hi($l("application/json"),r)));return E.Bind(i,o=>{const a=o;if(a.tag===1)return E.Return(new m(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let u;const f=rn(te(sn(wh(),new Ge(1,[]))),l.responseText);return u=f.tag===1?new m(1,[f.fields[0]]):Jb(f.fields[0]),E.Return(u)}else return E.Return(new m(1,["Unexpected response from backend"]))}})})}function CC(e,t){return E.Delay(()=>{const n=xl(t,tn(new Ft(1,[]),en(vC(e))));return E.Bind(n,r=>{const s=r;if(s.tag===1)return E.Return(new m(1,[s.fields[0]]));{const i=s.fields[0];if(i.statusCode===200){let o;const a=rn(te(sn(Xb(),new Ge(1,[]))),i.responseText);return o=a.tag===1?new m(1,[a.fields[0]]):new m(0,[rC(a.fields[0])]),E.Return(o)}else return E.Return(new m(1,["Unexpected response from backend"]))}})})}function SC(e,t,n){let r;const s=E.Delay(()=>{let i;return xl(e,(i=yn(new Qt(1,[_n(0,vn(un(sC()),new Ge(1,[]),void 0,void 0)(I(n)))]),tn(new Ft(1,[]),en(bC(t)))),Hi($l("application/json"),i)))});return r=E.Bind(s,i=>{let o;const a=i;return o=a.tag===1?new m(1,[a.fields[0]]):new m(0,[void a.fields[0]]),E.Return(o)}),E.Bind(r,i=>{const o=i;return o.tag===1||o.fields[0],E.Return()})}function kC(e,t){return CC(e,t)}function xC(e,t,n){return Ps(new As(1,[t]),e,n)}function IC(e,t,n){return Ps(new As(3,[n]),e,t)}function AC(e,t,n){return Ps(new As(4,[n]),e,t)}function EC(e,t,n){return Ps(new As(5,[n]),e,t)}function TC(e,t){return Ps(new As(2,[]),e,t)}function PC(e){const t=ib(e);return[new nt(jc(t.sub),$f(t.workflow.instanceId),new Tt(0,[]),new fe(0,[]),ce(),new Es(0,[])),I(n=>{n(new U(0,[]))})]}function MC(e,t,n,r,s){let i,o,a,l,u,f,c,p,h,$,g,w,v,S,N,K,Q,xe,rt,Re,Be,Xe;switch(r.tag){case 1:{const T=r.fields[0];let Y;switch(T.tag){case 3:{Y=[s,(i=new U(2,[new fe(4,[T.fields[0].message])]),I(le=>{le(i)}))];break}case 0:case 1:{Y=[s,J()];break}default:{let le;const st=T.fields[0];if(st.tag===1)le=new m(1,[st.fields[0]]);else{const _e=st.fields[0],Zn=yl(_e.IsBenefitsEnabled);let Qi;const Fh=[_e.ProcessInstance,Zn];if(Qi=_l(Fh[0],Fh[1]),Qi.tag===1)le=new m(1,[Qi.fields[0]]);else{const Wh=Qi.fields[0],Ml=pC(n,_e);le=Ml.tag===1?new m(1,[Ml.fields[0]]):new m(0,[(o=Ml.fields[0],a=ua(_e.ProcessInstance.Status),l=hC(Wh),l==null?o.IsPaySetupComplete?a?[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(1,[o]),new fe(5,[]),_e.CssOverrides,Zn),J()]:(qt(0),[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(1,[o]),new fe(5,[]),_e.CssOverrides,Zn),I(Os=>{Os(new U(10,[new an(0,[])]))})]):[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(1,[o]),new fe(3,[]),_e.CssOverrides,Zn),J()]:(u=(f=l,c=dl.clientWidth,p=lr(Wh)|0,p===1?(document.title=Jn(f),new fe(2,[f])):Cl(c)!=null?new fe(1,[]):new fe(2,[f])),[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(1,[o]),u,_e.CssOverrides,Zn),u.tag===2?(h=vh(u.fields[0].Id),O(h.Id,as.Id)?I(Os=>{Os(new U(12,[s.ProcessInstanceId,new Dr(1,[])]))}):($=new U(12,[s.ProcessInstanceId,new Dr(0,[ls(h.Id)])]),I(Os=>{Os($)}))):J()]))])}}Y=le.tag===1?[s,I(_e=>{_e(new U(2,[new fe(4,[le.fields[0]])]))})]:le.fields[0]}}return[Y[0],Y[1]]}case 2:{const T=r.fields[0];return[new nt(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,T,s.CssOverrides,s.BenefitsOnboarding),T.tag===2?(g=vh(T.fields[0].Id),O(g.Id,as.Id)?I(Y=>{Y(new U(12,[s.ProcessInstanceId,new Dr(1,[])]))}):(w=new U(12,[s.ProcessInstanceId,new Dr(0,[ls(g.Id)])]),I(Y=>{Y(w)}))):J()]}case 3:{const T=s.WorkflowDetail;if(T.tag===1){const Y=kl(s.CurrentView,T.fields[0],s.BenefitsOnboarding);return[s,I(le=>{le(Y)})]}else return[s,J()]}case 12:return He(SC(t,r.fields[0],r.fields[1])),[s,J()];case 4:{const T=s.WorkflowDetail;return T.tag===1?[s,(v=r.fields[0].target,S=es(Y=>m1(lC(Y),v.tagName,5)===0,T.fields[0].Steps),S==null?J():O(S.Id,new Se(6,[]))?I(Y=>{Y(new U(14,[]))}):(N=S,K=new U(5,[uC(N),new an(0,[])]),I(Y=>{Y(K)})))]:[s,J()]}case 14:{let T;switch(s.WorkflowDetail.tag===1?O(s.BenefitsOnboarding,new Es(0,[]))?T=1:T=0:T=1,T){case 0:return[new nt(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,s.CurrentView,s.CssOverrides,new Es(2,[])),f0(y([I(Y=>{Y(new U(12,[s.ProcessInstanceId,new Dr(2,[])]))}),I(Y=>{Y(new U(10,[new an(0,[])]))}),I(Y=>{Y(new U(2,[new fe(5,[])]))})]))];default:return[s,J()]}}case 5:{const T=r.fields[0],Y=r.fields[1];switch(Y.tag){case 1:return[s,J()];case 2:{const le=Y.fields[0],st=le;st.tag===1?st.fields[0]:xg(T,st.fields[0],s.ProfileId);const _e=vl(le,s.WorkflowDetail);return[new nt(s.ProfileId,s.ProcessInstanceId,_e,s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(Q=_e.tag===1?kl(s.CurrentView,_e.fields[0],s.BenefitsOnboarding):_e.tag===2?new U(2,[new fe(4,[_e.fields[0]])]):new U(2,[new fe(4,["Process Instance not resolved"])]),I(Zn=>{Zn(Q)}))]}case 3:{const le=Y.fields[0];return[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(2,[le.message]),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(xe=new U(2,[new fe(4,[le.message])]),I(st=>{st(xe)}))]}default:return[s,It(le=>{He(le)},le=>xC(s.ProcessInstanceId,T,le),t,le=>new U(5,[T,new an(2,[le])]),le=>new U(5,[T,new an(3,[le])]))]}}case 6:return[new nt(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,new fe(3,[]),s.CssOverrides,s.BenefitsOnboarding),It(T=>{He(T)},T=>IC(s.ProcessInstanceId,t,T),r.fields[0].InjectedBenefits,T=>new U(15,[]),T=>new U(16,[T]))];case 7:return[s,f0(y([It(T=>{He(T)},T=>EC(s.ProcessInstanceId,t,T),r.fields[0].InjectedBenefits,T=>new U(15,[]),T=>new U(16,[T])),(rt=s.WorkflowDetail,rt.tag===1?(Re=new U(2,[new fe(2,[T1(jo(T=>O(T.Status,new ie(0,[]))?!0:O(T.Status,new ie(4,[])),rt.fields[0].Steps))])]),I(T=>{T(Re)})):I(T=>{T(new U(2,[new fe(4,["Process Instance not resolved"])]))}))]))];case 8:return[s,It(T=>{He(T)},Gs(e)(s.ProcessInstanceId)(t),r.fields[0].InjectedBenefits,T=>new U(9,[T]),T=>new U(16,[T]))];case 9:{const T=vl(r.fields[0],s.WorkflowDetail);return[new nt(s.ProfileId,s.ProcessInstanceId,T,s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(Be=T.tag===1?kl(s.CurrentView,T.fields[0],s.BenefitsOnboarding):T.tag===2?new U(2,[new fe(4,[T.fields[0]])]):new U(2,[new fe(4,["Process Instance not resolved"])]),I(Y=>{Y(Be)}))]}case 10:{const T=r.fields[0];switch(T.tag){case 1:return[s,J()];case 2:return T.fields[0].tag===1?[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(2,[T.fields[0].fields[0]]),new fe(4,[T.fields[0].fields[0]]),s.CssOverrides,s.BenefitsOnboarding),J()]:(wa(T.fields[0].fields[0].Id,T.fields[0].fields[0].Configuration.Name,T.fields[0].fields[0].Configuration.Id,s.ProfileId),[new nt(s.ProfileId,s.ProcessInstanceId,vl(new m(0,[T.fields[0].fields[0]]),s.WorkflowDetail),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),I(Y=>{Y(new U(2,[new fe(5,[])]))})]);case 3:return[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(2,[T.fields[0].message]),new fe(4,[T.fields[0].message]),s.CssOverrides,s.BenefitsOnboarding),J()];default:{const Y=s.WorkflowDetail;let le,st;switch(Y.tag===1&&ua(Y.fields[0].Status)?(le=0,st=Y.fields[0]):le=1,le){case 0:return wa(st.ProcessInstanceId,st.InstanceName,st.ProcessConfigId,s.ProfileId),[s,J()];default:return[s,It(_e=>{He(_e)},_e=>TC(s.ProcessInstanceId,_e),t,_e=>new U(10,[new an(2,[_e])]),_e=>new U(10,[new an(3,[_e])]))]}}}}case 11:{const T=r.fields[0];return wa(T.ProcessInstanceId,T.InstanceName,T.ProcessConfigId,s.ProfileId),[s,I(Y=>{Y(new U(2,[new fe(5,[])]))})]}case 13:return[s,(Xe=window.location.pathname+"/"+window.location.search+window.location.hash,d0(T=>{fl(I(Xe),1)}))];case 15:return[s,J()];case 16:return[s,J()];default:return[s,Bi(T=>{He(T)},()=>kC(s.ProcessInstanceId,t),void 0,T=>new U(1,[new an(2,[T])]))]}}function OC(e,t,n,r){return MC(AC,e,t,n,r)}const DC=d("div",C(y([["className","text-primary-base"],(()=>{let e,t,n;const r=[d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(e=I(d("g",C(I((t=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:16,fill:"currentColor"}),d("path",C(y([(n="M20.3018 11.7811L13.9959 18.0829L11.6982 15.7867C11.5092 15.6043 11.2561 15.5033 10.9933 15.5056C10.7306 15.5079 10.4793 15.6132 10.2935 15.7989C10.1077 15.9845 10.0023 16.2357 10 16.4983C9.99775 16.7608 10.0988 17.0138 10.2813 17.2026L13.2874 20.2068C13.4754 20.3945 13.7302 20.5 13.9959 20.5C14.2616 20.5 14.5164 20.3945 14.7043 20.2068L21.7187 13.1971C21.9012 13.0082 22.0022 12.7553 22 12.4927C21.9977 12.2301 21.8923 11.979 21.7065 11.7933C21.5207 11.6076 21.2694 11.5023 21.0067 11.5C20.7439 11.4978 20.4908 11.5987 20.3018 11.7811Z",["d",n]),["fill","white"]])))]),["children",b.Children.toArray(Array.from(t))]))))),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(r))]})()]))),NC=d("div",C(y([["className","text-primary-base"],(()=>{let e,t,n,r;const s=[d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(e=I(d("g",C(I((t=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"currentColor",strokeWidth:2}),d("path",C(y([(n="M16.616 12.6769L11.146 18.1459C11.0908 18.2022 11.0497 18.2707 11.026 18.3459L10.026 21.3459C10.0018 21.4208 9.99555 21.5004 10.0079 21.5781C10.0202 21.6559 10.0507 21.7296 10.0969 21.7934C10.1431 21.8571 10.2036 21.909 10.2737 21.9449C10.3438 21.9808 10.4213 21.9997 10.5 21.9999C10.5538 22.0002 10.6072 21.9914 10.658 21.9739L13.658 20.9739C13.7332 20.9503 13.8017 20.9091 13.858 20.8539L19.327 15.3839L16.616 12.6769Z",["d",n]),["fill","currentColor"]]))),d("path",C(y([(r="M21.8545 12.146L19.8545 10.146C19.808 10.0994 19.7529 10.0625 19.6921 10.0373C19.6314 10.0121 19.5663 9.99908 19.5005 9.99908C19.4347 9.99908 19.3696 10.0121 19.3089 10.0373C19.2481 10.0625 19.1929 10.0994 19.1465 10.146L17.6775 11.616L20.3845 14.323L21.8545 12.854C21.9011 12.8075 21.938 12.7524 21.9632 12.6916C21.9884 12.6309 22.0014 12.5657 22.0014 12.5C22.0014 12.4342 21.9884 12.3691 21.9632 12.3083C21.938 12.2476 21.9011 12.1924 21.8545 12.146Z",["d",r]),["fill","currentColor"]])))]),["children",b.Children.toArray(Array.from(t))]))))),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(s))]})()]))),RC=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t,n;const r=I(d("g",C(I((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2}),d("path",C(y([(t="M15 13C15 12.7348 15.1054 12.4804 15.2929 12.2929C15.4804 12.1054 15.7348 12 16 12C16.2652 12 16.5196 12.1054 16.7071 12.2929C16.8946 12.4804 17 12.7348 17 13V15H19V13C19 12.2044 18.6839 11.4413 18.1213 10.8787C17.5587 10.3161 16.7956 10 16 10C15.2044 10 14.4413 10.3161 13.8787 10.8787C13.3161 11.4413 13 12.2044 13 13V15H15V13Z",["d",t]),["fill","#9CA3AF"]]))),d("path",C(y([(n="M19.6 16H12.4C11.9029 16 11.5 16.3731 11.5 16.8333V20.1667C11.5 20.6269 11.9029 21 12.4 21H19.6C20.0971 21 20.5 20.6269 20.5 20.1667V16.8333C20.5 16.3731 20.0971 16 19.6 16Z",["d",n]),["fill","#9CA3AF"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(r))]})()]))),Ih=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=I(d("g",C(I((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2})]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(t))]})()]))),BC=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=I(d("g",C(I((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2}),d("path",C(y([(t="M20.3018 11.7811L13.9959 18.0829L11.6982 15.7867C11.5092 15.6043 11.2561 15.5033 10.9933 15.5056C10.7306 15.5079 10.4793 15.6132 10.2935 15.7989C10.1077 15.9845 10.0023 16.2357 10 16.4983C9.99775 16.7608 10.0988 17.0138 10.2813 17.2026L13.2874 20.2068C13.4754 20.3945 13.7302 20.5 13.9959 20.5C14.2616 20.5 14.5164 20.3945 14.7043 20.2068L21.7187 13.1971C21.9012 13.0082 22.0022 12.7553 22 12.4927C21.9977 12.2301 21.8923 11.979 21.7065 11.7933C21.5207 11.6076 21.2694 11.5023 21.0067 11.5C20.7439 11.4978 20.4908 11.5987 20.3018 11.7811Z",["d",t]),["fill","#D1D5DB"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(n))]})()])));function Il(e,t){let n;return d("div",C(y([["className","w-full h-6 rounded justify-start items-center inline-flex"],(n=[d("div",{className:ye(" ",[e,"text-lg font-medium leading-normal"]),children:t})],["children",b.Children.toArray(Array.from(n))])])))}function LC(e){return Il("text-gray-900",e)}function Al(e){return Il("text-gray-500",e)}function VC(e){return Il("text-primary-base",e)}function FC(e){switch(e.Status.tag){case 0:return LC(Jn(e));case 1:return Al(Jn(e));case 3:return Al(Jn(e));case 4:return Al(Jn(e));default:return VC(Jn(e))}}function Ah(e){let t;return d("div",C(y([["className","w-8 h-6 flex-col justify-center items-center inline-flex"],(t=[d("div",{className:ye(" ",[e,"w-0.5 h-6 relative"])})],["children",b.Children.toArray(Array.from(t))])])))}const WC=Ah("bg-gray-300"),Eh=Ah("bg-primary-base");function jC(e){const t=O(e.Id,new Se(6,[])),n=e.Status;let r;if(t)r=2;else switch(n.tag){case 0:{r=0;break}case 2:{r=1;break}default:r=2}switch(r){case 0:return Eh;case 1:return Eh;default:return WC}}function Th(e,t){let n,r,s;const i=O(t.Status,new ie(0,[]))?!0:O(t.Status,new ie(2,[]));return d("button",C(y([["className",ye(" ",["group h-8 justify-start items-center space-x-4 inline-flex focus:outline-none"])],["type","button"],["disabled",!i],["onClick",o=>{e(new U(2,[new fe(2,[t])]))}],(n=[d("div",C(y([["className","w-8 h-8 relative"],(r=pe(A(()=>{const o=t.Status;return o.tag===0?_(DC):o.tag===1?_(Ih):o.tag===3?O(t.Id,new Se(6,[]))?_(RC):_(Ih):o.tag===4?_(BC):_(NC)})),["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className",ye(" ",pe(A(()=>V(_("rounded justify-start items-center flex"),A(()=>i?_("group-focus:outline-none group-focus:ring-2 group-focus:ring-offset-4 group-focus:ring-primary-focus"):dr())))))],(s=[FC(t)],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(n))])])))}function UC(e){let t,n,r,s=!1,i=0;const o=me(e.Steps);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const u=o["System.Collections.Generic.IEnumerator`1.get_Current"]();switch(u.Id.tag){case 0:case 1:{s=O(u.Status,new ie(0,[]))?!0:O(u.Status,new ie(4,[]));break}default:(O(u.Status,new ie(0,[]))||O(u.Status,new ie(4,[])))&&(i=i+1|0)}}}finally{oe(o)}r=i+(s?1:0);const a=lr(Sl(e.Steps))|0,l=u=>d("div",{className:"text-gray-500 text-sm font-medium leading-tight",children:u});return d("div",C(y([(t="h-20 w-full px-6 py-4 bg-white border-b border-gray-300 flex-col justify-start items-start inline-flex cursor-default",["className",t]),(n=pe(A(()=>{let u,f;return V((u=e.Branding,O(e.AppMode,new Tr(0,[]))?_(ee()):u!=null&&u.CompanyName!=null?(f=u.CompanyName,_(l(os(f)))):_(l(bl(e.JourneyType)))),A(()=>_(d("div",{className:"text-center text-gray-900 text-base font-semibold leading-normal",children:`${r}/${a} sections complete`}))))})),["children",b.Children.toArray(Array.from(n))])])))}function zC(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(M(i))return o;if(M(P(i)))return vt(o,I(Th(e,k(i))));r=et(k(P(i)),P(P(i))),s=vt(o,y([Th(e,k(i)),jC(k(P(i)))]));continue e}})(Sl(t.Steps),ce())}function HC(e){let t,n,r;const s=e.dispatch,i=e.detail,o=Pc(void 0),a=hi(!1);return Np(()=>{const l=window.ResizeObserver?new window.ResizeObserver(()=>{const u=document.body.offsetWidth;Cl(u)!=null||a[0]===!1&&(a[1](!0),s(new U(3,[])))}):new Rf(()=>{const u=document.body.offsetWidth;Cl(u)!=null||a[0]===!1&&(a[1](!0),s(new U(3,[])))});return Tn(u=>{l.observe(u)},ei(o.current)),{Dispose(){l.disconnect()}}}),d("div",C(y([["ref",o],["className","absolute top-0 bottom-0 left-0 right-0"],(t=[d("div",C(y([["className","w-full h-full bg-white flex-col justify-start items-start inline-flex"],(n=[UC(i),d("div",C(y([["className","p-6 bg-white flex-col justify-start items-start inline-flex"],(r=zC(s,i),["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}class Ji extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token"]}}class GC extends R{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["app-base-url"]}}class YC extends R{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["workflows-instance-id"]}}function Ph(e){const t=e.children,n=e.effect,r=e.props,s=e.step;pr(n);const i=s.tag===1?mt.ComponentTagName:s.tag===2?pt.ComponentTagName:s.tag===3?$t.ComponentTagName:s.tag===4?Oe.ComponentTagName:s.tag===5?On.ComponentTagName:s.tag===6?as.ComponentTagName:s.tag===7?Yt.ComponentTagName:s.tag===8?Dn.ComponentTagName:Ye.ComponentTagName;return d(i,bt(r,1),...t)}class Ms extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Mobile","MobileLandscape","Tablet","Desktop","WideScreen"]}}class qC extends L{constructor(t,n,r,s){super(),this.MobileLandscape=t|0,this.Tablet=n|0,this.Desktop=r|0,this.WideScreen=s|0}}const JC=new qC(576,768,1024,1216);function ZC(e){return["(max-width: "+e.MobileLandscape+"px)","(max-width: "+e.Tablet+"px)","(max-width: "+e.Desktop+"px)","(max-width: "+e.WideScreen+"px)"]}function Zi(e){const t=Dp(()=>window.matchMedia(e).matches);return Ko(()=>{const n=window.matchMedia(e),r=()=>{t[1](n.matches)};return r(),n.addListener(r),di(()=>{n.removeListener(r)})},[e]),t[0]}function XC(e){const t=ZC(Ee(e,JC)),n=Zi(t[0]),r=Zi(t[1]),s=Zi(t[2]),i=Zi(t[3]);return n?new Ms(0,[]):r?new Ms(1,[]):s?new Ms(2,[]):i?new Ms(3,[]):new Ms(4,[])}const KC=d("svg",C(y([["fill","none"],["height",16],["viewBox","0 0 16 16"],["width",16],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=I(d("g",C(I((e=y([d("rect",{width:16,height:16,fill:"white"}),d("path",C(y([(t="M15 6.99992H3.41403L6.70703 3.70692C6.88919 3.51832 6.98998 3.26571 6.9877 3.00352C6.98543 2.74132 6.88026 2.49051 6.69485 2.3051C6.50944 2.11969 6.25863 2.01452 5.99643 2.01224C5.73423 2.00997 5.48163 2.11076 5.29303 2.29292L0.293031 7.29292C0.10556 7.48045 0.000244141 7.73475 0.000244141 7.99992C0.000244141 8.26508 0.10556 8.51939 0.293031 8.70692L5.29303 13.7069C5.38528 13.8024 5.49562 13.8786 5.61763 13.931C5.73963 13.9834 5.87085 14.011 6.00363 14.0122C6.13641 14.0133 6.26809 13.988 6.39098 13.9377C6.51388 13.8875 6.62553 13.8132 6.71943 13.7193C6.81332 13.6254 6.88757 13.5138 6.93785 13.3909C6.98813 13.268 7.01343 13.1363 7.01228 13.0035C7.01113 12.8707 6.98354 12.7395 6.93113 12.6175C6.87872 12.4955 6.80254 12.3852 6.70703 12.2929L3.41403 8.99992H15C15.2652 8.99992 15.5196 8.89456 15.7071 8.70703C15.8947 8.51949 16 8.26514 16 7.99992C16 7.7347 15.8947 7.48035 15.7071 7.29281C15.5196 7.10528 15.2652 6.99992 15 6.99992Z",["d",t]),["fill","#212121"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(n))]})()])));function QC(e,t,n){let r,s,i,o,a,l;const u=N1(h=>O(h.Id,n.Id),t)/lr(t)*100;l=je(We("%.0f%%"))(u);let f;const c=B1(h=>O(h.Status,new ie(2,[]))?!0:O(h.Status,new ie(0,[])),t)/lr(t)*100;f=je(We("%.0f%%"))(c);const p=O(n.Id,new Se(1,[]))?bh(new Se(0,[])):Jn(n);return d("div",C(y([(r="h-20 w-full px-6 py-4 bg-white border-b border-gray-300 flex-col justify-start items-start space-y-3 inline-flex sticky left-0 right-0 top-0 z-50",["className",r]),(s=[d("div",C(y([["className","self-stretch justify-start items-center space-x-3 inline-flex"],(i=[d("button",{type:"button",className:"w-4 h-4 rounded-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-base",onClick:h=>{e(new U(2,[new fe(1,[])]))},children:b.Children.toArray([KC])}),d("div",{className:"text-center text-gray-900 text-base font-semibold leading-normal",children:p})],["children",b.Children.toArray(Array.from(i))])]))),d("div",C(y([["className","w-full h-2 relative rounded-sm"],(o=[d("div",{className:"w-full h-0.5 left-0 top-[3px] absolute bg-gray-300 rounded-sm"}),d("div",C(y([["className","w-full left-0 top-0 absolute"],(a=[d("div",{className:"h-0.5 left-0 top-[3px] absolute bg-primary-base rounded-sm",style:{width:f}}),d("div",{className:"w-2 h-2 top-0 absolute bg-primary-base rounded-full",style:{left:l}})],["children",b.Children.toArray(Array.from(a))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))}const e3=d("div",C(y([["className","relative h-4 w-2 z-50"],(()=>{const e=[d("div",{className:"absolute left-0 top-1 h-2 w-2 rounded-full bg-primary-base"})];return["children",b.Children.toArray(Array.from(e))]})()]))),t3=d("div",{className:"relative h-0.5 w-2 bg-gray-300"}),Mh=d("div",{className:"relative h-0.5 w-2 bg-primary-base"}),n3=d("div",C(y([["className","w-4 h-4 relative"],(()=>{let e,t,n;const r=[d("svg",C(y([["fill","none"],["height",16],["viewBox","0 0 16 16"],["width",16],["xmlns","http://www.w3.org/2000/svg"],(e=y([d("path",C(y([(t="M7 5C7 4.73478 7.10536 4.48043 7.29289 4.29289C7.48043 4.10536 7.73478 4 8 4C8.26522 4 8.51957 4.10536 8.70711 4.29289C8.89464 4.48043 9 4.73478 9 5V7H11V5C11 4.20435 10.6839 3.44129 10.1213 2.87868C9.55871 2.31607 8.79565 2 8 2C7.20435 2 6.44129 2.31607 5.87868 2.87868C5.31607 3.44129 5 4.20435 5 5V7H7V5Z",["d",t]),["fill","#9CA3AF"]]))),d("path",C(y([(n="M11.6 8H4.4C3.90294 8 3.5 8.3731 3.5 8.83333V12.1667C3.5 12.6269 3.90294 13 4.4 13H11.6C12.0971 13 12.5 12.6269 12.5 12.1667V8.83333C12.5 8.3731 12.0971 8 11.6 8Z",["d",n]),["fill","#9CA3AF"]])))]),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(r))]})()])));function Oh(e,t,n){let r;if(e)r=0;else switch(n.tag){case 0:case 4:{r=2;break}case 1:{r=4;break}case 3:{t?r=3:r=4;break}default:r=1}switch(r){case 0:return e3;case 1:return Mh;case 2:return Mh;case 3:return n3;default:return t3}}const Dh=d("div",{className:"relative h-0.5 w-full"}),r3=d("div",{className:"relative h-0.5 w-full bg-gray-300"}),s3=d("div",{className:"relative h-0.5 w-full bg-primary-base"});function El(e){let t;if(e==null)t=1;else switch(e.tag){case 0:case 4:case 2:{t=0;break}default:t=2}switch(t){case 0:return s3;case 1:return Dh;default:return r3}}function Nh(e){let t,n;return d("div",C(y([["className","inline-flex h-11 w-10 flex-col items-center justify-start"],(t=[d("div",C(y([["className","inline-flex h-4 items-center justify-center self-stretch"],(n=[d("div",{className:ye(" ",[e,"relative h-0.5 w-10"])})],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}const i3=Nh("bg-gray-300"),o3=Nh("bg-primary-base");function a3(e){switch(e.tag){case 0:case 4:case 2:return o3;default:return i3}}function Rh(e,t,n,r){let s,i;const o=!e&&(O(n.Status,new ie(0,[]))?!0:O(n.Status,new ie(2,[]))),a=e?"text-primary-base":O(n.Status,new ie(2,[]))||O(n.Status,new ie(0,[]))?"text-gray-900 group-hover:text-primary-base":"text-gray-500",l=d("div",{className:"absolute inset-0 group-hover:bg-primary-base group-hover:opacity-10 rounded"});let u;const f=$c(Ch(n.Id).toLocaleLowerCase()," ","-");return u=je(We("step-%s"))(f),d("div",C(y([["className",ye(" ",["h-11 flex-col justify-start items-center inline-flex"])],(s=[d("div",{className:"h-4 inline-flex items-center justify-center self-stretch",children:b.Children.toArray(Array.from(r))}),d("button",C(y([["type","button"],["disabled",!o],["data-testid",u],["className",ye(" ",["relative group h-7 px-2 py-1 justify-center items-center gap-2 inline-flex rounded","focus:outline-none focus:ring-1 focus:ring-offset-1 focus:ring-primary-focus"])],["onClick",Pt(t)(n)],(i=pe(A(()=>V(_(o?l:ee()),A(()=>_(d("div",{className:ye(" ",[a,"text-sm font-medium leading-tight whitespace-nowrap"]),children:aC(n)})))))),["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))}function l3(e,t,n){const r=O(n.Id,new Se(1,[]))?new Se(0,[]):n.Id,s=(o,a)=>{e(new U(2,[new fe(2,[o])]))};return cr(((o,a,l)=>{e:for(;;){const u=o,f=a,c=l;if(M(u))return c;if(M(P(u))){const p=El(f),h=O(k(u).Id,r);return vt(c,I(Rh(h,s,k(u),y([Dh,Oh(h,O(k(u).Id,new Se(6,[])),k(u).Status),p]))))}else{const p=El(f),h=O(k(u).Id,r),$=Oh(h,O(k(u).Id,new Se(6,[])),k(u).Status);o=P(u),a=k(u).Status,l=vt(c,y([Rh(h,s,k(u),y([El(k(u).Status),$,p])),a3(k(u).Status)]));continue e}}})(cr(Sl(t)),void 0,ce()))}function u3(e,t,n){let r,s,i;const o=d("div",C(y([["className","grow shrink basis-0 flex-col justify-start items-start inline-flex"],(r=[d("div",{className:"hidden lg:inline text-gray-500 text-sm font-medium leading-tight",children:bl(t.JourneyType)}),Ee(Le(l=>d("div",{className:"hidden lg:inline text-center text-gray-900 text-base font-semibold leading-normal",children:l}),Le(os,cn(l=>l.CompanyName,t.Branding))),ee())],["children",b.Children.toArray(Array.from(r))])]))),a=d("div",{className:"grow shrink basis-0"});return d("div",C(y([(s="w-full h-20 px-8 py-4 bg-white border-b border-gray-300 justify-between items-center inline-flex sticky left-0 right-0 top-0 z-50",["className",s]),(i=pe(A(()=>V(O(t.AppMode,new Tr(0,[]))?_(a):_(o),A(()=>{let l;return V(_(d("div",C(y([["className","bg-white justify-center items-start flex"],(l=l3(e,t.Steps,n),["children",b.Children.toArray(Array.from(l))])])))),A(()=>_(d("div",{className:"grow shrink basis-0"}))))})))),["children",b.Children.toArray(Array.from(i))])])))}function c3(e){let t;const n=e.body,r=e.currentStep,s=e.detail,i=e.dispatch;return d("div",C(y([["className","w-full flex-col justify-start items-center inline-flex bg-white"],(t=pe(A(()=>V(lr(s.Steps)===1?_(ee()):XC().tag===0?_(QC(i,s.Steps,r)):_(u3(i,s,r)),A(()=>_(d("div",{className:"p-4 max-w-7xl mx-auto w-full",children:n})))))),["children",b.Children.toArray(Array.from(t))])])))}const f3=e=>d("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d("path",{d:"M16 16V30",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M11 21L16 16L21 21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M11 29H4C3.20435 29 2.44129 28.6839 1.87868 28.1213C1.31607 27.5587 1 26.7956 1 26V2H12L15 7H31V26C31 26.7956 30.6839 27.5587 30.1213 28.1213C29.5587 28.6839 28.7956 29 28 29H21",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),d3=e=>d("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d("path",{d:"M19.7 4.3C19.3 3.9 18.7 3.9 18.3 4.3L12 10.6L5.7 4.3C5.3 3.9 4.7 3.9 4.3 4.3C3.9 4.7 3.9 5.3 4.3 5.7L10.6 12L4.3 18.3C3.9 18.7 3.9 19.3 4.3 19.7C4.5 19.9 4.7 20 5 20C5.3 20 5.5 19.9 5.7 19.7L12 13.4L18.3 19.7C18.5 19.9 18.8 20 19 20C19.2 20 19.5 19.9 19.7 19.7C20.1 19.3 20.1 18.7 19.7 18.3L13.4 12L19.7 5.7C20.1 5.3 20.1 4.7 19.7 4.3Z",fill:"#9CA3AF"}));function h3(e){const t=bt(e,1);return d(f3,t)}function m3(e){const t=bt(e,1);return d(d3,t)}function p3(e){return d("div",{className:"absolute top-0 bottom-0 left-0 right-0",children:b.Children.toArray([e])})}function $3(e,t){let n;return d("button",C(y([["type","button"],["data-testid","submit-btn"],["className",ye(" ",["self-stretch md:self-auto md:w-60 px-4 py-2 bg-primary-base hover:bg-primary-hover rounded-md shadow","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus cursor-pointer","justify-center items-center inline-flex"])],["onClick",t],(n=[d("div",{className:"text-white text-base font-semibold leading-normal",children:e})],["children",b.Children.toArray(Array.from(n))])])))}function g3(e,t){let n;return d("button",C(y([["type","button"],["className",ye(" ",["relative group self-stretch md:self-auto md:w-60 px-4 py-2 rounded-md shadow justify-center items-center inline-flex","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus cursor-pointer"])],["onClick",t],(n=[d("div",{className:"text-primary-dark text-base font-semibold leading-normal z-[1]",children:e}),d("div",{className:"absolute w-full h-full rounded-md z-[0] bg-primary-base opacity-10 group-hover:opacity-20"})],["children",b.Children.toArray(Array.from(n))])])))}function Xi(e,t,n,r,s){let i,o,a,l,u,f,c,p,h,$,g,w,v,S,N;return p3(d("div",C(y([["className","w-full h-full md:pb-8 bg-white flex-col justify-start items-start md:items-center inline-flex"],(i=[d("div",C(y([(o="w-full md:self-stretch p-4 bg-white border-gray-200 flex-col justify-start items-end space-x-4 space-y-4 flex",["className",o]),(a=[d("button",C(y([["type","button"],(l="w-6 h-6 relative rounded-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-base",["className",l]),["onClick",K=>{s(new U(7,[{InjectedBenefits:r}]))}],(u=[m3([])],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(a))])]))),d("div",C(y([(f="w-full md:w-[560px] grow shrink basis-0 px-4 md:px-0 pb-8 md:pb-0 bg-white flex-col justify-between md:justify-start items-center md:space-y-14 flex",["className",f]),(c=[d("div",C(y([["className","self-stretch h-64 md:h-56 flex-col justify-start items-center space-y-8 flex"],(p=[d("div",C(y([["className","self-stretch h-64 flex-col justify-start items-center space-y-6 flex"],(h=[d("div",C(y([["className","self-stretch h-24 flex-col justify-start items-center space-y-4 flex"],($=[d("div",C(y([["className","w-12 h-12 relative rounded-lg"],(g=[d("div",{className:"w-12 h-12 relative bg-primary-base opacity-10 rounded-lg"}),d("div",C(y([["className","w-8 h-8 left-2 top-2 absolute"],(w=[d("div",C(y([["className","w-7 h-7 left-px top-0.5 absolute"],(v=[h3([["className","text-primary-base"]])],["children",b.Children.toArray(Array.from(v))])])))],["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(g))])]))),d("div",{className:"self-stretch text-center text-gray-900 text-2xl md:text-3xl font-bold leading-7 md:leading-9",children:e})],["children",b.Children.toArray(Array.from($))])]))),d("div",C(y([["className","self-stretch h-40 md:h-24 flex-col justify-start items-center space-y-3 md:space-y-4 flex"],(S=[d("div",{className:"self-stretch text-center text-gray-900 text-base md:text-lg font-normal leading-normal md:leading-7",children:t}),d("div",{className:"self-stretch text-center text-gray-900 text-base md:text-lg font-normal leading-normal md:leading-7",children:n})],["children",b.Children.toArray(Array.from(S))])])))],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(p))])]))),d("div",C(y([["className","self-stretch h-24 flex-col justify-start items-center space-y-4 flex cursor-pointer"],(N=[$3(r?"Submit and continue":"Submit",K=>{s(new U(8,[{InjectedBenefits:r}]))}),g3("Keep editing",K=>{s(new U(7,[{InjectedBenefits:r}]))})],["children",b.Children.toArray(Array.from(N))])])))],["children",b.Children.toArray(Array.from(c))])])))],["children",b.Children.toArray(Array.from(i))])]))))}function w3(e){let t,n;const r=e.dispatch,s=e.wd,i=s.IsBenefitsStepEnabled;return s.AppMode.tag===1?i?Xi("Before you continue",(t=cn(o=>o.CompanyName,s.Branding),t==null?"Submit to finalise your pay information to your employer and continue to access your workplace benefits":`Submit to finalise your pay information to ${os(t)} and continue to access your workplace benefits`),"Once you submit, you’ll be unable to view or edit your details",!0,r):Xi("Submit your details",(n=cn(o=>o.CompanyName,s.Branding),n==null?"Submit to finalise your pay information to your employer":`Submit to finalise your pay information to ${os(n)}`),"Once you submit, you’ll be unable to view or edit your details.",!1,r):i?Xi("Before you continue","Submit to finalise your pay information to your employer and continue to access your workplace benefits","",!0,r):Xi("Submit your details","Submit to finalise your pay information to your employer","",!1,r)}function Ki(e,t){let n;return d("div",C(y([["className",ye(" ",["animate-pulse w-full relative",e,t])],(n=[d("div",{className:ye(" ",["w-full left-0 top-0 absolute bg-gray-200 rounded",e])})],["children",b.Children.toArray(Array.from(n))])])))}const y3=Ki("h-9","max-w-96"),Bh=Ki("h-6","max-w-96"),_3=Ki("h-80","max-w-96"),v3=Ki("h-10","max-w-48"),b3=(()=>{let e,t,n;const r=[d("div",C(y([(e="w-full h-full px-8 py-20 bg-white rounded border border-zinc-200 flex-col justify-start items-center gap-10 inline-flex",["className",e]),(t=[d("div",C(y([["className","max-w-96 w-full flex-col justify-start items-center gap-6 flex"],(n=[y3,d("div",{className:"self-stretch h-14 flex-col justify-start items-center gap-2 flex",children:b.Children.toArray([Bh,Bh])})],["children",b.Children.toArray(Array.from(n))])]))),_3,v3],["children",b.Children.toArray(Array.from(t))])])))];return d(Ie,{},...r)})();function C3(e){let t;const n=e.accessToken,r=e.appMode;let s;const i=PC(n);s=il(()=>Li(()=>i,(u,f)=>OC(n,r,u,f),(u,f)=>{}),void 0,[]);const o=s[0],a=s[1];Qo(()=>{kg()},[]),Qo(()=>{const u=o.CurrentView;let f;switch(o.WorkflowDetail.tag===1?u.tag===2?O(u.fields[0].Id,new Se(4,[]))?(f=0,u.fields[0]):O(u.fields[0].Id,new Se(5,[]))?(f=1,u.fields[0]):f=2:f=2:f=3,f){case 0:break;case 1:break;case 2:{fl(I(hl(r)),2);break}}},[o.CurrentView,o.WorkflowDetail]),pr(()=>{window.addEventListener("step-completion",u=>{a(new U(4,[u]))})});const l=o.WorkflowDetail;switch(l.tag){case 1:{const u=l.fields[0],f=u.JourneyType;return d("div",C(y([["className","w-full min-h-[600px] mx-auto bg-white"],(t=pe(A(()=>V(ke(c=>d("style",{children:[c]}),o.CssOverrides),A(()=>{const c=o.CurrentView;switch(c.tag){case 1:return V(_(d(HC,{detail:u,dispatch:a})),A(()=>(qt(0),dr())));case 2:{const p=c.fields[0];let h;const $=p.Id;return h=$.tag===4?d(Ph,{step:new Se(4,[]),props:[new Ji(1,[n]),new Ji(0,[`${jn}/super-selection/backend/v1.0/`]),new GC(hl(r))],effect:()=>{a(new U(13,[])),qt(2500)},children:[]}):d(Ph,{step:$,props:[new Ji(1,[n]),new Ji(0,[jn]),new YC(ln($r(o.ProcessInstanceId)))],effect:()=>{qt(1500)},children:[]}),_(d(c3,{dispatch:a,detail:u,currentStep:p,body:h}))}case 3:return V(_(d(w3,{wd:u,dispatch:a})),A(()=>(qt(0),dr())));case 4:return V(_(d("div",{className:"text-center mt-5",children:"We had an issue. Please try again shortly."})),A(()=>(qt(0),dr())));case 5:{const p=Le(W_,u.Branding);let h;if(u.AppMode.tag===0)h=0;else switch(f.tag){case 1:{h=2;break}case 2:{h=3;break}case 3:case 4:{h=4;break}default:h=1}switch(h){case 0:return _(b3);case 1:return _(Ts(qi(p,"onboarding")));case 2:return _(Ts(qi(p,"information request")));case 3:return _(Ts(ph()));default:return _(Ts($h()))}}default:return _(d("div",{children:["Please wait..."]}))}})))),["children",b.Children.toArray(Array.from(t))])])))}case 2:return Ts(ta());default:return d("div",{children:["Please wait..."]})}}function S3(e){return{render:function(t){Fs(t,e)},unmount:function(){yo(e)}}}class k3 extends L{constructor(t,n,r){super(),this.model=t,this.render=n,this.equal=r}}class x3 extends ft{constructor(t){super(t)}shouldComponentUpdate(t,n){const r=this;return!r.props.equal(r.props.model,t.model)}render(){return this.props.render()}}function I3(e,t,n,r){const s=new k3(n,()=>t(n,r),e);return d(x3,s)}const A3=(()=>{try{return Zo(Su.slice(void 0,2),511,!1,32)>=18}catch{return!1}})();function E3(e,t,n){let r;return p0(te(A3?(r=S3(document.getElementById(t)),s=>i=>{r.render(e(o=>a=>o===a,$0(n),s,i))}):s=>i=>{Fs(e(o=>a=>o===a,$0(n),s,i),document.getElementById(t))}),n)}function T3(e,t){return E3((n,r,s,i)=>I3(te(n),te(r),s,i),e,t)}function P3(e,t){const n=encodeURIComponent(Wv(t)),r=encodeURIComponent(S2),s=encodeURIComponent(k2(new Tr(0,[])));return E.Delay(()=>{let i,o;const a=vs(yn(new Qt(1,[`grant_type=authorization_code&code=${n}&client_id=${r}&redirect_uri=${s}`]),(i=tn(new Ft(1,[]),en(`${v2}/connect/token`)),Hi($l("application/x-www-form-urlencoded"),i))));return o=E.Bind(a,l=>E.Return(new m(0,[l]))),E.Bind(o,l=>{const u=l;if(u.tag===1)return E.Return(new m(1,[u.fields[0]]));{const f=u.fields[0];if(f.statusCode===200){const c=rn(te(sn(wl(),void 0)),f.responseText);return E.Return(c)}else return E.Return(new m(1,["Unexpected result from backend"]))}})})}function M3(){return new Er(0,[])}function Tl(e){return _i(e)}function O3(e,t){return E.Delay(()=>{let n;return E.Bind($g([(n=P3(e,t),E.Bind(n,r=>E.Return(r))),E.Delay(()=>E.Bind(Tl(2e3),()=>E.Return(void 0)))]),r=>E.Return(ne(0,r)))})}function D3(e,t,n){let r;switch(e.tag){case 1:switch(t.tag){case 1:return[t,Bi(s=>{He(s)},Tl,1e3,()=>new Hn(1,[]))];case 2:return t.fields[0].tag===1?[t,J()]:[t,Bi(s=>{He(s)},Tl,2e3,()=>new Hn(2,[]))];default:return[new Er(2,[new m(1,["No current authenticated user"])]),J()]}case 2:return[t,(r=window.location.pathname,d0(s=>{fl(I(r),1)}))];default:if(e.fields[0].tag===1)return e.fields[0].fields[0].tag===1?[new Er(2,[new m(1,[`SignIn failed: ${e.fields[0].fields[0].fields[0]}`])]),J()]:(window.gtag&&window.gtag("event","oidc_sign_in",{}),[new Er(2,[new m(0,[e.fields[0].fields[0].fields[0]])]),e.fields[2]?J():I(s=>{s(new Hn(2,[]))})]);switch(t.tag){case 1:return[t,J()];default:return[new Er(1,[]),It(s=>{He(s)},s=>O3(s[0],s[1]),[n,e.fields[1]],s=>{const i=[new Ce(1,[s]),e.fields[1],e.fields[2]];return new Hn(0,[i[0],i[1],i[2]])},s=>{const i=[new Ce(1,[new m(1,[s.message])]),e.fields[1],e.fields[2]];return new Hn(0,[i[0],i[1],i[2]])})]}}}function N3(){const e=Xu(window.sessionStorage.getItem("credentials"));if(e!=null){const t=e,n=rn(te(sn(wl(),void 0)),t);return n.tag===1?void 0:n.fields[0]}}function R3(e){let t;const n=["credentials",(t=new mh(e.id_token,e.access_token,e.expires_in,void 0,e.scope,e.token_type),_n(0,vn(wl(),void 0,void 0,void 0)(t)))];window.sessionStorage.setItem(n[0],n[1])}function Lh(e,t){return nl(n=>new bn(3,[n]),I(n=>{n(new Hn(0,[new Ce(0,[]),e,t]))}))}function Pl(e){return Lh(e,!1)}function B3(e){return Lh(e,!0)}function L3(){const e=gh(E0(window.location.pathname+window.location.search,2)),t=e[0],n=e[1],r=new Yn(t,M3(),n);switch(t.tag){case 4:case 1:case 2:case 5:case 6:return[r,J()];case 0:{const s=N3();let i;switch(n.tag){case 0:case 2:{i=1;break}default:s==null?i=1:i=0}switch(i){case 0:return[new Yn(r.CurrentPage,new Er(2,[new m(0,[s])]),r.AppMode),J()];default:return[r,I(o=>{o(new bn(5,[]))})]}}default:return[r,Pl(t.fields[0])]}}function V3(e,t){switch(e.tag){case 1:{const n=e.fields[0];return[new Yn(new W(3,[n]),t.Credentials,t.AppMode),Pl(n)]}case 2:return[new Yn(new W(4,[]),t.Credentials,t.AppMode),nl(n=>new bn(3,[n]),I(n=>{n(new Hn(1,[]))}))];case 3:{const n=D3(e.fields[0],t.Credentials,t.AppMode),r=n[0];let s,i;switch(r.tag===2&&r.fields[0].tag===0&&t.AppMode.tag===1?(s=0,i=r.fields[0].fields[0]):s=1,s){case 0:{R3(i);break}}return[new Yn(t.CurrentPage,r,t.AppMode),nl(o=>new bn(3,[o]),n[1])]}case 4:return[t,B3(e.fields[0])];case 5:return[new Yn(new W(6,[]),t.Credentials,t.AppMode),J()];default:{const n=gh(e.fields[0])[0],r=new Yn(n,t.Credentials,t.AppMode);return n.tag===3?[r,Pl(n.fields[0])]:[r,J()]}}}const Vh=d("div",C(y([["className","flex flex-col justify-center items-center pt-10"],(()=>{const e=[ta()];return["children",b.Children.toArray(Array.from(e))]})()])));function F3(e){switch(e.CurrentPage.tag){case 3:case 4:case 2:return I("bg-white h-full");default:return ce()}}function W3(e){switch(e.tag){case 1:return d("style",{children:[`
|
|
809
|
+
`))(c);return h=>p(h)}}else if(Uu(r))if(Oo(r)){const f=ar(c=>Et(e,t,!1,c),Yu(r));return c=>p=>Array.isArray(p)?Ct(h=>Gm(ur(h)),fh(0,f,c,p)):new m(1,[[c,new B(0,["an array",p])]])}else switch(ge(zu(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return s=Et(e,t,!0,ne(0,it(r))),c=>p=>bv(te(s),c,p);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=Et(e,t,!1,ne(0,it(r))),c=>p=>lh(te(i),c,p);case"System.Collections.Generic.IEnumerable`1[System.Object]":return o=Et(e,t,!1,ne(0,it(r))),c=>p=>Cv(te(o),c,p);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const c=Et(e,t,!1,ne(0,it(r))),p=Et(e,t,!1,ne(1,it(r)));let h;const $=y([g=>w=>Pv(te(c),te(p),g,w),(a=Iv(te(c),te(p)),g=>w=>lh(te(a),g,w))]);return h=g=>w=>Sv($,g,w),g=>w=>xv(Av,te(h),g,w)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const c=Et(e,t,!1,ne(0,it(r)));return p=>h=>{const $=uh(te(c),p,h);return $.tag===0?new m(0,[Ev($.fields[0])]):new m(1,[$.fields[0]])}}default:return hh(e,t,n,r)}else switch(l){case"System.Boolean":return f=>c=>$v(f,c);case"Microsoft.FSharp.Core.Unit":return f=>c=>pv(f,c);case"System.String":return f=>c=>eh(f,c);case"System.Char":return f=>c=>hv(f,c);case"System.SByte":return th;case"System.Byte":return nh;case"System.Int16":return rh;case"System.UInt16":return sh;case"System.Int32":return ih;case"System.UInt32":return oh;case"System.Double":return f=>c=>gv(f,c);case"System.Single":return f=>c=>wv(f,c);case"System.DateTime":return f=>c=>yv(f,c);case"System.DateTimeOffset":return f=>c=>_v(f,c);case"System.TimeSpan":return f=>c=>vv(f,c);case"System.Guid":return f=>c=>mv(f,c);case"System.Object":return f=>c=>new m(0,[c]);default:return hh(e,t,n,r)}else{const f=u;return c=>p=>f.contents(c)(p)}}function Mv(e){return pl({Compare:zs})}function sn(e,t,n){const r=Ee(t,new Ge(0,[]));return Et(Mv(),r,!1,e)}class Ov{constructor(t){this.magicLink=t,this.backendUrl=`${jn}/workflows/public-backend/invites/${this.magicLink.InviteToken}`}}function Dv(e){return new Ov(e)}function Nv(e){return E.Delay(()=>{let t,n;const r=Ss(e,(t=tn(new Ft(1,[]),en(`${e.backendUrl}/magic-link/validate`)),yn(new Qt(1,[(n=new C0(e.magicLink.MagicCode),_n(0,vn(j_(),new Ge(1,[]),void 0,void 0)(n)))]),t)));return E.Bind(r,s=>{const i=s;if(i.tag===1)return E.Return(new m(1,[i.fields[0]]));{let o;const a=i.fields[0];return o=a.statusCode===200?rn(te(sn(q_(),new Ge(1,[]))),a.responseText):new m(1,["Unexpected response from backend"]),E.Return(o)}})})}function Rv(e,t){return E.Delay(()=>{let n,r;const s=Ss(e,(n=tn(new Ft(1,[]),en(`${e.backendUrl}/magic-link/reissue`)),yn(new Qt(1,[(r=new S0(e.magicLink.MagicCode,t),_n(0,vn(J_(),new Ge(1,[]),void 0,void 0)(r)))]),n)));return E.Bind(s,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?rn(te(sn(Q_(),new Ge(1,[]))),l.responseText):new m(1,["Unexpected response from backend"]),E.Return(a)}})})}function Bv(e,t){return E.Delay(()=>{let n,r;const s=Ss(e,(n=tn(new Ft(1,[]),en(`${e.backendUrl}/one-time-code/issue`)),yn(new Qt(1,[(r=new k0(e.magicLink.MagicCode,t),_n(0,vn(e2(),new Ge(1,[]),void 0,void 0)(r)))]),n)));return E.Bind(s,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?rn(te(sn(s2(),new Ge(1,[]))),l.responseText):new m(1,["Unexpected response from backend"]),E.Return(a)}})})}function Lv(e,t){return E.Delay(()=>{let n,r;const s=Ss(e,(n=tn(new Ft(1,[]),en(`${e.backendUrl}/one-time-code/validate`)),yn(new Qt(1,[(r=new x0(t),_n(0,vn(i2(),new Ge(1,[]),void 0,void 0)(r)))]),n)));return E.Bind(s,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?rn(te(sn(u2(),new Ge(1,[]))),l.responseText):new m(1,["Unexpected response from backend"]),E.Return(a)}})})}function Vv(e,t){return E.Delay(()=>{let n,r;const s=Ss(e,(n=tn(new Ft(1,[]),en(`${e.backendUrl}/progress`)),yn(new Qt(1,[(r=new I0(e.magicLink.MagicCode,t),_n(0,vn(c2(),new Ge(1,[]),void 0,void 0)(r)))]),n)));return E.Bind(s,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{let a;const l=o.fields[0];return a=l.statusCode===200?rn(te(sn(m2(),new Ge(1,[]))),l.responseText):new m(1,["Unexpected response from backend"]),E.Return(a)}})})}function Ss(e,t){return E.Delay(()=>{let n;const r=vs(t);return n=E.Bind(r,s=>E.Return(new m(0,[s]))),E.Bind(n,s=>{const i=s;if(i.tag===1)return E.Return(new m(1,[i.fields[0]]));{const o=i.fields[0];if(o.statusCode===429||o.statusCode>=500){let a;const l=_i(2e3);return a=E.Bind(l,u=>E.Return(new m(0,[u]))),E.Bind(a,u=>{const f=u;if(f.tag===1)return E.Return(new m(1,[f.fields[0]]));{const c=vs(t);return E.Bind(c,p=>E.Return(new m(0,[p])))}})}else return E.Return(new m(0,[o]))}})})}class Fv extends R{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AuthCode"]}}function gl(e){return new Fv(e)}function Wv(e){return e.fields[0]}class mh extends L{constructor(t,n,r,s,i,o){super(),this.id_token=t,this.access_token=n,this.expires_in=r,this.refresh_token=s,this.scope=i,this.token_type=o}}function wl(){return ue("Workflows.UI.Auth.Types.Credentials",[],mh,()=>[["id_token",z],["access_token",z],["expires_in",Fm],["refresh_token",Z(z)],["scope",z],["token_type",z]])}let Hn=class extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["SignIn","SignInWithCurrentAuth","NavigateToOnboarding"]}};function jv(){return[new ul(ce(),new H(0,[]),void 0,new v0(0,[new b0(void 0)])),I(e=>{e(new j(1,[new Ce(0,[])]))})]}function Uv(e,t,n,r,s){let i,o,a,l,u,f,c;const p=Dv(e);switch(r.tag){case 1:if(r.fields[0].tag===1){if(r.fields[0].fields[0].tag===1)return[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})];{let h;const $=r.fields[0].fields[0].fields[0].Outcome;switch($.tag){case 1:{const g=$.fields[0],w=g.OneTimeCodeOptionAvailable;h=g.IsInitialMagicLinkUsed?w?new j(0,[new H(1,[g.FirstName,new ll(1,[])])]):new j(0,[new H(1,[g.FirstName,new ll(0,[])])]):w?new j(3,[!1,new Ce(0,[])]):new j(0,[new H(4,[])]);break}case 4:{h=new j(0,[new H(5,[])]);break}case 2:case 7:{h=new j(0,[new H(6,[new re(2,[])])]);break}case 3:{h=new j(0,[new H(6,[new re(4,[])])]);break}case 5:{h=new j(0,[new H(6,[new re(3,[])])]);break}case 6:{h=new j(0,[new H(6,[new re(1,[])])]);break}default:{const g=$.fields[0];g.IsInitialMagicLinkUsed?(n(gl(g.AuthCode)),h=new j(0,[new H(1,[g.FirstName,new ll(2,[])])])):h=new j(6,[g.AuthCode])}}return[new ul(r.fields[0].fields[0].fields[0].CssOverrides,s.Page,H_(r.fields[0].fields[0].fields[0].Outcome),Ee(G_(r.fields[0].fields[0].fields[0].Outcome),s.JourneyType)),I(g=>{g(h)})]}}else return[s,It(h=>{He(h)},()=>Nv(p),void 0,h=>new j(1,[new Ce(1,[h])]),h=>new j(1,[new Ce(1,[new m(1,[h.message])])]))];case 2:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})]:[s,(i=new j(0,[(o=r.fields[1].fields[0].fields[0].Outcome,o.tag===2?new H(2,[o.fields[0].MaskedEmail]):o.tag===1?new H(6,[new re(2,[])]):o.tag===5?new H(6,[new re(2,[])]):o.tag===3?new H(6,[new re(4,[])]):o.tag===4?new H(6,[new re(1,[])]):o.tag===6?new H(5,[]):o.tag===7?new H(6,[new re(3,[])]):new H(2,[o.fields[0].MaskedEmail]))]),I(h=>{h(i)}))]:[s,It(h=>{He(h)},h=>Rv(p,h),r.fields[0],h=>new j(2,[r.fields[0],new Ce(1,[h])]),h=>new j(2,[r.fields[0],new Ce(1,[new m(1,[h.message])])]))];case 3:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})]:[s,(a=new j(0,[(l=r.fields[1].fields[0].fields[0].Outcome,l.tag===1?new H(4,[]):l.tag===2?new H(6,[new re(0,[])]):l.tag===3?r.fields[0]?s.Page:new H(3,[l.fields[0].MaskedPhone]):l.tag===4?new H(6,[new re(2,[])]):l.tag===7?new H(6,[new re(2,[])]):l.tag===5?new H(6,[new re(4,[])]):l.tag===6?new H(6,[new re(1,[])]):l.tag===8?new H(5,[]):l.tag===9?new H(6,[new re(3,[])]):r.fields[0]?s.Page:new H(3,[l.fields[0].MaskedPhone]))]),I(h=>{h(a)}))]:[s,It(h=>{He(h)},h=>Bv(p,h),r.fields[0],h=>new j(3,[r.fields[0],new Ce(1,[h])]),h=>new j(3,[r.fields[0],new Ce(1,[new m(1,[h.message])])]))];case 4:return r.fields[2].tag===1?r.fields[2].fields[0].tag===1?[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})]:[s,(u=r.fields[2].fields[0].fields[0].Outcome,u.tag===1?u.fields[0].RemainingAttempts>0?(r.fields[1]({AttemptsRemaining:u.fields[0].RemainingAttempts}),J()):I(h=>{h(new j(0,[new H(6,[new re(0,[])])]))}):u.tag===5?I(h=>{h(new j(0,[new H(6,[new re(0,[])])]))}):u.tag===2?(r.fields[1]({}),J()):u.tag===3?(r.fields[1]({}),J()):u.tag===4?(r.fields[1]({}),J()):u.tag===6?I(h=>{h(new j(0,[new H(6,[new re(4,[])])]))}):u.tag===7?I(h=>{h(new j(0,[new H(6,[new re(1,[])])]))}):u.tag===8?I(h=>{h(new j(0,[new H(6,[new re(2,[])])]))}):u.tag===9?I(h=>{h(new j(0,[new H(5,[])]))}):u.tag===10?I(h=>{h(new j(0,[new H(6,[new re(0,[])])]))}):I(h=>{h(new j(6,[u.fields[0].AuthCode]))}))]:[s,It(h=>{He(h)},h=>Lv(p,h),r.fields[0],h=>new j(4,[r.fields[0],r.fields[1],new Ce(1,[h])]),h=>new j(4,[r.fields[0],r.fields[1],new Ce(1,[new m(1,[h.message])])]))];case 5:return r.fields[1].tag===1?r.fields[1].fields[0].tag===1?[s,I(h=>{h(new j(0,[new H(6,[new re(5,[])])]))})]:[s,(f=(c=r.fields[1].fields[0].fields[0].Outcome,c.tag===1?new j(0,[new H(6,[new re(2,[])])]):c.tag===4?new j(0,[new H(6,[new re(2,[])])]):c.tag===2?new j(0,[new H(6,[new re(4,[])])]):c.tag===3?new j(0,[new H(6,[new re(1,[])])]):c.tag===5?new j(0,[new H(5,[])]):c.tag===6?new j(0,[new H(6,[new re(0,[])])]):r.fields[0].tag===1?new j(3,[!1,new Ce(0,[])]):r.fields[0].tag===2?new j(6,[void 0]):new j(2,[!1,new Ce(0,[])])),I(h=>{h(f)}))]:[s,It(h=>{He(h)},h=>Vv(p,h),r.fields[0].tag===1?!1:r.fields[0].tag===2,h=>new j(5,[r.fields[0],new Ce(1,[h])]),h=>new j(5,[r.fields[0],new Ce(1,[new m(1,[h.message])])]))];case 6:return t(Le(gl,r.fields[0])),[s,J()];default:return[new ul(s.CssOverrides,r.fields[0],s.Branding,s.JourneyType),J()]}}function zv(e,t,n,r){const s=hi(!1),i=Le(l=>d("span",{className:"font-semibold",children:`${l}`}),cn(l=>l.CompanyName,t)),o=n.tag===1?`Hi, ${e}`:n.tag===2?`${e}, join your workplace benefits program`:n.tag===3?`Hi, ${e}`:n.tag===4?`Hi, ${e}`:`Welcome, ${e}`,a=pe(A(()=>{let l,u;return V((l=n,l.tag===1?_(fi([])):l.tag===2?_(d("div",C(y([["className","sm:w-[700px]"],(u=[d("img",{src:"/workflows/app/app-invite/welcome.png"})],["children",b.Children.toArray(Array.from(u))])])))):l.tag===3?_(fi([])):l.tag===4?_(fi([])):_(fi([]))),A(()=>V(_(hn(o)),A(()=>{let f;return V(_(d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(f=pe(A(()=>{let c;return n.tag===1?V(_(Ee(i,d("span",{children:["Your employer"]}))),A(()=>V(_(d("span",{children:[" has requested additional information from you."]})),A(()=>_(d("p",{children:["Sign in to complete your information request."]})))))):n.tag===2?_((c="Your employer has partnered with Flare Benefits to give you exclusive access to savings and perks from Australia’s most-loved brands, plus special offers to help you save on bigger expenses like household utilities, health insurance and more.",d("p",{children:[c]}))):n.tag===3?_(d("p",{children:["Sign in to set up your benefits."]})):n.tag===4?_(d("p",{children:["Sign in to set up your benefits."]})):V(_(d("p",{children:["Congratulations on the new role!"]})),A(()=>{let p;return _((p=y([d("span",{children:["Sign in to complete your onboarding with "]}),Ee(i,d("span",{children:["your employer"]})),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(p))})))}))})),["children",b.Children.toArray(Array.from(f))])])))),A(()=>_(Xo(void 0,()=>{s[1](!0),r()},s[0],[d("span",{children:[n.tag===1?"Sign in":n.tag===2?"Continue":(n.tag===3||n.tag===4,"Sign in")]})]))))}))))}));return d(Ie,{},...a)}function Hv(e,t){let n,r,s,i;const o=[$p([]),hn("Check your inbox"),d("div",C(y([(n="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",n]),(r=[(s=y([d("span",{children:["We’ve sent a temporary access link to "]}),d("span",{className:"font-semibold",children:$c(e,"*","•")}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(s))})),d("p",{children:["Click the link to confirm your email address and sign in. The link is valid for 5 minutes."]})],["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className","text-sm text-gray-900 whitespace-pre-wrap mt-10 sm:mt-14 space-y-4 leading-5"],(i=pe(A(()=>V(_(d("p",{children:["Can’t see the email? Check your spam folder."]})),A(()=>{const a=t;return a==null?_(ee()):_(rs(a))})))),["children",b.Children.toArray(Array.from(i))])])))];return d(Ie,{},...o)}let on=class extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ResendTimerTick","SignIn","IncorrectOneTimeCodeCallback","SetCodeInvalid","SetCodeInputValue","SetReissueLinkInProgress"]}},Gn=class extends L{constructor(t,n,r,s,i,o){super(),this.AttemptsRemaining=t,this.CodeInvalid=n,this.CodeInputValue=r,this.ResendTimer=s,this.SignInInProgress=i,this.ReissueLinkInProgress=o}};function Gv(){return[new Gn(void 0,!1,"",void 0,!1,!1),J()]}function Yv(e,t,n){let r;switch(t.tag){case 1:{const s=Lo(oa,n.CodeInputValue);return s.length===6?(e([Zo(s,511,!1,32),t.fields[0]]),[new Gn(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,n.ResendTimer,!0,n.ReissueLinkInProgress),J()]):[n,I(i=>{i(new on(3,[!0]))})]}case 2:return[new Gn(t.fields[0],n.CodeInvalid,n.CodeInputValue,n.ResendTimer,n.SignInInProgress,n.ReissueLinkInProgress),I(s=>{s(new on(3,[!0]))})];case 3:{const s=t.fields[0];return[new Gn(n.AttemptsRemaining,s,s?"":n.CodeInputValue,n.ResendTimer,!1,n.ReissueLinkInProgress),J()]}case 4:return[new Gn(n.AttemptsRemaining,n.CodeInvalid,t.fields[0],n.ResendTimer,n.SignInInProgress,n.ReissueLinkInProgress),J()];case 5:return[new Gn(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,n.ResendTimer,n.SignInInProgress,!0),J()];default:{const s=Bi(a=>{He(a)},()=>E.Delay(()=>E.Bind(_i(1e3),()=>E.Return(void 0))),void 0,()=>new on(0,[]));let i;const o=n.ResendTimer;return i=o!=null?o>0?(r=o|0,[r-1,s]):[void 0,J()]:[20,s],[new Gn(n.AttemptsRemaining,n.CodeInvalid,n.CodeInputValue,i[0],n.SignInInProgress,n.ReissueLinkInProgress),i[1]]}}}function Yi(e){e.target.id==="one-time-code-input"||e.key!=="Enter"&&document.getElementById("one-time-code-input").focus()}function qv(){document.addEventListener("keypress",e=>{Yi(e)}),document.addEventListener("paste",e=>{Yi(e)})}const Jv={Dispose(){document.removeEventListener("keypress",e=>{Yi(e)}),document.removeEventListener("paste",e=>{Yi(e)})}};function Zv(e){const t=e.reissueLink,n=e.reissueOneTimeCode,r=e.validateOneTimeCode,s=e.maskedPhone,i=il(()=>Li(Gv,(f,c)=>Yv(r,f,c),(f,c)=>{}),void 0,void 0),o=i[0],a=i[1];Ko(()=>(qv(),Jv),new Array(0));const l=()=>{a(new on(1,[f=>{a(new on(2,[f.AttemptsRemaining]))}]))},u=pe(A(()=>V(_(pp([])),A(()=>V(_(hn("Enter your security code")),A(()=>{let f,c,p;return V(_(d("div",C(y([(f="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",f]),(c=[(p=y([d("span",{children:["We’ve sent a security code to your mobile number ending in •••"]}),d("span",{className:"font-semibold",children:Lo(oa,s)}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(p))})),d("p",{children:["Enter your code to sign in."]})],["children",b.Children.toArray(Array.from(c))])])))),A(()=>{let h;return V(_(d("div",C(y([["className","mt-8 flex relative"],(h=pe(A(()=>{let $;return V(_(d("input",C(y([["className","absolute w-full h-full peer z-10 opacity-0"],["id","one-time-code-input"],["type","text"],["autoComplete","one-time-code"],["maxLength",6],["onClick",g=>{const w=g.target;w.selectionStart=o.CodeInputValue.length|0,w.selectionEnd=o.CodeInputValue.length|0,a(new on(3,[!1]))}],["onChange",g=>{const w=Lo(oa,g.target.value);a(new on(4,[w])),w.length===6&&l()}],($=o.CodeInputValue,["ref",g=>{g!=null&&!O(g.value,$)&&(g.value=$)}])])))),A(()=>Ic(g=>{const w=Le(S=>S,yc(g,o.CodeInputValue.split(""))),v=Le(S=>S,yc(g-1,o.CodeInputValue.split("")));return _(d("div",{key:g,className:ye(" ",pe(A(()=>V(_("flex justify-center items-center text-xl w-10 h-12 rounded-md ring-inset ring-1 transition ease-in"),A(()=>V(o.CodeInvalid?_("ring-red-600"):_("ring-gray-400"),A(()=>V(_(g===2?"mr-4":g===5?"":"mr-2"),A(()=>w!=null||v!=null||g===0?_("peer-focus:ring-2 peer-focus:ring-primary-base"):dr()))))))))),children:Ee(w,"")}))},h0(0,1,5))))})),["children",b.Children.toArray(Array.from(h))])])))),A(()=>{let $;return V(o.CodeInvalid?_(d("p",C(y([["className","w-[288px] text-red-600 mt-2 leading-5"],($=pe(A(()=>V(_("The code you entered is invalid"),A(()=>{let g;return V((g=o.AttemptsRemaining,g==null?_(ee()):_(`, you have ${g} attempts remaining`)),A(()=>V(_("."),A(()=>o.AttemptsRemaining==null?_(" Try again or click on the link below to resend the code."):_(ee())))))})))),["children",b.Children.toArray(Array.from($))])])))):dr(),A(()=>V(_(Xo("sm:w-[288px] mt-6",l,o.SignInInProgress,[d("span",{children:["Continue"]})])),A(()=>{let g;return _(d("div",C(y([["className","mt-8 sm:mt-14 text-sm text-gray-900 whitespace-pre-wrap leading-5 space-y-4"],(g=pe(A(()=>{let w,v;return V((w=o.ResendTimer,w!=null?_(d("p",{children:[`Message sent. Wait ${w} seconds before trying again.`]})):_((v=y([d("span",{children:["Didn’t get the code? "]}),d("span",{className:"text-primary-base underline underline-offset-3 cursor-pointer",onClick:S=>{n(),a(new on(0,[]))},children:"Resend message"}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(v))})))),A(()=>{let S;return _((S=y([d("span",{children:["Still having trouble? "]}),d("span",{className:"text-primary-base underline underline-offset-3 cursor-pointer",onClick:N=>{o.ReissueLinkInProgress||(a(new on(5,[])),t())},children:"Sign in with email instead"}),d("span",{children:["."]})]),d("p",{children:b.Children.toArray(Array.from(S))})))}))})),["children",b.Children.toArray(Array.from(g))])]))))}))))}))}))}))))));return d(Ie,{},...u)}function Xv(e){const t=e.reissueLink,n=e.brandingOption,r=hi(!1),s=pe(A(()=>V(_(gp([])),A(()=>V(_(hn("Access link timed-out")),A(()=>{let i,o;return V(_(d("div",C(y([(i="text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4",["className",i]),(o=[d("p",{children:["Your 5-minute temporary access link has timed-out."]}),d("p",{children:["Get a new link to continue."]})],["children",b.Children.toArray(Array.from(o))])])))),A(()=>V(_(Xo("mt-8 mb-8 sm:mb-14",()=>{r[1](!0),t()},r[0],[d("span",{children:["Get a new link"]})])),A(()=>{const a=n;return a==null?_(ee()):_(rs(a))}))))}))))));return d(Ie,{},...s)}function qi(e,t){const n=Ee(cn(s=>s.CompanyName,e),"your employer"),r=pe(A(()=>V(_(qo([])),A(()=>V(_(hn("You’re all done")),A(()=>{let s;return V(_(d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(s=[d("p",{children:[`Your ${t} is now complete and your pay information has now been submitted to ${n}.`]}),d("p",{children:["You can now close this window."]})],["children",b.Children.toArray(Array.from(s))])])))),A(()=>{const i=e;return i==null?_(ee()):_(rs(i))}))}))))));return d(Ie,{},...r)}function ph(){let e,t,n,r,s,i,o,a,l;return d("div",C(y([["className","flex lg:min-w-[1024px] xl:min-w-[1280px] max-w-screen-xl justify-center"],(e=[d("div",C(y([["className","flex flex-col justify-center items-center"],(t=[qo([]),hn("You’re all set!"),d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(n=[d("p",{children:["Access your exclusive benefits by downloading the Flare app."]}),d("div",C(y([["className","hidden lg:flex justify-center lg:py-8"],(r=[d("img",{className:"h-40",src:"/workflows/app/app-invite/qr.png"})],["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className","flex items-center justify-center lg:hidden"],(s=[d("img",{className:"w-[280px]",src:"/workflows/app/app-invite/completed.png"})],["children",b.Children.toArray(Array.from(s))])]))),d("p",C(y([["className","font-semibold pt-5 lg:pt-0"],(i=[d("span",{className:"lg:hidden",children:"Download the Flare App"}),d("span",{className:"hidden lg:block",children:"Scan to download"})],["children",b.Children.toArray(Array.from(i))])]))),d("p",{children:"Available on iOS and Android"})],["children",b.Children.toArray(Array.from(n))])]))),d("div",C(y([["className","flex space-x-6"],(o=[d("a",C(y([["href","https://apps.apple.com/us/app/flare/id1587276031"],["target","_blank"],["rel","noreferrer"],(a=[d("img",{className:"h-10 cursor-pointer",src:"/workflows/app/app-invite/app-store.png"})],["children",b.Children.toArray(Array.from(a))])]))),d("a",C(y([["href","https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits"],["target","_blank"],["rel","noreferrer"],(l=[d("img",{className:"h-10 cursor-pointer",src:"/workflows/app/app-invite/google-play.png"})],["children",b.Children.toArray(Array.from(l))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(t))])]))),d("img",{className:"hidden lg:block w-[640px]",src:"/workflows/app/app-invite/completed.png"})],["children",b.Children.toArray(Array.from(e))])])))}function $h(){let e;const t=[qo([]),hn("You’re all done"),d("div",C(y([["className","text-base sm:text-lg text-gray-900 whitespace-pre-wrap leading-6 sm:leading-8 space-y-3 sm:space-y-4 mb-8 sm:mb-14"],(e=[d("p",{children:["You’ve finished setting up your benefits."]}),d("p",{children:["You can now close this window."]})],["children",b.Children.toArray(Array.from(e))])]))),rs(new al("Flare",void 0,new ol("support@flarehr.com",void 0)))];return d(Ie,{},...t)}function Kv(e){const t=e.startAuthCodeExchangeBackground,n=e.navigateAuthCodeExchangePage,r=e.magicLink,s=il(()=>Li(jv,(l,u)=>Uv(r,n,t,l,u),(l,u)=>{}),void 0,void 0),i=s[0],o=s[1],a=pe(A(()=>V(ke(l=>d("style",{children:[l]}),i.CssOverrides),A(()=>{const l=i.Page;switch(l.tag){case 1:return _(zv(l.fields[0],i.Branding,i.JourneyType,()=>{o(new j(5,[l.fields[1],new Ce(0,[])]))}));case 2:return _(Hv(l.fields[0],i.Branding));case 3:return _(d(Zv,{maskedPhone:l.fields[0],validateOneTimeCode:u=>{o(new j(4,[u[0],u[1],new Ce(0,[])]))},reissueOneTimeCode:()=>{o(new j(3,[!0,new Ce(0,[])]))},reissueLink:()=>{o(new j(2,[!0,new Ce(0,[])]))}}));case 4:return _(d(Xv,{brandingOption:Qs(i.Branding),reissueLink:()=>{o(new j(2,[!1,new Ce(0,[])]))}}));case 5:switch(i.JourneyType.tag){case 1:return _(qi(i.Branding,"information request"));case 2:return _(ph());case 3:case 4:return _($h());default:return _(qi(i.Branding,"onboarding"))}case 6:return l.fields[0].tag===1?_(jp()):l.fields[0].tag===0?_(d(Wp,{reissueMagicLink:()=>{o(new j(2,[!0,new Ce(0,[])]))}})):l.fields[0].tag===5?_(ta()):l.fields[0].tag===2?_(Mc(i.Branding)):l.fields[0].tag===3?_(Up(i.Branding)):_(zp(i.Branding));default:return _(xp)}}))));return d(Ie,{},...a)}function Qv(e){let t,n,r;const s=e.startAuthCodeExchangeBackground,i=e.navigateAuthCodeExchangePage,o=e.inviteCode;return pr(()=>{qt(0)}),d("div",C(y([(t="min-h-full flex flex-col items-center justify-between w-full mx-auto text-center pt-8 sm:pt-20 pb-6 sm:pb-8 px-4 bg-white",["className",t]),(n=[d("div",C(y([["className","flex flex-col items-center justify-center sm:max-w-[640px]"],(r=pe(A(()=>{const a=$2(o);return a.tag===0?_(d(Kv,{magicLink:a.fields[0],navigateAuthCodeExchangePage:i,startAuthCodeExchangeBackground:s})):_(Mc(void 0))})),["children",b.Children.toArray(Array.from(r))])]))),ra],["children",b.Children.toArray(Array.from(n))])])))}class W extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Home","LegacyInvite","InviteV2","AuthCodeExchange","AuthCodeExchangeWithCurrentAuth","NotFound","LoggedOut"]}}function eb(e){let t,n,r;if(M(e))t=2;else if(k(e)==="workflows")if(M(P(e)))t=2;else switch(k(P(e))){case"app":{t=0,n=P(P(e));break}case"embed":{M(P(P(e)))?t=2:k(P(P(e)))==="v1.0"?(t=1,r=P(P(P(e)))):t=2;break}default:t=2}else t=2;switch(t){case 0:return new pa(1,[n]);case 1:return new pa(0,[r]);default:return new pa(2,[void 0])}}function tb(e){const t=wn(e);if(t!=null)return Le(r=>r[1],es(r=>r[0]==="code",t))}function gh(e){let t,n,r,s,i,o,a;const l=eb(e);switch(l.tag){case 1:return[M(l.fields[0])?M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):(t=wn(k(l.fields[0])),t!=null?M(t)?M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):k(t)[0]==="invite"?M(P(t))?M(P(l.fields[0]))?(n=k(t)[1],r=zc(n),r.tag===1?new W(5,[]):new W(1,[])):M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[])):M(l.fields[0])?new W(0,[]):(s=wn(k(l.fields[0])),s!=null?M(s)?new W(0,[]):k(s)[0]==="invite-code"?M(P(s))?M(P(l.fields[0]))?(i=k(s)[1],new W(2,[i])):new W(0,[]):new W(0,[]):new W(0,[]):new W(0,[]))),new Tr(1,[])];case 2:return[new W(5,[]),new Tr(2,[])];default:return[M(l.fields[0])?new W(0,[]):M(P(l.fields[0]))?new W(0,[]):(o=tb(k(P(l.fields[0]))),o!=null?M(P(P(l.fields[0])))?(a=o,new W(3,[gl(a)])):new W(0,[]):new W(0,[])),new Tr(0,[])]}}let Yn=class extends L{constructor(t,n,r){super(),this.CurrentPage=t,this.Credentials=n,this.AppMode=r}},bn=class extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UrlChanged","NavigateAuthCodeExchangePage","NavigateAuthCodeExchangePageWithCurrentAuth","AuthMsg","StartAuthCodeExchangeBackground","DisplayLoggedOut"]}};function nb(){let e;return pr(()=>{qt(0)}),d("div",C(y([["className","w-full sm:max-w-md mt-5 mx-1 text-center mx-auto"],(e=[d("h4",{className:"text-2xl",children:"You have been logged out of your onboarding due to inactivity"}),d("br",{}),d("p",{children:["To continue your onboarding, please find your onboarding invite email and click the link again."]})],["children",b.Children.toArray(Array.from(e))])])))}class ks extends Error{}ks.prototype.name="InvalidTokenError";function rb(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function sb(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return rb(t)}catch{return atob(t)}}function ib(e,t){if(typeof e!="string")throw new ks("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new ks(`Invalid token specified: missing part #${n+1}`);let s;try{s=sb(r)}catch(i){throw new ks(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new ks(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function ob(e,t,n){e:for(;;){const r=e,s=t,i=n;if(M(i)){const o=r;return o.tag===1?new m(1,[o.fields[0]]):new m(0,[cr(o.fields[0])])}else{let o;const a=s(k(i));if(a.tag===1)o=new m(1,[a.fields[0]]);else{const l=r;o=l.tag===1?new m(1,[l.fields[0]]):new m(0,[et(a.fields[0],l.fields[0])])}if(o.tag===1)return o;e=o,t=s,n=P(i);continue e}}}function ab(e,t){return ob(new m(0,[ce()]),e,t)}function Or(e){return ab(t=>t,e)}class lb extends L{constructor(t,n,r){super(),this.CompanyName=t,this.Logo=n,this.Support=r}}function ub(){return ue("Workflows.Business.Aggregates.CommonDto.InviteBrandingDto",[],lb,()=>[["CompanyName",Z(z)],["Logo",Z(z)],["Support",Z(fb())]])}class cb extends L{constructor(t,n){super(),this.Email=t,this.Phone=n}}function fb(){return ue("Workflows.Business.Aggregates.CommonDto.SupportDto",[],cb,()=>[["Email",Z(z)],["Phone",Z(z)]])}function db(e){let t;const n=e.Email;if(n!=null){const r=Yc(n);t=r.tag===1?new m(1,[r.fields[0]]):new m(0,[r.fields[0]])}else t=new m(0,[void 0]);if(t.tag===1)return new m(1,[t.fields[0]]);{let r;const s=e.Phone;if(s!=null){const i=qc(s);r=i.tag===1?new m(1,[i.fields[0]]):new m(0,[i.fields[0]])}else r=new m(0,[void 0]);return r.tag===1?new m(1,[r.fields[0]]):new m(0,[new Gc(t.fields[0],r.fields[0])])}}function hb(e){let t;const n=e.Logo;if(n!=null){const r=Zc(n);t=r.tag===1?new m(1,[r.fields[0]]):new m(0,[r.fields[0]])}else t=new m(0,[void 0]);if(t.tag===1)return new m(1,[t.fields[0]]);{let r;const s=e.CompanyName;if(s!=null){const i=Jc(s);r=i.tag===1?new m(1,[i.fields[0]]):new m(0,[i.fields[0]])}else r=new m(0,[void 0]);if(r.tag===1)return new m(1,[r.fields[0]]);{let i;const o=e.Support;if(o!=null){const a=db(o);i=a.tag===1?new m(1,[a.fields[0]]):new m(0,[a.fields[0]])}else i=new m(0,[void 0]);return i.tag===1?new m(1,[i.fields[0]]):new m(0,[new Hc(r.fields[0],t.fields[0],i.fields[0])])}}}class mb extends L{constructor(t,n,r,s){super(),this.Code=t,this.DateIssued=n,this.NumberOfAttempts=r|0,this.DateOfLastAttempt=s}}function pb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Invite.Dto.SecondFactorDto",[],mb,()=>[["Code",z],["DateIssued",Gt("System.DateTime")],["NumberOfAttempts",Ks],["DateOfLastAttempt",Z(Gt("System.DateTime"))]])}function $b(e){return new b$(v$(e.Code),e.DateIssued,e.NumberOfAttempts,e.DateOfLastAttempt)}class gb extends L{constructor(t,n,r,s){super(),this.Code=t,this.DateIssued=n,this.SecondFactor=r,this.Branding=s}}function wb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Invite.Dto.InviteDto",[],gb,()=>[["Code",z],["DateIssued",Gt("System.DateTime")],["SecondFactor",Z(pb())],["Branding",Z(ub())]])}function yb(e){const t=zc(e.Code);if(t.tag===1)return new m(1,[t.fields[0]]);{let n;const r=e.SecondFactor;n=r==null?void 0:$b(r);let s;const i=e.Branding;if(i!=null){const o=hb(i);s=o.tag===1?new m(1,[o.fields[0]]):new m(0,[o.fields[0]])}else s=new m(0,[void 0]);return s.tag===1?new m(1,[s.fields[0]]):new m(0,[new C$(t.fields[0],e.DateIssued,n,s.fields[0])])}}class _b extends L{constructor(t,n,r){super(),this.Id=t,this.DisplayName=n,this.ComponentTagName=r}}function vb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessStepConfigDto",[],_b,()=>[["Id",z],["DisplayName",z],["ComponentTagName",z]])}function bb(e){return new m(0,[new Rt(Xc(e.Id),e.DisplayName,e.ComponentTagName)])}function Cb(e){return Or(tt(bb,e))}class Sb extends L{constructor(t,n){super(),this.ActivatedDates=t,this.CompletedSteps=n}}function kb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ActiveProcessInstanceDto",[],Sb,()=>[["ActivatedDates",un(Gt("System.DateTime"))],["CompletedSteps",un(Lm(z,Gt("System.DateTime")))]])}function xb(e){const t=Or(tt(n=>new m(0,[[Xc(n[0]),n[1]]]),e.CompletedSteps));return t.tag===1?new m(1,[t.fields[0]]):new m(0,[new pf(e.ActivatedDates,t.fields[0])])}class Ib extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Inactive","Active","Complete","Abandoned"]}}function Ab(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessInstanceStatusDto",[],Ib,()=>[[],[["Item",kb()]],[["Item",Gt("System.DateTime")]],[["Item",Gt("System.DateTime")]]])}function Eb(e){switch(e.tag){case 1:{const t=xb(e.fields[0]);return t.tag===1?new m(1,[t.fields[0]]):new m(0,[new us(1,[t.fields[0]])])}case 2:return new m(0,[new us(2,[e.fields[0]])]);case 3:return new m(0,[new us(3,[e.fields[0]])]);default:return new m(0,[new us(0,[])])}}class Tb extends L{constructor(t,n,r){super(),this.Id=t,this.Name=n,this.Steps=r}}function Pb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessConfigDto",[],Tb,()=>[["Id",Gt("System.Guid")],["Name",z],["Steps",un(vb())]])}function Mb(e){const t=Cb(e.Steps);if(t.tag===1)return new m(1,[t.fields[0]]);{const n=I$(e.Id);return n.tag===1?new m(1,[n.fields[0]]):new m(0,[new Ne(n.fields[0],e.Name,t.fields[0])])}}class Ob extends L{constructor(t,n){super(),this.Name=t,this.Value=n}}function Db(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.TagDto",[],Ob,()=>[["Name",z],["Value",z]])}function Nb(e){return D$(e.Name,e.Value)}class Rb extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["WhenEnabled","Always"]}}function Bb(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.Dto.BenefitsOnboardingShowOptionsDto",[],Rb,()=>[[],[]])}class Lb extends L{constructor(t){super(),this.BenefitsOnboarding=t}}function Vb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.StepsConfigurationDto",[],Lb,()=>[["BenefitsOnboarding",Z(Qe(["Show",Bb()]))]])}function Fb(e){let t,n;return new R$((t=e.BenefitsOnboarding,t==null?void 0:(n=t,{Show:n.Show.tag===1?new wf(1,[]):new wf(0,[])})))}class Wb extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Default","InfoRequest","AppInvite","BenefitsExisting","BenefitsOnboarding"]}}function jb(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.Dto.JourneyTypeDto",[],Wb,()=>[[["Item",xs()]],[["Item",xs()]],[["Item",xs()]],[["Item",xs()]],[["Item",xs()]]])}class Ub extends L{constructor(t){super(),this.Category=t}}function xs(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.JourneyTypeDetailsDto",[],Ub,()=>[["Category",Z(z)]])}function Is(e){return new gf(e.Category)}function zb(e){if(e==null)return new gr(0,[new gf(void 0)]);switch(e.tag){case 1:{const t=e.fields[0];return new gr(1,[Is(t)])}case 2:{const t=e.fields[0];return new gr(2,[Is(t)])}case 3:{const t=e.fields[0];return new gr(3,[Is(t)])}case 4:{const t=e.fields[0];return new gr(4,[Is(t)])}default:{const t=e.fields[0];return new gr(0,[Is(t)])}}}class Hb extends L{constructor(t,n,r,s,i,o,a,l,u,f,c){super(),this.Id=t|0,this.DateCreated=n,this.Configuration=r,this.Status=s,this.Invite=i,this.Tags=o,this.Creator=a,this.StepsConfiguration=l,this.JourneyType=u,this.IsBenefitsStepEnabled=f,this.PaySetupComplete=c}}function wh(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.Dto.ProcessInstanceDto",[],Hb,()=>[["Id",Ks],["DateCreated",Gt("System.DateTime")],["Configuration",Pb()],["Status",Ab()],["Invite",Z(wb())],["Tags",Z(un(Db()))],["Creator",Z(z)],["StepsConfiguration",Z(Vb())],["JourneyType",Z(jb())],["IsBenefitsStepEnabled",Z(ht)],["PaySetupComplete",Z(ht)]])}function yh(e){let t,n;const r=Mb(e.Configuration);if(r.tag===1)return new m(1,[r.fields[0]]);{const s=r.fields[0],i=Eb(e.Status);if(i.tag===1)return new m(1,[i.fields[0]]);{const o=i.fields[0];let a;if(o.tag===1){const l=o.fields[0],u=Or(tt(f=>{const c=[f[0],f[1]],p=c[0];return Cc(h=>O(h.Id,p),s.Steps)?new m(0,[[p,c[1]]]):new m(1,["Step id is not configured for this Process Instance."])},l.CompletedSteps));a=u.tag===1?new m(1,[u.fields[0]]):new m(0,[new us(1,[new pf(l.ActivatedDates,u.fields[0])])])}else a=new m(0,[o]);if(a.tag===1)return new m(1,[a.fields[0]]);{let l;const u=e.Invite;if(u!=null){const f=yb(u);l=f.tag===1?new m(1,[f.fields[0]]):new m(0,[f.fields[0]])}else l=new m(0,[void 0]);if(l.tag===1)return new m(1,[l.fields[0]]);{let f;const c=e.Tags;if(c!=null){const p=Or(tt(Nb,c));f=p.tag===1?new m(1,[p.fields[0]]):new m(0,[p.fields[0]])}else f=new m(0,[void 0]);return f.tag===1?new m(1,[f.fields[0]]):new m(0,[new N$($f(e.Id),s,e.DateCreated,a.fields[0],l.fields[0],f.fields[0],(t=e.Creator,t==null?void 0:jc(t)),(n=e.StepsConfiguration,n==null?void 0:Fb(n)),zb(e.JourneyType),e.IsBenefitsStepEnabled,e.PaySetupComplete)])}}}}}class As extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["CompleteStep","CompleteStepV2","Complete","ViewPaySetupPage","CompletePaySetup","ResumePaySetup"]}}class Gb extends L{constructor(t,n,r,s){super(),this.CssOverrides=t,this.ProcessInstance=n,this.IsBenefitsEnabled=r,this.Branding=s}}class qn extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["CompleteStep","CompleteStepV2","Complete","ViewPaySetupPage","CompletePaySetup","ResumePaySetup"]}}function Yb(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.ProcessInstanceCommandDto",[],qn,()=>[[["Item",z]],[["Item",z]],[],[["Item",ht]],[["Item",ht]],[["Item",ht]]])}function qb(e){switch(e.tag){case 1:return new qn(1,[ls(e.fields[0])]);case 2:return new qn(2,[]);case 3:return new qn(3,[e.fields[0]]);case 4:return new qn(4,[e.fields[0]]);case 5:return new qn(5,[e.fields[0]]);default:return new qn(0,[ls(e.fields[0])])}}const Jb=yh;class Zb extends L{constructor(t,n,r,s){super(),this.CssOverrides=t,this.ProcessInstanceDto=n,this.IsBenefitsEnabled=r,this.Branding=s}}function Xb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.ProcessInstanceContextDto",[],Zb,()=>[["CssOverrides",un(z)],["ProcessInstanceDto",wh()],["IsBenefitsEnabled",ht],["Branding",Z(Qb())]])}class Kb extends L{constructor(t,n,r){super(),this.CompanyName=t,this.Logo=n,this.Support=r}}function Qb(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.Branding",[],Kb,()=>[["CompanyName",Z(z)],["Logo",Z(z)],["Support",Z(tC())]])}class eC extends L{constructor(t,n){super(),this.Email=t,this.Phone=n}}function tC(){return ue("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Read.Support",[],eC,()=>[["Email",Z(z)],["Phone",Z(z)]])}function nC(e){let t,n,r,s,i,o,a,l,u,f,c,p,h,$,g,w,v,S;return new Hc((t=(n=(r=e.CompanyName,r==null?void 0:Jc(r)),n!=null?(s=n,s.tag===1?new m(1,[s.fields[0]]):new m(0,[s.fields[0]])):new m(0,[void 0])),t.tag===1?void 0:t.fields[0]),(i=(o=(a=e.Logo,a==null?void 0:Zc(a)),o!=null?(l=o,l.tag===1?new m(1,[l.fields[0]]):new m(0,[l.fields[0]])):new m(0,[void 0])),i.tag===1?void 0:i.fields[0]),(u=e.Support,u==null?void 0:(f=u,new Gc((c=(p=(h=f.Email,h==null?void 0:Yc(h)),p!=null?($=p,$.tag===1?new m(1,[$.fields[0]]):new m(0,[$.fields[0]])):new m(0,[void 0])),c.tag===1?void 0:c.fields[0]),(g=(w=(v=f.Phone,v==null?void 0:qc(v)),w!=null?(S=w,S.tag===1?new m(1,[S.fields[0]]):new m(0,[S.fields[0]])):new m(0,[void 0])),g.tag===1?void 0:g.fields[0])))))}function rC(e){let t,n;return new Gb(e.CssOverrides,(t=yh(e.ProcessInstanceDto),t.tag===1?(()=>{throw new Error(t.fields[0])})():t.fields[0]),e.IsBenefitsEnabled,(n=e.Branding,n==null?void 0:nC(n)))}class Dr extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["WorkflowInstanceStepActivated","BenefitsStepActivated","BenefitsStepCompleted"]}}function sC(){return yt("Workflows.Business.Aggregates.ProcessInstanceList.ApiDto.Backend.Write.WorkflowAnalyticsEventDto",[],Dr,()=>[[["Item",z]],[],[]])}class an extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}class Se extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PersonalDetails","EmergencyContacts","Bank","Tax","Super","WorkplaceLinking","BenefitsOnboarding","WorkplacePolicies","DiscreteBenefits"]}}class Es extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Hidden","Incomplete","Complete"]}}function yl(e){return e?new Es(1,[]):new Es(0,[])}class ie extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Completed","Disabled","Active","Locked","CompletedAndDisabled"]}}function _h(e){return O(e,Ye)?new m(0,[new Se(0,[])]):O(e,mt)?new m(0,[new Se(1,[])]):O(e,pt)?new m(0,[new Se(2,[])]):O(e,$t)?new m(0,[new Se(3,[])]):O(e,Oe)?new m(0,[new Se(4,[])]):O(e,On)?new m(0,[new Se(5,[])]):O(e,Yt)?new m(0,[new Se(7,[])]):O(e,Dn)?new m(0,[new Se(8,[])]):new m(1,["Invalid step"])}function vh(e){switch(e.tag){case 1:return mt;case 2:return pt;case 3:return $t;case 4:return Oe;case 5:return On;case 6:return as;case 7:return Yt;case 8:return Dn;default:return Ye}}function bh(e){switch(e.tag){case 1:return"Emergency contacts";case 2:return"Bank details";case 3:return"Tax declaration";case 4:return"Super nomination";case 5:return On.DisplayName;case 6:return"Workplace benefits";case 7:return"Fair Work";case 8:return Dn.DisplayName;default:return"Employee profile"}}function Ch(e){switch(e.tag){case 1:return"Contacts";case 2:return"Bank";case 3:return"Tax";case 4:return"Super";case 5:return On.DisplayName;case 6:return"Benefits";case 7:return"Fair Work";case 8:return Dn.DisplayName;default:return"Profile"}}function Sh(e){switch(e.tag){case 1:return mt;case 2:return pt;case 3:return $t;case 4:return Oe;case 5:return On;case 6:return as;case 7:return Yt;case 8:return Dn;default:return Ye}}function iC(e){switch(e.tag){case 5:case 6:case 8:return!1;default:return!0}}function oC(e,t){return e.tag===0?t:vt(t,I(new Se(6,[])))}class Nr extends L{constructor(t,n){super(),this.Id=t,this.Status=n}}function Jn(e){return bh(e.Id)}function aC(e){return Ch(e.Id)}function lC(e){return Sh(e.Id).ComponentTagName}function uC(e){return Sh(e.Id).Id}function cC(e){return iC(e.Id)}function fC(e){if(e.Id.tag===0)return e}function dC(e){if(e.Id.tag===1)return e}function hC(e){return es(t=>O(t.Status,new ie(2,[])),e)}function mC(e){return((n,r)=>{e:for(;;){const s=n,i=r;if(M(s))return i;if(O(k(s).Status,new ie(2,[])))return Wo([i,I(k(s)),P(s)]);if(O(k(s).Status,new ie(1,[])))return Wo([i,I(new Nr(k(s).Id,new ie(2,[]))),P(s)]);n=P(s),r=vt(i,I(k(s)));continue e}})(e,ce())}function _l(e,t){const n=Ee(e.PaySetupComplete,!1);let r;const s=Or(tt(_h,e.Configuration.Steps));if(r=s.tag===1?new m(1,[s.fields[0]]):new m(0,[oC(t,s.fields[0])]),r.tag===1)return new m(1,[r.fields[0]]);{const i=Or(tt(_h,L$(e)));return i.tag===1?new m(1,[i.fields[0]]):new m(0,[mC(tt(o=>n&&cC(o)&&O(o.Status,new ie(0,[]))?new Nr(o.Id,new ie(4,[])):o,tt(o=>Cc(a=>O(a,o.Id),i.fields[0])?new Nr(o.Id,new ie(0,[])):o,tt(o=>O(o.Id,new Se(6,[]))&&!n?new Nr(o.Id,new ie(3,[])):o,tt(o=>new Nr(o,new ie(1,[])),r.fields[0])))))])}}class kh extends L{constructor(t,n,r,s,i,o,a,l,u,f,c){super(),this.AppMode=t,this.JourneyType=n,this.Branding=r,this.IsBenefitsStepEnabled=s,this.IsPaySetupCompatible=i,this.IsPaySetupComplete=o,this.Status=a,this.ProcessInstanceId=l,this.InstanceName=u,this.ProcessConfigId=f,this.Steps=c}}function xh(e){switch(e.Status.tag){case 3:return!1;case 0:return!1;case 1:return Ee(e.PaySetupComplete,!1);default:return!0}}function pC(e,t){let n;const r=[t.ProcessInstance,yl(t.IsBenefitsEnabled)];return n=_l(r[0],r[1]),n.tag===1?new m(1,[n.fields[0]]):new m(0,[new kh(e,t.ProcessInstance.JourneyType,t.Branding,t.IsBenefitsEnabled,x$(t.ProcessInstance.Configuration),xh(t.ProcessInstance),t.ProcessInstance.Status,t.ProcessInstance.Id,t.ProcessInstance.Configuration.Name,t.ProcessInstance.Configuration.Id,n.fields[0])])}function $C(e,t){let n;const r=[t,yl(e.IsBenefitsStepEnabled)];return n=_l(r[0],r[1]),n.tag===1?new m(1,[n.fields[0]]):new m(0,[new kh(e.AppMode,e.JourneyType,e.Branding,e.IsBenefitsStepEnabled,e.IsPaySetupCompatible,xh(t),t.Status,e.ProcessInstanceId,e.InstanceName,e.ProcessConfigId,n.fields[0])])}class Tt extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialising","Loaded","Error"]}}function vl(e,t){const n=e;if(n.tag===1)return new Tt(2,[n.fields[0]]);switch(t.tag){case 2:return t;case 0:return t;default:{const r=$C(t.fields[0],n.fields[0]);return r.tag===1?new Tt(2,[r.fields[0]]):new Tt(1,[r.fields[0]])}}}let fe=class extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Initialising","StepList","Step","PaySetupCompleteConfirmation","Oops","AllDone"]}};class U extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Activate","ActivateCallback","ChangeCurrentView","CloseStepListView","StepCompletionEventCallback","CompleteStep","ConfirmPaySetupComplete","ResumePaySetup","CompletePaySetup","PaySetupCompleted","CompleteWorkflow","ShowAllDoneAndNotifyComplete","SendAnalyticsEvent","AppendTrailingSlashToUrl","CompleteBenefitsOnboardingStep","CommandSuccess","CommandFailure"]}}class nt extends L{constructor(t,n,r,s,i,o){super(),this.ProfileId=t,this.ProcessInstanceId=n,this.WorkflowDetail=r,this.CurrentView=s,this.CssOverrides=i,this.BenefitsOnboarding=o}}function bl(e){switch(e.tag){case 1:return"Information request";case 2:return"Workflow";case 3:return"Benefits Onboarding";case 4:return"Benefits Onboarding";default:return"Onboarding"}}function Cl(e){if(e<640)return Ae(void 0)}function Sl(e){return((n,r)=>{e:for(;;){const s=n,i=r;let o,a,l,u;if(M(s))o=0;else{const f=fC(k(s));if(f!=null)if(M(P(s)))o=2;else{const c=dC(k(P(s)));c!=null?(o=1,a=c,l=f,u=P(P(s))):o=2}else o=2}switch(o){case 0:return i;case 1:{n=u,r=vt(i,I(O(a.Status,new ie(2,[]))?new Nr(l.Id,new ie(2,[])):l));continue e}default:if(M(s))throw new Error("Match failure");n=P(s),r=vt(i,I(k(s)));continue e}}})(e,ce())}function Ts(e){let t,n;return d("div",C(y([(t="absolute inset-0 min-h-full flex flex-col items-center justify-between w-full mx-auto text-center pt-8 sm:pt-20 pb-6 sm:pb-8 px-4 bg-white",["className",t]),(n=[d("div",{className:"mt-5 px-4 flex flex-col items-center justify-center sm:max-w-[640px]",children:b.Children.toArray([e])}),ra],["children",b.Children.toArray(Array.from(n))])])))}function gC(e,t){let n;const r=e.tag===2?e.fields[0]:void 0;let s;if(r==null)s=void 0;else{const u=r;s=cn(f=>L1(f+1,t.Steps),ui(f=>O(u,f),t.Steps))}const i=Le(u=>new U(2,[new fe(2,[u])]),es(u=>O(u.Status,new ie(2,[])),t.Steps));let o,a,l;switch(r!=null&&s!=null?(n=s,O(r.Status,new ie(2,[]))&&(O(n.Status,new ie(1,[]))?!0:O(n.Status,new ie(3,[])))?(o=0,a=r):(o=1,l=s)):o=2,o){case 0:return new U(2,[new fe(2,[a])]);case 1:return O(l.Status,new ie(3,[]))?void 0:new U(2,[new fe(2,[l])]);default:return i}}function wC(e,t){const n=e.IsPaySetupCompatible&&!e.IsPaySetupComplete&&lr(e.Steps)!==1;let r;if(n)switch(t.tag){case 1:case 0:{r=0;break}default:r=1}else r=1;switch(r){case 0:return new U(6,[{Branding:Qs(e.Branding),InjectedBenefits:e.IsBenefitsStepEnabled}]);default:return}}function yC(e){if(ua(e.Status))return new U(11,[e])}function kl(e,t,n){return Ee(Ku(Ku(yC(t),gC(e,t)),wC(t,n)),new U(10,[new an(0,[])]))}function _C(e){const t=$r(e)|0;return je(We("%s/workflows/backend/%i"))(jn)(t)}function vC(e){const t=$r(e)|0;return je(We("%s/workflows/backend/process-instances/%i/activate"))(jn)(t)}function bC(e){const t=$r(e)|0;return je(We("%s/workflows/backend/process-instances/%i/analytics-events"))(jn)(t)}function xl(e,t){return E.Delay(()=>{const n=Hi(z2(je(We("Bearer %s"))(e)),t);let r;const s=vs(n);return r=E.Bind(s,i=>E.Return(new m(0,[i]))),E.Bind(r,i=>{const o=i;if(o.tag===1)return E.Return(new m(1,[o.fields[0]]));{const a=o.fields[0];if(a.statusCode===429||a.statusCode>=500){const l=vs(n);return E.Bind(l,u=>E.Return(new m(0,[u])))}else return E.Return(new m(0,[a]))}})})}function Ps(e,t,n){return E.Delay(()=>{let r,s;const i=xl(n,(r=yn(new Qt(1,[(s=I(qb(e)),_n(0,vn(un(Yb()),new Ge(1,[]),void 0,void 0)(s)))]),tn(new Ft(1,[]),en(_C(t)))),Hi($l("application/json"),r)));return E.Bind(i,o=>{const a=o;if(a.tag===1)return E.Return(new m(1,[a.fields[0]]));{const l=a.fields[0];if(l.statusCode===200){let u;const f=rn(te(sn(wh(),new Ge(1,[]))),l.responseText);return u=f.tag===1?new m(1,[f.fields[0]]):Jb(f.fields[0]),E.Return(u)}else return E.Return(new m(1,["Unexpected response from backend"]))}})})}function CC(e,t){return E.Delay(()=>{const n=xl(t,tn(new Ft(1,[]),en(vC(e))));return E.Bind(n,r=>{const s=r;if(s.tag===1)return E.Return(new m(1,[s.fields[0]]));{const i=s.fields[0];if(i.statusCode===200){let o;const a=rn(te(sn(Xb(),new Ge(1,[]))),i.responseText);return o=a.tag===1?new m(1,[a.fields[0]]):new m(0,[rC(a.fields[0])]),E.Return(o)}else return E.Return(new m(1,["Unexpected response from backend"]))}})})}function SC(e,t,n){let r;const s=E.Delay(()=>{let i;return xl(e,(i=yn(new Qt(1,[_n(0,vn(un(sC()),new Ge(1,[]),void 0,void 0)(I(n)))]),tn(new Ft(1,[]),en(bC(t)))),Hi($l("application/json"),i)))});return r=E.Bind(s,i=>{let o;const a=i;return o=a.tag===1?new m(1,[a.fields[0]]):new m(0,[void a.fields[0]]),E.Return(o)}),E.Bind(r,i=>{const o=i;return o.tag===1||o.fields[0],E.Return()})}function kC(e,t){return CC(e,t)}function xC(e,t,n){return Ps(new As(1,[t]),e,n)}function IC(e,t,n){return Ps(new As(3,[n]),e,t)}function AC(e,t,n){return Ps(new As(4,[n]),e,t)}function EC(e,t,n){return Ps(new As(5,[n]),e,t)}function TC(e,t){return Ps(new As(2,[]),e,t)}function PC(e){const t=ib(e);return[new nt(jc(t.sub),$f(t.workflow.instanceId),new Tt(0,[]),new fe(0,[]),ce(),new Es(0,[])),I(n=>{n(new U(0,[]))})]}function MC(e,t,n,r,s){let i,o,a,l,u,f,c,p,h,$,g,w,v,S,N,K,Q,xe,rt,Re,Be,Xe;switch(r.tag){case 1:{const T=r.fields[0];let Y;switch(T.tag){case 3:{Y=[s,(i=new U(2,[new fe(4,[T.fields[0].message])]),I(le=>{le(i)}))];break}case 0:case 1:{Y=[s,J()];break}default:{let le;const st=T.fields[0];if(st.tag===1)le=new m(1,[st.fields[0]]);else{const _e=st.fields[0],Zn=yl(_e.IsBenefitsEnabled);let Qi;const Fh=[_e.ProcessInstance,Zn];if(Qi=_l(Fh[0],Fh[1]),Qi.tag===1)le=new m(1,[Qi.fields[0]]);else{const Wh=Qi.fields[0],Ml=pC(n,_e);le=Ml.tag===1?new m(1,[Ml.fields[0]]):new m(0,[(o=Ml.fields[0],a=ua(_e.ProcessInstance.Status),l=hC(Wh),l==null?o.IsPaySetupComplete?a?[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(1,[o]),new fe(5,[]),_e.CssOverrides,Zn),J()]:(qt(0),[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(1,[o]),new fe(5,[]),_e.CssOverrides,Zn),I(Os=>{Os(new U(10,[new an(0,[])]))})]):[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(1,[o]),new fe(3,[]),_e.CssOverrides,Zn),J()]:(u=(f=l,c=dl.clientWidth,p=lr(Wh)|0,p===1?(document.title=Jn(f),new fe(2,[f])):Cl(c)!=null?new fe(1,[]):new fe(2,[f])),[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(1,[o]),u,_e.CssOverrides,Zn),u.tag===2?(h=vh(u.fields[0].Id),O(h.Id,as.Id)?I(Os=>{Os(new U(12,[s.ProcessInstanceId,new Dr(1,[])]))}):($=new U(12,[s.ProcessInstanceId,new Dr(0,[ls(h.Id)])]),I(Os=>{Os($)}))):J()]))])}}Y=le.tag===1?[s,I(_e=>{_e(new U(2,[new fe(4,[le.fields[0]])]))})]:le.fields[0]}}return[Y[0],Y[1]]}case 2:{const T=r.fields[0];return[new nt(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,T,s.CssOverrides,s.BenefitsOnboarding),T.tag===2?(g=vh(T.fields[0].Id),O(g.Id,as.Id)?I(Y=>{Y(new U(12,[s.ProcessInstanceId,new Dr(1,[])]))}):(w=new U(12,[s.ProcessInstanceId,new Dr(0,[ls(g.Id)])]),I(Y=>{Y(w)}))):J()]}case 3:{const T=s.WorkflowDetail;if(T.tag===1){const Y=kl(s.CurrentView,T.fields[0],s.BenefitsOnboarding);return[s,I(le=>{le(Y)})]}else return[s,J()]}case 12:return He(SC(t,r.fields[0],r.fields[1])),[s,J()];case 4:{const T=s.WorkflowDetail;return T.tag===1?[s,(v=r.fields[0].target,S=es(Y=>m1(lC(Y),v.tagName,5)===0,T.fields[0].Steps),S==null?J():O(S.Id,new Se(6,[]))?I(Y=>{Y(new U(14,[]))}):(N=S,K=new U(5,[uC(N),new an(0,[])]),I(Y=>{Y(K)})))]:[s,J()]}case 14:{let T;switch(s.WorkflowDetail.tag===1?O(s.BenefitsOnboarding,new Es(0,[]))?T=1:T=0:T=1,T){case 0:return[new nt(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,s.CurrentView,s.CssOverrides,new Es(2,[])),f0(y([I(Y=>{Y(new U(12,[s.ProcessInstanceId,new Dr(2,[])]))}),I(Y=>{Y(new U(10,[new an(0,[])]))}),I(Y=>{Y(new U(2,[new fe(5,[])]))})]))];default:return[s,J()]}}case 5:{const T=r.fields[0],Y=r.fields[1];switch(Y.tag){case 1:return[s,J()];case 2:{const le=Y.fields[0],st=le;st.tag===1?st.fields[0]:xg(T,st.fields[0],s.ProfileId);const _e=vl(le,s.WorkflowDetail);return[new nt(s.ProfileId,s.ProcessInstanceId,_e,s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(Q=_e.tag===1?kl(s.CurrentView,_e.fields[0],s.BenefitsOnboarding):_e.tag===2?new U(2,[new fe(4,[_e.fields[0]])]):new U(2,[new fe(4,["Process Instance not resolved"])]),I(Zn=>{Zn(Q)}))]}case 3:{const le=Y.fields[0];return[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(2,[le.message]),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(xe=new U(2,[new fe(4,[le.message])]),I(st=>{st(xe)}))]}default:return[s,It(le=>{He(le)},le=>xC(s.ProcessInstanceId,T,le),t,le=>new U(5,[T,new an(2,[le])]),le=>new U(5,[T,new an(3,[le])]))]}}case 6:return[new nt(s.ProfileId,s.ProcessInstanceId,s.WorkflowDetail,new fe(3,[]),s.CssOverrides,s.BenefitsOnboarding),It(T=>{He(T)},T=>IC(s.ProcessInstanceId,t,T),r.fields[0].InjectedBenefits,T=>new U(15,[]),T=>new U(16,[T]))];case 7:return[s,f0(y([It(T=>{He(T)},T=>EC(s.ProcessInstanceId,t,T),r.fields[0].InjectedBenefits,T=>new U(15,[]),T=>new U(16,[T])),(rt=s.WorkflowDetail,rt.tag===1?(Re=new U(2,[new fe(2,[T1(jo(T=>O(T.Status,new ie(0,[]))?!0:O(T.Status,new ie(4,[])),rt.fields[0].Steps))])]),I(T=>{T(Re)})):I(T=>{T(new U(2,[new fe(4,["Process Instance not resolved"])]))}))]))];case 8:return[s,It(T=>{He(T)},Gs(e)(s.ProcessInstanceId)(t),r.fields[0].InjectedBenefits,T=>new U(9,[T]),T=>new U(16,[T]))];case 9:{const T=vl(r.fields[0],s.WorkflowDetail);return[new nt(s.ProfileId,s.ProcessInstanceId,T,s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),(Be=T.tag===1?kl(s.CurrentView,T.fields[0],s.BenefitsOnboarding):T.tag===2?new U(2,[new fe(4,[T.fields[0]])]):new U(2,[new fe(4,["Process Instance not resolved"])]),I(Y=>{Y(Be)}))]}case 10:{const T=r.fields[0];switch(T.tag){case 1:return[s,J()];case 2:return T.fields[0].tag===1?[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(2,[T.fields[0].fields[0]]),new fe(4,[T.fields[0].fields[0]]),s.CssOverrides,s.BenefitsOnboarding),J()]:(wa(T.fields[0].fields[0].Id,T.fields[0].fields[0].Configuration.Name,T.fields[0].fields[0].Configuration.Id,s.ProfileId),[new nt(s.ProfileId,s.ProcessInstanceId,vl(new m(0,[T.fields[0].fields[0]]),s.WorkflowDetail),s.CurrentView,s.CssOverrides,s.BenefitsOnboarding),I(Y=>{Y(new U(2,[new fe(5,[])]))})]);case 3:return[new nt(s.ProfileId,s.ProcessInstanceId,new Tt(2,[T.fields[0].message]),new fe(4,[T.fields[0].message]),s.CssOverrides,s.BenefitsOnboarding),J()];default:{const Y=s.WorkflowDetail;let le,st;switch(Y.tag===1&&ua(Y.fields[0].Status)?(le=0,st=Y.fields[0]):le=1,le){case 0:return wa(st.ProcessInstanceId,st.InstanceName,st.ProcessConfigId,s.ProfileId),[s,J()];default:return[s,It(_e=>{He(_e)},_e=>TC(s.ProcessInstanceId,_e),t,_e=>new U(10,[new an(2,[_e])]),_e=>new U(10,[new an(3,[_e])]))]}}}}case 11:{const T=r.fields[0];return wa(T.ProcessInstanceId,T.InstanceName,T.ProcessConfigId,s.ProfileId),[s,I(Y=>{Y(new U(2,[new fe(5,[])]))})]}case 13:return[s,(Xe=window.location.pathname+"/"+window.location.search+window.location.hash,d0(T=>{fl(I(Xe),1)}))];case 15:return[s,J()];case 16:return[s,J()];default:return[s,Bi(T=>{He(T)},()=>kC(s.ProcessInstanceId,t),void 0,T=>new U(1,[new an(2,[T])]))]}}function OC(e,t,n,r){return MC(AC,e,t,n,r)}const DC=d("div",C(y([["className","text-primary-base"],(()=>{let e,t,n;const r=[d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(e=I(d("g",C(I((t=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:16,fill:"currentColor"}),d("path",C(y([(n="M20.3018 11.7811L13.9959 18.0829L11.6982 15.7867C11.5092 15.6043 11.2561 15.5033 10.9933 15.5056C10.7306 15.5079 10.4793 15.6132 10.2935 15.7989C10.1077 15.9845 10.0023 16.2357 10 16.4983C9.99775 16.7608 10.0988 17.0138 10.2813 17.2026L13.2874 20.2068C13.4754 20.3945 13.7302 20.5 13.9959 20.5C14.2616 20.5 14.5164 20.3945 14.7043 20.2068L21.7187 13.1971C21.9012 13.0082 22.0022 12.7553 22 12.4927C21.9977 12.2301 21.8923 11.979 21.7065 11.7933C21.5207 11.6076 21.2694 11.5023 21.0067 11.5C20.7439 11.4978 20.4908 11.5987 20.3018 11.7811Z",["d",n]),["fill","white"]])))]),["children",b.Children.toArray(Array.from(t))]))))),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(r))]})()]))),NC=d("div",C(y([["className","text-primary-base"],(()=>{let e,t,n,r;const s=[d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(e=I(d("g",C(I((t=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"currentColor",strokeWidth:2}),d("path",C(y([(n="M16.616 12.6769L11.146 18.1459C11.0908 18.2022 11.0497 18.2707 11.026 18.3459L10.026 21.3459C10.0018 21.4208 9.99555 21.5004 10.0079 21.5781C10.0202 21.6559 10.0507 21.7296 10.0969 21.7934C10.1431 21.8571 10.2036 21.909 10.2737 21.9449C10.3438 21.9808 10.4213 21.9997 10.5 21.9999C10.5538 22.0002 10.6072 21.9914 10.658 21.9739L13.658 20.9739C13.7332 20.9503 13.8017 20.9091 13.858 20.8539L19.327 15.3839L16.616 12.6769Z",["d",n]),["fill","currentColor"]]))),d("path",C(y([(r="M21.8545 12.146L19.8545 10.146C19.808 10.0994 19.7529 10.0625 19.6921 10.0373C19.6314 10.0121 19.5663 9.99908 19.5005 9.99908C19.4347 9.99908 19.3696 10.0121 19.3089 10.0373C19.2481 10.0625 19.1929 10.0994 19.1465 10.146L17.6775 11.616L20.3845 14.323L21.8545 12.854C21.9011 12.8075 21.938 12.7524 21.9632 12.6916C21.9884 12.6309 22.0014 12.5657 22.0014 12.5C22.0014 12.4342 21.9884 12.3691 21.9632 12.3083C21.938 12.2476 21.9011 12.1924 21.8545 12.146Z",["d",r]),["fill","currentColor"]])))]),["children",b.Children.toArray(Array.from(t))]))))),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(s))]})()]))),RC=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t,n;const r=I(d("g",C(I((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2}),d("path",C(y([(t="M15 13C15 12.7348 15.1054 12.4804 15.2929 12.2929C15.4804 12.1054 15.7348 12 16 12C16.2652 12 16.5196 12.1054 16.7071 12.2929C16.8946 12.4804 17 12.7348 17 13V15H19V13C19 12.2044 18.6839 11.4413 18.1213 10.8787C17.5587 10.3161 16.7956 10 16 10C15.2044 10 14.4413 10.3161 13.8787 10.8787C13.3161 11.4413 13 12.2044 13 13V15H15V13Z",["d",t]),["fill","#9CA3AF"]]))),d("path",C(y([(n="M19.6 16H12.4C11.9029 16 11.5 16.3731 11.5 16.8333V20.1667C11.5 20.6269 11.9029 21 12.4 21H19.6C20.0971 21 20.5 20.6269 20.5 20.1667V16.8333C20.5 16.3731 20.0971 16 19.6 16Z",["d",n]),["fill","#9CA3AF"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(r))]})()]))),Ih=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=I(d("g",C(I((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2})]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(t))]})()]))),BC=d("svg",C(y([["fill","none"],["height",32],["viewBox","0 0 32 32"],["width",32],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=I(d("g",C(I((e=y([d("rect",{width:32,height:32,fill:"white"}),d("circle",{cx:16,cx:16,cy:16,r:15,stroke:"#D1D5DB",strokeWidth:2}),d("path",C(y([(t="M20.3018 11.7811L13.9959 18.0829L11.6982 15.7867C11.5092 15.6043 11.2561 15.5033 10.9933 15.5056C10.7306 15.5079 10.4793 15.6132 10.2935 15.7989C10.1077 15.9845 10.0023 16.2357 10 16.4983C9.99775 16.7608 10.0988 17.0138 10.2813 17.2026L13.2874 20.2068C13.4754 20.3945 13.7302 20.5 13.9959 20.5C14.2616 20.5 14.5164 20.3945 14.7043 20.2068L21.7187 13.1971C21.9012 13.0082 22.0022 12.7553 22 12.4927C21.9977 12.2301 21.8923 11.979 21.7065 11.7933C21.5207 11.6076 21.2694 11.5023 21.0067 11.5C20.7439 11.4978 20.4908 11.5987 20.3018 11.7811Z",["d",t]),["fill","#D1D5DB"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(n))]})()])));function Il(e,t){let n;return d("div",C(y([["className","w-full h-6 rounded justify-start items-center inline-flex"],(n=[d("div",{className:ye(" ",[e,"text-lg font-medium leading-normal"]),children:t})],["children",b.Children.toArray(Array.from(n))])])))}function LC(e){return Il("text-gray-900",e)}function Al(e){return Il("text-gray-500",e)}function VC(e){return Il("text-primary-base",e)}function FC(e){switch(e.Status.tag){case 0:return LC(Jn(e));case 1:return Al(Jn(e));case 3:return Al(Jn(e));case 4:return Al(Jn(e));default:return VC(Jn(e))}}function Ah(e){let t;return d("div",C(y([["className","w-8 h-6 flex-col justify-center items-center inline-flex"],(t=[d("div",{className:ye(" ",[e,"w-0.5 h-6 relative"])})],["children",b.Children.toArray(Array.from(t))])])))}const WC=Ah("bg-gray-300"),Eh=Ah("bg-primary-base");function jC(e){const t=O(e.Id,new Se(6,[])),n=e.Status;let r;if(t)r=2;else switch(n.tag){case 0:{r=0;break}case 2:{r=1;break}default:r=2}switch(r){case 0:return Eh;case 1:return Eh;default:return WC}}function Th(e,t){let n,r,s;const i=O(t.Status,new ie(0,[]))?!0:O(t.Status,new ie(2,[]));return d("button",C(y([["className",ye(" ",["group h-8 justify-start items-center space-x-4 inline-flex focus:outline-none"])],["type","button"],["disabled",!i],["onClick",o=>{e(new U(2,[new fe(2,[t])]))}],(n=[d("div",C(y([["className","w-8 h-8 relative"],(r=pe(A(()=>{const o=t.Status;return o.tag===0?_(DC):o.tag===1?_(Ih):o.tag===3?O(t.Id,new Se(6,[]))?_(RC):_(Ih):o.tag===4?_(BC):_(NC)})),["children",b.Children.toArray(Array.from(r))])]))),d("div",C(y([["className",ye(" ",pe(A(()=>V(_("rounded justify-start items-center flex"),A(()=>i?_("group-focus:outline-none group-focus:ring-2 group-focus:ring-offset-4 group-focus:ring-primary-focus"):dr())))))],(s=[FC(t)],["children",b.Children.toArray(Array.from(s))])])))],["children",b.Children.toArray(Array.from(n))])])))}function UC(e){let t,n,r,s=!1,i=0;const o=me(e.Steps);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const u=o["System.Collections.Generic.IEnumerator`1.get_Current"]();switch(u.Id.tag){case 0:case 1:{s=O(u.Status,new ie(0,[]))?!0:O(u.Status,new ie(4,[]));break}default:(O(u.Status,new ie(0,[]))||O(u.Status,new ie(4,[])))&&(i=i+1|0)}}}finally{oe(o)}r=i+(s?1:0);const a=lr(Sl(e.Steps))|0,l=u=>d("div",{className:"text-gray-500 text-sm font-medium leading-tight",children:u});return d("div",C(y([(t="h-20 w-full px-6 py-4 bg-white border-b border-gray-300 flex-col justify-start items-start inline-flex cursor-default",["className",t]),(n=pe(A(()=>{let u,f;return V((u=e.Branding,O(e.AppMode,new Tr(0,[]))?_(ee()):u!=null&&u.CompanyName!=null?(f=u.CompanyName,_(l(os(f)))):_(l(bl(e.JourneyType)))),A(()=>_(d("div",{className:"text-center text-gray-900 text-base font-semibold leading-normal",children:`${r}/${a} sections complete`}))))})),["children",b.Children.toArray(Array.from(n))])])))}function zC(e,t){return((r,s)=>{e:for(;;){const i=r,o=s;if(M(i))return o;if(M(P(i)))return vt(o,I(Th(e,k(i))));r=et(k(P(i)),P(P(i))),s=vt(o,y([Th(e,k(i)),jC(k(P(i)))]));continue e}})(Sl(t.Steps),ce())}function HC(e){let t,n,r;const s=e.dispatch,i=e.detail,o=Pc(void 0),a=hi(!1);return Np(()=>{const l=window.ResizeObserver?new window.ResizeObserver(()=>{const u=document.body.offsetWidth;Cl(u)!=null||a[0]===!1&&(a[1](!0),s(new U(3,[])))}):new Rf(()=>{const u=document.body.offsetWidth;Cl(u)!=null||a[0]===!1&&(a[1](!0),s(new U(3,[])))});return Tn(u=>{l.observe(u)},ei(o.current)),{Dispose(){l.disconnect()}}}),d("div",C(y([["ref",o],["className","absolute top-0 bottom-0 left-0 right-0"],(t=[d("div",C(y([["className","w-full h-full bg-white flex-col justify-start items-start inline-flex"],(n=[UC(i),d("div",C(y([["className","p-6 bg-white flex-col justify-start items-start inline-flex"],(r=zC(s,i),["children",b.Children.toArray(Array.from(r))])])))],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}class Ji extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token"]}}class GC extends R{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["app-base-url"]}}class YC extends R{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["workflows-instance-id"]}}function Ph(e){const t=e.children,n=e.effect,r=e.props,s=e.step;pr(n);const i=s.tag===1?mt.ComponentTagName:s.tag===2?pt.ComponentTagName:s.tag===3?$t.ComponentTagName:s.tag===4?Oe.ComponentTagName:s.tag===5?On.ComponentTagName:s.tag===6?as.ComponentTagName:s.tag===7?Yt.ComponentTagName:s.tag===8?Dn.ComponentTagName:Ye.ComponentTagName;return d(i,bt(r,1),...t)}class Ms extends R{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Mobile","MobileLandscape","Tablet","Desktop","WideScreen"]}}class qC extends L{constructor(t,n,r,s){super(),this.MobileLandscape=t|0,this.Tablet=n|0,this.Desktop=r|0,this.WideScreen=s|0}}const JC=new qC(576,768,1024,1216);function ZC(e){return["(max-width: "+e.MobileLandscape+"px)","(max-width: "+e.Tablet+"px)","(max-width: "+e.Desktop+"px)","(max-width: "+e.WideScreen+"px)"]}function Zi(e){const t=Dp(()=>window.matchMedia(e).matches);return Ko(()=>{const n=window.matchMedia(e),r=()=>{t[1](n.matches)};return r(),n.addListener(r),di(()=>{n.removeListener(r)})},[e]),t[0]}function XC(e){const t=ZC(Ee(e,JC)),n=Zi(t[0]),r=Zi(t[1]),s=Zi(t[2]),i=Zi(t[3]);return n?new Ms(0,[]):r?new Ms(1,[]):s?new Ms(2,[]):i?new Ms(3,[]):new Ms(4,[])}const KC=d("svg",C(y([["fill","none"],["height",16],["viewBox","0 0 16 16"],["width",16],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e,t;const n=I(d("g",C(I((e=y([d("rect",{width:16,height:16,fill:"white"}),d("path",C(y([(t="M15 6.99992H3.41403L6.70703 3.70692C6.88919 3.51832 6.98998 3.26571 6.9877 3.00352C6.98543 2.74132 6.88026 2.49051 6.69485 2.3051C6.50944 2.11969 6.25863 2.01452 5.99643 2.01224C5.73423 2.00997 5.48163 2.11076 5.29303 2.29292L0.293031 7.29292C0.10556 7.48045 0.000244141 7.73475 0.000244141 7.99992C0.000244141 8.26508 0.10556 8.51939 0.293031 8.70692L5.29303 13.7069C5.38528 13.8024 5.49562 13.8786 5.61763 13.931C5.73963 13.9834 5.87085 14.011 6.00363 14.0122C6.13641 14.0133 6.26809 13.988 6.39098 13.9377C6.51388 13.8875 6.62553 13.8132 6.71943 13.7193C6.81332 13.6254 6.88757 13.5138 6.93785 13.3909C6.98813 13.268 7.01343 13.1363 7.01228 13.0035C7.01113 12.8707 6.98354 12.7395 6.93113 12.6175C6.87872 12.4955 6.80254 12.3852 6.70703 12.2929L3.41403 8.99992H15C15.2652 8.99992 15.5196 8.89456 15.7071 8.70703C15.8947 8.51949 16 8.26514 16 7.99992C16 7.7347 15.8947 7.48035 15.7071 7.29281C15.5196 7.10528 15.2652 6.99992 15 6.99992Z",["d",t]),["fill","#212121"]])))]),["children",b.Children.toArray(Array.from(e))])))));return["children",b.Children.toArray(Array.from(n))]})()])));function QC(e,t,n){let r,s,i,o,a,l;const u=N1(h=>O(h.Id,n.Id),t)/lr(t)*100;l=je(We("%.0f%%"))(u);let f;const c=B1(h=>O(h.Status,new ie(2,[]))?!0:O(h.Status,new ie(0,[])),t)/lr(t)*100;f=je(We("%.0f%%"))(c);const p=O(n.Id,new Se(1,[]))?bh(new Se(0,[])):Jn(n);return d("div",C(y([(r="h-20 w-full px-6 py-4 bg-white border-b border-gray-300 flex-col justify-start items-start space-y-3 inline-flex sticky left-0 right-0 top-0 z-50",["className",r]),(s=[d("div",C(y([["className","self-stretch justify-start items-center space-x-3 inline-flex"],(i=[d("button",{type:"button",className:"w-4 h-4 rounded-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-base",onClick:h=>{e(new U(2,[new fe(1,[])]))},children:b.Children.toArray([KC])}),d("div",{className:"text-center text-gray-900 text-base font-semibold leading-normal",children:p})],["children",b.Children.toArray(Array.from(i))])]))),d("div",C(y([["className","w-full h-2 relative rounded-sm"],(o=[d("div",{className:"w-full h-0.5 left-0 top-[3px] absolute bg-gray-300 rounded-sm"}),d("div",C(y([["className","w-full left-0 top-0 absolute"],(a=[d("div",{className:"h-0.5 left-0 top-[3px] absolute bg-primary-base rounded-sm",style:{width:f}}),d("div",{className:"w-2 h-2 top-0 absolute bg-primary-base rounded-full",style:{left:l}})],["children",b.Children.toArray(Array.from(a))])])))],["children",b.Children.toArray(Array.from(o))])])))],["children",b.Children.toArray(Array.from(s))])])))}const e3=d("div",C(y([["className","relative h-4 w-2 z-50"],(()=>{const e=[d("div",{className:"absolute left-0 top-1 h-2 w-2 rounded-full bg-primary-base"})];return["children",b.Children.toArray(Array.from(e))]})()]))),t3=d("div",{className:"relative h-0.5 w-2 bg-gray-300"}),Mh=d("div",{className:"relative h-0.5 w-2 bg-primary-base"}),n3=d("div",C(y([["className","w-4 h-4 relative"],(()=>{let e,t,n;const r=[d("svg",C(y([["fill","none"],["height",16],["viewBox","0 0 16 16"],["width",16],["xmlns","http://www.w3.org/2000/svg"],(e=y([d("path",C(y([(t="M7 5C7 4.73478 7.10536 4.48043 7.29289 4.29289C7.48043 4.10536 7.73478 4 8 4C8.26522 4 8.51957 4.10536 8.70711 4.29289C8.89464 4.48043 9 4.73478 9 5V7H11V5C11 4.20435 10.6839 3.44129 10.1213 2.87868C9.55871 2.31607 8.79565 2 8 2C7.20435 2 6.44129 2.31607 5.87868 2.87868C5.31607 3.44129 5 4.20435 5 5V7H7V5Z",["d",t]),["fill","#9CA3AF"]]))),d("path",C(y([(n="M11.6 8H4.4C3.90294 8 3.5 8.3731 3.5 8.83333V12.1667C3.5 12.6269 3.90294 13 4.4 13H11.6C12.0971 13 12.5 12.6269 12.5 12.1667V8.83333C12.5 8.3731 12.0971 8 11.6 8Z",["d",n]),["fill","#9CA3AF"]])))]),["children",b.Children.toArray(Array.from(e))])])))];return["children",b.Children.toArray(Array.from(r))]})()])));function Oh(e,t,n){let r;if(e)r=0;else switch(n.tag){case 0:case 4:{r=2;break}case 1:{r=4;break}case 3:{t?r=3:r=4;break}default:r=1}switch(r){case 0:return e3;case 1:return Mh;case 2:return Mh;case 3:return n3;default:return t3}}const Dh=d("div",{className:"relative h-0.5 w-full"}),r3=d("div",{className:"relative h-0.5 w-full bg-gray-300"}),s3=d("div",{className:"relative h-0.5 w-full bg-primary-base"});function El(e){let t;if(e==null)t=1;else switch(e.tag){case 0:case 4:case 2:{t=0;break}default:t=2}switch(t){case 0:return s3;case 1:return Dh;default:return r3}}function Nh(e){let t,n;return d("div",C(y([["className","inline-flex h-11 w-10 flex-col items-center justify-start"],(t=[d("div",C(y([["className","inline-flex h-4 items-center justify-center self-stretch"],(n=[d("div",{className:ye(" ",[e,"relative h-0.5 w-10"])})],["children",b.Children.toArray(Array.from(n))])])))],["children",b.Children.toArray(Array.from(t))])])))}const i3=Nh("bg-gray-300"),o3=Nh("bg-primary-base");function a3(e){switch(e.tag){case 0:case 4:case 2:return o3;default:return i3}}function Rh(e,t,n,r){let s,i;const o=!e&&(O(n.Status,new ie(0,[]))?!0:O(n.Status,new ie(2,[]))),a=e?"text-primary-base":O(n.Status,new ie(2,[]))||O(n.Status,new ie(0,[]))?"text-gray-900 group-hover:text-primary-base":"text-gray-500",l=d("div",{className:"absolute inset-0 group-hover:bg-primary-base group-hover:opacity-10 rounded"});let u;const f=$c(Ch(n.Id).toLocaleLowerCase()," ","-");return u=je(We("step-%s"))(f),d("div",C(y([["className",ye(" ",["h-11 flex-col justify-start items-center inline-flex"])],(s=[d("div",{className:"h-4 inline-flex items-center justify-center self-stretch",children:b.Children.toArray(Array.from(r))}),d("button",C(y([["type","button"],["disabled",!o],["data-testid",u],["className",ye(" ",["relative group h-7 px-2 py-1 justify-center items-center gap-2 inline-flex rounded","focus:outline-none focus:ring-1 focus:ring-offset-1 focus:ring-primary-focus"])],["onClick",Pt(t)(n)],(i=pe(A(()=>V(_(o?l:ee()),A(()=>_(d("div",{className:ye(" ",[a,"text-sm font-medium leading-tight whitespace-nowrap"]),children:aC(n)})))))),["children",b.Children.toArray(Array.from(i))])])))],["children",b.Children.toArray(Array.from(s))])])))}function l3(e,t,n){const r=O(n.Id,new Se(1,[]))?new Se(0,[]):n.Id,s=(o,a)=>{e(new U(2,[new fe(2,[o])]))};return cr(((o,a,l)=>{e:for(;;){const u=o,f=a,c=l;if(M(u))return c;if(M(P(u))){const p=El(f),h=O(k(u).Id,r);return vt(c,I(Rh(h,s,k(u),y([Dh,Oh(h,O(k(u).Id,new Se(6,[])),k(u).Status),p]))))}else{const p=El(f),h=O(k(u).Id,r),$=Oh(h,O(k(u).Id,new Se(6,[])),k(u).Status);o=P(u),a=k(u).Status,l=vt(c,y([Rh(h,s,k(u),y([El(k(u).Status),$,p])),a3(k(u).Status)]));continue e}}})(cr(Sl(t)),void 0,ce()))}function u3(e,t,n){let r,s,i;const o=d("div",C(y([["className","grow shrink basis-0 flex-col justify-start items-start inline-flex"],(r=[d("div",{className:"hidden lg:inline text-gray-500 text-sm font-medium leading-tight",children:bl(t.JourneyType)}),Ee(Le(l=>d("div",{className:"hidden lg:inline text-center text-gray-900 text-base font-semibold leading-normal",children:l}),Le(os,cn(l=>l.CompanyName,t.Branding))),ee())],["children",b.Children.toArray(Array.from(r))])]))),a=d("div",{className:"grow shrink basis-0"});return d("div",C(y([(s="w-full h-20 px-8 py-4 bg-white border-b border-gray-300 justify-between items-center inline-flex sticky left-0 right-0 top-0 z-50",["className",s]),(i=pe(A(()=>V(O(t.AppMode,new Tr(0,[]))?_(a):_(o),A(()=>{let l;return V(_(d("div",C(y([["className","bg-white justify-center items-start flex"],(l=l3(e,t.Steps,n),["children",b.Children.toArray(Array.from(l))])])))),A(()=>_(d("div",{className:"grow shrink basis-0"}))))})))),["children",b.Children.toArray(Array.from(i))])])))}function c3(e){let t;const n=e.body,r=e.currentStep,s=e.detail,i=e.dispatch;return d("div",C(y([["className","w-full flex-col justify-start items-center inline-flex bg-white"],(t=pe(A(()=>V(lr(s.Steps)===1?_(ee()):XC().tag===0?_(QC(i,s.Steps,r)):_(u3(i,s,r)),A(()=>_(d("div",{className:"p-4 max-w-7xl mx-auto w-full",children:n})))))),["children",b.Children.toArray(Array.from(t))])])))}const f3=e=>d("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d("path",{d:"M16 16V30",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M11 21L16 16L21 21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M11 29H4C3.20435 29 2.44129 28.6839 1.87868 28.1213C1.31607 27.5587 1 26.7956 1 26V2H12L15 7H31V26C31 26.7956 30.6839 27.5587 30.1213 28.1213C29.5587 28.6839 28.7956 29 28 29H21",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),d3=e=>d("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d("path",{d:"M19.7 4.3C19.3 3.9 18.7 3.9 18.3 4.3L12 10.6L5.7 4.3C5.3 3.9 4.7 3.9 4.3 4.3C3.9 4.7 3.9 5.3 4.3 5.7L10.6 12L4.3 18.3C3.9 18.7 3.9 19.3 4.3 19.7C4.5 19.9 4.7 20 5 20C5.3 20 5.5 19.9 5.7 19.7L12 13.4L18.3 19.7C18.5 19.9 18.8 20 19 20C19.2 20 19.5 19.9 19.7 19.7C20.1 19.3 20.1 18.7 19.7 18.3L13.4 12L19.7 5.7C20.1 5.3 20.1 4.7 19.7 4.3Z",fill:"#9CA3AF"}));function h3(e){const t=bt(e,1);return d(f3,t)}function m3(e){const t=bt(e,1);return d(d3,t)}function p3(e){return d("div",{className:"absolute top-0 bottom-0 left-0 right-0",children:b.Children.toArray([e])})}function $3(e,t){let n;return d("button",C(y([["type","button"],["data-testid","submit-btn"],["className",ye(" ",["self-stretch md:self-auto md:w-60 px-4 py-2 bg-primary-base hover:bg-primary-hover rounded-md shadow","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus cursor-pointer","justify-center items-center inline-flex"])],["onClick",t],(n=[d("div",{className:"text-white text-base font-semibold leading-normal",children:e})],["children",b.Children.toArray(Array.from(n))])])))}function g3(e,t){let n;return d("button",C(y([["type","button"],["className",ye(" ",["relative group self-stretch md:self-auto md:w-60 px-4 py-2 rounded-md shadow justify-center items-center inline-flex","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus cursor-pointer"])],["onClick",t],(n=[d("div",{className:"text-primary-dark text-base font-semibold leading-normal z-[1]",children:e}),d("div",{className:"absolute w-full h-full rounded-md z-[0] bg-primary-base opacity-10 group-hover:opacity-20"})],["children",b.Children.toArray(Array.from(n))])])))}function Xi(e,t,n,r,s){let i,o,a,l,u,f,c,p,h,$,g,w,v,S,N;return p3(d("div",C(y([["className","w-full h-full md:pb-8 bg-white flex-col justify-start items-start md:items-center inline-flex"],(i=[d("div",C(y([(o="w-full md:self-stretch p-4 bg-white border-gray-200 flex-col justify-start items-end space-x-4 space-y-4 flex",["className",o]),(a=[d("button",C(y([["type","button"],(l="w-6 h-6 relative rounded-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-base",["className",l]),["onClick",K=>{s(new U(7,[{InjectedBenefits:r}]))}],(u=[m3([])],["children",b.Children.toArray(Array.from(u))])])))],["children",b.Children.toArray(Array.from(a))])]))),d("div",C(y([(f="w-full md:w-[560px] grow shrink basis-0 px-4 md:px-0 pb-8 md:pb-0 bg-white flex-col justify-between md:justify-start items-center md:space-y-14 flex",["className",f]),(c=[d("div",C(y([["className","self-stretch h-64 md:h-56 flex-col justify-start items-center space-y-8 flex"],(p=[d("div",C(y([["className","self-stretch h-64 flex-col justify-start items-center space-y-6 flex"],(h=[d("div",C(y([["className","self-stretch h-24 flex-col justify-start items-center space-y-4 flex"],($=[d("div",C(y([["className","w-12 h-12 relative rounded-lg"],(g=[d("div",{className:"w-12 h-12 relative bg-primary-base opacity-10 rounded-lg"}),d("div",C(y([["className","w-8 h-8 left-2 top-2 absolute"],(w=[d("div",C(y([["className","w-7 h-7 left-px top-0.5 absolute"],(v=[h3([["className","text-primary-base"]])],["children",b.Children.toArray(Array.from(v))])])))],["children",b.Children.toArray(Array.from(w))])])))],["children",b.Children.toArray(Array.from(g))])]))),d("div",{className:"self-stretch text-center text-gray-900 text-2xl md:text-3xl font-bold leading-7 md:leading-9",children:e})],["children",b.Children.toArray(Array.from($))])]))),d("div",C(y([["className","self-stretch h-40 md:h-24 flex-col justify-start items-center space-y-3 md:space-y-4 flex"],(S=[d("div",{className:"self-stretch text-center text-gray-900 text-base md:text-lg font-normal leading-normal md:leading-7",children:t}),d("div",{className:"self-stretch text-center text-gray-900 text-base md:text-lg font-normal leading-normal md:leading-7",children:n})],["children",b.Children.toArray(Array.from(S))])])))],["children",b.Children.toArray(Array.from(h))])])))],["children",b.Children.toArray(Array.from(p))])]))),d("div",C(y([["className","self-stretch h-24 flex-col justify-start items-center space-y-4 flex cursor-pointer"],(N=[$3(r?"Submit and continue":"Submit",K=>{s(new U(8,[{InjectedBenefits:r}]))}),g3("Keep editing",K=>{s(new U(7,[{InjectedBenefits:r}]))})],["children",b.Children.toArray(Array.from(N))])])))],["children",b.Children.toArray(Array.from(c))])])))],["children",b.Children.toArray(Array.from(i))])]))))}function w3(e){let t,n;const r=e.dispatch,s=e.wd,i=s.IsBenefitsStepEnabled;return s.AppMode.tag===1?i?Xi("Before you continue",(t=cn(o=>o.CompanyName,s.Branding),t==null?"Submit to finalise your pay information to your employer and continue to access your workplace benefits":`Submit to finalise your pay information to ${os(t)} and continue to access your workplace benefits`),"Once you submit, you’ll be unable to view or edit your details",!0,r):Xi("Submit your details",(n=cn(o=>o.CompanyName,s.Branding),n==null?"Submit to finalise your pay information to your employer":`Submit to finalise your pay information to ${os(n)}`),"Once you submit, you’ll be unable to view or edit your details.",!1,r):i?Xi("Before you continue","Submit to finalise your pay information to your employer and continue to access your workplace benefits","",!0,r):Xi("Submit your details","Submit to finalise your pay information to your employer","",!1,r)}function Ki(e,t){let n;return d("div",C(y([["className",ye(" ",["animate-pulse w-full relative",e,t])],(n=[d("div",{className:ye(" ",["w-full left-0 top-0 absolute bg-gray-200 rounded",e])})],["children",b.Children.toArray(Array.from(n))])])))}const y3=Ki("h-9","max-w-96"),Bh=Ki("h-6","max-w-96"),_3=Ki("h-80","max-w-96"),v3=Ki("h-10","max-w-48"),b3=(()=>{let e,t,n;const r=[d("div",C(y([(e="w-full h-full px-8 py-20 bg-white rounded border border-zinc-200 flex-col justify-start items-center gap-10 inline-flex",["className",e]),(t=[d("div",C(y([["className","max-w-96 w-full flex-col justify-start items-center gap-6 flex"],(n=[y3,d("div",{className:"self-stretch h-14 flex-col justify-start items-center gap-2 flex",children:b.Children.toArray([Bh,Bh])})],["children",b.Children.toArray(Array.from(n))])]))),_3,v3],["children",b.Children.toArray(Array.from(t))])])))];return d(Ie,{},...r)})();function C3(e){let t;const n=e.accessToken,r=e.appMode;let s;const i=PC(n);s=il(()=>Li(()=>i,(u,f)=>OC(n,r,u,f),(u,f)=>{}),void 0,[]);const o=s[0],a=s[1];Qo(()=>{kg()},[]),Qo(()=>{const u=o.CurrentView;let f;switch(o.WorkflowDetail.tag===1?u.tag===2?O(u.fields[0].Id,new Se(4,[]))?(f=0,u.fields[0]):O(u.fields[0].Id,new Se(5,[]))?(f=1,u.fields[0]):f=2:f=2:f=3,f){case 0:break;case 1:break;case 2:{fl(I(hl(r)),2);break}}},[o.CurrentView,o.WorkflowDetail]),pr(()=>{window.addEventListener("step-completion",u=>{a(new U(4,[u]))})});const l=o.WorkflowDetail;switch(l.tag){case 1:{const u=l.fields[0],f=u.JourneyType;return d("div",C(y([["className","w-full min-h-[600px] mx-auto bg-white"],(t=pe(A(()=>V(ke(c=>d("style",{children:[c]}),o.CssOverrides),A(()=>{const c=o.CurrentView;switch(c.tag){case 1:return V(_(d(HC,{detail:u,dispatch:a})),A(()=>(qt(0),dr())));case 2:{const p=c.fields[0];let h;const $=p.Id;return h=$.tag===4?d(Ph,{step:new Se(4,[]),props:[new Ji(1,[n]),new Ji(0,[`${jn}/super-selection/backend/v1.0/`]),new GC(hl(r))],effect:()=>{a(new U(13,[])),qt(2500)},children:[]}):d(Ph,{step:$,props:[new Ji(1,[n]),new Ji(0,[jn]),new YC(ln($r(o.ProcessInstanceId)))],effect:()=>{qt(1500)},children:[]}),_(d(c3,{dispatch:a,detail:u,currentStep:p,body:h}))}case 3:return V(_(d(w3,{wd:u,dispatch:a})),A(()=>(qt(0),dr())));case 4:return V(_(d("div",{className:"text-center mt-5",children:"We had an issue. Please try again shortly."})),A(()=>(qt(0),dr())));case 5:{const p=Le(W_,u.Branding);let h;if(u.AppMode.tag===0)h=0;else switch(f.tag){case 1:{h=2;break}case 2:{h=3;break}case 3:case 4:{h=4;break}default:h=1}switch(h){case 0:return _(b3);case 1:return _(Ts(qi(p,"onboarding")));case 2:return _(Ts(qi(p,"information request")));case 3:return _(Ts(ph()));default:return _(Ts($h()))}}default:return _(d("div",{children:["Please wait..."]}))}})))),["children",b.Children.toArray(Array.from(t))])])))}case 2:return Ts(ta());default:return d("div",{children:["Please wait..."]})}}function S3(e){return{render:function(t){Fs(t,e)},unmount:function(){yo(e)}}}class k3 extends L{constructor(t,n,r){super(),this.model=t,this.render=n,this.equal=r}}class x3 extends ft{constructor(t){super(t)}shouldComponentUpdate(t,n){const r=this;return!r.props.equal(r.props.model,t.model)}render(){return this.props.render()}}function I3(e,t,n,r){const s=new k3(n,()=>t(n,r),e);return d(x3,s)}const A3=(()=>{try{return Zo(Su.slice(void 0,2),511,!1,32)>=18}catch{return!1}})();function E3(e,t,n){let r;return p0(te(A3?(r=S3(document.getElementById(t)),s=>i=>{r.render(e(o=>a=>o===a,$0(n),s,i))}):s=>i=>{Fs(e(o=>a=>o===a,$0(n),s,i),document.getElementById(t))}),n)}function T3(e,t){return E3((n,r,s,i)=>I3(te(n),te(r),s,i),e,t)}function P3(e,t){const n=encodeURIComponent(Wv(t)),r=encodeURIComponent(S2),s=encodeURIComponent(k2(new Tr(0,[])));return E.Delay(()=>{let i,o;const a=vs(yn(new Qt(1,[`grant_type=authorization_code&code=${n}&client_id=${r}&redirect_uri=${s}`]),(i=tn(new Ft(1,[]),en(`${v2}/connect/token`)),Hi($l("application/x-www-form-urlencoded"),i))));return o=E.Bind(a,l=>E.Return(new m(0,[l]))),E.Bind(o,l=>{const u=l;if(u.tag===1)return E.Return(new m(1,[u.fields[0]]));{const f=u.fields[0];if(f.statusCode===200){const c=rn(te(sn(wl(),void 0)),f.responseText);return E.Return(c)}else return E.Return(new m(1,["Unexpected result from backend"]))}})})}function M3(){return new Er(0,[])}function Tl(e){return _i(e)}function O3(e,t){return E.Delay(()=>{let n;return E.Bind($g([(n=P3(e,t),E.Bind(n,r=>E.Return(r))),E.Delay(()=>E.Bind(Tl(2e3),()=>E.Return(void 0)))]),r=>E.Return(ne(0,r)))})}function D3(e,t,n){let r;switch(e.tag){case 1:switch(t.tag){case 1:return[t,Bi(s=>{He(s)},Tl,1e3,()=>new Hn(1,[]))];case 2:return t.fields[0].tag===1?[t,J()]:[t,Bi(s=>{He(s)},Tl,2e3,()=>new Hn(2,[]))];default:return[new Er(2,[new m(1,["No current authenticated user"])]),J()]}case 2:return[t,(r=window.location.pathname,d0(s=>{fl(I(r),1)}))];default:if(e.fields[0].tag===1)return e.fields[0].fields[0].tag===1?[new Er(2,[new m(1,[`SignIn failed: ${e.fields[0].fields[0].fields[0]}`])]),J()]:(window.gtag&&window.gtag("event","oidc_sign_in",{}),[new Er(2,[new m(0,[e.fields[0].fields[0].fields[0]])]),e.fields[2]?J():I(s=>{s(new Hn(2,[]))})]);switch(t.tag){case 1:return[t,J()];default:return[new Er(1,[]),It(s=>{He(s)},s=>O3(s[0],s[1]),[n,e.fields[1]],s=>{const i=[new Ce(1,[s]),e.fields[1],e.fields[2]];return new Hn(0,[i[0],i[1],i[2]])},s=>{const i=[new Ce(1,[new m(1,[s.message])]),e.fields[1],e.fields[2]];return new Hn(0,[i[0],i[1],i[2]])})]}}}function N3(){const e=Xu(window.sessionStorage.getItem("credentials"));if(e!=null){const t=e,n=rn(te(sn(wl(),void 0)),t);return n.tag===1?void 0:n.fields[0]}}function R3(e){let t;const n=["credentials",(t=new mh(e.id_token,e.access_token,e.expires_in,void 0,e.scope,e.token_type),_n(0,vn(wl(),void 0,void 0,void 0)(t)))];window.sessionStorage.setItem(n[0],n[1])}function Lh(e,t){return nl(n=>new bn(3,[n]),I(n=>{n(new Hn(0,[new Ce(0,[]),e,t]))}))}function Pl(e){return Lh(e,!1)}function B3(e){return Lh(e,!0)}function L3(){const e=gh(E0(window.location.pathname+window.location.search,2)),t=e[0],n=e[1],r=new Yn(t,M3(),n);switch(t.tag){case 4:case 1:case 2:case 5:case 6:return[r,J()];case 0:{const s=N3();let i;switch(n.tag){case 0:case 2:{i=1;break}default:s==null?i=1:i=0}switch(i){case 0:return[new Yn(r.CurrentPage,new Er(2,[new m(0,[s])]),r.AppMode),J()];default:return[r,I(o=>{o(new bn(5,[]))})]}}default:return[r,Pl(t.fields[0])]}}function V3(e,t){switch(e.tag){case 1:{const n=e.fields[0];return[new Yn(new W(3,[n]),t.Credentials,t.AppMode),Pl(n)]}case 2:return[new Yn(new W(4,[]),t.Credentials,t.AppMode),nl(n=>new bn(3,[n]),I(n=>{n(new Hn(1,[]))}))];case 3:{const n=D3(e.fields[0],t.Credentials,t.AppMode),r=n[0];let s,i;switch(r.tag===2&&r.fields[0].tag===0&&t.AppMode.tag===1?(s=0,i=r.fields[0].fields[0]):s=1,s){case 0:{R3(i);break}}return[new Yn(t.CurrentPage,r,t.AppMode),nl(o=>new bn(3,[o]),n[1])]}case 4:return[t,B3(e.fields[0])];case 5:return[new Yn(new W(6,[]),t.Credentials,t.AppMode),J()];default:{const n=gh(e.fields[0])[0],r=new Yn(n,t.Credentials,t.AppMode);return n.tag===3?[r,Pl(n.fields[0])]:[r,J()]}}}const Vh=d("div",C(y([["className","flex flex-col justify-center items-center pt-10"],(()=>{const e=[ta()];return["children",b.Children.toArray(Array.from(e))]})()])));function F3(e){switch(e.CurrentPage.tag){case 3:case 4:case 2:return I("bg-white h-full");default:return ce()}}function W3(e){switch(e.tag){case 1:return d("style",{children:[`
|
|
810
810
|
html {
|
|
811
811
|
height: 100%;
|
|
812
812
|
}
|