@flarehr/apollo-benefits-onboarding 0.1.2951 → 0.1.2954
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.
@@ -4,5 +4,5 @@ var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNor
|
|
4
4
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
5
5
|
* MIT Licensed
|
6
6
|
*/
|
7
|
-
var So=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,No=/\\([\u000b\u0020-\u00ff])/g,To=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Ao=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),r=-1!==n?t.slice(0,n).trim():t.trim();if(!To.test(r))throw new TypeError("invalid media type");var o=new Oo(r.toLowerCase());if(-1!==n){var i,a,s;for(So.lastIndex=n;a=So.exec(t);){if(a.index!==n)throw new TypeError("invalid parameter format");n+=a[0].length,i=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(No,"$1")),o.parameters[i]=s}if(n!==t.length)throw new TypeError("invalid parameter format")}return o};function Oo(e){this.parameters=Object.create(null),this.type=e}var Ro=new Map,Po=function(e){return e.cloneNode(!0)},Lo=function(){return"file:"===window.location.protocol},Io=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=Ao(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(Lo()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||Lo()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(i){if(r.abort(),!(i instanceof Error))throw i;n(i,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},Uo={},Fo=function(e,t){Uo[e]=Uo[e]||[],Uo[e].push(t)},jo=function(e,t,n){if(Ro.has(e)){var r=Ro.get(e);if(void 0===r)return void Fo(e,n);if(r instanceof SVGSVGElement)return void n(null,Po(r))}Ro.set(e,void 0),Fo(e,n),Io(e,t,(function(t,n){var r;t?Ro.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&Ro.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(Uo[e])){var n=Ro.get(e),r=Uo[e][t];n instanceof SVGSVGElement&&r(null,Po(n)),n instanceof Error&&r(n),t===Uo[e].length-1&&delete Uo[e]}}),0)},n=0,r=Uo[e].length;n<r;n++)t(n)}(e)}))},Bo=function(e,t,n){Io(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},Do=0,Mo=[],zo={},Ho="http://www.w3.org/1999/xlink",qo=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==Mo.indexOf(e))return Mo.splice(Mo.indexOf(e),1),void(e=null);Mo.push(e),e.setAttribute("src",""),(r?jo:Bo)(s,o,(function(r,o){if(!o)return Mo.splice(Mo.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var d=e.getAttribute("width");d&&o.setAttribute("width",d);var u=e.getAttribute("height");u&&o.setAttribute("height",u);var p=Array.from(new Set(Eo(Eo(Eo([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",p);var f=e.getAttribute("style");f&&o.setAttribute("style",f),o.setAttribute("data-src",s);var m=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(m,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var h,g,y,_,b,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){h=e,y=w[e];for(var t=function(e,t){var n;_=g[e].id,b=_+"-"+ ++Do,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+_+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+_+'"?\\)'))||n[t].setAttribute(e,"url(#"+b+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(Ho,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,d=i.length;c<d;c++)i[c].setAttributeNS(Ho,"href","#"+b);g[e].id=b},n=0,r=(g=o.querySelectorAll(h+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var v,x,k=o.querySelectorAll("script"),C=[],E=0,S=k.length;E<S;E++)(x=k[E].getAttribute("type"))&&"application/ecmascript"!==x&&"application/javascript"!==x&&"text/javascript"!==x||((v=k[E].innerText||k[E].textContent)&&C.push(v),o.removeChild(k[E]));if(C.length>0&&("always"===t||"once"===t&&!zo[s])){for(var N=0,T=C.length;N<T;N++)new Function(C[N])(window);zo[s]=!0}var A=o.querySelectorAll("style");if(Array.prototype.forEach.call(A,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",Ho),i(o),!e.parentNode)return Mo.splice(Mo.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),Mo.splice(Mo.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},Wo={exports:{}};function Vo(){}function $o(){}$o.resetWarningCache=Vo;Wo.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:$o,resetWarningCache:Vo};return n.PropTypes=n,n}();var Go=Wo.exports,Yo=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Jo="http://www.w3.org/2000/svg",Zo="http://www.w3.org/1999/xlink",Xo=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,Co(n,r);var o=t.prototype;return o.renderSVG=function(){var e,t=this;if(this.reactWrapper instanceof(e=this.reactWrapper,((null==e?void 0:e.ownerDocument)||document).defaultView||window).Node){var n,r,o=this.props,i=o.desc,a=o.evalScripts,s=o.httpRequestWithCredentials,l=o.renumerateIRIElements,c=o.src,d=o.title,u=o.useRequestCache,p=this.props.onError,f=this.props.beforeInjection,m=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((n=document.createElementNS(Jo,h)).setAttribute("xmlns",Jo),n.setAttribute("xmlns:xlink",Zo),r=document.createElementNS(Jo,h)):(n=document.createElement(h),r=document.createElement(h)),n.appendChild(r),r.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(n);var g=function(e){t.removeSVG(),t._isMounted?t.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){p(e)})):p(e)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,d=void 0===c||c,u=n.evalScripts,p=void 0===u?"never":u,f=n.httpRequestWithCredentials,m=void 0!==f&&f,h=n.renumerateIRIElements,g=void 0===h||h;if(e&&"length"in e)for(var y=0,_=0,b=e.length;_<b;_++)qo(e[_],p,g,d,m,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?qo(e,p,g,d,m,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(r,{afterEach:function(e,n){e?g(e):t._isMounted&&t.setState((function(){return{isLoading:!1}}),(function(){try{m(n)}catch(e){g(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),i){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=i,e.prepend(n)}if(d){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var o=document.createElement("title");o.innerHTML=d,e.prepend(o)}try{f(e)}catch(a){g(a)}},cacheRequests:u,evalScripts:a,httpRequestWithCredentials:s,renumerateIRIElements:l})}},o.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},o.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},o.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(ko({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},o.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},o.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var r=e.wrapper,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,Yo);return v(r,ko({},o,{ref:this.refCallback},"svg"===r?{xmlns:Jo,xmlnsXlink:Zo}:{}),this.state.isLoading&&n&&v(n,null),this.state.hasError&&t&&v(t,null))},t}(E);Xo.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},Xo.propTypes={afterInjection:Go.func,beforeInjection:Go.func,desc:Go.string,evalScripts:Go.oneOf(["always","once","never"]),fallback:Go.oneOfType([Go.func,Go.object,Go.string]),httpRequestWithCredentials:Go.bool,loading:Go.oneOfType([Go.func,Go.object,Go.string]),onError:Go.func,renumerateIRIElements:Go.bool,src:Go.string.isRequired,title:Go.string,useRequestCache:Go.bool,wrapper:Go.oneOf(["div","span","svg"])};const Ko=({visible:e,children:t})=>{const n=qn(e);return e&&!n.current&&(n.current=!0),n.current?lo("div",{hidden:!e,children:t}):null},Qo=({icon:e})=>"string"==typeof e?lo(Xo,{src:e,wrapper:"svg",className:"w-6 h-6 max-w-6 max-h-6 min-w-6 min-h-6",beforeInjection:e=>{var t;e.removeAttribute("width"),e.removeAttribute("height"),null==(t=e.querySelector("path"))||t.removeAttribute("fill"),e.setAttribute("fill","currentColor")}}):lo("div",{className:"w-6 h-6 max-w-6 max-h-6 min-w-6 min-h-6",children:e}),ei=({label:e,icon:t})=>lo("div",{className:"flex items-center flex-col",children:[t,lo("p",{className:"max-h-10 max-w-20 break-words text-ellipsis overflow-hidden line-clamp-2 mt-2",children:e})]}),ti=({children:e})=>lo(C,{children:e}),ni=({selectedIndex:e,onChange:t,children:n})=>{const r=Vn((()=>ur.toArray(n).filter((e=>e.type===ei))),[n]),o=Vn((()=>ur.toArray(n).filter((e=>e.type===ti))),[n]);return xo((()=>{o.length>0&&(null==t||t(0))})),lo("div",{children:[lo("div",{className:"flex items-baseline md:mb-4",children:r.map(((n,r)=>lo("div",{onClick:()=>null==t?void 0:t(r),className:`\n text-sm font-medium cursor-auto w-10 min-w-10 max-w-10 h-12 min-h-12 max-h-12 mr-10 h-full relative\n flex items-center justify-center\n [&:not(:last-child):after]:absolute [&:not(:last-child):after]:top-3 [&:not(:last-child):after]:content-[""] [&:not(:last-child):after]:w-10 [&:not(:last-child):after]:border-b-2 [&:not(:last-child):after]:border-solid [&:not(:last-child):after]:border-gray-200 [&:not(:last-child):after]:left-10\n ${r===e?"text-primary-base":"text-gray-400"}\n hover:before:content-[''] \n ${o.length>0?"hover:before:cursor-pointer":"hover:before:cursor-default"} \n hover:before:w-16 hover:before:h-16 hover:before:absolute\n `,children:n},n.key)))}),o.map(((t,n)=>lo(Ko,{visible:n===e,children:t},t.key)))]})},ri=({className:e,children:t})=>lo("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),oi=({className:e,children:t})=>lo("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),ii=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...e},v("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})),ai=({title:e,steps:t,...n})=>{const r=t.length,o=t.filter((e=>e.completed)).length;return lo("div",{...n,children:[e&&lo("h1",{className:"text-lg font-semibold mb-4",children:e}),lo("ol",{children:t.map(((e,t)=>{const n=o===t;return lo("li",{className:"relative flex-1 pb-6 "+(t!==r-1?`after:content-[''] after:w-0.5 after:h-[calc(100%-theme(height.8))] ${e.completed?"after:bg-primary-base":"after:bg-gray-300"} after:inline-block after:absolute after:top-8 after:left-4`:""),children:lo("div",{className:"flex font-medium w-full",children:[lo("span",{className:`w-8 min-w-8 max-w-8 h-8 min-h-8 max-h-8 ${e.completed?"bg-primary-base":"bg-white"} border-2 ${e.completed||n?"border-primary-base":"border-gray-300"} rounded-full flex justify-center items-center mr-3 text-sm ${n?"text-primary-base":"text-gray-500"}`,children:e.completed?lo(ii,{className:"w-4 h-4 text-white"}):t+1}),lo("div",{children:[lo("h4",{className:"text-sm text-left font-semibold "+(e.completed||n?"text-primary-base":"text-gray-600"),children:e.title}),lo("p",{className:"text-sm text-left font-normal",children:e.description})]})]})},t)}))})]})};var si=Object.defineProperty,li=(e,t,n)=>(((e,t,n)=>{t in e?si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let ci=new class{constructor(){li(this,"current",this.detect()),li(this,"handoffState","pending"),li(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}},di=(e,t)=>{ci.isServer?zn(e,t):Hn(e,t)};function ui(e){let t=qn(e);return di((()=>{t.current=e}),[e]),t}let pi=function(e){let t=ui(e);return oo.useCallback(((...e)=>t.current(...e)),[t])};function fi(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=fi();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function mi(){let[e]=Dn(fi);return zn((()=>()=>e.dispose()),[e]),e}function hi(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in io&&io.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=Dn(ci.isHandoffComplete);return t&&!1===ci.isHandoffComplete&&n(!1),zn((()=>{!0!==t&&n(!0)}),[t]),zn((()=>ci.handoff()),[]),!e&&t}function gi(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=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(r,gi),r}let yi=Symbol();function _i(...e){let t=qn(e);zn((()=>{t.current=e}),[e]);let n=pi((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[yi])))?void 0:n}function bi(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var wi,vi,xi=((vi=xi||{})[vi.None=0]="None",vi[vi.RenderStrategy=1]="RenderStrategy",vi[vi.Static=2]="Static",vi),ki=((wi=ki||{})[wi.Unmount=0]="Unmount",wi[wi.Hidden=1]="Hidden",wi);function Ci({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a,mergeRefs:s}){s=null!=s?s:Si;let l=Ni(t,e);if(i)return Ei(l,n,r,a,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=l;if(e)return Ei(t,n,r,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return gi(e?0:1,{0:()=>null,1:()=>Ei({...t,hidden:!0,style:{display:"none"}},n,r,a,s)})}return Ei(l,n,r,a,s)}function Ei(e,t={},n,r,o){let{as:i=n,children:a,refName:s="ref",...l}=Oi(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},d="function"==typeof a?a(t):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t));let u={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r);e&&(u["data-headlessui-state"]=n.join(" "))}if(i===C&&Object.keys(Ai(l)).length>0){if(!qr(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).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=d.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>bi(null==e?void 0:e.className(...t),l.className):bi(null==e?void 0:e.className,l.className),n=t?{className:t}:{};return Vr(d,Object.assign({},Ni(d.props,Ai(Oi(l,["ref"]))),u,c,{ref:o(d.ref,c.ref)},n))}return v(i,Object.assign({},Oi(l,["ref"]),i!==C&&c,i!==C&&u),d)}function Si(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Ni(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let r in n)Object.assign(t,{[r](e,...t){let o=n[r];for(let n of o){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Ti(e){var t;return Object.assign(cr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ai(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function Oi(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Ri=G(null);Ri.displayName="OpenClosedContext";var Pi=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Pi||{});function Li(){return Gn(Ri)}function Ii({value:e,children:t}){return oo.createElement(Ri.Provider,{value:e},t)}function Ui(){let e=qn(!1);return di((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Fi(e,...t){e&&t.length>0&&e.classList.add(...t)}function ji(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Bi(e,t,n,r){let o=n?"enter":"leave",i=fi(),a=void 0!==r?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let s=gi(o,{enter:()=>t.enter,leave:()=>t.leave}),l=gi(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=gi(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ji(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Fi(e,...t.base,...s,...c),i.nextFrame((()=>{ji(e,...t.base,...s,...c),Fi(e,...t.base,...s,...l),function(e,t){let n=fi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,a]=[r,o].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})),s=i+a;if(0!==s){n.group((n=>{n.setTimeout((()=>{t(),n.dispose()}),s),n.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&n.dispose()}))}));let r=n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),r())}))}else t();n.add((()=>t())),n.dispose}(e,(()=>(ji(e,...t.base,...s),Fi(e,...t.base,...t.entered),a())))})),i.dispose}function Di(e=""){return e.split(/\s+/).filter((e=>e.length>1))}let Mi=G(null);Mi.displayName="TransitionContext";var zi,Hi=((zi=Hi||{}).Visible="visible",zi.Hidden="hidden",zi);let qi=G(null);function Wi(e){return"children"in e?Wi(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Vi(e,t){let n=ui(e),r=qn([]),o=Ui(),i=mi(),a=pi(((e,t=ki.Hidden)=>{let a=r.current.findIndex((({el:t})=>t===e));-1!==a&&(gi(t,{[ki.Unmount](){r.current.splice(a,1)},[ki.Hidden](){r.current[a].state="hidden"}}),i.microTask((()=>{var e;!Wi(r)&&o.current&&(null==(e=n.current)||e.call(n))})))})),s=pi((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>a(e,ki.Unmount)})),l=qn([]),c=qn(Promise.resolve()),d=qn({enter:[],leave:[],idle:[]}),u=pi(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(d.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),p=pi(((e,t,n)=>{Promise.all(d.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return Vn((()=>({children:r,register:s,unregister:a,onStart:u,onStop:p,wait:c,chains:d})),[s,a,r,u,p,d,c])}function $i(){}qi.displayName="NestingContext";let Gi=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Yi(e){var t;let n={};for(let r of Gi)n[r]=null!=(t=e[r])?t:$i;return n}let Ji=xi.RenderStrategy;let Zi=Ti((function(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,a=qn(null),s=_i(a,t);hi();let l=Li();if(void 0===n&&null!==l&&(n=(l&Pi.Open)===Pi.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=Dn(n?"visible":"hidden"),u=Vi((()=>{d("hidden")})),[p,f]=Dn(!0),m=qn([n]);di((()=>{!1!==p&&m.current[m.current.length-1]!==n&&(m.current.push(n),f(!1))}),[m,n]);let h=Vn((()=>({show:n,appear:r,initial:p})),[n,r,p]);zn((()=>{if(n)d("visible");else if(Wi(u)){let e=a.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&d("hidden")}else d("hidden")}),[n,u]);let g={unmount:o},y=pi((()=>{var t;p&&f(!1),null==(t=e.beforeEnter)||t.call(e)})),_=pi((()=>{var t;p&&f(!1),null==(t=e.beforeLeave)||t.call(e)}));return oo.createElement(qi.Provider,{value:u},oo.createElement(Mi.Provider,{value:h},Ci({ourProps:{...g,as:C,children:oo.createElement(Xi,{ref:s,...g,...i,beforeEnter:y,beforeLeave:_})},theirProps:{},defaultTag:C,features:Ji,visible:"visible"===c,name:"Transition"})))})),Xi=Ti((function(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s,enter:l,enterFrom:c,enterTo:d,entered:u,leave:p,leaveFrom:f,leaveTo:m,...h}=e,g=qn(null),y=_i(g,t),_=null==(n=h.unmount)||n?ki.Unmount:ki.Hidden,{show:b,appear:w,initial:v}=function(){let e=Gn(Mi);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[x,k]=Dn(b?"visible":"hidden"),C=function(){let e=Gn(qi);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:E,unregister:S}=C;zn((()=>E(g)),[E,g]),zn((()=>{if(_===ki.Hidden&&g.current)return b&&"visible"!==x?void k("visible"):gi(x,{hidden:()=>S(g),visible:()=>E(g)})}),[x,g,E,S,b,_]);let N=ui({base:Di(h.className),enter:Di(l),enterFrom:Di(c),enterTo:Di(d),entered:Di(u),leave:Di(p),leaveFrom:Di(f),leaveTo:Di(m)}),T=function(e){let t=qn(Yi(e));return zn((()=>{t.current=Yi(e)}),[e]),t}({beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s}),A=hi();zn((()=>{if(A&&"visible"===x&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,x,A]);let O=v&&!w,R=w&&b&&v,P=(()=>!A||O?"idle":b?"enter":"leave")(),L=function(e=0){let[t,n]=Dn(e),r=Ui(),o=$n((e=>{r.current&&n((t=>t|e))}),[t,r]),i=$n((e=>Boolean(t&e)),[t]),a=$n((e=>{r.current&&n((t=>t&~e))}),[n,r]),s=$n((e=>{r.current&&n((t=>t^e))}),[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:a,toggleFlag:s}}(0),I=pi((e=>gi(e,{enter:()=>{L.addFlag(Pi.Opening),T.current.beforeEnter()},leave:()=>{L.addFlag(Pi.Closing),T.current.beforeLeave()},idle:()=>{}}))),U=pi((e=>gi(e,{enter:()=>{L.removeFlag(Pi.Opening),T.current.afterEnter()},leave:()=>{L.removeFlag(Pi.Closing),T.current.afterLeave()},idle:()=>{}}))),F=Vi((()=>{k("hidden"),S(g)}),C),j=qn(!1);!function({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let a=Ui(),s=mi(),l=ui(n);di((()=>{e&&(l.current="enter")}),[e]),di((()=>{let e=fi();s.add(e.dispose);let n=t.current;if(n&&"idle"!==l.current&&a.current)return e.dispose(),o.current(l.current),e.add(Bi(n,r.current,"enter"===l.current,(()=>{e.dispose(),i.current(l.current)}))),e.dispose}),[n])}({immediate:R,container:g,classes:N,direction:P,onStart:ui((e=>{j.current=!0,F.onStart(g,e,I)})),onStop:ui((e=>{j.current=!1,F.onStop(g,e,U),"leave"===e&&!Wi(F)&&(k("hidden"),S(g))}))});let B=h,D={ref:y};return R?B={...B,className:bi(h.className,...N.current.enter,...N.current.enterFrom)}:j.current&&(B.className=bi(h.className,null==(r=g.current)?void 0:r.className),""===B.className&&delete B.className),oo.createElement(qi.Provider,{value:F},oo.createElement(Ii,{value:gi(x,{visible:Pi.Open,hidden:Pi.Closed})|L.flags},Ci({ourProps:D,theirProps:B,defaultTag:"div",features:Ji,visible:"visible"===x,name:"Transition.Child"})))})),Ki=Ti((function(e,t){let n=null!==Gn(Mi),r=null!==Li();return oo.createElement(oo.Fragment,null,!n&&r?oo.createElement(Zi,{ref:t,...e}):oo.createElement(Xi,{ref:t,...e}))})),Qi=Object.assign(Zi,{Child:Ki,Root:Zi});const ea=({children:e})=>{const t=oo.Children.toArray(e),n=t.find((e=>e.type===ta)),r=t.find((e=>e.type===na));return lo(Qi,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:lo("div",{class:"flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[lo(Qi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:n&&lo("div",{class:"flex items-center h-full",children:n})}),lo(Qi,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",children:r&&lo("div",{class:"flex items-center h-full",children:r})})]})})},ta=({children:e})=>lo(C,{children:e}),na=({children:e})=>lo(C,{children:e});ea.Top=ta,ea.Bottom=na;const ra=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t},offers:n}=Gn(uo),r="allowance"===t.scheme?t.content.setUpBenefits:void 0;return lo(C,{children:r&&lo("div",{className:"flex flex-col items-center max-w-full w-full mx-auto",children:[lo(ni,{selectedIndex:-1,children:n.map((e=>lo(ei,{label:e.content.productName,icon:lo(Qo,{icon:e.content.iconUrl})},e.name)))}),lo(ea,{children:[lo(ea.Top,{children:lo("div",{className:"flex flex-col gap-4",children:[lo(ri,{children:r.title}),lo(oi,{children:r.description})]})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[r.progress&&lo(vo,{className:"lg:w-3/4",title:r.progress.title,children:lo(ai,{steps:r.progress.steps,className:"mt-2 rounded-md px-6 py-4"})}),lo(wo,{testId:"allowance_set_up_benefits_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:e,children:r.buttonText}),r.termsAndConditions&&lo("span",{className:"font-normal text-xs mt-4 lg:w-3/4",children:lo(r.termsAndConditions,{})})]})})]})]})})},oa=({icon:e,children:t,className:n,...r})=>lo("div",{...r,className:`${n??""} rounded-md shadow-sm`,children:lo("div",{className:"flex items-center gap-4 px-4 py-4",children:[e&&lo("span",{className:"w-8 min-w-8 max-w-8",children:e}),t&&lo("span",{className:"text-left text-base",children:t})]})}),ia=(e,t)=>{switch(!0){case"started"===e:return vn.backend.command({eventType:"Started"},t);case"membership-accepted"===e:return vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!0,featureName:"",treatmentName:"",template:"Eoi"}},t);case"membership-declined"===e:return vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!1,featureName:"",treatmentName:"",template:"Eoi"}},t);case"sign-up-viewed"===e:return vn.backend.command({eventType:"OfferViewed",offerName:"Membership",data:{featureName:"",treatmentName:""}},t);case"sign-up-completed"===e:return(async()=>{await vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!0,featureName:"",treatmentName:"",template:"Eoi"}},t),await vn.backend.command({eventType:"CustomerRegistrationCompleted",isRegistered:!0},t)})();case"sign-up-declined"===e:return(async()=>{await vn.backend.command({eventType:"CustomerRegistrationCompleted",isRegistered:!1},t),await vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!1,featureName:"",treatmentName:"",template:"Eoi"}},t)})();case"object"==typeof e&&"offer-selected"===e.type:return vn.workplaceBackend.track("MarketplaceOffer Selected",{offer:e.offerName},t);case"object"==typeof e&&"offer-viewed"===e.type:return vn.backend.command({...e,eventType:"OfferViewed"},t);case"object"==typeof e&&"offer-accepted"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:{...e.data,accepted:!0}},t);case"object"==typeof e&&"offer-declined"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:{...e.data,accepted:!1}},t);case"object"==typeof e&&"offer-progressed"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:e.data},t);case"object"==typeof e&&"summary-viewed"===e.type:return vn.backend.command({eventType:"SummaryViewed",summaryVariant:e.data.summaryVariant},t);case"completed"===e:return vn.backend.command({eventType:"Completed"},t)}return Promise.resolve()},aa=()=>({trace:ia}),sa=e=>{const{trace:t}=aa(),{featureFlags:{marketplaceScheme:n}}=Gn(uo),r="allowance"===n.scheme?n.content.joinBenefits:void 0;return lo(C,{children:r&&lo(ea,{children:[lo(ea.Top,{children:[lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:r.desktopImageUrl}),lo("img",{class:"max-w-[30rem] w-full md:hidden",src:r.mobileImageUrl})]}),lo(ea.Bottom,{children:lo("div",{children:[lo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:r.title}),lo("p",{class:"mt-3 text-lg leading-7 text-gray-600",children:r.description}),lo(oa,{className:"bg-teal-50 mt-5",style:{background:"linear-gradient(90deg, rgba(255, 216, 77, 0.10) 0%, rgba(255, 135, 111, 0.10) 100%)"},icon:r.specialBanner.icon,children:lo("div",{children:[lo("p",{className:"font-semibold text-base text-gray-900",children:r.specialBanner.title}),lo("span",{className:"font-normal text-base text-gray-900",children:r.specialBanner.subTitle})]})}),lo(wo,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{await t("started",{experiment:"onboarding-marketplace-scheme",treatment:n.scheme}),e.onContinue()},children:r.buttonText})]})})]})})},la=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/get-app-CQalMIl7.jpg?inline").href:new URL("assets/get-app-CQalMIl7.jpg?inline","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),ca=()=>lo("div",{className:"mt-4 flex items-center border rounded-md border-gray-300",children:[lo("img",{className:"h-40 h-min-40 h-max-40 m-0.5",src:la}),lo("div",{className:"flex flex-col gap-1",children:[lo("h4",{className:"font-bold text-lg text-left",children:"Workplace benefits in your pocket!"}),lo("p",{className:"font-normal text-base text-left",children:"Download the Flare app for easy access to your workplace benefits and exclusive discounts."}),lo("a",{className:"focus:ring-2 focus:ring-primary-focus font-bold rounded-md self-start text-primary-base",target:"_blank",rel:"noreferrer",href:"https://flarehr.app.link/download",children:["Get the Flare App ","->"]})]})]}),da=({onContinue:e})=>{const{offersProgress:{hasCompletedAnyOffers:t},isAppEnabled:n,featureFlags:{marketplaceScheme:r}}=Gn(uo),{trace:o}=aa(),i=Vn((()=>{const e=t();switch(!0){case n&&e:return"allowance-accepted-app";case n&&!e:return"allowance-declined-app";case!n&&e:return"allowance-accepted-noapp";case!n&&!e:return"allowance-declined-noapp";default:throw"Invalid summary variant"}}),[t,n]);zn((()=>{(async()=>{await o({type:"summary-viewed",data:{summaryVariant:i}},{experiment:"onboarding-marketplace-scheme",treatment:r.scheme})})()}),[r,i,o]);const a=$n((async()=>{await o("completed",{experiment:"onboarding-marketplace-scheme",treatment:r.scheme}),await e()}),[r,e,o]),s="allowance"===r.scheme?r.content.summary:void 0;return lo(C,{children:s&&lo(ea,{children:[lo(ea.Top,{children:lo("div",{className:"flex flex-col gap-4",children:[lo(ri,{children:s.title}),lo(oi,{children:s.description})]})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[s.progress&&lo(vo,{className:"lg:w-3/4",title:s.progress.title,children:lo(ai,{steps:s.progress.steps,className:"mt-2 rounded-md px-6 py-4"})}),lo(wo,{testId:"step-benefits-finish",class:"mt-5 w-full md:w-[240px]",onClickPromise:a,children:s.buttonText}),n&&lo(ca,{})]})})]})})};var ua=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(ua||{});const pa=({className:e,children:t,...n})=>lo("label",{class:`text-base text-gray-600 ${e??""}`,...n,children:t}),fa=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},v("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"})),ma=({className:e,onClick:t,...n})=>{const[r,o]=Dn(!1);return lo("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:$n((()=>{if(!r)return o(!0),t().finally((()=>{o(!1)}))}),[r,t]),...n,children:[lo("div",{class:"relative "+(r?"invisible":""),children:n.children}),r&&lo("div",{class:"absolute animate-spin",children:lo(_o,{theme:"primary"})})]})},ha=({className:e,allowedKeyPattern:t,onChange:n,value:r,leadingIconElement:o,trailingIconElement:i,...a})=>{const s=$n((e=>{t.test(e.key)||e.preventDefault()}),[t]);return lo(C,{children:lo("div",{class:"relative",children:[o,lo("input",{"data-testid":a.testId,type:"text",className:`border-0 ring-2 ring-gray-200 focus:outline-none text-base font-medium rounded-md shadow-sm ${e}`,value:r,onKeyPress:s,onChange:e=>n(e.currentTarget.value),...a}),i]})})},ga=e=>e.replace(/ /g,""),ya=e=>{const t=ga(e);return t.startsWith("04")&&10===t.length||t.startsWith("614")&&11===t.length||t.startsWith("+614")&&12===t.length||/^\+642\d{7,9}$/.test(t)},_a=({phoneNumber:e,onSubmit:t,onDecline:n})=>{const{hostInformation:{workflowsJourneyType:r}}=Gn(uo),[o,i]=Dn(""),{setPhoneNumber:a,phoneNumber:s}=(e=>{const{identity:t}=Gn(uo),[n,r]=Dn((()=>e&&ya(e)?e:"")),o=Vn((()=>ya(n)),[n]),i=Vn((()=>ga(n)),[n]),a=Vn((()=>i.startsWith("04")?`+61${i.replace(/^0+/,"")}`:i.startsWith("614")?`+${i}`:i),[i]),s=Vn((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(i)),[i]),l=Vn((()=>ya(t.verifiedPhoneNumber)&&a===t.verifiedPhoneNumber),[a,t.verifiedPhoneNumber]);return{setPhoneNumber:r,phoneNumber:{valid:o,original:n,formatted:a,masked:s,isVerified:l}}})(e),[l,c]=Dn(s.isVerified),d=$n((()=>{i("")}),[]),u=$n((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),p=$n((async()=>{s.valid&&await t(s).catch(i)}),[s,t]),f=$n((async()=>{c(!1)}),[]),m=lo("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified ",lo(fa,{})]});return lo(ea,{children:[lo(ea.Top,{children:lo("div",{className:"flex flex-col gap-5",children:[lo(ri,{children:"Join your workplace benefits program"}),lo(oi,{children:[s.isVerified?"Confirm ":"Enter "," your ",lo("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 md:w-[300px] text-left",children:[lo(pa,{className:"font-medium text-sm text-gray-900 text-left",children:"Australian Mobile Number"}),lo(ha,{testId:"sign_in_mobile_number_text_input_mobile_number",allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full p-2 focus-visible:ring-gray-500",value:s.original,onChange:a,onfocusin:d,onfocusout:u,trailingIconElement:l&&m,disabled:l}),0!==o.length&&lo("div",{className:"h-8 leading-none",children:lo("span",{className:"text-xs text-rose-500",children:o})}),l&&lo("div",{className:"mt-2 ml-2 mb-2 leading-none",children:lo("span",{className:"text-xs",children:["Not your personal number?",lo(ma,{class:"text-blue-500",onClick:f,children:"Change number"})]})}),lo("div",{children:lo("span",{className:"font-medium text-sm text-gray-900 text-center",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",lo("a",{href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",lo("a",{href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]})}),lo(wo,{testId:"sign_in_mobile_number_button_send_otp",class:"mt-5 md:w-full",onClickPromise:p,children:"Join your workplace"}),r!==ne.AppInvite&&lo(wo,{testId:"sign_in_mobile_number_button_decline_to_send_otp",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:n,children:"Not now"})]})})]})},ba=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/check-animated-QQOZQPLY.gif?inline").href:new URL("assets/check-animated-QQOZQPLY.gif?inline","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),wa=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t}}=Gn(uo),n=Vn((()=>"allowance"===t.scheme?{title:"Account created successfully",description:"You now have access to your workplace benefits",isNextButtonHidden:!0}:{title:"You’ve joined your workplace benefits program",description:"You now have access to your workplace benefits",isNextButtonHidden:!1}),[t]);return zn((()=>{if("allowance"===t.scheme){const t=setTimeout(e,3e3);return()=>clearTimeout(t)}}),[t,e]),lo(ea,{children:[lo(ea.Top,{children:lo("img",{src:ba,className:"h-16 w-16"})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[lo(ri,{children:n.title}),lo(oi,{children:n.description}),!n.isNextButtonHidden&&lo(wo,{testId:"sign_in_success_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:async()=>{e()},children:"Set up your benefits"})]})})]})},va=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},v("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),xa=({open:e})=>lo(yo,{open:e,children:lo(go,{children:lo("div",{className:"flex flex-col gap-5 items-center justify-center text-center",children:[lo("span",{class:"animate-spin",children:lo(_o,{size:"lg"})}),lo(ri,{children:"Creating your account"}),lo("div",{children:[lo(oi,{children:"This can take up to 30 seconds."}),lo(oi,{children:"Please don't navigate away or refresh your browser."})]})]})})}),ka=({phoneNumber:e,onVerify:t,onResendOtp:n,onGoBack:r})=>{const{otp:o,setOtp:i}=(()=>{const[e,t]=Dn("");return{otp:{valid:Vn((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[a,s]=Dn(!1),[l,c]=Dn(""),{countdown:d,restart:u}=(e=>{const[t,n]=Dn(e),r=qn(),o=$n((()=>{clearInterval(r.current)}),[]);return zn((()=>o),[o]),{countdown:t,restart:$n((()=>{let t=e;clearInterval(r.current),r.current=setInterval((()=>{t<0?clearInterval(r.current):n(t--)}),1e3)}),[e])}})(60);zn(u,[u]);const p=$n((()=>(s(!0),c(""),t(o.code).catch(c).finally((()=>{s(!1)})))),[t,o.code]),f=$n((()=>(c(""),n().then(u).catch(c))),[n,u]);return lo(C,{children:[lo(xa,{open:a}),lo(ea,{children:[lo(ea.Top,{children:lo("div",{className:"flex flex-col gap-5",children:[lo(ri,{children:"Verify your mobile number"}),lo(oi,{children:["An SMS verification code has been sent to the number ",e,"."]})]})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 md:w-[300px] text-left",children:[lo(pa,{className:"font-medium text-sm text-gray-900 text-left",children:"Enter your verification code"}),lo(ha,{testId:"sign_in_otp_text_input_otp",allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full p-2 focus-visible:ring-gray-500",trailingIconElement:!1,onChange:i}),l&&lo("span",{className:"text-xs text-rose-500",children:l}),lo("p",{class:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",lo(ma,{disabled:0!==d,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:f,children:"Resend SMS"}),0!==d&&lo(C,{children:["in ",d," secs"]})]}),lo(wo,{testId:"sign_in_otp_button_verify_otp",class:"mt-5 md:w-full",disabled:!o.valid,onClickPromise:p,children:"Continue"}),lo(wo,{testId:"sign_in_otp_button_decline_to_verify_otp",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()=>{r()},children:lo("span",{className:"flex gap-3",children:[lo(va,{}),"Back"]})})]})})]})]})},Ca=({phoneNumber:e,onSignUp:t,onVerify:n,onResendOtp:r,onSuccess:o,onDecline:i})=>{const{trace:a}=aa(),[s,l]=Dn(e??""),{step:c,goBack:d,goToStep:u}=(()=>{const[e,t]=Dn(0),n=$n((()=>{const n=e-1;n>=0&&t(n)}),[e]),r=$n((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:n,goToStep:r}})();zn((()=>{(async()=>{await a("sign-up-viewed")})()}),[a]);const p=$n((e=>t(e.formatted).then((async t=>{l(e.masked),t.isVerificationRequired?u(ua.OTP):(await a("sign-up-completed"),u(ua.SUCCESS))}))),[u,t,a]),f=$n((()=>a("sign-up-declined").then(i)),[i,a]),m=$n((e=>n(e).then((async()=>{await a("sign-up-completed"),u(ua.SUCCESS)}))),[u,n,a]);return lo(C,{children:[c===ua.PHONE_NUMBER&&lo(_a,{phoneNumber:s,onSubmit:p,onDecline:f}),c===ua.OTP&&lo(ka,{phoneNumber:s,onVerify:m,onResendOtp:r,onGoBack:d}),c===ua.SUCCESS&&lo(wa,{onContinue:o})]})};var Ea=(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))(Ea||{});const Sa=e=>{var t;const n=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Ea[null==n?void 0:n.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Na=({onSuccess:e,onDecline:t})=>{const{identity:{phoneNumber:n}}=Gn(uo),{signUp:r,verifyOtp:o,resendOtp:i}={signUp:async e=>vn.backend.getClient().post("v2.0/auth/signUp",{mobileNumber:e}).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async e=>{await vn.backend.getClient().post("auth/verify",{otp:e}).catch(Sa)},resendOtp:async()=>{await vn.backend.getClient().post("auth/resend").catch(Sa)}};return lo(C,{children:lo(Ca,{phoneNumber:n,onSignUp:r,onVerify:o,onResendOtp:i,onSuccess:e,onDecline:t})})},Ta=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/intro-COqxd5jd.png").href:new URL("assets/intro-COqxd5jd.png","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),Aa=e=>{const{trace:t}=aa(),{featureFlags:{marketplaceScheme:n}}=Gn(uo);return lo(ea,{children:[lo(ea.Top,{children:lo("img",{class:"max-w-[30rem] w-full",src:Ta})}),lo(ea.Bottom,{children:lo("div",{children:[lo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:"Finish setting up your workplace benefits"}),lo("p",{class:"mt-3 text-lg leading-7 text-gray-600",children:"Because your workplace uses Flare you have access to a range of exclusive benefits that can save you thousands of dollars every year on your car, private health insurance, weekly grocery shop and more."}),lo(wo,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{await t("started",{experiment:"onboarding-marketplace-scheme",treatment:n.scheme}),e.onStepComplete()},children:"Continue"})]})})]})},Oa=()=>lo("div",{class:"flex justify-center",children:lo("span",{class:"animate-spin",children:lo(_o,{size:"lg"})})}),Ra=(Pa=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o},hostInformation:i,getAllowanceProduct:a}=Gn(uo),{trace:s}=aa(),l=qn(null),c=a(e.marketPlaceOffer.name);return xo((()=>{s({type:"offer-viewed",offerName:e.marketPlaceOffer.name,data:e.marketPlaceOffer.metadata},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),l.current&&(l.current.terms=e.marketPlaceOffer.content.terms,l.current.details=e.marketPlaceOffer.content.details,l.current["on-accept"]=async()=>{await s({type:"offer-accepted",offerName:e.marketPlaceOffer.name,data:{...e.marketPlaceOffer.metadata,template:e.marketPlaceOffer.content.template,assessmentId:e.marketPlaceOffer.content.assessmentId}},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName})},l.current["on-decline"]=async()=>{await s({type:"offer-declined",offerName:e.marketPlaceOffer.name,data:{...e.marketPlaceOffer.metadata,template:e.marketPlaceOffer.content.template,assessmentId:e.marketPlaceOffer.content.assessmentId}},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),e.onStepComplete(!1,!1)},l.current["on-complete"]=()=>e.onStepComplete(!0,!0),l.current["on-skip"]=e.marketPlaceOffer.content.skipButtonHidden?void 0:()=>e.onStepComplete(!0,!1))})),lo("benefits-plan-assessment",{"base-url":xn.workplaceBackend.getBaseUrl(),"profile-id":xn.workplaceBackend.getProfileId(),"skip-more-details":!0,"access-token":e.accessToken,"image-url":e.marketPlaceOffer.content.imageUrl,"assessment-id":e.marketPlaceOffer.content.assessmentId,"assessment-instructions":"allowance"===o.scheme?e.marketPlaceOffer.content.assessmentInstructions:void 0,"track-client":i.client,"track-source":i.source,"track-channel":i.channel,"track-experiment":i.experiment,"track-treatment":i.treatment,"marketplace-offer-name":e.marketPlaceOffer.name,"assessment-title":e.marketPlaceOffer.content.title,description:e.marketPlaceOffer.content.description,"accept-button":e.marketPlaceOffer.content.acceptButton,"decline-button":e.marketPlaceOffer.content.declineButton,"special-banner-title":"allowance"===o.scheme?null==(t=e.marketPlaceOffer.content.specialBanner)?void 0:t.title:void 0,"special-banner-subtitle":"allowance"===o.scheme?null==(n=e.marketPlaceOffer.content.specialBanner)?void 0:n.subtitle:void 0,"special-banner-type":"allowance"===o.scheme?null==(r=e.marketPlaceOffer.content.specialBanner)?void 0:r.type:void 0,"vertical-alignment":"items-center","completed-calculation-json":(null==c?void 0:c.isCompleted)&&c.activity.calculationType&&c.activity.estimate?JSON.stringify(c.activity):void 0,ref:l})},e=>{const t=qn(null),[n,r]=Dn(),[o,i]=Dn(!1);return zn((()=>{(async()=>{const e=await xn.workplaceBackend.getIdToken();r(e)})(),(()=>{if(t.current&&!t.current.querySelector("script[data-injected]")){const e=document.createElement("script"),n=fo(xn.workplaceBackend.getBaseUrl());e.type="module",e.src=`https://npm-cdn.flarehr.com/@flarehr/benefits-plan-assessment@${n}/dist/benefits-plan-assessment.js`,e.dataset.injected="true",e.onload=()=>{i(!0)},t.current.appendChild(e)}else i(!0)})()}),[]),lo("div",{ref:t,className:n,children:n&&o?lo(Pa,{...e,accessToken:n}):lo(Oa,{})})});var Pa;const La=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",...e},v("path",{fill:"currentColor",d:"M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z"}))
|
7
|
+
var So=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,No=/\\([\u000b\u0020-\u00ff])/g,To=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Ao=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),r=-1!==n?t.slice(0,n).trim():t.trim();if(!To.test(r))throw new TypeError("invalid media type");var o=new Oo(r.toLowerCase());if(-1!==n){var i,a,s;for(So.lastIndex=n;a=So.exec(t);){if(a.index!==n)throw new TypeError("invalid parameter format");n+=a[0].length,i=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(No,"$1")),o.parameters[i]=s}if(n!==t.length)throw new TypeError("invalid parameter format")}return o};function Oo(e){this.parameters=Object.create(null),this.type=e}var Ro=new Map,Po=function(e){return e.cloneNode(!0)},Lo=function(){return"file:"===window.location.protocol},Io=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=Ao(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(Lo()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||Lo()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(i){if(r.abort(),!(i instanceof Error))throw i;n(i,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},Uo={},Fo=function(e,t){Uo[e]=Uo[e]||[],Uo[e].push(t)},jo=function(e,t,n){if(Ro.has(e)){var r=Ro.get(e);if(void 0===r)return void Fo(e,n);if(r instanceof SVGSVGElement)return void n(null,Po(r))}Ro.set(e,void 0),Fo(e,n),Io(e,t,(function(t,n){var r;t?Ro.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&Ro.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(Uo[e])){var n=Ro.get(e),r=Uo[e][t];n instanceof SVGSVGElement&&r(null,Po(n)),n instanceof Error&&r(n),t===Uo[e].length-1&&delete Uo[e]}}),0)},n=0,r=Uo[e].length;n<r;n++)t(n)}(e)}))},Bo=function(e,t,n){Io(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},Do=0,Mo=[],zo={},Ho="http://www.w3.org/1999/xlink",qo=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==Mo.indexOf(e))return Mo.splice(Mo.indexOf(e),1),void(e=null);Mo.push(e),e.setAttribute("src",""),(r?jo:Bo)(s,o,(function(r,o){if(!o)return Mo.splice(Mo.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var d=e.getAttribute("width");d&&o.setAttribute("width",d);var u=e.getAttribute("height");u&&o.setAttribute("height",u);var p=Array.from(new Set(Eo(Eo(Eo([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",p);var f=e.getAttribute("style");f&&o.setAttribute("style",f),o.setAttribute("data-src",s);var m=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(m,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var h,g,y,_,b,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){h=e,y=w[e];for(var t=function(e,t){var n;_=g[e].id,b=_+"-"+ ++Do,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+_+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+_+'"?\\)'))||n[t].setAttribute(e,"url(#"+b+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(Ho,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,d=i.length;c<d;c++)i[c].setAttributeNS(Ho,"href","#"+b);g[e].id=b},n=0,r=(g=o.querySelectorAll(h+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var v,x,k=o.querySelectorAll("script"),C=[],E=0,S=k.length;E<S;E++)(x=k[E].getAttribute("type"))&&"application/ecmascript"!==x&&"application/javascript"!==x&&"text/javascript"!==x||((v=k[E].innerText||k[E].textContent)&&C.push(v),o.removeChild(k[E]));if(C.length>0&&("always"===t||"once"===t&&!zo[s])){for(var N=0,T=C.length;N<T;N++)new Function(C[N])(window);zo[s]=!0}var A=o.querySelectorAll("style");if(Array.prototype.forEach.call(A,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",Ho),i(o),!e.parentNode)return Mo.splice(Mo.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),Mo.splice(Mo.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},Wo={exports:{}};function Vo(){}function $o(){}$o.resetWarningCache=Vo;Wo.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:$o,resetWarningCache:Vo};return n.PropTypes=n,n}();var Go=Wo.exports,Yo=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Jo="http://www.w3.org/2000/svg",Zo="http://www.w3.org/1999/xlink",Xo=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,Co(n,r);var o=t.prototype;return o.renderSVG=function(){var e,t=this;if(this.reactWrapper instanceof(e=this.reactWrapper,((null==e?void 0:e.ownerDocument)||document).defaultView||window).Node){var n,r,o=this.props,i=o.desc,a=o.evalScripts,s=o.httpRequestWithCredentials,l=o.renumerateIRIElements,c=o.src,d=o.title,u=o.useRequestCache,p=this.props.onError,f=this.props.beforeInjection,m=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((n=document.createElementNS(Jo,h)).setAttribute("xmlns",Jo),n.setAttribute("xmlns:xlink",Zo),r=document.createElementNS(Jo,h)):(n=document.createElement(h),r=document.createElement(h)),n.appendChild(r),r.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(n);var g=function(e){t.removeSVG(),t._isMounted?t.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){p(e)})):p(e)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,d=void 0===c||c,u=n.evalScripts,p=void 0===u?"never":u,f=n.httpRequestWithCredentials,m=void 0!==f&&f,h=n.renumerateIRIElements,g=void 0===h||h;if(e&&"length"in e)for(var y=0,_=0,b=e.length;_<b;_++)qo(e[_],p,g,d,m,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?qo(e,p,g,d,m,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(r,{afterEach:function(e,n){e?g(e):t._isMounted&&t.setState((function(){return{isLoading:!1}}),(function(){try{m(n)}catch(e){g(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),i){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=i,e.prepend(n)}if(d){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var o=document.createElement("title");o.innerHTML=d,e.prepend(o)}try{f(e)}catch(a){g(a)}},cacheRequests:u,evalScripts:a,httpRequestWithCredentials:s,renumerateIRIElements:l})}},o.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},o.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},o.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(ko({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},o.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},o.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var r=e.wrapper,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,Yo);return v(r,ko({},o,{ref:this.refCallback},"svg"===r?{xmlns:Jo,xmlnsXlink:Zo}:{}),this.state.isLoading&&n&&v(n,null),this.state.hasError&&t&&v(t,null))},t}(E);Xo.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},Xo.propTypes={afterInjection:Go.func,beforeInjection:Go.func,desc:Go.string,evalScripts:Go.oneOf(["always","once","never"]),fallback:Go.oneOfType([Go.func,Go.object,Go.string]),httpRequestWithCredentials:Go.bool,loading:Go.oneOfType([Go.func,Go.object,Go.string]),onError:Go.func,renumerateIRIElements:Go.bool,src:Go.string.isRequired,title:Go.string,useRequestCache:Go.bool,wrapper:Go.oneOf(["div","span","svg"])};const Ko=({visible:e,children:t})=>{const n=qn(e);return e&&!n.current&&(n.current=!0),n.current?lo("div",{hidden:!e,children:t}):null},Qo=({icon:e})=>"string"==typeof e?lo(Xo,{src:e,wrapper:"svg",className:"w-6 h-6 max-w-6 max-h-6 min-w-6 min-h-6",beforeInjection:e=>{var t;e.removeAttribute("width"),e.removeAttribute("height"),null==(t=e.querySelector("path"))||t.removeAttribute("fill"),e.setAttribute("fill","currentColor")}}):lo("div",{className:"w-6 h-6 max-w-6 max-h-6 min-w-6 min-h-6",children:e}),ei=({label:e,icon:t})=>lo("div",{className:"flex items-center flex-col",children:[t,lo("p",{className:"max-h-10 max-w-20 break-words text-ellipsis overflow-hidden line-clamp-2 mt-2",children:e})]}),ti=({children:e})=>lo(C,{children:e}),ni=({selectedIndex:e,onChange:t,children:n})=>{const r=Vn((()=>ur.toArray(n).filter((e=>e.type===ei))),[n]),o=Vn((()=>ur.toArray(n).filter((e=>e.type===ti))),[n]);return xo((()=>{o.length>0&&(null==t||t(0))})),lo("div",{children:[lo("div",{className:"flex items-baseline md:mb-4",children:r.map(((n,r)=>lo("div",{onClick:()=>null==t?void 0:t(r),className:`\n text-sm font-medium cursor-auto w-10 min-w-10 max-w-10 h-12 min-h-12 max-h-12 mr-10 h-full relative\n flex items-center justify-center\n [&:not(:last-child):after]:absolute [&:not(:last-child):after]:top-3 [&:not(:last-child):after]:content-[""] [&:not(:last-child):after]:w-10 [&:not(:last-child):after]:border-b-2 [&:not(:last-child):after]:border-solid [&:not(:last-child):after]:border-gray-200 [&:not(:last-child):after]:left-10\n ${r===e?"text-primary-base":"text-gray-400"}\n hover:before:content-[''] \n ${o.length>0?"hover:before:cursor-pointer":"hover:before:cursor-default"} \n hover:before:w-16 hover:before:h-16 hover:before:absolute\n `,children:n},n.key)))}),o.map(((t,n)=>lo(Ko,{visible:n===e,children:t},t.key)))]})},ri=({className:e,children:t})=>lo("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),oi=({className:e,children:t})=>lo("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),ii=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...e},v("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})),ai=({title:e,steps:t,...n})=>{const r=t.length,o=t.filter((e=>e.completed)).length;return lo("div",{...n,children:[e&&lo("h1",{className:"text-lg font-semibold mb-4",children:e}),lo("ol",{children:t.map(((e,t)=>{const n=o===t;return lo("li",{className:"relative flex-1 pb-6 "+(t!==r-1?`after:content-[''] after:w-0.5 after:h-[calc(100%-theme(height.8))] ${e.completed?"after:bg-primary-base":"after:bg-gray-300"} after:inline-block after:absolute after:top-8 after:left-4`:""),children:lo("div",{className:"flex font-medium w-full",children:[lo("span",{className:`w-8 min-w-8 max-w-8 h-8 min-h-8 max-h-8 ${e.completed?"bg-primary-base":"bg-white"} border-2 ${e.completed||n?"border-primary-base":"border-gray-300"} rounded-full flex justify-center items-center mr-3 text-sm ${n?"text-primary-base":"text-gray-500"}`,children:e.completed?lo(ii,{className:"w-4 h-4 text-white"}):t+1}),lo("div",{children:[lo("h4",{className:"text-sm text-left font-semibold "+(e.completed||n?"text-primary-base":"text-gray-600"),children:e.title}),lo("p",{className:"text-sm text-left font-normal",children:e.description})]})]})},t)}))})]})};var si=Object.defineProperty,li=(e,t,n)=>(((e,t,n)=>{t in e?si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let ci=new class{constructor(){li(this,"current",this.detect()),li(this,"handoffState","pending"),li(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}},di=(e,t)=>{ci.isServer?zn(e,t):Hn(e,t)};function ui(e){let t=qn(e);return di((()=>{t.current=e}),[e]),t}let pi=function(e){let t=ui(e);return oo.useCallback(((...e)=>t.current(...e)),[t])};function fi(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=fi();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function mi(){let[e]=Dn(fi);return zn((()=>()=>e.dispose()),[e]),e}function hi(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in io&&io.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=Dn(ci.isHandoffComplete);return t&&!1===ci.isHandoffComplete&&n(!1),zn((()=>{!0!==t&&n(!0)}),[t]),zn((()=>ci.handoff()),[]),!e&&t}function gi(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=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(r,gi),r}let yi=Symbol();function _i(...e){let t=qn(e);zn((()=>{t.current=e}),[e]);let n=pi((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[yi])))?void 0:n}function bi(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var wi,vi,xi=((vi=xi||{})[vi.None=0]="None",vi[vi.RenderStrategy=1]="RenderStrategy",vi[vi.Static=2]="Static",vi),ki=((wi=ki||{})[wi.Unmount=0]="Unmount",wi[wi.Hidden=1]="Hidden",wi);function Ci({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a,mergeRefs:s}){s=null!=s?s:Si;let l=Ni(t,e);if(i)return Ei(l,n,r,a,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=l;if(e)return Ei(t,n,r,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return gi(e?0:1,{0:()=>null,1:()=>Ei({...t,hidden:!0,style:{display:"none"}},n,r,a,s)})}return Ei(l,n,r,a,s)}function Ei(e,t={},n,r,o){let{as:i=n,children:a,refName:s="ref",...l}=Oi(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},d="function"==typeof a?a(t):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t));let u={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r);e&&(u["data-headlessui-state"]=n.join(" "))}if(i===C&&Object.keys(Ai(l)).length>0){if(!qr(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).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=d.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>bi(null==e?void 0:e.className(...t),l.className):bi(null==e?void 0:e.className,l.className),n=t?{className:t}:{};return Vr(d,Object.assign({},Ni(d.props,Ai(Oi(l,["ref"]))),u,c,{ref:o(d.ref,c.ref)},n))}return v(i,Object.assign({},Oi(l,["ref"]),i!==C&&c,i!==C&&u),d)}function Si(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Ni(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let r in n)Object.assign(t,{[r](e,...t){let o=n[r];for(let n of o){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Ti(e){var t;return Object.assign(cr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ai(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function Oi(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Ri=G(null);Ri.displayName="OpenClosedContext";var Pi=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Pi||{});function Li(){return Gn(Ri)}function Ii({value:e,children:t}){return oo.createElement(Ri.Provider,{value:e},t)}function Ui(){let e=qn(!1);return di((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Fi(e,...t){e&&t.length>0&&e.classList.add(...t)}function ji(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Bi(e,t,n,r){let o=n?"enter":"leave",i=fi(),a=void 0!==r?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let s=gi(o,{enter:()=>t.enter,leave:()=>t.leave}),l=gi(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=gi(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ji(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Fi(e,...t.base,...s,...c),i.nextFrame((()=>{ji(e,...t.base,...s,...c),Fi(e,...t.base,...s,...l),function(e,t){let n=fi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,a]=[r,o].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})),s=i+a;if(0!==s){n.group((n=>{n.setTimeout((()=>{t(),n.dispose()}),s),n.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&n.dispose()}))}));let r=n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),r())}))}else t();n.add((()=>t())),n.dispose}(e,(()=>(ji(e,...t.base,...s),Fi(e,...t.base,...t.entered),a())))})),i.dispose}function Di(e=""){return e.split(/\s+/).filter((e=>e.length>1))}let Mi=G(null);Mi.displayName="TransitionContext";var zi,Hi=((zi=Hi||{}).Visible="visible",zi.Hidden="hidden",zi);let qi=G(null);function Wi(e){return"children"in e?Wi(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Vi(e,t){let n=ui(e),r=qn([]),o=Ui(),i=mi(),a=pi(((e,t=ki.Hidden)=>{let a=r.current.findIndex((({el:t})=>t===e));-1!==a&&(gi(t,{[ki.Unmount](){r.current.splice(a,1)},[ki.Hidden](){r.current[a].state="hidden"}}),i.microTask((()=>{var e;!Wi(r)&&o.current&&(null==(e=n.current)||e.call(n))})))})),s=pi((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>a(e,ki.Unmount)})),l=qn([]),c=qn(Promise.resolve()),d=qn({enter:[],leave:[],idle:[]}),u=pi(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(d.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),p=pi(((e,t,n)=>{Promise.all(d.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return Vn((()=>({children:r,register:s,unregister:a,onStart:u,onStop:p,wait:c,chains:d})),[s,a,r,u,p,d,c])}function $i(){}qi.displayName="NestingContext";let Gi=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Yi(e){var t;let n={};for(let r of Gi)n[r]=null!=(t=e[r])?t:$i;return n}let Ji=xi.RenderStrategy;let Zi=Ti((function(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,a=qn(null),s=_i(a,t);hi();let l=Li();if(void 0===n&&null!==l&&(n=(l&Pi.Open)===Pi.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=Dn(n?"visible":"hidden"),u=Vi((()=>{d("hidden")})),[p,f]=Dn(!0),m=qn([n]);di((()=>{!1!==p&&m.current[m.current.length-1]!==n&&(m.current.push(n),f(!1))}),[m,n]);let h=Vn((()=>({show:n,appear:r,initial:p})),[n,r,p]);zn((()=>{if(n)d("visible");else if(Wi(u)){let e=a.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&d("hidden")}else d("hidden")}),[n,u]);let g={unmount:o},y=pi((()=>{var t;p&&f(!1),null==(t=e.beforeEnter)||t.call(e)})),_=pi((()=>{var t;p&&f(!1),null==(t=e.beforeLeave)||t.call(e)}));return oo.createElement(qi.Provider,{value:u},oo.createElement(Mi.Provider,{value:h},Ci({ourProps:{...g,as:C,children:oo.createElement(Xi,{ref:s,...g,...i,beforeEnter:y,beforeLeave:_})},theirProps:{},defaultTag:C,features:Ji,visible:"visible"===c,name:"Transition"})))})),Xi=Ti((function(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s,enter:l,enterFrom:c,enterTo:d,entered:u,leave:p,leaveFrom:f,leaveTo:m,...h}=e,g=qn(null),y=_i(g,t),_=null==(n=h.unmount)||n?ki.Unmount:ki.Hidden,{show:b,appear:w,initial:v}=function(){let e=Gn(Mi);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[x,k]=Dn(b?"visible":"hidden"),C=function(){let e=Gn(qi);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:E,unregister:S}=C;zn((()=>E(g)),[E,g]),zn((()=>{if(_===ki.Hidden&&g.current)return b&&"visible"!==x?void k("visible"):gi(x,{hidden:()=>S(g),visible:()=>E(g)})}),[x,g,E,S,b,_]);let N=ui({base:Di(h.className),enter:Di(l),enterFrom:Di(c),enterTo:Di(d),entered:Di(u),leave:Di(p),leaveFrom:Di(f),leaveTo:Di(m)}),T=function(e){let t=qn(Yi(e));return zn((()=>{t.current=Yi(e)}),[e]),t}({beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s}),A=hi();zn((()=>{if(A&&"visible"===x&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,x,A]);let O=v&&!w,R=w&&b&&v,P=(()=>!A||O?"idle":b?"enter":"leave")(),L=function(e=0){let[t,n]=Dn(e),r=Ui(),o=$n((e=>{r.current&&n((t=>t|e))}),[t,r]),i=$n((e=>Boolean(t&e)),[t]),a=$n((e=>{r.current&&n((t=>t&~e))}),[n,r]),s=$n((e=>{r.current&&n((t=>t^e))}),[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:a,toggleFlag:s}}(0),I=pi((e=>gi(e,{enter:()=>{L.addFlag(Pi.Opening),T.current.beforeEnter()},leave:()=>{L.addFlag(Pi.Closing),T.current.beforeLeave()},idle:()=>{}}))),U=pi((e=>gi(e,{enter:()=>{L.removeFlag(Pi.Opening),T.current.afterEnter()},leave:()=>{L.removeFlag(Pi.Closing),T.current.afterLeave()},idle:()=>{}}))),F=Vi((()=>{k("hidden"),S(g)}),C),j=qn(!1);!function({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let a=Ui(),s=mi(),l=ui(n);di((()=>{e&&(l.current="enter")}),[e]),di((()=>{let e=fi();s.add(e.dispose);let n=t.current;if(n&&"idle"!==l.current&&a.current)return e.dispose(),o.current(l.current),e.add(Bi(n,r.current,"enter"===l.current,(()=>{e.dispose(),i.current(l.current)}))),e.dispose}),[n])}({immediate:R,container:g,classes:N,direction:P,onStart:ui((e=>{j.current=!0,F.onStart(g,e,I)})),onStop:ui((e=>{j.current=!1,F.onStop(g,e,U),"leave"===e&&!Wi(F)&&(k("hidden"),S(g))}))});let B=h,D={ref:y};return R?B={...B,className:bi(h.className,...N.current.enter,...N.current.enterFrom)}:j.current&&(B.className=bi(h.className,null==(r=g.current)?void 0:r.className),""===B.className&&delete B.className),oo.createElement(qi.Provider,{value:F},oo.createElement(Ii,{value:gi(x,{visible:Pi.Open,hidden:Pi.Closed})|L.flags},Ci({ourProps:D,theirProps:B,defaultTag:"div",features:Ji,visible:"visible"===x,name:"Transition.Child"})))})),Ki=Ti((function(e,t){let n=null!==Gn(Mi),r=null!==Li();return oo.createElement(oo.Fragment,null,!n&&r?oo.createElement(Zi,{ref:t,...e}):oo.createElement(Xi,{ref:t,...e}))})),Qi=Object.assign(Zi,{Child:Ki,Root:Zi});const ea=({children:e})=>{const t=oo.Children.toArray(e),n=t.find((e=>e.type===ta)),r=t.find((e=>e.type===na));return lo(Qi,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:lo("div",{class:"flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[lo(Qi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:n&&lo("div",{class:"flex items-center h-full",children:n})}),lo(Qi,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",children:r&&lo("div",{class:"flex items-center h-full",children:r})})]})})},ta=({children:e})=>lo(C,{children:e}),na=({children:e})=>lo(C,{children:e});ea.Top=ta,ea.Bottom=na;const ra=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t},offers:n}=Gn(uo),r="allowance"===t.scheme?t.content.setUpBenefits:void 0;return lo(C,{children:r&&lo("div",{className:"flex flex-col items-center max-w-full w-full mx-auto",children:[lo(ni,{selectedIndex:-1,children:n.map((e=>lo(ei,{label:e.content.productName,icon:lo(Qo,{icon:e.content.iconUrl})},e.name)))}),lo(ea,{children:[lo(ea.Top,{children:lo("div",{className:"flex flex-col gap-4",children:[lo(ri,{children:r.title}),lo(oi,{children:r.description})]})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[r.progress&&lo(vo,{className:"lg:w-3/4",title:r.progress.title,children:lo(ai,{steps:r.progress.steps,className:"mt-2 rounded-md px-6 py-4"})}),lo(wo,{testId:"allowance_set_up_benefits_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:e,children:r.buttonText}),r.termsAndConditions&&lo("span",{className:"font-normal text-xs mt-4 lg:w-3/4",children:lo(r.termsAndConditions,{})})]})})]})]})})},oa=({icon:e,children:t,className:n,...r})=>lo("div",{...r,className:`${n??""} rounded-md shadow-sm`,children:lo("div",{className:"flex items-center gap-4 px-4 py-4",children:[e&&lo("span",{className:"w-8 min-w-8 max-w-8",children:e}),t&&lo("span",{className:"text-left text-base",children:t})]})}),ia=(e,t)=>{switch(!0){case"started"===e:return vn.backend.command({eventType:"Started"},t);case"membership-accepted"===e:return vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!0,featureName:"",treatmentName:"",template:"Eoi"}},t);case"membership-declined"===e:return vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!1,featureName:"",treatmentName:"",template:"Eoi"}},t);case"sign-up-viewed"===e:return vn.backend.command({eventType:"OfferViewed",offerName:"Membership",data:{featureName:"",treatmentName:""}},t);case"sign-up-completed"===e:return(async()=>{await vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!0,featureName:"",treatmentName:"",template:"Eoi"}},t),await vn.backend.command({eventType:"CustomerRegistrationCompleted",isRegistered:!0},t)})();case"sign-up-declined"===e:return(async()=>{await vn.backend.command({eventType:"CustomerRegistrationCompleted",isRegistered:!1},t),await vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!1,featureName:"",treatmentName:"",template:"Eoi"}},t)})();case"object"==typeof e&&"offer-selected"===e.type:return vn.workplaceBackend.track("MarketplaceOffer Selected",{offer:e.offerName},t);case"object"==typeof e&&"offer-viewed"===e.type:return vn.backend.command({...e,eventType:"OfferViewed"},t);case"object"==typeof e&&"offer-accepted"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:{...e.data,accepted:!0}},t);case"object"==typeof e&&"offer-declined"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:{...e.data,accepted:!1}},t);case"object"==typeof e&&"offer-progressed"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:e.data},t);case"object"==typeof e&&"summary-viewed"===e.type:return vn.backend.command({eventType:"SummaryViewed",summaryVariant:e.data.summaryVariant},t);case"completed"===e:return vn.backend.command({eventType:"Completed"},t)}return Promise.resolve()},aa=()=>({trace:ia}),sa=e=>{const{trace:t}=aa(),{featureFlags:{marketplaceScheme:n}}=Gn(uo),r="allowance"===n.scheme?n.content.joinBenefits:void 0;return lo(C,{children:r&&lo(ea,{children:[lo(ea.Top,{children:[lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:r.desktopImageUrl}),lo("img",{class:"max-w-[30rem] w-full md:hidden",src:r.mobileImageUrl})]}),lo(ea.Bottom,{children:lo("div",{children:[lo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:r.title}),lo("p",{class:"mt-3 text-lg leading-7 text-gray-600",children:r.description}),lo(oa,{className:"bg-teal-50 mt-5",style:{background:"linear-gradient(90deg, rgba(255, 216, 77, 0.10) 0%, rgba(255, 135, 111, 0.10) 100%)"},icon:r.specialBanner.icon,children:lo("div",{children:[lo("p",{className:"font-semibold text-base text-gray-900",children:r.specialBanner.title}),lo("span",{className:"font-normal text-base text-gray-900",children:r.specialBanner.subTitle})]})}),lo(wo,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{await t("started",{experiment:"onboarding-marketplace-scheme",treatment:n.scheme}),e.onContinue()},children:r.buttonText})]})})]})})},la=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/get-app-CQalMIl7.jpg?inline").href:new URL("assets/get-app-CQalMIl7.jpg?inline","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),ca=()=>lo("div",{className:"mt-4 flex items-center border rounded-md border-gray-300",children:[lo("img",{className:"h-40 h-min-40 h-max-40 m-0.5",src:la}),lo("div",{className:"flex flex-col gap-1",children:[lo("h4",{className:"font-bold text-lg text-left",children:"Workplace benefits in your pocket!"}),lo("p",{className:"font-normal text-base text-left",children:"Download the Flare app for easy access to your workplace benefits and exclusive discounts."}),lo("a",{className:"focus:ring-2 focus:ring-primary-focus font-bold rounded-md self-start text-primary-base",target:"_blank",rel:"noreferrer",href:"https://flarehr.app.link/download",children:["Get the Flare App ","->"]})]})]}),da=({onContinue:e})=>{const{offersProgress:{hasCompletedAnyOffers:t},isAppEnabled:n,featureFlags:{marketplaceScheme:r}}=Gn(uo),{trace:o}=aa(),i=Vn((()=>{const e=t();switch(!0){case n&&e:return"allowance-accepted-app";case n&&!e:return"allowance-declined-app";case!n&&e:return"allowance-accepted-noapp";case!n&&!e:return"allowance-declined-noapp";default:throw"Invalid summary variant"}}),[t,n]);zn((()=>{(async()=>{await o({type:"summary-viewed",data:{summaryVariant:i}},{experiment:"onboarding-marketplace-scheme",treatment:r.scheme})})()}),[r,i,o]);const a=$n((async()=>{await o("completed",{experiment:"onboarding-marketplace-scheme",treatment:r.scheme}),await e()}),[r,e,o]),s="allowance"===r.scheme?r.content.summary:void 0;return lo(C,{children:s&&lo(ea,{children:[lo(ea.Top,{children:lo("div",{className:"flex flex-col gap-4",children:[lo(ri,{children:s.title}),lo(oi,{children:s.description})]})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[s.progress&&lo(vo,{className:"lg:w-3/4",title:s.progress.title,children:lo(ai,{steps:s.progress.steps,className:"mt-2 rounded-md px-6 py-4"})}),lo(wo,{testId:"step-benefits-finish",class:"mt-5 w-full md:w-[240px]",onClickPromise:a,children:s.buttonText}),n&&lo(ca,{})]})})]})})};var ua=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(ua||{});const pa=({className:e,children:t,...n})=>lo("label",{class:`text-base text-gray-600 ${e??""}`,...n,children:t}),fa=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},v("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"})),ma=({className:e,onClick:t,...n})=>{const[r,o]=Dn(!1);return lo("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:$n((()=>{if(!r)return o(!0),t().finally((()=>{o(!1)}))}),[r,t]),...n,children:[lo("div",{class:"relative "+(r?"invisible":""),children:n.children}),r&&lo("div",{class:"absolute animate-spin",children:lo(_o,{theme:"primary"})})]})},ha=({className:e,allowedKeyPattern:t,onChange:n,value:r,leadingIconElement:o,trailingIconElement:i,...a})=>{const s=$n((e=>{t.test(e.key)||e.preventDefault()}),[t]);return lo(C,{children:lo("div",{class:"relative",children:[o,lo("input",{"data-testid":a.testId,type:"text",className:`border-0 ring-2 ring-gray-200 focus:outline-none text-base font-medium rounded-md shadow-sm ${e}`,value:r,onKeyPress:s,onChange:e=>n(e.currentTarget.value),...a}),i]})})},ga=e=>e.replace(/ /g,""),ya=e=>{const t=ga(e);return t.startsWith("04")&&10===t.length||t.startsWith("614")&&11===t.length||t.startsWith("+614")&&12===t.length||/^\+642\d{7,9}$/.test(t)},_a=({phoneNumber:e,onSubmit:t,onDecline:n})=>{const{hostInformation:{workflowsJourneyType:r}}=Gn(uo),[o,i]=Dn(""),{setPhoneNumber:a,phoneNumber:s}=(e=>{const{identity:t}=Gn(uo),[n,r]=Dn((()=>e&&ya(e)?e:"")),o=Vn((()=>ya(n)),[n]),i=Vn((()=>ga(n)),[n]),a=Vn((()=>i.startsWith("04")?`+61${i.replace(/^0+/,"")}`:i.startsWith("614")?`+${i}`:i),[i]),s=Vn((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(i)),[i]),l=Vn((()=>ya(t.verifiedPhoneNumber)&&a===t.verifiedPhoneNumber),[a,t.verifiedPhoneNumber]);return{setPhoneNumber:r,phoneNumber:{valid:o,original:n,formatted:a,masked:s,isVerified:l}}})(e),[l,c]=Dn(s.isVerified),d=$n((()=>{i("")}),[]),u=$n((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),p=$n((async()=>{s.valid&&await t(s).catch(i)}),[s,t]),f=$n((async()=>{c(!1)}),[]),m=lo("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified ",lo(fa,{})]});return lo(ea,{children:[lo(ea.Top,{children:lo("div",{className:"flex flex-col gap-5",children:[lo(ri,{children:"Join your workplace benefits program"}),lo(oi,{children:[s.isVerified?"Confirm ":"Enter "," your ",lo("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 md:w-[300px] text-left",children:[lo(pa,{className:"font-medium text-sm text-gray-900 text-left",children:"Australian Mobile Number"}),lo(ha,{testId:"sign_in_mobile_number_text_input_mobile_number",allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full p-2 focus-visible:ring-gray-500",value:s.original,onChange:a,onfocusin:d,onfocusout:u,trailingIconElement:l&&m,disabled:l}),0!==o.length&&lo("div",{className:"h-8 leading-none",children:lo("span",{className:"text-xs text-rose-500",children:o})}),l&&lo("div",{className:"mt-2 ml-2 mb-2 leading-none",children:lo("span",{className:"text-xs",children:["Not your personal number?",lo(ma,{class:"text-blue-500",onClick:f,children:"Change number"})]})}),lo("div",{children:lo("span",{className:"font-medium text-sm text-gray-900 text-center",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",lo("a",{href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",lo("a",{href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]})}),lo(wo,{testId:"sign_in_mobile_number_button_send_otp",class:"mt-5 md:w-full",onClickPromise:p,children:"Join your workplace"}),r!==ne.AppInvite&&lo(wo,{testId:"sign_in_mobile_number_button_decline_to_send_otp",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:n,children:"Not now"})]})})]})},ba=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/check-animated-QQOZQPLY.gif?inline").href:new URL("assets/check-animated-QQOZQPLY.gif?inline","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),wa=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t}}=Gn(uo),n=Vn((()=>"allowance"===t.scheme?{title:"Account created successfully",description:"You now have access to your workplace benefits",isNextButtonHidden:!0}:{title:"You’ve joined your workplace benefits program",description:"You now have access to your workplace benefits",isNextButtonHidden:!1}),[t]);return zn((()=>{if("allowance"===t.scheme){const t=setTimeout(e,3e3);return()=>clearTimeout(t)}}),[t,e]),lo(ea,{children:[lo(ea.Top,{children:lo("img",{src:ba,className:"h-16 w-16"})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[lo(ri,{children:n.title}),lo(oi,{children:n.description}),!n.isNextButtonHidden&&lo(wo,{testId:"sign_in_success_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:async()=>{e()},children:"Set up your benefits"})]})})]})},va=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},v("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),xa=({open:e})=>lo(yo,{open:e,children:lo(go,{children:lo("div",{className:"flex flex-col gap-5 items-center justify-center text-center",children:[lo("span",{class:"animate-spin",children:lo(_o,{size:"lg"})}),lo(ri,{children:"Creating your account"}),lo("div",{children:[lo(oi,{children:"This can take up to 30 seconds."}),lo(oi,{children:"Please don't navigate away or refresh your browser."})]})]})})}),ka=({phoneNumber:e,onVerify:t,onResendOtp:n,onGoBack:r})=>{const{otp:o,setOtp:i}=(()=>{const[e,t]=Dn("");return{otp:{valid:Vn((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[a,s]=Dn(!1),[l,c]=Dn(""),{countdown:d,restart:u}=(e=>{const[t,n]=Dn(e),r=qn(),o=$n((()=>{clearInterval(r.current)}),[]);return zn((()=>o),[o]),{countdown:t,restart:$n((()=>{let t=e;clearInterval(r.current),r.current=setInterval((()=>{t<0?clearInterval(r.current):n(t--)}),1e3)}),[e])}})(60);zn(u,[u]);const p=$n((()=>(s(!0),c(""),t(o.code).catch(c).finally((()=>{s(!1)})))),[t,o.code]),f=$n((()=>(c(""),n().then(u).catch(c))),[n,u]);return lo(C,{children:[lo(xa,{open:a}),lo(ea,{children:[lo(ea.Top,{children:lo("div",{className:"flex flex-col gap-5",children:[lo(ri,{children:"Verify your mobile number"}),lo(oi,{children:["An SMS verification code has been sent to the number ",e,"."]})]})}),lo(ea.Bottom,{children:lo("div",{className:"mt-5 md:w-[300px] text-left",children:[lo(pa,{className:"font-medium text-sm text-gray-900 text-left",children:"Enter your verification code"}),lo(ha,{testId:"sign_in_otp_text_input_otp",allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full p-2 focus-visible:ring-gray-500",trailingIconElement:!1,onChange:i}),l&&lo("span",{className:"text-xs text-rose-500",children:l}),lo("p",{class:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",lo(ma,{disabled:0!==d,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:f,children:"Resend SMS"}),0!==d&&lo(C,{children:["in ",d," secs"]})]}),lo(wo,{testId:"sign_in_otp_button_verify_otp",class:"mt-5 md:w-full",disabled:!o.valid,onClickPromise:p,children:"Continue"}),lo(wo,{testId:"sign_in_otp_button_decline_to_verify_otp",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()=>{r()},children:lo("span",{className:"flex gap-3",children:[lo(va,{}),"Back"]})})]})})]})]})},Ca=({phoneNumber:e,onSignUp:t,onVerify:n,onResendOtp:r,onSuccess:o,onDecline:i})=>{const{trace:a}=aa(),[s,l]=Dn(e??""),{step:c,goBack:d,goToStep:u}=(()=>{const[e,t]=Dn(0),n=$n((()=>{const n=e-1;n>=0&&t(n)}),[e]),r=$n((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:n,goToStep:r}})();zn((()=>{(async()=>{await a("sign-up-viewed")})()}),[a]);const p=$n((e=>t(e.formatted).then((async t=>{l(e.masked),t.isVerificationRequired?u(ua.OTP):(await a("sign-up-completed"),u(ua.SUCCESS))}))),[u,t,a]),f=$n((()=>a("sign-up-declined").then(i)),[i,a]),m=$n((e=>n(e).then((async()=>{await a("sign-up-completed"),u(ua.SUCCESS)}))),[u,n,a]);return lo(C,{children:[c===ua.PHONE_NUMBER&&lo(_a,{phoneNumber:s,onSubmit:p,onDecline:f}),c===ua.OTP&&lo(ka,{phoneNumber:s,onVerify:m,onResendOtp:r,onGoBack:d}),c===ua.SUCCESS&&lo(wa,{onContinue:o})]})};var Ea=(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))(Ea||{});const Sa=e=>{var t;const n=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Ea[null==n?void 0:n.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Na=({onSuccess:e,onDecline:t})=>{const{identity:{phoneNumber:n}}=Gn(uo),{signUp:r,verifyOtp:o,resendOtp:i}={signUp:async e=>vn.backend.getClient().post("v2.0/auth/signUp",{mobileNumber:e}).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async e=>{await vn.backend.getClient().post("auth/verify",{otp:e}).catch(Sa)},resendOtp:async()=>{await vn.backend.getClient().post("auth/resend").catch(Sa)}};return lo(C,{children:lo(Ca,{phoneNumber:n,onSignUp:r,onVerify:o,onResendOtp:i,onSuccess:e,onDecline:t})})},Ta=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/intro-COqxd5jd.png").href:new URL("assets/intro-COqxd5jd.png","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),Aa=e=>{const{trace:t}=aa(),{featureFlags:{marketplaceScheme:n}}=Gn(uo);return lo(ea,{children:[lo(ea.Top,{children:lo("img",{class:"max-w-[30rem] w-full",src:Ta})}),lo(ea.Bottom,{children:lo("div",{children:[lo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:"Finish setting up your workplace benefits"}),lo("p",{class:"mt-3 text-lg leading-7 text-gray-600",children:"Because your workplace uses Flare you have access to a range of exclusive benefits that can save you thousands of dollars every year on your car, private health insurance, weekly grocery shop and more."}),lo(wo,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{await t("started",{experiment:"onboarding-marketplace-scheme",treatment:n.scheme}),e.onStepComplete()},children:"Continue"})]})})]})},Oa=()=>lo("div",{class:"flex justify-center",children:lo("span",{class:"animate-spin",children:lo(_o,{size:"lg"})})}),Ra=(Pa=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o},hostInformation:i,getAllowanceProduct:a}=Gn(uo),{trace:s}=aa(),l=qn(null),c=a(e.marketPlaceOffer.name);return xo((()=>{s({type:"offer-viewed",offerName:e.marketPlaceOffer.name,data:e.marketPlaceOffer.metadata},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),l.current&&(l.current.terms=e.marketPlaceOffer.content.terms,l.current.details=e.marketPlaceOffer.content.details,l.current["on-accept"]=async()=>{await s({type:"offer-accepted",offerName:e.marketPlaceOffer.name,data:{...e.marketPlaceOffer.metadata,template:e.marketPlaceOffer.content.template,assessmentId:e.marketPlaceOffer.content.assessmentId}},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName})},l.current["on-decline"]=async()=>{await s({type:"offer-declined",offerName:e.marketPlaceOffer.name,data:{...e.marketPlaceOffer.metadata,template:e.marketPlaceOffer.content.template,assessmentId:e.marketPlaceOffer.content.assessmentId}},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),e.onStepComplete(!1,!1)},l.current["on-complete"]=()=>e.onStepComplete(!0,!0),l.current["on-skip"]=e.marketPlaceOffer.content.skipButtonHidden?void 0:()=>e.onStepComplete(!0,!1))})),lo("benefits-plan-assessment",{"base-url":xn.workplaceBackend.getBaseUrl(),"profile-id":xn.workplaceBackend.getProfileId(),"skip-more-details":!0,"access-token":e.accessToken,"image-url":e.marketPlaceOffer.content.imageUrl,"assessment-id":e.marketPlaceOffer.content.assessmentId,"assessment-instructions":"allowance"===o.scheme?e.marketPlaceOffer.content.assessmentInstructions:void 0,"track-client":i.client,"track-source":i.source,"track-channel":i.channel,"track-experiment":i.experiment,"track-treatment":i.treatment,"marketplace-offer-name":e.marketPlaceOffer.name,"assessment-title":e.marketPlaceOffer.content.title,description:e.marketPlaceOffer.content.description,"accept-button":e.marketPlaceOffer.content.acceptButton,"decline-button":e.marketPlaceOffer.content.declineButton,"special-banner-title":"allowance"===o.scheme?null==(t=e.marketPlaceOffer.content.specialBanner)?void 0:t.title:void 0,"special-banner-subtitle":"allowance"===o.scheme?null==(n=e.marketPlaceOffer.content.specialBanner)?void 0:n.subtitle:void 0,"special-banner-type":"allowance"===o.scheme?null==(r=e.marketPlaceOffer.content.specialBanner)?void 0:r.type:void 0,"vertical-alignment":"items-center","completed-calculation-json":(null==c?void 0:c.isCompleted)&&c.activity.calculationType&&c.activity.estimate?JSON.stringify({calculationType:c.activity.calculationType,estimates:c.activity.estimate}):void 0,ref:l})},e=>{const t=qn(null),[n,r]=Dn(),[o,i]=Dn(!1);return zn((()=>{(async()=>{const e=await xn.workplaceBackend.getIdToken();r(e)})(),(()=>{if(t.current&&!t.current.querySelector("script[data-injected]")){const e=document.createElement("script"),n=fo(xn.workplaceBackend.getBaseUrl());e.type="module",e.src=`https://npm-cdn.flarehr.com/@flarehr/benefits-plan-assessment@${n}/dist/benefits-plan-assessment.js`,e.dataset.injected="true",e.onload=()=>{i(!0)},t.current.appendChild(e)}else i(!0)})()}),[]),lo("div",{ref:t,className:n,children:n&&o?lo(Pa,{...e,accessToken:n}):lo(Oa,{})})});var Pa;const La=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",...e},v("path",{fill:"currentColor",d:"M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z"}))
|
8
8
|
/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */,{entries:Ia,setPrototypeOf:Ua,isFrozen:Fa,getPrototypeOf:ja,getOwnPropertyDescriptor:Ba}=Object;let{freeze:Da,seal:Ma,create:za}=Object,{apply:Ha,construct:qa}="undefined"!=typeof Reflect&&Reflect;Da||(Da=function(e){return e}),Ma||(Ma=function(e){return e}),Ha||(Ha=function(e,t,n){return e.apply(t,n)}),qa||(qa=function(e,t){return new e(...t)});const Wa=rs(Array.prototype.forEach),Va=rs(Array.prototype.pop),$a=rs(Array.prototype.push),Ga=rs(String.prototype.toLowerCase),Ya=rs(String.prototype.toString),Ja=rs(String.prototype.match),Za=rs(String.prototype.replace),Xa=rs(String.prototype.indexOf),Ka=rs(String.prototype.trim),Qa=rs(Object.prototype.hasOwnProperty),es=rs(RegExp.prototype.test),ts=(ns=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return qa(ns,t)});var ns;function rs(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Ha(e,t,r)}}function os(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ga;Ua&&Ua(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Fa(t)||(t[r]=e),o=e)}e[o]=!0}return e}function is(e){for(let t=0;t<e.length;t++){Qa(e,t)||(e[t]=null)}return e}function as(e){const t=za(null);for(const[n,r]of Ia(e)){Qa(e,n)&&(Array.isArray(r)?t[n]=is(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=as(r):t[n]=r)}return t}function ss(e,t){for(;null!==e;){const n=Ba(e,t);if(n){if(n.get)return rs(n.get);if("function"==typeof n.value)return rs(n.value)}e=ja(e)}return function(){return null}}const ls=Da(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cs=Da(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ds=Da(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),us=Da(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ps=Da(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),fs=Da(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ms=Da(["#text"]),hs=Da(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),gs=Da(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ys=Da(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),_s=Da(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bs=Ma(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ws=Ma(/<%[\w\W]*|[\w\W]*%>/gm),vs=Ma(/\${[\w\W]*}/gm),xs=Ma(/^data-[\-\w.\u00B7-\uFFFF]/),ks=Ma(/^aria-[\-\w]+$/),Cs=Ma(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Es=Ma(/^(?:\w+script|data):/i),Ss=Ma(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ns=Ma(/^html$/i),Ts=Ma(/^[a-z][.\w]*(-[.\w]+)+$/i);var As=Object.freeze({__proto__:null,MUSTACHE_EXPR:bs,ERB_EXPR:ws,TMPLIT_EXPR:vs,DATA_ATTR:xs,ARIA_ATTR:ks,IS_ALLOWED_URI:Cs,IS_SCRIPT_OR_DATA:Es,ATTR_WHITESPACE:Ss,DOCTYPE_NAME:Ns,CUSTOM_ELEMENT:Ts});const Os=1,Rs=3,Ps=7,Ls=8,Is=9;var Us=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.1.6",n.removed=[],!t||!t.document||t.document.nodeType!==Is)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:f,trustedTypes:m}=t,h=c.prototype,g=ss(h,"cloneNode"),y=ss(h,"remove"),_=ss(h,"nextSibling"),b=ss(h,"childNodes"),w=ss(h,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let v,x="";const{implementation:k,createNodeIterator:C,createDocumentFragment:E,getElementsByTagName:S}=r,{importNode:N}=o;let T={};n.isSupported="function"==typeof Ia&&"function"==typeof w&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:O,TMPLIT_EXPR:R,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:F}=As;let{IS_ALLOWED_URI:j}=As,B=null;const D=os({},[...ls,...cs,...ds,...ps,...ms]);let M=null;const z=os({},[...hs,...gs,...ys,..._s]);let H=Object.seal(za(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,W=null,V=!0,$=!0,G=!1,Y=!0,J=!1,Z=!0,X=!1,K=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!0,oe=!1,ie=!0,ae=!1,se={},le=null;const ce=os({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const ue=os({},["audio","video","img","source","image","track"]);let pe=null;const fe=os({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let ye=ge,_e=!1,be=null;const we=os({},[me,he,ge],Ya);let ve=null;const xe=["application/xhtml+xml","text/html"];let ke=null,Ce=null;const Ee=r.createElement("form"),Se=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&"object"==typeof e||(e={}),e=as(e),ve=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ke="application/xhtml+xml"===ve?Ya:Ga,B=Qa(e,"ALLOWED_TAGS")?os({},e.ALLOWED_TAGS,ke):D,M=Qa(e,"ALLOWED_ATTR")?os({},e.ALLOWED_ATTR,ke):z,be=Qa(e,"ALLOWED_NAMESPACES")?os({},e.ALLOWED_NAMESPACES,Ya):we,pe=Qa(e,"ADD_URI_SAFE_ATTR")?os(as(fe),e.ADD_URI_SAFE_ATTR,ke):fe,de=Qa(e,"ADD_DATA_URI_TAGS")?os(as(ue),e.ADD_DATA_URI_TAGS,ke):ue,le=Qa(e,"FORBID_CONTENTS")?os({},e.FORBID_CONTENTS,ke):ce,q=Qa(e,"FORBID_TAGS")?os({},e.FORBID_TAGS,ke):{},W=Qa(e,"FORBID_ATTR")?os({},e.FORBID_ATTR,ke):{},se=!!Qa(e,"USE_PROFILES")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,$=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,J=e.SAFE_FOR_TEMPLATES||!1,Z=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,j=e.ALLOWED_URI_REGEXP||Cs,ye=e.NAMESPACE||ge,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&($=!1),te&&(ee=!0),se&&(B=os({},ms),M=[],!0===se.html&&(os(B,ls),os(M,hs)),!0===se.svg&&(os(B,cs),os(M,gs),os(M,_s)),!0===se.svgFilters&&(os(B,ds),os(M,gs),os(M,_s)),!0===se.mathMl&&(os(B,ps),os(M,ys),os(M,_s))),e.ADD_TAGS&&(B===D&&(B=as(B)),os(B,e.ADD_TAGS,ke)),e.ADD_ATTR&&(M===z&&(M=as(M)),os(M,e.ADD_ATTR,ke)),e.ADD_URI_SAFE_ATTR&&os(pe,e.ADD_URI_SAFE_ATTR,ke),e.FORBID_CONTENTS&&(le===ce&&(le=as(le)),os(le,e.FORBID_CONTENTS,ke)),ie&&(B["#text"]=!0),X&&os(B,["html","head","body"]),B.table&&(os(B,["tbody"]),delete q.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ts('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ts('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=e.TRUSTED_TYPES_POLICY,x=v.createHTML("")}else void 0===v&&(v=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(i){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(m,i)),null!==v&&"string"==typeof x&&(x=v.createHTML(""));Da&&Da(e),Ce=e}},Te=os({},["mi","mo","mn","ms","mtext"]),Ae=os({},["foreignobject","annotation-xml"]),Oe=os({},["title","style","font","a","script"]),Re=os({},[...cs,...ds,...us]),Pe=os({},[...ps,...fs]),Le=function(e){$a(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},Ie=function(e,t){try{$a(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(r){$a(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!M[e])if(ee||te)try{Le(t)}catch(r){}else try{t.setAttribute(e,"")}catch(r){}},Ue=function(e){let t=null,n=null;if(Q)e="<remove></remove>"+e;else{const t=Ja(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ve&&ye===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=v?v.createHTML(e):e;if(ye===ge)try{t=(new f).parseFromString(o,ve)}catch(a){}if(!t||!t.documentElement){t=k.createDocument(ye,"template",null);try{t.documentElement.innerHTML=_e?x:o}catch(a){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ye===ge?S.call(t,X?"html":"body")[0]:X?t.documentElement:i},Fe=function(e){return C.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},je=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l},De=function(e,t,r){T[e]&&Wa(T[e],(e=>{e.call(n,t,r,Ce)}))},Me=function(e){let t=null;if(De("beforeSanitizeElements",e,null),je(e))return Le(e),!0;const r=ke(e.nodeName);if(De("uponSanitizeElement",e,{tagName:r,allowedTags:B}),e.hasChildNodes()&&!Be(e.firstElementChild)&&es(/<[/\w]/g,e.innerHTML)&&es(/<[/\w]/g,e.textContent))return Le(e),!0;if(e.nodeType===Ps)return Le(e),!0;if(Z&&e.nodeType===Ls&&es(/<[/\w]/g,e.data))return Le(e),!0;if(!B[r]||q[r]){if(!q[r]&&He(r)){if(H.tagNameCheck instanceof RegExp&&es(H.tagNameCheck,r))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(r))return!1}if(ie&&!le[r]){const t=w(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,_(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=Ga(e.tagName),r=Ga(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===he?t.namespaceURI===ge?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===r||Te[r]):Boolean(Re[n]):e.namespaceURI===me?t.namespaceURI===ge?"math"===n:t.namespaceURI===he?"math"===n&&Ae[r]:Boolean(Pe[n]):e.namespaceURI===ge?!(t.namespaceURI===he&&!Ae[r])&&!(t.namespaceURI===me&&!Te[r])&&!Pe[n]&&(Oe[n]||!Re[n]):!("application/xhtml+xml"!==ve||!be[e.namespaceURI]))}(e)?(Le(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!es(/<\/no(script|embed|frames)/i,e.innerHTML)?(J&&e.nodeType===Rs&&(t=e.textContent,Wa([A,O,R],(e=>{t=Za(t,e," ")})),e.textContent!==t&&($a(n.removed,{element:e.cloneNode()}),e.textContent=t)),De("afterSanitizeElements",e,null),!1):(Le(e),!0)},ze=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Ee))return!1;if($&&!W[t]&&es(P,t));else if(V&&es(L,t));else if(!M[t]||W[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&es(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&es(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&es(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(pe[t]);else if(es(j,Za(n,U,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Xa(n,"data:")||!de[e]){if(G&&!es(I,Za(n,U,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&Ja(e,F)},qe=function(e){De("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:M};let o=t.length;for(;o--;){const a=t[o],{name:s,namespaceURI:l,value:c}=a,d=ke(s);let u="value"===s?c:Ka(c);if(r.attrName=d,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,De("uponSanitizeAttribute",e,r),u=r.attrValue,Z&&es(/((--!?|])>)|<\/(style|title)/i,u)){Ie(s,e);continue}if(r.forceKeepAttr)continue;if(Ie(s,e),!r.keepAttr)continue;if(!Y&&es(/\/>/i,u)){Ie(s,e);continue}J&&Wa([A,O,R],(e=>{u=Za(u,e," ")}));const p=ke(e.nodeName);if(ze(p,d,u)){if(!oe||"id"!==d&&"name"!==d||(Ie(s,e),u="user-content-"+u),v&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(l);else switch(m.getAttributeType(p,d)){case"TrustedHTML":u=v.createHTML(u);break;case"TrustedScriptURL":u=v.createScriptURL(u)}try{l?e.setAttributeNS(l,s,u):e.setAttribute(s,u),je(e)?Le(e):Va(n.removed)}catch(i){}}}De("afterSanitizeAttributes",e,null)},We=function e(t){let n=null;const r=Fe(t);for(De("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)De("uponSanitizeShadowNode",n,null),Me(n)||(n.content instanceof a&&e(n.content),qe(n));De("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,c=null;if(_e=!e,_e&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Be(e)){if("function"!=typeof e.toString)throw ts("toString is not a function");if("string"!=typeof(e=e.toString()))throw ts("dirty is not a string, aborting")}if(!n.isSupported)return e;if(K||Ne(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=ke(e.nodeName);if(!B[t]||q[t])throw ts("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=Ue("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===Os&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!ee&&!J&&!X&&-1===e.indexOf("<"))return v&&ne?v.createHTML(e):e;if(r=Ue(e),!r)return ee?null:ne?x:""}r&&Q&&Le(r.firstChild);const d=Fe(ae?e:r);for(;s=d.nextNode();)Me(s)||(s.content instanceof a&&We(s.content),qe(s));if(ae)return e;if(ee){if(te)for(c=E.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(M.shadowroot||M.shadowrootmode)&&(c=N.call(o,c,!0)),c}let u=X?r.outerHTML:r.innerHTML;return X&&B["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&es(Ns,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),J&&Wa([A,O,R],(e=>{u=Za(u,e," ")})),v&&ne?v.createHTML(u):u},n.setConfig=function(){Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},n.clearConfig=function(){Ce=null,K=!1},n.isValidAttribute=function(e,t,n){Ce||Ne({});const r=ke(e),o=ke(t);return ze(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(T[e]=T[e]||[],$a(T[e],t))},n.removeHook=function(e){if(T[e])return Va(T[e])},n.removeHooks=function(e){T[e]&&(T[e]=[])},n.removeAllHooks=function(){T={}},n}();const Fs=({children:e})=>{const t=oo.Children.toArray(e),n=t.find((e=>e.type===js)),r=t.find((e=>e.type===Bs));return lo(Qi,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:lo("div",{class:"md:grid md:grid-cols-2 max-w-[59.5rem] mx-auto",children:[lo(Qi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:n&&lo("div",{class:"flex items-center h-full",children:n})}),lo(Qi,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",children:r&&lo("div",{class:"flex items-center h-full",children:r})})]})})},js=({children:e})=>lo(C,{children:e}),Bs=({children:e})=>lo(C,{children:e});Fs.Left=js,Fs.Right=Bs;const Ds=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e},v("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),Ms=e=>lo(Qi,{appear:!0,show:!0,enter:"transition duration-300 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:lo("div",{class:"w-full border border-gray-200 rounded-lg shadow-sm p-4 pl-3 md:p-6 space-y-2",children:e.items.map(((e,t)=>lo("div",{class:"flex space-x-1",children:[lo("span",{children:lo(ii,{class:"h-5 w-5 fill-primary-base"})}),lo("span",{class:"text-sm leading-5 text-gray-600",children:e})]},t)))})}),zs=e=>{const[t,n]=Dn(!1);return lo("div",{class:e.class,children:t?lo(Ms,{items:e.items}):lo("button",{type:"button",class:"w-full inline-flex justify-center items-center px-4 py-3 border border-gray-200 shadow-sm text-sm font-medium rounded-md text-primary-base bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus",onClick:()=>n(!0),children:["Learn more",lo("span",{class:"ml-1",children:lo(Ds,{class:"h-4 w-4"})})]})})},Hs=e=>{var t,n,r,o;const{featureFlags:{marketplaceScheme:i}}=Gn(uo),{trace:a}=aa(),[s,l]=Dn(!1);xo((()=>{a({type:"offer-viewed",offerName:e.step.name,data:e.step.metadata},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName})}));const c=async t=>{t?await a({type:"offer-accepted",offerName:e.step.name,data:{...e.step.metadata,template:"Eoi"}},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName}):await a({type:"offer-declined",offerName:e.step.name,data:{...e.step.metadata,template:"Eoi"}},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName});return(t?e.primaryButton:e.secondaryButton).onClick()};return lo(Fs,{children:[lo(Fs.Left,{children:lo("div",{children:lo(Qi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:lo("div",{children:[lo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:e.step.content.mobileImageUrl,loading:"lazy"}),lo("div",{class:"md:max-w-[27.5rem]",children:[lo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:e.step.content.title}),lo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:e.step.content.description}),e.step.content.details&&lo("div",{class:"mt-6 hidden md:block",children:lo(Ms,{items:e.step.content.details})})]}),e.step.content.details&&lo(zs,{class:"mt-6 md:hidden",items:e.step.content.details}),"allowance"===i.scheme&&"offer"==(null==(t=e.step.content.specialBanner)?void 0:t.type)&&lo(oa,{style:{background:"linear-gradient(90deg, rgba(255, 135, 111, 0.10) 0%, rgba(166, 80, 255, 0.10) 100%)"},className:"md:max-w-[27.5rem] mt-6",children:lo("div",{children:[lo("p",{className:"font-semibold text-lg leading-tight text-gray-900",children:e.step.content.specialBanner.title}),lo("span",{className:"font-normal text-sm text-gray-900",children:e.step.content.specialBanner.subtitle})]})}),e.children&&e.children,lo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:[lo(wo,{testId:`offer_${e.step.name}_button_accept`,class:e.primaryButton.class??"",onClickPromise:()=>c(!0),children:e.primaryButton.text??"Next"}),(null==(n=e.secondaryButton)?void 0:n.text)&&lo(wo,{testId:`offer_${e.step.name}_button_decline`,class:e.secondaryButton.class??"bg-white hover:!bg-gray-100 focus:!ring-gray-200 !border-0 !shadow-none !text-gray-700 !border-gray-300",onClickPromise:()=>c(!1),children:e.secondaryButton.text})]}),(null==(r=e.step.content.terms)?void 0:r.length)>0&&lo("p",{className:"mt-6 text-xs",children:[lo("span",{children:"*"}),lo("span",{className:"underline text-primary-base cursor-pointer",onClick:()=>l(!0),children:"T&C's apply"})]}),(null==(o=e.step.content.terms)?void 0:o.length)>0&&lo(yo,{open:s,children:[lo(ho,{children:lo("div",{className:"relative",children:[lo("h3",{className:"text-base font-semibold text-gray-900",children:"Terms & Conditions"}),lo("span",{className:"absolute top-0 right-0 p-1 rounded-full bg-gray-200 cursor-pointer hover:bg-gray-100",onClick:()=>l(!1),children:lo(La,{className:"h-4 min-h-4 max-h-4 w-4 min-w-4 max-w-4"})})]})}),lo(go,{children:lo("div",{class:"flex flex-col gap-3 mt-6 text-gray-600 text-xs",children:e.step.content.terms.map(((e,t)=>lo("span",{dangerouslySetInnerHTML:{__html:Us.sanitize(e,{ADD_ATTR:["target"]})}},t)))})})]})]})})})}),lo(Fs.Right,{children:lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:e.step.content.imageUrl,loading:"lazy"})})]})},qs=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o}}=Gn(uo),{trace:i}=aa(),[a,s]=Dn(!1);xo((()=>{"name"in e.step&&i({type:"offer-viewed",offerName:e.step.name,data:e.step.metadata},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName})}));return lo(Fs,{children:[lo(Fs.Left,{children:lo("div",{children:lo(Qi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:lo("div",{children:[lo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:e.step.content.mobileImageUrl,loading:"lazy"}),lo("div",{class:"md:max-w-[27.5rem]",children:[lo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:e.step.content.title}),lo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:e.step.content.description}),e.step.content.details&&lo("div",{class:"mt-6 hidden md:block",children:lo(Ms,{items:e.step.content.details})})]}),e.step.content.details&&lo(zs,{class:"mt-6 md:hidden",items:e.step.content.details}),"allowance"===o.scheme&&"offer"==(null==(t=e.step.content.specialBanner)?void 0:t.type)&&lo(oa,{style:{background:"linear-gradient(90deg, rgba(255, 135, 111, 0.10) 0%, rgba(166, 80, 255, 0.10) 100%)"},className:"md:max-w-[27.5rem] mt-6",children:lo("div",{children:[lo("p",{className:"font-semibold text-lg leading-tight text-gray-900",children:e.step.content.specialBanner.title}),lo("span",{className:"font-normal text-sm text-gray-900",children:e.step.content.specialBanner.subtitle})]})}),e.children&&e.children,lo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:lo(wo,{testId:`offer_${e.step.name}_button_accept`,class:e.primaryButton.class??"",onClickPromise:async()=>{"name"in e.step&&await i({type:"offer-progressed",offerName:e.step.name,data:{...e.step.metadata,template:"Simple"}},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName}),e.primaryButton.onClick()},children:e.primaryButton.text??"Next"})}),(null==(n=e.step.content.terms)?void 0:n.length)>0&&lo("p",{className:"mt-6 text-xs",children:[lo("span",{children:"*"}),lo("span",{className:"underline text-primary-base cursor-pointer",onClick:()=>s(!0),children:"T&C's apply"})]}),(null==(r=e.step.content.terms)?void 0:r.length)>0&&lo(yo,{open:a,children:[lo(ho,{children:lo("div",{className:"relative",children:[lo("h3",{className:"text-base font-semibold text-gray-900",children:"Terms & Conditions"}),lo("span",{className:"absolute top-0 right-0 p-1 rounded-full bg-gray-200 cursor-pointer hover:bg-gray-100",onClick:()=>s(!1),children:lo(La,{className:"h-4 min-h-4 max-h-4 w-4 min-w-4 max-w-4"})})]})}),lo(go,{children:lo("div",{class:"flex flex-col gap-3 mt-6 text-gray-600 text-xs",children:e.step.content.terms.map(((e,t)=>lo("span",{dangerouslySetInnerHTML:{__html:Us.sanitize(e,{ADD_ATTR:["target"]})}},t)))})})]})]})})})}),lo(Fs.Right,{children:lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:e.step.content.imageUrl,loading:"lazy"})})]})},Ws=({current:e,total:t})=>lo("div",{className:"flex justify-between md:block text-xs tracking-wide",children:lo("span",{className:"relative px-3 py-0.5 text-primary-base font-semibold",children:[e," OF ",t,lo("span",{className:"absolute left-0 rounded-xl bg-primary-base opacity-10 w-full h-[90%]"})]})}),Vs=e=>{const{featureFlags:{marketplaceSubNavigation:t},offersProgress:{update:n,isOfferCompleted:r,isOfferProgressed:o}}=Gn(uo),[i,a]=Dn(0),{trace:s}=aa(),l=$n(((t,r,o)=>{n(t,r,o),i===e.offers.length-1?e.onComplete():a(i+1)}),[n,i,e]),c=$n((t=>{a(t);const n=e.offers[t];s({type:"offer-selected",offerName:n.name},{experiment:n.metadata.featureName,treatment:n.metadata.treatmentName})}),[e.offers,s]),d=(e,t,n)=>{const i=o(e);return!!r(e)||(!i||t!==n)&&!!i};return lo("div",{className:"max-w-[59.5rem] mx-auto",children:[!t&&lo(Ws,{current:i+1,total:e.offers.length+1}),lo(ni,{selectedIndex:i,onChange:c,children:[t&&e.offers.map(((e,t)=>lo(ei,{label:e.content.productName,icon:lo(Qo,{icon:d(e.name,t,i)?lo(ii,{}):e.content.iconUrl})},e.name))),e.offers.map((e=>lo(ti,{children:["Eoi"===e.content.template&&lo(Hs,{step:e,primaryButton:{text:e.content.acceptButton,onClick:()=>l(e.name,!0,!0)},secondaryButton:{text:e.content.declineButton,onClick:()=>l(e.name,!1,!1)}}),"Simple"===e.content.template&&lo(qs,{step:e,primaryButton:{text:e.content.acceptButton,onClick:()=>l(e.name,!0,!0)}}),"Assessment"===e.content.template&&lo(Ra,{onStepComplete:(t,n)=>l(e.name,t,n),marketPlaceOffer:e},e.name)]},e.name)))]})]})},$s=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/get-app-CQalMIl7.jpg").href:new URL("assets/get-app-CQalMIl7.jpg","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),Gs=e=>v("svg",{width:36,height:42,viewBox:"0 0 36 42",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},v("path",{d:"M29.7406 21.8737C29.7406 18.5174 31.3138 16.0681 34.3678 14.1632C32.6094 11.714 30.0182 10.444 26.5941 10.1719C23.2625 9.89974 19.6532 11.9861 18.3576 11.9861C16.9694 11.9861 13.8229 10.2626 11.3242 10.2626C6.14176 10.3533 0.681641 14.2539 0.681641 22.3273C0.681641 24.6858 1.05182 27.135 1.97726 29.6749C3.18034 33.0312 7.43738 41.1953 11.8795 41.0139C14.1931 41.0139 15.8589 39.3811 18.9129 39.3811C21.8743 39.3811 23.355 41.0139 25.9463 41.0139C30.4809 41.0139 34.3678 33.5755 35.4783 30.2192C29.4629 27.4071 29.7406 22.0551 29.7406 21.8737ZM24.5581 6.99696C27.0568 4.09418 26.7792 1.37283 26.7792 0.375C24.5581 0.556424 21.9668 1.9171 20.4861 3.54991C18.8203 5.36415 17.8949 7.63194 18.08 10.0812C20.4861 10.2626 22.7072 9.08333 24.5581 6.99696Z",fill:"#9CA3AF"})),Ys=e=>v("svg",{width:37,height:40,viewBox:"0 0 37 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},v("path",{d:"M24.1063 18.8401L6.78538 1.88173L28.8088 14.2567L24.1063 18.8401ZM2.318 0.888672C1.29913 1.42339 0.59375 2.41645 0.59375 3.63867V37.3262C0.59375 38.5484 1.29913 39.5415 2.318 39.9998L22.382 20.4442L2.318 0.888672ZM35.6274 18.1526L31.0033 15.5553L25.8305 20.4442L31.0033 25.4095L35.7058 22.8123C37.1165 21.7428 37.1165 19.222 35.6274 18.1526ZM6.78538 39.0067L28.8088 26.7081L24.1063 22.1248L6.78538 39.0067Z",fill:"#9CA3AF"})),Js=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/get-app-mobile-DORYS6YR.jpg").href:new URL("assets/get-app-mobile-DORYS6YR.jpg","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),Zs=({onComplete:e})=>{const{trace:t}=aa(),{identity:n,getIdentityRegistrationStatus:r,featureFlags:{marketplaceScheme:o}}=Gn(uo);zn((()=>{(async()=>{await t({type:"summary-viewed",data:{summaryVariant:"app"}},{experiment:"onboarding-marketplace-scheme",treatment:o.scheme})})()}),[o,t]);const i={...Xs(n,r()),imageUrl:$s,mobileImageUrl:Js},a={text:"Continue",class:"mt-6 md:mt-14",onClick:async()=>{await t("completed",{experiment:"onboarding-marketplace-scheme",treatment:o.scheme}),await e()}};return lo(Fs,{children:[lo(Fs.Left,{children:lo("div",{children:[lo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:i.mobileImageUrl,loading:"lazy"}),lo("div",{class:"md:max-w-[27.5rem]",children:[lo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:i.title}),lo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:i.description})]}),lo("div",{class:"mt-6 flex space-x-6",children:[lo(Gs,{}),lo(Ys,{})]}),lo(wo,{testId:"step-benefits-finish",class:a.class,onClickPromise:a.onClick,children:a.text})]})}),lo(Fs.Right,{children:lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:i.imageUrl,loading:"lazy"})})]})},Xs=(e,t)=>{switch(t){case"RegistrationAbandoned":return{title:"Join your workplace",description:`We’ve sent an email to ${e.email} with instructions on how to join your workplace. This will enable you to access all your workplace benefits through the Flare app in the future.`};case"NewlyRegistered":return{title:"Join your workplace’s benefits program",description:`We’ve sent an email to ${e.email} with instructions on how to download the Flare app - where your company’s benefits live.`};default:return{title:"Check your email",description:`We’ve sent an email to ${e.email} with instructions on how to download and activate the Flare App and Card.`}}},Ks=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/all-set-vt2mQYDm.jpg").href:new URL("assets/all-set-vt2mQYDm.jpg","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),Qs=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/all-set-mobile-Fhtje9HW.jpg").href:new URL("assets/all-set-mobile-Fhtje9HW.jpg","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),el=({onComplete:e})=>{const{trace:t}=aa(),{getWorkplaceLinkingStatus:n,featureFlags:{marketplaceScheme:r}}=Gn(uo);zn((()=>{(async()=>{await t({type:"summary-viewed",data:{summaryVariant:"generic"}},{experiment:"onboarding-marketplace-scheme",treatment:r.scheme})})()}),[r,t]);const o={imageUrl:Ks,mobileImageUrl:Qs,title:"You're all set!",description:"PreviouslyLinked"===n()?"You’ve already connected this employer with your Flare Benefits account. Simply continue and review the details you have provided to complete your onboarding.":"Simply continue and review the details you have provided to complete your onboarding."},i={text:"Continue",class:"mt-6 md:mt-6",onClick:async()=>{await t("completed",{experiment:"onboarding-marketplace-scheme",treatment:r.scheme}),await e()}};return lo(Fs,{children:[lo(Fs.Left,{children:lo("div",{children:[lo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:o.mobileImageUrl,loading:"lazy"}),lo("div",{class:"md:max-w-[27.5rem]",children:[lo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:o.title}),lo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:o.description})]}),lo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:lo(wo,{testId:"step-benefits-finish",class:i.class,onClickPromise:i.onClick,children:i.text})})]})}),lo(Fs.Right,{children:lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:o.imageUrl,loading:"lazy"})})]})},tl=()=>{const{offers:e,workplace:t,updateIdentity:n}=Gn(uo),{current:r,goNext:o}=function(){const{isAppEnabled:e,getIdentityRegistrationStatus:t,featureFlags:n}=Gn(uo),r=Vn((()=>"allowance"===n.marketplaceScheme.scheme?["Allowance_JoinBenefits","FlareAppIdentity","Allowance_ConfigureBenefits","MarketplaceOffers","Allowance_BenefitsSummary"]:["Introduction","FlareAppIdentity","MarketplaceOffers",e?"SummaryApp":"SummaryGeneric"]),[n,e]),[o,i]=Dn(r[0]),a=$n((async()=>{if(r.indexOf(o)===r.length-1){const e=document.querySelector(rl),t=new CustomEvent("step-completion",{bubbles:!0});return null==e||e.dispatchEvent(t),void(await new Promise((e=>setTimeout(e,1e4))))}if("RegistrationAbandoned"!==t())try{const e=r.findIndex((e=>e===o)),t=r[e+1];return void i(t)}catch{}else i(r[r.length-1])}),[o,t,r]);return{current:o,goNext:a}}(),i=$n((()=>{n(!0),o()}),[o,n]),a=$n((()=>{n(!1),o()}),[o,n]);switch(r){case"Introduction":return lo(Aa,{employerName:t.employerName,onStepComplete:o});case"Allowance_JoinBenefits":return lo(sa,{employerName:t.employerName,onContinue:o});case"FlareAppIdentity":return lo(Na,{onSuccess:i,onDecline:a});case"Allowance_ConfigureBenefits":return lo(ra,{onContinue:o});case"MarketplaceOffers":return lo(Vs,{offers:e,onComplete:o});case"Allowance_BenefitsSummary":return lo(da,{onContinue:o});case"SummaryApp":return lo(Zs,{onComplete:o});case"SummaryGeneric":return lo(el,{onComplete:o});default:return lo(C,{})}},nl=()=>{const e=Gn(uo);return lo(C,{children:[lo(yo,{open:e.isLoading,children:lo(go,{children:lo("div",{class:"flex",children:lo("span",{class:"animate-spin",children:lo(_o,{size:"lg"})})})})}),lo(tl,{})]})},rl="benefits-onboarding";!function(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=X,o.prototype.attributeChangedCallback=Q,o.prototype.disconnectedCallback=ee,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.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 n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t,o)}((e=>{const[t,n]=Dn(0);zn((()=>le((()=>{n(t+1)}))),[t]);const r={backendUrl:e["backend-url"],accessToken:e["access-token"],workflowsInstanceId:e["workflows-instance-id"],workflowsJourneyType:e["journey-type"]};return kn(r.backendUrl,r.accessToken,r.workflowsInstanceId,r.workflowsJourneyType),"prod"===fo(r.backendUrl)&&mo.init("p09arvzysr"),lo(C,{children:[lo("style",{children:bo.toString()}),lo("div",{class:"font-inter pt-6 pb-8 md:py-24 px-px",children:lo(po,{workflowsJourneyType:r.workflowsJourneyType,children:lo(nl,{})})},t)]})}),rl,[],{shadow:!0})}));
|