@flarehr/promoted-benefits-ui 1.0.155 → 1.0.156

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.
@@ -0,0 +1 @@
1
+ *,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.rounded{border-radius:.25rem}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.font-bold{font-weight:700}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}
@@ -0,0 +1 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))o(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const c of r.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function _(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function o(n){if(n.ep)return;n.ep=!0;const r=_(n);fetch(n.href,r)}})();var M,p,he,C,_e,ve,z,ye,S={},me=[],He=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,X=Array.isArray;function P(e,t){for(var _ in t)e[_]=t[_];return e}function ge(e){var t=e.parentNode;t&&t.removeChild(e)}function Ue(e,t,_){var o,n,r,c={};for(r in t)r=="key"?o=t[r]:r=="ref"?n=t[r]:c[r]=t[r];if(arguments.length>2&&(c.children=arguments.length>3?M.call(arguments,2):_),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)c[r]===void 0&&(c[r]=e.defaultProps[r]);return I(e,c,o,n,null)}function I(e,t,_,o,n){var r={type:e,props:t,key:_,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++he,__i:-1,__u:0};return n==null&&p.vnode!=null&&p.vnode(r),r}function E(e){return e.children}function F(e,t){this.props=e,this.context=t}function H(e,t){if(t==null)return e.__?H(e.__,e.__i+1):null;for(var _;t<e.__k.length;t++)if((_=e.__k[t])!=null&&_.__e!=null)return _.__e;return typeof e.type=="function"?H(e):null}function be(e){var t,_;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((_=e.__k[t])!=null&&_.__e!=null){e.__e=e.__c.base=_.__e;break}return be(e)}}function G(e){(!e.__d&&(e.__d=!0)&&C.push(e)&&!B.__r++||_e!==p.debounceRendering)&&((_e=p.debounceRendering)||ve)(B)}function B(){var e,t,_,o,n,r,c,s,u;for(C.sort(z);e=C.shift();)e.__d&&(t=C.length,o=void 0,r=(n=(_=e).__v).__e,s=[],u=[],(c=_.__P)&&((o=P({},n)).__v=n.__v+1,p.vnode&&p.vnode(o),Y(c,o,n,_.__n,c.ownerSVGElement!==void 0,32&n.__u?[r]:null,s,r??H(n),!!(32&n.__u),u),o.__v=n.__v,o.__.__k[o.__i]=o,$e(s,o,u),o.__e!=r&&be(o)),C.length>t&&C.sort(z));B.__r=0}function ke(e,t,_,o,n,r,c,s,u,l,f){var i,d,a,m,w,g=o&&o.__k||me,h=t.length;for(_.__d=u,Se(_,t,g),u=_.__d,i=0;i<h;i++)(a=_.__k[i])!=null&&typeof a!="boolean"&&typeof a!="function"&&(d=a.__i===-1?S:g[a.__i]||S,a.__i=i,Y(e,a,d,n,r,c,s,u,l,f),m=a.__e,a.ref&&d.ref!=a.ref&&(d.ref&&Z(d.ref,null,a),f.push(a.ref,a.__c||m,a)),w==null&&m!=null&&(w=m),65536&a.__u||d.__k===a.__k?(m||d.__e!=u||(u=H(d)),u=we(a,u,e)):typeof a.type=="function"&&a.__d!==void 0?u=a.__d:m&&(u=m.nextSibling),a.__d=void 0,a.__u&=-196609);_.__d=u,_.__e=w}function Se(e,t,_){var o,n,r,c,s,u=t.length,l=_.length,f=l,i=0;for(e.__k=[],o=0;o<u;o++)c=o+i,(n=e.__k[o]=(n=t[o])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?I(null,n,null,null,null):X(n)?I(E,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?I(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=e,n.__b=e.__b+1,s=Te(n,_,c,f),n.__i=s,r=null,s!==-1&&(f--,(r=_[s])&&(r.__u|=131072)),r==null||r.__v===null?(s==-1&&i--,typeof n.type!="function"&&(n.__u|=65536)):s!==c&&(s===c+1?i++:s>c?f>u-c?i+=s-c:i--:s<c?s==c-1&&(i=s-c):i=0,s!==o+i&&(n.__u|=65536))):(r=_[c])&&r.key==null&&r.__e&&!(131072&r.__u)&&(r.__e==e.__d&&(e.__d=H(r)),K(r,r,!1),_[c]=null,f--);if(f)for(o=0;o<l;o++)(r=_[o])!=null&&!(131072&r.__u)&&(r.__e==e.__d&&(e.__d=H(r)),K(r,r))}function we(e,t,_){var o,n;if(typeof e.type=="function"){for(o=e.__k,n=0;o&&n<o.length;n++)o[n]&&(o[n].__=e,t=we(o[n],t,_));return t}e.__e!=t&&(_.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Te(e,t,_,o){var n=e.key,r=e.type,c=_-1,s=_+1,u=t[_];if(u===null||u&&n==u.key&&r===u.type&&!(131072&u.__u))return _;if(o>(u!=null&&!(131072&u.__u)?1:0))for(;c>=0||s<t.length;){if(c>=0){if((u=t[c])&&!(131072&u.__u)&&n==u.key&&r===u.type)return c;c--}if(s<t.length){if((u=t[s])&&!(131072&u.__u)&&n==u.key&&r===u.type)return s;s++}}return-1}function ne(e,t,_){t[0]==="-"?e.setProperty(t,_??""):e[t]=_==null?"":typeof _!="number"||He.test(t)?_:_+"px"}function D(e,t,_,o,n){var r;e:if(t==="style")if(typeof _=="string")e.style.cssText=_;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)_&&t in _||ne(e.style,t,"");if(_)for(t in _)o&&_[t]===o[t]||ne(e.style,t,_[t])}else if(t[0]==="o"&&t[1]==="n")r=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=_,_?o?_.u=o.u:(_.u=Date.now(),e.addEventListener(t,r?re:oe,r)):e.removeEventListener(t,r?re:oe,r);else{if(n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=_??"";break e}catch{}typeof _=="function"||(_==null||_===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,_))}}function oe(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(p.event?p.event(e):e)}}function re(e){if(this.l)return this.l[e.type+!0](p.event?p.event(e):e)}function Y(e,t,_,o,n,r,c,s,u,l){var f,i,d,a,m,w,g,h,b,$,N,U,te,A,R,k=t.type;if(t.constructor!==void 0)return null;128&_.__u&&(u=!!(32&_.__u),r=[s=t.__e=_.__e]),(f=p.__b)&&f(t);e:if(typeof k=="function")try{if(h=t.props,b=(f=k.contextType)&&o[f.__c],$=f?b?b.props.value:f.__:o,_.__c?g=(i=t.__c=_.__c).__=i.__E:("prototype"in k&&k.prototype.render?t.__c=i=new k(h,$):(t.__c=i=new F(h,$),i.constructor=k,i.render=Ne),b&&b.sub(i),i.props=h,i.state||(i.state={}),i.context=$,i.__n=o,d=i.__d=!0,i.__h=[],i._sb=[]),i.__s==null&&(i.__s=i.state),k.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=P({},i.__s)),P(i.__s,k.getDerivedStateFromProps(h,i.__s))),a=i.props,m=i.state,i.__v=t,d)k.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(k.getDerivedStateFromProps==null&&h!==a&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(h,$),!i.__e&&(i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(h,i.__s,$)===!1||t.__v===_.__v)){for(t.__v!==_.__v&&(i.props=h,i.state=i.__s,i.__d=!1),t.__e=_.__e,t.__k=_.__k,t.__k.forEach(function(L){L&&(L.__=t)}),N=0;N<i._sb.length;N++)i.__h.push(i._sb[N]);i._sb=[],i.__h.length&&c.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(h,i.__s,$),i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(a,m,w)})}if(i.context=$,i.props=h,i.__P=e,i.__e=!1,U=p.__r,te=0,"prototype"in k&&k.prototype.render){for(i.state=i.__s,i.__d=!1,U&&U(t),f=i.render(i.props,i.state,i.context),A=0;A<i._sb.length;A++)i.__h.push(i._sb[A]);i._sb=[]}else do i.__d=!1,U&&U(t),f=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++te<25);i.state=i.__s,i.getChildContext!=null&&(o=P(P({},o),i.getChildContext())),d||i.getSnapshotBeforeUpdate==null||(w=i.getSnapshotBeforeUpdate(a,m)),ke(e,X(R=f!=null&&f.type===E&&f.key==null?f.props.children:f)?R:[R],t,_,o,n,r,c,s,u,l),i.base=t.__e,t.__u&=-161,i.__h.length&&c.push(i),g&&(i.__E=i.__=null)}catch(L){t.__v=null,u||r!=null?(t.__e=s,t.__u|=u?160:32,r[r.indexOf(s)]=null):(t.__e=_.__e,t.__k=_.__k),p.__e(L,t,_)}else r==null&&t.__v===_.__v?(t.__k=_.__k,t.__e=_.__e):t.__e=Ee(_.__e,t,_,o,n,r,c,u,l);(f=p.diffed)&&f(t)}function $e(e,t,_){t.__d=void 0;for(var o=0;o<_.length;o++)Z(_[o],_[++o],_[++o]);p.__c&&p.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){p.__e(r,n.__v)}})}function Ee(e,t,_,o,n,r,c,s,u){var l,f,i,d,a,m,w,g=_.props,h=t.props,b=t.type;if(b==="svg"&&(n=!0),r!=null){for(l=0;l<r.length;l++)if((a=r[l])&&"setAttribute"in a==!!b&&(b?a.localName===b:a.nodeType===3)){e=a,r[l]=null;break}}if(e==null){if(b===null)return document.createTextNode(h);e=n?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,h.is&&h),r=null,s=!1}if(b===null)g===h||s&&e.data===h||(e.data=h);else{if(r=r&&M.call(e.childNodes),g=_.props||S,!s&&r!=null)for(g={},l=0;l<e.attributes.length;l++)g[(a=e.attributes[l]).name]=a.value;for(l in g)a=g[l],l=="children"||(l=="dangerouslySetInnerHTML"?i=a:l==="key"||l in h||D(e,l,null,a,n));for(l in h)a=h[l],l=="children"?d=a:l=="dangerouslySetInnerHTML"?f=a:l=="value"?m=a:l=="checked"?w=a:l==="key"||s&&typeof a!="function"||g[l]===a||D(e,l,a,g[l],n);if(f)s||i&&(f.__html===i.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(i&&(e.innerHTML=""),ke(e,X(d)?d:[d],t,_,o,n&&b!=="foreignObject",r,c,r?r[0]:_.__k&&H(_,0),s,u),r!=null)for(l=r.length;l--;)r[l]!=null&&ge(r[l]);s||(l="value",m!==void 0&&(m!==e[l]||b==="progress"&&!m||b==="option"&&m!==g[l])&&D(e,l,m,g[l],!1),l="checked",w!==void 0&&w!==e[l]&&D(e,l,w,g[l],!1))}return e}function Z(e,t,_){try{typeof e=="function"?e(t):e.current=t}catch(o){p.__e(o,_)}}function K(e,t,_){var o,n;if(p.unmount&&p.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||Z(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){p.__e(r,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(n=0;n<o.length;n++)o[n]&&K(o[n],t,_||typeof e.type!="function");_||e.__e==null||ge(e.__e),e.__=e.__e=e.__d=void 0}function Ne(e,t,_){return this.constructor(e,_)}function Ae(e,t,_){var o,n,r,c;p.__&&p.__(e,t),n=(o=typeof _=="function")?null:_&&_.__k||t.__k,r=[],c=[],Y(t,e=(!o&&_||t).__k=Ue(E,null,[e]),n||S,S,t.ownerSVGElement!==void 0,!o&&_?[_]:n?null:t.firstChild?M.call(t.childNodes):null,r,!o&&_?_:n?n.__e:t.firstChild,o,c),$e(r,e,c)}function j(e,t){var _={__c:t="__cC"+ye++,__:e,Consumer:function(o,n){return o.children(n)},Provider:function(o){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&n.some(function(s){s.__e=!0,G(s)})},this.sub=function(c){n.push(c);var s=c.componentWillUnmount;c.componentWillUnmount=function(){n.splice(n.indexOf(c),1),s&&s.call(c)}}),o.children}};return _.Provider.__=_.Consumer.contextType=_}M=me.slice,p={__e:function(e,t,_,o){for(var n,r,c;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(e)),c=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,o||{}),c=n.__d),c)return n.__E=n}catch(s){e=s}throw e}},he=0,F.prototype.setState=function(e,t){var _;_=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=P({},this.state),typeof e=="function"&&(e=e(P({},_),this.props)),e&&P(_,e),e!=null&&this.__v&&(t&&this._sb.push(t),G(this))},F.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),G(this))},F.prototype.render=E,C=[],ve=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,z=function(e,t){return e.__v.__b-t.__v.__b},B.__r=0,ye=0;var Le=0;function x(e,t,_,o,n,r){var c,s,u={};for(s in t)s=="ref"?c=t[s]:u[s]=t[s];var l={type:e,props:u,key:_,ref:c,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Le,__i:-1,__u:0,__source:n,__self:r};if(typeof e=="function"&&(c=e.defaultProps))for(s in c)u[s]===void 0&&(u[s]=c[s]);return p.vnode&&p.vnode(l),l}var T,v,V,ie,Q=0,xe=[],W=[],y=p,ce=y.__b,se=y.__r,le=y.diffed,ue=y.__c,ae=y.unmount,fe=y.__;function ee(e,t){y.__h&&y.__h(v,e,Q||t),Q=0;var _=v.__H||(v.__H={__:[],__h:[]});return e>=_.__.length&&_.__.push({__V:W}),_.__[e]}function q(e){return Q=1,De(Pe,e)}function De(e,t,_){var o=ee(T++,2);if(o.t=e,!o.__c&&(o.__=[_?_(t):Pe(void 0,t),function(s){var u=o.__N?o.__N[0]:o.__[0],l=o.t(u,s);u!==l&&(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=v,!v.u)){var n=function(s,u,l){if(!o.__c.__H)return!0;var f=o.__c.__H.__.filter(function(d){return!!d.__c});if(f.every(function(d){return!d.__N}))return!r||r.call(this,s,u,l);var i=!1;return f.forEach(function(d){if(d.__N){var a=d.__[0];d.__=d.__N,d.__N=void 0,a!==d.__[0]&&(i=!0)}}),!(!i&&o.__c.props===s)&&(!r||r.call(this,s,u,l))};v.u=!0;var r=v.shouldComponentUpdate,c=v.componentWillUpdate;v.componentWillUpdate=function(s,u,l){if(this.__e){var f=r;r=void 0,n(s,u,l),r=f}c&&c.call(this,s,u,l)},v.shouldComponentUpdate=n}return o.__N||o.__}function de(e,t){var _=ee(T++,3);!y.__s&&Oe(_.__H,t)&&(_.__=e,_.i=t,v.__H.__h.push(_))}function Ie(e){var t=v.context[e.__c],_=ee(T++,9);return _.c=e,t?(_.__==null&&(_.__=!0,t.sub(v)),t.props.value):e.__}function Fe(){for(var e;e=xe.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(J),e.__H.__h=[]}catch(t){e.__H.__h=[],y.__e(t,e.__v)}}y.__b=function(e){v=null,ce&&ce(e)},y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),fe&&fe(e,t)},y.__r=function(e){se&&se(e),T=0;var t=(v=e.__c).__H;t&&(V===v?(t.__h=[],v.__h=[],t.__.forEach(function(_){_.__N&&(_.__=_.__N),_.__V=W,_.__N=_.i=void 0})):(t.__h.forEach(O),t.__h.forEach(J),t.__h=[],T=0)),V=v},y.diffed=function(e){le&&le(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(xe.push(t)!==1&&ie===y.requestAnimationFrame||((ie=y.requestAnimationFrame)||We)(Fe)),t.__H.__.forEach(function(_){_.i&&(_.__H=_.i),_.__V!==W&&(_.__=_.__V),_.i=void 0,_.__V=W})),V=v=null},y.__c=function(e,t){t.some(function(_){try{_.__h.forEach(O),_.__h=_.__h.filter(function(o){return!o.__||J(o)})}catch(o){t.some(function(n){n.__h&&(n.__h=[])}),t=[],y.__e(o,_.__v)}}),ue&&ue(e,t)},y.unmount=function(e){ae&&ae(e);var t,_=e.__c;_&&_.__H&&(_.__H.__.forEach(function(o){try{O(o)}catch(n){t=n}}),_.__H=void 0,t&&y.__e(t,_.__v))};var pe=typeof requestAnimationFrame=="function";function We(e){var t,_=function(){clearTimeout(o),pe&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(_,100);pe&&(t=requestAnimationFrame(_))}function O(e){var t=v,_=e.__c;typeof _=="function"&&(e.__c=void 0,_()),v=t}function J(e){var t=v;e.__c=e.__(),v=t}function Oe(e,t){return!e||e.length!==t.length||t.some(function(_,o){return _!==e[o]})}function Pe(e,t){return typeof t=="function"?t(e):t}let Ce=j({});const Be=e=>Ce=j({...e}),Me=()=>Ie(Ce),je=async(e,t,_,o)=>{const n=new Headers;n.append("Content-Type","application/x-www-form-urlencoded");let r;const c=new URLSearchParams;c.append("grant_type","authorization_code"),c.append("code",t),c.append("client_id",_),c.append("redirect_uri",o);const s=await fetch(`${e}/connect/token`,{method:"POST",headers:n,body:c});return s.ok&&(r=await s.json()),r},Re=e=>{if(e)return{accessToken:e.access_token,isLoggedIn:!!e.access_token,expiresIn:e.expires_in}},Ve=e=>new URLSearchParams(window.location.search).get(e)??void 0,qe=async e=>{const t=Ve("code"),_=`${window.location.origin}/promoted-benefits/app/v1.0/`;if(!(!e.identityUrl||!e.clientId||!t))return Re(await je(e.identityUrl,t,e.clientId,_))},ze=async(e,t)=>{let _;const o=await fetch(e,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});return o.ok&&(_=await o.json()),_},Ge=(e,t,_,o)=>{const n=document.referrer;return`${e}/app/?token=${t}&redirectPath=${_}&referrer=${n}&promotionId=${o}`},Ke=async(e,t,_,o)=>{const n=`${e==null?void 0:e.apolloBaseUrl}/benefits`;if(!n||!_||!t||!o)return;const r=await ze(`${n}/backend/v1.0/current/token`,t);if(!(!r||!r.token))return Ge(n,r.token,_,o)};j({});const Qe=e=>j({...e}),Je=async()=>{let e;const t=await fetch(`${window.location.origin}/promoted-benefits/app/v1.0/config.json`);return t.ok&&(e=await t.json()),e},Xe=()=>{const[e,t]=q({}),[_,o]=q(),[n,r]=q(!1);Be(e);const c=Me(),s="/categories/everyday",u="testPromotionId",l=async()=>{const f=await Ke(_,c.accessToken,s,u);if(f){const i=window.open();i&&(i.location=`${f}`)}};return de(()=>{(async()=>{const f=await Je();f&&(Qe(f),o(f))})()},[]),de(()=>{(async()=>{if(!n&&_){const f=await qe(_);f&&t(f),r(!0)}})()},[_]),n?c.isLoggedIn?x("div",{className:"text-3xl font-bold",children:[x("h1",{children:"Hello World!"}),x("button",{onClick:l,class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",type:"button",children:"Try apollo benefits"})]}):x(E,{children:x("div",{className:"text-3xl font-bold danger",children:x("h1",{children:"Auth failed"})})}):x("p",{children:"Loading..."})};Ae(x(Xe,{}),document.body);
package/dist/index.html CHANGED
@@ -2,15 +2,14 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
5
  <title>Promoted Benefits</title>
7
6
  <style>
8
7
  body {
9
8
  margin: 0;
10
9
  }
11
10
  </style>
12
- <script type="module" crossorigin src="/promoted-benefits/app/v1.0/assets/index-CTK-LYGA.js"></script>
13
- <link rel="stylesheet" crossorigin href="/promoted-benefits/app/v1.0/assets/index-B0j1l6Xy.css">
11
+ <script type="module" crossorigin src="/promoted-benefits/app/v1.0/assets/index-RXkYvElu.js"></script>
12
+ <link rel="stylesheet" crossorigin href="/promoted-benefits/app/v1.0/assets/index-Drn6v6rS.css">
14
13
  </head>
15
14
  <body>
16
15
  </body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/promoted-benefits-ui",
3
- "version": "1.0.155",
3
+ "version": "1.0.156",
4
4
  "description": "Flare Promoted Benefits",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -14,7 +14,6 @@
14
14
  "test": "jest",
15
15
  "lint": "eslint src/**/*.{ts,tsx}",
16
16
  "lint:fix": "eslint src/**/*.{ts,tsx} --fix",
17
- "prettier:fix": "npx prettier ./src --write",
18
17
  "prepare": "husky"
19
18
  },
20
19
  "dependencies": {
@@ -40,11 +39,11 @@
40
39
  "husky": "^9.0.11",
41
40
  "jest": "^29.7.0",
42
41
  "jest-preset-preact": "^4.1.0",
43
- "jest-svg-transformer": "^1.0.0",
44
42
  "postcss": "^8.4.38",
45
43
  "prettier": "^3.2.5",
46
44
  "tailwindcss": "^3.4.1",
47
45
  "typescript": "^5.4.3",
48
- "vite": "^5.2.6"
46
+ "vite": "^5.2.6",
47
+ "vite-plugin-svgr": "^4.2.0"
49
48
  }
50
49
  }
@@ -1 +0,0 @@
1
- @import"https://fonts.googleapis.com/css2?family=Inter:wght@100%3B200%3B300%3B400%3B500%3B600%3B700%3B800%3B900&display=fallback";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.relative{position:relative}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-20{height:5rem}.w-20{width:5rem}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.self-center{align-self:center}.self-stretch{align-self:stretch}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.font-\[\'Inter\'\]{font-family:Inter}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.leading-normal{line-height:1.5}.text-blue-950{--tw-text-opacity: 1;color:rgb(23 37 84 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (min-height: 450px){.card\:inline-flex{display:inline-flex}.card\:hidden{display:none}}
@@ -1 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const _ of document.querySelectorAll('link[rel="modulepreload"]'))r(_);new MutationObserver(_=>{for(const o of _)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(_){const o={};return _.integrity&&(o.integrity=_.integrity),_.referrerPolicy&&(o.referrerPolicy=_.referrerPolicy),_.crossOrigin==="use-credentials"?o.credentials="include":_.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(_){if(_.ep)return;_.ep=!0;const o=n(_);fetch(_.href,o)}})();var O,h,ve,N,re,me,G,ye,T={},ge=[],Se=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Y=Array.isArray;function $(e,t){for(var n in t)e[n]=t[n];return e}function be(e){var t=e.parentNode;t&&t.removeChild(e)}function Le(e,t,n){var r,_,o,c={};for(o in t)o=="key"?r=t[o]:o=="ref"?_=t[o]:c[o]=t[o];if(arguments.length>2&&(c.children=arguments.length>3?O.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)c[o]===void 0&&(c[o]=e.defaultProps[o]);return j(e,c,r,_,null)}function j(e,t,n,r,_){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:_??++ve,__i:-1,__u:0};return _==null&&h.vnode!=null&&h.vnode(o),o}function P(e){return e.children}function D(e,t){this.props=e,this.context=t}function H(e,t){if(t==null)return e.__?H(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?H(e):null}function xe(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return xe(e)}}function Z(e){(!e.__d&&(e.__d=!0)&&N.push(e)&&!V.__r++||re!==h.debounceRendering)&&((re=h.debounceRendering)||me)(V)}function V(){var e,t,n,r,_,o,c,s,a;for(N.sort(G);e=N.shift();)e.__d&&(t=N.length,r=void 0,o=(_=(n=e).__v).__e,s=[],a=[],(c=n.__P)&&((r=$({},_)).__v=_.__v+1,h.vnode&&h.vnode(r),ee(c,r,_,n.__n,c.ownerSVGElement!==void 0,32&_.__u?[o]:null,s,o??H(_),!!(32&_.__u),a),r.__v=_.__v,r.__.__k[r.__i]=r,Ce(s,r,a),r.__e!=o&&xe(r)),N.length>t&&N.sort(G));V.__r=0}function ke(e,t,n,r,_,o,c,s,a,l,f){var i,p,u,g,w,b=r&&r.__k||ge,v=t.length;for(n.__d=a,Ee(n,t,b),a=n.__d,i=0;i<v;i++)(u=n.__k[i])!=null&&typeof u!="boolean"&&typeof u!="function"&&(p=u.__i===-1?T:b[u.__i]||T,u.__i=i,ee(e,u,p,_,o,c,s,a,l,f),g=u.__e,u.ref&&p.ref!=u.ref&&(p.ref&&te(p.ref,null,u),f.push(u.ref,u.__c||g,u)),w==null&&g!=null&&(w=g),65536&u.__u||p.__k===u.__k?(g||p.__e!=a||(a=H(p)),a=we(u,a,e)):typeof u.type=="function"&&u.__d!==void 0?a=u.__d:g&&(a=g.nextSibling),u.__d=void 0,u.__u&=-196609);n.__d=a,n.__e=w}function Ee(e,t,n){var r,_,o,c,s,a=t.length,l=n.length,f=l,i=0;for(e.__k=[],r=0;r<a;r++)c=r+i,(_=e.__k[r]=(_=t[r])==null||typeof _=="boolean"||typeof _=="function"?null:typeof _=="string"||typeof _=="number"||typeof _=="bigint"||_.constructor==String?j(null,_,null,null,null):Y(_)?j(P,{children:_},null,null,null):_.constructor===void 0&&_.__b>0?j(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_)!=null?(_.__=e,_.__b=e.__b+1,s=Ae(_,n,c,f),_.__i=s,o=null,s!==-1&&(f--,(o=n[s])&&(o.__u|=131072)),o==null||o.__v===null?(s==-1&&i--,typeof _.type!="function"&&(_.__u|=65536)):s!==c&&(s===c+1?i++:s>c?f>a-c?i+=s-c:i--:s<c?s==c-1&&(i=s-c):i=0,s!==r+i&&(_.__u|=65536))):(o=n[c])&&o.key==null&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=H(o)),K(o,o,!1),n[c]=null,f--);if(f)for(r=0;r<l;r++)(o=n[r])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=H(o)),K(o,o))}function we(e,t,n){var r,_;if(typeof e.type=="function"){for(r=e.__k,_=0;r&&_<r.length;_++)r[_]&&(r[_].__=e,t=we(r[_],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Ae(e,t,n,r){var _=e.key,o=e.type,c=n-1,s=n+1,a=t[n];if(a===null||a&&_==a.key&&o===a.type&&!(131072&a.__u))return n;if(r>(a!=null&&!(131072&a.__u)?1:0))for(;c>=0||s<t.length;){if(c>=0){if((a=t[c])&&!(131072&a.__u)&&_==a.key&&o===a.type)return c;c--}if(s<t.length){if((a=t[s])&&!(131072&a.__u)&&_==a.key&&o===a.type)return s;s++}}return-1}function oe(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Se.test(t)?n:n+"px"}function F(e,t,n,r,_){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||oe(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||oe(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?ce:ie,o)):e.removeEventListener(t,o?ce:ie,o);else{if(_)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function ie(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(h.event?h.event(e):e)}}function ce(e){if(this.l)return this.l[e.type+!0](h.event?h.event(e):e)}function ee(e,t,n,r,_,o,c,s,a,l){var f,i,p,u,g,w,b,v,x,C,L,U,_e,E,q,k=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(a=!!(32&n.__u),o=[s=t.__e=n.__e]),(f=h.__b)&&f(t);e:if(typeof k=="function")try{if(v=t.props,x=(f=k.contextType)&&r[f.__c],C=f?x?x.props.value:f.__:r,n.__c?b=(i=t.__c=n.__c).__=i.__E:("prototype"in k&&k.prototype.render?t.__c=i=new k(v,C):(t.__c=i=new D(v,C),i.constructor=k,i.render=Ie),x&&x.sub(i),i.props=v,i.state||(i.state={}),i.context=C,i.__n=r,p=i.__d=!0,i.__h=[],i._sb=[]),i.__s==null&&(i.__s=i.state),k.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=$({},i.__s)),$(i.__s,k.getDerivedStateFromProps(v,i.__s))),u=i.props,g=i.state,i.__v=t,p)k.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(k.getDerivedStateFromProps==null&&v!==u&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(v,C),!i.__e&&(i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(v,i.__s,C)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(i.props=v,i.state=i.__s,i.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),L=0;L<i._sb.length;L++)i.__h.push(i._sb[L]);i._sb=[],i.__h.length&&c.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(v,i.__s,C),i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(u,g,w)})}if(i.context=C,i.props=v,i.__P=e,i.__e=!1,U=h.__r,_e=0,"prototype"in k&&k.prototype.render){for(i.state=i.__s,i.__d=!1,U&&U(t),f=i.render(i.props,i.state,i.context),E=0;E<i._sb.length;E++)i.__h.push(i._sb[E]);i._sb=[]}else do i.__d=!1,U&&U(t),f=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++_e<25);i.state=i.__s,i.getChildContext!=null&&(r=$($({},r),i.getChildContext())),p||i.getSnapshotBeforeUpdate==null||(w=i.getSnapshotBeforeUpdate(u,g)),ke(e,Y(q=f!=null&&f.type===P&&f.key==null?f.props.children:f)?q:[q],t,n,r,_,o,c,s,a,l),i.base=t.__e,t.__u&=-161,i.__h.length&&c.push(i),b&&(i.__E=i.__=null)}catch(A){t.__v=null,a||o!=null?(t.__e=s,t.__u|=a?160:32,o[o.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),h.__e(A,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Fe(n.__e,t,n,r,_,o,c,a,l);(f=h.diffed)&&f(t)}function Ce(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)te(n[r],n[++r],n[++r]);h.__c&&h.__c(t,e),e.some(function(_){try{e=_.__h,_.__h=[],e.some(function(o){o.call(_)})}catch(o){h.__e(o,_.__v)}})}function Fe(e,t,n,r,_,o,c,s,a){var l,f,i,p,u,g,w,b=n.props,v=t.props,x=t.type;if(x==="svg"&&(_=!0),o!=null){for(l=0;l<o.length;l++)if((u=o[l])&&"setAttribute"in u==!!x&&(x?u.localName===x:u.nodeType===3)){e=u,o[l]=null;break}}if(e==null){if(x===null)return document.createTextNode(v);e=_?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,v.is&&v),o=null,s=!1}if(x===null)b===v||s&&e.data===v||(e.data=v);else{if(o=o&&O.call(e.childNodes),b=n.props||T,!s&&o!=null)for(b={},l=0;l<e.attributes.length;l++)b[(u=e.attributes[l]).name]=u.value;for(l in b)u=b[l],l=="children"||(l=="dangerouslySetInnerHTML"?i=u:l==="key"||l in v||F(e,l,null,u,_));for(l in v)u=v[l],l=="children"?p=u:l=="dangerouslySetInnerHTML"?f=u:l=="value"?g=u:l=="checked"?w=u:l==="key"||s&&typeof u!="function"||b[l]===u||F(e,l,u,b[l],_);if(f)s||i&&(f.__html===i.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(i&&(e.innerHTML=""),ke(e,Y(p)?p:[p],t,n,r,_&&x!=="foreignObject",o,c,o?o[0]:n.__k&&H(n,0),s,a),o!=null)for(l=o.length;l--;)o[l]!=null&&be(o[l]);s||(l="value",g!==void 0&&(g!==e[l]||x==="progress"&&!g||x==="option"&&g!==b[l])&&F(e,l,g,b[l],!1),l="checked",w!==void 0&&w!==e[l]&&F(e,l,w,b[l],!1))}return e}function te(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){h.__e(r,n)}}function K(e,t,n){var r,_;if(h.unmount&&h.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||te(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){h.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(_=0;_<r.length;_++)r[_]&&K(r[_],t,n||typeof e.type!="function");n||e.__e==null||be(e.__e),e.__=e.__e=e.__d=void 0}function Ie(e,t,n){return this.constructor(e,n)}function je(e,t,n){var r,_,o,c;h.__&&h.__(e,t),_=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],c=[],ee(t,e=(!r&&n||t).__k=Le(P,null,[e]),_||T,T,t.ownerSVGElement!==void 0,!r&&n?[n]:_?null:t.firstChild?O.call(t.childNodes):null,o,!r&&n?n:_?_.__e:t.firstChild,r,c),Ce(o,e,c)}function R(e,t){var n={__c:t="__cC"+ye++,__:e,Consumer:function(r,_){return r.children(_)},Provider:function(r){var _,o;return this.getChildContext||(_=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&_.some(function(s){s.__e=!0,Z(s)})},this.sub=function(c){_.push(c);var s=c.componentWillUnmount;c.componentWillUnmount=function(){_.splice(_.indexOf(c),1),s&&s.call(c)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}O=ge.slice,h={__e:function(e,t,n,r){for(var _,o,c;t=t.__;)if((_=t.__c)&&!_.__)try{if((o=_.constructor)&&o.getDerivedStateFromError!=null&&(_.setState(o.getDerivedStateFromError(e)),c=_.__d),_.componentDidCatch!=null&&(_.componentDidCatch(e,r||{}),c=_.__d),c)return _.__E=_}catch(s){e=s}throw e}},ve=0,D.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=$({},this.state),typeof e=="function"&&(e=e($({},n),this.props)),e&&$(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Z(this))},D.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Z(this))},D.prototype.render=P,N=[],me=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,G=function(e,t){return e.__v.__b-t.__v.__b},V.__r=0,ye=0;var De=0;function d(e,t,n,r,_,o){var c,s,a={};for(s in t)s=="ref"?c=t[s]:a[s]=t[s];var l={type:e,props:a,key:n,ref:c,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--De,__i:-1,__u:0,__source:_,__self:o};if(typeof e=="function"&&(c=e.defaultProps))for(s in c)a[s]===void 0&&(a[s]=c[s]);return h.vnode&&h.vnode(l),l}var S,m,z,se,Q=0,$e=[],B=[],y=h,le=y.__b,ae=y.__r,ue=y.diffed,fe=y.__c,de=y.unmount,pe=y.__;function ne(e,t){y.__h&&y.__h(m,e,Q||t),Q=0;var n=m.__H||(m.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:B}),n.__[e]}function W(e){return Q=1,Be(Pe,e)}function Be(e,t,n){var r=ne(S++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Pe(void 0,t),function(s){var a=r.__N?r.__N[0]:r.__[0],l=r.t(a,s);a!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=m,!m.u)){var _=function(s,a,l){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(p){return!!p.__c});if(f.every(function(p){return!p.__N}))return!o||o.call(this,s,a,l);var i=!1;return f.forEach(function(p){if(p.__N){var u=p.__[0];p.__=p.__N,p.__N=void 0,u!==p.__[0]&&(i=!0)}}),!(!i&&r.__c.props===s)&&(!o||o.call(this,s,a,l))};m.u=!0;var o=m.shouldComponentUpdate,c=m.componentWillUpdate;m.componentWillUpdate=function(s,a,l){if(this.__e){var f=o;o=void 0,_(s,a,l),o=f}c&&c.call(this,s,a,l)},m.shouldComponentUpdate=_}return r.__N||r.__}function J(e,t){var n=ne(S++,3);!y.__s&&Ve(n.__H,t)&&(n.__=e,n.i=t,m.__H.__h.push(n))}function Ne(e){var t=m.context[e.__c],n=ne(S++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(m)),t.props.value):e.__}function We(){for(var e;e=$e.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(M),e.__H.__h.forEach(X),e.__H.__h=[]}catch(t){e.__H.__h=[],y.__e(t,e.__v)}}y.__b=function(e){m=null,le&&le(e)},y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),pe&&pe(e,t)},y.__r=function(e){ae&&ae(e),S=0;var t=(m=e.__c).__H;t&&(z===m?(t.__h=[],m.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=B,n.__N=n.i=void 0})):(t.__h.forEach(M),t.__h.forEach(X),t.__h=[],S=0)),z=m},y.diffed=function(e){ue&&ue(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&($e.push(t)!==1&&se===y.requestAnimationFrame||((se=y.requestAnimationFrame)||Me)(We)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==B&&(n.__=n.__V),n.i=void 0,n.__V=B})),z=m=null},y.__c=function(e,t){t.some(function(n){try{n.__h.forEach(M),n.__h=n.__h.filter(function(r){return!r.__||X(r)})}catch(r){t.some(function(_){_.__h&&(_.__h=[])}),t=[],y.__e(r,n.__v)}}),fe&&fe(e,t)},y.unmount=function(e){de&&de(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{M(r)}catch(_){t=_}}),n.__H=void 0,t&&y.__e(t,n.__v))};var he=typeof requestAnimationFrame=="function";function Me(e){var t,n=function(){clearTimeout(r),he&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);he&&(t=requestAnimationFrame(n))}function M(e){var t=m,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),m=t}function X(e){var t=m;e.__c=e.__(),m=t}function Ve(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Pe(e,t){return typeof t=="function"?t(e):t}let He=R({});const Oe=e=>He=R({...e}),Re=()=>Ne(He),qe=async(e,t,n,r)=>{const _=new Headers;_.append("Content-Type","application/x-www-form-urlencoded");let o;const c=new URLSearchParams;c.append("grant_type","authorization_code"),c.append("code",t),c.append("client_id",n),c.append("redirect_uri",r);const s=await fetch(`${e}/connect/token`,{method:"POST",headers:_,body:c});return s.ok&&(o=await s.json()),o},ze=e=>{if(e)return{accessToken:e.access_token,isLoggedIn:!!e.access_token,expiresIn:e.expires_in}},Ge=async(e,t)=>{let n;const r=await fetch(e,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});return r.ok&&(n=await r.json()),n},Ze=(e,t,n,r)=>{const _=document.referrer;return`${e}/app/?token=${t}&redirectPath=${n}&referrer=${_}&promotionId=${r}`},Ke=async(e,t,n,r)=>{const _=`${e==null?void 0:e.apolloBaseUrl}/benefits`;if(!_||!n||!t||!r)return;const o=await Ge(`${_}/backend/v1.0/current/token`,t);if(!(!o||!o.token))return Ze(_,o.token,n,r)},Qe=e=>new URLSearchParams(window.location.search).get(e)??void 0,Je=async(e,t,n)=>{let r;switch(e==null?void 0:e.action.type){case"Benefits":r=await Ke(t,n.accessToken,e==null?void 0:e.action.url,e==null?void 0:e.id);break;case"Public":r=e==null?void 0:e.action.url;break;default:r=void 0;break}return r},Xe=async e=>{const t=Qe("code"),n=`${window.location.origin}/promoted-benefits/app/v1.0/`;if(!(!e.identityUrl||!e.clientId||!t))return ze(await qe(e.identityUrl,t,e.clientId,n))};let Ue=R({});const Ye=e=>Ue=R({...e}),et=()=>Ne(Ue),tt=async()=>{let e;const t=await fetch(`${window.location.origin}/promoted-benefits/app/v1.0/config.json`);return t.ok&&(e=await t.json()),e},Te="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%203C10.4477%203%2010%203.44772%2010%204C10%204.55228%2010.4477%205%2011%205H13.5858L7.29289%2011.2929C6.90237%2011.6834%206.90237%2012.3166%207.29289%2012.7071C7.68342%2013.0976%208.31658%2013.0976%208.70711%2012.7071L15%206.41421V9C15%209.55228%2015.4477%2010%2016%2010C16.5523%2010%2017%209.55228%2017%209V4C17%203.44772%2016.5523%203%2016%203H11Z'%20fill='white'/%3e%3cpath%20d='M5%205C3.89543%205%203%205.89543%203%207V15C3%2016.1046%203.89543%2017%205%2017H13C14.1046%2017%2015%2016.1046%2015%2015V12C15%2011.4477%2014.5523%2011%2014%2011C13.4477%2011%2013%2011.4477%2013%2012V15H5V7L8%207C8.55228%207%209%206.55228%209%206C9%205.44772%208.55228%205%208%205H5Z'%20fill='white'/%3e%3c/svg%3e",nt=({banner:e,onClick:t})=>d("div",{className:"font-['Inter'] p-4 bg-white flex rounded-lg gap-2 card:hidden",children:[d("div",{className:"flex-col justify-between flex flex-1",children:[d("div",{className:"flex-col gap-4 flex pb-2",children:d("div",{className:"self-stretch flex-col justify-start items-start gap-2 flex",children:[d("h1",{className:"text-blue-950 font-bold leading-7",children:e.title}),d("p",{className:"text-gray-900 text-xs leading-normal",children:e.description})]})}),d("div",{className:"justify-end",children:d("button",{className:"px-2 py-1 bg-blue-600 rounded-lg justify-center items-center gap-2 inline-flex text-white text-xs font-semibold leading-normal",onClick:t,children:[e.buttonText,d("img",{className:"self-center",src:Te,alt:""})]})})]}),d("div",{className:"self-center",children:d("img",{className:"w-20 h-20",src:e.imageUrl})})]}),_t=({card:e,onClick:t})=>d("div",{className:"p-6 bg-white rounded-lg flex-col justify-start items-center gap-5 hidden card:inline-flex",children:[d("div",{children:d("img",{className:"relative bg-white block",src:e.imageUrl})}),d("div",{className:"flex-col justify-start items-center gap-5 flex",children:[d("div",{className:"flex-col justify-start items-start gap-4 flex",children:d("div",{className:"self-stretch flex-col justify-start items-start gap-2 flex",children:[d("div",{className:"self-stretch text-blue-950 text-2xl font-bold font-['Inter'] leading-7",children:e.title}),d("div",{className:"self-stretch text-gray-900 text-base font-medium font-['Inter'] leading-normal",children:e.description})]})}),d("div",{className:"self-stretch p-4 bg-blue-600 rounded-md justify-center items-center gap-2 inline-flex",children:d("button",{className:"text-white text-base font-semibold font-['Inter'] leading-normal flex gap-2",onClick:t,children:[e.buttonText,d("img",{className:"self-center",src:Te,alt:""})]})})]})]}),rt="fallback-cars-promotion",ot={title:"Benefit with Flare Cars and save",description:"In the market for a new car? We’ve got a benefit for that. Find out if you're eligible, and you could save, on average, $10,000 every year on your next car.",buttonText:"Learn more",imageUrl:"/promoted-benefits/app/v1.0/src/assets/flare-cars-banner.png"},it={title:"Benefit with Flare Cars and save",description:"In the market for a new car? We’ve got a benefit for that. Find out if you're eligible, and you could save, on average, $10,000 every year on your next car.",buttonText:"Learn more",imageUrl:"/promoted-benefits/app/v1.0/src/assets/flare-cars-card.png"},ct={type:"Benefits",url:"/categories/cars"},I={id:rt,banner:ot,card:it,action:ct},st=()=>({action:I.action,banner:I.banner,card:I.card,id:I.id}),lt=()=>{const e=Re(),t=et(),[n,r]=W();J(()=>{r(st())},[]);const _=async()=>{if(n){const o=await Je(n,t,e);if(o){const c=window.open();c&&(c.location=`${o}`)}}};return n?d(P,{children:[d(nt,{banner:n.banner,onClick:_}),d(_t,{card:n.card,onClick:_})]}):d(P,{})},at=()=>{const[e,t]=W({}),[n,r]=W(),[_,o]=W(!1);return Oe(e),J(()=>{(async()=>{const c=await tt();c&&(Ye(c),r(c))})()},[]),J(()=>{(async()=>{if(!_&&n){const c=await Xe(n);c&&t(c),o(!0)}})()},[n,_]),_?d(lt,{}):d(P,{})};je(d(at,{}),document.body);