@flarehr/superhero-pba-support-admin 1.0.1004 → 1.0.1005

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/build/bundle.js +1 -1
  2. package/package.json +4 -8
package/build/bundle.js CHANGED
@@ -1 +1 @@
1
- var e,t,r,n,i,o,a,s,l,c,d={},u=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function h(e,t){for(var r in t)e[r]=t[r];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function g(t,r,n){var i,o,a,s={};for(a in r)"key"==a?i=r[a]:"ref"==a?o=r[a]:s[a]=r[a];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return b(t,s,i,o,null)}function b(e,n,i,o,a){var s={type:e,props:n,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++r:a,__i:-1,__u:0};return null==a&&null!=t.vnode&&t.vnode(s),s}function y(e){return e.children}function w(e,t){this.props=e,this.context=t}function _(e,t){if(null==t)return e.__?_(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?_(e):null}function v(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return v(e)}}function x(e){(!e.__d&&(e.__d=!0)&&n.push(e)&&!k.__r++||i!==t.debounceRendering)&&((i=t.debounceRendering)||o)(k)}function k(){var e,r,i,o,s,l,c,d;for(n.sort(a);e=n.shift();)e.__d&&(r=n.length,o=void 0,l=(s=(i=e).__v).__e,c=[],d=[],i.__P&&((o=h({},s)).__v=s.__v+1,t.vnode&&t.vnode(o),R(i.__P,o,s,i.__n,i.__P.namespaceURI,32&s.__u?[l]:null,c,null==l?_(s):l,!!(32&s.__u),d),o.__v=s.__v,o.__.__k[o.__i]=o,U(c,o,d),o.__e!=l&&v(o)),n.length>r&&n.sort(a));k.__r=0}function N(e,t,r,n,i,o,a,s,l,c,p){var h,f,g,w,v,x=n&&n.__k||u,k=t.length;for(r.__d=l,function(e,t,r){var n,i,o,a,s,l=t.length,c=r.length,d=c,u=0;for(e.__k=[],n=0;n<l;n++)a=n+u,null!=(i=e.__k[n]=null==(i=t[n])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?b(null,i,null,null,null):m(i)?b(y,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?b(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,s=A(i,r,a,d),i.__i=s,o=null,-1!==s&&(d--,(o=r[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&u--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?u++:s>a?d>l-a?u+=s-a:u--:s<a?s==a-1&&(u=s-a):u=0,s!==n+u&&(i.__u|=65536))):(o=r[a])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=_(o)),j(o,o,!1),r[a]=null,d--);if(d)for(n=0;n<c;n++)null!=(o=r[n])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=_(o)),j(o,o))}(r,t,x),l=r.__d,h=0;h<k;h++)null!=(g=r.__k[h])&&"boolean"!=typeof g&&"function"!=typeof g&&(f=-1===g.__i?d:x[g.__i]||d,g.__i=h,R(e,g,f,i,o,a,s,l,c,p),w=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&P(f.ref,null,g),p.push(g.ref,g.__c||w,g)),null==v&&null!=w&&(v=w),65536&g.__u||f.__k===g.__k?(l&&!l.isConnected&&(l=_(f)),l=C(g,l,e)):"function"==typeof g.type&&void 0!==g.__d?l=g.__d:w&&(l=w.nextSibling),g.__d=void 0,g.__u&=-196609);r.__d=l,r.__e=v}function C(e,t,r){var n,i;if("function"==typeof e.type){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=C(n[i],t,r));return t}e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function E(e,t){return t=t||[],null==e||"boolean"==typeof e||(m(e)?e.some((function(e){E(e,t)})):t.push(e)),t}function A(e,t,r,n){var i=e.key,o=e.type,a=r-1,s=r+1,l=t[r];if(null===l||l&&i==l.key&&o===l.type&&!(131072&l.__u))return r;if(n>(null==l||131072&l.__u?0:1))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a--}if(s<t.length){if((l=t[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s++}}return-1}function S(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||p.test(t)?r:r+"px"}function T(e,t,r,n,i){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||S(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||S(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=s,e.addEventListener(t,o?c:l,o)):e.removeEventListener(t,o?c:l,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(a){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function O(e){return function(r){if(this.l){var n=this.l[r.type+e];if(null==r.t)r.t=s++;else if(r.t<n.u)return;return n(t.event?t.event(r):r)}}}function R(r,n,i,o,a,s,l,c,u,p){var g,b,v,x,k,C,E,A,S,O,R,U,P,j,I,M=n.type;if(void 0!==n.constructor)return null;128&i.__u&&(u=!!(32&i.__u),s=[c=n.__e=i.__e]),(g=t.__b)&&g(n);e:if("function"==typeof M)try{if(A=n.props,S=(g=M.contextType)&&o[g.__c],O=g?S?S.props.value:g.__:o,i.__c?E=(b=n.__c=i.__c).__=b.__E:("prototype"in M&&M.prototype.render?n.__c=b=new M(A,O):(n.__c=b=new w(A,O),b.constructor=M,b.render=L),S&&S.sub(b),b.props=A,b.state||(b.state={}),b.context=O,b.__n=o,v=b.__d=!0,b.__h=[],b._sb=[]),null==b.__s&&(b.__s=b.state),null!=M.getDerivedStateFromProps&&(b.__s==b.state&&(b.__s=h({},b.__s)),h(b.__s,M.getDerivedStateFromProps(A,b.__s))),x=b.props,k=b.state,b.__v=n,v)null==M.getDerivedStateFromProps&&null!=b.componentWillMount&&b.componentWillMount(),null!=b.componentDidMount&&b.__h.push(b.componentDidMount);else{if(null==M.getDerivedStateFromProps&&A!==x&&null!=b.componentWillReceiveProps&&b.componentWillReceiveProps(A,O),!b.__e&&(null!=b.shouldComponentUpdate&&!1===b.shouldComponentUpdate(A,b.__s,O)||n.__v===i.__v)){for(n.__v!==i.__v&&(b.props=A,b.state=b.__s,b.__d=!1),n.__e=i.__e,n.__k=i.__k,n.__k.forEach((function(e){e&&(e.__=n)})),R=0;R<b._sb.length;R++)b.__h.push(b._sb[R]);b._sb=[],b.__h.length&&l.push(b);break e}null!=b.componentWillUpdate&&b.componentWillUpdate(A,b.__s,O),null!=b.componentDidUpdate&&b.__h.push((function(){b.componentDidUpdate(x,k,C)}))}if(b.context=O,b.props=A,b.__P=r,b.__e=!1,U=t.__r,P=0,"prototype"in M&&M.prototype.render){for(b.state=b.__s,b.__d=!1,U&&U(n),g=b.render(b.props,b.state,b.context),j=0;j<b._sb.length;j++)b.__h.push(b._sb[j]);b._sb=[]}else do{b.__d=!1,U&&U(n),g=b.render(b.props,b.state,b.context),b.state=b.__s}while(b.__d&&++P<25);b.state=b.__s,null!=b.getChildContext&&(o=h(h({},o),b.getChildContext())),v||null==b.getSnapshotBeforeUpdate||(C=b.getSnapshotBeforeUpdate(x,k)),N(r,m(I=null!=g&&g.type===y&&null==g.key?g.props.children:g)?I:[I],n,i,o,a,s,l,c,u,p),b.base=n.__e,n.__u&=-161,b.__h.length&&l.push(b),E&&(b.__E=b.__=null)}catch(F){n.__v=null,u||null!=s?(n.__e=c,n.__u|=u?160:32,s[s.indexOf(c)]=null):(n.__e=i.__e,n.__k=i.__k),t.__e(F,n,i)}else null==s&&n.__v===i.__v?(n.__k=i.__k,n.__e=i.__e):n.__e=function(t,r,n,i,o,a,s,l,c){var u,p,h,g,b,y,w,v=n.props,x=r.props,k=r.type;if("svg"===k?o="http://www.w3.org/2000/svg":"math"===k?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=a)for(u=0;u<a.length;u++)if((b=a[u])&&"setAttribute"in b==!!k&&(k?b.localName===k:3===b.nodeType)){t=b,a[u]=null;break}if(null==t){if(null===k)return document.createTextNode(x);t=document.createElementNS(o,k,x.is&&x),a=null,l=!1}if(null===k)v===x||l&&t.data===x||(t.data=x);else{if(a=a&&e.call(t.childNodes),v=n.props||d,!l&&null!=a)for(v={},u=0;u<t.attributes.length;u++)v[(b=t.attributes[u]).name]=b.value;for(u in v)if(b=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)h=b;else if("key"!==u&&!(u in x)){if("value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x)continue;T(t,u,null,b,o)}for(u in x)b=x[u],"children"==u?g=b:"dangerouslySetInnerHTML"==u?p=b:"value"==u?y=b:"checked"==u?w=b:"key"===u||l&&"function"!=typeof b||v[u]===b||T(t,u,b,v[u],o);if(p)l||h&&(p.__html===h.__html||p.__html===t.innerHTML)||(t.innerHTML=p.__html),r.__k=[];else if(h&&(t.innerHTML=""),N(t,m(g)?g:[g],r,n,i,"foreignObject"===k?"http://www.w3.org/1999/xhtml":o,a,s,a?a[0]:n.__k&&_(n,0),l,c),null!=a)for(u=a.length;u--;)null!=a[u]&&f(a[u]);l||(u="value",void 0!==y&&(y!==t[u]||"progress"===k&&!y||"option"===k&&y!==v[u])&&T(t,u,y,v[u],o),u="checked",void 0!==w&&w!==t[u]&&T(t,u,w,v[u],o))}return t}(i.__e,n,i,o,a,s,l,u,p);(g=t.diffed)&&g(n)}function U(e,r,n){r.__d=void 0;for(var i=0;i<n.length;i++)P(n[i],n[++i],n[++i]);t.__c&&t.__c(r,e),e.some((function(r){try{e=r.__h,r.__h=[],e.some((function(e){e.call(r)}))}catch(n){t.__e(n,r.__v)}}))}function P(e,r,n){try{"function"==typeof e?e(r):e.current=r}catch(i){t.__e(i,n)}}function j(e,r,n){var i,o;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||P(i,null,r)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){t.__e(a,r)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&j(i[o],r,n||"function"!=typeof e.type);n||null==e.__e||f(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function L(e,t,r){return this.constructor(e,r)}function I(r,n,i){var o,a,s,l;t.__&&t.__(r,n),a=(o="function"==typeof i)?null:i&&i.__k||n.__k,s=[],l=[],R(n,r=(!o&&i||n).__k=g(y,null,[r]),a||d,d,n.namespaceURI,!o&&i?[i]:a?null:n.firstChild?e.call(n.childNodes):null,s,!o&&i?i:a?a.__e:n.firstChild,o,l),U(s,r,l)}function M(e,t){I(e,t,M)}function F(t,r,n){var i,o,a,s,l=h({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),r)"key"==a?i=r[a]:"ref"==a?o=r[a]:l[a]=void 0===r[a]&&void 0!==s?s[a]:r[a];return arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):n),b(t.type,l,i||t.key,o||t.ref,null)}e=u.slice,t={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},r=0,w.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},r),this.props)),e&&h(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),x(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x(this))},w.prototype.render=y,n=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,a=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,s=0,l=O(!1),c=O(!0);const D="*,: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;-o-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]){-webkit-text-decoration:underline dotted;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;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([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::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}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}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size=\"1\"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,: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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.z-10{z-index:10}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-4{grid-column-start:4}.row-span-3{grid-row:span 3 / span 3}.m-4{margin:1rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.ml-1{margin-left:.25rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mt-0{margin-top:0}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.mt-9{margin-top:2.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.min-h-full{min-height:100%}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.w-12{width:3rem}.w-3\\/4{width:75%}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-normal{justify-content:normal}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.divide-gray-500>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(107 114 128 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-4{padding-bottom:1rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.tracking-wider{letter-spacing:.05em}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-900:hover{--tw-bg-opacity: 1;background-color:rgb(49 46 129 / var(--tw-bg-opacity))}.hover\\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:col-span-3{grid-column:span 3 / span 3}.sm\\:col-start-1{grid-column-start:1}.sm\\:col-start-2{grid-column-start:2}.sm\\:col-start-3{grid-column-start:3}.sm\\:col-start-4{grid-column-start:4}.sm\\:row-start-1{grid-row-start:1}.sm\\:-mx-4{margin-left:-1rem;margin-right:-1rem}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-12{margin-left:3rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:mt-6{margin-top:1.5rem}.sm\\:flex{display:flex}.sm\\:table-cell{display:table-cell}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-1\\/2{width:50%}.sm\\:w-10{width:2.5rem}.sm\\:w-3\\/5{width:60%}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:items-baseline{align-items:baseline}.sm\\:justify-center{justify-content:center}.sm\\:gap-10{gap:2.5rem}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:pr-6{padding-right:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-right{text-align:right}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:mx-0{margin-left:0;margin-right:0}.md\\:rounded-lg{border-radius:.5rem}}@media (min-width: 1024px){.lg\\:table-cell{display:table-cell}}@media (min-width: 1280px){.xl\\:table-cell{display:table-cell}}@media (min-width: 1536px){.\\32xl\\:table-cell{display:table-cell}}";var B,z,q,H,V=0,$=[],W=[],J=t,K=J.__b,G=J.__r,X=J.diffed,Z=J.__c,Y=J.unmount,Q=J.__;function ee(e,t){J.__h&&J.__h(z,e,V||t),V=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:W}),r.__[e]}function te(e){return V=1,function(e,t,r){var n=ee(B++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):pe(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=z,!z.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var a=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&n.__c.props===e)&&(!o||o.call(this,e,t,r))};z.u=!0;var o=z.shouldComponentUpdate,a=z.componentWillUpdate;z.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}a&&a.call(this,e,t,r)},z.shouldComponentUpdate=i}return n.__N||n.__}(pe,e)}function re(e,t){var r=ee(B++,3);!J.__s&&ue(r.__H,t)&&(r.__=e,r.i=t,z.__H.__h.push(r))}function ne(e){return V=5,ie((function(){return{current:e}}),[])}function ie(e,t){var r=ee(B++,7);return ue(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function oe(e,t){return V=8,ie((function(){return e}),t)}function ae(){for(var e;e=$.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ce),e.__H.__h.forEach(de),e.__H.__h=[]}catch(t){e.__H.__h=[],J.__e(t,e.__v)}}J.__b=function(e){z=null,K&&K(e)},J.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Q&&Q(e,t)},J.__r=function(e){G&&G(e),B=0;var t=(z=e.__c).__H;t&&(q===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=W,e.__N=e.i=void 0}))):(t.__h.forEach(ce),t.__h.forEach(de),t.__h=[],B=0)),q=z},J.diffed=function(e){X&&X(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==$.push(t)&&H===J.requestAnimationFrame||((H=J.requestAnimationFrame)||le)(ae)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==W&&(e.__=e.__V),e.i=void 0,e.__V=W}))),q=z=null},J.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ce),e.__h=e.__h.filter((function(e){return!e.__||de(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],J.__e(r,e.__v)}})),Z&&Z(e,t)},J.unmount=function(e){Y&&Y(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{ce(e)}catch(r){t=r}})),r.__H=void 0,t&&J.__e(t,r.__v))};var se="function"==typeof requestAnimationFrame;function le(e){var t,r=function(){clearTimeout(n),se&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);se&&(t=requestAnimationFrame(r))}function ce(e){var t=z,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),z=t}function de(e){var t=z;e.__c=e.__(),z=t}function ue(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function pe(e,t){return"function"==typeof t?t(e):t}var me=0;function he(e,r,n,i,o,a){r||(r={});var s,l,c=r;if("ref"in c)for(l in c={},r)"ref"==l?s=r[l]:c[l]=r[l];var d={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--me,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(s=e.defaultProps))for(l in s)void 0===c[l]&&(c[l]=s[l]);return t.vnode&&t.vnode(d),d}const fe=function({tabTitles:e,currentTab:t,onChange:r}){const[n,i]=te(t),o=oe((e=>{i(e),r(e)}),[r]);return he("div",{class:"border-b border-gray-200",children:he("nav",{"aria-label":"Tabs",class:"flex space-x-8 ml-2",children:e.map((e=>he("a",{class:"cursor-pointer border-transparent text-gray-500 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm "+(n===e?"border-b-2 border-indigo-500 text-indigo-600":"hover:text-gray-700 hover:border-gray-300 "),onClick:()=>o(e),children:e},e)))})})};var ge=(e=>(e.Assessment="Assessment",e.Quiz="Quiz",e.Poll="Poll",e.Trivia="Trivia",e.Article="Article",e.Url="Url",e.Contact="Contact",e.Deeplink="Deeplink",e.Advertisement="Advertisement",e))(ge||{}),be=(e=>(e.Cars="Cars",e.Health="Health",e.Everyday="Everyday",e.Devices="Devices",e.Energy="Energy",e.SavingsAccount="Savings Account*",e.HomeLoan="Home Loan*",e.MobileAndInternet="Mobile & Internet",e))(be||{});const ye=e=>{var t;const r=e,n=(null==(t=r.response)?void 0:t.data)?r.response.data:void 0;return(null==n?void 0:n.message)??r.message},we=(e,t=3)=>{const r=e.split(" ");return r.length>t?`${r.slice(0,t).join(" ")}...`:e},_e=(e,t)=>{switch(e){case ge.Trivia:return"Trivia";case ge.Assessment:switch(t){case be.Cars:return"SalaryPackagingCars";case be.HomeLoan:return"HomeLoan"}return t.replace(/\s+/g,"");default:return"None"}},ve=e=>{switch(e){case be.SavingsAccount:return["Banking"];case be.Cars:return["Cars"];case be.Devices:case be.Health:case be.Energy:case be.Everyday:return[e];case"None":return["Miscellaneous"];case be.HomeLoan:case be.MobileAndInternet:default:return[]}},xe=e=>{switch(e){case be.Cars:return["NovatedLease"];case be.Health:return["HealthInsurance"];case be.SavingsAccount:return["SavingsAccount"];case be.Devices:case be.Energy:return[e];case be.HomeLoan:return["HomeLoan"];case be.MobileAndInternet:case be.Everyday:default:return[]}},ke=(e,t,r)=>{const n=e.products[0],i=Ne(e,t);i?i.isFeatured=r??!1:n.activities.push({id:t,isFeatured:r??!1})},Ne=(e,t)=>e.products[0].activities.find((e=>e.id===t));function Ce(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ee}=Object.prototype,{getPrototypeOf:Ae}=Object,Se=(e=>t=>{const r=Ee.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Te=e=>(e=e.toLowerCase(),t=>Se(t)===e),Oe=e=>t=>typeof t===e,{isArray:Re}=Array,Ue=Oe("undefined");const Pe=Te("ArrayBuffer");const je=Oe("string"),Le=Oe("function"),Ie=Oe("number"),Me=e=>null!==e&&"object"==typeof e,Fe=e=>{if("object"!==Se(e))return!1;const t=Ae(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},De=Te("Date"),Be=Te("File"),ze=Te("Blob"),qe=Te("FileList"),He=Te("URLSearchParams"),[Ve,$e,We,Je]=["ReadableStream","Request","Response","Headers"].map(Te);function Ke(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),Re(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(n=0;n<o;n++)a=i[n],t.call(null,e[a],a,e)}}function Ge(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const Xe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ze=e=>!Ue(e)&&e!==Xe;const Ye=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&Ae(Uint8Array)),Qe=Te("HTMLFormElement"),et=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),tt=Te("RegExp"),rt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ke(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},nt="abcdefghijklmnopqrstuvwxyz",it="0123456789",ot={DIGIT:it,ALPHA:nt,ALPHA_DIGIT:nt+nt.toUpperCase()+it};const at=Te("AsyncFunction"),st=(lt="function"==typeof setImmediate,ct=Le(Xe.postMessage),lt?setImmediate:ct?(dt=`axios@${Math.random()}`,ut=[],Xe.addEventListener("message",(({source:e,data:t})=>{e===Xe&&t===dt&&ut.length&&ut.shift()()}),!1),e=>{ut.push(e),Xe.postMessage(dt,"*")}):e=>setTimeout(e));var lt,ct,dt,ut;const pt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Xe):"undefined"!=typeof process&&process.nextTick||st,mt={isArray:Re,isArrayBuffer:Pe,isBuffer:function(e){return null!==e&&!Ue(e)&&null!==e.constructor&&!Ue(e.constructor)&&Le(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Le(e.append)&&("formdata"===(t=Se(e))||"object"===t&&Le(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Pe(e.buffer),t},isString:je,isNumber:Ie,isBoolean:e=>!0===e||!1===e,isObject:Me,isPlainObject:Fe,isReadableStream:Ve,isRequest:$e,isResponse:We,isHeaders:Je,isUndefined:Ue,isDate:De,isFile:Be,isBlob:ze,isRegExp:tt,isFunction:Le,isStream:e=>Me(e)&&Le(e.pipe),isURLSearchParams:He,isTypedArray:Ye,isFileList:qe,forEach:Ke,merge:function e(){const{caseless:t}=Ze(this)&&this||{},r={},n=(n,i)=>{const o=t&&Ge(r,i)||i;Fe(r[o])&&Fe(n)?r[o]=e(r[o],n):Fe(n)?r[o]=e({},n):Re(n)?r[o]=n.slice():r[o]=n};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&Ke(arguments[i],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(Ke(t,((t,n)=>{r&&Le(t)?e[n]=Ce(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Ae(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Se,kindOfTest:Te,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(Re(e))return e;let t=e.length;if(!Ie(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Qe,hasOwnProperty:et,hasOwnProp:et,reduceDescriptors:rt,freezeMethods:e=>{rt(e,((t,r)=>{if(Le(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Le(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return Re(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Ge,global:Xe,isContextDefined:Ze,ALPHABET:ot,generateString:(e=16,t=ot.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&Le(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Me(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=Re(e)?[]:{};return Ke(e,((e,t)=>{const o=r(e,n+1);!Ue(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:at,isThenable:e=>e&&(Me(e)||Le(e))&&Le(e.then)&&Le(e.catch),setImmediate:st,asap:pt};function ht(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}mt.inherits(ht,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:mt.toJSONObject(this.config),code:this.code,status:this.status}}});const ft=ht.prototype,gt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{gt[e]={value:e}})),Object.defineProperties(ht,gt),Object.defineProperty(ft,"isAxiosError",{value:!0}),ht.from=(e,t,r,n,i,o)=>{const a=Object.create(ft);return mt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),ht.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};function bt(e){return mt.isPlainObject(e)||mt.isArray(e)}function yt(e){return mt.endsWith(e,"[]")?e.slice(0,-2):e}function wt(e,t,r){return e?e.concat(t).map((function(e,t){return e=yt(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const _t=mt.toFlatObject(mt,{},null,(function(e){return/^is[A-Z]/.test(e)}));function vt(e,t,r){if(!mt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=mt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!mt.isUndefined(t[e])}))).metaTokens,i=r.visitor||c,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&mt.isSpecCompliantForm(t);if(!mt.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(mt.isDate(e))return e.toISOString();if(!s&&mt.isBlob(e))throw new ht("Blob is not supported. Use a Buffer instead.");return mt.isArrayBuffer(e)||mt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(mt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(mt.isArray(e)&&function(e){return mt.isArray(e)&&!e.some(bt)}(e)||(mt.isFileList(e)||mt.endsWith(r,"[]"))&&(s=mt.toArray(e)))return r=yt(r),s.forEach((function(e,n){!mt.isUndefined(e)&&null!==e&&t.append(!0===a?wt([r],n,o):null===a?r:r+"[]",l(e))})),!1;return!!bt(e)||(t.append(wt(i,r,o),l(e)),!1)}const d=[],u=Object.assign(_t,{defaultVisitor:c,convertValue:l,isVisitable:bt});if(!mt.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!mt.isUndefined(r)){if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),mt.forEach(r,(function(r,o){!0===(!(mt.isUndefined(r)||null===r)&&i.call(t,r,mt.isString(o)?o.trim():o,n,u))&&e(r,n?n.concat(o):[o])})),d.pop()}}(e),t}function xt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function kt(e,t){this._pairs=[],e&&vt(e,this,t)}const Nt=kt.prototype;function Ct(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Et(e,t,r){if(!t)return e;const n=r&&r.encode||Ct,i=r&&r.serialize;let o;if(o=i?i(t,r):mt.isURLSearchParams(t)?t.toString():new kt(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Nt.append=function(e,t){this._pairs.push([e,t])},Nt.toString=function(e){const t=e?function(t){return e.call(this,t,xt)}:xt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class At{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){mt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const St={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:kt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ot="undefined"!=typeof window&&"undefined"!=typeof document,Rt="object"==typeof navigator&&navigator||void 0,Ut=Ot&&(!Rt||["ReactNative","NativeScript","NS"].indexOf(Rt.product)<0),Pt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,jt=Ot&&window.location.href||"http://localhost",Lt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ot,hasStandardBrowserEnv:Ut,hasStandardBrowserWebWorkerEnv:Pt,navigator:Rt,origin:jt},Symbol.toStringTag,{value:"Module"})),...Tt};function It(e){function t(e,r,n,i){let o=e[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=i>=e.length;if(o=!o&&mt.isArray(n)?n.length:o,s)return mt.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a;n[o]&&mt.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&mt.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!a}if(mt.isFormData(e)&&mt.isFunction(e.entries)){const r={};return mt.forEachEntry(e,((e,n)=>{t(function(e){return mt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Mt={transitional:St,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=mt.isObject(e);i&&mt.isHTMLForm(e)&&(e=new FormData(e));if(mt.isFormData(e))return n?JSON.stringify(It(e)):e;if(mt.isArrayBuffer(e)||mt.isBuffer(e)||mt.isStream(e)||mt.isFile(e)||mt.isBlob(e)||mt.isReadableStream(e))return e;if(mt.isArrayBufferView(e))return e.buffer;if(mt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return vt(e,new Lt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Lt.isNode&&mt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=mt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return vt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(mt.isString(e))try{return(t||JSON.parse)(e),mt.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Mt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(mt.isResponse(e)||mt.isReadableStream(e))return e;if(e&&mt.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(i){if(r){if("SyntaxError"===i.name)throw ht.from(i,ht.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};mt.forEach(["delete","get","head","post","put","patch"],(e=>{Mt.headers[e]={}}));const Ft=mt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dt=Symbol("internals");function Bt(e){return e&&String(e).trim().toLowerCase()}function zt(e){return!1===e||null==e?e:mt.isArray(e)?e.map(zt):String(e)}function qt(e,t,r,n,i){return mt.isFunction(n)?n.call(this,t,r):(i&&(t=r),mt.isString(t)?mt.isString(n)?-1!==t.indexOf(n):mt.isRegExp(n)?n.test(t):void 0:void 0)}let Ht=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Bt(t);if(!i)throw new Error("header name must be a non-empty string");const o=mt.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=zt(e))}const o=(e,t)=>mt.forEach(e,((e,r)=>i(e,r,t)));if(mt.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(mt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&Ft[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(mt.isHeaders(e))for(const[a,s]of e.entries())i(s,a,r);else null!=e&&i(t,e,r);return this}get(e,t){if(e=Bt(e)){const r=mt.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(mt.isFunction(t))return t.call(this,e,r);if(mt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Bt(e)){const r=mt.findKey(this,e);return!(!r||void 0===this[r]||t&&!qt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=Bt(e)){const i=mt.findKey(r,e);!i||t&&!qt(0,r[i],i,t)||(delete r[i],n=!0)}}return mt.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!qt(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return mt.forEach(this,((n,i)=>{const o=mt.findKey(r,i);if(o)return t[o]=zt(n),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();a!==i&&delete t[i],t[a]=zt(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return mt.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&mt.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Dt]=this[Dt]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Bt(e);t[n]||(!function(e,t){const r=mt.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return mt.isArray(e)?e.forEach(n):n(e),this}};function Vt(e,t){const r=this||Mt,n=t||r,i=Ht.from(n.headers);let o=n.data;return mt.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function $t(e){return!(!e||!e.__CANCEL__)}function Wt(e,t,r){ht.call(this,null==e?"canceled":e,ht.ERR_CANCELED,t,r),this.name="CanceledError"}function Jt(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new ht("Request failed with status code "+r.status,[ht.ERR_BAD_REQUEST,ht.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),mt.reduceDescriptors(Ht.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),mt.freezeMethods(Ht),mt.inherits(Wt,ht,{__CANCEL__:!0});const Kt=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=n[a];i||(i=l),r[o]=s,n[o]=l;let d=a,u=0;for(;d!==o;)u+=r[d++],d%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-i<t)return;const p=c&&l-c;return p?Math.round(1e3*u/p):void 0}}(50,250);return function(e,t){let r,n,i=0,o=1e3/t;const a=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=o?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),o-s)))},()=>r&&a(r)]}((r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,l=i(s);n=o;e({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},Gt=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Xt=e=>(...t)=>mt.asap((()=>e(...t))),Zt=Lt.hasStandardBrowserEnv?function(){const e=Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=mt.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return function(){return!0}}(),Yt=Lt.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const a=[e+"="+encodeURIComponent(t)];mt.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),mt.isString(n)&&a.push("path="+n),mt.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Qt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const er=e=>e instanceof Ht?{...e}:e;function tr(e,t){t=t||{};const r={};function n(e,t,r){return mt.isPlainObject(e)&&mt.isPlainObject(t)?mt.merge.call({caseless:r},e,t):mt.isPlainObject(t)?mt.merge({},t):mt.isArray(t)?t.slice():t}function i(e,t,r){return mt.isUndefined(t)?mt.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!mt.isUndefined(t))return n(void 0,t)}function a(e,t){return mt.isUndefined(t)?mt.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(er(e),er(t),!0)};return mt.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=l[n]||i,a=o(e[n],t[n],n);mt.isUndefined(a)&&o!==s||(r[n]=a)})),r}const rr=e=>{const t=tr({},e);let r,{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=Ht.from(s),t.url=Et(Qt(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),mt.isFormData(n))if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(Lt.hasStandardBrowserEnv&&(i&&mt.isFunction(i)&&(i=i(t)),i||!1!==i&&Zt(t.url))){const e=o&&a&&Yt.read(a);e&&s.set(o,e)}return t},nr="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=rr(e);let i=n.data;const o=Ht.from(n.headers).normalize();let a,s,l,c,d,{responseType:u,onUploadProgress:p,onDownloadProgress:m}=n;function h(){c&&c(),d&&d(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let f=new XMLHttpRequest;function g(){if(!f)return;const n=Ht.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Jt((function(e){t(e),h()}),(function(e){r(e),h()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f}),f=null}f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(r(new ht("Request aborted",ht.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new ht("Network Error",ht.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||St;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new ht(t,i.clarifyTimeoutError?ht.ETIMEDOUT:ht.ECONNABORTED,e,f)),f=null},void 0===i&&o.setContentType(null),"setRequestHeader"in f&&mt.forEach(o.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),mt.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),u&&"json"!==u&&(f.responseType=n.responseType),m&&([l,d]=Kt(m,!0),f.addEventListener("progress",l)),p&&f.upload&&([s,c]=Kt(p),f.upload.addEventListener("progress",s),f.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(a=t=>{f&&(r(!t||t.type?new Wt(null,e,f):t),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);b&&-1===Lt.protocols.indexOf(b)?r(new ht("Unsupported protocol "+b+":",ht.ERR_BAD_REQUEST,e)):f.send(i||null)}))},ir=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const i=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof ht?t:new Wt(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,i(new ht(`timeout ${t} of ms exceeded`,ht.ETIMEDOUT))}),t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=n;return s.unsubscribe=()=>mt.asap(a),s}},or=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},ar=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},sr=(e,t,r,n)=>{const i=async function*(e,t){for await(const r of ar(e))yield*or(r,t)}(e,t);let o,a=0,s=e=>{o||(o=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return s(),void e.close();let o=n.byteLength;if(r){let e=a+=o;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw s(t),t}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},lr="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,cr=lr&&"function"==typeof ReadableStream,dr=lr&&("function"==typeof TextEncoder?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ur=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},pr=cr&&ur((()=>{let e=!1;const t=new Request(Lt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),mr=cr&&ur((()=>mt.isReadableStream(new Response("").body))),hr={stream:mr&&(e=>e.body)};var fr;lr&&(fr=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!hr[e]&&(hr[e]=mt.isFunction(fr[e])?t=>t[e]():(t,r)=>{throw new ht(`Response type '${e}' is not supported`,ht.ERR_NOT_SUPPORT,r)})})));const gr=async(e,t)=>{const r=mt.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(mt.isBlob(e))return e.size;if(mt.isSpecCompliantForm(e)){const t=new Request(Lt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return mt.isArrayBufferView(e)||mt.isArrayBuffer(e)?e.byteLength:(mt.isURLSearchParams(e)&&(e+=""),mt.isString(e)?(await dr(e)).byteLength:void 0)})(t):r},br={http:null,xhr:nr,fetch:lr&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:d,withCredentials:u="same-origin",fetchOptions:p}=rr(e);c=c?(c+"").toLowerCase():"text";let m,h=ir([i,o&&o.toAbortSignal()],a);const f=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&pr&&"get"!==r&&"head"!==r&&0!==(g=await gr(d,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(mt.isFormData(n)&&(e=r.headers.get("content-type"))&&d.setContentType(e),r.body){const[e,t]=Gt(g,Kt(Xt(l)));n=sr(r.body,65536,e,t)}}mt.isString(u)||(u=u?"include":"omit");const i="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:i?u:void 0});let o=await fetch(m);const a=mr&&("stream"===c||"response"===c);if(mr&&(s||a&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=mt.toFiniteNumber(o.headers.get("content-length")),[r,n]=s&&Gt(t,Kt(Xt(s),!0))||[];o=new Response(sr(o.body,65536,r,(()=>{n&&n(),f&&f()})),e)}c=c||"text";let b=await hr[mt.findKey(hr,c)||"text"](o,e);return!a&&f&&f(),await new Promise(((t,r)=>{Jt(t,r,{data:b,headers:Ht.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:m})}))}catch(b){if(f&&f(),b&&"TypeError"===b.name&&/fetch/i.test(b.message))throw Object.assign(new ht("Network Error",ht.ERR_NETWORK,e,m),{cause:b.cause||b});throw ht.from(b,b&&b.code,e,m)}})};mt.forEach(br,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}}));const yr=e=>`- ${e}`,wr=e=>mt.isFunction(e)||null===e||!1===e,_r=e=>{e=mt.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!wr(r)&&(n=br[(t=String(r)).toLowerCase()],void 0===n))throw new ht(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new ht("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(yr).join("\n"):" "+yr(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function vr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wt(null,e)}function xr(e){vr(e),e.headers=Ht.from(e.headers),e.data=Vt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return _r(e.adapter||Mt.adapter)(e).then((function(t){return vr(e),t.data=Vt.call(e,e.transformResponse,t),t.headers=Ht.from(t.headers),t}),(function(t){return $t(t)||(vr(e),t&&t.response&&(t.response.data=Vt.call(e,e.transformResponse,t.response),t.response.headers=Ht.from(t.response.headers))),Promise.reject(t)}))}const kr="1.7.7",Nr={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Nr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Cr={};Nr.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new ht(n(i," has been removed"+(t?" in "+t:"")),ht.ERR_DEPRECATED);return t&&!Cr[i]&&(Cr[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};const Er={assertOptions:function(e,t,r){if("object"!=typeof e)throw new ht("options must be an object",ht.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],a=t[o];if(a){const t=e[o],r=void 0===t||a(t,o,e);if(!0!==r)throw new ht("option "+o+" must be "+r,ht.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new ht("Unknown option "+o,ht.ERR_BAD_OPTION)}},validators:Nr},Ar=Er.validators;let Sr=class{constructor(e){this.defaults=e,this.interceptors={request:new At,response:new At}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(n){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=tr(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Er.assertOptions(r,{silentJSONParsing:Ar.transitional(Ar.boolean),forcedJSONParsing:Ar.transitional(Ar.boolean),clarifyTimeoutError:Ar.transitional(Ar.boolean)},!1),null!=n&&(mt.isFunction(n)?t.paramsSerializer={serialize:n}:Er.assertOptions(n,{encode:Ar.function,serialize:Ar.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&mt.merge(i.common,i[t.method]);i&&mt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Ht.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!s){const e=[xr.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=a.length;let p=t;for(u=0;u<d;){const e=a[u++],t=a[u++];try{p=e(p)}catch(m){t.call(this,m);break}}try{c=xr.call(this,p)}catch(m){return Promise.reject(m)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(e){return Et(Qt((e=tr(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}};mt.forEach(["delete","get","head","options"],(function(e){Sr.prototype[e]=function(t,r){return this.request(tr(r||{},{method:e,url:t,data:(r||{}).data}))}})),mt.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(tr(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Sr.prototype[e]=t(),Sr.prototype[e+"Form"]=t(!0)}));const Tr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Tr).forEach((([e,t])=>{Tr[t]=e}));const Or=function e(t){const r=new Sr(t),n=Ce(Sr.prototype.request,r);return mt.extend(n,Sr.prototype,r,{allOwnKeys:!0}),mt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(tr(t,r))},n}(Mt);Or.Axios=Sr,Or.CanceledError=Wt,Or.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new Wt(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}},Or.isCancel=$t,Or.VERSION=kr,Or.toFormData=vt,Or.AxiosError=ht,Or.Cancel=Or.CanceledError,Or.all=function(e){return Promise.all(e)},Or.spread=function(e){return function(t){return e.apply(null,t)}},Or.isAxiosError=function(e){return mt.isObject(e)&&!0===e.isAxiosError},Or.mergeConfig=tr,Or.AxiosHeaders=Ht,Or.formToJSON=e=>It(mt.isHTMLForm(e)?new FormData(e):e),Or.getAdapter=_r,Or.HttpStatusCode=Tr,Or.default=Or;const{Axios:Rr,AxiosError:Ur,CanceledError:Pr,isCancel:jr,CancelToken:Lr,VERSION:Ir,all:Mr,Cancel:Fr,isAxiosError:Dr,spread:Br,toFormData:zr,AxiosHeaders:qr,HttpStatusCode:Hr,formToJSON:Vr,getAdapter:$r,mergeConfig:Wr}=Or;let Jr,Kr,Gr;const Xr=(e,t,r)=>{const n=`${e}/${r}`,i=Or.create({baseURL:n,headers:{Authorization:`Bearer ${t}`}});switch(r){case"customer-profile":Jr=i;break;case"flare-app-identity":Kr=i;break;case"benefits-plan":Gr=i}return i},Zr=async(e,t)=>{if(!Gr)throw new Error("Api has not been initialized");return await Gr.put(`/_admin/v1.0/categories/${e}`,t)},Yr=async(e,t,r,n)=>{if(!Gr)throw new Error("Api has not been initialized");try{if(await Gr.put(`/_admin/v1.0/activities/${e}`,t),r){const t=Ne(r,e);if((null==t?void 0:t.isFeatured)!==n){ke(r,e,n??!1);const t=r;await Zr(r.id,t)}}}catch(i){throw new Error(`${ye(i)}`)}},Qr=e=>{const[t,r]=te(!1),n=ne(),i=oe((async t=>{try{const r=e.find((e=>e.id===t));if(!r)throw new Error("Category not found");const n={title:r.title,subtitle:r.subtitle,iconUrl:r.iconUrl,enabled:!r.enabled,displayOrder:r.displayOrder,products:r.products};await Zr(t,n)}catch(n){throw new Error(`Failed to update category visibility. Error: ${ye(n)}`)}finally{r(!1)}}),[e]),o=oe((async e=>{try{await(async e=>{if(!Gr)throw new Error("Api has not been initialized");return await Gr.post("/_admin/v1.0/categories",e)})(e)}catch(t){throw new Error(`${ye(t)}`)}}),[]),a=oe((async(e,t)=>{try{await Zr(e,t)}catch(r){throw new Error(`${ye(r)}`)}}),[]);return{isModalOpen:t,handleAction:oe((async e=>{switch(e.type){case"updateVisibility":n.current=e.categoryId,r(!0);break;case"updateCategory":await a(e.categoryId,e.category);break;case"createCategory":await o(e.category);break;default:console.error(`Unhandled action type: ${e}`)}}),[o,a]),handleModalConfirm:oe((async()=>{n.current&&await i(n.current)}),[i]),handleModalCancel:oe((()=>{r(!1)}),[])}};for(var en,tn=[],rn=0;rn<256;++rn)tn.push((rn+256).toString(16).slice(1));var nn=new Uint8Array(16);function on(){if(!en&&!(en="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return en(nn)}const an={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function sn(e,t,r){if(an.randomUUID&&!t&&!e)return an.randomUUID();var n=(e=e||{}).random||(e.rng||on)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return(tn[e[t+0]]+tn[e[t+1]]+tn[e[t+2]]+tn[e[t+3]]+"-"+tn[e[t+4]]+tn[e[t+5]]+"-"+tn[e[t+6]]+tn[e[t+7]]+"-"+tn[e[t+8]]+tn[e[t+9]]+"-"+tn[e[t+10]]+tn[e[t+11]]+tn[e[t+12]]+tn[e[t+13]]+tn[e[t+14]]+tn[e[t+15]]).toLowerCase()}(n)}const ln=({title:e,children:t})=>he("div",{className:"mt-2",children:[he("div",{className:"mt-9",children:he("h1",{className:"text-2xl font-semibold text-gray-900",children:e})}),he("div",{className:"w-1/2",children:t})]}),cn=({formFields:e,formData:t,isSubmitting:r,formMode:n,messages:i,categoryId:o,handleInputChange:a})=>he(y,{children:[e.map((e=>e.display&&!e.display(o)?null:he(y,{children:[he("label",{className:"sm:col-start-1",children:e.label}),he("input",{className:"sm:col-start-2 sm:col-span-3 block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm "+("checkbox"===e.type?"w-6 h-full":""),type:e.type,name:e.name,value:(e.type,t[e.name]),checked:"checkbox"===e.type?!!t[e.name]:void 0,disabled:e.disabled&&e.disabled(n.mode),required:e.isRequired,onChange:a})]},e.name))),he("div",{className:"sm:col-start-4 flex justify-end",children:he("button",{className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",type:"submit",disabled:r,children:"create"===n.mode?"Create":"Update"})}),he("div",{className:"sm:col-start-1 sm:col-span-3 text-left",children:i.map(((e,t)=>he("div",{className:"text-sm text-left font-semibold "+("error"===e.type?"text-red-600":"text-green-600 cursor-pointer"),children:e.text},t)))})]}),dn={categoryId:"",title:"",subtitle:"",iconUrl:"",displayOrder:0},un=[{name:"categoryId",isRequired:!1,label:"Category Id",type:"text",disabled:e=>"update"==e},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"subtitle",isRequired:!0,label:"Sub Title",type:"text"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"displayOrder",isRequired:!1,label:"Display Order",type:"number"}],pn=({formMode:e,onChange:t})=>{const{isSubmitting:r,messages:n,formData:i,handleSubmit:o,handleInputChange:a}=((e,t)=>{const[r,n]=te(!1),[i,o]=te([]),[a,s]=te(dn),{handleAction:l}=Qr([]);re((()=>{if("update"===e.mode){const t={categoryId:e.initialCategory.id,title:e.initialCategory.title,subtitle:e.initialCategory.subtitle,iconUrl:e.initialCategory.iconUrl,displayOrder:e.initialCategory.displayOrder};s(t)}}),[e]);const c=oe(((e,t)=>{o((r=>[...r,{text:e,type:t}]))}),[]),d=oe((()=>{s({...dn})}),[]),u=oe((()=>{let e=!0;for(const t of un)!t.isRequired||"text"!==t.type||a[t.name]&&""!==a[t.name].toString().trim()||(c(`${t.label} is required.`,"error"),e=!1);return e}),[a,c]),p=oe((()=>({...a,enabled:!1,products:[{id:sn(),title:a.title,description:a.subtitle,enabled:!0,iconUrl:a.iconUrl,activities:[]}]})),[a]),m=oe((e=>({...a,enabled:e.enabled,products:e.products})),[a]);return{isSubmitting:r,messages:i,formData:a,setMessages:o,handleSubmit:async r=>{if(r.preventDefault(),n(!0),o([]),u())try{if("create"===e.mode){const e=p();await l({type:"createCategory",category:e})}if("update"===e.mode){const t=m(e.initialCategory);await l({type:"updateCategory",categoryId:e.initialCategory.id,category:t})}c(`Category successfully ${"create"===e.mode?"created":"updated"}.`,"success"),d(),t()}catch(i){c(`Error ${"create"===e.mode?"adding":"updating"} category: ${i}`,"error")}finally{n(!1)}else n(!1)},handleInputChange:e=>{const t=e.target,{name:r,value:n,type:i}=t;s((e=>({...e,[r]:"number"===i?Number(n):n})))}}})(e,t),s="create"===e.mode?"New Benefits Plan Category":"Update Benefits Plan Category";return he(ln,{title:s,children:he("form",{onSubmit:o,children:he("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline sm:gap-10 mt-8",children:he(cn,{formMode:e,formFields:un,formData:i,isSubmitting:r,messages:n,handleInputChange:a})})})})},mn=({disabled:e,children:t,onClick:r,...n})=>{const[i,o]=te(!1);return he("button",{disabled:e||i,onClick:async()=>{if(r&&!i){o(!0);try{await r()}catch(e){console.error("Error executing promise:",e)}finally{o(!1)}}},type:"submit",...n,children:t})};function hn(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function fn(e,t){this.props=e,this.context=t}(fn.prototype=new w).isPureReactComponent=!0,fn.prototype.shouldComponentUpdate=function(e,t){return hn(this.props,e)||hn(this.state,t)};var gn=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),gn&&gn(e)};var bn=t.__e;t.__e=function(e,t,r,n){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t);bn(e,t,r,n)};var yn=t.unmount;function wn(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var r in t)e[r]=t[r];return e}({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return wn(e,t,r)}))),e}function _n(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return _n(e,t,r)})),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function vn(){this.__u=0,this.t=null,this.__b=null}function xn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function kn(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),yn&&yn(e)},(vn.prototype=new w).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var i=xn(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=_n(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},vn.prototype.componentWillUnmount=function(){this.t=[]},vn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=wn(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&g(y,null,e.fallback);return i&&(i.__u&=-33),[g(y,null,t.__a?null:e.children),i]};var Nn=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};(kn.prototype=new w).__a=function(e){var t=this,r=xn(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),Nn(t,e,n)):i()};r?r(o):o()}},kn.prototype.render=function(e){this.u=null,this.o=new Map;var t=E(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},kn.prototype.componentDidUpdate=kn.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){Nn(e,r,t)}))};var Cn="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,En=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,An=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Sn=/[A-Z0-9]/g,Tn="undefined"!=typeof document,On=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Rn=t.event;function Un(){}function Pn(){return this.cancelBubble}function jn(){return this.defaultPrevented}t.event=function(e){return Rn&&(e=Rn(e)),e.persist=Un,e.isPropagationStopped=Pn,e.isDefaultPrevented=jn,e.nativeEvent=e};var Ln={enumerable:!1,configurable:!0,get:function(){return this.class}},In=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||Tn&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"translate"===a&&"no"===o?o=!1:"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||On(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":An.test(i)?i=a:-1===r.indexOf("-")&&En.test(i)?i=i.replace(Sn,"-$&").toLowerCase():null===o&&(o=void 0):a=i="oninput","oninput"===a&&n[i=a]&&(i="oninputCapture"),n[i]=o}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=E(t.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=E(t.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",Ln)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=Cn,In&&In(e)};var Mn=t.__r;t.__r=function(e){Mn&&Mn(e),e.__c};var Fn=t.diffed;t.diffed=function(e){Fn&&Fn(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value)};const Dn=e=>g("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...e},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})),Bn=({isOpen:e,heading:t,message:r,onConfirm:n,onCancel:i})=>e?he("div",{className:"relative z-10","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[he("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),he("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:he("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:he("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[he("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:he("div",{className:"sm:flex sm:items-start",children:[he("div",{className:"mx-auto flex h-10 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:he(Dn,{className:"h-6 w-6 text-red-600"})}),he("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[he("h1",{className:"text-base font-semibold leading-6 text-gray-900",id:"modal-title",children:t}),he("div",{className:"mt-2",children:he("p",{className:"text-sm text-gray-500",children:r})})]})]})}),he("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[he(mn,{onClick:n,className:"inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto cursor-pointer",children:"Confirm"}),he("button",{className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto cursor-pointer",onClick:i,children:"Cancel"})]})]})})})]}):null,zn=({headers:e,renderTableRows:t})=>he("div",{className:"-mx-4 mt-8 sm:-mx-4",children:he("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:he("table",{className:"min-w-full divide-y divide-gray-500",children:[he("thead",{className:"bg-gray-50",children:he("tr",{className:"divide-x divide-gray-20",children:e.map((e=>he("th",{scope:"col",className:e.className,children:e.name},e.name)))})}),he("tbody",{className:"divide-y divide-gray-200 bg-white",children:t()})]})})}),qn=({error:e,isModalOpen:t,modalHeading:r,modalTitle:n,tableHeaders:i,headingText:o,buttonText:a,filterElement:s,onCreateButton:l,onModalConfirm:c,renderTableRows:d,handleModalCancel:u})=>he(y,{children:[he("div",{className:"p-4 text-red-700",children:e}),!e&&he("div",{className:"m-4",children:[he("div",{className:"flex items-center",children:[he("div",{className:"flex-auto",children:he("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:o})}),he("div",{className:"ml-16 mt-0 flex-none",children:he("button",{type:"button",className:"block rounded-md bg-indigo-500 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",onClick:l,children:a})})]}),s,he(zn,{headers:i,renderTableRows:d})]}),he(Bn,{isOpen:t,heading:r,message:n,onConfirm:c,onCancel:u})]}),Hn=e=>g("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"#6366F1",className:"size-6",...e},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})),Vn=({onClick:e,children:t})=>he("div",{className:"mt-4",children:he("div",{className:"flex justify-normal",children:[he("span",{onClick:e,children:he(Hn,{className:"h-6 w-6 border-0 cursor-pointer"})}),he("label",{className:"block text-sm font-bold text-gray-700 pt-0.5 ml-1",children:t})]})}),$n=({onClick:e,children:t})=>he(y,{children:[he(Vn,{onClick:e,children:"Benefits Plan"}),t]}),Wn=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Subtitle",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Activities",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Order",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],Jn=e=>{const[t,r]=te(null),[n,i]=te({mode:"view"}),{isModalOpen:o,handleAction:a,handleModalConfirm:s,handleModalCancel:l}=Qr(e.categories);return he(y,{children:["view"===n.mode&&he(qn,{error:t,isModalOpen:o,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this category in the app?",tableHeaders:Wn,headingText:"Benefits Plan Categories",buttonText:"New Category",onModalConfirm:async()=>{try{await s(),e.onChange()}catch(t){r(`${t}`)}},handleModalCancel:l,renderTableRows:()=>he(y,{children:e.categories.map((e=>{const t=e.products.reduce(((e,t)=>e+t.activities.length),0);return he("tr",{className:"divide-x divide-gray-200",children:[he("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:e.id}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 items-center justify-center sm:table-cell",children:he("img",{src:e.iconUrl,alt:e.title,className:"h-8 w-8"})}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.title}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:e.subtitle}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:t}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.displayOrder}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.enabled?"Yes":"No"}),he("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:he("div",{className:"flex justify-center",children:he("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{i({mode:"update",itemId:e.id})},children:"Edit"})})}),he("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:he("div",{className:"flex justify-center",children:he("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>(async e=>{await a({type:"updateVisibility",categoryId:e})})(e.id),children:e.enabled?"Disable":"Enable"})})})]},e.id)}))}),onCreateButton:()=>i({mode:"create"})}),"view"!==n.mode&&he($n,{onClick:()=>{i({mode:"view"})},children:he(pn,{formMode:"create"===n.mode?{mode:"create"}:{mode:"update",initialCategory:e.categories.find((e=>e.id===n.itemId))},onChange:e.onChange})})]})},Kn=({visible:e,children:t})=>{const r=ne(e);return e&&!r.current&&(r.current=!0),r.current?he("div",{hidden:!e,children:t}):null},Gn=e=>g("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"black",height:32,width:32,...e},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"})),Xn=()=>{const[e,t]=te(!1),[r,n]=te([]),[i,o]=te(!1),a=ne([]),s=ne(),l=oe((async e=>{t(!0),a.current=e;try{const t=await(async()=>{if(!Gr)throw new Error("Api has not been initialized");return(await Gr.get("/_admin/v1.0/activities")).data})(),r=Zn(e,t);n(r)}catch(r){throw new Error(`Failed to load activities. Error: ${ye(r)}`)}finally{t(!1)}}),[]),c=oe((async e=>{t(!0);try{const t=await(async e=>{if(!Gr)throw new Error("Api has not been initialized");return(await Gr.get(`/_admin/v1.0/activities/${e}`)).data})(e);t.enabled=!t.enabled,await Yr(e,t)}catch(r){throw new Error(`Failed to update activity visibility. Error: ${ye(r)}`)}finally{t(!1)}}),[]);return{activities:r,isLoading:e,isModalOpen:i,loadActivities:l,handleAction:oe((async e=>{switch(e.type){case"updateVisibility":s.current=e.activityId,o(!0);break;case"updateActivity":await Yr(e.activityId,e.activity,e.selectedCategory,e.isFeaturedActivity);break;case"createActivity":await(async(e,t,r)=>{if(!Gr)throw new Error("Api has not been initialized");try{const n=await Gr.post("/_admin/v1.0/activities",e);if(t){ke(t,n.data.id,r??!1);const e=t;await Zr(t.id,e)}}catch(n){throw new Error(`${ye(n)}`)}})(e.activity,e.selectedCategory,e.isFeaturedActivity);break;default:console.error(`Unhandled action type: ${e}`)}}),[]),handleModalConfirm:oe((async()=>{s.current&&(await c(s.current),o(!1))}),[c]),handleModalCancel:oe((()=>{o(!1)}),[])}},Zn=(e,t)=>{const r=Yn(e);return t.map((e=>{var t;return{...e,category:null==(t=r.get(e.id))?void 0:t.find((()=>!0))}}))},Yn=e=>{const t=Qn(e),r=new Map;return t.forEach((({activity:e,categoryId:t,categoryTitle:n})=>{const i=e.id;r.has(i)||r.set(i,[]);const o=r.get(i);o.some((e=>e.id===t))||o.push({id:t,title:n,isFeatured:e.isFeatured})})),r},Qn=e=>e.flatMap((e=>e.products.flatMap((t=>t.activities.map((t=>({activity:t,categoryId:e.id,categoryTitle:e.title}))))))),ei="None",ti=[{name:"activityId",isRequired:!1,label:"Activity Id",type:"text",disabled:e=>"update"==e},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"description",isRequired:!0,label:"Sub Title",type:"text"},{name:"points",isRequired:!0,label:"Points",type:"number"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"isFeatured",isRequired:!1,label:"Is Featured",type:"checkbox",display:e=>e!==ei}],ri=[{activityType:ge.Advertisement,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:ge.Article,formFields:[{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:ge.Assessment,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"buttonText",isRequired:!0,label:"Button Text",type:"text"},{name:"primaryLabel",isRequired:!0,label:"Primary Label",type:"text"},{name:"secondaryLabel",isRequired:!0,label:"Secondary label",type:"text"}]},{activityType:ge.Url,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]},{activityType:ge.Deeplink,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]}],ni={activityId:"",title:"",description:"",points:0,iconUrl:"",url:"",articleId:"",bannerUrl:"",buttonText:"",primaryLabel:"",secondaryLabel:"",isFeatured:!1},ii=({formMode:e,categories:t,onChange:r})=>{const{isSubmitting:n,messages:i,formData:o,selectedActivityType:a,currentFormFields:s,selectedCategory:l,handleSubmit:c,handleInputChange:d,handleActivityTypeChange:u,handleCategoryChange:p}=((e,t,r)=>{const[n,i]=te(ge.Article),[o,a]=te({id:ei,title:ei}),[s,l]=te([]),[c,d]=te(!1),[u,p]=te(ni),{handleAction:m}=Xn(),h=ie((()=>{var e;return[...ti,...(null==(e=ri.find((e=>e.activityType===n)))?void 0:e.formFields)||[]]}),[n]),f=oe(((e,t)=>{l((r=>[...r,{text:e,type:t}]))}),[]);re((()=>{var t,r,n;if("update"===e.mode){const o=e.initialActivity,s={activityId:o.id,title:o.title,points:o.points,description:o.description,iconUrl:o.iconUrl,url:o.url,articleId:o.articleId,bannerUrl:o.bannerUrl,buttonText:o.buttonText,primaryLabel:null==(t=o.estimateLabel)?void 0:t.primaryLabel,secondaryLabel:null==(r=o.estimateLabel)?void 0:r.secondaryLabel,isFeatured:null==(n=o.category)?void 0:n.isFeatured};p({...s}),i(o.activityType),a(o.category??{id:ei,title:ei})}}),[e]);const g=oe((()=>{p({...ni}),i(ge.Article),a({id:ei,title:ei})}),[]),b=oe((()=>{let e=!0;for(const t of h){const r=u[t.name];!t.isRequired||"text"!==t.type||r&&""!==r.toString().trim()||(f(`${t.label} is required.`,"error"),e=!1)}return e}),[f,h,u]),y=async()=>{const{url:e,articleId:r,bannerUrl:i,buttonText:a,primaryLabel:s,secondaryLabel:l,isFeatured:c}=u,d={...u,activityType:n,calculationType:_e(n,o.title),enabled:!1,savingsInCents:0,configurationTags:xe(o.title),tags:ve(o.title),estimateLabel:s?{primaryLabel:s,secondaryLabel:l}:void 0,url:e||void 0,articleId:r||void 0,bannerUrl:i||void 0,buttonText:a||void 0};let p;o.title!==ei&&(p=t.find((e=>e.id===o.id)));try{await m({type:"createActivity",activity:d,selectedCategory:p,isFeaturedActivity:c}),f("Activity successfully created.","success"),g()}catch(h){throw f(`Error creating activity: ${h}`,"error"),h}},w=async e=>{const{primaryLabel:r,secondaryLabel:n,isFeatured:i}=u,a={...e,...u,estimateLabel:r?{primaryLabel:r,secondaryLabel:n}:void 0};let s;o.title!==ei&&(s=t.find((e=>e.id===o.id)));try{await m({type:"updateActivity",activityId:e.id,activity:a,selectedCategory:s,isFeaturedActivity:i}),f("Activity successfully updated.","success")}catch(l){throw f(`Error updating activity: ${l}`,"error"),l}};return{isSubmitting:c,messages:s,formData:u,selectedActivityType:n,currentFormFields:h,selectedCategory:o,setMessages:l,handleSubmit:async t=>{if(t.preventDefault(),d(!0),l([]),b())try{"create"===e.mode?await y():"update"===e.mode&&await w(e.initialActivity),r()}finally{d(!1)}else d(!1)},handleInputChange:e=>{const t=e.target,{name:r,value:n,type:i}=t;p((e=>({...e,[r]:"checkbox"===i?t.checked:"number"===i?Number(n):n})))},handleActivityTypeChange:e=>{const t=e.target;i(t.value)},handleCategoryChange:e=>{const r=e.target.value;if(r===ei)a({id:ei,title:ei});else{const e=t.find((e=>e.id===r));e&&a({id:e.id,title:e.title})}}}})(e,t,r),m="create"===e.mode?"New Benefits Plan Activities":"Update Benefits Plan Activities";return he(ln,{title:m,children:he("form",{onSubmit:c,children:[he("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline mt-8",children:[he("label",{className:"sm:col-start-1",children:"Type"}),he("select",{className:"sm:col-start-2 sm:col-span-2 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:a,disabled:"update"===e.mode,onChange:u,children:Object.values(ge).map((e=>he("option",{value:e,children:e},e)))})]}),he("div",{className:"sm:grid sm:grid-cols-3 sm:items-baseline sm:gap-10 mt-8 sm:ml-12",children:[he("label",{className:"sm:col-start-1",children:"Category"}),he("select",{className:"sm:col-start-2 sm:col-span-3 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:l.id,disabled:"update"===e.mode,onChange:p,children:[he("option",{value:ei,children:ei}),t.map((e=>he("option",{value:e.id,children:e.title},e.id)))]}),he(cn,{formMode:e,formFields:s,formData:o,isSubmitting:n,messages:i,categoryId:l.id,handleInputChange:d})]})]})})},oi=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Subtitle",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 2xl:table-cell"},{name:"Type",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 xl:table-cell"},{name:"Points",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Category",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],ai="All",si=({categories:e,onChange:t})=>{const[r,n]=te(null),[i,o]=te({mode:"view"}),[a,s]=te({id:ai,title:ai}),[l,c]=te([]),{isLoading:d,activities:u,isModalOpen:p,loadActivities:m,handleAction:h,handleModalConfirm:f,handleModalCancel:g}=Xn();re((()=>{(async()=>{try{await m(e)}catch(t){n(`${t}`)}})()}),[e,m]),re((()=>{c(a.title===ai?u:u.filter((e=>{var t;return(null==(t=e.category)?void 0:t.id)===a.id})))}),[u,a]);const b=he("div",{className:"flex items-center space-x-2 mt-4",children:[he(Gn,{}),he("select",{className:"focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:a.id,onChange:t=>{const r=t.target.value;if(r===ai)s({id:ai,title:ai});else{const t=e.find((e=>e.id===r));t&&s({id:t.id,title:t.title})}},children:[he("option",{value:ai,children:ai}),e.map((e=>he("option",{value:e.id,children:e.title},e.id)))]})]});return he(y,{children:["view"===i.mode&&he(y,{children:[d&&he("p",{className:"p-5",children:"Loading..."}),!d&&he(qn,{error:r,isModalOpen:p,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this activity in the app?",tableHeaders:oi,headingText:"Benefits Plan Activities",buttonText:"New Activity",filterElement:b,onModalConfirm:async()=>{try{await f(),t()}catch(e){n(`${e}`)}},handleModalCancel:g,renderTableRows:()=>he(y,{children:l.map((e=>{var t;return he("tr",{className:"divide-x divide-gray-200",children:[he("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:e.id}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 xl:table-cell",children:he("span",{className:"flex justify-center",children:he("img",{src:e.iconUrl,alt:e.title,className:"h-8 w-8"})})}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:we(e.title)}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 2xl:table-cell",children:we(e.description)}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 xl:table-cell",children:e.activityType}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.points}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:(null==(t=e.category)?void 0:t.title)??"None"}),he("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.enabled?"Yes":"No"}),he("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:he("div",{className:"flex justify-center",children:he("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{o({mode:"update",itemId:e.id})},children:"Edit"})})}),he("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:he("div",{className:"flex justify-center",children:he("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>h({type:"updateVisibility",activityId:e.id}),children:e.enabled?"Disable":"Enable"})})})]},e.id)}))}),onCreateButton:()=>o({mode:"create"})})]}),"view"!==i.mode&&he($n,{onClick:()=>{o({mode:"view"})},children:he(ii,{categories:e,formMode:"create"===i.mode?{mode:"create"}:{mode:"update",initialActivity:u.find((e=>e.id===i.itemId))},onChange:t})})]})};var li=(e=>(e.Categories="Categories",e.Activities="Activities",e))(li||{});const ci=()=>{const[e,t]=te("Categories"),[r,n]=te([]),[i,o]=te(!1),[a,s]=te(null),l=oe((t=>t===e),[e]),c=oe((async()=>{o(!0),s(null);try{const e=(await(async()=>{if(!Gr)throw new Error("Api has not been initialized");return(await Gr.get("/_admin/v1.0/categories")).data})()).categories.sort(((e,t)=>e.displayOrder-t.displayOrder));n(e)}catch(e){console.error(e),s("Failed to load categories.")}finally{o(!1)}}),[]);re((()=>{c()}),[c]);const d=async()=>{await c()};return he(y,{children:[he(fe,{tabTitles:Object.entries(li).map((([,e])=>e)),currentTab:e,onChange:t}),i&&he("p",{className:"p-5",children:"Loading..."}),a&&he("div",{className:"p-4 text-red-700",children:a}),!i&&he(y,{children:[he(Kn,{visible:l("Categories"),children:he(Jn,{categories:r,onChange:d})}),he(Kn,{visible:l("Activities"),children:he(si,{categories:r,onChange:d})})]})]})};var di=(e=>(e.EmailAddress="EmailAddress",e.MobileNumber="MobileNumber",e.CustomerId="CustomerId",e))(di||{});const ui=[{searchType:"EmailAddress",name:"Email Address",label:"emailAddress"},{searchType:"MobileNumber",name:"Mobile Number",label:"mobileNumber"},{searchType:"CustomerId",name:"PBA Customer Id",label:"customerId"}];var pi=(e=>(e.Established="Established",e.Unestablished="Unestablished",e))(pi||{});const mi=e=>!!/\+\d{1,14}$/.test(e),hi=()=>{const[e,t]=te([]),[r,n]=te(!1),[i,o]=te(""),[a,s]=te(!1),[l,c]=te(!1),d=ne(),u=ne(),p=ne({searchType:di.MobileNumber,searchValue:""}),m=oe((async(e,r)=>{let i;if(p.current={searchType:e,searchValue:r},n(!0),s(!1),o(""),e===di.EmailAddress)i=(async e=>{if(!Jr)throw new Error("Api has not been initialized");const t=(e=>({emailAddress:e}))(e);return(await Jr.post("/_admin/v1.0/customers/emailAddress",JSON.stringify(t))).data})(r);else if(e===di.MobileNumber)i=(async e=>{if(!Jr)throw new Error("Api has not been initialized");const t={mobileNumber:e},r=[],n=await Jr.post("/_admin/v1.0/customer/mobileNumber",JSON.stringify(t));return r.push(n.data),r})(r);else{if(e!==di.CustomerId)return n(!1),void o("Invalid search type.");i=(async e=>{if(!Jr)throw new Error("Api has not been initialized");const t=[],r=await Jr.get(`/_admin/v1.0/customer/${e}`);return t.push(r.data),t})(r)}i.then((e=>{t(e),n(!1),e.length>0?(d.current=e[0].id,s(!0)):o("No results found!")})).catch((()=>{o("Error: Unable to Retrieve Customer Information."),n(!1)}))}),[]),h=async(e,t)=>{d.current&&await(async(e,t,r)=>{if(!Kr)throw new Error("Api has not been initialized");const n={mobileNumber:t,reason:r};await Kr.put(`/_admin/v1.0/customers/${e}/mobileNumber`,JSON.stringify(n))})(d.current,e,t)};return{searchFilter:p,searchCustomerResult:e,isLoading:r,isModalOpen:l,error:i,showCustomerDetails:a,searchCustomer:m,handleAction:async t=>{const{action:r}=t;switch(r){case"workplaceUnlink":await(async t=>{e.find((e=>e.apolloProfiles.find((e=>e.profileId===t&&e.status===pi.Established))))&&(c(!0),u.current=t)})(t.profileId);break;case"updateMobileNumber":await h(t.mobileNumber,t.reason);break;default:console.error(`Unhandled action type: ${r}`)}},handleModalConfirm:async()=>{u.current&&(async e=>{if(!Jr)throw new Error("Api has not been initialized");await Jr.put(`/_admin/v1.0/workplace-link/${e}/unestablish`)})(u.current).then((async()=>{await(async()=>{await m(p.current.searchType,p.current.searchValue)})()})).catch((()=>{o("Error: Unable to Unlink Profile.")})).finally((()=>{c(!1)}))},handleModalCancel:async()=>{c(!1)}}},fi=()=>{const[e,t]=te(di.MobileNumber),[r,n]=te(""),[i,o]=te({emailAddress:"",mobileNumber:"",customerId:""}),a=oe((()=>{o({emailAddress:"",mobileNumber:"",customerId:""})}),[]),s=oe((e=>!!mi(e)||(o((e=>({...e,mobileNumber:"Invalid Mobile Number!"}))),!1)),[]),l=oe(((e,t)=>{if(e.trim())return!0;const{label:r,name:n}=(e=>{const t=ui.find((t=>di[t.searchType]===di[e]));return t?{name:t.name,label:t.label}:{name:"",label:""}})(t),i=`Empty ${n}`;return o((e=>({...e,[r]:i}))),!1}),[]);return{searchType:e,searchValue:r,errors:i,setSearchType:t,setSearchValue:n,clearErrors:a,isValidSearch:oe(((e,t)=>{switch(e){case di.EmailAddress:case di.CustomerId:return l(t,e);case di.MobileNumber:return s(t);default:return!1}}),[l,s])}},gi=({labelText:e,name:t,type:r,value:n,pattern:i,className:o,allowedKeyPattern:a,required:s,onClick:l,onChange:c,...d})=>{const u=oe((e=>{a&&!a.test(e.key)&&e.preventDefault()}),[a]);return he(y,{children:[e&&he("label",{className:"block text-sm font-bold text-gray-700",children:e}),he("input",{required:s??!1,className:`block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm ${o}`,name:t,type:r,value:n,onKeyPress:u,pattern:i,onClick:l,onChange:c,...d})]})},bi=({message:e,className:t,onClick:r})=>he("div",{className:t,onClick:r,children:e}),yi=e=>{const{searchType:t,searchValue:r,errors:n,setSearchType:i,setSearchValue:o,clearErrors:a,isValidSearch:s}=fi(),[l,c]=te(!0),d=()=>{a(),c(!1)},u=e=>{const t=e.currentTarget;c(!1),o(t.value),a()};return he(y,{children:he("div",{className:"flex flex-col p-2",children:[he("label",{className:"block text-sm font-bold text-gray-700",children:"Search for PBA Customer with Email Address, Mobile Number or CustomerId :"}),he("form",{className:"w-1/3",onSubmit:n=>{n.preventDefault(),s(t,r)&&(c(!0),e.onSubmit(t,r))},children:[he("select",{className:"mt-2 block sm:w-1/2 rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-indigo-600 text-sm leading-6",name:"searchType",id:"searchtype",value:t,onChange:e=>{a();const t=e.currentTarget.value;i(t),o("")},"data-testid":"select",children:ui.map((e=>he("option",{value:e.searchType,children:e.name},e.searchType)))}),he("div",{className:"sm:flex justify-between sm:mt-6 mt-2",children:[t===di.EmailAddress&&he(gi,{labelText:"Email Address",name:"emailAddress",placeholder:"users@email.com",type:"text",value:r,className:"sm:w-3/5",onClick:d,onChange:u}),t===di.MobileNumber&&he(gi,{allowedKeyPattern:/[0-9+]/,labelText:"Mobile Number",name:"mobileNumber",placeholder:"+619999999999",type:"tel",value:r,className:"sm:w-3/5",onClick:d,onChange:u}),t===di.CustomerId&&he(gi,{labelText:"PBA Customer Id",name:"customerId",placeholder:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",type:"text",value:r,className:"sm:w-3/5",onClick:d,onChange:u})]}),he("div",{className:"mt-2",children:Object.values(n).map(((e,t)=>he(bi,{message:e,className:"text-sm text-red-600 sm:text-right"},t)))}),he("div",{className:"sm:flex justify-end sm:mt-6",children:he("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none "+(l?"bg-gray-400 cursor-not-allowed":""),disabled:l,children:"Search"})})]})]})})},wi=e=>g("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),_i=e=>g("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})),vi=e=>g("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})),xi=e=>g("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",...e},g("path",{d:"M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z"})),ki=e=>{var t,r,n,i,o,a;const[s,l]=te(e.data.apolloProfiles.length>0),c=e.data.apolloProfiles.length>0,d=ie((()=>e.data.apolloProfiles.slice().sort(((e,t)=>{const r=e.status.localeCompare(t.status);return 0!==r?r:e.profileId.localeCompare(t.profileId)}))),[e.data.apolloProfiles]);return he(y,{children:[he("tr",{className:"divide-x divide-gray-200",children:[he("td",{className:"whitespace-nowrap px-2 text-sm",children:he("span",{onClick:()=>{c&&l(!s)},children:[!c&&he(vi,{className:"h-6 w-6 border-0"}),c&&he((()=>he(y,{children:he(s?_i:wi,{className:"h-6 w-6 border-0 cursor-pointer"})})),{})]})}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.id}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(t=e.data.name)?void 0:t.firstName}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(r=e.data.name)?void 0:r.lastName}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(n=e.data.email)?void 0:n.value}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.mobileNumber}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(i=e.data.kyc)?void 0:i.address.countryCode}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(o=e.data.kyc)?void 0:o.address.state}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(a=e.data.kyc)?void 0:a.dateOfBirth.substring(0,10)}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?"True":"False"})]},e.key),s&&he(y,{children:he("tr",{className:"divide-x divide-gray-200",children:he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",colspan:10,children:[he("label",{className:"block text-sm font-bold text-gray-700",children:"Apollo Profiles"}),he("div",{className:"-mx-4 mt-4 overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:-mx-6 md:mx-0 md:rounded-lg",children:he("table",{className:"min-w-full divide-y divide-gray-500",children:[he("thead",{className:"bg-gray-50",children:he("tr",{className:"divide-x divide-gray-200",children:[he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Profile ID"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account ID"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Status"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account Name"}),he("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:he("span",{className:"sr-only",children:"Action"})})]})}),he("tbody",{className:"divide-y divide-gray-200 bg-white",children:d.map(((t,r)=>he("tr",{className:"divide-x divide-gray-200",children:[he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.profileId}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.accountId}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.status}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.accountName}),he("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:[he("span",{onClick:()=>e.onAction({action:"workplaceUnlink",profileId:t.profileId}),children:he(xi,{className:"h-6 w-6 border-0 "+(t.status===pi.Established?"cursor-pointer":"cursor-not-allowed opacity-50")})})," "]})]},r)))})]})})]})})})]})},Ni=e=>he("div",{className:"-mx-4 mt-8 sm:-mx-4",children:he("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:he("table",{className:"min-w-full divide-y divide-gray-500",children:[he("thead",{className:"bg-gray-50",children:he("tr",{className:"divide-x divide-gray-200",children:[he("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:he("span",{className:"sr-only",children:"Action"})}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Customer ID"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"First Name"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Last Name"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Email"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Mobile"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Country Code"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"State"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"DOB"}),he("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"KYC Check"})]})}),he("tbody",{className:"divide-y divide-gray-200 bg-white",children:e.data.map(((t,r)=>he(ki,{title:"Apollo Profiles",data:t,onAction:e.onAction},r)))})]})})}),Ci=e=>{const{mobileNumber:t,reason:r,isCustomerIdentityVerified:n,messages:i,isSubmitting:o,setMobileNumber:a,setReason:s,setIsVerifiedCustomerIdentity:l,clearMessages:c,handleSubmit:d}=(e=>{const[t,r]=te(""),[n,i]=te(!1),[o,a]=te(""),[s,l]=te([]),[c,d]=te(!1),u=oe((()=>{l([])}),[]),p=oe((()=>{i(!1),a("")}),[]),m=oe(((e,t)=>{l((r=>[...r,{text:e,type:t}]))}),[]),h=oe((()=>!!mi(t)||(m("Invalid Mobile Number!","error"),!1)),[t,m]),f=oe((()=>!!o.trim()||(m("Reason cannot be empty.","error"),!1)),[o,m]),g=oe((e=>{var t,r;if(e instanceof Ur){const n=(null==(r=null==(t=e.response)?void 0:t.data)?void 0:r.message)||"Failed to update mobile number.";m(n,"error")}else m("An unexpected error occurred.","error")}),[m]),b=oe((async()=>{if(u(),h()&&f()&&n){d(!0);try{await e({action:"updateMobileNumber",mobileNumber:t,reason:o}),m("Mobile Number Updated.","success"),p()}catch(r){g(r)}finally{d(!1)}}}),[n,t,o,m,p,u,g,h,f,e]);return{mobileNumber:t,reason:o,isCustomerIdentityVerified:n,messages:s,isSubmitting:c,setIsSubmitting:d,setMobileNumber:r,setReason:a,setIsVerifiedCustomerIdentity:i,clearMessages:u,handleSubmit:b}})(e.onSubmit);return he(y,{children:he("div",{className:"flex flex-row",children:he("div",{className:"w-3/4 mt-9 ml-4",children:he("form",{onSubmit:async e=>{e.preventDefault(),await d()},children:[he("label",{className:"block text-sm font-bold text-gray-700",children:"Update Mobile Number:"}),he("div",{className:"sm:grid sm:grid-cols-6 sm:items-baseline sm:gap-4 mt-4",children:[he("label",{className:"col-start-1 block text-sm font-bold text-gray-700",children:"New Mobile Number"}),he("div",{className:"sm:col-start-2",children:he(gi,{allowedKeyPattern:/[0-9+]/,name:"newMobileNumber",placeholder:"",type:"tel",value:t,className:"w-full",onClick:c,pattern:"[0-9+]*",onChange:e=>{const t=e.currentTarget;a(t.value),c()}})}),he("div",{className:"col-start-4 col-span-3 row-span-3 flex-col text-left",children:i.map(((e,t)=>he(bi,{message:e.text,className:"text-sm text-left font-semibold "+("error"===e.type?"text-red-600":"text-green-600")},t)))}),he("div",{className:"col-start-2 col-span-2 relative flex items-start",children:[he("div",{className:"flex h-6 items-center",children:he("input",{id:"verifiedCheckbox","aria-describedby":"verified-customer-identity",name:"verifiedCheckbox",type:"checkbox",checked:n,onChange:e=>{const t=e.currentTarget;l(t.checked),c()},className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",required:!0})}),he("div",{className:"ml-2 text-sm leading-6",children:he("label",{className:"font-medium text-gray-900",children:"Verified Customer Identity"})})]}),he("div",{className:"col-start-2",children:he(gi,{name:"reason",placeholder:"Zendesk Ticket ID",type:"text",value:r,className:"w-full",onClick:c,onChange:e=>{const t=e.currentTarget;s(t.value),c()}})}),he("div",{className:"sm:row-start-1 sm:col-start-3 sm:flex sm:justify-center sm:mt-0 mt-2",children:he("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",disabled:o,children:"Update"})})]})]})})})})},Ei=()=>{const{searchCustomerResult:e,isLoading:t,error:r,showCustomerDetails:n,isModalOpen:i,searchFilter:o,searchCustomer:a,handleAction:s,handleModalConfirm:l,handleModalCancel:c}=hi();return he(y,{children:[he(yi,{onSubmit:a}),t&&he("p",{children:"Loading..."}),he("div",{className:"p-4 mt-2 text-red-700",children:r}),!t&&n&&he(y,{children:[he(Ni,{data:e,onAction:s}),o.current.searchType!==di.EmailAddress&&he(Ci,{onSubmit:s})]}),he(Bn,{isOpen:i,heading:"Warning",message:"Are you sure you want to remove workplace access?",onConfirm:l,onCancel:c})]})};var Ai=(e=>(e.Search="Search",e.BenefitsPlan="Benefits Plan",e))(Ai||{});function Si(){return(Si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var Ti=["context","children"];function Oi(e){return this.getChildContext=function(){return e.context},F(e.children,function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,Ti))}function Ri(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=g(Oi,Si({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],i={},o=0,a=t.attributes,s=t.childNodes;for(o=a.length;o--;)"slot"!==a[o].name&&(i[a[o].name]=a[o].value,i[Ui(a[o].name)]=a[o].value);for(o=s.length;o--;){var l=e(s[o],null),c=s[o].slot;c?i[c]=g(Li,{name:c},l):n[o]=l}var d=r?g(Li,null,n):n;return g(r||t.nodeName.toLowerCase(),i,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?M:I)(this._vdom,this._root)}function Ui(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Pi(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[Ui(e)]=r,this._vdom=F(this._vdom,n),I(this._vdom,this._root)}}function ji(){I(this._vdom=null,this._root)}function Li(e,t){var r=this;return g("slot",Si({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}!function(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=Ri,i.prototype.attributeChangedCallback=Pi,i.prototype.disconnectedCallback=ji,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t,i)}((e=>{const t={backendUrl:e["backend-url"],accessToken:e["access-token"]};re((()=>{Xr(t.backendUrl,t.accessToken,"customer-profile"),Xr(t.backendUrl,t.accessToken,"flare-app-identity"),Xr(t.backendUrl,t.accessToken,"benefits-plan")}),[t.backendUrl,t.accessToken]);const[r,n]=te("Search"),i=oe((e=>e===r),[r]);return he(y,{children:[he("style",{children:D.toString()}),he(fe,{tabTitles:Object.entries(Ai).map((([,e])=>e)),currentTab:r,onChange:n}),he(Kn,{visible:i("Search"),children:he(Ei,{})}),he(Kn,{visible:i("Benefits Plan"),children:he(ci,{})})]})}),"superhero-pba-support-admin",["backend-url","access-token"]);
1
+ !function(){"use strict";var t,e,n,i,r,o,s,a,l,c,d,u={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function f(t,e){for(var n in e)t[n]=e[n];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function y(e,n,i){var r,o,s,a={};for(s in n)"key"==s?r=n[s]:"ref"==s?o=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?t.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return v(e,a,r,o,null)}function v(t,i,r,o,s){var a={type:t,props:i,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++n:s,__i:-1,__u:0};return null==s&&null!=e.vnode&&e.vnode(a),a}function b(t){return t.children}function w(t,e){this.props=t,this.context=e}function x(t,e){if(null==e)return t.__?x(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?x(t):null}function _(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return _(t)}}function k(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!T.__r++||r!==e.debounceRendering)&&((r=e.debounceRendering)||o)(T)}function T(){var t,n,r,o,a,l,c,d;for(i.sort(s);t=i.shift();)t.__d&&(n=i.length,o=void 0,l=(a=(r=t).__v).__e,c=[],d=[],r.__P&&((o=f({},a)).__v=a.__v+1,e.vnode&&e.vnode(o),M(r.__P,o,a,r.__n,r.__P.namespaceURI,32&a.__u?[l]:null,c,null==l?x(a):l,!!(32&a.__u),d),o.__v=a.__v,o.__.__k[o.__i]=o,O(c,o,d),o.__e!=l&&_(o)),i.length>n&&i.sort(s));T.__r=0}function S(t,e,n,i,r,o,s,a,l,c,d){var p,f,g,y,w,_=i&&i.__k||h,k=e.length;for(n.__d=l,function(t,e,n){var i,r,o,s,a,l=e.length,c=n.length,d=c,u=0;for(t.__k=[],i=0;i<l;i++)s=i+u,null!=(r=t.__k[i]=null==(r=e[i])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?v(null,r,null,null,null):m(r)?v(b,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?v(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=t,r.__b=t.__b+1,a=C(r,n,s,d),r.__i=a,o=null,-1!==a&&(d--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&u--,"function"!=typeof r.type&&(r.__u|=65536)):a!==s&&(a===s+1?u++:a>s?d>l-s?u+=a-s:u--:a<s?a==s-1&&(u=a-s):u=0,a!==i+u&&(r.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=x(o)),L(o,o,!1),n[s]=null,d--);if(d)for(i=0;i<c;i++)null!=(o=n[i])&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=x(o)),L(o,o))}(n,e,_),l=n.__d,p=0;p<k;p++)null!=(g=n.__k[p])&&"boolean"!=typeof g&&"function"!=typeof g&&(f=-1===g.__i?u:_[g.__i]||u,g.__i=p,M(t,g,f,r,o,s,a,l,c,d),y=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&D(f.ref,null,g),d.push(g.ref,g.__c||y,g)),null==w&&null!=y&&(w=y),65536&g.__u||f.__k===g.__k?(l&&!l.isConnected&&(l=x(f)),l=A(g,l,t)):"function"==typeof g.type&&void 0!==g.__d?l=g.__d:y&&(l=y.nextSibling),g.__d=void 0,g.__u&=-196609);n.__d=l,n.__e=w}function A(t,e,n){var i,r;if("function"==typeof t.type){for(i=t.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=t,e=A(i[r],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function P(t,e){return e=e||[],null==t||"boolean"==typeof t||(m(t)?t.some((function(t){P(t,e)})):e.push(t)),e}function C(t,e,n,i){var r=t.key,o=t.type,s=n-1,a=n+1,l=e[n];if(null===l||l&&r==l.key&&o===l.type&&!(131072&l.__u))return n;if(i>(null==l||131072&l.__u?0:1))for(;s>=0||a<e.length;){if(s>=0){if((l=e[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a<e.length){if((l=e[a])&&!(131072&l.__u)&&r==l.key&&o===l.type)return a;a++}}return-1}function E(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function N(t,e,n,i,r){var o;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||E(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||E(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?i?n.u=i.u:(n.u=a,t.addEventListener(e,o?c:l,o)):t.removeEventListener(e,o?c:l,o);else{if("http://www.w3.org/2000/svg"==r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function R(t){return function(n){if(this.l){var i=this.l[n.type+t];if(null==n.t)n.t=a++;else if(n.t<i.u)return;return i(e.event?e.event(n):n)}}}function M(n,i,r,o,s,a,l,c,d,h){var p,y,v,_,k,T,A,P,C,E,R,M,O,D,L,V=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(d=!!(32&r.__u),a=[c=i.__e=r.__e]),(p=e.__b)&&p(i);t:if("function"==typeof V)try{if(P=i.props,C=(p=V.contextType)&&o[p.__c],E=p?C?C.props.value:p.__:o,r.__c?A=(y=i.__c=r.__c).__=y.__E:("prototype"in V&&V.prototype.render?i.__c=y=new V(P,E):(i.__c=y=new w(P,E),y.constructor=V,y.render=j),C&&C.sub(y),y.props=P,y.state||(y.state={}),y.context=E,y.__n=o,v=y.__d=!0,y.__h=[],y._sb=[]),null==y.__s&&(y.__s=y.state),null!=V.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=f({},y.__s)),f(y.__s,V.getDerivedStateFromProps(P,y.__s))),_=y.props,k=y.state,y.__v=i,v)null==V.getDerivedStateFromProps&&null!=y.componentWillMount&&y.componentWillMount(),null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(null==V.getDerivedStateFromProps&&P!==_&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(P,E),!y.__e&&(null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(P,y.__s,E)||i.__v===r.__v)){for(i.__v!==r.__v&&(y.props=P,y.state=y.__s,y.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.forEach((function(t){t&&(t.__=i)})),R=0;R<y._sb.length;R++)y.__h.push(y._sb[R]);y._sb=[],y.__h.length&&l.push(y);break t}null!=y.componentWillUpdate&&y.componentWillUpdate(P,y.__s,E),null!=y.componentDidUpdate&&y.__h.push((function(){y.componentDidUpdate(_,k,T)}))}if(y.context=E,y.props=P,y.__P=n,y.__e=!1,M=e.__r,O=0,"prototype"in V&&V.prototype.render){for(y.state=y.__s,y.__d=!1,M&&M(i),p=y.render(y.props,y.state,y.context),D=0;D<y._sb.length;D++)y.__h.push(y._sb[D]);y._sb=[]}else do{y.__d=!1,M&&M(i),p=y.render(y.props,y.state,y.context),y.state=y.__s}while(y.__d&&++O<25);y.state=y.__s,null!=y.getChildContext&&(o=f(f({},o),y.getChildContext())),v||null==y.getSnapshotBeforeUpdate||(T=y.getSnapshotBeforeUpdate(_,k)),S(n,m(L=null!=p&&p.type===b&&null==p.key?p.props.children:p)?L:[L],i,r,o,s,a,l,c,d,h),y.base=i.__e,i.__u&=-161,y.__h.length&&l.push(y),A&&(y.__E=y.__=null)}catch(F){i.__v=null,d||null!=a?(i.__e=c,i.__u|=d?160:32,a[a.indexOf(c)]=null):(i.__e=r.__e,i.__k=r.__k),e.__e(F,i,r)}else null==a&&i.__v===r.__v?(i.__k=r.__k,i.__e=r.__e):i.__e=function(e,n,i,r,o,s,a,l,c){var d,h,p,f,y,v,b,w=i.props,_=n.props,k=n.type;if("svg"===k?o="http://www.w3.org/2000/svg":"math"===k?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=s)for(d=0;d<s.length;d++)if((y=s[d])&&"setAttribute"in y==!!k&&(k?y.localName===k:3===y.nodeType)){e=y,s[d]=null;break}if(null==e){if(null===k)return document.createTextNode(_);e=document.createElementNS(o,k,_.is&&_),s=null,l=!1}if(null===k)w===_||l&&e.data===_||(e.data=_);else{if(s=s&&t.call(e.childNodes),w=i.props||u,!l&&null!=s)for(w={},d=0;d<e.attributes.length;d++)w[(y=e.attributes[d]).name]=y.value;for(d in w)if(y=w[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=y;else if("key"!==d&&!(d in _)){if("value"==d&&"defaultValue"in _||"checked"==d&&"defaultChecked"in _)continue;N(e,d,null,y,o)}for(d in _)y=_[d],"children"==d?f=y:"dangerouslySetInnerHTML"==d?h=y:"value"==d?v=y:"checked"==d?b=y:"key"===d||l&&"function"!=typeof y||w[d]===y||N(e,d,y,w[d],o);if(h)l||p&&(h.__html===p.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(p&&(e.innerHTML=""),S(e,m(f)?f:[f],n,i,r,"foreignObject"===k?"http://www.w3.org/1999/xhtml":o,s,a,s?s[0]:i.__k&&x(i,0),l,c),null!=s)for(d=s.length;d--;)null!=s[d]&&g(s[d]);l||(d="value",void 0!==v&&(v!==e[d]||"progress"===k&&!v||"option"===k&&v!==w[d])&&N(e,d,v,w[d],o),d="checked",void 0!==b&&b!==e[d]&&N(e,d,b,w[d],o))}return e}(r.__e,i,r,o,s,a,l,d,h);(p=e.diffed)&&p(i)}function O(t,n,i){n.__d=void 0;for(var r=0;r<i.length;r++)D(i[r],i[++r],i[++r]);e.__c&&e.__c(n,t),t.some((function(n){try{t=n.__h,n.__h=[],t.some((function(t){t.call(n)}))}catch(i){e.__e(i,n.__v)}}))}function D(t,n,i){try{"function"==typeof t?t(n):t.current=n}catch(r){e.__e(r,i)}}function L(t,n,i){var r,o;if(e.unmount&&e.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||D(r,null,n)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){e.__e(s,n)}r.base=r.__P=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],n,i||"function"!=typeof t.type);i||null==t.__e||g(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function j(t,e,n){return this.constructor(t,n)}function V(n,i,r){var o,s,a,l;e.__&&e.__(n,i),s=(o="function"==typeof r)?null:r&&r.__k||i.__k,a=[],l=[],M(i,n=(!o&&r||i).__k=y(b,null,[n]),s||u,u,i.namespaceURI,!o&&r?[r]:s?null:i.firstChild?t.call(i.childNodes):null,a,!o&&r?r:s?s.__e:i.firstChild,o,l),O(a,n,l)}function F(t,e){V(t,e,F)}function B(e,n,i){var r,o,s,a,l=f({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)"key"==s?r=n[s]:"ref"==s?o=n[s]:l[s]=void 0===n[s]&&void 0!==a?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):i),v(e.type,l,r||e.key,o||e.ref,null)}function U(t,e){var n={__c:e="__cC"+d++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,k(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}t=h.slice,e={__e:function(t,e,n,i){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),s=r.__d),s)return r.__E=r}catch(a){t=a}throw t}},n=0,w.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof t&&(t=t(f({},n),this.props)),t&&f(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),k(this))},w.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},w.prototype.render=b,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(t,e){return t.__v.__b-e.__v.__b},T.__r=0,a=0,l=R(!1),c=R(!0),d=0;const I="*,: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;-o-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]){-webkit-text-decoration:underline dotted;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;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([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::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}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}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size=\"1\"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,: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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.z-10{z-index:10}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-4{grid-column-start:4}.row-span-3{grid-row:span 3 / span 3}.m-4{margin:1rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.ml-1{margin-left:.25rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mt-0{margin-top:0}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-9{margin-top:2.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.min-h-full{min-height:100%}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.w-1\\/4{width:25%}.w-12{width:3rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-normal{justify-content:normal}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.divide-gray-500>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(107 114 128 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-4{padding-bottom:1rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.tracking-wider{letter-spacing:.05em}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-900:hover{--tw-bg-opacity: 1;background-color:rgb(49 46 129 / var(--tw-bg-opacity))}.hover\\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:col-span-3{grid-column:span 3 / span 3}.sm\\:col-start-1{grid-column-start:1}.sm\\:col-start-2{grid-column-start:2}.sm\\:col-start-3{grid-column-start:3}.sm\\:col-start-4{grid-column-start:4}.sm\\:row-start-1{grid-row-start:1}.sm\\:-mx-4{margin-left:-1rem;margin-right:-1rem}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-12{margin-left:3rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:mt-6{margin-top:1.5rem}.sm\\:flex{display:flex}.sm\\:table-cell{display:table-cell}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-1\\/2{width:50%}.sm\\:w-10{width:2.5rem}.sm\\:w-3\\/5{width:60%}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:items-baseline{align-items:baseline}.sm\\:justify-center{justify-content:center}.sm\\:gap-10{gap:2.5rem}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:pr-6{padding-right:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-right{text-align:right}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:mx-0{margin-left:0;margin-right:0}.md\\:rounded-lg{border-radius:.5rem}}@media (min-width: 1024px){.lg\\:table-cell{display:table-cell}}@media (min-width: 1280px){.xl\\:table-cell{display:table-cell}}@media (min-width: 1536px){.\\32xl\\:table-cell{display:table-cell}}";var z,H,$,q,W=0,K=[],Y=[],X=e,G=X.__b,J=X.__r,Z=X.diffed,Q=X.__c,tt=X.unmount,et=X.__;function nt(t,e){X.__h&&X.__h(H,t,W||e),W=0;var n=H.__H||(H.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:Y}),n.__[t]}function it(t){return W=1,function(t,e,n){var i=nt(z++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):gt(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=H,!H.u)){var r=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return!!t.__c}));if(r.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var s=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&i.__c.props===t)&&(!o||o.call(this,t,e,n))};H.u=!0;var o=H.shouldComponentUpdate,s=H.componentWillUpdate;H.componentWillUpdate=function(t,e,n){if(this.__e){var i=o;o=void 0,r(t,e,n),o=i}s&&s.call(this,t,e,n)},H.shouldComponentUpdate=r}return i.__N||i.__}(gt,t)}function rt(t,e){var n=nt(z++,3);!X.__s&&ft(n.__H,e)&&(n.__=t,n.i=e,H.__H.__h.push(n))}function ot(t,e){var n=nt(z++,4);!X.__s&&ft(n.__H,e)&&(n.__=t,n.i=e,H.__h.push(n))}function st(t){return W=5,at((function(){return{current:t}}),[])}function at(t,e){var n=nt(z++,7);return ft(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function lt(t,e){return W=8,at((function(){return t}),e)}function ct(t){var e=H.context[t.__c],n=nt(z++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(H)),e.props.value):t.__}function dt(){for(var t;t=K.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(pt),t.__H.__h.forEach(mt),t.__H.__h=[]}catch(e){t.__H.__h=[],X.__e(e,t.__v)}}X.__b=function(t){H=null,G&&G(t)},X.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),et&&et(t,e)},X.__r=function(t){J&&J(t),z=0;var e=(H=t.__c).__H;e&&($===H?(e.__h=[],H.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=Y,t.__N=t.i=void 0}))):(e.__h.forEach(pt),e.__h.forEach(mt),e.__h=[],z=0)),$=H},X.diffed=function(t){Z&&Z(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==K.push(e)&&q===X.requestAnimationFrame||((q=X.requestAnimationFrame)||ht)(dt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==Y&&(t.__=t.__V),t.i=void 0,t.__V=Y}))),$=H=null},X.__c=function(t,e){e.some((function(t){try{t.__h.forEach(pt),t.__h=t.__h.filter((function(t){return!t.__||mt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],X.__e(n,t.__v)}})),Q&&Q(t,e)},X.unmount=function(t){tt&&tt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{pt(t)}catch(n){e=n}})),n.__H=void 0,e&&X.__e(e,n.__v))};var ut="function"==typeof requestAnimationFrame;function ht(t){var e,n=function(){clearTimeout(i),ut&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);ut&&(e=requestAnimationFrame(n))}function pt(t){var e=H,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),H=e}function mt(t){var e=H;t.__c=t.__(),H=e}function ft(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function gt(t,e){return"function"==typeof e?e(t):e}var yt=0;function vt(t,n,i,r,o,s){n||(n={});var a,l,c=n;if("ref"in c)for(l in c={},n)"ref"==l?a=n[l]:c[l]=n[l];var d={type:t,props:c,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--yt,__i:-1,__u:0,__source:o,__self:s};if("function"==typeof t&&(a=t.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return e.vnode&&e.vnode(d),d}const bt=function({tabTitles:t,currentTab:e,onChange:n}){const[i,r]=it(e),o=lt((t=>{r(t),n(t)}),[n]);return vt("div",{class:"border-b border-gray-200",children:vt("nav",{"aria-label":"Tabs",class:"flex space-x-8 ml-2",children:t.map((t=>vt("a",{class:"cursor-pointer border-transparent text-gray-500 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm "+(i===t?"border-b-2 border-indigo-500 text-indigo-600":"hover:text-gray-700 hover:border-gray-300 "),onClick:()=>o(t),children:t},t)))})})};var wt=(t=>(t.Assessment="Assessment",t.Quiz="Quiz",t.Poll="Poll",t.Trivia="Trivia",t.Article="Article",t.Url="Url",t.Contact="Contact",t.Deeplink="Deeplink",t.Advertisement="Advertisement",t))(wt||{}),xt=(t=>(t.Cars="Cars",t.Health="Health",t.Everyday="Everyday",t.Devices="Devices",t.Energy="Energy",t.SavingsAccount="Savings Account*",t.HomeLoan="Home Loan*",t.MobileAndInternet="Mobile & Internet",t))(xt||{});const _t=t=>{var e;const n=t,i=(null==(e=n.response)?void 0:e.data)?n.response.data:void 0;return(null==i?void 0:i.message)??n.message},kt=(t,e=3)=>{const n=t.split(" ");return n.length>e?`${n.slice(0,e).join(" ")}...`:t},Tt=(t,e)=>{switch(t){case wt.Trivia:return"Trivia";case wt.Assessment:switch(e){case xt.Cars:return"SalaryPackagingCars";case xt.HomeLoan:return"HomeLoan"}return e.replace(/\s+/g,"");default:return"None"}},St=t=>{switch(t){case xt.SavingsAccount:return["Banking"];case xt.Cars:return["Cars"];case xt.Devices:case xt.Health:case xt.Energy:case xt.Everyday:return[t];case"None":return["Miscellaneous"];case xt.HomeLoan:case xt.MobileAndInternet:default:return[]}},At=t=>{switch(t){case xt.Cars:return["NovatedLease"];case xt.Health:return["HealthInsurance"];case xt.SavingsAccount:return["SavingsAccount"];case xt.Devices:case xt.Energy:return[t];case xt.HomeLoan:return["HomeLoan"];case xt.MobileAndInternet:case xt.Everyday:default:return[]}},Pt=(t,e,n)=>{const i=t.products[0],r=Ct(t,e);r?r.isFeatured=n??!1:i.activities.push({id:e,isFeatured:n??!1})},Ct=(t,e)=>t.products[0].activities.find((t=>t.id===e));function Et(t,e){return function(){return t.apply(e,arguments)}}const{toString:Nt}=Object.prototype,{getPrototypeOf:Rt}=Object,Mt=(t=>e=>{const n=Nt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ot=t=>(t=t.toLowerCase(),e=>Mt(e)===t),Dt=t=>e=>typeof e===t,{isArray:Lt}=Array,jt=Dt("undefined");const Vt=Ot("ArrayBuffer");const Ft=Dt("string"),Bt=Dt("function"),Ut=Dt("number"),It=t=>null!==t&&"object"==typeof t,zt=t=>{if("object"!==Mt(t))return!1;const e=Rt(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},Ht=Ot("Date"),$t=Ot("File"),qt=Ot("Blob"),Wt=Ot("FileList"),Kt=Ot("URLSearchParams"),[Yt,Xt,Gt,Jt]=["ReadableStream","Request","Response","Headers"].map(Ot);function Zt(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let i,r;if("object"!=typeof t&&(t=[t]),Lt(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),o=r.length;let s;for(i=0;i<o;i++)s=r[i],e.call(null,t[s],s,t)}}function Qt(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ee=t=>!jt(t)&&t!==te;const ne=(t=>e=>t&&e instanceof t)("undefined"!=typeof Uint8Array&&Rt(Uint8Array)),ie=Ot("HTMLFormElement"),re=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),oe=Ot("RegExp"),se=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};Zt(n,((n,r)=>{let o;!1!==(o=e(n,r,t))&&(i[r]=o||n)})),Object.defineProperties(t,i)},ae="abcdefghijklmnopqrstuvwxyz",le="0123456789",ce={DIGIT:le,ALPHA:ae,ALPHA_DIGIT:ae+ae.toUpperCase()+le};const de=Ot("AsyncFunction"),ue=(he="function"==typeof setImmediate,pe=Bt(te.postMessage),he?setImmediate:pe?(me=`axios@${Math.random()}`,fe=[],te.addEventListener("message",(({source:t,data:e})=>{t===te&&e===me&&fe.length&&fe.shift()()}),!1),t=>{fe.push(t),te.postMessage(me,"*")}):t=>setTimeout(t));var he,pe,me,fe;const ge="undefined"!=typeof queueMicrotask?queueMicrotask.bind(te):"undefined"!=typeof process&&process.nextTick||ue,ye={isArray:Lt,isArrayBuffer:Vt,isBuffer:function(t){return null!==t&&!jt(t)&&null!==t.constructor&&!jt(t.constructor)&&Bt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||Bt(t.append)&&("formdata"===(e=Mt(t))||"object"===e&&Bt(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Vt(t.buffer),e},isString:Ft,isNumber:Ut,isBoolean:t=>!0===t||!1===t,isObject:It,isPlainObject:zt,isReadableStream:Yt,isRequest:Xt,isResponse:Gt,isHeaders:Jt,isUndefined:jt,isDate:Ht,isFile:$t,isBlob:qt,isRegExp:oe,isFunction:Bt,isStream:t=>It(t)&&Bt(t.pipe),isURLSearchParams:Kt,isTypedArray:ne,isFileList:Wt,forEach:Zt,merge:function t(){const{caseless:e}=ee(this)&&this||{},n={},i=(i,r)=>{const o=e&&Qt(n,r)||r;zt(n[o])&&zt(i)?n[o]=t(n[o],i):zt(i)?n[o]=t({},i):Lt(i)?n[o]=i.slice():n[o]=i};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Zt(arguments[r],i);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(Zt(e,((e,i)=>{n&&Bt(e)?t[i]=Et(e,n):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,o,s;const a={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)s=r[o],i&&!i(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&Rt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:Mt,kindOfTest:Ot,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},toArray:t=>{if(!t)return null;if(Lt(t))return t;let e=t.length;if(!Ut(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:ie,hasOwnProperty:re,hasOwnProp:re,reduceDescriptors:se,freezeMethods:t=>{se(t,((e,n)=>{if(Bt(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];Bt(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return Lt(t)?i(t):i(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:Qt,global:te,isContextDefined:ee,ALPHABET:ce,generateString:(t=16,e=ce.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n},isSpecCompliantForm:function(t){return!!(t&&Bt(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,i)=>{if(It(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=Lt(t)?[]:{};return Zt(t,((t,e)=>{const o=n(t,i+1);!jt(o)&&(r[e]=o)})),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:de,isThenable:t=>t&&(It(t)||Bt(t))&&Bt(t.then)&&Bt(t.catch),setImmediate:ue,asap:ge};function ve(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}ye.inherits(ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ye.toJSONObject(this.config),code:this.code,status:this.status}}});const be=ve.prototype,we={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{we[t]={value:t}})),Object.defineProperties(ve,we),Object.defineProperty(be,"isAxiosError",{value:!0}),ve.from=(t,e,n,i,r,o)=>{const s=Object.create(be);return ye.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ve.call(s,t.message,e,n,i,r),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};function xe(t){return ye.isPlainObject(t)||ye.isArray(t)}function _e(t){return ye.endsWith(t,"[]")?t.slice(0,-2):t}function ke(t,e,n){return t?t.concat(e).map((function(t,e){return t=_e(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Te=ye.toFlatObject(ye,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Se(t,e,n){if(!ye.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(n=ye.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ye.isUndefined(e[t])}))).metaTokens,r=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ye.isSpecCompliantForm(e);if(!ye.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(ye.isDate(t))return t.toISOString();if(!a&&ye.isBlob(t))throw new ve("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(t)||ye.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,r){let a=t;if(t&&!r&&"object"==typeof t)if(ye.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(ye.isArray(t)&&function(t){return ye.isArray(t)&&!t.some(xe)}(t)||(ye.isFileList(t)||ye.endsWith(n,"[]"))&&(a=ye.toArray(t)))return n=_e(n),a.forEach((function(t,i){!ye.isUndefined(t)&&null!==t&&e.append(!0===s?ke([n],i,o):null===s?n:n+"[]",l(t))})),!1;return!!xe(t)||(e.append(ke(r,n,o),l(t)),!1)}const d=[],u=Object.assign(Te,{defaultVisitor:c,convertValue:l,isVisitable:xe});if(!ye.isObject(t))throw new TypeError("data must be an object");return function t(n,i){if(!ye.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+i.join("."));d.push(n),ye.forEach(n,(function(n,o){!0===(!(ye.isUndefined(n)||null===n)&&r.call(e,n,ye.isString(o)?o.trim():o,i,u))&&t(n,i?i.concat(o):[o])})),d.pop()}}(t),e}function Ae(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Pe(t,e){this._pairs=[],t&&Se(t,this,e)}const Ce=Pe.prototype;function Ee(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ne(t,e,n){if(!e)return t;const i=n&&n.encode||Ee,r=n&&n.serialize;let o;if(o=r?r(e,n):ye.isURLSearchParams(e)?e.toString():new Pe(e,n).toString(i),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}Ce.append=function(t,e){this._pairs.push([t,e])},Ce.toString=function(t){const e=t?function(e){return t.call(this,e,Ae)}:Ae;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Re{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ye.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const Me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Pe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},De="undefined"!=typeof window&&"undefined"!=typeof document,Le="object"==typeof navigator&&navigator||void 0,je=De&&(!Le||["ReactNative","NativeScript","NS"].indexOf(Le.product)<0),Ve="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Fe=De&&window.location.href||"http://localhost",Be={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:De,hasStandardBrowserEnv:je,hasStandardBrowserWebWorkerEnv:Ve,navigator:Le,origin:Fe},Symbol.toStringTag,{value:"Module"})),...Oe};function Ue(t){function e(t,n,i,r){let o=t[r++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=r>=t.length;if(o=!o&&ye.isArray(i)?i.length:o,a)return ye.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s;i[o]&&ye.isObject(i[o])||(i[o]=[]);return e(t,n,i[o],r)&&ye.isArray(i[o])&&(i[o]=function(t){const e={},n=Object.keys(t);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],e[o]=t[o];return e}(i[o])),!s}if(ye.isFormData(t)&&ye.isFunction(t.entries)){const n={};return ye.forEachEntry(t,((t,i)=>{e(function(t){return ye.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,n,0)})),n}return null}const Ie={transitional:Me,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=ye.isObject(t);r&&ye.isHTMLForm(t)&&(t=new FormData(t));if(ye.isFormData(t))return i?JSON.stringify(Ue(t)):t;if(ye.isArrayBuffer(t)||ye.isBuffer(t)||ye.isStream(t)||ye.isFile(t)||ye.isBlob(t)||ye.isReadableStream(t))return t;if(ye.isArrayBufferView(t))return t.buffer;if(ye.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Se(t,new Be.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return Be.isNode&&ye.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=ye.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Se(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),function(t,e,n){if(ye.isString(t))try{return(e||JSON.parse)(t),ye.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Ie.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(ye.isResponse(t)||ye.isReadableStream(t))return t;if(t&&ye.isString(t)&&(n&&!this.responseType||i)){const n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(r){if(n){if("SyntaxError"===r.name)throw ve.from(r,ve.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],(t=>{Ie.headers[t]={}}));const ze=ye.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),He=Symbol("internals");function $e(t){return t&&String(t).trim().toLowerCase()}function qe(t){return!1===t||null==t?t:ye.isArray(t)?t.map(qe):String(t)}function We(t,e,n,i,r){return ye.isFunction(i)?i.call(this,e,n):(r&&(e=n),ye.isString(e)?ye.isString(i)?-1!==e.indexOf(i):ye.isRegExp(i)?i.test(e):void 0:void 0)}let Ke=class{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=$e(e);if(!r)throw new Error("header name must be a non-empty string");const o=ye.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||e]=qe(t))}const o=(t,e)=>ye.forEach(t,((t,n)=>r(t,n,e)));if(ye.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(ye.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&ze[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e})(t),e);else if(ye.isHeaders(t))for(const[s,a]of t.entries())r(a,s,n);else null!=t&&r(e,t,n);return this}get(t,e){if(t=$e(t)){const n=ye.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}(t);if(ye.isFunction(e))return e.call(this,t,n);if(ye.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=$e(t)){const n=ye.findKey(this,t);return!(!n||void 0===this[n]||e&&!We(0,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=$e(t)){const r=ye.findKey(n,t);!r||e&&!We(0,n[r],r,e)||(delete n[r],i=!0)}}return ye.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];t&&!We(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return ye.forEach(this,((i,r)=>{const o=ye.findKey(n,r);if(o)return e[o]=qe(i),void delete e[r];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();s!==r&&delete e[r],e[s]=qe(i),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ye.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&ye.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[He]=this[He]={accessors:{}}).accessors,n=this.prototype;function i(t){const i=$e(t);e[i]||(!function(t,e){const n=ye.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[i]=!0)}return ye.isArray(t)?t.forEach(i):i(t),this}};function Ye(t,e){const n=this||Ie,i=e||n,r=Ke.from(i.headers);let o=i.data;return ye.forEach(t,(function(t){o=t.call(n,o,r.normalize(),e?e.status:void 0)})),r.normalize(),o}function Xe(t){return!(!t||!t.__CANCEL__)}function Ge(t,e,n){ve.call(this,null==t?"canceled":t,ve.ERR_CANCELED,e,n),this.name="CanceledError"}function Je(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new ve("Request failed with status code "+n.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}Ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ye.reduceDescriptors(Ke.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),ye.freezeMethods(Ke),ye.inherits(Ge,ve,{__CANCEL__:!0});const Ze=(t,e,n=3)=>{let i=0;const r=function(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[s];r||(r=l),n[o]=a,i[o]=l;let d=s,u=0;for(;d!==o;)u+=n[d++],d%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-r<e)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return function(t,e){let n,i,r=0,o=1e3/e;const s=(e,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),a=e-r;a>=o?s(t,e):(n=t,i||(i=setTimeout((()=>{i=null,s(n)}),o-a)))},()=>n&&s(n)]}((n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-i,l=r(a);i=o;t({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:n,lengthComputable:null!=s,[e?"download":"upload"]:!0})}),n)},Qe=(t,e)=>{const n=null!=t;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},tn=t=>(...e)=>ye.asap((()=>t(...e))),en=Be.hasStandardBrowserEnv?function(){const t=Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=ye.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}(),nn=Be.hasStandardBrowserEnv?{write(t,e,n,i,r,o){const s=[t+"="+encodeURIComponent(e)];ye.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ye.isString(i)&&s.push("path="+i),ye.isString(r)&&s.push("domain="+r),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function rn(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const on=t=>t instanceof Ke?{...t}:t;function sn(t,e){e=e||{};const n={};function i(t,e,n){return ye.isPlainObject(t)&&ye.isPlainObject(e)?ye.merge.call({caseless:n},t,e):ye.isPlainObject(e)?ye.merge({},e):ye.isArray(e)?e.slice():e}function r(t,e,n){return ye.isUndefined(e)?ye.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function o(t,e){if(!ye.isUndefined(e))return i(void 0,e)}function s(t,e){return ye.isUndefined(e)?ye.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,o){return o in e?i(n,r):o in t?i(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>r(on(t),on(e),!0)};return ye.forEach(Object.keys(Object.assign({},t,e)),(function(i){const o=l[i]||r,s=o(t[i],e[i],i);ye.isUndefined(s)&&o!==a||(n[i]=s)})),n}const an=t=>{const e=sn({},t);let n,{data:i,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:l}=e;if(e.headers=a=Ke.from(a),e.url=Ne(rn(e.baseURL,e.url),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ye.isFormData(i))if(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(Be.hasStandardBrowserEnv&&(r&&ye.isFunction(r)&&(r=r(e)),r||!1!==r&&en(e.url))){const t=o&&s&&nn.read(s);t&&a.set(o,t)}return e},ln="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const i=an(t);let r=i.data;const o=Ke.from(i.headers).normalize();let s,a,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:p}=i;function m(){c&&c(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(s),i.signal&&i.signal.removeEventListener("abort",s)}let f=new XMLHttpRequest;function g(){if(!f)return;const i=Ke.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Je((function(t){e(t),m()}),(function(t){n(t),m()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:t,request:f}),f=null}f.open(i.method.toUpperCase(),i.url,!0),f.timeout=i.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(n(new ve("Request aborted",ve.ECONNABORTED,t,f)),f=null)},f.onerror=function(){n(new ve("Network Error",ve.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let e=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||Me;i.timeoutErrorMessage&&(e=i.timeoutErrorMessage),n(new ve(e,r.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,t,f)),f=null},void 0===r&&o.setContentType(null),"setRequestHeader"in f&&ye.forEach(o.toJSON(),(function(t,e){f.setRequestHeader(e,t)})),ye.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),u&&"json"!==u&&(f.responseType=i.responseType),p&&([l,d]=Ze(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=Ze(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(s=e=>{f&&(n(!e||e.type?new Ge(null,t,f):e),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(s),i.signal&&(i.signal.aborted?s():i.signal.addEventListener("abort",s)));const y=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(i.url);y&&-1===Be.protocols.indexOf(y)?n(new ve("Unsupported protocol "+y+":",ve.ERR_BAD_REQUEST,t)):f.send(r||null)}))},cn=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,i=new AbortController;const r=function(t){if(!n){n=!0,s();const e=t instanceof Error?t:this.reason;i.abort(e instanceof ve?e:new Ge(e instanceof Error?e.message:e))}};let o=e&&setTimeout((()=>{o=null,r(new ve(`timeout ${e} of ms exceeded`,ve.ETIMEDOUT))}),e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)})),t=null)};t.forEach((t=>t.addEventListener("abort",r)));const{signal:a}=i;return a.unsubscribe=()=>ye.asap(s),a}},dn=function*(t,e){let n=t.byteLength;if(n<e)return void(yield t);let i,r=0;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},un=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},hn=(t,e,n,i)=>{const r=async function*(t,e){for await(const n of un(t))yield*dn(n,e)}(t,e);let o,s=0,a=t=>{o||(o=!0,i&&i(t))};return new ReadableStream({async pull(t){try{const{done:e,value:i}=await r.next();if(e)return a(),void t.close();let o=i.byteLength;if(n){let t=s+=o;n(t)}t.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:t=>(a(t),r.return())},{highWaterMark:2})},pn="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,mn=pn&&"function"==typeof ReadableStream,fn=pn&&("function"==typeof TextEncoder?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),gn=(t,...e)=>{try{return!!t(...e)}catch(n){return!1}},yn=mn&&gn((()=>{let t=!1;const e=new Request(Be.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),vn=mn&&gn((()=>ye.isReadableStream(new Response("").body))),bn={stream:vn&&(t=>t.body)};var wn;pn&&(wn=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!bn[t]&&(bn[t]=ye.isFunction(wn[t])?e=>e[t]():(e,n)=>{throw new ve(`Response type '${t}' is not supported`,ve.ERR_NOT_SUPPORT,n)})})));const xn=async(t,e)=>{const n=ye.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(ye.isBlob(t))return t.size;if(ye.isSpecCompliantForm(t)){const e=new Request(Be.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return ye.isArrayBufferView(t)||ye.isArrayBuffer(t)?t.byteLength:(ye.isURLSearchParams(t)&&(t+=""),ye.isString(t)?(await fn(t)).byteLength:void 0)})(e):n},_n={http:null,xhr:ln,fetch:pn&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:d,withCredentials:u="same-origin",fetchOptions:h}=an(t);c=c?(c+"").toLowerCase():"text";let p,m=cn([r,o&&o.toAbortSignal()],s);const f=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let g;try{if(l&&yn&&"get"!==n&&"head"!==n&&0!==(g=await xn(d,i))){let t,n=new Request(e,{method:"POST",body:i,duplex:"half"});if(ye.isFormData(i)&&(t=n.headers.get("content-type"))&&d.setContentType(t),n.body){const[t,e]=Qe(g,Ze(tn(l)));i=hn(n.body,65536,t,e)}}ye.isString(u)||(u=u?"include":"omit");const r="credentials"in Request.prototype;p=new Request(e,{...h,signal:m,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:i,duplex:"half",credentials:r?u:void 0});let o=await fetch(p);const s=vn&&("stream"===c||"response"===c);if(vn&&(a||s&&f)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=o[e]}));const e=ye.toFiniteNumber(o.headers.get("content-length")),[n,i]=a&&Qe(e,Ze(tn(a),!0))||[];o=new Response(hn(o.body,65536,n,(()=>{i&&i(),f&&f()})),t)}c=c||"text";let y=await bn[ye.findKey(bn,c)||"text"](o,t);return!s&&f&&f(),await new Promise(((e,n)=>{Je(e,n,{data:y,headers:Ke.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:p})}))}catch(y){if(f&&f(),y&&"TypeError"===y.name&&/fetch/i.test(y.message))throw Object.assign(new ve("Network Error",ve.ERR_NETWORK,t,p),{cause:y.cause||y});throw ve.from(y,y&&y.code,t,p)}})};ye.forEach(_n,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const kn=t=>`- ${t}`,Tn=t=>ye.isFunction(t)||null===t||!1===t,Sn=t=>{t=ye.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let o=0;o<e;o++){let e;if(n=t[o],i=n,!Tn(n)&&(i=_n[(e=String(n)).toLowerCase()],void 0===i))throw new ve(`Unknown adapter '${e}'`);if(i)break;r[e||"#"+o]=i}if(!i){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ve("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(kn).join("\n"):" "+kn(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function An(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ge(null,t)}function Pn(t){An(t),t.headers=Ke.from(t.headers),t.data=Ye.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Sn(t.adapter||Ie.adapter)(t).then((function(e){return An(t),e.data=Ye.call(t,t.transformResponse,e),e.headers=Ke.from(e.headers),e}),(function(e){return Xe(e)||(An(t),e&&e.response&&(e.response.data=Ye.call(t,t.transformResponse,e.response),e.response.headers=Ke.from(e.response.headers))),Promise.reject(e)}))}const Cn="1.7.7",En={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{En[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Nn={};En.transitional=function(t,e,n){function i(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,o)=>{if(!1===t)throw new ve(i(r," has been removed"+(e?" in "+e:"")),ve.ERR_DEPRECATED);return e&&!Nn[r]&&(Nn[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,o)}};const Rn={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const o=i[r],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new ve("option "+o+" must be "+n,ve.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ve("Unknown option "+o,ve.ERR_BAD_OPTION)}},validators:En},Mn=Rn.validators;let On=class{constructor(t){this.defaults=t,this.interceptors={request:new Re,response:new Re}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{n.stack?e&&!String(n.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+e):n.stack=e}catch(i){}}throw n}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=sn(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&Rn.assertOptions(n,{silentJSONParsing:Mn.transitional(Mn.boolean),forcedJSONParsing:Mn.transitional(Mn.boolean),clarifyTimeoutError:Mn.transitional(Mn.boolean)},!1),null!=i&&(ye.isFunction(i)?e.paramsSerializer={serialize:i}:Rn.assertOptions(i,{encode:Mn.function,serialize:Mn.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&ye.merge(r.common,r[e.method]);r&&ye.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=Ke.concat(o,r);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let d,u=0;if(!a){const t=[Pn.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,l),d=t.length,c=Promise.resolve(e);u<d;)c=c.then(t[u++],t[u++]);return c}d=s.length;let h=e;for(u=0;u<d;){const t=s[u++],e=s[u++];try{h=t(h)}catch(p){e.call(this,p);break}}try{c=Pn.call(this,h)}catch(p){return Promise.reject(p)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(t){return Ne(rn((t=sn(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}};ye.forEach(["delete","get","head","options"],(function(t){On.prototype[t]=function(e,n){return this.request(sn(n||{},{method:t,url:e,data:(n||{}).data}))}})),ye.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(sn(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}On.prototype[t]=e(),On.prototype[t+"Form"]=e(!0)}));const Dn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dn).forEach((([t,e])=>{Dn[e]=t}));const Ln=function t(e){const n=new On(e),i=Et(On.prototype.request,n);return ye.extend(i,On.prototype,n,{allOwnKeys:!0}),ye.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(sn(e,n))},i}(Ie);Ln.Axios=On,Ln.CanceledError=Ge,Ln.CancelToken=class t{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new Ge(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t((function(t){e=t})),cancel:e}}},Ln.isCancel=Xe,Ln.VERSION=Cn,Ln.toFormData=Se,Ln.AxiosError=ve,Ln.Cancel=Ln.CanceledError,Ln.all=function(t){return Promise.all(t)},Ln.spread=function(t){return function(e){return t.apply(null,e)}},Ln.isAxiosError=function(t){return ye.isObject(t)&&!0===t.isAxiosError},Ln.mergeConfig=sn,Ln.AxiosHeaders=Ke,Ln.formToJSON=t=>Ue(ye.isHTMLForm(t)?new FormData(t):t),Ln.getAdapter=Sn,Ln.HttpStatusCode=Dn,Ln.default=Ln;const{Axios:jn,AxiosError:Vn,CanceledError:Fn,isCancel:Bn,CancelToken:Un,VERSION:In,all:zn,Cancel:Hn,isAxiosError:$n,spread:qn,toFormData:Wn,AxiosHeaders:Kn,HttpStatusCode:Yn,formToJSON:Xn,getAdapter:Gn,mergeConfig:Jn}=Ln;let Zn,Qn,ti;const ei=(t,e,n)=>{const i=`${t}/${n}`,r=Ln.create({baseURL:i,headers:{Authorization:`Bearer ${e}`}});switch(n){case"customer-profile":Zn=r;break;case"flare-app-identity":Qn=r;break;case"benefits-plan":ti=r}return r},ni=async(t,e)=>{if(!ti)throw new Error("Api has not been initialized");return await ti.put(`/_admin/v1.0/categories/${t}`,e)},ii=async(t,e,n,i)=>{if(!ti)throw new Error("Api has not been initialized");try{if(await ti.put(`/_admin/v1.0/activities/${t}`,e),n){const e=Ct(n,t);if((null==e?void 0:e.isFeatured)!==i){Pt(n,t,i??!1);const e=n;await ni(n.id,e)}}}catch(r){throw new Error(`${_t(r)}`)}},ri=t=>{const[e,n]=it(!1),i=st(),r=lt((async e=>{try{const n=t.find((t=>t.id===e));if(!n)throw new Error("Category not found");const i={title:n.title,subtitle:n.subtitle,iconUrl:n.iconUrl,enabled:!n.enabled,displayOrder:n.displayOrder,products:n.products};await ni(e,i)}catch(i){throw new Error(`Failed to update category visibility. Error: ${_t(i)}`)}finally{n(!1)}}),[t]),o=lt((async t=>{try{await(async t=>{if(!ti)throw new Error("Api has not been initialized");return await ti.post("/_admin/v1.0/categories",t)})(t)}catch(e){throw new Error(`${_t(e)}`)}}),[]),s=lt((async(t,e)=>{try{await ni(t,e)}catch(n){throw new Error(`${_t(n)}`)}}),[]);return{isModalOpen:e,handleAction:lt((async t=>{switch(t.type){case"updateVisibility":i.current=t.categoryId,n(!0);break;case"updateCategory":await s(t.categoryId,t.category);break;case"createCategory":await o(t.category);break;default:console.error(`Unhandled action type: ${t}`)}}),[o,s]),handleModalConfirm:lt((async()=>{i.current&&await r(i.current)}),[r]),handleModalCancel:lt((()=>{n(!1)}),[])}};for(var oi,si=[],ai=0;ai<256;++ai)si.push((ai+256).toString(16).slice(1));var li=new Uint8Array(16);function ci(){if(!oi&&!(oi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(li)}const di={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ui(t,e,n){if(di.randomUUID&&!e&&!t)return di.randomUUID();var i=(t=t||{}).random||(t.rng||ci)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return(si[t[e+0]]+si[t[e+1]]+si[t[e+2]]+si[t[e+3]]+"-"+si[t[e+4]]+si[t[e+5]]+"-"+si[t[e+6]]+si[t[e+7]]+"-"+si[t[e+8]]+si[t[e+9]]+"-"+si[t[e+10]]+si[t[e+11]]+si[t[e+12]]+si[t[e+13]]+si[t[e+14]]+si[t[e+15]]).toLowerCase()}(i)}const hi=({title:t,children:e})=>vt("div",{className:"mt-2",children:[vt("div",{className:"mt-9",children:vt("h1",{className:"text-2xl font-semibold text-gray-900",children:t})}),vt("div",{className:"w-1/2",children:e})]}),pi=({formFields:t,formData:e,isSubmitting:n,formMode:i,messages:r,categoryId:o,handleInputChange:s})=>vt(b,{children:[t.map((t=>t.display&&!t.display(o)?null:vt(b,{children:[vt("label",{className:"sm:col-start-1",children:t.label}),vt("input",{className:"sm:col-start-2 sm:col-span-3 block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm "+("checkbox"===t.type?"w-6 h-full":""),type:t.type,name:t.name,value:(t.type,e[t.name]),checked:"checkbox"===t.type?!!e[t.name]:void 0,disabled:t.disabled&&t.disabled(i.mode),required:t.isRequired,onChange:s})]},t.name))),vt("div",{className:"sm:col-start-4 flex justify-end",children:vt("button",{className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",type:"submit",disabled:n,children:"create"===i.mode?"Create":"Update"})}),vt("div",{className:"sm:col-start-1 sm:col-span-3 text-left",children:r.map(((t,e)=>vt("div",{className:"text-sm text-left font-semibold "+("error"===t.type?"text-red-600":"text-green-600 cursor-pointer"),children:t.text},e)))})]}),mi={categoryId:"",title:"",subtitle:"",iconUrl:"",displayOrder:0},fi=[{name:"categoryId",isRequired:!1,label:"Category Id",type:"text",disabled:t=>"update"==t},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"subtitle",isRequired:!0,label:"Sub Title",type:"text"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"displayOrder",isRequired:!1,label:"Display Order",type:"number"}],gi=({formMode:t,onChange:e})=>{const{isSubmitting:n,messages:i,formData:r,handleSubmit:o,handleInputChange:s}=((t,e)=>{const[n,i]=it(!1),[r,o]=it([]),[s,a]=it(mi),{handleAction:l}=ri([]);rt((()=>{if("update"===t.mode){const e={categoryId:t.initialCategory.id,title:t.initialCategory.title,subtitle:t.initialCategory.subtitle,iconUrl:t.initialCategory.iconUrl,displayOrder:t.initialCategory.displayOrder};a(e)}}),[t]);const c=lt(((t,e)=>{o((n=>[...n,{text:t,type:e}]))}),[]),d=lt((()=>{a({...mi})}),[]),u=lt((()=>{let t=!0;for(const e of fi)!e.isRequired||"text"!==e.type||s[e.name]&&""!==s[e.name].toString().trim()||(c(`${e.label} is required.`,"error"),t=!1);return t}),[s,c]),h=lt((()=>({...s,enabled:!1,products:[{id:ui(),title:s.title,description:s.subtitle,enabled:!0,iconUrl:s.iconUrl,activities:[]}]})),[s]),p=lt((t=>({...s,enabled:t.enabled,products:t.products})),[s]);return{isSubmitting:n,messages:r,formData:s,setMessages:o,handleSubmit:async n=>{if(n.preventDefault(),i(!0),o([]),u())try{if("create"===t.mode){const t=h();await l({type:"createCategory",category:t})}if("update"===t.mode){const e=p(t.initialCategory);await l({type:"updateCategory",categoryId:t.initialCategory.id,category:e})}c(`Category successfully ${"create"===t.mode?"created":"updated"}.`,"success"),d(),e()}catch(r){c(`Error ${"create"===t.mode?"adding":"updating"} category: ${r}`,"error")}finally{i(!1)}else i(!1)},handleInputChange:t=>{const e=t.target,{name:n,value:i,type:r}=e;a((t=>({...t,[n]:"number"===r?Number(i):i})))}}})(t,e),a="create"===t.mode?"New Benefits Plan Category":"Update Benefits Plan Category";return vt(hi,{title:a,children:vt("form",{onSubmit:o,children:vt("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline sm:gap-10 mt-8",children:vt(pi,{formMode:t,formFields:fi,formData:r,isSubmitting:n,messages:i,handleInputChange:s})})})})},yi=({disabled:t,children:e,onClick:n,...i})=>{const[r,o]=it(!1);return vt("button",{disabled:t||r,onClick:async()=>{if(n&&!r){o(!0);try{await n()}catch(t){console.error("Error executing promise:",t)}finally{o(!1)}}},type:"submit",...i,children:e})};function vi(t,e){for(var n in e)t[n]=e[n];return t}function bi(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function wi(t,e){this.props=t,this.context=e}(wi.prototype=new w).isPureReactComponent=!0,wi.prototype.shouldComponentUpdate=function(t,e){return bi(this.props,t)||bi(this.state,e)};var xi=e.__b;e.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),xi&&xi(t)};var _i="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var ki=e.__e;e.__e=function(t,e,n,i){if(t.then)for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e);ki(t,e,n,i)};var Ti=e.unmount;function Si(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=vi({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Si(t,e,n)}))),t}function Ai(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return Ai(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Pi(){this.__u=0,this.t=null,this.__b=null}function Ci(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Ei(){this.u=null,this.o=null}e.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ti&&Ti(t)},(Pi.prototype=new w).__c=function(t,e){var n=e.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=Ci(i.__v),o=!1,s=function(){o||(o=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(! --i.__u){if(i.state.__a){var t=i.state.__a;i.__v.__k[0]=Ai(t,t.__c.__P,t.__c.__O)}var e;for(i.setState({__a:i.__b=null});e=i.t.pop();)e.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(s,s)},Pi.prototype.componentWillUnmount=function(){this.t=[]},Pi.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Si(this.__b,n,i.__O=i.__P)}this.__b=null}var r=e.__a&&y(b,null,t.fallback);return r&&(r.__u&=-33),[y(b,null,e.__a?null:t.children),r]};var Ni=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};(Ei.prototype=new w).__a=function(t){var e=this,n=Ci(e.__v),i=e.o.get(t);return i[0]++,function(r){var o=function(){e.props.revealOrder?(i.push(r),Ni(e,t,i)):r()};n?n(o):o()}},Ei.prototype.render=function(t){this.u=null,this.o=new Map;var e=P(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Ei.prototype.componentDidUpdate=Ei.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ni(t,n,e)}))};var Ri="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Mi=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Oi=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Di=/[A-Z0-9]/g,Li="undefined"!=typeof document,ji=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(w.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var Vi=e.event;function Fi(){}function Bi(){return this.cancelBubble}function Ui(){return this.defaultPrevented}e.event=function(t){return Vi&&(t=Vi(t)),t.persist=Fi,t.isPropagationStopped=Bi,t.isDefaultPrevented=Ui,t.nativeEvent=t};var Ii={enumerable:!1,configurable:!0,get:function(){return this.class}},zi=e.vnode;e.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={};for(var r in e){var o=e[r];if(!("value"===r&&"defaultValue"in e&&null==o||Li&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var s=r.toLowerCase();"defaultValue"===r&&"value"in e&&null==e.value?r="value":"download"===r&&!0===o?o="":"translate"===s&&"no"===o?o=!1:"ondoubleclick"===s?r="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||ji(e.type)?"onfocus"===s?r="onfocusin":"onblur"===s?r="onfocusout":Oi.test(r)?r=s:-1===n.indexOf("-")&&Mi.test(r)?r=r.replace(Di,"-$&").toLowerCase():null===o&&(o=void 0):s=r="oninput","oninput"===s&&i[r=s]&&(r="oninputCapture"),i[r]=o}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=P(e.children).forEach((function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=P(e.children).forEach((function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value}))),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",Ii)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=Ri,zi&&zi(t)};var Hi=e.__r;e.__r=function(t){Hi&&Hi(t),t.__c};var $i=e.diffed;e.diffed=function(t){$i&&$i(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)};var qi=ot;const Wi=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})),Ki=({isOpen:t,heading:e,message:n,onConfirm:i,onCancel:r})=>t?vt("div",{className:"relative z-10","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[vt("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),vt("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:vt("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:vt("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[vt("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:vt("div",{className:"sm:flex sm:items-start",children:[vt("div",{className:"mx-auto flex h-10 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:vt(Wi,{className:"h-6 w-6 text-red-600"})}),vt("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[vt("h1",{className:"text-base font-semibold leading-6 text-gray-900",id:"modal-title",children:e}),vt("div",{className:"mt-2",children:vt("p",{className:"text-sm text-gray-500",children:n})})]})]})}),vt("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[vt(yi,{onClick:i,className:"inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto cursor-pointer",children:"Confirm"}),vt("button",{className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto cursor-pointer",onClick:r,children:"Cancel"})]})]})})})]}):null,Yi=({headers:t,renderTableRows:e})=>vt("div",{className:"-mx-4 mt-8 sm:-mx-4",children:vt("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:vt("table",{className:"min-w-full divide-y divide-gray-500",children:[vt("thead",{className:"bg-gray-50",children:vt("tr",{className:"divide-x divide-gray-20",children:t.map((t=>vt("th",{scope:"col",className:t.className,children:t.name},t.name)))})}),vt("tbody",{className:"divide-y divide-gray-200 bg-white",children:e()})]})})}),Xi=({error:t,isModalOpen:e,modalHeading:n,modalTitle:i,tableHeaders:r,headingText:o,buttonText:s,filterElement:a,onCreateButton:l,onModalConfirm:c,renderTableRows:d,handleModalCancel:u})=>vt(b,{children:[vt("div",{className:"p-4 text-red-700",children:t}),!t&&vt("div",{className:"m-4",children:[vt("div",{className:"flex items-center",children:[vt("div",{className:"flex-auto",children:vt("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:o})}),vt("div",{className:"ml-16 mt-0 flex-none",children:vt("button",{type:"button",className:"block rounded-md bg-indigo-500 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",onClick:l,children:s})})]}),a,vt(Yi,{headers:r,renderTableRows:d})]}),vt(Ki,{isOpen:e,heading:n,message:i,onConfirm:c,onCancel:u})]}),Gi=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"#6366F1",className:"size-6",...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})),Ji=({onClick:t,children:e})=>vt("div",{className:"mt-4",children:vt("div",{className:"flex justify-normal",children:[vt("span",{onClick:t,children:vt(Gi,{className:"h-6 w-6 border-0 cursor-pointer"})}),vt("label",{className:"block text-sm font-bold text-gray-700 pt-0.5 ml-1",children:e})]})}),Zi=({buttonName:t,onClick:e,children:n})=>vt(b,{children:[vt(Ji,{onClick:e,children:t}),n]}),Qi=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Subtitle",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Activities",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Order",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],tr=t=>{const[e,n]=it(null),[i,r]=it({mode:"view"}),{isModalOpen:o,handleAction:s,handleModalConfirm:a,handleModalCancel:l}=ri(t.categories);return vt(b,{children:["view"===i.mode&&vt(Xi,{error:e,isModalOpen:o,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this category in the app?",tableHeaders:Qi,headingText:"Benefits Plan Categories",buttonText:"New Category",onModalConfirm:async()=>{try{await a(),t.onChange()}catch(e){n(`${e}`)}},handleModalCancel:l,renderTableRows:()=>vt(b,{children:t.categories.map((t=>{const e=t.products.reduce(((t,e)=>t+e.activities.length),0);return vt("tr",{className:"divide-x divide-gray-200",children:[vt("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:t.id}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 items-center justify-center sm:table-cell",children:vt("img",{src:t.iconUrl,alt:t.title,className:"h-8 w-8"})}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.title}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:t.subtitle}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:e}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.displayOrder}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.enabled?"Yes":"No"}),vt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:vt("div",{className:"flex justify-center",children:vt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{r({mode:"update",itemId:t.id})},children:"Edit"})})}),vt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:vt("div",{className:"flex justify-center",children:vt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>(async t=>{await s({type:"updateVisibility",categoryId:t})})(t.id),children:t.enabled?"Disable":"Enable"})})})]},t.id)}))}),onCreateButton:()=>r({mode:"create"})}),"view"!==i.mode&&vt(Zi,{buttonName:"Benefits Plan Categories",onClick:()=>{r({mode:"view"})},children:vt(gi,{formMode:"create"===i.mode?{mode:"create"}:{mode:"update",initialCategory:t.categories.find((t=>t.id===i.itemId))},onChange:t.onChange})})]})},er=({visible:t,children:e})=>{const n=st(t);return t&&!n.current&&(n.current=!0),n.current?vt("div",{hidden:!t,children:e}):null},nr=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"black",height:32,width:32,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"})),ir=()=>{const[t,e]=it(!1),[n,i]=it([]),[r,o]=it(!1),s=st([]),a=st(),l=lt((async t=>{e(!0),s.current=t;try{const e=await(async()=>{if(!ti)throw new Error("Api has not been initialized");return(await ti.get("/_admin/v1.0/activities")).data})(),n=rr(t,e);i(n)}catch(n){throw new Error(`Failed to load activities. Error: ${_t(n)}`)}finally{e(!1)}}),[]),c=lt((async t=>{e(!0);try{const e=await(async t=>{if(!ti)throw new Error("Api has not been initialized");return(await ti.get(`/_admin/v1.0/activities/${t}`)).data})(t);e.enabled=!e.enabled,await ii(t,e)}catch(n){throw new Error(`Failed to update activity visibility. Error: ${_t(n)}`)}finally{e(!1)}}),[]);return{activities:n,isLoading:t,isModalOpen:r,loadActivities:l,handleAction:lt((async t=>{switch(t.type){case"updateVisibility":a.current=t.activityId,o(!0);break;case"updateActivity":await ii(t.activityId,t.activity,t.selectedCategory,t.isFeaturedActivity);break;case"createActivity":await(async(t,e,n)=>{if(!ti)throw new Error("Api has not been initialized");try{const i=await ti.post("/_admin/v1.0/activities",t);if(e){Pt(e,i.data.id,n??!1);const t=e;await ni(e.id,t)}}catch(i){throw new Error(`${_t(i)}`)}})(t.activity,t.selectedCategory,t.isFeaturedActivity);break;default:console.error(`Unhandled action type: ${t}`)}}),[]),handleModalConfirm:lt((async()=>{a.current&&(await c(a.current),o(!1))}),[c]),handleModalCancel:lt((()=>{o(!1)}),[])}},rr=(t,e)=>{const n=or(t);return e.map((t=>{var e;return{...t,category:null==(e=n.get(t.id))?void 0:e.find((()=>!0))}}))},or=t=>{const e=sr(t),n=new Map;return e.forEach((({activity:t,categoryId:e,categoryTitle:i})=>{const r=t.id;n.has(r)||n.set(r,[]);const o=n.get(r);o.some((t=>t.id===e))||o.push({id:e,title:i,isFeatured:t.isFeatured})})),n},sr=t=>t.flatMap((t=>t.products.flatMap((e=>e.activities.map((e=>({activity:e,categoryId:t.id,categoryTitle:t.title}))))))),ar="None",lr=[{name:"activityId",isRequired:!1,label:"Activity Id",type:"text",disabled:t=>"update"==t},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"description",isRequired:!0,label:"Sub Title",type:"text"},{name:"points",isRequired:!0,label:"Points",type:"number"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"isFeatured",isRequired:!1,label:"Is Featured",type:"checkbox",display:t=>t!==ar}],cr=[{activityType:wt.Advertisement,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:wt.Article,formFields:[{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:wt.Assessment,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"buttonText",isRequired:!0,label:"Button Text",type:"text"},{name:"primaryLabel",isRequired:!0,label:"Primary Label",type:"text"},{name:"secondaryLabel",isRequired:!0,label:"Secondary label",type:"text"}]},{activityType:wt.Url,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]},{activityType:wt.Deeplink,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]}],dr={activityId:"",title:"",description:"",points:0,iconUrl:"",url:"",articleId:"",bannerUrl:"",buttonText:"",primaryLabel:"",secondaryLabel:"",isFeatured:!1},ur=({formMode:t,categories:e,onChange:n})=>{const{isSubmitting:i,messages:r,formData:o,selectedActivityType:s,currentFormFields:a,selectedCategory:l,handleSubmit:c,handleInputChange:d,handleActivityTypeChange:u,handleCategoryChange:h}=((t,e,n)=>{const[i,r]=it(wt.Article),[o,s]=it({id:ar,title:ar}),[a,l]=it([]),[c,d]=it(!1),[u,h]=it(dr),{handleAction:p}=ir(),m=at((()=>{var t;return[...lr,...(null==(t=cr.find((t=>t.activityType===i)))?void 0:t.formFields)||[]]}),[i]),f=lt(((t,e)=>{l((n=>[...n,{text:t,type:e}]))}),[]);rt((()=>{var e,n,i;if("update"===t.mode){const o=t.initialActivity,a={activityId:o.id,title:o.title,points:o.points,description:o.description,iconUrl:o.iconUrl,url:o.url,articleId:o.articleId,bannerUrl:o.bannerUrl,buttonText:o.buttonText,primaryLabel:null==(e=o.estimateLabel)?void 0:e.primaryLabel,secondaryLabel:null==(n=o.estimateLabel)?void 0:n.secondaryLabel,isFeatured:null==(i=o.category)?void 0:i.isFeatured};h({...a}),r(o.activityType),s(o.category??{id:ar,title:ar})}}),[t]);const g=lt((()=>{h({...dr}),r(wt.Article),s({id:ar,title:ar})}),[]),y=lt((()=>{let t=!0;for(const e of m){const n=u[e.name];!e.isRequired||"text"!==e.type||n&&""!==n.toString().trim()||(f(`${e.label} is required.`,"error"),t=!1)}return t}),[f,m,u]),v=async()=>{const{url:t,articleId:n,bannerUrl:r,buttonText:s,primaryLabel:a,secondaryLabel:l,isFeatured:c}=u,d={...u,activityType:i,calculationType:Tt(i,o.title),enabled:!1,savingsInCents:0,configurationTags:At(o.title),tags:St(o.title),estimateLabel:a?{primaryLabel:a,secondaryLabel:l}:void 0,url:t||void 0,articleId:n||void 0,bannerUrl:r||void 0,buttonText:s||void 0};let h;o.title!==ar&&(h=e.find((t=>t.id===o.id)));try{await p({type:"createActivity",activity:d,selectedCategory:h,isFeaturedActivity:c}),f("Activity successfully created.","success"),g()}catch(m){throw f(`Error creating activity: ${m}`,"error"),m}},b=async t=>{const{primaryLabel:n,secondaryLabel:i,isFeatured:r}=u,s={...t,...u,estimateLabel:n?{primaryLabel:n,secondaryLabel:i}:void 0};let a;o.title!==ar&&(a=e.find((t=>t.id===o.id)));try{await p({type:"updateActivity",activityId:t.id,activity:s,selectedCategory:a,isFeaturedActivity:r}),f("Activity successfully updated.","success")}catch(l){throw f(`Error updating activity: ${l}`,"error"),l}};return{isSubmitting:c,messages:a,formData:u,selectedActivityType:i,currentFormFields:m,selectedCategory:o,setMessages:l,handleSubmit:async e=>{if(e.preventDefault(),d(!0),l([]),y())try{"create"===t.mode?await v():"update"===t.mode&&await b(t.initialActivity),n()}finally{d(!1)}else d(!1)},handleInputChange:t=>{const e=t.target,{name:n,value:i,type:r}=e;h((t=>({...t,[n]:"checkbox"===r?e.checked:"number"===r?Number(i):i})))},handleActivityTypeChange:t=>{const e=t.target;r(e.value)},handleCategoryChange:t=>{const n=t.target.value;if(n===ar)s({id:ar,title:ar});else{const t=e.find((t=>t.id===n));t&&s({id:t.id,title:t.title})}}}})(t,e,n),p="create"===t.mode?"New Benefits Plan Activities":"Update Benefits Plan Activities";return vt(hi,{title:p,children:vt("form",{onSubmit:c,children:[vt("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline mt-8",children:[vt("label",{className:"sm:col-start-1",children:"Type"}),vt("select",{className:"sm:col-start-2 sm:col-span-2 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:s,disabled:"update"===t.mode,onChange:u,children:Object.values(wt).map((t=>vt("option",{value:t,children:t},t)))})]}),vt("div",{className:"sm:grid sm:grid-cols-3 sm:items-baseline sm:gap-10 mt-8 sm:ml-12",children:[vt("label",{className:"sm:col-start-1",children:"Category"}),vt("select",{className:"sm:col-start-2 sm:col-span-3 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:l.id,disabled:"update"===t.mode,onChange:h,children:[vt("option",{value:ar,children:ar}),e.map((t=>vt("option",{value:t.id,children:t.title},t.id)))]}),vt(pi,{formMode:t,formFields:a,formData:o,isSubmitting:i,messages:r,categoryId:l.id,handleInputChange:d})]})]})})},hr=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Subtitle",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 2xl:table-cell"},{name:"Type",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 xl:table-cell"},{name:"Points",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Category",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],pr="All",mr=({categories:t,onChange:e})=>{const[n,i]=it(null),[r,o]=it({mode:"view"}),[s,a]=it({id:pr,title:pr}),[l,c]=it([]),{isLoading:d,activities:u,isModalOpen:h,loadActivities:p,handleAction:m,handleModalConfirm:f,handleModalCancel:g}=ir();rt((()=>{(async()=>{try{await p(t)}catch(e){i(`${e}`)}})()}),[t,p]),rt((()=>{c(s.title===pr?u:u.filter((t=>{var e;return(null==(e=t.category)?void 0:e.id)===s.id})))}),[u,s]);const y=vt("div",{className:"flex items-center space-x-2 mt-4",children:[vt(nr,{}),vt("select",{className:"focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:s.id,onChange:e=>{const n=e.target.value;if(n===pr)a({id:pr,title:pr});else{const e=t.find((t=>t.id===n));e&&a({id:e.id,title:e.title})}},children:[vt("option",{value:pr,children:pr}),t.map((t=>vt("option",{value:t.id,children:t.title},t.id)))]})]});return vt(b,{children:["view"===r.mode&&vt(b,{children:[d&&vt("p",{className:"p-5",children:"Loading..."}),!d&&vt(Xi,{error:n,isModalOpen:h,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this activity in the app?",tableHeaders:hr,headingText:"Benefits Plan Activities",buttonText:"New Activity",filterElement:y,onModalConfirm:async()=>{try{await f(),e()}catch(t){i(`${t}`)}},handleModalCancel:g,renderTableRows:()=>vt(b,{children:l.map((t=>{var e;return vt("tr",{className:"divide-x divide-gray-200",children:[vt("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:t.id}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 xl:table-cell",children:vt("span",{className:"flex justify-center",children:vt("img",{src:t.iconUrl,alt:t.title,className:"h-8 w-8"})})}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:kt(t.title)}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 2xl:table-cell",children:kt(t.description)}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 xl:table-cell",children:t.activityType}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.points}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:(null==(e=t.category)?void 0:e.title)??"None"}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.enabled?"Yes":"No"}),vt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:vt("div",{className:"flex justify-center",children:vt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{o({mode:"update",itemId:t.id})},children:"Edit"})})}),vt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:vt("div",{className:"flex justify-center",children:vt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>m({type:"updateVisibility",activityId:t.id}),children:t.enabled?"Disable":"Enable"})})})]},t.id)}))}),onCreateButton:()=>o({mode:"create"})})]}),"view"!==r.mode&&vt(Zi,{buttonName:"Benefits Plan Activities",onClick:()=>{o({mode:"view"})},children:vt(ur,{categories:t,formMode:"create"===r.mode?{mode:"create"}:{mode:"update",initialActivity:u.find((t=>t.id===r.itemId))},onChange:e})})]})};var fr=(t=>(t.Categories="Categories",t.Activities="Activities",t))(fr||{});const gr=()=>{const[t,e]=it("Categories"),[n,i]=it([]),[r,o]=it(!1),[s,a]=it(null),l=lt((e=>e===t),[t]),c=lt((async()=>{o(!0),a(null);try{const t=(await(async()=>{if(!ti)throw new Error("Api has not been initialized");return(await ti.get("/_admin/v1.0/categories")).data})()).categories.sort(((t,e)=>t.displayOrder-e.displayOrder));i(t)}catch(t){console.error(t),a("Failed to load categories.")}finally{o(!1)}}),[]);rt((()=>{c()}),[c]);const d=async()=>{await c()};return vt(b,{children:[vt(bt,{tabTitles:Object.entries(fr).map((([,t])=>t)),currentTab:t,onChange:e}),r&&vt("p",{className:"p-5",children:"Loading..."}),s&&vt("div",{className:"p-4 text-red-700",children:s}),!r&&vt(b,{children:[vt(er,{visible:l("Categories"),children:vt(tr,{categories:n,onChange:d})}),vt(er,{visible:l("Activities"),children:vt(mr,{categories:n,onChange:d})})]})]})};function yr(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function vr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const br=t=>Array.isArray(t);function wr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function xr(t){return"string"==typeof t||Array.isArray(t)}function _r(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function kr(t,e,n,i){if("function"==typeof e){const[r,o]=_r(i);e=e(void 0!==n?n:t.custom,r,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,o]=_r(i);e=e(void 0!==n?n:t.custom,r,o)}return e}function Tr(t,e,n){const i=t.getProps();return kr(i,e,void 0!==n?n:i.custom,t)}const Sr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ar=["initial",...Sr],Pr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cr=new Set(Pr),Er=t=>1e3*t,Nr=t=>t/1e3,Rr={type:"spring",stiffness:500,damping:25,restSpeed:10},Mr={type:"keyframes",duration:.8},Or={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Dr=(t,{keyframes:e})=>e.length>2?Mr:Cr.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Rr:Or;function Lr(t,e){return t?t[e]||t.default||t:void 0}const jr=!1,Vr=t=>null!==t;function Fr(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(Vr),o=e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const Br=t=>t;const Ur=["read","resolveKeyframes","update","preRender","render","postRender"];function Ir(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Ur.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(s)}const l={schedule:(t,r=!1,s=!1)=>{const a=s&&i?e:n;return r&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{s=t,i?r=!0:(i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,r&&(r=!1,l.process(t)))}};return l}(o),t)),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:h}=s,p=()=>{const o=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1),r.timestamp=o,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),d.process(r),u.process(r),h.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:Ur.reduce(((e,o)=>{const a=s[o];return e[o]=(e,o=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(p)),a.schedule(e,o,s)),e}),{}),cancel:t=>{for(let e=0;e<Ur.length;e++)s[Ur[e]].cancel(t)},state:r,steps:s}}const{schedule:zr,cancel:Hr,state:$r,steps:qr}=Ir("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Br,!0),Wr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Kr=1e-7,Yr=12;function Xr(t,e,n,i){if(t===e&&n===i)return Br;const r=e=>function(t,e,n,i,r){let o,s,a=0;do{s=e+(n-e)/2,o=Wr(s,i,r)-t,o>0?n=s:e=s}while(Math.abs(o)>Kr&&++a<Yr);return s}(e,0,1,t,n);return t=>0===t||1===t?t:Wr(r(t),e,i)}const Gr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Jr=t=>e=>1-t(1-e),Zr=Xr(.33,1.53,.69,.99),Qr=Jr(Zr),to=Gr(Qr),eo=t=>(t*=2)<1?.5*Qr(t):.5*(2-Math.pow(2,-10*(t-1))),no=t=>1-Math.sin(Math.acos(t)),io=Jr(no),ro=Gr(no),oo=t=>/^0[^.\s]+$/u.test(t);let so=Br;const ao=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),lo=t=>e=>"string"==typeof e&&e.startsWith(t),co=lo("--"),uo=lo("var(--"),ho=t=>!!uo(t)&&po.test(t.split("/*")[0].trim()),po=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function fo(t,e,n=1){const[i,r]=function(t){const e=mo.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${null!=n?n:i}`,r]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return ao(t)?parseFloat(t):t}return ho(r)?fo(r,e,n+1):r}const go=(t,e,n)=>n>e?e:n<t?t:n,yo={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},vo={...yo,transform:t=>go(0,1,t)},bo={...yo,default:1},wo=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),xo=wo("deg"),_o=wo("%"),ko=wo("px"),To=wo("vh"),So=wo("vw"),Ao={..._o,parse:t=>_o.parse(t)/100,transform:t=>_o.transform(100*t)},Po=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Co=t=>t===yo||t===ko,Eo=(t,e)=>parseFloat(t.split(", ")[e]),No=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return Eo(r[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?Eo(e[1],t):0}},Ro=new Set(["x","y","z"]),Mo=Pr.filter((t=>!Ro.has(t)));const Oo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:No(4,13),y:No(5,14)};Oo.translateX=Oo.x,Oo.translateY=Oo.y;const Do=t=>e=>e.test(t),Lo=[yo,ko,_o,xo,So,To,{test:t=>"auto"===t,parse:t=>t}],jo=t=>Lo.find(Do(t)),Vo=new Set;let Fo=!1,Bo=!1;function Uo(){if(Bo){const t=Array.from(Vo).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return Mo.forEach((n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var i;null===(i=t.getValue(e))||void 0===i||i.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}Bo=!1,Fo=!1,Vo.forEach((t=>t.complete())),Vo.clear()}function Io(){Vo.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Bo=!0)}))}class zo{constructor(t,e,n,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Vo.add(this),Fo||(Fo=!0,zr.read(Io),zr.resolveKeyframes(Uo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===r&&i.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Vo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Vo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ho=t=>Math.round(1e5*t)/1e5,$o=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const qo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Wo=(t,e)=>n=>Boolean("string"==typeof n&&qo.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ko=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,o,s,a]=i.match($o);return{[t]:parseFloat(r),[e]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Yo={...yo,transform:t=>Math.round((t=>go(0,255,t))(t))},Xo={test:Wo("rgb","red"),parse:Ko("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Yo.transform(t)+", "+Yo.transform(e)+", "+Yo.transform(n)+", "+Ho(vo.transform(i))+")"};const Go={test:Wo("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:Xo.transform},Jo={test:Wo("hsl","hue"),parse:Ko("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+_o.transform(Ho(e))+", "+_o.transform(Ho(n))+", "+Ho(vo.transform(i))+")"},Zo={test:t=>Xo.test(t)||Go.test(t)||Jo.test(t),parse:t=>Xo.test(t)?Xo.parse(t):Jo.test(t)?Jo.parse(t):Go.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Xo.transform(t):Jo.transform(t)},Qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ts="number",es="color",ns="var",is="var(",rs="${}",os=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ss(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const s=e.replace(os,(t=>(Zo.test(t)?(i.color.push(o),r.push(es),n.push(Zo.parse(t))):t.startsWith(is)?(i.var.push(o),r.push(ns),n.push(t)):(i.number.push(o),r.push(ts),n.push(parseFloat(t))),++o,rs))).split(rs);return{values:n,split:s,indexes:i,types:r}}function as(t){return ss(t).values}function ls(t){const{split:e,types:n}=ss(t),i=e.length;return t=>{let r="";for(let o=0;o<i;o++)if(r+=e[o],void 0!==t[o]){const e=n[o];r+=e===ts?Ho(t[o]):e===es?Zo.transform(t[o]):t[o]}return r}}const cs=t=>"number"==typeof t?0:t;const ds={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match($o))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Qo))||void 0===n?void 0:n.length)||0)>0},parse:as,createTransformer:ls,getAnimatableNone:function(t){const e=as(t);return ls(t)(e.map(cs))}},us=new Set(["brightness","contrast","saturate","opacity"]);function hs(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match($o)||[];if(!i)return t;const r=n.replace(i,"");let o=us.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+r+")"}const ps=/\b([a-z-]*)\(.*?\)/gu,ms={...ds,getAnimatableNone:t=>{const e=t.match(ps);return e?e.map(hs).join(" "):t}},fs={borderWidth:ko,borderTopWidth:ko,borderRightWidth:ko,borderBottomWidth:ko,borderLeftWidth:ko,borderRadius:ko,radius:ko,borderTopLeftRadius:ko,borderTopRightRadius:ko,borderBottomRightRadius:ko,borderBottomLeftRadius:ko,width:ko,maxWidth:ko,height:ko,maxHeight:ko,top:ko,right:ko,bottom:ko,left:ko,padding:ko,paddingTop:ko,paddingRight:ko,paddingBottom:ko,paddingLeft:ko,margin:ko,marginTop:ko,marginRight:ko,marginBottom:ko,marginLeft:ko,backgroundPositionX:ko,backgroundPositionY:ko},gs={rotate:xo,rotateX:xo,rotateY:xo,rotateZ:xo,scale:bo,scaleX:bo,scaleY:bo,scaleZ:bo,skew:xo,skewX:xo,skewY:xo,distance:ko,translateX:ko,translateY:ko,translateZ:ko,x:ko,y:ko,z:ko,perspective:ko,transformPerspective:ko,opacity:vo,originX:Ao,originY:Ao,originZ:ko},ys={...yo,transform:Math.round},vs={...fs,...gs,zIndex:ys,size:ko,fillOpacity:vo,strokeOpacity:vo,numOctaves:ys},bs={...vs,color:Zo,backgroundColor:Zo,outlineColor:Zo,fill:Zo,stroke:Zo,borderColor:Zo,borderTopColor:Zo,borderRightColor:Zo,borderBottomColor:Zo,borderLeftColor:Zo,filter:ms,WebkitFilter:ms},ws=t=>bs[t];function xs(t,e){let n=ws(t);return n!==ms&&(n=ds),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const _s=new Set(["auto","none","0"]);class ks extends zo{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let n=t[a];if("string"==typeof n&&(n=n.trim(),ho(n))){const i=fo(n,e.current);void 0!==i&&(t[a]=i),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Po.has(n)||2!==t.length)return;const[i,r]=t,o=jo(i),s=jo(r);if(o!==s)if(Co(o)&&Co(s))for(let a=0;a<t.length;a++){const e=t[a];"string"==typeof e&&(t[a]=parseFloat(e))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let r=0;r<t.length;r++)("number"==typeof(i=t[r])?0===i:null===i||"none"===i||"0"===i||oo(i))&&n.push(r);var i;n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!_s.has(e)&&ss(e).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=xs(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Oo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}function Ts(t){return"function"==typeof t}let Ss;function As(){Ss=void 0}const Ps={now:()=>(void 0===Ss&&Ps.set($r.isProcessing||jr?$r.timestamp:performance.now()),Ss),set:t=>{Ss=t,queueMicrotask(As)}},Cs=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ds.test(t)&&"0"!==t||t.startsWith("url(")));class Es{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ps.now(),this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Io(),Uo()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Ps.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:r,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],s=Cs(r,e),a=Cs(o,e);return!(!s||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Ts(n))&&i)}(t,n,i,r)){if(!o)return null==a||a(Fr(t,this.options,e)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(t,e);!1!==c&&(this._resolved={keyframes:t,finalKeyframe:e,...c},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function Ns(t,e){return e?t*(1e3/e):0}const Rs=5;function Ms(t,e,n){const i=Math.max(e-Rs,0);return Ns(n-t(i),e-i)}const Os=.001,Ds=.01,Ls=10,js=.05,Vs=1;function Fs({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let r,o,s=1-e;s=go(js,Vs,s),t=go(Ds,Ls,Nr(t)),s<1?(r=e=>{const i=e*s,r=i*t,o=i-n,a=Us(e,s),l=Math.exp(-r);return Os-o/a*l},o=e=>{const i=e*s*t,o=i*n+n,a=Math.pow(s,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=Us(Math.pow(e,2),s);return(-r(e)+Os>0?-1:1)*((o-a)*l)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-Os,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let r=1;r<Bs;r++)i-=t(i)/e(i);return i}(r,o,5/t);if(t=Er(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*s*Math.sqrt(i*e),duration:t}}}const Bs=12;function Us(t,e){return t*Math.sqrt(1-e*e)}const Is=["duration","bounce"],zs=["stiffness","damping","mass"];function Hs(t,e){return e.some((e=>void 0!==t[e]))}function $s({keyframes:t,restDelta:e,restSpeed:n,...i}){const r=t[0],o=t[t.length-1],s={done:!1,value:r},{stiffness:a,damping:l,mass:c,duration:d,velocity:u,isResolvedFromDuration:h}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Hs(t,zs)&&Hs(t,Is)){const n=Fs(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Nr(i.velocity||0)}),p=u||0,m=l/(2*Math.sqrt(a*c)),f=o-r,g=Nr(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=Us(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:h&&d||null,next:t=>{const i=v(t);if(h)s.done=t>=d;else{let r=0;m<1&&(r=0===t?Er(p):Ms(v,t,i));const a=Math.abs(r)<=n,l=Math.abs(o-i)<=e;s.done=a&&l}return s.value=s.done?o:i,s}}}function qs({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=t[0],h={done:!1,value:u},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=u+m,g=void 0===s?f:s(f);g!==f&&(m=g-u);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),b=t=>{const e=y(t),n=v(t);h.done=Math.abs(e)<=c,h.value=h.done?g:n};let w,x;const _=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,x=$s({keyframes:[h.value,p(h.value)],velocity:Ms(v,t,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:d}))};return _(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==w||(e=!0,b(t),_(t)),void 0!==w&&t>=w?x.next(t-w):(!e&&b(t),h)}}}const Ws=Xr(.42,0,1,1),Ks=Xr(0,0,.58,1),Ys=Xr(.42,0,.58,1),Xs=t=>Array.isArray(t)&&"number"==typeof t[0],Gs={linear:Br,easeIn:Ws,easeInOut:Ys,easeOut:Ks,circIn:no,circInOut:ro,circOut:io,backIn:Qr,backInOut:to,backOut:Zr,anticipate:eo},Js=t=>{if(Xs(t)){so(4===t.length);const[e,n,i,r]=t;return Xr(e,n,i,r)}return"string"==typeof t?(so(void 0!==Gs[t]),Gs[t]):t},Zs=(t,e)=>n=>e(t(n)),Qs=(...t)=>t.reduce(Zs),ta=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},ea=(t,e,n)=>t+(e-t)*n;function na(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ia(t,e){return n=>n>0?e:t}const ra=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},oa=[Go,Xo,Jo];function sa(t){const e=(n=t,oa.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===Jo&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,o=0,s=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;r=na(a,i,t+1/3),o=na(a,i,t),s=na(a,i,t-1/3)}else r=o=s=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*s),alpha:i}}(i)),i}const aa=(t,e)=>{const n=sa(t),i=sa(e);if(!n||!i)return ia(t,e);const r={...n};return t=>(r.red=ra(n.red,i.red,t),r.green=ra(n.green,i.green,t),r.blue=ra(n.blue,i.blue,t),r.alpha=ea(n.alpha,i.alpha,t),Xo.transform(r))},la=new Set(["none","hidden"]);function ca(t,e){return n=>ea(t,e,n)}function da(t){return"number"==typeof t?ca:"string"==typeof t?ho(t)?ia:Zo.test(t)?aa:pa:Array.isArray(t)?ua:"object"==typeof t?Zo.test(t)?aa:ha:ia}function ua(t,e){const n=[...t],i=n.length,r=t.map(((t,n)=>da(t)(t,e[n])));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function ha(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=da(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const pa=(t,e)=>{const n=ds.createTransformer(e),i=ss(t),r=ss(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?la.has(t)&&!r.values.length||la.has(e)&&!i.values.length?function(t,e){return la.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Qs(ua(function(t,e){var n;const i=[],r={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],a=t.indexes[s][r[s]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,r[s]++}return i}(i,r),r.values),n):ia(t,e)};function ma(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return ea(t,e,n);return da(t)(t,e)}function fa(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const o=t.length;if(so(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const i=[],r=n||ma,o=t.length-1;for(let s=0;s<o;s++){let n=r(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||Br:e;n=Qs(t,n)}i.push(n)}return i}(e,i,r),a=s.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=ta(t[n],t[n+1],e);return s[n](i)};return n?e=>l(go(t[0],t[o-1],e)):l}function ga(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=ta(0,e,i);t.push(ea(n,1,r))}}(e,t.length-1),e}function ya({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Js):Js(i),o={done:!1,value:e[0]},s=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:ga(e),t),a=fa(s,e,{ease:Array.isArray(r)?r:(l=e,c=r,l.map((()=>c||Ys)).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const va=t=>{const e=({timestamp:e})=>t(e);return{start:()=>zr.update(e,!0),stop:()=>Hr(e),now:()=>$r.isProcessing?$r.timestamp:Ps.now()}},ba={decay:qs,inertia:qs,tween:ya,keyframes:ya,spring:$s},wa=t=>t/100;class xa extends Es{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:i,keyframes:r}=this.options,o=(null==i?void 0:i.KeyframeResolver)||zo;this.resolver=new o(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,s=Ts(e)?e:ba[e]||ya;let a,l;s!==ya&&"number"!=typeof t[0]&&(a=Qs(wa,ma(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});"mirror"===r&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=function(t){let e=0,n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}(c));const{calculatedDuration:d}=c,u=d+i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:d,resolvedDuration:u,totalDuration:u*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=n;if(null===this.startTime)return r.next(0);const{delay:u,repeat:h,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-u*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=r;if(h){const t=Math.min(this.currentTime,c)/d;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/d)):"mirror"===p&&(b=o)),v=go(0,1,n)*d}const w=y?{done:!1,value:a[0]}:b.next(v);s&&(w.value=s(w.value));let{done:x}=w;y||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return _&&void 0!==i&&(w.value=Fr(a,this.options,i)),f&&f(w.value),_&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Nr(t.calculatedDuration):0}get time(){return Nr(this.currentTime)}set time(t){t=Er(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Nr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=va,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const _a=new Set(["opacity","clipPath","filter","transform"]),ka=(t,e)=>{let n="";const i=Math.max(Math.round(e/10),2);for(let r=0;r<i;r++)n+=t(ta(0,i-1,r))+", ";return`linear(${n.substring(0,n.length-2)})`};function Ta(t){let e;return()=>(void 0===e&&(e=t()),e)}const Sa={linearEasing:void 0};function Aa(t,e){const n=Ta(t);return()=>{var t;return null!==(t=Sa[e])&&void 0!==t?t:n()}}const Pa=Aa((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing");function Ca(t){return Boolean("function"==typeof t&&Pa()||!t||"string"==typeof t&&(t in Na||Pa())||Xs(t)||Array.isArray(t)&&t.every(Ca))}const Ea=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Na={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ea([0,.65,.55,1]),circOut:Ea([.55,0,1,.45]),backIn:Ea([.31,.01,.66,-.59]),backOut:Ea([.33,1.53,.69,.99])};function Ra(t,e){return t?"function"==typeof t&&Pa()?ka(t,e):Xs(t)?Ea(t):Array.isArray(t)?t.map((t=>Ra(t,e)||Na.easeOut)):Na[t]:void 0}function Ma(t,e,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const d=Ra(a,r);return Array.isArray(d)&&(c.easing=d),t.animate(c,{delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}function Oa(t,e){t.timeline=e,t.onfinish=null}const Da=Ta((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const La={anticipate:eo,backInOut:to,circInOut:ro};class ja extends Es{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:r}=this.options;this.resolver=new ks(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:i=300,times:r,ease:o,type:s,motionValue:a,name:l,startTime:c}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var d;if("string"==typeof o&&Pa()&&o in La&&(o=La[o]),Ts((d=this.options).type)||"spring"===d.type||!Ca(d.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...c}=this.options,d=function(t,e){const n=new xa({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const r=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),r.push(i.value),o+=10;return{times:void 0,keyframes:r,duration:o-10,ease:"linear"}}(t,c);1===(t=d.keyframes).length&&(t[1]=t[0]),i=d.duration,r=d.times,o=d.ease,s="keyframes"}const u=Ma(a.owner.current,l,t,{...this.options,duration:i,times:r,ease:o});return u.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(Oa(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(Fr(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:r,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Nr(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Nr(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Er(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return Br;const{animation:n}=e;Oa(n,t)}else this.pendingTimeline=t;return Br}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:r,ease:o,times:s}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...c}=this.options,d=new xa({...c,keyframes:n,duration:i,type:r,ease:o,times:s,isGenerator:!0}),u=Er(this.time);t.setWithVelocity(d.sample(u-10).value,d.sample(u).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=t;return Da()&&n&&_a.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!i&&"mirror"!==r&&0!==o&&"inertia"!==s}}const Va=Ta((()=>void 0!==window.ScrollTimeline));class Fa{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>Va()&&n.attachTimeline?n.attachTimeline(t):e(n)));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Ba=(t,e,n,i={},r,o)=>s=>{const a=Lr(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Er(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(a)||(d={...d,...Dr(t,d)}),d.duration&&(d.duration=Er(d.duration)),d.repeatDelay&&(d.repeatDelay=Er(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(u=!0)),u&&!o&&void 0!==e.get()){const t=Fr(d.keyframes,a);if(void 0!==t)return zr.update((()=>{d.onUpdate(t),d.onComplete()})),new Fa([])}return!o&&ja.supports(d)?new ja(d):new xa(d)},Ua=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Ia=t=>br(t)?t[t.length-1]||0:t;function za(t,e){-1===t.indexOf(e)&&t.push(e)}function Ha(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class $a{constructor(){this.subscriptions=[]}add(t){return za(this.subscriptions,t),()=>Ha(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class qa{constructor(t,e={}){this.version="11.11.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Ps.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Ps.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new $a);const n=this.events[t].add(e);return"change"===t?()=>{n(),zr.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ps.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ns(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wa(t,e){return new qa(t,e)}function Ka(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wa(n))}const Ya=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xa="data-"+Ya("framerAppearId");function Ga(t){return t.props[Xa]}const Ja=t=>Boolean(t&&t.getVelocity);function Za(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Ja(i)&&i.add))return n.add(e);var i}function Qa({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function tl(t,e,{delay:n=0,transitionOverride:i,type:r}={}){var o;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(s=i);const c=[],d=r&&t.animationState&&t.animationState.getState()[r];for(const u in l){const e=t.getValue(u,null!==(o=t.latestValues[u])&&void 0!==o?o:null),i=l[u];if(void 0===i||d&&Qa(d,u))continue;const r={delay:n,...Lr(s||{},u)};let a=!1;if(window.MotionHandoffAnimation){const e=Ga(t);if(e){const t=window.MotionHandoffAnimation(e,u,zr);null!==t&&(r.startTime=t,a=!0)}}Za(t,u),e.start(Ba(u,e,i,t.shouldReduceMotion&&Cr.has(u)?{type:!1}:r,t,a));const h=e.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{zr.update((()=>{a&&function(t,e){const n=Tr(t,e);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o)Ka(t,s,Ia(o[s]))}(t,a)}))})),c}function el(t,e,n={}){var i;const r=Tr(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(tl(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=o;return function(t,e,n=0,i=0,r=1,o){const s=[],a=(t.variantChildren.size-1)*i,l=1===r?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(nl).forEach(((t,i)=>{t.notify("AnimationStart",e),s.push(el(t,e,{...o,delay:n+l(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(s)}(t,e,r+i,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then((()=>e()))}return Promise.all([s(),a(n.delay)])}function nl(t,e){return t.sortNodePosition(e)}const il=Ar.length;function rl(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&rl(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<il;n++){const i=Ar[n],r=t.props[i];(xr(r)||!1===r)&&(e[i]=r)}return e}const ol=[...Sr].reverse(),sl=Sr.length;function al(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map((e=>el(t,e,n)));i=Promise.all(r)}else if("string"==typeof e)i=el(t,e,n);else{const r="function"==typeof e?Tr(t,e,n.custom):e;i=Promise.all(tl(t,r,n))}return i.then((()=>{t.notify("AnimationComplete",e)}))}(t,e,n))))}function ll(t){let e=al(t),n=ul(),i=!0;const r=e=>(n,i)=>{var r;const o=Tr(t,i,"exit"===e?null===(r=t.presenceContext)||void 0===r?void 0:r.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function o(o){const{props:s}=t,a=rl(t.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let e=0;e<sl;e++){const h=ol[e],p=n[h],m=void 0!==s[h]?s[h]:a[h],f=xr(m),g=h===o?p.isActive:null;!1===g&&(u=e);let y=m===a[h]&&m!==s[h]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...d},!p.isActive&&null===g||!m&&!p.prevProp||vr(m)||"boolean"==typeof m)continue;const v=cl(p.prevProp,m);let b=v||h===o&&p.isActive&&!y&&f||e>u&&f,w=!1;const x=Array.isArray(m)?m:[m];let _=x.reduce(r(h),{});!1===g&&(_={});const{prevResolvedValues:k={}}=p,T={...k,..._},S=e=>{b=!0,c.has(e)&&(w=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in T){const e=_[t],n=k[t];if(d.hasOwnProperty(t))continue;let i=!1;i=br(e)&&br(n)?!wr(e,n):e!==n,i?null!=e?S(t):c.add(t):void 0!==e&&c.has(t)?S(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=_,p.isActive&&(d={...d,..._}),i&&t.blockInitialAnimation&&(b=!1);b&&(!(y&&v)||w)&&l.push(...x.map((t=>({animation:t,options:{type:h}}))))}if(c.size){const e={};c.forEach((n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=null!=i?i:null})),l.push({animation:e})}let h=Boolean(l.length);return!i||!1!==s.initial&&s.initial!==s.animate||t.manuallyAnimateOnMount||(h=!1),i=!1,h?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)})),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=ul(),i=!0}}}function cl(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!wr(e,t)}function dl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ul(){return{animate:dl(!0),whileInView:dl(),whileHover:dl(),whileTap:dl(),whileDrag:dl(),whileFocus:dl(),exit:dl()}}class hl{constructor(t){this.isMounted=!1,this.node=t}update(){}}let pl=0;const ml={animation:{Feature:class extends hl{constructor(t){super(t),t.animationState||(t.animationState=ll(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends hl{constructor(){super(...arguments),this.id=pl++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},fl=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function gl(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const yl=t=>e=>fl(e)&&t(e,gl(e));function vl(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function bl(t,e,n,i){return vl(t,e,yl(n),i)}const wl=(t,e)=>Math.abs(t-e);class xl{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Tl(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=wl(t.x,e.x),i=wl(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=$r;this.history.push({...i,timestamp:r});const{onStart:o,onMove:s}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=_l(e,this.transformPagePoint),zr.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Tl("pointercancel"===t.type?this.lastMoveEventInfo:_l(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!fl(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=_l(gl(t),this.transformPagePoint),{point:s}=o,{timestamp:a}=$r;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Tl(o,this.history)),this.removeListeners=Qs(bl(this.contextWindow,"pointermove",this.handlePointerMove),bl(this.contextWindow,"pointerup",this.handlePointerUp),bl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hr(this.updatePoint)}}function _l(t,e){return e?{point:e(t.point)}:t}function kl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Tl({point:t},e){return{point:t,delta:kl(t,Al(e)),offset:kl(t,Sl(e)),velocity:Pl(e,.1)}}function Sl(t){return t[0]}function Al(t){return t[t.length-1]}function Pl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Al(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>Er(e)));)n--;if(!i)return{x:0,y:0};const o=Nr(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Cl(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const El=Cl("dragHorizontal"),Nl=Cl("dragVertical");function Rl(t){let e=!1;if("y"===t)e=Nl();else if("x"===t)e=El();else{const t=El(),n=Nl();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Ml(){const t=Rl(!0);return!t||(t(),!1)}function Ol(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Dl=.9999,Ll=1.0001,jl=-.01,Vl=.01;function Fl(t){return t.max-t.min}function Bl(t,e,n,i=.5){t.origin=i,t.originPoint=ea(e.min,e.max,t.origin),t.scale=Fl(n)/Fl(e),t.translate=ea(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Dl&&t.scale<=Ll||isNaN(t.scale))&&(t.scale=1),(t.translate>=jl&&t.translate<=Vl||isNaN(t.translate))&&(t.translate=0)}function Ul(t,e,n,i){Bl(t.x,e.x,n.x,i?i.originX:void 0),Bl(t.y,e.y,n.y,i?i.originY:void 0)}function Il(t,e,n){t.min=n.min+e.min,t.max=t.min+Fl(e)}function zl(t,e,n){t.min=e.min-n.min,t.max=t.min+Fl(e)}function Hl(t,e,n){zl(t.x,e.x,n.x),zl(t.y,e.y,n.y)}function $l(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ql(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Wl=.35;function Kl(t,e,n){return{min:Yl(t,e),max:Yl(t,n)}}function Yl(t,e){return"number"==typeof t?t:t[e]||0}const Xl=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Gl=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Jl(t){return[t("x"),t("y")]}function Zl({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ql(t){return void 0===t||1===t}function tc({scale:t,scaleX:e,scaleY:n}){return!Ql(t)||!Ql(e)||!Ql(n)}function ec(t){return tc(t)||nc(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function nc(t){return ic(t.x)||ic(t.y)}function ic(t){return t&&"0%"!==t}function rc(t,e,n){return n+e*(t-n)}function oc(t,e,n,i,r){return void 0!==r&&(t=rc(t,r,i)),rc(t,n,i)+e}function sc(t,e=0,n=1,i,r){t.min=oc(t.min,e,n,i,r),t.max=oc(t.max,e,n,i,r)}function ac(t,{x:e,y:n}){sc(t.x,e.translate,e.scale,e.originPoint),sc(t.y,n.translate,n.scale,n.originPoint)}const lc=.999999999999,cc=1.0000000000001;function dc(t,e){t.min=t.min+e,t.max=t.max+e}function uc(t,e,n,i,r=.5){sc(t,e,n,ea(t.min,t.max,r),i)}function hc(t,e){uc(t.x,e.x,e.scaleX,e.scale,e.originX),uc(t.y,e.y,e.scaleY,e.scale,e.originY)}function pc(t,e){return Zl(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const mc=({current:t})=>t?t.ownerDocument.defaultView:null,fc=new WeakMap;class gc{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gl(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new xl(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(gl(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Rl(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Jl((t=>{let e=this.getAxisMotionValue(t).get()||0;if(_o.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Fl(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),r&&zr.postRender((()=>r(t,e))),Za(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(s),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Jl((t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:mc(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&zr.postRender((()=>r(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!yc(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?ea(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?ea(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,r=this.constraints;e&&Ol(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:$l(t.x,n,r),y:$l(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Wl){return!1===t?t=0:!0===t&&(t=Wl),{x:Kl(t,"left","right"),y:Kl(t,"top","bottom")}}(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Jl((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Ol(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=pc(t,n),{scroll:r}=e;return r&&(dc(i.x,r.offset.x),dc(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ql(t.x,e.x),y:ql(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Zl(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Jl((s=>{if(!yc(s,e,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?t[s]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(s,u)}));return Promise.all(l).then(s)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Za(this.visualElement,t),n.start(Ba(t,n,0,e,this.visualElement,!1))}stopAnimation(){Jl((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Jl((t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()}))}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Jl((e=>{const{drag:n}=this.getProps();if(!yc(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];r.set(t[e]-ea(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Ol(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Jl((t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Fl(t),r=Fl(e);return r>i?n=ta(e.min,e.max-i,t.min):i>r&&(n=ta(t.min,t.max-r,e.min)),go(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Jl((e=>{if(!yc(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];n.set(ea(r,o,i[e]))}))}addListeners(){if(!this.visualElement.current)return;fc.set(this.visualElement,this);const t=bl(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();Ol(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),zr.read(e);const r=vl(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Jl((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{r(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Wl,dragMomentum:s=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:s}}}function yc(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const vc=t=>(e,n)=>{t&&zr.postRender((()=>t(e,n)))};const bc=U(null);function wc(){const t=ct(bc);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,r=function(){var t=nt(z++,11);if(!t.__){for(var e=H.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}();rt((()=>i(r)),[]);const o=lt((()=>n&&n(r)),[r,n]);return!e&&n?[!1,o]:[!0]}const xc=U({}),_c=U({}),kc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tc(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Sc={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ko.test(t))return t;t=parseFloat(t)}return`${Tc(t,e.target.x)}% ${Tc(t,e.target.y)}%`}},Ac={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=ds.parse(t);if(r.length>5)return i;const o=ds.createTransformer(t),s="number"!=typeof r[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+s]/=a,r[1+s]/=l;const c=ea(a,l,.5);return"number"==typeof r[2+s]&&(r[2+s]/=c),"number"==typeof r[3+s]&&(r[3+s]/=c),o(r)}},Pc={};const{schedule:Cc,cancel:Ec}=Ir(queueMicrotask,!1);class Nc extends w{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;var o;o=Mc,Object.assign(Pc,o),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",(()=>{this.safeToRemove()})),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),kc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,o=n.projection;return o?(o.isPresent=r,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||zr.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cc.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Rc(t){const[e,n]=wc(),i=ct(xc);return vt(Nc,{...t,layoutGroup:i,switchLayoutGroup:ct(_c),isPresent:e,safeToRemove:n})}const Mc={borderRadius:{...Sc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sc,borderTopRightRadius:Sc,borderBottomLeftRadius:Sc,borderBottomRightRadius:Sc,boxShadow:Ac},Oc=["TopLeft","TopRight","BottomLeft","BottomRight"],Dc=Oc.length,Lc=t=>"string"==typeof t?parseFloat(t):t,jc=t=>"number"==typeof t||ko.test(t);function Vc(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Fc=Uc(0,.5,io),Bc=Uc(.5,.95,Br);function Uc(t,e,n){return i=>i<t?0:i>e?1:n(ta(t,e,i))}function Ic(t,e){t.min=e.min,t.max=e.max}function zc(t,e){Ic(t.x,e.x),Ic(t.y,e.y)}function Hc(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function $c(t,e,n,i,r){return t=rc(t-=e,1/n,i),void 0!==r&&(t=rc(t,1/r,i)),t}function qc(t,e,[n,i,r],o,s){!function(t,e=0,n=1,i=.5,r,o=t,s=t){_o.test(e)&&(e=parseFloat(e),e=ea(s.min,s.max,e/100)-s.min);if("number"!=typeof e)return;let a=ea(o.min,o.max,i);t===o&&(a-=e),t.min=$c(t.min,e,n,a,r),t.max=$c(t.max,e,n,a,r)}(t,e[n],e[i],e[r],e.scale,o,s)}const Wc=["x","scaleX","originX"],Kc=["y","scaleY","originY"];function Yc(t,e,n,i){qc(t.x,e,Wc,n?n.x:void 0,i?i.x:void 0),qc(t.y,e,Kc,n?n.y:void 0,i?i.y:void 0)}function Xc(t){return 0===t.translate&&1===t.scale}function Gc(t){return Xc(t.x)&&Xc(t.y)}function Jc(t,e){return t.min===e.min&&t.max===e.max}function Zc(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Qc(t,e){return Zc(t.x,e.x)&&Zc(t.y,e.y)}function td(t){return Fl(t.x)/Fl(t.y)}function ed(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class nd{constructor(){this.members=[]}add(t){za(this.members,t),t.scheduleRender()}remove(t){if(Ha(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let i=e;i>=0;i--){const t=this.members[i];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const id=(t,e)=>t.depth-e.depth;class rd{constructor(){this.children=[],this.isDirty=!1}add(t){za(this.children,t),this.isDirty=!0}remove(t){Ha(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(id),this.isDirty=!1,this.children.forEach(t)}}function od(t){const e=Ja(t)?t.get():t;return Ua(e)?e.toValue():e}const sd={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ad="undefined"!=typeof window&&void 0!==window.MotionDebug,ld=["","X","Y","Z"],cd={visibility:"hidden"};let dd=0;function ud(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function hd(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ga(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",zr,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&hd(i)}function pd({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=dd++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ad&&(sd.totalNodes=sd.resolvedTargetDeltas=sd.recalculatedProjection=0),this.nodes.forEach(gd),this.nodes.forEach(kd),this.nodes.forEach(Td),this.nodes.forEach(yd),ad&&window.MotionDebug.record(sd)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new rd)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new $a),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;var i;this.isSVG=(i=e)instanceof SVGElement&&"svg"!==i.tagName,this.instance=e;const{layoutId:r,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Ps.now(),i=({timestamp:r})=>{const o=r-n;o>=e&&(Hr(i),t(o-e))};return zr.read(i,!0),()=>Hr(i)}(i,250),kc.hasAnimatedSinceResize&&(kc.hasAnimatedSinceResize=!1,this.nodes.forEach(_d))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||Nd,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Qc(this.targetLayout,i)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...Lr(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||_d(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Hr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Sd),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hd(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let r=0;r<this.path.length;r++){const t=this.path[r];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(bd);this.isUpdating||this.nodes.forEach(wd),this.isUpdating=!1,this.nodes.forEach(xd),this.nodes.forEach(md),this.nodes.forEach(fd),this.clearAllSnapshots();const t=Ps.now();$r.delta=go(0,1e3/60,t-$r.timestamp),$r.timestamp=t,$r.isProcessing=!0,qr.update.process($r),qr.preRender.process($r),qr.render.process($r),$r.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vd),this.sharedNodes.forEach(Ad)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zr.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Gl(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Gc(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||ec(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Od((i=n).x),Od(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return Gl();const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Ld))){const{scroll:t}=this.root;t&&(dc(n.x,t.offset.x),dc(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n=Gl();if(zc(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let i=0;i<this.path.length;i++){const e=this.path[i],{scroll:r,options:o}=e;e!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&zc(n,t),dc(n.x,r.offset.x),dc(n.y,r.offset.y))}return n}applyTransform(t,e=!1){const n=Gl();zc(n,t);for(let i=0;i<this.path.length;i++){const t=this.path[i];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&hc(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),ec(t.latestValues)&&hc(n,t.latestValues)}return ec(this.latestValues)&&hc(n,this.latestValues),n}removeTransform(t){const e=Gl();zc(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!ec(t.latestValues))continue;tc(t.latestValues)&&t.updateSnapshot();const i=Gl();zc(i,t.measurePageBox()),Yc(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,i)}return ec(this.latestValues)&&Yc(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$r.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(this.layout&&(r||o)){if(this.resolvedRelativeTargetAt=$r.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gl(),this.relativeTargetOrigin=Gl(),Hl(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),zc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Gl(),this.targetWithTransforms=Gl()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Il(s.x,a.x,l.x),Il(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):zc(this.target,this.layout.layoutBox),ac(this.target,this.targetDelta)):zc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gl(),this.relativeTargetOrigin=Gl(),Hl(this.relativeTargetOrigin,this.target,t.target),zc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ad&&sd.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!tc(this.parent.latestValues)&&!nc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===$r.timestamp&&(i=!1),i)return;const{layout:r,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!o)return;zc(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const r=n.length;if(!r)return;let o,s;e.x=e.y=1;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&hc(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,ac(t,s)),i&&ec(o.latestValues)&&hc(t,o.latestValues))}e.x<cc&&e.x>lc&&(e.x=1),e.y<cc&&e.y>lc&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms=Gl());const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Hc(this.prevProjectionDelta.x,this.projectionDelta.x),Hc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ul(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&ed(this.projectionDelta.x,this.prevProjectionDelta.x)&&ed(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ad&&sd.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xl(),this.projectionDelta=Xl(),this.projectionDeltaWithTransform=Xl()}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o=Xl();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const s=Gl(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,d=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Ed));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,m,f,g;Pd(o.x,t.x,n),Pd(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hl(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=s,g=n,Cd(p.x,m.x,f.x,g),Cd(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,h=u,Jc(l.x,h.x)&&Jc(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u=Gl()),zc(u,this.relativeTarget)),a&&(this.animationValues=r,function(t,e,n,i,r,o){r?(t.opacity=ea(0,void 0!==n.opacity?n.opacity:1,Fc(i)),t.opacityExit=ea(void 0!==e.opacity?e.opacity:1,0,Bc(i))):o&&(t.opacity=ea(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Dc;s++){const r=`border${Oc[s]}Radius`;let o=Vc(e,r),a=Vc(n,r);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||jc(o)===jc(a)?(t[r]=Math.max(ea(Lc(o),Lc(a),i),0),(_o.test(a)||_o.test(o))&&(t[r]+="%")):t[r]=a)}(e.rotate||n.rotate)&&(t.rotate=ea(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zr.update((()=>{kc.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const i=Ja(t)?t:Wa(t);return i.start(Ba("",i,e,n)),i.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Dd(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||Gl();const e=Fl(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Fl(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}zc(e,n),hc(e,r),Ul(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new nd);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&ud("z",t,i,this.animationValues);for(let r=0;r<ld.length;r++)ud(`rotate${ld[r]}`,t,i,this.animationValues),ud(`skew${ld[r]}`,t,i,this.animationValues);t.render();for(const r in i)t.setStaticValue(r,i[r]),this.animationValues&&(this.animationValues[r]=i[r]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return cd;const i={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=od(null==t?void 0:t.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=od(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!ec(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1),e}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(t,e,n){let i="";const r=t.x.translate/e.x,o=t.y.translate/e.y,s=(null==n?void 0:n.z)||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:o,skewX:s,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),s&&(i+=`skewX(${s}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),r&&(i.transform=r(s,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=s.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:i.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const c in Pc){if(void 0===s[c])continue;const{correct:t,applyTo:e}=Pc[c],n="none"===i.transform?s[c]:t(s[c],o);if(e){const t=e.length;for(let r=0;r<t;r++)i[e[r]]=n}else i[c]=n}return this.options.layoutId&&(i.pointerEvents=o===this?od(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(bd),this.root.sharedNodes.clear()}}}function md(t){t.updateLayout()}function fd(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;"size"===r?Jl((t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],r=Fl(i);i.min=e[t].min,i.max=i.min+r})):Dd(r,n.layoutBox,e)&&Jl((i=>{const r=o?n.measuredBox[i]:n.layoutBox[i],s=Fl(e[i]);r.max=r.min+s,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+s)}));const s=Xl();Ul(s,e,n.layoutBox);const a=Xl();o?Ul(a,t.applyTransform(i,!0),n.measuredBox):Ul(a,e,n.layoutBox);const l=!Gc(s);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const s=Gl();Hl(s,n.layoutBox,r.layoutBox);const a=Gl();Hl(a,e,o.layoutBox),Qc(s,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=s,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function gd(t){ad&&sd.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function yd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function vd(t){t.clearSnapshot()}function bd(t){t.clearMeasurements()}function wd(t){t.isLayoutDirty=!1}function xd(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function _d(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function kd(t){t.resolveTargetDelta()}function Td(t){t.calcProjection()}function Sd(t){t.resetSkewAndRotation()}function Ad(t){t.removeLeadSnapshot()}function Pd(t,e,n){t.translate=ea(e.translate,0,n),t.scale=ea(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Cd(t,e,n,i){t.min=ea(e.min,n.min,i),t.max=ea(e.max,n.max,i)}function Ed(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Nd={duration:.45,ease:[.4,0,.1,1]},Rd=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Md=Rd("applewebkit/")&&!Rd("chrome/")?Math.round:Br;function Od(t){t.min=Md(t.min),t.max=Md(t.max)}function Dd(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=td(e),r=td(n),o=.2,!(Math.abs(i-r)<=o));var i,r,o}function Ld(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const jd=pd({attachResizeListener:(t,e)=>vl(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vd={current:void 0},Fd=pd({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Vd.current){const t=new jd({});t.mount(window),t.setOptions({layoutScroll:!0}),Vd.current=t}return Vd.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Bd={pan:{Feature:class extends hl{constructor(){super(...arguments),this.removePointerDownListener=Br}onPointerDown(t){this.session=new xl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:vc(t),onStart:vc(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&zr.postRender((()=>i(t,e)))}}}mount(){this.removePointerDownListener=bl(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends hl{constructor(t){super(t),this.removeGroupControls=Br,this.removeListeners=Br,this.controls=new gc(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Br}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Fd,MeasureLayout:Rc}};function Ud(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return bl(t.current,n,((n,r)=>{if("touch"===n.pointerType||Ml())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const s=o[i];s&&zr.postRender((()=>s(n,r)))}),{passive:!t.getProps()[i]})}const Id=(t,e)=>!!e&&(t===e||Id(t,e.parentElement));function zd(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,gl(n))}const Hd=new WeakMap,$d=new WeakMap,qd=t=>{const e=Hd.get(t.target);e&&e(t)},Wd=t=>{t.forEach(qd)};function Kd(t,e,n){const i=function({root:t,...e}){const n=t||document;$d.has(n)||$d.set(n,{});const i=$d.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(Wd,{root:t,...e})),i[r]}(e);return Hd.set(t,n),i.observe(t),()=>{Hd.delete(t),i.unobserve(t)}}const Yd={some:0,all:1};const Xd={inView:{Feature:class extends hl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Yd[i]};return Kd(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends hl{constructor(){super(...arguments),this.removeStartListeners=Br,this.removeEndListeners=Br,this.removeAccessibleListeners=Br,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=bl(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:r}=this.node.getProps(),o=r||Id(this.node.current,t.target)?n:i;o&&zr.update((()=>o(t,e)))}),{passive:!(n.onTap||n.onPointerUp)}),r=bl(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Qs(i,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=vl(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=vl(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&zd("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&zr.postRender((()=>n(t,e)))}))})),zd("down",((t,e)=>{this.startPress(t,e)}))})),e=vl(this.node.current,"blur",(()=>{this.isPressing&&zd("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Qs(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&zr.postRender((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ml()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&zr.postRender((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=bl(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=vl(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Qs(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends hl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Qs(vl(this.node.current,"focus",(()=>this.onFocus())),vl(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends hl{mount(){this.unmount=Qs(Ud(this.node,!0),Ud(this.node,!1))}unmount(){}}}},Gd={layout:{ProjectionNode:Fd,MeasureLayout:Rc}},Jd=U({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Zd=U({}),Qd="undefined"!=typeof window,tu=Qd?ot:rt,eu=U({strict:!1});function nu(t,e,n,i,r){var o,s;const{visualElement:a}=ct(Zd),l=ct(eu),c=ct(bc),d=ct(Jd).reducedMotion,u=st();i=i||l.renderer,!u.current&&i&&(u.current=i(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const h=u.current,p=ct(_c);!h||h.projection||!r||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:iu(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Ol(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}(u.current,n,r,p);const m=st(!1);qi((()=>{h&&m.current&&h.update(n,c)}));const f=n[Xa],g=st(Boolean(f)&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,f))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,f)));return tu((()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Cc.render(h.render),g.current&&h.animationState&&h.animationState.animateChanges())})),rt((()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(queueMicrotask((()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,f)})),g.current=!1))})),h}function iu(t){if(t)return!1!==t.options.allowProjection?t.projection:iu(t.parent)}function ru(t,e,n){return lt((i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):Ol(n)&&(n.current=i))}),[e])}function ou(t){return vr(t.animate)||Ar.some((e=>xr(t[e])))}function su(t){return Boolean(ou(t)||t.variants)}function au(t){const{initial:e,animate:n}=function(t,e){if(ou(t)){const{initial:e,animate:n}=t;return{initial:!1===e||xr(e)?e:void 0,animate:xr(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,ct(Zd));return at((()=>({initial:e,animate:n})),[lu(e),lu(n)])}function lu(t){return Array.isArray(t)?t.join(" "):t}const cu={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},du={};for(const Dh in cu)du[Dh]={isEnabled:t=>cu[Dh].some((e=>!!t[e]))};const uu=Symbol.for("motionComponentSymbol");function hu({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:r}){t&&function(t){for(const e in t)du[e]={...du[e],...t[e]}}(t);const o=function(t){function e(e){var n=vi({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=_i,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}((function(t,o){let s;const a={...ct(Jd),...t,layoutId:pu(t)},{isStatic:l}=a,c=au(t),d=i(t,l);if(!l&&Qd){ct(eu).strict;const t=function(t){const{drag:e,layout:n}=du;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(a);s=t.MeasureLayout,c.visualElement=nu(r,d,a,e,t.ProjectionNode)}return vt(Zd.Provider,{value:c,children:[s&&c.visualElement?vt(s,{visualElement:c.visualElement,...a}):null,n(r,t,ru(d,c.visualElement,o),d,l,c.visualElement)]})}));return o[uu]=r,o}function pu({layoutId:t}){const e=ct(xc).id;return e&&void 0!==t?e+"-"+t:t}const mu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fu(t){return"string"==typeof t&&!t.includes("-")&&!!(mu.indexOf(t)>-1||/[A-Z]/u.test(t))}function gu(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const o in n)t.style.setProperty(o,n[o])}const yu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function vu(t,e,n,i){gu(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(yu.has(r)?r:Ya(r),e.attrs[r])}function bu(t,{layout:e,layoutId:n}){return Cr.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Pc[t]||"opacity"===t)}function wu(t,e,n){var i;const{style:r}=t,o={};for(const s in r)(Ja(r[s])||e.style&&Ja(e.style[s])||bu(s,t)||void 0!==(null===(i=null==n?void 0:n.getValue(s))||void 0===i?void 0:i.liveStyle))&&(o[s]=r[s]);return o}function xu(t,e,n){const i=wu(t,e,n);for(const r in t)if(Ja(t[r])||Ja(e[r])){i[-1!==Pr.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=t[r]}return i}const _u=t=>(e,n)=>{const i=ct(Zd),r=ct(bc),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,r,o){const s={latestValues:ku(i,r,o,t),renderState:e()};return n&&(s.mount=t=>n(i,t,s)),s}(t,e,i,r);return n?o():function(t){const e=st(null);return null===e.current&&(e.current=t()),e.current}(o)};function ku(t,e,n,i){const r={},o=i(t,{});for(const h in o)r[h]=od(o[h]);let{initial:s,animate:a}=t;const l=ou(t),c=su(t);e&&c&&!l&&!1!==t.inherit&&(void 0===s&&(s=e.initial),void 0===a&&(a=e.animate));let d=!!n&&!1===n.initial;d=d||!1===s;const u=d?a:s;if(u&&"boolean"!=typeof u&&!vr(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=kr(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const i in n){let t=n[i];if(Array.isArray(t)){t=t[d?t.length-1:0]}null!==t&&(r[i]=t)}for(const i in t)r[i]=t[i]}}}return r}const Tu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Su=()=>({...Tu(),attrs:{}}),Au=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Pu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cu=Pr.length;function Eu(t,e,n){const{style:i,vars:r,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const t=e[l];if(Cr.has(l))s=!0;else if(co(l))r[l]=t;else{const e=Au(t,vs[l]);l.startsWith("origin")?(a=!0,o[l]=e):i[l]=e}}if(e.transform||(s||n?i.transform=function(t,e,n){let i="",r=!0;for(let o=0;o<Cu;o++){const s=Pr[o],a=t[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Au(a,vs[s]);l||(r=!1,i+=`${Pu[s]||s}(${t}) `),n&&(e[s]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function Nu(t,e,n){return"string"==typeof t?t:ko.transform(e+n*t)}const Ru={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mu={offset:"strokeDashoffset",array:"strokeDasharray"};function Ou(t,{attrX:e,attrY:n,attrScale:i,originX:r,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Eu(t,c,u),d)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:m}=t;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Nu(e,t.x,t.width)} ${Nu(n,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const o=r?Ru:Mu;t[o.offset]=ko.transform(-i);const s=ko.transform(e),a=ko.transform(n);t[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Du=t=>"string"==typeof t&&"svg"===t.toLowerCase(),Lu={useVisualState:_u({scrapeMotionValuesFromProps:xu,createRenderState:Su,onMount:(t,e,{renderState:n,latestValues:i})=>{zr.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),zr.render((()=>{Ou(n,i,Du(e.tagName),t.transformTemplate),vu(e,n)}))}})},ju={useVisualState:_u({scrapeMotionValuesFromProps:wu,createRenderState:Tu})};function Vu(t,e,n){for(const i in e)Ja(e[i])||bu(i,n)||(t[i]=e[i])}function Fu(t,e){const n={};return Vu(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return at((()=>{const n=Tu();return Eu(n,e,t),Object.assign({},n.vars,n.style)}),[e])}(t,e)),n}function Bu(t,e){const n={},i=Fu(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Uu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Iu(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Uu.has(t)}let zu=t=>!Iu(t);try{(Hu=require("@emotion/is-prop-valid").default)&&(zu=t=>t.startsWith("on")?!Iu(t):Hu(t))}catch(Oh){}var Hu;function $u(t,e,n,i){const r=at((()=>{const n=Su();return Ou(n,e,Du(i),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};Vu(e,t.style,t),r.style={...e,...r.style}}return r}function qu(t=!1){return(e,n,i,{latestValues:r},o)=>{const s=(fu(e)?$u:Bu)(n,r,o,e),a=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(zu(r)||!0===n&&Iu(r)||!e&&!Iu(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(n,"string"==typeof e,t),l=e!==b?{...a,...s,ref:i}:{},{children:c}=n;return y(e,{...l,children:at((()=>Ja(c)?c.get():c),[c])})}}function Wu(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return hu({...fu(n)?Lu:ju,preloadedFeatures:t,useRender:qu(i),createVisualElement:e,Component:n})}}const Ku={current:null},Yu={current:!1};const Xu=new WeakMap,Gu=[...Lo,Zo,ds],Ju=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Zu{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=zo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Ps.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,zr.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=ou(e),this.isVariantNode=su(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const u in d){const t=d[u];void 0!==a[u]&&Ja(t)&&t.set(a[u],!1)}}mount(t){this.current=t,Xu.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Yu.current||function(){if(Yu.current=!0,Qd)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ku.current=t.matches;t.addListener(e),e()}else Ku.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ku.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Xu.delete(this.current),this.projection&&this.projection.unmount(),Hr(this.notifyUpdate),Hr(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Cr.has(t),i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&zr.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{i(),r(),o&&o(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in du){const e=du[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gl()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<Ju.length;n++){const e=Ju[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const i=t["on"+e];i&&(this.propEventSubscriptions[e]=this.on(e,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],o=n[i];if(Ja(r))t.addValue(i,r);else if(Ja(o))t.addValue(i,Wa(r,{owner:t}));else if(o!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Wa(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wa(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var r;return null!=i&&("string"==typeof i&&(ao(i)||oo(i))?i=parseFloat(i):(r=i,!Gu.find(Do(r))&&ds.test(e)&&(i=xs(t,e))),this.setBaseTarget(t,Ja(i)?i.get():i)),Ja(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const r=kr(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(i=r[t])}if(n&&void 0!==i)return i;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||Ja(r)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new $a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Qu extends Zu{constructor(){super(...arguments),this.KeyframeResolver=ks}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}class th extends Qu{constructor(){super(...arguments),this.type="html",this.renderInstance=gu}readValueFromInstance(t,e){if(Cr.has(e)){const t=ws(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),r=(co(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return pc(t,e)}build(t,e,n){Eu(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return wu(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ja(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}class eh extends Qu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gl}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Cr.has(e)){const t=ws(e);return t&&t.default||0}return e=yu.has(e)?e:Ya(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return xu(t,e,n)}build(t,e,n){Ou(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){vu(t,e,0,i)}mount(t){this.isSVGTag=Du(t.tagName),super.mount(t)}}const nh=yr(Wu({...ml,...Xd,...Bd,...Gd},((t,e)=>fu(t)?new eh(e):new th(e,{allowProjection:t!==b}))));var ih=(t=>(t.EmailAddress="EmailAddress",t.MobileNumber="MobileNumber",t.CustomerId="CustomerId",t))(ih||{});const rh=[{searchType:"EmailAddress",name:"Email Address",label:"emailAddress"},{searchType:"MobileNumber",name:"Mobile Number",label:"mobileNumber"},{searchType:"CustomerId",name:"PBA Customer Id",label:"customerId"}];var oh=(t=>(t.Established="Established",t.Unestablished="Unestablished",t))(oh||{});const sh=t=>!!/\+\d{1,14}$/.test(t),ah=t=>!!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),lh=()=>{const[t,e]=it([]),[n,i]=it(!1),[r,o]=it(""),[s,a]=it(!1),[l,c]=it(!1),d=st(),u=st(),h=st({searchType:ih.MobileNumber,searchValue:""}),p=lt((async(t,n)=>{let r;if(h.current={searchType:t,searchValue:n},i(!0),a(!1),o(""),t===ih.EmailAddress)r=(async t=>{if(!Zn)throw new Error("Api has not been initialized");const e=(t=>({emailAddress:t}))(t);return(await Zn.post("/_admin/v1.0/customers/emailAddress",JSON.stringify(e))).data})(n);else if(t===ih.MobileNumber)r=(async t=>{if(!Zn)throw new Error("Api has not been initialized");const e={mobileNumber:t},n=[],i=await Zn.post("/_admin/v1.0/customer/mobileNumber",JSON.stringify(e));return n.push(i.data),n})(n);else{if(t!==ih.CustomerId)return i(!1),void o("Invalid search type.");r=(async t=>{if(!Zn)throw new Error("Api has not been initialized");const e=[],n=await Zn.get(`/_admin/v1.0/customer/${t}`);return e.push(n.data),e})(n)}r.then((t=>{e(t),i(!1),t.length>0?(d.current=t[0].id,a(!0)):o("No results found!")})).catch((()=>{o("Error: Unable to Retrieve Customer Information."),i(!1)}))}),[]),m=async()=>{await p(h.current.searchType,h.current.searchValue)},f=async(t,e)=>{d.current&&(await(async(t,e,n)=>{if(!Qn)throw new Error("Api has not been initialized");const i={mobileNumber:e,reason:n};await Qn.put(`/_admin/v1.0/customers/${t}/mobileNumber`,JSON.stringify(i))})(d.current,t,e),h.current.searchType===ih.MobileNumber&&(h.current.searchValue=t),await m())},g=async(t,e)=>{d.current&&(await(async(t,e,n)=>{if(!Qn)throw new Error("Api has not been initialized");const i={emailAddress:e,reason:n};await Qn.put(`/_admin/v1.0/customers/${t}/emailAddress`,JSON.stringify(i))})(d.current,t,e),await m())};return{searchFilter:h,searchCustomerResult:t,isLoading:n,isModalOpen:l,error:r,showCustomerDetails:s,searchCustomer:p,handleAction:async e=>{const{action:n}=e;switch(n){case"workplaceUnlink":await(async e=>{t.find((t=>t.apolloProfiles.find((t=>t.profileId===e&&t.status===oh.Established))))&&(c(!0),u.current=e)})(e.profileId);break;case"updateMobileNumber":await f(e.mobileNumber,e.reason);break;case"updateEmailAddress":await g(e.emailAddress,e.reason);break;default:console.error(`Unhandled action type: ${n}`)}},handleModalConfirm:async()=>{u.current&&(async t=>{if(!Zn)throw new Error("Api has not been initialized");await Zn.put(`/_admin/v1.0/workplace-link/${t}/unestablish`)})(u.current).then((async()=>{await m()})).catch((()=>{o("Error: Unable to Unlink Profile.")})).finally((()=>{c(!1)}))},handleModalCancel:async()=>{c(!1)}}},ch=()=>{const[t,e]=it(ih.MobileNumber),[n,i]=it("+61"),[r,o]=it({emailAddress:"",mobileNumber:"",customerId:""}),s=lt((()=>{o({emailAddress:"",mobileNumber:"",customerId:""})}),[]),a=lt((t=>!!sh(t)||(o((t=>({...t,mobileNumber:"Invalid Mobile Number!"}))),!1)),[]),l=lt(((t,e)=>{const n=t.trim();if(!n){const{label:t,name:n}=(t=>{const e=rh.find((e=>ih[e.searchType]===ih[t]));return e?{name:e.name,label:e.label}:{name:"",label:""}})(e);return o((e=>({...e,[t]:`Empty ${n}`}))),!1}return!(e===ih.EmailAddress&&!ah(n))||(o((t=>({...t,emailAddress:"Invalid Email Address!"}))),!1)}),[]);return{searchType:t,searchValue:n,errors:r,setSearchType:e,setSearchValue:i,clearErrors:s,isValidSearch:lt(((t,e)=>{switch(t){case ih.EmailAddress:case ih.CustomerId:return l(e,t);case ih.MobileNumber:return a(e);default:return!1}}),[l,a])}},dh=({labelText:t,name:e,type:n,value:i,pattern:r,className:o,allowedKeyPattern:s,required:a,onClick:l,onChange:c,...d})=>{const u=lt((t=>{s&&!s.test(t.key)&&t.preventDefault()}),[s]);return vt(b,{children:[t&&vt("label",{className:"block text-sm font-bold text-gray-700",children:t}),vt("input",{required:a??!1,className:`block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm ${o}`,name:e,type:n,value:i,onKeyPress:u,pattern:r,onClick:l,onChange:c,...d})]})},uh=({message:t,className:e,onClick:n})=>vt("div",{className:e,onClick:n,children:t}),hh=t=>{const{searchType:e,searchValue:n,errors:i,setSearchType:r,setSearchValue:o,clearErrors:s,isValidSearch:a}=ch(),[l,c]=it(!0),d=()=>{s(),c(!1)},u=t=>{const e=t.currentTarget;c(!1),o(e.value),s()};return vt(b,{children:vt("div",{className:"flex flex-col p-2",children:[vt("label",{className:"block text-sm font-bold text-gray-700",children:"Search for PBA Customer with Email Address, Mobile Number or CustomerId :"}),vt("form",{className:"w-1/3",onSubmit:i=>{i.preventDefault(),a(e,n)&&(c(!0),t.onSubmit(e,n))},children:[vt("select",{className:"mt-2 block sm:w-1/2 rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-indigo-600 text-sm leading-6",name:"searchType",id:"searchtype",value:e,onChange:t=>{s();const e=t.currentTarget.value;r(e),o("")},"data-testid":"select",children:rh.map((t=>vt("option",{value:t.searchType,children:t.name},t.searchType)))}),vt("div",{className:"sm:flex justify-between sm:mt-6 mt-2",children:[e===ih.EmailAddress&&vt(dh,{labelText:"Email Address",name:"emailAddress",placeholder:"users@email.com",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),e===ih.MobileNumber&&vt(dh,{allowedKeyPattern:/[0-9+]/,labelText:"Mobile Number",name:"mobileNumber",placeholder:"+619999999999",type:"tel",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),e===ih.CustomerId&&vt(dh,{labelText:"PBA Customer Id",name:"customerId",placeholder:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u})]}),vt("div",{className:"mt-2",children:Object.values(i).map(((t,e)=>vt(uh,{message:t,className:"text-sm text-red-600 sm:text-right"},e)))}),vt("div",{className:"sm:flex justify-end sm:mt-6",children:vt("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none "+(l?"bg-gray-400 cursor-not-allowed":""),disabled:l,children:"Search"})})]})]})})},ph=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),mh=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})),fh=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})),gh=t=>y("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",...t},y("path",{d:"M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z"})),yh=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...t},y("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"})),vh=t=>y("svg",{className:"feather feather-edit",fill:"none",height:24,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...t},y("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),y("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})),bh=t=>{var e,n,i,r,o,s,a;const[l,c]=it(t.data.apolloProfiles.length>0),d=t.data.apolloProfiles.length>0,u=at((()=>t.data.apolloProfiles.slice().sort(((t,e)=>{const n=t.status.localeCompare(e.status);return 0!==n?n:t.profileId.localeCompare(e.profileId)}))),[t.data.apolloProfiles]);return vt(b,{children:[vt("tr",{className:"divide-x divide-gray-200",children:[vt("td",{className:"whitespace-nowrap px-2 text-sm",children:vt("span",{onClick:()=>{d&&c(!l)},children:[!d&&vt(fh,{className:"h-6 w-6 border-0"}),d&&vt((()=>vt(b,{children:vt(l?mh:ph,{className:"h-6 w-6 border-0 cursor-pointer"})})),{})]})}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.id}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(e=t.data.name)?void 0:e.firstName}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(n=t.data.name)?void 0:n.lastName}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:vt("div",{className:"flex justify-between items-center",children:[null==(i=t.data.email)?void 0:i.value,(null==(o=null==(r=t.data)?void 0:r.email)?void 0:o.isVerified)&&vt(yh,{className:"h-4 w-4 border-0"}),t.searchType!==ih.EmailAddress&&vt("span",{onClick:()=>t.onEdit("emailAddress"),children:vt(vh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:vt("div",{className:"flex justify-between items-center",children:[t.data.mobileNumber,t.searchType!==ih.EmailAddress&&vt("span",{onClick:()=>t.onEdit("mobileNumber"),children:vt(vh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(s=t.data.kyc)?void 0:s.address.state}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(a=t.data.kyc)?void 0:a.dateOfBirth.substring(0,10)}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.kyc?"True":"False"})]},t.key),l&&vt(b,{children:vt("tr",{className:"divide-x divide-gray-200",children:vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",colspan:10,children:[vt("label",{className:"block text-sm font-bold text-gray-700",children:"Apollo Profiles"}),vt("div",{className:"-mx-4 mt-4 overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:-mx-6 md:mx-0 md:rounded-lg",children:vt("table",{className:"min-w-full divide-y divide-gray-500",children:[vt("thead",{className:"bg-gray-50",children:vt("tr",{className:"divide-x divide-gray-200",children:[vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Profile ID"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account ID"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Partner ID"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Status"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account Name"}),vt("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:vt("span",{className:"sr-only",children:"Action"})})]})}),vt("tbody",{className:"divide-y divide-gray-200 bg-white",children:u.map(((e,n)=>vt("tr",{className:"divide-x divide-gray-200",children:[vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.profileId}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.accountId}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.partnerId}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.status}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.accountName}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:vt("span",{onClick:()=>t.onAction({action:"workplaceUnlink",profileId:e.profileId}),children:vt(gh,{className:"h-6 w-6 border-0 "+(e.status===oh.Established?"cursor-pointer":"cursor-not-allowed opacity-50")})})})]},n)))})]})})]})})})]})},wh=t=>vt("div",{className:"-mx-4 mt-8 sm:-mx-4",children:vt("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:vt("table",{className:"min-w-full divide-y divide-gray-500",children:[vt("thead",{className:"bg-gray-50",children:vt("tr",{className:"divide-x divide-gray-200",children:[vt("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:vt("span",{className:"sr-only",children:"Action"})}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Customer ID"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"First Name"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Last Name"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Email"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Mobile"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"State"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"DOB"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"KYC Check"})]})}),vt("tbody",{className:"divide-y divide-gray-200 bg-white",children:t.data.map(((e,n)=>vt(bh,{title:"Apollo Profiles",data:e,searchType:t.searchType,onAction:t.onAction,onEdit:t.onEdit},n)))})]})})}),xh=t=>{const{inputValue:e,reason:n,isCustomerIdentityVerified:i,messages:r,isSubmitting:o,setInputValue:s,setReason:a,setIsVerifiedCustomerIdentity:l,clearMessages:c,handleSubmit:d}=((t,e)=>{const[n,i]=it(t.value),[r,o]=it(!1),[s,a]=it(""),[l,c]=it([]),[d,u]=it(!1),h=lt((()=>{c([])}),[]),p=lt((()=>{o(!1),a("")}),[]),m=lt(((t,e)=>{c((n=>[...n,{text:t,type:e}]))}),[]),f=lt((()=>""!==s.trim()),[s]),g=lt((()=>!("emailAddress"===t.type&&!ah(n)&&(m("Please enter a valid email address.","error"),1)||"mobileNumber"===t.type&&!sh(n)&&(m("Please enter a valid mobile number.","error"),1)||!f()&&(m("Reason cannot be empty.","error"),1))),[t.type,n,m,f]),y=lt((e=>{var n,i;if(e instanceof Vn){const r=(null==(i=null==(n=e.response)?void 0:n.data)?void 0:i.message)||`Failed to update ${"emailAddress"===t.type?"email address":"mobile number"}.`;m(r,"error")}else m("An unexpected error occurred.","error")}),[m,t.type]),v=lt((async()=>{if(h(),g()){u(!0);try{await e("emailAddress"===t.type?{action:"updateEmailAddress",emailAddress:n,reason:s}:{action:"updateMobileNumber",mobileNumber:n,reason:s}),m(("emailAddress"===t.type?"Email Address":"Mobile Number")+" Updated.","success"),p()}catch(i){y(i)}finally{u(!1)}}}),[h,g,t.type,p,e,n,s,m,y]);return{inputValue:n,reason:s,isCustomerIdentityVerified:r,messages:l,isSubmitting:d,setIsSubmitting:u,setInputValue:i,setReason:a,setIsVerifiedCustomerIdentity:o,clearMessages:h,handleSubmit:v}})(t.formData,t.onSubmit),u=t=>{const e=t.currentTarget;s(e.value),c()};return vt(b,{children:vt("div",{className:"flex flex-row mt-6 ml-4",children:vt("form",{onSubmit:async t=>{t.preventDefault(),await d()},children:vt("div",{className:"sm:grid sm:grid-cols-6 sm:items-baseline sm:gap-4 mt-4",children:[vt("label",{className:"col-start-1 block text-sm font-bold text-gray-700",children:"mobileNumber"===t.formData.type?"Mobile Number":"Email Address"}),vt("div",{className:"sm:col-start-2",children:["mobileNumber"===t.formData.type&&vt(dh,{allowedKeyPattern:/[0-9+]/,name:"mobileNumber",placeholder:"",type:"tel",value:e,className:"w-full",onClick:c,pattern:"[0-9+]*",onChange:u}),"emailAddress"===t.formData.type&&vt(dh,{name:"emailAddress",placeholder:"",type:"email",value:e,className:"w-full",onClick:c,onChange:u})]}),vt("div",{className:"col-start-4 col-span-3 row-span-3 flex-col text-left",children:r.map(((t,e)=>vt(uh,{message:t.text,className:"text-sm text-left font-semibold "+("error"===t.type?"text-red-600":"text-green-600")},e)))}),vt("div",{className:"col-start-2 col-span-2 relative flex items-start",children:[vt("div",{className:"flex h-6 items-center",children:vt("input",{id:"verifiedCheckbox","aria-describedby":"verified-customer-identity",name:"verifiedCheckbox",type:"checkbox",checked:i,onChange:t=>{const e=t.currentTarget;l(e.checked),c()},className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",required:!0})}),vt("div",{className:"ml-2 text-sm leading-6",children:vt("label",{className:"font-medium text-gray-900",children:"Verified Customer Identity"})})]}),vt("div",{className:"col-start-2",children:vt(dh,{name:"reason",placeholder:"Zendesk Ticket ID",type:"text",value:n,className:"w-full",onClick:c,onChange:t=>{const e=t.currentTarget;a(e.value),c()}})}),vt("div",{className:"sm:row-start-1 sm:col-start-3 sm:flex sm:justify-center sm:mt-0 mt-2",children:vt("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",disabled:o,children:"Update"})})]})})})})},_h=()=>vt("div",{className:"w-full p-4 space-y-4 animate-pulse",children:[vt("div",{className:"flex space-x-4",children:[vt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),vt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),vt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),vt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"})]}),[...Array(5)].map(((t,e)=>vt("div",{className:"flex space-x-4",children:[vt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),vt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),vt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),vt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"})]},e)))]}),kh=()=>{const{searchCustomerResult:t,isLoading:e,error:n,showCustomerDetails:i,isModalOpen:r,searchFilter:o,searchCustomer:s,handleAction:a,handleModalConfirm:l,handleModalCancel:c}=lh(),[d,u]=it("searchResult"),[h,p]=it(1);return vt(b,{children:["searchResult"===d&&vt(b,{children:[vt(nh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:[vt(hh,{onSubmit:s}),!e&&i&&vt(nh.div,{initial:{y:-50,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.2},children:vt(wh,{data:t,searchType:o.current.searchType,onAction:a,onEdit:t=>{p(1),u("mobileNumber"===t?"editMobileNumber":"editEmailAddress")}})},"customerTable")]},d),e&&vt(_h,{}),n&&vt("div",{className:"p-4 mt-2 text-red-700",children:n})]}),"searchResult"!==d&&vt(nh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:vt(Zi,{buttonName:"Customer Management",onClick:()=>{p(-1),u("searchResult")},children:vt(xh,{formData:"editMobileNumber"==d?{value:t[0].mobileNumber,type:"mobileNumber"}:{value:t[0].email.value,type:"emailAddress"},onSubmit:a})})},d),vt(Ki,{isOpen:r,heading:"Warning",message:"Are you sure you want to remove workplace access?",onConfirm:l,onCancel:c})]})};var Th=(t=>(t.Search="Search",t.BenefitsPlan="Benefits Plan",t))(Th||{});function Sh(){return(Sh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var Ah=["context","children"];function Ph(t){return this.getChildContext=function(){return t.context},B(t.children,function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e.indexOf(n=o[i])>=0||(r[n]=t[n]);return r}(t,Ah))}function Ch(){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=y(Ph,Sh({},this._props,{context:t.detail.context}),function t(e,n){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;var i=[],r={},o=0,s=e.attributes,a=e.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(r[s[o].name]=s[o].value,r[Eh(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=t(a[o],null),c=a[o].slot;c?r[c]=y(Mh,{name:c},l):i[o]=l}var d=n?y(Mh,null,i):i;return y(n||e.nodeName.toLowerCase(),r,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?F:V)(this._vdom,this._root)}function Eh(t){return t.replace(/-(\w)/g,(function(t,e){return e?e.toUpperCase():""}))}function Nh(t,e,n){if(this._vdom){var i={};i[t]=n=null==n?void 0:n,i[Eh(t)]=n,this._vdom=B(this._vdom,i),V(this._vdom,this._root)}}function Rh(){V(this._vdom=null,this._root)}function Mh(t,e){var n=this;return y("slot",Sh({},t,{ref:function(t){t?(n.ref=t,n._listener||(n._listener=function(t){t.stopPropagation(),t.detail.context=e},t.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}!function(t,e,n,i){function r(){var e=Reflect.construct(HTMLElement,[],r);return e._vdomComponent=t,e._root=e,e}(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=Ch,r.prototype.attributeChangedCallback=Nh,r.prototype.disconnectedCallback=Rh,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),r.observedAttributes=n,n.forEach((function(t){Object.defineProperty(r.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(t,e)}})})),customElements.define(e,r)}((t=>{const e={backendUrl:t["backend-url"],accessToken:t["access-token"]};rt((()=>{ei(e.backendUrl,e.accessToken,"customer-profile"),ei(e.backendUrl,e.accessToken,"flare-app-identity"),ei(e.backendUrl,e.accessToken,"benefits-plan")}),[e.backendUrl,e.accessToken]);const[n,i]=it("Search"),r=lt((t=>t===n),[n]);return vt(b,{children:[vt("style",{children:I.toString()}),vt(bt,{tabTitles:Object.entries(Th).map((([,t])=>t)),currentTab:n,onChange:i}),vt(er,{visible:r("Search"),children:vt(kh,{})}),vt(er,{visible:r("Benefits Plan"),children:vt(gr,{})})]})}),"superhero-pba-support-admin",["backend-url","access-token"])}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/superhero-pba-support-admin",
3
- "version": "1.0.1004",
3
+ "version": "1.0.1005",
4
4
  "license": "MIT",
5
5
  "main": "build/bundle.js",
6
6
  "files": [
@@ -16,21 +16,19 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@tailwindcss/forms": "^0.5.7",
19
+ "framer-motion": "^11.11.11",
19
20
  "preact": "^10.16.0",
20
21
  "preact-custom-element": "^4.3.0",
21
- "uuid": "^10.0.0"
22
+ "uuid": "^10.0.0",
23
+ "axios": "^1.6.0"
22
24
  },
23
25
  "devDependencies": {
24
26
  "@preact/preset-vite": "^2.5.0",
25
- "@testing-library/jest-dom": "^5.16.4",
26
- "@testing-library/preact": "^3.2.2",
27
27
  "@types/enzyme": "^3.10.9",
28
- "@types/jest": "^26.0.24",
29
28
  "@types/preact-custom-element": "^4.0.3",
30
29
  "@types/uuid": "^10.0.0",
31
30
  "@typescript-eslint/eslint-plugin": "^6.9.1",
32
31
  "autoprefixer": "^10.4.19",
33
- "axios": "^1.6.0",
34
32
  "axios-mock-adapter": "^1.21.1",
35
33
  "base64-inline-loader": "^2.0.1",
36
34
  "enzyme": "^3.11.0",
@@ -39,8 +37,6 @@
39
37
  "eslint-config-preact": "^1.3.0",
40
38
  "eslint-config-prettier": "^9.0.0",
41
39
  "eslint-plugin-jest": "^27.6.0",
42
- "jest": "^29.7.0",
43
- "jest-preset-preact": "^4.0.3",
44
40
  "postcss": "^8.4.38",
45
41
  "prettier": "^3.0.3",
46
42
  "tailwindcss": "^3.4.4",