@flarehr/apollo-customer-workplace-link 1.3.14596 → 1.3.14633
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/build/bundle.esm.js +1 -1
- package/package.json +1 -1
package/build/bundle.esm.js
CHANGED
|
@@ -1714,4 +1714,4 @@ Ka("firebase","10.5.2","app");let pd=null,fd=null;const md=()=>{if(!pd){if(!fd)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
|
-
`,Jd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=md().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("");Xr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await nn(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(gh){throw`[Link Workplace]: Error when requesting a workplace link: ${gh}`}})(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 on(t,e,n,r)}catch(gh){throw`[Link Workplace]: Error when trying to establish workplace link: ${gh}`}})(o,e),n(5);break;case 5:Ms()}}catch(gh){console.log(gh),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return $i(Kd,{children:[a&&$i(qi,{isActive:a}),1===r&&$i(Wd,{}),4===r&&$i(Ds,{}),5===r&&$i(Ps,{})]})};var Gd=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(Gd||{});const Yd=e=>$i("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:[$i("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"}),$i("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"})]}),Qd=e=>{const[t,r]=ge(!1);return $i("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:[$i("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&$i("div",{className:"absolute animate-spin",children:$i(Yd,{theme:"light"})})]})},Xd=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,iconElement:o,...s})=>{const a=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return $i(N,{children:[$i("label",{className:"font-medium text-sm text-gray-900 text-left",children:$i("span",{children:t})}),$i("div",{className:"relative",children:[$i("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:a,onChange:e=>n(e.currentTarget.value),...s}),o]})]})},Zd=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return $i("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:[$i("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&$i("div",{className:"absolute animate-spin",children:$i(Yd,{theme:"primary"})})]})},eh=({className:e,children:t})=>$i("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),th=({className:e,children:t})=>$i("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),rh=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var nh=Object.defineProperty,ih=(e,t,r)=>(((e,t,r)=>{t in e?nh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let oh=new class{constructor(){ih(this,"current",this.detect()),ih(this,"handoffState","pending"),ih(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}},sh=(e,t)=>{oh.isServer?ve(e,t):ye(e,t)};function ah(e){let t=we(e);return sh((()=>{t.current=e}),[e]),t}function ch(){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=ch();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 lh(){let[e]=ge(ch);return ve((()=>()=>e.dispose()),[e]),e}let uh=function(e){let t=ah(e);return ts.useCallback(((...e)=>t.current(...e)),[t])};function dh(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in rs&&rs.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(oh.isHandoffComplete);return t&&!1===oh.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>oh.handoff()),[]),!e&&t}function hh(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,hh),n}let ph=Symbol();function fh(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=uh((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[ph])))?void 0:r}function mh(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var gh,_h,vh=((_h=vh||{})[_h.None=0]="None",_h[_h.RenderStrategy=1]="RenderStrategy",_h[_h.Static=2]="Static",_h),yh=((gh=yh||{})[gh.Unmount=0]="Unmount",gh[gh.Hidden=1]="Hidden",gh);function wh({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Eh(t,e);if(o)return bh(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return bh(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return hh(e?0:1,{0:()=>null,1:()=>bh({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return bh(a,r,n,s)}function bh(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=Th(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(Ih(a)).length>0){if(!zo(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)=>mh(null==e?void 0:e.className(...t),a.className):mh(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return Vo(l,Object.assign({},Eh(l.props,Ih(Th(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({},Th(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Eh(...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 kh(e){var t;return Object.assign(so(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ih(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Th(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let Sh=re(null);Sh.displayName="OpenClosedContext";var Ch=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ch||{});function Rh(){return Ie(Sh)}function Oh({value:e,children:t}){return ts.createElement(Sh.Provider,{value:e},t)}function Ah(){let e=we(!1);return sh((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Ph(e,...t){e&&t.length>0&&e.classList.add(...t)}function Nh(e,...t){e&&t.length>0&&e.classList.remove(...t)}function xh(e,t,r,n){let i=r?"enter":"leave",o=ch(),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=hh(i,{enter:()=>t.enter,leave:()=>t.leave}),c=hh(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=hh(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Nh(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ph(e,...t.base,...a,...l),o.nextFrame((()=>{Nh(e,...t.base,...a,...l),Ph(e,...t.base,...a,...c),function(e,t){let r=ch();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,(()=>(Nh(e,...t.base,...a),Ph(e,...t.base,...t.entered),s())))})),o.dispose}function Lh(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Dh=re(null);Dh.displayName="TransitionContext";var Mh,Uh=((Mh=Uh||{}).Visible="visible",Mh.Hidden="hidden",Mh);let jh=re(null);function Fh(e){return"children"in e?Fh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Bh(e,t){let r=ah(e),n=we([]),i=Ah(),o=lh(),s=uh(((e,t=yh.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(hh(t,{[yh.Unmount](){n.current.splice(s,1)},[yh.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!Fh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=uh((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,yh.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=uh(((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=uh(((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 zh(){}jh.displayName="NestingContext";let Hh=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Vh(e){var t;let r={};for(let n of Hh)r[n]=null!=(t=e[n])?t:zh;return r}let $h=vh.RenderStrategy;let qh=kh((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=fh(s,t);dh();let c=Rh();if(void 0===r&&null!==c&&(r=(c&Ch.Open)===Ch.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=Bh((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);sh((()=>{!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(Fh(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},_=uh((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=uh((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return ts.createElement(jh.Provider,{value:d},ts.createElement(Dh.Provider,{value:m},wh({ourProps:{...g,as:N,children:ts.createElement(Wh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:$h,visible:"visible"===l,name:"Transition"})))})),Wh=kh((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),_=fh(g,t),v=null==(r=m.unmount)||r?yh.Unmount:yh.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(Dh);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(jh);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:S}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===yh.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):hh(E,{hidden:()=>S(g),visible:()=>T(g)})}),[E,g,T,S,y,v]);let C=ah({base:Lh(m.className),enter:Lh(c),enterFrom:Lh(l),enterTo:Lh(u),entered:Lh(d),leave:Lh(h),leaveFrom:Lh(p),leaveTo:Lh(f)}),R=function(e){let t=we(Vh(e));return ve((()=>{t.current=Vh(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=dh();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=Ah(),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=uh((e=>hh(e,{enter:()=>{N.addFlag(Ch.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(Ch.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=uh((e=>hh(e,{enter:()=>{N.removeFlag(Ch.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(Ch.Closing),R.current.afterLeave()},idle:()=>{}}))),D=Bh((()=>{k("hidden"),S(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Ah(),a=lh(),c=ah(r);sh((()=>{e&&(c.current="enter")}),[e]),sh((()=>{let e=ch();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(xh(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:C,direction:P,onStart:ah((e=>{D.onStart(g,e,x)})),onStop:ah((e=>{D.onStop(g,e,L),"leave"===e&&!Fh(D)&&(k("hidden"),S(g))}))});let M=m,U={ref:_};return A?M={...M,className:mh(m.className,...C.current.enter,...C.current.enterFrom)}:(M.className=mh(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),ts.createElement(jh.Provider,{value:D},ts.createElement(Oh,{value:hh(E,{visible:Ch.Open,hidden:Ch.Closed})|N.flags},wh({ourProps:U,theirProps:M,defaultTag:"div",features:$h,visible:"visible"===E,name:"Transition.Child"})))})),Kh=kh((function(e,t){let r=null!==Ie(Dh),n=null!==Rh();return ts.createElement(ts.Fragment,null,!r&&n?ts.createElement(qh,{ref:t,...e}):ts.createElement(Wh,{ref:t,...e}))})),Jh=Object.assign(qh,{Child:Kh,Root:qh});const Gh=({children:e})=>{const t=ts.Children.toArray(e),r=t.find((e=>e.type===Yh)),n=t.find((e=>e.type===Qh));return $i(Jh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:$i("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[$i(Jh,{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&&$i("div",{className:"flex items-center h-full",children:r})}),$i(Jh,{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&&$i("div",{className:"flex items-center h-full",children:n})})]})})},Yh=({children:e})=>$i(N,{children:e}),Qh=({children:e})=>$i(N,{children:e});Gh.Top=Yh,Gh.Bottom=Qh;const Xh={verfiedPhoneNumber:void 0},Zh=re(Xh),ep=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},O("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),tp=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:rh},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=(()=>{const{verfiedPhoneNumber:e}=Ie(Zh),[t,r]=ge(e??""),n=Ee((()=>t.replace(/ /g,"")),[t]),i=Ee((()=>n.startsWith("04")&&10===n.length||n.startsWith("614")&&11===n.length||n.startsWith("+614")&&12===n.length||/^\+642\d{7,9}$/.test(n)),[n]),o=Ee((()=>n.startsWith("04")?`+61${n.replace(/^0+/,"")}`:n.startsWith("614")?`+${n}`:n),[n]),s=Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(n)),[n]),a=Ee((()=>o===e),[o,e]);return{setPhoneNumber:r,phoneNumber:{valid:i,formatted:o,masked:s,isVerified:a}}})(),[a,c]=ge(s.isVerified);ve((()=>{r("sign-up-viewed")}),[r]);const l=ke((()=>{i("")}),[]),u=ke((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),d=ke((async()=>{s.valid&&await e(s).then((()=>r("sign-up-completed"))).catch(i)}),[s,e,r]);ke((()=>r("sign-up-declined").then(t)),[t,r]);const h=ke((async()=>{c(!1)}),[]),p=a?$i("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified"," ",$i("span",{className:"ml-1",children:$i(ep,{})})]}):void 0;return $i(Gh,{children:[$i(Gh.Top,{children:$i("div",{className:"flex flex-col gap-5",children:[$i(eh,{children:"Join your workplace benefits program"}),$i(th,{children:[a?"Confirm ":"Enter "," your ",$i("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),$i(Gh.Bottom,{children:$i("div",{className:"mt-5 md:w-[300px] text-left",children:[$i(Xd,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",value:s.formatted,onChange:o,onfocusin:l,onfocusout:u,iconElement:p,disabled:a}),0!==n.length&&$i("div",{className:"h-8 leading-none",children:$i("span",{className:"text-xs text-rose-500",children:n})}),a&&$i("div",{className:"mt-2 ml-2 mb-2 leading-none",children:$i("span",{className:"text-xs",children:["Not your personal number?",$i(Zd,{class:"text-blue-500",onClick:h,children:"Change number"})]})}),$i("div",{className:"font-medium text-sm text-gray-900 mt-2",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",$i("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",$i("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),$i(Qd,{class:"mt-5 md:w-full text-white",onClickPromise:d,children:"Join your workplace"}),!1]})})]})},rp=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},O("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),np=({children:e,...t})=>$i("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),ip=({open:e})=>$i(np,{open:e,children:$i("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[$i("span",{className:"animate-spin",children:$i(Yd,{size:"lg"})}),$i(eh,{children:"Creating your account"}),$i("div",{children:[$i(th,{children:"This can take up to 30 seconds."}),$i(th,{children:"Please don't navigate away or refresh your browser."})]})]})}),op=({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 $i(N,{children:[$i(ip,{open:s}),$i(Gh,{children:[$i(Gh.Top,{children:$i("div",{className:"flex flex-col gap-5",children:[$i(eh,{children:"Verify your mobile number"}),$i(th,{children:["An SMS verification code has been sent to the number"," ",$i("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),$i(Gh.Bottom,{children:$i("div",{className:"mt-5 md:w-[300px] text-left",children:[$i(Xd,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&$i("span",{className:"text-xs text-rose-500",children:c}),$i("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",$i(Zd,{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&&$i(N,{children:["in ",u," secs"]})]}),$i(Qd,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),$i(Qd,{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:$i("span",{className:"flex gap-3",children:[$i(rp,{}),"Back"]})})]})})]})]})},sp=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goToStep:l}=(()=>{const[e,t]=ge(0),r=ke((()=>{const r=e-1;r>=0&&t(r)}),[e]),n=ke((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:r,goToStep:n}})(),u=ke((t=>e(t.formatted).then((e=>{s(t.masked),e.isVerificationRequired?l(Gd.OTP):n()}))),[l,e,n]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return $i(N,{children:[a===Gd.PHONE_NUMBER&&$i(tp,{onSubmit:u,onDecline:i}),a===Gd.OTP&&$i(op,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c})]})},ap=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 cp;const lp=()=>cp;var up=(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))(up||{});const dp=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw up[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},hp=e=>{const[t,r]=ge(!1),{signUp:n,verifyOtp:i,resendOtp:o}={signUp:async(e,t="Invite",r="invite")=>lp().post("v2.0/auth/signUp",{mobileNumber:e,source:t,channel:r}).catch((e=>(dp(e),Promise.reject()))).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async(e,t="Invite",r="invite")=>{await lp().post("auth/verify",{otp:e,source:t,channel:r}).catch(dp)},resendOtp:async()=>{await lp().post("auth/resend").catch(dp)}},s=()=>{r(!0),Ms()};return t?$i(Ps,{}):$i(N,{children:$i("div",{className:"font-inter",children:[$i("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.inset-y-0{top:0!important;bottom:0!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}.mb-2{margin-bottom:.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!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}.pr-3{padding-right:.75rem!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-blue-500{--tw-text-opacity: 1 !important;color:rgb(59 130 246 / var(--tw-text-opacity))!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-green-700{--tw-text-opacity: 1 !important;color:rgb(21 128 61 / 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()}),$i(sp,{onSignUp:t=>n(t,e.source,e.channel),onVerify:t=>i(t,e.source,e.channel),onResendOtp:o,onSuccess:s,onDecline:s})]})})},pp=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),fp=async(e,t)=>{await(async e=>{if(tn)return tn;const t=e.replace(/\/?$/,"");return tn=Qr.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}))})(tn,{onRequestError:Zr,onResponseError:en}),tn})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}=await(async(e,t)=>{if(!tn)throw new Error("Api has not been initialized");return tn.get("customer-profile/backend/v1.0/workplace-link/config",rn(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);fd=r;const s=e.backendUrl;var a,c;return a=s,c=e.apolloAccessToken,a=a.replace(/\/?$/,""),cp=Qr.create({baseURL:`${a}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${c}`}}),cp.interceptors.response.use((e=>e),ap),{identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function mp(){return(mp=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 gp=["context","children"];function _p(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,gp);return te(t,r)}function vp(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(_p,mp({},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[yp(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(Ep,{name:l},c):n[o]=c}var u=r?O(Ep,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function yp(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function wp(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[yp(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function bp(){Z(this._vdom=null,this._root)}function Ep(e,t){var r=this;return O("slot",mp({},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=vp,i.prototype.attributeChangedCallback=wp,i.prototype.disconnectedCallback=bp,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"),[a,c]=ge(Xh);return Xr((async e=>{if(t.backendUrl)try{const r=await fp(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized"),c({verfiedPhoneNumber:r.verifiedPhoneNumber})}catch{s("Error")}}),[t.backendUrl]),r?$i(Ps,{}):$i(N,{children:["Initializing"===o&&$i(qi,{isActive:!0}),"Error"===o&&$i(Ds,{}),"Initialized"===o&&$i("div",{id:"preact_root",children:[$i(Fi,{}),$i(pp,{children:["google"===i.current&&$i(Jd,{...t}),"adb2c"===i.current&&$i(Us,{...t}),$i(Zh.Provider,{value:a,children:"flare-app-identity"===i.current&&$i(hp,{...t})})]})]})]})}),"workplace-link",["backend-url","access-token","source","channel"],{shadow:!1});
|
|
1717
|
+
`,Jd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=md().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("");Xr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await nn(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(gh){throw`[Link Workplace]: Error when requesting a workplace link: ${gh}`}})(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 on(t,e,n,r)}catch(gh){throw`[Link Workplace]: Error when trying to establish workplace link: ${gh}`}})(o,e),n(5);break;case 5:Ms()}}catch(gh){console.log(gh),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return $i(Kd,{children:[a&&$i(qi,{isActive:a}),1===r&&$i(Wd,{}),4===r&&$i(Ds,{}),5===r&&$i(Ps,{})]})};var Gd=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(Gd||{});const Yd=e=>$i("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:[$i("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"}),$i("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"})]}),Qd=e=>{const[t,r]=ge(!1);return $i("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:[$i("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&$i("div",{className:"absolute animate-spin",children:$i(Yd,{theme:"light"})})]})},Xd=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,iconElement:o,...s})=>{const a=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return $i(N,{children:[$i("label",{className:"font-medium text-sm text-gray-900 text-left",children:$i("span",{children:t})}),$i("div",{className:"relative",children:[$i("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:a,onChange:e=>n(e.currentTarget.value),...s}),o]})]})},Zd=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return $i("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:[$i("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&$i("div",{className:"absolute animate-spin",children:$i(Yd,{theme:"primary"})})]})},eh=({className:e,children:t})=>$i("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),th=({className:e,children:t})=>$i("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),rh=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var nh=Object.defineProperty,ih=(e,t,r)=>(((e,t,r)=>{t in e?nh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let oh=new class{constructor(){ih(this,"current",this.detect()),ih(this,"handoffState","pending"),ih(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}},sh=(e,t)=>{oh.isServer?ve(e,t):ye(e,t)};function ah(e){let t=we(e);return sh((()=>{t.current=e}),[e]),t}function ch(){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=ch();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 lh(){let[e]=ge(ch);return ve((()=>()=>e.dispose()),[e]),e}let uh=function(e){let t=ah(e);return ts.useCallback(((...e)=>t.current(...e)),[t])};function dh(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in rs&&rs.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(oh.isHandoffComplete);return t&&!1===oh.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>oh.handoff()),[]),!e&&t}function hh(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,hh),n}let ph=Symbol();function fh(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=uh((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[ph])))?void 0:r}function mh(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var gh,_h,vh=((_h=vh||{})[_h.None=0]="None",_h[_h.RenderStrategy=1]="RenderStrategy",_h[_h.Static=2]="Static",_h),yh=((gh=yh||{})[gh.Unmount=0]="Unmount",gh[gh.Hidden=1]="Hidden",gh);function wh({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Eh(t,e);if(o)return bh(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return bh(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return hh(e?0:1,{0:()=>null,1:()=>bh({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return bh(a,r,n,s)}function bh(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=Th(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(Ih(a)).length>0){if(!zo(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)=>mh(null==e?void 0:e.className(...t),a.className):mh(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return Vo(l,Object.assign({},Eh(l.props,Ih(Th(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({},Th(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Eh(...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 kh(e){var t;return Object.assign(so(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ih(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Th(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let Sh=re(null);Sh.displayName="OpenClosedContext";var Ch=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ch||{});function Rh(){return Ie(Sh)}function Oh({value:e,children:t}){return ts.createElement(Sh.Provider,{value:e},t)}function Ah(){let e=we(!1);return sh((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Ph(e,...t){e&&t.length>0&&e.classList.add(...t)}function Nh(e,...t){e&&t.length>0&&e.classList.remove(...t)}function xh(e,t,r,n){let i=r?"enter":"leave",o=ch(),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=hh(i,{enter:()=>t.enter,leave:()=>t.leave}),c=hh(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=hh(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Nh(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ph(e,...t.base,...a,...l),o.nextFrame((()=>{Nh(e,...t.base,...a,...l),Ph(e,...t.base,...a,...c),function(e,t){let r=ch();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,(()=>(Nh(e,...t.base,...a),Ph(e,...t.base,...t.entered),s())))})),o.dispose}function Lh(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Dh=re(null);Dh.displayName="TransitionContext";var Mh,Uh=((Mh=Uh||{}).Visible="visible",Mh.Hidden="hidden",Mh);let jh=re(null);function Fh(e){return"children"in e?Fh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Bh(e,t){let r=ah(e),n=we([]),i=Ah(),o=lh(),s=uh(((e,t=yh.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(hh(t,{[yh.Unmount](){n.current.splice(s,1)},[yh.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!Fh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=uh((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,yh.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=uh(((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=uh(((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 zh(){}jh.displayName="NestingContext";let Hh=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Vh(e){var t;let r={};for(let n of Hh)r[n]=null!=(t=e[n])?t:zh;return r}let $h=vh.RenderStrategy;let qh=kh((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=fh(s,t);dh();let c=Rh();if(void 0===r&&null!==c&&(r=(c&Ch.Open)===Ch.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=Bh((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);sh((()=>{!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(Fh(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},_=uh((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=uh((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return ts.createElement(jh.Provider,{value:d},ts.createElement(Dh.Provider,{value:m},wh({ourProps:{...g,as:N,children:ts.createElement(Wh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:$h,visible:"visible"===l,name:"Transition"})))})),Wh=kh((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),_=fh(g,t),v=null==(r=m.unmount)||r?yh.Unmount:yh.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(Dh);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(jh);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:S}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===yh.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):hh(E,{hidden:()=>S(g),visible:()=>T(g)})}),[E,g,T,S,y,v]);let C=ah({base:Lh(m.className),enter:Lh(c),enterFrom:Lh(l),enterTo:Lh(u),entered:Lh(d),leave:Lh(h),leaveFrom:Lh(p),leaveTo:Lh(f)}),R=function(e){let t=we(Vh(e));return ve((()=>{t.current=Vh(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=dh();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=Ah(),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=uh((e=>hh(e,{enter:()=>{N.addFlag(Ch.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(Ch.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=uh((e=>hh(e,{enter:()=>{N.removeFlag(Ch.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(Ch.Closing),R.current.afterLeave()},idle:()=>{}}))),D=Bh((()=>{k("hidden"),S(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Ah(),a=lh(),c=ah(r);sh((()=>{e&&(c.current="enter")}),[e]),sh((()=>{let e=ch();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(xh(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:C,direction:P,onStart:ah((e=>{D.onStart(g,e,x)})),onStop:ah((e=>{D.onStop(g,e,L),"leave"===e&&!Fh(D)&&(k("hidden"),S(g))}))});let M=m,U={ref:_};return A?M={...M,className:mh(m.className,...C.current.enter,...C.current.enterFrom)}:(M.className=mh(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),ts.createElement(jh.Provider,{value:D},ts.createElement(Oh,{value:hh(E,{visible:Ch.Open,hidden:Ch.Closed})|N.flags},wh({ourProps:U,theirProps:M,defaultTag:"div",features:$h,visible:"visible"===E,name:"Transition.Child"})))})),Kh=kh((function(e,t){let r=null!==Ie(Dh),n=null!==Rh();return ts.createElement(ts.Fragment,null,!r&&n?ts.createElement(qh,{ref:t,...e}):ts.createElement(Wh,{ref:t,...e}))})),Jh=Object.assign(qh,{Child:Kh,Root:qh});const Gh=({children:e})=>{const t=ts.Children.toArray(e),r=t.find((e=>e.type===Yh)),n=t.find((e=>e.type===Qh));return $i(Jh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:$i("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[$i(Jh,{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&&$i("div",{className:"flex items-center h-full",children:r})}),$i(Jh,{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&&$i("div",{className:"flex items-center h-full",children:n})})]})})},Yh=({children:e})=>$i(N,{children:e}),Qh=({children:e})=>$i(N,{children:e});Gh.Top=Yh,Gh.Bottom=Qh;const Xh={verfiedPhoneNumber:void 0},Zh=re(Xh),ep=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},O("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),tp=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:rh},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=(()=>{const{verfiedPhoneNumber:e}=Ie(Zh),[t,r]=ge(e??""),n=Ee((()=>t.replace(/ /g,"")),[t]),i=Ee((()=>n.startsWith("04")&&10===n.length||n.startsWith("614")&&11===n.length||n.startsWith("+614")&&12===n.length||/^\+642\d{7,9}$/.test(n)),[n]),o=Ee((()=>n.startsWith("04")?`+61${n.replace(/^0+/,"")}`:n.startsWith("614")?`+${n}`:n),[n]),s=Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(n)),[n]),a=Ee((()=>o===e),[o,e]);return{setPhoneNumber:r,phoneNumber:{valid:i,formatted:o,masked:s,isVerified:a}}})(),[a,c]=ge(s.isVerified);ve((()=>{r("sign-up-viewed")}),[r]);const l=ke((()=>{i("")}),[]),u=ke((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),d=ke((async()=>{s.valid&&await e(s).then((()=>r("sign-up-completed"))).catch(i)}),[s,e,r]);ke((()=>r("sign-up-declined").then(t)),[t,r]);const h=ke((async()=>{c(!1)}),[]),p=a?$i("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified"," ",$i("span",{className:"ml-1",children:$i(ep,{})})]}):void 0;return $i(Gh,{children:[$i(Gh.Top,{children:$i("div",{className:"flex flex-col gap-5",children:[$i(eh,{children:"Join your workplace benefits program"}),$i(th,{children:[a?"Confirm ":"Enter "," your ",$i("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),$i(Gh.Bottom,{children:$i("div",{className:"mt-5 md:w-[300px] text-left",children:[$i(Xd,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",value:s.formatted,onChange:o,onfocusin:l,onfocusout:u,iconElement:p,disabled:a}),0!==n.length&&$i("div",{className:"h-8 leading-none",children:$i("span",{className:"text-xs text-rose-500",children:n})}),a&&$i("div",{className:"mt-2 ml-2 mb-2 leading-none",children:$i("span",{className:"text-xs",children:["Not your personal number?",$i(Zd,{class:"text-blue-500",onClick:h,children:"Change number"})]})}),$i("div",{className:"font-medium text-sm text-gray-900 mt-2",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",$i("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",$i("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),$i(Qd,{class:"mt-5 md:w-full text-white",onClickPromise:d,children:"Join your workplace"}),!1]})})]})},rp=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},O("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),np=({children:e,...t})=>$i("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),ip=({open:e})=>$i(np,{open:e,children:$i("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[$i("span",{className:"animate-spin",children:$i(Yd,{size:"lg"})}),$i(eh,{children:"Creating your account"}),$i("div",{children:[$i(th,{children:"This can take up to 30 seconds."}),$i(th,{children:"Please don't navigate away or refresh your browser."})]})]})}),op=({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 $i(N,{children:[$i(ip,{open:s}),$i(Gh,{children:[$i(Gh.Top,{children:$i("div",{className:"flex flex-col gap-5",children:[$i(eh,{children:"Verify your mobile number"}),$i(th,{children:["An SMS verification code has been sent to the number"," ",$i("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),$i(Gh.Bottom,{children:$i("div",{className:"mt-5 md:w-[300px] text-left",children:[$i(Xd,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&$i("span",{className:"text-xs text-rose-500",children:c}),$i("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",$i(Zd,{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&&$i(N,{children:["in ",u," secs"]})]}),$i(Qd,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),$i(Qd,{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:$i("span",{className:"flex gap-3",children:[$i(rp,{}),"Back"]})})]})})]})]})},sp=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goToStep:l}=(()=>{const[e,t]=ge(0),r=ke((()=>{const r=e-1;r>=0&&t(r)}),[e]),n=ke((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:r,goToStep:n}})(),u=ke((t=>e(t.formatted).then((e=>{s(t.masked),e.isVerificationRequired?l(Gd.OTP):n()}))),[l,e,n]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return $i(N,{children:[a===Gd.PHONE_NUMBER&&$i(tp,{onSubmit:u,onDecline:i}),a===Gd.OTP&&$i(op,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c})]})},ap=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 cp;const lp=()=>cp;var up=(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))(up||{});const dp=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw up[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},hp=()=>{const[e,t]=ge(!1),{signUp:r,verifyOtp:n,resendOtp:i}={signUp:async e=>lp().post("v2.0/auth/signUp",{mobileNumber:e}).catch((e=>(dp(e),Promise.reject()))).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async e=>{await lp().post("auth/verify",{otp:e}).catch(dp)},resendOtp:async()=>{await lp().post("auth/resend").catch(dp)}},o=()=>{t(!0),Ms()};return e?$i(Ps,{}):$i(N,{children:$i("div",{className:"font-inter",children:[$i("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.inset-y-0{top:0!important;bottom:0!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}.mb-2{margin-bottom:.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!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}.pr-3{padding-right:.75rem!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-blue-500{--tw-text-opacity: 1 !important;color:rgb(59 130 246 / var(--tw-text-opacity))!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-green-700{--tw-text-opacity: 1 !important;color:rgb(21 128 61 / 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()}),$i(sp,{onSignUp:r,onVerify:n,onResendOtp:i,onSuccess:o,onDecline:o})]})})},pp=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),fp=async(e,t)=>{await(async e=>{if(tn)return tn;const t=e.replace(/\/?$/,"");return tn=Qr.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}))})(tn,{onRequestError:Zr,onResponseError:en}),tn})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}=await(async(e,t)=>{if(!tn)throw new Error("Api has not been initialized");return tn.get("customer-profile/backend/v1.0/workplace-link/config",rn(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);fd=r;return((e,t,r="Invite",n="invite")=>{e=e.replace(/\/?$/,""),cp=Qr.create({baseURL:`${e}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${t}`}}),cp.interceptors.request.use((e=>(e.params={...e.params??{},source:r,channel:n},e))),cp.interceptors.response.use((e=>e),ap)})(e.backendUrl,e.apolloAccessToken,e.source,e.channel),{identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function mp(){return(mp=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 gp=["context","children"];function _p(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,gp);return te(t,r)}function vp(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(_p,mp({},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[yp(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(Ep,{name:l},c):n[o]=c}var u=r?O(Ep,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function yp(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function wp(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[yp(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function bp(){Z(this._vdom=null,this._root)}function Ep(e,t){var r=this;return O("slot",mp({},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=vp,i.prototype.attributeChangedCallback=wp,i.prototype.disconnectedCallback=bp,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"),[a,c]=ge(Xh);return Xr((async e=>{if(t.backendUrl)try{const r=await fp(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized"),c({verfiedPhoneNumber:r.verifiedPhoneNumber})}catch{s("Error")}}),[t.backendUrl]),r?$i(Ps,{}):$i(N,{children:["Initializing"===o&&$i(qi,{isActive:!0}),"Error"===o&&$i(Ds,{}),"Initialized"===o&&$i("div",{id:"preact_root",children:[$i(Fi,{}),$i(pp,{children:["google"===i.current&&$i(Jd,{...t}),"adb2c"===i.current&&$i(Us,{...t}),$i(Zh.Provider,{value:a,children:"flare-app-identity"===i.current&&$i(hp,{})})]})]})]})}),"workplace-link",["backend-url","access-token","source","channel"],{shadow:!1});
|