@flarehr/apollo-customer-workplace-link 1.56.43445 → 1.56.43596

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.
@@ -1714,4 +1714,4 @@ pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)t
1714
1714
  ${()=>({display:"flex",flexDirection:"column",justifyContent:"center",paddingLeft:"3rem",paddingRight:"3rem",paddingTop:"3rem",paddingBottom:"3rem","--tw-text-opacity":"1",color:"rgb(25 44 84 / var(--tw-text-opacity))"})}
1715
1715
  width: 500px;
1716
1716
  height: 500px;
1717
- `,fd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=Du().beforeAuthStateChanged((async e=>{t(await(null==e?void 0:e.getIdToken())??"")}));return ve((()=>r),[r]),{idToken:e}})(),[r,n]=ge(0),{apolloAccessToken:i}=e,[o,s]=ge("");vr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await kr(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(Ld){throw`[Link Workplace]: Error when requesting a workplace link: ${Ld}`}})(e).then((e=>{e.isEstablished?n(5):n(1)}));break;case 1:t&&n(2);break;case 2:n(3);break;case 3:await(async(e,r)=>{const{sub:n}=Me(i);try{return await Ir(t,e,n,r)}catch(Ld){throw`[Link Workplace]: Error when trying to establish workplace link: ${Ld}`}})(o,e),n(5);break;case 5:rs()}}catch(Ld){console.log(Ld),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return ui(pd,{children:[a&&ui(di,{isActive:a}),1===r&&ui(hd,{}),4===r&&ui(ts,{}),5===r&&ui(Qo,{})]})},md=e=>ui("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"lg"===e.size?"h-10 w-10":"h-5 w-5",children:[ui("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z",className:"light"===e.theme?"fill-white":"fill-gray-200","fill-opacity":"light"===e.theme?"0.3":"1"}),ui("path",{d:"M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z",className:"light"===e.theme?"fill-white":"fill-primary-base"})]}),gd=e=>{const[t,r]=ge(!1);return ui("button",{type:"button",className:`inline-flex items-center justify-center px-10 py-2 border border-transparent text-base font-medium rounded-md shadow-sm disabled:text-gray-300 bg-primary-base hover:bg-primary-hover disabled:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus w-full md:w-auto ${e.class} `,disabled:e.disabled,onClick:async()=>{if(e.onClickPromise&&!t){r(!0);try{await e.onClickPromise()}catch(n){}r(!1)}},children:[ui("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"light"})})]})},_d=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,...o})=>{const s=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return ui(N,{children:[ui("label",{className:"font-medium text-sm text-gray-900 text-left",children:ui("span",{children:t})}),ui("input",{type:"text",className:`p-2 border-0 ring-2 ring-gray-200 focus:outline-none focus-visible:ring-gray-500 text-base font-medium rounded-md shadow-sm w-full ${e}`,value:i,onKeyPress:s,onChange:e=>n(e.currentTarget.value),...o})]})},vd=({className:e,children:t})=>ui("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),yd=({className:e,children:t})=>ui("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),wd=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var bd=Object.defineProperty,Ed=(e,t,r)=>(((e,t,r)=>{t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let kd=new class{constructor(){Ed(this,"current",this.detect()),Ed(this,"handoffState","pending"),Ed(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},Id=(e,t)=>{kd.isServer?ve(e,t):ye(e,t)};function Td(e){let t=we(e);return Id((()=>{t.current=e}),[e]),t}function Cd(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=Cd();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Sd(){let[e]=ge(Cd);return ve((()=>()=>e.dispose()),[e]),e}let Rd=function(e){let t=Td(e);return bo.useCallback(((...e)=>t.current(...e)),[t])};function Od(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Eo&&Eo.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(kd.isHandoffComplete);return t&&!1===kd.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>kd.handoff()),[]),!e&&t}function Ad(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ad),n}let Pd=Symbol();function Nd(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=Rd((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Pd])))?void 0:r}function xd(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var Ld,Dd,Md=((Dd=Md||{})[Dd.None=0]="None",Dd[Dd.RenderStrategy=1]="RenderStrategy",Dd[Dd.Static=2]="Static",Dd),Ud=((Ld=Ud||{})[Ld.Unmount=0]="Unmount",Ld[Ld.Hidden=1]="Hidden",Ld);function jd({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Bd(t,e);if(o)return Fd(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return Fd(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return Ad(e?0:1,{0:()=>null,1:()=>Fd({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return Fd(a,r,n,s)}function Fd(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=Vd(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},l="function"==typeof o?o(t):o;"className"in a&&a.className&&"function"==typeof a.className&&(a.className=a.className(t));let u={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n);e&&(u["data-headlessui-state"]=r.join(" "))}if(i===N&&Object.keys(Hd(a)).length>0){if(!so(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=l.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>xd(null==e?void 0:e.className(...t),a.className):xd(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return co(l,Object.assign({},Bd(l.props,Hd(Vd(a,["ref"]))),u,c,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}}(l.ref,c.ref),r))}return O(i,Object.assign({},Vd(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Bd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map((e=>[e,void 0]))));for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function zd(e){var t;return Object.assign(Ci(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Hd(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Vd(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let $d=re(null);$d.displayName="OpenClosedContext";var qd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(qd||{});function Wd(){return Ie($d)}function Kd({value:e,children:t}){return bo.createElement($d.Provider,{value:e},t)}function Jd(){let e=we(!1);return Id((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Gd(e,...t){e&&t.length>0&&e.classList.add(...t)}function Yd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Qd(e,t,r,n){let i=r?"enter":"leave",o=Cd(),s=void 0!==n?function(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}(n):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let a=Ad(i,{enter:()=>t.enter,leave:()=>t.leave}),c=Ad(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=Ad(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Yd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Gd(e,...t.base,...a,...l),o.nextFrame((()=>{Yd(e,...t.base,...a,...l),Gd(e,...t.base,...a,...c),function(e,t){let r=Cd();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,s]=[n,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),a=o+s;if(0!==a){r.group((r=>{r.setTimeout((()=>{t(),r.dispose()}),a),r.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&r.dispose()}))}));let n=r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),n())}))}else t();r.add((()=>t())),r.dispose}(e,(()=>(Yd(e,...t.base,...a),Gd(e,...t.base,...t.entered),s())))})),o.dispose}function Xd(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Zd=re(null);Zd.displayName="TransitionContext";var eh,th=((eh=th||{}).Visible="visible",eh.Hidden="hidden",eh);let rh=re(null);function nh(e){return"children"in e?nh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function ih(e,t){let r=Td(e),n=we([]),i=Jd(),o=Sd(),s=Rd(((e,t=Ud.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(Ad(t,{[Ud.Unmount](){n.current.splice(s,1)},[Ud.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!nh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=Rd((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>s(e,Ud.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=Rd(((e,r,n)=>{c.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{c.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),h=Rd(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>r(t)))}));return Ee((()=>({children:n,register:a,unregister:s,onStart:d,onStop:h,wait:l,chains:u})),[a,s,n,d,h,u,l])}function oh(){}rh.displayName="NestingContext";let sh=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ah(e){var t;let r={};for(let n of sh)r[n]=null!=(t=e[n])?t:oh;return r}let ch=Md.RenderStrategy;let lh=zd((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=Nd(s,t);Od();let c=Wd();if(void 0===r&&null!==c&&(r=(c&qd.Open)===qd.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=ge(r?"visible":"hidden"),d=ih((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);Id((()=>{!1!==h&&f.current[f.current.length-1]!==r&&(f.current.push(r),p(!1))}),[f,r]);let m=Ee((()=>({show:r,appear:n,initial:h})),[r,n,h]);ve((()=>{if(r)u("visible");else if(nh(d)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&u("hidden")}else u("hidden")}),[r,d]);let g={unmount:i},_=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return bo.createElement(rh.Provider,{value:d},bo.createElement(Zd.Provider,{value:m},jd({ourProps:{...g,as:N,children:bo.createElement(uh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:ch,visible:"visible"===l,name:"Transition"})))})),uh=zd((function(e,t){var r,n;let{beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a,enter:c,enterFrom:l,enterTo:u,entered:d,leave:h,leaveFrom:p,leaveTo:f,...m}=e,g=we(null),_=Nd(g,t),v=null==(r=m.unmount)||r?Ud.Unmount:Ud.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(Zd);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,k]=ge(y?"visible":"hidden"),I=function(){let e=Ie(rh);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:T,unregister:C}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===Ud.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):Ad(E,{hidden:()=>C(g),visible:()=>T(g)})}),[E,g,T,C,y,v]);let S=Td({base:Xd(m.className),enter:Xd(c),enterFrom:Xd(l),enterTo:Xd(u),entered:Xd(d),leave:Xd(h),leaveFrom:Xd(p),leaveTo:Xd(f)}),R=function(e){let t=we(ah(e));return ve((()=>{t.current=ah(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=Od();ve((()=>{if(O&&"visible"===E&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,E,O]);let A=w&&y&&b,P=!O||b&&!w?"idle":y?"enter":"leave",N=function(e=0){let[t,r]=ge(e),n=Jd(),i=ke((e=>{n.current&&r((t=>t|e))}),[t,n]),o=ke((e=>Boolean(t&e)),[t]),s=ke((e=>{n.current&&r((t=>t&~e))}),[r,n]),a=ke((e=>{n.current&&r((t=>t^e))}),[r]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(0),x=Rd((e=>Ad(e,{enter:()=>{N.addFlag(qd.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(qd.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=Rd((e=>Ad(e,{enter:()=>{N.removeFlag(qd.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(qd.Closing),R.current.afterLeave()},idle:()=>{}}))),D=ih((()=>{k("hidden"),C(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Jd(),a=Sd(),c=Td(r);Id((()=>{e&&(c.current="enter")}),[e]),Id((()=>{let e=Cd();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(Qd(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:S,direction:P,onStart:Td((e=>{D.onStart(g,e,x)})),onStop:Td((e=>{D.onStop(g,e,L),"leave"===e&&!nh(D)&&(k("hidden"),C(g))}))});let M=m,U={ref:_};return A?M={...M,className:xd(m.className,...S.current.enter,...S.current.enterFrom)}:(M.className=xd(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),bo.createElement(rh.Provider,{value:D},bo.createElement(Kd,{value:Ad(E,{visible:qd.Open,hidden:qd.Closed})|N.flags},jd({ourProps:U,theirProps:M,defaultTag:"div",features:ch,visible:"visible"===E,name:"Transition.Child"})))})),dh=zd((function(e,t){let r=null!==Ie(Zd),n=null!==Wd();return bo.createElement(bo.Fragment,null,!r&&n?bo.createElement(lh,{ref:t,...e}):bo.createElement(uh,{ref:t,...e}))})),hh=Object.assign(lh,{Child:dh,Root:lh});const ph=({children:e})=>{const t=bo.Children.toArray(e),r=t.find((e=>e.type===fh)),n=t.find((e=>e.type===mh));return ui(hh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:ui("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[ui(hh,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",class:"-translate-y-6",children:r&&ui("div",{className:"flex items-center h-full",children:r})}),ui(hh,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",class:"opacity-0 -translate-y-6",children:n&&ui("div",{className:"flex items-center h-full",children:n})})]})})},fh=({children:e})=>ui(N,{children:e}),mh=({children:e})=>ui(N,{children:e});ph.Top=fh,ph.Bottom=mh;const gh=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:wd},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=(()=>{const[e,t]=ge(""),r=Ee((()=>e.replace(/ /g,"")),[e]);return{setPhoneNumber:t,phoneNumber:{valid:Ee((()=>r.startsWith("04")&&10===r.length||r.startsWith("614")&&11===r.length||r.startsWith("+614")&&12===r.length||/^\+642\d{7,9}$/.test(r)),[r]),formatted:Ee((()=>r.startsWith("04")?`+61${r.replace(/^0+/,"")}`:r.startsWith("614")?`+${r}`:r),[r]),masked:Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(r)),[r])}}})();ve((()=>{r("sign-up-viewed")}),[r]);const a=ke((()=>{i("")}),[]),c=ke((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e)}),[s.valid]),l=ke((async()=>{s.valid&&await e(s).then((()=>r("sign-up-completed"))).catch(i)}),[s,e,r]);return ke((()=>r("sign-up-declined").then(t)),[t,r]),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Join your workplace benefits program"}),ui(yd,{children:["Enter your ",ui("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",onChange:o,onfocusin:a,onfocusout:c}),ui("div",{className:"h-8 leading-none",children:ui("span",{className:"text-xs text-rose-500",children:n})}),ui("div",{className:"font-medium text-sm text-gray-900",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),ui(gd,{class:"mt-5 md:w-full text-white",onClickPromise:l,children:"Join your workplace"}),!1]})})]})},_h=""+new URL("assets/check-b48de75e.svg",import.meta.url).href,vh=({onContinue:e})=>ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"h-16 w-16 flex items-center justify-center rounded-full bg-blue-50 text-primary-base",children:ui(_h,{className:"h-7 w-7"})})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[ui(vd,{children:"You’ve joined your workplace benefits program"}),ui(yd,{children:"With your new Flare Benefits account, you now have access to a range of exclusive benefits available through your workplace."}),ui(gd,{class:"mt-5 w-full md:w-[240px]",onClickPromise:async()=>{e()},children:"Set up your benefits"})]})})]}),yh=""+new URL("assets/left-arrow-38f55b24.svg",import.meta.url).href,wh=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return ui("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:ke((()=>{if(!n)return i(!0),t().finally((()=>{i(!1)}))}),[n,t]),...r,children:[ui("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"primary"})})]})},bh=({children:e,...t})=>ui("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),Eh=({open:e})=>ui(bh,{open:e,children:ui("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[ui("span",{className:"animate-spin",children:ui(md,{size:"lg"})}),ui(vd,{children:"Creating your account"}),ui("div",{children:[ui(yd,{children:"This can take up to 30 seconds."}),ui(yd,{children:"Please don't navigate away or refresh your browser."})]})]})}),kh=({phoneNumber:e,onVerify:t,onResendOtp:r,onGoBack:n})=>{const{otp:i,setOtp:o}=(()=>{const[e,t]=ge("");return{otp:{valid:Ee((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[s,a]=ge(!1),[c,l]=ge(""),{countdown:u,restart:d}=(e=>{const[t,r]=ge(e),n=we(),i=ke((()=>{clearInterval(n.current)}),[]);return ve((()=>i),[i]),{countdown:t,restart:ke((()=>{let t=e;clearInterval(n.current),n.current=setInterval((()=>{t<0?clearInterval(n.current):r(t--)}),1e3)}),[e])}})(60);ve(d,[d]);const h=ke((()=>(a(!0),l(""),t(i.code).catch(l).finally((()=>{a(!1)})))),[t,i.code]),p=ke((()=>(l(""),r().then(d).catch(l))),[r,d]);return ui(N,{children:[ui(Eh,{open:s}),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Verify your mobile number"}),ui(yd,{children:["An SMS verification code has been sent to the number"," ",ui("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&ui("span",{className:"text-xs text-rose-500",children:c}),ui("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",ui(wh,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:p,children:"Resend SMS"}),0!==u&&ui(N,{children:["in ",u," secs"]})]}),ui(gd,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),ui(gd,{class:"mt-5 md:w-full bg-white hover:bg-gray-100 focus:ring-gray-200 border-0 shadow-none text-gray-700 border-gray-300",onClickPromise:async()=>{n()},children:ui("span",{className:"flex gap-3",children:[ui("img",{src:yh}),"Back"]})})]})})]})]})},Ih=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goNext:l}=(e=>{const[t,r]=ge(1),n=ke((()=>{const e=t-1;e>=1&&r(e)}),[t]),i=ke((()=>{const n=t+1;n<=e&&r(n)}),[t,e]);return{step:t,goBack:n,goNext:i}})(3),u=ke((t=>e(t.formatted).then((()=>{s(t.masked),l()}))),[l,e]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return ui(N,{children:[1===a&&ui(gh,{onSubmit:u,onDecline:i}),2===a&&ui(kh,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c}),3===a&&ui(vh,{onContinue:n})]})},Th=e=>{var t,r;throw"Auth_SessionExpired"===(null==(r=null==(t=e.response)?void 0:t.data)?void 0:r.code)&&window.location.reload(),e};let Ch;const Sh=()=>Ch;var Rh=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(Rh||{});const Oh=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Rh[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Ah=e=>{const[t,r]=ge(!1),{signUp:n,verifyOtp:i,resendOtp:o}={signUp:async(e,t,r)=>{await Sh().post("auth/signUp",{mobileNumber:e,source:t,channel:r}).catch(Oh)},verifyOtp:async(e,t,r)=>{await Sh().post("auth/verify",{otp:e,source:t,channel:r}).catch(Oh)},resendOtp:async()=>{await Sh().post("auth/resend").catch(Oh)}},s=()=>{r(!0),rs()};return t?ui(Qo,{}):ui(N,{children:ui("div",{className:"font-inter",children:[ui("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-50{z-index:50!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-20{margin-top:5rem!important;margin-bottom:5rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mb-1{margin-bottom:.25rem!important}.ml-3{margin-left:.75rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-20{margin-top:5rem!important}.mt-5{margin-top:1.25rem!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.h-10{height:2.5rem!important}.h-16{height:4rem!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-\\[1\\.25rem\\]{height:1.25rem!important}.h-\\[1\\.5rem\\]{height:1.5rem!important}.h-full{height:100%!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-7{width:1.75rem!important}.w-\\[1\\.25rem\\]{width:1.25rem!important}.w-\\[2\\.75rem\\]{width:2.75rem!important}.w-full{width:100%!important}.max-w-\\[40rem\\]{max-width:40rem!important}.max-w-\\[59\\.5rem\\]{max-width:59.5rem!important}.shrink-0{flex-shrink:0!important}.-translate-y-6{--tw-translate-y: -1.5rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-0{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-\\[1\\.25rem\\]{--tw-translate-x: 1.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-0{--tw-translate-y: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.gap-5{gap:1.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-0{border-width:0px!important}.border-2{border-width:2px!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity))!important}.bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-primary-base{background-color:var(--fl-color-primary)!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.fill-gray-200{fill:#e5e7eb!important}.fill-primary-base{fill:var(--fl-color-primary)!important}.fill-white{fill:#fff!important}.p-2{padding:.5rem!important}.px-10{padding-left:2.5rem!important;padding-right:2.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.leading-5{line-height:1.25rem!important}.leading-none{line-height:1!important}.text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-primary-base{color:var(--fl-color-primary)!important}.text-rose-500{--tw-text-opacity: 1 !important;color:rgb(244 63 94 / var(--tw-text-opacity))!important}.text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.accent-primary-base{accent-color:var(--fl-color-primary)!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-gray-200{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.delay-300{transition-delay:.3s!important}.duration-200{transition-duration:.2s!important}.duration-700{transition-duration:.7s!important}.duration-\\[600ms\\]{transition-duration:.6s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}:root{--fl-color-primary_from_host: var(--fl-color-primary);--fl-color-primary-light_from_host: var(--fl-color-primary-light);--fl-color-primary-dark_from_host: var(--fl-color-primary-dark);--fl-color-primary-disabled_from_host: var(--fl-color-primary-disabled);--fl-color-primary-hover_from_host: var(--fl-color-primary-hover);--fl-color-primary-focus_from_host: var(--fl-color-primary-focus);--fl-color-primary-text_from_host: var(--fl-color-primary-text);--fl-color-secondary_from_host: var(--fl-color-secondary);--fl-color-secondary-light_from_host: var(--fl-color-secondary-light);--fl-color-secondary-dark_from_host: var(--fl-color-secondary-dark);--fl-color-secondary-disabled_from_host: var(--fl-color-secondary-disabled);--fl-color-secondary-hover_from_host: var(--fl-color-secondary-hover);--fl-color-secondary-focus_from_host: var(--fl-color-secondary-focus);--fl-color-secondary-text_from_host: var(--fl-color-secondary-text)}*{--fl-color-primary: var(--fl-color-primary_from_host, #1890ff);--fl-color-primary-light: var(--fl-color-primary-light_from_host, #74c0ff);--fl-color-primary-dark: var(--fl-color-primary-dark_from_host, #006bce);--fl-color-primary-disabled: var(--fl-color-primary-disabled_from_host, #f5f5f5);--fl-color-primary-hover: var(--fl-color-primary-hover_from_host, #40a9ff);--fl-color-primary-focus: var(--fl-color-primary-focus_from_host, #40a9ff);--fl-color-primary-text: var(--fl-color-primary-text_from_host, white);--fl-color-secondary: var(--fl-color-secondary_from_host, #d3d3d3);--fl-color-secondary-light: var(--fl-color-secondary-light_from_host, #e1e1e1);--fl-color-secondary-dark: var(--fl-color-secondary-dark_from_host, #cecece);--fl-color-secondary-disabled: var(--fl-color-secondary-disabled_from_host, #f5f5f5);--fl-color-secondary-hover: var(--fl-color-secondary-hover_from_host, #ebebeb);--fl-color-secondary-focus: var(--fl-color-secondary-focus_from_host, #ebebeb);--fl-color-secondary-text: var(--fl-color-secondary-text_from_host, #262626)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)!important}.hover\\:bg-sky-50\\/50:hover{background-color:#f0f9ff80!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:ring-gray-200:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.focus\\:ring-primary-focus:focus{--tw-ring-color: var(--fl-color-primary-focus) !important}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:ring-gray-500:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-white:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-opacity-75:focus-visible{--tw-ring-opacity: .75 !important}.disabled\\:cursor-text:disabled{cursor:text!important}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.disabled\\:px-0:disabled{padding-left:0!important;padding-right:0!important}.disabled\\:text-gray-300:disabled{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.disabled\\:opacity-75:disabled{opacity:.75!important}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent!important}@media (min-width: 768px){.md\\:grid{display:grid!important}.md\\:w-\\[240px\\]{width:240px!important}.md\\:w-\\[300px\\]{width:300px!important}.md\\:w-auto{width:auto!important}.md\\:w-full{width:100%!important}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\\:text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.md\\:transition-none{transition-property:none!important}}\n".toString()}),ui(Ih,{onSignUp:t=>n(t,e.source,e.channel),onVerify:t=>i(t,e.source,e.channel),onResendOtp:o,onSuccess:s,onDecline:s})]})})},Ph=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),Nh=async(e,t)=>{await(async e=>{if(br)return br;const t=e.replace(/\/?$/,"");return br=_r.create({baseURL:`${t}`}),((e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:i})=>{e.interceptors.request.use((async e=>(t&&await t(e),e)),(async e=>{throw r&&await r(e),e})),e.interceptors.response.use((async e=>(n&&await n(e),e)),(async e=>{throw i&&await i(e),e}))})(br,{onRequestError:yr,onResponseError:wr}),br})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i}=await(async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.get("customer-profile/backend/v1.0/workplace-link/config",Er(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);Lu=r;const o=e.backendUrl;var s,a;return s=o,a=e.apolloAccessToken,s=s.replace(/\/?$/,""),Ch=_r.create({baseURL:`${s}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${a}`}}),Ch.interceptors.response.use((e=>e),Th),{identityProvider:n,isEstablished:i}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function xh(){return(xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var Lh=["context","children"];function Dh(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,Lh);return te(t,r)}function Mh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(Dh,xh({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[Uh(s[o].name)]=s[o].value);for(o=a.length;o--;){var c=e(a[o],null),l=a[o].slot;l?i[l]=O(Bh,{name:l},c):n[o]=c}var u=r?O(Bh,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function Uh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function jh(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[Uh(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function Fh(){Z(this._vdom=null,this._root)}function Bh(e,t){var r=this;return O("slot",xh({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}!function(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=Mh,i.prototype.attributeChangedCallback=jh,i.prototype.disconnectedCallback=Fh,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,i)}((e=>{const t={backendUrl:e["backend-url"],apolloAccessToken:e["access-token"],source:e.source,channel:e.channel},[r,n]=ge(!1),i=we(""),[o,s]=ge("Initializing");return vr((async e=>{if(t.backendUrl)try{const r=await Nh(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized")}catch{s("Error")}}),[t.backendUrl]),r?ui(Qo,{}):ui(N,{children:["Initializing"===o&&ui(di,{isActive:!0}),"Error"===o&&ui(ts,{}),"Initialized"===o&&ui("div",{id:"preact_root",children:[ui(oi,{}),ui(Ph,{children:["google"===i.current&&ui(fd,{...t}),"adb2c"===i.current&&ui(ns,{...t}),"flare-app-identity"===i.current&&ui(Ah,{...t})]})]})]})}),"workplace-link",["backend-url","access-token","source","channel"],{shadow:!1});
1717
+ `,fd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=Du().beforeAuthStateChanged((async e=>{t(await(null==e?void 0:e.getIdToken())??"")}));return ve((()=>r),[r]),{idToken:e}})(),[r,n]=ge(0),{apolloAccessToken:i}=e,[o,s]=ge("");vr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await kr(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(Ld){throw`[Link Workplace]: Error when requesting a workplace link: ${Ld}`}})(e).then((e=>{e.isEstablished?n(5):n(1)}));break;case 1:t&&n(2);break;case 2:n(3);break;case 3:await(async(e,r)=>{const{sub:n}=Me(i);try{return await Ir(t,e,n,r)}catch(Ld){throw`[Link Workplace]: Error when trying to establish workplace link: ${Ld}`}})(o,e),n(5);break;case 5:rs()}}catch(Ld){console.log(Ld),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return ui(pd,{children:[a&&ui(di,{isActive:a}),1===r&&ui(hd,{}),4===r&&ui(ts,{}),5===r&&ui(Qo,{})]})},md=e=>ui("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"lg"===e.size?"h-10 w-10":"h-5 w-5",children:[ui("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z",className:"light"===e.theme?"fill-white":"fill-gray-200","fill-opacity":"light"===e.theme?"0.3":"1"}),ui("path",{d:"M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z",className:"light"===e.theme?"fill-white":"fill-primary-base"})]}),gd=e=>{const[t,r]=ge(!1);return ui("button",{type:"button",className:`inline-flex items-center justify-center px-10 py-2 border border-transparent text-base font-medium rounded-md shadow-sm disabled:text-gray-300 bg-primary-base hover:bg-primary-hover disabled:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus w-full md:w-auto ${e.class} `,disabled:e.disabled,onClick:async()=>{if(e.onClickPromise&&!t){r(!0);try{await e.onClickPromise()}catch(n){}r(!1)}},children:[ui("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"light"})})]})},_d=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,...o})=>{const s=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return ui(N,{children:[ui("label",{className:"font-medium text-sm text-gray-900 text-left",children:ui("span",{children:t})}),ui("input",{type:"text",className:`p-2 border-0 ring-2 ring-gray-200 focus:outline-none focus-visible:ring-gray-500 text-base font-medium rounded-md shadow-sm w-full ${e}`,value:i,onKeyPress:s,onChange:e=>n(e.currentTarget.value),...o})]})},vd=({className:e,children:t})=>ui("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),yd=({className:e,children:t})=>ui("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),wd=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var bd=Object.defineProperty,Ed=(e,t,r)=>(((e,t,r)=>{t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let kd=new class{constructor(){Ed(this,"current",this.detect()),Ed(this,"handoffState","pending"),Ed(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},Id=(e,t)=>{kd.isServer?ve(e,t):ye(e,t)};function Td(e){let t=we(e);return Id((()=>{t.current=e}),[e]),t}function Cd(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=Cd();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Sd(){let[e]=ge(Cd);return ve((()=>()=>e.dispose()),[e]),e}let Rd=function(e){let t=Td(e);return bo.useCallback(((...e)=>t.current(...e)),[t])};function Od(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Eo&&Eo.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(kd.isHandoffComplete);return t&&!1===kd.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>kd.handoff()),[]),!e&&t}function Ad(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ad),n}let Pd=Symbol();function Nd(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=Rd((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Pd])))?void 0:r}function xd(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var Ld,Dd,Md=((Dd=Md||{})[Dd.None=0]="None",Dd[Dd.RenderStrategy=1]="RenderStrategy",Dd[Dd.Static=2]="Static",Dd),Ud=((Ld=Ud||{})[Ld.Unmount=0]="Unmount",Ld[Ld.Hidden=1]="Hidden",Ld);function jd({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Bd(t,e);if(o)return Fd(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return Fd(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return Ad(e?0:1,{0:()=>null,1:()=>Fd({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return Fd(a,r,n,s)}function Fd(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=Vd(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},l="function"==typeof o?o(t):o;"className"in a&&a.className&&"function"==typeof a.className&&(a.className=a.className(t));let u={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n);e&&(u["data-headlessui-state"]=r.join(" "))}if(i===N&&Object.keys(Hd(a)).length>0){if(!so(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=l.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>xd(null==e?void 0:e.className(...t),a.className):xd(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return co(l,Object.assign({},Bd(l.props,Hd(Vd(a,["ref"]))),u,c,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}}(l.ref,c.ref),r))}return O(i,Object.assign({},Vd(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Bd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map((e=>[e,void 0]))));for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function zd(e){var t;return Object.assign(Ci(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Hd(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Vd(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let $d=re(null);$d.displayName="OpenClosedContext";var qd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(qd||{});function Wd(){return Ie($d)}function Kd({value:e,children:t}){return bo.createElement($d.Provider,{value:e},t)}function Jd(){let e=we(!1);return Id((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Gd(e,...t){e&&t.length>0&&e.classList.add(...t)}function Yd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Qd(e,t,r,n){let i=r?"enter":"leave",o=Cd(),s=void 0!==n?function(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}(n):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let a=Ad(i,{enter:()=>t.enter,leave:()=>t.leave}),c=Ad(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=Ad(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Yd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Gd(e,...t.base,...a,...l),o.nextFrame((()=>{Yd(e,...t.base,...a,...l),Gd(e,...t.base,...a,...c),function(e,t){let r=Cd();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,s]=[n,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),a=o+s;if(0!==a){r.group((r=>{r.setTimeout((()=>{t(),r.dispose()}),a),r.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&r.dispose()}))}));let n=r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),n())}))}else t();r.add((()=>t())),r.dispose}(e,(()=>(Yd(e,...t.base,...a),Gd(e,...t.base,...t.entered),s())))})),o.dispose}function Xd(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Zd=re(null);Zd.displayName="TransitionContext";var eh,th=((eh=th||{}).Visible="visible",eh.Hidden="hidden",eh);let rh=re(null);function nh(e){return"children"in e?nh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function ih(e,t){let r=Td(e),n=we([]),i=Jd(),o=Sd(),s=Rd(((e,t=Ud.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(Ad(t,{[Ud.Unmount](){n.current.splice(s,1)},[Ud.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!nh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=Rd((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>s(e,Ud.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=Rd(((e,r,n)=>{c.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{c.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),h=Rd(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>r(t)))}));return Ee((()=>({children:n,register:a,unregister:s,onStart:d,onStop:h,wait:l,chains:u})),[a,s,n,d,h,u,l])}function oh(){}rh.displayName="NestingContext";let sh=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ah(e){var t;let r={};for(let n of sh)r[n]=null!=(t=e[n])?t:oh;return r}let ch=Md.RenderStrategy;let lh=zd((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=Nd(s,t);Od();let c=Wd();if(void 0===r&&null!==c&&(r=(c&qd.Open)===qd.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=ge(r?"visible":"hidden"),d=ih((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);Id((()=>{!1!==h&&f.current[f.current.length-1]!==r&&(f.current.push(r),p(!1))}),[f,r]);let m=Ee((()=>({show:r,appear:n,initial:h})),[r,n,h]);ve((()=>{if(r)u("visible");else if(nh(d)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&u("hidden")}else u("hidden")}),[r,d]);let g={unmount:i},_=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return bo.createElement(rh.Provider,{value:d},bo.createElement(Zd.Provider,{value:m},jd({ourProps:{...g,as:N,children:bo.createElement(uh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:ch,visible:"visible"===l,name:"Transition"})))})),uh=zd((function(e,t){var r,n;let{beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a,enter:c,enterFrom:l,enterTo:u,entered:d,leave:h,leaveFrom:p,leaveTo:f,...m}=e,g=we(null),_=Nd(g,t),v=null==(r=m.unmount)||r?Ud.Unmount:Ud.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(Zd);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,k]=ge(y?"visible":"hidden"),I=function(){let e=Ie(rh);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:T,unregister:C}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===Ud.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):Ad(E,{hidden:()=>C(g),visible:()=>T(g)})}),[E,g,T,C,y,v]);let S=Td({base:Xd(m.className),enter:Xd(c),enterFrom:Xd(l),enterTo:Xd(u),entered:Xd(d),leave:Xd(h),leaveFrom:Xd(p),leaveTo:Xd(f)}),R=function(e){let t=we(ah(e));return ve((()=>{t.current=ah(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=Od();ve((()=>{if(O&&"visible"===E&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,E,O]);let A=w&&y&&b,P=!O||b&&!w?"idle":y?"enter":"leave",N=function(e=0){let[t,r]=ge(e),n=Jd(),i=ke((e=>{n.current&&r((t=>t|e))}),[t,n]),o=ke((e=>Boolean(t&e)),[t]),s=ke((e=>{n.current&&r((t=>t&~e))}),[r,n]),a=ke((e=>{n.current&&r((t=>t^e))}),[r]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(0),x=Rd((e=>Ad(e,{enter:()=>{N.addFlag(qd.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(qd.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=Rd((e=>Ad(e,{enter:()=>{N.removeFlag(qd.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(qd.Closing),R.current.afterLeave()},idle:()=>{}}))),D=ih((()=>{k("hidden"),C(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Jd(),a=Sd(),c=Td(r);Id((()=>{e&&(c.current="enter")}),[e]),Id((()=>{let e=Cd();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(Qd(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:S,direction:P,onStart:Td((e=>{D.onStart(g,e,x)})),onStop:Td((e=>{D.onStop(g,e,L),"leave"===e&&!nh(D)&&(k("hidden"),C(g))}))});let M=m,U={ref:_};return A?M={...M,className:xd(m.className,...S.current.enter,...S.current.enterFrom)}:(M.className=xd(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),bo.createElement(rh.Provider,{value:D},bo.createElement(Kd,{value:Ad(E,{visible:qd.Open,hidden:qd.Closed})|N.flags},jd({ourProps:U,theirProps:M,defaultTag:"div",features:ch,visible:"visible"===E,name:"Transition.Child"})))})),dh=zd((function(e,t){let r=null!==Ie(Zd),n=null!==Wd();return bo.createElement(bo.Fragment,null,!r&&n?bo.createElement(lh,{ref:t,...e}):bo.createElement(uh,{ref:t,...e}))})),hh=Object.assign(lh,{Child:dh,Root:lh});const ph=({children:e})=>{const t=bo.Children.toArray(e),r=t.find((e=>e.type===fh)),n=t.find((e=>e.type===mh));return ui(hh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:ui("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[ui(hh,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",class:"-translate-y-6",children:r&&ui("div",{className:"flex items-center h-full",children:r})}),ui(hh,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",class:"opacity-0 -translate-y-6",children:n&&ui("div",{className:"flex items-center h-full",children:n})})]})})},fh=({children:e})=>ui(N,{children:e}),mh=({children:e})=>ui(N,{children:e});ph.Top=fh,ph.Bottom=mh;const gh=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:wd},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=(()=>{const[e,t]=ge(""),r=Ee((()=>e.replace(/ /g,"")),[e]);return{setPhoneNumber:t,phoneNumber:{valid:Ee((()=>r.startsWith("04")&&10===r.length||r.startsWith("614")&&11===r.length||r.startsWith("+614")&&12===r.length||/^\+642\d{7,9}$/.test(r)),[r]),formatted:Ee((()=>r.startsWith("04")?`+61${r.replace(/^0+/,"")}`:r.startsWith("614")?`+${r}`:r),[r]),masked:Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(r)),[r])}}})();ve((()=>{r("sign-up-viewed")}),[r]);const a=ke((()=>{i("")}),[]),c=ke((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e)}),[s.valid]),l=ke((async()=>{s.valid&&await e(s).then((()=>r("sign-up-completed"))).catch(i)}),[s,e,r]);return ke((()=>r("sign-up-declined").then(t)),[t,r]),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Join your workplace benefits program"}),ui(yd,{children:["Enter your ",ui("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",onChange:o,onfocusin:a,onfocusout:c}),ui("div",{className:"h-8 leading-none",children:ui("span",{className:"text-xs text-rose-500",children:n})}),ui("div",{className:"font-medium text-sm text-gray-900",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),ui(gd,{class:"mt-5 md:w-full text-white",onClickPromise:l,children:"Join your workplace"}),!1]})})]})},_h=""+new URL("assets/check-b48de75e.svg",import.meta.url).href,vh=({onContinue:e})=>ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"h-16 w-16 flex items-center justify-center rounded-full bg-blue-50 text-primary-base",children:ui(_h,{className:"h-7 w-7"})})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[ui(vd,{children:"You’ve joined your workplace benefits program"}),ui(yd,{children:"With your new Flare Benefits account, you now have access to a range of exclusive benefits available through your workplace."}),ui(gd,{class:"mt-5 w-full md:w-[240px]",onClickPromise:async()=>{e()},children:"Set up your benefits"})]})})]}),yh=""+new URL("assets/left-arrow-38f55b24.svg",import.meta.url).href,wh=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return ui("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:ke((()=>{if(!n)return i(!0),t().finally((()=>{i(!1)}))}),[n,t]),...r,children:[ui("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"primary"})})]})},bh=({children:e,...t})=>ui("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),Eh=({open:e})=>ui(bh,{open:e,children:ui("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[ui("span",{className:"animate-spin",children:ui(md,{size:"lg"})}),ui(vd,{children:"Creating your account"}),ui("div",{children:[ui(yd,{children:"This can take up to 30 seconds."}),ui(yd,{children:"Please don't navigate away or refresh your browser."})]})]})}),kh=({phoneNumber:e,onVerify:t,onResendOtp:r,onGoBack:n})=>{const{otp:i,setOtp:o}=(()=>{const[e,t]=ge("");return{otp:{valid:Ee((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[s,a]=ge(!1),[c,l]=ge(""),{countdown:u,restart:d}=(e=>{const[t,r]=ge(e),n=we(),i=ke((()=>{clearInterval(n.current)}),[]);return ve((()=>i),[i]),{countdown:t,restart:ke((()=>{let t=e;clearInterval(n.current),n.current=setInterval((()=>{t<0?clearInterval(n.current):r(t--)}),1e3)}),[e])}})(60);ve(d,[d]);const h=ke((()=>(a(!0),l(""),t(i.code).catch(l).finally((()=>{a(!1)})))),[t,i.code]),p=ke((()=>(l(""),r().then(d).catch(l))),[r,d]);return ui(N,{children:[ui(Eh,{open:s}),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Verify your mobile number"}),ui(yd,{children:["An SMS verification code has been sent to the number"," ",ui("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&ui("span",{className:"text-xs text-rose-500",children:c}),ui("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",ui(wh,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:p,children:"Resend SMS"}),0!==u&&ui(N,{children:["in ",u," secs"]})]}),ui(gd,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),ui(gd,{class:"mt-5 md:w-full bg-white hover:bg-gray-100 focus:ring-gray-200 border-0 shadow-none text-gray-700 border-gray-300",onClickPromise:async()=>{n()},children:ui("span",{className:"flex gap-3",children:[ui("img",{src:yh}),"Back"]})})]})})]})]})},Ih=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goNext:l}=(e=>{const[t,r]=ge(1),n=ke((()=>{const e=t-1;e>=1&&r(e)}),[t]),i=ke((()=>{const n=t+1;n<=e&&r(n)}),[t,e]);return{step:t,goBack:n,goNext:i}})(3),u=ke((t=>e(t.formatted).then((()=>{s(t.masked),l()}))),[l,e]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return ui(N,{children:[1===a&&ui(gh,{onSubmit:u,onDecline:i}),2===a&&ui(kh,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c}),3===a&&ui(vh,{onContinue:n})]})},Th=e=>{var t,r;throw"Auth_SessionExpired"===(null==(r=null==(t=e.response)?void 0:t.data)?void 0:r.code)&&window.location.reload(),e};let Ch;const Sh=()=>Ch;var Rh=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(Rh||{});const Oh=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Rh[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Ah=()=>{const[e,t]=ge(!1),{signUp:r,verifyOtp:n,resendOtp:i}={signUp:async e=>{await Sh().post("auth/signUp",{mobileNumber:e}).catch(Oh)},verifyOtp:async e=>{await Sh().post("auth/verify",{otp:e}).catch(Oh)},resendOtp:async()=>{await Sh().post("auth/resend").catch(Oh)}},o=()=>{t(!0),rs()};return e?ui(Qo,{}):ui(N,{children:ui("div",{className:"font-inter",children:[ui("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-50{z-index:50!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-20{margin-top:5rem!important;margin-bottom:5rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mb-1{margin-bottom:.25rem!important}.ml-3{margin-left:.75rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-20{margin-top:5rem!important}.mt-5{margin-top:1.25rem!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.h-10{height:2.5rem!important}.h-16{height:4rem!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-\\[1\\.25rem\\]{height:1.25rem!important}.h-\\[1\\.5rem\\]{height:1.5rem!important}.h-full{height:100%!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-7{width:1.75rem!important}.w-\\[1\\.25rem\\]{width:1.25rem!important}.w-\\[2\\.75rem\\]{width:2.75rem!important}.w-full{width:100%!important}.max-w-\\[40rem\\]{max-width:40rem!important}.max-w-\\[59\\.5rem\\]{max-width:59.5rem!important}.shrink-0{flex-shrink:0!important}.-translate-y-6{--tw-translate-y: -1.5rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-0{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-\\[1\\.25rem\\]{--tw-translate-x: 1.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-0{--tw-translate-y: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.gap-5{gap:1.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-0{border-width:0px!important}.border-2{border-width:2px!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity))!important}.bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-primary-base{background-color:var(--fl-color-primary)!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.fill-gray-200{fill:#e5e7eb!important}.fill-primary-base{fill:var(--fl-color-primary)!important}.fill-white{fill:#fff!important}.p-2{padding:.5rem!important}.px-10{padding-left:2.5rem!important;padding-right:2.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.leading-5{line-height:1.25rem!important}.leading-none{line-height:1!important}.text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-primary-base{color:var(--fl-color-primary)!important}.text-rose-500{--tw-text-opacity: 1 !important;color:rgb(244 63 94 / var(--tw-text-opacity))!important}.text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.accent-primary-base{accent-color:var(--fl-color-primary)!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-gray-200{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.delay-300{transition-delay:.3s!important}.duration-200{transition-duration:.2s!important}.duration-700{transition-duration:.7s!important}.duration-\\[600ms\\]{transition-duration:.6s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}:root{--fl-color-primary_from_host: var(--fl-color-primary);--fl-color-primary-light_from_host: var(--fl-color-primary-light);--fl-color-primary-dark_from_host: var(--fl-color-primary-dark);--fl-color-primary-disabled_from_host: var(--fl-color-primary-disabled);--fl-color-primary-hover_from_host: var(--fl-color-primary-hover);--fl-color-primary-focus_from_host: var(--fl-color-primary-focus);--fl-color-primary-text_from_host: var(--fl-color-primary-text);--fl-color-secondary_from_host: var(--fl-color-secondary);--fl-color-secondary-light_from_host: var(--fl-color-secondary-light);--fl-color-secondary-dark_from_host: var(--fl-color-secondary-dark);--fl-color-secondary-disabled_from_host: var(--fl-color-secondary-disabled);--fl-color-secondary-hover_from_host: var(--fl-color-secondary-hover);--fl-color-secondary-focus_from_host: var(--fl-color-secondary-focus);--fl-color-secondary-text_from_host: var(--fl-color-secondary-text)}*{--fl-color-primary: var(--fl-color-primary_from_host, #1890ff);--fl-color-primary-light: var(--fl-color-primary-light_from_host, #74c0ff);--fl-color-primary-dark: var(--fl-color-primary-dark_from_host, #006bce);--fl-color-primary-disabled: var(--fl-color-primary-disabled_from_host, #f5f5f5);--fl-color-primary-hover: var(--fl-color-primary-hover_from_host, #40a9ff);--fl-color-primary-focus: var(--fl-color-primary-focus_from_host, #40a9ff);--fl-color-primary-text: var(--fl-color-primary-text_from_host, white);--fl-color-secondary: var(--fl-color-secondary_from_host, #d3d3d3);--fl-color-secondary-light: var(--fl-color-secondary-light_from_host, #e1e1e1);--fl-color-secondary-dark: var(--fl-color-secondary-dark_from_host, #cecece);--fl-color-secondary-disabled: var(--fl-color-secondary-disabled_from_host, #f5f5f5);--fl-color-secondary-hover: var(--fl-color-secondary-hover_from_host, #ebebeb);--fl-color-secondary-focus: var(--fl-color-secondary-focus_from_host, #ebebeb);--fl-color-secondary-text: var(--fl-color-secondary-text_from_host, #262626)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)!important}.hover\\:bg-sky-50\\/50:hover{background-color:#f0f9ff80!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:ring-gray-200:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.focus\\:ring-primary-focus:focus{--tw-ring-color: var(--fl-color-primary-focus) !important}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:ring-gray-500:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-white:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-opacity-75:focus-visible{--tw-ring-opacity: .75 !important}.disabled\\:cursor-text:disabled{cursor:text!important}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.disabled\\:px-0:disabled{padding-left:0!important;padding-right:0!important}.disabled\\:text-gray-300:disabled{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.disabled\\:opacity-75:disabled{opacity:.75!important}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent!important}@media (min-width: 768px){.md\\:grid{display:grid!important}.md\\:w-\\[240px\\]{width:240px!important}.md\\:w-\\[300px\\]{width:300px!important}.md\\:w-auto{width:auto!important}.md\\:w-full{width:100%!important}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\\:text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.md\\:transition-none{transition-property:none!important}}\n".toString()}),ui(Ih,{onSignUp:r,onVerify:n,onResendOtp:i,onSuccess:o,onDecline:o})]})})},Ph=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),Nh=async(e,t)=>{await(async e=>{if(br)return br;const t=e.replace(/\/?$/,"");return br=_r.create({baseURL:`${t}`}),((e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:i})=>{e.interceptors.request.use((async e=>(t&&await t(e),e)),(async e=>{throw r&&await r(e),e})),e.interceptors.response.use((async e=>(n&&await n(e),e)),(async e=>{throw i&&await i(e),e}))})(br,{onRequestError:yr,onResponseError:wr}),br})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i}=await(async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.get("customer-profile/backend/v1.0/workplace-link/config",Er(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);Lu=r;const o=e.backendUrl;var s,a;return s=o,a=e.apolloAccessToken,s=s.replace(/\/?$/,""),Ch=_r.create({baseURL:`${s}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${a}`}}),Ch.interceptors.response.use((e=>e),Th),{identityProvider:n,isEstablished:i}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function xh(){return(xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var Lh=["context","children"];function Dh(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,Lh);return te(t,r)}function Mh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(Dh,xh({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[Uh(s[o].name)]=s[o].value);for(o=a.length;o--;){var c=e(a[o],null),l=a[o].slot;l?i[l]=O(Bh,{name:l},c):n[o]=c}var u=r?O(Bh,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function Uh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function jh(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[Uh(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function Fh(){Z(this._vdom=null,this._root)}function Bh(e,t){var r=this;return O("slot",xh({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}!function(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=Mh,i.prototype.attributeChangedCallback=jh,i.prototype.disconnectedCallback=Fh,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,i)}((e=>{const t={backendUrl:e["backend-url"],apolloAccessToken:e["access-token"]},[r,n]=ge(!1),i=we(""),[o,s]=ge("Initializing");return vr((async e=>{if(t.backendUrl)try{const r=await Nh(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized")}catch{s("Error")}}),[t.backendUrl]),r?ui(Qo,{}):ui(N,{children:["Initializing"===o&&ui(di,{isActive:!0}),"Error"===o&&ui(ts,{}),"Initialized"===o&&ui("div",{id:"preact_root",children:[ui(oi,{}),ui(Ph,{children:["google"===i.current&&ui(fd,{...t}),"adb2c"===i.current&&ui(ns,{...t}),"flare-app-identity"===i.current&&ui(Ah,{...t})]})]})]})}),"workplace-link",["backend-url","access-token"],{shadow:!1});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/apollo-customer-workplace-link",
3
- "version": "1.56.43445",
3
+ "version": "1.56.43596",
4
4
  "license": "MIT",
5
5
  "main": "build/bundle.js",
6
6
  "files": [