@kindly/react-chat 2.40.5 → 2.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,26 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("pusher-redux"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","prop-types","pusher-redux","react-dom"],t):"object"==typeof exports?exports.kindlyChat=t(require("react"),require("prop-types"),require("pusher-redux"),require("react-dom")):e.kindlyChat=t(e.react,e["prop-types"],e["pusher-redux"],e["react-dom"])}(window,(function(e,t,n,r){return function(e){function t(t){for(var n,o,a=t[0],i=t[1],s=0,l=[];s<a.length;s++)o=a[s],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&l.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(c&&c(t);l.length;)l.shift()()}var n={},r={0:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(){return Promise.resolve()},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var a=window.webpackJsonpkindlyChat=window.webpackJsonpkindlyChat||[],i=a.push.bind(a);a.push=t,a=a.slice();for(var s=0;s<a.length;s++)t(a[s]);var c=i;return o(o.s=240)}([function(t,n){t.exports=e},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Se})),n.d(t,"b",(function(){return be})),n.d(t,"d",(function(){return Pe})),n.d(t,"e",(function(){return Me}));var r=n(69),o=n(0),a=n.n(o),i=n(162),s=n.n(i),c=n(163),l=n(164),u=n(112),d=n(77),f=n.n(d);function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},m=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!Object(r.typeOf)(e)},g=Object.freeze([]),b=Object.freeze({});function v(e){return"function"==typeof e}function y(e){return e.displayName||e.name||"Component"}function x(e){return e&&"string"==typeof e.styledComponentId}var w=void 0!==e&&(e.env.REACT_APP_SC_ATTR||e.env.SC_ATTR)||"data-styled",E="undefined"!=typeof window&&"HTMLElement"in window,O=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==e&&void 0!==e.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==e.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==e.env.REACT_APP_SC_DISABLE_SPEEDY&&e.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==e&&void 0!==e.env.SC_DISABLE_SPEEDY&&""!==e.env.SC_DISABLE_SPEEDY&&("false"!==e.env.SC_DISABLE_SPEEDY&&e.env.SC_DISABLE_SPEEDY));function k(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var _=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&k(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),s=0,c=t.length;s<c;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+=this.tag.getRule(a)+"/*!sc*/\n";return t},e}(),C=new Map,j=new Map,T=1,S=function(e){if(C.has(e))return C.get(e);for(;j.has(T);)T++;var t=T++;return C.set(e,t),j.set(t,e),t},I=function(e){return j.get(e)},A=function(e,t){t>=T&&(T=t+1),C.set(e,t),j.set(t,e)},N="style["+w+'][data-styled-version="5.3.1"]',P=new RegExp("^"+w+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),M=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},L=function(e,t){for(var n=(t.innerHTML||"").split("/*!sc*/\n"),r=[],o=0,a=n.length;o<a;o++){var i=n[o].trim();if(i){var s=i.match(P);if(s){var c=0|parseInt(s[1],10),l=s[2];0!==c&&(A(l,c),M(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(i)}}},R=function(){return"undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null},D=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(w))return r}}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(w,"active"),r.setAttribute("data-styled-version","5.3.1");var i=R();return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},B=function(){function e(e){var t=this.element=D(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}k(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),F=function(){function e(e){var t=this.element=D(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),z=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),U=E,H={isServer:!E,useCSSOMInjection:!O},$=function(){function e(e,t,n){void 0===e&&(e=b),void 0===t&&(t={}),this.options=p({},H,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&E&&U&&(U=!1,function(e){for(var t=document.querySelectorAll(N),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(w)&&(L(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return S(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(p({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new z(o):r?new B(o):new F(o),new _(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(S(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(S(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(S(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var a=I(o);if(void 0!==a){var i=e.names.get(a),s=t.getGroup(o);if(i&&s&&i.size){var c=w+".g"+o+'[id="'+a+'"]',l="";void 0!==i&&i.forEach((function(e){e.length>0&&(l+=e+",")})),r+=""+s+c+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},e}(),V=/(a)(d)/gi,q=function(e){return String.fromCharCode(e+(e>25?39:97))};function G(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=q(t%52)+n;return(q(t%52)+n).replace(V,"$1-$2")}var W=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y=function(e){return W(5381,e)};function K(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(v(n)&&!x(n))return!1}return!0}var X=Y("5.3.1"),J=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&K(e),this.componentId=t,this.baseHash=W(X,t),this.baseStyle=n,$.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var a=me(this.rules,e,t,n).join(""),i=G(W(this.baseHash,a)>>>0);if(!t.hasNameForId(r,i)){var s=n(a,"."+i,void 0,r);t.insertRules(r,i,s)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,l=W(this.baseHash,n.hash),u="",d=0;d<c;d++){var f=this.rules[d];if("string"==typeof f)u+=f;else if(f){var p=me(f,e,t,n),h=Array.isArray(p)?p.join(""):p;l=W(l,h+d),u+=h}}if(u){var m=G(l>>>0);if(!t.hasNameForId(r,m)){var g=n(u,"."+m,void 0,r);t.insertRules(r,m,g)}o.push(m)}}return o.join(" ")},e}(),Q=/^\s*\/\/.*$/gm,Z=[":","[",".","#"];function ee(e){var t,n,r,o,a=void 0===e?b:e,i=a.options,s=void 0===i?b:i,l=a.plugins,u=void 0===l?g:l,d=new c.a(s),f=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,a,i,s,c,l,u,d){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),h=function(e,r,a){return 0===r&&-1!==Z.indexOf(a[n.length])||a.match(o)?e:"."+t};function m(e,a,i,s){void 0===s&&(s="&");var c=e.replace(Q,""),l=a&&i?i+" "+a+" { "+c+" }":c;return t=s,n=a,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),d(i||!a?"":a,l)}return d.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,h))},p,function(e){if(-2===e){var t=f;return f=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||k(15),W(e,t.name)}),5381).toString():"",m}var te=a.a.createContext(),ne=(te.Consumer,a.a.createContext()),re=(ne.Consumer,new $),oe=ee();function ae(){return Object(o.useContext)(te)||re}function ie(){return Object(o.useContext)(ne)||oe}function se(e){var t=Object(o.useState)(e.stylisPlugins),n=t[0],r=t[1],i=ae(),c=Object(o.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=Object(o.useMemo)((function(){return ee({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(o.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),a.a.createElement(te.Provider,{value:c},a.a.createElement(ne.Provider,{value:l},e.children))}var ce=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=oe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return k(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=oe),this.name+e.hash},e}(),le=/([A-Z])/,ue=/([A-Z])/g,de=/^ms-/,fe=function(e){return"-"+e.toLowerCase()};function pe(e){return le.test(e)?e.replace(ue,fe).replace(de,"-ms-"):e}var he=function(e){return null==e||!1===e||""===e};function me(e,t,n,r){if(Array.isArray(e)){for(var o,a=[],i=0,s=e.length;i<s;i+=1)""!==(o=me(e[i],t,n,r))&&(Array.isArray(o)?a.push.apply(a,o):a.push(o));return a}return he(e)?"":x(e)?"."+e.styledComponentId:v(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?e:me(e(t),t,n,r):e instanceof ce?n?(e.inject(n,r),e.getName(r)):e:m(e)?function e(t,n){var r,o,a=[];for(var i in t)t.hasOwnProperty(i)&&!he(t[i])&&(Array.isArray(t[i])&&t[i].isCss||v(t[i])?a.push(pe(i)+":",t[i],";"):m(t[i])?a.push.apply(a,e(t[i],i)):a.push(pe(i)+": "+(r=i,null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in l.a?String(o).trim():o+"px")+";"));return n?[n+" {"].concat(a,["}"]):a}(e):e.toString();var c}var ge=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function be(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return v(e)||m(e)?ge(me(h(g,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:ge(me(h(e,n)))}new Set;var ve=function(e,t,n){return void 0===n&&(n=b),e.theme!==n.theme&&e.theme||t||n.theme},ye=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,xe=/(^-|-$)/g;function we(e){return e.replace(ye,"-").replace(xe,"")}var Ee=function(e){return G(Y(e)>>>0)};function Oe(e){return"string"==typeof e&&!0}var ke=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},_e=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ce(e,t,n){var r=e[n];ke(t)&&ke(r)?je(r,t):e[n]=t}function je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,a=n;o<a.length;o++){var i=a[o];if(ke(i))for(var s in i)_e(s)&&Ce(e,i[s],s)}return e}var Te=a.a.createContext();Te.Consumer;function Se(e){var t=Object(o.useContext)(Te),n=Object(o.useMemo)((function(){return function(e,t){return e?v(e)?e(t):Array.isArray(e)||"object"!=typeof e?k(8):t?p({},t,{},e):e:k(14)}(e.theme,t)}),[e.theme,t]);return e.children?a.a.createElement(Te.Provider,{value:n},e.children):null}var Ie={};function Ae(e,t,n){var r=x(e),i=!Oe(e),s=t.attrs,c=void 0===s?g:s,l=t.componentId,d=void 0===l?function(e,t){var n="string"!=typeof e?"sc":we(e);Ie[n]=(Ie[n]||0)+1;var r=n+"-"+Ee("5.3.1"+n+Ie[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,h=t.displayName,m=void 0===h?function(e){return Oe(e)?"styled."+e:"Styled("+y(e)+")"}(e):h,w=t.displayName&&t.componentId?we(t.displayName)+"-"+t.componentId:t.componentId||d,E=r&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,O=t.shouldForwardProp;r&&e.shouldForwardProp&&(O=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var k,_=new J(n,w,r?e.componentStyle:void 0),C=_.isStatic&&0===c.length,j=function(e,t){return function(e,t,n,r){var a=e.attrs,i=e.componentStyle,s=e.defaultProps,c=e.foldedComponentIds,l=e.shouldForwardProp,d=e.styledComponentId,f=e.target,h=function(e,t,n){void 0===e&&(e=b);var r=p({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,a,i=e;for(t in v(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],a=i[t],n&&a?n+" "+a:n||a):i[t]})),[r,o]}(ve(t,Object(o.useContext)(Te),s)||b,t,a),m=h[0],g=h[1],y=function(e,t,n,r){var o=ae(),a=ie();return t?e.generateAndInjectStyles(b,o,a):e.generateAndInjectStyles(n,o,a)}(i,r,m),x=n,w=g.$as||t.$as||g.as||t.as||f,E=Oe(w),O=g!==t?p({},t,{},g):t,k={};for(var _ in O)"$"!==_[0]&&"as"!==_&&("forwardedAs"===_?k.as=O[_]:(l?l(_,u.default,w):!E||Object(u.default)(_))&&(k[_]=O[_]));return t.style&&g.style!==t.style&&(k.style=p({},t.style,{},g.style)),k.className=Array.prototype.concat(c,d,y!==d?y:null,t.className,g.className).filter(Boolean).join(" "),k.ref=x,Object(o.createElement)(w,k)}(k,e,t,C)};return j.displayName=m,(k=a.a.forwardRef(j)).attrs=E,k.componentStyle=_,k.displayName=m,k.shouldForwardProp=O,k.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):g,k.styledComponentId=w,k.target=r?e.target:e,k.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),a=r&&r+"-"+(Oe(e)?e:we(y(e)));return Ae(e,p({},o,{attrs:E,componentId:a}),n)},Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?je({},e.defaultProps,t):t}}),k.toString=function(){return"."+k.styledComponentId},i&&f()(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),k}var Ne=function(e){return function e(t,n,o){if(void 0===o&&(o=b),!Object(r.isValidElementType)(n))return k(1,String(n));var a=function(){return t(n,o,be.apply(void 0,arguments))};return a.withConfig=function(r){return e(t,n,p({},o,{},r))},a.attrs=function(r){return e(t,n,p({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},a}(Ae,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Ne[e]=Ne(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=K(e),$.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,n,r){var o=r(me(this.rules,t,n,r).join(""),""),a=this.componentId+e;n.insertRules(a,a,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&$.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();function Pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=be.apply(void 0,[e].concat(n)).join(""),a=Ee(o);return new ce(a,o)}!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=R();return"<style "+[n&&'nonce="'+n+'"',w+'="true"','data-styled-version="5.3.1"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?k(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return k(2);var n=((t={})[w]="",t["data-styled-version"]="5.3.1",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=R();return r&&(n.nonce=r),[a.a.createElement("style",p({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new $({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?k(2):a.a.createElement(se,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return k(3)}}();var Me=function(){return Object(o.useContext)(Te)};t.c=Ne}).call(this,n(87))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"wb",(function(){return a})),n.d(t,"vb",(function(){return i})),n.d(t,"ub",(function(){return s})),n.d(t,"Db",(function(){return c})),n.d(t,"Eb",(function(){return l})),n.d(t,"T",(function(){return u})),n.d(t,"zb",(function(){return d})),n.d(t,"E",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"tb",(function(){return h})),n.d(t,"C",(function(){return m})),n.d(t,"qb",(function(){return g})),n.d(t,"kb",(function(){return b})),n.d(t,"z",(function(){return v})),n.d(t,"d",(function(){return y})),n.d(t,"c",(function(){return x})),n.d(t,"i",(function(){return w})),n.d(t,"hb",(function(){return E})),n.d(t,"m",(function(){return O})),n.d(t,"Cb",(function(){return k})),n.d(t,"sb",(function(){return _})),n.d(t,"eb",(function(){return C})),n.d(t,"n",(function(){return j})),n.d(t,"q",(function(){return T})),n.d(t,"K",(function(){return S})),n.d(t,"N",(function(){return I})),n.d(t,"H",(function(){return A})),n.d(t,"Q",(function(){return N})),n.d(t,"ib",(function(){return P})),n.d(t,"bb",(function(){return M})),n.d(t,"jb",(function(){return L})),n.d(t,"Y",(function(){return R})),n.d(t,"D",(function(){return D})),n.d(t,"lb",(function(){return B})),n.d(t,"f",(function(){return F})),n.d(t,"X",(function(){return z})),n.d(t,"k",(function(){return U})),n.d(t,"g",(function(){return H})),n.d(t,"Z",(function(){return $})),n.d(t,"r",(function(){return q})),n.d(t,"w",(function(){return G})),n.d(t,"J",(function(){return W})),n.d(t,"V",(function(){return Y})),n.d(t,"s",(function(){return K})),n.d(t,"cb",(function(){return X})),n.d(t,"R",(function(){return V.CONNECTED})),n.d(t,"S",(function(){return V.DISCONNECTED})),n.d(t,"P",(function(){return J})),n.d(t,"db",(function(){return Q})),n.d(t,"rb",(function(){return Z})),n.d(t,"xb",(function(){return ee})),n.d(t,"O",(function(){return te})),n.d(t,"L",(function(){return ne})),n.d(t,"o",(function(){return re})),n.d(t,"nb",(function(){return oe})),n.d(t,"y",(function(){return ae})),n.d(t,"I",(function(){return ie})),n.d(t,"e",(function(){return se})),n.d(t,"yb",(function(){return ce})),n.d(t,"fb",(function(){return le})),n.d(t,"gb",(function(){return ue})),n.d(t,"Bb",(function(){return de})),n.d(t,"j",(function(){return fe})),n.d(t,"G",(function(){return pe})),n.d(t,"Ab",(function(){return he})),n.d(t,"F",(function(){return me})),n.d(t,"ab",(function(){return ge})),n.d(t,"v",(function(){return be})),n.d(t,"B",(function(){return ve})),n.d(t,"pb",(function(){return ye})),n.d(t,"U",(function(){return xe})),n.d(t,"M",(function(){return we})),n.d(t,"p",(function(){return Ee})),n.d(t,"A",(function(){return Oe})),n.d(t,"ob",(function(){return ke})),n.d(t,"mb",(function(){return _e})),n.d(t,"u",(function(){return Ce})),n.d(t,"W",(function(){return je})),n.d(t,"t",(function(){return Te})),n.d(t,"x",(function(){return Se})),n.d(t,"l",(function(){return Ie}));const r="AGENT_STARTED_TYPING",o="AGENT_STOPPED_TYPING",a="TAKEOVER_REQUESTED",i="TAKEOVER_CANCELLED",s="TAKEOVER",c="USER_STARTED_TYPING",l="USER_STOPPED_TYPING",u="RESET_HAS_HAD_HANDOVER",d="UNAUTHENTICATED",f="IDENTIFIED",p="AUTHENTICATED",h="START_REFRESHING",m="END_REFRESHING",g="SHOW_TAB_NOTIFICATION",b="SHOW_BUBBLE_NOTIFICATION",v="DISMISS_NOTIFICATIONS",y="ANNOUNCEMENT_SHOW",x="ANNOUNCEMENT_HIDE",w="BOT_IS_TYPING",E="SET_SPLIT_TEST_LABEL",O="CLEAR_SPLIT_TEST_LABEL",k="UPDATE_SPLIT_LABEL_TIMEOUT",_="START_OVER",C="SET_LANGUAGE",j="CLOSE_CHATBUBBLE",T="CLOSE_OPTIONS_SCREEN",S="OPEN_CHATBUBBLE",I="OPEN_OPTIONS_SCREEN",A="NEW_CHAT_ID",N="POPPED_UP",P="SET_STARTED_AT",M="SET_HAS_REQUESTED_GREETING",L="SET_USER_IS_IDLE",R="SET_CHAT_HAS_STARTED",D="HIDE_CONTACT_DETAILS",B="SHOW_CONTACT_DETAILS",F="ATTACHMENT_BUTTON_CLICKED",z="SET_ATTACHMENT_FILES",U="CLEAR_ATTACHMENT_FILES",H="ATTACHMENT_PROMPT_SHOWED",$="SET_ERROR";var V=n(18);const q="CONNECTED",G="DISCONNECTED",W="NEW_TOKEN",Y="RESET_TOKEN",K="CONNECT_WITH_TRIGGER",X="SET_HEARTBEAT_ID",J="PATTERN_CONTEXT_MATCH",Q="SET_INSPECTED_CHAT_MESSAGE",Z="SPELL_CORRECTION",ee="TOGGLE_INSPECTOR",te="ENVIRONMENT_OVERRIDE",ne="OPEN_FEEDBACK_FORM",re="CLOSE_FEEDBACK_FORM",oe="SHOW_MAINTENANCE_ALERT",ae="DISMISS_MAINTENANCE_ALERT",ie="NEW_MESSAGE",se="ANONYMIZED_MESSAGE",ce="TRIGGER_DIALOGUE",le="SET_LAST_MESSAGE_SEEN",ue="SET_MESSAGE_SENT_TIME",de="UPDATE_CHAT_MESSAGE",fe="BUTTON_CLICK",pe="NEW_ATTACHMENTS",he="UPDATE_ATTACHMENT",me="MESSAGE_ATTACHMENTS_UPDATED",ge="SET_FORM",be="DELETE_CHAT",ve="DISMISS_PUSH_MESSAGE",ye="SHOW_PUSH_MESSAGE",xe="RESET_PUSH_MESSAGES";n(24);const we="OPEN_LIGHT_BOX",Ee="CLOSE_LIGHT_BOX",Oe="DISMISS_NUDGE",ke="SHOW_NUDGE",_e="SHOW_CUSTOM_NUDGE",Ce="CTA_CLICK",je="SESSION_COMPLETION",Te="COUNT_NUDGE",Se="DISCOUNT_NUDGE",Ie="CLEAR_NUDGE_INTERACTION"},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return U})),n.d(t,"c",(function(){return G})),n.d(t,"d",(function(){return X})),n.d(t,"e",(function(){return V}));var r=n(0),o=n.n(r),a=(n(4),o.a.createContext(null));var i=function(e){e()},s={notify:function(){}};function c(){var e=i,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var l=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=c())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},e}();var u=function(e){var t=e.store,n=e.context,i=e.children,s=Object(r.useMemo)((function(){var e=new l(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),c=Object(r.useMemo)((function(){return t.getState()}),[t]);Object(r.useEffect)((function(){var e=s.subscription;return e.trySubscribe(),c!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,c]);var u=n||a;return o.a.createElement(u.Provider,{value:s},i)},d=n(16),f=n(47),p=n(77),h=n.n(p),m=n(69),g="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,b=[],v=[null,null];function y(e,t){var n=e[1];return[t.payload,n+1]}function x(e,t,n){g((function(){return e.apply(void 0,t)}),n)}function w(e,t,n,r,o,a,i){e.current=r,t.current=o,n.current=!1,a.current&&(a.current=null,i())}function E(e,t,n,r,o,a,i,s,c,l){if(e){var u=!1,d=null,f=function(){if(!u){var e,n,f=t.getState();try{e=r(f,o.current)}catch(e){n=e,d=e}n||(d=null),e===a.current?i.current||c():(a.current=e,s.current=e,i.current=!0,l({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var O=function(){return[null,0]};function k(e,t){void 0===t&&(t={});var n=t,i=n.getDisplayName,s=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,c=n.methodName,u=void 0===c?"connectAdvanced":c,p=n.renderCountProp,g=void 0===p?void 0:p,k=n.shouldHandleStateChanges,_=void 0===k||k,C=n.storeKey,j=void 0===C?"store":C,T=(n.withRef,n.forwardRef),S=void 0!==T&&T,I=n.context,A=void 0===I?a:I,N=Object(f.a)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),P=A;return function(t){var n=t.displayName||t.name||"Component",a=s(n),i=Object(d.a)({},N,{getDisplayName:s,methodName:u,renderCountProp:g,shouldHandleStateChanges:_,storeKey:j,displayName:a,wrappedComponentName:n,WrappedComponent:t}),c=N.pure;var p=c?r.useMemo:function(e){return e()};function k(n){var a=Object(r.useMemo)((function(){var e=n.forwardedRef,t=Object(f.a)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),s=a[0],c=a[1],u=a[2],h=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(m.isContextConsumer)(o.a.createElement(s.Consumer,null))?s:P}),[s,P]),g=Object(r.useContext)(h),k=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(g)&&Boolean(g.store);var C=k?n.store:g.store,j=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,i)}(C)}),[C]),T=Object(r.useMemo)((function(){if(!_)return v;var e=new l(C,k?null:g.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[C,k,g]),S=T[0],I=T[1],A=Object(r.useMemo)((function(){return k?g:Object(d.a)({},g,{subscription:S})}),[k,g,S]),N=Object(r.useReducer)(y,b,O),M=N[0][0],L=N[1];if(M&&M.error)throw M.error;var R=Object(r.useRef)(),D=Object(r.useRef)(u),B=Object(r.useRef)(),F=Object(r.useRef)(!1),z=p((function(){return B.current&&u===D.current?B.current:j(C.getState(),u)}),[C,M,u]);x(w,[D,R,F,u,z,B,I]),x(E,[_,C,S,j,D,R,F,B,I,L],[C,S,j]);var U=Object(r.useMemo)((function(){return o.a.createElement(t,Object(d.a)({},z,{ref:c}))}),[c,t,z]);return Object(r.useMemo)((function(){return _?o.a.createElement(h.Provider,{value:A},U):U}),[h,U,A])}var C=c?o.a.memo(k):k;if(C.WrappedComponent=t,C.displayName=a,S){var T=o.a.forwardRef((function(e,t){return o.a.createElement(C,Object(d.a)({},e,{forwardedRef:t}))}));return T.displayName=a,T.WrappedComponent=t,h()(T,t)}return h()(C,t)}}function _(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function C(e,t){if(_(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!_(e[n[o]],t[n[o]]))return!1;return!0}var j=n(60);function T(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function S(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function I(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=S(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=S(o),o=r(t,n)),o},r}}var A=[function(e){return"function"==typeof e?I(e):void 0},function(e){return e?void 0:T((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?T((function(t){return Object(j.b)(e,t)})):void 0}];var N=[function(e){return"function"==typeof e?I(e):void 0},function(e){return e?void 0:T((function(){return{}}))}];function P(e,t,n){return Object(d.a)({},n,{},e,{},t)}var M=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,a=n.areMergedPropsEqual,i=!1;return function(t,n,s){var c=e(t,n,s);return i?o&&a(c,r)||(r=c):(i=!0,r=c),r}}}(e):void 0},function(e){return e?void 0:function(){return P}}];function L(e,t,n,r){return function(o,a){return n(e(o,a),t(r,a),a)}}function R(e,t,n,r,o){var a,i,s,c,l,u=o.areStatesEqual,d=o.areOwnPropsEqual,f=o.areStatePropsEqual,p=!1;function h(o,p){var h,m,g=!d(p,i),b=!u(o,a);return a=o,i=p,g&&b?(s=e(a,i),t.dependsOnOwnProps&&(c=t(r,i)),l=n(s,c,i)):g?(e.dependsOnOwnProps&&(s=e(a,i)),t.dependsOnOwnProps&&(c=t(r,i)),l=n(s,c,i)):b?(h=e(a,i),m=!f(h,s),s=h,m&&(l=n(s,c,i)),l):l}return function(o,u){return p?h(o,u):(s=e(a=o,i=u),c=t(r,i),l=n(s,c,i),p=!0,l)}}function D(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,a=Object(f.a)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),i=n(e,a),s=r(e,a),c=o(e,a);return(a.pure?R:L)(i,s,c,e,a)}function B(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function F(e,t){return e===t}function z(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?k:n,o=t.mapStateToPropsFactories,a=void 0===o?N:o,i=t.mapDispatchToPropsFactories,s=void 0===i?A:i,c=t.mergePropsFactories,l=void 0===c?M:c,u=t.selectorFactory,p=void 0===u?D:u;return function(e,t,n,o){void 0===o&&(o={});var i=o,c=i.pure,u=void 0===c||c,h=i.areStatesEqual,m=void 0===h?F:h,g=i.areOwnPropsEqual,b=void 0===g?C:g,v=i.areStatePropsEqual,y=void 0===v?C:v,x=i.areMergedPropsEqual,w=void 0===x?C:x,E=Object(f.a)(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),O=B(e,a,"mapStateToProps"),k=B(t,s,"mapDispatchToProps"),_=B(n,l,"mergeProps");return r(p,Object(d.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:O,initMapDispatchToProps:k,initMergeProps:_,pure:u,areStatesEqual:m,areOwnPropsEqual:b,areStatePropsEqual:y,areMergedPropsEqual:w},E))}}var U=z();function H(){return Object(r.useContext)(a)}function $(e){void 0===e&&(e=a);var t=e===a?H:function(){return Object(r.useContext)(e)};return function(){return t().store}}var V=$();function q(e){void 0===e&&(e=a);var t=e===a?V:$(e);return function(){return t().dispatch}}var G=q(),W=function(e,t){return e===t};function Y(e){void 0===e&&(e=a);var t=e===a?H:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=W);var o=t();return function(e,t,n,o){var a,i=Object(r.useReducer)((function(e){return e+1}),0)[1],s=Object(r.useMemo)((function(){return new l(n,o)}),[n,o]),c=Object(r.useRef)(),u=Object(r.useRef)(),d=Object(r.useRef)();try{a=e!==u.current||c.current?e(n.getState()):d.current}catch(e){throw c.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+c.current.stack+"\n\n"),e}return g((function(){u.current=e,d.current=a,c.current=void 0})),g((function(){function e(){try{var e=u.current(n.getState());if(t(e,d.current))return;d.current=e}catch(e){c.current=e}i({})}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),a}(e,n,o.store,o.subscription)}}var K,X=Y(),J=n(127);K=J.unstable_batchedUpdates,i=K},function(e,n){e.exports=t},function(e,t,n){"use strict";n.d(t,"r",(function(){return o})),n.d(t,"s",(function(){return a})),n.d(t,"l",(function(){return i})),n.d(t,"p",(function(){return s})),n.d(t,"q",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"f",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"a",(function(){return p})),n.d(t,"e",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"k",(function(){return g})),n.d(t,"o",(function(){return b})),n.d(t,"m",(function(){return v})),n.d(t,"d",(function(){return y})),n.d(t,"c",(function(){return x})),n.d(t,"n",(function(){return w}));var r=n(93);n.d(t,"j",(function(){return r.a}));const o=Object.freeze({NONE:"NONE",BINARY:"BINARY",EMOJIS:"EMOJIS",HAPPY_OR_NOT:"HAPPY_OR_NOT",EXTERNAL_LINK:"EXTERNAL_LINK"}),a=Object.freeze({NONE:"NONE",COLOR:"COLOR",PICTURE:"PICTURE"}),i=Object.freeze({USER:"USER",BOT:"BOT",WEBHOOK:"WEBHOOK",AGENT:"AGENT",SYSTEM:"SYSTEM",EXTERNAL:"EXTERNAL"}),s=Object.freeze({REQUEST:"request",START:"start",END:"end",CANCEL:"cancel"}),c=Object.freeze({TAKEOVER_POLL_INTERVAL_MS:1e4,TAKEOVER_REQUEST_POLL_INTERVAL_MS:2e4,REPLY_TIMEOUT_MS:4e3,REPLY_TIMEOUT_MAX_ATTEMPTS:3,REPLY_TIMEOUT_MS_MULTIPLIER:2}),l=Object.freeze({1e3:"250",800:"178",600:"124"}),u=Object.freeze({GREETING:"GREETING",FALLBACK:"FALLBACK",PATTERN_MATCH:"PATTERN_MATCH",KEYWORD_EXACT_MATCH:"KEYWORD_EXACT_MATCH",KEYWORD_MENTION:"KEYWORD_MENTION",SAMPLE_MATCH:"SAMPLE_MATCH",TRIGGER_DIALOGUE:"TRIGGER_DIALOGUE",FALLBACK_SUGGESTION:"FALLBACK_SUGGESTION",ZODIAC:"ZODIAC"}),d=Object.freeze({QUICK_REPLY:"QUICK_REPLY",EXTERNAL_LINK:"EXTERNAL_LINK",EMAIL:"EMAIL",PHONE:"PHONE",HANDOVER_REQUEST:"HANDOVER_REQUEST",PRIVACY_EXPORT:"PRIVACY_EXPORT",PRIVACY_DELETE:"PRIVACY_DELETE",DIALOGUE_TRIGGER:"DIALOGUE_TRIGGER",SUGGESTION_DIALOGUE_TRIGGER:"SUGGESTION_DIALOGUE_TRIGGER",CONTACT_DETAILS:"CONTACT_DETAILS",UPLOAD_ATTACHMENT:"UPLOAD_ATTACHMENT",CHECKBOX:"CHECKBOX",SUBMIT:"SUBMIT",edit_contact_details:"edit_contact_details",SLIDER:"SLIDER"}),f=Object.freeze({TEMPLATE:"TEMPLATE",CUSTOM:"CUSTOM"}),p=Object.freeze({CLEAN:"CLEAN",ERROR:"ERROR",INFECTED:"INFECTED",PROCESSING:"PROCESSING"}),h=Object.freeze({IMAGE:"image",PDF:"pdf",TEXT:"text"}),m=Object.freeze({DISABLED:"DISABLED",PLATFORM:"PLATFORM",EXTERNAL:"EXTERNAL",PROTOCOL:"HANDOVER_PROTOCOL"}),g=Object.freeze({PRIDE:"PRIDE",EASTER:"EASTER",CHRISTMAS:"CHRISTMAS"}),b=Object.freeze({NO_SPLIT:"X",SPLIT_A:"A",SPLIT_B:"B"}),v=18e5,y=5e3,x=Object.freeze({bottom:"20px",right:"20px"}),w=Object.freeze({PREFIX:"PREFIX",SUFFIX:"SUFFIX"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"h",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"g",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return u}));const r={darkColor:"#2c2c2c",primaryColor:"#0069ff",grayColor:"#edeeef",errorColor:"#fa4d1e",warningColor:"#ffca3a",successColor:"#50e39b",shadowColor:"rgba(0, 0, 0, 0.15)",shadowColorDark:"rgba(0, 0, 0, 0.3)"},o={textColor:"#333333",textColorLight:"#757575"},a={fontSizeSmall:"11px",fontSize12:"12px",fontSizeP:"14px",fontSizeH2:"26px",fontSizeH3:"22px",fontSizeH4:"19px",fontSizeH5:"16px"},i={tablet:"768px",phone:"500px"},s={minTablet:`(min-width: calc(${i.tablet} + 1px))`,maxTablet:`(max-width: ${i.tablet})`,maxPhone:`(max-width: ${i.phone})`,maxPhoneHeight:"(max-height: 760px)"},c={headerIndex:"15",overlayIndex:"20",contextMenuIndex:"30"},l={minWidth:190},u={icon:"10px",wrapper:"6px"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return l})),n.d(t,"j",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"m",(function(){return f})),n.d(t,"n",(function(){return p})),n.d(t,"p",(function(){return h})),n.d(t,"q",(function(){return m})),n.d(t,"k",(function(){return g})),n.d(t,"o",(function(){return b})),n.d(t,"l",(function(){return v})),n.d(t,"i",(function(){return y}));const r=e=>{let{agent:t}=e;return t},o=e=>{let{alerts:t}=e;return t},a=e=>{let{announcement:t}=e;return t},i=e=>{let{bot:t}=e;return t},s=e=>{let{chatbubble:t}=e;return t},c=e=>{let{connection:t}=e;return t},l=e=>{let{environment:t}=e;return t},u=e=>{let{inspector:t}=e;return t},d=e=>{let{feedback:t}=e;return t},f=e=>{let{maintenanceAlert:t}=e;return t},p=e=>{let{messages:t}=e;return t},h=e=>{let{privacy:t}=e;return t},m=e=>{let{pushMessages:t}=e;return t},g=e=>{let{lightBox:t}=e;return t},b=e=>{let{nudge:t}=e;return t},v=e=>{let{local:t}=e;return t},y=e=>{let{messages:{forms:t}}=e;return t}},function(e,t,n){"use strict";n.d(t,"d",(function(){return r.a})),n.d(t,"ub",(function(){return r.c})),n.d(t,"vb",(function(){return r.d})),n.d(t,"t",(function(){return a})),n.d(t,"Y",(function(){return i})),n.d(t,"z",(function(){return s.c})),n.d(t,"rb",(function(){return u})),n.d(t,"Q",(function(){return d})),n.d(t,"X",(function(){return f})),n.d(t,"sb",(function(){return p})),n.d(t,"f",(function(){return h})),n.d(t,"nb",(function(){return m})),n.d(t,"e",(function(){return g.d})),n.d(t,"R",(function(){return g.n})),n.d(t,"h",(function(){return g.e})),n.d(t,"w",(function(){return g.h})),n.d(t,"H",(function(){return g.l})),n.d(t,"k",(function(){return g.f})),n.d(t,"eb",(function(){return g.o})),n.d(t,"l",(function(){return g.g})),n.d(t,"F",(function(){return g.k})),n.d(t,"b",(function(){return g.c})),n.d(t,"E",(function(){return g.j})),n.d(t,"D",(function(){return g.i})),n.d(t,"lb",(function(){return g.p})),n.d(t,"P",(function(){return g.m})),n.d(t,"a",(function(){return g.b})),n.d(t,"A",(function(){return b.d})),n.d(t,"B",(function(){return b.e})),n.d(t,"n",(function(){return b.b})),n.d(t,"m",(function(){return b.a})),n.d(t,"o",(function(){return b.c})),n.d(t,"T",(function(){return v})),n.d(t,"mb",(function(){return y})),n.d(t,"N",(function(){return x})),n.d(t,"O",(function(){return w})),n.d(t,"i",(function(){return E})),n.d(t,"V",(function(){return k})),n.d(t,"W",(function(){return _})),n.d(t,"ab",(function(){return C})),n.d(t,"s",(function(){return j})),n.d(t,"K",(function(){return T.c})),n.d(t,"J",(function(){return T.b})),n.d(t,"S",(function(){return T.f})),n.d(t,"gb",(function(){return T.h})),n.d(t,"L",(function(){return T.d})),n.d(t,"qb",(function(){return T.i})),n.d(t,"g",(function(){return T.a})),n.d(t,"M",(function(){return T.e})),n.d(t,"U",(function(){return T.g})),n.d(t,"x",(function(){return S.b})),n.d(t,"r",(function(){return S.a})),n.d(t,"cb",(function(){return I.c})),n.d(t,"v",(function(){return I.b})),n.d(t,"p",(function(){return l.a})),n.d(t,"tb",(function(){return l.h})),n.d(t,"fb",(function(){return l.d})),n.d(t,"pb",(function(){return l.f})),n.d(t,"C",(function(){return l.b})),n.d(t,"y",(function(){return A.c})),n.d(t,"c",(function(){return A.a})),n.d(t,"q",(function(){return A.b})),n.d(t,"kb",(function(){return A.i})),n.d(t,"hb",(function(){return A.f})),n.d(t,"jb",(function(){return A.h})),n.d(t,"ib",(function(){return A.g})),n.d(t,"I",(function(){return A.d})),n.d(t,"G",(function(){return N})),n.d(t,"j",(function(){return P})),n.d(t,"ob",(function(){return M.e})),n.d(t,"u",(function(){return M.a})),n.d(t,"bb",(function(){return M.c})),n.d(t,"Z",(function(){return M.b})),n.d(t,"db",(function(){return M.d}));var r=n(94),o=n(2);const a=()=>e=>{e({type:o.z})},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return n=>{n({type:o.d,payload:{text:e}}),t>0&&setTimeout(()=>n({type:o.c}),t)}};var s=n(30),c=n(5),l=n(9);const u=()=>(e,t)=>{const{isTypingTimeoutId:n}=t().bot;clearTimeout(n),e({type:o.i,isTyping:!1,isTypingTimeoutId:null})},d=()=>(e,t)=>{const{isTypingTimeoutId:n,typingDuration:r}=t().bot;clearTimeout(n);const a=setTimeout(()=>e(u()),Math.max(r,15e3));e({type:o.i,isTyping:!0,isTypingTimeoutId:a})},f=e=>t=>{t({type:o.hb,splitTestLabel:e})},p=()=>e=>{e({type:o.Cb})},h=()=>e=>{e({type:o.m})},m=(e,t)=>async(n,r)=>{const{PAT_HOST:o}=r().environment,{botKey:a,currentLanguage:i}=r().chatbubble,{token:u}=r().connection,d=await n(Object(s.b)());n(Object(l.f)({method:"post",url:`${o}/chatbubble/${c.j}/conversion/`,data:{split:e||"X",is_order:t,language_code:i},...Object(l.a)({botKey:a,token:u},{withCurrentUrl:!0,extra:d})}))};var g=n(55),b=n(66);const v=e=>({type:o.db,chatMessageId:e}),y=()=>({type:o.xb}),x=e=>(t,n)=>{const{bot:{feedbackFormType:r},feedback:{token:o},environment:{PAT_HOST:a}}=n(),i={feedback_type:r,rating:e};t(Object(l.f)({method:"post",url:`${a}/chatbubble/${c.j}/feedback`,data:{feedback:i},...Object(l.a)({token:o})}))},w=e=>(t,n)=>{const{feedback:{token:r},environment:{PAT_HOST:o}}=n();t(Object(l.f)({method:"patch",url:`${o}/chatbubble/${c.j}/feedback`,data:{freeform_text:e},...Object(l.a)({token:r})}))},E=()=>(e,t)=>{var n;e({type:o.o}),null!==(n=t().chatbubble)&&void 0!==n&&n.active&&e({type:o.n})};var O=n(79);const k=e=>t=>{t({type:O.a,context:e})},_=e=>(t,n)=>{if("string"!=typeof e)throw new Error(`label needs to be a string, received ${typeof e}`);t({type:O.b,label:e});const{connection:{token:r},environment:{PAT_HOST:o},local:{labels:a}}=n();r&&t(Object(l.f)({method:"post",url:`${o}/chatbubble/${c.j}/update_labels`,data:{labels:a},...Object(l.a)({token:r})}))},C=e=>(t,n)=>{const{link_text:r,link_location:a,text_content:i}=e,{dismissed:s}=n().maintenanceAlert;s||setTimeout(()=>t({type:o.nb,linkText:r,linkLocation:a,textContent:i}),2e3)},j=()=>(e,t)=>{const{show:n}=t().maintenanceAlert;n&&e({type:o.y})};var T=n(68),S=n(76),I=n(71),A=n(43);const N=e=>t=>{t({type:o.M,imageUrl:e})},P=()=>e=>{e({type:o.p})};var M=n(34)},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"f",(function(){return E})),n.d(t,"e",(function(){return O})),n.d(t,"g",(function(){return k})),n.d(t,"b",(function(){return _})),n.d(t,"c",(function(){return C}));var r=n(58),o=n.n(r),a=n(18),i=n(5),s=n(53),c=n(159),l=n(17),u=n(54),d=n(2);const f=function(e){let{token:t,botKey:n,jwt:r}=e,{withCurrentUrl:o,withVersion:a,extra:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{headers:{...t?{"kindly-chatbubble-token":t}:{},...n?{"kindly-bot-key":n}:{},...r?{Authorization:`Bearer ${r}`}:{},...o?{"Current-Url":window.location.href}:{},...a?{"kindly-chat-version":u.a}:{},...i}}},p=e=>async(t,n)=>{const{connection:{token:r},environment:{PAT_HOST:a}}=n();return r?o.a.patch(`${a}/chatbubble/${i.j}/user_left/`,{},f({token:r,botKey:e})):null},h=()=>(e,t)=>{const{heartbeatId:n}=t().connection;n&&(clearTimeout(n),e({type:d.cb,heartbeatId:void 0}))},m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return async(n,r)=>{const{agent:{takenOver:o,requestedTakeover:i}}=r();i?n({type:d.vb}):o&&n({type:d.ub,data:{taken_over:!1}}),n({type:d.U}),n(p(e)),n(h());try{Object(a.disconnect)(),t||n({type:d.n})}catch(e){console.warn(e)}finally{n({type:d.V}),n({type:d.sb,botKey:e,keepOpen:t}),n({type:d.T}),t||setTimeout(()=>n({type:d.Y,chatHasStarted:!1}),300)}}},g=Object.freeze({MAX:3,TIMEOUT_MS:2e3,TIMEOUT_MULTIPLIER:2,RESPONSE_STATUSES:[401,403]});let b=0;const v=(e,t)=>function(n){if(!e.response||!Object(l.a)(e.response.status,g.RESPONSE_STATUSES))return console.error(e),null;if(b+=1,b>g.MAX)return console.error(`${t.url} returned ${e.response.status}, max chats restarts exceeded`),null;console.warn(`${t.url} returned ${e.response.status}, starting new chat`);const r=g.TIMEOUT_MS*g.TIMEOUT_MULTIPLIER**(b-1);return setTimeout(()=>n((e,t)=>{const{botKey:n}=t().chatbubble;e(m(n,!0))}),r),null},y=()=>(e,t)=>{const{heartbeatTTL:n}=t().bot,r=setTimeout(()=>e((e,t)=>{const{connection:{heartbeatId:n,token:r},environment:{PAT_HOST:o}}=t();clearTimeout(n),e({type:d.cb,heartbeatId:void 0}),e(E({method:"post",url:`${o}/chatbubble/${i.j}/heartbeat/`,data:{version:u.a},...f({token:r})}))}),.75*n*1e3);e({type:d.cb,heartbeatId:r})},x=()=>e=>{e(h()),e(y())},w=e=>{let{chatMessages:t,buttonClicks:n}=e;return(null==n?void 0:n.length)>0||Boolean((null!=t?t:[]).find(e=>{let{from_bot:t}=e;return!t}))},E=function(e){let{onError:t,restartOnError:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(r,a)=>{if(!e.url)return console.error("Tried to call transport without supplying url"),null;if(!e.method)return console.error("Tried to call transport without supplying method"),null;const{bot:i,messages:c}=a();e.headers={"kindly-chat-version":u.a,[s.a]:Object(s.b)(),...e.headers||{}};try{const t=await o()(e);return i.heartbeatEnabled&&w(c)&&r(x()),t}catch(o){return t?t(o,e):n?r(v(o,e)):null}}},O=e=>{const t=`private-chatbubble-${e}`;Object(a.subscribe)(t,"message",d.I),Object(a.subscribe)(t,"takeover",d.ub),Object(a.subscribe)(t,"agent_started_typing",d.a),Object(a.subscribe)(t,"agent_stopped_typing",d.b),Object(a.subscribe)(t,"pattern-context-match",d.P),Object(a.subscribe)(t,"spell-correction",d.rb),Object(a.subscribe)(t,"message-attachments-updated",d.F),Object(a.subscribe)(t,"new-attachments",d.G)},k=e=>{const t=`private-chatbubble-${e}`;Object(a.unsubscribe)(t,"message",d.I),Object(a.unsubscribe)(t,"takeover",d.ub),Object(a.unsubscribe)(t,"agent_started_typing",d.a),Object(a.unsubscribe)(t,"agent_stopped_typing",d.b),Object(a.unsubscribe)(t,"pattern-context-match",d.P),Object(a.unsubscribe)(t,"spell-correction",d.rb),Object(a.unsubscribe)(t,"message-attachments-updated",d.F),Object(a.unsubscribe)(t,"new-attachments",d.G)},_=e=>{let{message:t,error:n,level:r="info",extra:o={}}=e;return(e,a)=>{const s=a(),{connection:{token:l},environment:{PAT_HOST:u}}=s,d=Object(c.a)({level:r,error:n,message:t,reduxState:s,extra:o});e(E({method:"post",url:`${u}/chatbubble/${i.j}/log`,data:d,...f({token:l,withCurrentUrl:!0})}))}},C=e=>t=>{t({type:d.gb,messageSentTime:e})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"j",(function(){return u})),n.d(t,"i",(function(){return d})),n.d(t,"n",(function(){return f})),n.d(t,"p",(function(){return p})),n.d(t,"q",(function(){return h})),n.d(t,"l",(function(){return m})),n.d(t,"o",(function(){return g})),n.d(t,"h",(function(){return b})),n.d(t,"f",(function(){return v})),n.d(t,"g",(function(){return y})),n.d(t,"k",(function(){return x})),n.d(t,"m",(function(){return w}));var r=n(0),o=n.n(r);var a=function(e){return o.a.createElement("svg",Object.assign({},e,{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M14.25 7.73999L8.75 12.99L14.25 18.24",stroke:"white",strokeWidth:"1.5",strokeLinecap:"square"}))};var i=function(e){return o.a.createElement("svg",Object.assign({},e,{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M9.75 7.73999L15.25 12.99L9.75 18.24",stroke:"white",strokeWidth:"1.5",strokeLinecap:"square"}))};var s=function(e){return o.a.createElement("svg",Object.assign({},e,{viewBox:"0 0 65 67",xmlns:"https://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M64.557 65.487c-4 .482-7.42 1.138-10.86 1.257-5.824.201-11.693.466-17.483-.018-11.677-.976-22.173-4.749-29.675-14.559C-7.841 33.36 2.774 5.123 25.93.64c18.296-3.542 35.275 7.95 38.513 26.317 1.854 10.52-.945 19.876-8.035 27.882l-1.501 1.699 9.65 8.949z",fill:"#0069ff"}))};var c=function(e){return o.a.createElement("svg",Object.assign({"data-name":"Layer 1"},e,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 747 768"}),o.a.createElement("defs",null,o.a.createElement("linearGradient",{id:"a",x1:"373.51",x2:"373.51",y2:"768",gradientUnits:"userSpaceOnUse"},o.a.createElement("stop",{offset:".04",stopColor:"#ff0006"}),o.a.createElement("stop",{offset:".04",stopColor:"#ff0106"}),o.a.createElement("stop",{offset:".08",stopColor:"#ff3204"}),o.a.createElement("stop",{offset:".13",stopColor:"#ff5802"}),o.a.createElement("stop",{offset:".17",stopColor:"#ff7401"}),o.a.createElement("stop",{offset:".2",stopColor:"#ff8500"}),o.a.createElement("stop",{offset:".23",stopColor:"#ff8b00"}),o.a.createElement("stop",{offset:".28",stopColor:"#fda900"}),o.a.createElement("stop",{offset:".42",stopColor:"#faec00"}),o.a.createElement("stop",{offset:".56",stopColor:"#00963e"}),o.a.createElement("stop",{offset:".75",stopColor:"#314ea6"}),o.a.createElement("stop",{offset:".94",stopColor:"#991588"}))),o.a.createElement("path",{d:"M747.2 373.69C747.2 167.31 579.89 0 373.51 0S-.18 167.31-.18 373.69c0 165 107 304.87 255.27 354.41 63.32 25 142.21 39.9 227.77 39.9 89.71 0 172.07-16.36 236.86-43.63l-86.65-82A372.47 372.47 0 00747.2 373.69z",fill:"url(#a)"}))};n(4);var l=function(e){let{color:t,...n}=e;return o.a.createElement("svg",Object.assign({},n,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M17.25 6.75L6.75 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.a.createElement("path",{d:"M6.75 6.75L17.25 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};var u=function(e){let{width:t="16px",height:n="12px",fill:r="rgb(0, 105, 255)"}=e;return o.a.createElement("svg",{width:t,height:n,viewBox:"0 0 16 12"},o.a.createElement("path",{d:"M8 12c3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3C14.4 3.1 11.6 0 8 0 4.4 0 1.6 3.1.4 4.9c-.5.7-.5 1.6 0 2.2C1.6 8.9 4.4 12 8 12zm0-9c1.7 0 3 1.3 3 3S9.7 9 8 9 5 7.7 5 6s1.3-3 3-3z",fill:r}))};var d=function(e){let{width:t="16px",height:n="16px",fill:r="rgb(0, 105, 255)"}=e;return o.a.createElement("svg",{width:t,height:n},o.a.createElement("g",{fill:r},o.a.createElement("path",{d:"M14.6 5.6l-8.2 8.2c.5.1 1.1.2 1.6.2 3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3-.2-.3-.6-.7-1-1.2zM14.3.3L11.6 3C10.5 2.4 9.3 2 8 2 4.4 2 1.6 5.1.4 6.9c-.5.7-.5 1.6 0 2.2.5.8 1.4 1.8 2.4 2.7L.3 14.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3l14-14c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0zm-9 9C5.1 8.9 5 8.5 5 8c0-1.7 1.3-3 3-3 .5 0 .9.1 1.3.3l-4 4z"})))};var f=function(e){let{...t}=e;return o.a.createElement("svg",Object.assign({},t,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M18.25 12.25L5.75 12.25",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};var p=function(e){return o.a.createElement("svg",Object.assign({},e,{viewBox:"0 0 30 30",xmlns:"https://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M30 0L0 12.927l11.523 3.782 5.531-5.646 2.75 2.34-5.382 5.728L19.02 30z",fill:"#0069FF",fillRule:"evenodd"}))};var h=function(e){return o.a.createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M5.62117 14.9627L6.72197 15.1351C7.53458 15.2623 8.11491 16.0066 8.05506 16.8451L7.97396 17.9816C7.95034 18.3127 8.12672 18.6244 8.41885 18.7686L9.23303 19.1697C9.52516 19.3139 9.87399 19.2599 10.1126 19.0352L10.9307 18.262C11.5339 17.6917 12.4646 17.6917 13.0685 18.262L13.8866 19.0352C14.1252 19.2608 14.4733 19.3139 14.7662 19.1697L15.5819 18.7678C15.8733 18.6244 16.0489 18.3135 16.0253 17.9833L15.9441 16.8451C15.8843 16.0066 16.4646 15.2623 17.2772 15.1351L18.378 14.9627C18.6985 14.9128 18.9568 14.6671 19.0292 14.3433L19.23 13.4428C19.3025 13.119 19.1741 12.7831 18.9064 12.5962L17.9875 11.9526C17.3095 11.4774 17.1024 10.5495 17.5119 9.82051L18.067 8.83299C18.2284 8.54543 18.2017 8.18538 17.9993 7.92602L17.4363 7.2035C17.2339 6.94413 16.8969 6.83701 16.5867 6.93447L15.5221 7.26794C14.7355 7.51441 13.8969 7.1012 13.5945 6.31908L13.1866 5.26148C13.0669 4.95218 12.7748 4.7492 12.4496 4.75L11.5472 4.75242C11.222 4.75322 10.9307 4.95782 10.8126 5.26793L10.4149 6.31344C10.1157 7.1004 9.27319 7.51683 8.4842 7.26874L7.37553 6.92078C7.0645 6.82251 6.72591 6.93044 6.52355 7.19142L5.96448 7.91474C5.76212 8.17652 5.73771 8.53738 5.90228 8.82493L6.47 9.81487C6.88812 10.5446 6.68339 11.4814 6.00149 11.9591L5.0936 12.5954C4.82588 12.7831 4.69754 13.119 4.76998 13.442L4.97077 14.3425C5.04242 14.6671 5.30069 14.9128 5.62117 14.9627Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.a.createElement("path",{d:"M13.5911 10.4089C14.4696 11.2875 14.4696 12.7125 13.5911 13.5911C12.7125 14.4696 11.2875 14.4696 10.4089 13.5911C9.53036 12.7125 9.53036 11.2875 10.4089 10.4089C11.2875 9.53036 12.7125 9.53036 13.5911 10.4089Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};var m=function(e){return o.a.createElement("svg",Object.assign({},e,{viewBox:"0 0 39 35",xmlns:"https://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M21.04 22.88l-4.5-4.4.05-.04c3.09-3.4 5.29-7.3 6.58-11.43h5.2V3.5H15.94V0h-3.54v3.5H0v3.48h19.8a27.56 27.56 0 01-5.62 9.38 27.59 27.59 0 01-4.1-5.86H6.55a30.7 30.7 0 005.28 7.98l-9.01 8.8 2.5 2.47L14.19 21l5.52 5.44 1.34-3.56zM31.02 14h-3.54L19.5 35h3.55l1.99-5.25h8.42l2 5.25H39l-7.98-21zm-4.65 12.25l2.88-7.59 2.88 7.59h-5.76z",fill:"#000",fillRule:"nonzero"}))};var g=function(e){return o.a.createElement("svg",Object.assign({},e,{viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M8.7.2l.7 6.4 2.1-2.1A5.01 5.01 0 018 13a5.01 5.01 0 01-3.5-8.5c.6-.6 1.4-1.1 2.3-1.3l-.6-1.9C5 1.6 3.9 2.2 3 3.1A7.06 7.06 0 003 13c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L15 .9 8.7.2z",fill:"#0069ff",fillRule:"evenodd"}))};var b=function(e){return o.a.createElement("svg",Object.assign({},e,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M3.16675 4.49998V11.5C3.16675 12.2364 3.7637 12.8333 4.50008 12.8333H11.5001C12.2365 12.8333 12.8334 12.2364 12.8334 11.5V4.49998C12.8334 3.7636 12.2365 3.16665 11.5001 3.16665H4.50008C3.7637 3.16665 3.16675 3.7636 3.16675 4.49998Z",stroke:"white",strokeLinecap:"square"}),o.a.createElement("path",{d:"M5.16675 8.49999V10.8333H7.50008",stroke:"white",strokeLinecap:"square"}),o.a.createElement("path",{d:"M10.8333 7.49999V5.16666H8.5",stroke:"white",strokeLinecap:"square"}))};var v=function(){return o.a.createElement(o.a.Fragment,null,o.a.createElement("title",null,"Easter bunny - Ear back"),o.a.createElement("path",{d:"M3.383832 27.44434c-.5696765 0-1.0926451-.3662715-1.2678229-.9298759C-.097824 19.4159224-.5597867 7.1662958 2.1847886 2.6020193 2.8946153 1.4219446 3.8016913.717756 4.8787494.5088278 5.1006483.4662629 5.3264406.44434 5.5561263.44434c5.5241917 0 12.1254407 13.2736523 13.7098937 21.8811524.127168.686122-.307554 1.3528962-.990127 1.5192729L3.7017511 27.4056447c-.1051093.0270867-.2128098.0386953-.3179191.0386953z",fill:"#D8AB31",fillRule:"nonzero"}))};var y=function(){return o.a.createElement(o.a.Fragment,null,o.a.createElement("title",null,"Easter bunny - Ear"),o.a.createElement("g",{fillRule:"nonzero",fill:"none"},o.a.createElement("path",{d:"M.52124097 23.12346c1.1077-2.9952571 2.4707-5.8635571 3.89508572-8.1808C8.23468383 8.72614571 17.4631981.05566 23.8178267.05566c1.0630571 0 2.0228857.23577143 2.8529571.70172857 1.3881143.78125714 2.3381715 2.17075714 2.8236572 4.12945714C31.0973981 11.3502886 27.3599553 22.6421457 23.9768695 27.89326c-1.8024571 2.7943571-4.3457 5.7854286-7.0703142 8.3286857C18.4230124 39.9496314-2.68050189 22.5919314.52124097 23.12346z",fill:"#FFCA3A"}),o.a.createElement("path",{d:"M5.88116954 25.1058886c.97795715-2.6437 2.1861-5.1911286 3.40262857-7.1707572C13.050541 11.8037171 21.1239267 4.75293143 23.788541 5.76996c2.0824285 1.37882857-1.6322572 14.3987143-4.6149572 19.0290143-1.536 2.3800286-3.7834857 5.0223143-6.1663 7.2461-.7651143-1.1467572-1.8275714-2.5236714-3.26729997-3.9141429-1.37687143-1.3297-2.72652857-2.3123285-3.85881429-3.0250428z",fill:"#ED69AB"})))};var x=function(){return o.a.createElement(o.a.Fragment,null,o.a.createElement("title",null,"Easter bunny - eyes and nose"),o.a.createElement("g",{fill:"#444",fillRule:"nonzero"},o.a.createElement("path",{d:"M.90472674 8.99584399c2.74085003.33653407 4.68991811 2.83122741 4.35338405 5.57207751-.14122056 1.1501491-.66582961 2.1538328-1.42827251 2.9096051l.02155026-.033559c-.29718086.4016151-.44174483.6949895-.43369189.8801234.00805293.1851339.06770527.4164406.17895702.69392l.22780297.4902169c.71471582 1.4864853 1.36458452 2.3467141 1.904725 2.5661605.52176099.2119794 1.11876984-.367668 1.73951555-2.002382l.16243825-.4505538c.08961326-.2611974.37400147-.4002938.63519886-.3106806.26119739.0896133.40029381.3740015.31068055.6351989-.84494502 2.4627766-1.8976385 3.5938393-3.22423148 3.0548755-1.04273744-.4236399-2.26408063-2.33244-3.34632177-5.0376669l-.22156463-.7730561C.89682689 14.6373453.55365859 11.8550647.90472674 8.99584399zM22.9999996 10c-2.7571667 0-5-2.24283333-5-5s2.2428333-5 5-5 5 2.24283333 5 5-2.2428333 5-5 5z"})))};var w=function(e){return o.a.createElement("svg",Object.assign({},e,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o.a.createElement("path",{d:"M11.1667 8.83333L12.0001 8C13.1047 6.89539 13.1047 5.10456 12.0001 3.99999C10.8955 2.89543 9.10468 2.89543 8.00008 3.99999L7.16675 4.83333",stroke:"white",strokeLinecap:"square",strokeLinejoin:"round"}),o.a.createElement("path",{d:"M4.83315 7.16666L3.99981 8C2.89525 9.1046 2.89525 10.8954 3.99981 12C5.10438 13.1046 6.89521 13.1046 7.99981 12L8.83315 11.1667",stroke:"white",strokeLinecap:"square",strokeLinejoin:"round"}),o.a.createElement("path",{d:"M9.5 6.5L6.5 9.5",stroke:"white",strokeLinecap:"square",strokeLinejoin:"round"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"h",(function(){return a})),n.d(t,"b",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"c",(function(){return g})),n.d(t,"g",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"f",(function(){return y}));var r=n(1);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return Object(r.b)(["animation-timing-function:ease;animation-iteration-count:1;animation-fill-mode:forwards;animation-duration:","ms;"],e)},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return Object(r.b)(["height:0;width:0;padding:0;transition:width 0.1ms ease ","ms,padding 0.1ms ease ","ms,height 0.1ms ease ","ms;"],e,e,e)},i=Object(r.d)(["0%{opacity:0;transform:translateY(-10px);}100%{opacity:1;transform:translateY(0);}"]),s=Object(r.d)(["0%{opacity:0;transform:translateY(10px);}100%{opacity:1;transform:translateY(0);}"]),c=Object(r.d)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:1;transform:translateX(0);}"]),l=Object(r.d)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:0.8;transform:translateX(0);}"]),u=Object(r.d)(["0%{opacity:0;transform:translateX(15px);}100%{opacity:1;transform:translateX(0);}"]),d=Object(r.d)(["0%{opacity:0;transform:translateY(-100%);}100%{opacity:1;transform:translateY(0);}"]),f=Object(r.d)(["0%{opacity:0;}100%{opacity:1;}"]),p=Object(r.d)(["50%{opacity:0.5;}"]),h=(Object(r.d)(["50%{opacity:0.2;}"]),Object(r.d)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"])),m=Object(r.b)([""," animation-name:",""],o(),f),g=Object(r.b)([""," animation-name:",""],o(),i),b=Object(r.b)([""," animation-name:",""],o(),s),v=Object(r.b)([""," animation-name:",""],o(),c),y=(Object(r.b)([""," animation-name:",""],o(),l),Object(r.b)([""," animation-name:",""],o(),u));Object(r.b)([""," animation-name:",""],o(),d),Object(r.b)(["animation:1.8s "," infinite 0.3s;"],h)},function(e,t,n){"use strict";n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"f",(function(){return f})),n.d(t,"e",(function(){return p}));var r=n(1),o=n(23),a=n(19),i=n(6);const s=r.c.a.withConfig({displayName:"utils__Link",componentId:"sc-g08yf6-0"})(["text-decoration:underline;cursor:pointer;",""],a.a),c=Object(r.b)(["border:0;text-align:center;border-radius:6px;font-weight:normal;background:none;cursor:pointer;text-transform:none;transition:all 0.2s ease;"]),l=r.c.button.withConfig({displayName:"utils__Button",componentId:"sc-g08yf6-1"})([""," ",""],c,a.a),u=r.c.div.withConfig({displayName:"utils__InputContainer",componentId:"sc-g08yf6-2"})(["overflow:",";max-height:83px;min-height:41px;height:","px;width:100%;min-width:0;@media ","{height:","px;}"],e=>{let{hasFiles:t}=e;return t?"visible":"hidden"},e=>e.active?e.targetHeight:"41",i.c.maxTablet,e=>e.active?e.targetHeight:"44"),d=Object(r.b)(["max-height:41px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),f=Object(r.b)(["position:relative;z-index:2;margin-bottom:0;color:",";font-size:",";line-height:1.5;padding:10px 16px;background:",";background-color:",";background-image:none;border:0;resize:none;box-shadow:none;border-radius:21px;max-height:83px;font-family:",";width:100%;min-height:0;transition:transform 0.3s ease;",";",";&:focus{color:",";box-shadow:none;border:none;","}@media ","{font-size:16px;",";}"],e=>e.theme.inputText,i.d.fontSizeP,e=>e.theme.inputBackground,e=>e.theme.inputBackground,o.a.default,e=>e.$hide&&"transform: translateY(-60px)",e=>!e.$active&&d,e=>e.theme.inputText,a.a,i.c.maxTablet,e=>!e.$active&&"max-height: 44px;"),p=Object(r.b)(["position:relative;&:before{content:'';left:0;right:20px;top:-15px;z-index:1;height:20px;position:absolute;background:linear-gradient( 0deg,"," 0%,"," 25%,rgba(248,248,248,0) 100% );opacity:1;transition:opacity linear 300ms;","}"],e=>e.theme.background,e=>e.theme.background,e=>{let{inspectorOpen:t}=e;return t?"height: 0":""})},function(e,t,n){"use strict";n.d(t,"e",(function(){return i})),n.d(t,"f",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d}));var r=n(1),o=n(23),a=n(6);const i=r.c.p.withConfig({displayName:"typography__Paragraph",componentId:"sc-ifap29-0"})(["color:",";font-size:",";font-weight:normal;line-height:170%;font-family:",";"],a.a.darkColor,a.d.fontSizeP,o.a.default),s=Object(r.c)(i).withConfig({displayName:"typography__SmallParagraph",componentId:"sc-ifap29-1"})(["font-size:",";opacity:0.6;"],a.d.fontSizeSmall),c=r.c.h2.withConfig({displayName:"typography__H2",componentId:"sc-ifap29-2"})(["color:",";font-size:",";font-weight:normal;margin:0 0 30px;line-height:30px;font-family:",";"],a.a.darkColor,a.d.fontSizeH2,o.a.default),l=r.c.h3.withConfig({displayName:"typography__H3",componentId:"sc-ifap29-3"})(["color:",";font-size:",";font-weight:normal;line-height:30px;margin:0 0 15px;font-family:",";"],a.a.darkColor,a.d.fontSizeH3,o.a.default),u=(r.c.h4.withConfig({displayName:"typography__H4",componentId:"sc-ifap29-4"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;font-family:",";"],a.a.darkColor,a.d.fontSizeH4,o.a.default),r.c.h5.withConfig({displayName:"typography__H5",componentId:"sc-ifap29-5"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;line-height:24px;font-family:",";"],a.a.darkColor,a.d.fontSizeH5,o.a.default)),d=(r.c.h6.withConfig({displayName:"typography__H6",componentId:"sc-ifap29-6"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;font-family:",";"],a.a.darkColor,a.d.fontSizeBase,o.a.default),r.c.span.withConfig({displayName:"typography__KindlySpan",componentId:"sc-ifap29-7"})(["color:",";font-family:",";opacity:1;a{color:",";text-decoration:none;:hover,:focus,:active,:visited{color:",";}}"],a.a.primaryColor,o.a.KindlySans,a.a.primaryColor,a.a.primaryColor))},function(e,t,n){"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(3),o=n(7);t.a=()=>{const{languages:e,includeDisabledLanguages:t}=Object(r.d)(o.d),n=(null==e?void 0:e.filter(e=>{let{active:t}=e;return t}))||[],a=n[0];return t?{languages:e,defaultLanguage:a}:{languages:n,defaultLanguage:a}}},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=(e,t)=>-1!==t.indexOf(e)},function(e,t){e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(1);const r=()=>"\n #chatContainer:not(.using-tab) & {\n outline: none;\n }\n"},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));const r={TEXT:"TEXT",CHECKBOX:"CHECKBOX",RANGE:"RANGE",EMAIL:"EMAIL",NUMBER:"NUMBER",SELECT:"SELECT"},o={ACTIVE:"ACTIVE",SUBMITTED:"SUBMITTED",CANCELED:"CANCELED",UNANSWERED:"UNANSWERED",ERRORED:"ERRORED"},a={PATTERN:"pattern",REQUIRED:"required",MAX_LENGTH:"max_length",MIN_LENGTH:"min_length",min:"min",max:"max"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(14);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){Object(r.a)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===o(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n(4);var r=n(0),o=n.n(r),a=n(85),i=n(26);function s(e){let{loading:t,color:n,flat:r}=e;return o.a.createElement(i.d,{flat:r,$color:n,$loading:t},o.a.createElement(i.c,null),o.a.createElement(i.c,null),o.a.createElement(i.c,null))}s.defaultProps={color:!1,loading:!1};const c=o.a.forwardRef((e,t)=>{let{href:n,target:r,children:a,icon:c,text:l,loading:u,color:d,type:f,onClick:p,cy:h,...m}=e;const g=e=>{u?e.preventDefault(e):p(e)};return n?o.a.createElement(i.a,Object.assign({ref:t,href:n,target:r,$color:d,onClick:g,$loading:u},m),u?o.a.createElement(s,{flat:m.flat,color:d,loading:u}):o.a.createElement(o.a.Fragment,null,a||l,c)):o.a.createElement(i.b,Object.assign({ref:t,onClick:g,$color:d,type:f,$loading:u,"data-cy":h},m),u?o.a.createElement(s,{flat:m.flat,color:d,loading:u}):o.a.createElement(o.a.Fragment,null,a||l,c))});c.defaultProps={type:"button",tabIndex:0,color:!1,selected:!1,loading:!1,flat:!1,disabled:!1,onClick:a.a,className:null,truncateText:!1,icon:null,href:null,target:null},c.displayName="Button",t.b=c},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(165),o=n.n(r),a=n(166),i=n.n(a),s=n(167);const c={default:"'IBMPlex', 'Helvetica Neue', Helvetica, Arial, sans-serif",KindlySans:"KindlySans"};n.n(s).a,i.a,o.a},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return c}));const r="RESET_WEBSOCKET_FALLBACK_REPLY_TIMEOUT",o="RESET_WEBSOCKET_FALLBACK_TAKEOVER_INTERVAL",a="RESET_WEBSOCKET_FALLBACK_TAKEOVER_REQUEST_INTERVAL",i="SET_WEBSOCKET_FALLBACK_REPLY_TIMEOUT",s="SET_WEBSOCKET_FALLBACK_TAKEOVER_INTERVAL",c="SET_WEBSOCKET_FALLBACK_TAKEOVER_REQUEST_INTERVAL"},function(e,t,n){"use strict";t.a=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},function(e,t,n){"use strict";n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return m}));var r=n(37),o=n(1),a=n(11),i=n(23),s=n(12),c=n(6);const l=o.c.div.withConfig({displayName:"styles__LoadingIndicatorContainer",componentId:"sc-xokaop-0"})(["display:flex;align-items:center;justify-content:center;border-radius:100px;transition:all cubic-bezier(0.61,0.1,0.42,0.9) 150ms;min-height:18px;background-color:transparent;"]),u=o.c.span.withConfig({displayName:"styles__LoadingIndicator",componentId:"sc-xokaop-1"})(["width:6px;height:6px;opacity:0;border-radius:50%;background:",";background-color:",";&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){margin:0 5px;animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>e.theme.buttonText,e=>e.theme.buttonText,a.b,a.b,a.b),d=Object(o.b)(["transition:all 0.2s ease;box-shadow:0 0 0 1px "," inset;background-color:",";"],e=>{let{$color:t,theme:n}=e;return Object(r.a)(.08,t?n.buttonBackground:"#fff")},e=>{let{$color:t,theme:n}=e;return Object(r.a)(.18,t?n.buttonBackground:"#fff")}),f=Object(o.b)(["position:relative;border-radius:6px;font-weight:normal;",";display:flex;box-shadow:0 1px 4px 0px ",";justify-content:center;align-items:center;color:",";background-color:",";"," transition:all 0.2s ease;:hover{transition:all 0.2s ease;box-shadow:0 0 0 2px "," inset;background-color:",";}:focus{transition:all 0.2s ease;box-shadow:0 0 0 1px "," inset;background-color:",";}:active{","}"],e=>e.$loading?"opacity: 0.6":"opacity: 1",Object(r.a)(.2,"#fff"),e=>{let{theme:t,$color:n}=e;return n?t.buttonText:c.h.textColor},e=>{let{theme:t,$color:n}=e;return n?t.buttonBackground:"#fff"},e=>e.selected&&d,e=>{let{$color:t,theme:n}=e;return Object(r.a)(.2,t?n.buttonBackground:"#fff")},e=>{let{$color:t,theme:n}=e;return Object(r.a)(.08,t?n.buttonBackground:"#fff")},e=>{let{$color:t,theme:n}=e;return Object(r.a)(.08,t?n.buttonBackground:"#fff")},e=>{let{$color:t,theme:n}=e;return Object(r.a)(.08,t?n.buttonBackground:"#fff")},d),p=Object(o.b)(["",";padding:8px 12px;font-size:",";"," font-family:",";& > svg{margin-left:6px;}"],f,c.d.fontSizeP,e=>{let{truncateText:t}=e;return t&&"overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;"},e=>{let{theme:t}=e;return t.customFont?t.customFont:i.a.default}),h=Object(o.c)(s.a).withConfig({displayName:"styles__ButtonContainer",componentId:"sc-xokaop-2"})(["",""],p),m=o.c.a.withConfig({displayName:"styles__AContainer",componentId:"sc-xokaop-3"})([""," "," text-decoration:none;"],s.b,p)},function(e,t,n){"use strict";var r=n(42);t.a=(e,t,n)=>Object.entries(e).reduce((e,o)=>{let[a,i]=o;return{...e,[a]:"string"==typeof i?i:Object(r.a)(i,t,n)}},{})},function(e,t,n){"use strict";function r(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(5);function o(e){const t=function(e){if(!e)return null;const t=e.match(/^[A-Za-z0-9-_=]+\.([A-Za-z0-9-_=]+)\.?[A-Za-z0-9-_.+/=]*$/);if(!t)return null;try{return JSON.parse(atob(t[1]))}catch(e){return null}}(e);return!t||t.exp-Math.floor((new Date).getTime()/1e3)<30}var a=n(2),i=n(9);const s=()=>({type:a.zb}),c=e=>async(t,n)=>{const{connection:{token:o},environment:{PAT_HOST:s}}=n();if(!o)throw new Error("Token missing");const{headers:c}=Object(i.a)({token:o},{withCurrentUrl:!0}),{data:l,status:u}=await t(Object(i.f)({method:"post",url:`${s}/chatbubble/${r.j}/auth/identify`,headers:c,data:{avatar_url:e.avatar_url,full_name:e.full_name,email:e.email,phone_number:e.phone_number}}));200===u&&t({type:a.E,avatarUrl:l.avatar_url,fullName:l.full_name})},l=()=>async(e,t)=>{const{chatbubble:{chatId:n},connection:{token:o},auth:{getAuthToken:c},environment:{PAT_HOST:l}}=t();if(!n||!c)return void e(s());let u;try{u=await c(n)}catch(e){console.error("Chatbubble auth failed:",e),u=null}if(!u)return void e(s());const{headers:d}=Object(i.a)({jwt:u,token:o},{withCurrentUrl:!0}),f=await e(Object(i.f)({method:"post",url:`${l}/chatbubble/${r.j}/auth/chat`,headers:d},{onError:()=>e(s())}));null!=f&&f.data&&e({type:a.h,token:u,avatarUrl:f.data.avatar_url,fullName:f.data.full_name})},u=()=>async(e,t)=>{const{auth:{isAuthenticated:n,isRefreshing:r,token:i,getAuthToken:s}}=t();if(!n)return null;if(r)return await new Promise(e=>{setTimeout(e,200)}),u()(e,t);s&&o(i)&&(e({type:a.tb}),await e(l()),e({type:a.C}));const{auth:c}=t();return c.isAuthenticated?{Authorization:`Bearer ${c.token}`}:null}},function(e,t,n){"use strict";t.a=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=t.split(".").reduce((e,t)=>e?e[t]:void 0,e))&&void 0!==n?n:r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return $})),n.d(t,"b",(function(){return je})),n.d(t,"c",(function(){return D})),n.d(t,"d",(function(){return H}));var r=n(0),o=e=>"checkbox"===e.type,a=e=>e instanceof Date,i=e=>null==e;const s=e=>"object"==typeof e;var c=e=>!i(e)&&!Array.isArray(e)&&s(e)&&!a(e),l=e=>c(e)&&e.target?o(e.target)?e.target.checked:e.target.value:e,u=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),d=e=>Array.isArray(e)?e.filter(Boolean):[],f=e=>void 0===e,p=(e,t,n)=>{if(!t||!c(e))return n;const r=d(t.split(/[,[\].]+?/)).reduce((e,t)=>i(e)?e:e[t],e);return f(r)||r===e?f(e[t])?n:e[t]:r};const h="blur",m="focusout",g="change",b="onBlur",v="onChange",y="onSubmit",x="onTouched",w="all",E="max",O="min",k="maxLength",_="minLength",C="pattern",j="required",T="validate",S=r.createContext(null),I=()=>r.useContext(S);var A=(e,t,n,r=!0)=>{const o={};for(const a in e)Object.defineProperty(o,a,{get:()=>{const o=a;return t[o]!==w&&(t[o]=!r||w),n&&(n[o]=!0),e[o]}});return o},N=e=>c(e)&&!Object.keys(e).length,P=(e,t,n)=>{const{name:r,...o}=e;return N(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(e=>t[e]===(!n||w))},M=e=>Array.isArray(e)?e:[e],L=(e,t,n)=>n&&t?e===t:!e||!t||e===t||M(e).some(e=>e&&(e.startsWith(t)||t.startsWith(e)));function R(e){const t=r.useRef(e);t.current=e,r.useEffect(()=>{const n=!e.disabled&&t.current.subject.subscribe({next:t.current.callback});return()=>(e=>{e&&e.unsubscribe()})(n)},[e.disabled])}function D(e){const t=I(),{control:n=t.control,disabled:o,name:a,exact:i}=e||{},[s,c]=r.useState(n._formState),l=r.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=r.useRef(a),d=r.useRef(!0);return u.current=a,R({disabled:o,callback:r.useCallback(e=>d.current&&L(u.current,e.name,i)&&P(e,l.current)&&c({...n._formState,...e}),[n,i]),subject:n._subjects.state}),r.useEffect(()=>(d.current=!0,()=>{d.current=!1}),[]),A(s,n._proxyFormState,l.current,!1)}var B=e=>"string"==typeof e,F=(e,t,n,r)=>{const o=Array.isArray(e);return B(e)?(r&&t.watch.add(e),p(n,e)):o?e.map(e=>(r&&t.watch.add(e),p(n,e))):(r&&(t.watchAll=!0),n)},z=e=>"function"==typeof e,U=e=>{for(const t in e)if(z(e[t]))return!0;return!1};function H(e){const t=I(),{control:n=t.control,name:o,defaultValue:a,disabled:i,exact:s}=e||{},l=r.useRef(o);l.current=o;const u=r.useCallback(e=>{if(L(l.current,e.name,s)){const t=F(l.current,n._names,e.values||n._formValues);p(f(l.current)||c(t)&&!U(t)?{...t}:Array.isArray(t)?[...t]:f(t)?a:t)}},[n,s,a]);R({disabled:i,subject:n._subjects.watch,callback:u});const[d,p]=r.useState(f(a)?n._getWatch(o):a);return r.useEffect(()=>{n._removeUnmounted()}),d}const $=e=>e.render(function(e){const t=I(),{name:n,control:o=t.control,shouldUnregister:a}=e,i=u(o._names.array,n),s=H({control:o,name:n,defaultValue:p(o._formValues,n,p(o._defaultValues,n,e.defaultValue)),exact:!0}),c=D({control:o,name:n}),d=r.useRef(o.register(n,{...e.rules,value:s}));return r.useEffect(()=>{const e=(e,t)=>{const n=p(o._fields,e);n&&(n._f.mount=t)};return e(n,!0),()=>{const t=o._options.shouldUnregister||a;(i?t&&!o._stateFlags.action:t)?o.unregister(n):e(n,!1)}},[n,o,i,a]),{field:{name:n,value:s,onChange:r.useCallback(e=>{d.current.onChange({target:{value:l(e),name:n},type:g})},[n]),onBlur:r.useCallback(()=>{d.current.onBlur({target:{value:p(o._formValues,n),name:n},type:h})},[n,o]),ref:r.useCallback(e=>{const t=p(o._fields,n);e&&t&&e.focus&&(t._f.ref={focus:()=>e.focus(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[n,o._fields])},formState:c,fieldState:Object.defineProperties({},{invalid:{get:()=>!!p(c.errors,n)},isDirty:{get:()=>!!p(c.dirtyFields,n)},isTouched:{get:()=>!!p(c.touchedFields,n)},error:{get:()=>p(c.errors,n)}})}}(e));var V=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},q=e=>/^\w*$/.test(e),G=e=>d(e.replace(/["|']|\]/g,"").split(/\.|\[/));function W(e,t,n){let r=-1;const o=q(t)?[t]:G(t),a=o.length,i=a-1;for(;++r<a;){const t=o[r];let a=n;if(r!==i){const n=e[t];a=c(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}e[t]=a,e=e[t]}return e}const Y=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=p(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus&&f(e.ref.focus()))break;if(e.refs){e.refs[0].focus();break}}else c(r)&&Y(r,t)}}};var K=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));var X="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function J(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(X&&(e instanceof Blob||e instanceof FileList)||!n&&!c(e))return e;t=n?[]:{};for(const n in e){if(z(e[n])){t=e;break}t[n]=J(e[n])}}return t}function Q(e,t){const n=q(t)?[t]:G(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=f(e)?r++:e[t[r++]];return e}(e,n),o=n[n.length-1];let a;r&&delete r[o];for(let t=0;t<n.slice(0,-1).length;t++){let r,o=-1;const i=n.slice(0,-(t+1)),s=i.length-1;for(t>0&&(a=e);++o<i.length;){const t=i[o];r=r?r[t]:e[t],s===o&&(c(r)&&N(r)||Array.isArray(r)&&!r.filter(e=>!f(e)).length)&&(a?delete a[t]:delete e[t]),a=r}}return e}function Z(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}}var ee=e=>i(e)||!s(e);function te(e,t){if(ee(e)||ee(t))return e===t;if(a(e)&&a(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const n=e[o];if(!r.includes(o))return!1;if("ref"!==o){const e=t[o];if(a(n)&&a(e)||c(n)&&c(e)||Array.isArray(n)&&Array.isArray(e)?!te(n,e):n!==e)return!1}}return!0}var ne=e=>({isOnSubmit:!e||e===y,isOnBlur:e===b,isOnChange:e===v,isOnAll:e===w,isOnTouch:e===x}),re=e=>"boolean"==typeof e,oe=e=>"file"===e.type,ae=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ie=e=>"select-multiple"===e.type,se=e=>"radio"===e.type,ce=e=>ae(e)&&e.isConnected;function le(e,t={}){const n=Array.isArray(e);if(c(e)||n)for(const n in e)Array.isArray(e[n])||c(e[n])&&!U(e[n])?(t[n]=Array.isArray(e[n])?[]:{},le(e[n],t[n])):i(e[n])||(t[n]=!0);return t}var ue=(e,t)=>function e(t,n,r){const o=Array.isArray(t);if(c(t)||o)for(const o in t)Array.isArray(t[o])||c(t[o])&&!U(t[o])?f(n)||ee(r[o])?r[o]=Array.isArray(t[o])?le(t[o],[]):{...le(t[o])}:e(t[o],i(n)?{}:n[o],r[o]):r[o]=!te(t[o],n[o]);return r}(e,t,le(t));const de={value:!1,isValid:!1},fe={value:!0,isValid:!0};var pe=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!f(e[0].attributes.value)?f(e[0].value)||""===e[0].value?fe:{value:e[0].value,isValid:!0}:fe:de}return de},he=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>f(e)?e:t?""===e||i(e)?NaN:+e:n&&B(e)?new Date(e):r?r(e):e;const me={isValid:!1,value:null};var ge=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,me):me;function be(e){const t=e.ref;if(!(e.refs?e.refs.every(e=>e.disabled):t.disabled))return oe(t)?t.files:se(t)?ge(e.refs).value:ie(t)?[...t.selectedOptions].map(({value:e})=>e):o(t)?pe(e.refs).value:he(f(t.value)?e.ref.value:t.value,e)}var ve=e=>e instanceof RegExp,ye=e=>f(e)?void 0:ve(e)?e.source:c(e)?ve(e.value)?e.value.source:e.value:e;function xe(e,t,n){const r=p(e,n);if(r||q(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),a=p(t,r),i=p(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(i&&i.type)return{name:r,error:i};o.pop()}return{name:n}}var we=e=>B(e)||r.isValidElement(e);function Ee(e,t,n="validate"){if(we(e)||Array.isArray(e)&&e.every(we)||re(e)&&!e)return{type:n,message:we(e)?e:"",ref:t}}var Oe=e=>c(e)&&!ve(e)?e:{value:e,message:""},ke=async(e,t,n,r)=>{const{ref:a,refs:s,required:l,maxLength:u,minLength:d,min:f,max:p,pattern:h,validate:m,name:g,valueAsNumber:b,mount:v,disabled:y}=e._f;if(!v||y)return{};const x=s?s[0]:a,w=e=>{r&&x.reportValidity&&(x.setCustomValidity(re(e)?"":e||" "),x.reportValidity())},S={},I=se(a),A=o(a),P=I||A,M=(b||oe(a))&&!a.value||""===t||Array.isArray(t)&&!t.length,L=V.bind(null,g,n,S),R=(e,t,n,r=k,o=_)=>{const i=e?t:n;S[g]={type:e?r:o,message:i,ref:a,...L(e?r:o,i)}};if(l&&(!P&&(M||i(t))||re(t)&&!t||A&&!pe(s).isValid||I&&!ge(s).isValid)){const{value:e,message:t}=we(l)?{value:!!l,message:l}:Oe(l);if(e&&(S[g]={type:j,message:t,ref:x,...L(j,t)},!n))return w(t),S}if(!(M||i(f)&&i(p))){let e,r;const o=Oe(p),s=Oe(f);if(i(t)||isNaN(t)){const n=a.valueAsDate||new Date(t);B(o.value)&&(e=n>new Date(o.value)),B(s.value)&&(r=n<new Date(s.value))}else{const n=a.valueAsNumber||+t;i(o.value)||(e=n>o.value),i(s.value)||(r=n<s.value)}if((e||r)&&(R(!!e,o.message,s.message,E,O),!n))return w(S[g].message),S}if((u||d)&&!M&&B(t)){const e=Oe(u),r=Oe(d),o=!i(e.value)&&t.length>e.value,a=!i(r.value)&&t.length<r.value;if((o||a)&&(R(o,e.message,r.message),!n))return w(S[g].message),S}if(h&&!M&&B(t)){const{value:e,message:r}=Oe(h);if(ve(e)&&!t.match(e)&&(S[g]={type:C,message:r,ref:a,...L(C,r)},!n))return w(r),S}if(m)if(z(m)){const e=Ee(await m(t),x);if(e&&(S[g]={...e,...L(T,e.message)},!n))return w(e.message),S}else if(c(m)){let e={};for(const r in m){if(!N(e)&&!n)break;const o=Ee(await m[r](t),x,r);o&&(e={...o,...L(r,o.message)},w(o.message),n&&(S[g]=e))}if(!N(e)&&(S[g]={ref:x,...e},!n))return S}return w(!0),S};const _e={mode:y,reValidateMode:v,shouldFocusError:!0};function Ce(e={}){let t,n={..._e,...e},r={isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}},s={},c=J(n.defaultValues)||{},g=n.shouldUnregister?{}:J(c),b={action:!1,mount:!1,watch:!1},v={mount:new Set,unMount:new Set,array:new Set,watch:new Set},y=0,x={};const E={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},O={watch:Z(),array:Z(),state:Z()},k=ne(n.mode),_=ne(n.reValidateMode),C=n.criteriaMode===w,j=async e=>{let t=!1;return E.isValid&&(t=n.resolver?N((await A()).errors):await P(s,!0),e||t===r.isValid||(r.isValid=t,O.state.next({isValid:t}))),t},T=(e,t,n,r)=>{const o=p(s,e);if(o){const a=p(g,e,f(n)?p(c,e):n);f(a)||r&&r.defaultChecked||t?W(g,e,t?a:be(o._f)):D(e,a),b.mount&&j()}},S=(e,t,n,o,a)=>{let i=!1;const s={name:e},l=p(r.touchedFields,e);if(E.isDirty){const e=r.isDirty;r.isDirty=s.isDirty=L(),i=e!==s.isDirty}if(E.dirtyFields&&(!n||o)){const n=p(r.dirtyFields,e);te(p(c,e),t)?Q(r.dirtyFields,e):W(r.dirtyFields,e,!0),s.dirtyFields=r.dirtyFields,i=i||n!==p(r.dirtyFields,e)}return n&&!l&&(W(r.touchedFields,e,n),s.touchedFields=r.touchedFields,i=i||E.touchedFields&&l!==n),i&&a&&O.state.next(s),i?s:{}},I=async(n,o,a,i)=>{const s=p(r.errors,n),c=E.isValid&&r.isValid!==o;var l;if(e.delayError&&a?(l=()=>((e,t)=>{W(r.errors,e,t),O.state.next({errors:r.errors})})(n,a),t=e=>{clearTimeout(y),y=window.setTimeout(l,e)},t(e.delayError)):(clearTimeout(y),t=null,a?W(r.errors,n,a):Q(r.errors,n)),(a?!te(s,a):s)||!N(i)||c){const e={...i,...c?{isValid:o}:{},errors:r.errors,name:n};r={...r,...e},O.state.next(e)}x[n]--,E.isValidating&&!Object.values(x).some(e=>e)&&(O.state.next({isValidating:!1}),x={})},A=async e=>n.resolver?await n.resolver({...g},n.context,((e,t,n,r)=>{const o={};for(const n of e){const e=p(t,n);e&&W(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}})(e||v.mount,s,n.criteriaMode,n.shouldUseNativeValidation)):{},P=async(e,t,o={valid:!0})=>{for(const a in e){const i=e[a];if(i){const{_f:e,...a}=i;if(e){const a=await ke(i,p(g,e.name),C,n.shouldUseNativeValidation);if(a[e.name]&&(o.valid=!1,t))break;t||(a[e.name]?W(r.errors,e.name,a[e.name]):Q(r.errors,e.name))}a&&await P(a,t,o)}}return o.valid},L=(e,t)=>(e&&t&&W(g,e,t),!te(q(),c)),R=(e,t,n)=>{const r={...b.mount?g:f(t)?c:B(e)?{[e]:t}:t};return F(e,v,r,n)},D=(e,t,n={})=>{const r=p(s,e);let a=t;if(r){const n=r._f;n&&(!n.disabled&&W(g,e,he(t,n)),a=X&&ae(n.ref)&&i(t)?"":t,ie(n.ref)?[...n.ref.options].forEach(e=>e.selected=a.includes(e.value)):n.refs?o(n.ref)?n.refs.length>1?n.refs.forEach(e=>!e.disabled&&(e.checked=Array.isArray(a)?!!a.find(t=>t===e.value):a===e.value)):n.refs[0]&&(n.refs[0].checked=!!a):n.refs.forEach(e=>e.checked=e.value===a):oe(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||O.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&S(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&V(e)},U=(e,t,n)=>{for(const r in t){const o=t[r],i=`${e}.${r}`,c=p(s,i);!v.array.has(e)&&ee(o)&&(!c||c._f)||a(o)?D(i,o,n):U(i,o,n)}},H=(e,t,n={})=>{const o=p(s,e),a=v.array.has(e),l=J(t);W(g,e,l),a?(O.array.next({name:e,values:g}),(E.isDirty||E.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=ue(c,g),O.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:L(e,l)}))):!o||o._f||i(l)?D(e,l,n):U(e,l,n),K(e,v)&&O.state.next({}),O.watch.next({name:e})},$=async e=>{const o=e.target;let a=o.name;const i=p(s,a);if(i){let u,d;const f=o.type?be(i._f):l(e),b=e.type===h||e.type===m,y=!((c=i._f).mount&&(c.required||c.min||c.max||c.maxLength||c.minLength||c.pattern||c.validate)||n.resolver||p(r.errors,a)||i._f.deps)||((e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e))(b,p(r.touchedFields,a),r.isSubmitted,_,k),w=K(a,v,b);W(g,a,f),b?(i._f.onBlur&&i._f.onBlur(e),t&&t(0)):i._f.onChange&&i._f.onChange(e);const E=S(a,f,b,!1),T=!N(E)||w;if(!b&&O.watch.next({name:a,type:e.type}),y)return T&&O.state.next({name:a,...w?{}:E});if(!b&&w&&O.state.next({}),x[a]=(x[a],1),O.state.next({isValidating:!0}),n.resolver){const{errors:e}=await A([a]),t=xe(r.errors,s,a),n=xe(e,s,t.name||a);u=n.error,a=n.name,d=N(e)}else u=(await ke(i,p(g,a),C,n.shouldUseNativeValidation))[a],d=await j(!0);i._f.deps&&V(i._f.deps),I(a,d,u,E)}var c},V=async(e,t={})=>{let o,a;const i=M(e);if(O.state.next({isValidating:!0}),n.resolver){const t=await(async e=>{const{errors:t}=await A();if(e)for(const n of e){const e=p(t,n);e?W(r.errors,n,e):Q(r.errors,n)}else r.errors=t;return t})(f(e)?e:i);o=N(t),a=e?!i.some(e=>p(t,e)):o}else e?(a=(await Promise.all(i.map(async e=>{const t=p(s,e);return await P(t&&t._f?{[e]:t}:t)}))).every(Boolean),(a||r.isValid)&&j()):a=o=await P(s);return O.state.next({...!B(e)||E.isValid&&o!==r.isValid?{}:{name:e},...n.resolver?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!a&&Y(s,e=>p(r.errors,e),e?i:v.mount),a},q=e=>{const t={...c,...b.mount?g:{}};return f(e)?t:B(e)?p(t,e):e.map(e=>p(t,e))},G=(e,t)=>({invalid:!!p((t||r).errors,e),isDirty:!!p((t||r).dirtyFields,e),isTouched:!!p((t||r).touchedFields,e),error:p((t||r).errors,e)}),le=(e,t={})=>{for(const o of e?M(e):v.mount)v.mount.delete(o),v.array.delete(o),p(s,o)&&(t.keepValue||(Q(s,o),Q(g,o)),!t.keepError&&Q(r.errors,o),!t.keepDirty&&Q(r.dirtyFields,o),!t.keepTouched&&Q(r.touchedFields,o),!n.shouldUnregister&&!t.keepDefaultValue&&Q(c,o));O.watch.next({}),O.state.next({...r,...t.keepDirty?{isDirty:L()}:{}}),!t.keepIsValid&&j()},de=(e,t={})=>{let r=p(s,e);const a=re(t.disabled);return W(s,e,{_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),v.mount.add(e),r?a&&W(g,e,t.disabled?void 0:p(g,e,be(r._f))):T(e,!0,t.value),{...a?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:ye(t.min),max:ye(t.max),minLength:ye(t.minLength),maxLength:ye(t.maxLength),pattern:ye(t.pattern)}:{},name:e,onChange:$,onBlur:$,ref:a=>{if(a){de(e,t),r=p(s,e);const n=f(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,i=(e=>se(e)||o(e))(n),l=r._f.refs||[];if(i?l.find(e=>e===n):n===r._f.ref)return;W(s,e,{_f:{...r._f,...i?{refs:[...l.filter(ce),n,...Array.isArray(p(c,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),T(e,!1,void 0,n)}else r=p(s,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!u(v.array,e)||!b.action)&&v.unMount.add(e)}}};return{control:{register:de,unregister:le,getFieldState:G,_executeSchema:A,_getWatch:R,_getDirty:L,_updateValid:j,_removeUnmounted:()=>{for(const e of v.unMount){const t=p(s,e);t&&(t._f.refs?t._f.refs.every(e=>!ce(e)):!ce(t._f.ref))&&le(e)}v.unMount=new Set},_updateFieldArray:(e,t=[],n,o,a=!0,i=!0)=>{if(o&&n){if(b.action=!0,i&&Array.isArray(p(s,e))){const t=n(p(s,e),o.argA,o.argB);a&&W(s,e,t)}if(E.errors&&i&&Array.isArray(p(r.errors,e))){const t=n(p(r.errors,e),o.argA,o.argB);a&&W(r.errors,e,t),((e,t)=>{!d(p(e,t)).length&&Q(e,t)})(r.errors,e)}if(E.touchedFields&&i&&Array.isArray(p(r.touchedFields,e))){const t=n(p(r.touchedFields,e),o.argA,o.argB);a&&W(r.touchedFields,e,t)}E.dirtyFields&&(r.dirtyFields=ue(c,g)),O.state.next({isDirty:L(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else W(g,e,t)},_getFieldArray:t=>d(p(b.mount?g:c,t,e.shouldUnregister?p(c,t,[]):[])),_subjects:O,_proxyFormState:E,get _fields(){return s},get _formValues(){return g},get _stateFlags(){return b},set _stateFlags(e){b=e},get _defaultValues(){return c},get _names(){return v},set _names(e){v=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:V,register:de,handleSubmit:(e,t)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let a=!0,i=J(g);O.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await A();r.errors=e,i=t}else await P(s);N(r.errors)?(O.state.next({errors:{},isSubmitting:!0}),await e(i,o)):(t&&await t({...r.errors},o),n.shouldFocusError&&Y(s,e=>p(r.errors,e),v.mount))}catch(e){throw a=!1,e}finally{r.isSubmitted=!0,O.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:N(r.errors)&&a,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>z(e)?O.watch.subscribe({next:n=>e(R(void 0,t),n)}):R(e,t,!0),setValue:H,getValues:q,reset:(t,n={})=>{const o=t||c,a=J(o),i=t&&!N(t)?a:c;if(n.keepDefaultValues||(c=o),!n.keepValues){if(n.keepDirtyValues)for(const e of v.mount)p(r.dirtyFields,e)?W(i,e,p(g,e)):H(e,p(i,e));else{if(X&&f(t))for(const e of v.mount){const t=p(s,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;try{ae(e)&&e.closest("form").reset();break}catch(e){}}}s={}}g=e.shouldUnregister?n.keepDefaultValues?J(c):{}:a,O.array.next({values:i}),O.watch.next({values:i})}v={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},b.mount=!E.isValid||!!n.keepIsValid,b.watch=!!e.shouldUnregister,O.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||te(t,c)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?ue(c,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},resetField:(e,t={})=>{p(s,e)&&(f(t.defaultValue)?H(e,p(c,e)):(H(e,t.defaultValue),W(c,e,t.defaultValue)),t.keepTouched||Q(r.touchedFields,e),t.keepDirty||(Q(r.dirtyFields,e),r.isDirty=t.defaultValue?L(e,p(c,e)):L()),t.keepError||(Q(r.errors,e),E.isValid&&j()),O.state.next({...r}))},clearErrors:e=>{e?M(e).forEach(e=>Q(r.errors,e)):r.errors={},O.state.next({errors:r.errors})},unregister:le,setError:(e,t,n)=>{const o=(p(s,e,{_f:{}})._f||{}).ref;W(r.errors,e,{...t,ref:o}),O.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},setFocus:(e,t={})=>{const n=p(s,e)._f,r=n.refs?n.refs[0]:n.ref;t.shouldSelect?r.select():r.focus()},getFieldState:G}}function je(e={}){const t=r.useRef(),[n,o]=r.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}});t.current?t.current.control._options=e:t.current={...Ce(e),formState:n};const a=t.current.control,i=r.useCallback(e=>{P(e,a._proxyFormState,!0)&&(a._formState={...a._formState,...e},o({...a._formState}))},[a]);return R({subject:a._subjects.state,callback:i}),r.useEffect(()=>{a._stateFlags.mount||(a._proxyFormState.isValid&&a._updateValid(),a._stateFlags.mount=!0),a._stateFlags.watch&&(a._stateFlags.watch=!1,a._subjects.state.next({})),a._removeUnmounted()}),t.current.formState=A(n,a._proxyFormState),t.current}},function(e,t,n){"use strict";var r=n(128),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:c,isUndefined:i,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):a(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return h})),n.d(t,"d",(function(){return m}));var r=(e,t)=>{const{type:n}=e;let r;return"Form"===n?r=(e=>{let{title:t,body_text:n,input_label:r,input_placeholder:o,languageCode:a}=e;return{sections:[{title:t[a],description:n[a]},{form:{input:{label:r[a],placeholder:o[a],required:!0},button:{title:"Send skjema",icon:"icon",type:"submit"}}}]}})({...e,languageCode:t}):"Product"===n?r=(e=>{var t;let{title:n,body_text:r,button_text:o,button_link:a,carousel_title:i,image_carousel:s,languageCode:c}=e;return{sections:[{title:n[c],description:r[c],buttons:[{label:o[c],value:a[c],button_type:"link",is_active:!0}]},{products:{title:i[c],items:null===(t=s[c])||void 0===t?void 0:t.map(e=>{let{title:t,alt_text:n,description:r,image_url:o,product_url:a,link_text:i,link_url:s,price:c}=e;return{title:t,image:o,linkText:i,linkUrl:s,productUrl:a,altText:n,description:r,price:c}})}}]}})({...e,languageCode:t}):"Text"===n?r=(e=>{let{title:t,body_text:n,link_text:r,link_location:o,languageCode:a}=e;return{sections:[{title:t[a],description:n[a]},{link:{text:r[a],location:o[a]}}]}})({...e,languageCode:t}):"Multiple choice"===n?r=(e=>{let{title:t,body_text:n,button_blocks:r,languageCode:o}=e;return{sections:[{title:t[o],description:n[o]},{choices:{buttons:r.map(e=>{let{button_text:t,dialogue_id:n}=e;return{text:t[o],triggerDialogue:n}})}}]}})({...e,languageCode:t}):"Custom"===n&&(r={}),r},o=n(5),a=n(53),i=n(2),s=n(30),c=n(9);const l=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=t.find(e=>{let{active:t}=e;return t}),o=n||r.code;return e.enabled[o]},u=e=>{let{slug:t,eventType:n,label:r}=e;return async(e,u)=>{if(!t||!n)return;const{nudges:d,languages:f}=u().bot,{currentLanguage:p}=u().chatbubble,h=(e=>{var t,n,r,o,a;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(a=null==e?void 0:e.multiple_choice_nudges)&&void 0!==a?a:[]]})(d).find(e=>e.slug===t&&l(e,f,p));h&&(e({type:i.t,slug:t}),n!==i.u&&n!==i.W||await e((e=>{let{targetNudge:t,eventType:n,label:r,currentLanguage:i}=e;return async(e,l)=>{const{botKey:u}=l().chatbubble,{PAT_HOST:d}=l().environment,{token:f}=l().connection,p=await e(Object(s.b)());e(Object(c.f)({method:"post",url:`${d}/chatbubble/${o.j}/nudge/`,data:{session_id:Object(a.b)(),nudge_id:t.id,action:n,type:t.type,label:r||null,language_code:i},...Object(c.a)({botKey:u,token:f},{withCurrentUrl:!0,extra:p})}))}})({targetNudge:h,eventType:n,label:r,currentLanguage:p})))}},d=e=>(t,n)=>{const{show:r,slug:o}=n().nudge;r&&t(u({slug:o,eventType:i.u,label:e}))},f=(e,t)=>(n,r)=>{const{show:o,isCustom:a,slug:s,trackEvent:c}=r().nudge;if(o){if(n({type:i.A}),a){const e=document.getElementById("kindly-custom-nudge");e&&e.parentNode.removeChild(e)}c&&n(u({slug:s,eventType:e?i.u:i.A,label:t}))}},p=e=>{let{nudgeLayout:t,slug:n,trackEvent:a}=e;return(e,s)=>{var c,d,f,p,h,m,g;const{nudges:b,languages:v}=s().bot,{currentLanguage:y}=s().chatbubble,{show:x}=s().pushMessages,w=null==t?void 0:t.language;let E,O=null!==(c=null==t?void 0:t.webhook)&&void 0!==c?c:null,k=null!==(d=null==t?void 0:t.dialogueId)&&void 0!==d?d:null,_=t;const C=v.filter(e=>{let{active:t}=e;return t})[0],j=[...null!==(f=null==b?void 0:b.form_nudges)&&void 0!==f?f:[],...null!==(p=null==b?void 0:b.custom_nudges)&&void 0!==p?p:[],...null!==(h=null==b?void 0:b.product_nudges)&&void 0!==h?h:[],...null!==(m=null==b?void 0:b.text_nudges)&&void 0!==m?m:[],...null!==(g=null==b?void 0:b.multiple_choice_nudges)&&void 0!==g?g:[]],T=w||y||C.code,S=n||t.slug;if(S){var I,A,N,P,M,L,R;if(E=j.filter(e=>e.slug===S)[0],void 0===E)return;if(k=null!==(I=null===(A=E)||void 0===A?void 0:A.dialogue_id)&&void 0!==I?I:k,O=null!==(N=null===(P=E)||void 0===P?void 0:P.webhook)&&void 0!==N?N:O,_=r(E,T),_.sections=[...null!==(M=null===(L=_)||void 0===L?void 0:L.sections)&&void 0!==M?M:[],...null!==(R=null==t?void 0:t.sections)&&void 0!==R?R:[]],_.backdrop=null==t?void 0:t.backdrop,!l(E,v,T))return void console.warn("Nudge is disabled for the current language:",T)}else console.error("Please set up a nudge in the platform to get a slug!");a&&e(u({slug:S,eventType:i.ob})),x&&e({type:i.B}),e({slug:S,type:i.ob,nudgeLayout:_,dialogue:k,webhook:O,nudgeType:o.i.TEMPLATE,trackEvent:a})}},h=e=>{let{content:t,slug:n,onRendered:r,trackEvent:a}=e;return(e,s)=>{const{show:c}=s().pushMessages;a&&e(u({slug:n,eventType:i.mb})),c&&e({type:i.B}),e({type:i.mb,content:t,slug:n,onRendered:r,nudgeType:o.i.CUSTOM})}},m=e=>{let{nudge:t,languageCode:n}=e;return e=>{const{autopopupTime:o}=t,a=r(t,n);o&&0!==o?setTimeout(()=>e({type:i.ob,nudgeLayout:a}),o):e({type:i.ob,nudgeLayout:a})}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(104),o=n(20);const a=e=>/\/(.*)\/(.*)/.exec(e),i={maximum:"max",minimum:"min"},s=e=>{const t={},n=e.map(e=>{const t=Object.keys(e);for(let n=0;n<=t.length;n+=1)if(i[t[n]]){const r=Object.defineProperty(e,i[t[n]],Object.getOwnPropertyDescriptor(e,t[n]));return delete r[t[n]],r}return e});for(let e=0;e<n.length;e+=1){const i=Object.keys(n[e]),s=n[e].text;i.forEach(i=>{Object.values(o.c).includes(i)&&(t[Object(r.a)(i)]={value:"pattern"===i?new RegExp(a(n[e][i])[1],a(n[e][i])[2]):n[e][i],...s&&{message:s}})})}return t},c=e=>{if("object"!=typeof e)return{};const t={};return Object.entries(e).forEach(e=>{let[n,r]=e;null!=r&&r.text||(t[n]=r.value)}),t},l=e=>{const t=[...e.validators||[]];return e.required&&t.push({required:e.required,text:e.texts.required_text}),t}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"f",(function(){return p}));var r=n(1),o=n(13),a=n(12),i=n(6);const s=r.c.div.withConfig({displayName:"styles__Heading",componentId:"sc-155a8qj-0"})(["display:flex;align-items:center;"]),c=Object(r.c)(s).withConfig({displayName:"styles__HeaderContainer",componentId:"sc-155a8qj-1"})(["height:56px;min-height:56px;text-align:left;padding:12px 14px 12px 12px;align-items:center;color:#fff;min-width:100%;z-index:",";justify-content:space-between;background:",";background-color:",";box-shadow:0 3px 4px -1px ",";"],i.f.headerIndex,e=>e.theme.headerBackground,e=>e.theme.headerBackground,i.a.shadowColor),l=Object(r.c)(s).withConfig({displayName:"styles__HeadingLeft",componentId:"sc-155a8qj-2"})(["overflow:hidden;gap:8px;"]),u=Object(r.c)(s).withConfig({displayName:"styles__HeadingRight",componentId:"sc-155a8qj-3"})(["align-items:center;gap:12px;"]),d=Object(r.c)(o.a).withConfig({displayName:"styles__BotName",componentId:"sc-155a8qj-4"})(["margin:0;margin-right:8px;text-transform:none;letter-spacing:normal;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:1.3;color:",";font-size:16px;flex:1;"],e=>e.theme.headerText),f=Object(r.c)(a.a).withConfig({displayName:"styles__HeaderButton",componentId:"sc-155a8qj-5"})(["height:28px;width:28px;display:flex;align-items:center;justify-content:center;font-size:",";padding:0;background:#fff;background-color:#fff;svg{path{stroke:",";}}:hover{opacity:0.8;}"],i.d.fontSizeH4,e=>e.theme.buttonBackground),p=r.c.div.withConfig({displayName:"styles__StyledAvatar",componentId:"sc-155a8qj-6"})(["border-radius:6px;display:inline-block;width:32px;height:32px;background-image:url(",");background-size:contain;background-repeat:no-repeat;background-position:center;"],e=>e.avatar)},function(e,t,n){"use strict";n.d(t,"a",(function(){return D}));var r=n(16);function o(e,t){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return(s=i()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&o(a,n.prototype),a}).apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)})(e)}var l=function(e){var t,n;function r(t){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/master/src/internalHelpers/errors.md#"+t+" for more information.")||this)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n),r}(c(Error));function u(e){return Math.round(255*e)}function d(e,t,n){return u(e)+","+u(t)+","+u(n)}function f(e,t,n,r){if(void 0===r&&(r=d),0===t)return r(n,n,n);var o=(e%360+360)%360/60,a=(1-Math.abs(2*n-1))*t,i=a*(1-Math.abs(o%2-1)),s=0,c=0,l=0;o>=0&&o<1?(s=a,c=i):o>=1&&o<2?(s=i,c=a):o>=2&&o<3?(c=a,l=i):o>=3&&o<4?(c=i,l=a):o>=4&&o<5?(s=i,l=a):o>=5&&o<6&&(s=a,l=i);var u=n-a/2;return r(s+u,c+u,l+u)}var p={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var h=/^#[a-fA-F0-9]{6}$/,m=/^#[a-fA-F0-9]{8}$/,g=/^#[a-fA-F0-9]{3}$/,b=/^#[a-fA-F0-9]{4}$/,v=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,y=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,x=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,w=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function E(e){if("string"!=typeof e)throw new l(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return p[t]?"#"+p[t]:e}(e);if(t.match(h))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(m)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(g))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(b)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var o=v.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var a=y.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var i=x.exec(t);if(i){var s="rgb("+f(parseInt(""+i[1],10),parseInt(""+i[2],10)/100,parseInt(""+i[3],10)/100)+")",c=v.exec(s);if(!c)throw new l(4,t,s);return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var u=w.exec(t);if(u){var d="rgb("+f(parseInt(""+u[1],10),parseInt(""+u[2],10)/100,parseInt(""+u[3],10)/100)+")",E=v.exec(d);if(!E)throw new l(4,t,d);return{red:parseInt(""+E[1],10),green:parseInt(""+E[2],10),blue:parseInt(""+E[3],10),alpha:parseFloat(""+u[4])}}throw new l(5)}function O(e){return function(e){var t,n=e.red/255,r=e.green/255,o=e.blue/255,a=Math.max(n,r,o),i=Math.min(n,r,o),s=(a+i)/2;if(a===i)return void 0!==e.alpha?{hue:0,saturation:0,lightness:s,alpha:e.alpha}:{hue:0,saturation:0,lightness:s};var c=a-i,l=s>.5?c/(2-a-i):c/(a+i);switch(a){case n:t=(r-o)/c+(r<o?6:0);break;case r:t=(o-n)/c+2;break;default:t=(n-r)/c+4}return t*=60,void 0!==e.alpha?{hue:t,saturation:l,lightness:s,alpha:e.alpha}:{hue:t,saturation:l,lightness:s}}(E(e))}var k=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function _(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function C(e){return _(Math.round(255*e))}function j(e,t,n){return k("#"+C(e)+C(t)+C(n))}function T(e,t,n){return f(e,t,n,j)}function S(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return T(e,t,n);if("object"==typeof e&&void 0===t&&void 0===n)return T(e.hue,e.saturation,e.lightness);throw new l(1)}function I(e,t,n,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?T(e,t,n):"rgba("+f(e,t,n)+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?T(e.hue,e.saturation,e.lightness):"rgba("+f(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new l(2)}function A(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return k("#"+_(e)+_(t)+_(n));if("object"==typeof e&&void 0===t&&void 0===n)return k("#"+_(e.red)+_(e.green)+_(e.blue));throw new l(6)}function N(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var o=E(e);return"rgba("+o.red+","+o.green+","+o.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?A(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?A(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new l(7)}function P(e){if("object"!=typeof e)throw new l(8);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha}(e))return N(e);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return A(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha}(e))return I(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return S(e);throw new l(8)}function M(e){return function e(t,n,r){return function(){var o=r.concat(Array.prototype.slice.call(arguments));return o.length>=n?t.apply(this,o):e(t,n,o)}}(e,e.length,[])}function L(e,t,n){return Math.max(e,Math.min(t,n))}function R(e,t){if("transparent"===t)return t;var n=O(t);return P(Object(r.a)({},n,{lightness:L(0,1,n.lightness-parseFloat(e))}))}var D=M(R)},function(e,t,n){"use strict";function r(e,t,n){return o(e)?n:t}function o(e){let t=e;i(e)&&(t=function(e){const t=e.indexOf(",")>-1?",":" ";let n=(+(e=e.substr(4).split(")")[0].split(t))[0]).toString(16),r=(+e[1]).toString(16),o=(+e[2]).toString(16);1===n.length&&(n=`0${n}`);1===r.length&&(r=`0${r}`);1===o.length&&(o=`0${o}`);return`#${n}${r}${o}`}(e)),s(e)&&(t=e.replace(a,(e,t,n,r)=>`#${t}${t}${n}${n}${r}${r}`));const n="#"===t.charAt(0)?t.substring(1,7):t,r=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4);return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const a=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,i=e=>e.match(/^rgb/),s=e=>e.match(a)},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(86))},function(e,t,n){var r=n(39),o=n(147),a=n(46),i=n(149),s=n(145),c=n(144),l=o("wks"),u=r.Symbol,d=c?u:u&&u.withoutSetter||i;e.exports=function(e){return a(l,e)&&(s||"string"==typeof l[e])||(s&&a(u,e)?l[e]=u[e]:l[e]=d("Symbol."+e)),l[e]}},function(e,t,n){"use strict";var r=n(4),o=n.n(r);o.a.shape({chat_deleted_header:o.a.string,chat_deleted_text:o.a.string,back_to_chat_button:o.a.string,delete_text:o.a.string,delete_button:o.a.string,binary_headline:o.a.string,binary_1:o.a.string,binary_0:o.a.string,emoji_guideline:o.a.string,emoji_headline:o.a.string,freeform_description:o.a.string,freeform_placeholder:o.a.string,send:o.a.string})},function(e,t,n){"use strict";t.a=(e,t,n)=>e?e[t||n]||e.en:null},function(e,t,n){"use strict";n.d(t,"c",(function(){return p})),n.d(t,"e",(function(){return h})),n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return b})),n.d(t,"i",(function(){return v})),n.d(t,"f",(function(){return y})),n.d(t,"h",(function(){return x})),n.d(t,"g",(function(){return w})),n.d(t,"d",(function(){return E}));var r=n(5),o=n(98),a=n(99),i=n(100),s=n(2),c=n(24),l=n(9);const u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[n.replace(/_\w/g,e=>e[1].toUpperCase())]:r}},{})},d=e=>async(t,n)=>{if(!(null!=e&&e.length)>0)return;const{attachments:o=[]}=n().messages,{newAttachments:i=[],updated:c=[]}=Object(a.a)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter(e=>{let{sender:t,status:n}=e;return t===r.l.USER||n===r.a.CLEAN})}(e),e=>o.find((e=>{let{id:t,temporaryId:n}=e;return e=>{let{id:r,temporaryId:o}=e;return t&&t===r||n&&n===o}})(e))?"updated":"newAttachments");i.length>0&&t({type:s.G,data:{attachments:i}}),c.length>0&&t({type:s.F,data:{attachments:c}})},f=function(){let{status:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e!==r.a.PROCESSING},p=()=>async(e,t)=>{const{agent:{takenOver:n,requestedTakeover:a},chatbubble:{active:c,startedAt:p,chatHasStarted:h,botKey:g},connection:{token:b},environment:{PAT_HOST:v},messages:{attachments:y,buttonClicks:x,chatMessages:w,messageSentTime:E}}=t();if(!b||!h)return;const[O]=w.filter(e=>{let{from_bot:t}=e;return t}).slice(-1),[k]=y.filter(f).slice(-1),_=((e,t)=>{let{created:n}=e,{created:r}=t;return n&&r?new Date(n)>new Date(r)?n:r:n||r})(null!=O?O:{},null!=k?k:{})||E||p||(new Date).toISOString(),C=await e(Object(l.f)({method:"get",url:`${v}/chatbubble/${r.j}/latest`,params:{timestamp:_},...Object(l.a)({token:b})},{onError:t=>{403===t.response.status?(console.warn(`/chatbubble/${r.j}/latest returned 403, starting new chat`),e({type:s.Z,error:403}),e(Object(l.d)(g,!0))):console.error(t)}}));if(!C||!C.data)return;const{chatMessages:j,buttonClicks:T=[],takenOver:S,requestedTakeover:I,attachments:A}=C.data,N=Object(i.a)(w),P=Object(o.a)(x),M=j.filter(N),L=T.map(u).filter(P),R=M.length>0;var D,B;e(d(A)),e(m(R)),n!==S&&e({type:s.ub,data:{taken_over:S}}),a!==I&&e({type:s.wb,requestedTakeover:I}),(D=M,B="created",(D||[]).slice().sort((e,t)=>e[B]<t[B]?-1:1)).forEach(t=>{e({type:s.I,data:t,skipTypingIndicator:!0})}),L.forEach(t=>e({type:s.j,buttonClick:t})),R&&!c&&e({type:s.K})},h=()=>(e,t)=>{const{replyTimeoutId:n,takeoverPollIntervalId:o}=t().websocketFallback;if(clearTimeout(n),o)return;const a=setTimeout(()=>e(p()),r.q.REPLY_TIMEOUT_MS);e({type:c.d,replyTimeoutId:a,replyTimeoutAttempts:1})},m=e=>(t,n)=>{const{replyTimeoutId:o,replyTimeoutAttempts:a}=n().websocketFallback;if(clearTimeout(o),0===a)return;if(!(!e&&a<r.q.REPLY_TIMEOUT_MAX_ATTEMPTS))return e||console.error(`Reply timeout failed more than ${r.q.REPLY_TIMEOUT_MAX_ATTEMPTS} times`),void t({type:c.a});const i=r.q.REPLY_TIMEOUT_MS*r.q.REPLY_TIMEOUT_MS_MULTIPLIER**a,s=setTimeout(()=>t(p()),i);t({type:c.d,replyTimeoutId:s,replyTimeoutAttempts:a+1})},g=()=>(e,t)=>{const{replyTimeoutId:n}=t().websocketFallback;clearTimeout(n),e({type:c.a})},b=()=>(e,t)=>{const{takeoverPollIntervalId:n,takeoverRequestPollIntervalId:o}=t().websocketFallback;if(clearInterval(n),clearInterval(o),"number"==typeof n){const t=setInterval(()=>e(p()),r.q.TAKEOVER_POLL_INTERVAL_MS);e({type:c.e,takeoverPollIntervalId:t})}if("number"==typeof o){const t=setInterval(()=>e(p()),r.q.TAKEOVER_REQUEST_POLL_INTERVAL_MS);e({type:c.f,takeoverRequestPollIntervalId:t})}},v=()=>(e,t)=>{const{takeoverPollIntervalId:n,takeoverRequestPollIntervalId:o,replyTimeoutId:a}=t().websocketFallback;if(clearTimeout(a),clearTimeout(o),e({type:c.a}),e({type:c.c}),n)return;const i=setInterval(()=>e(p()),r.q.TAKEOVER_POLL_INTERVAL_MS);e({type:c.e,takeoverPollIntervalId:i})},y=()=>(e,t)=>{const{takeoverPollIntervalId:n}=t().websocketFallback;clearInterval(n),e({type:c.b})},x=()=>(e,t)=>{const{takeoverRequestPollIntervalId:n}=t().websocketFallback;if(n)return;const o=setInterval(()=>e(p()),r.q.TAKEOVER_REQUEST_POLL_INTERVAL_MS);e({type:c.f,takeoverRequestPollIntervalId:o})},w=()=>(e,t)=>{const{takeoverRequestPollIntervalId:n}=t().websocketFallback;clearInterval(n),e({type:c.c})},E=()=>(e,t)=>{const{messages:{chatMessages:n}}=t();n.find(e=>e.triggered_chat_start||"greeting"===e.exchange_type)||e(p())}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return u}));var r=n(1),o=n(11),a=n(12),i=n(6);const s=r.c.div.withConfig({displayName:"styles__NudgeContainer",componentId:"sc-1k0o2t4-0"})(["right:20px;bottom:",";z-index:10;position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";",";",";@media ","{",";z-index:16;box-shadow:0 -3px 15px 1px ",";}"],e=>{let{bubbleHidden:t}=e;return t?"30px":"100px"},i.a.shadowColor,o.f,e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`},i.c.maxPhone,e=>{let{modal:t}=e;return!t&&"\n left: 0px;\n right: 0px;\n bottom: 0px;\n border-radius: 14px 14px 0 0;"},i.a.shadowColor),c=r.c.div.withConfig({displayName:"styles__NudgeInner",componentId:"sc-1k0o2t4-1"})(["position:relative;padding:0px;max-width:380px;width:100%;max-height:calc(100vh - 150px);overflow-y:auto;",";@media ","{min-width:380px;}@media ","{min-width:100%;}"],e=>{let{modal:t}=e;return t&&"box-sizing: border-box"},i.c.minTablet,i.c.maxPhone),l=Object(r.c)(a.a).withConfig({displayName:"styles__NudgeDismiss",componentId:"sc-1k0o2t4-2"})(["top:8px;right:8px;z-index:15;display:flex;padding:0;border-radius:100px;position:absolute;&:hover{opacity:0.8;}svg path{stroke:",";}@media ","{",";}"],e=>{let{theme:t}=e;return t.buttonBackground||t.bubbleButtonBackground},i.c.maxPhone,e=>{let{modal:t}=e;return t?"top: 2px; right: 0;":"top: 8px; right: 8px;"}),u=r.c.div.withConfig({displayName:"styles__BorderElement",componentId:"sc-1k0o2t4-3"})(["position:absolute;background:#fff;width:100%;height:100%;left:0;right:0;top:0;bottom:0;border-radius:14px;@media ","{border-radius:",";}&:before{content:'';width:50px;height:calc(100% - 8px);background:",";position:absolute;z-index:-1;top:4px;left:-4px;border-radius:25px;@media ","{width:calc(100% - 8px);height:50px;top:-4px;left:4px;}}"],i.c.maxPhone,e=>{let{modal:t}=e;return t?"14px":"14px 14px 0 0"},e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground},i.c.maxPhone)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r.a})),n.d(t,"c",(function(){return b})),n.d(t,"e",(function(){return v.a})),n.d(t,"b",(function(){return y.a})),n.d(t,"d",(function(){return _}));var r=n(67),o=(n(4),n(0)),a=n.n(o),i=n(32),s=n(1),c=n(6);const l=s.c.div.withConfig({displayName:"styles__MaxLengthWrapper",componentId:"sc-bl0zra-0"})(["position:absolute;top:50%;transform:translateY(-50%);right:8px;font-size:",";color:",";"],c.d.fontSize12,c.h.textColorLight);var u=function(e){let{fieldName:t,maxLength:n,control:r}=e;const o=Object(i.d)({control:r,name:t});return a.a.createElement(l,null,`${o.length}/${n}`)},d=n(74),f=n(107),p=n(35);const h=s.c.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-1cahfhf-0"})(["position:relative;display:flex;"]),m=s.c.div.withConfig({displayName:"styles__Adornment",componentId:"sc-1cahfhf-1"})(["padding:0 4px;position:absolute;top:50%;transform:translateY(-50%);font-size:14px;display:"," ",";"],e=>{let{show:t}=e;return t?"block;":"none;"},e=>{let{adornmentPosition:t}=e;return"start"===t?"\n left: 10px;\n ":"\n left: auto;\n right: 10px;\n "}),g=s.c.input.withConfig({displayName:"styles__Input",componentId:"sc-1cahfhf-2"})(["background-color:",";color:",";padding:10px 16px;"," border-radius:18px;border:1px solid transparent;outline:none;flex:1;&::placeholder{opacity:0.42;}&:invalid{border:1px solid ",";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}"],e=>{let{theme:t}=e;return t.inputBackground},e=>{let{theme:t}=e;return t.inputText},e=>{let{adornmentWidth:t,adornmentPosition:n,hasMaxLength:r}=e;if("end"===n&&!r&&t)return`padding-right: ${t+10}px;`;if("start"===n&&t){let e=`padding-left: ${t+10}px;`;return r&&(e+="padding-right: 48px;"),e}return r?"padding-right: 56px;":void 0},c.a.errorColor);var b=function(e){var t,n,r,i,s;let{autoComplete:c="off",name:l,type:b="text",register:v,validators:y,control:x,id:w,setError:E,clearErrors:O,trigger:k,adornment:_,adornmentPosition:C,...j}=e;const T=Object(p.c)(y),S=Object(o.useRef)(null),I=Object(o.useRef)(null),{ref:A,...N}=v?v(l,T):{},[,P]=Object(o.useState)(!1);return a.a.createElement(a.a.Fragment,null,a.a.createElement(h,null,_&&a.a.createElement(m,{ref:e=>{S.current=e,P(!0)},show:!(null!==(t=T.maxLength)&&void 0!==t&&t.value&&"end"===C),adornmentPosition:C},_),a.a.createElement(g,Object.assign({autoComplete:c,name:l,type:b,adornmentPosition:C,adornmentWidth:null===(n=S.current)||void 0===n?void 0:n.clientWidth,hasMaxLength:!(null===(r=T.maxLength)||void 0===r||!r.value),id:w||l},Object(p.b)(T),N&&{...N},{ref:e=>{I.current=e,A&&A(e)}},"NUMBER"===b&&f.b,j)),!(null===(i=T.maxLength)||void 0===i||!i.value)&&x&&l&&a.a.createElement(u,{fieldName:l,control:x,maxLength:null===(s=T.maxLength)||void 0===s?void 0:s.value})),a.a.createElement(d.a,{inputRef:I,trigger:k,control:x,name:l,setError:E,clearErrors:O}))},v=n(96),y=n(95),x=n(108),w=n(38);const E=s.c.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-mikydd-0"})(["position:relative;display:flex;"]),O=s.c.select.withConfig({displayName:"styles__Select",componentId:"sc-mikydd-1"})(["background-color:",";color:",";padding:9px 16px;border-radius:18px;border:1px solid transparent;outline:none;flex:1;display:inline-block;appearance:none;text-indent:1px;text-overflow:'';&:invalid{border:1px solid ",";}"],e=>{let{theme:t}=e;return t.inputBackground},e=>{let{theme:t,isPlaceholder:n}=e;return n?Object(w.a)(t.inputBackground,"rgba(255, 255, 255, 0.46)","rgba(0, 0, 0, 0.46)"):t.inputText},c.a.errorColor),k=(s.c.option.withConfig({displayName:"styles__SelectOption",componentId:"sc-mikydd-2"})([""]),s.c.div.withConfig({displayName:"styles__SelectIcon",componentId:"sc-mikydd-3"})(["position:absolute;right:20px;top:6px;width:10px;height:6px;pointer-events:none;user-select:none;"]));var _=function(e){let{name:t,register:n,validators:r,control:s,id:c,setError:l,clearErrors:u,trigger:f,options:h,...m}=e;const g=Object(p.c)(r),b=Object(o.useRef)(null),{ref:v,...y}=n?n(t,g):{},w=Object(i.d)({name:t,control:s});return a.a.createElement(a.a.Fragment,null,a.a.createElement(E,null,a.a.createElement(O,Object.assign({name:t,type:"select",isPlaceholder:""===w,id:c||t},Object(p.b)(g),y&&{...y},{ref:e=>{b.current=e,v&&v(e)}},m),m.placeholder&&a.a.createElement("option",{value:"",disabled:!0,hidden:!0},m.placeholder),null==h?void 0:h.map((e,n)=>a.a.createElement("option",{key:`select-${t}-${e.id||n}`,value:e.value},e.label))),a.a.createElement(k,null,a.a.createElement(x.a,{color:"#445265"}))),a.a.createElement(d.a,{inputRef:b,trigger:f,control:s,name:t,setError:l,clearErrors:u}))}},function(e,t,n){var r=n(148),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(r(e),t)}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(5);t.a=e=>{const t=(null!=e?e:"").toUpperCase();return"LINK"===t?r.b.EXTERNAL_LINK:"TAKEOVER_REQUEST"===t?r.b.HANDOVER_REQUEST:t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ua})),n.d(t,"b",(function(){return da}));var r={};n.r(r),n.d(r,"reversed",(function(){return ee})),n.d(r,"mirrored",(function(){return te})),n.d(r,"createReversedEasing",(function(){return ne})),n.d(r,"createMirroredEasing",(function(){return re})),n.d(r,"createExpoIn",(function(){return oe})),n.d(r,"createBackIn",(function(){return ae})),n.d(r,"createAnticipateEasing",(function(){return ie})),n.d(r,"linear",(function(){return se})),n.d(r,"easeIn",(function(){return ce})),n.d(r,"easeOut",(function(){return le})),n.d(r,"easeInOut",(function(){return ue})),n.d(r,"circIn",(function(){return de})),n.d(r,"circOut",(function(){return fe})),n.d(r,"circInOut",(function(){return pe})),n.d(r,"backIn",(function(){return he})),n.d(r,"backOut",(function(){return me})),n.d(r,"backInOut",(function(){return ge})),n.d(r,"anticipate",(function(){return be})),n.d(r,"bounceOut",(function(){return ve})),n.d(r,"bounceIn",(function(){return ye})),n.d(r,"bounceInOut",(function(){return xe})),n.d(r,"cubicBezier",(function(){return je}));
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
- this file except in compliance with the License. You may obtain a copy of the
6
- License at http://www.apache.org/licenses/LICENSE-2.0
7
-
8
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11
- MERCHANTABLITY OR NON-INFRINGEMENT.
12
-
13
- See the Apache Version 2.0 License for specific language governing permissions
14
- and limitations under the License.
15
- ***************************************************************************** */
16
- var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function c(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}var l=n(0);var u=0,d="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(e){return window.requestAnimationFrame(e)}:function(e){var t=Date.now(),n=Math.max(0,16.7-(t-u));u=t+n,setTimeout((function(){return e(u)}),n)},f=1/60*1e3,p=!0,h=!1,m=!1,g={delta:0,timestamp:0},b=["read","update","preRender","render","postRender"],v=function(e){return h=e},y=b.reduce((function(e,t){var n,r,o,a,i,s,c,l,u;return e[t]=(n=v,r=[],o=[],a=0,i=!1,s=0,c=new WeakSet,l=new WeakSet,u={cancel:function(e){var t=o.indexOf(e);c.add(e),-1!==t&&o.splice(t,1)},process:function(e){var t,d;if(i=!0,r=(t=[o,r])[0],(o=t[1]).length=0,a=r.length)for(s=0;s<a;s++)(d=r[s])(e),!0!==l.has(d)||c.has(d)||(u.schedule(d),n(!0));i=!1},schedule:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var s=n&&i,u=s?r:o;c.delete(e),t&&l.add(e),-1===u.indexOf(e)&&(u.push(e),s&&(a=r.length))}}),e}),{}),x=b.reduce((function(e,t){var n=y[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),h||k(),n.schedule(e,t,r),e},e}),{}),w=b.reduce((function(e,t){return e[t]=y[t].cancel,e}),{}),E=function(e){return y[e].process(g)},O=function(e){h=!1,g.delta=p?f:Math.max(Math.min(e-g.timestamp,40),1),p||(f=g.delta),g.timestamp=e,m=!0,b.forEach(E),m=!1,h&&(p=!1,d(O))},k=function(){h=!0,p=!0,m||d(O)},_=function(){return g},C=x,j=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},T=function(e){return e%1?Number(e.toFixed(5)):e},S=/(-)?(\d[\d\.]*)/g,I=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,A=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,N={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},P=i(i({},N),{transform:j(0,1)}),M=i(i({},N),{default:1}),L=function(e){return{test:function(t){return"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},R=L("deg"),D=L("%"),B=L("px"),F=L("vh"),z=L("vw"),U=i(i({},D),{parse:function(e){return D.parse(e)/100},transform:function(e){return D.transform(100*e)}}),H=j(0,255),$=function(e){return void 0!==e.red},V=function(e){return void 0!==e.hue};var q=function(e){return function(t){if("string"!=typeof t)return t;for(var n={},r=function(e){return e.substring(e.indexOf("(")+1,e.lastIndexOf(")"))}(t).replace(/(,|\/)/g," ").split(/ \s*/),o=0;o<4;o++)n[e[o]]=void 0!==r[o]?parseFloat(r[o]):1;return n}},G=i(i({},N),{transform:function(e){return Math.round(H(e))}});function W(e,t){return e.startsWith(t)&&A.test(e)}var Y={test:function(e){return"string"==typeof e?W(e,"rgb"):$(e)},parse:q(["red","green","blue","alpha"]),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,a=void 0===o?1:o;return function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha;return"rgba("+t+", "+n+", "+r+", "+(void 0===o?1:o)+")"}({red:G.transform(t),green:G.transform(n),blue:G.transform(r),alpha:T(P.transform(a))})}},K={test:function(e){return"string"==typeof e?W(e,"hsl"):V(e)},parse:q(["hue","saturation","lightness","alpha"]),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,a=void 0===o?1:o;return function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha;return"hsla("+t+", "+n+", "+r+", "+(void 0===o?1:o)+")"}({hue:Math.round(t),saturation:D.transform(T(n)),lightness:D.transform(T(r)),alpha:T(P.transform(a))})}},X=i(i({},Y),{test:function(e){return"string"==typeof e&&W(e,"#")},parse:function(e){var t="",n="",r="";return e.length>4?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),t+=t,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(e){return"string"==typeof e&&A.test(e)||$(e)||V(e)},parse:function(e){return Y.test(e)?Y.parse(e):K.test(e)?K.parse(e):X.test(e)?X.parse(e):e},transform:function(e){return $(e)?Y.transform(e):V(e)?K.transform(e):e}},Q=function(e){return"number"==typeof e?0:e},Z={test:function(e){if("string"!=typeof e||!isNaN(e))return!1;var t=0,n=e.match(S),r=e.match(I);return n&&(t+=n.length),r&&(t+=r.length),t>0},parse:function(e){var t=e,n=[],r=t.match(I);r&&(t=t.replace(I,"${c}"),n.push.apply(n,r.map(J.parse)));var o=t.match(S);return o&&n.push.apply(n,o.map(N.parse)),n},createTransformer:function(e){var t=e,n=0,r=e.match(I),o=r?r.length:0;if(r)for(var a=0;a<o;a++)t=t.replace(r[a],"${c}"),n++;var i=t.match(S),s=i?i.length:0;if(i)for(a=0;a<s;a++)t=t.replace(i[a],"${n}"),n++;return function(e){for(var r=t,a=0;a<n;a++)r=r.replace(a<o?"${c}":"${n}",a<o?J.transform(e[a]):T(e[a]));return r}},getAnimatableNone:function(e){var t=Z.parse(e);return Z.createTransformer(e)(t.map(Q))}},ee=function(e){return function(t){return 1-e(1-t)}},te=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},ne=ee,re=te,oe=function(e){return function(t){return Math.pow(t,e)}},ae=function(e){return function(t){return t*t*((e+1)*t-e)}},ie=function(e){var t=ae(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}},se=function(e){return e},ce=oe(2),le=ee(ce),ue=te(ce),de=function(e){return 1-Math.sin(Math.acos(e))},fe=ee(de),pe=te(fe),he=ae(1.525),me=ee(he),ge=te(he),be=ie(1.525),ve=function(e){var t=e*e;return e<4/11?7.5625*t:e<8/11?9.075*t-9.9*e+3.4:e<.9?4356/361*t-35442/1805*e+16061/1805:10.8*e*e-20.52*e+10.72},ye=function(e){return 1-ve(1-e)},xe=function(e){return e<.5?.5*(1-ve(1-2*e)):.5*ve(2*e-1)+.5},we="undefined"!=typeof Float32Array,Ee=function(e,t){return 1-3*t+3*e},Oe=function(e,t){return 3*t-6*e},ke=function(e){return 3*e},_e=function(e,t,n){return 3*Ee(t,n)*e*e+2*Oe(t,n)*e+ke(t)},Ce=function(e,t,n){return((Ee(t,n)*e+Oe(t,n))*e+ke(t))*e};function je(e,t,n,r){var o=we?new Float32Array(11):new Array(11),a=function(t){for(var r,a,i,s=0,c=1;10!==c&&o[c]<=t;++c)s+=.1;return--c,r=(t-o[c])/(o[c+1]-o[c]),(i=_e(a=s+.1*r,e,n))>=.001?function(t,r){for(var o=0,a=0;o<8;++o){if(0===(a=_e(r,e,n)))return r;r-=(Ce(r,e,n)-t)/a}return r}(t,a):0===i?a:function(t,r,o){var a,i,s=0;do{(a=Ce(i=r+(o-r)/2,e,n)-t)>0?o=i:r=i}while(Math.abs(a)>1e-7&&++s<10);return i}(t,s,s+.1)};!function(){for(var t=0;t<11;++t)o[t]=Ce(.1*t,e,n)}();return function(o){return e===t&&n===r?o:0===o?0:1===o?1:Ce(a(o),t,r)}}var Te={x:0,y:0,z:0},Se=function(e){return"number"==typeof e},Ie=function(e){return function(t,n,r){return void 0!==r?e(t,n,r):function(r){return e(t,n,r)}}},Ae=Ie((function(e,t,n){return Math.min(Math.max(n,e),t)})),Ne=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Pe=function(e){return Ne(e)&&e.hasOwnProperty("z")},Me=function(e,t){return Math.abs(e-t)},Le=function(e,t){if(void 0===t&&(t=Te),Se(e)&&Se(t))return Me(e,t);if(Ne(e)&&Ne(t)){var n=Me(e.x,t.x),r=Me(e.y,t.y),o=Pe(e)&&Pe(t)?Me(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},Re=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},De=function(e,t,n){return-n*e+n*t+e},Be=function(){return(Be=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Fe=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},ze=[X,Y,K],Ue=function(e){return ze.find((function(t){return t.test(e)}))},He=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},$e=function(e,t){var n=Ue(e),r=Ue(t);He(e),He(t),n.transform,r.transform;var o=n.parse(e),a=r.parse(t),i=Be({},o),s=n===K?De:Fe;return function(e){for(var t in i)"alpha"!==t&&(i[t]=s(o[t],a[t],e));return i.alpha=De(o.alpha,a.alpha,e),n.transform(i)}},Ve=function(e,t){return function(n){return t(e(n))}},qe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(Ve)};function Ge(e,t){return Se(e)?function(n){return De(e,t,n)}:J.test(e)?$e(e,t):Ke(e,t)}var We=function(e,t){var n=e.slice(),r=n.length,o=e.map((function(e,n){return Ge(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}};function Ye(e){for(var t=Z.parse(e),n=t.length,r=0,o=0,a=0,i=0;i<n;i++)r||"number"==typeof t[i]?r++:void 0!==t[i].hue?a++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:a}}var Ke=function(e,t){var n=Z.createTransformer(t),r=Ye(e),o=Ye(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&(r.numNumbers,o.numNumbers),qe(We(r.parsed,o.parsed),n)};var Xe,Je=function(e){return e},Qe=function(e){return void 0===e&&(e=Je),Ie((function(t,n,r){var o=n-r,a=-(0-t+1)*(0-e(Math.abs(o)));return o<=0?n+a:n-a}))},Ze=(Qe(),Qe(Math.sqrt),function(e,t){return t?e*(1e3/t):0}),et=(Ie((function(e,t,n){var r=t-e;return((n-e)%r+r)%r+e})),Ae(0,1),function(e){var t=e.onRead,n=e.onRender,r=e.uncachedValues,o=void 0===r?new Set:r,a=e.useCache,i=void 0===a||a;return function(e){void 0===e&&(e={});var r=s(e,[]),a={},c=[],l=!1;function u(e,t){e.startsWith("--")&&(r.hasCSSVariable=!0);var n=a[e];a[e]=t,a[e]!==n&&(-1===c.indexOf(e)&&c.push(e),l||(l=!0,C.render(d.render)))}var d={get:function(e,n){return void 0===n&&(n=!1),!n&&i&&!o.has(e)&&void 0!==a[e]?a[e]:t(e,r)},set:function(e,t){if("string"==typeof e)u(e,t);else for(var n in e)u(n,e[n]);return this},render:function(e){return void 0===e&&(e=!1),(l||!0===e)&&(n(a,r,c),l=!1,c.length=0),this}};return d}}),tt=/([a-z])([A-Z])/g,nt=function(e){return e.replace(tt,"$1-$2").toLowerCase()},rt=new Map,ot=new Map,at=["Webkit","Moz","O","ms",""],it=at.length,st="undefined"!=typeof document,ct=function(e,t){return ot.set(e,nt(t))},lt=function(e,t){void 0===t&&(t=!1);var n=t?ot:rt;return n.has(e)||(st?function(e){Xe=Xe||document.createElement("div");for(var t=0;t<it;t++){var n=at[t],r=""===n,o=r?e:n+e.charAt(0).toUpperCase()+e.slice(1);if(o in Xe.style||r){if(r&&"clipPath"===e&&ot.has(e))return;rt.set(e,o),ct(e,(r?"":"-")+nt(o))}}}(e):function(e){ct(e,e)}(e)),n.get(e)||e},ut=["","X","Y","Z"],dt=["translate","scale","rotate","skew","transformPerspective"].reduce((function(e,t){return ut.reduce((function(e,n){return e.push(t+n),e}),e)}),["x","y","z"]),ft=dt.reduce((function(e,t){return e[t]=!0,e}),{});function pt(e){return!0===ft[e]}function ht(e,t){return dt.indexOf(e)-dt.indexOf(t)}var mt=new Set(["originX","originY","originZ"]);function gt(e){return mt.has(e)}var bt=i(i({},N),{transform:Math.round}),vt={color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:R,rotateX:R,rotateY:R,rotateZ:R,scale:M,scaleX:M,scaleY:M,scaleZ:M,skew:R,skewX:R,skewY:R,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,opacity:P,originX:U,originY:U,originZ:B,zIndex:bt,fillOpacity:P,strokeOpacity:P,numOctaves:bt},yt=function(e){return vt[e]},xt=function(e,t){return t&&"number"==typeof e?t.transform(e):e},wt=new Set(["scrollLeft","scrollTop"]),Et=new Set(["scrollLeft","scrollTop","transform"]),Ot={x:"translateX",y:"translateY",z:"translateZ"};function kt(e){return"function"==typeof e}function _t(e,t,n,r,o,a,i,s){void 0===t&&(t=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===a&&(a=[]),void 0===i&&(i=!1),void 0===s&&(s=!0);var c=!0,l=!1,u=!1;for(var d in e){var f=e[d],p=yt(d),h=xt(f,p);pt(d)?(l=!0,r[d]=h,a.push(d),c&&(p.default&&f!==p.default||!p.default&&0!==f)&&(c=!1)):gt(d)?(o[d]=h,u=!0):Et.has(d)&&kt(h)||(n[lt(d,i)]=h)}return(l||"function"==typeof e.transform)&&(n.transform=function(e,t,n,r,o,a){void 0===a&&(a=!0);var i="",s=!1;n.sort(ht);for(var c=n.length,l=0;l<c;l++){var u=n[l];i+=(Ot[u]||u)+"("+t[u]+") ",s="z"===u||s}return!s&&o?i+="translateZ(0)":i=i.trim(),kt(e.transform)?i=e.transform(t,r?"":i):a&&r&&(i="none"),i}(e,r,a,c,t,s)),u&&(n.transformOrigin=(o.originX||"50%")+" "+(o.originY||"50%")+" "+(o.originZ||0)),n}function Ct(e){var t=void 0===e?{}:e,n=t.enableHardwareAcceleration,r=void 0===n||n,o=t.isDashCase,a=void 0===o||o,i=t.allowTransformNone,s=void 0===i||i,c={},l={},u={},d=[];return function(e){return d.length=0,_t(e,r,c,l,u,d,a,s),c}}var jt=et({onRead:function(e,t){var n=t.element,r=t.preparseOutput,o=yt(e);if(pt(e))return o&&o.default||0;if(wt.has(e))return n[e];var a=window.getComputedStyle(n,null).getPropertyValue(lt(e,!0))||0;return r&&o&&o.test(a)&&o.parse?o.parse(a):a},onRender:function(e,t,n){var r=t.element,o=t.buildStyles,a=t.hasCSSVariable;if(Object.assign(r.style,o(e)),a)for(var i=n.length,s=0;s<i;s++){var c=n[s];c.startsWith("--")&&r.style.setProperty(c,e[c])}-1!==n.indexOf("scrollLeft")&&(r.scrollLeft=e.scrollLeft),-1!==n.indexOf("scrollTop")&&(r.scrollTop=e.scrollTop)},uncachedValues:wt});var Tt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),St=function(e,t){return B.transform(e*t)},It={x:0,y:0,width:0,height:0};function At(e,t,n){return"string"==typeof e?e:B.transform(t+n*e)}var Nt={enableHardwareAcceleration:!1,isDashCase:!1};function Pt(e,t,n,r,o,a){void 0===t&&(t=It),void 0===r&&(r=Ct(Nt)),void 0===o&&(o={style:{}}),void 0===a&&(a=!0);var i=e.attrX,c=e.attrY,l=e.originX,u=e.originY,d=e.pathLength,f=e.pathSpacing,p=void 0===f?1:f,h=e.pathOffset,m=void 0===h?0:h,g=r(s(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]));for(var b in g){if("transform"===b)o.style.transform=g[b];else o[a&&!Tt.has(b)?nt(b):b]=g[b]}return(void 0!==l||void 0!==u||g.transform)&&(o.style.transformOrigin=function(e,t,n){return At(t,e.x,e.width)+" "+At(n,e.y,e.height)}(t,void 0!==l?l:.5,void 0!==u?u:.5)),void 0!==i&&(o.x=i),void 0!==c&&(o.y=c),void 0!==n&&void 0!==d&&(o[a?"stroke-dashoffset":"strokeDashoffset"]=St(-m,n),o[a?"stroke-dasharray":"strokeDasharray"]=St(d,n)+" "+St(p,n)),o}function Mt(e,t,n){void 0===n&&(n=!0);var r={style:{}},o=Ct(Nt);return function(a){return Pt(a,e,t,o,r,n)}}var Lt=et({onRead:function(e,t){var n=t.element;if(pt(e=Tt.has(e)?e:nt(e))){var r=yt(e);return r&&r.default||0}return n.getAttribute(e)},onRender:function(e,t){var n=t.element,r=(0,t.buildAttrs)(e);for(var o in r)"style"===o?Object.assign(n.style,r.style):n.setAttribute(o,r[o])}}),Rt=et({useCache:!1,onRead:function(e){return"scrollTop"===e?window.pageYOffset:window.pageXOffset},onRender:function(e){var t=e.scrollTop,n=void 0===t?0:t,r=e.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,n)}}),Dt=new WeakMap,Bt=function(e,t){var n,r,o,a;return e===window?n=Rt(e):!function(e){return e instanceof HTMLElement||"function"==typeof e.click}(e)?function(e){return e instanceof SVGElement||"ownerSVGElement"in e}(e)&&(o=function(e){try{return function(e){return"function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}(e)}catch(e){return{x:0,y:0,width:0,height:0}}}(r=e),a=function(e){return"path"===e.tagName}(r)&&r.getTotalLength?r.getTotalLength():void 0,n=Lt({element:r,buildAttrs:Mt(o,a)})):n=function(e,t){void 0===t&&(t={});var n=t.enableHardwareAcceleration,r=t.allowTransformNone,o=s(t,["enableHardwareAcceleration","allowTransformNone"]);return jt(i({element:e,buildStyles:Ct({enableHardwareAcceleration:n,allowTransformNone:r}),preparseOutput:!0},o))}(e,t),Dt.set(e,n),n};var Ft=function(e,t){return function(e,t){return Dt.has(e)?Dt.get(e):Bt(e,t)}("string"==typeof e?document.querySelector(e):e,t)},zt=function(){return function(e,t){var n=this,r=e.middleware,o=e.onComplete;this.isActive=!0,this.update=function(e){n.observer.update&&n.updateObserver(e)},this.complete=function(){n.observer.complete&&n.isActive&&n.observer.complete(),n.onComplete&&n.onComplete(),n.isActive=!1},this.error=function(e){n.observer.error&&n.isActive&&n.observer.error(e),n.isActive=!1},this.observer=t,this.updateObserver=function(e){return t.update(e)},this.onComplete=o,t.update&&r&&r.length&&r.forEach((function(e){return n.updateObserver=e(n.updateObserver,n.complete)}))}}(),Ut=function(e,t,n){var r=t.middleware;return new zt({middleware:r,onComplete:n},"function"==typeof e?{update:e}:e)},Ht=function(){function e(e){void 0===e&&(e={}),this.props=e}return e.prototype.create=function(t){return new e(t)},e.prototype.start=function(e){void 0===e&&(e={});var t=!1,n={stop:function(){}},r=this.props,o=r.init,a=s(r,["init"]),c=o(Ut(e,a,(function(){t=!0,n.stop()})));return n=c?i({},n,c):n,t&&n.stop(),n},e.prototype.applyMiddleware=function(e){return this.create(i({},this.props,{middleware:this.props.middleware?[e].concat(this.props.middleware):[e]}))},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=1===e.length?e[0]:qe.apply(void 0,e);return this.applyMiddleware((function(e){return function(t){return e(n(t))}}))},e}(),$t=function(e){return new Ht({init:e})},Vt=[B,D,R,F,z],qt=function(e){return Vt.find((function(t){return t.test(e)}))},Gt=function(e,t){return e(t)},Wt=function(e,t){var n=t.from,r=t.to,o=s(t,["from","to"]),a=qt(n)||qt(r),c=a.transform,l=a.parse;return e(i({},o,{from:"string"==typeof n?l(n):n,to:"string"==typeof r?l(r):r})).pipe(c)},Yt=function(e){return function(t,n){var r=n.from,o=n.to,a=s(n,["from","to"]);return t(i({},a,{from:0,to:1})).pipe(e(r,o))}},Kt=Yt($e),Xt=Yt(Ke),Jt=function(e,t){var n=function(e){var t=Object.keys(e),n=function(t,n){return void 0!==t&&!e[n](t)};return{getVectorKeys:function(e){return t.reduce((function(t,r){return n(e[r],r)&&t.push(r),t}),[])},testVectorProps:function(e){return e&&t.some((function(t){return n(e[t],t)}))}}}(t),r=n.testVectorProps,o=n.getVectorKeys;return function(t){if(!r(t))return e(t);var n=o(t),a=t[n[0]];return Qt(a)(e,t,n)}},Qt=function(e){return"number"==typeof e?Gt:function(e){return Boolean(qt(e))}(e)?Wt:J.test(e)?Kt:Z.test(e)?Xt:Gt},Zt=Jt((function(e){return void 0===e&&(e={}),$t((function(t){var n=t.complete,r=t.update,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,c=e.power,l=void 0===c?.8:c,u=e.timeConstant,d=void 0===u?350:u,f=e.restDelta,p=void 0===f?.5:f,h=e.modifyTarget,m=0,g=l*a,b=Math.round(s+g),v=void 0===h?b:h(b),y=C.update((function(e){var t=e.delta;m+=t;var o=-g*Math.exp(-m/d),a=o>p||o<-p;r(a?v+o:v),a||(w.update(y),n())}),!0);return{stop:function(){return w.update(y)}}}))}),{from:N.test,modifyTarget:function(e){return"function"==typeof e},velocity:N.test}),en=Jt((function(e){return void 0===e&&(e={}),$t((function(t){var n=t.update,r=t.complete,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,c=e.to,l=void 0===c?0:c,u=e.stiffness,d=void 0===u?100:u,f=e.damping,p=void 0===f?10:f,h=e.mass,m=void 0===h?1:h,g=e.restSpeed,b=void 0===g?.01:g,v=e.restDelta,y=void 0===v?.01:v,x=a?-a/1e3:0,E=0,O=l-s,k=s,_=k,j=C.update((function(e){var t=e.delta;E+=t;var o=p/(2*Math.sqrt(d*m)),i=Math.sqrt(d/m)/1e3;if(_=k,o<1){var s=Math.exp(-o*i*E),c=i*Math.sqrt(1-o*o);k=l-s*((x+o*i*O)/c*Math.sin(c*E)+O*Math.cos(c*E))}else{s=Math.exp(-i*E);k=l-s*(O+(x+i*O)*E)}a=Ze(k-_,t);var u=Math.abs(a)<=b,f=Math.abs(l-k)<=y;u&&f?(n(k=l),w.update(j),r()):n(k)}),!0);return{stop:function(){return w.update(j)}}}))}),{from:N.test,to:N.test,stiffness:N.test,damping:N.test,mass:N.test,velocity:N.test}),tn=Jt((function(e){var t=e.from,n=void 0===t?0:t,r=e.velocity,o=void 0===r?0:r,a=e.min,s=e.max,c=e.power,l=void 0===c?.8:c,u=e.timeConstant,d=void 0===u?700:u,f=e.bounceStiffness,p=void 0===f?500:f,h=e.bounceDamping,m=void 0===h?10:h,g=e.restDelta,b=void 0===g?1:g,v=e.modifyTarget;return $t((function(e){var t,r=e.update,c=e.complete,u=n,f=n,h=!1,g=function(e){return void 0!==a&&e<=a},y=function(e){return void 0!==s&&e>=s},x=function(e){return g(e)||y(e)},w=function(e){r(e),u=f,o=Ze((f=e)-u,_().delta),t&&!h&&function(e,t){return g(e)&&t<0||y(e)&&t>0}(e,o)&&O({from:e,velocity:o})},E=function(e,n){t&&t.stop(),t=e.start({update:w,complete:function(){n?n():c()}})},O=function(e){h=!0,E(en(i({},e,{to:g(e.from)?a:s,stiffness:p,damping:m,restDelta:b})))};if(x(n))O({from:n,velocity:o});else if(0!==o){var k=Zt({from:n,velocity:o,timeConstant:d,power:l,restDelta:x(n)?20:b,modifyTarget:v});E(k,(function(){x(f)?O({from:f,velocity:o}):c()}))}else c();return{stop:function(){return t&&t.stop()}}}))}),{from:N.test,velocity:N.test,min:N.test,max:N.test,damping:N.test,stiffness:N.test,modifyTarget:function(e){return"function"==typeof e}}),nn=Jt((function(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.ease,i=void 0===a?se:a,s=e.reverseEase;return void 0!==s&&s&&(i=ne(i)),$t((function(e){var t=e.update;return{seek:function(e){return t(e)}}})).pipe(i,(function(e){return De(n,o,e)}))}),{ease:function(e){return"function"==typeof e},from:N.test,to:N.test}),rn=Ae(0,1),on=function(e){return void 0===e&&(e={}),$t((function(t){var n,r=t.update,o=t.complete,a=e.duration,i=void 0===a?300:a,s=e.ease,c=void 0===s?le:s,l=e.flip,u=void 0===l?0:l,d=e.loop,f=void 0===d?0:d,p=e.yoyo,h=void 0===p?0:p,m=e.repeatDelay,g=void 0===m?0:m,b=e.from,v=void 0===b?0:b,y=e.to,x=void 0===y?1:y,E=e.elapsed,O=void 0===E?0:E,k=e.flipCount,_=void 0===k?0:k,j=e.yoyoCount,T=void 0===j?0:j,S=e.loopCount,I=void 0===S?0:S,A=nn({from:v,to:x,ease:c}).start(r),N=0,P=!1,M=function(e){var t;void 0===e&&(e=!1),A=nn({from:v=(t=[x,v])[0],to:x=t[1],ease:c,reverseEase:e}).start(r)},L=function(){N=rn(Re(0,i,O)),A.seek(N)},R=function(){P=!0,n=C.update((function(e){var t,r=e.delta;O+=r,L(),!(t=P&&O>i+g)||(!t||f||u||h)&&(O=O-i-g,f&&I<f?(I++,1):u&&_<u?(_++,M(),1):h&&T<h&&(T++,M(T%2!=0),1))||(w.update(n),o&&C.update(o,!1,!0))}),!0)},D=function(){P=!1,n&&w.update(n)};return R(),{isActive:function(){return P},getElapsed:function(){return Ae(0,i,O)},getProgress:function(){return N},stop:function(){D()},pause:function(){return D(),this},resume:function(){return P||R(),this},seek:function(e){return O=De(0,i,e),C.update(L,!1,!0),this},reverse:function(){return M(),this}}}))},an=Ae(0,1),sn=function(e){var t=e.easings,n=e.ease,r=void 0===n?se:n,o=e.times,a=e.values,c=s(e,["easings","ease","times","values"]);t=Array.isArray(t)?t:function(e,t){return e.map((function(){return t||le})).splice(0,e.length-1)}(a,t),o=o||function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(a);var l=t.map((function(e,t){return nn({from:a[t],to:a[t+1],ease:e})}));return on(i({},c,{ease:r})).applyMiddleware((function(e){return function(e,t,n){var r=e.length,o=r-1,a=o-1,i=t.map((function(e){return e.start(n)}));return function(t){t<=e[0]&&i[0].seek(0),t>=e[o]&&i[a].seek(1);for(var n=1;n<r&&!(e[n]>t||n===o);n++);var s=Re(e[n-1],e[n],t);i[n-1].seek(an(s))}}(o,l,e)}))},cn=function(e,t,n){return $t((function(r){var o=r.update,a=t.split(" ").map((function(t){return e.addEventListener(t,o,n),t}));return{stop:function(){return a.forEach((function(t){return e.removeEventListener(t,o,n)}))}}}))},ln=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},un=function(e,t){return void 0===t&&(t={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),t.clientX=t.x=e.clientX,t.clientY=t.y=e.clientY,t.pageX=e.pageX,t.pageY=e.pageY,t},dn=[ln()];if("undefined"!=typeof document){cn(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(e){var t=e.touches;!0;var n=t.length;dn.length=0;for(var r=0;r<n;r++){var o=t[r];dn.push(un(o))}}))}var fn=ln();if("undefined"!=typeof document){cn(document,"mousedown mousemove",!0).start((function(e){!0,un(e,fn)}))}var pn=function(e){return $t((function(t){var n=t.complete,r=setTimeout(n,e);return{stop:function(){return clearTimeout(r)}}}))},hn=function(){function e(e,t){var n,r=this,o=void 0===t?{}:t,a=o.transformer,i=o.parent;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),r.prev=r.current,r.current=r.transformer?r.transformer(e):e,r.updateSubscribers&&r.prev!==r.current&&r.updateSubscribers.forEach(r.notifySubscriber),r.children&&r.children.forEach(r.setChild),t&&r.renderSubscribers&&r.renderSubscribers.forEach(r.notifySubscriber);var n=_(),o=n.delta,a=n.timestamp;r.lastUpdated!==a&&(r.timeDelta=o,r.lastUpdated=a,C.postRender(r.scheduleVelocityCheck))},this.notifySubscriber=function(e){e(r.current)},this.scheduleVelocityCheck=function(){return C.postRender(r.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==r.lastUpdated&&(r.prev=r.current)},this.setChild=function(e){return e.set(r.current)},this.parent=i,this.transformer=a,this.set(e,!1),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return e.prototype.addChild=function(t){void 0===t&&(t={});var n=new e(this.current,i({parent:this},t));return this.children||(this.children=new Set),this.children.add(n),n},e.prototype.removeChild=function(e){this.children&&this.children.delete(e)},e.prototype.subscribeTo=function(e,t){var n=this,r=function(){return t(n.current)};return e.add(r),function(){return e.delete(r)}},e.prototype.onChange=function(e){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,e)},e.prototype.onRenderRequest=function(e){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(e),this.subscribeTo(this.renderSubscribers,e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getVelocity=function(){return this.canTrackVelocity?Ze(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.parent&&this.parent.removeChild(this),this.stop()},e}();function mn(e,t){return new hn(e,t)}function gn(e){var t=Object(l.useRef)(null);return null===t.current&&(t.current=e()),t.current}var bn,vn=function(e){return e instanceof hn},yn=et({onRead:function(){return null},onRender:function(e,t){return(0,t.onUpdate)(e)}}),xn=function(){function e(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}return e.prototype.has=function(e){return this.values.has(e)},e.prototype.set=function(e,t){this.values.set(e,t),this.hasMounted&&this.bindValueToOutput(e,t)},e.prototype.get=function(e,t){var n=this.values.get(e);return void 0===n&&void 0!==t&&(n=new hn(t),this.set(e,n)),n},e.prototype.forEach=function(e){return this.values.forEach(e)},e.prototype.bindValueToOutput=function(e,t){var n=this,r=t.onRenderRequest((function(t){return n.output&&n.output(e,t)})),o=t.onChange((function(t){n.onUpdate&&n.onUpdate.set(e,t)}));this.unsubscribers.has(e)&&this.unsubscribers.get(e)(),this.unsubscribers.set(e,(function(){r(),o()}))},e.prototype.setOnUpdate=function(e){this.onUpdate=void 0,e&&(this.onUpdate=yn({onUpdate:e}))},e.prototype.setTransformTemplate=function(e){this.transformTemplate!==e&&(this.transformTemplate=e,this.updateTransformTemplate())},e.prototype.getTransformTemplate=function(){return this.transformTemplate},e.prototype.updateTransformTemplate=function(){this.output&&this.output("transform",this.transformTemplate)},e.prototype.mount=function(e){var t=this;this.hasMounted=!0,e&&(this.output=e),this.values.forEach((function(e,n){return t.bindValueToOutput(n,e)})),this.updateTransformTemplate()},e.prototype.unmount=function(){var e=this;this.values.forEach((function(t,n){var r=e.unsubscribers.get(n);r&&r()}))},e}(),wn=new Set(["dragOriginX","dragOriginY"]),En=function(e){var t=gn((function(){var t=new xn;for(var n in e)vn(e[n])&&!wn.has(n)&&t.set(n,e[n]);return t}));return t.setOnUpdate(e.onUpdate),t.setTransformTemplate(e.transformTemplate),t},On=null,kn=function(){return null!==On},_n=function(){On=[]},Cn=function(){On&&On.forEach((function(e){return e.render()})),On=null},jn=function(e){On&&On.push(e)},Tn=Object(l.memo)((function(e){var t=e.innerRef,n=e.values,r=e.isStatic;return Object(l.useEffect)((function(){t.current,Element;var e=Ft(t.current,{preparseOutput:!1,enableHardwareAcceleration:!r});return n.mount((function(t,n){e.set(t,n),kn()&&jn(e)})),function(){return n.unmount()}}),[]),null})),Sn=(bn=function(e){return e.get()},function(e){var t={};return e.forEach((function(e,n){return t[n]=bn(e)})),t}),In=new Set(["originX","originY","originZ"]),An=function(e){return In.has(e)},Nn=function(e,t,n){var r=Sn(e),o=e.getTransformTemplate();return o&&(r.transform=t.transform?o({},t.transform):o),_t(i(i({},t),r),!n)},Pn=function(e){return Array.isArray(e)},Mn=function(e){return Pn(e)?e[e.length-1]||0:e},Ln=[N,B,D,R,z,F,{test:function(e){return"auto"===e},parse:function(e){return e}}],Rn=c(Ln,[J,Z]),Dn=function(e){return function(t){return t.test(e)}},Bn=function(e){return Ln.find(Dn(e))},Fn=function(e){return Rn.find(Dn(e))},zn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Un=function(e){return{type:"spring",stiffness:700,damping:0===e?100:35}},Hn=function(){return{ease:"linear",duration:.3}},$n=function(e){return{type:"keyframes",duration:.8,values:e}},Vn={x:zn,y:zn,z:zn,rotate:zn,rotateX:zn,rotateY:zn,rotateZ:zn,scaleX:Un,scaleY:Un,scale:Un,opacity:Hn,backgroundColor:Hn,color:Hn,default:Un},qn=function(e){var t=e.to,n=e.duration;return $t((function(e){var r=e.update,o=e.complete;r(t),n?pn(n).start({complete:o}):o()}))},Gn=function(e){return Array.isArray(e)?(e.length,je(e[0],e[1],e[2],e[3])):"string"==typeof e?r[e]:e},Wn=function(e){return Array.isArray(e)&&"number"!=typeof e[0]},Yn=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Z.test(t)||t.startsWith("url(")))},Kn=function(e){return 1e3*e},Xn={tween:on,spring:en,keyframes:sn,inertia:tn,just:qn},Jn={tween:function(e){if(e.ease){var t=Wn(e.ease)?e.ease[0]:e.ease;e.ease=Gn(t)}return e},keyframes:function(e){var t=e.from,n=(e.to,e.velocity,s(e,["from","to","velocity"]));if(n.values&&null===n.values[0]){var r=c(n.values);r[0]=t,n.values=r}return n.ease&&(n.easings=Wn(n.ease)?n.ease.map(Gn):Gn(n.ease)),n.ease=se,n}},Qn=function(e,t,n){var r=n?n.delay:0;if(void 0===n||!function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection;var t=s(e,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(t).length}(n))return i({delay:r},function(e,t){var n;return n=Pn(t)?$n:Vn[e]||Vn.default,i({to:t},n(t))}(e,t));var o=n[e]||n.default||n;return!1===o.type?{delay:o.hasOwnProperty("delay")?o.delay:r,to:Pn(t)?t[t.length-1]:t,type:"just"}:Pn(t)?i(i({values:t,duration:.8,delay:r,ease:"linear"},o),{type:"keyframes"}):i({type:"tween",to:t,delay:r},o)},Zn=function(e,t,n,r){var o,a=t.get(),c=Yn(e,a),l=Yn(e,n),u=Qn(e,n,r),d=u.type,f=void 0===d?"tween":d,p=s(u,["type"]),h=c&&l?Xn[f]:qn,m=function(e,t){return Jn[e]?Jn[e](t):t}(f,i({from:a,velocity:t.getVelocity()},p));return((o=m).hasOwnProperty("duration")||o.hasOwnProperty("repeatDelay"))&&(m.duration&&(m.duration=Kn(m.duration)),m.repeatDelay&&(m.repeatDelay=Kn(m.repeatDelay))),[h,m]};function er(e,t,n,r){var o=r.delay,a=void 0===o?0:o,i=s(r,["delay"]);return t.start((function(r){var o,c=Zn(e,t,n,i),l=c[0],u=c[1],d=u.delay,f=s(u,["delay"]);void 0!==d&&(a=d);var p=function(){var e=l(f);o=e.start({update:function(e){return t.set(e)},complete:r})};return a?o=pn(Kn(a)).start({complete:p}):p(),function(){o&&o.stop()}}))}var tr=function(){function e(e){var t=this,n=e.values,r=e.readValueFromSource,o=e.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(e){return!t.values.has(e)},this.values=n,this.readValueFromSource=r,this.makeTargetAnimatable=o,this.values.forEach((function(e,n){return t.baseTarget[n]=e.get()}))}return e.prototype.setProps=function(e){this.props=e},e.prototype.setVariants=function(e){e&&(this.variants=e)},e.prototype.setDefaultTransition=function(e){e&&(this.defaultTransition=e)},e.prototype.setValues=function(e,t){var n=this,r=void 0===t?{}:t,o=r.isActive,a=void 0===o?new Set:o,s=r.priority,c=this.resolveVariant(e),l=c.target,u=c.transitionEnd;return l=this.transformValues(i(i({},l),u)),Object.keys(l).forEach((function(e){if(!a.has(e)&&(a.add(e),l)){var t=Mn(l[e]);if(n.values.has(e)){var r=n.values.get(e);r&&r.set(t)}else n.values.set(e,mn(t));s||(n.baseTarget[e]=t)}}))},e.prototype.transformValues=function(e){var t=this.props.transformValues;return t?t(e):e},e.prototype.checkForNewValues=function(e){var t=Object.keys(e).filter(this.hasValue),n=t.length;if(n)for(var r=0;r<n;r++){var o=t[r],a=e[o],i=null;Array.isArray(a)&&(i=a[0]),null===i&&(i=this.readValueFromSource(o)),"string"==typeof i&&/^\d*\.?\d+$/.test(i)?i=parseFloat(i):!Fn(i)&&Z.test(a)&&(i=Z.getAnimatableNone(a)),this.values.set(o,mn(i)),this.baseTarget[o]=i}},e.prototype.resolveVariant=function(e){if(!e)return{target:void 0,transition:void 0,transitionEnd:void 0};var t,n;"function"==typeof e&&(e=e(this.props.custom,(t=this.values,n={},t.forEach((function(e,t){return n[t]=e.get()})),n),function(e){var t={};return e.forEach((function(e,n){return t[n]=e.getVelocity()})),t}(this.values)));var r=e.transition;return{transition:void 0===r?this.defaultTransition:r,transitionEnd:e.transitionEnd,target:s(e,["transition","transitionEnd"])}},e.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},e.prototype.setOverride=function(e,t){this.overrides[t]=e,this.children&&this.children.forEach((function(n){return n.setOverride(e,t)}))},e.prototype.startOverride=function(e){var t=this.overrides[e];if(t)return this.start(t,{priority:e})},e.prototype.clearOverride=function(e){var t=this;if(this.children&&this.children.forEach((function(t){return t.clearOverride(e)})),this.overrides[e]){this.activeOverrides.delete(e);var n=this.getHighestPriority();if(this.resetIsAnimating(),n)this.overrides[n]&&this.startOverride(n);var r=this.resolvedOverrides[e];if(r){var o={};for(var a in this.baseTarget)void 0!==r[a]&&(o[a]=this.baseTarget[a]);this.onStart(),this.animate(o).then((function(){return t.onComplete()}))}}},e.prototype.apply=function(e){return Array.isArray(e)?this.applyVariantLabels(e):"string"==typeof e?this.applyVariantLabels([e]):void this.setValues(e)},e.prototype.applyVariantLabels=function(e){var t=this,n=new Set;c(e).reverse().forEach((function(r){var o=t.resolveVariant(t.variants[r]),a=o.target,i=o.transitionEnd;i&&t.setValues(i,{isActive:n}),a&&t.setValues(a,{isActive:n}),t.children&&t.children.size&&t.children.forEach((function(t){return t.applyVariantLabels(e)}))}))},e.prototype.start=function(e,t){var n,r,o=this;return void 0===t&&(t={}),t.priority&&this.activeOverrides.add(t.priority),this.resetIsAnimating(t.priority),r=e,n=Array.isArray(r)?this.animateVariantLabels(e,t):"string"==typeof e?this.animateVariant(e,t):this.animate(e,t),this.onStart(),n.then((function(){return o.onComplete()}))},e.prototype.animate=function(e,t){var n=this,r=void 0===t?{}:t,o=r.delay,a=void 0===o?0:o,s=r.priority,c=void 0===s?0:s,l=r.transitionOverride,u=this.resolveVariant(e),d=u.target,f=u.transition,p=u.transitionEnd;if(l&&(f=l),!d)return Promise.resolve();if(d=this.transformValues(d),p&&(p=this.transformValues(p)),this.checkForNewValues(d),this.makeTargetAnimatable){var h=this.makeTargetAnimatable(d,p);d=h.target,p=h.transitionEnd}c&&(this.resolvedOverrides[c]=d),this.checkForNewValues(d);var m=[];for(var g in d){var b=this.values.get(g);if(b&&d&&void 0!==d[g]){var v=d[g];c||(this.baseTarget[g]=Mn(v)),this.isAnimating.has(g)||(this.isAnimating.add(g),m.push(er(g,b,v,i({delay:a},f))))}}var y=Promise.all(m);return p?y.then((function(){n.setValues(p,{priority:c})})):y},e.prototype.animateVariantLabels=function(e,t){var n=this,r=c(e).reverse().map((function(e){return n.animateVariant(e,t)}));return Promise.all(r)},e.prototype.animateVariant=function(e,t){var n=this,r=!1,o=0,a=0,i=1,s=t&&t.priority||0,c=this.variants[e],l=c?function(){return n.animate(c,t)}:function(){return Promise.resolve()},u=this.children?function(){return n.animateChildren(e,o,a,i,s)}:function(){return Promise.resolve()};if(c&&this.children){var d=this.resolveVariant(c).transition;d&&(r=d.when||r,o=d.delayChildren||o,a=d.staggerChildren||a,i=d.staggerDirection||i)}if(r){var f="beforeChildren"===r?[l,u]:[u,l],p=f[1];return(0,f[0])().then(p)}return Promise.all([l(),u()])},e.prototype.animateChildren=function(e,t,n,r,o){if(void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===o&&(o=0),!this.children)return Promise.resolve();var a=[],i=(this.children.size-1)*n,s=1===r?function(e){return e*n}:function(e){return i-e*n};return Array.from(this.children).forEach((function(n,r){var i=n.animateVariant(e,{priority:o,delay:t+s(r)});a.push(i)})),Promise.all(a)},e.prototype.onStart=function(){var e=this.props.onAnimationStart;e&&e()},e.prototype.onComplete=function(){var e=this.props.onAnimationComplete;e&&e()},e.prototype.checkOverrideIsAnimating=function(e){for(var t=this.overrides.length,n=e+1;n<t;n++){var r=this.resolvedOverrides[n];if(r)for(var o in r)this.isAnimating.add(o)}},e.prototype.resetIsAnimating=function(e){void 0===e&&(e=0),this.isAnimating.clear(),e<this.getHighestPriority()&&this.checkOverrideIsAnimating(e),this.children&&this.children.forEach((function(t){return t.resetIsAnimating(e)}))},e.prototype.stop=function(){this.values.forEach((function(e){return e.stop()}))},e.prototype.addChild=function(e){this.children||(this.children=new Set),this.children.add(e),this.overrides.forEach((function(t,n){t&&e.setOverride(t,n)}))},e.prototype.removeChild=function(e){this.children&&this.children.delete(e)},e.prototype.resetChildren=function(){this.children&&this.children.clear()},e}();var nr=function(){function e(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return e.prototype.setVariants=function(e){this.variants=e,this.componentControls.forEach((function(t){return t.setVariants(e)}))},e.prototype.setDefaultTransition=function(e){this.defaultTransition=e,this.componentControls.forEach((function(t){return t.setDefaultTransition(e)}))},e.prototype.subscribe=function(e){var t=this;return this.componentControls.add(e),this.variants&&e.setVariants(this.variants),this.defaultTransition&&e.setDefaultTransition(this.defaultTransition),function(){return t.componentControls.delete(e)}},e.prototype.start=function(e,t){var n=this;if(this.hasMounted){var r=[];return this.componentControls.forEach((function(n){var o=n.start(e,{transitionOverride:t});r.push(o)})),Promise.all(r)}return new Promise((function(r){n.pendingAnimations.push({animation:[e,t],resolve:r})}))},e.prototype.set=function(e){return this.hasMounted,this.componentControls.forEach((function(t){return t.apply(e)}))},e.prototype.stop=function(){this.componentControls.forEach((function(e){return e.stop()}))},e.prototype.mount=function(){var e=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(t){var n=t.animation,r=t.resolve;return e.start.apply(e,n).then(r)}))},e.prototype.unmount=function(){this.hasMounted=!1,this.stop()},e}(),rr=Object(l.createContext)(null),or=Object(l.createContext)({static:!1}),ar=function(e){return"string"==typeof e||Array.isArray(e)},ir=function(e){return e instanceof nr},sr=function(e,t,n,r,o){void 0===r&&(r=!1);var a,i,s=o.initial,c=o.animate,u=o.variants,d=o.whileTap,f=o.whileHover,p=Object(l.useContext)(rr);void 0!==(null===(a=p)||void 0===a?void 0:a.initial)&&(s=p.initial),!1!==s||ir(c)?"boolean"!=typeof s&&(i=s):i=c;var h=Object(l.useRef)(!1),m=u||ar(c)||ar(d)||ar(f)||ir(c),g=ar(i)?i:e.initial,b=ar(c)?c:e.animate,v=r?g:null,y=m&&ar(b)?b:null,x=Object(l.useMemo)((function(){return{controls:m?t:e.controls,initial:g,animate:b,values:n,hasMounted:h,isReducedMotion:e.isReducedMotion}}),[v,y,e.isReducedMotion]);return x.static=r,function(e,t){void 0===t&&(t=!1);var n=Object(l.useRef)(!0);(!t||t&&n.current)&&e(),n.current=!1}((function(){var n=i||e.initial;n&&t.apply(n)}),!r),Object(l.useEffect)((function(){h.current=!0}),[]),x};function cr(e,t,n){var r=t.variants,o=t.transition,a=Object(l.useContext)(or).controls,i=Object(l.useContext)(rr),c=gn((function(){return new tr(e)}));return i&&!i.isPresent||(c.resetChildren(),c.setProps(t),c.setVariants(r),c.setDefaultTransition(o)),Object(l.useEffect)((function(){n&&a&&a.addChild(c)})),Object(l.useEffect)((function(){return function(){t.onAnimationComplete;var e=s(t,["onAnimationComplete"]);c.setProps(e),a&&a.removeChild(c)}}),[]),c}var lr=function(e){var t=e.animate,n=e.variants,r=e.inherit;return(void 0===r||r)&&!!n&&(!t||t instanceof nr)};var ur=function(e){var t=e.getValueControlsConfig,n=e.loadFunctionalityComponents,r=e.renderComponent;return Object(l.forwardRef)((function(e,o){var a=function(e){var t=e&&"function"!=typeof e?e:Object(l.useRef)(null);return e&&"function"==typeof e&&Object(l.useEffect)((function(){return e(t.current),function(){return e(null)}}),[]),t}(o),i=Object(l.useContext)(or),s=i.static||e.static||!1,c=En(e),u=function(e,t,n,r){void 0===t&&(t={});var o={},a=Object(l.useRef)({}).current;for(var i in t){var s=t[i];if(vn(s))e.set(i,s);else if(n||!pt(i)&&!An(i))o[i]=s;else{if(e.has(i)){if(s!==a[i])e.get(i).set(s)}else e.set(i,mn(s));a[i]=s}}return r?r(o):o}(c,e.style,s,e.transformValues),d=lr(e),f=cr(gn((function(){return t(a,c)})),e,d),p=sr(i,f,c,s,e),h=s?null:n(a,c,e,i,f,d),m=r(a,u,c,e,s);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(or.Provider,{value:p},m),Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Tn,{innerRef:a,values:c,isStatic:s}),h))}))},dr=["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"],fr=Object(l.createContext)({transformPagePoint:function(e){return e}});function pr(e){return Object(l.useEffect)((function(){return function(){return e()}}),[])}function hr(e,t,n,r){if(n)return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function mr(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function gr(e){return!!e.touches}var br={pageX:0,pageY:0};function vr(e){var t=e.pageX,n=void 0===t?0:t,r=e.pageY;return{x:n,y:void 0===r?0:r}}function yr(e){return{point:gr(e)?(t=e,n=t.touches[0]||t.changedTouches[0]||br,{x:n.pageX,y:n.pageY}):vr(e)};var t,n}var xr,wr=function(e,t){if(void 0===t&&(t=!1),e){var n=function(t){return e(t,yr(t))};return t?function(e){if(e)return function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}}(n):n}},Er="undefined"!=typeof window,Or={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},kr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function _r(e){return Er&&null===window.onpointerdown?e:Er&&null===window.ontouchstart?kr[e]:Er&&null===window.onmousedown?Or[e]:e}function Cr(e,t,n,r){return hr(e,_r(t),wr(n,"pointerdown"===t),r)}function jr(e,t,n,r){return function(e,t,n,r){Object(l.useEffect)((function(){var o=e.current;if(n&&o)return hr(o,t,n,r)}),[e,t,n,r])}(e,_r(t),wr(n,"pointerdown"===t),r)}!function(e){e.subtract=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},e.relativeTo=function(e){var t;return function(n){var r=n.x,o=n.y,a=void 0!==t?t:t="string"==typeof e?document.getElementById(e):e;if(a){var i=a.getBoundingClientRect();return{x:r-i.left-window.scrollX,y:o-i.top-window.scrollY}}}}}(xr||(xr={}));var Tr=!1;"undefined"!=typeof window&&document.addEventListener("touchmove",(function(e){Tr&&e.preventDefault()}),{passive:!1});var Sr=function(){return Tr=!1},Ir=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=Nr(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=Le(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,a=_().timestamp;r.history.push(i(i({},o),{timestamp:a}));var s=r.handlers,c=s.onStart,l=s.onMove;t||(c&&c(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},!(gr(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var a=Ar(yr(e),this.transformPagePoint),s=a.point,c=_().timestamp;this.history=[i(i({},s),{timestamp:c})];var l=t.onSessionStart;l&&l(e,Nr(a,this.history));var u=Cr(window,"pointermove",(function(e,t){return r.handlePointerMove(e,t)})),d=Cr(window,"pointerup",(function(e,t){return r.handlePointerUp(e,t)}));this.removeListeners=function(){u&&u(),d&&d()}}}return e.prototype.handlePointerMove=function(e,t){this.lastMoveEvent=e,this.lastMoveEventInfo=Ar(t,this.transformPagePoint),mr(e)&&0===e.buttons?this.handlePointerUp(e,t):C.update(this.updatePoint,!0)},e.prototype.handlePointerUp=function(e,t){this.end();var n=this.handlers.onEnd;if(n){var r=Nr(Ar(t,this.transformPagePoint),this.history);n&&n(e,r)}},e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),w.update(this.updatePoint),Sr()},e}();function Ar(e,t){return t?{point:t(e.point)}:e}function Nr(e,t){var n=e.point;return{point:n,delta:xr.subtract(n,Mr(t)),offset:xr.subtract(n,Pr(t)),velocity:Lr(t,.1)}}function Pr(e){return e[0]}function Mr(e){return e[e.length-1]}function Lr(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Mr(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Kn(t)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var Rr=function(e,t){return!!t&&(e===t||Rr(e,t.parentElement))},Dr=["whileHover","whileTap","whileDrag"],Br=function(e){return Dr.indexOf(e)+1};function Fr(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var zr=Fr("dragHorizontal"),Ur=Fr("dragVertical");function Hr(e){var t=!1;if("y"===e)t=Ur();else if("x"===e)t=zr();else{var n=zr(),r=Ur();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}var $r=Br("whileTap");var Vr=Br("whileHover"),qr=function(e){return function(t,n){mr(t)&&e(t,n)}};function Gr(e,t){!function(e,t){var n=e.onPan,r=e.onPanStart,o=e.onPanEnd,a=e.onPanSessionStart,i=n||r||o||a,s=Object(l.useRef)(null),c=Object(l.useContext)(fr).transformPagePoint,u={onSessionStart:a,onStart:r,onMove:n,onEnd:function(e,t){s.current=null,o&&o(e,t)}};Object(l.useEffect)((function(){null!==s.current&&s.current.updateHandlers(u)})),jr(t,"pointerdown",i&&function(e){s.current=new Ir(e,u,{transformPagePoint:c})}),pr((function(){return s.current&&s.current.end()}))}(e,t),function(e,t){var n=e.onTap,r=e.onTapStart,o=e.onTapCancel,a=e.whileTap,i=e.controls,s=n||r||o||a,c=Object(l.useRef)(!1),u=Object(l.useRef)(null);function d(){u.current&&u.current(),u.current=null}a&&i&&i.setOverride(a,$r);var f=Object(l.useRef)(null);f.current=function(e,r){var s=t.current;if(d(),c.current&&s){c.current=!1,i&&a&&i.clearOverride($r);var l=Hr(!0);l&&(l(),Rr(s,e.target)?n&&n(e,r):o&&o(e,r))}},jr(t,"pointerdown",s?function(e,n){d(),u.current=Cr(window,"pointerup",(function(e,t){return f.current(e,t)})),t.current&&!c.current&&(c.current=!0,r&&r(e,n),i&&a&&i.startOverride($r))}:void 0),pr(d)}(e,t),function(e,t){var n=e.whileHover,r=e.onHoverStart,o=e.onHoverEnd,a=e.controls;n&&a&&a.setOverride(n,Vr),jr(t,"pointerenter",qr((function(e,t){r&&r(e,t),n&&a&&a.startOverride(Vr)}))),jr(t,"pointerleave",qr((function(e,t){o&&o(e,t),n&&a&&a.clearOverride(Vr)})))}(e,t)}var Wr=function(e){return function(t){return e(t),null}},Yr=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Kr={key:"gestures",shouldRender:function(e){return Yr.some((function(t){return e.hasOwnProperty(t)}))},Component:Wr((function(e){var t=e.innerRef;Gr(s(e,["innerRef"]),t)}))},Xr=function(e){return"object"==typeof e&&e.hasOwnProperty("current")},Jr=function(e){return e},Qr=function(){function e(e){var t=e.ref,n=e.values,r=e.controls;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={transformPagePoint:Jr},this.point={},this.origin={x:mn(0),y:mn(0)},this.openGlobalLock=null,this.panSession=null,this.prevConstraintsBox={width:0,height:0,x:0,y:0},this.ref=t,this.values=n,this.controls=r}return e.prototype.start=function(e,t){var n=this,r=(void 0===t?{}:t).snapToCursor;void 0!==r&&r&&this.snapToCursor(e);var o=this.props.transformPagePoint;this.panSession=new Ir(e,{onSessionStart:function(){Tr=!0,Zr((function(e){var t=n.point[e];t&&t.stop()}))},onStart:function(e,t){if(n.constraintsNeedResolution){var r=n.props,o=r.dragConstraints,a=r.transformPagePoint;n.constraints=ro(o,n.ref,n.point,a),n.applyConstraintsToPoint()}Zr((function(e){var t=n.point[e];t&&n.origin[e].set(t.get())}));var i=n.props,s=i.drag,c=i.dragPropagation;if(!s||c||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Hr(s),n.openGlobalLock)){n.isDragging=!0,n.currentDirection=null;var l=n.props.onDragStart;l&&l(e,eo(t,n.point))}},onMove:function(e,t){var r=n.props,o=r.dragPropagation,a=r.dragDirectionLock;if(o||n.openGlobalLock){var i=t.offset;if(a&&null===n.currentDirection){if(n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),null!==n.currentDirection){var s=n.props.onDirectionLock;s&&s(n.currentDirection)}}else{n.updatePoint("x",i),n.updatePoint("y",i);var c=n.props.onDrag;c&&c(e,eo(t,n.point))}}},onEnd:function(e,t){n.stop(e,t)}},{transformPagePoint:o})},e.prototype.cancelDrag=function(){Sr(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},e.prototype.stop=function(e,t){var n;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,a=o.dragMomentum,i=o.dragElastic,s=o.onDragEnd;if(a||i){var c=t.velocity;this.animateDragEnd(c)}else this.recordBoxInfo(this.constraints);s&&s(e,eo(t,this.point))}},e.prototype.recordBoxInfo=function(e){if(e){var t=e.right,n=e.left,r=e.bottom,o=e.top;this.prevConstraintsBox.width=(t||0)-(n||0),this.prevConstraintsBox.height=(r||0)-(o||0)}this.point.x&&(this.prevConstraintsBox.x=this.point.x.get()),this.point.y&&(this.prevConstraintsBox.y=this.point.y.get())},e.prototype.snapToCursor=function(e){var t=this,n=this.props.transformPagePoint,r=yr(e).point,o=oo(this.ref,n),a=o.width/2+o.left+window.scrollX,i=o.height/2+o.top+window.scrollY,s={x:r.x-a,y:r.y-i};Zr((function(e){var n=t.point[e];n&&t.origin[e].set(n.get())})),this.updatePoint("x",s),this.updatePoint("y",s)},e.prototype.setPoint=function(e,t){this.point[e]=t},e.prototype.updatePoint=function(e,t){var n=this.props,r=n.drag,o=n.dragElastic,a=this.point[e];if(no(e,r,this.currentDirection)&&a){var i=io(e,this.origin[e].get()+t[e],this.constraints,o);a.set(i)}},e.prototype.updateProps=function(e){var t=this,n=e.drag,r=void 0!==n&&n,o=e.dragDirectionLock,a=void 0!==o&&o,c=e.dragPropagation,l=void 0!==c&&c,u=e.dragConstraints,d=void 0!==u&&u,f=e.dragElastic,p=void 0===f||f,h=e.dragMomentum,m=void 0===h||h,g=s(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=i({drag:r,dragDirectionLock:a,dragPropagation:l,dragConstraints:d,dragElastic:p,dragMomentum:m},g);var b=g._dragValueX,v=g._dragValueY,y=g.dragOriginX,x=g.dragOriginY;y&&(this.origin.x=y),x&&(this.origin.y=x),Zr((function(e){if(no(e,r,t.currentDirection)){var n="x"===e?b:v;t.setPoint(e,n||t.values.get(e,0))}})),this.constraintsNeedResolution=Xr(d),this.constraints=this.constraintsNeedResolution?this.constraints||!1:d},e.prototype.applyConstraintsToPoint=function(e){var t=this;return void 0===e&&(e=this.constraints),Zr((function(n){var r=t.point[n];r&&!r.isAnimating()&&io(n,r,e,0)}))},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,o=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,c=n._dragValueX,l=n._dragValueY,u=n._dragTransitionControls,d=Zr((function(n){var d;if(no(n,r,t.currentDirection)){var f=t.constraints?to(n,t.constraints):{},p=a?200:1e6,h=a?40:1e7,m=u||t.controls,g=i(i({type:"inertia",velocity:o?e[n]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1},s),f),b="x"===n?c:l;return b?er(n,b,0,g):m.start(((d={})[n]=0,d.transition=g,d))}}));return Promise.all(d).then((function(){t.recordBoxInfo(t.constraints),t.scalePoint();var e=t.props.onDragTransitionEnd;e&&e()}))},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.transformPagePoint;if(Xr(n)){var o=oo(n,r),a=oo(this.ref,r),i=function(t,n){var r=e.point[t];if(r){if(r.isAnimating())return r.stop(),void e.recordBoxInfo();var i=e.prevConstraintsBox[n]?(o[n]-a[n])/e.prevConstraintsBox[n]:1;r.set(e.prevConstraintsBox[t]*i)}};i("x","width"),i("y","height")}},e.prototype.mount=function(e){var t=this,n=Cr(e,"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=hr(window,"resize",(function(){return t.scalePoint()}));if(this.constraintsNeedResolution){var o=this.props,a=o.dragConstraints,i=o.transformPagePoint,s=ro(a,this.ref,this.point,i);this.applyConstraintsToPoint(s),this.recordBoxInfo(s)}else!this.isDragging&&this.constraints&&this.applyConstraintsToPoint();return function(){n&&n(),r&&r(),t.cancelDrag()}},e}();function Zr(e){return[e("x"),e("y")]}function eo(e,t){return i(i({},e),{point:{x:t.x?t.x.get():0,y:t.y?t.y.get():0}})}function to(e,t){var n=t.top,r=t.right,o=t.bottom,a=t.left;return"x"===e?{min:a,max:r}:{min:n,max:o}}function no(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}function ro(e,t,n,r){null!==e.current&&t.current;var o=oo(e,r),a=oo(t,r),i=o.left-a.left+ao(n.x),s=o.top-a.top+ao(n.y);return{top:s,left:i,right:o.width-a.width+i,bottom:o.height-a.height+s}}function oo(e,t){var n=e.current.getBoundingClientRect(),r=t({x:n.left,y:n.top}),o=r.x,a=r.y,i=t({x:n.width,y:n.height});return{left:o,top:a,width:i.x,height:i.y}}function ao(e){return e?e.get():0}function io(e,t,n,r){var o=t instanceof hn?t.get():t;if(!n)return o;var a=to(e,n),i=a.min,s=a.max;return void 0!==i&&o<i?o=r?so(i,o,r):Math.max(i,o):void 0!==s&&o>s&&(o=r?so(s,o,r):Math.min(s,o)),t instanceof hn&&t.set(o),o}function so(e,t,n){return De(e,t,"number"==typeof n?n:.35)}var co={key:"drag",shouldRender:function(e){return!!e.drag},Component:Wr((function(e){var t=e.innerRef,n=e.values,r=e.controls;return function(e,t,n,r){var o=e.dragControls,a=Object(l.useContext)(fr).transformPagePoint,s=gn((function(){return new Qr({ref:t,values:n,controls:r})}));s.updateProps(i(i({},e),{transformPagePoint:a})),Object(l.useEffect)((function(){return o&&o.subscribe(s)}),[s]),Object(l.useEffect)((function(){return s.mount(t.current)}),[])}(s(e,["innerRef","values","controls"]),t,n,r)}))};function lo(e){return"string"==typeof e&&e.startsWith("var(--")}var uo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function fo(e,t,n){void 0===n&&(n=1);var r=function(e){var t=uo.exec(e);return t?[t[1],t[2]]:[,]}(e),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(t).getPropertyValue(o);return i||(lo(a)?fo(a,t,n+1):a)}}var po,ho=new Set(["width","height","top","left","right","bottom","x","y"]),mo=function(e){return ho.has(e)},go=function(e,t){e.set(t,!1),e.set(t)},bo=function(e){return e===N||e===B};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(po||(po={}));var vo=function(e,t){return parseFloat(e.split(", ")[t])},yo=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return vo(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return i?vo(i[1],e):0}},xo=new Set(["x","y","z"]),wo=dt.filter((function(e){return!xo.has(e)}));var Eo={width:function(e){return e.width},height:function(e){return e.height},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.height,r=t.top;return parseFloat(r)+n},right:function(e,t){var n=e.width,r=t.left;return parseFloat(r)+n},x:yo(4,13),y:yo(5,14)},Oo=function(e,t,n,r){void 0===r&&(r={}),n=i({},n),r=i({},r);var o=t.current,a=Ft(o),s=Object.keys(n).filter(mo),c=[],l=!1,u=s.reduce((function(t,o){var i=e.get(o);if(!i)return t;var s,u=i.get(),d=n[o],f=Bn(u);if(Pn(d))for(var p=d.length,h=null===d[0]?1:0;h<p;h++)s?Bn(d[h]):(s=Bn(d[h]))===f||bo(f)&&bo(s);else s=Bn(d);if(f!==s)if(bo(f)&&bo(s)){var m=i.get();"string"==typeof m&&i.set(parseFloat(m)),"string"==typeof d?n[o]=parseFloat(d):Array.isArray(d)&&s===B&&(n[o]=d.map(parseFloat))}else l||(c=function(e,t){var n=[];return wo.forEach((function(t){var r=e.get(t);void 0!==r&&(n.push([t,r.get()]),r.set(t.startsWith("scale")?1:0))})),n.length&&t.render(),n}(e,a),l=!0),t.push(o),r[o]=void 0!==r[o]?r[o]:n[o],go(i,d);return t}),[]);if(u.length){var d=function(e,t,n,r,o){var a=n.getBoundingClientRect(),i=getComputedStyle(n),s=i.display,c={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===s&&r.set("display",e.display||"block"),r.render();var l=n.getBoundingClientRect();return o.forEach((function(n){var r=t.get(n);go(r,Eo[n](a,c)),e[n]=Eo[n](l,i)})),e}(n,e,o,a,u);return c.length&&c.forEach((function(t){var n=t[0],r=t[1];e.get(n).set(r)})),a.render(),{target:d,transitionEnd:r}}return{target:n,transitionEnd:r}};function ko(e,t,n,r){return function(e){return Object.keys(e).some(mo)}(n)?Oo(e,t,n,r):{target:n,transitionEnd:r}}var _o=function(e,t){return function(n,r){var o=function(e,t,n,r){var o=s(n,[]),a=t.current;if(!(a instanceof HTMLElement))return{target:o,transitionEnd:r};for(var c in r&&(r=i({},r)),e.forEach((function(e){var t=e.get();if(lo(t)){var n=fo(t,a);n&&e.set(n)}})),o){var l=o[c];if(lo(l)){var u=fo(l,a);u&&(o[c]=u,r&&void 0===r[c]&&(r[c]=l))}}return{target:o,transitionEnd:r}}(e,t,n,r);return n=o.target,r=o.transitionEnd,ko(e,t,n,r)}};var Co,jo,To=Object(l.createContext)(null);!function(e){e.Prepare="prepare",e.Read="read",e.Render="render"}(jo||(jo={}));var So=[jo.Prepare,jo.Read,jo.Render].reduce((function(e,t){return e[t]=[],e}),{}),Io=!1;function Ao(e){for(var t=e.length,n=0;n<t;n++)e[n]();e.length=0}var No=function(e){return function(t){t&&(Io=!0,So[e].push(t))}},Po=((Co={})[jo.Prepare]=No(jo.Prepare),Co[jo.Read]=No(jo.Read),Co[jo.Render]=No(jo.Render),Co.flush=function(){Io&&(Ao(So.prepare),Ao(So.read),Ao(So.render),Io=!1)},Co);var Mo={duration:.8,ease:[.45,.05,.19,1]},Lo={type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10};var Ro={id:"x",size:"width",min:"left",max:"right",origin:"originX"},Do={id:"y",size:"height",min:"top",max:"bottom",origin:"originY"};function Bo(e,t){return(e+t)/2}function Fo(e,t,n){var r,o=e[n.size]-t[n.size],a=.5;return o&&(e[n.min]===t[n.min]?a=0:e[n.max]===t[n.max]&&(a=1)),(r={})[n.size]=o,r[n.origin]=a,r[n.id]=.5===a?Bo(e[n.min],e[n.max])-Bo(t[n.min],t[n.max]):0,r}var zo={getLayout:function(e){return e.offset},measure:function(e){var t=e.offsetLeft,n=e.offsetTop,r=e.offsetWidth,o=e.offsetHeight;return{left:t,top:n,right:t+r,bottom:n+o,width:r,height:o}}},Uo={getLayout:function(e){return e.boundingBox},measure:function(e){var t=e.getBoundingClientRect();return{left:t.left,top:t.top,width:t.width,height:t.height,right:t.right,bottom:t.bottom}}};function Ho(e){return window.getComputedStyle(e).position}function $o(e){return"width"===e||"height"===e}var Vo,qo={key:"layout",shouldRender:function(e){var t=e.positionTransition,n=e.layoutTransition;return"undefined"!=typeof window&&!(!t&&!n)},Component:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.innerRef,n=e.positionTransition,r=e.values,o=e.controls,a=t.current;if(function(e){return e instanceof HTMLElement}(a)){var s,c,l,u=function(e){var t=e.layoutTransition,n=e.positionTransition;return t||n}(this.props),d=!!n,f=Ho(a),p={offset:zo.measure(a),boundingBox:Uo.measure(a)};return Po.prepare((function(){s=a.style.transform,a.style.transform=""})),Po.read((function(){c={offset:zo.measure(a),boundingBox:Uo.measure(a)};var e=Ho(a);l=function(e,t,n){return n&&e===t?zo:Uo}(f,e,d)})),Po.render((function(){var e=function(e,t){return i(i({},Fo(e,t,Ro)),Fo(e,t,Do))}(l.getLayout(p),l.getLayout(c));if(e.x||e.y||e.width||e.height){Ft(a).set({originX:e.originX,originY:e.originY}),_n();var t={},n={},f=function(e){return"function"==typeof e}(u)?u({delta:e}):u;h("left","x",0,e.x),h("top","y",0,e.y),d||(h("width","scaleX",1,p.boundingBox.width/c.boundingBox.width),h("height","scaleY",1,p.boundingBox.height/c.boundingBox.height)),t.transition=n,f&&o.start(t),Cn()}else s&&(a.style.transform=s);function h(o,a,s,c){var u=$o(o)?o:a;if(e[u]){var p="boolean"==typeof f?i({},function(e){return e?Lo:Mo}(d)):f,h=r.get(a,s),m=h.getVelocity();n[a]=p[a]?i({},p[a]):i({},p),void 0===n[a].velocity&&(n[a].velocity=m||0),t[a]=s;var g=$o(o)||l!==zo?0:h.get();h.set(c+g)}}})),null}},t.prototype.componentDidUpdate=function(){Po.flush()},t.prototype.render=function(){return null},t.contextType=To,t}(l.Component)},Go=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","positionTransition","layoutTransition","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragElastic","dragMomentum","dragPropagation","dragTransition","_dragValueX","_dragValueY","_dragTransitionControls","dragOriginX","dragOriginY","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function Wo(e){return Go.has(e)}!function(e){e.Target="Target",e.VariantLabel="VariantLabel",e.AnimationSubscription="AnimationSubscription"}(Vo||(Vo={}));function Yo(e,t){void 0===t&&(t=!1);e.transition;var n=e.transitionEnd,r=s(e,["transition","transitionEnd"]);return t?i(i({},r),n):r}var Ko,Xo,Jo=function(e){var t,n=e instanceof hn?e.get():e;return Array.from(new Set((t=n)?Array.isArray(t)?t:[t]:[]))};var Qo=((Ko={})[Vo.Target]=Wr((function(e){return function(e,t,n,r){var o=Object(l.useRef)(!0),a=Object(l.useRef)(null);a.current||(a.current=Yo(e,!0)),Object(l.useEffect)((function(){var s,c,l={},u=Yo(e),d=Yo(e,!0);for(var f in u){var p=o.current&&(!n.has(f)||n.get(f).get()!==d[f]),h=null!==d[f],m=(s=a.current[f],void 0!==(c=d[f])&&(Array.isArray(s)&&Array.isArray(c)?!function(e,t){if(null===t)return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}(c,s):s!==c));h&&(m||p)&&(l[f]=u[f])}o.current=!1,a.current=i(i({},a.current),d),Object.keys(l).length&&t.start(i(i({},l),{transition:e.transition||r,transitionEnd:e.transitionEnd}))}),[e])}(e.animate,e.controls,e.values,e.transition)})),Ko[Vo.VariantLabel]=Wr((function(e){var t=e.animate,n=e.inherit,r=void 0===n||n,o=e.controls;return function(e,t,n,r){var o=Jo(t),a=Object(l.useContext)(or),i=a.hasMounted&&a.hasMounted.current,s=Object(l.useRef)(!1);Object(l.useEffect)((function(){var t,c,l=!1;n?(l=!!i,o=Jo(a.animate)):l=s.current||(t=Jo(e),c=o,t.join(",")!==c.join(",")),l&&r.start(o),s.current=!0}),[o.join(",")])}(e.initial,t,r,o)})),Ko[Vo.AnimationSubscription]=Wr((function(e){return function(e,t){var n=Object(l.useMemo)((function(){return e.subscribe(t)}),[e]);Object(l.useEffect)((function(){return function(){n&&n()}}),[n])}(e.animate,e.controls)})),Ko),Zo=function(e){return e.animate instanceof nr},ea=["initial","animate","whileTap","whileHover"],ta=((Xo={})[Vo.Target]=function(e){return!(void 0===e.animate||(t=e.animate,Array.isArray(t)||"string"==typeof t)||Zo(e));var t},Xo[Vo.VariantLabel]=function(e){return void 0!==e.variants||ea.some((function(t){return"string"==typeof e[t]}))},Xo[Vo.AnimationSubscription]=Zo,Xo);var na={key:"exit",shouldRender:function(e){return!!e.exit&&!lr(e)},Component:Wr((function(e){var t,n=e.animate,r=e.controls,o=e.exit,a=function(){var e=Object(l.useContext)(rr);if(null===e)return[!0];var t=e.isPresent,n=e.onExitComplete,r=e.register;return Object(l.useEffect)(r,[]),!t&&n?[!1,n]:[!0]}(),s=a[0],c=a[1],u=Object(l.useContext)(rr),d=Object(l.useRef)(!1),f=void 0!==(null===(t=u)||void 0===t?void 0:t.custom)?u.custom:e.custom;Object(l.useEffect)((function(){s?!d.current||!n||n instanceof nr||r.start(n):(!d.current&&o&&(r.setProps(i(i({},e),{custom:f})),r.start(o).then(c)),d.current=!0),s&&(d.current=!1)}),[s])}))},ra=function(e){return!Wo(e)};try{var oa=n(112).default;ra=function(e){return e.startsWith("on")?!Wo(e):oa(e)}}catch(e){}var aa=[qo,co,Kr,na],ia=aa.length;function sa(e){var t="string"==typeof e,n=t&&-1!==dr.indexOf(e);return{renderComponent:function(r,o,a,s,c){var u=t?function(e){var t={};for(var n in e)ra(n)&&(t[n]=e[n]);return t}(s):s,d=n?function(e,t){var n=Pt(Sn(e),void 0,void 0,void 0,void 0,!1);return n.style=i(i({},t),n.style),n}(a,o):function(e,t,n,r){var o={style:Nn(e,t,n)};return r&&(o.style.userSelect="none",o.draggable=!1),o}(a,o,c,!!s.drag);return Object(l.createElement)(e,i(i(i({},u),{ref:r}),d))},loadFunctionalityComponents:function(e,t,n,r,o,a){var s=[],c=function(e){var t=void 0;for(var n in Vo)ta[n](e)&&(t=n);return t?Qo[t]:void 0}(n);c&&s.push(Object(l.createElement)(c,{key:"animation",initial:n.initial,animate:n.animate,variants:n.variants,transition:n.transition,controls:o,inherit:a,values:t}));for(var u=0;u<ia;u++){var d=aa[u],f=d.shouldRender,p=d.key,h=d.Component;f(n,r)&&s.push(Object(l.createElement)(h,i({key:p},n,{parentContext:r,values:t,controls:o,innerRef:e})))}return s},getValueControlsConfig:function(e,t){return{values:t,readValueFromSource:function(t){return Ft(e.current).get(t)},makeTargetAnimatable:_o(t,e)}}}}var ca=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","webview"].reduce((function(e,t){var n=sa(t);return e[t]=ur(n),e}),{}),la=dr.reduce((function(e,t){return e[t]=ur(sa(t)),e}),{}),ua=i(i({custom:function(e){return ur(sa(e))}},ca),la);function da(e){return gn((function(){return mn(e)}))}function fa(){return{scrollX:mn(0),scrollY:mn(0),scrollXProgress:mn(0),scrollYProgress:mn(0)}}"undefined"!=typeof window?l.useLayoutEffect:l.useEffect;fa();!function(){function e(){this.componentControls=new Set}e.prototype.subscribe=function(e){var t=this;return this.componentControls.add(e),function(){return t.componentControls.delete(e)}},e.prototype.start=function(e,t){this.componentControls.forEach((function(n){n.start(e.nativeEvent||e,t)}))}}();var pa=mn(null);if("undefined"!=typeof window)if(window.matchMedia){var ha=window.matchMedia("(prefers-reduced-motion)"),ma=function(){return pa.set(ha.matches)};ha.addListener(ma),ma()}else pa.set(!1)},function(e,t,n){"use strict";var r=n(4),o=n.n(r);o.a.oneOfType([o.a.node,o.a.arrayOf(o.a.node)])},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";t.a=(e,t)=>Boolean((e=>{const t=e.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\//g,"\\/").replace(/\?/g,"\\?");return new RegExp(t,"i")})(t).test(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(241);const o="kindly-chat-browser-id",a=()=>{const e=localStorage.getItem(o);if(!e){const e=Object(r.a)();return localStorage.setItem(o,e),e}return e}},function(e){e.exports=JSON.parse('{"a":"2.40.5"}')},function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"n",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"l",(function(){return h})),n.d(t,"f",(function(){return m})),n.d(t,"o",(function(){return g})),n.d(t,"g",(function(){return b})),n.d(t,"k",(function(){return v})),n.d(t,"c",(function(){return y})),n.d(t,"j",(function(){return x})),n.d(t,"i",(function(){return w})),n.d(t,"p",(function(){return E})),n.d(t,"a",(function(){return O})),n.d(t,"m",(function(){return k})),n.d(t,"b",(function(){return _}));var r=n(18),o=n(5),a=n(78),i=n(2),s=n(66),c=n(9);const l=(e,t)=>{if(e.feedbackFormType===o.r.NONE)return!1;if(e.feedbackFormType===o.r.EXTERNAL_LINK){var n,r,a;const{feedbackForm:o}=e;return(null===(n=o.external_link_url)||void 0===n?void 0:n[t])&&((null===(r=o.external_link_headline)||void 0===r?void 0:r[t])||(null===(a=o.external_link_text)||void 0===a?void 0:a[t]))}return!0},u=e=>(t,n)=>{const{chatHasStarted:r}=n().chatbubble;t({type:i.sb,botKey:e}),r&&t(Object(s.a)())},d=function(e){let{skipRestart:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(n,r)=>{const{botKey:o,chatHasStarted:a}=r().chatbubble,{takenOver:s}=r().agent;n({type:i.eb,code:e}),t||!a||s||n(Object(c.d)(o,!0))}},f=()=>e=>{e({type:i.n})},p=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,n)=>{const{bot:o,chatbubble:{currentLanguage:a,botKey:s,optionsScreenOpen:u},connection:{token:d},feedback:{feedbackFormOpen:f},messages:{chatMessages:p},agent:{hasHadHandover:h}}=n(),m=o.noFeedbackAfterHandover&&h;u&&t({type:i.q}),!e&&l(o,a)&&!f&&p&&!m&&p.length>1&&setTimeout(()=>t({type:i.L,token:d}),o.fullscreenMode?0:1500),t(Object(c.d)(s,e));try{Object(r.disconnect)()}catch(e){console.error(e)}}},h=()=>e=>{e({type:i.N})},m=()=>(e,t)=>{const{optionsScreenOpen:n}=t().chatbubble;n&&e({type:i.q})},g=()=>(e,t)=>{const{agent:{takenOver:n},connection:{token:r},environment:{PAT_HOST:a},chatbubble:{chatHasStarted:s,hasRequestedGreeting:l},local:{labels:u}}=t();s||e({type:i.Y,chatHasStarted:!0}),!l&&!n&&(null==u?void 0:u.length)>0&&(e({type:i.bb,hasRequestedGreeting:!0}),e(Object(c.f)({method:"post",url:`${a}/chatbubble/${o.j}/manual_greet/`,...Object(c.a)({token:r})})))},b=()=>(e,t)=>{const{token:n,feedbackFormOpen:r}=t().feedback;(n||r)&&e({type:i.o}),e(g())},v=()=>(e,t)=>{const{pushMessages:n,alerts:r,bot:a,nudge:s}=t();n.show&&e({type:i.B}),s.show&&e({type:i.A}),(r.showTabNotification||r.showBubbleNotification)&&e({type:i.z}),e({type:i.K}),a.welcomePage&&a.welcomePageType!==o.s.NONE||e(g())},y=()=>(e,t)=>{const{active:n,previouslyPoppedUp:r}=t().chatbubble;n||r||(e(v()),e({type:i.Q}))},x=()=>e=>{e({type:i.jb,userIsIdle:!0}),Object(a.b)()},w=e=>(t,n)=>{const{userIsIdle:r}=n().chatbubble;r&&(t({type:i.jb,userIsIdle:!1}),Object(a.a)(e))},E=e=>(t,n)=>{var r,o;const{chatbubble:{contactDetailsButton:a}}=n();(null==a||null===(r=a.contact_details)||void 0===r?void 0:r.contact_type)===(null==e||null===(o=e.contact_details)||void 0===o?void 0:o.contact_type)?t({type:i.D}):t({type:i.lb,button:e})},O=e=>t=>{t({type:i.f,button:e})},k=e=>t=>{0===e.length?t({type:i.k}):t({type:i.X,files:e})},_=()=>e=>{e({type:i.g})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d}));var r=n(1),o=n(6),a=n(38);const i=r.c.label.withConfig({displayName:"styles__CheckboxContainer",componentId:"sc-1ot9z69-0"})(["cursor:pointer;display:flex;justify-content:center;align-items:center;"]),s=r.c.svg.withConfig({displayName:"styles__CheckboxIcon",componentId:"sc-1ot9z69-1"})(["fill:none;stroke:white;stroke-width:2px;"]),c=r.c.div.withConfig({displayName:"styles__StyledCheckbox",componentId:"sc-1ot9z69-2"})(["display:inline-block;width:16px;height:16px;border-radius:3px;background:",";",";","{visibility:hidden;}left:0;position:absolute;"],e=>{let{theme:{buttonBackground:t}}=e;return t},e=>{let{theme:{buttonBackground:t}}=e;return Object(a.b)(t)?"filter: brightness(0.7);":"filter: opacity(0.3);"},s),l=r.c.input.attrs({type:"checkbox"}).withConfig({displayName:"styles__HiddenCheckbox",componentId:"sc-1ot9z69-3"})(["height:16px;width:16px;opacity:0;margin:0;left:0;position:absolute;&:checked ~ ","{background:",";filter:opacity(1);","{visibility:visible;}animation:"," 150ms ease;}"],c,e=>{let{theme:{buttonBackground:t}}=e;return t},s,e=>{let{theme:{buttonBackground:t}}=e;return(e=>Object(r.d)(["50%{box-shadow:0 0 0 3px ",";}"],e))(t)}),u=r.c.div.withConfig({displayName:"styles__CheckboxLabel",componentId:"sc-1ot9z69-4"})(["font-size:",";font-weight:400;margin:0 28px;"],o.d.fontSizeP),d=r.c.div.withConfig({displayName:"styles__CheckboxWrapper",componentId:"sc-1ot9z69-5"})(["margin-top:12px;display:flex;flex-direction:row;"])},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(5),i=n(124);o.a.shape({message:o.a.string,from_bot:o.a.bool,image_carousel:o.a.arrayOf(o.a.object),thon_image_above_text:o.a.bool,exchange_type:o.a.string,exchange_id:o.a.string,avatar:o.a.string,sender:o.a.oneOf(Object.values(a.l)),skill_subscription_id:o.a.number,bot_id:o.a.number,score:o.a.number,title:o.a.string,reply_candidates:i.a,is_followup:o.a.bool,handler:o.a.oneOf(Object.values(a.f)),corrected_message:o.a.string,new_context:o.a.objectOf(o.a.string)})},function(e,t,n){e.exports=n(180)},function(e,t,n){"use strict";var r=n(242);t.a=e=>"number"==typeof e?new Date(e):Object(r.a)(e)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return s}));var r=n(125),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function i(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var o;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var c=e,l=t,u=[],d=u,f=!1;function p(){d===u&&(d=u.slice())}function h(){if(f)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(f)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return p(),d.push(e),function(){if(t){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,p();var n=d.indexOf(e);d.splice(n,1),u=null}}}function g(e){if(!i(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,l=c(l,e)}finally{f=!1}for(var t=u=d,n=0;n<t.length;n++){(0,t[n])()}return e}function b(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");c=e,g({type:a.REPLACE})}function v(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(h())}return n(),{unsubscribe:t(n)}}})[r.a]=function(){return this},e}return g({type:a.INIT}),(o={dispatch:g,subscribe:m,getState:h,replaceReducer:b})[r.a]=v,o}function c(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function l(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}var i,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},a=0;a<s.length;a++){var l=s[a],u=n[l],d=e[l],f=u(d,t);if(void 0===f){var p=c(l,t);throw new Error(p)}o[l]=f,r=r||f!==d}return(r=r||s.length!==Object.keys(e).length)?o:e}}function u(e,t){return function(){return t(e.apply(this,arguments))}}function d(e,t){if("function"==typeof e)return u(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=u(o,t))}return n}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(o)}));return h({},n,{dispatch:r=m.apply(void 0,a)(n.dispatch)})}}}},function(e,t,n){var r=n(29);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},function(e,t,n){var r=n(63),o=n(115),a=n(91);e.exports=r?function(e,t,n){return o.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(51);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(61);e.exports=function(e){if(r(e))return e;throw TypeError(String(e)+" is not an object")}},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(5),i=n(84);t.a=o.a.shape(Object(i.a)(e=>({[e]:o.a.func}),Object.values(a.b)))},function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return f}));var r=n(18),o=n(5),a=n(2),i=n(30),s=n(9);const c=()=>(e,t)=>{const{connected:n}=t().connection;n||e({type:a.r})},l=()=>(e,t)=>{const{connected:n}=t().connection;n&&e({type:a.w})},u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=JSON.parse(window.localStorage.getItem("pusherTransportEncrypted"));t.indexOf("ws")<0&&n&&"ws"!==n.transport&&window.localStorage.removeItem("pusherTransportEncrypted"),Object(r.startConfiguration)({auth:{...Object(s.a)({token:e},{withVersion:!0})},disabledTransports:t}),Object(s.e)(e)},d=function(){let{triggerDialogueSlug:e,languageCode:t,shouldGreet:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(c,l)=>{var d,f,p,h;const{local:{context:m,labels:g},chatbubble:{botKey:b,currentLanguage:v,disabledTransports:y},environment:{PAT_HOST:x,VERSION:w},bot:{includeDisabledLanguages:E}}=l();c({type:a.bb,hasRequestedGreeting:n});const O={context:m,labels:g.join(","),language_code:t||v,trigger_dialogue_slug:e,include_disabled_languages:E,should_greet:n,version:w,tz:null===(d=Intl)||void 0===d||null===(f=d.DateTimeFormat)||void 0===f||null===(p=f.call(d))||void 0===p||null===(h=p.resolvedOptions())||void 0===h?void 0:h.timeZone},k=await c(Object(s.f)({method:"post",url:`${x}/chatbubble/${o.j}/connect`,params:O,...Object(s.a)({botKey:b},{withCurrentUrl:!0})}));if(!k)return;const{pusherConnected:_}=l().connection;if(_)try{Object(r.disconnect)()}catch(e){console.warn(e)}const{token:C,chat_id:j,created:T,all_greetings_hide_input:S}=k.data;c({type:a.J,token:C}),c({type:a.H,chatId:j,allGreetingsHideInput:S}),c({type:a.ib,startedAt:T}),c(Object(s.c)((new Date).toISOString())),u(C,y),c(Object(i.a)())}},f=e=>t=>t({type:a.s,triggerConfig:e})},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(20),i=n(56);t.a=function(e){let{name:t,label:n,register:r,id:s,...c}=e;return o.a.createElement(i.a,{htmlFor:s||t&&`${a.a.CHECKBOX}_${t}`},o.a.createElement(i.e,Object.assign({name:t,type:a.a.CHECKBOX,id:s||t&&`${a.a.CHECKBOX}_${t}`},r&&{...r(t)},c)),o.a.createElement(i.f,null,o.a.createElement(i.b,{viewBox:"0 0 24 24"},o.a.createElement("polyline",{points:"20 6 9 17 4 12"}))),n&&o.a.createElement(i.c,null,n))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return y})),n.d(t,"b",(function(){return x})),n.d(t,"f",(function(){return w})),n.d(t,"h",(function(){return E})),n.d(t,"d",(function(){return _})),n.d(t,"i",(function(){return C})),n.d(t,"a",(function(){return I})),n.d(t,"e",(function(){return A})),n.d(t,"g",(function(){return P}));var r=n(241),o=n(20),a=n(5),i=n(17),s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,n)=>{let[r,o]=n;return{...e,...Object(i.a)(r,t)?{}:{[r]:o}}},{})}},c=function(){let{status:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!(e>=200&&e<=299)},l=n(48),u=n(2),d=n(94),f=n(30),p=n(55),h=n(66),m=n(76),g=n(9),b=n(43);const v=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:a}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:a}},y=(e,t,n)=>(r,o)=>{const{botKey:a}=v(o);r(Object(g.d)(a,!0)),localStorage.setItem("kindly-chat-restart-message",JSON.stringify({message:e,exchangeId:t,newContext:n}))},x=(e,t)=>async(n,r)=>{const{PAT_HOST:o,token:i}=v(r),s=await n(Object(f.b)()),{headers:l}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:s}),d={message:e,temporaryId:t},p=await n(Object(g.f)({method:"post",url:`${o}/chatbubble/${a.j}/message/`,data:d,headers:l},{onError:e=>{var r;n({type:u.Bb,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));c(p)||(n({type:u.Bb,...p.data}),n(Object(b.e)()))},w=e=>t=>{t({type:u.ab,formData:e})},E=function(e,t,n){let{responsePromise:i,tempId:s}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments.length>4?arguments[4]:void 0;return async(d,p)=>{const{PAT_HOST:h,token:m,local:y,forms:x}=v(p),E=await d(Object(f.b)()),{headers:O}=Object(g.a)({token:m},{withCurrentUrl:!0,extra:E});x&&Object.values(x).forEach(e=>{if((null==e?void 0:e.formSubmitState)===o.b.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:o.b.UNANSWERED};d(Object(g.f)({method:"post",url:`${h}/chatbubble/${a.j}/form/submit`,data:t,headers:O})),d(w({...e,formSubmitState:o.b.UNANSWERED}))}});const k=s||Object(r.a)();d({type:u.I,data:{id:k,created:(new Date).toISOString(),message:e,buttonType:l}}),d(Object(g.c)((new Date).toISOString()));const _={message:e,exchange_id:t,temporaryId:k,new_context:{...y.context,...n||{}}},C=i?await i:await d(Object(g.f)({method:"post",url:`${h}/chatbubble/${a.j}/message/`,data:_,headers:O},{onError:e=>{var t;console.error(`/chatbubble/${a.j}/message returned ${e.response.status}`),d({type:u.Bb,temporaryId:k,status:null==e||null===(t=e.response)||void 0===t?void 0:t.status}),d({type:u.i,isTyping:!1})}}));c(C)||(d({type:u.Bb,...C.data}),d(Object(b.e)()))}},O=e=>({...e,temporaryId:Object(r.a)()}),k=e=>{let{temporaryId:t}=e;return t},_=()=>async(e,t)=>{var n;const{bot:{id:o},chatbubble:{chatId:i,attachments:l},connection:{token:d},environment:{PAT_HOST:p}}=t(),h=await e(Object(f.b)()),{headers:m}=Object(g.a)({token:d},{extra:h}),b=Object(r.a)(),v=l.files.map(O).map(s("file"));e({type:u.G,data:{attachments:v}}),e({type:u.k}),e({type:u.I,data:{id:b,created:(new Date).toISOString(),attachment_ids:v.map(k),message:""}}),e(Object(g.c)((new Date).toISOString()));const y=(t,n)=>{var r;e({type:u.Bb,temporaryId:b,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:u.Ab,attachment:{...n,status:a.a.ERROR}}):v.forEach(t=>e({type:u.Ab,attachment:{...t,status:a.a.ERROR}}))},x=v.map(s("file","url")),w=`${p}/chatbubble/${a.j}/attachment/create`,E={attachments:x,temporaryChatMessageId:b},_=await e(Object(g.f)({method:"post",url:w,data:E,headers:m},{onError:e=>y(e)}));if(c(_)||!Array.isArray(null==_||null===(n=_.data)||void 0===n?void 0:n.attachments))return;const[C,j]=_.data.attachments.reduce((t,n)=>{let[r,o]=t,{id:a,temporary_id:i,upload_url:s}=n;return e({type:u.Ab,attachment:{temporaryId:i,id:a}}),[[...r,a],[...o,s]]},[[],[]]),T={"x-goog-upload-bot-id":o,"x-goog-upload-chat-id":i},S=(I=l.files,A=j,"number"!=typeof(null==I?void 0:I.length)||I.length!==(null==A?void 0:A.length)?(console.error("Trying to zip non-array of arrays of unequal length"),[]):I.map((e,t)=>[e,A[t]])).map(async t=>{let[{file:n,...r},o]=t;const a=await(e=>new Promise((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onabort=()=>n(new Error(r.error))}))(n),i={...T,"Content-Type":n.type};return await e(Object(g.f)({method:"put",url:o,data:a,headers:i},{onError:e=>y(e,r)}))});var I,A;if((await Promise.all(S)).some(c))return;const N=`${p}/chatbubble/${a.j}/attachment/uploads-complete`,P={attachmentIds:C,temporaryChatMessageId:b,exchangeId:l.exchangeId};e(Object(g.c)((new Date).toISOString())),e(Object(g.f)({method:"post",url:N,data:P,headers:m},{onError:e=>y(e)}))},C=function(e){let{openChat:t,languageCode:n,tempId:o,responsePromise:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(s,l)=>{const{connection:{token:d},chatbubble:{currentLanguage:f}}=l(),{PAT_HOST:m}=l().environment;if(!d){const r={triggerDialogueSlug:e,languageCode:n,openChat:t};return s(Object(h.c)(r)),s(Object(p.g)()),void(t&&s(Object(p.k)()))}if(n&&n!==f){const e="Tried to trigger a dialogue in another language on an existing chat";s(Object(g.b)({message:e,level:"error",extra:{languageCode:n,currentLanguage:f}}))}const v=o||Object(r.a)();s({type:u.yb,data:{id:v,created:(new Date).toISOString(),exchangeId:e}}),s(Object(g.c)((new Date).toISOString()));const y={exchange_id:e,temporaryId:v},{headers:x}=Object(g.a)({token:d},{withCurrentUrl:!0}),w=i?await i:await s(Object(g.f)({method:"post",url:`${m}/chatbubble/${a.j}/trigger/`,data:y,headers:x}));w&&!c(w)&&(t&&s(Object(p.k)()),s(Object(b.e)()))}},j=(e,t)=>!!t.find(t=>{let{buttons:n=[]}=t;return!!n.find(t=>{let{language_code:n,button_type:r}=t;return n===e&&Object(l.a)(r)===a.b.HANDOVER_REQUEST})}),T=(e,t)=>n=>{n({type:u.j,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},S=(e,t,n)=>async(r,o)=>{const{connection:{token:i},environment:{PAT_HOST:s,VERSION:c}}=o(),l=await r(Object(f.b)()),{headers:u}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:l}),d={button:t,chatMessage:e,temporaryId:n,version:c},p=(null==(h=t.button_type)?void 0:h.toLowerCase())===a.b.PRIVACY_EXPORT.toLowerCase()?Object(m.c)():{};var h;return r(Object(g.f)({method:"post",url:`${s}/chatbubble/${a.j}/button/click/`,data:d,headers:u,...p}))},I=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return async(i,s)=>{const{environment:{VERSION:c},messages:{chatMessages:f},chatbubble:{currentLanguage:h},local:b}=s(),v=Object(l.a)(e.button_type),y=Object(r.a)(),x={};o.length>0&&o.forEach(e=>{var r,o,s;if(e.button_type===a.b.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value)x[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(s=e.slider_details)||void 0===s?void 0:s.value,i(T(i,t));else if(e.button_type===a.b.CHECKBOX.toLowerCase()){n.find(t=>t.id===e.id)?(x[e.value]=e.value,i(T(t,e)),i(S(t,e,y))):x[e.value]=""}else x[e.value]=""});const w=i(S(t,{...e,new_context:{...b.context,...x||{}}},y));switch(i({type:u.j,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),v){case a.b.QUICK_REPLY:{const n={responsePromise:w,tempId:y};i(E(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case a.b.HANDOVER_REQUEST:if(!j(h,f)){const e={version:c};i(Object(g.b)({message:"Requested handover with no button",level:"error",extra:e}))}i(Object(d.b)(w));break;case a.b.DIALOGUE_TRIGGER:case a.b.SUGGESTION_DIALOGUE_TRIGGER:i(C(e.value,{tempId:y,responsePromise:w}));break;case a.b.PRIVACY_EXPORT:i(Object(m.b)({responsePromise:w}));break;case a.b.PRIVACY_DELETE:i(Object(m.a)({responsePromise:w}));break;case a.b.CONTACT_DETAILS:i(Object(p.p)(e));break;case a.b.UPLOAD_ATTACHMENT:i(Object(p.a)(e))}}},A=(e,t)=>async(n,o)=>{const{connection:{token:i},environment:{PAT_HOST:s,VERSION:l}}=o(),d=Object(r.a)(),p=e.contact_details.contact_type,h={...e,button_type:a.b.edit_contact_details};n({type:u.I,data:{id:d,created:(new Date).toISOString(),message:t,buttons:[h],isContactDetails:!0}});const m=await n(Object(f.b)()),{headers:b}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:m}),v={contactType:p,value:t,version:l,buttons:[h],temporaryId:d},y=await n(Object(g.f)({method:"post",url:`${s}/chatbubble/${a.j}/button/contact-details/`,data:v,headers:b}));c(y)||n({type:u.Bb,...y.data})},N=((e,t,n)=>{let r,o=[];return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];n&&o.push(i),clearTimeout(r),r=setTimeout(()=>{n||e(...i);const t=o.slice(1).reduce((e,t)=>n(t,e),o[0]);e(...t),o=[]},t)}})(async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:i},environment:{PAT_HOST:s,VERSION:c}}=n(),l=await t(Object(f.b)()),{headers:d}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:l}),p={chatMessageId:r,version:c};t({type:u.fb,id:r,index:o}),t(Object(g.f)({method:"patch",url:`${s}/chatbubble/${a.j}/message-seen`,data:p,headers:d}))},1500,(e,t)=>{const[{index:n}]=e,[{index:r}]=t;return n>r?e:t}),P=(e,t)=>(n,r)=>N({id:e,index:t},n,r)},function(e,t,n){"use strict";e.exports=n(178)},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.";const a=(e,t,n,a)=>{var i,s;if(-1!==r.indexOf(e)&&Boolean(a)&&function(e,t,n){const r=`on${t.charAt(0).toUpperCase()+t.slice(1)}`;if("function"!=typeof e)return void console.warn(`Provided setting '${r}' is not a function.`);console.warn(`kindlyOptions.${r} is deprecated in favor of standard event handlers. ${o}`);const a=Object.values(n);try{e(...a)}catch(e){console.error(e)}}(a,e,t),"API"!==n)return;if(null===(i=window)||void 0===i||null===(s=i.kindlyChat)||void 0===s||!s.APIRoot)return void console.warn("No APIRoot when rendered using kindly-chat API");"message"===e&&window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("onMessage",{detail:t}));const c=`kindly:${e}`;window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent(c,{detail:t,bubbles:!0}))};function i(e,t,n,r){e&&a("message",{newMessage:e,chatLog:t},r,n)}let s=!1;function c(e){!1===s&&(s=!0,a("load",{settings:e},null==e?void 0:e.renderedBy,null==e?void 0:e.onLoad))}const l=(e,t,n,r,a,i,s)=>{let c=!1;const l=null==e?void 0:e[n];if(l){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{c=Boolean(l(t,r,a,i,n))}catch(e){console.error(e)}}return"API"===s&&(c=!window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:r,lastMessage:a,chatLog:i,buttonType:n},bubbles:!0,cancelable:!0}))),c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n(17),o=n(2);const a={TAKEOVER:"takeover",MESSAGE:"message"},i=e=>(t,n)=>{const{dismissedMessages:i}=n().pushMessages,{autopopupTime:s,enabled:c,title:l,message:u}=e;if(!c||Object(r.a)(l,i))return;const d={type:o.pb,pushMessageTitle:l,pushMessageType:a.MESSAGE,pushMessageText:u};s&&0!==s?setTimeout(()=>t(d),s):t(d)},s=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:o.B})}},function(e,t,n){"use strict";var r=n(0);t.a=(e,t)=>{const n=Object(r.useRef)();return Object(r.useCallback)(r=>{new Date-n.current<t||(e(r),n.current=new Date)},[t,e])}},function(e,t,n){"use strict";t.a=e=>{const t=(null!=e?e:"").toLowerCase();return"external_link"===t?"link":"handover_request"===t?"takeover_request":t}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(32);var i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const o=Object(r.useRef)();Object(r.useEffect)(()=>{o.current=t},[t]),Object(r.useEffect)(()=>{if(!(n&&n.addEventListener))return()=>{};const t=async e=>{await o.current(e)};return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}},[e,n])},s=n(6);function c(e){let{width:t,height:n,color:r}=e;return o.a.createElement("svg",{width:n,height:t,viewBox:"0 0 24 24",fill:"none"},o.a.createElement("path",{d:"M4.952 16.354l5.263-10.497c.738-1.472 2.839-1.472 3.576 0l5.258 10.497a2 2 0 01-1.788 2.896H6.741a2 2 0 01-1.789-2.896z",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.a.createElement("path",{d:"M12 10v2",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),o.a.createElement("path",{d:"M12.5 16a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r}))}c.defaultProps={width:24,height:24,color:"#333"};var l=c;const u=n(1).c.div.withConfig({displayName:"style__FormError",componentId:"sc-13lpm2f-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;font-size:12px;margin-top:4px;right:0;left:auto;color:",";max-height:",";opacity:",";transition:max-height 1s ease,opacity 240ms ease ",";"],s.a.errorColor,e=>{let{show:t}=e;return t?"120px":"0px"},e=>{let{show:t}=e;return t?1:0},e=>{let{show:t}=e;return t?"480ms":0});t.a=function(e){var t,n,r;let{name:c,control:d,inputRef:f,setError:p,clearErrors:h,trigger:m}=e;const{errors:g,isSubmitted:b}=Object(a.c)({name:c,control:d});i("input",e=>{var t;null!==(t=e.target)&&void 0!==t&&t.validationMessage&&!g[c]&&p?p(`browser_error_${c}`,{type:"browser_error",message:e.target.validationMessage},{shouldFocus:!0}):h&&h(`browser_error_${c}`),b&&m&&m(c)},f.current);const v=(null===(t=g[c])||void 0===t?void 0:t.message)||(null===(n=g[`browser_error_${c}`])||void 0===n?void 0:n.message)||(null===(r=f.current)||void 0===r?void 0:r.validationMessage);return o.a.createElement(u,{show:v&&b},o.a.createElement(l,{width:16,height:16,color:s.a.errorColor}),v)}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(3),i=n(70),s=n(10),c=e=>{let{styles:t={},...n}=e;return o.a.createElement("svg",Object.assign({viewBox:"0 0 1792 1792",xmlns:"https://www.w3.org/2000/svg"},n),o.a.createElement("path",{d:"M1408 928v320q0 119-84.5 203.5T1120 1536H288q-119 0-203.5-84.5T0 1248V416q0-119 84.5-203.5T288 128h704q14 0 23 9t9 23v64q0 14-9 23t-23 9H288q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113V928q0-14 9-23t23-9h64q14 0 23 9t9 23zm384-864v512q0 26-19 45t-45 19-45-19l-176-176-652 652q-10 10-23 10t-23-10L695 983q-10-10-10-23t10-23l652-652-176-176q-19-19-19-45t19-45 45-19h512q26 0 45 19t19 45z",fill:"#fff"}))},l=n(5),u=n(72),d=(n(123),n(57),n(8)),f=n(7),p=n(105),h=n(80),m=n(17),g=n(48),b=n(22),v=n(67),y=n(96);const x=n(1).c.div.withConfig({displayName:"styles__CheckboxWrapper",componentId:"sc-sn3ww8-0"})(["width:100%;position:relative;"]),{EXTERNAL_LINK:w,EMAIL:E,PHONE:O,CHECKBOX:k,SLIDER:_}=l.b;function C(e){let{button:t,setCheckboxValue:n,checked:l,chatMessage:C,disabled:j=!1,handlers:T=null,hasSuggestion:S=!1,isNudge:I=!1,onClick:A=null,submitButtonsList:N}=e;const P=Object(a.c)(),M=Object(g.a)(t.button_type),{chatMessages:L,buttonClicks:R}=Object(a.d)(f.n)||[],D=Object(a.d)(f.e)||[],B=Object(m.a)(M,[w,O,E]),F=Object(m.a)(M,[k]),z=Object(m.a)(M,[_]),U=Boolean(l.find(e=>e.id===t.id)),H=Object(r.useRef)(N);let $="";M===O&&($="tel:"),M===E&&($="mailto:");const V=e=>{const n=parseFloat(e);var r;n&&Array.isArray(H.current)&&(null===(r=H.current)||void 0===r||r.map(e=>e.id===t.id?(e.slider_details.value=n,e):e))},q=Object(r.useCallback)(e=>{if(e.preventDefault(),Object(i.a)(e,T,M,Object(p.a)(t),Object(h.a)(C||{}),L.map(h.a),null==D?void 0:D.renderedBy))return;"function"==typeof A&&A(),P(Object(d.g)(t,C,l,H.current));const{href:n,target:r}=e.target;if(n){const e=Boolean(r);setTimeout(()=>{e?window.open(n,r):window.location.href=n},250)}},[M,C,L,t,P,T,l,H,A,null==D?void 0:D.renderedBy]),G=Object(u.a)(q,3e3),W=(null!=R?R:[]).find(e=>{let{chatMessageId:n,buttonId:r}=e;return n===(null==C?void 0:C.id)&&r===t.id}),Y=Object(r.useCallback)(()=>{n(t)},[t,n]);return Object(r.useEffect)(()=>{W&&F&&!U&&n(t)},[W,F,t,n,U]),z&&null!=t&&t.slider_details?o.a.createElement("div",null,o.a.createElement(y.a,{name:`slider_${t.id}`,onChange:V,from:t.slider_details.from_value,to:t.slider_details.to_value,value:t.slider_details.value,step:t.slider_details.step_value,affix:t.slider_details.affix,affixValue:t.slider_details.affix_value,ariaLabel:t.label})):o.a.createElement(b.b,Object.assign({truncateText:S,cy:"message-button",color:!F,type:"button"},B&&{href:`${$}${M===w?(K=t.value,K.match(/^https?:\/\//i)?K:`http://${K}`):t.value}`},B&&{target:`${M!==w||I?"_self":"_blank"}`},F&&{style:{backgroundColor:"transparent",background:"transparent"},role:"checkbox","aria-label":t.label,"aria-checked":U?"true":"false"},{icon:M===w&&I&&o.a.createElement(s.b,{fill:"#FFF",width:10,height:16})||M===w&&!I&&o.a.createElement(c,{width:14,height:14}),disabled:j,onClick:e=>{F?Y():G(e)},hasBeenClicked:W}),F&&o.a.createElement(x,null,o.a.createElement(v.a,{disabled:!0,"aria-disabled":!0,name:`checkbox-${t.id}`,checked:U,label:t.label})),F?"":t.label);var K}C.defaultProps={checked:[]};t.a=C},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));var r=n(161),o=n.n(r),a=n(5);function i(e){if(!e)return null;const t=e.match(/filename="(.+)"/);return t&&2===t.length?t[1]:null}var s=n(2),c=n(9);const l=()=>({transformResponse:e=>e,responseType:"text"}),u=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"html";return async(n,r)=>{var s;let u=e?await e:null;if(!u){const{connection:{token:e},environment:{PAT_HOST:o}}=r(),i=`${o}/chatbubble/${a.j}/privacy/export/${t}`,{headers:s}=Object(c.a)({token:e}),d=l();u=await n(Object(c.f)({method:"get",url:i,...d,headers:s}))}if(200!==(null===(s=u)||void 0===s?void 0:s.status))return;const{headers:d,data:f}=u,p=i(d["content-disposition"])||"export.json",h=new Blob([f],{type:d["content-type"]});o()(h,p)}},d=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:o},environment:{PAT_HOST:i}}=n(),l=`${i}/chatbubble/${a.j}/privacy/delete/`,u=e?await e:await t(Object(c.f)({method:"delete",url:l,...Object(c.a)({token:r})}));200===(null==u?void 0:u.status)&&(setTimeout(()=>t(Object(c.d)(o)),5e3),t({type:s.v}),t({type:s.V}))}}},function(e,t,n){"use strict";var r=n(69),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=c(t),m=c(n),g=0;g<i.length;++g){var b=i[g];if(!(a[b]||r&&r[b]||m&&m[b]||s&&s[b])){var v=f(n,b);try{l(t,b,v)}catch(e){}}}}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n(160);let o,a;const i=e=>(t,n)=>{const{SAGE_WS_HOST:i}=n().environment;if(!o||!o.isConnected())try{o=new r.Socket(`${i}/chatbubble/socket`),o.connect()}catch(e){console.warn("Could not connect to sage socket",e)}try{a=o.channel(`chatbubble_active:${e}`),a.join()}catch(e){console.warn("Could not join active channel",e)}},s=()=>{if(o&&a)try{a.leave()}catch(e){console.warn("Could not leave active channel",e)}if(o)try{o.disconnect()}catch(e){console.warn("Could not disconnect from sage socket",e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r="SET_NEW_CONTEXT",o="SET_NEW_LABEL"},function(e,t,n){"use strict";var r=n(105);t.a=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.a)}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(1),o=n(6);const a=r.c.div.withConfig({displayName:"styles__FormWrapper",componentId:"sc-147n8gc-0"})(["padding:12px;box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);border-radius:6px;margin:3px 0 2px;"]),i=r.c.form.withConfig({displayName:"styles__Form",componentId:"sc-147n8gc-1"})(["display:flex;flex-direction:column;flex:1;",""],e=>{let{isSubmitted:t}=e;return t?`*:invalid {\n border: 1px solid ${o.a.errorColor};\n }`:"*:invalid {\n border: 1px solid transparent;\n }"}),s=r.c.div.withConfig({displayName:"styles__FormTitle",componentId:"sc-147n8gc-2"})(["font-size:",";font-weight:500;display:flex;align-items:center;& > svg{margin-right:4px;}"],o.d.fontSizeP),c=r.c.div.withConfig({displayName:"styles__FormActionsWrapper",componentId:"sc-147n8gc-3"})(["display:flex;flex-direction:row;align-self:flex-end;justify-content:flex-end;margin-top:36px;& > button{&:last-child{margin-left:12px;}}"])},function(e,t){e.exports={}},function(e,t,n){var r=n(122),o=n(29),a=n(137),i=n(40)("toStringTag"),s="Arguments"==a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:s?a(t):"Object"==(r=a(t))&&o(t.callee)?"Arguments":r}},function(e,t,n){"use strict";t.a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce((t,n)=>({...t,...e(n)}),{})}},function(e,t,n){"use strict";t.a=()=>{}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var c,l=[],u=!1,d=-1;function f(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||u||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(206),o=n(138);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(116),o=n(39),a=n(29),i=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(62);e.exports=function(e,t,n,o){o&&o.enumerable?e[t]=n:r(e,t,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","feedback","privacy","websocketFallback","lightbox","nudge"])},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u}));var r=n(5),o=n(2),a=n(9),i=n(43);const s=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&(t({type:o.wb,...n.data,requestedTakeover:!0}),t(Object(i.e)()))},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e(Object(a.f)({method:"post",url:`${i}/chatbubble/${r.j}/takeover_cancel/`,...Object(a.a)({token:n})})),e({type:o.vb})},l=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:o.Db}),e(Object(a.f)({method:"post",url:`${i}/chatbubble/${r.j}/user_started_typing/`,...Object(a.a)({token:n})}))},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:o.Eb}),e(Object(a.f)({method:"post",url:`${i}/chatbubble/${r.j}/user_stopped_typing/`,...Object(a.a)({token:n})}))}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(32),i=n(74),s=n(67),c=n(56);t.a=function(e){let{name:t,control:n,list:l,validators:u,formId:d,register:f,setError:p,clearErrors:h}=e;const m=Object(a.d)({control:n,name:l.map(e=>e.slug)}),g=Object(a.c)({control:n,name:l.map(e=>e.slug)});return Object(r.useEffect)(()=>{if(u)for(let e=0;e<u.length;e+=1){Object.keys(u[e]).forEach(n=>{var r;"texts"!==n&&(n&&(m.some(e=>!!e)?h(t):p(t,{type:n,message:g.isDirty||g.isSubmitted?null===(r=u[e].texts)||void 0===r?void 0:r.text:""})))})}},[m,u,p,h,d,l,t,g]),o.a.createElement(o.a.Fragment,null,l.map(e=>{var t;return o.a.createElement(c.d,{key:`${e.slug}_${e.order}`},o.a.createElement(s.a,{register:f,value:e.value,label:null===(t=e.texts)||void 0===t?void 0:t.label,name:e.slug}))}).sort(e=>e.order),o.a.createElement(i.a,{name:t,control:n}))}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(5),i=n(1);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace("#","");3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=parseInt(n.substring(0,2),16),o=parseInt(n.substring(2,4),16),a=parseInt(n.substring(4,6),16);return t>1&&t<=100&&(t/=100),`rgba(${r},${o},${a},${t})`},c=i.c.div.withConfig({displayName:"styles__SliderWrapper",componentId:"sc-1isvbdy-0"})(["margin:6px 0;display:flex;flex-direction:column;position:relative;padding:12px 12px 16px 12px;width:100%;border-radius:6px;border:",";"],e=>{let{theme:t}=e;return`1px solid ${t.botMessageBackground}`}),l=i.c.div.withConfig({displayName:"styles__SliderAffix",componentId:"sc-1isvbdy-1"})(["padding:0px 8px 0px 0px;font-size:14px;"]),u=i.c.div.withConfig({displayName:"styles__SliderInfoContainer",componentId:"sc-1isvbdy-2"})(["position:relative;flex:1;display:flex;align-items:center;flex-direction:row;margin-bottom:12px;"]),d=i.c.span.withConfig({displayName:"styles__SliderInfo",componentId:"sc-1isvbdy-3"})(["display:flex;padding:4px;align-items:center;justify-content:center;font-size:14px;"]),f=i.c.div.withConfig({displayName:"styles__SliderContainer",componentId:"sc-1isvbdy-4"})(["position:relative;display:flex;flex:1;"]),p=Object(i.b)(["height:20px;width:20px;border-radius:50%;background:",";cursor:pointer;appearance:none;margin-top:-8px;border:1px solid ",";"],e=>{let{theme:t}=e;return t.buttonBackground},e=>{let{theme:t}=e;return t.buttonText}),h=(e,t,n)=>(e-n)/(t-n)*100,m=i.c.input.attrs(e=>{let{theme:t,value:n,max:r,min:o}=e;return{style:{background:`linear-gradient(to right, ${t.buttonBackground} 0%, ${t.buttonBackground} ${h(n,r,o)}%, ${s(t.buttonBackground,.4)} ${h(n,r,o)}%, ${s(t.buttonBackground,.4)} 100%)`}}}).withConfig({displayName:"styles__Slider",componentId:"sc-1isvbdy-5"})(["cursor:pointer;&[type='range']{appearance:none;width:100%;border-radius:25px;height:6px;&::-webkit-slider-thumb{","}&::-moz-range-thumb{","}&::-webkit-slider-runnable-track{width:100%;height:6px;cursor:pointer;border-radius:25px;}}"],p,p);function g(e){let{from:t,to:n,value:i,affix:s,affixValue:p,step:h=1,onChange:g,name:b,field:v,ariaLabel:y,validators:x}=e;const w=Object(r.useMemo)(()=>{var e;const n=parseFloat(t);return Number.isNaN(n)?null==x||null===(e=x.find(e=>void 0!==e.min&&null!==e.min))||void 0===e?void 0:e.min:n},[t,x]),E=Object(r.useMemo)(()=>{var e;const t=parseFloat(n);return Number.isNaN(t)?null==x||null===(e=x.find(e=>void 0!==e.max&&null!==e.max))||void 0===e?void 0:e.max:t},[n,x]),[O,k]=Object(r.useState)(((e,t,n)=>t<e?e+n:t)(h,i,w));return o.a.createElement(c,null,o.a.createElement(u,null,s===a.n.PREFIX&&o.a.createElement(l,null,p),o.a.createElement(d,null,O),s===a.n.SUFFIX&&o.a.createElement(l,null,p)),o.a.createElement(f,null,o.a.createElement(m,{type:"range",name:b,step:h,min:w,max:E,value:O,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(g&&g(e.target.value),null!=v&&v.onChange&&v.onChange(e),k(e.target.value))},"aria-label":y})))}g.defaultProps={value:1};t.a=g},function(e,t,n){"use strict";var r=n(17);t.a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.entries(e).reduce((e,n)=>{let[o,a]=n;return{...e,...Object(r.a)(o,t)?{[o]:a}:{}}},{})}},function(e,t,n){"use strict";const r=e=>{let{buttonId:t,chatMessageId:n}=e;return`button-click-${n}-${t}`};t.a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>!e.find(e=>r(t)===r(e))}},function(e,t,n){"use strict";t.a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.reduce((e,n)=>{var r;return{...e,[t(n)]:[...null!==(r=e[t(n)])&&void 0!==r?r:[],n]}},{})}},function(e,t,n){"use strict";t.a=e=>t=>{let{id:n,chatbubble_temporary_id:r}=t;return!e.find(e=>{let{id:t}=e;return n===t||r===t})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));let r=null;async function o(){try{if(!r){const{default:e}=await Promise.resolve().then(n.t.bind(null,239,7));r=new Audio(e)}await r.play()}catch(e){console.error("Could not play notification sound:",e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(28),o=n(21),a=n(14);function i(e,t){Object(a.a)(2,arguments);var n=Object(o.a)(e).getTime(),i=Object(r.a)(t);return new Date(n+i)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(3),a=n(7);function i(){const{nudges:e}=Object(o.d)(a.d);return Object(r.useMemo)(()=>{var t,n,r,o,a;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(a=null==e?void 0:e.multiple_choice_nudges)&&void 0!==a?a:[]]},[e])}},function(e,t,n){"use strict";t.a=e=>e.replace(/_\w/g,e=>e[1].toUpperCase())},function(e,t,n){"use strict";var r=n(48),o=n(73);t.a=e=>{let{button_type:t,...n}=e;return{...n,button_type:Object(o.a)(t),category:Object(r.a)(t)}}},function(e,t,n){"use strict";var r=n(0);function o(e){return e.touches||e.originalEvent.touches}let a=null;t.a=e=>{let{setIndex:t,index:n,carousel:i}=e;return{handleTouchStart:Object(r.useCallback)(e=>{const t=o(e)[0];a=t.clientX},[]),handleTouchMove:Object(r.useCallback)(e=>{if(!a)return;const r=o(e)[0].clientX;t(a-r>5?n+1:n-1,i),a=null},[i,n,t]),handleTouchEnd:Object(r.useCallback)(()=>{a=null},[])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r=(e,t)=>`${e}_submission_${t}`,o={pattern:"^[0-9]\\d*(\\.\\d+)?$",inputMode:"decimal",type:"text",onKeyPress:e=>{/^[0-9.]$/.test(e.key)||e.preventDefault()},role:"spinbutton"}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r);t.a=function(e){let{color:t="#FFF",...n}=e;return o.a.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o.a.createElement("path",{d:"M15.25 10.75L12 14.25L8.75 10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(3),i=(n(50),n(8)),s=n(10),c=n(22),l=n(36),u=n(1),d=n(6);const f=Object(u.b)(["border-radius:100px;background-color:",";"],d.a.grayColor),p=u.c.div.withConfig({displayName:"styles__ErrorContent",componentId:"sc-1lhoync-0"})(["height:100%;width:100%;display:grid;background-color:#fff;grid-template-rows:55px 1fr 70px;"]),h=u.c.div.withConfig({displayName:"styles__ErrorHeader",componentId:"sc-1lhoync-1"})(["padding:10px 20px;display:grid;align-items:center;grid-template-columns:30px 1fr 40px;box-shadow:0px 3px 4px -1px ",";"],d.a.shadowColor),m=u.c.div.withConfig({displayName:"styles__ErrorName",componentId:"sc-1lhoync-2"})(["height:20px;width:110px;margin-left:20px;",""],f),g=u.c.div.withConfig({displayName:"styles__ErrorContainer",componentId:"sc-1lhoync-3"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:210px;margin:auto;"]),b=u.c.span.withConfig({displayName:"styles__ErrorText",componentId:"sc-1lhoync-4"})(["font-size:14px;margin:16px 0 24px 0;",";"],e=>e.heading&&"font-size: 19px; font-weight: 400; \n margin: 0"),v=u.c.div.withConfig({displayName:"styles__ErrorCircle",componentId:"sc-1lhoync-5"})(["height:","px;min-width:","px;",""],e=>e.size,e=>e.size,f),y=u.c.div.withConfig({displayName:"styles__ErrorComposer",componentId:"sc-1lhoync-6"})(["display:flex;align-items:center;padding:15px 0;margin:0 20px;border-top:1px solid ",";"],d.a.grayColor),x=u.c.div.withConfig({displayName:"styles__ErrorInput",componentId:"sc-1lhoync-7"})(["height:40px;width:100%;margin-right:20px;",""],f);var w=function(){const e=Object(a.c)(),t=Object(r.useCallback)(()=>{e(Object(i.w)())},[e]);return o.a.createElement(p,null,o.a.createElement(h,null,o.a.createElement(v,{size:30}),o.a.createElement(m,null),o.a.createElement(l.b,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:t,"data-cy":"close-chat-button"},o.a.createElement(s.e,{width:25,height:25}))),o.a.createElement(g,null,o.a.createElement(b,{heading:!0},"Oh no..."),o.a.createElement(b,null,"We were unable to load the chat. Please refresh or try again later."),o.a.createElement(c.b,{onClick:t,color:!0},"Refresh chat")),o.a.createElement(y,null,o.a.createElement(x,null),o.a.createElement(v,{size:40})))};class E extends r.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return e?{hasError:!0}:{}}componentDidCatch(e,t){var n;const{dispatch:r,errorPoint:o}=this.props,a=`Component tree crashed ${o}: ${e.message}`,s={errorName:e.name,errorMessage:e.message,errorStack:e.stack,point:o,componentStack:null==t||null===(n=t.componentStack)||void 0===n?void 0:n.trim()};r(Object(i.C)({message:a,error:e,extra:s,level:"error"}))}render(){const{hasError:e}=this.state,{children:t,displayError:n}=this.props;return e&&n?o.a.createElement(w,null):e?null:t}}E.defaultProps={displayError:!0};t.a=Object(a.b)()(E)},function(e,t,n){"use strict";var r=n(28),o=n(102),a=n(14);var i=n(242),s=n(21);t.a=e=>{let{messageSentTime:t,persistStateLifespan:n}=e;if(t){if(-1===n)return!0;if(0!==n){return function(e,t){Object(a.a)(2,arguments);var n=Object(s.a)(e),r=Object(s.a)(t);return n.getTime()>r.getTime()}(function(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(o.a)(e,1e3*n)}(Object(i.a)(t),n),new Date)}}return!1}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(32),i=n(45);const s=[i.c.name,i.a.name,i.e.name,a.a.name,i.b.name,i.d.name];var c=n(1),l=n(6);const u=c.c.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-1cfm2l6-0"})(["display:flex;flex-direction:column;margin-top:16px;position:relative;&.no-margin{margin:0;}"]),d=c.c.label.withConfig({displayName:"styles__Label",componentId:"sc-1cfm2l6-1"})(["font-size:",";margin:4px 0;font-weight:500;"],l.d.fontSize12),f=c.c.div.withConfig({displayName:"styles__HelpText",componentId:"sc-1cfm2l6-2"})(["font-weight:400;line-height:16px;margin-top:4px;font-size:",";color:",";"],l.d.fontSize12,l.h.textColorLight);function p(e){var t;let{className:n,children:r,label:a,htmlFor:i,helperText:c,required:l}=e;return(null==r||!r.length||r.length>1)&&console.error(`InputWrapper is expecting one child node. Received ${r.length}`),null!=s&&s.includes(null===(t=r[0].type)||void 0===t?void 0:t.name)||console.error(`InputWrapper child can only be one of the following: ${s.join(", ")}`),o.a.createElement(u,{className:n},a&&o.a.createElement(d,{htmlFor:i},a,l?o.a.createElement(o.a.Fragment,null,"*"):""),r,c&&o.a.createElement(f,null,c))}p.defaultProps={label:null,htmlFor:null,helperText:null,required:!1};t.a=p},function(e,t,n){"use strict";n.r(t);var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.default=o},function(e,t,n){"use strict";(function(t){var r=n(33),o=n(185),a=n(130),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(c=n(131)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(i)})),e.exports=l}).call(this,n(87))},function(e,t,n){var r=n(39),o=n(210),a=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=a},function(e,t,n){var r=n(63),o=n(140),a=n(64),i=n(142),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(a(e),t=i(t),a(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports={}},function(e,t,n){var r=n(29),o=n(214);e.exports=function(e){if(r(e))return e;throw TypeError(o(e)+" is not a function")}},function(e,t,n){var r=n(147),o=n(149),a=r("keys");e.exports=function(e){return a[e]||(a[e]=o(e))}},function(e,t){e.exports={}},function(e,t,n){var r,o=n(64),a=n(221),i=n(155),s=n(119),c=n(227),l=n(141),u=n(118),d=u("IE_PROTO"),f=function(){},p=function(e){return"<script>"+e+"<\/script>"},h=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&r?h(r):((t=l("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):h(r);for(var n=i.length;n--;)delete m.prototype[i[n]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=o(e),n=new f,f.prototype=null,n[d]=e):n=m(),void 0===t?n:a(n,t)}},function(e,t,n){var r=n(122),o=n(115).f,a=n(62),i=n(46),s=n(229),c=n(40)("toStringTag");e.exports=function(e,t,n,l){if(e){var u=n?e:e.prototype;i(u,c)||o(u,c,{configurable:!0,value:t}),l&&!r&&a(u,"toString",s)}}},function(e,t,n){var r={};r[n(40)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(5),i=n(73);o.a.shape({button_type:o.a.oneOf([...Object.values(a.b),...Object.values(a.b).map(i.a)]).isRequired,is_active:o.a.bool,label:o.a.string.isRequired,value:o.a.string,new_context:o.a.object,index:o.a.number,language_code:o.a.string})},function(e,t,n){"use strict";var r=n(4),o=n.n(r);t.a=o.a.arrayOf(o.a.shape({selected:o.a.bool.isRequired,_id:o.a.string.isRequired,score:o.a.number.isRequired,sample:o.a.string.isRequired}))},function(e,t,n){"use strict";(function(e,r){var o,a=n(158);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var i=Object(a.a)(o);t.a=i}).call(this,n(86),n(179)(e))},,function(e,t){e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(33);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.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:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(33),o=n(186),a=n(187),i=n(129),s=n(188),c=n(191),l=n(192),u=n(132);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers,p=e.responseType;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+g)}var b=s(e.baseURL,e.url);function v(){if(h){var r="getAllResponseHeaders"in h?c(h.getAllResponseHeaders()):null,a={data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,n,a),h=null}}if(h.open(e.method.toUpperCase(),i(b,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||l(b))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}"setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),p&&"json"!==p&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},function(e,t,n){"use strict";var r=n(130);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(33);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],a=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(a,l),r.forEach(i,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(void 0,t[o])})),r.forEach(s,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var u=o.concat(a).concat(i).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,l),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";var r=n(88),o=n(207),a=n(82),i=n(139),s=n(216),c=i.set,l=i.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){c(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r,o,a,i=n(208),s=n(39),c=n(61),l=n(62),u=n(46),d=n(114),f=n(118),p=n(119),h=s.WeakMap;if(i||d.state){var m=d.state||(d.state=new h),g=m.get,b=m.has,v=m.set;r=function(e,t){if(b.call(m,e))throw new TypeError("Object already initialized");return t.facade=e,v.call(m,e,t),t},o=function(e){return g.call(m,e)||{}},a=function(e){return b.call(m,e)}}else{var y=f("state");p[y]=!0,r=function(e,t){if(u(e,y))throw new TypeError("Object already initialized");return t.facade=e,l(e,y,t),t},o=function(e){return u(e,y)?e[y]:{}},a=function(e){return u(e,y)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(63),o=n(51),a=n(141);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(39),o=n(61),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,n){var r=n(211),o=n(143);e.exports=function(e){var t=r(e,"string");return o(t)?t:String(t)}},function(e,t,n){var r=n(29),o=n(89),a=n(144);e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return r(t)&&Object(e)instanceof t}},function(e,t,n){var r=n(145);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(212),o=n(51);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r=n(117);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},function(e,t,n){var r=n(90),o=n(114);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.18.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(138);e.exports=function(e){return Object(r(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){"use strict";var r=n(39),o=n(29),a=n(217).f,i=n(219),s=n(116),c=n(151),l=n(62),u=n(46),d=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,p,h,m,g,b,v,y=e.target,x=e.global,w=e.stat,E=e.proto,O=x?r:w?r[y]:(r[y]||{}).prototype,k=x?s:s[y]||l(s,y,{})[y],_=k.prototype;for(p in t)n=!i(x?p:y+(w?".":"#")+p,e.forced)&&O&&u(O,p),m=k[p],n&&(g=e.noTargetGet?(v=a(O,p))&&v.value:O[p]),h=n&&g?g:t[p],n&&typeof m==typeof h||(b=e.bind&&n?c(h,r):e.wrap&&n?d(h):E&&o(h)?c(Function.call,h):h,(e.sham||h&&h.sham||m&&m.sham)&&l(b,"sham",!0),l(k,p,b),E&&(u(s,f=y+"Prototype")||l(s,f,{}),l(s[f],p,h),e.real&&_&&!_[p]&&l(_,p,h)))}},function(e,t,n){var r=n(117);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(153).IteratorPrototype,o=n(120),a=n(91),i=n(121),s=n(82),c=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=o(r,{next:a(1,n)}),i(e,l,!1,!0),s[l]=c,e}},function(e,t,n){"use strict";var r,o,a,i=n(51),s=n(29),c=n(120),l=n(156),u=n(92),d=n(40),f=n(90),p=d("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(o=l(l(a)))!==Object.prototype&&(r=o):h=!0),null==r||i((function(){var e={};return r[p].call(e)!==e}))?r={}:f&&(r=c(r)),s(r[p])||u(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(46),o=n(29),a=n(148),i=n(118),s=n(228),c=i("IE_PROTO"),l=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof Object?l:null}},function(e,t,n){var r=n(83),o=n(146),a=n(82),i=n(40)("iterator");e.exports=function(e){if(null!=e)return o(e,i)||o(e,"@@iterator")||a[r(e)]}},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){var r=n(93),o=n(97);t.a=t=>{var n,a;let{level:i="info",error:s,message:c,reduxState:l,extra:u}=t;c||null!=s&&s.message||(console.error("Attempted to log without message"),c="No error message provided");const d=Object(o.a)(l||{},r.b),f={version:e.env.VERSION,release:e.env.IS_PURE_BUILD?`${e.env.VERSION}-pure`:e.env.VERSION,userAgent:navigator.userAgent,state:l?JSON.stringify(d):void 0,...u},p={message:null!==(n=c)&&void 0!==n?n:null==s?void 0:s.message,name:null==s?void 0:s.name,stack:null==s?void 0:s.stack,code:null==s?void 0:s.code,signal:null==s?void 0:s.signal};return{message:null!==(a=c)&&void 0!==a?a:null==s?void 0:s.message,level:i,extra:f,error:p}}}).call(this,n(87))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=0,s=1,c=2,l=3,u="closed",d="errored",f="joined",p="joining",h="leaving",m="phx_close",g="phx_error",b="phx_join",v="phx_reply",y="phx_leave",x="longpoll",w="websocket",E=function(){function e(t,n,r,o){a(this,e),this.channel=t,this.event=n,this.payload=r||{},this.receivedResp=null,this.timeout=o,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}return o(e,[{key:"resend",value:function(e){this.timeout=e,this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}},{key:"send",value:function(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref}))}},{key:"receive",value:function(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}},{key:"matchReceive",value:function(e){var t=e.status,n=e.response;e.ref;this.recHooks.filter((function(e){return e.status===t})).forEach((function(e){return e.callback(n)}))}},{key:"cancelRefEvent",value:function(){this.refEvent&&this.channel.off(this.refEvent)}},{key:"cancelTimeout",value:function(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}},{key:"startTimeout",value:function(){var e=this;this.timeoutTimer||(this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,(function(t){e.cancelRefEvent(),e.cancelTimeout(),e.receivedResp=t,e.matchReceive(t)})),this.timeoutTimer=setTimeout((function(){e.trigger("timeout",{})}),this.timeout))}},{key:"hasReceived",value:function(e){return this.receivedResp&&this.receivedResp.status===e}},{key:"trigger",value:function(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}}]),e}(),O=t.Channel=function(){function e(t,n,r){var o=this;a(this,e),this.state=u,this.topic=t,this.params=n||{},this.socket=r,this.bindings=[],this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new E(this,b,this.params,this.timeout),this.pushBuffer=[],this.rejoinTimer=new C((function(){return o.rejoinUntilConnected()}),this.socket.reconnectAfterMs),this.joinPush.receive("ok",(function(){o.state=f,o.rejoinTimer.reset(),o.pushBuffer.forEach((function(e){return e.send()})),o.pushBuffer=[]})),this.onClose((function(){o.rejoinTimer.reset(),o.socket.log("channel","close "+o.topic+" "+o.joinRef()),o.state=u,o.socket.remove(o)})),this.onError((function(e){o.isLeaving()||o.isClosed()||(o.socket.log("channel","error "+o.topic,e),o.state=d,o.rejoinTimer.scheduleTimeout())})),this.joinPush.receive("timeout",(function(){o.isJoining()&&(o.socket.log("channel","timeout "+o.topic,o.joinPush.timeout),o.state=d,o.rejoinTimer.scheduleTimeout())})),this.on(v,(function(e,t){o.trigger(o.replyEventName(t),e)}))}return o(e,[{key:"rejoinUntilConnected",value:function(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this.rejoin()}},{key:"join",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw"tried to join multiple times. 'join' can only be called a single time per channel instance";return this.joinedOnce=!0,this.rejoin(e),this.joinPush}},{key:"onClose",value:function(e){this.on(m,e)}},{key:"onError",value:function(e){this.on(g,(function(t){return e(t)}))}},{key:"on",value:function(e,t){this.bindings.push({event:e,callback:t})}},{key:"off",value:function(e){this.bindings=this.bindings.filter((function(t){return t.event!==e}))}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(!this.joinedOnce)throw"tried to push '"+e+"' to '"+this.topic+"' before joining. Use channel.join() before pushing events";var r=new E(this,e,t,n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.state=h;var n=function(){e.socket.log("channel","leave "+e.topic),e.trigger(m,"leave",e.joinRef())},r=new E(this,y,{},t);return r.receive("ok",(function(){return n()})).receive("timeout",(function(){return n()})),r.send(),this.canPush()||r.trigger("ok",{}),r}},{key:"onMessage",value:function(e,t,n){return t}},{key:"isMember",value:function(e){return this.topic===e}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"sendJoin",value:function(e){this.state=p,this.joinPush.resend(e)}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||this.sendJoin(e)}},{key:"trigger",value:function(e,t,n){if(!(n&&[m,g,y,b].indexOf(e)>=0&&n!==this.joinRef())){var r=this.onMessage(e,t,n);if(t&&!r)throw"channel onMessage callbacks must return the payload, modified or unmodified";this.bindings.filter((function(t){return t.event===e})).map((function(e){return e.callback(r,n)}))}}},{key:"replyEventName",value:function(e){return"chan_reply_"+e}},{key:"isClosed",value:function(){return this.state===u}},{key:"isErrored",value:function(){return this.state===d}},{key:"isJoined",value:function(){return this.state===f}},{key:"isJoining",value:function(){return this.state===p}},{key:"isLeaving",value:function(){return this.state===h}}]),e}(),k=(t.Socket=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=r.timeout||1e4,this.transport=r.transport||window.WebSocket||k,this.heartbeatIntervalMs=r.heartbeatIntervalMs||3e4,this.reconnectAfterMs=r.reconnectAfterMs||function(e){return[1e3,2e3,5e3,1e4][e-1]||1e4},this.logger=r.logger||function(){},this.longpollerTimeout=r.longpollerTimeout||2e4,this.params=r.params||{},this.endPoint=t+"/"+w,this.reconnectTimer=new C((function(){n.disconnect((function(){return n.connect()}))}),this.reconnectAfterMs)}return o(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=_.appendParams(_.appendParams(this.endPoint,this.params),{vsn:"1.0.0"});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?this.protocol()+":"+e:this.protocol()+"://"+location.host+e}},{key:"disconnect",value:function(e,t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n||""):this.conn.close(),this.conn=null),e&&e()}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=e),this.conn||(this.conn=new this.transport(this.endPointURL()),this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,n){this.logger(e,t,n)}},{key:"onOpen",value:function(e){this.stateChangeCallbacks.open.push(e)}},{key:"onClose",value:function(e){this.stateChangeCallbacks.close.push(e)}},{key:"onError",value:function(e){this.stateChangeCallbacks.error.push(e)}},{key:"onMessage",value:function(e){this.stateChangeCallbacks.message.push(e)}},{key:"onConnOpen",value:function(){var e=this;this.log("transport","connected to "+this.endPointURL(),this.transport.prototype),this.flushSendBuffer(),this.reconnectTimer.reset(),this.conn.skipHeartbeat||(clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((function(){return e.sendHeartbeat()}),this.heartbeatIntervalMs)),this.stateChangeCallbacks.open.forEach((function(e){return e()}))}},{key:"onConnClose",value:function(e){this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((function(t){return t(e)}))}},{key:"onConnError",value:function(e){this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach((function(t){return t(e)}))}},{key:"triggerChanError",value:function(){this.channels.forEach((function(e){return e.trigger(g)}))}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case i:return"connecting";case s:return"open";case c:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.channels=this.channels.filter((function(t){return t.joinRef()!==e.joinRef()}))}},{key:"channel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new O(e,t,this);return this.channels.push(n),n}},{key:"push",value:function(e){var t=this,n=e.topic,r=e.event,o=e.payload,a=e.ref,i=function(){return t.conn.send(JSON.stringify(e))};this.log("push",n+" "+r+" ("+a+")",o),this.isConnected()?i():this.sendBuffer.push(i)}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){this.isConnected()&&this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.makeRef()})}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((function(e){return e()})),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=JSON.parse(e.data),n=t.topic,r=t.event,o=t.payload,a=t.ref;this.log("receive",(o.status||"")+" "+n+" "+r+" "+(a&&"("+a+")"||""),o),this.channels.filter((function(e){return e.isMember(n)})).forEach((function(e){return e.trigger(r,o,a)})),this.stateChangeCallbacks.message.forEach((function(e){return e(t)}))}}]),e}(),t.LongPoll=function(){function e(t){a(this,e),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=i,this.poll()}return o(e,[{key:"normalizeEndpoint",value:function(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+w),"$1/"+x)}},{key:"endpointURL",value:function(){return _.appendParams(this.pollEndpoint,{token:this.token})}},{key:"closeAndRetry",value:function(){this.close(),this.readyState=i}},{key:"ontimeout",value:function(){this.onerror("timeout"),this.closeAndRetry()}},{key:"poll",value:function(){var e=this;this.readyState!==s&&this.readyState!==i||_.request("GET",this.endpointURL(),"application/json",null,this.timeout,this.ontimeout.bind(this),(function(t){if(t){var n=t.status,r=t.token,o=t.messages;e.token=r}else n=0;switch(n){case 200:o.forEach((function(t){return e.onmessage({data:JSON.stringify(t)})})),e.poll();break;case 204:e.poll();break;case 410:e.readyState=s,e.onopen(),e.poll();break;case 0:case 500:e.onerror(),e.closeAndRetry();break;default:throw"unhandled poll status "+n}}))}},{key:"send",value:function(e){var t=this;_.request("POST",this.endpointURL(),"application/json",e,this.timeout,this.onerror.bind(this,"timeout"),(function(e){e&&200===e.status||(t.onerror(status),t.closeAndRetry())}))}},{key:"close",value:function(e,t){this.readyState=l,this.onclose()}}]),e}()),_=t.Ajax=function(){function e(){a(this,e)}return o(e,null,[{key:"request",value:function(e,t,n,r,o,a,i){if(window.XDomainRequest){var s=new XDomainRequest;this.xdomainRequest(s,e,t,r,o,a,i)}else{var c=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.xhrRequest(c,e,t,n,r,o,a,i)}}},{key:"xdomainRequest",value:function(e,t,n,r,o,a,i){var s=this;e.timeout=o,e.open(t,n),e.onload=function(){var t=s.parseJSON(e.responseText);i&&i(t)},a&&(e.ontimeout=a),e.onprogress=function(){},e.send(r)}},{key:"xhrRequest",value:function(e,t,n,r,o,a,i,s){var c=this;e.timeout=a,e.open(t,n,!0),e.setRequestHeader("Content-Type",r),e.onerror=function(){s&&s(null)},e.onreadystatechange=function(){if(e.readyState===c.states.complete&&s){var t=c.parseJSON(e.responseText);s(t)}},i&&(e.ontimeout=i),e.send(o)}},{key:"parseJSON",value:function(e){return e&&""!==e?JSON.parse(e):null}},{key:"serialize",value:function(e,t){var n=[];for(var o in e)if(e.hasOwnProperty(o)){var a=t?t+"["+o+"]":o,i=e[o];"object"===(void 0===i?"undefined":r(i))?n.push(this.serialize(i,a)):n.push(encodeURIComponent(a)+"="+encodeURIComponent(i))}return n.join("&")}},{key:"appendParams",value:function(e,t){if(0===Object.keys(t).length)return e;var n=e.match(/\?/)?"&":"?";return""+e+n+this.serialize(t)}}]),e}();_.states={complete:4};t.Presence={syncState:function(e,t,n,r){var o=this,a=this.clone(e),i={},s={};return this.map(a,(function(e,n){t[e]||(s[e]=n)})),this.map(t,(function(e,t){var n=a[e];if(n){var r=t.metas.map((function(e){return e.phx_ref})),c=n.metas.map((function(e){return e.phx_ref})),l=t.metas.filter((function(e){return c.indexOf(e.phx_ref)<0})),u=n.metas.filter((function(e){return r.indexOf(e.phx_ref)<0}));l.length>0&&(i[e]=t,i[e].metas=l),u.length>0&&(s[e]=o.clone(n),s[e].metas=u)}else i[e]=t})),this.syncDiff(a,{joins:i,leaves:s},n,r)},syncDiff:function(e,t,n,r){var o=t.joins,a=t.leaves,i=this.clone(e);return n||(n=function(){}),r||(r=function(){}),this.map(o,(function(e,t){var r,o=i[e];(i[e]=t,o)&&(r=i[e].metas).unshift.apply(r,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(o.metas));n(e,o,t)})),this.map(a,(function(e,t){var n=i[e];if(n){var o=t.metas.map((function(e){return e.phx_ref}));n.metas=n.metas.filter((function(e){return o.indexOf(e.phx_ref)<0})),r(e,n,t),0===n.metas.length&&delete i[e]}})),i},list:function(e,t){return t||(t=function(e,t){return t}),this.map(e,(function(e,n){return t(e,n)}))},map:function(e,t){return Object.getOwnPropertyNames(e).map((function(n){return t(n,e[n])}))},clone:function(e){return JSON.parse(JSON.stringify(e))}};var C=function(){function e(t,n){a(this,e),this.callback=t,this.timerCalc=n,this.timer=null,this.tries=0}return o(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout((function(){e.tries=e.tries+1,e.callback()}),this.timerCalc(this.tries+1))}}]),e}()},function(e,t,n){(function(n){var r,o,a;o=[],void 0===(a="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,i=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,i){var s=a.URL||a.webkitURL,c=document.createElement("a");n=n||e.name||"download",c.download=n,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?o(c):r(c.href)?t(e,n,i):o(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){o(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,a),n);else if(r(e))t(e,n,a);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){o(i)}))}}:function(e,n,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var i="application/octet-stream"===e.type,s=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&s)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},l.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,d=u.createObjectURL(e);o?o.location=d:location.href=d,o=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});a.saveAs=i.saveAs=i,e.exports=i})?r.apply(t,o):r)||(e.exports=a)}).call(this,n(86))},function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(!1===(o=n?n.call(r,u,d,l):void 0)||void 0===o&&u!==d)return!1}return!0}},function(e,t,n){"use strict";t.a=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";s<a;++s)t[s]=n(e,t[s],r).trim();break;default:var c=s=0;for(t=[];s<a;++s)for(var l=0;l<i;++l)t[c++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,a){var i=e+";",s=2*t+3*n+4*a;if(944===s){e=i.indexOf(":",9)+1;var c=i.substring(e,i.length-1).trim();return c=i.substring(0,e).trim()+c+";",1===S||2===S&&o(c,1)?"-webkit-"+c+c:c}if(0===S||2===S&&!o(i,1))return i;switch(s){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(_,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(c=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+c+i;case 1005:return f.test(i)?i.replace(d,":-webkit-")+i.replace(d,":-moz-")+i:i;case 1e3:switch(t=(c=i.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=i.replace(y,"tb");break;case 232:c=i.replace(y,"tb-rl");break;case 220:c=i.replace(y,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+c+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,s=(c=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:i=i.replace(c,"-webkit-"+c)+";"+i;break;case 207:case 102:i=i.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+i.replace(c,"-webkit-"+c)+";"+i.replace(c,"-ms-"+c+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return c=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+c+"-ms-flex-"+c+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(E,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(E,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,a).replace(":fill-available",":stretch"):i.replace(c,"-webkit-"+c)+i.replace(c,"-moz-"+c.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+a&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+i}return i}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),P(2!==t?r:r.replace(O,"$1"),n,t)}function a(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function i(e,t,n,r,o,a,i,s,l,u){for(var d,f=0,p=t;f<N;++f)switch(d=A[f].call(c,e,p,n,r,o,a,i,s,l,u)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(P=null,e?"function"!=typeof e?S=1:(S=2,P=e):S=0),s}function c(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<N){var c=i(-1,n,s,s,j,C,0,0,0,0);void 0!==c&&"string"==typeof c&&(n=c)}var d=function e(n,s,c,d,f){for(var p,h,m,y,w,E=0,O=0,k=0,_=0,A=0,P=0,L=m=p=0,R=0,D=0,B=0,F=0,z=c.length,U=z-1,H="",$="",V="",q="";R<z;){if(h=c.charCodeAt(R),R===U&&0!==O+_+k+E&&(0!==O&&(h=47===O?10:47),_=k=E=0,z++,U++),0===O+_+k+E){if(R===U&&(0<D&&(H=H.replace(u,"")),0<H.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:H+=c.charAt(R)}h=59}switch(h){case 123:for(p=(H=H.trim()).charCodeAt(0),m=1,F=++R;R<z;){switch(h=c.charCodeAt(R)){case 123:m++;break;case 125:m--;break;case 47:switch(h=c.charCodeAt(R+1)){case 42:case 47:e:{for(L=R+1;L<U;++L)switch(c.charCodeAt(L)){case 47:if(42===h&&42===c.charCodeAt(L-1)&&R+2!==L){R=L+1;break e}break;case 10:if(47===h){R=L+1;break e}}R=L}}break;case 91:h++;case 40:h++;case 34:case 39:for(;R++<U&&c.charCodeAt(R)!==h;);}if(0===m)break;R++}switch(m=c.substring(F,R),0===p&&(p=(H=H.replace(l,"").trim()).charCodeAt(0)),p){case 64:switch(0<D&&(H=H.replace(u,"")),h=H.charCodeAt(1)){case 100:case 109:case 115:case 45:D=s;break;default:D=I}if(F=(m=e(s,D,m,h,f+1)).length,0<N&&(w=i(3,m,D=t(I,H,B),s,j,C,F,h,f,d),H=D.join(""),void 0!==w&&0===(F=(m=w.trim()).length)&&(h=0,m="")),0<F)switch(h){case 115:H=H.replace(x,a);case 100:case 109:case 45:m=H+"{"+m+"}";break;case 107:m=(H=H.replace(g,"$1 $2"))+"{"+m+"}",m=1===S||2===S&&o("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=H+m,112===d&&($+=m,m="")}else m="";break;default:m=e(s,t(s,H,B),m,d,f+1)}V+=m,m=B=D=L=p=0,H="",h=c.charCodeAt(++R);break;case 125:case 59:if(1<(F=(H=(0<D?H.replace(u,""):H).trim()).length))switch(0===L&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(F=(H=H.replace(" ",":")).length),0<N&&void 0!==(w=i(1,H,s,n,j,C,$.length,d,f,d))&&0===(F=(H=w.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),h=H.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){q+=H+c.charAt(R);break}default:58!==H.charCodeAt(F-1)&&($+=r(H,p,h,H.charCodeAt(2)))}B=D=L=p=0,H="",h=c.charCodeAt(++R)}}switch(h){case 13:case 10:47===O?O=0:0===1+p&&107!==d&&0<H.length&&(D=1,H+="\0"),0<N*M&&i(0,H,s,n,j,C,$.length,d,f,d),C=1,j++;break;case 59:case 125:if(0===O+_+k+E){C++;break}default:switch(C++,y=c.charAt(R),h){case 9:case 32:if(0===_+E+O)switch(A){case 44:case 58:case 9:case 32:y="";break;default:32!==h&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===_+O+E&&(D=B=1,y="\f"+y);break;case 108:if(0===_+O+E+T&&0<L)switch(R-L){case 2:112===A&&58===c.charCodeAt(R-3)&&(T=A);case 8:111===P&&(T=P)}break;case 58:0===_+O+E&&(L=R);break;case 44:0===O+k+_+E&&(D=1,y+="\r");break;case 34:case 39:0===O&&(_=_===h?0:0===_?h:_);break;case 91:0===_+O+k&&E++;break;case 93:0===_+O+k&&E--;break;case 41:0===_+O+E&&k--;break;case 40:if(0===_+O+E){if(0===p)switch(2*A+3*P){case 533:break;default:p=1}k++}break;case 64:0===O+k+_+E+L+m&&(m=1);break;case 42:case 47:if(!(0<_+E+k))switch(O){case 0:switch(2*h+3*c.charCodeAt(R+1)){case 235:O=47;break;case 220:F=R,O=42}break;case 42:47===h&&42===A&&F+2!==R&&(33===c.charCodeAt(F+2)&&($+=c.substring(F,R+1)),y="",O=0)}}0===O&&(H+=y)}P=A,A=h,R++}if(0<(F=$.length)){if(D=s,0<N&&(void 0!==(w=i(2,$,D,n,j,C,F,d,f,d))&&0===($=w).length))return q+$+V;if($=D.join(",")+"{"+$+"}",0!=S*T){switch(2!==S||o($,2)||(T=0),T){case 111:$=$.replace(v,":-moz-$1")+$;break;case 112:$=$.replace(b,"::-webkit-input-$1")+$.replace(b,"::-moz-$1")+$.replace(b,":-ms-input-$1")+$}T=0}}return q+$+V}(I,s,n,0,0);return 0<N&&(void 0!==(c=i(-2,d,s,s,j,C,d.length,0,0,0))&&(d=c)),"",T=0,C=j=1,d}var l=/^\0+/g,u=/[\0\r\f]/g,d=/: */g,f=/zoo|gra/,p=/([,: ])(transform)/g,h=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,v=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,E=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,_=/([^-])(image-set\()/,C=1,j=1,T=0,S=1,I=[],A=[],N=0,P=null,M=0;return c.use=function e(t){switch(t){case void 0:case null:N=A.length=0;break;default:if("function"==typeof t)A[N++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else M=0|!!t}return e},c.set=s,void 0!==e&&s(e),c}},function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,t){e.exports="http://localhost:8081/src/assets/fonts/IBMPlexSans-Medium.ttf"},function(e,t){e.exports="http://localhost:8081/src/assets/fonts/IBMPlexSans-Regular.ttf"},function(e,t){e.exports="http://localhost:8081/src/assets/fonts/KindlySans-Regular.otf"},function(e,t){e.exports="http://localhost:8081/src/assets/images/santaHat.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){var n=r({key:"redux",merge:i.default,slicer:a.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,s=n.merge,c=n.slicer,l=n.serialize,u=n.deserialize;return function(t){return function(n,r,a){"function"==typeof r&&void 0===a&&(a=r,r=void 0);var i=void 0,d=void 0;try{i=u(localStorage.getItem(o)),d=s(r,i)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var f=t(n,d,a),p=c(e);return f.subscribe((function(){var e=f.getState(),t=p(e);try{localStorage.setItem(o,l(t))}catch(e){console.warn("Unable to persist state to localStorage:",e)}})),f}}};var a=o(n(198)),i=o(n(201));e.exports=t.default},function(e,t,n){(function(e,n){var r=/^\[object .+?Constructor\]$/,o=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var i="object"==typeof e&&e&&e.Object===Object&&e,s="object"==typeof self&&self&&self.Object===Object&&self,c=i||s||Function("return this")(),l=t&&!t.nodeType&&t,u=l&&"object"==typeof n&&n&&!n.nodeType&&n,d=u&&u.exports===l,f=d&&i.process,p=function(){try{var e=u&&u.require&&u.require("util").types;return e||f&&f.binding&&f.binding("util")}catch(e){}}(),h=p&&p.isTypedArray;function m(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var g,b,v,y=Array.prototype,x=Function.prototype,w=Object.prototype,E=c["__core-js_shared__"],O=x.toString,k=w.hasOwnProperty,_=(g=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",C=w.toString,j=O.call(Object),T=RegExp("^"+O.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=d?c.Buffer:void 0,I=c.Symbol,A=c.Uint8Array,N=S?S.allocUnsafe:void 0,P=(b=Object.getPrototypeOf,v=Object,function(e){return b(v(e))}),M=Object.create,L=w.propertyIsEnumerable,R=y.splice,D=I?I.toStringTag:void 0,B=function(){try{var e=le(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),F=S?S.isBuffer:void 0,z=Math.max,U=Date.now,H=le(c,"Map"),$=le(Object,"create"),V=function(){function e(){}return function(t){if(!we(t))return{};if(M)return M(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function G(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function W(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=this.__data__=new G(e);this.size=t.size}function K(e,t){var n=ge(e),r=!n&&me(e),o=!n&&!r&&ve(e),a=!n&&!r&&!o&&Oe(e),i=n||r||o||a,s=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var l in e)!t&&!k.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ue(l,c))||s.push(l);return s}function X(e,t,n){(void 0!==n&&!he(e[t],n)||void 0===n&&!(t in e))&&Z(e,t,n)}function J(e,t,n){var r=e[t];k.call(e,t)&&he(r,n)&&(void 0!==n||t in e)||Z(e,t,n)}function Q(e,t){for(var n=e.length;n--;)if(he(e[n][0],t))return n;return-1}function Z(e,t,n){"__proto__"==t&&B?B(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}q.prototype.clear=function(){this.__data__=$?$(null):{},this.size=0},q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},q.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return k.call(t,e)?t[e]:void 0},q.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:k.call(t,e)},q.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$&&void 0===t?"__lodash_hash_undefined__":t,this},G.prototype.clear=function(){this.__data__=[],this.size=0},G.prototype.delete=function(e){var t=this.__data__,n=Q(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),--this.size,!0)},G.prototype.get=function(e){var t=this.__data__,n=Q(t,e);return n<0?void 0:t[n][1]},G.prototype.has=function(e){return Q(this.__data__,e)>-1},G.prototype.set=function(e,t){var n=this.__data__,r=Q(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},W.prototype.clear=function(){this.size=0,this.__data__={hash:new q,map:new(H||G),string:new q}},W.prototype.delete=function(e){var t=ce(this,e).delete(e);return this.size-=t?1:0,t},W.prototype.get=function(e){return ce(this,e).get(e)},W.prototype.has=function(e){return ce(this,e).has(e)},W.prototype.set=function(e,t){var n=ce(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Y.prototype.clear=function(){this.__data__=new G,this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Y.prototype.get=function(e){return this.__data__.get(e)},Y.prototype.has=function(e){return this.__data__.has(e)},Y.prototype.set=function(e,t){var n=this.__data__;if(n instanceof G){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new W(r)}return n.set(e,t),this.size=n.size,this};var ee,te=function(e,t,n){for(var r=-1,o=Object(e),a=n(e),i=a.length;i--;){var s=a[ee?i:++r];if(!1===t(o[s],s,o))break}return e};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":D&&D in Object(e)?function(e){var t=k.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch(e){}var o=C.call(e);r&&(t?e[D]=n:delete e[D]);return o}(e):function(e){return C.call(e)}(e)}function re(e){return Ee(e)&&"[object Arguments]"==ne(e)}function oe(e){return!(!we(e)||function(e){return!!_&&_ in e}(e))&&(ye(e)?T:r).test(function(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ae(e){if(!we(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&k.call(e,r))&&n.push(r);return n}function ie(e,t,n,r,o){e!==t&&te(t,(function(a,i){if(o||(o=new Y),we(a))!function(e,t,n,r,o,a,i){var s=fe(e,n),c=fe(t,n),l=i.get(c);if(l)return void X(e,n,l);var u=a?a(s,c,n+"",e,t,i):void 0,d=void 0===u;if(d){var f=ge(c),p=!f&&ve(c),h=!f&&!p&&Oe(c);u=c,f||p||h?ge(s)?u=s:Ee(y=s)&&be(y)?u=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(s):p?(d=!1,u=function(e,t){if(t)return e.slice();var n=e.length,r=N?N(n):new e.constructor(n);return e.copy(r),r}(c,!0)):h?(d=!1,m=c,g=!0?(b=m.buffer,v=new b.constructor(b.byteLength),new A(v).set(new A(b)),v):m.buffer,u=new m.constructor(g,m.byteOffset,m.length)):u=[]:function(e){if(!Ee(e)||"[object Object]"!=ne(e))return!1;var t=P(e);if(null===t)return!0;var n=k.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&O.call(n)==j}(c)||me(c)?(u=s,me(s)?u=function(e){return function(e,t,n,r){var o=!n;n||(n={});var a=-1,i=t.length;for(;++a<i;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),o?Z(n,s,c):J(n,s,c)}return n}(e,ke(e))}(s):we(s)&&!ye(s)||(u=function(e){return"function"!=typeof e.constructor||de(e)?{}:V(P(e))}(c))):d=!1}var m,g,b,v;var y;d&&(i.set(c,u),o(u,c,r,a,i),i.delete(c));X(e,n,u)}(e,t,i,n,ie,r,o);else{var s=r?r(fe(e,i),a,i+"",e,t,o):void 0;void 0===s&&(s=a),X(e,i,s)}}),ke)}function se(e,t){return pe(function(e,t,n){return t=z(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=z(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),m(e,this,s)}}(e,t,je),e+"")}function ce(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return oe(n)?n:void 0}function ue(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&o.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||w)}function fe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var pe=function(e){var t=0,n=0;return function(){var r=U(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(B?function(e,t){return B(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:je);function he(e,t){return e===t||e!=e&&t!=t}var me=re(function(){return arguments}())?re:function(e){return Ee(e)&&k.call(e,"callee")&&!L.call(e,"callee")},ge=Array.isArray;function be(e){return null!=e&&xe(e.length)&&!ye(e)}var ve=F||function(){return!1};function ye(e){if(!we(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function xe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function we(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ee(e){return null!=e&&"object"==typeof e}var Oe=h?function(e){return function(t){return e(t)}}(h):function(e){return Ee(e)&&xe(e.length)&&!!a[ne(e)]};function ke(e){return be(e)?K(e,!0):ae(e)}var _e,Ce=(_e=function(e,t,n){ie(e,t,n)},se((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(o=_e.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!we(n))return!1;var r=typeof t;return!!("number"==r?be(n)&&ue(t,n.length):"string"==r&&t in n)&&he(n[t],e)}(t[0],t[1],a)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var i=t[n];i&&_e(e,i,n,o)}return e})));function je(e){return e}n.exports=Ce}).call(this,n(86),n(202)(e))},function(e,t,n){var r=n(203);e.exports=r},function(e,t,n){
17
- /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
18
- e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,a=Object.freeze,i=Object.seal,s=Object.create,c="undefined"!=typeof Reflect&&Reflect,l=c.apply,u=c.construct;l||(l=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),i||(i=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var d,f=E(Array.prototype.forEach),p=E(Array.prototype.pop),h=E(Array.prototype.push),m=E(String.prototype.toLowerCase),g=E(String.prototype.match),b=E(String.prototype.replace),v=E(String.prototype.indexOf),y=E(String.prototype.trim),x=E(RegExp.prototype.test),w=(d=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(d,t)});function E(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return l(e,t,r)}}function O(e,r){t&&t(e,null);for(var o=r.length;o--;){var a=r[o];if("string"==typeof a){var i=m(a);i!==a&&(n(r)||(r[o]=i),a=i)}e[a]=!0}return e}function k(t){var n=s(null),r=void 0;for(r in t)l(e,t,[r])&&(n[r]=t[r]);return n}function _(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return E(n.get);if("function"==typeof n.value)return E(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}var C=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),S=a(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),A=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=a(["#text"]),P=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),L=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),R=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),D=i(/\{\{[\s\S]*|[\s\S]*\}\}/gm),B=i(/<%[\s\S]*|[\s\S]*%>/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),U=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=i(/^(?:\w+script|data):/i),$=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function q(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var G=function(){return"undefined"==typeof window?null:window},W=function(e,t){if("object"!==(void 0===e?"undefined":V(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G(),n=function(t){return e(t)};if(n.version="2.2.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,i=t.DocumentFragment,s=t.HTMLTemplateElement,c=t.Node,l=t.Element,u=t.NodeFilter,d=t.NamedNodeMap,E=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,Y=t.Text,K=t.Comment,X=t.DOMParser,J=t.trustedTypes,Q=l.prototype,Z=_(Q,"cloneNode"),ee=_(Q,"nextSibling"),te=_(Q,"childNodes"),ne=_(Q,"parentNode");if("function"==typeof s){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var oe=W(J,r),ae=oe&&Re?oe.createHTML(""):"",ie=o,se=ie.implementation,ce=ie.createNodeIterator,le=ie.createDocumentFragment,ue=r.importNode,de={};try{de=k(o).documentMode?o.documentMode:{}}catch(e){}var fe={};n.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==de;var pe=D,he=B,me=F,ge=z,be=H,ve=$,ye=U,xe=null,we=O({},[].concat(q(C),q(j),q(T),q(I),q(N))),Ee=null,Oe=O({},[].concat(q(P),q(M),q(L),q(R))),ke=null,_e=null,Ce=!0,je=!0,Te=!1,Se=!1,Ie=!1,Ae=!1,Ne=!1,Pe=!1,Me=!1,Le=!0,Re=!1,De=!0,Be=!0,Fe=!1,ze={},Ue=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),He=null,$e=O({},["audio","video","img","source","image","track"]),Ve=null,qe=O({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",We="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml",Ke=Ye,Xe=null,Je=o.createElement("form"),Qe=function(e){Xe&&Xe===e||(e&&"object"===(void 0===e?"undefined":V(e))||(e={}),e=k(e),xe="ALLOWED_TAGS"in e?O({},e.ALLOWED_TAGS):we,Ee="ALLOWED_ATTR"in e?O({},e.ALLOWED_ATTR):Oe,Ve="ADD_URI_SAFE_ATTR"in e?O(k(qe),e.ADD_URI_SAFE_ATTR):qe,He="ADD_DATA_URI_TAGS"in e?O(k($e),e.ADD_DATA_URI_TAGS):$e,ke="FORBID_TAGS"in e?O({},e.FORBID_TAGS):{},_e="FORBID_ATTR"in e?O({},e.FORBID_ATTR):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,je=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=e.SAFE_FOR_TEMPLATES||!1,Ie=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Le=!1!==e.RETURN_DOM_IMPORT,Re=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Be=!1!==e.KEEP_CONTENT,Fe=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||ye,Ke=e.NAMESPACE||Ke,Se&&(je=!1),Me&&(Pe=!0),ze&&(xe=O({},[].concat(q(N))),Ee=[],!0===ze.html&&(O(xe,C),O(Ee,P)),!0===ze.svg&&(O(xe,j),O(Ee,M),O(Ee,R)),!0===ze.svgFilters&&(O(xe,T),O(Ee,M),O(Ee,R)),!0===ze.mathMl&&(O(xe,I),O(Ee,L),O(Ee,R))),e.ADD_TAGS&&(xe===we&&(xe=k(xe)),O(xe,e.ADD_TAGS)),e.ADD_ATTR&&(Ee===Oe&&(Ee=k(Ee)),O(Ee,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&O(Ve,e.ADD_URI_SAFE_ATTR),Be&&(xe["#text"]=!0),Ie&&O(xe,["html","head","body"]),xe.table&&(O(xe,["tbody"]),delete ke.tbody),a&&a(e),Xe=e)},Ze=O({},["mi","mo","mn","ms","mtext"]),et=O({},["foreignobject","desc","title","annotation-xml"]),tt=O({},j);O(tt,T),O(tt,S);var nt=O({},I);O(nt,A);var rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ye,tagName:"template"});var n=m(e.tagName),r=m(t.tagName);if(e.namespaceURI===We)return t.namespaceURI===Ye?"svg"===n:t.namespaceURI===Ge?"svg"===n&&("annotation-xml"===r||Ze[r]):Boolean(tt[n]);if(e.namespaceURI===Ge)return t.namespaceURI===Ye?"math"===n:t.namespaceURI===We?"math"===n&&et[r]:Boolean(nt[n]);if(e.namespaceURI===Ye){if(t.namespaceURI===We&&!et[r])return!1;if(t.namespaceURI===Ge&&!Ze[r])return!1;var o=O({},["title","style","font","a","script"]);return!nt[n]&&(o[n]||!tt[n])}return!1},ot=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},at=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ee[e])if(Pe||Me)try{ot(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},it=function(e){var t=void 0,n=void 0;if(Ne)e="<remove></remove>"+e;else{var r=g(e,/^[\r\n\t ]+/);n=r&&r[0]}var a=oe?oe.createHTML(e):e;if(Ke===Ye)try{t=(new X).parseFromString(a,"text/html")}catch(e){}t&&t.documentElement||((t=se.createDocument(Ke,"template",null)).documentElement.innerHTML=a);var i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Ie?t.documentElement:i},st=function(e){return ce.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},ct=function(e){return!(e instanceof Y||e instanceof K||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof E&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},lt=function(e){return"object"===(void 0===c?"undefined":V(c))?e instanceof c:e&&"object"===(void 0===e?"undefined":V(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,t,r){fe[e]&&f(fe[e],(function(e){e.call(n,t,r,Xe)}))},dt=function(e){var t=void 0;if(ut("beforeSanitizeElements",e,null),ct(e))return ot(e),!0;if(g(e.nodeName,/[\u0080-\uFFFF]/))return ot(e),!0;var r=m(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:r,allowedTags:xe}),!lt(e.firstElementChild)&&(!lt(e.content)||!lt(e.content.firstElementChild))&&x(/<[/\w]/g,e.innerHTML)&&x(/<[/\w]/g,e.textContent))return ot(e),!0;if(!xe[r]||ke[r]){if(Be&&!Ue[r]){var o=ne(e)||e.parentNode,a=te(e)||e.childNodes;if(a&&o)for(var i=a.length-1;i>=0;--i)o.insertBefore(Z(a[i],!0),ee(e))}return ot(e),!0}return e instanceof l&&!rt(e)?(ot(e),!0):"noscript"!==r&&"noembed"!==r||!x(/<\/no(script|embed)/i,e.innerHTML)?(Se&&3===e.nodeType&&(t=e.textContent,t=b(t,pe," "),t=b(t,he," "),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),ut("afterSanitizeElements",e,null),!1):(ot(e),!0)},ft=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in o||n in Je))return!1;if(je&&x(me,t));else if(Ce&&x(ge,t));else{if(!Ee[t]||_e[t])return!1;if(Ve[t]);else if(x(ye,b(n,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!He[e])if(Te&&!x(be,b(n,ve,"")));else if(n)return!1}return!0},pt=function(e){var t=void 0,r=void 0,o=void 0,a=void 0;ut("beforeSanitizeAttributes",e,null);var i=e.attributes;if(i){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee};for(a=i.length;a--;){var c=t=i[a],l=c.name,u=c.namespaceURI;if(r=y(t.value),o=m(l),s.attrName=o,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(at(l,e),s.keepAttr))if(x(/\/>/i,r))at(l,e);else{Se&&(r=b(r,pe," "),r=b(r,he," "));var d=e.nodeName.toLowerCase();if(ft(d,o,r))try{u?e.setAttributeNS(u,l,r):e.setAttribute(l,r),p(n.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)}},ht=function e(t){var n=void 0,r=st(t);for(ut("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ut("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof i&&e(n.content),pt(n));ut("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,o){var a=void 0,s=void 0,l=void 0,u=void 0,d=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!lt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported){if("object"===V(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(lt(e))return t.toStaticHTML(e.outerHTML)}return e}if(Ae||Qe(o),n.removed=[],"string"==typeof e&&(Fe=!1),Fe);else if(e instanceof c)1===(s=(a=it("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?a=s:a.appendChild(s);else{if(!Pe&&!Se&&!Ie&&-1===e.indexOf("<"))return oe&&Re?oe.createHTML(e):e;if(!(a=it(e)))return Pe?null:ae}a&&Ne&&ot(a.firstChild);for(var f=st(Fe?e:a);l=f.nextNode();)3===l.nodeType&&l===u||dt(l)||(l.content instanceof i&&ht(l.content),pt(l),u=l);if(u=null,Fe)return e;if(Pe){if(Me)for(d=le.call(a.ownerDocument);a.firstChild;)d.appendChild(a.firstChild);else d=a;return Le&&(d=ue.call(r,d,!0)),d}var p=Ie?a.outerHTML:a.innerHTML;return Se&&(p=b(p,pe," "),p=b(p,he," ")),oe&&Re?oe.createHTML(p):p},n.setConfig=function(e){Qe(e),Ae=!0},n.clearConfig=function(){Xe=null,Ae=!1},n.isValidAttribute=function(e,t,n){Xe||Qe({});var r=m(e),o=m(t);return ft(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],h(fe[e],t))},n.removeHook=function(e){fe[e]&&p(fe[e])},n.removeHooks=function(e){fe[e]&&(fe[e]=[])},n.removeAllHooks=function(){fe={}},n}()}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var r=n(0),o=n(3),a=n(8),i=n(7),s=n(110);function c(){const t=Object(o.c)(),{botKey:n}=Object(o.d)(i.e),{messageSentTime:c}=Object(o.d)(i.n),{persistStateLifespan:l}=Object(o.d)(i.d),{chatMessages:u}=Object(o.d)(i.n);Object(r.useEffect)(()=>{if(e.env.IS_STORYBOOK)return;const r=Object(s.a)({messageSentTime:c,persistStateLifespan:l});0===l||r||0===u.length||t(Object(a.e)(n))},[n,t,l,c,u])}}).call(this,n(87))},function(e,t){e.exports="http://localhost:8081/src/assets/icons/emoji-happy.png"},function(e,t){e.exports="http://localhost:8081/src/assets/icons/emoji-neutral.png"},function(e,t){e.exports="http://localhost:8081/src/assets/icons/emoji-sad.png"},,function(e,t,n){"use strict";
19
- /** @license React v16.13.1
20
- * react-is.production.min.js
21
- *
22
- * Copyright (c) Facebook, Inc. and its affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,x=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case f:case i:case c:case s:case h:return e;default:switch(e=e&&e.$$typeof){case u:case p:case b:case g:case l:return e;default:return t}}case a:return t}}}function O(e){return E(e)===f}t.AsyncMode=d,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=b,t.Memo=g,t.Portal=a,t.Profiler=c,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||E(e)===d},t.isConcurrentMode=O,t.isContextConsumer=function(e){return E(e)===u},t.isContextProvider=function(e){return E(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return E(e)===p},t.isFragment=function(e){return E(e)===i},t.isLazy=function(e){return E(e)===b},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===a},t.isProfiler=function(e){return E(e)===c},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===c||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===g||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===y||e.$$typeof===x||e.$$typeof===w||e.$$typeof===v)},t.typeOf=E},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r=n(33),o=n(128),a=n(181),i=n(134);function s(e){var t=new a(e),n=o(a.prototype.request,t);return r.extend(n,a.prototype,t),r.extend(n,t),n}var c=s(n(113));c.Axios=a,c.create=function(e){return s(i(c.defaults,e))},c.Cancel=n(135),c.CancelToken=n(195),c.isCancel=n(133),c.all=function(e){return Promise.all(e)},c.spread=n(196),c.isAxiosError=n(197),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";var r=n(33),o=n(129),a=n(182),i=n(183),s=n(134),c=n(193),l=c.validators;function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:l.transitional(l.boolean,"1.0.0"),forcedJSONParsing:l.transitional(l.boolean,"1.0.0"),clarifyTimeoutError:l.transitional(l.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var u=[i,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{o=i(d)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(33);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(33),o=n(184),a=n(133),i=n(113);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return s(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(33),o=n(113);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},function(e,t,n){"use strict";var r=n(33);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(132);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(33);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(189),o=n(190);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(33),o=["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"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},function(e,t,n){"use strict";var r=n(33);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(194),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={},i=r.version.split(".");function s(e,t){for(var n=t?t.split("."):i,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]<r[o])return!1}return!1}o.transitional=function(e,t,n){var o=t&&s(t);function i(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(i(r," has been removed in "+t));return o&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],c=void 0===s||i(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},function(e){e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},function(e,t,n){"use strict";var r=n(135);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){switch((0,a.default)(e)){case"void":return function(e){return e};case"string":return function(t){return(0,o.default)(t,[e])};case"array":return function(t){return(0,o.default)(t,e)};default:return console.error("Invalid paths argument, should be of type String, Array or Void")}};var o=r(n(199)),a=r(n(200));e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};return t.forEach((function(t){var r=e[t];r&&(n[t]=r)})),n},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return"void";if(r(e))return e.length?"array":"void";return typeof e};var r=Array.isArray||(Array.isArray=function(e){return""+e!==e&&"[object Array]"==={}.toString.call(e)});e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t){return t?r({},e,t):e},e.exports=t.default},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(204);n(237),e.exports=r},function(e,t,n){n(205);var r=n(116);e.exports=r.URLSearchParams},function(e,t,n){"use strict";n(136);var r=n(150),o=n(89),a=n(232),i=n(92),s=n(233),c=n(121),l=n(152),u=n(139),d=n(234),f=n(29),p=n(46),h=n(151),m=n(83),g=n(64),b=n(61),v=n(235),y=n(120),x=n(91),w=n(236),E=n(157),O=n(40),k=o("fetch"),_=o("Request"),C=_&&_.prototype,j=o("Headers"),T=O("iterator"),S=u.set,I=u.getterFor("URLSearchParams"),A=u.getterFor("URLSearchParamsIterator"),N=/\+/g,P=Array(4),M=function(e){return P[e-1]||(P[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},L=function(e){try{return decodeURIComponent(e)}catch(t){return e}},R=function(e){var t=e.replace(N," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(M(n--),L);return t}},D=/[!'()~]|%20/g,B={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},F=function(e){return B[e]},z=function(e){return encodeURIComponent(e).replace(D,F)},U=function(e,t){if(t)for(var n,r,o=t.split("&"),a=0;a<o.length;)(n=o[a++]).length&&(r=n.split("="),e.push({key:R(r.shift()),value:R(r.join("="))}))},H=function(e){this.entries.length=0,U(this.entries,e)},$=function(e,t){if(e<t)throw TypeError("Not enough arguments")},V=l((function(e,t){S(this,{type:"URLSearchParamsIterator",iterator:w(I(e).entries),kind:t})}),"Iterator",(function(){var e=A(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),q=function(){d(this,q,"URLSearchParams");var e,t,n,r,o,a,i,s,c,l=arguments.length>0?arguments[0]:void 0,u=this,f=[];if(S(u,{type:"URLSearchParams",entries:f,updateURL:function(){},updateSearchParams:H}),void 0!==l)if(b(l))if(e=E(l))for(n=(t=w(l,e)).next;!(r=n.call(t)).done;){if((i=(a=(o=w(g(r.value))).next).call(o)).done||(s=a.call(o)).done||!a.call(o).done)throw TypeError("Expected sequence with length 2");f.push({key:v(i.value),value:v(s.value)})}else for(c in l)p(l,c)&&f.push({key:c,value:v(l[c])});else U(f,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:v(l))},G=q.prototype;if(s(G,{append:function(e,t){$(arguments.length,2);var n=I(this);n.entries.push({key:v(e),value:v(t)}),n.updateURL()},delete:function(e){$(arguments.length,1);for(var t=I(this),n=t.entries,r=v(e),o=0;o<n.length;)n[o].key===r?n.splice(o,1):o++;t.updateURL()},get:function(e){$(arguments.length,1);for(var t=I(this).entries,n=v(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){$(arguments.length,1);for(var t=I(this).entries,n=v(e),r=[],o=0;o<t.length;o++)t[o].key===n&&r.push(t[o].value);return r},has:function(e){$(arguments.length,1);for(var t=I(this).entries,n=v(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){$(arguments.length,1);for(var n,r=I(this),o=r.entries,a=!1,i=v(e),s=v(t),c=0;c<o.length;c++)(n=o[c]).key===i&&(a?o.splice(c--,1):(a=!0,n.value=s));a||o.push({key:i,value:s}),r.updateURL()},sort:function(){var e,t,n,r=I(this),o=r.entries,a=o.slice();for(o.length=0,n=0;n<a.length;n++){for(e=a[n],t=0;t<n;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===n&&o.push(e)}r.updateURL()},forEach:function(e){for(var t,n=I(this).entries,r=h(e,arguments.length>1?arguments[1]:void 0,3),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new V(this,"keys")},values:function(){return new V(this,"values")},entries:function(){return new V(this,"entries")}},{enumerable:!0}),i(G,T,G.entries,{name:"entries"}),i(G,"toString",(function(){for(var e,t=I(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(z(e.key)+"="+z(e.value));return n.join("&")}),{enumerable:!0}),c(q,"URLSearchParams"),r({global:!0,forced:!a},{URLSearchParams:q}),!a&&f(j)){var W=function(e){if(b(e)){var t,n=e.body;if("URLSearchParams"===m(n))return(t=e.headers?new j(e.headers):new j).has("content-type")||t.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),y(e,{body:x(0,String(n)),headers:x(0,t)})}return e};if(f(k)&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return k(e,arguments.length>1?W(arguments[1]):{})}}),f(_)){var Y=function(e){return d(this,Y,"Request"),new _(e,arguments.length>1?W(arguments[1]):{})};C.constructor=Y,Y.prototype=C,r({global:!0,forced:!0},{Request:Y})}}e.exports={URLSearchParams:q,getState:I}},function(e,t,n){var r=n(51),o=n(137),a="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?a.call(e,""):Object(e)}:Object},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(39),o=n(29),a=n(209),i=r.WeakMap;e.exports=o(i)&&/native code/.test(a(i))},function(e,t,n){var r=n(29),o=n(114),a=Function.toString;r(o.inspectSource)||(o.inspectSource=function(e){return a.call(e)}),e.exports=o.inspectSource},function(e,t,n){var r=n(39);e.exports=function(e,t){try{Object.defineProperty(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(61),o=n(143),a=n(146),i=n(215),s=n(40)("toPrimitive");e.exports=function(e,t){if(!r(e)||o(e))return e;var n,c=a(e,s);if(c){if(void 0===t&&(t="default"),n=c.call(e,t),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),i(e,t)}},function(e,t,n){var r,o,a=n(39),i=n(213),s=a.process,c=a.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u?o=(r=u.split("."))[0]<4?1:r[0]+r[1]:i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){var r=n(89);e.exports=r("navigator","userAgent")||""},function(e,t){e.exports=function(e){try{return String(e)}catch(e){return"Object"}}},function(e,t,n){var r=n(29),o=n(61);e.exports=function(e,t){var n,a;if("string"===t&&r(n=e.toString)&&!o(a=n.call(e)))return a;if(r(n=e.valueOf)&&!o(a=n.call(e)))return a;if("string"!==t&&r(n=e.toString)&&!o(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r=n(150),o=n(90),a=n(220),i=n(29),s=n(152),c=n(156),l=n(230),u=n(121),d=n(62),f=n(92),p=n(40),h=n(82),m=n(153),g=a.PROPER,b=a.CONFIGURABLE,v=m.IteratorPrototype,y=m.BUGGY_SAFARI_ITERATORS,x=p("iterator"),w=function(){return this};e.exports=function(e,t,n,a,p,m,E){s(n,t,a);var O,k,_,C=function(e){if(e===p&&A)return A;if(!y&&e in S)return S[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},j=t+" Iterator",T=!1,S=e.prototype,I=S[x]||S["@@iterator"]||p&&S[p],A=!y&&I||C(p),N="Array"==t&&S.entries||I;if(N&&(O=c(N.call(new e)))!==Object.prototype&&O.next&&(o||c(O)===v||(l?l(O,v):i(O[x])||f(O,x,w)),u(O,j,!0,!0),o&&(h[j]=w)),g&&"values"==p&&I&&"values"!==I.name&&(!o&&b?d(S,"name","values"):(T=!0,A=function(){return I.call(this)})),p)if(k={values:C("values"),keys:m?A:C("keys"),entries:C("entries")},E)for(_ in k)(y||T||!(_ in S))&&f(S,_,k[_]);else r({target:t,proto:!0,forced:y||T},k);return o&&!E||S[x]===A||f(S,x,A,{name:p}),h[t]=A,k}},function(e,t,n){var r=n(63),o=n(218),a=n(91),i=n(88),s=n(142),c=n(46),l=n(140),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=i(e),t=s(t),l)try{return u(e,t)}catch(e){}if(c(e,t))return a(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!r.call({1:2},1);t.f=a?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(51),o=n(29),a=/#|\.prototype\./,i=function(e,t){var n=c[s(e)];return n==u||n!=l&&(o(t)?r(t):!!t)},s=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},c=i.data={},l=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(63),o=n(46),a=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,s=o(a,"name"),c=s&&"something"===function(){}.name,l=s&&(!r||r&&i(a,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},function(e,t,n){var r=n(63),o=n(115),a=n(64),i=n(222);e.exports=r?Object.defineProperties:function(e,t){a(e);for(var n,r=i(t),s=r.length,c=0;s>c;)o.f(e,n=r[c++],t[n]);return e}},function(e,t,n){var r=n(223),o=n(155);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(46),o=n(88),a=n(224).indexOf,i=n(119);e.exports=function(e,t){var n,s=o(e),c=0,l=[];for(n in s)!r(i,n)&&r(s,n)&&l.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~a(l,n)||l.push(n));return l}},function(e,t,n){var r=n(88),o=n(225),a=n(226),i=function(e){return function(t,n,i){var s,c=r(t),l=o(c.length),u=a(i,l);if(e&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},function(e,t,n){var r=n(154),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(154),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},function(e,t,n){var r=n(89);e.exports=r("document","documentElement")},function(e,t,n){var r=n(51);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(122),o=n(83);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){var r=n(64),o=n(231);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return r(n),o(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},function(e,t,n){var r=n(29);e.exports=function(e){if("object"==typeof e||r(e))return e;throw TypeError("Can't set "+String(e)+" as a prototype")}},function(e,t,n){var r=n(51),o=n(40),a=n(90),i=o("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),a&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[i]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(e,t,n){var r=n(92);e.exports=function(e,t,n){for(var o in t)n&&n.unsafe&&e[o]?e[o]=t[o]:r(e,o,t[o],n);return e}},function(e,t){e.exports=function(e,t,n){if(e instanceof t)return e;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}},function(e,t,n){var r=n(83);e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},function(e,t,n){var r=n(117),o=n(64),a=n(157);e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(r(n))return o(n.call(e));throw TypeError(String(e)+" is not iterable")}},function(e,t,n){n(136);var r=n(238),o=n(39),a=n(83),i=n(62),s=n(82),c=n(40)("toStringTag");for(var l in r){var u=o[l],d=u&&u.prototype;d&&a(d)!==c&&i(d,c,l),s[l]=s.Array}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t){e.exports="http://localhost:8081/src/assets/audio/newagent.mp3"},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"agent",(function(){return pt})),n.d(r,"alerts",(function(){return mt})),n.d(r,"announcement",(function(){return bt})),n.d(r,"auth",(function(){return yt})),n.d(r,"bot",(function(){return Qe})),n.d(r,"chatbubble",(function(){return et})),n.d(r,"connection",(function(){return wt})),n.d(r,"inspector",(function(){return Ot})),n.d(r,"environment",(function(){return nt})),n.d(r,"feedback",(function(){return _t})),n.d(r,"local",(function(){return Tt})),n.d(r,"maintenanceAlert",(function(){return It})),n.d(r,"messages",(function(){return Ut})),n.d(r,"privacy",(function(){return $t})),n.d(r,"pushMessages",(function(){return Gt})),n.d(r,"websocketFallback",(function(){return Kt})),n.d(r,"lightBox",(function(){return Jt})),n.d(r,"nudge",(function(){return Zt}));var o=n(4),a=n.n(o),i=n(0),s=n.n(i),c=n(65),l=(a.a.shape({context:a.a.shape({}),language:a.a.string,getAuthToken:a.a.func,bubbleHidden:a.a.bool,buttonHandlers:c.a,onLoad:a.a.func,environment:a.a.shape({PAT_HOST:a.a.string,PUSHER_KEY:a.a.string,STATUS_PAGE:a.a.string,KINDLY_CHAT_URL:a.a.string,SETTINGS_HOST:a.a.string,SAGE_WS_HOST:a.a.string,SAGE_HOST:a.a.string}),inPlatform:a.a.bool,admin:a.a.bool}),n(17));var u=function(e,t){return!!Object(l.a)(t,"*")||!!e&&t.some(t=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(t).test(e))};function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){e.apply(void 0,o),n=null}),t)}}function v(e,t){var n=0;return function(){var r=(new Date).getTime();if(!(r-n<t))return n=r,e.apply(void 0,arguments)}}var y="object"===("undefined"==typeof window||"undefined"==typeof window?"undefined":d(window)),x=y?document:{},w=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?g(e):t}(this,m(t).call(this,e)),p(g(n),"state",{idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null,pageX:null,pageY:null}),p(g(n),"tId",null),p(g(n),"_handleEvent",(function(e){var t=n.state,r=t.remaining,o=t.pageX,a=t.pageY,i=t.idle,s=n.props,c=s.timeout,l=s.onAction,u=s.debounce,d=s.throttle,f=s.stopOnIdle;if(u>0?n.debouncedAction(e):d>0?n.throttledAction(e):l(e),!r){if("mousemove"===e.type){if(e.pageX===o&&e.pageY===a)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(n.getElapsedTime()<200)return}clearTimeout(n.tId),n.tId=null;var p=new Date-n.getLastActiveTime();(i&&!f||!i&&p>c)&&n.toggleIdleState(e),n.setState({lastActive:+new Date,pageX:e.pageX,pageY:e.pageY}),i&&f||(n.tId=setTimeout(n.toggleIdleState,c))}})),e.debounce>0&&e.throttle>0)throw new Error("onAction can either be throttled or debounced (not both)");return e.debounce>0&&(n.debouncedAction=b(e.onAction,e.debounce)),e.throttle>0&&(n.throttledAction=v(e.onAction,e.throttle)),e.startOnMount||(n.state.idle=!0),n.toggleIdleState=n._toggleIdleState.bind(g(n)),n.reset=n.reset.bind(g(n)),n.pause=n.pause.bind(g(n)),n.resume=n.resume.bind(g(n)),n.getRemainingTime=n.getRemainingTime.bind(g(n)),n.getElapsedTime=n.getElapsedTime.bind(g(n)),n.getLastActiveTime=n.getLastActiveTime.bind(g(n)),n.isIdle=n._isIdle.bind(g(n)),n}return h(t,e),function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(t,[{key:"componentDidMount",value:function(){this._bindEvents(),this.props.startOnMount&&this.reset()}},{key:"componentDidUpdate",value:function(e){e.debounce!==this.props.debounce&&(this.debouncedAction=b(this.props.onAction,this.props.debounce)),e.throttle!==this.props.throttle&&(this.throttledAction=v(this.props.onAction,this.props.throttle))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.tId),this._unbindEvents(!0)}},{key:"render",value:function(){return this.props.children||null}},{key:"_bindEvents",value:function(){var e=this;if(y){var t=this.state.eventsBound,n=this.props,r=n.element,o=n.events,a=n.passive,i=n.capture;t||(o.forEach((function(t){r.addEventListener(t,e._handleEvent,{capture:i,passive:a})})),this.setState({eventsBound:!0}))}}},{key:"_unbindEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(y){var n=this.props,r=n.element,o=n.events,a=n.passive,i=n.capture;(this.state.eventsBound||t)&&(o.forEach((function(t){r.removeEventListener(t,e._handleEvent,{capture:i,passive:a})})),this.setState({eventsBound:!1}))}}},{key:"_toggleIdleState",value:function(e){var t=this;this.setState((function(e){return{idle:!e.idle}}),(function(){var n=t.props,r=n.onActive,o=n.onIdle,a=n.stopOnIdle;t.state.idle?(a&&(clearTimeout(t.tId),t.tId=null,t._unbindEvents()),o(e)):a||(t._bindEvents(),r(e))}))}},{key:"reset",value:function(){clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null});var e=this.props.timeout;this.tId=setTimeout(this.toggleIdleState,e)}},{key:"pause",value:function(){null===this.state.remaining&&(this._unbindEvents(),clearTimeout(this.tId),this.tId=null,this.setState({remaining:this.getRemainingTime()}))}},{key:"resume",value:function(){var e=this.state,t=e.remaining,n=e.idle;null!==t&&(this._bindEvents(),n||(this.setState({remaining:null,lastActive:+new Date}),this.tId=setTimeout(this.toggleIdleState,t)))}},{key:"getRemainingTime",value:function(){var e=this.state,t=e.remaining,n=e.lastActive,r=this.props.timeout;if(null!==t)return t<0?0:t;var o=r-(+new Date-n);return o<0?0:o}},{key:"getElapsedTime",value:function(){var e=this.state.oldDate;return+new Date-e}},{key:"getLastActiveTime",value:function(){return this.state.lastActive}},{key:"_isIdle",value:function(){return this.state.idle}}]),t}(i.Component);p(w,"propTypes",{timeout:a.a.number,events:a.a.arrayOf(a.a.string),onIdle:a.a.func,onActive:a.a.func,onAction:a.a.func,debounce:a.a.number,throttle:a.a.number,element:a.a.oneOfType([a.a.object,a.a.element]),startOnMount:a.a.bool,stopOnIdle:a.a.bool,passive:a.a.bool,capture:a.a.bool}),p(w,"defaultProps",{timeout:12e5,element:x,events:["mousemove","keydown","wheel","DOMMouseScroll","mouseWheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"],onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,startOnMount:!0,stopOnIdle:!1,capture:!0,passive:!0});var E=w,O=n(3),k=n(1),_=n(70),C=n(109),j=n(18),T=n(10),S=n(15),I=(a.a.shape({name:a.a.string.isRequired,avatar:a.a.string.isRequired}),n(8)),A=n(7),N=n(31),P=n(38),M=n(27),L=n(25),R=n(101),D=n(11),B=n(23),F=n(12),z=n(6);const U=k.c.div.withConfig({displayName:"styles__PushMessageContainer",componentId:"sc-na2ous-0"})(["right:40px;bottom:50px;z-index:",";position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";",";@media ","{margin-left:20px;","}"],e=>e.zIndex,z.a.shadowColor,D.f,z.c.maxTablet,e=>{let{bubbleSize:t}=e;return"SMALL"===t?"\n right: 30px;\n bottom: 30px;\n ":"\n bottom: 55px;"}),H=k.c.div.withConfig({displayName:"styles__PushMessageInner",componentId:"sc-na2ous-1"})(["padding:15px 20px;width:max-content;max-width:360px;min-width:130px;padding-right:60px;@media ","{width:unset;max-width:100%;}"],z.c.maxPhone),$=k.c.div.withConfig({displayName:"styles__ContentContainer",componentId:"sc-na2ous-2"})(["display:flex;cursor:pointer;align-items:center;"]),V=k.c.div.withConfig({displayName:"styles__AgentAvatar",componentId:"sc-na2ous-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin-right:15px;background:",";background-position:center;background-size:cover;background-color:",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),q=k.c.div.withConfig({displayName:"styles__ContentText",componentId:"sc-na2ous-4"})(["margin:0;color:",";font-size:",";font-weight:normal;line-height:24px;font-family:",";span{font-weight:500;}p{margin:0;}@media ","{font-size:14px;}"],z.a.darkColor,z.d.fontSizeH5,B.a.default,z.c.maxTablet),G=Object(k.c)(F.a).withConfig({displayName:"styles__PushMessageDismiss",componentId:"sc-na2ous-5"})(["top:-8px;left:-8px;z-index:",";display:flex;padding:0;border-radius:100px;background:",";background-color:",";position:absolute;&:hover{opacity:0.8;}"],e=>e.zIndex,e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground},e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground}),W=Object(L.a)();function Y(e){let{agent:t}=e;const{currentLanguage:n}=Object(O.d)(A.e),{text:r}=Object(O.d)(A.d),{defaultLanguage:o}=Object(S.a)(),{agent_joined_text:a}=Object(M.a)(r,n,o);return Object(i.useEffect)(()=>{Object(R.a)()},[]),s.a.createElement($,null,s.a.createElement(V,{style:{backgroundImage:`url(${t.avatar})`}}),s.a.createElement(q,null,s.a.createElement("span",null,t.name||"An agent")," ",a))}function K(e){let{text:t}=e;return s.a.createElement($,null,s.a.createElement(q,{dangerouslySetInnerHTML:{__html:t}}))}var X=function(e){let{settings:t}=e;const{bubbleSize:n}=Object(O.d)(A.d),{agent:r,show:o,text:a,type:c}=Object(O.d)(A.q),l=Object(O.c)(),u=Object(N.a)(t,"zIndex",15),d=Object(k.e)(),f=Object(i.useMemo)(()=>Object(P.a)(d.bubbleButtonBackground||d.buttonBackground,"#fff","#000"),[d.bubbleButtonBackground,d.buttonBackground]);return null===a?null:s.a.createElement(U,{"data-story":"PushMessageContainer",bubbleSize:n,"aria-hidden":o?"false":"true","aria-label":"Chat bot push message",onClick:()=>l(Object(I.F)()),role:"complementary",zIndex:u},s.a.createElement(G,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),l(Object(I.v)())},type:"button"},s.a.createElement(T.e,{color:f,width:W?20:25,height:W?20:25})),s.a.createElement(H,null,"message"===c&&s.a.createElement(K,{text:a}),"takeover"===c&&s.a.createElement(Y,{agent:r})))},J=n(5),Q=(n(50),n(19));const Z=Object(k.b)(["#chatContainer.using-tab &{outline-color:rgb(77,144,254);outline-offset:-2px;outline-style:auto;outline-width:5px;}"]),ee=Object(k.b)(["z-index:15;transition:all 0.2s ease;",";"],e=>e.active&&"transform: rotate(45deg);"),te=Object(k.c)(T.c).withConfig({displayName:"styles__BubbleButton",componentId:"sc-1elsepj-0"})(["&&&{",";overflow:visible;path{stroke-width:2px;stroke:",";fill:",";transition:stroke 0.15s ease;}}"],ee,e=>{let{active:t,$bubbleOutline:n,theme:r,stroke:o}=e;return o||(!t&&n?r.bubbleButtonOutline:r.bubbleButtonBackground||r.buttonBackground)},e=>{let{theme:t,background:n}=e;return n||(t.bubbleButtonBackground||t.buttonBackground)}),ne=k.c.button.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1elsepj-1"})(["z-index:10;overflow:visible;display:flex;justify-content:center;align-items:center;flex-direction:column;cursor:pointer;height:50px;width:50px;padding:9px 8px;text-align:center;border-radius:50%;border:2px solid ",";box-shadow:"," ",";background:",";",";transition:all 0.25s ease;"," @media ","{","}:focus{",";}:hover{background:",";}:focus ","{",";}"," path{",";",";}"],e=>{let{bubbleOutline:t,theme:n,background:r}=e;return r||(t?n.bubbleButtonOutline:n.bubbleButtonBackground||n.buttonBackground)},e=>e.active?"0px 1px 5px 1px":"1px 0px 7px 7px",z.a.shadowColorDark,e=>{let{theme:t,background:n}=e;return n||t.bubbleButtonBackground||t.buttonBackground},e=>{let{background:t}=e;return t?`border-color: ${t}`:void 0},Q.a,z.c.maxTablet,e=>{let{smallBubble:t}=e;return t&&"\n height: 30px;\n width: 30px;\n\n svg {\n width: 45px;\n }\n "},e=>{let{active:t}=e;return!t&&"outline: none;"},e=>{let{background:t,theme:n}=e;return t||n.bubbleButtonBackground||n.buttonBackground},te,e=>{let{active:t}=e;return!t&&Z},te,e=>{let{background:t}=e;return t?`stroke: ${t}`:""},e=>{let{background:t}=e;return t?`fill: ${t}`:""}),re=Object(k.b)(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]),oe=k.c.div.withConfig({displayName:"styles__LogoContainer",componentId:"sc-1elsepj-2"})([""," top:calc(50% - 3px);opacity:1;width:calc(100% - 20px);height:calc(100% - 20px);background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url(",");transition:all 0.2s ease;",";"],re,e=>e.bubbleAvatar,e=>e.active&&"opacity: 0;"),ae=k.c.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-1elsepj-3"})(["",""],re);var ie=n(168),se=n.n(ie);const ce=k.c.img.withConfig({displayName:"ChristmasBubbleButtonstyles__ChristmasBubbleButton",componentId:"sc-tjldpf-0"})(["z-index:15;position:absolute;top:-22px;left:2px;width:84px;opacity:1;transform:rotate(10deg);transition:all 0.2s ease;",";path{fill:",";}"],e=>e.active&&"\n transform: rotate(32deg);\n width: 51px;\n top: -20px;\n left: 9px;\n ",e=>{let{theme:t,active:n}=e;return n?t.bubbleButtonBackground||t.buttonBackground:""});var le=function(e){let{active:t,bubbleOutline:n}=e;return s.a.createElement(ae,null,s.a.createElement(ce,{src:se.a,active:t?1:0,role:"presentation"}),s.a.createElement(te,{active:t?1:0,bubbleOutline:n?1:0,width:t?33:65,height:t?35:67}))};const ue=k.c.svg.withConfig({displayName:"EasterBubbleButtonstyles__EarFront",componentId:"sc-1djbf9y-0"})(["z-index:15;position:absolute;top:-22px;left:32px;width:31px;height:38px;opacity:1;&:focus{outline:none;}transition:all 0.2s ease;",";"],e=>e.active&&"\n width: 18px;\n height: 23px;\n top: -6px;\n left: 29px;\n "),de=k.c.svg.withConfig({displayName:"EasterBubbleButtonstyles__EarBack",componentId:"sc-1djbf9y-1"})(["position:absolute;top:-26px;left:24px;width:31px;height:38px;opacity:1;z-index:-1;transition:all 0.2s ease;",";"],e=>e.active&&"\n width: 12px;\n height: 15px;\n top: -8px;\n left: 31px;\n "),fe=k.c.svg.withConfig({displayName:"EasterBubbleButtonstyles__EyesNose",componentId:"sc-1djbf9y-2"})(["z-index:15;position:absolute;top:24px;left:-2px;width:29px;height:24px;opacity:1;transform:rotate(0deg);transition:all 0.2s ease;",";"],e=>e.active&&"\n opacity: 0;\n top: 3px;\n left: -8px;\n width: 19px;\n height: 14px;\n transform: rotate(45deg);\n ");var pe=function(e){let{active:t,bubbleOutline:n}=e;return s.a.createElement(s.a.Fragment,null,s.a.createElement(de,{width:"31px",height:"38px",viewBox:"0 0 31 38",active:t?1:0},s.a.createElement(T.f,null)),s.a.createElement(ue,{width:"31px",height:"38px",viewBox:"0 0 31 38",active:t?1:0},s.a.createElement(T.g,null)),s.a.createElement(ae,null,!t&&s.a.createElement(fe,{width:"29px",height:"24px",viewBox:"0 0 29 24",active:t?1:0},s.a.createElement(T.k,null)),s.a.createElement(te,{active:t?1:0,bubbleOutline:n?1:0,width:t?33:65,height:t?35:67,background:"#FFCA3A",stroke:"#FFCA3A"})))};const he=Object(k.c)(T.d).withConfig({displayName:"PrideBubbleButtonstyles__PrideBubbleButton",componentId:"sc-10jy5tk-0"})(["",";path{fill:",";}",":focus &{",";}"],ee,e=>{let{theme:t,active:n}=e;return n?t.bubbleButtonBackground||t.buttonBackground:""},ne,e=>{let{active:t}=e;return!t&&Z});var me=function(e){let{active:t}=e;return s.a.createElement(ae,null,s.a.createElement(he,{active:t?1:0,width:t?35:65,height:t?37:67}))};var ge=function(e){let{active:t,season:n,bubbleOutline:r,children:o}=e;return n===J.k.PRIDE?s.a.createElement(me,{active:t}):n===J.k.EASTER?s.a.createElement(pe,{active:t,bubbleOutline:r}):n===J.k.CHRISTMAS?s.a.createElement(le,{active:t,bubbleOutline:r}):s.a.createElement(ae,null,s.a.createElement(te,{active:t?1:0,$bubbleOutline:r?1:0,width:t?33:65,height:t?35:67}),o)};var be=function(e){let{title:t,active:n,onClick:r}=e;const{seasonalAppearance:o,bubbleOutline:a,bubbleSize:i,bubbleAvatar:c}=Object(O.d)(A.d),l=(e=>{if(e===J.k.EASTER)return"#ffca3a"})(o);return s.a.createElement(ne,{"aria-label":t,"aria-controls":"ChatButtonContainer",title:t,type:"button",active:n,onClick:r,"data-cy":"chat-bubble-button","data-testid":"chat-button",bubbleOutline:a?1:0,seasonalAppearance:o?1:0,background:l,smallBubble:"SMALL"===i},s.a.createElement(ge,{active:n,season:o,bubbleOutline:a},c?s.a.createElement(oe,{bubbleAvatar:c,active:n,"data-cy":"chat-bubble-logo-container"}):void 0))};const ve=(e,t)=>{if(null!=t&&t.includes("-")){const n=t.substring(0,t.indexOf("-"));if(e.toLowerCase()===n)return n}};var ye=n(42),xe=n(52);function we(){const e=Object(O.c)(),{currentLanguage:t,active:n,chatHasStarted:r}=Object(O.d)(A.e),{pushGreetingsEnabled:o,pushGreetings:a}=Object(O.d)(A.d),{defaultLanguage:s}=Object(S.a)();Object(i.useEffect)(()=>{if(!o||!a||n||!t||r)return;const i=window.location.href;a.forEach(n=>{if(Object(xe.a)(i,n.url)&&n.enabled[t]){const r=((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"url"!==t&&"autopopup_time"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(ye.a)(a,t,n)}},{}))(n,t,s);return r.autopopupTime=n.autopopup_time,e(Object(I.cb)(r))}return!1})},[n,t,s,o,a,e,r])}const Ee=function(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,a)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch(i=>{setTimeout(()=>{t<=1?a(i):Ee(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,a)},n)})})};var Oe=Ee,ke=n(78),_e=n(110),Ce=n(9);var je=n(2),Te=n(103);const Se=k.c.div.withConfig({displayName:"styles__ChatButtonContainer",componentId:"sc-18sln6s-0"})(["position:fixed;bottom:calc(",");right:calc(",");z-index:",";",";"],e=>{var t,n;return`${null!==(t=null===(n=e.position)||void 0===n?void 0:n.bottom)&&void 0!==t?t:J.c.bottom} + 10px`},e=>{var t,n;return`${null!==(t=null===(n=e.position)||void 0===n?void 0:n.right)&&void 0!==t?t:J.c.right} + 10px`},e=>e.zIndex,e=>e.inPlatform&&"display:flex; align-items: center"),Ie=k.c.div.withConfig({displayName:"styles__AlertContainer",componentId:"sc-18sln6s-1"})(["height:15px;width:15px;z-index:50;right:0;top:-10px;position:absolute;border-radius:100px;background:",";background-color:",";",";"],z.a.errorColor,z.a.errorColor,D.g),Ae=Object(i.lazy)(()=>Oe(()=>Promise.resolve().then(n.bind(null,245)))),Ne=Object(i.lazy)(()=>Oe(()=>Promise.resolve().then(n.bind(null,246)))),Pe=Object(i.lazy)(()=>Oe(()=>Promise.resolve().then(n.bind(null,247)))),Me=Object(i.lazy)(()=>Oe(()=>Promise.resolve().then(n.bind(null,249))));var Le=function(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:r,onNudgeFormSubmit:o,chatSettings:a}=e;const c=Object(O.e)(),l=Object(O.c)(),{active:u,inPlatform:d}=Object(O.d)(A.e),{PAT_HOST:f,PUSHER_KEY:p,VERSION:h}=Object(O.d)(A.g),{show:m}=Object(O.d)(A.q),{feedbackFormOpen:g}=Object(O.d)(A.h),{show:b,nudgeLayout:v}=Object(O.d)(A.o),{bubbleNotification:y,position:x,fullscreenMode:w}=Object(O.d)(A.d),{showBubbleNotification:E}=Object(O.d)(A.b),k=Object(L.a)(),_=u?"Close chat":"Start chat",C=Object(i.useCallback)(()=>l(u?Object(I.h)():Object(I.F)()),[u,l]),T=Object(N.a)(a,"zIndex",15);(u&&E||E&&!k)&&l(Object(I.t)()),u&&m&&l(Object(I.v)()),Object(i.useEffect)(()=>{const e=`${f}/chatbubble/${J.j}/auth/pusher?version=${h}`;Object(j.delayConfiguration)(c,p,{authEndpoint:e,cluster:"eu",encrypted:!0,disableStats:!0,pongTimeout:7500})},[f,p,h,c]),function(){const e=Object(O.c)(),[t,n]=Object(i.useState)("/"),[r,o]=Object(i.useState)(!1),{shownNudges:a}=Object(O.d)(A.e),s=Object(Te.a)();Object(i.useEffect)(()=>{n(window.location.href),null!=a&&a.length&&!r&&Array.from(new Set(a).values()).map(e=>s.find(t=>t.slug===e)).filter(e=>e).filter(e=>e.analytics_completion_page_path).filter(e=>Object(xe.a)(t,e.analytics_completion_page_path)).forEach(t=>{o(!0),e(Object(I.ob)({slug:t.slug,eventType:je.W})),e({type:je.x,slug:t.slug})})},[e,t,s,a,r])}(),(()=>{const e=Object(O.c)(),{languages:t}=Object(S.a)(A.d),{currentLanguage:n}=Object(O.d)(A.e);Object(i.useEffect)(()=>{if(n)return;const r=(()=>{var e,n;if(1===t.length)return t[0].code;let r;const o=t.find(e=>{var t;let{code:n}=e;const o=null===(t=document.documentElement.lang)||void 0===t?void 0:t.toLowerCase(),a=n.toLowerCase();return r=ve(n,o),a===o});if(o)return o.code;const a=t.find(e=>{var t;let{code:n}=e;const o=null===(t=window.navigator.userLanguage||window.navigator.language)||void 0===t?void 0:t.toLowerCase(),a=n.toLowerCase();return r||(r=ve(n,o)),a===o});if(a)return a.code;const i=null===(e=window.navigator.languages)||void 0===e?void 0:e.find(e=>t.some(t=>{let{code:n}=t;const o=null==e?void 0:e.toLowerCase(),a=n.toLowerCase();return r||(r=ve(n,o)),o===a}));return i||(r||((null===(n=t[0])||void 0===n?void 0:n.code)||""))})();r&&e(Object(I.R)(r,{skipRestart:!0}))},[n,t,e])})(),we(),function(e){const t=Object(O.c)(),{token:n,pusherConnected:r,connectTriggerConfig:o}=Object(O.d)(A.f),{takenOver:a}=Object(O.d)(A.a),{persistStateLifespan:s}=Object(O.d)(A.d),{botKey:c,active:l,disabledTransports:u,chatHasStarted:d,wasActiveOnLoad:f,inPlatform:p,userIsIdle:h,error:m}=Object(O.d)(A.e),{chatMessages:g,messageSentTime:b}=Object(O.d)(A.n),{labels:v}=Object(O.d)(A.l),[y,x]=Object(i.useState)(!1),[w,E]=Object(i.useState)(!1),k=localStorage.getItem(`kindly-chat-${c}`);Object(i.useEffect)(()=>(window.addEventListener("online",()=>t(Object(I.A)())),window.addEventListener("offline",()=>t(Object(I.B)())),()=>{window.removeEventListener("online",()=>t(Object(I.A)())),window.removeEventListener("offline",()=>t(Object(I.B)()))}),[t]),Object(i.useEffect)(()=>{const n=e.welcomePage.type!==J.s.NONE;!d&&f&&!n&&t(Object(I.eb)())}),Object(i.useEffect)(()=>{l&&d&&!r&&(x(!0),403!==m||n||t(Object(I.m)()))},[l,d,t,m,r,n]),Object(i.useEffect)(()=>{o&&t(Object(I.m)(o))},[o,t]),Object(i.useEffect)(()=>{r&&o&&t(Object(I.o)())},[o,t,r]),Object(i.useEffect)(()=>{const e=l&&d;if(r||y||h||o)return;const a=Object(_e.a)({messageSentTime:b,persistStateLifespan:s});e||n?e&&!n?(x(!0),t(Object(I.m)({shouldGreet:d}))):a&&(x(!0),Object(I.n)(n,u)):!e&&v.length>0&&(x(!0),t(Object(I.m)({shouldGreet:!1})))},[y,l,o,r,n,u,t,g.length,d,h,m,b,s,k,c,v]),Object(i.useEffect)(()=>{y&&r&&x(!1)},[y,r]),Object(i.useEffect)(()=>{if(r&&h&&!a){Object(Ce.g)(n);try{Object(j.disconnect)()}catch{}}},[h,r,a,n]),Object(i.useEffect)(()=>(l&&!p&&e.chatbubble.realtime_analytics&&t(Object(ke.a)(e.id)),ke.b),[l,t,p,e]),Object(i.useEffect)(()=>{n&&l&&!w&&(t(Object(I.y)()),E(!0))},[l,t,w,n])}(a);const P=(!u||w)&&g,M=!u&&m&&!t&&!g;return s.a.createElement(s.a.Fragment,null,u&&s.a.createElement(Ae,{settings:a}),M&&s.a.createElement(X,{settings:a}),P&&s.a.createElement(Pe,null),!g&&b&&v&&s.a.createElement(Ne,{hidden:t,layout:v,onDismiss:n,onNewsletterSubmit:o,onProductClick:r}),s.a.createElement(Se,{inPlatform:d,position:x,zIndex:T,"data-story":"ChatButtonContainer",id:"ChatButtonContainer"},d&&s.a.createElement(Me,{active:u}),!u&&y&&E&&s.a.createElement(Ie,null),!t&&s.a.createElement(be,{title:_,active:u,onClick:C})))},Re=e=>{if(!e)return!0;return Date.now()-Number(e)>J.m},De=n(72);var Be=n(60),Fe=n(169),ze=n.n(Fe);function Ue(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var He=Ue();He.withExtraArgument=Ue;var $e=He,Ve=n(170),qe=n.n(Ve),Ge=(e,t)=>qe()({},e,t);var We=(e,t,n)=>Ge(e,((e,t)=>e.split(".").reverse().reduce((e,n,r)=>0===r?{[n]:t}:{[n]:e},{}))(t,n));var Ye=e=>(t,n)=>{const r=Ge(t,n);return o=r,e.reduce((e,t)=>{let[n,r]=t;return We(e,n,r)},o);var o},Ke=n(59),Xe=n(54);const Je={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,languages:[],startOverText:"Start over",placeholder:"",typingIndicator:!1,typingDuration:"",isTyping:!1,isTypingTimeoutId:null,feedbackForm:null,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,welcomePage:null,welcomePageType:J.s.COLOR,pushGreetingsEnabled:!1,pushGreetings:[],tabNotification:!0,bubbleNotification:!0,heartbeatEnabled:!1};var Qe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Je,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.sb:return localStorage.removeItem("kindly-chat-has-shown-feedback-form"),{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case je.i:{var n;const r=null===(n=null==t?void 0:t.isTyping)||void 0===n||n;return{...e,isTyping:r}}case je.I:return{...e,isTyping:t.isTyping,isTypingTimeoutId:t.isTypingTimeoutId,hasInteraction:!0,splitLabelTimestamp:Date.now()};case je.hb:return{...e,splitLabelTimestamp:Date.now(),splitTestLabel:t.splitTestLabel};case je.Cb:return{...e,splitLabelTimestamp:Date.now()};case je.m:return{...e,splitTestLabel:null,hasInteraction:null,splitLabelTimestamp:null};default:return e}};const Ze={botKey:null,inPlatform:!1,chatHasStarted:!1,active:!1,hideInputField:!1,previouslyPoppedUp:!1,currentlyPoppedUp:!1,optionsScreenOpen:!1,currentLanguage:null,startedAt:null,userIsIdle:!1,allGreetingsHideInput:!1,contactDetailsButton:null,uploadButtonWasClicked:null,hasRequestedGreeting:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},error:null};var et=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ze,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.Z:return{...e,error:t.error};case je.eb:return{...e,currentLanguage:t.code};case je.sb:return{...e,error:null,botKey:t.botKey||e.botKey,optionsScreenOpen:!1,hideInputField:!1,userIsIdle:!1};case je.Y:return{...e,chatHasStarted:t.chatHasStarted,userIsIdle:!t.chatHasStarted&&e.userIsIdle};case je.I:{const n=e.hideInputField&&"USER"===t.data.sender;return{...e,chatHasStarted:!0,hideInputField:!!n||t.data.chatbubble_hide_input_field}}case je.K:return{...e,active:!0,userIsIdle:!1};case je.n:return{...e,active:!1,optionsScreenOpen:!1};case je.Q:return{...e,previouslyPoppedUp:!0,currentlyPoppedUp:!0};case je.N:return{...e,optionsScreenOpen:!0};case je.q:return{...e,optionsScreenOpen:!1};case je.H:return{...e,chatId:t.chatId,allGreetingsHideInput:t.allGreetingsHideInput};case je.yb:return e;case je.bb:return{...e,hasRequestedGreeting:t.hasRequestedGreeting};case je.ib:return{...e,startedAt:t.startedAt};case je.jb:return{...e,userIsIdle:t.userIsIdle};case je.lb:return{...e,contactDetailsButton:t.button};case je.D:return{...e,contactDetailsButton:null};case je.t:return{...e,shownNudges:(e.shownNudges||[]).concat(t.slug)};case je.f:return{...e,attachments:{...e.attachments,buttonClicked:+new Date,exchangeId:t.button.value}};case je.X:return{...e,attachments:{...e.attachments,files:t.files}};case je.k:return{...e,attachments:{exchangeId:null,buttonClicked:null,files:[]}};case je.g:return{...e,attachments:{...e.attachments,buttonClicked:null}};case je.x:return{...e,shownNudges:(e.shownNudges||[]).filter(e=>e!==t.slug)};default:return e}};const tt={PAT_HOST:"https://bot.kindly.ai",PUSHER_KEY:"0d15baa2a7308d71e79d",STATUS_PAGE:"https://status.kindly.ai",KINDLY_CHAT_URL:"http://localhost:8081",SAGE_WS_HOST:"wss://sage.kindly.ai",SAGE_HOST:"https://sage.kindly.ai",SETTINGS_HOST:"https://chat.kindlycdn.com",VERSION:"dev"};var nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.O:return{...e,...t.env};default:return e}};const rt=(e,t)=>({...Je,id:e.id,name:e.name,avatar:e.avatar,botName:e.name,botAvatar:e.avatar,languages:e.languages,includeDisabledLanguages:e.includeDisabledLanguages,startOverText:e.start_over_text,welcomePage:e.welcomePage,welcomePageType:t?J.s.NONE:e.welcomePage.type,maintenanceAlert:e.maintenanceAlert,maintenanceAlertEnabled:!t&&e.maintenanceAlert.alert_enabled,pushGreetingsEnabled:!t&&e.use_push_greetings,pushGreetings:e.push_greetings,tabNotification:e.tab_notification,bubbleNotification:e.bubble_notification,typingIndicator:e.typing_indicator,typingDuration:e.typing_duration,disabledTransports:e.disabled_transports,feedbackFormType:t?J.r.NONE:e.feedbackForm.type,feedbackForm:e.feedbackForm,text:e.text,bubbleSize:e.bubble_size,isTextDirectionRtl:e.text_right_to_left,realtimeAnalytics:e.chatbubble.realtime_analytics,inputLimitEnabled:e.chatbubble.input_limit_enabled,inputLimit:e.chatbubble.input_limit||140,hideHeader:e.hideHeader||!1,bubbleAvatar:e.chatbubble.icon_avatar_image||e.bubbleAvatar||null,position:{...J.c,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||J.d,persistStateLifespan:t?-1:e.chatbubble.persist_state_lifespan_seconds,showTakeoverQueue:e.show_takeover_queue,bubbleOutline:e.use_bubble_outline,seasonalAppearance:e.seasonal_appearance,noFeedbackAfterHandover:e.no_feedback_after_handover,nudges:e.nudges||[],handoverMode:e.handover_mode,heartbeatEnabled:Boolean(e.chatbubble_heartbeat_enabled),heartbeatTTL:e.chatbubble_heartbeat_ttl_s,splitTestEnabled:e.split_test_enabled,conversionPageUrl:e.conversion_page_url});var ot=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en},at=n(43);const it=Object.freeze({WARNING:"WARNING",CRITICAL:"CRITICAL"}),st=Object.freeze({OFFLINE:{en:"You seem to be offline, please check your internet connection",nb:"Du ser ut til å være frakoblet internett, vennligst sjekk tilgangen din"},WEBSOCKET_DOWN:{en:"There seems to be an issue with the connection, attempting to reconnect...",nb:"Det ser ut til å være et problem med tilkoblingen. Prøver å koble opp igjen..."}});var ct=e=>t=>n=>{switch(n.type){case je.w:return((e,t,n,r)=>{const{announcement:o,bot:a,chatbubble:i}=t;if(o.show)return n(r);const s={text:ot(0,i,e),alertType:it.WARNING};return n({type:je.d,payload:s}),n(r)})(st.OFFLINE,e.getState(),t,n);case je.r:{const{announcement:r,connection:o}=e.getState();return r.show&&t({type:je.c}),o.connected||t(Object(at.c)()),t(n)}default:return t(n)}};var lt=e=>t=>n=>{if(n.type!==je.I)return t(n);const{chatbubble:{active:r,currentLanguage:o}}=e.getState();if("greeting"===n.data.exchange_type||n.data.triggered_chat_start){const e=n.data.chat_language_code;o!==e&&t({type:je.eb,code:e})}if(("boolean"==typeof n.displayTypingIndicator?n.displayTypingIndicator:!n.data.from_bot)?Object(I.Q)()(t,e.getState):Object(I.rb)()(t,e.getState),!n.data.from_bot&&n.data.was_anonymized)return t({type:je.e,data:n.data});if(!n.data.from_bot)return t(n);return!r&&"AGENT"!==n.data.sender&&"SYSTEM"!==n.data.sender&&"greeting"!==n.data.exchange_type&&t({type:je.K}),t(n)},ut=e=>t=>n=>{switch(n.type){case je.I:{const{bot:{typingDuration:r,typingIndicator:o},agent:{takenOver:a},chatbubble:{chatHasStarted:i}}=e.getState(),{isContactDetails:s,sender:c,from_bot:l,created:u}=n.data;if(!o||a||!i||c===J.l.SYSTEM||s)return t({...n,displayTypingIndicator:!1});if(Object(I.Q)()(t,e.getState),!l)return t(n);const d=r-((new Date).getTime()-Object(Ke.a)(u).getTime());return setTimeout(()=>{t(n)},d>0?d:0)}default:return t(n)}};var dt=e=>t=>n=>{const{bot:{typingDuration:r,typingIndicator:o}}=e.getState(),a=o?Math.max(5e3,r):5e3;return n.type===je.H&&setTimeout(()=>t(Object(I.I)()),a),n.type===je.I&&n.data.from_bot?(t(Object(I.q)()),t(Object(I.c)()),t(n)):t(n)};const ft={names:[],avatars:[],isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedTakeover:!1,hasHadHandover:!1};var pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ft,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.ub:{const n=t.data.taken_over&&!e.takenOver,r=!t.data.taken_over&&e.takenOver;return n?{...e,requestedTakeover:!1,takenOver:!0,isTyping:!1,hasHadHandover:!0}:r?{...e,requestedTakeover:!1,takenOver:!1,isTyping:!1}:e}case je.I:return{...e,isTyping:!1};case je.a:return{...e,isTyping:!0};case je.b:return{...e,isTyping:!1};case je.Db:return{...e,userIsTyping:!0};case je.Eb:return{...e,userIsTyping:!1};case je.wb:return{...e,requestedTakeover:t.requestedTakeover,takeoverClosed:t.closed||!1};case je.vb:return{...e,requestedTakeover:!1};case je.T:return{...e,hasHadHandover:!1};default:return e}};const ht={showTabNotification:!1,showBubbleNotification:!1};var mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ht,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.I:if(!t.data.from_bot||"SYSTEM"===t.data.sender)return e;return"visible"===document.visibilityState?{showBubbleNotification:!0}:{showTabNotification:!0};case je.qb:return{showTabNotification:!0};case je.kb:return{showBubbleNotification:!0};case je.z:return{...ht};default:return e}};const gt={show:!1,text:null,url:null,type:null};var bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.d:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case je.c:return gt;default:return e}};const vt={isAuthenticated:!1,token:null,avatarUrl:null,fullName:null,isRefreshing:!1,getAuthToken:null};var yt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.h:return{...e,isAuthenticated:!0,token:t.token,avatarUrl:t.avatarUrl,fullName:t.fullName};case je.E:return{...e,avatarUrl:t.avatarUrl,fullName:t.fullName};case je.zb:return{...e,...vt};case je.tb:return{...e,isRefreshing:!0};case je.C:return{...e,isRefreshing:!1};default:return e}};const xt={token:null,connected:!0,pusherConnected:!1,connectTriggerConfig:void 0,heartbeatId:void 0};var wt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.J:return{...e,token:t.token};case je.sb:case je.V:return{...e,token:null};case je.r:return{...e,connected:!0};case je.w:return{...e,connected:!1};case je.R:return{...e,pusherConnected:!0};case je.S:return{...e,pusherConnected:!1};case je.s:return{...e,connectTriggerConfig:t.triggerConfig};case je.cb:return{...e,heartbeatId:t.heartbeatId};default:return e}};const Et={inspectorOpen:!1,currentMessageId:null};var Ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Et,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.db:return{...e,currentMessageId:t.chatMessageId};case je.xb:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}};const kt={token:null,feedbackFormOpen:!1};var _t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.L:return{...e,feedbackFormOpen:!0,token:t.token};case je.o:return kt;default:return e}},Ct=n(79);const jt={context:{},labels:[]};var Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ct.a:return{...e,context:{...e.context,...t.context}};case Ct.b:return{...e,labels:[...new Set([...e.labels,t.label])]};case je.sb:case je.V:return{...e,labels:[]};default:return e}};const St={show:!1,textContent:null,linkText:null,linkLocation:null,dismissed:!1};var It=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:St,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.nb:return{show:!0,textContent:t.textContent,linkText:t.linkText,linkLocation:t.linkLocation};case je.y:return{...St,dismissed:!0};default:return e}},At=n(98),Nt=n(104),Pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[Object(Nt.a)(n)]:r}},{})},Mt=e=>Boolean(e.find(e=>{let{exchange_type:t}=e;return"greeting"===t})),Lt=n(100),Rt=n(97);const Dt={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null},Bt=e=>{let{id:t}=e;return t},Ft=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},zt=(e,t,n)=>e.map(e=>t(e)?n(e):e);var Ut=function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dt,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case je.I:{const{chatMessages:e}=o,{data:t}=a;return"greeting"===Object(N.a)(t,"exchange_type")&&Mt(e)?o:Object(Lt.a)(e)(t)?We(o,"chatMessages",[...e,t]):o}case je.sb:return Dt;case je.e:{const{chatbubble_temporary_id:e,id:t}=a.data,n=n=>{let{id:r}=n;return Object(l.a)(r,[e,t])},r=e=>({...e,message:a.data.message});return{...o,chatMessages:zt(o.chatMessages,n,r)}}case je.gb:return{...o,messageSentTime:a.messageSentTime};case je.Bb:{var i;const{created:e,id:t,temporaryId:n}=a,{chatMessages:r}=o,s=null!==(i=null==a?void 0:a.status)&&void 0!==i?i:null,c=r.findIndex(e=>{let{id:t}=e;return t===n});if(c<0)return o;const l=r[c],u={...l,created:e||l.created,id:t||l.id,status:s},d=r.map((e,t)=>t!==c?e:u);return{...o,chatMessages:d}}case je.P:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,pattern_context_match:n});return{...o,chatMessages:zt(o.chatMessages,r,i)}}case je.rb:{const{chatMessageId:e,chatMessageTempId:t,correctedMessage:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,corrected_message:n});return{...o,chatMessages:zt(o.chatMessages,r,i)}}case je.j:var s;return Object(At.a)(o.buttonClicks)(a.buttonClick)?{...o,buttonClicks:[...null!==(s=o.buttonClicks)&&void 0!==s?s:[],a.buttonClick]}:o;case je.fb:return{...o,lastMessageSeen:Object(Rt.a)(a,["id","index"])};case je.G:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=a.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(Pt))||[]]};case je.Ab:{const e=Pt(a.attachment),t=Ft(e),n=t=>({...t,...e});return{...o,attachments:zt(o.attachments,t,n)}}case je.F:{var c;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=a.data,r=e.map(Pt),i=(null!==(c=o.attachments)&&void 0!==c?c:[]).map(e=>{const t=r.find(Ft(e));return t?{...e,...t}:e});let s=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},a=e=>({...e,id:n,attachment_ids:r.map(Bt)});s=zt(o.chatMessages,e,a)}return{...o,attachments:i,chatMessages:s}}case je.ab:return null!==(r=a.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[a.formData.formKey]:a.formData}}:o;default:return o}};const Ht={chatDeleted:!1};var $t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.v:return{...e,chatDeleted:!0};case je.Y:return{...e,chatDeleted:!t.chatHasStarted&&e.chatDeleted};case je.sb:return{...e,chatDeleted:!1};default:return e}},Vt=n(71);const qt={show:!1,text:null,agent:null,dismissed:!1,type:Vt.a.MESSAGE,dismissedMessages:[]};var Gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.ub:return t.data.taken_over&&!e.taken_over?{...e,show:!0,agent:{name:t.data.name,avatar:t.data.avatar},text:void 0,type:Vt.a.TAKEOVER}:e;case je.I:return Object(L.a)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:Vt.a.MESSAGE};case je.pb:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case je.B:return{...e,show:!1,dismissed:!0};case je.U:return qt;default:return e}},Wt=n(24);const Yt={takeoverPollIntervalId:null,takeoverRequestPollIntervalId:null,replyTimeoutId:null,replyTimeoutAttempts:0};var Kt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Wt.e:return{...e,takeoverPollIntervalId:t.takeoverPollIntervalId};case Wt.f:return{...e,takeoverRequestPollIntervalId:t.takeoverRequestPollIntervalId};case Wt.d:return{...e,replyTimeoutId:t.replyTimeoutId,replyTimeoutAttempts:t.replyTimeoutAttempts};case Wt.b:return{...e,takeoverPollIntervalId:null};case Wt.c:return{...e,takeoverRequestPollIntervalId:null};case Wt.a:return{...e,replyTimeoutId:null,replyTimeoutAttempts:0};default:return e}};const Xt={open:!1,imageUrl:""};var Jt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.M:return{...e,open:!0,imageUrl:t.imageUrl};case je.p:return{...e,open:!1,imageUrl:""};default:return e}};const Qt={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:J.i.TEMPLATE,hasInteraction:!1};var Zt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.A:return{...e,show:!1,nudgeLayout:{},hasInteraction:!0};case je.ob:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:J.i.TEMPLATE,trackEvent:t.trackEvent,hasInteraction:!0};case je.mb:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:J.i.CUSTOM,trackEvent:t.trackEvent,hasInteraction:!0};case je.l:return{...e,hasInteraction:!1};default:return e}};const en=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({trace:!0,traceLimit:25})||Be.d,tn=Object(L.a)(),nn=function(){let{url:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e||"").startsWith("data:")?t:{...t,url:e}},rn=e=>{if(Object(N.a)(e,"bot.includeDisabledLanguages",!1))return e;const t=Object(N.a)(e,"chatbubble.currentLanguage"),n=Object(N.a)(e,"bot.languages",[]).find(e=>{let{code:n}=e;return n===t});return Object(N.a)(n,"active",!1)?e:Ge(e,{chatbubble:{currentLanguage:null}})};var on=e=>{let{botKey:t,settings:n,persist:o=!0,initialStateModifier:a}=e;const{language:i,inPlatform:s}=n,c=[dt,ct,ut,lt,$e];const l=`kindly-chat-${t}`,u=(e=>e?()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},nudge:{hasInteraction:e.nudge.hasInteraction},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:Ze.currentlyPoppedUp,allGreetingsHideInput:Ze.allGreetingsHideInput,contactDetailsButton:Ze.contactDetailsButton,attachments:Ze.attachments,shownNudges:e.chatbubble.shownNudges},connection:{token:e.connection.token,connected:!0,pusherConnected:!1},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{names:e.agent.names,avatars:e.agent.avatars,requestedTakeover:e.agent.requestedTakeover,takenOver:e.agent.takenOver},messages:{forms:e.messages.forms,chatMessages:e.messages.chatMessages,buttonClicks:e.messages.buttonClicks,attachments:(e.messages.attachments||[]).map(nn),messageSentTime:e.messages.messageSentTime,lastMessageSeen:e.messages.lastMessageSeen},local:{labels:e.local.labels}}):(localStorage.removeItem("kindly-chat-has-shown-feedback-form"),()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},nudge:{hasInteraction:e.nudge.hasInteraction},chatbubble:{active:!1,previouslyPoppedUp:e.chatbubble.previouslyPoppedUp,shownNudges:e.chatbubble.shownNudges},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{names:e.agent.names,avatars:e.agent.avatars}})))((e=>e.inPlatform||0!==e.chatbubble.persist_state_lifespan_seconds)(n)),d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return t.reverse().slice(1).reduce((e,t)=>t(e),t[0](...arguments))}}(rn,(e=>t=>{var n,r,o;const a=(null==t||null===(n=t.messages)||void 0===n?void 0:n.chatMessages.filter(e=>e.from_bot).sort((e,t)=>Object(Ke.a)(e.created).getTime()-Object(Ke.a)(t.created).getTime()).slice(1))||[],i=null!==(r=null==a||null===(o=a[0])||void 0===o?void 0:o.chat_language_code)&&void 0!==r?r:null;return Ge(t,{chatbubble:{currentLanguage:i||e}})})(i),(e=>t=>{const n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!tn)||Boolean(e.chatbubble.keep_open_mobile&&tn));return Ge(t,{chatbubble:{active:n,wasActiveOnLoad:n}})})(n),(e=>{let{inPlatform:t,botKey:n}=e;const r=[["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter(e=>{let[,t]=e;return void 0!==t});return Ye(r)})({inPlatform:s,botKey:t})),f=en(Object(Be.a)(...c),o?ze()(null,{key:l,slicer:u,merge:d}):e=>e);let p=(e=>{let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:a,environment:i,getAuthToken:s}}=e;return{bot:rt(n,o),chatbubble:{...Ze,botKey:t,inPlatform:o,admin:a,renderedBy:n.renderedBy||"REACT"},local:{context:r,labels:[]},environment:{...tt,VERSION:Xe.a,...i},auth:{getAuthToken:s}}})({botKey:t,settings:n});return a&&(p=Ge(p,a)),Object(Be.e)(Object(Be.c)(r),p,f)},an=()=>{const[e,t]=Object(i.useState)(!1),{conversionPageUrl:n}=Object(O.d)(A.d),r=((e,t)=>{let{enable:n=!0}=t;const[r,o]=Object(i.useState)(null);if(!n)return null;const a=setInterval(()=>{const t=document.querySelector(e);t&&(o(t),clearInterval(a))},500);return r})("#klarna-checkout-iframe",{enable:null==n?void 0:n.match(/klarna/gi)}),o=Object(i.useRef)(null),a=Object(i.useCallback)(e=>{var n;const r=e.getAttribute("src")||"",o=(e=>{try{return JSON.parse(e)}catch(e){return null}})((null===(n=decodeURIComponent(r).match(/\{"(.*)/gim))||void 0===n?void 0:n[0])||"");o&&"object"==typeof o&&["created","checkout_complete"].indexOf(o.ORDER_STATUS)>-1&&t(!0)},[]);return Object(i.useEffect)(()=>{r&&!o.current&&(a(r),o.current=setInterval(()=>a(r),500))},[r,o,a]),Object(i.useEffect)(()=>{e&&clearInterval(o.current)},[e]),e};var sn=n(34);var cn=e=>{var t,n,r,o,a,i,s,c,l,u,d,f,p,h,m,g,b,v,y,x,w,E,O,k,_,C,j,T,S;return{customFont:null!==(t=null==e?void 0:e.customFont)&&void 0!==t?t:null,chatLogElements:null!==(n=null==e||null===(r=e.style)||void 0===r?void 0:r.color_chat_log_elements)&&void 0!==n?n:"#333333",background:null!==(o=null==e||null===(a=e.style)||void 0===a?void 0:a.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(i=null==e||null===(s=e.style)||void 0===s?void 0:s.color_button_outline)&&void 0!==i?i:"#0069ff",buttonBackground:null!==(c=null==e||null===(l=e.style)||void 0===l?void 0:l.color_button_background)&&void 0!==c?c:"#0069ff",bubbleButtonBackground:null!==(u=null==e||null===(d=e.style)||void 0===d?void 0:d.color_bubble_button_background)&&void 0!==u?u:"#0069ff",buttonText:null!==(f=null==e||null===(p=e.style)||void 0===p?void 0:p.color_button_text)&&void 0!==f?f:"#ffffff",headerBackground:null!==(h=null==e||null===(m=e.style)||void 0===m?void 0:m.color_header_background)&&void 0!==h?h:"#0069ff",headerText:null!==(g=null==e||null===(b=e.style)||void 0===b?void 0:b.color_header_text)&&void 0!==g?g:"#ffffff",inputBackground:null!==(v=null==e||null===(y=e.style)||void 0===y?void 0:y.color_input_background)&&void 0!==v?v:"#ffffff",inputText:null!==(x=null==e||null===(w=e.style)||void 0===w?void 0:w.color_input_text)&&void 0!==x?x:"#333333",userMessageBackground:null!==(E=null==e||null===(O=e.style)||void 0===O?void 0:O.color_user_message_background)&&void 0!==E?E:"#f5f5f5",userMessageText:null!==(k=null==e||null===(_=e.style)||void 0===_?void 0:_.color_user_message_text_color)&&void 0!==k?k:"#2c2c2c",botMessageBackground:null!==(C=null==e||null===(j=e.style)||void 0===j?void 0:j.color_bot_message_background)&&void 0!==C?C:"#f5f5f5",botMessageText:null!==(T=null==e||null===(S=e.style)||void 0===S?void 0:S.color_bot_message_text_color)&&void 0!==T?T:"#2c2c2c"}};function ln(e){let{settings:t}=e;const n=Object(O.c)(),{inPlatform:r}=Object(O.d)(A.e),{canShow:o}=function(){const{splitTestEnabled:e,splitTestLabel:t,splitLabelTimestamp:n}=Object(O.d)(A.d),r=Object(O.c)(),o=Object(i.useCallback)(()=>{r(Object(I.sb)())},[r]),a=Object(De.a)(o,2500);return Object(i.useEffect)(()=>{function t(){a()}return e&&window.addEventListener("mousemove",t),()=>e?window.removeEventListener("mousemove",t):void 0},[e]),Object(i.useEffect)(()=>{n&&Re(n)&&r(Object(I.f)())},[n]),Object(i.useEffect)(()=>{let n=t||J.o.NO_SPLIT_LABEL;e&&!t&&(n=Math.random()>.5?J.o.SPLIT_A:J.o.SPLIT_B),t||r(Object(I.X)(n))},[e,t]),{canShow:e&&["A","X"].indexOf(t)>-1||!e,splitTestLabel:t}}();return(()=>{const e=Object(O.c)(),[t,n]=Object(i.useState)("/"),{conversionPageUrl:r,splitTestLabel:o,hasInteraction:a,splitTestEnabled:s}=Object(O.d)(A.d),c=an(),l=Object(i.useCallback)(()=>{if(!Re(localStorage.getItem("kindly-last-conversion-timestamp")))return;const t=s&&o,n=!a;localStorage.setItem("kindly-last-conversion-timestamp",Number(new Date)),e(Object(I.nb)(t,n)),e(Object(I.f)())},[e,o,a,s]);Object(i.useEffect)(()=>{c&&l()},[l,c]),Object(i.useEffect)(()=>{n(window.location.href),null!=r&&r.trim()&&Object(xe.a)(t,r)&&l()},[l,t,r])})(),Object(i.useEffect)(()=>{o&&t.chatbubble.autopopup&&!Object(L.a)()&&!r&&setTimeout(()=>n(Object(I.b)()),t.chatbubble.autopopup_time)},[n,r,t,o]),o?s.a.createElement(Le,{chatSettings:t,hidden:t.bubbleHidden,onNudgeDismiss:t.onNudgeDismiss,onNudgeFormSubmit:t.onNudgeFormSubmit,onNudgeProductClick:t.onNudgeProductClick}):null}let un=!1;const dn=Object(i.forwardRef)((e,t)=>{let{botKey:r,settings:o}=e;const a=on({botKey:r,settings:o});return Object(i.useImperativeHandle)(t,()=>({openChat(){a.dispatch(Object(I.F)())},closeChat(){a.dispatch(Object(I.h)())},triggerDialogue(e,t){a.dispatch(Object(I.qb)(e,t))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;a.dispatch(Object(I.bb)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;a.dispatch(Object(I.Z)({content:t,slug:n,onRendered:r,trackEvent:o}))},closeNudge(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a.dispatch(Object(I.u)(e,t,n))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(a.dispatch(Object(sn.e)({slug:e,eventType:je.W})),a.dispatch({type:je.x,slug:e}),sessionStorage.setItem("kindly-nudge-completion",!0))},closeFeedback(){a.dispatch(Object(I.i)())},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.dispatch(Object(sn.f)(e))},identifyUser(e){a.dispatch(Object(I.z)(e))},setNewContext(e){a.dispatch(Object(I.V)(e))},setNewLabel(e){a.dispatch(Object(I.W)(e))},cancelHandover(){a.dispatch(Object(I.d)())}})),Object(i.useEffect)(()=>{Object(_.b)(o)},[o]),Object(i.useEffect)(()=>{const{persistStateLifespan:e,heartbeatEnabled:t}=a.getState().bot;if(t)return;if(-1===e||e>0)return;let n=!1;const o=()=>{n||(n=!0,a.dispatch(Object(I.tb)(r)))};window.onbeforeunload=o,window.onunload=o},[r,o,a]),Object(i.useEffect)(()=>{!un&&o.track_utm&&(un=!0,Promise.resolve().then(n.bind(null,244)).then(e=>{let{default:t}=e;const n=t();n&&a.dispatch(Object(I.V)({...n}))}))},[o,a]),window.Cypress&&(window.store=a),s.a.createElement(O.a,{store:a},s.a.createElement(k.a,{theme:cn(o)},s.a.createElement(C.a,{errorPoint:"inside ChatContainer",displayError:!1},o.user_idle_timeout_seconds>0?s.a.createElement(E,{onIdle:()=>a.dispatch(Object(I.E)()),onActive:()=>a.dispatch(Object(I.D)(o.id)),timeout:1e3*o.user_idle_timeout_seconds},s.a.createElement(ln,{settings:o})):s.a.createElement(ln,{settings:o}))))});dn.displayName="ChatContainer";var fn=dn,pn=n(58),hn=n.n(pn),mn=n(53);var gn=(e,t)=>{const[n,r]=Object(i.useState)(t||{}),o=Object(i.useCallback)(async()=>{try{var n;const o=await async function(e,t){const n=Object(mn.b)();return Oe(()=>hn.a.get(`${e}/settings/${t}.json`,{params:{version:Xe.a,[mn.a]:n}}),{retries:3,interval:2e3,intervalBackoffMultiplier:1})}((null===(n=t.environment)||void 0===n?void 0:n.SETTINGS_HOST)||"https://chat.kindlycdn.com",e),{welcome_page:a,feedback_form:i,maintenance_alert:s,notifications:c,settings:l,...u}=o.data,d={...u,...l,...c,feedbackForm:i,welcomePage:a,maintenanceAlert:s};r(e=>Ge(Ge(d,e),t))}catch(e){var o,a;const t=null!==(o=e.response)&&void 0!==o&&null!==(a=o.data)&&void 0!==a&&a.error?e.response.data.error:e;console.error("Kindly chat failed to initialize.",t)}},[e,t]);return Object(i.useEffect)(()=>{o()},[o]),n};var bn=function(e){var t;let{botKey:n,setKindlyChatRef:r,options:o={}}=e;const a=gn(n,o);if(!a.id)return null;const i=[((null===(t=o.environment)||void 0===t?void 0:t.KINDLY_CHAT_URL)||"http://localhost:8081").match("^https?://(([^:/?#]*)(?::([0-9]+))?)")[2],"*.kindly.ai","demokind.ly","*.demokind.ly",...a.chatbubble.domains];return a.chatbubble.inPlatform||u(window.location.hostname,i)?s.a.createElement(fn,{ref:r,botKey:n,settings:a}):(console.error(`Domain ${window.location.hostname} is not allowed to load Kindly Chat. Please check your bot settings if you think this is a mistake.`),null)};t.default=function(e){let{botKey:t,setKindlyChatRef:n,options:r}=e;return s.a.createElement(i.Suspense,{fallback:""},s.a.createElement(bn,{botKey:t,setKindlyChatRef:n,options:r}))}},function(e,t,n){"use strict";var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const a=new Uint8Array(16);function i(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(a)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function c(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}t.a=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return c(o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));Math.pow(10,8);var r=n(14),o=n(28);function a(e,t){var n;Object(r.a)(1,arguments);var a=Object(o.a)(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i,s=u(e);if(s.date){var c=d(s.date,a);i=f(c.restDateString,c.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var l,p=i.getTime(),m=0;if(s.time&&(m=h(s.time),isNaN(m)))return new Date(NaN);if(!s.timezone){var b=new Date(p+m),v=new Date(0);return v.setFullYear(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()),v.setHours(b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds()),v}return l=g(s.timezone),isNaN(l)?new Date(NaN):new Date(p+m+l)}var i={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},s=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,c=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,l=/^([+-])(\d{2})(?::?(\d{2}))?$/;function u(e){var t,n={},r=e.split(i.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],i.timeZoneDelimiter.test(n.date)&&(n.date=e.split(i.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var o=i.timezone.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}function d(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?o:100*a,restDateString:e.slice((r[1]||r[2]).length)}}function f(e,t){if(null===t)return new Date(NaN);var n=e.match(s);if(!n)return new Date(NaN);var r=!!n[4],o=p(n[1]),a=p(n[2])-1,i=p(n[3]),c=p(n[4]),l=p(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,c,l)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=r.getUTCDay()||7,a=7*(t-1)+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}(t,c,l):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(b[t]||(v(e)?29:28))}(t,a,i)&&function(e,t){return t>=1&&t<=(v(e)?366:365)}(t,o)?(u.setUTCFullYear(t,a,Math.max(o,i)),u):new Date(NaN)}function p(e){return e?parseInt(e):1}function h(e){var t=e.match(c);if(!t)return NaN;var n=m(t[1]),r=m(t[2]),o=m(t[3]);return function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,o)?36e5*n+6e4*r+1e3*o:NaN}function m(e){return e&&parseFloat(e.replace(",","."))||0}function g(e){if("Z"===e)return 0;var t=e.match(l);if(!t)return 0;var n="+"===t[1]?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,o)?n*(36e5*r+6e4*o):NaN}var b=[31,null,31,30,31,30,31,31,30,31,30,31];function v(e){return e%400==0||e%4==0&&e%100!=0}},,function(e,t,n){"use strict";n.r(t);var r=n(171),o=n.n(r),a=n(17);const i=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]);t.default=()=>{const e=new o.a(window.location.search);let t=Array.from(e.entries()).reduce((e,t)=>{let[n,r]=t;return"UTM_"===n.toUpperCase().substring(0,4)&&Object(a.a)(n.toUpperCase().substring(4),i)?{...e,[n]:r}:e},null);if(t)window.sessionStorage.setItem("kindly-chat-utm",JSON.stringify(t));else{const e=window.sessionStorage.getItem("kindly-chat-utm");t=e?JSON.parse(e):null}return t}},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),a=n(0),i=n.n(a),s=n(3),c=n(1),l=n(23),u=n(6);const d=Object(c.b)(["bottom:",";right:",";@media ","{right:0;}max-height:730px;"],e=>e.position.bottom,e=>e.position.right,u.c.maxPhone),f=Object(c.b)(["bottom:0px;right:0px;top:0px;width:100%;"]),p=c.c.div.withConfig({displayName:"KindlyChatstyles__ChatContainer",componentId:"sc-1y4lzsi-0"})(["position:fixed;font-size:16px;text-align:initial;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;z-index:",";font-family:",";"," *{box-sizing:border-box;",";}@media ","{display:flex;width:100%;max-height:unset;align-items:center;justify-content:center;",";}"],e=>e.zIndex+5,e=>{let{theme:t}=e;return t.customFont?t.customFont:l.a.default},e=>e.fullscreen?f:d,e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`},u.c.maxTablet,e=>{let{active:t}=e;return t&&"height: 100%;\n bottom: 0;\n right: 0;\n left: 0;\n top: 0"});var h=n(10),m=n(19);const g=c.c.button.withConfig({displayName:"styles__CloseIconButton",componentId:"sc-96uqai-0"})(["position:absolute;z-index:",";top:24px;right:24px;background:none;border:none;cursor:pointer;",""],e=>e.zIndex+10,m.a),b=c.c.div.withConfig({displayName:"styles__LightBox",componentId:"sc-96uqai-1"})(["position:fixed;background:rgba(0,0,0,0.5);top:0;right:0;bottom:0;left:0;z-index:",";display:flex;align-items:center;justify-content:center;"],e=>e.zIndex+9),v=c.c.img.withConfig({displayName:"styles__LightBoxImage",componentId:"sc-96uqai-2"})(["width:auto;max-width:100%;max-height:100%;margin:auto;padding:24px;"]);var y=n(5),x=n(7),w=n(11);const E=Object(c.d)(["0%{visibility:visible;opacity:0;}1%{opacity:0;transform:translateY(20px);}100%{opacity:1;transform:translateY(0);}"]),O=Object(c.b)(["",";animation-name:",";"],Object(w.a)(),E),k=Object(c.d)(["0%{opacity:1;transform:translateY(0px);}99%{opacity:0;transform:translateY(20px);}100%{opacity:0;visibility:hidden;}"]),_=Object(c.b)(["",";animation-name:",";"],Object(w.a)(),k),C=Object(c.b)(["",";right:unset;bottom:unset;transition:width 300ms ease 0ms,height 300ms ease 0ms;"],e=>e.chatHasStarted?"width: 100%;\n height: 100%;\n ":"width: 90%;\n height: 95%;\n border-radius: 6px;"),j=Object(c.b)(["max-height:",";height:",";width:",";"],e=>e.fullscreen?"100%":"645px",e=>e.fullscreen?"100%":"645px",e=>e.fullscreen?"100%":"360px"),T=Object(c.b)(["bottom:85px;right:10px;border-radius:12px;@media (max-height:","){min-height:380px;height:calc(100vh - ",");}"],"950px",e=>e.offsetHeight),S=Object(c.b)(["bottom:0px;right:0px;border-radius:0px;"]),I=Object(c.b)([""," "," ",""],e=>e.fullscreen?S:T,e=>e.active?j:Object(w.h)(),e=>!e.fullscreen&&!e.chatHasStarted&&(e=>e.active?O:_)(e)),A=Object(c.b)(["right:369px;display:flex;flex-direction:column;justify-content:flex-start;z-index:19;border-radius:6px 0 0 6px;background:#ffffff;background-color:#ffffff;>:last-child{margin:auto 20px 20px;}"]),N=c.c.div.withConfig({displayName:"styles__ChatBoxContainer",componentId:"sc-1usve4j-0"})(["position:absolute;z-index:20;overflow:hidden;flex-direction:column;box-shadow:0px 8px 48px rgba(0,0,0,0.06),0px 0px 1px rgba(0,0,0,0.16),0px 4px 8px rgba(0,0,0,0.04);display:",";@media ","{",";","}@media ","{visibility:",";",";}"],e=>e.hide?"none":"flex",u.c.minTablet,I,e=>{let{inspectorContainer:t}=e;return t&&A},u.c.maxTablet,e=>e.active?"visible":"hidden",C);var P=n(13);const M=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1iatydl-0"})(["margin:20px;display:flex;flex-direction:column;"]),L=c.c.hr.withConfig({displayName:"styles__Separator",componentId:"sc-1iatydl-1"})(["border-top:1px solid rgb(243,243,244);width:100%;margin:0;"]),R=c.c.button.withConfig({displayName:"styles__Navigation",componentId:"sc-1iatydl-2"})(["text-align:center;margin:5px 5px 0 5px;background:rgb(243,243,244);border:1px solid rgb(243,243,244);font-weight:600;padding:7px 16px;border-radius:5px;cursor:pointer;outline:none;&:hover{background:rgb(230,230,230);}&:disabled{background:white;color:rgb(206,206,206);border-color:rgb(206,206,206);cursor:default;}"]),D=c.c.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-1iatydl-3"})(["display:flex;align-items:baseline;font-size:13px;",""],e=>{let{spaceBetween:t}=e;return t?"justify-content: space-between;":""}),B=c.c.div.withConfig({displayName:"styles__Slot",componentId:"sc-1iatydl-4"})(["padding:1px 3px;border-radius:3px;font-size:12px;margin-right:5px;background:rgba(255,74,156,0.25);"]),F=c.c.span.withConfig({displayName:"styles__Dot",componentId:"sc-1iatydl-5"})(["height:7px;width:7px;background:rgb(255,172,74);border-radius:50%;margin-right:5px;bottom:1px;position:relative;"]),z=c.c.span.withConfig({displayName:"styles__Corrected",componentId:"sc-1iatydl-6"})(["border-bottom:1px dotted red;"]),U=c.c.span.withConfig({displayName:"styles__Arrow",componentId:"sc-1iatydl-7"})(["margin:0 5px;color:gray;"]),H=c.c.div.withConfig({displayName:"styles__Label",componentId:"sc-1iatydl-8"})(["padding:1px 6px;border-radius:3px;border:1px solid lightgray;text-transform:uppercase;font-size:12px;margin:0 5px 3px 5px;white-space:nowrap;",""],e=>{let{filled:t}=e;return t?"background: rgb(0, 105, 255); color: white;":""}),$=c.c.a.withConfig({displayName:"styles__Link",componentId:"sc-1iatydl-9"})(["text-decoration:none;color:initial;cursor:pointer;&:hover{color:rgb(0,105,255);}"]),V=()=>{};var q=function(){return i.a.createElement(i.a.Fragment,null,i.a.createElement(M,null,i.a.createElement(P.c,null,"No messages yet!")),i.a.createElement(D,{spaceBetween:!0},i.a.createElement(R,{disabled:!0,onClick:V},"Show previous"),i.a.createElement(R,{disabled:!0,onClick:V},"Show next")))},G=(n(57),n(17));const{SAMPLE_MATCH:W,KEYWORD_EXACT_MATCH:Y,KEYWORD_MENTION:K,PATTERN_MATCH:X,ZODIAC:J}=y.f,Q=e=>(null!=e?e:"").toLowerCase().replace(/[-_]/g," ");var Z=function(e){let{handler:t,score:n,exchangeType:r,sender:o,fromWebhook:a,label:s}=e;return"string"==typeof s?i.a.createElement(H,null,s):Object(G.a)(t,[W,J])&&n?i.a.createElement(H,{filled:!0,title:"Confidence score"},`${Math.round(100*n)} %`):Object(G.a)(t,Object.values(y.f))?i.a.createElement(H,null,(e=>{switch(e){case W:case J:return"sample";case X:return"pattern";case Y:case K:return"keyword";default:return Q(e)}})(t)):a?i.a.createElement(H,null,"webhook"):"string"==typeof r?i.a.createElement(H,null,Q(r)):Object(G.a)(o,Object.values(y.l))?i.a.createElement(H,null,Q(o)):null};n(50);const ee=e=>{let{botId:t,exchangeType:n,exchangeId:r}=e;if(!t||!n||!r)return null;return`/bot/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`};var te=function(e){let{children:t,url:n}=e;return n?i.a.createElement($,{target:"_blank",rel:"noopener noreferrer",href:n},t):t};var ne=function(e){let{botId:t,exchangeType:n,exchangeId:r,children:o}=e;const a=ee({botId:t,exchangeType:n,exchangeId:r});return i.a.createElement(te,{url:a},i.a.createElement(D,null,o))};const re=(e,t)=>`${(e||"").slice(0,t)}${(null==e?void 0:e.length)>t?"...":""}`;var oe=function(e){let{fromBot:t,fromWebhook:n,handler:r,score:o,title:a,message:s,exchangeType:c,exchangeId:l,botId:u,isFollowup:d,sender:f}=e;return i.a.createElement(M,null,i.a.createElement(P.c,null,"Message info"),t&&i.a.createElement(D,{spaceBetween:!0},a&&i.a.createElement(ne,{botId:u,exchangeType:c,exchangeId:l},i.a.createElement(F,null),i.a.createElement("span",null,re(a,40))),!a&&i.a.createElement("span",null,re(s,40)),i.a.createElement(D,null,i.a.createElement(Z,{handler:r,score:o,exchangeType:c,exchangeId:l,sender:f,fromWebhook:n}),d&&i.a.createElement(Z,{exchangeType:"followup"}))),!t&&i.a.createElement(D,{spaceBetween:!0},re(s,40),i.a.createElement(Z,{label:"user"})))};var ae=function(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return i.a.createElement(M,null,i.a.createElement(P.c,null,"Slot / Pattern context"),i.a.createElement(D,null,i.a.createElement(B,null,n),i.a.createElement("span",null,r)))};n(124);var ie=function(e){let{replyCandidates:t,botId:n}=e;const r=Object(a.useMemo)(()=>t.filter(e=>{let{selected:t,samle:n,title:r}=e;return!t&&(n||r)}),[t]);return 0===(null==r?void 0:r.length)?null:i.a.createElement(M,null,i.a.createElement(P.c,null,"Potential dialogues"),r.map(e=>{let{_id:t,score:r,sample:o,title:a,dialogue_id:s}=e;return i.a.createElement(te,{key:`reply-candidate-${t}`,url:ee({botId:n,exchangeType:"usersays",exchangeId:s})},i.a.createElement(D,null,i.a.createElement(Z,{handler:y.f.SAMPLE_MATCH,score:r}),i.a.createElement(F,null),i.a.createElement("span",null,o||a)))}))};var se=function(e){let{correctedMessage:t,message:n}=e;return i.a.createElement(M,null,i.a.createElement(P.c,null,"Spelling correction / Greeting removed"),i.a.createElement(D,null,i.a.createElement(z,null,n),i.a.createElement(U,null,"→"),i.a.createElement("span",null,t)))};var ce=function(e){let{chatMessage:{message:t,score:n,title:r,handler:o,sender:a,from_bot:c,bot_id:l,from_webhook:u,reply_candidates:d,exchange_type:f,exchange_id:p,is_followup:h,corrected_message:m,pattern_context_match:g}}=e;const{admin:b}=Object(s.d)(x.e),v=Object.keys(g||{}).length>0,y=b&&m&&m!==t;return i.a.createElement(i.a.Fragment,null,i.a.createElement(oe,{handler:o,fromBot:c,fromWebhook:u,score:n,title:r,message:t,exchangeType:f,exchangeId:p,botId:l,isFollowup:h,sender:a}),i.a.createElement(L,null),v&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ae,{patternContextMatch:g}),i.a.createElement(L,null)),y&&i.a.createElement(i.a.Fragment,null,i.a.createElement(se,{correctedMessage:m,message:t}),i.a.createElement(L,null)),(null==d?void 0:d.length)>1&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ie,{replyCandidates:d,botId:l}),i.a.createElement(L,null)))};function le(e){const t=Object(a.useRef)();return Object(a.useEffect)(()=>{t.current=e},[e]),t.current}var ue=n(8);var de=function(){const{active:e,chatHasStarted:t}=Object(s.d)(x.e),{currentMessage:n,nextMessage:r,prevMessage:o,isFirstMessage:c,isLastMessage:l}=(()=>{var e,t;const n=Object(s.c)(),{chatMessages:r}=Object(s.d)(x.n),{currentMessageId:o}=Object(s.d)(x.j),i=o||(null===(e=r.slice(-1)[0])||void 0===e?void 0:e.id),c=r.findIndex(e=>{let{id:t}=e;return t===i}),l=Object(a.useCallback)(()=>{n(Object(ue.T)(r[c+1].id))},[r,c,n]),u=Object(a.useCallback)(()=>{n(Object(ue.T)(r[c-1].id))},[r,c,n]),d=null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,f=le(d),p=0===c,h=c===d-1;return Object(a.useEffect)(()=>{d>f&&n(Object(ue.T)())},[n,d,f]),{currentMessage:r[c],nextMessage:l,prevMessage:u,isFirstMessage:p,isLastMessage:h}})();return i.a.createElement(N,{chatHasStarted:t,active:e,"aria-hidden":e?"false":"true","data-testid":"chat-box-inspector","data-cy":"chat-box-inspector",fullscreen:0,offsetHeight:"205px",inspectorContainer:!0},n&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ce,{chatMessage:n}),i.a.createElement(D,{spaceBetween:!0},i.a.createElement(R,{disabled:c,onClick:o},"Show previous"),i.a.createElement(R,{disabled:l,onClick:r},"Show next"))),!n&&i.a.createElement(q,null))},fe=n(12);const pe=c.c.div.withConfig({displayName:"styles__AnnouncementContainer",componentId:"sc-xw79eu-0"})(["border-radius:0;box-shadow:1px 2px 5px 2px ",";line-height:23px;background:",";background-color:",";font-size:",";font-weight:500;transform-origin:top;display:flex;z-index:15;position:absolute;padding:0 10px;transform:",";transition:",";width:100%;top:55px;span{font-size:15px;margin-right:7px;}"],u.a.shadowColor,u.a.warningColor,u.a.warningColor,u.d.fontSizeP,e=>{let{show:t}=e;return t?"scaleY(1)":"scaleY(0)"},e=>{let{show:t}=e;return t?"transform 0.15s ease-in":"transform 0.15s ease-out"}),he=c.c.div.withConfig({displayName:"styles__AnnouncementText",componentId:"sc-xw79eu-1"})(["margin:5px 0;display:flex;color:#2c2c2c;font-size:inherit;font-weight:inherit;line-height:24px;"]),me=Object(c.c)(fe.d).withConfig({displayName:"styles__AnnouncementLink",componentId:"sc-xw79eu-2"})(["color:#0063a2;"]);var ge=function(){const{text:e,url:t,show:n}=Object(s.d)(x.c);return n?i.a.createElement(pe,{show:n},i.a.createElement(he,null,i.a.createElement("span",null,"!"),e),t&&i.a.createElement(me,{target:"_blank"},"url")):null},be=n(21),ve=n(14);function ye(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e);return t.setHours(0,0,0,0),t}function xe(e){return(xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function we(e){return Object(ve.a)(1,arguments),e instanceof Date||"object"===xe(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Ee(e){if(Object(ve.a)(1,arguments),!we(e)&&"number"!=typeof e)return!1;var t=Object(be.a)(e);return!isNaN(Number(t))}var Oe=n(102),ke=n(28);function _e(e,t){Object(ve.a)(2,arguments);var n=Object(ke.a)(t);return Object(Oe.a)(e,-n)}function Ce(e){Object(ve.a)(1,arguments);var t=1,n=Object(be.a)(e),r=n.getUTCDay(),o=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function je(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=Ce(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var i=Ce(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Te(e){Object(ve.a)(1,arguments);var t=je(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Ce(n);return r}var Se={};function Ie(){return Se}function Ae(e,t){var n,r,o,a,i,s,c,l;Object(ve.a)(1,arguments);var u=Ie(),d=Object(ke.a)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.weekStartsOn)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(c=u.locale)||void 0===c||null===(l=c.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Object(be.a)(e),p=f.getUTCDay(),h=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-h),f.setUTCHours(0,0,0,0),f}function Ne(e,t){var n,r,o,a,i,s,c,l;Object(ve.a)(1,arguments);var u=Object(be.a)(e),d=u.getUTCFullYear(),f=Ie(),p=Object(ke.a)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(c=f.locale)||void 0===c||null===(l=c.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,p),h.setUTCHours(0,0,0,0);var m=Ae(h,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var b=Ae(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=b.getTime()?d:d-1}function Pe(e,t){var n,r,o,a,i,s,c,l;Object(ve.a)(1,arguments);var u=Ie(),d=Object(ke.a)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(c=u.locale)||void 0===c||null===(l=c.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==n?n:1),f=Ne(e,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var h=Ae(p,t);return h}function Me(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var Le={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Me("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Me(n+1,2)},d:function(e,t){return Me(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return Me(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Me(e.getUTCHours(),t.length)},m:function(e,t){return Me(e.getUTCMinutes(),t.length)},s:function(e,t){return Me(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Me(Math.floor(r*Math.pow(10,n-3)),t.length)}},Re="midnight",De="noon",Be="morning",Fe="afternoon",ze="evening",Ue="night";function He(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=r%60;if(0===a)return n+String(o);var i=t||"";return n+String(o)+i+Me(a,2)}function $e(e,t){return e%60==0?(e>0?"-":"+")+Me(Math.abs(e)/60,2):Ve(e,t)}function Ve(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+Me(Math.floor(o/60),2)+n+Me(o%60,2)}var qe={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Le.y(e,t)},Y:function(e,t,n,r){var o=Ne(e,r),a=o>0?o:1-o;return"YY"===t?Me(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Me(a,t.length)},R:function(e,t){return Me(je(e),t.length)},u:function(e,t){return Me(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Me(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Me(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Le.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Me(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){Object(ve.a)(1,arguments);var n=Object(be.a)(e),r=Ae(n,t).getTime()-Pe(n,t).getTime();return Math.round(r/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Me(o,t.length)},I:function(e,t,n){var r=function(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e),n=Ce(t).getTime()-Te(t).getTime();return Math.round(n/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Me(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Le.d(e,t)},D:function(e,t,n){var r=function(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Me(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Me(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Me(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Me(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?De:0===o?Re:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?ze:o>=12?Fe:o>=4?Be:Ue,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Le.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Le.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Le.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Le.s(e,t)},S:function(e,t){return Le.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return $e(o);case"XXXX":case"XX":return Ve(o);case"XXXXX":case"XXX":default:return Ve(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return $e(o);case"xxxx":case"xx":return Ve(o);case"xxxxx":case"xxx":default:return Ve(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+He(o,":");case"OOOO":default:return"GMT"+Ve(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+He(o,":");case"zzzz":default:return"GMT"+Ve(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return Me(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return Me((r._originalDate||e).getTime(),t.length)}},Ge=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},We=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ye={p:We,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],a=r[2];if(!a)return Ge(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Ge(o,t)).replace("{{time}}",We(a,t))}};function Ke(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var Xe=["D","DD"],Je=["YY","YYYY"];function Qe(e){return-1!==Xe.indexOf(e)}function Ze(e){return-1!==Je.indexOf(e)}function et(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var tt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},nt=function(e,t,n){var r,o=tt[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function rt(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var ot={date:rt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:rt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:rt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},at={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function it(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=null!=n&&n.width?String(n.width):o;r=e.formattingValues[a]||e.formattingValues[o]}else{var i=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[i]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function st(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;var i,s=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?lt(c,(function(e){return e.test(s)})):ct(c,(function(e){return e.test(s)}));i=e.valueCallback?e.valueCallback(l):l,i=n.valueCallback?n.valueCallback(i):i;var u=t.slice(s.length);return{value:i,rest:u}}}function ct(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function lt(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}var ut,dt={code:"en-US",formatDistance:nt,formatLong:ot,formatRelative:function(e,t,n,r){return at[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:it({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:it({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:it({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:it({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:it({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ut={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(ut.matchPattern);if(!n)return null;var r=n[0],o=e.match(ut.parsePattern);if(!o)return null;var a=ut.valueCallback?ut.valueCallback(o[0]):o[0];a=t.valueCallback?t.valueCallback(a):a;var i=e.slice(r.length);return{value:a,rest:i}}),era:st({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:st({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:st({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:st({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:st({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},ft=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ht=/^'([^]*?)'?$/,mt=/''/g,gt=/[a-zA-Z]/;function bt(e,t,n){var r,o,a,i,s,c,l,u,d,f,p,h,m,g,b,v,y,x;Object(ve.a)(2,arguments);var w=String(t),E=Ie(),O=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:E.locale)&&void 0!==r?r:dt,k=Object(ke.a)(null!==(a=null!==(i=null!==(s=null!==(c=null==n?void 0:n.firstWeekContainsDate)&&void 0!==c?c:null==n||null===(l=n.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:E.firstWeekContainsDate)&&void 0!==i?i:null===(d=E.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==a?a:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=Object(ke.a)(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(b=n.locale)||void 0===b||null===(v=b.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:E.weekStartsOn)&&void 0!==h?h:null===(y=E.locale)||void 0===y||null===(x=y.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==p?p:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var C=Object(be.a)(e);if(!Ee(C))throw new RangeError("Invalid time value");var j=Ke(C),T=_e(C,j),S={firstWeekContainsDate:k,weekStartsOn:_,locale:O,_originalDate:C},I=w.match(pt).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Ye[t])(e,O.formatLong):e})).join("").match(ft).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return vt(r);var a=qe[o];if(a)return null!=n&&n.useAdditionalWeekYearTokens||!Ze(r)||et(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!Qe(r)||et(r,t,String(e)),a(T,r,O.localize,S);if(o.match(gt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return I}function vt(e){var t=e.match(ht);return t?t[1].replace(mt,"'"):e}var yt=n(59);function xt(e){const t=Object(yt.a)(e);return function(e,t){Object(ve.a)(2,arguments);var n=ye(e),r=ye(t);return n.getTime()===r.getTime()}(t,new Date)?bt(t,"HH:mm"):bt(t,"dd LLL")}const wt=Object(c.d)(["0%{opacity:0;transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),Et=Object(c.b)(["",";animation-name:",";"],Object(w.a)(300,150),wt),Ot=Object(c.b)(["flex-direction:row-reverse;"]),kt=Object(c.b)(["flex-direction:row;"]),_t=Object(c.b)(["background:#e3e3e7;padding:0 30px;margin:10px -30px;position:relative;&:before{content:'';position:absolute;background:rgb(153,153,153);width:4px;height:calc(100% + 20px);left:0;z-index:1;}&:after{content:'';position:absolute;display:inline-block;width:100%;height:20px;background:#e3e3e7;top:100%;left:0;}"]),Ct=c.c.div.withConfig({displayName:"styles__GroupContainer",componentId:"sc-1re4sol-0"})(["display:flex;flex:none;margin-bottom:10px;margin-top:10px;",";",";"],e=>e.fromBot?kt:Ot,e=>{let{inspected:t}=e;return t&&_t}),jt=c.c.span.withConfig({displayName:"styles__MessageHeader",componentId:"sc-1re4sol-1"})(["display:flex;align-items:baseline;flex-wrap:nowrap;justify-content:flex-start;opacity:0;",";",";",";"],Et,e=>!e.fromBot&&"justify-content: flex-end; width: 100%;",e=>e.fromAgent&&"padding-left: 25px"),Tt=Object(c.c)(P.f).withConfig({displayName:"styles__MessageDate",componentId:"sc-1re4sol-2"})(["opacity:1;margin-bottom:0;color:",";",";"],e=>{let{theme:t}=e;return t.chatLogElements},e=>e.fromBot?"padding-left: 6px":"padding-right: 6px"),St=c.c.div.withConfig({displayName:"styles__MessageGroup",componentId:"sc-1re4sol-3"})(["display:block;width:100%;"]);var It=function(e){let{fromAgent:t,fromBot:n,created:r,children:o,inspected:a,setGroupRef:s}=e;return i.a.createElement(Ct,{fromBot:n,inspected:a,ref:s},i.a.createElement(St,null,i.a.createElement(jt,{fromAgent:t,fromBot:n},i.a.createElement(Tt,{fromBot:n},xt(r))),o))};var At=function(e){let{title:t,...n}=e;return i.a.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"24",viewBox:"0 0 20 24"}),i.a.createElement("title",null,t||"File attachment"),i.a.createElement("path",{d:"M19.429 13.272L13.503 19.2c-1.554 1.556-3.821 2.164-5.945 1.595s-3.784-2.227-4.354-4.351.037-4.391 1.591-5.946l6.448-6.444c1.427-1.358 3.668-1.358 5.094 0a3.6 3.6 0 0 1 0 5.094l-5.926 5.924a1.05 1.05 0 0 1-1.486 0c-.407-.412-.407-1.074 0-1.486L13.303 9.2a1.5 1.5 0 0 0-.651-2.551 1.5 1.5 0 0 0-1.469.431l-4.388 4.386c-1.583 1.585-1.583 4.153.002 5.736s4.153 1.583 5.736-.002l5.924-5.93A6.6 6.6 0 0 0 15.498.225a6.6 6.6 0 0 0-6.377 1.709l-6.44 6.442C-.893 11.95-.894 17.744 2.68 21.319s9.369 3.575 12.943.001l5.926-5.92a1.5 1.5 0 0 0-2.12-2.12v-.008z",fill:"#7b7b7b"}))};var Nt=function(e){return i.a.createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i.a.createElement("title",null,"Unsuccessful image upload"),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("g",{transform:"translate(-1128 -635)",fill:"#7B7B7B",fillRule:"nonzero"},i.a.createElement("path",{d:"m1152 637.67v8.7867l-4-4.0133-5.3333 5.3467-5.3333-5.3333-5.3333 5.3333-4-4.0133v-6.1067c0-1.4667 1.2-2.6667 2.6667-2.6667h18.667c1.4667 0 2.6667 1.2 2.6667 2.6667zm-4 8.56 4 4.0133v6.0933c0 1.4667-1.2 2.6667-2.6667 2.6667h-18.667c-1.4667 0-2.6667-1.2-2.6667-2.6667v-8.7733l4 3.9867 5.3333-5.3333 5.3333 5.3333 5.3333-5.32z"}))))};var Pt=function(e){return i.a.createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i.a.createElement("title",null,"Loading image upload"),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("g",{transform:"translate(-685 -659)",fill:"#7B7B7B",fillRule:"nonzero"},i.a.createElement("g",{transform:"translate(685 659)"},i.a.createElement("path",{d:"m15.67 9.414c-0.12139-0.24299-0.36467-0.40135-0.636-0.414-0.27276-0.023426-0.53433 0.11351-0.6705 0.351l-3.2505 5.199-2.3325-2.331c-0.16117-0.15568-0.38102-0.23533-0.6045-0.219-0.22394 0.02231-0.42603 0.144-0.5505 0.3315l-3 4.5c-0.1548 0.23022-0.16988 0.52708-0.039197 0.7718 0.13068 0.24471 0.38578 0.3973 0.6632 0.39671h13.5c0.26005 0 0.50153-0.13472 0.63814-0.35599 0.13661-0.22127 0.14886-0.49752 0.032357-0.73001l-3.75-7.5z"}),i.a.createElement("path",{d:"m21 0h-18c-1.6569 0-3 1.3431-3 3v18c0 1.6569 1.3431 3 3 3h18c1.6569 0 3-1.3431 3-3v-18c0-1.6569-1.3431-3-3-3zm-18 21v-18h18v18h-18z"}),i.a.createElement("circle",{cx:"7.5",cy:"7.5",r:"1.5"})))))};var Mt=()=>{const[e,t]=Object(a.useState)(null),[n,r]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{if(!e)return;const t=[],n=e.getElementsByTagName("img")||[],o=[...n].map(e=>e.complete&&e.naturalWidth?null:new Promise(n=>{t.push(n),e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})}));return o.length>0&&Promise.all(o).then(()=>{r(!0)}),()=>{[...n].forEach((e,n)=>{e.removeEventListener("load",t[n]),e.removeEventListener("error",t[n])})}},[e]),[t,n]};const Lt=Object(c.d)(["from{background-position:0%;}to{background-position:-200%;}"]),Rt=c.c.div.withConfig({displayName:"styles__LoadingWrapper",componentId:"sc-10p36bl-0"})(["position:absolute;left:0;width:100%;top:0;height:100%;color:black;z-index:1;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:",";transition:opacity "," ease-out;div:first-child{height:100%;width:100%;position:absolute;background:",";background-size:200% 100%;animation:1.3s linear "," infinite 0s;opacity:0.5;}div:nth-child(2){height:100%;width:100%;position:absolute;background:white;opacity:",";}div:nth-child(3){z-index:1;}"],e=>{let{finished:t}=e;return t?0:1},e=>{let{hideTransitionLength:t}=e;return`${t}s`},"\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(255, 255, 255, 0.738) 9.5%,\n rgba(255, 255, 255, 0.541) 17%,\n rgba(255, 255, 255, 0.382) 23.5%,\n rgba(255, 255, 255, 0.278) 28.3%,\n rgba(255, 255, 255, 0.194) 32.5%,\n rgba(255, 255, 255, 0.126) 36.5%,\n rgba(255, 255, 255, 0.075) 40.1%,\n rgba(255, 255, 255, 0.042) 43.1%,\n rgba(255, 255, 255, 0.021) 45.5%,\n rgba(255, 255, 255, 0.008) 46.3%,\n rgba(255, 255, 255, 0.002) 49.3%,\n rgba(255, 255, 255, 0) 50%,\n rgba(255, 255, 255, 0.002) 50.7%,\n rgba(255, 255, 255, 0.008) 53.7%,\n rgba(255, 255, 255, 0.021) 54.5%,\n rgba(255, 255, 255, 0.042) 59.9%,\n rgba(255, 255, 255, 0.075) 61.7%,\n rgba(255, 255, 255, 0.126) 63.5%,\n rgba(255, 255, 255, 0.194) 67.5%,\n rgba(255, 255, 255, 0.278) 71.7%,\n rgba(255, 255, 255, 0.382) 76.5%,\n rgba(255, 255, 255, 0.541) 83%,\n rgba(255, 255, 255, 0.738) 90.5%,\n rgba(255, 255, 255, 1) 100%\n )\n",Lt,e=>{let{opacity:t}=e;return t});var Dt=function(e){let{loading:t,children:n,opacity:r=.6}=e;const[o,s]=Object(a.useState)(!t);return Object(a.useEffect)(()=>{o||t||setTimeout(()=>s(!0),300)},[o,t]),o?null:i.a.createElement(Rt,{finished:!t,hideTransitionLength:.3,opacity:r},i.a.createElement("div",null),i.a.createElement("div",null),i.a.createElement("div",null,n))};const Bt=Object(c.d)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Ft=Object(c.b)(["",";animation-name:",";"],Object(w.a)(600),Bt),zt=Object(c.d)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"]),Ut=c.c.div.withConfig({displayName:"styles__TypingIndicatorContainer",componentId:"sc-1lynepx-0"})(["background:none;will-change:transform;width:auto;padding:0px;display:table;margin:8px 0px;position:relative;",""],Ft),Ht=c.c.div.withConfig({displayName:"styles__IndicatorContainer",componentId:"sc-1lynepx-1"})(["border-radius:15px;position:relative;display:inline-flex;flex-direction:row;border:0;padding:11px 9px;background:",";background-color:",";"],e=>"image"===e.loadingType?"transparent":e.theme.botMessageBackground,e=>"image"===e.loadingType?"transparent":e.theme.botMessageBackground),$t=c.c.span.withConfig({displayName:"styles__Indicator",componentId:"sc-1lynepx-2"})(["height:5px;width:5px;margin:0 2px;background:",";background-color:",";display:block;opacity:1;border-radius:100px;&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>"image"===e.loadingType?"#fff":e.theme.botMessageText,e=>"image"===e.loadingType?"#fff":e.theme.botMessageText,zt,zt,zt);var Vt=function(e){let{loadingType:t}=e;return i.a.createElement(Ut,{"data-cy":"typing-indicator"},i.a.createElement(Ht,{loadingType:t},i.a.createElement($t,{loadingType:t}),i.a.createElement($t,{loadingType:t}),i.a.createElement($t,{loadingType:t})))};function qt(e){const{browserName:t}=function(){const{userAgent:e}=navigator;let t;return t=e.match(/chrome|chromium|crios/i)?"chrome":e.match(/firefox|fxios/i)?"firefox":e.match(/safari/i)?"safari":e.match(/opr\//i)?"opera":e.match(/edg/i)?"edge":"No browser detection",{browserName:t,userAgent:e}}();return e===t}const Gt=()=>`\n /* If browser support backdrop-filter */\n ${qt("chrome")&&"\n background: rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(8px);\n opacity: 1;\n\n &:hover {\n background: rgba(255, 255, 255, 0.4);\n background-color: rgba(255, 255, 255, 0.4);\n\n + svg path {\n mix-blend-mode: unset;\n stroke: black;\n }\n }\n "}\n`,Wt=()=>`\n position: absolute;\n pointer-events: none;\n \n path {\n stroke: #000;\n }\n\n ${qt("chrome")&&"\n path {\n mix-blend-mode: difference;\n stroke: white;\n }\n "}\n\n `,Yt=c.c.div.withConfig({displayName:"styles__PlaceholderContainer",componentId:"sc-12zmiuw-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:",";position:relative;width:100%;min-height:100px;"," background:#232F41;color:#fff;font-size:14px;"],e=>{let{hasCaption:t}=e;return t?"6px 6px 0 0":"6px"},e=>`height: ${e.imageHeight}px;`),Kt=c.c.div.withConfig({displayName:"styles__CarouselContainer",componentId:"sc-12zmiuw-1"})(["position:relative;overflow:hidden;margin-left:-25px;width:calc(100% + 50px);> div{",";}"],e=>e.active&&"\n position: relative;\n width: 100000%;\n display: flex;\n "),Xt=c.c.div.withConfig({displayName:"styles__ImageWrapper",componentId:"sc-12zmiuw-2"})(["position:relative;display:flex;flex-direction:column;width:","px;height:auto;margin-right:5px;margin-top:2px;margin-bottom:2px;",";",";",";"],e=>e.imageWidth,e=>{let{fromBot:t}=e;return t?"justify-content: flex-start":"justify-content: flex-end"},e=>{let{first:t,isCarousel:n}=e;return t||!n?"margin-left: 25px":""},e=>e.imageHasText&&`\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06), inset 0px 0px 1px rgba(0, 0, 0, 0.32);\n border-radius: 6px;\n overflow: hidden;\n margin-bottom: 6px;\n color: ${u.h.textColor};\n `),Jt=Object(c.b)(["position:relative;display:",";min-height:100px;"," ",";border-radius:6px;"],e=>e.hidden?"none":"block",e=>e.carousel?`height: ${e.imageHeight}px;`:"height: auto;",e=>!e.imageHasText&&"\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06), inset 0px 0px 1px rgba(0, 0, 0, 0.32);\n "),Qt=c.c.a.withConfig({displayName:"styles__ImageContainerLink",componentId:"sc-12zmiuw-3"})(["",""],Jt),Zt=c.c.div.withConfig({displayName:"styles__ImageContainerNoLink",componentId:"sc-12zmiuw-4"})(["",""],Jt),en=c.c.img.withConfig({displayName:"styles__Image",componentId:"sc-12zmiuw-5"})(["max-width:100%;position:relative;width:auto;max-height:350px;min-height:100px;transition:border-width 0.15s ease;border-radius:6px;display:block;z-index:-1;"," "," ",""],e=>e.imageHasText?"border-radius: 0;":"",e=>e.carousel&&`height: ${e.imageHeight}px; object-fit: cover; width: ${e.imageWidth}px;`,m.a),tn=c.c.div.withConfig({displayName:"styles__ImageCaptions",componentId:"sc-12zmiuw-6"})(["background:#fff;z-index:-1;> *:last-child{margin-bottom:8px;}"]),nn=c.c.h3.withConfig({displayName:"styles__ImageTitle",componentId:"sc-12zmiuw-7"})(["font-weight:500;margin:6px 8px 0px 8px;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#232f41;"]),rn=c.c.div.withConfig({displayName:"styles__ImageDescription",componentId:"sc-12zmiuw-8"})(["margin:0;margin:2px 8px 8px 8px;font-size:12px;line-height:16px;color:#6a778a;white-space:pre-line;"]),on=c.c.button.withConfig({displayName:"styles__CarouselButton",componentId:"sc-12zmiuw-9"})(["position:absolute;top:calc(50% - 18px);background:#fff;background-color:#fff;border:none;width:36px;height:36px;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0 0 2px 0px;border-radius:100px;opacity:0.8;transition:all 0.2s ease;box-shadow:0px 2px 6px rgba(0,0,0,0.04);:hover{opacity:1;}:active{background-color:#efeeee;opacity:1;}"," "," ",";",""],m.a,e=>{let{next:t}=e;return t?"right: 10px;":"left: 10px;"},e=>{let{disabled:t}=e;return t&&"display: none"},Gt),an=Object(c.c)(h.a).withConfig({displayName:"styles__SvgArrowLeftIcon",componentId:"sc-12zmiuw-10"})(["top:calc(50% - 13px);left:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Wt),sn=Object(c.c)(h.b).withConfig({displayName:"styles__SvgArrowRightIcon",componentId:"sc-12zmiuw-11"})(["top:calc(50% - 13px);right:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Wt),cn=c.c.div.withConfig({displayName:"styles__ImageLinkButton",componentId:"sc-12zmiuw-12"})(["position:absolute;left:",";bottom:",";background:#fff;display:flex;align-items:center;justify-content:center;width:24px;height:24px;opacity:0.8;border-radius:50%;pointer-events:none;",""],u.e.wrapper,u.e.wrapper,Gt),ln=Object(c.c)(h.m).withConfig({displayName:"styles__SvgLinkIcon",componentId:"sc-12zmiuw-13"})(["bottom:",";left:",";",""],u.e.icon,u.e.icon,Wt),un=c.c.button.withConfig({displayName:"styles__LightBoxButton",componentId:"sc-12zmiuw-14"})(["display:",";position:absolute;top:",";right:",";width:24px;height:24px;align-items:center;justify-content:center;border-radius:2px;border:none;cursor:pointer;background:#fff;box-shadow:0px 2px 6px rgba(0,0,0,0.04);opacity:0.8;padding:0px 0 0 1px;"," &:hover{opacity:1;}",""],e=>e.inView?"flex":"none",u.e.wrapper,u.e.wrapper,m.a,Gt),dn=Object(c.c)(h.h).withConfig({displayName:"styles__SvgEnlargeIcon",componentId:"sc-12zmiuw-15"})(["top:",";right:",";",""],u.e.icon,u.e.icon,Wt);var fn=function(e){let{imageWidth:t,imageHeight:n,hasCaption:r}=e;return i.a.createElement(Yt,{title:"Loading image...",imageWidth:t,imageHeight:n,hasCaption:r},i.a.createElement(Vt,{loadingType:"image"}),i.a.createElement("div",null,"Loading image"))};var pn=function(e){let{image:t,first:n,isCarousel:r,fromBot:o,shouldAnimate:c,shouldAutoScroll:l,scrollToLatestMessage:u,scrollToBottom:d,inView:f,imageWidth:p,imageHeight:h,loading:m}=e;const[g,b]=Mt(),v=Object(s.c)();Object(a.useEffect)(()=>{b&&l&&(!o&&d?d():u())},[o,b,l,d,u]);const y=Object(a.useCallback)(e=>{v(Object(ue.G)(e))},[v]),x=Boolean(t.title||t.description),w=null!=t&&t.newTab?"_blank":"_self",E=t.description&&t.description.length>100?t.description.slice(0,100).concat("..."):t.description,O=t.linkUrl?Qt:Zt;return i.a.createElement(Xt,{imageHasText:x,first:n,ref:g,imageWidth:p,imageHeight:h,isCarousel:r,fromBot:o},i.a.createElement(Dt,{loading:m},"Uploading"),i.a.createElement(O,{imageWidth:p,imageHeight:h,hidden:!b,href:t.linkUrl,target:t.linkUrl?w:void 0,imageHasText:x},i.a.createElement(en,{src:t.imageUrl,alt:t.altText,tabIndex:""!==t.linkUrl?"0":"-1",carousel:r,fromBot:o,shouldAnimate:c,imageHasText:x,imageWidth:p,imageHeight:h}),t.linkUrl&&i.a.createElement(cn,null),t.linkUrl&&i.a.createElement(ln,{width:16,height:16})),!m&&i.a.createElement(un,{"aria-label":"Enlarge image",onClick:()=>y(t.imageUrl),inView:f}),!m&&i.a.createElement(dn,null),!b&&i.a.createElement(fn,{alt:t.altText,imageWidth:p,imageHeight:h,hasCaption:x}),i.a.createElement(tn,null,t.title&&i.a.createElement(nn,{imageWidth:p,imageHeight:h},t.title),E&&i.a.createElement(rn,{imageWidth:p,imageHeight:h},E)))},hn=(o.a.shape({id:o.a.string,temporaryId:o.a.string,url:o.a.string,type:o.a.string.isRequired,name:o.a.string.isRequired,file:o.a.object,sizeKb:o.a.number.isRequired,storagePath:o.a.string,status:o.a.oneOf(Object.values(y.a)),sender:o.a.oneOf(Object.values(y.l))}),function(){let{type:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(null!=e?e:"").split("/");return(null==t?void 0:t[0])===y.e.IMAGE?y.e.IMAGE:(null==t?void 0:t[1])===y.e.PDF?y.e.PDF:t.slice(-1)[0]});const mn=e=>{let{fromUser:t,hasError:n,theme:r}=e;return n?u.a.grayColor:t?r.userMessageBackground:r.botMessageBackground},gn=c.c.div.withConfig({displayName:"styles__FileAttachment",componentId:"sc-ftn7kp-0"})(["position:relative;text-align:center;cursor:pointer;text-transform:none;width:80%;max-width:calc(80% - 25px);border-radius:17px;font-weight:500;border:none;padding:",";font-family:",";font-size:14px;background:",";background-color:",";transition:all 0.2s ease;margin:8px 0 2px 25px;display:block;a,span{display:block;color:",";text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;z-index:2;}& > svg:first-child{position:absolute;top:-7px;left:-4px;width:15px;path{opacity:",";transition:opacity 0.2 ease-out;}}& > svg:not(:first-child){width:20px;}"],e=>{let{hasError:t}=e;return t?"7px 12px 4px":"8px 12px"},l.a.default,mn,mn,e=>{let{fromUser:t,theme:n}=e;return t?n.userMessageText:n.botMessageText},e=>{let{$loading:t}=e;return t?.5:1}),bn=c.c.div.withConfig({displayName:"styles__MessageAgent",componentId:"sc-ftn7kp-1"})(["width:20px;height:20px;left:-10px;bottom:5px;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),vn=c.c.div.withConfig({displayName:"styles__IconBackground",componentId:"sc-ftn7kp-2"})(["width:175px;height:175px;position:relative;display:flex;justify-content:center;margin-bottom:4px;background:",";border-radius:15px;svg{width:24px;z-index:2;}"],u.a.grayColor),yn=c.c.div.withConfig({displayName:"styles__AttachmentWrapper",componentId:"sc-ftn7kp-3"})(["display:flex;justify-content:",";"],e=>{let{fromUser:t}=e;return t?"flex-end":"flex-start"});var xn=function(e){let{avatar:t}=e;const n=Object(a.useMemo)(()=>t?{backgroundImage:`url(${t})`}:{},[t]);return t?i.a.createElement(bn,{style:n}):null};var wn=function(e){let{attachment:t,shouldAutoScroll:n,scrollToLatestMessage:r,scrollToBottom:o,avatar:c,chatMessageStatus:l}=e;const u=t.sender===y.l.USER,d=hn(t)===y.e.IMAGE,f=l||Object(G.a)(t.status,[y.a.ERROR,y.a.INFECTED]),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{token:n}=Object(s.d)(x.f),{PAT_HOST:r}=Object(s.d)(x.g);return e.storagePath&&e.status===y.a.CLEAN?`${r}/chatbubble/${y.j}/attachment/${e.storagePath}?token=${n}`:t||e.sender!==y.l.USER?e.url:void 0}(t,d),h=!p;Object(a.useEffect)(()=>{n&&(u?o():r())},[u,n,o,r]);const m=Object(a.useMemo)(()=>{var e;return{imageUrl:p,altText:`Image ${t.name||`from ${null!==(e=null==t?void 0:t.sender)&&void 0!==e?e:"agent"}`}`}},[t,p]);return d?i.a.createElement(yn,{fromUser:u},i.a.createElement(xn,{avatar:c}),!f&&!h&&i.a.createElement(pn,{image:m,fromBot:!u,isCarousel:!1,shouldAnimate:!0,shouldAutoScroll:n,scrollToLatestMessage:r,scrollToBottom:o,imageWidth:"250",inView:!0,first:!1,loading:t.status===y.a.PROCESSING}),!f&&h&&i.a.createElement(vn,{isImage:d},i.a.createElement(Pt,null),i.a.createElement(Dt,{loading:!0})),f&&i.a.createElement(vn,null,i.a.createElement(Nt,null))):i.a.createElement(yn,{fromUser:u},i.a.createElement(xn,{avatar:c}),i.a.createElement(gn,{fromUser:u,$loading:h,hasError:f},i.a.createElement(At,{height:10}),i.a.createElement(Dt,{loading:!f&&h,opacity:.35}),!f&&!h&&i.a.createElement("a",{src:p,alt:t.name,href:p,target:"_blank",rel:"noreferrer"},t.name),!f&&h&&i.a.createElement("span",null,"Uploading"),f&&i.a.createElement(Nt,null)))},En=n(75),On=n(49),kn=n(106);function _n(e){let{children:t,carouselPosition:n,onTouchStart:r,onTouchMove:o,onTouchEnd:a}=e;return i.a.createElement(On.a.div,{transition:{ease:"easeInOut",duration:.3},animate:{x:n.get()},onTouchStart:r,onTouchMove:o,onTouchEnd:a},t)}function Cn(e){let{chatMessage:t,imageCarousel:n,shouldAutoScroll:r,scrollToLatestMessage:o,shouldAnimate:s}=e;const[c,l]=Object(a.useState)(0),u=Object(On.b)(0),d=y.h[t.image_carousel_size||1e3],[f,p]=Object(a.useState)(d);Object(a.useEffect)(()=>{let e=!0;if(n.length>0){const t=new Image;t.src=n[0].imageUrl,t.onload=()=>{const n=t.width/d,r=t.height/n;e&&p(r.toString())}}return()=>{e=!1}},[n,p,d]);const h=Object(a.useMemo)(()=>d===y.h[800]?102:d===y.h[600]?96:30,[d]),m=e=>d===y.h[600]&&c===e-1||c===e,g=Object(a.useCallback)((e,t)=>{if(e<0||e>=t.length)return;let n=0;n=e>=t.length-1?-(e*d-h):-(e*d+5*e),l(e),u.set(n)},[d,h,u]),{handleTouchStart:b,handleTouchMove:v,handleTouchEnd:x}=Object(kn.a)({carousel:n,index:c,setIndex:g});return i.a.createElement(Kt,{active:n.length>1},i.a.createElement(_n,{carouselPosition:u,onTouchStart:b,onTouchMove:v,onTouchEnd:x},n.map((e,a)=>i.a.createElement(pn,{key:e.id||a,first:0===a,image:e,fromBot:t.from_bot,isCarousel:n.length>1,shouldAnimate:s,shouldAutoScroll:r,scrollToLatestMessage:o,scrollToBottom:!1,inView:m(a),imageWidth:d,imageHeight:f}))),i.a.createElement(on,{previous:!0,disabled:c<=0,"aria-label":"Go to previous image",onClick:()=>g(c-1,n)}),i.a.createElement(an,{disabled:c<=0,width:24,height:24}),i.a.createElement(on,{next:!0,disabled:c>=n.length-1,"aria-label":"Go to next image",onClick:()=>g(c+1,n)}),i.a.createElement(sn,{disabled:c>=n.length-1,width:12,height:22}))}Cn.defaultProps={};var jn=Cn;const Tn=c.c.button.withConfig({displayName:"styles__EditButton",componentId:"sc-mhy5c2-0"})(["display:block;background:none;background-color:none;border:none;text-decoration:underline;font-weight:600;font-size:",";color:",";cursor:pointer;padding:0;",""],u.d.fontSizeP,e=>e.theme.userMessageText,m.a);var Sn=function(e){let{button:t}=e;const n=Object(s.c)(),r=Object(a.useCallback)(()=>n(Object(ue.lb)(t)),[t,n]);return i.a.createElement(Tn,{onClick:r},t.contact_details.edit_text)},In=n(172),An=n.n(In);const Nn=["form","input"],Pn=["target"],Mn=["action"];var Ln=e=>An.a.sanitize(e,{ADD_ATTR:Pn,FORBID_ATTR:Mn,FORBID_TAGS:Nn,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}});var Rn=function(e){return i.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ln(e)}})};const Dn=Object(c.d)(["0%{opacity:0;transform:translateY(6px);}60%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Bn=Object(c.b)(["",";animation-name:",";"],Object(w.a)(),Dn),Fn=c.c.div.withConfig({displayName:"styles__MessageBlock",componentId:"sc-zovgvh-0"})(["display:block;width:100%;"]),zn=(c.c.div.withConfig({displayName:"styles__MessageLines",componentId:"sc-zovgvh-1"})([""]),c.c.div.withConfig({displayName:"styles__MessageContent",componentId:"sc-zovgvh-2"})(["display:flex;flex-direction:column;",";",";"," ",""],Bn,e=>!e.fromBot&&"display: block;",e=>e.hasParentSiblings&&"margin-top: 8px;",e=>e.hasSiblings&&"margin-bottom: 8px;")),Un=c.c.div.withConfig({displayName:"styles__MessageLineContainer",componentId:"sc-zovgvh-3"})(["display:flex;flex-direction:column;",";",""],e=>{let{fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"},e=>e.hasSiblings&&"margin-bottom: 8px;"),Hn=Object(c.b)(["display:grid;grid-template-columns:auto auto;justify-content:flex-start;grid-gap:6px;position:relative;top:-30px;margin-bottom:-20px;margin-left:15px;"]),$n=c.c.div.withConfig({displayName:"styles__ButtonWrapper",componentId:"sc-zovgvh-4"})(["max-width:80%;display:flex;flex-direction:column;",";"," & > button,& > a{margin-bottom:6px;}"],Bn,e=>e.hasSuggestion&&Hn),Vn=Object(c.b)(["white-space:pre-wrap;color:",";background:",";:where(",":first-of-type:not(:only-of-type) &){border-radius:16px 16px 0px 16px;}:where(",":last-of-type:not(:only-of-type) &){border-radius:16px 0px 16px 16px;}:where(",":not(:first-of-type):not(:last-of-type) &){border-radius:16px 0px 0px 16px;}:where(",":only-of-type &){border-radius:16px;}"],e=>e.theme.userMessageText,e=>e.theme.userMessageBackground,Fn,Fn,Fn,Fn),qn=Object(c.b)(["color:",";background:",";&:first-child:not(:only-child){border-radius:16px 16px 16px 0px;}&:last-child:not(:only-child){border-radius:0px 16px 16px 16px;}&:not(:first-child):not(:last-child){border-radius:0px 16px 16px 0px;}&:only-child{border-radius:16px;}"],e=>e.theme.botMessageText,e=>e.theme.botMessageBackground),Gn=Object(c.b)(["margin-left:25px;white-space:pre-wrap;"]),Wn=Object(c.b)([":last-child{padding-bottom:34px;}"]),Yn=Object(c.b)(["position:relative;display:inline-block;max-width:80%;padding:10px 15px;margin:1px 0px;border:0;border-radius:16px;font-size:14px;line-height:18px;word-break:break-word;"," ",";",";",";"," p{margin:0;}"],e=>e.clickable&&"cursor: pointer;",e=>e.fromBot?qn:Vn,e=>e.fromAgent&&Gn,e=>e.hasSuggestion&&Wn,m.a),Kn=c.c.div.withConfig({displayName:"styles__MessageContainer",componentId:"sc-lv7lx6-0"})(["",""],Yn),Xn=c.c.a.withConfig({displayName:"styles__LinkMessageContainer",componentId:"sc-lv7lx6-1"})(["text-decoration:none;",""],Yn),Jn=c.c.div.withConfig({displayName:"styles__MessageAgent",componentId:"sc-lv7lx6-2"})(["width:20px;height:20px;left:-35px;bottom:0;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),Qn=[y.l.WEBHOOK,y.l.AGENT];function Zn(e){let{messageLine:t,children:n,chatMessage:r,fadeInLeft:o,fadeInRight:a,notLast:s,shouldAnimate:c=!1,hasSuggestion:l=!1}=e;const{bot_id:u,exchange_id:d}=r,f=`/workspace/${u}/build/${("usersays"===r.exchange_type?"dialogue":r.exchange_type).replace("_","-")}/${d}`;return i.a.createElement(Xn,{fromBot:r.from_bot,hasSuggestion:l,fadeInLeft:o,fadeInRight:a,notLast:s,shouldAnimate:c,clickable:!0,role:"link",tabIndex:"0",href:f},n||Rn(t))}var er=function(e){let{messageLine:t,chatMessage:n,lineIndex:r,numLines:o,editContactDetailsButton:a,children:c,shouldAnimate:l=!1,hasSuggestion:u=!1}=e;const{inPlatform:d}=Object(s.d)(x.e),{isTextDirectionRtl:f}=Object(s.d)(x.d),p=f?"rtl":void 0,h=d&&n.from_bot&&n.exchange_type&&!Object(G.a)(n.sender,Qn),m=n.sender===y.l.AGENT,g=r!==o-1||n.sender!==y.l.AGENT&&n.image_carousel&&!n.thon_image_above_text,b=n.from_bot;return h?i.a.createElement(Zn,{chatMessage:n,notLast:g,shouldAnimate:l,messageLine:t,hasSuggestion:u},c):i.a.createElement(Kn,{dir:p,fromAgent:m,fromBot:b,hasSuggestion:u,notLast:g,shouldAnimate:l},m&&!g&&i.a.createElement(Jn,{style:{backgroundImage:`url(${n.avatar})`}}),c||(b?Rn(t):t),!g&&a&&i.a.createElement(Sn,{button:a}))};const tr=c.c.div.withConfig({displayName:"styles__StatusMessage",componentId:"sc-gltcat-0"})(["display:flex;white-space:nowrap;font-size:12px;color:red;justify-content:flex-end;margin-bottom:2px;"]),nr=c.c.div.withConfig({displayName:"styles__StatusMessageButtonWrapper",componentId:"sc-gltcat-1"})(["display:flex;"]),rr=c.c.button.withConfig({displayName:"styles__StatusMessageButton",componentId:"sc-gltcat-2"})(["display:block;white-space:nowrap;font-size:12px;color:",";text-decoration:underline;background:none;border:none;padding:0;margin-bottom:2px;margin-left:4px;cursor:pointer;",""],u.a.darkColor,m.a);var or=function(e){let{chatMessage:t,attachments:n}=e;const r=Object(s.c)(),o=Boolean(t.message),c=(null==n?void 0:n.length)>0,l=Object(a.useCallback)(()=>{o&&r(Object(ue.J)(t.message,t.id))},[t,r,o]),u=Object(a.useCallback)(()=>{o?r(Object(ue.K)(t.message,t.id)):c&&r(Object(ue.fb)())},[t,r,c,o]);return t.status>=500?i.a.createElement(tr,null,c?"Upload failed":"Message not delivered"," ",i.a.createElement(nr,null,!c&&i.a.createElement(i.a.Fragment,null,i.a.createElement(rr,{onClick:l},"Try again"),i.a.createElement(rr,{onClick:u},"Restart chat")))):429===t.status?i.a.createElement(tr,null,"Too many messages, please slow down."," ",i.a.createElement(nr,null,i.a.createElement(rr,{onClick:l},"Try again"))):i.a.createElement(tr,null,"An error occurred. ",i.a.createElement(rr,{onClick:u},"Restart chat"))},ar=n(15),ir=n(27),sr=n(38);const cr=c.c.div.withConfig({displayName:"styles__AgentContainer",componentId:"sc-3baawv-0"})(["width:100%;margin:20px 0;",";"],w.d),lr=c.c.div.withConfig({displayName:"styles__AvatarContainer",componentId:"sc-3baawv-1"})(["display:flex;justify-content:center;align-items:center;"]),ur=c.c.span.withConfig({displayName:"styles__AvatarBorder",componentId:"sc-3baawv-2"})(["height:1px;width:100%;background:",";background-color:",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),dr=c.c.div.withConfig({displayName:"styles__AgentAvatar",componentId:"sc-3baawv-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin:0 15px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),fr=c.c.p.withConfig({displayName:"styles__AgentName",componentId:"sc-3baawv-4"})(["font-size:",";margin:0;margin-top:5px;text-align:center;color:",";span{font-weight:500;}"],u.d.fontSizeSmall,e=>Object(sr.a)(e.theme.background,u.a.grayColor,u.a.darkColor));var pr=function(e){let{chatMessage:t}=e;const n=t.system_dialogue_message_type===y.p.END,{currentLanguage:r}=Object(s.d)(x.e),{text:o}=Object(s.d)(x.d),{defaultLanguage:c}=Object(ar.a)(),{names:l,avatars:u}=Object(s.d)(x.a),{agent_joined_text:d,agent_left_text:f}=Object(a.useMemo)(()=>Object(ir.a)(o,r,c),[r,c,o]),p=t.avatar||u[u.length-1],h=t.name||l[l.length-1];return i.a.createElement(cr,null,i.a.createElement(lr,null,i.a.createElement(ur,null),i.a.createElement(dr,{style:{backgroundImage:`url(${p})`}}),i.a.createElement(ur,null)),i.a.createElement(fr,null,i.a.createElement("span",null,h||"An agent")," ",n?f:d))};n(65);var hr=function(e){let{preface:t,message:n,chatMessage:r,numLines:o,buttonHandlers:a,buttons:s=[]}=e;return i.a.createElement(i.a.Fragment,null,i.a.createElement(Un,{fromBot:!0},i.a.createElement(er,{chatMessage:r,lineIndex:0,numLines:o,hasSuggestion:!0},i.a.createElement("strong",null,t),i.a.createElement("br",null),n)),i.a.createElement($n,{hasSuggestion:!0},s.map((e,t)=>i.a.createElement(En.a,{key:`suggestion-button-${r.id}-${t}`,button:e,chatMessage:r,type:"button",handlers:a,hasSuggestion:!0}))))};const mr="\n background: black;\n border-radius: 15px;\n",gr=c.c.iframe.withConfig({displayName:"styles__IframeEmbed",componentId:"sc-10j1ec7-0"})(["",""],mr),br=c.c.video.withConfig({displayName:"styles__HTML5Video",componentId:"sc-10j1ec7-1"})(["",""],mr);var vr=function(e){let{source:t}=e;const n=t.split(".").pop();return i.a.createElement(br,{width:"240",controls:!0,"data-chromatic":"ignore"},i.a.createElement("source",{src:t,type:`video/${n}`}),"Your browser does not support HTML5 video.")};var yr=function(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?i.a.createElement(gr,{src:`https://player.vimeo.com/video/${n[2]}?title=0&byline=0&portrait=0`,width:"240",height:"auto",frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0,"data-chromatic":"ignore",title:"Vimeo video player"}):null};const xr=e=>e.replace("?t=","?start=").replace("&t=","&start=");var wr=function(e){let{source:t}=e;const n=(e=>{const t=e.toLowerCase();let n=e;return Object(G.a)("youtube.com",t)?(n=e.replace("&","?"),n=xr(n),n.split("v=")[1]):Object(G.a)("youtu.be",t)?(n=xr(e),n.split("youtu.be/")[1]):n})(t);return i.a.createElement(gr,{width:"240",height:"auto",src:`https://www.youtube.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-chromatic":"ignore",title:"YouTube video player"})};var Er=function(e){let{source:t}=e;return Object(G.a)("youtube.com",t)||Object(G.a)("youtu.be",t)?i.a.createElement(wr,{source:t}):Object(G.a)("vimeo.com",t)?i.a.createElement(yr,{source:t}):i.a.createElement(vr,{source:t})},Or=n(99);function kr(e){let{width:t,height:n,color:r}=e;return i.a.createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},i.a.createElement("path",{d:"M6.5 6a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 12a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 18a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r,strokeLinecap:"round",strokeLinejoin:"round"}),i.a.createElement("path",{d:"M9.75 6h8.5M9.75 12h8.5M9.75 18h8.5",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}kr.defaultProps={width:24,height:24,color:"#333"};var _r=kr,Cr=n(22),jr=n(45),Tr=n(95);const Sr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"SUBMITTED";return async(r,o)=>{const{connection:{token:a}}=o(),{PAT_HOST:i}=o().environment,{headers:s}=Object(ue.p)({token:a},{withCurrentUrl:!0}),c={submission_id:e,context:t,state:n};return r(Object(ue.pb)({method:"post",url:`${i}/chatbubble/${y.j}/form/submit`,data:c,headers:s}))}};var Ir=n(111),Ar=n(81),Nr=n(20),Pr=n(107),Mr=n(35);const Lr=c.c.div.withConfig({displayName:"styles__FormStateViewWrapper",componentId:"sc-6n3m85-0"})(["display:flex;flex-direction:column;"]),Rr=c.c.div.withConfig({displayName:"styles__FormStateMessage",componentId:"sc-6n3m85-1"})(["font-size:",";font-weight:500;margin-top:16px;"],u.d.fontSizeP),Dr=c.c.div.withConfig({displayName:"styles__FormStateDataWrapper",componentId:"sc-6n3m85-2"})(["display:flex;flex-direction:column;"]),Br=c.c.div.withConfig({displayName:"styles__FormStateDataField",componentId:"sc-6n3m85-3"})(["display:flex;flex-direction:column;margin-top:16px;"]),Fr=c.c.div.withConfig({displayName:"styles__FormStateDataTitle",componentId:"sc-6n3m85-4"})(["font-size:",";"],u.d.fontSizeP),zr=c.c.div.withConfig({displayName:"styles__FormStateDataValue",componentId:"sc-6n3m85-5"})(["font-weight:500;margin-top:4px;font-size:",";display:flex;flex-direction:row;align-items:center;"],u.d.fontSizeP),Ur=c.c.div.withConfig({displayName:"styles__FormStateAffix",componentId:"sc-6n3m85-6"})(["padding:",";"],e=>{let{position:t}=e;return"left"===t?"0 6px 0 0":"0 0 0 6px"});var Hr=function(e){let{state:t,message:n,data:r}=e;return i.a.createElement(Lr,null,t!==Nr.b.SUBMITTED&&n&&i.a.createElement(Rr,null,n),t===Nr.b.SUBMITTED&&r.length>0&&i.a.createElement(Dr,null,r.map(e=>{return e.value?i.a.createElement(Br,{key:e.name},i.a.createElement(Fr,null,e.label),i.a.createElement(zr,null,"PREFIX"===e.affix&&e.affixValue?i.a.createElement(Ur,{position:"left"},e.affixValue):null,Array.isArray(e.value)?(t=e.value).length>0?t.map(e=>i.a.createElement("div",{key:e.name},e.label)):null:e.value,"SUFFIX"===e.affix&&e.affixValue?i.a.createElement(Ur,{position:"right"},e.affixValue):null)):null;var t})))};const $r=i.a.lazy(()=>Promise.resolve().then(n.bind(null,248)));var Vr=function(e){var t,n,r,o,c,l,u,d,f,p;let{formData:h,onSubmit:m,onCancel:g}=e;const b=Object(s.c)(),v=Object(s.d)(x.i),{current:y}=Object(a.useRef)(Object(Pr.a)(h.id,h.submission_id)),{currentLanguage:w}=Object(s.d)(x.e);Object(a.useEffect)(()=>{var e,t,n;null==h||!h.id||null!=v&&v[y]?(null==v||null===(e=v[y])||void 0===e?void 0:e.formSubmitState)!==Nr.b.UNANSWERED||null!=v&&null!==(t=v[y])&&void 0!==t&&t.formCompleteMessage||!h.texts.unanswered_text||b(Object(ue.S)({...v[y],formCompleteMessage:h.texts.unanswered_text})):b(Object(ue.S)({formId:h.id,formSubmissionId:h.submission_id,formSubmitState:Nr.b.ACTIVE,formCompleteMessage:"",formKey:y,formValue:(null==v||null===(n=v[y])||void 0===n?void 0:n.formValue)||h.fields.reduce((e,t)=>({...e,[`${t.slug}`]:""}),{})}))},[b,h,w,v,y]);const E=Object(a.useCallback)(e=>{var t,n,r,o,a;return e.input_type===Nr.a.SELECT?(null===(r=e.attributes.options.find(t=>{var n,r;return t.value===(null==v||null===(n=v[y])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])}))||void 0===r?void 0:r.label)||(null==v||null===(o=v[y])||void 0===o||null===(a=o.formValue)||void 0===a?void 0:a[e.slug]):null==v||null===(t=v[y])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug]},[y,v]);return i.a.createElement(Ar.d,null,(null===(t=h.texts)||void 0===t?void 0:t.title)&&i.a.createElement(Ar.c,null,i.a.createElement(_r,{width:20,height:20})," ",null===(n=h.texts)||void 0===n?void 0:n.title),(null==v||null===(r=v[y])||void 0===r?void 0:r.formSubmitState)&&(null==v||null===(o=v[y])||void 0===o?void 0:o.formSubmitState)!==Nr.b.ACTIVE&&i.a.createElement(Hr,{state:v[y].formSubmitState,message:v[y].formCompleteMessage,data:(()=>{var e,t;if(null!=h&&h.fields&&(null==v||null===(e=v[y])||void 0===e?void 0:e.formSubmitState)===Nr.b.SUBMITTED&&null!=v&&null!==(t=v[y])&&void 0!==t&&t.formValue)return h.fields.reduce((e,t)=>{var n,r;return t.input_type===Nr.a.CHECKBOX&&t.list?[...e,{name:`checkbox_list_${t.slug}`,label:null===(r=t.texts)||void 0===r?void 0:r.label,value:t.list.reduce((e,t)=>{var n,r;const o=null==v||null===(n=v[y])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[t.slug];var a;return"boolean"==typeof o&&o||"string"==typeof o&&o.trim()?[...e||[],{name:t.slug,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:o}]:e},null)}]:[...e,{affix:t.affix,affixValue:t.texts.affix_value,name:t.slug,label:null===(n=t.texts)||void 0===n?void 0:n.label,value:E(t)}]},[]).sort(e=>e.order)})()}),(null==v||null===(c=v[y])||void 0===c?void 0:c.formSubmitState)===Nr.b.ACTIVE&&i.a.createElement(a.Suspense,{fallback:i.a.createElement(Cr.a,null)},i.a.createElement($r,{onCancel:async e=>{var t;return g&&g(e),await b(Sr(h.submission_id,null==v?void 0:v[y].formValue,Nr.b.CANCELED)),await b(Object(ue.qb)(h.cancel_dialogue_id,{languageCode:w})),b(Object(ue.S)({formKey:y,formId:h.id,formSubmitState:Nr.b.CANCELED,formCompleteMessage:null===(t=h.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:null==v||null===(l=v[y])||void 0===l?void 0:l.formValue,onSubmit:async e=>{m&&m(e);const t={};var n;return Object.entries(e).filter(e=>{let[t,n]=e;return!!n}).forEach(e=>{let[n,r]=e;t[n]=r}),null===await b(Sr(h.submission_id,t))?b(Object(ue.S)({formKey:y,formId:h.id,formSubmitState:Nr.b.ERRORED,formCompleteMessage:null===(n=h.texts)||void 0===n?void 0:n.error_text,formValue:e})):(await b(Object(ue.qb)(h.submit_dialogue_id,{languageCode:w})),b(Object(ue.S)({formKey:y,formId:h.id,formSubmitState:Nr.b.SUBMITTED,formValue:e})))},ariaLabel:null===(u=h.texts)||void 0===u?void 0:u.title,sendButtonTitle:null===(d=h.texts)||void 0===d?void 0:d.submit_button_text,cancelButtonTitle:null===(f=h.texts)||void 0===f?void 0:f.cancel_button_text},null===(p=h.fields)||void 0===p?void 0:p.map((e,t)=>{var n,r,o,a;return i.a.createElement(Ir.a,{className:0!==t||null!==(n=h.texts)&&void 0!==n&&n.title?void 0:"no-margin",key:`form_field_${y}_${e.order}`,helperText:null===(r=e.texts)||void 0===r?void 0:r.help_text,required:e.required,hasTitle:null===(o=h.texts)||void 0===o?void 0:o.title,label:null===(a=e.texts)||void 0===a?void 0:a.label,slug:e.slug},(e=>{var t,n,r,o,a,s,c;if(e)switch(e.input_type){case Nr.a.CHECKBOX:return i.a.createElement(Tr.a,{name:`checkbox_list_${e.slug}`,list:e.list,formId:h.id,validators:Object(Mr.a)(e,w),currentLanguage:w});case Nr.a.RANGE:return i.a.createElement(jr.e,{controller:!0,value:parseFloat(null==v||null===(t=v[y])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug])||(null===(r=e.attributes)||void 0===r?void 0:r.defaultValue)||e.step,name:e.slug,step:null===(o=e.attributes)||void 0===o?void 0:o.step,affix:e.affix,affixValue:null===(a=e.texts)||void 0===a?void 0:a.affix_value,validators:Object(Mr.a)(e,w),ariaLabel:null===(s=e.texts)||void 0===s?void 0:s.label});case Nr.a.SELECT:return i.a.createElement(jr.d,{options:null===(c=e.attributes)||void 0===c?void 0:c.options,placeholder:e.texts.placeholder_text,validators:Object(Mr.a)(e,w),name:e.slug});default:return i.a.createElement(jr.c,{placeholder:e.texts.placeholder_text,type:e.input_type,adornment:e.affix&&e.texts.affix_value?e.texts.affix_value:void 0,adornmentPosition:"PREFIX"===e.affix?"start":"end",validators:Object(Mr.a)(e,w),name:e.slug})}return null})(e))}))))};const qr=e=>e,Gr=e=>{let{button_type:t}=e;return t===y.b.edit_contact_details?"editContactDetails":"regularButtons"};var Wr=function(e){var t,n,r,o;let{chatMessage:c,scrollToLatestMessage:l,scrollToBottom:u,shouldAutoScroll:d,buttonHandlers:f,messageCounter:p}=e;const h=Object(s.c)(),[m,g]=Object(a.useState)([]),{lastMessageSeen:b,attachments:v=[]}=Object(s.d)(x.n),w=c.sender?c.sender===y.l.USER:!c.from_bot;let E=[];c.message&&(E=c.from_bot?c.message.split(/\n\s*\n/).map(e=>e.trim()):[c.message]);const{regularButtons:O,editContactDetails:k}=Object(a.useMemo)(()=>Object(Or.a)(c.buttons,Gr),[c.buttons]),_=Object(a.useMemo)(()=>{var e;return null==c||null===(e=c.buttons)||void 0===e?void 0:e.filter(e=>e.button_type===y.b.CHECKBOX.toLowerCase()||e.button_type===y.b.SLIDER.toLowerCase())},[c]),C=(null==c?void 0:c.image_carousel)||(null==c?void 0:c.video_source),j=c.system_dialogue_message_type===y.p.REQUEST,T=null==c||null===(t=c.buttons)||void 0===t?void 0:t.filter(e=>e.button_type===y.b.CHECKBOX.toLowerCase()),S=(e=>{let{root:t=null,threshold:n=1,onChange:r,skip:o=!1}=e;const[i,s]=Object(a.useState)(null),c=Object(a.useRef)(null);return Object(a.useEffect)(()=>{if(o)return;c.current&&c.current.disconnect(),c.current=new IntersectionObserver(r,{root:t,threshold:n});const{current:e}=c;return i&&e.observe(i),()=>e.disconnect()},[i,t,r,o,n]),s})({onChange:Object(a.useCallback)(e=>{let[{isIntersecting:t}]=e;!t||(null==b?void 0:b.index)>=p||h(Object(ue.U)(c.id,p))},[c.id,h,b,p]),threshold:.95,skip:w}),I=Object(a.useCallback)(e=>{const t=m.find(t=>t.id===e.id);g(t?m.filter(t=>t.id!==e.id):[...m,e])},[m]),A=Object(a.useMemo)(()=>{var e,t;return[...null!==(e=c.attachments)&&void 0!==e?e:[],...(null!==(t=c.attachment_ids)&&void 0!==t?t:[]).map(e=>{return v.find((t=e,function(){let{id:e,temporaryId:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e===t||n===t}));var t}).filter(qr)]},[v,c.attachments,c.attachment_ids]),N=Boolean(c.message||(null==A?void 0:A.length)||(null===(n=c.buttons)||void 0===n?void 0:n.length)||(null===(r=c.image_carousel)||void 0===r?void 0:r.length));return c.system_dialogue_message_type===y.p.START||c.system_dialogue_message_type===y.p.END?i.a.createElement(zn,{ref:S,fromBot:!0},i.a.createElement(pr,{chatMessage:c})):i.a.createElement(Fn,{ref:S,"data-cy":"message-block"},i.a.createElement(zn,{fromBot:c.from_bot,hasSiblings:T,hasParentSiblings:j},c.image_carousel&&c.thon_image_above_text&&i.a.createElement("div",null,i.a.createElement(jn,{imageCarousel:c.image_carousel,chatMessage:c,thonAbove:!0,scrollToLatestMessage:l,shouldAutoScroll:d})),i.a.createElement(Un,{fromBot:c.from_bot,hasSiblings:C},E.map((e,t)=>i.a.createElement(er,{key:`chatMessage-${t}`,chatMessage:c,messageLine:e,lineIndex:t,numLines:E.length,editContactDetailsButton:null==k?void 0:k[0]}))),c.image_carousel&&!c.thon_image_above_text&&i.a.createElement("div",null,i.a.createElement(jn,{imageCarousel:c.image_carousel,chatMessage:c,scrollToLatestMessage:l,shouldAutoScroll:d})),A.map(e=>i.a.createElement("div",{key:e.id},i.a.createElement(wn,{attachment:e,shouldAutoScroll:d,scrollToLatestMessage:l,scrollToBottom:u,avatar:c.avatar,chatMessageStatus:c.status,shouldAnimate:!0}))),c.video_source&&i.a.createElement(Er,{source:c.video_source}),(null===(o=c.form)||void 0===o?void 0:o.fields)&&i.a.createElement(Vr,{formData:c.form})),i.a.createElement($n,null,(null==O?void 0:O.length)>0&&O.map(e=>i.a.createElement(En.a,{key:e.id,button:e,chatMessage:c,type:"button",handlers:f,checked:m,setCheckboxValue:I,submitButtonsList:_}))),((null==c?void 0:c.suggestions)||[]).map(e=>{let{preface:t,message:n,buttons:r}=e;return i.a.createElement(hr,{key:c.id,chatMessage:c,numLines:E.length,preface:t,message:n,buttons:r})}),N&&c.status&&i.a.createElement(or,{chatMessage:c,attachments:A}))},Yr=n(108);var Kr=function(e){return i.a.createElement("svg",Object.assign({},e,{viewBox:"0 0 82 82",xmlns:"http://www.w3.org/2000/svg"}),i.a.createElement("title",null,"Bot Avatar"),i.a.createElement("g",{transform:"translate(1 1)",fill:"none",fillRule:"evenodd"},i.a.createElement("circle",{stroke:"#F3F3F4",strokeWidth:"2",fill:"#FFF",cx:"40",cy:"40",r:"40"}),i.a.createElement("path",{d:"M30.64 35.4a4.27 4.27 0 11-8.54 0 4.27 4.27 0 018.54 0M50.17 35.4a4.27 4.27 0 108.54 0 4.27 4.27 0 00-8.54 0",fill:"#000"}),i.a.createElement("path",{d:"M29.42 60.83a17.42 17.42 0 0022.38 0",stroke:"#DA3CFF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),i.a.createElement("path",{d:"M16 29.03a12.39 12.39 0 0113.15-5.31 12.24 12.24 0 019.45 10.49v15.64h5.47M44.88 23.2H64",stroke:"#0069FF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})))},Xr=n(37);const Jr=Object(c.d)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Qr=Object(c.b)(["",";animation-name:",";"],Object(w.a)(600),Jr),Zr=Object(c.d)(["0%{opacity:1;transform:translateY(0px);}50%{opacity:1;transform:translateY(-6px);}80%{transform:translateY(2px);}100%{opacity:0;transform:translateY(2px);}"]),eo=Object(c.b)(["",";animation-name:",";"],Object(w.a)(300),Zr),to=c.c.div.withConfig({displayName:"styles__NewMessageContainer",componentId:"sc-1n499zd-0"})(["position:absolute;z-index:3;bottom:90px;left:50%;transform:translateX(-50%);transition:opacity 300ms ease 300ms;opacity:",";"],e=>e.show?"1":"0"),no=c.c.div.withConfig({displayName:"styles__NewMessageInner",componentId:"sc-1n499zd-1"})(["opacity:0;border-radius:100px;color:#2c2c2c;background:#fff;background-color:#fff;border:1px solid ",";box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);cursor:pointer;display:flex;align-items:center;justify-content:",";min-width:35px;max-width:205px;width:","px;height:","px;",";",";svg{",";path{",";}}"],Object(Xr.a)(.08,"#fff"),e=>e.hasUnread?"flex-start":"center",e=>e.hasUnread?"unset":"35",e=>e.hasUnread?"42":"35",e=>!e.show&&Object(w.h)(800),e=>e.show?Qr:eo,e=>e.hasUnread&&"min-width: 24px",e=>!e.hasUnread&&`stroke: ${e.theme.buttonBackground}`),ro=c.c.div.withConfig({displayName:"styles__StyledAvatar",componentId:"sc-1n499zd-2"})(["border-radius:100px;min-width:24px;width:24px;height:24px;background-image:url(",");background-size:contain;background-repeat:no-repeat;background-position:center;"],e=>e.avatar),oo=c.c.span.withConfig({displayName:"styles__Message",componentId:"sc-1n499zd-3"})(["color:#2c2c2c;font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:8px;"]);function ao(e){let{message:t}=e;const{avatar:n}=Object(s.d)(x.d),{takenOver:r,avatars:o}=Object(s.d)(x.a),a=r?o[o.length-1]:n,c=t.replace(/(<[^>]*>)|&nbsp;/g,"");return i.a.createElement(i.a.Fragment,null,a?i.a.createElement(ro,{avatar:a}):i.a.createElement(Kr,{height:24,width:24}),i.a.createElement(oo,null,c))}var io=function(e){let{chatMessages:t,hasUnreadMessage:n,shouldAutoScroll:r,scrollToBottom:o}=e;const[s,c]=Object(a.useState)(!1),[l,u]=Object(a.useState)(!1),d=(e=>{const t=(e||[]).length,n=e[t-1];return Object(a.useMemo)(()=>t>1&&n.from_bot?n:e[t-2],[e,n,t])||{}})(t);return Object(a.useEffect)(()=>{l&&r&&u(!1)},[l,r]),Object(a.useEffect)(()=>{const e=setTimeout(()=>{r||c(!0)},600);return r&&c(!1),()=>clearTimeout(e)},[r]),i.a.createElement(to,{show:s},i.a.createElement(no,{hasUnread:n&&Boolean(d.message),show:s&&!l,onClick:()=>{u(!0),o()},"data-testid":"chat-new-message"},n&&Boolean(d.message)?i.a.createElement(ao,{message:d.message}):i.a.createElement(Yr.a,null)))},so=n(58),co=n.n(so);const lo=c.c.div.withConfig({displayName:"styles__QueueContainer",componentId:"sc-k9za8a-0"})(["left:0;right:0;z-index:15;position:absolute;background:",";background-color:",";box-shadow:0px 3px 4px -1px ",";",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,u.a.shadowColor,w.c),uo=c.c.div.withConfig({displayName:"styles__MessageContainer",componentId:"sc-k9za8a-1"})(["display:flex;padding:5px 18px;justify-content:space-between;align-items:center;border-top:1px solid rgba(0,0,0,0.1);"]),fo=Object(c.c)(P.b).withConfig({displayName:"styles__QueueText",componentId:"sc-k9za8a-2"})(["margin:0;color:",";span{font-weight:600;}font-size:",";font-weight:normal;line-height:24px;"],e=>e.theme.headerText,u.d.fontSizeH5),po=Object(c.c)(fe.d).withConfig({displayName:"styles__QueueLink",componentId:"sc-k9za8a-3"})(["color:",";"],e=>e.theme.headerText),ho=Object(c.d)(["from{background-position:-180px;}to{background-position:180px;}"]),mo=Object(c.d)(["from{background-position:180px;}to{background-position:-180px;}"]),go=c.c.div.withConfig({displayName:"styles__LoadingContainer",componentId:"sc-k9za8a-4"})(["position:relative;border:0;"]),bo=c.c.span.withConfig({displayName:"styles__Loader",componentId:"sc-k9za8a-5"})(["opacity:1;height:3px;width:100%;top:3;position:absolute;background-image:linear-gradient( 90deg,rgba(255,255,255,0) 25%,"," 45%,"," 55%,rgba(255,255,255,0) 75% );animation:1.3s linear "," infinite 0s;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>{let{hasCancelled:t}=e;return t?mo:ho});function vo(e){let{waitTime:t,takeoverQueueText:n}=e;return t?i.a.createElement(i.a.Fragment,null,"Estimated wait time: ",i.a.createElement("span",null,t," min")):n}var yo=function(){const[e,t]=Object(a.useState)(null),[n,r]=Object(a.useState)(!1),{SAGE_HOST:o}=Object(s.d)(x.g),{currentLanguage:c}=Object(s.d)(x.e),{id:l,text:u,showTakeoverQueue:d}=Object(s.d)(x.d),{defaultLanguage:f}=Object(ar.a)(),p=Object(s.c)(),{takeover_queue_text:h,takeover_queue_link:m,leave_queue_text:g,leave_queue_link:b}=Object(a.useMemo)(()=>Object(ir.a)(u,c,f),[c,f,u]);return Object(a.useEffect)(()=>{d&&co.a.get(`${o}/api/v1/stats/bot/${l}/public/current_wait_time?sources%5B%5D=web`).then(e=>{const{data:{data:{mean:n,n:r}}}=e;if(r<3)return void t(null);const o=Math.round((n/60).toFixed(2));o>1&&t(o)})},[o,l,d]),Object(a.useEffect)(()=>{const e=setTimeout(()=>{n&&p(Object(ue.d)())},3e3);return n||clearTimeout(e),()=>clearTimeout(e)},[n,p]),d?i.a.createElement(lo,null,i.a.createElement(uo,{"aria-live":"polite","aria-atomic":"true","data-cy":"takeover-queue"},n?i.a.createElement(i.a.Fragment,null,i.a.createElement(fo,null,g),i.a.createElement(po,{onClick:()=>r(!1),"data-cy":"takeover-queue-link"},b)):i.a.createElement(i.a.Fragment,null,i.a.createElement(fo,null,i.a.createElement(vo,{waitTime:e,takeoverQueueText:h})),i.a.createElement(po,{onClick:()=>r(!0),"data-cy":"takeover-queue-link"},m))),i.a.createElement(go,null,i.a.createElement(bo,{hasCancelled:n}))):null};const xo=c.c.div.withConfig({displayName:"styles__BodyContainer",componentId:"sc-1vymaz1-0"})(["width:100%;min-width:100%;overflow-y:auto;padding:0 30px;height:100%;overflow-x:hidden;background:",";background-color:",";overscroll-behavior:contain;",""],e=>e.theme.background,e=>e.theme.background,m.a),wo=c.c.div.withConfig({displayName:"styles__ChatBoxMessages",componentId:"sc-1vymaz1-1"})(["min-height:100%;display:flex;flex-direction:column;justify-content:flex-end;"]);let Eo,Oo=!1;var ko=function(e){let{setBodyRef:t,setBottomRef:n,setTopRef:r,scrollToBottom:o,scrollToLatestMessage:c,shouldAutoScroll:l,onUserScroll:u,buttonHandlers:d,hasUnreadMessage:f,setGroupRef:p}=e;const[h,m]=Object(a.useState)(!1),{requestedTakeover:g,takeoverClosed:b,takenOver:v,isTyping:w}=Object(s.d)(x.a),{isTyping:E}=Object(s.d)(x.d),{active:O,currentLanguage:k,botKey:_}=Object(s.d)(x.e),{currentMessageId:C,inspectorOpen:j}=Object(s.d)(x.j),T=Object(s.c)(),{chatMessages:S}=Object(s.d)(x.n)||[],I=(e=>{let t=null,n=null,r=!1;const o=[];return e.forEach(e=>{e.from_bot===t&&e.name===n&&e.from_webhook===r&&e.handler!==y.f.TRIGGER_DIALOGUE?o[o.length-1].push(e):o.push([e]),t=e.from_bot,n=e.name,r=e.from_webhook}),o})(S);Object(a.useEffect)(()=>{Oo!==v&&v?(Eo=k,Oo=v):void 0===Eo||Eo===k||v||(T(Object(ue.fb)(_,!0)),Eo=void 0,Oo=void 0)},[b,v,g,_,k,T]),Object(a.useEffect)(()=>{O&&S.length>0?m(!0):m(!1)},[O,S.length]);let A=0;return i.a.createElement(xo,{ref:t,onScroll:u,tabIndex:"0","data-testid":"chat-body-container"},g&&!b&&!v&&i.a.createElement(yo,null),i.a.createElement(wo,{role:"log","aria-live":"polite","data-cy":"chat-log"},I.map((e,t)=>{const n=j&&((e,t,n)=>{var r;const o=e||(null===(r=t.slice(-1)[0])||void 0===r?void 0:r.id);return!!n.find(e=>{let{id:t}=e;return o===t})})(C,S,I[t]);return i.a.createElement(i.a.Fragment,{key:`message-group-${t}`},i.a.createElement(It,{fromAgent:e[0].sender===y.l.AGENT,fromBot:e[0].from_bot,created:e[0].created,inspected:n,setGroupRef:p},e.map((n,a)=>{const s=t===I.length-1&&a===e.length-1;return A+=1,i.a.createElement(i.a.Fragment,{key:`${n.id}_${A}`},s&&i.a.createElement("span",{ref:r}),i.a.createElement(Wr,{chatMessage:n,scrollToBottom:o,scrollToLatestMessage:c,shouldAutoScroll:l,buttonHandlers:d,messageCounter:A}))})))}),(w||E)&&i.a.createElement(Vt,null),i.a.createElement("div",{ref:n})),h&&i.a.createElement(io,{chatMessages:S,hasUnreadMessage:f,shouldAutoScroll:l,scrollToBottom:o}))};var _o=function(e){let{children:t,animate:n}=e;return i.a.createElement(On.a.div,{variants:{normal:{x:0},error:{x:[0,2,-2,0]}},animate:n},t)};const Co=c.c.div.withConfig({displayName:"styles__InputLimitContainer",componentId:"sc-18r5r1u-0"})(["height:20px;display:flex;opacity:0.8;align-items:center;margin-bottom:10px;justify-content:space-between;",""],e=>!e.enabled&&`margin-bottom: 15px; height: 10px; border-bottom: 1px solid ${u.a.grayColor}`),jo=c.c.div.withConfig({displayName:"styles__FillContainer",componentId:"sc-18r5r1u-1"})(["width:",";height:1px;transition:all ease 0.3s;span{height:100%;display:block;}span:first-child{width:100%;opacity:0.3;background:",";background-color:",";}span:last-child{margin-top:-1px;width:","%;background:",";background-color:",";}"],e=>e.active?"calc(100% - 50px)":"100%",e=>{let{theme:t}=e;return t.chatLogElements},e=>{let{theme:t}=e;return t.chatLogElements},e=>e.width>100?100:e.width,e=>{let{theme:t}=e;return t.chatLogElements},e=>{let{theme:t}=e;return t.chatLogElements}),To=Object(c.c)(P.f).withConfig({displayName:"styles__CountContainer",componentId:"sc-18r5r1u-2"})(["margin:0;opacity:1;display:",";color:",";span{font-weight:500;}",";"],e=>e.active?"block":"none",e=>{let{theme:t}=e;return t.chatLogElements},w.e);var So=function(e){let{alwaysShow:t,inputMax:n,inputLength:r,shake:o}=e;const a=Math.floor(r/n*100),s=r>0,c=t||r>n;return i.a.createElement(Co,{enabled:c,active:s},c&&i.a.createElement(i.a.Fragment,null,i.a.createElement(jo,{active:s,width:a},i.a.createElement("span",null),i.a.createElement("span",null)),i.a.createElement(_o,{initial:!1,animate:o?"error":"normal"},i.a.createElement(To,{active:s},i.a.createElement("span",null,r),"/",n))))},Io=n(25);const Ao=c.c.div.withConfig({displayName:"styles__UploadWrapper",componentId:"sc-1e637pi-0"})(["button{padding:0;}&:hover{opacity:0.8;}svg{margin-top:3px;path{fill:",";}}"],e=>{let{theme:t}=e;return t.buttonBackground}),No=["Bytes","kB","MB","GB"],Po=e=>new Promise((t,n)=>{const r=e.size/1024;if(r>5120)return void n(new Error(`The file must be less than ${function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/1024**n).toFixed(t))} ${No[n]}`}(5242880)}`));const o=new FileReader;o.readAsDataURL(e),o.onload=()=>t({url:o.result,file:e,sizeKb:r,name:e.name,type:e.type,status:y.a.PROCESSING,sender:y.l.USER}),o.onabort=()=>n(new Error(o.error))});var Mo=function(e){let{accept:t="image/*,text/*,.pdf,.heic",multiple:n=!0}=e;const{handoverMode:r,isTextDirectionRtl:o}=Object(s.d)(x.d),{takenOver:c}=Object(s.d)(x.a),{attachments:l}=Object(s.d)(x.e),u=Object(s.c)(),d=Object(a.useRef)(),f=Object(Io.a)(),p=c&&r===y.g.PLATFORM,h=Object(a.useCallback)(async e=>{let{target:t}=e;try{var n;if((null===(n=t.files)||void 0===n?void 0:n.length)>5)return void u(Object(ue.Y)("You can upload up to 5 files at a time",3500));const e=await Promise.all(Array.from(t.files).map(Po));u(Object(ue.P)(e))}catch(e){u(Object(ue.Y)(e.message.replace(/^Error: ?/i,""),3500))}},[u]),m=Object(a.useCallback)(()=>{d.current&&(d.current.value="",d.current.click())},[d]);return Object(a.useEffect)(()=>{l.buttonClicked&&(u(Object(ue.a)()),m())},[l.buttonClicked,u,m]),i.a.createElement(Ao,{isTextDirectionRtl:o,hasFiles:l.files.length>0},(p||f&&(null==l?void 0:l.exchangeId))&&i.a.createElement(fe.a,{onClick:e=>{e.preventDefault(),e.stopPropagation(),m()}},i.a.createElement(At,null)),i.a.createElement("input",{ref:d,hidden:!0,type:"file",accept:t,multiple:n,onChange:h,style:{display:"none"}}))};const Lo=c.c.div.withConfig({displayName:"styles__Container",componentId:"sc-76oby0-0"})(["display:flex;align-items:center;font-size:15px;> div{position:relative;overflow:visible;}span{border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:8px;}button{display:none;position:absolute;top:-9px;left:-8px;border:1px solid white;border-radius:50%;width:20px;height:20px;padding:0px;background:",";}"],u.a.darkColor),Ro=c.c.div.withConfig({displayName:"styles__AttachmentWrapper",componentId:"sc-76oby0-1"})(["height:41px;&:not(:first-child){margin-left:4px;}&:hover{button{display:block;}}"]),Do=c.c.div.withConfig({displayName:"styles__ImageWrapper",componentId:"sc-76oby0-2"})(["height:41px;display:flex;img{border-radius:8px;max-height:100%;margin-left:4px;}"]),Bo=c.c.div.withConfig({displayName:"styles__IconWrapper",componentId:"sc-76oby0-3"})(["height:100%;padding:8px;border-radius:8px;background:",";"],u.a.grayColor);c.c.div.withConfig({displayName:"styles__FileType",componentId:"sc-76oby0-4"})(["font-size:14px;height:41px;padding:0 4px;background:",";border-radius:8px;display:flex;align-items:center;margin-left:4px;"],u.a.grayColor);var Fo=function(e){let{file:t}=e;return hn(t)===y.e.IMAGE?i.a.createElement(Do,null,i.a.createElement("img",{src:t.url,alt:`Uploaded ${t.name}`})):i.a.createElement(Bo,null,i.a.createElement(At,{height:24}))};var zo=function(){const{attachments:{files:e}}=Object(s.d)(x.e),t=Object(s.c)(),n=Object(a.useCallback)(n=>t(Object(ue.P)(((e,t)=>{const n=e.slice();return n.splice(t,1),n})(e,n))),[t,e]);return i.a.createElement(Lo,null,e.map((e,t)=>i.a.createElement(Ro,{key:`uploaded-image-${e.name}-${t}`},i.a.createElement(Fo,{file:e}),i.a.createElement(fe.a,{onClick:e=>{e.preventDefault(),n(t)}},i.a.createElement(h.e,{width:18,height:18,color:"#FFF"})))),1===(null==e?void 0:e.length)&&i.a.createElement("span",null,e[0].name))},Uo=n(16),Ho=n(47),$o=a.useLayoutEffect,Vo=function(e){var t=Object(a.useRef)(e);return $o((function(){t.current=e})),t},qo=function(e,t){"function"!=typeof e?e.current=t:e(t)},Go=function(e,t){var n=Object(a.useRef)();return Object(a.useCallback)((function(r){e.current=r,n.current&&qo(n.current,null),n.current=t,t&&qo(t,r)}),[t])},Wo={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Yo=function(e){Object.keys(Wo).forEach((function(t){e.style.setProperty(t,Wo[t],"important")}))},Ko=null;var Xo=function(){},Jo=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],Qo=!!document.documentElement.currentStyle,Zo=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,o=e.minRows,i=e.onChange,s=void 0===i?Xo:i,c=e.onHeightChange,l=void 0===c?Xo:c,u=Object(Ho.a)(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]);var d,f=void 0!==u.value,p=Object(a.useRef)(null),h=Go(p,t),m=Object(a.useRef)(0),g=Object(a.useRef)(),b=function(){var e=p.current,t=n&&g.current?g.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,Jo.reduce((function(e,t){return e[t]=n[t],e}),{})),o=r.boxSizing;return""===o?null:(Qo&&"border-box"===o&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){g.current=t;var a=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),Ko||((Ko=document.createElement("textarea")).setAttribute("tab-index","-1"),Ko.setAttribute("aria-hidden","true"),Yo(Ko)),null===Ko.parentNode&&document.body.appendChild(Ko);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;Ko.style[t]=i[t]})),Yo(Ko),Ko.value=t;var c=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize}(Ko,e);Ko.value="x";var l=Ko.scrollHeight-o,u=l*n;"border-box"===s&&(u=u+o+a),c=Math.max(u,c);var d=l*r;return"border-box"===s&&(d=d+o+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||"x",o,r),i=a[0],s=a[1];m.current!==i&&(m.current=i,e.style.setProperty("height",i+"px","important"),l(i,{rowHeight:s}))}};return Object(a.useLayoutEffect)(b),d=Vo(b),Object(a.useLayoutEffect)((function(){var e=function(e){d.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),Object(a.createElement)("textarea",Object(Uo.a)({},u,{onChange:function(e){f||b(),s(e)},ref:h}))},ea=Object(a.forwardRef)(Zo);const ta=c.c.div.withConfig({displayName:"styles__ComposerContainer",componentId:"sc-1v8m1u6-0"})(["padding:20px;padding-top:5px;background:none;background:",";background-color:",";",""],e=>e.theme.background,e=>e.theme.background,fe.e),na=c.c.div.withConfig({displayName:"styles__FormInner",componentId:"sc-1v8m1u6-1"})(["display:flex;align-items:center;justify-content:space-between;gap:15px;"]),ra=c.c.div.withConfig({displayName:"styles__DisabledText",componentId:"sc-1v8m1u6-2"})(["margin:8px 0 10px 10px;transition:all 0.3s ease;color:",";font-size:",";line-height:24px;",""],u.a.darkColor,u.d.fontSizeH5,e=>e.hide?"transform: translateY(-45px);":""),oa=Object(c.c)(ea).withConfig({displayName:"styles__ComposerInput",componentId:"sc-1v8m1u6-3"})([""," min-height:","px;"],fe.f,e=>{let{$minHeight:t}=e;return t}),aa=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1v8m1u6-4"})(["width:40px;height:40px;display:flex;justify-content:center;align-items:center;"]),ia=Object(c.b)(["color:#fff;z-index:10;cursor:pointer;box-shadow:none;height:100%;width:100%;padding:0;text-transform:none;display:flex;align-items:center;justify-content:center;border:none;max-width:36px;max-height:36px;background-color:transparent;"," &:hover{opacity:0.8;}svg{transition:all 0.2s ease;path{fill:",";}}"],m.a,e=>e.theme.buttonBackground),sa=c.c.button.withConfig({displayName:"styles__SubmitButton",componentId:"sc-1v8m1u6-5"})(["",";z-index:15;padding:8px;transition:opacity 0.1s ease-in;",";border-radius:100px;background:",";background-color:",";svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:#fff;}}",";"],ia,e=>!e.active&&"\n opacity: 0.3;\n pointer-events: none;\n ",e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,e=>{let{disabled:t}=e;return t&&"\n cursor: default;\n opacity: 0.3;\n &:hover {\n opacity: 0.3;\n }\n "}),ca=Object(Io.a)();let la;function ua(e){let{active:t,chatHasStarted:n,onManualFocus:r,currentlyPoppedUp:o,autoFocused:c,isScrolledDown:l}=e;const u=Object(a.useRef)(),[d,f]=Object(a.useState)(41),[p,m]=Object(a.useState)(!1),[g,b]=Object(a.useState)(!1),[v,y]=Object(a.useState)(""),[w,E]=Object(a.useState)(0);Object(a.useEffect)(()=>{(t||n)&&!ca&&!o&&u.current&&!c&&u.current.focus()},[t,n,c,u,o]);const{text:O,inputLimitEnabled:k,inputLimit:_,isTextDirectionRtl:C}=Object(s.d)(x.d),{defaultLanguage:j}=Object(ar.a)(),{hideInputField:T,currentLanguage:S,allGreetingsHideInput:I,attachments:{files:A}}=Object(s.d)(x.e),{takenOver:N,userIsTyping:P}=Object(s.d)(x.a),{connected:M}=Object(s.d)(x.f),{chatMessages:L}=Object(s.d)(x.n),{inspectorOpen:R}=Object(s.d)(x.j),D=Object(s.c)(),B=C?"rtl":void 0,F=T&&!N,z=!N&&k?_:1e3,U=!v&&0===A.length,H=!M||F||I&&0===L.length||v.length>z||U||!n,{placeholder:$,disabled_input_text:V}=Object(a.useMemo)(()=>Object(ir.a)(O,S,j),[S,j,O]),q=e=>{if(e.preventDefault(),e.stopPropagation(),P&&D(Object(ue.vb)()),H)return!1;if(!v.trim()&&0===A.length)return!1;if(A.length>0)D(Object(ue.L)());else{const e=(new Date).getTime();if(!(e-w>1e3))return!1;E(e),D(Object(ue.gb)(v.trim()))}return y(""),!0};return i.a.createElement(ta,{dir:B,inspectorOpen:R},i.a.createElement(So,{alwaysShow:!N&&k,inputMax:z,inputLength:v.length,shake:p}),i.a.createElement("form",{autoComplete:"off",action:"#",onSubmit:q},i.a.createElement(na,null,i.a.createElement(fe.c,{targetHeight:d,active:U?0:1,hasFiles:(null==A?void 0:A.length)>0},0===A.length&&i.a.createElement(i.a.Fragment,null,i.a.createElement(oa,{id:"chat-box-composer","data-cy":"chat-box-composer","aria-hidden":!n,"aria-label":$,name:"message",$hide:F?1:0,disabled:!n||F,$active:U?0:1,ref:u,placeholder:$,type:"text",onChange:e=>{const{value:t}=e.target;N?(e=>{const t=e.length>0;clearTimeout(la),!P&&t?D(Object(ue.ub)()):P&&!t&&D(Object(ue.vb)()),la=setTimeout(()=>{D(Object(ue.vb)())},5e3)})(t):t.length>z&&m(!0),y(t)},value:v,onFocus:()=>b(!0),onBlur:()=>b(!1),onMouseDown:()=>{g||l()||r()},onHeightChange:f,$minHeight:41,onKeyDown:e=>{m(!1),"Enter"!==e.key||e.shiftKey||q(e)}}),i.a.createElement(ra,{hide:T?1:0},V)),i.a.createElement(zo,null)),i.a.createElement(Mo,null),i.a.createElement(aa,{isTextDirectionRtl:C},i.a.createElement(sa,{"data-cy":"composer-submit","aria-hidden":H?"true":"false",active:H?0:1,disabled:H,role:"button",onClick:q,title:"Send message",onMouseDown:e=>{e.preventDefault()}},i.a.createElement(h.p,{width:18,height:18}))))))}ua.defaultProps={currentlyPoppedUp:!1};var da=ua;var fa=n(36);var pa=function(e){let{cancelChat:t,setCancelChat:n}=e;const{name:r,avatar:o,fullscreenMode:c,feedbackFormType:l,isTextDirectionRtl:u}=Object(s.d)(x.d),{optionsScreenOpen:d,chatHasStarted:f}=Object(s.d)(x.e),p=Object(s.c)(),m=!(d||c&&l===y.r.NONE),g=document.documentElement,b=u?"rtl":void 0,v=Object(a.useCallback)(()=>{p(Object(ue.h)()),g.style.overflow="unset"},[p,g]),w=Object(a.useCallback)(()=>{p(Object(ue.H)())},[p]);!function(e){Object(a.useEffect)(()=>(window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)),[e])}(Object(a.useCallback)(e=>{const{tagName:t}=document.activeElement;"Escape"===e.code&&"BODY"===t&&v(),"Escape"===e.code&&"BODY"!==t&&document.activeElement.blur()},[v]));const E=Object(a.useCallback)(()=>{t?(p(Object(ue.w)(c)),n(!1),g.style.overflow="unset"):n(!0)},[t,p,c,n,g]);return f?i.a.createElement(fa.c,{dir:b,"data-cy":"chat-box-header"},i.a.createElement(fa.d,null,o?i.a.createElement(fa.f,{avatar:o}):i.a.createElement(Kr,{height:30}),i.a.createElement(fa.a,{isTextDirectionRtl:u,"aria-label":`Chat bot ${r||"Kindly"}`},r||"Kindly")),i.a.createElement(fa.e,null,m&&i.a.createElement(i.a.Fragment,null,i.a.createElement(fa.b,{"aria-label":"Open settings",title:"Open settings",type:"button",onClick:w,"data-cy":"chat-settings-button"},i.a.createElement(h.q,{width:24,height:24})),i.a.createElement(fa.b,{"aria-label":"Minimize chat",title:"Minimize chat",type:"button",onClick:v,"data-cy":"minimize-chat-button"},i.a.createElement(h.n,{width:24,height:24})),i.a.createElement(fa.b,{"aria-label":"End chat",title:"End chat",type:"button",onClick:E,"data-cy":"end-chat-button","data-testid":"end-chat-button",isTextDirectionRtl:u},i.a.createElement(h.e,{width:24,height:24}))))):null};const ha=c.c.div.withConfig({displayName:"styles__AboutChatContainer",componentId:"sc-pmmp3f-0"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;",";animation-duration:0.2s;animation-timing-function:ease-in;"],w.e),ma=c.c.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-pmmp3f-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),ga=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-pmmp3f-2"})(["width:100%;height:100%;display:flex;padding:0 30px;flex-direction:column;justify-content:center;align-items:center;"]),ba=Object(c.c)(P.e).withConfig({displayName:"styles__AboutParagraph",componentId:"sc-pmmp3f-3"})(["font-size:16px;a{color:",";}"],u.a.primaryColor),va=c.c.div.withConfig({displayName:"styles__LinkContainer",componentId:"sc-pmmp3f-4"})(["a{color:",";text-align:center;font-size:",";display:block;margin:60px 0 30px 0;:hover,:focus,:active,:visited{color:",";}}"],u.a.darkColor,u.d.fontSizeP,u.a.darkColor);var ya=function(e){let{setAboutChat:t}=e;const{text:n}=Object(s.d)(x.d),{currentLanguage:r}=Object(s.d)(x.e),{defaultLanguage:o}=Object(ar.a)(),c=Object(a.useCallback)(()=>t(!1),[t]),l=Object(a.useCallback)(e=>{"Enter"===e.key&&t(!1)},[t]),u=Object(a.useMemo)(()=>Object(ir.a)(n,r,o),[r,o,n]),{back_to_chat_button:d}=u;return i.a.createElement(ha,null,i.a.createElement(ma,null,i.a.createElement(ga,null,i.a.createElement(P.b,null,"About Kindly"),i.a.createElement(ba,null,"This chatbot is powered by Kindly.",i.a.createElement("br",null),"To learn more about Kindly, visit"," ",i.a.createElement("a",{href:"https://www.kindly.ai/nb/products",target:"_blank",rel:"noopener noreferrer"},"this website."))),i.a.createElement(va,null,i.a.createElement(fe.d,{"aria-label":d,title:d,onClick:c,onKeyUp:l,tabIndex:"0",type:"button"},"‹ ",d))))};const xa=c.c.div.withConfig({displayName:"styles__PoweredContainer",componentId:"sc-16vfwd0-0"})(["z-index:2;display:flex;justify-content:center;"]),wa=c.c.span.withConfig({displayName:"styles__Blob",componentId:"sc-16vfwd0-1"})(["width:8px;height:8px;opacity:1;border-radius:100%;margin:0 4px 0 8px;background:#1cd300;background-color:#1cd300;"]),Ea=Object(c.c)(P.f).withConfig({displayName:"styles__PoweredParagraph",componentId:"sc-16vfwd0-2"})(["display:flex;opacity:1;margin-bottom:0;align-items:baseline;span:first-child{opacity:0.6;}a{cursor:pointer;}"]);var Oa=function(e){let{hide:t,setAboutChat:n}=e;const r=Object(a.useCallback)(()=>n(!0),[n]),o=Object(a.useCallback)(e=>{"Enter"===e.key&&n(!0)},[n]);return i.a.createElement(xa,{hide:t},i.a.createElement(Ea,null,i.a.createElement("span",null,"Powered by")," ",i.a.createElement(wa,null),i.a.createElement(P.d,null,i.a.createElement(fe.d,{"aria-label":"Visit Kindly",title:"Visit Kindly",onClick:r,onKeyUp:o,type:"button",tabIndex:0},"Kindly"))))},ka=e=>{const[t,n]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{t&&!e&&n(!1)},[e,t]),{showAboutChat:t,setShowAboutChat:n}};const _a=c.c.div.withConfig({displayName:"styles__CancelChatContainer",componentId:"sc-1gy1mo2-0"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;",";animation-duration:0.2s;animation-timing-function:ease-in;"],w.e),Ca=c.c.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-1gy1mo2-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),ja=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-1gy1mo2-2"})(["width:100%;height:100%;display:flex;padding:0 30px;justify-content:center;align-items:center;"]),Ta=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1gy1mo2-3"})(["button{margin:auto;}a{color:",";text-align:center;font-size:",";display:block;margin:60px 0 30px 0;:hover,:focus,:active,:visited{color:",";}}"],u.a.darkColor,u.d.fontSizeP,u.a.darkColor),Sa=c.c.div.withConfig({displayName:"styles__CancelChatFooter",componentId:"sc-1gy1mo2-4"})(["div{display:flex;position:unset;align-items:center;}"]);var Ia=function(e){let{setCancelChat:t}=e;const n=Object(s.c)(),{text:r}=Object(s.d)(x.d),{currentLanguage:o,active:c}=Object(s.d)(x.e),{setShowAboutChat:l}=ka(c),{defaultLanguage:d}=Object(ar.a)(),f=document.documentElement,p=Object(a.useMemo)(()=>Object(ir.a)(r,o,d),[o,d,r]),h=Object(a.useCallback)(()=>{n(Object(ue.w)()),t(!1),f.style.overflow="unset"},[n,t,f]),m=Object(a.useCallback)(()=>t(!1),[t]),g=Object(a.useCallback)(e=>{"Enter"===e.key&&t(!1)},[t]),{back_to_chat_button:b,cancel_chat_button:v,cancel_chat_text:y}=p;return i.a.createElement(_a,null,i.a.createElement(Ca,null,i.a.createElement(ja,null,i.a.createElement(P.a,null,y)),i.a.createElement(Ta,null,i.a.createElement(Cr.b,{style:u.b,"aria-label":v,title:v,onClick:h,type:"button",color:!0,text:v,cy:"cancel-chat-button"}),i.a.createElement(fe.d,{"aria-label":b,title:b,onClick:m,onKeyUp:g,type:"button",tabIndex:"0"},"‹ ",b)),i.a.createElement(Sa,null,i.a.createElement(Oa,{setAboutChat:l}))))};n(41);const Aa=Object(c.c)(fe.d).withConfig({displayName:"styles__FooterLink",componentId:"sc-1l968t6-0"})(["display:block;color:",";text-align:center;margin:30px 0;font-size:",";:hover,:focus,:active,:visited{color:",";}"],u.a.darkColor,u.d.fontSizeP,u.a.darkColor),Na=c.c.div.withConfig({displayName:"styles__OptionsContainer",componentId:"sc-1l968t6-1"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;@media (max-height:610px){overflow-y:auto;}"]),Pa=(c.c.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-1l968t6-2"})(["height:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;"]),c.c.div.withConfig({displayName:"styles__GenericContainer",componentId:"sc-1l968t6-3"})(["display:grid;grid-gap:15px;grid-template-rows:auto 1fr;overflow-y:auto;@media ","{grid-gap:0;grid-template-rows:1fr;}"],u.c.maxPhoneHeight)),Ma=c.c.div.withConfig({displayName:"styles__DeleteContainer",componentId:"sc-1l968t6-4"})(["display:grid;grid-template-rows:1fr auto;@media ","{grid-template-rows:1fr;}"],u.c.maxPhoneHeight),La=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-1l968t6-5"})(["width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px 30px;h3{display:flex;align-items:center;justify-content:center;}"]),Ra=(c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1l968t6-6"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;&:last-child{margin-top:10px;}svg{margin-right:15px;}}"]),c.c.span.withConfig({displayName:"styles__OptionsButtonText",componentId:"sc-1l968t6-7"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"])),Da=c.c.div.withConfig({displayName:"styles__OptionsFooter",componentId:"sc-1l968t6-8"})(["div{position:unset;display:flex;flex-direction:column;align-items:center;}"]),Ba=c.c.div.withConfig({displayName:"styles__DeletedText",componentId:"sc-16kypod-0"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;line-height:24px;"],u.a.darkColor,u.d.fontSizeH5);var Fa=function(e){let{textContent:t}=e;const{chat_deleted_header:n,chat_deleted_text:r}=t;return i.a.createElement(La,null,i.a.createElement(P.b,null,n),i.a.createElement(Ba,null,r))};const za="GENERIC",Ua="LANGUAGE",Ha="DOWNLOAD",$a="DELETE_CHAT_CONFIRM",Va="CHAT_DELETED",qa=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-c6vrbi-0"})(["max-width:100%;flex-direction:column;display:flex;align-items:center;margin:unset;button{margin-bottom:10px;&:last-child{margin-top:0;}}"]);var Ga=function(e){let{textContent:t,setOptionsView:n}=e;const r=Object(s.c)(),{back_to_chat_button:o,delete_text:c,delete_button:l}=t,d=document.documentElement,f=Object(a.useCallback)(()=>{n(Va),r(Object(ue.r)()),d.style.overflow="unset"},[n,r,d]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(La,null,i.a.createElement(P.b,null,c)),i.a.createElement(qa,null,i.a.createElement(Cr.b,{style:u.b,"aria-label":l,title:l,onClick:f,type:"button",text:l,color:!0,cy:"confirm-delete-chat"}),i.a.createElement(Aa,{"aria-label":o,title:o,onClick:()=>n(za),type:"button"},"‹ ",o)))},Wa=n(26);const Ya=c.c.div.withConfig({displayName:"styles__SelectionContainer",componentId:"sc-mbgnew-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 15px;"]),Ka=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-mbgnew-1"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;}"]),Xa=c.c.div.withConfig({displayName:"styles__Title",componentId:"sc-mbgnew-2"})(["color:",";font-size:",";margin:0 0 10px;line-height:24px;"],u.a.darkColor,u.d.fontSizeH5);var Ja=function(e){let{textContent:t,setOptionsView:n}=e;const r=Object(s.c)(),{back_to_chat_button:o,download_button:c,download_format_text:l}=t,u=Object(a.useCallback)(async()=>{r(await Object(ue.x)({},"html"))},[r]),d=Object(a.useCallback)(async()=>{r(Object(ue.x)({},"json"))},[r]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(La,null,i.a.createElement(Xa,null,l)),i.a.createElement(Ya,null,i.a.createElement(Ka,null,i.a.createElement(Wa.b,{"aria-label":`${c} (HTML)`,title:`${c} (HTML)`,onClick:u,type:"button","data-cy":"download-chat-html"},i.a.createElement(Ra,null,`${c} (HTML)`)),i.a.createElement(Wa.b,{"aria-label":`${c} (JSON)`,title:`${c} (JSON)`,onClick:d,type:"button","data-cy":"download-chat-json"},i.a.createElement(Ra,null,`${c} (JSON)`))),i.a.createElement(Aa,{"aria-label":o,title:o,onClick:()=>n(za),type:"button"},"‹ ",o)))};const Qa=c.c.div.withConfig({displayName:"styles__Header",componentId:"sc-crpo3y-0"})(["width:100%;height:",";background:",";background-color:",";@media ","{display:none;}"],e=>e.long?"180px":"210px",e=>e.theme.headerBackground,e=>e.theme.headerBackground,u.c.maxPhoneHeight),Za=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-crpo3y-1"})(["min-width:60%;max-width:95%;margin:auto;display:flex;flex-direction:column;button{margin:5px 0;&:first-child{margin-top:10px;}svg{margin-right:15px;}}"]);var ei=function(e){let{languages:t,textContent:n,setOptionsView:r}=e;const o=Object(s.c)(),{back_to_chat_button:c,change_language_button:l,download_button:u,delete_button:d,start_over_button:f}=n,p=Object(a.useCallback)(()=>{o(Object(ue.w)(!0))},[o]),m=Object(a.useCallback)(()=>{o(Object(ue.k)())},[o]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Qa,{long:t.length>1}),i.a.createElement(Za,null,t.length>1&&i.a.createElement(Wa.b,{"aria-label":l,title:l,onClick:()=>r(Ua),type:"button","data-cy":"change-language-option"},i.a.createElement(Ra,null,i.a.createElement(h.l,{width:18,height:14}),l)),i.a.createElement(Wa.b,{"aria-label":f,title:f,onClick:p,type:"button","data-cy":"restart-chat-option"},i.a.createElement(Ra,null,f)),i.a.createElement(Wa.b,{"aria-label":d,title:d,onClick:()=>r($a),type:"button","data-cy":"delete-chat-option"},i.a.createElement(Ra,null,d)),i.a.createElement(Wa.b,{"aria-label":u,title:u,onClick:()=>r(Ha),type:"button","data-cy":"download-chat-option"},i.a.createElement(Ra,null,u)),i.a.createElement(Wa.b,{"aria-label":c,title:c,onClick:m,type:"button","data-cy":"back-to-chat-option",$color:!0,autoFocus:!0},i.a.createElement(Ra,null,c))))};const ti=c.c.div.withConfig({displayName:"styles__SelectionContainer",componentId:"sc-1hbxmch-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 30px;"]),ni=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1hbxmch-1"})(["max-width:100%;flex-direction:column;display:flex;margin:unset;min-width:190px;button{margin-bottom:10px;text-transform:capitalize;&:last-child{margin-top:0;}}"]),ri=c.c.div.withConfig({displayName:"styles__ButtonFooter",componentId:"sc-1hbxmch-2"})(["margin-bottom:15px;button{display:block;margin:0 auto 30px;}"]),oi=Object(c.c)(P.b).withConfig({displayName:"styles__Title",componentId:"sc-1hbxmch-3"})(["margin-top:30px;width:100%;svg{margin-right:16px;display:inline-block;vertical-align:middle;}"]);var ai=function(e){let{languages:t,currentLanguage:n,textContent:r,setOptionsView:o}=e;const[c,l]=Object(a.useState)(n);Object(a.useEffect)(()=>{l(n)},[n,l]);const d=Object(a.useCallback)(()=>o(za),[o]),f=Object(a.useCallback)(e=>{"Enter"===e.key&&o(za)},[o]),p=Object(s.c)(),{confirm_action_button:m,back_to_chat_button:g,change_language_button:b,change_language_text:v}=r;return i.a.createElement(i.a.Fragment,null,i.a.createElement(La,null,i.a.createElement(oi,null,i.a.createElement(h.l,{width:35,height:39}),b),i.a.createElement(P.e,null,v)),i.a.createElement(ti,null,i.a.createElement(ni,null,t.map(e=>i.a.createElement(Cr.b,{key:e.code,"aria-label":e.name,title:e.name,onClick:()=>l(e.code),text:e.name,flat:e.code===c,selected:e.code===c,cy:`${e.code}-button`}))),i.a.createElement(ri,null,c!==n&&i.a.createElement(Cr.b,{style:u.b,"aria-label":m,title:m,onClick:()=>{p(Object(ue.R)(c))},type:"submit",text:m,color:!0}),i.a.createElement(Aa,{"aria-label":g,title:g,onClick:d,onKeyUp:f,tabIndex:"0",type:"button"},"‹ ",g))))};var ii=function(e){let{setAboutChat:t}=e;const{text:n}=Object(s.d)(x.d),{languages:r,defaultLanguage:o}=Object(ar.a)(),{currentLanguage:c}=Object(s.d)(x.e),{chatDeleted:l}=Object(s.d)(x.p),[u,d]=Object(a.useState)(l?Va:za),f=Object(a.useMemo)(()=>Object(ir.a)(n,c,o),[c,o,n]);return i.a.createElement(Na,null,u===za||u===Ha||u===Ua?i.a.createElement(Pa,null,u===za&&i.a.createElement(ei,{languages:r,textContent:f,setOptionsView:d}),u===Ha&&i.a.createElement(Ja,{languages:r,textContent:f,setOptionsView:d}),u===Ua&&i.a.createElement(ai,{languages:r,textContent:f,currentLanguage:c,setOptionsView:d})):i.a.createElement(Ma,null,u===Va&&i.a.createElement(Fa,{textContent:f}),u===$a&&i.a.createElement(Ga,{setOptionsView:d,textContent:f})),i.a.createElement(Da,null,i.a.createElement(Oa,{setAboutChat:t})))},si=n(85);const ci=c.c.div.withConfig({displayName:"styles__SelectContainer",componentId:"sc-1lfni2n-0"})(["position:relative;width:fit-content;&:before{content:'';position:absolute;right:11px;top:50%;transform:translateY(-50%);width:0;height:0;z-index:1;border-top:7px solid #2c2c2c;border-left:4px solid transparent;border-right:4px solid transparent;}"]),li=c.c.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-1lfni2n-1"})(["position:absolute;top:10px;left:8px;svg{path{fill:#333;}}"]),ui=c.c.select.withConfig({displayName:"styles__Select",componentId:"sc-1lfni2n-2"})(["cursor:pointer;appearance:none;border-radius:5px;font-size:",";border:1px solid #dedede;padding:8px 30px 8px 11px;position:relative;color:#2c2c2c;background:transparent;background-color:transparent;"," ",""],u.d.fontSizeH5,e=>e.icon&&"padding-left: 30px;",m.a);function di(e){let{children:t,onClick:n,onChange:r,value:o,name:a,icon:s,...c}=e;return i.a.createElement(ci,null,s&&i.a.createElement(li,null,i.a.createElement(h.l,{width:18,height:14})),i.a.createElement(ui,Object.assign({onClick:n,onChange:r,value:o,name:a,icon:s},c),t))}di.defaultProps={icon:!1,onClick:si.a,onChange:si.a};var fi=di,pi=n(42);const hi=c.c.div.withConfig({displayName:"styles__WelcomePageContainer",componentId:"sc-elyt0g-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;background:#fff;background-color:#fff;"]),mi=Object(c.b)(["background-size:cover;background-position:center;background-image:url(",");"],e=>e.welcomePageImage),gi=c.c.div.withConfig({displayName:"styles__HeaderContent",componentId:"sc-elyt0g-1"})(["flex:1;height:100%;max-height:250px;padding:18px 18px 0;background:",";background-color:",";",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>e.welcomePageImage&&mi),bi=c.c.div.withConfig({displayName:"styles__IntroContent",componentId:"sc-elyt0g-2"})(["flex:1;padding:15px 30px 30px;border-top:5px solid ",";@media ","{padding:30px;}"],e=>e.theme.headerBackground,u.c.maxTablet),vi=c.c.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-elyt0g-3"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;"]),yi=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-elyt0g-4"})(["padding:20px 0;"]),xi=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-elyt0g-5"})(["display:flex;align-items:center;justify-content:space-between;button:first-child{@media ","{min-width:unset;}}"],u.c.maxTablet),wi=(Object(c.c)(fe.a).withConfig({displayName:"styles__CloseButton",componentId:"sc-elyt0g-6"})(["display:flex;align-items:center;padding:7px;color:",";background:",";background-color:",";border-color:",";border-radius:100px;"],e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground),Object(c.c)(P.a).withConfig({displayName:"styles__TitleText",componentId:"sc-elyt0g-7"})(["color:",";font-weight:500;font-size:",";margin:0 0 15px;"],u.a.textColor,u.d.fontSizeH3)),Ei=c.c.div.withConfig({displayName:"styles__IntroText",componentId:"sc-elyt0g-8"})(["color:",";max-height:180px;overflow:hidden;font-size:",";margin:30px 0 10px 0;line-height:24px;div{& >:first-child{margin-top:0;}& >:last-child{margin-bottom:0;}a{color:#0000c6;}a:visited{color:#5b096e;}}strong{font-weight:500;}"],u.a.textColor,u.d.fontSizeH5);var Oi=function(){const[e,t]=Object(a.useState)(!1),{active:n,currentLanguage:r,optionsScreenOpen:o,feedbackFormType:c}=Object(s.d)(x.e),{welcomePage:l,welcomePageType:d,fullscreenMode:f,isTextDirectionRtl:p}=Object(s.d)(x.d),{languages:m,defaultLanguage:g}=Object(ar.a)(),{labels:b}=Object(s.d)(x.l),v=Object(s.c)(),w=Object(a.useRef)(),E=document.documentElement,O=!(o||f&&c===y.r.NONE),k=p?"rtl":void 0;Object(a.useEffect)(()=>{n&&w.current.focus()},[n]);const _=l?((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"image"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(pi.a)(a,t,n)}},{}))(l,r,g):{header:"",text:"",start_button:""},C=Object(a.useCallback)(()=>{t(!0),v(Object(ue.l)()),v(Object(ue.R)(r||m[0].code,{skipRestart:b.length>0}))},[v,r,m,b]),j=Object(a.useCallback)(()=>{v(Object(ue.h)()),E.style.overflow="unset"},[v,E]),T=Object(a.useCallback)(e=>{v(Object(ue.R)(e))},[v]);return i.a.createElement(hi,null,i.a.createElement(gi,{welcomePageImage:"PICTURE"===d&&l.image},O&&i.a.createElement(fa.b,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:j,"data-cy":"close-chat-button"},i.a.createElement(h.e,{width:25,height:25}))),i.a.createElement(bi,null,i.a.createElement(vi,{dir:k},i.a.createElement("div",null,m.length>1&&i.a.createElement(fi,{icon:!0,name:"language-select","data-cy":"language-select",value:r,onChange:e=>T(e.target.value),"aria-label":"Select a language"},m.map(e=>i.a.createElement("option",{key:e.code,label:e.name,value:e.code},e.name))),i.a.createElement(yi,null,i.a.createElement(wi,null,_.header),i.a.createElement(Ei,null,Rn(_.text)))),i.a.createElement(xi,null,i.a.createElement(Cr.b,{style:u.b,cy:"start-chat-button",type:"button",title:_.start_button||"Start chat",onClick:C,loading:e,color:!0,ref:w},_.start_button||"Start chat")))))};const ki=Object(c.d)(["0%{opacity:0;}100%{opacity:1;}"]),_i=Object(c.b)(["",";animation-name:",";"],Object(w.a)(100),ki),Ci=Object(c.d)(["0%{opacity:1;}100%{opacity:0;}"]),ji=Object(c.b)(["",";animation-delay:50ms;animation-name:",";"],Object(w.a)(500),Ci),Ti=Object(c.b)(["",";"],e=>e.fullHeight?"top: 0; height: 100%;":"top: 55px; height: calc(100% - 55px); border-bottom-right-radius: 6px; border-bottom-left-radius: 6px"),Si=c.c.div.withConfig({displayName:"styles__OverlayContainer",componentId:"sc-1xhdwt3-0"})(["width:100%;overflow:hidden;padding-bottom:5px;"," position:absolute;z-index:",";background:#fff;background-color:#fff;",";",";",";"],Ti,u.f.overlayIndex,e=>!e.chatViewHidden&&"pointer-events: none",e=>!e.chatViewHidden&&Object(w.h)(300),e=>e.chatViewHidden?_i:ji);var Ii=function(e){let{showAboutChat:t,setShowAboutChat:n,showCancelConfirmation:r,setShowCancelConfirmation:o}=e;const{welcomePageType:a,hideHeader:c}=Object(s.d)(x.d),{chatHasStarted:l,optionsScreenOpen:u}=Object(s.d)(x.e),{chatDeleted:d}=Object(s.d)(x.p),f=!l&&a!==y.s.NONE,p=u||f||r||t||d;return i.a.createElement(Si,{chatViewHidden:p,fullHeight:c||f},t&&!r&&i.a.createElement(ya,{setAboutChat:n}),r&&i.a.createElement(Ia,{setCancelChat:o}),f&&i.a.createElement(Oi,null),(u||d)&&i.a.createElement(ii,{setAboutChat:n}))};const Ai=c.c.div.withConfig({displayName:"styles__Container",componentId:"sc-109olta-0"})(["display:flex;flex-direction:column;align-items:center;background:",";background-color:",";padding:1px 0 0;"," span{background:",";background-color:",";width:90%;height:1px;z-index:21;}"],e=>e.theme.background,e=>e.theme.background,fe.e,Object(Xr.a)(.1,u.a.grayColor),Object(Xr.a)(.1,u.a.grayColor)),Ni=c.c.form.withConfig({displayName:"styles__Contents",componentId:"sc-109olta-1"})(["display:flex;flex-direction:column;width:100%;padding:0 24px 20px;input{margin-right:24px;border:1px solid rgba(0,0,0,0);:focus{border:1px solid rgba(0,0,0,0);}:invalid{","}}"],e=>{let{hasSubmitted:t}=e;return t&&"border-color: red;"}),Pi=Object(c.c)(fe.a).withConfig({displayName:"styles__CloseButton",componentId:"sc-109olta-2"})(["min-height:25px;display:flex;align-items:center;font-size:",";padding:0;:hover{opacity:0.8;}"],u.d.fontSizeH4),Mi=c.c.div.withConfig({displayName:"styles__Header",componentId:"sc-109olta-3"})(["display:flex;margin:4px 0 5px;color:",";font-size:",";align-items:center;"],e=>{let{theme:t}=e;return Object(sr.a)(t.background,"white","black")},u.d.fontSizeP),Li=c.c.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-109olta-4"})(["display:flex;justify-content:space-between;align-items:center;button:first-child{margin-right:8px;}div + button{margin-left:12px;}"]),Ri=c.c.input.withConfig({displayName:"styles__Input",componentId:"sc-109olta-5"})(["",""],fe.f),Di=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Bi(e,t){const n=Object(s.c)(),{contactDetailsButton:r}=Object(s.d)(x.e),[o,l]=Object(a.useState)(""),[d,f]=Object(a.useState)(!1),p=Object(a.useRef)(),m=Object(c.e)(),g=r.contact_details.contact_type,{label:b,placeholder:v}=r.contact_details,y=Object(a.useMemo)(()=>Object(sr.a)(m.background,u.a.grayColor,u.a.darkColor),[m.background]),w=()=>{n(Object(ue.lb)())};return i.a.createElement(Ai,{ref:t},i.a.createElement("span",null),i.a.createElement(Ni,{hasSubmitted:d},i.a.createElement(Mi,null,g&&i.a.createElement(Pi,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:w,"data-cy":"minimize-chat-button",mobileOnly:!0},i.a.createElement(h.e,{width:25,height:12,stroke:y})),b),i.a.createElement(Li,null,i.a.createElement(fe.c,null,i.a.createElement(Ri,{onChange:e=>{l(e.target.value)},value:o,type:g===Di.EMAIL?"email":"tel",ref:p,placeholder:v,required:!0})),i.a.createElement(sa,{onClick:e=>{var t,a;return f(!0),!(null==p||null===(t=p.current)||void 0===t||null===(a=t.validity)||void 0===a||!a.valid)&&(e.preventDefault(),n(Object(ue.M)(r,o)),w(),!1)},type:"submit",active:!0,title:`Send your ${g===Di.EMAIL?"email address":"phone number"}`},i.a.createElement(h.p,{width:18,height:18})))))}var Fi=Object(a.forwardRef)(Bi),zi=n(109);const Ui=Object(c.d)(["0%{opacity:0;transform:translateY(-6px);}60%{transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),Hi=Object(c.b)(["",";animation-name:",";"],Object(w.a)(),Ui),$i=c.c.div.withConfig({displayName:"styles__AlertContainer",componentId:"sc-efv8qo-0"})(["z-index:25;margin:15px;display:flex;padding:10px 15px;padding-right:10px;justify-content:space-between;border-radius:6px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";position:absolute;left:0;right:0;top:0;transition:top 150ms ease;",";",";"],u.a.shadowColor,e=>!e.isOnTop&&"top: 55px",Hi),Vi=c.c.div.withConfig({displayName:"styles__AlertContent",componentId:"sc-efv8qo-1"})(["padding-right:5px;"]),qi=Object(c.c)(P.e).withConfig({displayName:"styles__ContentText",componentId:"sc-efv8qo-2"})(["margin:0;"]),Gi=Object(c.c)(fe.d).withConfig({displayName:"styles__ContentLink",componentId:"sc-efv8qo-3"})(["font-size:14px;font-weight:500;margin-top:5px;display:block;color:",";"],u.a.primaryColor),Wi=Object(c.c)(fe.a).withConfig({displayName:"styles__AlertDismiss",componentId:"sc-efv8qo-4"})(["z-index:15;display:flex;padding:0;height:fit-content;align-content:flex-start;flex-direction:column;&:hover{opacity:0.8;}svg path{stroke:",";}"],e=>e.theme.buttonBackground);var Yi=function(){const{welcomePageType:e}=Object(s.d)(x.d),{chatHasStarted:t,optionsScreenOpen:n}=Object(s.d)(x.e),{linkLocation:r,linkText:o,textContent:a}=Object(s.d)(x.m),c=Object(s.c)(),l=!t&&e!==y.s.NONE||n;return i.a.createElement($i,{isOnTop:l},i.a.createElement(Vi,null,i.a.createElement(qi,null,a),r&&o&&i.a.createElement(Gi,{href:r,target:"_blank",rel:"noopener noreferrer"},o)),i.a.createElement(Wi,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),c(Object(ue.s)())},type:"button"},i.a.createElement(h.e,{width:20,height:20,color:"#000"})))},Ki=n(80),Xi=n(70);const Ji=Object(Io.a)();const Qi=Object(Io.a)();var Zi=e=>{let{bodyBottomElement:t,bodyElement:n,newMessage:r,bodyTopElement:o,groupRef:i}=e;const{chatMessages:c}=Object(s.d)(x.n),{isTyping:l}=Object(s.d)(x.d),{isTyping:u}=Object(s.d)(x.a),[d,f]=Object(a.useState)(!1),[p,h]=Object(a.useState)(!0),m=Boolean(r)||l||u,g=m&&Boolean(r&&r.from_bot),b=Object(a.useCallback)(((e,t)=>()=>{var n,r;if(!e.current)return!0;const o=null!==(n=null==t||null===(r=t.current)||void 0===r?void 0:r.clientHeight)&&void 0!==n?n:0,{scrollTop:a,offsetHeight:i,scrollHeight:s}=e.current;return o>0||a+i>=s-1})(n,t),[t,n]),v=Object(a.useCallback)(((e,t)=>()=>{if(!e.current||!t.current)return!0;const{scrollTop:n,scrollHeight:r}=e.current,{offsetHeight:o}=t.current;return!(r-n-30>=o)})(n,i),[t,n]),w=Object(a.useCallback)(((e,t)=>()=>{t.current&&0!==e.current.scrollHeight&&(Qi?setTimeout(()=>{t.current.scrollIntoView()},300):t.current.scrollIntoView())})(n,t),[t,n]),E=Object(a.useCallback)(((e,t)=>()=>{t.current&&0!==e.current.scrollHeight&&(Qi?setTimeout(()=>{t.current.scrollIntoView()},300):t.current.scrollIntoView())})(n,o),[o,n]);Object(a.useEffect)(()=>{0===c.length&&h(!0)},[c]),Object(a.useEffect)(()=>{var e,t;const n=(null==r||null===(e=r.buttonType)||void 0===e?void 0:e.toUpperCase())===y.b.QUICK_REPLY,o=(null==r||null===(t=r.handler)||void 0===t?void 0:t.toUpperCase())===y.f.TRIGGER_DIALOGUE;(n||o)&&E()},[r,E]);const O=((e,t)=>{const n=Object(a.useRef)(),r=Object(a.useRef)(),o=Object(a.useCallback)(()=>{r&&r.current&&clearTimeout(r.current)},[]),i=Object(a.useCallback)((function(){o();for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];n.current=i,r.current=setTimeout(()=>e(...n.current),t)}),[o,t,e]);return Object(a.useEffect)(()=>o,[o]),i})(Object(a.useCallback)(()=>{b()||v()?(h(!0),f(!1)):h(!1)},[b,v]),300);return Object(a.useEffect)(()=>{setTimeout(()=>{!b()&&p&&(r&&function(){let{from_bot:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!e}(r)?w():E())})},[n,b,m,r,w,E,p]),Object(a.useEffect)(()=>{!g||d||b()||f(!0)},[b,g,d]),{shouldAutoScroll:p,scrollToBottom:w,scrollToLatestMessage:E,onUserScroll:O,hasUnreadMessage:d,isScrolledDown:b}};function es(e){let{buttonHandlers:t,onMessage:n=null}=e;const r=Object(a.useRef)(null),o=Object(a.useRef)(null),c=Object(a.useRef)(null),l=Object(a.useRef)(null),{hideHeader:u,fullscreenMode:d,offsetHeight:f}=Object(s.d)(x.d),{show:p,textContent:h}=Object(s.d)(x.m),{active:m,chatHasStarted:g,currentlyPoppedUp:b,contactDetailsButton:v,renderedBy:y}=Object(s.d)(x.e),{chatMessages:w}=Object(s.d)(x.n),E=(e=>{const t=le(e),n=(e||[]).length;return Object(a.useMemo)(()=>n&&n!==(t||[]).length&&e[n-1],[e,n,t])})(w),{scrollToBottom:O,scrollToLatestMessage:k,shouldAutoScroll:_,onUserScroll:C,hasUnreadMessage:j,isScrolledDown:T}=Zi({bodyBottomElement:o,bodyTopElement:c,bodyElement:r,newMessage:E,groupRef:l}),S=le(m);Object(a.useEffect)(()=>{m&&!S&&j&&O()},[j,m,O,S]);const[I,A]=Object(a.useState)(!0);Object(a.useEffect)(()=>{I?A(!1):Object(Xi.c)(Object(Ki.a)(E||{}),w.map(Ki.a),n,y)},[I,n,E,w,y]);const P=(e=>{const[t,n]=Object(a.useState)(!1),r=le(e);return Object(a.useEffect)(()=>{!e&&r&&n(!0)},[e,r]),t})(m),{showAboutChat:M,setShowAboutChat:L}=ka(m),{showCancelConfirmation:R,setShowCancelConfirmation:D}=(e=>{const[t,n]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{t&&!e&&n(!1)},[e,t]),{showCancelConfirmation:t,setShowCancelConfirmation:n}})(m),{autoFocus:B,autoFocused:F}=(e=>{let{currentlyPoppedUp:t}=e;const[n,r]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{n&&r(!1)},[n]),{autoFocus:Object(a.useCallback)(()=>{n||Ji||t||r(!0)},[n,t]),autoFocused:n}})({currentlyPoppedUp:b}),z=Object(a.useCallback)(()=>{O(),B()},[B,O]);return i.a.createElement(N,{chatHasStarted:g,active:m,"aria-hidden":m?"false":"true","data-testid":"chat-box","data-cy":"chat-box",offsetHeight:f,fullscreen:d?1:0,"data-story":"ChatBoxContainer"},i.a.createElement(zi.a,{errorPoint:"inside ChatBoxContainer"},!u&&i.a.createElement(pa,{cancelChat:R,setCancelChat:D}),i.a.createElement(Ii,{showAboutChat:M,setShowAboutChat:L,showCancelConfirmation:R,setShowCancelConfirmation:D}),i.a.createElement(ge,null),p&&h&&i.a.createElement(Yi,null),i.a.createElement(ko,{setAboutChat:L,hasUnreadMessage:j,onShowLatest:z,shouldAnimate:P,setBottomRef:o,setGroupRef:l,setTopRef:c,setBodyRef:r,scrollToBottom:O,scrollToLatestMessage:k,shouldAutoScroll:_,onUserScroll:C,buttonHandlers:t}),v?i.a.createElement(Fi,null):i.a.createElement(da,{active:m,chatHasStarted:g,onManualFocus:O,isScrolledDown:T,autoFocused:F,currentlyPoppedUp:b})))}es.displayName="KindlyChatBox";var ts=es;function ns(){const e=Object(s.c)(),{currentLanguage:t,active:n}=Object(s.d)(x.e),{maintenanceAlertEnabled:r,maintenanceAlert:o}=Object(s.d)(x.d),{defaultLanguage:i}=Object(ar.a)();Object(a.useEffect)(()=>{if(!n||!r)return;const a=((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"alert_enabled"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(pi.a)(a,t,n)}},{}))(o,t,i);e(Object(ue.ab)(a))},[n,t,e,o,r,i])}var rs=n(173);const os=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),as=Object.freeze({en:"An agent joined the conversation",nb:"En agent ble med i samtalen",sv:"En agent gick med i samtalet"});let is=!1;function ss(e){const t=document.title;let n;n||is||(is=!0,n=setInterval(()=>{document.title=document.title===e?t:e},1e3),window.addEventListener("mousemove",(function e(){clearInterval(n),document.title=t,n=null,is=!1,window.removeEventListener("mousemove",e)})))}var cs=n(52);var ls=n(68),us=n(31),ds=n(84),fs=n(73);const ps=e=>({[e]:o.a.func});o.a.shape({...Object(ds.a)(ps,Object.values(y.b)),...Object(ds.a)(ps,Object.values(y.b).map(fs.a))});var hs=n(48),ms=n(101);t.default=function(e){let{settings:t}=e;const n=Object(s.c)(),r=Object(a.useRef)(null),{active:o}=Object(s.d)(x.e),{open:c,imageUrl:l}=Object(s.d)(x.k),{inspectorOpen:u}=Object(s.d)(x.j),{chatMessages:d}=Object(s.d)(x.n),{takenOver:f}=Object(s.d)(x.a),m=le(f),w=le(d),E=localStorage.getItem("kindly-chat-restart-message"),O=Object(us.a)(t,"fullscreenMode",!1),k=Object(us.a)(t,"zIndex",y.d),_={...y.c,...Object(us.a)(t,"position",{})},C=document.documentElement;Object(a.useEffect)(()=>{Object(Io.a)()&&(C.style.overflow=o?"hidden":"unset")},[o,C]),Object(a.useEffect)(()=>{if(0===(null==w?void 0:w.length)&&1===(null==d?void 0:d.length)&&E){const{message:e,exchangeId:t,newContext:r}=JSON.parse(E);localStorage.removeItem("kindly-chat-restart-message"),n(Object(ls.h)(e,t,r))}},[n,d,w,E]),Object(a.useEffect)(()=>{m!==f&&f&&Object(ms.a)()},[m,f]),function(){const{tabNotification:e,name:t}=Object(s.d)(x.d),{showTabNotification:n}=Object(s.d)(x.b),{currentLanguage:r}=Object(s.d)(x.e),{takenOver:o}=Object(s.d)(x.a),{agent:i}=Object(s.d)(x.q),c=le(o);Object(a.useEffect)(()=>{if(e&&n){var o;ss((null!==(o=null==os?void 0:os[r])&&void 0!==o?o:os.en)(t||"Kindly"))}},[r,e,n,t]),Object(a.useEffect)(()=>{const e=Boolean(null==i?void 0:i.name);if(c!==o&&o&&e){var t;ss(null!==(t=null==as?void 0:as[r])&&void 0!==t?t:as.en)}},[o,i,c,r])}(),Object(rs.a)(),function(){var e;const t=Object(s.c)(),[n,r]=Object(a.useState)("/"),{currentLanguage:o,active:i}=Object(s.d)(x.e),{nudges:c}=Object(s.d)(x.d),{defaultLanguage:l}=Object(ar.a)(),u=null!==(e=null==c?void 0:c.textNudges)&&void 0!==e?e:[];Object(a.useEffect)(()=>{r(window.location.href),!i&&o&&(null==u?void 0:u.length)>0&&(null!=u?u:[]).forEach(e=>!(!Object(cs.a)(n,e.url_trigger)||!e.enabled[o])&&t(Object(ue.db)({nudge:e,languageCode:o})))},[i,o,l,t,n,c,u])}(),ns(),(()=>{const{takenOver:e,requestedTakeover:t}=Object(s.d)(x.a),n=le(e),r=le(t),o=Object(s.c)();Object(a.useEffect)(()=>{e&&!n?o(Object(ue.kb)()):!e&&n&&o(Object(ue.hb)()),t&&!r?o(Object(ue.jb)()):!t&&r&&o(Object(ue.ib)())},[o,r,n,t,e])})(),function(e){const t=Object(a.useCallback)(t=>{e&&"Tab"===t.key&&e.current.classList.add("using-tab")},[e]),n=Object(a.useCallback)(()=>{e&&e.current.classList.remove("using-tab")},[e]);Object(a.useEffect)(()=>(document.body.addEventListener("keyup",t),document.body.addEventListener("mousedown",n),()=>{document.body.removeEventListener("keyup",t),document.body.removeEventListener("mousedown",n)}),[t,n])}(r);const j=Object(a.useCallback)(()=>{n(Object(ue.j)())},[n]),T=Object(a.useMemo)(()=>function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[Object(hs.a)(n)]:r}},{})}(t.buttonHandlers),[t.buttonHandlers]);return i.a.createElement(p,{id:"chatContainer",ref:r,className:"chat-container",role:"complementary",active:o,zIndex:k,fullscreen:O?1:0,position:_,"data-cy":"chat-box-container","data-story":"ChatContainer"},c&&i.a.createElement(b,{zIndex:k,onClick:j,autoFocus:!0},i.a.createElement(g,{zIndex:k,onClick:j,autoFocus:!0},i.a.createElement(h.e,{width:"30",height:"30"})),i.a.createElement(v,{src:l})),o&&i.a.createElement(ts,{buttonHandlers:T,onMessage:t.onMessage}),u&&i.a.createElement(de,null))}},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),a=n(0),i=n.n(a),s=n(3),c=n(1);const l=c.c.div.withConfig({displayName:"styles__NudgeBackdropContainer",componentId:"sc-1tcv57c-0"})(["display:block;top:-100vh;left:-100vw;height:200vh;width:200vw;position:fixed;cursor:pointer;transition:all ease 1200ms;background:",";opacity:",";z-index:",";"],e=>{let{backdrop:t}=e;return t.color||"#000"},e=>{let{backdrop:t}=e;return t.opacity||.5},e=>{let{backdrop:t}=e;return t.zIndex||-1});var u=function(e){let{backdrop:t,onClick:n}=e;return i.a.createElement(l,{onClick:n,backdrop:t})},d=n(5),f=n(8),p=n(7),h=n(15),m=n(27),g=n(103),b=e=>{let{slug:t}=e;const[n,r]=Object(a.useState)({}),[o,i]=Object(a.useState)(!0),{defaultLanguage:c}=Object(h.a)(),l=Object(g.a)(),{currentLanguage:u}=Object(s.d)(p.e);return Object(a.useEffect)(()=>{let e={};const n=l.find(e=>e.slug===t);var o;n&&t&&(null!=n&&n.text_blocks?n.text_blocks.map(t=>{const n=Object(m.a)(t,u,c);e[t.slug]=n.value}):e=Object(m.a)(n,u,c),i(Boolean(null==n||null===(o=n.text_blocks)||void 0===o?void 0:o.length)),r(e))},[l,u,c,t]),{textContent:n,hasTextContent:o}};var v=function(){const{defaultLanguage:e}=Object(h.a)(),t=window.kindlyChat.APIRoot,n=Object(a.useRef)(t),{content:r,slug:o,onRendered:i}=Object(s.d)(p.o),{currentLanguage:c}=Object(s.d)(p.e),{textContent:l,hasTextContent:u}=b({slug:o});return Object(a.useEffect)(()=>{if(document.getElementById("kindly-custom-nudge"))return;const e="function"==typeof r?r(l):r;if(u&&0===Object.keys(l).length)return;const t=document.createElement("div");t.innerHTML=e,n.current.appendChild(t),t.setAttribute("id","kindly-custom-nudge"),"function"==typeof i&&i(t)},[r,c,e,o,l,i,u]),null},y=n(10);const x=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-7kvqgr-0"})(["margin:24px;display:flex;flex-direction:column;"]);var w=function(e){let{html:t,slug:n}=e;const{textContent:r}=b({slug:n});return i.a.createElement(x,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:"function"==typeof t?t(r):t}}))},E=(n(123),o.a.shape({success:o.a.string,error:o.a.string,input:o.a.shape({label:o.a.string,type:o.a.string,placeholder:o.a.string.isRequired,required:o.a.bool}),button:o.a.shape({title:o.a.string,icon:o.a.string,type:o.a.string})}),o.a.shape({id:o.a.string.isRequired,title:o.a.string,description:o.a.string,image:o.a.string.isRequired,price:o.a.string}),n(2)),O=n(34),k=n(9);const _=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1ywydhs-0"})(["margin:24px;display:flex;flex-direction:column;"]),C=c.c.h2.withConfig({displayName:"styles__Title",componentId:"sc-1ywydhs-1"})(["font-size:16px;font-weight:500;line-height:26px;margin:0 0 16px 0;"]),j=c.c.p.withConfig({displayName:"styles__Description",componentId:"sc-1ywydhs-2"})(["line-height:22px;margin:0px;"]),T=c.c.a.withConfig({displayName:"styles__Link",componentId:"sc-1ywydhs-3"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]);var S=n(19);const I=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1aq8spp-0"})(["margin:24px;display:flex;flex-direction:column;"]),A=c.c.div.withConfig({displayName:"styles__FormGroup",componentId:"sc-1aq8spp-1"})(["display:grid;grid-template-columns:1fr 44px;align-items:end;grid-gap:16px;"]),N=c.c.div.withConfig({displayName:"styles__InputContainer",componentId:"sc-1aq8spp-2"})(["display:flex;flex-direction:column;"]),P=c.c.label.withConfig({displayName:"styles__Label",componentId:"sc-1aq8spp-3"})(["font-size:16px;line-height:19px;margin-left:8px;margin-bottom:8px;"]),M=c.c.input.withConfig({displayName:"styles__Input",componentId:"sc-1aq8spp-4"})(["border:none;padding:14px 16px;border-radius:22px;font-size:14px;background:",";background-color:",";&:focus{color:#2c2c2c;box-shadow:none;border:none;","}"],e=>e.theme.inputBackground,e=>e.theme.inputBackground,S.a),L=c.c.button.withConfig({displayName:"styles__Button",componentId:"sc-1aq8spp-5"})(["cursor:pointer;box-shadow:none;height:44px;width:44px;padding:0;display:flex;align-items:center;justify-content:center;border:none;border-radius:100px;background:",";background-color:",";transition:opacity 0.1s ease-in;"," &:hover{opacity:0.8;}svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:",";}}"],e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,S.a,e=>e.theme.buttonText);var R=function(e){let{buttonContent:t}=e;const{title:n}=t;return i.a.createElement(L,{role:"button",title:n,type:"submit"},i.a.createElement(y.p,{width:18,height:18}))};var D=function(e){let{value:t,setValue:n,inputContent:r}=e;const{label:o,type:a,placeholder:s,required:c}=r;return i.a.createElement(N,null,i.a.createElement(P,null,o),i.a.createElement(M,{"aria-label":s,"aria-labelledby":"newsletter-sign-up",name:o,placeholder:s,type:a||"text",value:t,onChange:e=>n(e.target.value),required:c}))};var B=function(e){let{form:t,onNewsletterSubmit:n,slug:r}=e;const o=Object(s.c)(),{dialogue:c,webhook:l}=Object(s.d)(p.o),{currentLanguage:u}=Object(s.d)(p.e),{defaultLanguage:d}=Object(h.a)(),[m,g]=Object(a.useState)(""),[b,v]=Object(a.useState)(!1),{success:y}=t;return i.a.createElement(I,null,b&&y?i.a.createElement(j,null,y):i.a.createElement("form",{autoComplete:"off",action:"#",onSubmit:e=>{if(e.preventDefault(),g(""),!m.trim())return!1;if(c&&o(Object(f.qb)(c,{openChat:!0,languageCode:u||d.code})),l){const t={event:e,email:m};o(Object(k.f)({method:"post",url:l,data:t}))}if("function"==typeof n)try{n(e,m)}catch(e){console.error(e)}return o(Object(f.ob)({slug:r,eventType:E.u})),v(!0)}},i.a.createElement(A,null,i.a.createElement(D,{value:m,setValue:g,inputContent:t.input}),i.a.createElement(R,{buttonContent:t.button}))))},F=n(22);const z=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1cs3brm-0"})(["margin:24px;display:inline-flex;flex-wrap:wrap;gap:8px;"]),U=c.c.div.withConfig({displayName:"styles__SectionSeperator",componentId:"sc-1cs3brm-1"})(["height:1px;width:100%;background:rgba(0,0,0,0.1);"]);var H=function(e){let{choices:t,slug:n}=e;const r=Object(s.c)(),{currentLanguage:o}=Object(s.d)(p.e),{defaultLanguage:a}=Object(h.a)(),{buttons:c}=t;return i.a.createElement(i.a.Fragment,null,i.a.createElement(U,null),i.a.createElement(z,null,c.map(e=>{let{text:t,triggerDialogue:s}=e;return i.a.createElement(F.b,{color:!0,key:`${t}-${s}`,text:t,onClick:()=>{return e=s,r(Object(f.qb)(e,{openChat:!0,languageCode:o||a.code})),void r(Object(O.e)({slug:n,eventType:E.u,label:e}));var e}})})))},$=n(49),V=n(106),q=n(6),G=n(23);const W=c.c.a.withConfig({displayName:"stylesProduct__ProductWrapper",componentId:"sc-20xwq1-0"})(["text-decoration:none;color:initial;cursor:pointer;width:100%;"]),Y=c.c.div.withConfig({displayName:"stylesProduct__Product",componentId:"sc-20xwq1-1"})(["display:flex;padding:2px;flex-direction:column;align-items:flex-start;overflow:hidden;"," @media ","{margin-right:16px;margin-bottom:3px;box-shadow:0px 1px 3px 0px ",";border-radius:8px;overflow:hidden;max-width:201px;&:first-child{margin-left:24px;}}"],S.a,q.c.maxPhone,q.a.shadowColor),K=c.c.img.withConfig({displayName:"stylesProduct__ProductImage",componentId:"sc-20xwq1-2"})(["width:155px;height:155px;object-fit:cover;border-radius:8px;margin-bottom:8px;@media ","{width:201px;height:201px;border-radius:0;margin-bottom:0;}"],q.c.maxPhone),X=c.c.div.withConfig({displayName:"stylesProduct__Content",componentId:"sc-20xwq1-3"})(["max-width:100%;@media ","{padding:8px 16px;}"],q.c.maxPhone),J=Object(c.b)(["font-size:14px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;"]),Q=c.c.a.withConfig({displayName:"stylesProduct__ActionLink",componentId:"sc-20xwq1-4"})([""," color:#333;display:block;margin-top:8px;text-decoration:underline;cursor:hover;"],J),Z=c.c.button.withConfig({displayName:"stylesProduct__ActionButton",componentId:"sc-20xwq1-5"})([""," padding:6px 0;border:none;cursor:pointer;margin-top:8px;width:100%;display:flex;align-items:center;justify-content:center;border-radius:100px;color:",";background:",";background-color:",";font-family:",";"],J,e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,G.a.default),ee=c.c.h3.withConfig({displayName:"stylesProduct__ProductTitle",componentId:"sc-20xwq1-6"})([""," font-weight:500;"],J),te=c.c.p.withConfig({displayName:"stylesProduct__ProductDescription",componentId:"sc-20xwq1-7"})([""," font-weight:400;"],J),ne=c.c.div.withConfig({displayName:"stylesProduct__ProductPrice",componentId:"sc-20xwq1-8"})([""," font-weight:500;"],J);function re(e){let{to:t,text:n,onClick:r}=e;return t?i.a.createElement(Q,{onClick:r,href:t},n):i.a.createElement(Z,{onClick:r},n)}var oe=function(e){var t,n,r,o,a,s;let{product:c,onProductClick:l}=e;const u=null!==(t=null==c?void 0:c.image)&&void 0!==t&&t,d=null!==(n=null==c?void 0:c.title)&&void 0!==n&&n,f=null!==(r=null==c?void 0:c.productUrl)&&void 0!==r&&r,p=null!==(o=null==c?void 0:c.description)&&void 0!==o&&o,h=(null==c?void 0:c.price)||!1,m=null!==(a=null==c?void 0:c.linkText)&&void 0!==a&&a,g=null!==(s=null==c?void 0:c.linkUrl)&&void 0!==s&&s;return i.a.createElement(Y,null,i.a.createElement(W,{href:f},u&&i.a.createElement(K,{src:u,alt:d}),i.a.createElement(X,null,d&&i.a.createElement(ee,null,d),p&&i.a.createElement(te,null,p),h&&i.a.createElement(ne,null,h))),m&&i.a.createElement(re,{to:g,text:m,onClick:e=>{if("function"==typeof l)try{l(e,c)}catch(e){console.error(e)}}}))};const ae=c.c.div.withConfig({displayName:"stylesProducts__Container",componentId:"sc-vfg4fr-0"})(["margin:24px;@media ","{margin:24px 0;}"],q.c.maxPhone),ie=c.c.div.withConfig({displayName:"stylesProducts__CarouselContainer",componentId:"sc-vfg4fr-1"})(["position:relative;overflow:hidden;> div{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto;grid-gap:14px;transform:translate(0);",";}"],e=>e.active&&"\n position: relative;\n width: 1000%;\n display: flex;\n grid-gap: 0px;\n "),se=c.c.h2.withConfig({displayName:"stylesProducts__Title",componentId:"sc-vfg4fr-2"})(["font-size:16px;font-weight:500;line-height:26px;margin:16px 0px;@media ","{margin:16px 24px;}"],q.c.maxPhone);function ce(e){let{children:t,carouselPosition:n,onTouchStart:r,onTouchMove:o,onTouchEnd:a}=e;return i.a.createElement($.a.div,{transition:{ease:"easeInOut",duration:.3},style:{x:n},onTouchStart:r,onTouchMove:o,onTouchEnd:a},t)}var le=function(e){var t,n;let{section:r,onProductClick:o}=e;const{width:s}=(()=>{const[e,t]=Object(a.useState)({width:void 0,height:void 0});return Object(a.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),c=parseInt(q.g.phone.replace("px",""),10),l=null!==(t=null==r?void 0:r.items)&&void 0!==t?t:[],u=null!==(n=null==r?void 0:r.title)&&void 0!==n&&n,{setIndex:d,imageIndex:f,carouselPosition:p}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:r=!0}=e;const[o,i]=Object(a.useState)(0),s=Object($.b)(0);return Object(a.useEffect)(()=>{t>=n&&r&&s.set(0)},[t,n,s,r]),{setIndex:Object(a.useCallback)((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;i(e),s.set(o)},[t,n,s]),imageIndex:o,carouselPosition:s}})({windowWidth:s,phoneWidth:c}),{handleTouchStart:h,handleTouchMove:m,handleTouchEnd:g}=Object(V.a)({carousel:l,index:f,setIndex:d});return i.a.createElement(ae,null,u&&i.a.createElement(se,null,u),i.a.createElement(ie,{active:s<c},i.a.createElement(ce,{carouselPosition:p,onTouchStart:h,onTouchMove:m,onTouchEnd:g},l.map(e=>i.a.createElement(oe,{product:e,key:e.id,onProductClick:o})))))},ue=n(75);var de=function(e){let{buttons:t,slug:n}=e;const r=Object(s.c)(),o=t.length>0,c=Object(a.useCallback)(()=>{r(Object(O.e)({slug:n,eventType:E.u}))},[r,n]);return o?i.a.createElement(_,null,t.map((e,t)=>i.a.createElement(ue.a,{button:e,key:`${e.value}-${t}`,isNudge:!0,onClick:c}))):null};var fe=function(e){let{title:t,description:n,link:r,slug:o}=e;const c=Object(s.c)(),l=Object(a.useCallback)(e=>{e.preventDefault(),c(Object(O.e)({slug:o,eventType:E.u})),window.location.href=e.target.getAttribute("href")},[o]);return i.a.createElement(_,null,t&&i.a.createElement(C,null,t),n&&i.a.createElement(j,null,n),(null==r?void 0:r.location)&&(null==r?void 0:r.text)&&i.a.createElement(T,{href:r.location,onClick:l},r.text))};const pe=e=>e||{location:"",text:""};function he(e){var t,n,r,o,a,c,l,u;let{section:d,slug:f,onProductClick:p,onNewsletterSubmit:h}=e;const m=Object(s.c)(),g=null!==(t=null==d?void 0:d.title)&&void 0!==t&&t,b=null!==(n=null==d?void 0:d.description)&&void 0!==n&&n,v=null!==(r=null==d?void 0:d.buttons)&&void 0!==r&&r,y=null!==(o=null==d?void 0:d.products)&&void 0!==o&&o,x=null!==(a=null==d?void 0:d.choices)&&void 0!==a&&a,k=null!==(c=null==d?void 0:d.form)&&void 0!==c&&c,_=null!==(l=null==d?void 0:d.link)&&void 0!==l&&l,C=null!==(u=null==d?void 0:d.html)&&void 0!==u&&u;return i.a.createElement(i.a.Fragment,null,(g||b||_)&&i.a.createElement(fe,{title:g,description:b,link:pe(_),slug:f}),v&&i.a.createElement(de,{buttons:v,slug:f}),x&&i.a.createElement(H,{choices:x,slug:f}),y&&i.a.createElement(le,{section:y,onProductClick:(e,t)=>{if(null!=t&&t.productUrl?m(Object(O.e)({slug:f,eventType:E.u,label:t.productUrl})):console.warn("Could not track cta click with label:",t.productUrl),"function"==typeof p)try{p(e,t)}catch(e){console.error(e)}}}),k&&i.a.createElement(B,{form:k,onNewsletterSubmit:h,slug:f}),C&&i.a.createElement(w,{html:C,slug:f}))}var me=e=>{var t;let{layout:n,slug:r,onProductClick:o,onNewsletterSubmit:a}=e;return(null!==(t=null==n?void 0:n.sections)&&void 0!==t?t:[]).map((e,t)=>i.a.createElement(he,{key:`section-${t}`,section:e,slug:null!=r?r:null,onProductClick:o,onNewsletterSubmit:a}))},ge=n(44);var be=function(e){let{bubbleHidden:t,show:n,slug:r,layout:o,onDismiss:a,onProductClick:s,onNewsletterSubmit:c}=e;return i.a.createElement(ge.b,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-cy":"nudge-container","data-story":"NudgeContainer"},i.a.createElement(ge.a,null),i.a.createElement(ge.c,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:a,type:"button","data-cy":"close-nudge-button"},i.a.createElement(y.e,{width:25,height:25})),i.a.createElement(ge.d,null,i.a.createElement(me,{layout:o,slug:r,onProductClick:s,onNewsletterSubmit:c})))};t.default=function(e){var t;let{hidden:n,layout:r,onDismiss:o,onProductClick:c,onNewsletterSubmit:l}=e;const{show:h,nudgeType:m,slug:g}=Object(s.d)(p.o),b=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,y=Object(s.c)(),x=Object(a.useCallback)(e=>{if(e.stopPropagation(),y(Object(f.u)()),"function"==typeof o)try{o(e)}catch(e){console.error(e)}},[o,y]);return i.a.createElement(i.a.Fragment,null,b&&i.a.createElement(u,{backdrop:b,onClick:x}),m===d.i.TEMPLATE&&i.a.createElement(be,{show:h,layout:r,slug:g,onDismiss:x,onProductClick:c,onNewsletterSubmit:l,bubbleHidden:n}),m===d.i.CUSTOM&&i.a.createElement(v,null))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(3),i=n(10),s=(n(4),n(22));function c(e){const[t,n]=Object(r.useState)(!1);return[t,Object(r.useCallback)(t=>{n(!0),e(t)},[e])]}n(41);var l=n(1),u=n(6),d=n(44);const f="cubic-bezier(0.18, 0.58, 0.37, 0.92)",p=Object(l.c)(d.c).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackDismiss",componentId:"sc-c01o0q-0"})([""]),h=Object(l.c)(d.a).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackBorderElement",componentId:"sc-c01o0q-1"})([""]),m=Object(l.c)(d.b).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackContainer",componentId:"sc-c01o0q-2"})(["z-index:20;",";@media ","{z-index:20;}"],e=>{let{modal:t}=e;return t&&"\n right: unset;\n bottom: unset;\n "},u.c.maxPhone),g=Object(l.c)(d.d).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackInner",componentId:"sc-c01o0q-3"})(["min-width:380px;padding:0 20px;@media ","{padding:0 12px;max-width:",";width:auto;min-width:auto;}"],u.c.maxPhone,u.g.phone),b=(l.c.div.withConfig({displayName:"NudgeFeedbackstyles__Section",componentId:"sc-c01o0q-4"})(["margin:24px;display:flex;flex-direction:column;"]),l.c.h2.withConfig({displayName:"NudgeFeedbackstyles__Title",componentId:"sc-c01o0q-5"})(["font-size:16px;font-weight:500;line-height:26px;margin:0 0 16px 0;"])),v=l.c.p.withConfig({displayName:"NudgeFeedbackstyles__Description",componentId:"sc-c01o0q-6"})(["line-height:22px;"]),y=(l.c.a.withConfig({displayName:"NudgeFeedbackstyles__Link",componentId:"sc-c01o0q-7"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]),l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackContainer",componentId:"sc-c01o0q-8"})(["border-radius:14px;overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:24px 0;opacity:0;",";transition:opacity 0.15s linear 0.2s,transform "," 300ms;"],e=>e.hasEntered&&"opacity: 1",f)),x=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackFormContent",componentId:"sc-c01o0q-9"})(["text-align:center;width:100%;"," ",""],e=>e.ratingSent&&`transition: all ${f} 300ms;`,e=>e.finished&&"z-index: 11; position: relative; opacity: 0;"),w=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackThanksContainer",componentId:"sc-c01o0q-10"})(["opacity:0;margin-top:16px;text-align:center;transition:all "," 300ms;",""],f,e=>{let{finished:t}=e;return t&&"opacity: 1;"}),E=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackStepContainer",componentId:"sc-c01o0q-11"})(["width:100%;opacity:1;transition:all "," 300ms;",""],f,e=>{let{hasRated:t}=e;return t&&"display: none;"}),O=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackEmojiContainer",componentId:"sc-c01o0q-12"})(["height:fit-content;min-height:35px;cursor:pointer;margin:0 0 16px 0;transition:all ease 300ms;",";"],e=>e.hovering&&"\n .emoji.chosen {\n opacity: 1;\n }\n .emoji:not(.chosen) {\n opacity: 0.4;\n }\n "),k=l.c.span.withConfig({displayName:"NudgeFeedbackstyles__StyledEmoji",componentId:"sc-c01o0q-13"})(["display:inline-block;margin:0 10px;transition:opacity 0.1s linear;background:none;border:none;padding:0;cursor:pointer;"]),_=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1qibng2-0"})([""]),C=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1qibng2-1"})([""]),j=l.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1qibng2-2"})(["display:flex;justify-content:center;margin-top:30px;button{width:70px;min-width:auto;margin:0 15px;}"]);var T=function(e){let{submit:t,textContent:n}=e;const[r,a]=c(t),{binary_headline:i,binary_1:l,binary_0:u}=n;return o.a.createElement(C,{hasRated:r},o.a.createElement(_,null,i),o.a.createElement(j,null,o.a.createElement(s.b,{type:"submit",onClick:()=>a(2),color:!0,flat:!0,text:l}),o.a.createElement(s.b,{type:"submit",onClick:()=>a(1),color:!0,flat:!0,text:u})))},S=n(174),I=n.n(S),A=n(175),N=n.n(A),P=n(176),M=n.n(P);const L=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1krelmc-0"})([""]),R=Object(l.c)(v).withConfig({displayName:"styles__Description",componentId:"sc-1krelmc-1"})([""]),D=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1krelmc-2"})([""]),B=Object(l.c)(O).withConfig({displayName:"styles__EmojiContainer",componentId:"sc-1krelmc-3"})([""]),F=Object(l.c)(k).withConfig({displayName:"styles__Emoji",componentId:"sc-1krelmc-4"})([""]),z=l.c.img.withConfig({displayName:"styles__EmojiImage",componentId:"sc-1krelmc-5"})(["height:35px;width:35px;"]),U={1:{src:M.a,description:"sad face"},2:{src:N.a,description:"neutral face"},3:{src:I.a,description:"happy face"}};function H(e){let{number:t,selected:n,setTentativeRating:r,setRating:a}=e;const i=n===t,{src:s,description:c}=U[t];return o.a.createElement(F,{className:`emoji ${i?"chosen":""}`,onFocus:()=>r(t),onBlur:()=>r(0),onMouseEnter:()=>r(t),onMouseLeave:()=>r(0),role:"radio",tabIndex:"0","aria-checked":n?"true":"false","aria-label":c,onKeyPress:e=>{"Enter"===e.key&&(a(t),e.preventDefault(),e.stopPropagation())},onClick:()=>a(t)},o.a.createElement(z,{src:s,alt:`${c} emoji`}))}var $=function(e){let{submit:t,textContent:n}=e;const[a,i]=Object(r.useState)(!1),[s,l]=Object(r.useState)(0),[u,d]=c(t),{emoji_guideline:f,emoji_headline:p}=n;return o.a.createElement(D,{hasRated:u},o.a.createElement(L,null,p),o.a.createElement(B,{hovering:a,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},[1,2,3].map(e=>o.a.createElement(H,{key:`chat-feedback-emoji-${e}`,number:e,selected:s,setTentativeRating:l,setRating:d}))),o.a.createElement(R,null,f))},V=n(8),q=n(26);const G=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-r8xh7-0"})([""]),W=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-r8xh7-1"})([""]),Y=l.c.a.withConfig({displayName:"styles__LinkButton",componentId:"sc-r8xh7-2"})([""," text-decoration:none;font-size:15px;width:fit-content;margin:0 auto;padding:11px 20px;font-weight:500;"],q.e);var K=function(e){let{textContent:t}=e;const{external_link_headline:n,external_link_text:i,external_link_url:s}=t,c=Object(a.c)(),l=Object(r.useCallback)(()=>c(Object(V.w)()),[c]);return o.a.createElement(W,{hasRated:!1},n&&i&&o.a.createElement(G,null,n),o.a.createElement(Y,{href:s,onClick:l,target:"_blank",rel:"noopener noreferrer",$color:!0},i||n))};var X=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#97cd72"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("path",{d:"M138.82,131.5a8.33,8.33,0,0,0-3.8.33c-8,2.78-20.62,4.58-34.91,4.58s-27-1.81-34.94-4.59c-.81-.2-3.45-.79-4.35-.15-.51.36-.2.8.25,1.16,7.16,4.38,21.93,8.77,39,8.77s31.74-4.36,39-8.71C139.53,132.44,140,131.78,138.82,131.5Z",fill:"#231e20"}))};var J=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#f47d7f"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("path",{d:"M138.82,141.47a8.33,8.33,0,0,1-3.8-.32c-8-2.78-20.62-4.58-34.91-4.58s-27,1.8-34.94,4.59c-.81.2-3.45.79-4.35.15-.51-.37-.2-.81.25-1.17,7.16-4.37,21.93-8.76,39-8.76s31.74,4.36,39,8.7C139.53,140.54,140,141.2,138.82,141.47Z",fill:"#231e20"}))};var Q=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#00a24a"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("path",{d:"M138.82,119.86c-1.26-1-2.94.14-3.8,1.08-8,9.27-20.62,15.28-34.91,15.28s-27-6-34.94-15.31c-.62-.8-3.05-2.42-4.35-.51-.93,1.38-.26,2.56.25,3.89,7.16,14.6,21.93,29.25,39,29.25s31.74-14.55,39-29C140.23,121.81,140,120.78,138.82,119.86Z",fill:"#231e20"}))};var Z=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#ee2324"}),o.a.createElement("path",{d:"M138.78,153.13c-1.25,1-2.94-.13-3.8-1.08-7.95-9.27-20.62-15.28-34.9-15.28s-27,6-34.95,15.32c-.61.79-3,2.42-4.34.5-.94-1.38-.27-2.55.24-3.88C68.2,134.1,83,119.45,100.08,119.45S131.82,134,139,148.5C140.2,151.18,139.92,152.21,138.78,153.13Z",fill:"#231e20"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}))};const ee=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1wxcq1r-0"})([""]),te=Object(l.c)(v).withConfig({displayName:"styles__Description",componentId:"sc-1wxcq1r-1"})([""]),ne=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1wxcq1r-2"})([""]),re=Object(l.c)(O).withConfig({displayName:"styles__EmojiContainer",componentId:"sc-1wxcq1r-3"})([""]),oe=Object(l.c)(k).withConfig({displayName:"styles__Emoji",componentId:"sc-1wxcq1r-4"})(["width:37px;margin:0 4px;"]),ae={1:{Component:Z,description:"very unhappy"},2:{Component:J,description:"unhappy"},3:{Component:X,description:"happy"},4:{Component:Q,description:"very happy"}};function ie(e){let{number:t,selected:n,setTentativeRating:r,setRating:a}=e;const i=n===t,{Component:s,description:c}=ae[t];return o.a.createElement(oe,{className:`emoji ${i?"chosen":""}`,onFocus:()=>r(t),onBlur:()=>r(0),onMouseEnter:()=>r(t),onMouseLeave:()=>r(0),role:"radio",tabIndex:"0","aria-checked":n?"true":"false","aria-label":c,onKeyPress:e=>{"Enter"===e.key&&(a(t),e.preventDefault(),e.stopPropagation())},onClick:()=>a(t)},o.a.createElement(s,{alt:`${c} emoji`}))}var se=function(e){let{submit:t,textContent:n}=e;const[a,i]=Object(r.useState)(!1),[s,l]=Object(r.useState)(0),[u,d]=c(t),{emoji_guideline:f,emoji_headline:p}=n;return o.a.createElement(ne,{hasRated:u},o.a.createElement(ee,null,p),o.a.createElement(re,{hovering:a,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},[4,3,2,1].map(e=>o.a.createElement(ie,{key:`chat-feedback-happy-or-not-${e}`,number:e,selected:s,setTentativeRating:l,setRating:d}))),o.a.createElement(te,null,f))},ce=n(19);Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1jtf9kh-0"})([""]);const le=Object(l.c)(v).withConfig({displayName:"styles__Description",componentId:"sc-1jtf9kh-1"})([""]),ue=Object(l.c)(E).withConfig({displayName:"styles__FreeformContainer",componentId:"sc-1jtf9kh-2"})(["z-index:11;opacity:0;visibility:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;",";",""],e=>{let{hasEntered:t}=e;return t&&"\n opacity: 1;\nvisibility: visible;"},e=>{let{finished:t}=e;return t&&"display: none;"}),de=l.c.textarea.withConfig({displayName:"styles__FreeformTextarea",componentId:"sc-1jtf9kh-3"})(["resize:none;width:100%;min-height:100px;max-width:250px;padding:6px 10px;background:",";font-size:14px;margin-bottom:30px;line-height:22px;color:#2c2c2c;font-family:Open sans,Helvetica Neue,Helvetica,Arial,sans-serif !important;border:1px solid #dedede;border-radius:6px;z-index:10;@media ","{font-size:16px;}"," &:hover,&:focus{color:#2c2c2c;border:1px solid #dedede;}"],u.a.grayColor,u.c.maxTablet,ce.a);var fe=function(e){let{submit:t,textContent:n,finished:a}=e;const[i,c]=Object(r.useState)(!1),[l,u]=Object(r.useState)(""),{freeform_description:d,freeform_placeholder:f,send:p}=n;Object(r.useEffect)(()=>{c(!0)},[]);const h=Object(r.useCallback)(e=>{"Enter"===e.key&&t(l)},[l,t]),m=Object(r.useCallback)(e=>{u(e.target.value)},[]);return o.a.createElement(ue,{hasEntered:i,finished:a},o.a.createElement(le,null,d),o.a.createElement(de,{"data-cy":"feedback-freefrom-textarea",rows:4,value:l,onChange:m,placeholder:f}),o.a.createElement(s.b,{color:!0,flat:!0,text:p,type:"submit",onClick:()=>t(l),onKeyDown:h}))},pe=n(5),he=n(15),me=n(7),ge=n(42),be=(n(50),n(23));const ve=l.c.div.withConfig({displayName:"NudgeFeedbackWrapperstyles__Wrapper",componentId:"sc-1eqo0i0-0"})(["background:",";position:",";width:",";height:",";top:58px;left:0;z-index:",";display:flex;justify-content:center;align-items:center;font-family:",";"],e=>{let{modal:t,theme:n}=e;return t?n.background:"none"},e=>{let{modal:t}=e;return t?"fixed":"unset"},e=>{let{modal:t}=e;return t?"100%":0},e=>{let{modal:t}=e;return t?"100%":0},e=>{let{zIndex:t}=e;return`${t+10}`},be.a.default);var ye=function(e){let{children:t,modal:n,zIndex:r}=e;return o.a.createElement(ve,{modal:n,zIndex:r},t)};t.default=function(){const[e,t]=Object(r.useState)(!1),[n,s]=Object(r.useState)(!1),[c,l]=Object(r.useState)(!1),{show:u}=Object(a.d)(me.o),{currentLanguage:d}=Object(a.d)(me.e),{fullscreenMode:f,zIndex:v}=Object(a.d)(me.d),{feedbackForm:E,feedbackForm:{freeform_enabled:O},feedbackFormType:k}=Object(a.d)(me.d),_=Object(a.c)(),{defaultLanguage:C}=Object(he.a)(),j=((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"freeform_enabled"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(ge.a)(a,t,n)}},{}))(E,d,C);Object(r.useEffect)(()=>{l(!0)},[]);const S=Object(r.useCallback)(()=>{_(Object(V.i)())},[_]),I=Object(r.useCallback)(()=>{t(!0),setTimeout(()=>_(Object(V.i)()),2e3)},[_]),A=Object(r.useCallback)(e=>{_(Object(V.N)(e)),O?s(!0):I()},[I,_,O]),N=Object(r.useCallback)(e=>{_(Object(V.O)(e)),I()},[I,_]);let P;switch(k){case pe.r.BINARY:P=T;break;case pe.r.EMOJIS:P=$;break;case pe.r.HAPPY_OR_NOT:P=se;break;case pe.r.EXTERNAL_LINK:P=K;break;default:console.error(`Feedback form type '${k}' not recognized`),P=function(){return null}}return o.a.createElement(ye,{modal:f,zIndex:v},o.a.createElement(m,{ariaHidden:u&&!f?"false":"true",modal:f,"data-cy":"feedback-nudge-container","data-story":"NudgeFeedbackContainer"},o.a.createElement(h,{modal:f}),o.a.createElement(p,{"aria-label":"Dismiss feedback",title:"Dismiss feedback",onClick:S,type:"button",modal:f},o.a.createElement(i.e,{width:25,height:25})),o.a.createElement(g,{modal:f},o.a.createElement(y,{hasEntered:c,finished:e},o.a.createElement(x,{finished:e,ratingSent:n},o.a.createElement(P,{textContent:j,submit:A}),n&&o.a.createElement(fe,{textContent:j,submit:N,finished:e})),e&&o.a.createElement(w,{finished:e},o.a.createElement(b,null,j.thanks))))))}},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n.n(r);var a=e=>Object(r.isValidElement)(e)&&Boolean(e.props.children);var i=e=>Object(r.isValidElement)(e)&&a(e)&&r.Children.toArray(e.props.children).reduce((e,t)=>e||Object(r.isValidElement)(t),!1);const s=(e,t)=>r.Children.toArray(e).map((e,n,o)=>Object(r.isValidElement)(e)&&i(e)?t(Object(r.cloneElement)(e,{...e.props,children:s(e.props.children,t)})):t(e,n,o));var c=s,l=n(32),u=n(3);function d(e){let{width:t,height:n,color:r}=e;return o.a.createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},o.a.createElement("path",{d:"m10.75 8.75 3.5 3.25-3.5 3.25",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}d.defaultProps={width:24,height:24,color:"#333"};var f=d,p=n(22),h=n(7),m=n(111),g=n(81),b=n(35);const v=(e,t)=>o.a.cloneElement(e,t);t.default=function(e){let{defaultValues:t,children:n,onSubmit:r,shouldUnregister:a,clearOnSubmit:i=!1,className:s,sendButtonTitle:d="Submit",cancelButtonTitle:y="Cancel",ariaLabel:x,onCancel:w}=e;const{register:E,handleSubmit:O,getValues:k,reset:_,control:C,setError:j,trigger:T,clearErrors:S,formState:{isSubmitting:I,isSubmitted:A}}=Object(l.b)({...t&&{defaultValues:t},...a&&{shouldUnregister:!0},mode:"onSubmit",reValidateMode:"onBlur"}),{currentLanguage:N}=Object(u.d)(h.e);return o.a.createElement(g.a,{onSubmit:O(async e=>{if(void 0!==Object.values(e).find(e=>!!e))try{await r(e),i&&_()}catch(e){throw _(),e}}),"aria-label":x,isSubmitted:A,className:s,noValidate:!0},c(n,e=>e?(e=>{var t,n,r,a,i,s;if(null!=e&&null!==(t=e.props)&&void 0!==t&&t.name)return e.props.controller?o.a.createElement(l.a,Object.assign({key:e.key,control:C,render:t=>v(e,{...e.props,...t}),rules:Object(b.c)(e.props.validators,N)},e.props)):v(e,{register:E,setError:j,clearErrors:S,trigger:T,control:C});switch(null==e||null===(n=e.type)||void 0===n?void 0:n.name){case m.a.name:return v(e,{placeholder:null===(r=e.props)||void 0===r||null===(a=r.children)||void 0===a||null===(i=a[0].props)||void 0===i?void 0:i.placeholder_text,...!(null!==(s=e.props)&&void 0!==s&&s.htmlFor)&&{htmlFor:e.props.slug}});default:return e}})(e):null),o.a.createElement(g.b,null,o.a.createElement(p.b,{disabled:I,onClick:()=>{const e=k();w(e)},text:y}),o.a.createElement(p.b,{type:"submit",icon:o.a.createElement(f,{color:"#fff",width:16,height:16}),loading:I,text:d,color:!0})))}},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n.n(r),a=n(3),i=n(10),s=n(8),c=n(7),l=n(1),u=n(11),d=n(12),f=n(6);const p=Object(l.b)(["display:flex;overflow:hidden;z-index:-1;min-width:125px;height:45px;"]),h=l.c.div.withConfig({displayName:"styles__ToolsContainer",componentId:"sc-vkneg1-0"})(["z-index:0;width:15px;border-radius:7px;min-width:80px;margin-right:-25px;background:#fff;background-color:#fff;position:absolute;right:50px;box-shadow:0px 1px 5px 0px ",";transition:all 0.2s ease;",";",";"],f.a.shadowColorDark,e=>{let{hasInspector:t}=e;return t&&p},e=>{let{active:t}=e;return!t&&"min-width: 0"}),m=l.c.div.withConfig({displayName:"styles__LanguageContainer",componentId:"sc-vkneg1-1"})(["padding:2px;border-radius:7px;background:#fff;background-color:#fff;box-shadow:0px 1px 5px 0px ",";right:110px;display:flex;position:absolute;min-width:max-content;justify-content:center;",";"],f.a.shadowColorDark,u.f),g=Object(l.c)(d.d).withConfig({displayName:"styles__LanguageText",componentId:"sc-vkneg1-2"})(["color:#757575;margin:0;cursor:pointer;font-size:12px;font-weight:500;text-decoration:none;:hover{text-decoration:underline;}"]),b=l.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-vkneg1-3"})(["display:flex;padding:2px;align-items:center;justify-content:space-between;"]),v=Object(l.c)(d.a).withConfig({displayName:"styles__ToolButton",componentId:"sc-vkneg1-4"})(["display:flex;position:relative;align-items:center;padding:13px;border-radius:7px;transition:all 0.15s ease;:hover{background:#",";background-color:#",";svg path{fill:#000;}:after{border-left-color:#000;}}"," ",""],f.a.grayColor,f.a.grayColor,e=>e.active&&`\n background: #${f.a.grayColor};\n background-color: #${f.a.grayColor};\n svg path {\n fill: #000;\n }\n `,e=>e.tail&&`\n :after {\n content: '';\n width: 0;\n height: 0;\n position: absolute;\n right: 5px;\n bottom: 3px;\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n border-left: 3px solid ${e.active?"#000":f.a.primaryColor};\n transform: rotate(45deg);\n }`);var y=n(72),x=n(68);t.default=function(e){let{active:t}=e;const[n,l]=Object(r.useState)(!1),{botKey:u,admin:d}=Object(a.d)(c.e),{languages:f}=Object(a.d)(c.d),{inspectorOpen:p}=Object(a.d)(c.j),w=Object(a.c)(),E=Object(r.useCallback)(()=>{w(Object(s.mb)())},[w]);return function(){var e,t;const n=Object(a.c)(),{admin:o}=Object(a.d)(c.e),{chatMessages:i}=Object(a.d)(c.n)||[],s=null===(e=i.filter(e=>!(null!=e&&e.from_bot)).slice(-1))||void 0===e||null===(t=e[0])||void 0===t?void 0:t.message,l=Object(y.a)(e=>{n(Object(x.h)(e))},1e3),u=Object(r.useCallback)(e=>{e.altKey&&"KeyR"===e.code&&s&&l(s)},[s,l]);Object(r.useEffect)(()=>{if(o)return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[u,o])}(),o.a.createElement(o.a.Fragment,null,n&&t&&o.a.createElement(m,null,f.map(e=>o.a.createElement(v,{key:e.code,title:`Restart ${e.name}`,onClick:()=>{return t=e.code,w(Object(s.R)(t)),void l(!1);var t}},o.a.createElement(g,null,e.code.toUpperCase())))),o.a.createElement(h,{active:t,hasInspector:d},d&&o.a.createElement(b,null,o.a.createElement(v,{onClick:E,title:p?"Close chat inspector":"Open chat inspector"},p?o.a.createElement(i.i,null):o.a.createElement(i.j,null))),o.a.createElement(b,null,o.a.createElement(v,{title:"Restart chat",onClick:()=>{f.length>1?l(!n):w(Object(s.fb)(u,!0))},active:n,tail:f.length>1},o.a.createElement(i.o,{width:15,height:15})))))}}])}));
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prop-types"),require("react"),require("react-dom"),require("pusher-redux"),require("pusher-js")):"function"==typeof define&&define.amd?define(["prop-types","react","react-dom","pusher-redux","pusher-js"],t):"object"==typeof exports?exports.kindlyChat=t(require("prop-types"),require("react"),require("react-dom"),require("pusher-redux"),require("pusher-js")):e.kindlyChat=t(e["prop-types"],e.react,e["react-dom"],e["pusher-redux"],e["pusher-js"])}(globalThis,((e,t,n,r,o)=>(()=>{var a={8594:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const o=(a={},function(e){return void 0===a[e]&&(a[e]=(t=e,r.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91)),a[e];var t});var a},9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),o=n(6026),a=n(4372),i=n(5327),s=n(4097),l=n(4109),c=n(7985),u=n(5061);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers,p=e.responseType;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+g)}var v=s(e.baseURL,e.url);function y(){if(h){var r="getAllResponseHeaders"in h?l(h.getAllResponseHeaders()):null,a={data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,n,a),h=null}}if(h.open(e.method.toUpperCase(),i(v,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var b=(e.withCredentials||c(v))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;b&&(f[e.xsrfHeaderName]=b)}"setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),p&&"json"!==p&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),o=n(1849),a=n(321),i=n(7185);function s(e){var t=new a(e),n=o(a.prototype.request,t);return r.extend(n,a.prototype,t),r.extend(n,t),n}var l=s(n(5655));l.Axios=a,l.create=function(e){return s(i(l.defaults,e))},l.Cancel=n(5263),l.CancelToken=n(4972),l.isCancel=n(6502),l.all=function(e){return Promise.all(e)},l.spread=n(8713),l.isAxiosError=n(6268),e.exports=l,e.exports.default=l},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),o=n(5327),a=n(782),i=n(3572),s=n(7185),l=n(4875),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var u=[i,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{o=i(d)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},782:(e,t,n)=>{"use strict";var r=n(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,n)=>{"use strict";var r=n(1793),o=n(7303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},3572:(e,t,n)=>{"use strict";var r=n(4867),o=n(8527),a=n(6502),i=n(5655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return s(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.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:this.config,code:this.code}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],a=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=l(void 0,e[o])):n[o]=l(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(a,c),r.forEach(i,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=l(void 0,e[o])):n[o]=l(void 0,t[o])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=o.concat(a).concat(i).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,c),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),o=n(5655);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4155),o=n(4867),a=n(6016),i=n(481),s={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(c=n(5448)),c),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e,t,n){if(o.isString(e))try{return(0,JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||r&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){u.headers[e]=o.merge(s)})),e.exports=u},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),o=["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"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(8593),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={},i=r.version.split(".");function s(e,t){for(var n=t?t.split("."):i,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]<r[o])return!1}return!1}o.transitional=function(e,t,n){var o=t&&s(t);function i(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(i(r," has been removed in "+t));return o&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],l=void 0===s||i(s,a,e);if(!0!==l)throw new TypeError("option "+a+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},4867:(e,t,n)=>{"use strict";var r=n(1849),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:l,isUndefined:i,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):a(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},4210:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>hs});var r=n(5099),o=n.n(r),a=n(8156),i=n.n(a),s=n(7703),l=n(540),c=n(3497),u=n(9729);const d=(0,l.iv)(["bottom:",";right:",";@media ","{right:0;}max-height:730px;"],(e=>e.position.bottom),(e=>e.position.right),u.Uh.maxPhone),f=(0,l.iv)(["bottom:0px;right:0px;top:0px;width:100%;"]),p=l.ZP.div.withConfig({displayName:"KindlyChatstyles__ChatContainer",componentId:"sc-1y4lzsi-0"})(["position:fixed;font-size:16px;text-align:initial;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;z-index:",";font-family:",";"," *{box-sizing:border-box;",";}@media ","{display:flex;width:100%;max-height:unset;align-items:center;justify-content:center;",";}"],(e=>e.zIndex+5),(e=>{let{theme:t}=e;return t.customFont?t.customFont:c.I.default}),(e=>e.fullscreen?f:d),(e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`}),u.Uh.maxTablet,(e=>{let{active:t}=e;return t&&"height: 100%;\n bottom: 0;\n right: 0;\n left: 0;\n top: 0"}));var h=n(6105),m=n(8260);const g=l.ZP.button.withConfig({displayName:"styles__CloseIconButton",componentId:"sc-96uqai-0"})(["position:absolute;z-index:",";top:24px;right:24px;background:none;border:none;cursor:pointer;",""],(e=>e.zIndex+10),m.O),v=l.ZP.div.withConfig({displayName:"styles__LightBox",componentId:"sc-96uqai-1"})(["position:fixed;background:rgba(0,0,0,0.5);top:0;right:0;bottom:0;left:0;z-index:",";display:flex;align-items:center;justify-content:center;"],(e=>e.zIndex+9)),y=l.ZP.img.withConfig({displayName:"styles__LightBoxImage",componentId:"sc-96uqai-2"})(["width:auto;max-width:100%;max-height:100%;margin:auto;padding:24px;"]);var b=n(8309),x=n(6086),w=n(8426);const E=(0,l.F4)(["0%{visibility:visible;opacity:0;}1%{opacity:0;transform:translateY(20px);}100%{opacity:1;transform:translateY(0);}"]),k=(0,l.iv)(["",";animation-name:",";"],(0,w.AV)(),E),_=(0,l.F4)(["0%{opacity:1;transform:translateY(0px);}99%{opacity:0;transform:translateY(20px);}100%{opacity:0;visibility:hidden;}"]),C=(0,l.iv)(["",";animation-name:",";"],(0,w.AV)(),_),T=(0,l.iv)(["",";right:unset;bottom:unset;transition:width 300ms ease 0ms,height 300ms ease 0ms;"],(e=>e.chatHasStarted?"width: 100%;\n height: 100%;\n ":"width: 90%;\n height: 95%;\n border-radius: 6px;")),S=(0,l.iv)(["max-height:",";height:",";width:",";"],(e=>e.fullscreen?"100%":"645px"),(e=>e.fullscreen?"100%":"645px"),(e=>e.fullscreen?"100%":"360px")),I=(0,l.iv)(["bottom:85px;right:10px;border-radius:12px;@media (max-height:","){min-height:380px;height:calc(100vh - ",");}"],"950px",(e=>e.offsetHeight)),O=(0,l.iv)(["bottom:0px;right:0px;border-radius:0px;"]),P=(0,l.iv)([""," "," ",""],(e=>e.fullscreen?O:I),(e=>e.active?S:(0,w.rQ)()),(e=>!e.fullscreen&&!e.chatHasStarted&&(e=>e.active?k:C)(e))),A=(0,l.iv)(["right:369px;display:flex;flex-direction:column;justify-content:flex-start;z-index:19;border-radius:6px 0 0 6px;background:#ffffff;background-color:#ffffff;>:last-child{margin:auto 20px 20px;}"]),N=l.ZP.div.withConfig({displayName:"styles__ChatBoxContainer",componentId:"sc-1usve4j-0"})(["position:absolute;z-index:20;overflow:hidden;flex-direction:column;box-shadow:0px 8px 48px rgba(0,0,0,0.06),0px 0px 1px rgba(0,0,0,0.16),0px 4px 8px rgba(0,0,0,0.04);display:",";@media ","{",";","}@media ","{visibility:",";",";}"],(e=>e.hide?"none":"flex"),u.Uh.minTablet,P,(e=>{let{inspectorContainer:t}=e;return t&&A}),u.Uh.maxTablet,(e=>e.active?"visible":"hidden"),T);var M=n(7599);const L=l.ZP.div.withConfig({displayName:"styles__Section",componentId:"sc-1iatydl-0"})(["margin:20px;display:flex;flex-direction:column;"]),R=l.ZP.hr.withConfig({displayName:"styles__Separator",componentId:"sc-1iatydl-1"})(["border-top:1px solid rgb(243,243,244);width:100%;margin:0;"]),D=l.ZP.button.withConfig({displayName:"styles__Navigation",componentId:"sc-1iatydl-2"})(["text-align:center;margin:5px 5px 0 5px;background:rgb(243,243,244);border:1px solid rgb(243,243,244);font-weight:600;padding:7px 16px;border-radius:5px;cursor:pointer;outline:none;&:hover{background:rgb(230,230,230);}&:disabled{background:white;color:rgb(206,206,206);border-color:rgb(206,206,206);cursor:default;}"]),j=l.ZP.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-1iatydl-3"})(["display:flex;align-items:baseline;font-size:13px;",""],(e=>{let{spaceBetween:t}=e;return t?"justify-content: space-between;":""})),B=l.ZP.div.withConfig({displayName:"styles__Slot",componentId:"sc-1iatydl-4"})(["padding:1px 3px;border-radius:3px;font-size:12px;margin-right:5px;background:rgba(255,74,156,0.25);"]),Z=l.ZP.span.withConfig({displayName:"styles__Dot",componentId:"sc-1iatydl-5"})(["height:7px;width:7px;background:rgb(255,172,74);border-radius:50%;margin-right:5px;bottom:1px;position:relative;"]),F=l.ZP.span.withConfig({displayName:"styles__Corrected",componentId:"sc-1iatydl-6"})(["border-bottom:1px dotted red;"]),U=l.ZP.span.withConfig({displayName:"styles__Arrow",componentId:"sc-1iatydl-7"})(["margin:0 5px;color:gray;"]),z=l.ZP.div.withConfig({displayName:"styles__Label",componentId:"sc-1iatydl-8"})(["padding:1px 6px;border-radius:3px;border:1px solid lightgray;text-transform:uppercase;font-size:12px;margin:0 5px 3px 5px;white-space:nowrap;",""],(e=>{let{filled:t}=e;return t?"background: rgb(0, 105, 255); color: white;":""})),H=l.ZP.a.withConfig({displayName:"styles__Link",componentId:"sc-1iatydl-9"})(["text-decoration:none;color:initial;cursor:pointer;&:hover{color:rgb(0,105,255);}"]),$=()=>{},V=function(){return i().createElement(i().Fragment,null,i().createElement(L,null,i().createElement(M.H5,null,"No messages yet!")),i().createElement(j,{spaceBetween:!0},i().createElement(D,{disabled:!0,onClick:$},"Show previous"),i().createElement(D,{disabled:!0,onClick:$},"Show next")))};n(3743);var q=n(2969);const{SAMPLE_MATCH:W,KEYWORD_EXACT_MATCH:G,KEYWORD_MENTION:Y,PATTERN_MATCH:X,ZODIAC:K}=b.xm,Q=e=>(null!=e?e:"").toLowerCase().replace(/[-_]/g," "),J=function(e){let{handler:t,score:n,exchangeType:r,sender:o,fromWebhook:a,label:s}=e;return"string"==typeof s?i().createElement(z,null,s):(0,q.Z)(t,[W,K])&&n?i().createElement(z,{filled:!0,title:"Confidence score"},`${Math.round(100*n)} %`):(0,q.Z)(t,Object.values(b.xm))?i().createElement(z,null,(e=>{switch(e){case W:case K:return"sample";case X:return"pattern";case G:case Y:return"keyword";default:return Q(e)}})(t)):a?i().createElement(z,null,"webhook"):"string"==typeof r?i().createElement(z,null,Q(r)):(0,q.Z)(o,Object.values(b.B6))?i().createElement(z,null,Q(o)):null};n(172);const ee=e=>{let{botId:t,exchangeType:n,exchangeId:r}=e;return t&&n&&r?`/bot/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`:null},te=function(e){let{children:t,url:n}=e;return n?i().createElement(H,{target:"_blank",rel:"noopener noreferrer",href:n},t):t},ne=function(e){let{botId:t,exchangeType:n,exchangeId:r,children:o}=e;const a=ee({botId:t,exchangeType:n,exchangeId:r});return i().createElement(te,{url:a},i().createElement(j,null,o))},re=(e,t)=>`${(e||"").slice(0,t)}${(null==e?void 0:e.length)>t?"...":""}`,oe=function(e){let{fromBot:t,fromWebhook:n,handler:r,score:o,title:a,message:s,exchangeType:l,exchangeId:c,botId:u,isFollowup:d,sender:f}=e;return i().createElement(L,null,i().createElement(M.H5,null,"Message info"),t&&i().createElement(j,{spaceBetween:!0},a&&i().createElement(ne,{botId:u,exchangeType:l,exchangeId:c},i().createElement(Z,null),i().createElement("span",null,re(a,40))),!a&&i().createElement("span",null,re(s,40)),i().createElement(j,null,i().createElement(J,{handler:r,score:o,exchangeType:l,exchangeId:c,sender:f,fromWebhook:n}),d&&i().createElement(J,{exchangeType:"followup"}))),!t&&i().createElement(j,{spaceBetween:!0},re(s,40),i().createElement(J,{label:"user"})))},ae=function(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return i().createElement(L,null,i().createElement(M.H5,null,"Slot / Pattern context"),i().createElement(j,null,i().createElement(B,null,n),i().createElement("span",null,r)))};n(8881);const ie=function(e){let{replyCandidates:t,botId:n}=e;const r=(0,a.useMemo)((()=>t.filter((e=>{let{selected:t,samle:n,title:r}=e;return!t&&(n||r)}))),[t]);return 0===(null==r?void 0:r.length)?null:i().createElement(L,null,i().createElement(M.H5,null,"Potential dialogues"),r.map((e=>{let{_id:t,score:r,sample:o,title:a,dialogue_id:s}=e;return i().createElement(te,{key:`reply-candidate-${t}`,url:ee({botId:n,exchangeType:"usersays",exchangeId:s})},i().createElement(j,null,i().createElement(J,{handler:b.xm.SAMPLE_MATCH,score:r}),i().createElement(Z,null),i().createElement("span",null,o||a)))})))},se=function(e){let{correctedMessage:t,message:n}=e;return i().createElement(L,null,i().createElement(M.H5,null,"Spelling correction / Greeting removed"),i().createElement(j,null,i().createElement(F,null,n),i().createElement(U,null,"→"),i().createElement("span",null,t)))},le=function(e){let{chatMessage:{message:t,score:n,title:r,handler:o,sender:a,from_bot:l,bot_id:c,from_webhook:u,reply_candidates:d,exchange_type:f,exchange_id:p,is_followup:h,corrected_message:m,pattern_context_match:g}}=e;const{admin:v}=(0,s.v9)(x.W$),y=Object.keys(g||{}).length>0,b=v&&m&&m!==t;return i().createElement(i().Fragment,null,i().createElement(oe,{handler:o,fromBot:l,fromWebhook:u,score:n,title:r,message:t,exchangeType:f,exchangeId:p,botId:c,isFollowup:h,sender:a}),i().createElement(R,null),y&&i().createElement(i().Fragment,null,i().createElement(ae,{patternContextMatch:g}),i().createElement(R,null)),b&&i().createElement(i().Fragment,null,i().createElement(se,{correctedMessage:m,message:t}),i().createElement(R,null)),(null==d?void 0:d.length)>1&&i().createElement(i().Fragment,null,i().createElement(ie,{replyCandidates:d,botId:c}),i().createElement(R,null)))};function ce(e){const t=(0,a.useRef)();return(0,a.useEffect)((()=>{t.current=e}),[e]),t.current}var ue=n(6221);const de=function(){const{active:e,chatHasStarted:t}=(0,s.v9)(x.W$),{currentMessage:n,nextMessage:r,prevMessage:o,isFirstMessage:l,isLastMessage:c}=(()=>{var e,t;const n=(0,s.I0)(),{chatMessages:r}=(0,s.v9)(x.sY),{currentMessageId:o}=(0,s.v9)(x.P8),i=o||(null===(e=r.slice(-1)[0])||void 0===e?void 0:e.id),l=r.findIndex((e=>{let{id:t}=e;return t===i})),c=(0,a.useCallback)((()=>{n((0,ue.qX)(r[l+1].id))}),[r,l,n]),u=(0,a.useCallback)((()=>{n((0,ue.qX)(r[l-1].id))}),[r,l,n]),d=null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,f=ce(d),p=0===l,h=l===d-1;return(0,a.useEffect)((()=>{d>f&&n((0,ue.qX)())}),[n,d,f]),{currentMessage:r[l],nextMessage:c,prevMessage:u,isFirstMessage:p,isLastMessage:h}})();return i().createElement(N,{chatHasStarted:t,active:e,"aria-hidden":e?"false":"true","data-testid":"chat-box-inspector","data-cy":"chat-box-inspector",fullscreen:0,offsetHeight:"205px",inspectorContainer:!0},n&&i().createElement(i().Fragment,null,i().createElement(le,{chatMessage:n}),i().createElement(j,{spaceBetween:!0},i().createElement(D,{disabled:l,onClick:o},"Show previous"),i().createElement(D,{disabled:c,onClick:r},"Show next"))),!n&&i().createElement(V,null))};var fe=n(7212);const pe=l.ZP.div.withConfig({displayName:"styles__AnnouncementContainer",componentId:"sc-xw79eu-0"})(["border-radius:0;box-shadow:1px 2px 5px 2px ",";line-height:23px;background:",";background-color:",";font-size:",";font-weight:500;transform-origin:top;display:flex;z-index:15;position:absolute;padding:0 10px;transform:",";transition:",";width:100%;top:55px;span{font-size:15px;margin-right:7px;}"],u.O9.shadowColor,u.O9.warningColor,u.O9.warningColor,u.JB.fontSizeP,(e=>{let{show:t}=e;return t?"scaleY(1)":"scaleY(0)"}),(e=>{let{show:t}=e;return t?"transform 0.15s ease-in":"transform 0.15s ease-out"})),he=l.ZP.div.withConfig({displayName:"styles__AnnouncementText",componentId:"sc-xw79eu-1"})(["margin:5px 0;display:flex;color:#2c2c2c;font-size:inherit;font-weight:inherit;line-height:24px;"]),me=(0,l.ZP)(fe.rU).withConfig({displayName:"styles__AnnouncementLink",componentId:"sc-xw79eu-2"})(["color:#0063a2;"]),ge=function(){const{text:e,url:t,show:n}=(0,s.v9)(x.p2);return n?i().createElement(pe,{show:n},i().createElement(he,null,i().createElement("span",null,"!"),e),t&&i().createElement(me,{target:"_blank"},"url")):null};var ve=n(9013),ye=n(3882);function be(e){(0,ye.Z)(1,arguments);var t=(0,ve.Z)(e);return t.setHours(0,0,0,0),t}function xe(e){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xe(e)}var we=n(1820),Ee=n(3946),ke=864e5;function _e(e){(0,ye.Z)(1,arguments);var t=(0,ve.Z)(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function Ce(e){(0,ye.Z)(1,arguments);var t=(0,ve.Z)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=_e(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var i=_e(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}var Te=6048e5;var Se={};function Ie(){return Se}function Oe(e,t){var n,r,o,a,i,s,l,c;(0,ye.Z)(1,arguments);var u=Ie(),d=(0,Ee.Z)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.weekStartsOn)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=(0,ve.Z)(e),p=f.getUTCDay(),h=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-h),f.setUTCHours(0,0,0,0),f}function Pe(e,t){var n,r,o,a,i,s,l,c;(0,ye.Z)(1,arguments);var u=(0,ve.Z)(e),d=u.getUTCFullYear(),f=Ie(),p=(0,Ee.Z)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(l=f.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,p),h.setUTCHours(0,0,0,0);var m=Oe(h,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var v=Oe(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}var Ae=6048e5;function Ne(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}const Me=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Ne("yy"===t?r%100:r,t.length)},Le=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Ne(n+1,2)},Re=function(e,t){return Ne(e.getUTCDate(),t.length)},De=function(e,t){return Ne(e.getUTCHours()%12||12,t.length)},je=function(e,t){return Ne(e.getUTCHours(),t.length)},Be=function(e,t){return Ne(e.getUTCMinutes(),t.length)},Ze=function(e,t){return Ne(e.getUTCSeconds(),t.length)},Fe=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Ne(Math.floor(r*Math.pow(10,n-3)),t.length)};var Ue={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Me(e,t)},Y:function(e,t,n,r){var o=Pe(e,r),a=o>0?o:1-o;return"YY"===t?Ne(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Ne(a,t.length)},R:function(e,t){return Ne(Ce(e),t.length)},u:function(e,t){return Ne(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ne(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ne(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Le(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Ne(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){(0,ye.Z)(1,arguments);var n=(0,ve.Z)(e),r=Oe(n,t).getTime()-function(e,t){var n,r,o,a,i,s,l,c;(0,ye.Z)(1,arguments);var u=Ie(),d=(0,Ee.Z)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),f=Pe(e,t),p=new Date(0);return p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0),Oe(p,t)}(n,t).getTime();return Math.round(r/Ae)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Ne(o,t.length)},I:function(e,t,n){var r=function(e){(0,ye.Z)(1,arguments);var t=(0,ve.Z)(e),n=_e(t).getTime()-function(e){(0,ye.Z)(1,arguments);var t=Ce(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),_e(n)}(t).getTime();return Math.round(n/Te)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ne(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Re(e,t)},D:function(e,t,n){var r=function(e){(0,ye.Z)(1,arguments);var t=(0,ve.Z)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/ke)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Ne(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Ne(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Ne(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Ne(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return De(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):je(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ne(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ne(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Be(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ze(e,t)},S:function(e,t){return Fe(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return He(o);case"XXXX":case"XX":return $e(o);default:return $e(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return He(o);case"xxxx":case"xx":return $e(o);default:return $e(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ze(o,":");default:return"GMT"+$e(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ze(o,":");default:return"GMT"+$e(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return Ne(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return Ne((r._originalDate||e).getTime(),t.length)}};function ze(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=r%60;if(0===a)return n+String(o);var i=t||"";return n+String(o)+i+Ne(a,2)}function He(e,t){return e%60==0?(e>0?"-":"+")+Ne(Math.abs(e)/60,2):$e(e,t)}function $e(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+Ne(Math.floor(o/60),2)+n+Ne(o%60,2)}const Ve=Ue;var qe=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},We=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const Ge={p:We,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],a=r[2];if(!a)return qe(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",qe(o,t)).replace("{{time}}",We(a,t))}};var Ye=["D","DD"],Xe=["YY","YYYY"];function Ke(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Qe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Je(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const et={date:Je({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Je({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Je({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var tt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function nt(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=null!=n&&n.width?String(n.width):o;r=e.formattingValues[a]||e.formattingValues[o]}else{var i=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[i]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function rt(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;var i,s=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].test(s))return n}(l):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&e[n].test(s))return n}(l);return i=e.valueCallback?e.valueCallback(c):c,{value:i=n.valueCallback?n.valueCallback(i):i,rest:t.slice(s.length)}}}var ot;const at={code:"en-US",formatDistance:function(e,t,n){var r,o=Qe[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:et,formatRelative:function(e,t,n,r){return tt[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:nt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:nt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:nt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:nt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:nt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ot={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(ot.matchPattern);if(!n)return null;var r=n[0],o=e.match(ot.parsePattern);if(!o)return null;var a=ot.valueCallback?ot.valueCallback(o[0]):o[0];return{value:a=t.valueCallback?t.valueCallback(a):a,rest:e.slice(r.length)}}),era:rt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:rt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:rt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:rt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:rt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var it=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,st=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lt=/^'([^]*?)'?$/,ct=/''/g,ut=/[a-zA-Z]/;function dt(e,t,n){var r,o,a,i,s,l,c,u,d,f,p,h,m,g,v,y,b,x;(0,ye.Z)(2,arguments);var w=String(t),E=Ie(),k=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:E.locale)&&void 0!==r?r:at,_=(0,Ee.Z)(null!==(a=null!==(i=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:E.firstWeekContainsDate)&&void 0!==i?i:null===(d=E.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==a?a:1);if(!(_>=1&&_<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=(0,Ee.Z)(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:E.weekStartsOn)&&void 0!==h?h:null===(b=E.locale)||void 0===b||null===(x=b.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var T=(0,ve.Z)(e);if(!function(e){if((0,ye.Z)(1,arguments),!function(e){return(0,ye.Z)(1,arguments),e instanceof Date||"object"===xe(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=(0,ve.Z)(e);return!isNaN(Number(t))}(T))throw new RangeError("Invalid time value");var S=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(T),I=function(e,t){(0,ye.Z)(2,arguments);var n=(0,Ee.Z)(t);return(0,we.Z)(e,-n)}(T,S),O={firstWeekContainsDate:_,weekStartsOn:C,locale:k,_originalDate:T};return w.match(st).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Ge[t])(e,k.formatLong):e})).join("").match(it).map((function(r){if("''"===r)return"'";var o,a,i=r[0];if("'"===i)return(a=(o=r).match(lt))?a[1].replace(ct,"'"):o;var s,l=Ve[i];if(l)return null!=n&&n.useAdditionalWeekYearTokens||(s=r,-1===Xe.indexOf(s))||Ke(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==Ye.indexOf(e)}(r)||Ke(r,t,String(e)),l(I,r,k.localize,O);if(i.match(ut))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}var ft=n(6204);const pt=(0,l.F4)(["0%{opacity:0;transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),ht=(0,l.iv)(["",";animation-name:",";"],(0,w.AV)(300,150),pt),mt=(0,l.iv)(["flex-direction:row-reverse;"]),gt=(0,l.iv)(["flex-direction:row;"]),vt=(0,l.iv)(["background:#e3e3e7;padding:0 30px;margin:10px -30px;position:relative;&:before{content:'';position:absolute;background:rgb(153,153,153);width:4px;height:calc(100% + 20px);left:0;z-index:1;}&:after{content:'';position:absolute;display:inline-block;width:100%;height:20px;background:#e3e3e7;top:100%;left:0;}"]),yt=l.ZP.div.withConfig({displayName:"styles__GroupContainer",componentId:"sc-1re4sol-0"})(["display:flex;flex:none;margin-bottom:10px;margin-top:10px;",";",";"],(e=>e.fromBot?gt:mt),(e=>{let{inspected:t}=e;return t&&vt})),bt=l.ZP.span.withConfig({displayName:"styles__MessageHeader",componentId:"sc-1re4sol-1"})(["display:flex;align-items:baseline;flex-wrap:nowrap;justify-content:flex-start;opacity:0;",";",";",";"],ht,(e=>!e.fromBot&&"justify-content: flex-end; width: 100%;"),(e=>e.fromAgent&&"padding-left: 25px")),xt=(0,l.ZP)(M.sk).withConfig({displayName:"styles__MessageDate",componentId:"sc-1re4sol-2"})(["opacity:1;margin-bottom:0;color:",";",";"],(e=>{let{theme:t}=e;return t.chatLogElements}),(e=>e.fromBot?"padding-left: 6px":"padding-right: 6px")),wt=l.ZP.div.withConfig({displayName:"styles__MessageGroup",componentId:"sc-1re4sol-3"})(["display:block;width:100%;"]),Et=function(e){let{fromAgent:t,fromBot:n,created:r,children:o,inspected:a,setGroupRef:s}=e;return i().createElement(yt,{fromBot:n,inspected:a,ref:s},i().createElement(wt,null,i().createElement(bt,{fromAgent:t,fromBot:n},i().createElement(xt,{fromBot:n},function(e){const t=(0,ft.Z)(e);return function(e,t){(0,ye.Z)(2,arguments);var n=be(e),r=be(t);return n.getTime()===r.getTime()}(t,new Date)?dt(t,"HH:mm"):dt(t,"dd LLL")}(r))),o))},kt=function(e){let{title:t,...n}=e;return i().createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"24",viewBox:"0 0 20 24"}),i().createElement("title",null,t||"File attachment"),i().createElement("path",{d:"M19.429 13.272L13.503 19.2c-1.554 1.556-3.821 2.164-5.945 1.595s-3.784-2.227-4.354-4.351.037-4.391 1.591-5.946l6.448-6.444c1.427-1.358 3.668-1.358 5.094 0a3.6 3.6 0 0 1 0 5.094l-5.926 5.924a1.05 1.05 0 0 1-1.486 0c-.407-.412-.407-1.074 0-1.486L13.303 9.2a1.5 1.5 0 0 0-.651-2.551 1.5 1.5 0 0 0-1.469.431l-4.388 4.386c-1.583 1.585-1.583 4.153.002 5.736s4.153 1.583 5.736-.002l5.924-5.93A6.6 6.6 0 0 0 15.498.225a6.6 6.6 0 0 0-6.377 1.709l-6.44 6.442C-.893 11.95-.894 17.744 2.68 21.319s9.369 3.575 12.943.001l5.926-5.92a1.5 1.5 0 0 0-2.12-2.12v-.008z",fill:"#7b7b7b"}))},_t=function(e){return i().createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i().createElement("title",null,"Unsuccessful image upload"),i().createElement("g",{fill:"none",fillRule:"evenodd"},i().createElement("g",{transform:"translate(-1128 -635)",fill:"#7B7B7B",fillRule:"nonzero"},i().createElement("path",{d:"m1152 637.67v8.7867l-4-4.0133-5.3333 5.3467-5.3333-5.3333-5.3333 5.3333-4-4.0133v-6.1067c0-1.4667 1.2-2.6667 2.6667-2.6667h18.667c1.4667 0 2.6667 1.2 2.6667 2.6667zm-4 8.56 4 4.0133v6.0933c0 1.4667-1.2 2.6667-2.6667 2.6667h-18.667c-1.4667 0-2.6667-1.2-2.6667-2.6667v-8.7733l4 3.9867 5.3333-5.3333 5.3333 5.3333 5.3333-5.32z"}))))},Ct=function(e){return i().createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i().createElement("title",null,"Loading image upload"),i().createElement("g",{fill:"none",fillRule:"evenodd"},i().createElement("g",{transform:"translate(-685 -659)",fill:"#7B7B7B",fillRule:"nonzero"},i().createElement("g",{transform:"translate(685 659)"},i().createElement("path",{d:"m15.67 9.414c-0.12139-0.24299-0.36467-0.40135-0.636-0.414-0.27276-0.023426-0.53433 0.11351-0.6705 0.351l-3.2505 5.199-2.3325-2.331c-0.16117-0.15568-0.38102-0.23533-0.6045-0.219-0.22394 0.02231-0.42603 0.144-0.5505 0.3315l-3 4.5c-0.1548 0.23022-0.16988 0.52708-0.039197 0.7718 0.13068 0.24471 0.38578 0.3973 0.6632 0.39671h13.5c0.26005 0 0.50153-0.13472 0.63814-0.35599 0.13661-0.22127 0.14886-0.49752 0.032357-0.73001l-3.75-7.5z"}),i().createElement("path",{d:"m21 0h-18c-1.6569 0-3 1.3431-3 3v18c0 1.6569 1.3431 3 3 3h18c1.6569 0 3-1.3431 3-3v-18c0-1.6569-1.3431-3-3-3zm-18 21v-18h18v18h-18z"}),i().createElement("circle",{cx:"7.5",cy:"7.5",r:"1.5"})))))},Tt=(0,l.F4)(["from{background-position:0%;}to{background-position:-200%;}"]),St=l.ZP.div.withConfig({displayName:"styles__LoadingWrapper",componentId:"sc-10p36bl-0"})(["position:absolute;left:0;width:100%;top:0;height:100%;color:black;z-index:1;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:",";transition:opacity "," ease-out;div:first-child{height:100%;width:100%;position:absolute;background:",";background-size:200% 100%;animation:1.3s linear "," infinite 0s;opacity:0.5;}div:nth-child(2){height:100%;width:100%;position:absolute;background:white;opacity:",";}div:nth-child(3){z-index:1;}"],(e=>{let{finished:t}=e;return t?0:1}),(e=>{let{hideTransitionLength:t}=e;return`${t}s`}),"\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(255, 255, 255, 0.738) 9.5%,\n rgba(255, 255, 255, 0.541) 17%,\n rgba(255, 255, 255, 0.382) 23.5%,\n rgba(255, 255, 255, 0.278) 28.3%,\n rgba(255, 255, 255, 0.194) 32.5%,\n rgba(255, 255, 255, 0.126) 36.5%,\n rgba(255, 255, 255, 0.075) 40.1%,\n rgba(255, 255, 255, 0.042) 43.1%,\n rgba(255, 255, 255, 0.021) 45.5%,\n rgba(255, 255, 255, 0.008) 46.3%,\n rgba(255, 255, 255, 0.002) 49.3%,\n rgba(255, 255, 255, 0) 50%,\n rgba(255, 255, 255, 0.002) 50.7%,\n rgba(255, 255, 255, 0.008) 53.7%,\n rgba(255, 255, 255, 0.021) 54.5%,\n rgba(255, 255, 255, 0.042) 59.9%,\n rgba(255, 255, 255, 0.075) 61.7%,\n rgba(255, 255, 255, 0.126) 63.5%,\n rgba(255, 255, 255, 0.194) 67.5%,\n rgba(255, 255, 255, 0.278) 71.7%,\n rgba(255, 255, 255, 0.382) 76.5%,\n rgba(255, 255, 255, 0.541) 83%,\n rgba(255, 255, 255, 0.738) 90.5%,\n rgba(255, 255, 255, 1) 100%\n )\n",Tt,(e=>{let{opacity:t}=e;return t})),It=function(e){let{loading:t,children:n,opacity:r=.6}=e;const[o,s]=(0,a.useState)(!t);return(0,a.useEffect)((()=>{o||t||setTimeout((()=>s(!0)),300)}),[o,t]),o?null:i().createElement(St,{finished:!t,hideTransitionLength:.3,opacity:r},i().createElement("div",null),i().createElement("div",null),i().createElement("div",null,n))},Ot=(0,l.F4)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Pt=(0,l.iv)(["",";animation-name:",";"],(0,w.AV)(600),Ot),At=(0,l.F4)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"]),Nt=l.ZP.div.withConfig({displayName:"styles__TypingIndicatorContainer",componentId:"sc-1lynepx-0"})(["background:none;will-change:transform;width:auto;padding:0px;display:table;margin:8px 0px;position:relative;",""],Pt),Mt=l.ZP.div.withConfig({displayName:"styles__IndicatorContainer",componentId:"sc-1lynepx-1"})(["border-radius:15px;position:relative;display:inline-flex;flex-direction:row;border:0;padding:11px 9px;background:",";background-color:",";"],(e=>"image"===e.loadingType?"transparent":e.theme.botMessageBackground),(e=>"image"===e.loadingType?"transparent":e.theme.botMessageBackground)),Lt=l.ZP.span.withConfig({displayName:"styles__Indicator",componentId:"sc-1lynepx-2"})(["height:5px;width:5px;margin:0 2px;background:",";background-color:",";display:block;opacity:1;border-radius:100px;&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],(e=>"image"===e.loadingType?"#fff":e.theme.botMessageText),(e=>"image"===e.loadingType?"#fff":e.theme.botMessageText),At,At,At),Rt=function(e){let{loadingType:t}=e;return i().createElement(Nt,{"data-cy":"typing-indicator"},i().createElement(Mt,{loadingType:t},i().createElement(Lt,{loadingType:t}),i().createElement(Lt,{loadingType:t}),i().createElement(Lt,{loadingType:t})))};function Dt(e){const{browserName:t}=function(){const{userAgent:e}=navigator;let t;return t=e.match(/chrome|chromium|crios/i)?"chrome":e.match(/firefox|fxios/i)?"firefox":e.match(/safari/i)?"safari":e.match(/opr\//i)?"opera":e.match(/edg/i)?"edge":"No browser detection",{browserName:t,userAgent:e}}();return e===t}const jt=()=>`\n /* If browser support backdrop-filter */\n ${Dt("chrome")&&"\n background: rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(8px);\n opacity: 1;\n\n &:hover {\n background: rgba(255, 255, 255, 0.4);\n background-color: rgba(255, 255, 255, 0.4);\n\n + svg path {\n mix-blend-mode: unset;\n stroke: black;\n }\n }\n "}\n`,Bt=()=>`\n position: absolute;\n pointer-events: none;\n \n path {\n stroke: #000;\n }\n\n ${Dt("chrome")&&"\n path {\n mix-blend-mode: difference;\n stroke: white;\n }\n "}\n\n `,Zt=l.ZP.div.withConfig({displayName:"styles__PlaceholderContainer",componentId:"sc-12zmiuw-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:",";position:relative;width:100%;min-height:100px;"," background:#232F41;color:#fff;font-size:14px;"],(e=>{let{hasCaption:t}=e;return t?"6px 6px 0 0":"6px"}),(e=>`height: ${e.imageHeight}px;`)),Ft=l.ZP.div.withConfig({displayName:"styles__CarouselContainer",componentId:"sc-12zmiuw-1"})(["position:relative;overflow:hidden;margin-left:-25px;width:calc(100% + 50px);> div{",";}"],(e=>e.active&&"\n position: relative;\n width: 100000%;\n display: flex;\n ")),Ut=l.ZP.div.withConfig({displayName:"styles__ImageWrapper",componentId:"sc-12zmiuw-2"})(["position:relative;display:flex;flex-direction:column;width:","px;height:auto;margin-right:5px;margin-top:2px;margin-bottom:2px;",";",";",";"],(e=>e.imageWidth),(e=>{let{fromBot:t}=e;return t?"justify-content: flex-start":"justify-content: flex-end"}),(e=>{let{first:t,isCarousel:n}=e;return t||!n?"margin-left: 25px":""}),(e=>e.imageHasText&&`\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06), inset 0px 0px 1px rgba(0, 0, 0, 0.32);\n border-radius: 6px;\n overflow: hidden;\n margin-bottom: 6px;\n color: ${u.eR.textColor};\n `)),zt=(0,l.iv)(["position:relative;display:",";min-height:100px;"," ",";border-radius:6px;"],(e=>e.hidden?"none":"block"),(e=>e.carousel?`height: ${e.imageHeight}px;`:"height: auto;"),(e=>!e.imageHasText&&"\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06), inset 0px 0px 1px rgba(0, 0, 0, 0.32);\n ")),Ht=l.ZP.a.withConfig({displayName:"styles__ImageContainerLink",componentId:"sc-12zmiuw-3"})(["",""],zt),$t=l.ZP.div.withConfig({displayName:"styles__ImageContainerNoLink",componentId:"sc-12zmiuw-4"})(["",""],zt),Vt=l.ZP.img.withConfig({displayName:"styles__Image",componentId:"sc-12zmiuw-5"})(["max-width:100%;position:relative;width:auto;max-height:350px;min-height:100px;transition:border-width 0.15s ease;border-radius:6px;display:block;z-index:-1;"," "," ",""],(e=>e.imageHasText?"border-radius: 0;":""),(e=>e.carousel&&`height: ${e.imageHeight}px; object-fit: cover; width: ${e.imageWidth}px;`),m.O),qt=l.ZP.div.withConfig({displayName:"styles__ImageCaptions",componentId:"sc-12zmiuw-6"})(["background:#fff;z-index:-1;> *:last-child{margin-bottom:8px;}"]),Wt=l.ZP.h3.withConfig({displayName:"styles__ImageTitle",componentId:"sc-12zmiuw-7"})(["font-weight:500;margin:6px 8px 0px 8px;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#232f41;"]),Gt=l.ZP.div.withConfig({displayName:"styles__ImageDescription",componentId:"sc-12zmiuw-8"})(["margin:0;margin:2px 8px 8px 8px;font-size:12px;line-height:16px;color:#6a778a;white-space:pre-line;"]),Yt=l.ZP.button.withConfig({displayName:"styles__CarouselButton",componentId:"sc-12zmiuw-9"})(["position:absolute;top:calc(50% - 18px);background:#fff;background-color:#fff;border:none;width:36px;height:36px;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0 0 2px 0px;border-radius:100px;opacity:0.8;transition:all 0.2s ease;box-shadow:0px 2px 6px rgba(0,0,0,0.04);:hover{opacity:1;}:active{background-color:#efeeee;opacity:1;}"," "," ",";",""],m.O,(e=>{let{next:t}=e;return t?"right: 10px;":"left: 10px;"}),(e=>{let{disabled:t}=e;return t&&"display: none"}),jt),Xt=(0,l.ZP)(h.Y4).withConfig({displayName:"styles__SvgArrowLeftIcon",componentId:"sc-12zmiuw-10"})(["top:calc(50% - 13px);left:15px;",";",""],(e=>{let{disabled:t}=e;return t&&"display: none"}),Bt),Kt=(0,l.ZP)(h.LZ).withConfig({displayName:"styles__SvgArrowRightIcon",componentId:"sc-12zmiuw-11"})(["top:calc(50% - 13px);right:15px;",";",""],(e=>{let{disabled:t}=e;return t&&"display: none"}),Bt),Qt=l.ZP.div.withConfig({displayName:"styles__ImageLinkButton",componentId:"sc-12zmiuw-12"})(["position:absolute;left:",";bottom:",";background:#fff;display:flex;align-items:center;justify-content:center;width:24px;height:24px;opacity:0.8;border-radius:50%;pointer-events:none;",""],u.Oz.wrapper,u.Oz.wrapper,jt),Jt=(0,l.ZP)(h.xP).withConfig({displayName:"styles__SvgLinkIcon",componentId:"sc-12zmiuw-13"})(["bottom:",";left:",";",""],u.Oz.icon,u.Oz.icon,Bt),en=l.ZP.button.withConfig({displayName:"styles__LightBoxButton",componentId:"sc-12zmiuw-14"})(["display:",";position:absolute;top:",";right:",";width:24px;height:24px;align-items:center;justify-content:center;border-radius:2px;border:none;cursor:pointer;background:#fff;box-shadow:0px 2px 6px rgba(0,0,0,0.04);opacity:0.8;padding:0px 0 0 1px;"," &:hover{opacity:1;}",""],(e=>e.inView?"flex":"none"),u.Oz.wrapper,u.Oz.wrapper,m.O,jt),tn=(0,l.ZP)(h.JJ).withConfig({displayName:"styles__SvgEnlargeIcon",componentId:"sc-12zmiuw-15"})(["top:",";right:",";",""],u.Oz.icon,u.Oz.icon,Bt),nn=function(e){let{imageWidth:t,imageHeight:n,hasCaption:r}=e;return i().createElement(Zt,{title:"Loading image...",imageWidth:t,imageHeight:n,hasCaption:r},i().createElement(Rt,{loadingType:"image"}),i().createElement("div",null,"Loading image"))},rn=function(e){let{image:t,first:n,isCarousel:r,fromBot:o,shouldAnimate:l,shouldAutoScroll:c,scrollToLatestMessage:u,scrollToBottom:d,inView:f,imageWidth:p,imageHeight:h,loading:m}=e;const[g,v]=(()=>{const[e,t]=(0,a.useState)(null),[n,r]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if(!e)return;const t=[],n=e.getElementsByTagName("img")||[],o=[...n].map((e=>e.complete&&e.naturalWidth?null:new Promise((n=>{t.push(n),e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})}))));return o.length>0&&Promise.all(o).then((()=>{r(!0)})),()=>{[...n].forEach(((e,n)=>{e.removeEventListener("load",t[n]),e.removeEventListener("error",t[n])}))}}),[e]),[t,n]})(),y=(0,s.I0)();(0,a.useEffect)((()=>{v&&c&&(!o&&d?d():u())}),[o,v,c,d,u]);const b=(0,a.useCallback)((e=>{y((0,ue.o1)(e))}),[y]),x=Boolean(t.title||t.description),w=null!=t&&t.newTab?"_blank":"_self",E=t.description&&t.description.length>100?t.description.slice(0,100).concat("..."):t.description,k=t.linkUrl?Ht:$t;return i().createElement(Ut,{imageHasText:x,first:n,ref:g,imageWidth:p,imageHeight:h,isCarousel:r,fromBot:o},i().createElement(It,{loading:m},"Uploading"),i().createElement(k,{imageWidth:p,imageHeight:h,hidden:!v,href:t.linkUrl,target:t.linkUrl?w:void 0,imageHasText:x},i().createElement(Vt,{src:t.imageUrl,alt:t.altText,tabIndex:""!==t.linkUrl?"0":"-1",carousel:r,fromBot:o,shouldAnimate:l,imageHasText:x,imageWidth:p,imageHeight:h}),t.linkUrl&&i().createElement(Qt,null),t.linkUrl&&i().createElement(Jt,{width:16,height:16})),!m&&i().createElement(en,{"aria-label":"Enlarge image",onClick:()=>b(t.imageUrl),inView:f}),!m&&i().createElement(tn,null),!v&&i().createElement(nn,{alt:t.altText,imageWidth:p,imageHeight:h,hasCaption:x}),i().createElement(qt,null,t.title&&i().createElement(Wt,{imageWidth:p,imageHeight:h},t.title),E&&i().createElement(Gt,{imageWidth:p,imageHeight:h},E)))},on=(o().shape({id:o().string,temporaryId:o().string,url:o().string,type:o().string.isRequired,name:o().string.isRequired,file:o().object,sizeKb:o().number.isRequired,storagePath:o().string,status:o().oneOf(Object.values(b.j3)),sender:o().oneOf(Object.values(b.B6))}),function(){let{type:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(null!=e?e:"").split("/");return(null==t?void 0:t[0])===b.Gk.IMAGE?b.Gk.IMAGE:(null==t?void 0:t[1])===b.Gk.PDF?b.Gk.PDF:t.slice(-1)[0]}),an=e=>{let{fromUser:t,hasError:n,theme:r}=e;return n?u.O9.grayColor:t?r.userMessageBackground:r.botMessageBackground},sn=l.ZP.div.withConfig({displayName:"styles__FileAttachment",componentId:"sc-ftn7kp-0"})(["position:relative;text-align:center;cursor:pointer;text-transform:none;width:80%;max-width:calc(80% - 25px);border-radius:17px;font-weight:500;border:none;padding:",";font-family:",";font-size:14px;background:",";background-color:",";transition:all 0.2s ease;margin:8px 0 2px 25px;display:block;a,span{display:block;color:",";text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;z-index:2;}& > svg:first-child{position:absolute;top:-7px;left:-4px;width:15px;path{opacity:",";transition:opacity 0.2 ease-out;}}& > svg:not(:first-child){width:20px;}"],(e=>{let{hasError:t}=e;return t?"7px 12px 4px":"8px 12px"}),c.I.default,an,an,(e=>{let{fromUser:t,theme:n}=e;return t?n.userMessageText:n.botMessageText}),(e=>{let{$loading:t}=e;return t?.5:1})),ln=l.ZP.div.withConfig({displayName:"styles__MessageAgent",componentId:"sc-ftn7kp-1"})(["width:20px;height:20px;left:-10px;bottom:5px;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],(e=>e.theme.headerBackground),(e=>e.theme.headerBackground)),cn=l.ZP.div.withConfig({displayName:"styles__IconBackground",componentId:"sc-ftn7kp-2"})(["width:175px;height:175px;position:relative;display:flex;justify-content:center;margin-bottom:4px;background:",";border-radius:15px;svg{width:24px;z-index:2;}"],u.O9.grayColor),un=l.ZP.div.withConfig({displayName:"styles__AttachmentWrapper",componentId:"sc-ftn7kp-3"})(["display:flex;justify-content:",";"],(e=>{let{fromUser:t}=e;return t?"flex-end":"flex-start"})),dn=function(e){let{avatar:t}=e;const n=(0,a.useMemo)((()=>t?{backgroundImage:`url(${t})`}:{}),[t]);return t?i().createElement(ln,{style:n}):null},fn=function(e){let{attachment:t,shouldAutoScroll:n,scrollToLatestMessage:r,scrollToBottom:o,avatar:l,chatMessageStatus:c}=e;const u=t.sender===b.B6.USER,d=on(t)===b.Gk.IMAGE,f=c||(0,q.Z)(t.status,[b.j3.ERROR,b.j3.INFECTED]),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{token:n}=(0,s.v9)(x.ZI),{PAT_HOST:r}=(0,s.v9)(x.NZ);return e.storagePath&&e.status===b.j3.CLEAN?`${r}/chatbubble/${b.gk}/attachment/${e.storagePath}?token=${n}`:t||e.sender!==b.B6.USER?e.url:void 0}(t,d),h=!p;(0,a.useEffect)((()=>{n&&(u?o():r())}),[u,n,o,r]);const m=(0,a.useMemo)((()=>{var e;return{imageUrl:p,altText:`Image ${t.name||`from ${null!==(e=null==t?void 0:t.sender)&&void 0!==e?e:"agent"}`}`}}),[t,p]);return d?i().createElement(un,{fromUser:u},i().createElement(dn,{avatar:l}),!f&&!h&&i().createElement(rn,{image:m,fromBot:!u,isCarousel:!1,shouldAnimate:!0,shouldAutoScroll:n,scrollToLatestMessage:r,scrollToBottom:o,imageWidth:"250",inView:!0,first:!1,loading:t.status===b.j3.PROCESSING}),!f&&h&&i().createElement(cn,{isImage:d},i().createElement(Ct,null),i().createElement(It,{loading:!0})),f&&i().createElement(cn,null,i().createElement(_t,null))):i().createElement(un,{fromUser:u},i().createElement(dn,{avatar:l}),i().createElement(sn,{fromUser:u,$loading:h,hasError:f},i().createElement(kt,{height:10}),i().createElement(It,{loading:!f&&h,opacity:.35}),!f&&!h&&i().createElement("a",{src:p,alt:t.name,href:p,target:"_blank",rel:"noreferrer"},t.name),!f&&h&&i().createElement("span",null,"Uploading"),f&&i().createElement(_t,null)))};var pn=n(3685),hn=n(8971),mn=n(1224);function gn(e){let{children:t,carouselPosition:n,onTouchStart:r,onTouchMove:o,onTouchEnd:a}=e;return i().createElement(hn.ww.div,{transition:{ease:"easeInOut",duration:.3},animate:{x:n.get()},onTouchStart:r,onTouchMove:o,onTouchEnd:a},t)}function vn(e){let{chatMessage:t,imageCarousel:n,shouldAutoScroll:r,scrollToLatestMessage:o,shouldAnimate:s}=e;const[l,c]=(0,a.useState)(0),u=(0,hn.c$)(0),d=b.AG[t.image_carousel_size||1e3],[f,p]=(0,a.useState)(d);(0,a.useEffect)((()=>{let e=!0;if(n.length>0){const t=new Image;t.src=n[0].imageUrl,t.onload=()=>{const n=t.width/d,r=t.height/n;e&&p(r.toString())}}return()=>{e=!1}}),[n,p,d]);const h=(0,a.useMemo)((()=>d===b.AG[800]?102:d===b.AG[600]?96:30),[d]),m=e=>d===b.AG[600]&&l===e-1||l===e,g=(0,a.useCallback)(((e,t)=>{if(e<0||e>=t.length)return;let n=0;n=e>=t.length-1?-(e*d-h):-(e*d+5*e),c(e),u.set(n)}),[d,h,u]),{handleTouchStart:v,handleTouchMove:y,handleTouchEnd:x}=(0,mn.Z)({carousel:n,index:l,setIndex:g});return i().createElement(Ft,{active:n.length>1},i().createElement(gn,{carouselPosition:u,onTouchStart:v,onTouchMove:y,onTouchEnd:x},n.map(((e,a)=>i().createElement(rn,{key:e.id||a,first:0===a,image:e,fromBot:t.from_bot,isCarousel:n.length>1,shouldAnimate:s,shouldAutoScroll:r,scrollToLatestMessage:o,scrollToBottom:!1,inView:m(a),imageWidth:d,imageHeight:f})))),i().createElement(Yt,{previous:!0,disabled:l<=0,"aria-label":"Go to previous image",onClick:()=>g(l-1,n)}),i().createElement(Xt,{disabled:l<=0,width:24,height:24}),i().createElement(Yt,{next:!0,disabled:l>=n.length-1,"aria-label":"Go to next image",onClick:()=>g(l+1,n)}),i().createElement(Kt,{disabled:l>=n.length-1,width:12,height:22}))}vn.defaultProps={};const yn=vn,bn=l.ZP.button.withConfig({displayName:"styles__EditButton",componentId:"sc-mhy5c2-0"})(["display:block;background:none;background-color:none;border:none;text-decoration:underline;font-weight:600;font-size:",";color:",";cursor:pointer;padding:0;",""],u.JB.fontSizeP,(e=>e.theme.userMessageText),m.O),xn=function(e){let{button:t}=e;const n=(0,s.I0)(),r=(0,a.useCallback)((()=>n((0,ue.un)(t))),[t,n]);return i().createElement(bn,{onClick:r},t.contact_details.edit_text)};var wn=n(7856),En=n.n(wn);const kn=["form","input"],_n=["target"],Cn=["action"],Tn=e=>En().sanitize(e,{ADD_ATTR:_n,FORBID_ATTR:Cn,FORBID_TAGS:kn,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}}),Sn=function(e){return i().createElement("div",{dangerouslySetInnerHTML:{__html:Tn(e)}})},In=(0,l.F4)(["0%{opacity:0;transform:translateY(6px);}60%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),On=(0,l.iv)(["",";animation-name:",";"],(0,w.AV)(),In),Pn=l.ZP.div.withConfig({displayName:"styles__MessageBlock",componentId:"sc-zovgvh-0"})(["display:block;width:100%;"]),An=(l.ZP.div.withConfig({displayName:"styles__MessageLines",componentId:"sc-zovgvh-1"})([""]),l.ZP.div.withConfig({displayName:"styles__MessageContent",componentId:"sc-zovgvh-2"})(["display:flex;flex-direction:column;",";",";"," ",""],On,(e=>!e.fromBot&&"display: block;"),(e=>e.hasParentSiblings&&"margin-top: 8px;"),(e=>e.hasSiblings&&"margin-bottom: 8px;"))),Nn=l.ZP.div.withConfig({displayName:"styles__MessageLineContainer",componentId:"sc-zovgvh-3"})(["display:flex;flex-direction:column;",";",""],(e=>{let{fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"}),(e=>e.hasSiblings&&"margin-bottom: 8px;")),Mn=(0,l.iv)(["display:grid;grid-template-columns:auto auto;justify-content:flex-start;grid-gap:6px;position:relative;top:-30px;margin-bottom:-20px;margin-left:15px;"]),Ln=l.ZP.div.withConfig({displayName:"styles__ButtonWrapper",componentId:"sc-zovgvh-4"})(["max-width:80%;display:flex;flex-direction:column;",";"," & > button,& > a{margin-bottom:6px;}"],On,(e=>e.hasSuggestion&&Mn)),Rn=(0,l.iv)(["white-space:pre-wrap;color:",";background:",";:where(",":first-of-type:not(:only-of-type) &){border-radius:16px 16px 0px 16px;}:where(",":last-of-type:not(:only-of-type) &){border-radius:16px 0px 16px 16px;}:where(",":not(:first-of-type):not(:last-of-type) &){border-radius:16px 0px 0px 16px;}:where(",":only-of-type &){border-radius:16px;}"],(e=>e.theme.userMessageText),(e=>e.theme.userMessageBackground),Pn,Pn,Pn,Pn),Dn=(0,l.iv)(["color:",";background:",";&:first-child:not(:only-child){border-radius:16px 16px 16px 0px;}&:last-child:not(:only-child){border-radius:0px 16px 16px 16px;}&:not(:first-child):not(:last-child){border-radius:0px 16px 16px 0px;}&:only-child{border-radius:16px;}"],(e=>e.theme.botMessageText),(e=>e.theme.botMessageBackground)),jn=(0,l.iv)(["margin-left:25px;white-space:pre-wrap;"]),Bn=(0,l.iv)([":last-child{padding-bottom:34px;}"]),Zn=(0,l.iv)(["position:relative;display:inline-block;max-width:80%;padding:10px 15px;margin:1px 0px;border:0;border-radius:16px;font-size:14px;line-height:18px;word-break:break-word;"," ",";",";",";"," p{margin:0;}"],(e=>e.clickable&&"cursor: pointer;"),(e=>e.fromBot?Dn:Rn),(e=>e.fromAgent&&jn),(e=>e.hasSuggestion&&Bn),m.O),Fn=l.ZP.div.withConfig({displayName:"styles__MessageContainer",componentId:"sc-lv7lx6-0"})(["",""],Zn),Un=l.ZP.a.withConfig({displayName:"styles__LinkMessageContainer",componentId:"sc-lv7lx6-1"})(["text-decoration:none;",""],Zn),zn=l.ZP.div.withConfig({displayName:"styles__MessageAgent",componentId:"sc-lv7lx6-2"})(["width:20px;height:20px;left:-35px;bottom:0;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],(e=>e.theme.headerBackground),(e=>e.theme.headerBackground)),Hn=[b.B6.WEBHOOK,b.B6.AGENT];function $n(e){let{messageLine:t,children:n,chatMessage:r,fadeInLeft:o,fadeInRight:a,notLast:s,shouldAnimate:l=!1,hasSuggestion:c=!1}=e;const{bot_id:u,exchange_id:d}=r,f=`/workspace/${u}/build/${("usersays"===r.exchange_type?"dialogue":r.exchange_type).replace("_","-")}/${d}`;return i().createElement(Un,{fromBot:r.from_bot,hasSuggestion:c,fadeInLeft:o,fadeInRight:a,notLast:s,shouldAnimate:l,clickable:!0,role:"link",tabIndex:"0",href:f},n||Sn(t))}const Vn=function(e){let{messageLine:t,chatMessage:n,lineIndex:r,numLines:o,editContactDetailsButton:a,children:l,shouldAnimate:c=!1,hasSuggestion:u=!1}=e;const{inPlatform:d}=(0,s.v9)(x.W$),{isTextDirectionRtl:f}=(0,s.v9)(x.Q7),p=f?"rtl":void 0,h=d&&n.from_bot&&n.exchange_type&&!(0,q.Z)(n.sender,Hn),m=n.sender===b.B6.AGENT,g=r!==o-1||n.sender!==b.B6.AGENT&&n.image_carousel&&!n.thon_image_above_text,v=n.from_bot;return h?i().createElement($n,{chatMessage:n,notLast:g,shouldAnimate:c,messageLine:t,hasSuggestion:u},l):i().createElement(Fn,{dir:p,fromAgent:m,fromBot:v,hasSuggestion:u,notLast:g,shouldAnimate:c},m&&!g&&i().createElement(zn,{style:{backgroundImage:`url(${n.avatar})`}}),l||(v?Sn(t):t),!g&&a&&i().createElement(xn,{button:a}))},qn=l.ZP.div.withConfig({displayName:"styles__StatusMessage",componentId:"sc-gltcat-0"})(["display:flex;white-space:nowrap;font-size:12px;color:red;justify-content:flex-end;margin-bottom:2px;"]),Wn=l.ZP.div.withConfig({displayName:"styles__StatusMessageButtonWrapper",componentId:"sc-gltcat-1"})(["display:flex;"]),Gn=l.ZP.button.withConfig({displayName:"styles__StatusMessageButton",componentId:"sc-gltcat-2"})(["display:block;white-space:nowrap;font-size:12px;color:",";text-decoration:underline;background:none;border:none;padding:0;margin-bottom:2px;margin-left:4px;cursor:pointer;",""],u.O9.darkColor,m.O),Yn=function(e){let{chatMessage:t,attachments:n}=e;const r=(0,s.I0)(),o=Boolean(t.message),l=(null==n?void 0:n.length)>0,c=(0,a.useCallback)((()=>{o&&r((0,ue.QE)(t.message,t.id))}),[t,r,o]),u=(0,a.useCallback)((()=>{o?r((0,ue.JH)(t.message,t.id)):l&&r((0,ue.a$)())}),[t,r,l,o]);return t.status>=500?i().createElement(qn,null,l?"Upload failed":"Message not delivered"," ",i().createElement(Wn,null,!l&&i().createElement(i().Fragment,null,i().createElement(Gn,{onClick:c},"Try again"),i().createElement(Gn,{onClick:u},"Restart chat")))):429===t.status?i().createElement(qn,null,"Too many messages, please slow down."," ",i().createElement(Wn,null,i().createElement(Gn,{onClick:c},"Try again"))):i().createElement(qn,null,"An error occurred. ",i().createElement(Gn,{onClick:u},"Restart chat"))};var Xn=n(2979),Kn=n(7423),Qn=n(2988);const Jn=l.ZP.div.withConfig({displayName:"styles__AgentContainer",componentId:"sc-3baawv-0"})(["width:100%;margin:20px 0;",";"],w.ob),er=l.ZP.div.withConfig({displayName:"styles__AvatarContainer",componentId:"sc-3baawv-1"})(["display:flex;justify-content:center;align-items:center;"]),tr=l.ZP.span.withConfig({displayName:"styles__AvatarBorder",componentId:"sc-3baawv-2"})(["height:1px;width:100%;background:",";background-color:",";"],(e=>e.theme.headerBackground),(e=>e.theme.headerBackground)),nr=l.ZP.div.withConfig({displayName:"styles__AgentAvatar",componentId:"sc-3baawv-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin:0 15px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],(e=>e.theme.headerBackground),(e=>e.theme.headerBackground)),rr=l.ZP.p.withConfig({displayName:"styles__AgentName",componentId:"sc-3baawv-4"})(["font-size:",";margin:0;margin-top:5px;text-align:center;color:",";span{font-weight:500;}"],u.JB.fontSizeSmall,(e=>(0,Qn.R)(e.theme.background,u.O9.grayColor,u.O9.darkColor))),or=function(e){let{chatMessage:t}=e;const n=t.system_dialogue_message_type===b.a8.END,{currentLanguage:r}=(0,s.v9)(x.W$),{text:o}=(0,s.v9)(x.Q7),{defaultLanguage:l}=(0,Xn.Z)(),{names:c,avatars:u}=(0,s.v9)(x.Wt),{agent_joined_text:d,agent_left_text:f}=(0,a.useMemo)((()=>(0,Kn.Z)(o,r,l)),[r,l,o]),p=t.avatar||u[u.length-1],h=t.name||c[c.length-1];return i().createElement(Jn,null,i().createElement(er,null,i().createElement(tr,null),i().createElement(nr,{style:{backgroundImage:`url(${p})`}}),i().createElement(tr,null)),i().createElement(rr,null,i().createElement("span",null,h||"An agent")," ",n?f:d))};n(4344);const ar=function(e){let{preface:t,message:n,chatMessage:r,numLines:o,buttonHandlers:a,buttons:s=[]}=e;return i().createElement(i().Fragment,null,i().createElement(Nn,{fromBot:!0},i().createElement(Vn,{chatMessage:r,lineIndex:0,numLines:o,hasSuggestion:!0},i().createElement("strong",null,t),i().createElement("br",null),n)),i().createElement(Ln,{hasSuggestion:!0},s.map(((e,t)=>i().createElement(pn.Z,{key:`suggestion-button-${r.id}-${t}`,button:e,chatMessage:r,type:"button",handlers:a,hasSuggestion:!0})))))},ir="\n background: black;\n border-radius: 15px;\n",sr=l.ZP.iframe.withConfig({displayName:"styles__IframeEmbed",componentId:"sc-10j1ec7-0"})(["",""],ir),lr=l.ZP.video.withConfig({displayName:"styles__HTML5Video",componentId:"sc-10j1ec7-1"})(["",""],ir),cr=function(e){let{source:t}=e;const n=t.split(".").pop();return i().createElement(lr,{width:"240",controls:!0,"data-chromatic":"ignore"},i().createElement("source",{src:t,type:`video/${n}`}),"Your browser does not support HTML5 video.")},ur=function(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?i().createElement(sr,{src:`https://player.vimeo.com/video/${n[2]}?title=0&byline=0&portrait=0`,width:"240",height:"auto",frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0,"data-chromatic":"ignore",title:"Vimeo video player"}):null},dr=e=>e.replace("?t=","?start=").replace("&t=","&start="),fr=function(e){let{source:t}=e;const n=(e=>{const t=e.toLowerCase();let n=e;return(0,q.Z)("youtube.com",t)?(n=e.replace("&","?"),n=dr(n),n.split("v=")[1]):(0,q.Z)("youtu.be",t)?(n=dr(e),n.split("youtu.be/")[1]):n})(t);return i().createElement(sr,{width:"240",height:"auto",src:`https://www.youtube.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-chromatic":"ignore",title:"YouTube video player"})},pr=function(e){let{source:t}=e;return(0,q.Z)("youtube.com",t)||(0,q.Z)("youtu.be",t)?i().createElement(fr,{source:t}):(0,q.Z)("vimeo.com",t)?i().createElement(ur,{source:t}):i().createElement(cr,{source:t})};var hr=n(3338);function mr(e){let{width:t,height:n,color:r}=e;return i().createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},i().createElement("path",{d:"M6.5 6a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 12a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 18a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r,strokeLinecap:"round",strokeLinejoin:"round"}),i().createElement("path",{d:"M9.75 6h8.5M9.75 12h8.5M9.75 18h8.5",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}mr.defaultProps={width:24,height:24,color:"#333"};const gr=mr;var vr=n(2623),yr=n(7813),br=n(5791);const xr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"SUBMITTED";return async(r,o)=>{const{connection:{token:a}}=o(),{PAT_HOST:i}=o().environment,{headers:s}=(0,ue.IT)({token:a},{withCurrentUrl:!0}),l={submission_id:e,context:t,state:n};return r((0,ue.tV)({method:"post",url:`${i}/chatbubble/${b.gk}/form/submit`,data:l,headers:s}))}};var wr=n(7783),Er=n(4280),kr=n(1468),_r=n(6393),Cr=n(3696);const Tr=l.ZP.div.withConfig({displayName:"styles__FormStateViewWrapper",componentId:"sc-6n3m85-0"})(["display:flex;flex-direction:column;"]),Sr=l.ZP.div.withConfig({displayName:"styles__FormStateMessage",componentId:"sc-6n3m85-1"})(["font-size:",";font-weight:500;margin-top:16px;"],u.JB.fontSizeP),Ir=l.ZP.div.withConfig({displayName:"styles__FormStateDataWrapper",componentId:"sc-6n3m85-2"})(["display:flex;flex-direction:column;"]),Or=l.ZP.div.withConfig({displayName:"styles__FormStateDataField",componentId:"sc-6n3m85-3"})(["display:flex;flex-direction:column;margin-top:16px;"]),Pr=l.ZP.div.withConfig({displayName:"styles__FormStateDataTitle",componentId:"sc-6n3m85-4"})(["font-size:",";"],u.JB.fontSizeP),Ar=l.ZP.div.withConfig({displayName:"styles__FormStateDataValue",componentId:"sc-6n3m85-5"})(["font-weight:500;margin-top:4px;font-size:",";display:flex;flex-direction:row;align-items:center;"],u.JB.fontSizeP),Nr=l.ZP.div.withConfig({displayName:"styles__FormStateAffix",componentId:"sc-6n3m85-6"})(["padding:",";"],(e=>{let{position:t}=e;return"left"===t?"0 6px 0 0":"0 0 0 6px"})),Mr=function(e){let{state:t,message:n,data:r}=e;return i().createElement(Tr,null,t!==kr.xZ.SUBMITTED&&n&&i().createElement(Sr,null,n),t===kr.xZ.SUBMITTED&&r.length>0&&i().createElement(Ir,null,r.map((e=>{return e.value?i().createElement(Or,{key:e.name},i().createElement(Pr,null,e.label),i().createElement(Ar,null,"PREFIX"===e.affix&&e.affixValue?i().createElement(Nr,{position:"left"},e.affixValue):null,Array.isArray(e.value)?(t=e.value).length>0?t.map((e=>i().createElement("div",{key:e.name},e.label))):null:e.value,"SUFFIX"===e.affix&&e.affixValue?i().createElement(Nr,{position:"right"},e.affixValue):null)):null;var t}))))},Lr=i().lazy((()=>Promise.resolve().then(n.bind(n,7672)))),Rr=function(e){var t,n,r,o,l,c,u,d,f,p;let{formData:h,onSubmit:m,onCancel:g}=e;const v=(0,s.I0)(),y=(0,s.v9)(x.cY),{current:b}=(0,a.useRef)((0,_r.A)(h.id,h.submission_id)),{currentLanguage:w}=(0,s.v9)(x.W$);(0,a.useEffect)((()=>{var e,t,n;null==h||!h.id||null!=y&&y[b]?(null==y||null===(e=y[b])||void 0===e?void 0:e.formSubmitState)!==kr.xZ.UNANSWERED||null!=y&&null!==(t=y[b])&&void 0!==t&&t.formCompleteMessage||!h.texts.unanswered_text||v((0,ue.iO)({...y[b],formCompleteMessage:h.texts.unanswered_text})):v((0,ue.iO)({formId:h.id,formSubmissionId:h.submission_id,formSubmitState:kr.xZ.ACTIVE,formCompleteMessage:"",formKey:b,formValue:(null==y||null===(n=y[b])||void 0===n?void 0:n.formValue)||h.fields.reduce(((e,t)=>({...e,[`${t.slug}`]:""})),{})}))}),[v,h,w,y,b]);const E=(0,a.useCallback)((e=>{var t,n,r,o,a;return e.input_type===kr._f.SELECT?(null===(r=e.attributes.options.find((t=>{var n,r;return t.value===(null==y||null===(n=y[b])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])})))||void 0===r?void 0:r.label)||(null==y||null===(o=y[b])||void 0===o||null===(a=o.formValue)||void 0===a?void 0:a[e.slug]):null==y||null===(t=y[b])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug]}),[b,y]);return i().createElement(Er.n5,null,(null===(t=h.texts)||void 0===t?void 0:t.title)&&i().createElement(Er.vw,null,i().createElement(gr,{width:20,height:20})," ",null===(n=h.texts)||void 0===n?void 0:n.title),(null==y||null===(r=y[b])||void 0===r?void 0:r.formSubmitState)&&(null==y||null===(o=y[b])||void 0===o?void 0:o.formSubmitState)!==kr.xZ.ACTIVE&&i().createElement(Mr,{state:y[b].formSubmitState,message:y[b].formCompleteMessage,data:(()=>{var e,t;if(null!=h&&h.fields&&(null==y||null===(e=y[b])||void 0===e?void 0:e.formSubmitState)===kr.xZ.SUBMITTED&&null!=y&&null!==(t=y[b])&&void 0!==t&&t.formValue)return h.fields.reduce(((e,t)=>{var n,r;return t.input_type===kr._f.CHECKBOX&&t.list?[...e,{name:`checkbox_list_${t.slug}`,label:null===(r=t.texts)||void 0===r?void 0:r.label,value:t.list.reduce(((e,t)=>{var n,r;const o=null==y||null===(n=y[b])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[t.slug];var a;return"boolean"==typeof o&&o||"string"==typeof o&&o.trim()?[...e||[],{name:t.slug,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:o}]:e}),null)}]:[...e,{affix:t.affix,affixValue:t.texts.affix_value,name:t.slug,label:null===(n=t.texts)||void 0===n?void 0:n.label,value:E(t)}]}),[]).sort((e=>e.order))})()}),(null==y||null===(l=y[b])||void 0===l?void 0:l.formSubmitState)===kr.xZ.ACTIVE&&i().createElement(a.Suspense,{fallback:i().createElement(vr.T,null)},i().createElement(Lr,{onCancel:async e=>{var t;return g&&g(e),await v(xr(h.submission_id,null==y?void 0:y[b].formValue,kr.xZ.CANCELED)),await v((0,ue.Bc)(h.cancel_dialogue_id,{languageCode:w})),v((0,ue.iO)({formKey:b,formId:h.id,formSubmitState:kr.xZ.CANCELED,formCompleteMessage:null===(t=h.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:null==y||null===(c=y[b])||void 0===c?void 0:c.formValue,onSubmit:async e=>{m&&m(e);const t={};var n;return Object.entries(e).filter((e=>{let[t,n]=e;return!!n})).forEach((e=>{let[n,r]=e;t[n]=r})),null===await v(xr(h.submission_id,t))?v((0,ue.iO)({formKey:b,formId:h.id,formSubmitState:kr.xZ.ERRORED,formCompleteMessage:null===(n=h.texts)||void 0===n?void 0:n.error_text,formValue:e})):(await v((0,ue.Bc)(h.submit_dialogue_id,{languageCode:w})),v((0,ue.iO)({formKey:b,formId:h.id,formSubmitState:kr.xZ.SUBMITTED,formValue:e})))},ariaLabel:null===(u=h.texts)||void 0===u?void 0:u.title,sendButtonTitle:null===(d=h.texts)||void 0===d?void 0:d.submit_button_text,cancelButtonTitle:null===(f=h.texts)||void 0===f?void 0:f.cancel_button_text},null===(p=h.fields)||void 0===p?void 0:p.map(((e,t)=>{var n,r,o,a;return i().createElement(wr.Z,{className:0!==t||null!==(n=h.texts)&&void 0!==n&&n.title?void 0:"no-margin",key:`form_field_${b}_${e.order}`,helperText:null===(r=e.texts)||void 0===r?void 0:r.help_text,required:e.required,hasTitle:null===(o=h.texts)||void 0===o?void 0:o.title,label:null===(a=e.texts)||void 0===a?void 0:a.label,slug:e.slug},(e=>{var t,n,r,o,a,s,l;if(e)switch(e.input_type){case kr._f.CHECKBOX:return i().createElement(br.Z,{name:`checkbox_list_${e.slug}`,list:e.list,formId:h.id,validators:(0,Cr.v7)(e,w),currentLanguage:w});case kr._f.RANGE:return i().createElement(yr.iR,{controller:!0,value:parseFloat(null==y||null===(t=y[b])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug])||(null===(r=e.attributes)||void 0===r?void 0:r.defaultValue)||e.step,name:e.slug,step:null===(o=e.attributes)||void 0===o?void 0:o.step,affix:e.affix,affixValue:null===(a=e.texts)||void 0===a?void 0:a.affix_value,validators:(0,Cr.v7)(e,w),ariaLabel:null===(s=e.texts)||void 0===s?void 0:s.label});case kr._f.SELECT:return i().createElement(yr.Ph,{options:null===(l=e.attributes)||void 0===l?void 0:l.options,placeholder:e.texts.placeholder_text,validators:(0,Cr.v7)(e,w),name:e.slug});default:return i().createElement(yr.II,{placeholder:e.texts.placeholder_text,type:e.input_type,adornment:e.affix&&e.texts.affix_value?e.texts.affix_value:void 0,adornmentPosition:"PREFIX"===e.affix?"start":"end",validators:(0,Cr.v7)(e,w),name:e.slug})}return null})(e))})))))},Dr=e=>e,jr=e=>{let{button_type:t}=e;return t===b.Dx.edit_contact_details?"editContactDetails":"regularButtons"},Br=function(e){var t,n,r,o;let{chatMessage:l,scrollToLatestMessage:c,scrollToBottom:u,shouldAutoScroll:d,buttonHandlers:f,messageCounter:p}=e;const h=(0,s.I0)(),[m,g]=(0,a.useState)([]),{lastMessageSeen:v,attachments:y=[]}=(0,s.v9)(x.sY),w=l.sender?l.sender===b.B6.USER:!l.from_bot;let E=[];l.message&&(E=l.from_bot?l.message.split(/\n\s*\n/).map((e=>e.trim())):[l.message]);const{regularButtons:k,editContactDetails:_}=(0,a.useMemo)((()=>(0,hr.Z)(l.buttons,jr)),[l.buttons]),C=(0,a.useMemo)((()=>{var e;return null==l||null===(e=l.buttons)||void 0===e?void 0:e.filter((e=>e.button_type===b.Dx.CHECKBOX.toLowerCase()||e.button_type===b.Dx.SLIDER.toLowerCase()))}),[l]),T=(null==l?void 0:l.image_carousel)||(null==l?void 0:l.video_source),S=l.system_dialogue_message_type===b.a8.REQUEST,I=null==l||null===(t=l.buttons)||void 0===t?void 0:t.filter((e=>e.button_type===b.Dx.CHECKBOX.toLowerCase())),O=(e=>{let{root:t=null,threshold:n=1,onChange:r,skip:o=!1}=e;const[i,s]=(0,a.useState)(null),l=(0,a.useRef)(null);return(0,a.useEffect)((()=>{if(o)return;l.current&&l.current.disconnect(),l.current=new IntersectionObserver(r,{root:t,threshold:n});const{current:e}=l;return i&&e.observe(i),()=>e.disconnect()}),[i,t,r,o,n]),s})({onChange:(0,a.useCallback)((e=>{let[{isIntersecting:t}]=e;!t||(null==v?void 0:v.index)>=p||h((0,ue.aJ)(l.id,p))}),[l.id,h,v,p]),threshold:.95,skip:w}),P=(0,a.useCallback)((e=>{const t=m.find((t=>t.id===e.id));g(t?m.filter((t=>t.id!==e.id)):[...m,e])}),[m]),A=(0,a.useMemo)((()=>{var e,t;return[...null!==(e=l.attachments)&&void 0!==e?e:[],...(null!==(t=l.attachment_ids)&&void 0!==t?t:[]).map((e=>{return y.find((t=e,function(){let{id:e,temporaryId:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e===t||n===t}));var t})).filter(Dr)]}),[y,l.attachments,l.attachment_ids]),N=Boolean(l.message||(null==A?void 0:A.length)||(null===(n=l.buttons)||void 0===n?void 0:n.length)||(null===(r=l.image_carousel)||void 0===r?void 0:r.length));return l.system_dialogue_message_type===b.a8.START||l.system_dialogue_message_type===b.a8.END?i().createElement(An,{ref:O,fromBot:!0},i().createElement(or,{chatMessage:l})):i().createElement(Pn,{ref:O,"data-cy":"message-block"},i().createElement(An,{fromBot:l.from_bot,hasSiblings:I,hasParentSiblings:S},l.image_carousel&&l.thon_image_above_text&&i().createElement("div",null,i().createElement(yn,{imageCarousel:l.image_carousel,chatMessage:l,thonAbove:!0,scrollToLatestMessage:c,shouldAutoScroll:d})),i().createElement(Nn,{fromBot:l.from_bot,hasSiblings:T},E.map(((e,t)=>i().createElement(Vn,{key:`chatMessage-${t}`,chatMessage:l,messageLine:e,lineIndex:t,numLines:E.length,editContactDetailsButton:null==_?void 0:_[0]})))),l.image_carousel&&!l.thon_image_above_text&&i().createElement("div",null,i().createElement(yn,{imageCarousel:l.image_carousel,chatMessage:l,scrollToLatestMessage:c,shouldAutoScroll:d})),A.map((e=>i().createElement("div",{key:e.id},i().createElement(fn,{attachment:e,shouldAutoScroll:d,scrollToLatestMessage:c,scrollToBottom:u,avatar:l.avatar,chatMessageStatus:l.status,shouldAnimate:!0})))),l.video_source&&i().createElement(pr,{source:l.video_source}),(null===(o=l.form)||void 0===o?void 0:o.fields)&&i().createElement(Rr,{formData:l.form})),i().createElement(Ln,null,(null==k?void 0:k.length)>0&&k.map((e=>i().createElement(pn.Z,{key:e.id,button:e,chatMessage:l,type:"button",handlers:f,checked:m,setCheckboxValue:P,submitButtonsList:C})))),((null==l?void 0:l.suggestions)||[]).map((e=>{let{preface:t,message:n,buttons:r}=e;return i().createElement(ar,{key:l.id,chatMessage:l,numLines:E.length,preface:t,message:n,buttons:r})})),N&&l.status&&i().createElement(Yn,{chatMessage:l,attachments:A}))};var Zr=n(7597);const Fr=function(e){return i().createElement("svg",Object.assign({},e,{viewBox:"0 0 82 82",xmlns:"http://www.w3.org/2000/svg"}),i().createElement("title",null,"Bot Avatar"),i().createElement("g",{transform:"translate(1 1)",fill:"none",fillRule:"evenodd"},i().createElement("circle",{stroke:"#F3F3F4",strokeWidth:"2",fill:"#FFF",cx:"40",cy:"40",r:"40"}),i().createElement("path",{d:"M30.64 35.4a4.27 4.27 0 11-8.54 0 4.27 4.27 0 018.54 0M50.17 35.4a4.27 4.27 0 108.54 0 4.27 4.27 0 00-8.54 0",fill:"#000"}),i().createElement("path",{d:"M29.42 60.83a17.42 17.42 0 0022.38 0",stroke:"#DA3CFF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),i().createElement("path",{d:"M16 29.03a12.39 12.39 0 0113.15-5.31 12.24 12.24 0 019.45 10.49v15.64h5.47M44.88 23.2H64",stroke:"#0069FF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})))};var Ur=n(5669);const zr=(0,l.F4)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Hr=(0,l.iv)(["",";animation-name:",";"],(0,w.AV)(600),zr),$r=(0,l.F4)(["0%{opacity:1;transform:translateY(0px);}50%{opacity:1;transform:translateY(-6px);}80%{transform:translateY(2px);}100%{opacity:0;transform:translateY(2px);}"]),Vr=(0,l.iv)(["",";animation-name:",";"],(0,w.AV)(300),$r),qr=l.ZP.div.withConfig({displayName:"styles__NewMessageContainer",componentId:"sc-1n499zd-0"})(["position:absolute;z-index:3;bottom:90px;left:50%;transform:translateX(-50%);transition:opacity 300ms ease 300ms;opacity:",";"],(e=>e.show?"1":"0")),Wr=l.ZP.div.withConfig({displayName:"styles__NewMessageInner",componentId:"sc-1n499zd-1"})(["opacity:0;border-radius:100px;color:#2c2c2c;background:#fff;background-color:#fff;border:1px solid ",";box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);cursor:pointer;display:flex;align-items:center;justify-content:",";min-width:35px;max-width:205px;width:","px;height:","px;",";",";svg{",";path{",";}}"],(0,Ur._j)(.08,"#fff"),(e=>e.hasUnread?"flex-start":"center"),(e=>e.hasUnread?"unset":"35"),(e=>e.hasUnread?"42":"35"),(e=>!e.show&&(0,w.rQ)(800)),(e=>e.show?Hr:Vr),(e=>e.hasUnread&&"min-width: 24px"),(e=>!e.hasUnread&&`stroke: ${e.theme.buttonBackground}`)),Gr=l.ZP.div.withConfig({displayName:"styles__StyledAvatar",componentId:"sc-1n499zd-2"})(["border-radius:100px;min-width:24px;width:24px;height:24px;background-image:url(",");background-size:contain;background-repeat:no-repeat;background-position:center;"],(e=>e.avatar)),Yr=l.ZP.span.withConfig({displayName:"styles__Message",componentId:"sc-1n499zd-3"})(["color:#2c2c2c;font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:8px;"]);function Xr(e){let{message:t}=e;const{avatar:n}=(0,s.v9)(x.Q7),{takenOver:r,avatars:o}=(0,s.v9)(x.Wt),a=r?o[o.length-1]:n,l=t.replace(/(<[^>]*>)|&nbsp;/g,"");return i().createElement(i().Fragment,null,a?i().createElement(Gr,{avatar:a}):i().createElement(Fr,{height:24,width:24}),i().createElement(Yr,null,l))}const Kr=function(e){let{chatMessages:t,hasUnreadMessage:n,shouldAutoScroll:r,scrollToBottom:o}=e;const[s,l]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),d=(e=>{const t=(e||[]).length,n=e[t-1];return(0,a.useMemo)((()=>t>1&&n.from_bot?n:e[t-2]),[e,n,t])||{}})(t);return(0,a.useEffect)((()=>{c&&r&&u(!1)}),[c,r]),(0,a.useEffect)((()=>{const e=setTimeout((()=>{r||l(!0)}),600);return r&&l(!1),()=>clearTimeout(e)}),[r]),i().createElement(qr,{show:s},i().createElement(Wr,{hasUnread:n&&Boolean(d.message),show:s&&!c,onClick:()=>{u(!0),o()},"data-testid":"chat-new-message"},n&&Boolean(d.message)?i().createElement(Xr,{message:d.message}):i().createElement(Zr.Z,null)))};var Qr=n(9669),Jr=n.n(Qr);const eo=l.ZP.div.withConfig({displayName:"styles__QueueContainer",componentId:"sc-k9za8a-0"})(["left:0;right:0;z-index:15;position:absolute;background:",";background-color:",";box-shadow:0px 3px 4px -1px ",";",";"],(e=>e.theme.headerBackground),(e=>e.theme.headerBackground),u.O9.shadowColor,w.AO),to=l.ZP.div.withConfig({displayName:"styles__MessageContainer",componentId:"sc-k9za8a-1"})(["display:flex;padding:5px 18px;justify-content:space-between;align-items:center;border-top:1px solid rgba(0,0,0,0.1);"]),no=(0,l.ZP)(M.H3).withConfig({displayName:"styles__QueueText",componentId:"sc-k9za8a-2"})(["margin:0;color:",";span{font-weight:600;}font-size:",";font-weight:normal;line-height:24px;"],(e=>e.theme.headerText),u.JB.fontSizeH5),ro=(0,l.ZP)(fe.rU).withConfig({displayName:"styles__QueueLink",componentId:"sc-k9za8a-3"})(["color:",";"],(e=>e.theme.headerText)),oo=(0,l.F4)(["from{background-position:-180px;}to{background-position:180px;}"]),ao=(0,l.F4)(["from{background-position:180px;}to{background-position:-180px;}"]),io=l.ZP.div.withConfig({displayName:"styles__LoadingContainer",componentId:"sc-k9za8a-4"})(["position:relative;border:0;"]),so=l.ZP.span.withConfig({displayName:"styles__Loader",componentId:"sc-k9za8a-5"})(["opacity:1;height:3px;width:100%;top:3;position:absolute;background-image:linear-gradient( 90deg,rgba(255,255,255,0) 25%,"," 45%,"," 55%,rgba(255,255,255,0) 75% );animation:1.3s linear "," infinite 0s;"],(e=>e.theme.headerBackground),(e=>e.theme.headerBackground),(e=>{let{hasCancelled:t}=e;return t?ao:oo}));function lo(e){let{waitTime:t,takeoverQueueText:n}=e;return t?i().createElement(i().Fragment,null,"Estimated wait time: ",i().createElement("span",null,t," min")):n}const co=function(){const[e,t]=(0,a.useState)(null),[n,r]=(0,a.useState)(!1),{SAGE_HOST:o}=(0,s.v9)(x.NZ),{currentLanguage:l}=(0,s.v9)(x.W$),{id:c,text:u,showTakeoverQueue:d}=(0,s.v9)(x.Q7),{defaultLanguage:f}=(0,Xn.Z)(),p=(0,s.I0)(),{takeover_queue_text:h,takeover_queue_link:m,leave_queue_text:g,leave_queue_link:v}=(0,a.useMemo)((()=>(0,Kn.Z)(u,l,f)),[l,f,u]);return(0,a.useEffect)((()=>{d&&Jr().get(`${o}/api/v1/stats/bot/${c}/public/current_wait_time?sources%5B%5D=web`).then((e=>{const{data:{data:{mean:n,n:r}}}=e;if(r<3)return void t(null);const o=Math.round((n/60).toFixed(2));o>1&&t(o)}))}),[o,c,d]),(0,a.useEffect)((()=>{const e=setTimeout((()=>{n&&p((0,ue.K1)())}),3e3);return n||clearTimeout(e),()=>clearTimeout(e)}),[n,p]),d?i().createElement(eo,null,i().createElement(to,{"aria-live":"polite","aria-atomic":"true","data-cy":"takeover-queue"},n?i().createElement(i().Fragment,null,i().createElement(no,null,g),i().createElement(ro,{onClick:()=>r(!1),"data-cy":"takeover-queue-link"},v)):i().createElement(i().Fragment,null,i().createElement(no,null,i().createElement(lo,{waitTime:e,takeoverQueueText:h})),i().createElement(ro,{onClick:()=>r(!0),"data-cy":"takeover-queue-link"},m))),i().createElement(io,null,i().createElement(so,{hasCancelled:n}))):null},uo=l.ZP.div.withConfig({displayName:"styles__BodyContainer",componentId:"sc-1vymaz1-0"})(["width:100%;min-width:100%;overflow-y:auto;padding:0 30px;height:100%;overflow-x:hidden;background:",";background-color:",";overscroll-behavior:contain;",""],(e=>e.theme.background),(e=>e.theme.background),m.O),fo=l.ZP.div.withConfig({displayName:"styles__ChatBoxMessages",componentId:"sc-1vymaz1-1"})(["min-height:100%;display:flex;flex-direction:column;justify-content:flex-end;"]);let po,ho=!1;const mo=function(e){let{setBodyRef:t,setBottomRef:n,setTopRef:r,scrollToBottom:o,scrollToLatestMessage:l,shouldAutoScroll:c,onUserScroll:u,buttonHandlers:d,hasUnreadMessage:f,setGroupRef:p}=e;const[h,m]=(0,a.useState)(!1),{requestedTakeover:g,takeoverClosed:v,takenOver:y,isTyping:w}=(0,s.v9)(x.Wt),{isTyping:E}=(0,s.v9)(x.Q7),{active:k,currentLanguage:_,botKey:C}=(0,s.v9)(x.W$),{currentMessageId:T,inspectorOpen:S}=(0,s.v9)(x.P8),I=(0,s.I0)(),{chatMessages:O}=(0,s.v9)(x.sY)||[],P=(e=>{let t=null,n=null,r=!1;const o=[];return e.forEach((e=>{e.from_bot===t&&e.name===n&&e.from_webhook===r&&e.handler!==b.xm.TRIGGER_DIALOGUE?o[o.length-1].push(e):o.push([e]),t=e.from_bot,n=e.name,r=e.from_webhook})),o})(O);(0,a.useEffect)((()=>{ho!==y&&y?(po=_,ho=y):void 0===po||po===_||y||(I((0,ue.a$)(C,!0)),po=void 0,ho=void 0)}),[v,y,g,C,_,I]),(0,a.useEffect)((()=>{k&&O.length>0?m(!0):m(!1)}),[k,O.length]);let A=0;return i().createElement(uo,{ref:t,onScroll:u,tabIndex:"0","data-testid":"chat-body-container"},g&&!v&&!y&&i().createElement(co,null),i().createElement(fo,{role:"log","aria-live":"polite","data-cy":"chat-log"},P.map(((e,t)=>{const n=S&&((e,t,n)=>{var r;const o=e||(null===(r=t.slice(-1)[0])||void 0===r?void 0:r.id);return!!n.find((e=>{let{id:t}=e;return o===t}))})(T,O,P[t]);return i().createElement(i().Fragment,{key:`message-group-${t}`},i().createElement(Et,{fromAgent:e[0].sender===b.B6.AGENT,fromBot:e[0].from_bot,created:e[0].created,inspected:n,setGroupRef:p},e.map(((n,a)=>{const s=t===P.length-1&&a===e.length-1;return A+=1,i().createElement(i().Fragment,{key:`${n.id}_${A}`},s&&i().createElement("span",{ref:r}),i().createElement(Br,{chatMessage:n,scrollToBottom:o,scrollToLatestMessage:l,shouldAutoScroll:c,buttonHandlers:d,messageCounter:A}))}))))})),(w||E)&&i().createElement(Rt,null),i().createElement("div",{ref:n})),h&&i().createElement(Kr,{chatMessages:O,hasUnreadMessage:f,shouldAutoScroll:c,scrollToBottom:o}))},go=function(e){let{children:t,animate:n}=e;return i().createElement(hn.ww.div,{variants:{normal:{x:0},error:{x:[0,2,-2,0]}},animate:n},t)},vo=l.ZP.div.withConfig({displayName:"styles__InputLimitContainer",componentId:"sc-18r5r1u-0"})(["height:20px;display:flex;opacity:0.8;align-items:center;margin-bottom:10px;justify-content:space-between;",""],(e=>!e.enabled&&`margin-bottom: 15px; height: 10px; border-bottom: 1px solid ${u.O9.grayColor}`)),yo=l.ZP.div.withConfig({displayName:"styles__FillContainer",componentId:"sc-18r5r1u-1"})(["width:",";height:1px;transition:all ease 0.3s;span{height:100%;display:block;}span:first-child{width:100%;opacity:0.3;background:",";background-color:",";}span:last-child{margin-top:-1px;width:","%;background:",";background-color:",";}"],(e=>e.active?"calc(100% - 50px)":"100%"),(e=>{let{theme:t}=e;return t.chatLogElements}),(e=>{let{theme:t}=e;return t.chatLogElements}),(e=>e.width>100?100:e.width),(e=>{let{theme:t}=e;return t.chatLogElements}),(e=>{let{theme:t}=e;return t.chatLogElements})),bo=(0,l.ZP)(M.sk).withConfig({displayName:"styles__CountContainer",componentId:"sc-18r5r1u-2"})(["margin:0;opacity:1;display:",";color:",";span{font-weight:500;}",";"],(e=>e.active?"block":"none"),(e=>{let{theme:t}=e;return t.chatLogElements}),w.CX),xo=function(e){let{alwaysShow:t,inputMax:n,inputLength:r,shake:o}=e;const a=Math.floor(r/n*100),s=r>0,l=t||r>n;return i().createElement(vo,{enabled:l,active:s},l&&i().createElement(i().Fragment,null,i().createElement(yo,{active:s,width:a},i().createElement("span",null),i().createElement("span",null)),i().createElement(go,{initial:!1,animate:o?"error":"normal"},i().createElement(bo,{active:s},i().createElement("span",null,r),"/",n))))};var wo=n(9115);const Eo=l.ZP.div.withConfig({displayName:"styles__UploadWrapper",componentId:"sc-1e637pi-0"})(["button{padding:0;}&:hover{opacity:0.8;}svg{margin-top:3px;path{fill:",";}}"],(e=>{let{theme:t}=e;return t.buttonBackground})),ko=["Bytes","kB","MB","GB"],_o=1024,Co=5*_o,To=e=>new Promise(((t,n)=>{const r=e.size/_o;if(r>Co)return void n(new Error(`The file must be less than ${function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";const n=Math.floor(Math.log(e)/Math.log(_o));return`${parseFloat((e/_o**n).toFixed(t))} ${ko[n]}`}(Co*_o)}`));const o=new FileReader;o.readAsDataURL(e),o.onload=()=>t({url:o.result,file:e,sizeKb:r,name:e.name,type:e.type,status:b.j3.PROCESSING,sender:b.B6.USER}),o.onabort=()=>n(new Error(o.error))})),So=function(e){let{accept:t="image/*,text/*,.pdf,.heic",multiple:n=!0}=e;const{handoverMode:r,isTextDirectionRtl:o}=(0,s.v9)(x.Q7),{takenOver:l}=(0,s.v9)(x.Wt),{attachments:c}=(0,s.v9)(x.W$),u=(0,s.I0)(),d=(0,a.useRef)(),f=(0,wo.Z)(),p=l&&r===b.L2.PLATFORM,h=(0,a.useCallback)((async e=>{let{target:t}=e;try{var n;if((null===(n=t.files)||void 0===n?void 0:n.length)>5)return void u((0,ue.xB)("You can upload up to 5 files at a time",3500));const e=await Promise.all(Array.from(t.files).map(To));u((0,ue.EU)(e))}catch(e){u((0,ue.xB)(e.message.replace(/^Error: ?/i,""),3500))}}),[u]),m=(0,a.useCallback)((()=>{d.current&&(d.current.value="",d.current.click())}),[d]);return(0,a.useEffect)((()=>{c.buttonClicked&&(u((0,ue.PU)()),m())}),[c.buttonClicked,u,m]),i().createElement(Eo,{isTextDirectionRtl:o,hasFiles:c.files.length>0},(p||f&&(null==c?void 0:c.exchangeId))&&i().createElement(fe.zx,{onClick:e=>{e.preventDefault(),e.stopPropagation(),m()}},i().createElement(kt,null)),i().createElement("input",{ref:d,hidden:!0,type:"file",accept:t,multiple:n,onChange:h,style:{display:"none"}}))},Io=l.ZP.div.withConfig({displayName:"styles__Container",componentId:"sc-76oby0-0"})(["display:flex;align-items:center;font-size:15px;> div{position:relative;overflow:visible;}span{border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:8px;}button{display:none;position:absolute;top:-9px;left:-8px;border:1px solid white;border-radius:50%;width:20px;height:20px;padding:0px;background:",";}"],u.O9.darkColor),Oo=l.ZP.div.withConfig({displayName:"styles__AttachmentWrapper",componentId:"sc-76oby0-1"})(["height:41px;&:not(:first-child){margin-left:4px;}&:hover{button{display:block;}}"]),Po=l.ZP.div.withConfig({displayName:"styles__ImageWrapper",componentId:"sc-76oby0-2"})(["height:41px;display:flex;img{border-radius:8px;max-height:100%;margin-left:4px;}"]),Ao=l.ZP.div.withConfig({displayName:"styles__IconWrapper",componentId:"sc-76oby0-3"})(["height:100%;padding:8px;border-radius:8px;background:",";"],u.O9.grayColor);l.ZP.div.withConfig({displayName:"styles__FileType",componentId:"sc-76oby0-4"})(["font-size:14px;height:41px;padding:0 4px;background:",";border-radius:8px;display:flex;align-items:center;margin-left:4px;"],u.O9.grayColor);const No=function(e){let{file:t}=e;return on(t)===b.Gk.IMAGE?i().createElement(Po,null,i().createElement("img",{src:t.url,alt:`Uploaded ${t.name}`})):i().createElement(Ao,null,i().createElement(kt,{height:24}))},Mo=function(){const{attachments:{files:e}}=(0,s.v9)(x.W$),t=(0,s.I0)(),n=(0,a.useCallback)((n=>t((0,ue.EU)(((e,t)=>{const n=e.slice();return n.splice(t,1),n})(e,n)))),[t,e]);return i().createElement(Io,null,e.map(((e,t)=>i().createElement(Oo,{key:`uploaded-image-${e.name}-${t}`},i().createElement(No,{file:e}),i().createElement(fe.zx,{onClick:e=>{e.preventDefault(),n(t)}},i().createElement(h.Tw,{width:18,height:18,color:"#FFF"}))))),1===(null==e?void 0:e.length)&&i().createElement("span",null,e[0].name))};var Lo=n(7462),Ro=n(3366);const Do=a.useLayoutEffect;var jo=function(e,t){"function"!=typeof e?e.current=t:e(t)};var Bo={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Zo=function(e){Object.keys(Bo).forEach((function(t){e.style.setProperty(t,Bo[t],"important")}))},Fo=null,Uo=function(){},zo=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],Ho=!!document.documentElement.currentStyle,$o=function(e,t){var n,r=e.cacheMeasurements,o=e.maxRows,i=e.minRows,s=e.onChange,l=void 0===s?Uo:s,c=e.onHeightChange,u=void 0===c?Uo:c,d=(0,Ro.Z)(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),f=void 0!==d.value,p=(0,a.useRef)(null),h=function(e,t){var n=(0,a.useRef)();return(0,a.useCallback)((function(r){e.current=r,n.current&&jo(n.current,null),n.current=t,t&&jo(t,r)}),[t])}(p,t),m=(0,a.useRef)(0),g=(0,a.useRef)(),v=function(){var e=p.current,t=r&&g.current?g.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,zo.reduce((function(e,t){return e[t]=n[t],e}),{})),o=r.boxSizing;return""===o?null:(Ho&&"border-box"===o&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){g.current=t;var n=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),Fo||((Fo=document.createElement("textarea")).setAttribute("tab-index","-1"),Fo.setAttribute("aria-hidden","true"),Zo(Fo)),null===Fo.parentNode&&document.body.appendChild(Fo);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;Fo.style[t]=i[t]})),Zo(Fo),Fo.value=t;var l=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize}(Fo,e);Fo.value="x";var c=Fo.scrollHeight-o,u=c*n;"border-box"===s&&(u=u+o+a),l=Math.max(u,l);var d=c*r;return"border-box"===s&&(d=d+o+a),[l=Math.min(d,l),c]}(t,e.value||e.placeholder||"x",i,o),a=n[0],s=n[1];m.current!==a&&(m.current=a,e.style.setProperty("height",a+"px","important"),u(a,{rowHeight:s}))}};return(0,a.useLayoutEffect)(v),n=function(e){var t=(0,a.useRef)(e);return Do((function(){t.current=e})),t}(v),(0,a.useLayoutEffect)((function(){var e=function(e){n.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),(0,a.createElement)("textarea",(0,Lo.Z)({},d,{onChange:function(e){f||v(),l(e)},ref:h}))};const Vo=(0,a.forwardRef)($o),qo=l.ZP.div.withConfig({displayName:"styles__ComposerContainer",componentId:"sc-1v8m1u6-0"})(["padding:20px;padding-top:5px;background:none;background:",";background-color:",";",""],(e=>e.theme.background),(e=>e.theme.background),fe.FL),Wo=l.ZP.div.withConfig({displayName:"styles__FormInner",componentId:"sc-1v8m1u6-1"})(["display:flex;align-items:center;justify-content:space-between;gap:15px;"]),Go=l.ZP.div.withConfig({displayName:"styles__DisabledText",componentId:"sc-1v8m1u6-2"})(["margin:8px 0 10px 10px;transition:all 0.3s ease;color:",";font-size:",";line-height:24px;",""],u.O9.darkColor,u.JB.fontSizeH5,(e=>e.hide?"transform: translateY(-45px);":"")),Yo=(0,l.ZP)(Vo).withConfig({displayName:"styles__ComposerInput",componentId:"sc-1v8m1u6-3"})([""," min-height:","px;"],fe.qH,(e=>{let{$minHeight:t}=e;return t})),Xo=l.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1v8m1u6-4"})(["width:40px;height:40px;display:flex;justify-content:center;align-items:center;"]),Ko=(0,l.iv)(["color:#fff;z-index:10;cursor:pointer;box-shadow:none;height:100%;width:100%;padding:0;text-transform:none;display:flex;align-items:center;justify-content:center;border:none;max-width:36px;max-height:36px;background-color:transparent;"," &:hover{opacity:0.8;}svg{transition:all 0.2s ease;path{fill:",";}}"],m.O,(e=>e.theme.buttonBackground)),Qo=l.ZP.button.withConfig({displayName:"styles__SubmitButton",componentId:"sc-1v8m1u6-5"})(["",";z-index:15;padding:8px;transition:opacity 0.1s ease-in;",";border-radius:100px;background:",";background-color:",";svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:#fff;}}",";"],Ko,(e=>!e.active&&"\n opacity: 0.3;\n pointer-events: none;\n "),(e=>e.theme.buttonBackground),(e=>e.theme.buttonBackground),(e=>{let{disabled:t}=e;return t&&"\n cursor: default;\n opacity: 0.3;\n &:hover {\n opacity: 0.3;\n }\n "})),Jo=(0,wo.Z)();let ea;const ta=41,na=1e3,ra=1e3;function oa(e){let{active:t,chatHasStarted:n,onManualFocus:r,currentlyPoppedUp:o,autoFocused:l,isScrolledDown:c}=e;const u=(0,a.useRef)(),[d,f]=(0,a.useState)(ta),[p,m]=(0,a.useState)(!1),[g,v]=(0,a.useState)(!1),[y,b]=(0,a.useState)(""),[w,E]=(0,a.useState)(0);(0,a.useEffect)((()=>{(t||n)&&!Jo&&!o&&u.current&&!l&&u.current.focus()}),[t,n,l,u,o]);const{text:k,inputLimitEnabled:_,inputLimit:C,isTextDirectionRtl:T}=(0,s.v9)(x.Q7),{defaultLanguage:S}=(0,Xn.Z)(),{hideInputField:I,currentLanguage:O,allGreetingsHideInput:P,attachments:{files:A}}=(0,s.v9)(x.W$),{takenOver:N,userIsTyping:M}=(0,s.v9)(x.Wt),{connected:L}=(0,s.v9)(x.ZI),{chatMessages:R}=(0,s.v9)(x.sY),{inspectorOpen:D}=(0,s.v9)(x.P8),j=(0,s.I0)(),B=T?"rtl":void 0,Z=I&&!N,F=!N&&_?C:na,U=!y&&0===A.length,z=!L||Z||P&&0===R.length||y.length>F||U||!n,{placeholder:H,disabled_input_text:$}=(0,a.useMemo)((()=>(0,Kn.Z)(k,O,S)),[O,S,k]),V=e=>{if(e.preventDefault(),e.stopPropagation(),M&&j((0,ue.Yp)()),z)return!1;if(!y.trim()&&0===A.length)return!1;if(A.length>0)j((0,ue.mJ)());else{const e=(new Date).getTime();if(!(e-w>ra))return!1;E(e),j((0,ue.uC)(y.trim()))}return b(""),!0};return i().createElement(qo,{dir:B,inspectorOpen:D},i().createElement(xo,{alwaysShow:!N&&_,inputMax:F,inputLength:y.length,shake:p}),i().createElement("form",{autoComplete:"off",action:"#",onSubmit:V},i().createElement(Wo,null,i().createElement(fe.fv,{targetHeight:d,active:U?0:1,hasFiles:(null==A?void 0:A.length)>0},0===A.length&&i().createElement(i().Fragment,null,i().createElement(Yo,{id:"chat-box-composer","data-cy":"chat-box-composer","aria-hidden":!n,"aria-label":H,name:"message",$hide:Z?1:0,disabled:!n||Z,$active:U?0:1,ref:u,placeholder:H,type:"text",onChange:e=>{const{value:t}=e.target;N?(e=>{const t=e.length>0;clearTimeout(ea),!M&&t?j((0,ue.D1)()):M&&!t&&j((0,ue.Yp)()),ea=setTimeout((()=>{j((0,ue.Yp)())}),5e3)})(t):t.length>F&&m(!0),b(t)},value:y,onFocus:()=>v(!0),onBlur:()=>v(!1),onMouseDown:()=>{g||c()||r()},onHeightChange:f,$minHeight:ta,onKeyDown:e=>{m(!1),"Enter"!==e.key||e.shiftKey||V(e)}}),i().createElement(Go,{hide:I?1:0},$)),i().createElement(Mo,null)),i().createElement(So,null),i().createElement(Xo,{isTextDirectionRtl:T},i().createElement(Qo,{"data-cy":"composer-submit","aria-hidden":z?"true":"false",active:z?0:1,disabled:z,role:"button",onClick:V,title:"Send message",onMouseDown:e=>{e.preventDefault()}},i().createElement(h.jE,{width:18,height:18}))))))}oa.defaultProps={currentlyPoppedUp:!1};const aa=oa;var ia=n(8974);const sa=function(e){let{cancelChat:t,setCancelChat:n}=e;const{name:r,avatar:o,fullscreenMode:l,feedbackFormType:c,isTextDirectionRtl:u}=(0,s.v9)(x.Q7),{optionsScreenOpen:d,chatHasStarted:f}=(0,s.v9)(x.W$),p=(0,s.I0)(),m=!(d||l&&c===b.MC.NONE),g=document.documentElement,v=u?"rtl":void 0,y=(0,a.useCallback)((()=>{p((0,ue.BW)()),g.style.overflow="unset"}),[p,g]),w=(0,a.useCallback)((()=>{p((0,ue.Jd)())}),[p]);var E;E=(0,a.useCallback)((e=>{const{tagName:t}=document.activeElement;"Escape"===e.code&&"BODY"===t&&y(),"Escape"===e.code&&"BODY"!==t&&document.activeElement.blur()}),[y]),(0,a.useEffect)((()=>(window.addEventListener("keydown",E,!0),()=>window.removeEventListener("keydown",E,!0))),[E]);const k=(0,a.useCallback)((()=>{t?(p((0,ue.TM)(l)),n(!1),g.style.overflow="unset"):n(!0)}),[t,p,l,n,g]);return f?i().createElement(ia.gM,{dir:v,"data-cy":"chat-box-header"},i().createElement(ia.pj,null,o?i().createElement(ia.bw,{avatar:o}):i().createElement(Fr,{height:30}),i().createElement(ia.WO,{isTextDirectionRtl:u,"aria-label":`Chat bot ${r||"Kindly"}`},r||"Kindly")),i().createElement(ia.lb,null,m&&i().createElement(i().Fragment,null,i().createElement(ia.Ov,{"aria-label":"Open settings",title:"Open settings",type:"button",onClick:w,"data-cy":"chat-settings-button"},i().createElement(h.ew,{width:24,height:24})),i().createElement(ia.Ov,{"aria-label":"Minimize chat",title:"Minimize chat",type:"button",onClick:y,"data-cy":"minimize-chat-button"},i().createElement(h.dO,{width:24,height:24})),i().createElement(ia.Ov,{"aria-label":"End chat",title:"End chat",type:"button",onClick:k,"data-cy":"end-chat-button","data-testid":"end-chat-button",isTextDirectionRtl:u},i().createElement(h.Tw,{width:24,height:24}))))):null},la=l.ZP.div.withConfig({displayName:"styles__AboutChatContainer",componentId:"sc-pmmp3f-0"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;",";animation-duration:0.2s;animation-timing-function:ease-in;"],w.CX),ca=l.ZP.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-pmmp3f-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),ua=l.ZP.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-pmmp3f-2"})(["width:100%;height:100%;display:flex;padding:0 30px;flex-direction:column;justify-content:center;align-items:center;"]),da=(0,l.ZP)(M.nv).withConfig({displayName:"styles__AboutParagraph",componentId:"sc-pmmp3f-3"})(["font-size:16px;a{color:",";}"],u.O9.primaryColor),fa=l.ZP.div.withConfig({displayName:"styles__LinkContainer",componentId:"sc-pmmp3f-4"})(["a{color:",";text-align:center;font-size:",";display:block;margin:60px 0 30px 0;:hover,:focus,:active,:visited{color:",";}}"],u.O9.darkColor,u.JB.fontSizeP,u.O9.darkColor),pa=function(e){let{setAboutChat:t}=e;const{text:n}=(0,s.v9)(x.Q7),{currentLanguage:r}=(0,s.v9)(x.W$),{defaultLanguage:o}=(0,Xn.Z)(),l=(0,a.useCallback)((()=>t(!1)),[t]),c=(0,a.useCallback)((e=>{"Enter"===e.key&&t(!1)}),[t]),u=(0,a.useMemo)((()=>(0,Kn.Z)(n,r,o)),[r,o,n]),{back_to_chat_button:d}=u;return i().createElement(la,null,i().createElement(ca,null,i().createElement(ua,null,i().createElement(M.H3,null,"About Kindly"),i().createElement(da,null,"This chatbot is powered by Kindly.",i().createElement("br",null),"To learn more about Kindly, visit"," ",i().createElement("a",{href:"https://www.kindly.ai/nb/products",target:"_blank",rel:"noopener noreferrer"},"this website."))),i().createElement(fa,null,i().createElement(fe.rU,{"aria-label":d,title:d,onClick:l,onKeyUp:c,tabIndex:"0",type:"button"},"‹ ",d))))},ha=l.ZP.div.withConfig({displayName:"styles__PoweredContainer",componentId:"sc-16vfwd0-0"})(["z-index:2;display:flex;justify-content:center;"]),ma=l.ZP.span.withConfig({displayName:"styles__Blob",componentId:"sc-16vfwd0-1"})(["width:8px;height:8px;opacity:1;border-radius:100%;margin:0 4px 0 8px;background:#1cd300;background-color:#1cd300;"]),ga=(0,l.ZP)(M.sk).withConfig({displayName:"styles__PoweredParagraph",componentId:"sc-16vfwd0-2"})(["display:flex;opacity:1;margin-bottom:0;align-items:baseline;span:first-child{opacity:0.6;}a{cursor:pointer;}"]),va=function(e){let{hide:t,setAboutChat:n}=e;const r=(0,a.useCallback)((()=>n(!0)),[n]),o=(0,a.useCallback)((e=>{"Enter"===e.key&&n(!0)}),[n]);return i().createElement(ha,{hide:t},i().createElement(ga,null,i().createElement("span",null,"Powered by")," ",i().createElement(ma,null),i().createElement(M.zd,null,i().createElement(fe.rU,{"aria-label":"Visit Kindly",title:"Visit Kindly",onClick:r,onKeyUp:o,type:"button",tabIndex:0},"Kindly"))))},ya=e=>{const[t,n]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{t&&!e&&n(!1)}),[e,t]),{showAboutChat:t,setShowAboutChat:n}},ba=l.ZP.div.withConfig({displayName:"styles__CancelChatContainer",componentId:"sc-1gy1mo2-0"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;",";animation-duration:0.2s;animation-timing-function:ease-in;"],w.CX),xa=l.ZP.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-1gy1mo2-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),wa=l.ZP.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-1gy1mo2-2"})(["width:100%;height:100%;display:flex;padding:0 30px;justify-content:center;align-items:center;"]),Ea=l.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1gy1mo2-3"})(["button{margin:auto;}a{color:",";text-align:center;font-size:",";display:block;margin:60px 0 30px 0;:hover,:focus,:active,:visited{color:",";}}"],u.O9.darkColor,u.JB.fontSizeP,u.O9.darkColor),ka=l.ZP.div.withConfig({displayName:"styles__CancelChatFooter",componentId:"sc-1gy1mo2-4"})(["div{display:flex;position:unset;align-items:center;}"]),_a=function(e){let{setCancelChat:t}=e;const n=(0,s.I0)(),{text:r}=(0,s.v9)(x.Q7),{currentLanguage:o,active:l}=(0,s.v9)(x.W$),{setShowAboutChat:c}=ya(l),{defaultLanguage:d}=(0,Xn.Z)(),f=document.documentElement,p=(0,a.useMemo)((()=>(0,Kn.Z)(r,o,d)),[o,d,r]),h=(0,a.useCallback)((()=>{n((0,ue.TM)()),t(!1),f.style.overflow="unset"}),[n,t,f]),m=(0,a.useCallback)((()=>t(!1)),[t]),g=(0,a.useCallback)((e=>{"Enter"===e.key&&t(!1)}),[t]),{back_to_chat_button:v,cancel_chat_button:y,cancel_chat_text:b}=p;return i().createElement(ba,null,i().createElement(xa,null,i().createElement(wa,null,i().createElement(M.H2,null,b)),i().createElement(Ea,null,i().createElement(vr.Z,{style:u.OU,"aria-label":y,title:y,onClick:h,type:"button",color:!0,text:y,cy:"cancel-chat-button"}),i().createElement(fe.rU,{"aria-label":v,title:v,onClick:m,onKeyUp:g,type:"button",tabIndex:"0"},"‹ ",v)),i().createElement(ka,null,i().createElement(va,{setAboutChat:c}))))};n(9567);const Ca=(0,l.ZP)(fe.rU).withConfig({displayName:"styles__FooterLink",componentId:"sc-1l968t6-0"})(["display:block;color:",";text-align:center;margin:30px 0;font-size:",";:hover,:focus,:active,:visited{color:",";}"],u.O9.darkColor,u.JB.fontSizeP,u.O9.darkColor),Ta=l.ZP.div.withConfig({displayName:"styles__OptionsContainer",componentId:"sc-1l968t6-1"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;@media (max-height:610px){overflow-y:auto;}"]),Sa=(l.ZP.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-1l968t6-2"})(["height:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;"]),l.ZP.div.withConfig({displayName:"styles__GenericContainer",componentId:"sc-1l968t6-3"})(["display:grid;grid-gap:15px;grid-template-rows:auto 1fr;overflow-y:auto;@media ","{grid-gap:0;grid-template-rows:1fr;}"],u.Uh.maxPhoneHeight)),Ia=l.ZP.div.withConfig({displayName:"styles__DeleteContainer",componentId:"sc-1l968t6-4"})(["display:grid;grid-template-rows:1fr auto;@media ","{grid-template-rows:1fr;}"],u.Uh.maxPhoneHeight),Oa=l.ZP.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-1l968t6-5"})(["width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px 30px;h3{display:flex;align-items:center;justify-content:center;}"]),Pa=(l.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1l968t6-6"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;&:last-child{margin-top:10px;}svg{margin-right:15px;}}"]),l.ZP.span.withConfig({displayName:"styles__OptionsButtonText",componentId:"sc-1l968t6-7"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"])),Aa=l.ZP.div.withConfig({displayName:"styles__OptionsFooter",componentId:"sc-1l968t6-8"})(["div{position:unset;display:flex;flex-direction:column;align-items:center;}"]),Na=l.ZP.div.withConfig({displayName:"styles__DeletedText",componentId:"sc-16kypod-0"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;line-height:24px;"],u.O9.darkColor,u.JB.fontSizeH5),Ma=function(e){let{textContent:t}=e;const{chat_deleted_header:n,chat_deleted_text:r}=t;return i().createElement(Oa,null,i().createElement(M.H3,null,n),i().createElement(Na,null,r))},La="GENERIC",Ra="LANGUAGE",Da="DOWNLOAD",ja="DELETE_CHAT_CONFIRM",Ba="CHAT_DELETED",Za=l.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-c6vrbi-0"})(["max-width:100%;flex-direction:column;display:flex;align-items:center;margin:unset;button{margin-bottom:10px;&:last-child{margin-top:0;}}"]),Fa=function(e){let{textContent:t,setOptionsView:n}=e;const r=(0,s.I0)(),{back_to_chat_button:o,delete_text:l,delete_button:c}=t,d=document.documentElement,f=(0,a.useCallback)((()=>{n(Ba),r((0,ue.GO)()),d.style.overflow="unset"}),[n,r,d]);return i().createElement(i().Fragment,null,i().createElement(Oa,null,i().createElement(M.H3,null,l)),i().createElement(Za,null,i().createElement(vr.Z,{style:u.OU,"aria-label":c,title:c,onClick:f,type:"button",text:c,color:!0,cy:"confirm-delete-chat"}),i().createElement(Ca,{"aria-label":o,title:o,onClick:()=>n(La),type:"button"},"‹ ",o)))};var Ua=n(7818);const za=l.ZP.div.withConfig({displayName:"styles__SelectionContainer",componentId:"sc-mbgnew-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 15px;"]),Ha=l.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-mbgnew-1"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;}"]),$a=l.ZP.div.withConfig({displayName:"styles__Title",componentId:"sc-mbgnew-2"})(["color:",";font-size:",";margin:0 0 10px;line-height:24px;"],u.O9.darkColor,u.JB.fontSizeH5),Va=function(e){let{textContent:t,setOptionsView:n}=e;const r=(0,s.I0)(),{back_to_chat_button:o,download_button:l,download_format_text:c}=t,u=(0,a.useCallback)((async()=>{r(await(0,ue.gL)({},"html"))}),[r]),d=(0,a.useCallback)((async()=>{r((0,ue.gL)({},"json"))}),[r]);return i().createElement(i().Fragment,null,i().createElement(Oa,null,i().createElement($a,null,c)),i().createElement(za,null,i().createElement(Ha,null,i().createElement(Ua.qO,{"aria-label":`${l} (HTML)`,title:`${l} (HTML)`,onClick:u,type:"button","data-cy":"download-chat-html"},i().createElement(Pa,null,`${l} (HTML)`)),i().createElement(Ua.qO,{"aria-label":`${l} (JSON)`,title:`${l} (JSON)`,onClick:d,type:"button","data-cy":"download-chat-json"},i().createElement(Pa,null,`${l} (JSON)`))),i().createElement(Ca,{"aria-label":o,title:o,onClick:()=>n(La),type:"button"},"‹ ",o)))},qa=l.ZP.div.withConfig({displayName:"styles__Header",componentId:"sc-crpo3y-0"})(["width:100%;height:",";background:",";background-color:",";@media ","{display:none;}"],(e=>e.long?"180px":"210px"),(e=>e.theme.headerBackground),(e=>e.theme.headerBackground),u.Uh.maxPhoneHeight),Wa=l.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-crpo3y-1"})(["min-width:60%;max-width:95%;margin:auto;display:flex;flex-direction:column;button{margin:5px 0;&:first-child{margin-top:10px;}svg{margin-right:15px;}}"]),Ga=function(e){let{languages:t,textContent:n,setOptionsView:r}=e;const o=(0,s.I0)(),{back_to_chat_button:l,change_language_button:c,download_button:u,delete_button:d,start_over_button:f}=n,p=(0,a.useCallback)((()=>{o((0,ue.TM)(!0))}),[o]),m=(0,a.useCallback)((()=>{o((0,ue.xk)())}),[o]);return i().createElement(i().Fragment,null,i().createElement(qa,{long:t.length>1}),i().createElement(Wa,null,t.length>1&&i().createElement(Ua.qO,{"aria-label":c,title:c,onClick:()=>r(Ra),type:"button","data-cy":"change-language-option"},i().createElement(Pa,null,i().createElement(h.os,{width:18,height:14}),c)),i().createElement(Ua.qO,{"aria-label":f,title:f,onClick:p,type:"button","data-cy":"restart-chat-option"},i().createElement(Pa,null,f)),i().createElement(Ua.qO,{"aria-label":d,title:d,onClick:()=>r(ja),type:"button","data-cy":"delete-chat-option"},i().createElement(Pa,null,d)),i().createElement(Ua.qO,{"aria-label":u,title:u,onClick:()=>r(Da),type:"button","data-cy":"download-chat-option"},i().createElement(Pa,null,u)),i().createElement(Ua.qO,{"aria-label":l,title:l,onClick:m,type:"button","data-cy":"back-to-chat-option",$color:!0,autoFocus:!0},i().createElement(Pa,null,l))))},Ya=l.ZP.div.withConfig({displayName:"styles__SelectionContainer",componentId:"sc-1hbxmch-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 30px;"]),Xa=l.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1hbxmch-1"})(["max-width:100%;flex-direction:column;display:flex;margin:unset;min-width:190px;button{margin-bottom:10px;text-transform:capitalize;&:last-child{margin-top:0;}}"]),Ka=l.ZP.div.withConfig({displayName:"styles__ButtonFooter",componentId:"sc-1hbxmch-2"})(["margin-bottom:15px;button{display:block;margin:0 auto 30px;}"]),Qa=(0,l.ZP)(M.H3).withConfig({displayName:"styles__Title",componentId:"sc-1hbxmch-3"})(["margin-top:30px;width:100%;svg{margin-right:16px;display:inline-block;vertical-align:middle;}"]),Ja=function(e){let{languages:t,currentLanguage:n,textContent:r,setOptionsView:o}=e;const[l,c]=(0,a.useState)(n);(0,a.useEffect)((()=>{c(n)}),[n,c]);const d=(0,a.useCallback)((()=>o(La)),[o]),f=(0,a.useCallback)((e=>{"Enter"===e.key&&o(La)}),[o]),p=(0,s.I0)(),{confirm_action_button:m,back_to_chat_button:g,change_language_button:v,change_language_text:y}=r;return i().createElement(i().Fragment,null,i().createElement(Oa,null,i().createElement(Qa,null,i().createElement(h.os,{width:35,height:39}),v),i().createElement(M.nv,null,y)),i().createElement(Ya,null,i().createElement(Xa,null,t.map((e=>i().createElement(vr.Z,{key:e.code,"aria-label":e.name,title:e.name,onClick:()=>c(e.code),text:e.name,flat:e.code===l,selected:e.code===l,cy:`${e.code}-button`})))),i().createElement(Ka,null,l!==n&&i().createElement(vr.Z,{style:u.OU,"aria-label":m,title:m,onClick:()=>{p((0,ue.VH)(l))},type:"submit",text:m,color:!0}),i().createElement(Ca,{"aria-label":g,title:g,onClick:d,onKeyUp:f,tabIndex:"0",type:"button"},"‹ ",g))))},ei=function(e){let{setAboutChat:t}=e;const{text:n}=(0,s.v9)(x.Q7),{languages:r,defaultLanguage:o}=(0,Xn.Z)(),{currentLanguage:l}=(0,s.v9)(x.W$),{chatDeleted:c}=(0,s.v9)(x.Ut),[u,d]=(0,a.useState)(c?Ba:La),f=(0,a.useMemo)((()=>(0,Kn.Z)(n,l,o)),[l,o,n]);return i().createElement(Ta,null,u===La||u===Da||u===Ra?i().createElement(Sa,null,u===La&&i().createElement(Ga,{languages:r,textContent:f,setOptionsView:d}),u===Da&&i().createElement(Va,{languages:r,textContent:f,setOptionsView:d}),u===Ra&&i().createElement(Ja,{languages:r,textContent:f,currentLanguage:l,setOptionsView:d})):i().createElement(Ia,null,u===Ba&&i().createElement(Ma,{textContent:f}),u===ja&&i().createElement(Fa,{setOptionsView:d,textContent:f})),i().createElement(Aa,null,i().createElement(va,{setAboutChat:t})))};var ti=n(3242);const ni=l.ZP.div.withConfig({displayName:"styles__SelectContainer",componentId:"sc-1lfni2n-0"})(["position:relative;width:fit-content;&:before{content:'';position:absolute;right:11px;top:50%;transform:translateY(-50%);width:0;height:0;z-index:1;border-top:7px solid #2c2c2c;border-left:4px solid transparent;border-right:4px solid transparent;}"]),ri=l.ZP.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-1lfni2n-1"})(["position:absolute;top:10px;left:8px;svg{path{fill:#333;}}"]),oi=l.ZP.select.withConfig({displayName:"styles__Select",componentId:"sc-1lfni2n-2"})(["cursor:pointer;appearance:none;border-radius:5px;font-size:",";border:1px solid #dedede;padding:8px 30px 8px 11px;position:relative;color:#2c2c2c;background:transparent;background-color:transparent;"," ",""],u.JB.fontSizeH5,(e=>e.icon&&"padding-left: 30px;"),m.O);function ai(e){let{children:t,onClick:n,onChange:r,value:o,name:a,icon:s,...l}=e;return i().createElement(ni,null,s&&i().createElement(ri,null,i().createElement(h.os,{width:18,height:14})),i().createElement(oi,Object.assign({onClick:n,onChange:r,value:o,name:a,icon:s},l),t))}ai.defaultProps={icon:!1,onClick:ti.Z,onChange:ti.Z};const ii=ai;var si=n(6239);const li=l.ZP.div.withConfig({displayName:"styles__WelcomePageContainer",componentId:"sc-elyt0g-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;background:#fff;background-color:#fff;"]),ci=(0,l.iv)(["background-size:cover;background-position:center;background-image:url(",");"],(e=>e.welcomePageImage)),ui=l.ZP.div.withConfig({displayName:"styles__HeaderContent",componentId:"sc-elyt0g-1"})(["flex:1;height:100%;max-height:250px;padding:18px 18px 0;background:",";background-color:",";",";"],(e=>e.theme.headerBackground),(e=>e.theme.headerBackground),(e=>e.welcomePageImage&&ci)),di=l.ZP.div.withConfig({displayName:"styles__IntroContent",componentId:"sc-elyt0g-2"})(["flex:1;padding:15px 30px 30px;border-top:5px solid ",";@media ","{padding:30px;}"],(e=>e.theme.headerBackground),u.Uh.maxTablet),fi=l.ZP.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-elyt0g-3"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;"]),pi=l.ZP.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-elyt0g-4"})(["padding:20px 0;"]),hi=l.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-elyt0g-5"})(["display:flex;align-items:center;justify-content:space-between;button:first-child{@media ","{min-width:unset;}}"],u.Uh.maxTablet),mi=((0,l.ZP)(fe.zx).withConfig({displayName:"styles__CloseButton",componentId:"sc-elyt0g-6"})(["display:flex;align-items:center;padding:7px;color:",";background:",";background-color:",";border-color:",";border-radius:100px;"],(e=>e.theme.buttonText),(e=>e.theme.buttonBackground),(e=>e.theme.buttonBackground),(e=>e.theme.buttonBackground)),(0,l.ZP)(M.H2).withConfig({displayName:"styles__TitleText",componentId:"sc-elyt0g-7"})(["color:",";font-weight:500;font-size:",";margin:0 0 15px;"],u.O9.textColor,u.JB.fontSizeH3)),gi=l.ZP.div.withConfig({displayName:"styles__IntroText",componentId:"sc-elyt0g-8"})(["color:",";max-height:180px;overflow:hidden;font-size:",";margin:30px 0 10px 0;line-height:24px;div{& >:first-child{margin-top:0;}& >:last-child{margin-bottom:0;}a{color:#0000c6;}a:visited{color:#5b096e;}}strong{font-weight:500;}"],u.O9.textColor,u.JB.fontSizeH5),vi=function(){const[e,t]=(0,a.useState)(!1),{active:n,currentLanguage:r,optionsScreenOpen:o,feedbackFormType:l}=(0,s.v9)(x.W$),{welcomePage:c,welcomePageType:d,fullscreenMode:f,isTextDirectionRtl:p}=(0,s.v9)(x.Q7),{languages:m,defaultLanguage:g}=(0,Xn.Z)(),{labels:v}=(0,s.v9)(x.I_),y=(0,s.I0)(),w=(0,a.useRef)(),E=document.documentElement,k=!(o||f&&l===b.MC.NONE),_=p?"rtl":void 0;(0,a.useEffect)((()=>{n&&w.current.focus()}),[n]);const C=c?((e,t,n)=>Object.entries(e).filter((e=>{let[t]=e;return"image"!==t})).reduce(((e,r)=>{let[o,a]=r;return{...e,[o]:(0,si.Z)(a,t,n)}}),{}))(c,r,g):{header:"",text:"",start_button:""},T=(0,a.useCallback)((()=>{t(!0),y((0,ue.rg)()),y((0,ue.VH)(r||m[0].code,{skipRestart:v.length>0}))}),[y,r,m,v]),S=(0,a.useCallback)((()=>{y((0,ue.BW)()),E.style.overflow="unset"}),[y,E]),I=(0,a.useCallback)((e=>{y((0,ue.VH)(e))}),[y]);return i().createElement(li,null,i().createElement(ui,{welcomePageImage:"PICTURE"===d&&c.image},k&&i().createElement(ia.Ov,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:S,"data-cy":"close-chat-button"},i().createElement(h.Tw,{width:25,height:25}))),i().createElement(di,null,i().createElement(fi,{dir:_},i().createElement("div",null,m.length>1&&i().createElement(ii,{icon:!0,name:"language-select","data-cy":"language-select",value:r,onChange:e=>I(e.target.value),"aria-label":"Select a language"},m.map((e=>i().createElement("option",{key:e.code,label:e.name,value:e.code},e.name)))),i().createElement(pi,null,i().createElement(mi,null,C.header),i().createElement(gi,null,Sn(C.text)))),i().createElement(hi,null,i().createElement(vr.Z,{style:u.OU,cy:"start-chat-button",type:"button",title:C.start_button||"Start chat",onClick:T,loading:e,color:!0,ref:w},C.start_button||"Start chat")))))},yi=(0,l.F4)(["0%{opacity:0;}100%{opacity:1;}"]),bi=(0,l.iv)(["",";animation-name:",";"],(0,w.AV)(100),yi),xi=(0,l.F4)(["0%{opacity:1;}100%{opacity:0;}"]),wi=(0,l.iv)(["",";animation-delay:50ms;animation-name:",";"],(0,w.AV)(500),xi),Ei=(0,l.iv)(["",";"],(e=>e.fullHeight?"top: 0; height: 100%;":"top: 55px; height: calc(100% - 55px); border-bottom-right-radius: 6px; border-bottom-left-radius: 6px")),ki=l.ZP.div.withConfig({displayName:"styles__OverlayContainer",componentId:"sc-1xhdwt3-0"})(["width:100%;overflow:hidden;padding-bottom:5px;"," position:absolute;z-index:",";background:#fff;background-color:#fff;",";",";",";"],Ei,u.sQ.overlayIndex,(e=>!e.chatViewHidden&&"pointer-events: none"),(e=>!e.chatViewHidden&&(0,w.rQ)(300)),(e=>e.chatViewHidden?bi:wi)),_i=function(e){let{showAboutChat:t,setShowAboutChat:n,showCancelConfirmation:r,setShowCancelConfirmation:o}=e;const{welcomePageType:a,hideHeader:l}=(0,s.v9)(x.Q7),{chatHasStarted:c,optionsScreenOpen:u}=(0,s.v9)(x.W$),{chatDeleted:d}=(0,s.v9)(x.Ut),f=!c&&a!==b.JR.NONE,p=u||f||r||t||d;return i().createElement(ki,{chatViewHidden:p,fullHeight:l||f},t&&!r&&i().createElement(pa,{setAboutChat:n}),r&&i().createElement(_a,{setCancelChat:o}),f&&i().createElement(vi,null),(u||d)&&i().createElement(ei,{setAboutChat:n}))},Ci=l.ZP.div.withConfig({displayName:"styles__Container",componentId:"sc-109olta-0"})(["display:flex;flex-direction:column;align-items:center;background:",";background-color:",";padding:1px 0 0;"," span{background:",";background-color:",";width:90%;height:1px;z-index:21;}"],(e=>e.theme.background),(e=>e.theme.background),fe.FL,(0,Ur._j)(.1,u.O9.grayColor),(0,Ur._j)(.1,u.O9.grayColor)),Ti=l.ZP.form.withConfig({displayName:"styles__Contents",componentId:"sc-109olta-1"})(["display:flex;flex-direction:column;width:100%;padding:0 24px 20px;input{margin-right:24px;border:1px solid rgba(0,0,0,0);:focus{border:1px solid rgba(0,0,0,0);}:invalid{","}}"],(e=>{let{hasSubmitted:t}=e;return t&&"border-color: red;"})),Si=(0,l.ZP)(fe.zx).withConfig({displayName:"styles__CloseButton",componentId:"sc-109olta-2"})(["min-height:25px;display:flex;align-items:center;font-size:",";padding:0;:hover{opacity:0.8;}"],u.JB.fontSizeH4),Ii=l.ZP.div.withConfig({displayName:"styles__Header",componentId:"sc-109olta-3"})(["display:flex;margin:4px 0 5px;color:",";font-size:",";align-items:center;"],(e=>{let{theme:t}=e;return(0,Qn.R)(t.background,"white","black")}),u.JB.fontSizeP),Oi=l.ZP.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-109olta-4"})(["display:flex;justify-content:space-between;align-items:center;button:first-child{margin-right:8px;}div + button{margin-left:12px;}"]),Pi=l.ZP.input.withConfig({displayName:"styles__Input",componentId:"sc-109olta-5"})(["",""],fe.qH),Ai=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Ni(e,t){const n=(0,s.I0)(),{contactDetailsButton:r}=(0,s.v9)(x.W$),[o,c]=(0,a.useState)(""),[d,f]=(0,a.useState)(!1),p=(0,a.useRef)(),m=(0,l.Fg)(),g=r.contact_details.contact_type,{label:v,placeholder:y}=r.contact_details,b=(0,a.useMemo)((()=>(0,Qn.R)(m.background,u.O9.grayColor,u.O9.darkColor)),[m.background]),w=()=>{n((0,ue.un)())};return i().createElement(Ci,{ref:t},i().createElement("span",null),i().createElement(Ti,{hasSubmitted:d},i().createElement(Ii,null,g&&i().createElement(Si,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:w,"data-cy":"minimize-chat-button",mobileOnly:!0},i().createElement(h.Tw,{width:25,height:12,stroke:b})),v),i().createElement(Oi,null,i().createElement(fe.fv,null,i().createElement(Pi,{onChange:e=>{c(e.target.value)},value:o,type:g===Ai.EMAIL?"email":"tel",ref:p,placeholder:y,required:!0})),i().createElement(Qo,{onClick:e=>{var t,a;return f(!0),!(null==p||null===(t=p.current)||void 0===t||null===(a=t.validity)||void 0===a||!a.valid||(e.preventDefault(),n((0,ue.j6)(r,o)),w(),1))},type:"submit",active:!0,title:"Send your "+(g===Ai.EMAIL?"email address":"phone number")},i().createElement(h.jE,{width:18,height:18})))))}const Mi=(0,a.forwardRef)(Ni);var Li=n(1206);const Ri=(0,l.F4)(["0%{opacity:0;transform:translateY(-6px);}60%{transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),Di=(0,l.iv)(["",";animation-name:",";"],(0,w.AV)(),Ri),ji=l.ZP.div.withConfig({displayName:"styles__AlertContainer",componentId:"sc-efv8qo-0"})(["z-index:25;margin:15px;display:flex;padding:10px 15px;padding-right:10px;justify-content:space-between;border-radius:6px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";position:absolute;left:0;right:0;top:0;transition:top 150ms ease;",";",";"],u.O9.shadowColor,(e=>!e.isOnTop&&"top: 55px"),Di),Bi=l.ZP.div.withConfig({displayName:"styles__AlertContent",componentId:"sc-efv8qo-1"})(["padding-right:5px;"]),Zi=(0,l.ZP)(M.nv).withConfig({displayName:"styles__ContentText",componentId:"sc-efv8qo-2"})(["margin:0;"]),Fi=(0,l.ZP)(fe.rU).withConfig({displayName:"styles__ContentLink",componentId:"sc-efv8qo-3"})(["font-size:14px;font-weight:500;margin-top:5px;display:block;color:",";"],u.O9.primaryColor),Ui=(0,l.ZP)(fe.zx).withConfig({displayName:"styles__AlertDismiss",componentId:"sc-efv8qo-4"})(["z-index:15;display:flex;padding:0;height:fit-content;align-content:flex-start;flex-direction:column;&:hover{opacity:0.8;}svg path{stroke:",";}"],(e=>e.theme.buttonBackground)),zi=function(){const{welcomePageType:e}=(0,s.v9)(x.Q7),{chatHasStarted:t,optionsScreenOpen:n}=(0,s.v9)(x.W$),{linkLocation:r,linkText:o,textContent:a}=(0,s.v9)(x.Ep),l=(0,s.I0)(),c=!t&&e!==b.JR.NONE||n;return i().createElement(ji,{isOnTop:c},i().createElement(Bi,null,i().createElement(Zi,null,a),r&&o&&i().createElement(Fi,{href:r,target:"_blank",rel:"noopener noreferrer"},o)),i().createElement(Ui,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),l((0,ue.jz)())},type:"button"},i().createElement(h.Tw,{width:20,height:20,color:"#000"})))};var Hi=n(4625),$i=n(3542);const Vi=(0,wo.Z)(),qi=e=>{let{currentlyPoppedUp:t}=e;const[n,r]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{n&&r(!1)}),[n]),{autoFocus:(0,a.useCallback)((()=>{n||Vi||t||r(!0)}),[n,t]),autoFocused:n}},Wi=e=>{const[t,n]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{t&&!e&&n(!1)}),[e,t]),{showCancelConfirmation:t,setShowCancelConfirmation:n}},Gi=e=>{const t=ce(e),n=(e||[]).length;return(0,a.useMemo)((()=>n&&n!==(t||[]).length&&e[n-1]),[e,n,t])},Yi=(0,wo.Z)(),Xi=e=>{let{bodyBottomElement:t,bodyElement:n,newMessage:r,bodyTopElement:o,groupRef:i}=e;const{chatMessages:l}=(0,s.v9)(x.sY),{isTyping:c}=(0,s.v9)(x.Q7),{isTyping:u}=(0,s.v9)(x.Wt),[d,f]=(0,a.useState)(!1),[p,h]=(0,a.useState)(!0),m=Boolean(r)||c||u,g=m&&Boolean(r&&r.from_bot),v=(0,a.useCallback)(((e,t)=>()=>{var n,r;if(!e.current)return!0;const o=null!==(n=null==t||null===(r=t.current)||void 0===r?void 0:r.clientHeight)&&void 0!==n?n:0,{scrollTop:a,offsetHeight:i,scrollHeight:s}=e.current;return o>0||a+i>=s-1})(n,t),[t,n]),y=(0,a.useCallback)(((e,t)=>()=>{if(!e.current||!t.current)return!0;const{scrollTop:n,scrollHeight:r}=e.current,{offsetHeight:o}=t.current;return!(r-n-30>=o)})(n,i),[t,n]),w=(0,a.useCallback)(((e,t)=>()=>{t.current&&0!==e.current.scrollHeight&&(Yi?setTimeout((()=>{t.current.scrollIntoView()}),300):t.current.scrollIntoView())})(n,t),[t,n]),E=(0,a.useCallback)(((e,t)=>()=>{t.current&&0!==e.current.scrollHeight&&(Yi?setTimeout((()=>{t.current.scrollIntoView()}),300):t.current.scrollIntoView())})(n,o),[o,n]);(0,a.useEffect)((()=>{0===l.length&&h(!0)}),[l]),(0,a.useEffect)((()=>{var e,t;const n=(null==r||null===(e=r.buttonType)||void 0===e?void 0:e.toUpperCase())===b.Dx.QUICK_REPLY,o=(null==r||null===(t=r.handler)||void 0===t?void 0:t.toUpperCase())===b.xm.TRIGGER_DIALOGUE;(n||o)&&E()}),[r,E]);const k=((e,t)=>{const n=(0,a.useRef)(),r=(0,a.useRef)(),o=(0,a.useCallback)((()=>{r&&r.current&&clearTimeout(r.current)}),[]),i=(0,a.useCallback)((function(){o();for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];n.current=i,r.current=setTimeout((()=>e(...n.current)),t)}),[o,t,e]);return(0,a.useEffect)((()=>o),[o]),i})((0,a.useCallback)((()=>{v()||y()?(h(!0),f(!1)):h(!1)}),[v,y]),300);return(0,a.useEffect)((()=>{setTimeout((()=>{!v()&&p&&(r&&function(){let{from_bot:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!e}(r)?w():E())}))}),[n,v,m,r,w,E,p]),(0,a.useEffect)((()=>{!g||d||v()||f(!0)}),[v,g,d]),{shouldAutoScroll:p,scrollToBottom:w,scrollToLatestMessage:E,onUserScroll:k,hasUnreadMessage:d,isScrolledDown:v}},Ki=e=>{const[t,n]=(0,a.useState)(!1),r=ce(e);return(0,a.useEffect)((()=>{!e&&r&&n(!0)}),[e,r]),t};function Qi(e){let{buttonHandlers:t,onMessage:n=null}=e;const r=(0,a.useRef)(null),o=(0,a.useRef)(null),l=(0,a.useRef)(null),c=(0,a.useRef)(null),{hideHeader:u,fullscreenMode:d,offsetHeight:f}=(0,s.v9)(x.Q7),{show:p,textContent:h}=(0,s.v9)(x.Ep),{active:m,chatHasStarted:g,currentlyPoppedUp:v,contactDetailsButton:y,renderedBy:b}=(0,s.v9)(x.W$),{chatMessages:w}=(0,s.v9)(x.sY),E=Gi(w),{scrollToBottom:k,scrollToLatestMessage:_,shouldAutoScroll:C,onUserScroll:T,hasUnreadMessage:S,isScrolledDown:I}=Xi({bodyBottomElement:o,bodyTopElement:l,bodyElement:r,newMessage:E,groupRef:c}),O=ce(m);(0,a.useEffect)((()=>{m&&!O&&S&&k()}),[S,m,k,O]);const[P,A]=(0,a.useState)(!0);(0,a.useEffect)((()=>{P?A(!1):(0,$i.wF)((0,Hi.Z)(E||{}),w.map(Hi.Z),n,b)}),[P,n,E,w,b]);const M=Ki(m),{showAboutChat:L,setShowAboutChat:R}=ya(m),{showCancelConfirmation:D,setShowCancelConfirmation:j}=Wi(m),{autoFocus:B,autoFocused:Z}=qi({currentlyPoppedUp:v}),F=(0,a.useCallback)((()=>{k(),B()}),[B,k]);return i().createElement(N,{chatHasStarted:g,active:m,"aria-hidden":m?"false":"true","data-testid":"chat-box","data-cy":"chat-box",offsetHeight:f,fullscreen:d?1:0,"data-story":"ChatBoxContainer"},i().createElement(Li.Z,{errorPoint:"inside ChatBoxContainer"},!u&&i().createElement(sa,{cancelChat:D,setCancelChat:j}),i().createElement(_i,{showAboutChat:L,setShowAboutChat:R,showCancelConfirmation:D,setShowCancelConfirmation:j}),i().createElement(ge,null),p&&h&&i().createElement(zi,null),i().createElement(mo,{setAboutChat:R,hasUnreadMessage:S,onShowLatest:F,shouldAnimate:M,setBottomRef:o,setGroupRef:c,setTopRef:l,setBodyRef:r,scrollToBottom:k,scrollToLatestMessage:_,shouldAutoScroll:C,onUserScroll:T,buttonHandlers:t}),y?i().createElement(Mi,null):i().createElement(aa,{active:m,chatHasStarted:g,onManualFocus:k,isScrolledDown:I,autoFocused:Z,currentlyPoppedUp:v})))}Qi.displayName="KindlyChatBox";const Ji=Qi;var es=n(7058),ts=n(4155);const ns=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),rs=Object.freeze({en:"An agent joined the conversation",nb:"En agent ble med i samtalen",sv:"En agent gick med i samtalet"});let os=!1;function as(e){const t=document.title;let n;n||os||(os=!0,n=setInterval((()=>{document.title=document.title===e?t:e}),1e3),window.addEventListener("mousemove",(function e(){clearInterval(n),document.title=t,n=null,os=!1,window.removeEventListener("mousemove",e)})))}var is=n(9904);var ss=n(2445),ls=n(3868),cs=n(2914),us=n(9428);const ds=e=>({[e]:o().func});o().shape({...(0,cs.Z)(ds,Object.values(b.Dx)),...(0,cs.Z)(ds,Object.values(b.Dx).map(us.Z))});var fs=n(7110),ps=n(7693);const hs=function(e){let{settings:t}=e;const n=(0,s.I0)(),r=(0,a.useRef)(null),{active:o}=(0,s.v9)(x.W$),{open:l,imageUrl:c}=(0,s.v9)(x.hU),{inspectorOpen:u}=(0,s.v9)(x.P8),{chatMessages:d}=(0,s.v9)(x.sY),{takenOver:f}=(0,s.v9)(x.Wt),m=ce(f),w=ce(d),E=localStorage.getItem("kindly-chat-restart-message"),k=(0,ls.Z)(t,"fullscreenMode",!1),_=(0,ls.Z)(t,"zIndex",b.PL),C={...b.qE,...(0,ls.Z)(t,"position",{})},T=document.documentElement;(0,a.useEffect)((()=>{(0,wo.Z)()&&(T.style.overflow=o?"hidden":"unset")}),[o,T]),(0,a.useEffect)((()=>{if(0===(null==w?void 0:w.length)&&1===(null==d?void 0:d.length)&&E){const{message:e,exchangeId:t,newContext:r}=JSON.parse(E);localStorage.removeItem("kindly-chat-restart-message"),n((0,ss.uC)(e,t,r))}}),[n,d,w,E]),(0,a.useEffect)((()=>{m!==f&&f&&(0,ps.Z)()}),[m,f]),function(){const{tabNotification:e,name:t}=(0,s.v9)(x.Q7),{showTabNotification:n}=(0,s.v9)(x.$u),{currentLanguage:r}=(0,s.v9)(x.W$),{takenOver:o}=(0,s.v9)(x.Wt),{agent:i}=(0,s.v9)(x._p),l=ce(o);(0,a.useEffect)((()=>{var o;e&&n&&as((null!==(o=null==ns?void 0:ns[r])&&void 0!==o?o:ns.en)(t||"Kindly"))}),[r,e,n,t]),(0,a.useEffect)((()=>{const e=Boolean(null==i?void 0:i.name);var t;l!==o&&o&&e&&as(null!==(t=null==rs?void 0:rs[r])&&void 0!==t?t:rs.en)}),[o,i,l,r])}(),function(){const e=(0,s.I0)(),{botKey:t}=(0,s.v9)(x.W$),{messageSentTime:n}=(0,s.v9)(x.sY),{persistStateLifespan:r}=(0,s.v9)(x.Q7),{chatMessages:o}=(0,s.v9)(x.sY);(0,a.useEffect)((()=>{if(ts.env.IS_STORYBOOK)return;const a=(0,es.Z)({messageSentTime:n,persistStateLifespan:r});0===r||a||0===o.length||e((0,ue.QQ)(t))}),[t,e,r,n,o])}(),function(){var e;const t=(0,s.I0)(),[n,r]=(0,a.useState)("/"),{currentLanguage:o,active:i}=(0,s.v9)(x.W$),{nudges:l}=(0,s.v9)(x.Q7),{defaultLanguage:c}=(0,Xn.Z)(),u=null!==(e=null==l?void 0:l.textNudges)&&void 0!==e?e:[];(0,a.useEffect)((()=>{r(window.location.href),!i&&o&&(null==u?void 0:u.length)>0&&(null!=u?u:[]).forEach((e=>!(!(0,is.Z)(n,e.url_trigger)||!e.enabled[o])&&t((0,ue.Wg)({nudge:e,languageCode:o}))))}),[i,o,c,t,n,l,u])}(),function(){const e=(0,s.I0)(),{currentLanguage:t,active:n}=(0,s.v9)(x.W$),{maintenanceAlertEnabled:r,maintenanceAlert:o}=(0,s.v9)(x.Q7),{defaultLanguage:i}=(0,Xn.Z)();(0,a.useEffect)((()=>{if(!n||!r)return;const a=((e,t,n)=>Object.entries(e).filter((e=>{let[t]=e;return"alert_enabled"!==t})).reduce(((e,r)=>{let[o,a]=r;return{...e,[o]:(0,si.Z)(a,t,n)}}),{}))(o,t,i);e((0,ue.QU)(a))}),[n,t,e,o,r,i])}(),(()=>{const{takenOver:e,requestedTakeover:t}=(0,s.v9)(x.Wt),n=ce(e),r=ce(t),o=(0,s.I0)();(0,a.useEffect)((()=>{e&&!n?o((0,ue.VM)()):!e&&n&&o((0,ue.vI)()),t&&!r?o((0,ue.dw)()):!t&&r&&o((0,ue.R2)())}),[o,r,n,t,e])})(),function(e){const t=(0,a.useCallback)((t=>{e&&"Tab"===t.key&&e.current.classList.add("using-tab")}),[e]),n=(0,a.useCallback)((()=>{e&&e.current.classList.remove("using-tab")}),[e]);(0,a.useEffect)((()=>(document.body.addEventListener("keyup",t),document.body.addEventListener("mousedown",n),()=>{document.body.removeEventListener("keyup",t),document.body.removeEventListener("mousedown",n)})),[t,n])}(r);const S=(0,a.useCallback)((()=>{n((0,ue.lr)())}),[n]),I=(0,a.useMemo)((()=>function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return{...e,[(0,fs.Z)(n)]:r}}),{})}(t.buttonHandlers)),[t.buttonHandlers]);return i().createElement(p,{id:"chatContainer",ref:r,className:"chat-container",role:"complementary",active:o,zIndex:_,fullscreen:k?1:0,position:C,"data-cy":"chat-box-container","data-story":"ChatContainer"},l&&i().createElement(v,{zIndex:_,onClick:S,autoFocus:!0},i().createElement(g,{zIndex:_,onClick:S,autoFocus:!0},i().createElement(h.Tw,{width:"30",height:"30"})),i().createElement(y,{src:c})),o&&i().createElement(Ji,{buttonHandlers:I,onMessage:t.onMessage}),u&&i().createElement(de,null))}},3542:(e,t,n)=>{"use strict";n.d(t,{Fv:()=>l,jF:()=>c,wF:()=>i});const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.",a=(e,t,n,a)=>{var i,s;if(-1!==r.indexOf(e)&&Boolean(a)&&function(e,t,n){const r=`on${t.charAt(0).toUpperCase()+t.slice(1)}`;if("function"!=typeof e)return void console.warn(`Provided setting '${r}' is not a function.`);console.warn(`kindlyOptions.${r} is deprecated in favor of standard event handlers. ${o}`);const a=Object.values(n);try{e(...a)}catch(e){console.error(e)}}(a,e,t),"API"!==n)return;if(null===(i=window)||void 0===i||null===(s=i.kindlyChat)||void 0===s||!s.APIRoot)return void console.warn("No APIRoot when rendered using kindly-chat API");"message"===e&&window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("onMessage",{detail:t}));const l=`kindly:${e}`;window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent(l,{detail:t,bubbles:!0}))};function i(e,t,n,r){e&&a("message",{newMessage:e,chatLog:t},r,n)}let s=!1;function l(e){!1===s&&(s=!0,a("load",{settings:e},null==e?void 0:e.renderedBy,null==e?void 0:e.onLoad))}const c=(e,t,n,r,a,i,s)=>{let l=!1;const c=null==e?void 0:e[n];if(c){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{l=Boolean(c(t,r,a,i,n))}catch(e){console.error(e)}}return"API"===s&&(l=!window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:r,lastMessage:a,chatLog:i,buttonType:n},bubbles:!0,cancelable:!0}))),l}},7597:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a}),n(5099);var r=n(8156),o=n.n(r);const a=function(e){let{color:t="#FFF",...n}=e;return o().createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("path",{d:"M15.25 10.75L12 14.25L8.75 10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}},6105:(e,t,n)=>{"use strict";n.d(t,{Y4:()=>a,LZ:()=>i,tp:()=>s,kt:()=>l,Tw:()=>c,s$:()=>y,s:()=>b,JJ:()=>v,LA:()=>d,tE:()=>u,FS:()=>x,os:()=>m,xP:()=>w,dO:()=>f,Du:()=>g,jE:()=>p,ew:()=>h});var r=n(8156),o=n.n(r);const a=function(e){return o().createElement("svg",Object.assign({},e,{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M14.25 7.73999L8.75 12.99L14.25 18.24",stroke:"white",strokeWidth:"1.5",strokeLinecap:"square"}))},i=function(e){return o().createElement("svg",Object.assign({},e,{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M9.75 7.73999L15.25 12.99L9.75 18.24",stroke:"white",strokeWidth:"1.5",strokeLinecap:"square"}))},s=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 65 67",xmlns:"https://www.w3.org/2000/svg"}),o().createElement("path",{d:"M64.557 65.487c-4 .482-7.42 1.138-10.86 1.257-5.824.201-11.693.466-17.483-.018-11.677-.976-22.173-4.749-29.675-14.559C-7.841 33.36 2.774 5.123 25.93.64c18.296-3.542 35.275 7.95 38.513 26.317 1.854 10.52-.945 19.876-8.035 27.882l-1.501 1.699 9.65 8.949z",fill:"#0069ff"}))},l=function(e){return o().createElement("svg",Object.assign({"data-name":"Layer 1"},e,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 747 768"}),o().createElement("defs",null,o().createElement("linearGradient",{id:"a",x1:"373.51",x2:"373.51",y2:"768",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{offset:".04",stopColor:"#ff0006"}),o().createElement("stop",{offset:".04",stopColor:"#ff0106"}),o().createElement("stop",{offset:".08",stopColor:"#ff3204"}),o().createElement("stop",{offset:".13",stopColor:"#ff5802"}),o().createElement("stop",{offset:".17",stopColor:"#ff7401"}),o().createElement("stop",{offset:".2",stopColor:"#ff8500"}),o().createElement("stop",{offset:".23",stopColor:"#ff8b00"}),o().createElement("stop",{offset:".28",stopColor:"#fda900"}),o().createElement("stop",{offset:".42",stopColor:"#faec00"}),o().createElement("stop",{offset:".56",stopColor:"#00963e"}),o().createElement("stop",{offset:".75",stopColor:"#314ea6"}),o().createElement("stop",{offset:".94",stopColor:"#991588"}))),o().createElement("path",{d:"M747.2 373.69C747.2 167.31 579.89 0 373.51 0S-.18 167.31-.18 373.69c0 165 107 304.87 255.27 354.41 63.32 25 142.21 39.9 227.77 39.9 89.71 0 172.07-16.36 236.86-43.63l-86.65-82A372.47 372.47 0 00747.2 373.69z",fill:"url(#a)"}))};n(5099);const c=function(e){let{color:t,...n}=e;return o().createElement("svg",Object.assign({},n,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M17.25 6.75L6.75 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M6.75 6.75L17.25 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},u=function(e){let{width:t="16px",height:n="12px",fill:r="rgb(0, 105, 255)"}=e;return o().createElement("svg",{width:t,height:n,viewBox:"0 0 16 12"},o().createElement("path",{d:"M8 12c3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3C14.4 3.1 11.6 0 8 0 4.4 0 1.6 3.1.4 4.9c-.5.7-.5 1.6 0 2.2C1.6 8.9 4.4 12 8 12zm0-9c1.7 0 3 1.3 3 3S9.7 9 8 9 5 7.7 5 6s1.3-3 3-3z",fill:r}))},d=function(e){let{width:t="16px",height:n="16px",fill:r="rgb(0, 105, 255)"}=e;return o().createElement("svg",{width:t,height:n},o().createElement("g",{fill:r},o().createElement("path",{d:"M14.6 5.6l-8.2 8.2c.5.1 1.1.2 1.6.2 3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3-.2-.3-.6-.7-1-1.2zM14.3.3L11.6 3C10.5 2.4 9.3 2 8 2 4.4 2 1.6 5.1.4 6.9c-.5.7-.5 1.6 0 2.2.5.8 1.4 1.8 2.4 2.7L.3 14.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3l14-14c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0zm-9 9C5.1 8.9 5 8.5 5 8c0-1.7 1.3-3 3-3 .5 0 .9.1 1.3.3l-4 4z"})))},f=function(e){let{...t}=e;return o().createElement("svg",Object.assign({},t,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M18.25 12.25L5.75 12.25",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},p=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 30 30",xmlns:"https://www.w3.org/2000/svg"}),o().createElement("path",{d:"M30 0L0 12.927l11.523 3.782 5.531-5.646 2.75 2.34-5.382 5.728L19.02 30z",fill:"#0069FF",fillRule:"evenodd"}))},h=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M5.62117 14.9627L6.72197 15.1351C7.53458 15.2623 8.11491 16.0066 8.05506 16.8451L7.97396 17.9816C7.95034 18.3127 8.12672 18.6244 8.41885 18.7686L9.23303 19.1697C9.52516 19.3139 9.87399 19.2599 10.1126 19.0352L10.9307 18.262C11.5339 17.6917 12.4646 17.6917 13.0685 18.262L13.8866 19.0352C14.1252 19.2608 14.4733 19.3139 14.7662 19.1697L15.5819 18.7678C15.8733 18.6244 16.0489 18.3135 16.0253 17.9833L15.9441 16.8451C15.8843 16.0066 16.4646 15.2623 17.2772 15.1351L18.378 14.9627C18.6985 14.9128 18.9568 14.6671 19.0292 14.3433L19.23 13.4428C19.3025 13.119 19.1741 12.7831 18.9064 12.5962L17.9875 11.9526C17.3095 11.4774 17.1024 10.5495 17.5119 9.82051L18.067 8.83299C18.2284 8.54543 18.2017 8.18538 17.9993 7.92602L17.4363 7.2035C17.2339 6.94413 16.8969 6.83701 16.5867 6.93447L15.5221 7.26794C14.7355 7.51441 13.8969 7.1012 13.5945 6.31908L13.1866 5.26148C13.0669 4.95218 12.7748 4.7492 12.4496 4.75L11.5472 4.75242C11.222 4.75322 10.9307 4.95782 10.8126 5.26793L10.4149 6.31344C10.1157 7.1004 9.27319 7.51683 8.4842 7.26874L7.37553 6.92078C7.0645 6.82251 6.72591 6.93044 6.52355 7.19142L5.96448 7.91474C5.76212 8.17652 5.73771 8.53738 5.90228 8.82493L6.47 9.81487C6.88812 10.5446 6.68339 11.4814 6.00149 11.9591L5.0936 12.5954C4.82588 12.7831 4.69754 13.119 4.76998 13.442L4.97077 14.3425C5.04242 14.6671 5.30069 14.9128 5.62117 14.9627Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M13.5911 10.4089C14.4696 11.2875 14.4696 12.7125 13.5911 13.5911C12.7125 14.4696 11.2875 14.4696 10.4089 13.5911C9.53036 12.7125 9.53036 11.2875 10.4089 10.4089C11.2875 9.53036 12.7125 9.53036 13.5911 10.4089Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},m=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 39 35",xmlns:"https://www.w3.org/2000/svg"}),o().createElement("path",{d:"M21.04 22.88l-4.5-4.4.05-.04c3.09-3.4 5.29-7.3 6.58-11.43h5.2V3.5H15.94V0h-3.54v3.5H0v3.48h19.8a27.56 27.56 0 01-5.62 9.38 27.59 27.59 0 01-4.1-5.86H6.55a30.7 30.7 0 005.28 7.98l-9.01 8.8 2.5 2.47L14.19 21l5.52 5.44 1.34-3.56zM31.02 14h-3.54L19.5 35h3.55l1.99-5.25h8.42l2 5.25H39l-7.98-21zm-4.65 12.25l2.88-7.59 2.88 7.59h-5.76z",fill:"#000",fillRule:"nonzero"}))},g=function(e){return o().createElement("svg",Object.assign({},e,{viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg"}),o().createElement("path",{d:"M8.7.2l.7 6.4 2.1-2.1A5.01 5.01 0 018 13a5.01 5.01 0 01-3.5-8.5c.6-.6 1.4-1.1 2.3-1.3l-.6-1.9C5 1.6 3.9 2.2 3 3.1A7.06 7.06 0 003 13c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L15 .9 8.7.2z",fill:"#0069ff",fillRule:"evenodd"}))},v=function(e){return o().createElement("svg",Object.assign({},e,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M3.16675 4.49998V11.5C3.16675 12.2364 3.7637 12.8333 4.50008 12.8333H11.5001C12.2365 12.8333 12.8334 12.2364 12.8334 11.5V4.49998C12.8334 3.7636 12.2365 3.16665 11.5001 3.16665H4.50008C3.7637 3.16665 3.16675 3.7636 3.16675 4.49998Z",stroke:"white",strokeLinecap:"square"}),o().createElement("path",{d:"M5.16675 8.49999V10.8333H7.50008",stroke:"white",strokeLinecap:"square"}),o().createElement("path",{d:"M10.8333 7.49999V5.16666H8.5",stroke:"white",strokeLinecap:"square"}))},y=function(){return o().createElement(o().Fragment,null,o().createElement("title",null,"Easter bunny - Ear back"),o().createElement("path",{d:"M3.383832 27.44434c-.5696765 0-1.0926451-.3662715-1.2678229-.9298759C-.097824 19.4159224-.5597867 7.1662958 2.1847886 2.6020193 2.8946153 1.4219446 3.8016913.717756 4.8787494.5088278 5.1006483.4662629 5.3264406.44434 5.5561263.44434c5.5241917 0 12.1254407 13.2736523 13.7098937 21.8811524.127168.686122-.307554 1.3528962-.990127 1.5192729L3.7017511 27.4056447c-.1051093.0270867-.2128098.0386953-.3179191.0386953z",fill:"#D8AB31",fillRule:"nonzero"}))},b=function(){return o().createElement(o().Fragment,null,o().createElement("title",null,"Easter bunny - Ear"),o().createElement("g",{fillRule:"nonzero",fill:"none"},o().createElement("path",{d:"M.52124097 23.12346c1.1077-2.9952571 2.4707-5.8635571 3.89508572-8.1808C8.23468383 8.72614571 17.4631981.05566 23.8178267.05566c1.0630571 0 2.0228857.23577143 2.8529571.70172857 1.3881143.78125714 2.3381715 2.17075714 2.8236572 4.12945714C31.0973981 11.3502886 27.3599553 22.6421457 23.9768695 27.89326c-1.8024571 2.7943571-4.3457 5.7854286-7.0703142 8.3286857C18.4230124 39.9496314-2.68050189 22.5919314.52124097 23.12346z",fill:"#FFCA3A"}),o().createElement("path",{d:"M5.88116954 25.1058886c.97795715-2.6437 2.1861-5.1911286 3.40262857-7.1707572C13.050541 11.8037171 21.1239267 4.75293143 23.788541 5.76996c2.0824285 1.37882857-1.6322572 14.3987143-4.6149572 19.0290143-1.536 2.3800286-3.7834857 5.0223143-6.1663 7.2461-.7651143-1.1467572-1.8275714-2.5236714-3.26729997-3.9141429-1.37687143-1.3297-2.72652857-2.3123285-3.85881429-3.0250428z",fill:"#ED69AB"})))},x=function(){return o().createElement(o().Fragment,null,o().createElement("title",null,"Easter bunny - eyes and nose"),o().createElement("g",{fill:"#444",fillRule:"nonzero"},o().createElement("path",{d:"M.90472674 8.99584399c2.74085003.33653407 4.68991811 2.83122741 4.35338405 5.57207751-.14122056 1.1501491-.66582961 2.1538328-1.42827251 2.9096051l.02155026-.033559c-.29718086.4016151-.44174483.6949895-.43369189.8801234.00805293.1851339.06770527.4164406.17895702.69392l.22780297.4902169c.71471582 1.4864853 1.36458452 2.3467141 1.904725 2.5661605.52176099.2119794 1.11876984-.367668 1.73951555-2.002382l.16243825-.4505538c.08961326-.2611974.37400147-.4002938.63519886-.3106806.26119739.0896133.40029381.3740015.31068055.6351989-.84494502 2.4627766-1.8976385 3.5938393-3.22423148 3.0548755-1.04273744-.4236399-2.26408063-2.33244-3.34632177-5.0376669l-.22156463-.7730561C.89682689 14.6373453.55365859 11.8550647.90472674 8.99584399zM22.9999996 10c-2.7571667 0-5-2.24283333-5-5s2.2428333-5 5-5 5 2.24283333 5 5-2.2428333 5-5 5z"})))},w=function(e){return o().createElement("svg",Object.assign({},e,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),o().createElement("path",{d:"M11.1667 8.83333L12.0001 8C13.1047 6.89539 13.1047 5.10456 12.0001 3.99999C10.8955 2.89543 9.10468 2.89543 8.00008 3.99999L7.16675 4.83333",stroke:"white",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M4.83315 7.16666L3.99981 8C2.89525 9.1046 2.89525 10.8954 3.99981 12C5.10438 13.1046 6.89521 13.1046 7.99981 12L8.83315 11.1667",stroke:"white",strokeLinecap:"square",strokeLinejoin:"round"}),o().createElement("path",{d:"M9.5 6.5L6.5 9.5",stroke:"white",strokeLinecap:"square",strokeLinejoin:"round"}))}},2623:(e,t,n)=>{"use strict";n.d(t,{T:()=>s,Z:()=>c}),n(5099);var r=n(8156),o=n.n(r),a=n(3242),i=n(7818);function s(e){let{loading:t,color:n,flat:r}=e;return o().createElement(i.Lw,{flat:r,$color:n,$loading:t},o().createElement(i.TF,null),o().createElement(i.TF,null),o().createElement(i.TF,null))}s.defaultProps={color:!1,loading:!1};const l=o().forwardRef(((e,t)=>{let{href:n,target:r,children:a,icon:l,text:c,loading:u,color:d,type:f,onClick:p,cy:h,...m}=e;const g=e=>{u?e.preventDefault(e):p(e)};return n?o().createElement(i.lM,Object.assign({ref:t,href:n,target:r,$color:d,onClick:g,$loading:u},m),u?o().createElement(s,{flat:m.flat,color:d,loading:u}):o().createElement(o().Fragment,null,a||c,l)):o().createElement(i.qO,Object.assign({ref:t,onClick:g,$color:d,type:f,$loading:u,"data-cy":h},m),u?o().createElement(s,{flat:m.flat,color:d,loading:u}):o().createElement(o().Fragment,null,a||c,l))}));l.defaultProps={type:"button",tabIndex:0,color:!1,selected:!1,loading:!1,flat:!1,disabled:!1,onClick:a.Z,className:null,truncateText:!1,icon:null,href:null,target:null},l.displayName="Button";const c=l},7818:(e,t,n)=>{"use strict";n.d(t,{Lw:()=>c,TF:()=>u,lM:()=>m,qO:()=>h,uM:()=>f});var r=n(5669),o=n(540),a=n(8426),i=n(3497),s=n(7212),l=n(9729);const c=o.ZP.div.withConfig({displayName:"styles__LoadingIndicatorContainer",componentId:"sc-xokaop-0"})(["display:flex;align-items:center;justify-content:center;border-radius:100px;transition:all cubic-bezier(0.61,0.1,0.42,0.9) 150ms;min-height:18px;background-color:transparent;"]),u=o.ZP.span.withConfig({displayName:"styles__LoadingIndicator",componentId:"sc-xokaop-1"})(["width:6px;height:6px;opacity:0;border-radius:50%;background:",";background-color:",";&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){margin:0 5px;animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],(e=>e.theme.buttonText),(e=>e.theme.buttonText),a.lt,a.lt,a.lt),d=(0,o.iv)(["transition:all 0.2s ease;box-shadow:0 0 0 1px "," inset;background-color:",";"],(e=>{var t;let{$color:n,theme:o}=e;return(0,r._j)(.08,n&&null!==(t=o.buttonBackground)&&void 0!==t?t:"#fff")}),(e=>{var t;let{$color:n,theme:o}=e;return(0,r._j)(.18,n&&null!==(t=o.buttonBackground)&&void 0!==t?t:"#fff")})),f=(0,o.iv)(["position:relative;border-radius:6px;font-weight:normal;",";display:flex;box-shadow:0 1px 4px 0px ",";justify-content:center;align-items:center;color:",";background-color:",";"," transition:all 0.2s ease;:hover{transition:all 0.2s ease;box-shadow:0 0 0 2px "," inset;background-color:",";}:focus{transition:all 0.2s ease;box-shadow:0 0 0 1px "," inset;background-color:",";}:active{","}"],(e=>e.$loading?"opacity: 0.6":"opacity: 1"),(0,r._j)(.2,"#fff"),(e=>{var t;let{theme:n,$color:r}=e;return r&&null!==(t=n.buttonText)&&void 0!==t?t:l.eR.textColor}),(e=>{var t;let{theme:n,$color:r}=e;return r&&null!==(t=n.buttonBackground)&&void 0!==t?t:"#fff"}),(e=>e.selected&&d),(e=>{var t;let{$color:n,theme:o}=e;return(0,r._j)(.2,n&&null!==(t=o.buttonBackground)&&void 0!==t?t:"#fff")}),(e=>{var t;let{$color:n,theme:o}=e;return(0,r._j)(.08,n&&null!==(t=o.buttonBackground)&&void 0!==t?t:"#fff")}),(e=>{var t;let{$color:n,theme:o}=e;return(0,r._j)(.08,n&&null!==(t=o.buttonBackground)&&void 0!==t?t:"#fff")}),(e=>{var t;let{$color:n,theme:o}=e;return(0,r._j)(.08,n&&null!==(t=o.buttonBackground)&&void 0!==t?t:"#fff")}),d),p=(0,o.iv)(["",";padding:8px 12px;font-size:",";"," font-family:",";& > svg{margin-left:6px;}"],f,l.JB.fontSizeP,(e=>{let{truncateText:t}=e;return t&&"overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;"}),(e=>{let{theme:t}=e;return t.customFont?t.customFont:i.I.default})),h=(0,o.ZP)(s.zx).withConfig({displayName:"styles__ButtonContainer",componentId:"sc-xokaop-2"})(["",""],p),m=o.ZP.a.withConfig({displayName:"styles__AContainer",componentId:"sc-xokaop-3"})([""," "," text-decoration:none;"],s.uf,p)},8974:(e,t,n)=>{"use strict";n.d(t,{Ov:()=>h,WO:()=>f,bw:()=>m,gM:()=>c,lb:()=>d,pj:()=>u});var r=n(540),o=n(7599),a=n(7212),i=n(9729),s=n(2988);const l=r.ZP.div.withConfig({displayName:"styles__Heading",componentId:"sc-155a8qj-0"})(["display:flex;align-items:center;"]),c=(0,r.ZP)(l).withConfig({displayName:"styles__HeaderContainer",componentId:"sc-155a8qj-1"})(["height:56px;min-height:56px;text-align:left;padding:12px 14px 12px 12px;align-items:center;color:#fff;min-width:100%;z-index:",";justify-content:space-between;background:",";background-color:",";box-shadow:0 3px 4px -1px ",";"],i.sQ.headerIndex,(e=>e.theme.headerBackground),(e=>e.theme.headerBackground),i.O9.shadowColor),u=(0,r.ZP)(l).withConfig({displayName:"styles__HeadingLeft",componentId:"sc-155a8qj-2"})(["overflow:hidden;gap:8px;"]),d=(0,r.ZP)(l).withConfig({displayName:"styles__HeadingRight",componentId:"sc-155a8qj-3"})(["align-items:center;gap:12px;"]),f=(0,r.ZP)(o.H2).withConfig({displayName:"styles__BotName",componentId:"sc-155a8qj-4"})(["margin:0;margin-right:8px;text-transform:none;letter-spacing:normal;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:1.3;color:",";font-size:16px;flex:1;"],(e=>e.theme.headerText)),p=(e,t)=>`\n background: ${(0,s.R)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n background-color: ${(0,s.R)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n`,h=(0,r.ZP)(a.zx).withConfig({displayName:"styles__HeaderButton",componentId:"sc-155a8qj-5"})(["height:28px;width:28px;display:flex;align-items:center;justify-content:center;font-size:",";padding:0;"," svg{path{stroke:",";}}:hover{","}:active{","}"],i.JB.fontSizeH4,(e=>{let{theme:t}=e;return p(t,"0.08")}),(e=>{let{theme:t}=e;return t.headerText}),(e=>{let{theme:t}=e;return p(t,"0.12")}),(e=>{let{theme:t}=e;return p(t,"0.16")})),m=r.ZP.div.withConfig({displayName:"styles__StyledAvatar",componentId:"sc-155a8qj-6"})(["border-radius:6px;display:inline-block;width:32px;height:32px;background-image:url(",");background-size:contain;background-repeat:no-repeat;background-position:center;"],(e=>e.avatar))},1206:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k}),n(5099);var r=n(8156),o=n.n(r),a=n(7703),i=(n(172),n(6221)),s=n(6105),l=n(2623),c=n(8974),u=n(540),d=n(9729);const f=(0,u.iv)(["border-radius:100px;background-color:",";"],d.O9.grayColor),p=u.ZP.div.withConfig({displayName:"styles__ErrorContent",componentId:"sc-1lhoync-0"})(["height:100%;width:100%;display:grid;background-color:#fff;grid-template-rows:55px 1fr 70px;"]),h=u.ZP.div.withConfig({displayName:"styles__ErrorHeader",componentId:"sc-1lhoync-1"})(["padding:10px 20px;display:grid;align-items:center;grid-template-columns:30px 1fr 40px;box-shadow:0px 3px 4px -1px ",";"],d.O9.shadowColor),m=u.ZP.div.withConfig({displayName:"styles__ErrorName",componentId:"sc-1lhoync-2"})(["height:20px;width:110px;margin-left:20px;",""],f),g=u.ZP.div.withConfig({displayName:"styles__ErrorContainer",componentId:"sc-1lhoync-3"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:210px;margin:auto;"]),v=u.ZP.span.withConfig({displayName:"styles__ErrorText",componentId:"sc-1lhoync-4"})(["font-size:14px;margin:16px 0 24px 0;",";"],(e=>e.heading&&"font-size: 19px; font-weight: 400; \n margin: 0")),y=u.ZP.div.withConfig({displayName:"styles__ErrorCircle",componentId:"sc-1lhoync-5"})(["height:","px;min-width:","px;",""],(e=>e.size),(e=>e.size),f),b=u.ZP.div.withConfig({displayName:"styles__ErrorComposer",componentId:"sc-1lhoync-6"})(["display:flex;align-items:center;padding:15px 0;margin:0 20px;border-top:1px solid ",";"],d.O9.grayColor),x=u.ZP.div.withConfig({displayName:"styles__ErrorInput",componentId:"sc-1lhoync-7"})(["height:40px;width:100%;margin-right:20px;",""],f),w=function(){const e=(0,a.I0)(),t=(0,r.useCallback)((()=>{e((0,i.TM)())}),[e]);return o().createElement(p,null,o().createElement(h,null,o().createElement(y,{size:30}),o().createElement(m,null),o().createElement(c.Ov,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:t,"data-cy":"close-chat-button"},o().createElement(s.Tw,{width:25,height:25}))),o().createElement(g,null,o().createElement(v,{heading:!0},"Oh no..."),o().createElement(v,null,"We were unable to load the chat. Please refresh or try again later."),o().createElement(l.Z,{onClick:t,color:!0},"Refresh chat")),o().createElement(b,null,o().createElement(x,null),o().createElement(y,{size:40})))};class E extends r.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return e?{hasError:!0}:{}}componentDidCatch(e,t){var n;const{dispatch:r,errorPoint:o}=this.props,a=`Component tree crashed ${o}: ${e.message}`,s={errorName:e.name,errorMessage:e.message,errorStack:e.stack,point:o,componentStack:null==t||null===(n=t.componentStack)||void 0===n?void 0:n.trim()};r((0,i.cM)({message:a,error:e,extra:s,level:"error"}))}render(){const{hasError:e}=this.state,{children:t,displayError:n}=this.props;return e&&n?o().createElement(w,null):e?null:t}}E.defaultProps={displayError:!0};const k=(0,a.$j)()(E)},8543:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s}),n(5099);var r=n(8156),o=n.n(r),a=n(1468),i=n(7912);const s=function(e){let{name:t,label:n,register:r,id:s,...l}=e;return o().createElement(i.tp,{htmlFor:s||t&&`${a._f.CHECKBOX}_${t}`},o().createElement(i.sS,Object.assign({name:t,type:a._f.CHECKBOX,id:s||t&&`${a._f.CHECKBOX}_${t}`},r&&{...r(t)},l)),o().createElement(i.P2,null,o().createElement(i.PD,{viewBox:"0 0 24 24"},o().createElement("polyline",{points:"20 6 9 17 4 12"}))),n&&o().createElement(i.ke,null,n))}},5791:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c}),n(5099);var r=n(8156),o=n.n(r),a=n(7536),i=n(7725),s=n(8543),l=n(7912);const c=function(e){let{name:t,control:n,list:c,validators:u,formId:d,register:f,setError:p,clearErrors:h}=e;const m=(0,a.qo)({control:n,name:c.map((e=>e.slug))}),g=(0,a.cl)({control:n,name:c.map((e=>e.slug))});return(0,r.useEffect)((()=>{if(u)for(let e=0;e<u.length;e+=1)Object.keys(u[e]).forEach((n=>{var r;"texts"!==n&&n&&(m.some((e=>!!e))?h(t):p(t,{type:n,message:g.isDirty||g.isSubmitted?null===(r=u[e].texts)||void 0===r?void 0:r.text:""}))}))}),[m,u,p,h,d,c,t,g]),o().createElement(o().Fragment,null,c.map((e=>{var t;return o().createElement(l.ZL,{key:`${e.slug}_${e.order}`},o().createElement(s.Z,{register:f,value:e.value,label:null===(t=e.texts)||void 0===t?void 0:t.label,name:e.slug}))})).sort((e=>e.order)),o().createElement(i.Z,{name:t,control:n}))}},7912:(e,t,n)=>{"use strict";n.d(t,{P2:()=>l,PD:()=>s,ZL:()=>d,ke:()=>u,sS:()=>c,tp:()=>i});var r=n(540),o=n(9729),a=n(2988);const i=r.ZP.label.withConfig({displayName:"styles__CheckboxContainer",componentId:"sc-1ot9z69-0"})(["cursor:pointer;display:flex;justify-content:center;align-items:center;"]),s=r.ZP.svg.withConfig({displayName:"styles__CheckboxIcon",componentId:"sc-1ot9z69-1"})(["fill:none;stroke:white;stroke-width:2px;"]),l=r.ZP.div.withConfig({displayName:"styles__StyledCheckbox",componentId:"sc-1ot9z69-2"})(["display:inline-block;width:16px;height:16px;border-radius:3px;background:",";",";","{visibility:hidden;}left:0;position:absolute;"],(e=>{let{theme:{buttonBackground:t}}=e;return t}),(e=>{let{theme:{buttonBackground:t}}=e;return(0,a.u)(t)?"filter: brightness(0.7);":"filter: opacity(0.3);"}),s),c=r.ZP.input.attrs({type:"checkbox"}).withConfig({displayName:"styles__HiddenCheckbox",componentId:"sc-1ot9z69-3"})(["height:16px;width:16px;opacity:0;margin:0;left:0;position:absolute;&:checked ~ ","{background:",";filter:opacity(1);","{visibility:visible;}animation:"," 150ms ease;}"],l,(e=>{let{theme:{buttonBackground:t}}=e;return t}),s,(e=>{let{theme:{buttonBackground:t}}=e;return(e=>(0,r.F4)(["50%{box-shadow:0 0 0 3px ",";}"],e))(t)})),u=r.ZP.div.withConfig({displayName:"styles__CheckboxLabel",componentId:"sc-1ot9z69-4"})(["font-size:",";font-weight:400;margin:0 28px;"],o.JB.fontSizeP),d=r.ZP.div.withConfig({displayName:"styles__CheckboxWrapper",componentId:"sc-1ot9z69-5"})(["margin-top:12px;display:flex;flex-direction:row;"])},9122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y}),n(5099);var r=n(8156),o=n.n(r),a=n(8309),i=n(540);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace("#","");return 3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`),t>1&&t<=100&&(t/=100),`rgba(${parseInt(n.substring(0,2),16)},${parseInt(n.substring(2,4),16)},${parseInt(n.substring(4,6),16)},${t})`},l=i.ZP.div.withConfig({displayName:"styles__SliderWrapper",componentId:"sc-1isvbdy-0"})(["margin:6px 0;display:flex;flex-direction:column;position:relative;padding:12px 12px 16px 12px;width:100%;border-radius:6px;border:",";"],(e=>{let{theme:t}=e;return`1px solid ${t.botMessageBackground}`})),c=i.ZP.div.withConfig({displayName:"styles__SliderAffix",componentId:"sc-1isvbdy-1"})(["padding:0px 8px 0px 0px;font-size:14px;"]),u=i.ZP.div.withConfig({displayName:"styles__SliderInfoContainer",componentId:"sc-1isvbdy-2"})(["position:relative;flex:1;display:flex;align-items:center;flex-direction:row;margin-bottom:12px;"]),d=i.ZP.span.withConfig({displayName:"styles__SliderInfo",componentId:"sc-1isvbdy-3"})(["display:flex;padding:4px;align-items:center;justify-content:center;font-size:14px;"]),f=i.ZP.div.withConfig({displayName:"styles__SliderContainer",componentId:"sc-1isvbdy-4"})(["position:relative;display:flex;flex:1;"]),p=(0,i.iv)(["height:20px;width:20px;border-radius:50%;background:",";cursor:pointer;appearance:none;margin-top:-8px;border:1px solid ",";"],(e=>{let{theme:t}=e;return t.buttonBackground}),(e=>{let{theme:t}=e;return t.buttonText})),h=(e,t,n)=>(e-n)/(t-n)*100,m=i.ZP.input.attrs((e=>{let{theme:t,value:n,max:r,min:o}=e;return{style:{background:`linear-gradient(to right, ${t.buttonBackground} 0%, ${t.buttonBackground} ${h(n,r,o)}%, ${s(t.buttonBackground,.4)} ${h(n,r,o)}%, ${s(t.buttonBackground,.4)} 100%)`}}})).withConfig({displayName:"styles__Slider",componentId:"sc-1isvbdy-5"})(["cursor:pointer;&[type='range']{appearance:none;width:100%;border-radius:25px;height:6px;&::-webkit-slider-thumb{","}&::-moz-range-thumb{","}&::-webkit-slider-runnable-track{width:100%;height:6px;cursor:pointer;border-radius:25px;}}"],p,p),g=(e,t,n)=>t<e?e+n:t;function v(e){let{from:t,to:n,value:i,affix:s,affixValue:p,step:h=1,onChange:v,name:y,field:b,ariaLabel:x,validators:w}=e;const E=(0,r.useMemo)((()=>{var e;const n=parseFloat(t);return Number.isNaN(n)?null==w||null===(e=w.find((e=>void 0!==e.min&&null!==e.min)))||void 0===e?void 0:e.min:n}),[t,w]),k=(0,r.useMemo)((()=>{var e;const t=parseFloat(n);return Number.isNaN(t)?null==w||null===(e=w.find((e=>void 0!==e.max&&null!==e.max)))||void 0===e?void 0:e.max:t}),[n,w]),[_,C]=(0,r.useState)(g(h,i,E));return o().createElement(l,null,o().createElement(u,null,s===a.ff.PREFIX&&o().createElement(c,null,p),o().createElement(d,null,_),s===a.ff.SUFFIX&&o().createElement(c,null,p)),o().createElement(f,null,o().createElement(m,{type:"range",name:y,step:h,min:E,max:k,value:_,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(v&&v(e.target.value),null!=b&&b.onChange&&b.onChange(e),C(e.target.value))},"aria-label":x})))}v.defaultProps={value:1};const y=v},7813:(e,t,n)=>{"use strict";n.d(t,{XZ:()=>r.Z,sf:()=>b.Z,II:()=>v,Ph:()=>C,iR:()=>y.Z});var r=n(8543),o=(n(5099),n(8156)),a=n.n(o),i=n(7536),s=n(540),l=n(9729);const c=s.ZP.div.withConfig({displayName:"styles__MaxLengthWrapper",componentId:"sc-bl0zra-0"})(["position:absolute;top:50%;transform:translateY(-50%);right:8px;font-size:",";color:",";"],l.JB.fontSize12,l.eR.textColorLight),u=function(e){let{fieldName:t,maxLength:n,control:r}=e;const o=(0,i.qo)({control:r,name:t});return a().createElement(c,null,`${o.length}/${n}`)};var d=n(7725),f=n(6393),p=n(3696);const h=s.ZP.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-1cahfhf-0"})(["position:relative;display:flex;"]),m=s.ZP.div.withConfig({displayName:"styles__Adornment",componentId:"sc-1cahfhf-1"})(["padding:0 4px;position:absolute;top:50%;transform:translateY(-50%);font-size:14px;display:"," ",";"],(e=>{let{show:t}=e;return t?"block;":"none;"}),(e=>{let{adornmentPosition:t}=e;return"start"===t?"\n left: 10px;\n ":"\n left: auto;\n right: 10px;\n "})),g=s.ZP.input.withConfig({displayName:"styles__Input",componentId:"sc-1cahfhf-2"})(["background-color:",";color:",";padding:10px 16px;"," border-radius:18px;border:1px solid transparent;outline:none;flex:1;&::placeholder{opacity:0.42;}&:invalid{border:1px solid ",";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}"],(e=>{let{theme:t}=e;return t.inputBackground}),(e=>{let{theme:t}=e;return t.inputText}),(e=>{let{adornmentWidth:t,adornmentPosition:n,hasMaxLength:r}=e;if("end"===n&&!r&&t)return`padding-right: ${t+10}px;`;if("start"===n&&t){let e=`padding-left: ${t+10}px;`;return r&&(e+="padding-right: 48px;"),e}return r?"padding-right: 56px;":void 0}),l.O9.errorColor),v=function(e){var t,n,r,i,s;let{autoComplete:l="off",name:c,type:v="text",register:y,validators:b,control:x,id:w,setError:E,clearErrors:k,trigger:_,adornment:C,adornmentPosition:T,...S}=e;const I=(0,p.X0)(b),O=(0,o.useRef)(null),P=(0,o.useRef)(null),{ref:A,...N}=y?y(c,I):{},[,M]=(0,o.useState)(!1);return a().createElement(a().Fragment,null,a().createElement(h,null,C&&a().createElement(m,{ref:e=>{O.current=e,M(!0)},show:!(null!==(t=I.maxLength)&&void 0!==t&&t.value&&"end"===T),adornmentPosition:T},C),a().createElement(g,Object.assign({autoComplete:l,name:c,type:v,adornmentPosition:T,adornmentWidth:null===(n=O.current)||void 0===n?void 0:n.clientWidth,hasMaxLength:!(null===(r=I.maxLength)||void 0===r||!r.value),id:w||c},(0,p.B6)(I),N&&{...N},{ref:e=>{P.current=e,A&&A(e)}},"NUMBER"===v&&f.e,S)),!(null===(i=I.maxLength)||void 0===i||!i.value)&&x&&c&&a().createElement(u,{fieldName:c,control:x,maxLength:null===(s=I.maxLength)||void 0===s?void 0:s.value})),a().createElement(d.Z,{inputRef:P,trigger:_,control:x,name:c,setError:E,clearErrors:k}))};var y=n(9122),b=n(5791),x=n(7597),w=n(2988);const E=s.ZP.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-mikydd-0"})(["position:relative;display:flex;"]),k=s.ZP.select.withConfig({displayName:"styles__Select",componentId:"sc-mikydd-1"})(["background-color:",";color:",";padding:9px 16px;border-radius:18px;border:1px solid transparent;outline:none;flex:1;display:inline-block;appearance:none;text-indent:1px;text-overflow:'';&:invalid{border:1px solid ",";}"],(e=>{let{theme:t}=e;return t.inputBackground}),(e=>{let{theme:t,isPlaceholder:n}=e;return n?(0,w.R)(t.inputBackground,"rgba(255, 255, 255, 0.46)","rgba(0, 0, 0, 0.46)"):t.inputText}),l.O9.errorColor),_=(s.ZP.option.withConfig({displayName:"styles__SelectOption",componentId:"sc-mikydd-2"})([""]),s.ZP.div.withConfig({displayName:"styles__SelectIcon",componentId:"sc-mikydd-3"})(["position:absolute;right:20px;top:6px;width:10px;height:6px;pointer-events:none;user-select:none;"])),C=function(e){let{name:t,register:n,validators:r,control:s,id:l,setError:c,clearErrors:u,trigger:f,options:h,...m}=e;const g=(0,p.X0)(r),v=(0,o.useRef)(null),{ref:y,...b}=n?n(t,g):{},w=(0,i.qo)({name:t,control:s});return a().createElement(a().Fragment,null,a().createElement(E,null,a().createElement(k,Object.assign({name:t,type:"select",isPlaceholder:""===w,id:l||t},(0,p.B6)(g),b&&{...b},{ref:e=>{v.current=e,y&&y(e)}},m),m.placeholder&&a().createElement("option",{value:"",disabled:!0,hidden:!0},m.placeholder),null==h?void 0:h.map(((e,n)=>a().createElement("option",{key:`select-${t}-${e.id||n}`,value:e.value},e.label)))),a().createElement(_,null,a().createElement(x.Z,{color:"#445265"}))),a().createElement(d.Z,{inputRef:v,trigger:f,control:s,name:t,setError:c,clearErrors:u}))}},7672:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y}),n(5099);var r=n(8156),o=n.n(r);const a=e=>(0,r.isValidElement)(e)&&(e=>(0,r.isValidElement)(e)&&Boolean(e.props.children))(e)&&r.Children.toArray(e.props.children).reduce(((e,t)=>e||(0,r.isValidElement)(t)),!1),i=(e,t)=>r.Children.toArray(e).map(((e,n,o)=>(0,r.isValidElement)(e)&&a(e)?t((0,r.cloneElement)(e,{...e.props,children:i(e.props.children,t)})):t(e,n,o))),s=i;var l=n(7536),c=n(7703);function u(e){let{width:t,height:n,color:r}=e;return o().createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},o().createElement("path",{d:"m10.75 8.75 3.5 3.25-3.5 3.25",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}u.defaultProps={width:24,height:24,color:"#333"};const d=u;var f=n(2623),p=n(6086),h=n(7783),m=n(4280),g=n(3696);const v=(e,t)=>o().cloneElement(e,t),y=function(e){let{defaultValues:t,children:n,onSubmit:r,shouldUnregister:a,clearOnSubmit:i=!1,className:u,sendButtonTitle:y="Submit",cancelButtonTitle:b="Cancel",ariaLabel:x,onCancel:w}=e;const{register:E,handleSubmit:k,getValues:_,reset:C,control:T,setError:S,trigger:I,clearErrors:O,formState:{isSubmitting:P,isSubmitted:A}}=(0,l.cI)({...t&&{defaultValues:t},...a&&{shouldUnregister:!0},mode:"onSubmit",reValidateMode:"onBlur"}),{currentLanguage:N}=(0,c.v9)(p.W$);return o().createElement(m.l0,{onSubmit:k((async e=>{if(void 0!==Object.values(e).find((e=>!!e)))try{await r(e),i&&C()}catch(e){throw C(),e}})),"aria-label":x,isSubmitted:A,className:u,noValidate:!0},s(n,(e=>e?(e=>{var t,n,r,a,i,s;return null!=e&&null!==(t=e.props)&&void 0!==t&&t.name?e.props.controller?o().createElement(l.Qr,Object.assign({key:e.key,control:T,render:t=>v(e,{...e.props,...t}),rules:(0,g.X0)(e.props.validators,N)},e.props)):v(e,{register:E,setError:S,clearErrors:O,trigger:I,control:T}):(null==e||null===(n=e.type)||void 0===n?void 0:n.name)===h.Z.name?v(e,{placeholder:null===(r=e.props)||void 0===r||null===(a=r.children)||void 0===a||null===(i=a[0].props)||void 0===i?void 0:i.placeholder_text,...!(null!==(s=e.props)&&void 0!==s&&s.htmlFor)&&{htmlFor:e.props.slug}}):e})(e):null)),o().createElement(m.sZ,null,o().createElement(f.Z,{disabled:P,onClick:()=>{const e=_();w(e)},text:b}),o().createElement(f.Z,{type:"submit",icon:o().createElement(d,{color:"#fff",width:16,height:16}),loading:P,text:y,color:!0})))}},7725:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u}),n(5099);var r=n(8156),o=n.n(r),a=n(7536);var i=n(9729);function s(e){let{width:t,height:n,color:r}=e;return o().createElement("svg",{width:n,height:t,viewBox:"0 0 24 24",fill:"none"},o().createElement("path",{d:"M4.952 16.354l5.263-10.497c.738-1.472 2.839-1.472 3.576 0l5.258 10.497a2 2 0 01-1.788 2.896H6.741a2 2 0 01-1.789-2.896z",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M12 10v2",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M12.5 16a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r}))}s.defaultProps={width:24,height:24,color:"#333"};const l=s,c=n(540).ZP.div.withConfig({displayName:"style__FormError",componentId:"sc-13lpm2f-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;font-size:12px;margin-top:4px;right:0;left:auto;color:",";max-height:",";opacity:",";transition:max-height 1s ease,opacity 240ms ease ",";"],i.O9.errorColor,(e=>{let{show:t}=e;return t?"120px":"0px"}),(e=>{let{show:t}=e;return t?1:0}),(e=>{let{show:t}=e;return t?"480ms":0})),u=function(e){var t,n,s;let{name:u,control:d,inputRef:f,setError:p,clearErrors:h,trigger:m}=e;const{errors:g,isSubmitted:v}=(0,a.cl)({name:u,control:d});!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const o=(0,r.useRef)();(0,r.useEffect)((()=>{o.current=t}),[t]),(0,r.useEffect)((()=>{if(!n||!n.addEventListener)return()=>{};const t=async e=>{await o.current(e)};return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}("input",(e=>{var t;null!==(t=e.target)&&void 0!==t&&t.validationMessage&&!g[u]&&p?p(`browser_error_${u}`,{type:"browser_error",message:e.target.validationMessage},{shouldFocus:!0}):h&&h(`browser_error_${u}`),v&&m&&m(u)}),f.current);const y=(null===(t=g[u])||void 0===t?void 0:t.message)||(null===(n=g[`browser_error_${u}`])||void 0===n?void 0:n.message)||(null===(s=f.current)||void 0===s?void 0:s.validationMessage);return o().createElement(c,{show:y&&v},o().createElement(l,{width:16,height:16,color:i.O9.errorColor}),y)}},7783:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h}),n(5099);var r=n(8156),o=n.n(r),a=n(7536),i=n(7813);const s=[i.II.name,i.XZ.name,i.iR.name,a.Qr.name,i.sf.name,i.Ph.name];var l=n(540),c=n(9729);const u=l.ZP.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-1cfm2l6-0"})(["display:flex;flex-direction:column;margin-top:16px;position:relative;&.no-margin{margin:0;}"]),d=l.ZP.label.withConfig({displayName:"styles__Label",componentId:"sc-1cfm2l6-1"})(["font-size:",";margin:4px 0;font-weight:500;"],c.JB.fontSize12),f=l.ZP.div.withConfig({displayName:"styles__HelpText",componentId:"sc-1cfm2l6-2"})(["font-weight:400;line-height:16px;margin-top:4px;font-size:",";color:",";"],c.JB.fontSize12,c.eR.textColorLight);function p(e){var t;let{className:n,children:r,label:a,htmlFor:i,helperText:l,required:c}=e;return(null==r||!r.length||r.length>1)&&console.error(`InputWrapper is expecting one child node. Received ${r.length}`),null!=s&&s.includes(null===(t=r[0].type)||void 0===t?void 0:t.name)||console.error(`InputWrapper child can only be one of the following: ${s.join(", ")}`),o().createElement(u,{className:n},a&&o().createElement(d,{htmlFor:i},a,c?o().createElement(o().Fragment,null,"*"):""),r,l&&o().createElement(f,null,l))}p.defaultProps={label:null,htmlFor:null,helperText:null,required:!1};const h=p},4280:(e,t,n)=>{"use strict";n.d(t,{l0:()=>i,n5:()=>a,sZ:()=>l,vw:()=>s});var r=n(540),o=n(9729);const a=r.ZP.div.withConfig({displayName:"styles__FormWrapper",componentId:"sc-147n8gc-0"})(["padding:12px;box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);border-radius:6px;margin:3px 0 2px;"]),i=r.ZP.form.withConfig({displayName:"styles__Form",componentId:"sc-147n8gc-1"})(["display:flex;flex-direction:column;flex:1;",""],(e=>{let{isSubmitted:t}=e;return t?`*:invalid {\n border: 1px solid ${o.O9.errorColor};\n }`:"*:invalid {\n border: 1px solid transparent;\n }"})),s=r.ZP.div.withConfig({displayName:"styles__FormTitle",componentId:"sc-147n8gc-2"})(["font-size:",";font-weight:500;display:flex;align-items:center;& > svg{margin-right:4px;}"],o.JB.fontSizeP),l=r.ZP.div.withConfig({displayName:"styles__FormActionsWrapper",componentId:"sc-147n8gc-3"})(["display:flex;flex-direction:row;align-self:flex-end;justify-content:flex-end;margin-top:36px;& > button{&:last-child{margin-left:12px;}}"])},1468:(e,t,n)=>{"use strict";n.d(t,{KG:()=>a,_f:()=>r,xZ:()=>o});const r={TEXT:"TEXT",CHECKBOX:"CHECKBOX",RANGE:"RANGE",EMAIL:"EMAIL",NUMBER:"NUMBER",SELECT:"SELECT"},o={ACTIVE:"ACTIVE",SUBMITTED:"SUBMITTED",CANCELED:"CANCELED",UNANSWERED:"UNANSWERED",ERRORED:"ERRORED"},a={PATTERN:"pattern",REQUIRED:"required",MAX_LENGTH:"max_length",MIN_LENGTH:"min_length",min:"min",max:"max"}},6393:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,e:()=>o});const r=(e,t)=>`${e}_submission_${t}`,o={pattern:"^[0-9]\\d*(\\.\\d+)?$",inputMode:"decimal",type:"text",onKeyPress:e=>{/^[0-9.]$/.test(e.key)||e.preventDefault()},role:"spinbutton"}},3696:(e,t,n)=>{"use strict";n.d(t,{B6:()=>l,X0:()=>s,v7:()=>c});var r=n(8035),o=n(1468);const a=e=>/\/(.*)\/(.*)/.exec(e),i={maximum:"max",minimum:"min"},s=e=>{const t={},n=e.map((e=>{const t=Object.keys(e);for(let n=0;n<=t.length;n+=1)if(i[t[n]]){const r=Object.defineProperty(e,i[t[n]],Object.getOwnPropertyDescriptor(e,t[n]));return delete r[t[n]],r}return e}));for(let e=0;e<n.length;e+=1){const i=Object.keys(n[e]),s=n[e].text;i.forEach((i=>{Object.values(o.KG).includes(i)&&(t[(0,r.Z)(i)]={value:"pattern"===i?new RegExp(a(n[e][i])[1],a(n[e][i])[2]):n[e][i],...s&&{message:s}})}))}return t},l=e=>{if("object"!=typeof e)return{};const t={};return Object.entries(e).forEach((e=>{let[n,r]=e;null!=r&&r.text||(t[n]=r.value)})),t},c=e=>{const t=[...e.validators||[]];return e.required&&t.push({required:e.required,text:e.texts.required_text}),t}},3685:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I}),n(5099);var r=n(8156),o=n.n(r),a=n(7703),i=n(3542),s=n(6105);const l=e=>{let{styles:t={},...n}=e;return o().createElement("svg",Object.assign({viewBox:"0 0 1792 1792",xmlns:"https://www.w3.org/2000/svg"},n),o().createElement("path",{d:"M1408 928v320q0 119-84.5 203.5T1120 1536H288q-119 0-203.5-84.5T0 1248V416q0-119 84.5-203.5T288 128h704q14 0 23 9t9 23v64q0 14-9 23t-23 9H288q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113V928q0-14 9-23t23-9h64q14 0 23 9t9 23zm384-864v512q0 26-19 45t-45 19-45-19l-176-176-652 652q-10 10-23 10t-23-10L695 983q-10-10-10-23t10-23l652-652-176-176q-19-19-19-45t19-45 45-19h512q26 0 45 19t19 45z",fill:"#fff"}))};var c=n(8309),u=n(1662),d=(n(2985),n(3743),n(6221)),f=n(6086),p=n(6394),h=n(4625),m=n(2969),g=n(7110),v=n(2623),y=n(8543),b=n(9122);const x=n(540).ZP.div.withConfig({displayName:"styles__CheckboxWrapper",componentId:"sc-sn3ww8-0"})(["width:100%;position:relative;"]),{EXTERNAL_LINK:w,EMAIL:E,PHONE:k,CHECKBOX:_,SLIDER:C}=c.Dx,T=e=>e.match(/^https?:\/\//i)?e:`http://${e}`;function S(e){let{button:t,setCheckboxValue:n,checked:c,chatMessage:S,disabled:I=!1,handlers:O=null,hasSuggestion:P=!1,isNudge:A=!1,onClick:N=null,submitButtonsList:M}=e;const L=(0,a.I0)(),R=(0,g.Z)(t.button_type),{chatMessages:D,buttonClicks:j}=(0,a.v9)(f.sY)||[],B=(0,a.v9)(f.W$)||[],Z=(0,m.Z)(R,[w,k,E]),F=(0,m.Z)(R,[_]),U=(0,m.Z)(R,[C]),z=Boolean(c.find((e=>e.id===t.id))),H=(0,r.useRef)(M);let $="";R===k&&($="tel:"),R===E&&($="mailto:");const V=(0,r.useCallback)((e=>{if(e.preventDefault(),(0,i.jF)(e,O,R,(0,p.Z)(t),(0,h.Z)(S||{}),D.map(h.Z),null==B?void 0:B.renderedBy))return;"function"==typeof N&&N(),L((0,d.NS)(t,S,c,H.current));const{href:n,target:r}=e.target;if(n){const e=Boolean(r);setTimeout((()=>{e?window.open(n,r):window.location.href=n}),250)}}),[R,S,D,t,L,O,c,H,N,null==B?void 0:B.renderedBy]),q=(0,u.Z)(V,3e3),W=(null!=j?j:[]).find((e=>{let{chatMessageId:n,buttonId:r}=e;return n===(null==S?void 0:S.id)&&r===t.id})),G=(0,r.useCallback)((()=>{n(t)}),[t,n]);return(0,r.useEffect)((()=>{W&&F&&!z&&n(t)}),[W,F,t,n,z]),U&&null!=t&&t.slider_details?o().createElement("div",null,o().createElement(b.Z,{name:`slider_${t.id}`,onChange:e=>{const n=parseFloat(e);var r;n&&Array.isArray(H.current)&&(null===(r=H.current)||void 0===r||r.map((e=>e.id===t.id?(e.slider_details.value=n,e):e)))},from:t.slider_details.from_value,to:t.slider_details.to_value,value:t.slider_details.value,step:t.slider_details.step_value,affix:t.slider_details.affix,affixValue:t.slider_details.affix_value,ariaLabel:t.label})):o().createElement(v.Z,Object.assign({truncateText:P,cy:"message-button",color:!F,type:"button"},Z&&{href:`${$}${R===w?T(t.value):t.value}`},Z&&{target:R!==w||A?"_self":"_blank"},F&&{style:{backgroundColor:"transparent",background:"transparent"},role:"checkbox","aria-label":t.label,"aria-checked":z?"true":"false"},{icon:R===w&&A&&o().createElement(s.LZ,{fill:"#FFF",width:10,height:16})||R===w&&!A&&o().createElement(l,{width:14,height:14}),disabled:I,onClick:e=>{F?G():q(e)},hasBeenClicked:W}),F&&o().createElement(x,null,o().createElement(y.Z,{disabled:!0,"aria-disabled":!0,name:`checkbox-${t.id}`,checked:z,label:t.label})),F?"":t.label)}S.defaultProps={checked:[]};const I=S},5023:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o,g:()=>r});const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","feedback","privacy","websocketFallback","lightbox","nudge"])},8309:(e,t,n)=>{"use strict";n.d(t,{AG:()=>c,B6:()=>i,Bw:()=>y,Dw:()=>l,Dx:()=>d,FA:()=>g,Gk:()=>h,JR:()=>a,L2:()=>m,MC:()=>o,PL:()=>b,Zl:()=>v,a8:()=>s,ff:()=>w,gk:()=>r.g,j3:()=>p,qE:()=>x,r:()=>f,xm:()=>u});var r=n(5023);const o=Object.freeze({NONE:"NONE",BINARY:"BINARY",EMOJIS:"EMOJIS",HAPPY_OR_NOT:"HAPPY_OR_NOT",EXTERNAL_LINK:"EXTERNAL_LINK"}),a=Object.freeze({NONE:"NONE",COLOR:"COLOR",PICTURE:"PICTURE"}),i=Object.freeze({USER:"USER",BOT:"BOT",WEBHOOK:"WEBHOOK",AGENT:"AGENT",SYSTEM:"SYSTEM",EXTERNAL:"EXTERNAL"}),s=Object.freeze({REQUEST:"request",START:"start",END:"end",CANCEL:"cancel"}),l=Object.freeze({TAKEOVER_POLL_INTERVAL_MS:1e4,TAKEOVER_REQUEST_POLL_INTERVAL_MS:2e4,REPLY_TIMEOUT_MS:4e3,REPLY_TIMEOUT_MAX_ATTEMPTS:3,REPLY_TIMEOUT_MS_MULTIPLIER:2}),c=Object.freeze({1e3:"250",800:"178",600:"124"}),u=Object.freeze({GREETING:"GREETING",FALLBACK:"FALLBACK",PATTERN_MATCH:"PATTERN_MATCH",KEYWORD_EXACT_MATCH:"KEYWORD_EXACT_MATCH",KEYWORD_MENTION:"KEYWORD_MENTION",SAMPLE_MATCH:"SAMPLE_MATCH",TRIGGER_DIALOGUE:"TRIGGER_DIALOGUE",FALLBACK_SUGGESTION:"FALLBACK_SUGGESTION",ZODIAC:"ZODIAC"}),d=Object.freeze({QUICK_REPLY:"QUICK_REPLY",EXTERNAL_LINK:"EXTERNAL_LINK",EMAIL:"EMAIL",PHONE:"PHONE",HANDOVER_REQUEST:"HANDOVER_REQUEST",PRIVACY_EXPORT:"PRIVACY_EXPORT",PRIVACY_DELETE:"PRIVACY_DELETE",DIALOGUE_TRIGGER:"DIALOGUE_TRIGGER",SUGGESTION_DIALOGUE_TRIGGER:"SUGGESTION_DIALOGUE_TRIGGER",CONTACT_DETAILS:"CONTACT_DETAILS",UPLOAD_ATTACHMENT:"UPLOAD_ATTACHMENT",CHECKBOX:"CHECKBOX",SUBMIT:"SUBMIT",edit_contact_details:"edit_contact_details",SLIDER:"SLIDER"}),f=Object.freeze({TEMPLATE:"TEMPLATE",CUSTOM:"CUSTOM"}),p=Object.freeze({CLEAN:"CLEAN",ERROR:"ERROR",INFECTED:"INFECTED",PROCESSING:"PROCESSING"}),h=Object.freeze({IMAGE:"image",PDF:"pdf",TEXT:"text"}),m=Object.freeze({DISABLED:"DISABLED",PLATFORM:"PLATFORM",EXTERNAL:"EXTERNAL",PROTOCOL:"HANDOVER_PROTOCOL"}),g=Object.freeze({PRIDE:"PRIDE",EASTER:"EASTER",CHRISTMAS:"CHRISTMAS"}),v=Object.freeze({NO_SPLIT:"X",SPLIT_A:"A",SPLIT_B:"B"}),y=18e5,b=5e3,x=Object.freeze({bottom:"20px",right:"20px"}),w=Object.freeze({PREFIX:"PREFIX",SUFFIX:"SUFFIX"})},1848:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ye});var r=n(5099),o=n.n(r),a=n(8156),i=n.n(a),s=n(7703),l=n(540);const c=l.ZP.div.withConfig({displayName:"styles__NudgeBackdropContainer",componentId:"sc-1tcv57c-0"})(["display:block;top:-100vh;left:-100vw;height:200vh;width:200vw;position:fixed;cursor:pointer;transition:all ease 1200ms;background:",";opacity:",";z-index:",";"],(e=>{let{backdrop:t}=e;return t.color||"#000"}),(e=>{let{backdrop:t}=e;return t.opacity||.5}),(e=>{let{backdrop:t}=e;return t.zIndex||-1})),u=function(e){let{backdrop:t,onClick:n}=e;return i().createElement(c,{onClick:n,backdrop:t})};var d=n(8309),f=n(6221),p=n(6086),h=n(2979),m=n(7423),g=n(6219);const v=e=>{let{slug:t}=e;const[n,r]=(0,a.useState)({}),[o,i]=(0,a.useState)(!0),{defaultLanguage:l}=(0,h.Z)(),c=(0,g.Z)(),{currentLanguage:u}=(0,s.v9)(p.W$);return(0,a.useEffect)((()=>{let e={};const n=c.find((e=>e.slug===t));var o;n&&t&&(null!=n&&n.text_blocks?n.text_blocks.map((t=>{const n=(0,m.Z)(t,u,l);e[t.slug]=n.value})):e=(0,m.Z)(n,u,l),i(Boolean(null==n||null===(o=n.text_blocks)||void 0===o?void 0:o.length)),r(e))}),[c,u,l,t]),{textContent:n,hasTextContent:o}},y=function(){const{defaultLanguage:e}=(0,h.Z)(),t=window.kindlyChat.APIRoot,n=(0,a.useRef)(t),{content:r,slug:o,onRendered:i}=(0,s.v9)(p.oU),{currentLanguage:l}=(0,s.v9)(p.W$),{textContent:c,hasTextContent:u}=v({slug:o});return(0,a.useEffect)((()=>{if(document.getElementById("kindly-custom-nudge"))return;const e="function"==typeof r?r(c):r;if(u&&0===Object.keys(c).length)return;const t=document.createElement("div");t.innerHTML=e,n.current.appendChild(t),t.setAttribute("id","kindly-custom-nudge"),"function"==typeof i&&i(t)}),[r,l,e,o,c,i,u]),null};var b=n(6105);const x=l.ZP.div.withConfig({displayName:"styles__Section",componentId:"sc-7kvqgr-0"})(["margin:24px;display:flex;flex-direction:column;"]),w=function(e){let{html:t,slug:n}=e;const{textContent:r}=v({slug:n});return i().createElement(x,null,i().createElement("div",{dangerouslySetInnerHTML:{__html:"function"==typeof t?t(r):t}}))};n(2985),o().shape({success:o().string,error:o().string,input:o().shape({label:o().string,type:o().string,placeholder:o().string.isRequired,required:o().bool}),button:o().shape({title:o().string,icon:o().string,type:o().string})}),o().shape({id:o().string.isRequired,title:o().string,description:o().string,image:o().string.isRequired,price:o().string});var E=n(5796),k=n(1681),_=n(5965);const C=l.ZP.div.withConfig({displayName:"styles__Section",componentId:"sc-1ywydhs-0"})(["margin:24px;display:flex;flex-direction:column;"]),T=l.ZP.h2.withConfig({displayName:"styles__Title",componentId:"sc-1ywydhs-1"})(["font-size:16px;font-weight:500;line-height:26px;margin:0 0 16px 0;"]),S=l.ZP.p.withConfig({displayName:"styles__Description",componentId:"sc-1ywydhs-2"})(["line-height:22px;margin:0px;"]),I=l.ZP.a.withConfig({displayName:"styles__Link",componentId:"sc-1ywydhs-3"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]);var O=n(8260);const P=l.ZP.div.withConfig({displayName:"styles__Section",componentId:"sc-1aq8spp-0"})(["margin:24px;display:flex;flex-direction:column;"]),A=l.ZP.div.withConfig({displayName:"styles__FormGroup",componentId:"sc-1aq8spp-1"})(["display:grid;grid-template-columns:1fr 44px;align-items:end;grid-gap:16px;"]),N=l.ZP.div.withConfig({displayName:"styles__InputContainer",componentId:"sc-1aq8spp-2"})(["display:flex;flex-direction:column;"]),M=l.ZP.label.withConfig({displayName:"styles__Label",componentId:"sc-1aq8spp-3"})(["font-size:16px;line-height:19px;margin-left:8px;margin-bottom:8px;"]),L=l.ZP.input.withConfig({displayName:"styles__Input",componentId:"sc-1aq8spp-4"})(["border:none;padding:14px 16px;border-radius:22px;font-size:14px;background:",";background-color:",";&:focus{color:#2c2c2c;box-shadow:none;border:none;","}"],(e=>e.theme.inputBackground),(e=>e.theme.inputBackground),O.O),R=l.ZP.button.withConfig({displayName:"styles__Button",componentId:"sc-1aq8spp-5"})(["cursor:pointer;box-shadow:none;height:44px;width:44px;padding:0;display:flex;align-items:center;justify-content:center;border:none;border-radius:100px;background:",";background-color:",";transition:opacity 0.1s ease-in;"," &:hover{opacity:0.8;}svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:",";}}"],(e=>e.theme.buttonBackground),(e=>e.theme.buttonBackground),O.O,(e=>e.theme.buttonText)),D=function(e){let{buttonContent:t}=e;const{title:n}=t;return i().createElement(R,{role:"button",title:n,type:"submit"},i().createElement(b.jE,{width:18,height:18}))},j=function(e){let{value:t,setValue:n,inputContent:r}=e;const{label:o,type:a,placeholder:s,required:l}=r;return i().createElement(N,null,i().createElement(M,null,o),i().createElement(L,{"aria-label":s,"aria-labelledby":"newsletter-sign-up",name:o,placeholder:s,type:a||"text",value:t,onChange:e=>n(e.target.value),required:l}))},B=function(e){let{form:t,onNewsletterSubmit:n,slug:r}=e;const o=(0,s.I0)(),{dialogue:l,webhook:c}=(0,s.v9)(p.oU),{currentLanguage:u}=(0,s.v9)(p.W$),{defaultLanguage:d}=(0,h.Z)(),[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(!1),{success:b}=t;return i().createElement(P,null,v&&b?i().createElement(S,null,b):i().createElement("form",{autoComplete:"off",action:"#",onSubmit:e=>{if(e.preventDefault(),g(""),!m.trim())return!1;if(l&&o((0,f.Bc)(l,{openChat:!0,languageCode:u||d.code})),c){const t={event:e,email:m};o((0,_.tV)({method:"post",url:c,data:t}))}if("function"==typeof n)try{n(e,m)}catch(e){console.error(e)}return o((0,f.qW)({slug:r,eventType:E.aq})),y(!0)}},i().createElement(A,null,i().createElement(j,{value:m,setValue:g,inputContent:t.input}),i().createElement(D,{buttonContent:t.button}))))};var Z=n(2623);const F=l.ZP.div.withConfig({displayName:"styles__Section",componentId:"sc-1cs3brm-0"})(["margin:24px;display:inline-flex;flex-wrap:wrap;gap:8px;"]),U=l.ZP.div.withConfig({displayName:"styles__SectionSeperator",componentId:"sc-1cs3brm-1"})(["height:1px;width:100%;background:rgba(0,0,0,0.1);"]),z=function(e){let{choices:t,slug:n}=e;const r=(0,s.I0)(),{currentLanguage:o}=(0,s.v9)(p.W$),{defaultLanguage:a}=(0,h.Z)(),{buttons:l}=t;return i().createElement(i().Fragment,null,i().createElement(U,null),i().createElement(F,null,l.map((e=>{let{text:t,triggerDialogue:s}=e;return i().createElement(Z.Z,{color:!0,key:`${t}-${s}`,text:t,onClick:()=>{return e=s,r((0,f.Bc)(e,{openChat:!0,languageCode:o||a.code})),void r((0,k.qW)({slug:n,eventType:E.aq,label:e}));var e}})}))))};var H=n(8971);var $=n(1224);var V=n(9729),q=n(3497);const W=l.ZP.a.withConfig({displayName:"stylesProduct__ProductWrapper",componentId:"sc-20xwq1-0"})(["text-decoration:none;color:initial;cursor:pointer;width:100%;"]),G=l.ZP.div.withConfig({displayName:"stylesProduct__Product",componentId:"sc-20xwq1-1"})(["display:flex;padding:2px;flex-direction:column;align-items:flex-start;overflow:hidden;"," @media ","{margin-right:16px;margin-bottom:3px;box-shadow:0px 1px 3px 0px ",";border-radius:8px;overflow:hidden;max-width:201px;&:first-child{margin-left:24px;}}"],O.O,V.Uh.maxPhone,V.O9.shadowColor),Y=l.ZP.img.withConfig({displayName:"stylesProduct__ProductImage",componentId:"sc-20xwq1-2"})(["width:155px;height:155px;object-fit:cover;border-radius:8px;margin-bottom:8px;@media ","{width:201px;height:201px;border-radius:0;margin-bottom:0;}"],V.Uh.maxPhone),X=l.ZP.div.withConfig({displayName:"stylesProduct__Content",componentId:"sc-20xwq1-3"})(["max-width:100%;@media ","{padding:8px 16px;}"],V.Uh.maxPhone),K=(0,l.iv)(["font-size:14px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;"]),Q=l.ZP.a.withConfig({displayName:"stylesProduct__ActionLink",componentId:"sc-20xwq1-4"})([""," color:#333;display:block;margin-top:8px;text-decoration:underline;cursor:hover;"],K),J=l.ZP.button.withConfig({displayName:"stylesProduct__ActionButton",componentId:"sc-20xwq1-5"})([""," padding:6px 0;border:none;cursor:pointer;margin-top:8px;width:100%;display:flex;align-items:center;justify-content:center;border-radius:100px;color:",";background:",";background-color:",";font-family:",";"],K,(e=>e.theme.buttonText),(e=>e.theme.buttonBackground),(e=>e.theme.buttonBackground),q.I.default),ee=l.ZP.h3.withConfig({displayName:"stylesProduct__ProductTitle",componentId:"sc-20xwq1-6"})([""," font-weight:500;"],K),te=l.ZP.p.withConfig({displayName:"stylesProduct__ProductDescription",componentId:"sc-20xwq1-7"})([""," font-weight:400;"],K),ne=l.ZP.div.withConfig({displayName:"stylesProduct__ProductPrice",componentId:"sc-20xwq1-8"})([""," font-weight:500;"],K);function re(e){let{to:t,text:n,onClick:r}=e;return t?i().createElement(Q,{onClick:r,href:t},n):i().createElement(J,{onClick:r},n)}const oe=function(e){var t,n,r,o,a,s;let{product:l,onProductClick:c}=e;const u=null!==(t=null==l?void 0:l.image)&&void 0!==t&&t,d=null!==(n=null==l?void 0:l.title)&&void 0!==n&&n,f=null!==(r=null==l?void 0:l.productUrl)&&void 0!==r&&r,p=null!==(o=null==l?void 0:l.description)&&void 0!==o&&o,h=(null==l?void 0:l.price)||!1,m=null!==(a=null==l?void 0:l.linkText)&&void 0!==a&&a,g=null!==(s=null==l?void 0:l.linkUrl)&&void 0!==s&&s;return i().createElement(G,null,i().createElement(W,{href:f},u&&i().createElement(Y,{src:u,alt:d}),i().createElement(X,null,d&&i().createElement(ee,null,d),p&&i().createElement(te,null,p),h&&i().createElement(ne,null,h))),m&&i().createElement(re,{to:g,text:m,onClick:e=>{if("function"==typeof c)try{c(e,l)}catch(e){console.error(e)}}}))},ae=l.ZP.div.withConfig({displayName:"stylesProducts__Container",componentId:"sc-vfg4fr-0"})(["margin:24px;@media ","{margin:24px 0;}"],V.Uh.maxPhone),ie=l.ZP.div.withConfig({displayName:"stylesProducts__CarouselContainer",componentId:"sc-vfg4fr-1"})(["position:relative;overflow:hidden;> div{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto;grid-gap:14px;transform:translate(0);",";}"],(e=>e.active&&"\n position: relative;\n width: 1000%;\n display: flex;\n grid-gap: 0px;\n ")),se=l.ZP.h2.withConfig({displayName:"stylesProducts__Title",componentId:"sc-vfg4fr-2"})(["font-size:16px;font-weight:500;line-height:26px;margin:16px 0px;@media ","{margin:16px 24px;}"],V.Uh.maxPhone);function le(e){let{children:t,carouselPosition:n,onTouchStart:r,onTouchMove:o,onTouchEnd:a}=e;return i().createElement(H.ww.div,{transition:{ease:"easeInOut",duration:.3},style:{x:n},onTouchStart:r,onTouchMove:o,onTouchEnd:a},t)}const ce=function(e){var t,n;let{section:r,onProductClick:o}=e;const{width:s}=(()=>{const[e,t]=(0,a.useState)({width:void 0,height:void 0});return(0,a.useEffect)((()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]),e})(),l=parseInt(V.FB.phone.replace("px",""),10),c=null!==(t=null==r?void 0:r.items)&&void 0!==t?t:[],u=null!==(n=null==r?void 0:r.title)&&void 0!==n&&n,{setIndex:d,imageIndex:f,carouselPosition:p}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:r=!0}=e;const[o,i]=(0,a.useState)(0),s=(0,H.c$)(0);return(0,a.useEffect)((()=>{t>=n&&r&&s.set(0)}),[t,n,s,r]),{setIndex:(0,a.useCallback)(((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;i(e),s.set(o)}),[t,n,s]),imageIndex:o,carouselPosition:s}})({windowWidth:s,phoneWidth:l}),{handleTouchStart:h,handleTouchMove:m,handleTouchEnd:g}=(0,$.Z)({carousel:c,index:f,setIndex:d});return i().createElement(ae,null,u&&i().createElement(se,null,u),i().createElement(ie,{active:s<l},i().createElement(le,{carouselPosition:p,onTouchStart:h,onTouchMove:m,onTouchEnd:g},c.map((e=>i().createElement(oe,{product:e,key:e.id,onProductClick:o}))))))};var ue=n(3685);const de=function(e){let{buttons:t,slug:n}=e;const r=(0,s.I0)(),o=t.length>0,l=(0,a.useCallback)((()=>{r((0,k.qW)({slug:n,eventType:E.aq}))}),[r,n]);return o?i().createElement(C,null,t.map(((e,t)=>i().createElement(ue.Z,{button:e,key:`${e.value}-${t}`,isNudge:!0,onClick:l})))):null},fe=function(e){let{title:t,description:n,link:r,slug:o}=e;const l=(0,s.I0)(),c=(0,a.useCallback)((e=>{e.preventDefault(),l((0,k.qW)({slug:o,eventType:E.aq})),window.location.href=e.target.getAttribute("href")}),[o]);return i().createElement(C,null,t&&i().createElement(T,null,t),n&&i().createElement(S,null,n),(null==r?void 0:r.location)&&(null==r?void 0:r.text)&&i().createElement(I,{href:r.location,onClick:c},r.text))},pe=e=>e||{location:"",text:""};function he(e){var t,n,r,o,a,l,c,u;let{section:d,slug:f,onProductClick:p,onNewsletterSubmit:h}=e;const m=(0,s.I0)(),g=null!==(t=null==d?void 0:d.title)&&void 0!==t&&t,v=null!==(n=null==d?void 0:d.description)&&void 0!==n&&n,y=null!==(r=null==d?void 0:d.buttons)&&void 0!==r&&r,b=null!==(o=null==d?void 0:d.products)&&void 0!==o&&o,x=null!==(a=null==d?void 0:d.choices)&&void 0!==a&&a,_=null!==(l=null==d?void 0:d.form)&&void 0!==l&&l,C=null!==(c=null==d?void 0:d.link)&&void 0!==c&&c,T=null!==(u=null==d?void 0:d.html)&&void 0!==u&&u;return i().createElement(i().Fragment,null,(g||v||C)&&i().createElement(fe,{title:g,description:v,link:pe(C),slug:f}),y&&i().createElement(de,{buttons:y,slug:f}),x&&i().createElement(z,{choices:x,slug:f}),b&&i().createElement(ce,{section:b,onProductClick:(e,t)=>{if(null!=t&&t.productUrl?m((0,k.qW)({slug:f,eventType:E.aq,label:t.productUrl})):console.warn("Could not track cta click with label:",t.productUrl),"function"==typeof p)try{p(e,t)}catch(e){console.error(e)}}}),_&&i().createElement(B,{form:_,onNewsletterSubmit:h,slug:f}),T&&i().createElement(w,{html:T,slug:f}))}const me=e=>{var t;let{layout:n,slug:r,onProductClick:o,onNewsletterSubmit:a}=e;return(null!==(t=null==n?void 0:n.sections)&&void 0!==t?t:[]).map(((e,t)=>i().createElement(he,{key:`section-${t}`,section:e,slug:null!=r?r:null,onProductClick:o,onNewsletterSubmit:a})))};var ge=n(4163);const ve=function(e){let{bubbleHidden:t,show:n,slug:r,layout:o,onDismiss:a,onProductClick:s,onNewsletterSubmit:l}=e;return i().createElement(ge.ps,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-cy":"nudge-container","data-story":"NudgeContainer"},i().createElement(ge.pY,null),i().createElement(ge.Sx,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:a,type:"button","data-cy":"close-nudge-button"},i().createElement(b.Tw,{width:25,height:25})),i().createElement(ge.Bp,null,i().createElement(me,{layout:o,slug:r,onProductClick:s,onNewsletterSubmit:l})))},ye=function(e){var t;let{hidden:n,layout:r,onDismiss:o,onProductClick:l,onNewsletterSubmit:c}=e;const{show:h,nudgeType:m,slug:g}=(0,s.v9)(p.oU),v=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,b=(0,s.I0)(),x=(0,a.useCallback)((e=>{if(e.stopPropagation(),b((0,f.l)()),"function"==typeof o)try{o(e)}catch(e){console.error(e)}}),[o,b]);return i().createElement(i().Fragment,null,v&&i().createElement(u,{backdrop:v,onClick:x}),m===d.r.TEMPLATE&&i().createElement(ve,{show:h,layout:r,slug:g,onDismiss:x,onProductClick:l,onNewsletterSubmit:c,bubbleHidden:n}),m===d.r.CUSTOM&&i().createElement(y,null))}},4163:(e,t,n)=>{"use strict";n.d(t,{Bp:()=>l,Sx:()=>c,pY:()=>u,ps:()=>s});var r=n(540),o=n(8426),a=n(7212),i=n(9729);const s=r.ZP.div.withConfig({displayName:"styles__NudgeContainer",componentId:"sc-1k0o2t4-0"})(["right:20px;bottom:",";z-index:10;position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";",";",";@media ","{",";z-index:16;box-shadow:0 -3px 15px 1px ",";}"],(e=>{let{bubbleHidden:t}=e;return t?"30px":"100px"}),i.O9.shadowColor,o.fr,(e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`}),i.Uh.maxPhone,(e=>{let{modal:t}=e;return!t&&"\n left: 0px;\n right: 0px;\n bottom: 0px;\n border-radius: 14px 14px 0 0;"}),i.O9.shadowColor),l=r.ZP.div.withConfig({displayName:"styles__NudgeInner",componentId:"sc-1k0o2t4-1"})(["position:relative;padding:0px;max-width:380px;width:100%;max-height:calc(100vh - 150px);overflow-y:auto;",";@media ","{min-width:380px;}@media ","{min-width:100%;}"],(e=>{let{modal:t}=e;return t&&"box-sizing: border-box"}),i.Uh.minTablet,i.Uh.maxPhone),c=(0,r.ZP)(a.zx).withConfig({displayName:"styles__NudgeDismiss",componentId:"sc-1k0o2t4-2"})(["top:8px;right:8px;z-index:15;display:flex;padding:0;border-radius:100px;position:absolute;&:hover{opacity:0.8;}svg path{stroke:",";}@media ","{",";}"],(e=>{let{theme:t}=e;return t.buttonBackground||t.bubbleButtonBackground}),i.Uh.maxPhone,(e=>{let{modal:t}=e;return t?"top: 2px; right: 0;":"top: 8px; right: 8px;"})),u=r.ZP.div.withConfig({displayName:"styles__BorderElement",componentId:"sc-1k0o2t4-3"})(["position:absolute;background:#fff;width:100%;height:100%;left:0;right:0;top:0;bottom:0;border-radius:14px;@media ","{border-radius:",";}&:before{content:'';width:50px;height:calc(100% - 8px);background:",";position:absolute;z-index:-1;top:4px;left:-4px;border-radius:25px;@media ","{width:calc(100% - 8px);height:50px;top:-4px;left:4px;}}"],i.Uh.maxPhone,(e=>{let{modal:t}=e;return t?"14px":"14px 14px 0 0"}),(e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground}),i.Uh.maxPhone)},752:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ue});var r=n(8156),o=n.n(r),a=n(7703),i=n(6105),s=(n(5099),n(2623));function l(e){const[t,n]=(0,r.useState)(!1);return[t,(0,r.useCallback)((t=>{n(!0),e(t)}),[e])]}n(9567);var c=n(540),u=n(9729),d=n(4163);const f="cubic-bezier(0.18, 0.58, 0.37, 0.92)",p=(0,c.ZP)(d.Sx).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackDismiss",componentId:"sc-c01o0q-0"})([""]),h=(0,c.ZP)(d.pY).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackBorderElement",componentId:"sc-c01o0q-1"})([""]),m=(0,c.ZP)(d.ps).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackContainer",componentId:"sc-c01o0q-2"})(["z-index:20;",";@media ","{z-index:20;}"],(e=>{let{modal:t}=e;return t&&"\n right: unset;\n bottom: unset;\n "}),u.Uh.maxPhone),g=(0,c.ZP)(d.Bp).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackInner",componentId:"sc-c01o0q-3"})(["min-width:380px;padding:0 20px;@media ","{padding:0 12px;max-width:",";width:auto;min-width:auto;}"],u.Uh.maxPhone,u.FB.phone),v=(c.ZP.div.withConfig({displayName:"NudgeFeedbackstyles__Section",componentId:"sc-c01o0q-4"})(["margin:24px;display:flex;flex-direction:column;"]),c.ZP.h2.withConfig({displayName:"NudgeFeedbackstyles__Title",componentId:"sc-c01o0q-5"})(["font-size:16px;font-weight:500;line-height:26px;margin:0 0 16px 0;"])),y=c.ZP.p.withConfig({displayName:"NudgeFeedbackstyles__Description",componentId:"sc-c01o0q-6"})(["line-height:22px;"]),b=(c.ZP.a.withConfig({displayName:"NudgeFeedbackstyles__Link",componentId:"sc-c01o0q-7"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]),c.ZP.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackContainer",componentId:"sc-c01o0q-8"})(["border-radius:14px;overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:24px 0;opacity:0;",";transition:opacity 0.15s linear 0.2s,transform "," 300ms;"],(e=>e.hasEntered&&"opacity: 1"),f)),x=c.ZP.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackFormContent",componentId:"sc-c01o0q-9"})(["text-align:center;width:100%;"," ",""],(e=>e.ratingSent&&`transition: all ${f} 300ms;`),(e=>e.finished&&"z-index: 11; position: relative; opacity: 0;")),w=c.ZP.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackThanksContainer",componentId:"sc-c01o0q-10"})(["opacity:0;margin-top:16px;text-align:center;transition:all "," 300ms;",""],f,(e=>{let{finished:t}=e;return t&&"opacity: 1;"})),E=c.ZP.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackStepContainer",componentId:"sc-c01o0q-11"})(["width:100%;opacity:1;transition:all "," 300ms;",""],f,(e=>{let{hasRated:t}=e;return t&&"display: none;"})),k=c.ZP.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackEmojiContainer",componentId:"sc-c01o0q-12"})(["height:fit-content;min-height:35px;cursor:pointer;margin:0 0 16px 0;transition:all ease 300ms;",";"],(e=>e.hovering&&"\n .emoji.chosen {\n opacity: 1;\n }\n .emoji:not(.chosen) {\n opacity: 0.4;\n }\n ")),_=c.ZP.span.withConfig({displayName:"NudgeFeedbackstyles__StyledEmoji",componentId:"sc-c01o0q-13"})(["display:inline-block;margin:0 10px;transition:opacity 0.1s linear;background:none;border:none;padding:0;cursor:pointer;"]),C=(0,c.ZP)(v).withConfig({displayName:"styles__Title",componentId:"sc-1qibng2-0"})([""]),T=(0,c.ZP)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1qibng2-1"})([""]),S=c.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1qibng2-2"})(["display:flex;justify-content:center;margin-top:30px;button{width:70px;min-width:auto;margin:0 15px;}"]),I=function(e){let{submit:t,textContent:n}=e;const[r,a]=l(t),{binary_headline:i,binary_1:c,binary_0:u}=n;return o().createElement(T,{hasRated:r},o().createElement(C,null,i),o().createElement(S,null,o().createElement(s.Z,{type:"submit",onClick:()=>a(2),color:!0,flat:!0,text:c}),o().createElement(s.Z,{type:"submit",onClick:()=>a(1),color:!0,flat:!0,text:u})))},O=(0,c.ZP)(v).withConfig({displayName:"styles__Title",componentId:"sc-1krelmc-0"})([""]),P=(0,c.ZP)(y).withConfig({displayName:"styles__Description",componentId:"sc-1krelmc-1"})([""]),A=(0,c.ZP)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1krelmc-2"})([""]),N=(0,c.ZP)(k).withConfig({displayName:"styles__EmojiContainer",componentId:"sc-1krelmc-3"})([""]),M=(0,c.ZP)(_).withConfig({displayName:"styles__Emoji",componentId:"sc-1krelmc-4"})([""]),L=c.ZP.img.withConfig({displayName:"styles__EmojiImage",componentId:"sc-1krelmc-5"})(["height:35px;width:35px;"]),R={1:{src:"http://localhost:8081/src/assets/icons/emoji-sad.png",description:"sad face"},2:{src:"http://localhost:8081/src/assets/icons/emoji-neutral.png",description:"neutral face"},3:{src:"http://localhost:8081/src/assets/icons/emoji-happy.png",description:"happy face"}};function D(e){let{number:t,selected:n,setTentativeRating:r,setRating:a}=e;const i=n===t,{src:s,description:l}=R[t];return o().createElement(M,{className:"emoji "+(i?"chosen":""),onFocus:()=>r(t),onBlur:()=>r(0),onMouseEnter:()=>r(t),onMouseLeave:()=>r(0),role:"radio",tabIndex:"0","aria-checked":n?"true":"false","aria-label":l,onKeyPress:e=>{"Enter"===e.key&&(a(t),e.preventDefault(),e.stopPropagation())},onClick:()=>a(t)},o().createElement(L,{src:s,alt:`${l} emoji`}))}const j=function(e){let{submit:t,textContent:n}=e;const[a,i]=(0,r.useState)(!1),[s,c]=(0,r.useState)(0),[u,d]=l(t),{emoji_guideline:f,emoji_headline:p}=n;return o().createElement(A,{hasRated:u},o().createElement(O,null,p),o().createElement(N,{hovering:a,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},[1,2,3].map((e=>o().createElement(D,{key:`chat-feedback-emoji-${e}`,number:e,selected:s,setTentativeRating:c,setRating:d})))),o().createElement(P,null,f))};var B=n(6221),Z=n(7818);const F=(0,c.ZP)(v).withConfig({displayName:"styles__Title",componentId:"sc-r8xh7-0"})([""]),U=(0,c.ZP)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-r8xh7-1"})([""]),z=c.ZP.a.withConfig({displayName:"styles__LinkButton",componentId:"sc-r8xh7-2"})([""," text-decoration:none;font-size:15px;width:fit-content;margin:0 auto;padding:11px 20px;font-weight:500;"],Z.uM),H=function(e){let{textContent:t}=e;const{external_link_headline:n,external_link_text:i,external_link_url:s}=t,l=(0,a.I0)(),c=(0,r.useCallback)((()=>l((0,B.TM)())),[l]);return o().createElement(U,{hasRated:!1},n&&i&&o().createElement(F,null,n),o().createElement(z,{href:s,onClick:c,target:"_blank",rel:"noopener noreferrer",$color:!0},i||n))},$=(0,c.ZP)(v).withConfig({displayName:"styles__Title",componentId:"sc-1wxcq1r-0"})([""]),V=(0,c.ZP)(y).withConfig({displayName:"styles__Description",componentId:"sc-1wxcq1r-1"})([""]),q=(0,c.ZP)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1wxcq1r-2"})([""]),W=(0,c.ZP)(k).withConfig({displayName:"styles__EmojiContainer",componentId:"sc-1wxcq1r-3"})([""]),G=(0,c.ZP)(_).withConfig({displayName:"styles__Emoji",componentId:"sc-1wxcq1r-4"})(["width:37px;margin:0 4px;"]),Y={1:{Component:function(){return o().createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o().createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#ee2324"}),o().createElement("path",{d:"M138.78,153.13c-1.25,1-2.94-.13-3.8-1.08-7.95-9.27-20.62-15.28-34.9-15.28s-27,6-34.95,15.32c-.61.79-3,2.42-4.34.5-.94-1.38-.27-2.55.24-3.88C68.2,134.1,83,119.45,100.08,119.45S131.82,134,139,148.5C140.2,151.18,139.92,152.21,138.78,153.13Z",fill:"#231e20"}),o().createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o().createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}))},description:"very unhappy"},2:{Component:function(){return o().createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o().createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#f47d7f"}),o().createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o().createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o().createElement("path",{d:"M138.82,141.47a8.33,8.33,0,0,1-3.8-.32c-8-2.78-20.62-4.58-34.91-4.58s-27,1.8-34.94,4.59c-.81.2-3.45.79-4.35.15-.51-.37-.2-.81.25-1.17,7.16-4.37,21.93-8.76,39-8.76s31.74,4.36,39,8.7C139.53,140.54,140,141.2,138.82,141.47Z",fill:"#231e20"}))},description:"unhappy"},3:{Component:function(){return o().createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o().createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#97cd72"}),o().createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o().createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o().createElement("path",{d:"M138.82,131.5a8.33,8.33,0,0,0-3.8.33c-8,2.78-20.62,4.58-34.91,4.58s-27-1.81-34.94-4.59c-.81-.2-3.45-.79-4.35-.15-.51.36-.2.8.25,1.16,7.16,4.38,21.93,8.77,39,8.77s31.74-4.36,39-8.71C139.53,132.44,140,131.78,138.82,131.5Z",fill:"#231e20"}))},description:"happy"},4:{Component:function(){return o().createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o().createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#00a24a"}),o().createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o().createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o().createElement("path",{d:"M138.82,119.86c-1.26-1-2.94.14-3.8,1.08-8,9.27-20.62,15.28-34.91,15.28s-27-6-34.94-15.31c-.62-.8-3.05-2.42-4.35-.51-.93,1.38-.26,2.56.25,3.89,7.16,14.6,21.93,29.25,39,29.25s31.74-14.55,39-29C140.23,121.81,140,120.78,138.82,119.86Z",fill:"#231e20"}))},description:"very happy"}};function X(e){let{number:t,selected:n,setTentativeRating:r,setRating:a}=e;const i=n===t,{Component:s,description:l}=Y[t];return o().createElement(G,{className:"emoji "+(i?"chosen":""),onFocus:()=>r(t),onBlur:()=>r(0),onMouseEnter:()=>r(t),onMouseLeave:()=>r(0),role:"radio",tabIndex:"0","aria-checked":n?"true":"false","aria-label":l,onKeyPress:e=>{"Enter"===e.key&&(a(t),e.preventDefault(),e.stopPropagation())},onClick:()=>a(t)},o().createElement(s,{alt:`${l} emoji`}))}const K=function(e){let{submit:t,textContent:n}=e;const[a,i]=(0,r.useState)(!1),[s,c]=(0,r.useState)(0),[u,d]=l(t),{emoji_guideline:f,emoji_headline:p}=n;return o().createElement(q,{hasRated:u},o().createElement($,null,p),o().createElement(W,{hovering:a,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},[4,3,2,1].map((e=>o().createElement(X,{key:`chat-feedback-happy-or-not-${e}`,number:e,selected:s,setTentativeRating:c,setRating:d})))),o().createElement(V,null,f))};var Q=n(8260);(0,c.ZP)(v).withConfig({displayName:"styles__Title",componentId:"sc-1jtf9kh-0"})([""]);const J=(0,c.ZP)(y).withConfig({displayName:"styles__Description",componentId:"sc-1jtf9kh-1"})([""]),ee=(0,c.ZP)(E).withConfig({displayName:"styles__FreeformContainer",componentId:"sc-1jtf9kh-2"})(["z-index:11;opacity:0;visibility:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;",";",""],(e=>{let{hasEntered:t}=e;return t&&"\n opacity: 1;\nvisibility: visible;"}),(e=>{let{finished:t}=e;return t&&"display: none;"})),te=c.ZP.textarea.withConfig({displayName:"styles__FreeformTextarea",componentId:"sc-1jtf9kh-3"})(["resize:none;width:100%;min-height:100px;max-width:250px;padding:6px 10px;background:",";font-size:14px;margin-bottom:30px;line-height:22px;color:#2c2c2c;font-family:Open sans,Helvetica Neue,Helvetica,Arial,sans-serif !important;border:1px solid #dedede;border-radius:6px;z-index:10;@media ","{font-size:16px;}"," &:hover,&:focus{color:#2c2c2c;border:1px solid #dedede;}"],u.O9.grayColor,u.Uh.maxTablet,Q.O),ne=function(e){let{submit:t,textContent:n,finished:a}=e;const[i,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)(""),{freeform_description:d,freeform_placeholder:f,send:p}=n;(0,r.useEffect)((()=>{l(!0)}),[]);const h=(0,r.useCallback)((e=>{"Enter"===e.key&&t(c)}),[c,t]),m=(0,r.useCallback)((e=>{u(e.target.value)}),[]);return o().createElement(ee,{hasEntered:i,finished:a},o().createElement(J,null,d),o().createElement(te,{"data-cy":"feedback-freefrom-textarea",rows:4,value:c,onChange:m,placeholder:f}),o().createElement(s.Z,{color:!0,flat:!0,text:p,type:"submit",onClick:()=>t(c),onKeyDown:h}))};var re=n(8309),oe=n(2979),ae=n(6086),ie=n(6239),se=(n(172),n(3497));const le=c.ZP.div.withConfig({displayName:"NudgeFeedbackWrapperstyles__Wrapper",componentId:"sc-1eqo0i0-0"})(["background:",";position:",";width:",";height:",";top:58px;left:0;z-index:",";display:flex;justify-content:center;align-items:center;font-family:",";"],(e=>{let{modal:t,theme:n}=e;return t?n.background:"none"}),(e=>{let{modal:t}=e;return t?"fixed":"unset"}),(e=>{let{modal:t}=e;return t?"100%":0}),(e=>{let{modal:t}=e;return t?"100%":0}),(e=>{let{zIndex:t}=e;return`${t+10}`}),se.I.default),ce=function(e){let{children:t,modal:n,zIndex:r}=e;return o().createElement(le,{modal:n,zIndex:r},t)},ue=function(){const[e,t]=(0,r.useState)(!1),[n,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)(!1),{show:u}=(0,a.v9)(ae.oU),{currentLanguage:d}=(0,a.v9)(ae.W$),{fullscreenMode:f,zIndex:y}=(0,a.v9)(ae.Q7),{feedbackForm:E,feedbackForm:{freeform_enabled:k},feedbackFormType:_}=(0,a.v9)(ae.Q7),C=(0,a.I0)(),{defaultLanguage:T}=(0,oe.Z)(),S=((e,t,n)=>Object.entries(e).filter((e=>{let[t]=e;return"freeform_enabled"!==t})).reduce(((e,r)=>{let[o,a]=r;return{...e,[o]:(0,ie.Z)(a,t,n)}}),{}))(E,d,T);(0,r.useEffect)((()=>{c(!0)}),[]);const O=(0,r.useCallback)((()=>{C((0,B.nh)())}),[C]),P=(0,r.useCallback)((()=>{t(!0),setTimeout((()=>C((0,B.nh)())),2e3)}),[C]),A=(0,r.useCallback)((e=>{C((0,B.fA)(e)),k?s(!0):P()}),[P,C,k]),N=(0,r.useCallback)((e=>{C((0,B.wL)(e)),P()}),[P,C]);let M;switch(_){case re.MC.BINARY:M=I;break;case re.MC.EMOJIS:M=j;break;case re.MC.HAPPY_OR_NOT:M=K;break;case re.MC.EXTERNAL_LINK:M=H;break;default:console.error(`Feedback form type '${_}' not recognized`),M=function(){return null}}return o().createElement(ce,{modal:f,zIndex:y},o().createElement(m,{ariaHidden:u&&!f?"false":"true",modal:f,"data-cy":"feedback-nudge-container","data-story":"NudgeFeedbackContainer"},o().createElement(h,{modal:f}),o().createElement(p,{"aria-label":"Dismiss feedback",title:"Dismiss feedback",onClick:O,type:"button",modal:f},o().createElement(i.Tw,{width:25,height:25})),o().createElement(g,{modal:f},o().createElement(b,{hasEntered:l,finished:e},o().createElement(x,{finished:e,ratingSent:n},o().createElement(M,{textContent:S,submit:A}),n&&o().createElement(ne,{textContent:S,submit:N,finished:e})),e&&o().createElement(w,{finished:e},o().createElement(v,null,S.thanks))))))}},5606:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>w}),n(5099);var r=n(8156),o=n.n(r),a=n(7703),i=n(6105),s=n(6221),l=n(6086),c=n(540),u=n(8426),d=n(7212),f=n(9729);const p=(0,c.iv)(["display:flex;overflow:hidden;z-index:-1;min-width:125px;height:45px;"]),h=c.ZP.div.withConfig({displayName:"styles__ToolsContainer",componentId:"sc-vkneg1-0"})(["z-index:0;width:15px;border-radius:7px;min-width:80px;margin-right:-25px;background:#fff;background-color:#fff;position:absolute;right:50px;box-shadow:0px 1px 5px 0px ",";transition:all 0.2s ease;",";",";"],f.O9.shadowColorDark,(e=>{let{hasInspector:t}=e;return t&&p}),(e=>{let{active:t}=e;return!t&&"min-width: 0"})),m=c.ZP.div.withConfig({displayName:"styles__LanguageContainer",componentId:"sc-vkneg1-1"})(["padding:2px;border-radius:7px;background:#fff;background-color:#fff;box-shadow:0px 1px 5px 0px ",";right:110px;display:flex;position:absolute;min-width:max-content;justify-content:center;",";"],f.O9.shadowColorDark,u.fr),g=(0,c.ZP)(d.rU).withConfig({displayName:"styles__LanguageText",componentId:"sc-vkneg1-2"})(["color:#757575;margin:0;cursor:pointer;font-size:12px;font-weight:500;text-decoration:none;:hover{text-decoration:underline;}"]),v=c.ZP.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-vkneg1-3"})(["display:flex;padding:2px;align-items:center;justify-content:space-between;"]),y=(0,c.ZP)(d.zx).withConfig({displayName:"styles__ToolButton",componentId:"sc-vkneg1-4"})(["display:flex;position:relative;align-items:center;padding:13px;border-radius:7px;transition:all 0.15s ease;:hover{background:#",";background-color:#",";svg path{fill:#000;}:after{border-left-color:#000;}}"," ",""],f.O9.grayColor,f.O9.grayColor,(e=>e.active&&`\n background: #${f.O9.grayColor};\n background-color: #${f.O9.grayColor};\n svg path {\n fill: #000;\n }\n `),(e=>e.tail&&`\n :after {\n content: '';\n width: 0;\n height: 0;\n position: absolute;\n right: 5px;\n bottom: 3px;\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n border-left: 3px solid ${e.active?"#000":f.O9.primaryColor};\n transform: rotate(45deg);\n }`));var b=n(1662),x=n(2445);const w=function(e){let{active:t}=e;const[n,c]=(0,r.useState)(!1),{botKey:u,admin:d}=(0,a.v9)(l.W$),{languages:f}=(0,a.v9)(l.Q7),{inspectorOpen:p}=(0,a.v9)(l.P8),w=(0,a.I0)(),E=(0,r.useCallback)((()=>{w((0,s.AA)())}),[w]);return function(){var e,t;const n=(0,a.I0)(),{admin:o}=(0,a.v9)(l.W$),{chatMessages:i}=(0,a.v9)(l.sY)||[],s=null===(e=i.filter((e=>!(null!=e&&e.from_bot))).slice(-1))||void 0===e||null===(t=e[0])||void 0===t?void 0:t.message,c=(0,b.Z)((e=>{n((0,x.uC)(e))}),1e3),u=(0,r.useCallback)((e=>{e.altKey&&"KeyR"===e.code&&s&&c(s)}),[s,c]);(0,r.useEffect)((()=>{if(o)return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)}),[u,o])}(),o().createElement(o().Fragment,null,n&&t&&o().createElement(m,null,f.map((e=>o().createElement(y,{key:e.code,title:`Restart ${e.name}`,onClick:()=>{return t=e.code,w((0,s.VH)(t)),void c(!1);var t}},o().createElement(g,null,e.code.toUpperCase()))))),o().createElement(h,{active:t,hasInspector:d},d&&o().createElement(v,null,o().createElement(y,{onClick:E,title:p?"Close chat inspector":"Open chat inspector"},p?o().createElement(i.LA,null):o().createElement(i.tE,null))),o().createElement(v,null,o().createElement(y,{title:"Restart chat",onClick:()=>{f.length>1?c(!n):w((0,s.a$)(u,!0))},active:n,tail:f.length>1},o().createElement(i.Du,{width:15,height:15})))))}},6219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(8156),o=n(7703),a=n(6086);function i(){const{nudges:e}=(0,o.v9)(a.Q7);return(0,r.useMemo)((()=>{var t,n,r,o,a;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(a=null==e?void 0:e.multiple_choice_nudges)&&void 0!==a?a:[]]}),[e])}},2979:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7703),o=n(6086);const a=()=>{const{languages:e,includeDisabledLanguages:t}=(0,r.v9)(o.Q7),n=(null==e?void 0:e.filter((e=>{let{active:t}=e;return t})))||[],a=n[0];return t?{languages:e,defaultLanguage:a}:{languages:n,defaultLanguage:a}}},1662:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8156);const o=(e,t)=>{const n=(0,r.useRef)();return(0,r.useCallback)((r=>{new Date-n.current<t||(e(r),n.current=new Date)}),[t,e])}},1224:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(8156);function o(e){return e.touches||e.originalEvent.touches}let a=null;const i=e=>{let{setIndex:t,index:n,carousel:i}=e;return{handleTouchStart:(0,r.useCallback)((e=>{const t=o(e)[0];a=t.clientX}),[]),handleTouchMove:(0,r.useCallback)((e=>{if(!a)return;const r=o(e)[0].clientX;t(a-r>5?n+1:n-1,i),a=null}),[i,n,t]),handleTouchEnd:(0,r.useCallback)((()=>{a=null}),[])}}},4344:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(5099),o=n.n(r),a=n(8309),i=n(2914);const s=o().shape((0,i.Z)((e=>({[e]:o().func})),Object.values(a.Dx)))},2985:(e,t,n)=>{"use strict";var r=n(5099),o=n.n(r),a=n(8309),i=n(9428);o().shape({button_type:o().oneOf([...Object.values(a.Dx),...Object.values(a.Dx).map(i.Z)]).isRequired,is_active:o().bool,label:o().string.isRequired,value:o().string,new_context:o().object,index:o().number,language_code:o().string})},3743:(e,t,n)=>{"use strict";var r=n(5099),o=n.n(r),a=n(8309),i=n(8881);o().shape({message:o().string,from_bot:o().bool,image_carousel:o().arrayOf(o().object),thon_image_above_text:o().bool,exchange_type:o().string,exchange_id:o().string,avatar:o().string,sender:o().oneOf(Object.values(a.B6)),skill_subscription_id:o().number,bot_id:o().number,score:o().number,title:o().string,reply_candidates:i.Z,is_followup:o().bool,handler:o().oneOf(Object.values(a.xm)),corrected_message:o().string,new_context:o().objectOf(o().string)})},172:(e,t,n)=>{"use strict";var r=n(5099),o=n.n(r);o().oneOfType([o().node,o().arrayOf(o().node)])},8881:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5099),o=n.n(r);const a=o().arrayOf(o().shape({selected:o().bool.isRequired,_id:o().string.isRequired,score:o().number.isRequired,sample:o().string.isRequired}))},9567:(e,t,n)=>{"use strict";var r=n(5099),o=n.n(r);o().shape({chat_deleted_header:o().string,chat_deleted_text:o().string,back_to_chat_button:o().string,delete_text:o().string,delete_button:o().string,binary_headline:o().string,binary_1:o().string,binary_0:o().string,emoji_guideline:o().string,emoji_headline:o().string,freeform_description:o().string,freeform_placeholder:o().string,send:o().string})},852:(e,t,n)=>{"use strict";n.d(t,{e:()=>i,x:()=>s});var r=n(1238);let o,a;const i=e=>(t,n)=>{const{SAGE_WS_HOST:i}=n().environment;if(!o||!o.isConnected())try{o=new r.sk(`${i}/chatbubble/socket`),o.connect()}catch(e){console.warn("Could not connect to sage socket",e)}try{a=o.channel(`chatbubble_active:${e}`),a.join()}catch(e){console.warn("Could not join active channel",e)}},s=()=>{if(o&&a)try{a.leave()}catch(e){console.warn("Could not leave active channel",e)}if(o)try{o.disconnect()}catch(e){console.warn("Could not disconnect from sage socket",e)}}},5796:(e,t,n)=>{"use strict";n.d(t,{n2:()=>r,JZ:()=>o,Rq:()=>x,$6:()=>b,ek:()=>se,iE:()=>Z,$R:()=>z,tl:()=>p,wb:()=>w,sS:()=>fe,ZN:()=>U,ch:()=>Pe,fz:()=>k,bQ:()=>S,iB:()=>re,Cb:()=>Ee,lh:()=>I,nm:()=>V,NB:()=>Y,hu:()=>Ie,aq:()=>Te,hK:()=>ve,xo:()=>q,$:()=>Oe,zt:()=>ae,oy:()=>y,LH:()=>ke,$D:()=>ye,L8:()=>m,kp:()=>j,e7:()=>f,X4:()=>me,yS:()=>pe,FX:()=>A,$v:()=>ie,M_:()=>W,vo:()=>O,jv:()=>ne,iS:()=>we,us:()=>P,Rj:()=>te,YX:()=>K,Bl:()=>N,dl:()=>$.CONNECTED,bD:()=>$.DISCONNECTED,uY:()=>u,En:()=>xe,Ll:()=>G,Eb:()=>Se,PV:()=>F,j5:()=>D,Go:()=>H,W3:()=>ge,Q_:()=>L,g8:()=>X,ck:()=>Q,AF:()=>T,GP:()=>ce,QA:()=>ue,Zf:()=>E,fQ:()=>M,JT:()=>R,xT:()=>v,r1:()=>B,Fd:()=>Ce,fr:()=>oe,Xz:()=>_e,Ds:()=>be,dF:()=>g,st:()=>J,Rx:()=>C,xd:()=>h,gG:()=>s,Fm:()=>i,OM:()=>a,M$:()=>ee,JQ:()=>le,fI:()=>d,Ae:()=>he,x3:()=>de,MP:()=>_,un:()=>l,Tz:()=>c});const r="AGENT_STARTED_TYPING",o="AGENT_STOPPED_TYPING",a="TAKEOVER_REQUESTED",i="TAKEOVER_CANCELLED",s="TAKEOVER",l="USER_STARTED_TYPING",c="USER_STOPPED_TYPING",u="RESET_HAS_HAD_HANDOVER",d="UNAUTHENTICATED",f="IDENTIFIED",p="AUTHENTICATED",h="START_REFRESHING",m="END_REFRESHING",g="SHOW_TAB_NOTIFICATION",v="SHOW_BUBBLE_NOTIFICATION",y="DISMISS_NOTIFICATIONS",b="ANNOUNCEMENT_SHOW",x="ANNOUNCEMENT_HIDE",w="BOT_IS_TYPING",E="SET_SPLIT_TEST_LABEL",k="CLEAR_SPLIT_TEST_LABEL",_="UPDATE_SPLIT_LABEL_TIMEOUT",C="START_OVER",T="SET_LANGUAGE",S="CLOSE_CHATBUBBLE",I="CLOSE_OPTIONS_SCREEN",O="OPEN_CHATBUBBLE",P="OPEN_OPTIONS_SCREEN",A="NEW_CHAT_ID",N="POPPED_UP",M="SET_STARTED_AT",L="SET_HAS_REQUESTED_GREETING",R="SET_USER_IS_IDLE",D="SET_CHAT_HAS_STARTED",j="HIDE_CONTACT_DETAILS",B="SHOW_CONTACT_DETAILS",Z="ATTACHMENT_BUTTON_CLICKED",F="SET_ATTACHMENT_FILES",U="CLEAR_ATTACHMENT_FILES",z="ATTACHMENT_PROMPT_SHOWED",H="SET_ERROR";var $=n(1984);const V="CONNECTED",q="DISCONNECTED",W="NEW_TOKEN",G="RESET_TOKEN",Y="CONNECT_WITH_TRIGGER",X="SET_HEARTBEAT_ID",K="PATTERN_CONTEXT_MATCH",Q="SET_INSPECTED_CHAT_MESSAGE",J="SPELL_CORRECTION",ee="TOGGLE_INSPECTOR",te="ENVIRONMENT_OVERRIDE",ne="OPEN_FEEDBACK_FORM",re="CLOSE_FEEDBACK_FORM",oe="SHOW_MAINTENANCE_ALERT",ae="DISMISS_MAINTENANCE_ALERT",ie="NEW_MESSAGE",se="ANONYMIZED_MESSAGE",le="TRIGGER_DIALOGUE",ce="SET_LAST_MESSAGE_SEEN",ue="SET_MESSAGE_SENT_TIME",de="UPDATE_CHAT_MESSAGE",fe="BUTTON_CLICK",pe="NEW_ATTACHMENTS",he="UPDATE_ATTACHMENT",me="MESSAGE_ATTACHMENTS_UPDATED",ge="SET_FORM",ve="DELETE_CHAT",ye="DISMISS_PUSH_MESSAGE",be="SHOW_PUSH_MESSAGE",xe="RESET_PUSH_MESSAGES",we="OPEN_LIGHT_BOX",Ee="CLOSE_LIGHT_BOX",ke="DISMISS_NUDGE",_e="SHOW_NUDGE",Ce="SHOW_CUSTOM_NUDGE",Te="CTA_CLICK",Se="SESSION_COMPLETION",Ie="COUNT_NUDGE",Oe="DISCOUNT_NUDGE",Pe="CLEAR_NUDGE_INTERACTION"},7890:(e,t,n)=>{"use strict";n.d(t,{U:()=>o,h:()=>r});const r="SET_NEW_CONTEXT",o="SET_NEW_LABEL"},3311:(e,t,n)=>{"use strict";n.d(t,{Dl:()=>r,SB:()=>l,ae:()=>a,ln:()=>o,sj:()=>i,wz:()=>s});const r="RESET_WEBSOCKET_FALLBACK_REPLY_TIMEOUT",o="RESET_WEBSOCKET_FALLBACK_TAKEOVER_INTERVAL",a="RESET_WEBSOCKET_FALLBACK_TAKEOVER_REQUEST_INTERVAL",i="SET_WEBSOCKET_FALLBACK_REPLY_TIMEOUT",s="SET_WEBSOCKET_FALLBACK_TAKEOVER_INTERVAL",l="SET_WEBSOCKET_FALLBACK_TAKEOVER_REQUEST_INTERVAL"},169:(e,t,n)=>{"use strict";n.d(t,{D1:()=>c,K1:()=>l,Yp:()=>u,ZI:()=>s});var r=n(8309),o=n(5796),a=n(5965),i=n(3378);const s=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&(t({type:o.OM,...n.data,requestedTakeover:!0}),t((0,i.OH)()))},l=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e((0,a.tV)({method:"post",url:`${i}/chatbubble/${r.gk}/takeover_cancel/`,...(0,a.IT)({token:n})})),e({type:o.Fm})},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:o.un}),e((0,a.tV)({method:"post",url:`${i}/chatbubble/${r.gk}/user_started_typing/`,...(0,a.IT)({token:n})}))},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:o.Tz}),e((0,a.tV)({method:"post",url:`${i}/chatbubble/${r.gk}/user_stopped_typing/`,...(0,a.IT)({token:n})}))}},2832:(e,t,n)=>{"use strict";n.d(t,{So:()=>l,g0:()=>c,$A:()=>s});var r=n(8309);var o=n(5796),a=n(5965);const i=()=>({type:o.fI}),s=e=>async(t,n)=>{const{connection:{token:i},environment:{PAT_HOST:s}}=n();if(!i)throw new Error("Token missing");const{headers:l}=(0,a.IT)({token:i},{withCurrentUrl:!0}),{data:c,status:u}=await t((0,a.tV)({method:"post",url:`${s}/chatbubble/${r.gk}/auth/identify`,headers:l,data:{avatar_url:e.avatar_url,full_name:e.full_name,email:e.email,phone_number:e.phone_number}}));200===u&&t({type:o.e7,avatarUrl:c.avatar_url,fullName:c.full_name})},l=()=>async(e,t)=>{const{chatbubble:{chatId:n},connection:{token:s},auth:{getAuthToken:l},environment:{PAT_HOST:c}}=t();if(!n||!l)return void e(i());let u;try{u=await l(n)}catch(e){console.error("Chatbubble auth failed:",e),u=null}if(!u)return void e(i());const{headers:d}=(0,a.IT)({jwt:u,token:s},{withCurrentUrl:!0}),f=await e((0,a.tV)({method:"post",url:`${c}/chatbubble/${r.gk}/auth/chat`,headers:d},{onError:()=>e(i())}));null!=f&&f.data&&e({type:o.tl,token:u,avatarUrl:f.data.avatar_url,fullName:f.data.full_name})},c=()=>async(e,t)=>{const{auth:{isAuthenticated:n,isRefreshing:r,token:a,getAuthToken:i}}=t();if(!n)return null;if(r)return await new Promise((e=>{setTimeout(e,200)})),c()(e,t);i&&function(e){const t=function(e){if(!e)return null;const t=e.match(/^[A-Za-z0-9-_=]+\.([A-Za-z0-9-_=]+)\.?[A-Za-z0-9-_.+/=]*$/);if(!t)return null;try{return JSON.parse(atob(t[1]))}catch(e){return null}}(e);return!t||t.exp-Math.floor((new Date).getTime()/1e3)<30}(a)&&(e({type:o.xd}),await e(l()),e({type:o.L8}));const{auth:s}=t();return s.isAuthenticated?{Authorization:`Bearer ${s.token}`}:null}},6438:(e,t,n)=>{"use strict";n.d(t,{BW:()=>p,EU:()=>C,Jd:()=>m,L5:()=>w,PU:()=>T,QQ:()=>d,Qe:()=>_,TM:()=>h,VH:()=>f,mV:()=>E,re:()=>x,rg:()=>y,tq:()=>b,un:()=>k,xk:()=>g,xm:()=>v});var r=n(1984),o=n(8309),a=n(852),i=n(5796),s=n(8714),l=n(5965);const c=1500,u=(e,t)=>{if(e.feedbackFormType===o.MC.NONE)return!1;if(e.feedbackFormType===o.MC.EXTERNAL_LINK){var n,r,a;const{feedbackForm:o}=e;return(null===(n=o.external_link_url)||void 0===n?void 0:n[t])&&((null===(r=o.external_link_headline)||void 0===r?void 0:r[t])||(null===(a=o.external_link_text)||void 0===a?void 0:a[t]))}return!0},d=e=>(t,n)=>{const{chatHasStarted:r}=n().chatbubble;t({type:i.Rx,botKey:e}),r&&t((0,s.wh)())},f=function(e){let{skipRestart:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(n,r)=>{const{botKey:o,chatHasStarted:a}=r().chatbubble,{takenOver:s}=r().agent;n({type:i.AF,code:e}),t||!a||s||n((0,l.a$)(o,!0))}},p=()=>e=>{e({type:i.bQ})},h=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,n)=>{const{bot:o,chatbubble:{currentLanguage:a,botKey:s,optionsScreenOpen:d},connection:{token:f},feedback:{feedbackFormOpen:p},messages:{chatMessages:h},agent:{hasHadHandover:m}}=n(),g=o.noFeedbackAfterHandover&&m;d&&t({type:i.lh}),!e&&u(o,a)&&!p&&h&&!g&&h.length>1&&setTimeout((()=>t({type:i.jv,token:f})),o.fullscreenMode?0:c),t((0,l.a$)(s,e));try{(0,r.disconnect)()}catch(e){console.error(e)}}},m=()=>e=>{e({type:i.us})},g=()=>(e,t)=>{const{optionsScreenOpen:n}=t().chatbubble;n&&e({type:i.lh})},v=()=>(e,t)=>{const{agent:{takenOver:n},connection:{token:r},environment:{PAT_HOST:a},chatbubble:{chatHasStarted:s,hasRequestedGreeting:c},local:{labels:u}}=t();s||e({type:i.j5,chatHasStarted:!0}),!c&&!n&&(null==u?void 0:u.length)>0&&(e({type:i.Q_,hasRequestedGreeting:!0}),e((0,l.tV)({method:"post",url:`${a}/chatbubble/${o.gk}/manual_greet/`,...(0,l.IT)({token:r})})))},y=()=>(e,t)=>{const{token:n,feedbackFormOpen:r}=t().feedback;(n||r)&&e({type:i.iB}),e(v())},b=()=>(e,t)=>{const{pushMessages:n,alerts:r,bot:a,nudge:s}=t();n.show&&e({type:i.$D}),s.show&&e({type:i.LH}),(r.showTabNotification||r.showBubbleNotification)&&e({type:i.oy}),e({type:i.vo}),a.welcomePage&&a.welcomePageType!==o.JR.NONE||e(v())},x=()=>(e,t)=>{const{active:n,previouslyPoppedUp:r}=t().chatbubble;n||r||(e(b()),e({type:i.Bl}))},w=()=>e=>{e({type:i.JT,userIsIdle:!0}),(0,a.x)()},E=e=>(t,n)=>{const{userIsIdle:r}=n().chatbubble;r&&(t({type:i.JT,userIsIdle:!1}),(0,a.e)(e))},k=e=>(t,n)=>{var r,o;const{chatbubble:{contactDetailsButton:a}}=n();(null==a||null===(r=a.contact_details)||void 0===r?void 0:r.contact_type)===(null==e||null===(o=e.contact_details)||void 0===o?void 0:o.contact_type)?t({type:i.kp}):t({type:i.r1,button:e})},_=e=>t=>{t({type:i.iE,button:e})},C=e=>t=>{0===e.length?t({type:i.ZN}):t({type:i.PV,files:e})},T=()=>e=>{e({type:i.$R})}},8714:(e,t,n)=>{"use strict";n.d(t,{IW:()=>d,Mb:()=>c,W6:()=>p,oE:()=>u,wh:()=>f});var r=n(1984),o=n(8309),a=n(5796),i=n(2832),s=n(5965);const l="pusherTransportEncrypted",c=()=>(e,t)=>{const{connected:n}=t().connection;n||e({type:a.nm})},u=()=>(e,t)=>{const{connected:n}=t().connection;n&&e({type:a.xo})},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=JSON.parse(window.localStorage.getItem(l));t.indexOf("ws")<0&&n&&"ws"!==n.transport&&window.localStorage.removeItem(l),(0,r.startConfiguration)({auth:{...(0,s.IT)({token:e},{withVersion:!0})},disabledTransports:t}),(0,s.ew)(e)},f=function(){let{triggerDialogueSlug:e,languageCode:t,shouldGreet:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(l,c)=>{var u,f,p,h;const{local:{context:m,labels:g},chatbubble:{botKey:v,currentLanguage:y,disabledTransports:b},environment:{PAT_HOST:x,VERSION:w},bot:{includeDisabledLanguages:E}}=c();l({type:a.Q_,hasRequestedGreeting:n});const k={context:m,labels:g.join(","),language_code:t||y,trigger_dialogue_slug:e,include_disabled_languages:E,should_greet:n,version:w,tz:null===(u=Intl)||void 0===u||null===(f=u.DateTimeFormat)||void 0===f||null===(p=f.call(u))||void 0===p||null===(h=p.resolvedOptions())||void 0===h?void 0:h.timeZone},_=await l((0,s.tV)({method:"post",url:`${x}/chatbubble/${o.gk}/connect`,params:k,...(0,s.IT)({botKey:v},{withCurrentUrl:!0})}));if(!_)return;const{pusherConnected:C}=c().connection;if(C)try{(0,r.disconnect)()}catch(e){console.warn(e)}const{token:T,chat_id:S,created:I,all_greetings_hide_input:O}=_.data;l({type:a.M_,token:T}),l({type:a.FX,chatId:S,allGreetingsHideInput:O}),l({type:a.fQ,startedAt:I}),l((0,s.FQ)((new Date).toISOString())),d(T,b),l((0,i.So)())}},p=e=>t=>t({type:a.NB,triggerConfig:e})},6221:(e,t,n)=>{"use strict";n.d(t,{PU:()=>g.PU,re:()=>g.re,Fv:()=>A.Fv,K1:()=>r.K1,QQ:()=>g.QQ,lO:()=>h,NS:()=>I.NS,BW:()=>g.BW,nh:()=>E,lr:()=>M,xk:()=>g.xk,rg:()=>g.rg,wh:()=>v.wh,IW:()=>v.IW,W6:()=>v.W6,IT:()=>c.IT,yc:()=>A.yc,GO:()=>O.GO,jz:()=>S,HW:()=>a,l:()=>L.l,TR:()=>P.TR,TM:()=>g.TM,gL:()=>O.gL,U9:()=>A.U9,$A:()=>s.$A,Mb:()=>v.Mb,oE:()=>v.oE,cM:()=>c.cM,mV:()=>g.mV,L5:()=>g.L5,tq:()=>g.tq,o1:()=>N,Jd:()=>g.Jd,IY:()=>A.IY,QE:()=>I.QE,JH:()=>I.JH,mJ:()=>I.mJ,j6:()=>I.j6,fA:()=>x,wL:()=>w,EU:()=>g.EU,u1:()=>d,VH:()=>g.VH,iO:()=>I.iO,qX:()=>y,aJ:()=>I.aJ,PM:()=>_,K5:()=>C,Cw:()=>f,xB:()=>i,RA:()=>L.RA,QU:()=>T,DO:()=>L.DO,VB:()=>P.VB,Wg:()=>L.Wg,xm:()=>g.xm,a$:()=>c.a$,uC:()=>I.uC,vI:()=>A.vI,R2:()=>A.R2,dw:()=>A.dw,VM:()=>A.VM,un:()=>g.un,AA:()=>b,De:()=>m,qW:()=>L.qW,tV:()=>c.tV,Bc:()=>I.Bc,RR:()=>u,IM:()=>p,GV:()=>c.GV,D1:()=>r.D1,Yp:()=>r.Yp});var r=n(169),o=n(5796);const a=()=>e=>{e({type:o.oy})},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return n=>{n({type:o.$6,payload:{text:e}}),t>0&&setTimeout((()=>n({type:o.Rq})),t)}};var s=n(2832),l=n(8309),c=n(5965);const u=()=>(e,t)=>{const{isTypingTimeoutId:n}=t().bot;clearTimeout(n),e({type:o.wb,isTyping:!1,isTypingTimeoutId:null})},d=()=>(e,t)=>{const{isTypingTimeoutId:n,typingDuration:r}=t().bot;clearTimeout(n);const a=setTimeout((()=>e(u())),Math.max(r,15e3));e({type:o.wb,isTyping:!0,isTypingTimeoutId:a})},f=e=>t=>{t({type:o.Zf,splitTestLabel:e})},p=()=>e=>{e({type:o.MP})},h=()=>e=>{e({type:o.fz})},m=(e,t)=>async(n,r)=>{const{PAT_HOST:o}=r().environment,{botKey:a,currentLanguage:i}=r().chatbubble,{token:u}=r().connection,d=await n((0,s.g0)());n((0,c.tV)({method:"post",url:`${o}/chatbubble/${l.gk}/conversion/`,data:{split:e||"X",is_order:t,language_code:i},...(0,c.IT)({botKey:a,token:u},{withCurrentUrl:!0,extra:d})}))};var g=n(6438),v=n(8714);const y=e=>({type:o.ck,chatMessageId:e}),b=()=>({type:o.M$}),x=e=>(t,n)=>{const{bot:{feedbackFormType:r},feedback:{token:o},environment:{PAT_HOST:a}}=n(),i={feedback_type:r,rating:e};t((0,c.tV)({method:"post",url:`${a}/chatbubble/${l.gk}/feedback`,data:{feedback:i},...(0,c.IT)({token:o})}))},w=e=>(t,n)=>{const{feedback:{token:r},environment:{PAT_HOST:o}}=n();t((0,c.tV)({method:"patch",url:`${o}/chatbubble/${l.gk}/feedback`,data:{freeform_text:e},...(0,c.IT)({token:r})}))},E=()=>(e,t)=>{var n;e({type:o.iB}),null!==(n=t().chatbubble)&&void 0!==n&&n.active&&e({type:o.bQ})};var k=n(7890);const _=e=>t=>{t({type:k.h,context:e})},C=e=>(t,n)=>{if("string"!=typeof e)throw new Error("label needs to be a string, received "+typeof e);t({type:k.U,label:e});const{connection:{token:r},environment:{PAT_HOST:o},local:{labels:a}}=n();r&&t((0,c.tV)({method:"post",url:`${o}/chatbubble/${l.gk}/update_labels`,data:{labels:a},...(0,c.IT)({token:r})}))},T=e=>(t,n)=>{const{link_text:r,link_location:a,text_content:i}=e,{dismissed:s}=n().maintenanceAlert;s||setTimeout((()=>t({type:o.fr,linkText:r,linkLocation:a,textContent:i})),2e3)},S=()=>(e,t)=>{const{show:n}=t().maintenanceAlert;n&&e({type:o.zt})};var I=n(2445),O=n(5645),P=n(3589),A=n(3378);const N=e=>t=>{t({type:o.iS,imageUrl:e})},M=()=>e=>{e({type:o.Cb})};var L=n(1681)},2445:(e,t,n)=>{"use strict";n.d(t,{NS:()=>P,QE:()=>x,JH:()=>b,mJ:()=>C,j6:()=>A,iO:()=>w,aJ:()=>M,uC:()=>E,Bc:()=>T});var r=n(8721),o=n(1468),a=n(8309),i=n(2969);const s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce(((e,n)=>{let[r,o]=n;return{...e,...(0,i.Z)(r,t)?{}:{[r]:o}}}),{})}},l=function(){let{status:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!(e>=200&&e<=299)};var c=n(7110),u=n(5796),d=n(169),f=n(2832),p=n(6438),h=n(8714),m=n(5645),g=n(5965),v=n(3378);const y=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:a}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:a}},b=(e,t,n)=>(r,o)=>{const{botKey:a}=y(o);r((0,g.a$)(a,!0)),localStorage.setItem("kindly-chat-restart-message",JSON.stringify({message:e,exchangeId:t,newContext:n}))},x=(e,t)=>async(n,r)=>{const{PAT_HOST:o,token:i}=y(r),s=await n((0,f.g0)()),{headers:c}=(0,g.IT)({token:i},{withCurrentUrl:!0,extra:s}),d={message:e,temporaryId:t},p=await n((0,g.tV)({method:"post",url:`${o}/chatbubble/${a.gk}/message/`,data:d,headers:c},{onError:e=>{var r;n({type:u.x3,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));l(p)||(n({type:u.x3,...p.data}),n((0,v.OH)()))},w=e=>t=>{t({type:u.W3,formData:e})},E=function(e,t,n){let{responsePromise:i,tempId:s}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4?arguments[4]:void 0;return async(d,p)=>{const{PAT_HOST:h,token:m,local:b,forms:x}=y(p),E=await d((0,f.g0)()),{headers:k}=(0,g.IT)({token:m},{withCurrentUrl:!0,extra:E});x&&Object.values(x).forEach((e=>{if((null==e?void 0:e.formSubmitState)===o.xZ.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:o.xZ.UNANSWERED};d((0,g.tV)({method:"post",url:`${h}/chatbubble/${a.gk}/form/submit`,data:t,headers:k})),d(w({...e,formSubmitState:o.xZ.UNANSWERED}))}}));const _=s||(0,r.Z)();d({type:u.$v,data:{id:_,created:(new Date).toISOString(),message:e,buttonType:c}}),d((0,g.FQ)((new Date).toISOString()));const C={message:e,exchange_id:t,temporaryId:_,new_context:{...b.context,...n||{}}},T=i?await i:await d((0,g.tV)({method:"post",url:`${h}/chatbubble/${a.gk}/message/`,data:C,headers:k},{onError:e=>{var t;console.error(`/chatbubble/${a.gk}/message returned ${e.response.status}`),d({type:u.x3,temporaryId:_,status:null==e||null===(t=e.response)||void 0===t?void 0:t.status}),d({type:u.wb,isTyping:!1})}}));l(T)||(d({type:u.x3,...T.data}),d((0,v.OH)()))}},k=e=>({...e,temporaryId:(0,r.Z)()}),_=e=>{let{temporaryId:t}=e;return t},C=()=>async(e,t)=>{var n;const{bot:{id:o},chatbubble:{chatId:i,attachments:c},connection:{token:d},environment:{PAT_HOST:p}}=t(),h=await e((0,f.g0)()),{headers:m}=(0,g.IT)({token:d},{extra:h}),v=(0,r.Z)(),y=c.files.map(k).map(s("file"));e({type:u.yS,data:{attachments:y}}),e({type:u.ZN}),e({type:u.$v,data:{id:v,created:(new Date).toISOString(),attachment_ids:y.map(_),message:""}}),e((0,g.FQ)((new Date).toISOString()));const b=(t,n)=>{var r;e({type:u.x3,temporaryId:v,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:u.Ae,attachment:{...n,status:a.j3.ERROR}}):y.forEach((t=>e({type:u.Ae,attachment:{...t,status:a.j3.ERROR}})))},x=y.map(s("file","url")),w=`${p}/chatbubble/${a.gk}/attachment/create`,E={attachments:x,temporaryChatMessageId:v},C=await e((0,g.tV)({method:"post",url:w,data:E,headers:m},{onError:e=>b(e)}));if(l(C)||!Array.isArray(null==C||null===(n=C.data)||void 0===n?void 0:n.attachments))return;const[T,S]=C.data.attachments.reduce(((t,n)=>{let[r,o]=t,{id:a,temporary_id:i,upload_url:s}=n;return e({type:u.Ae,attachment:{temporaryId:i,id:a}}),[[...r,a],[...o,s]]}),[[],[]]),I={"x-goog-upload-bot-id":o,"x-goog-upload-chat-id":i},O=(P=c.files,A=S,"number"!=typeof(null==P?void 0:P.length)||P.length!==(null==A?void 0:A.length)?(console.error("Trying to zip non-array of arrays of unequal length"),[]):P.map(((e,t)=>[e,A[t]]))).map((async t=>{let[{file:n,...r},o]=t;const a=await(e=>new Promise(((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onabort=()=>n(new Error(r.error))})))(n),i={...I,"Content-Type":n.type};return await e((0,g.tV)({method:"put",url:o,data:a,headers:i},{onError:e=>b(e,r)}))}));var P,A;if((await Promise.all(O)).some(l))return;const N=`${p}/chatbubble/${a.gk}/attachment/uploads-complete`,M={attachmentIds:T,temporaryChatMessageId:v,exchangeId:c.exchangeId};e((0,g.FQ)((new Date).toISOString())),e((0,g.tV)({method:"post",url:N,data:M,headers:m},{onError:e=>b(e)}))},T=function(e){let{openChat:t,languageCode:n,tempId:o,responsePromise:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(s,c)=>{const{connection:{token:d},chatbubble:{currentLanguage:f}}=c(),{PAT_HOST:m}=c().environment;if(!d){const r={triggerDialogueSlug:e,languageCode:n,openChat:t};return s((0,h.W6)(r)),s((0,p.rg)()),void(t&&s((0,p.tq)()))}if(n&&n!==f){const e="Tried to trigger a dialogue in another language on an existing chat";s((0,g.cM)({message:e,level:"error",extra:{languageCode:n,currentLanguage:f}}))}const y=o||(0,r.Z)();s({type:u.JQ,data:{id:y,created:(new Date).toISOString(),exchangeId:e}}),s((0,g.FQ)((new Date).toISOString()));const b={exchange_id:e,temporaryId:y},{headers:x}=(0,g.IT)({token:d},{withCurrentUrl:!0}),w=i?await i:await s((0,g.tV)({method:"post",url:`${m}/chatbubble/${a.gk}/trigger/`,data:b,headers:x}));w&&!l(w)&&(t&&s((0,p.tq)()),s((0,v.OH)()))}},S=(e,t)=>!!t.find((t=>{let{buttons:n=[]}=t;return!!n.find((t=>{let{language_code:n,button_type:r}=t;return n===e&&(0,c.Z)(r)===a.Dx.HANDOVER_REQUEST}))})),I=(e,t)=>n=>{n({type:u.sS,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},O=(e,t,n)=>async(r,o)=>{const{connection:{token:i},environment:{PAT_HOST:s,VERSION:l}}=o(),c=await r((0,f.g0)()),{headers:u}=(0,g.IT)({token:i},{withCurrentUrl:!0,extra:c}),d={button:t,chatMessage:e,temporaryId:n,version:l},p=(null==(h=t.button_type)?void 0:h.toLowerCase())===a.Dx.PRIVACY_EXPORT.toLowerCase()?(0,m.Tt)():{};var h;return r((0,g.tV)({method:"post",url:`${s}/chatbubble/${a.gk}/button/click/`,data:d,headers:u,...p}))},P=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return async(i,s)=>{const{environment:{VERSION:l},messages:{chatMessages:f},chatbubble:{currentLanguage:h},local:v}=s(),y=(0,c.Z)(e.button_type),b=(0,r.Z)(),x={};o.length>0&&o.forEach((e=>{var r,o,s;e.button_type===a.Dx.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value?(x[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(s=e.slider_details)||void 0===s?void 0:s.value,i(I(i,t,e,b))):e.button_type===a.Dx.CHECKBOX.toLowerCase()&&n.find((t=>t.id===e.id))?(x[e.value]=e.value,i(I(t,e,b)),i(O(t,e,b))):x[e.value]=""}));const w=i(O(t,{...e,new_context:{...v.context,...x||{}}},b));switch(i({type:u.sS,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),y){case a.Dx.QUICK_REPLY:{const n={responsePromise:w,tempId:b};i(E(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case a.Dx.HANDOVER_REQUEST:if(!S(h,f)){const e={version:l};i((0,g.cM)({message:"Requested handover with no button",level:"error",extra:e}))}i((0,d.ZI)(w));break;case a.Dx.DIALOGUE_TRIGGER:case a.Dx.SUGGESTION_DIALOGUE_TRIGGER:i(T(e.value,{tempId:b,responsePromise:w}));break;case a.Dx.PRIVACY_EXPORT:i((0,m.gL)({responsePromise:w}));break;case a.Dx.PRIVACY_DELETE:i((0,m.GO)({responsePromise:w}));break;case a.Dx.CONTACT_DETAILS:i((0,p.un)(e));break;case a.Dx.UPLOAD_ATTACHMENT:i((0,p.Qe)(e))}}},A=(e,t)=>async(n,o)=>{const{connection:{token:i},environment:{PAT_HOST:s,VERSION:c}}=o(),d=(0,r.Z)(),p=e.contact_details.contact_type,h={...e,button_type:a.Dx.edit_contact_details};n({type:u.$v,data:{id:d,created:(new Date).toISOString(),message:t,buttons:[h],isContactDetails:!0}});const m=await n((0,f.g0)()),{headers:v}=(0,g.IT)({token:i},{withCurrentUrl:!0,extra:m}),y={contactType:p,value:t,version:c,buttons:[h],temporaryId:d},b=await n((0,g.tV)({method:"post",url:`${s}/chatbubble/${a.gk}/button/contact-details/`,data:y,headers:v}));l(b)||n({type:u.x3,...b.data})},N=((e,t,n)=>{let r,o=[];return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];n&&o.push(i),clearTimeout(r),r=setTimeout((()=>{n||e(...i);const t=o.slice(1).reduce(((e,t)=>n(t,e)),o[0]);e(...t),o=[]}),t)}})((async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:i},environment:{PAT_HOST:s,VERSION:l}}=n(),c=await t((0,f.g0)()),{headers:d}=(0,g.IT)({token:i},{withCurrentUrl:!0,extra:c}),p={chatMessageId:r,version:l};t({type:u.GP,id:r,index:o}),t((0,g.tV)({method:"patch",url:`${s}/chatbubble/${a.gk}/message-seen`,data:p,headers:d}))}),1500,((e,t)=>{const[{index:n}]=e,[{index:r}]=t;return n>r?e:t})),M=(e,t)=>(n,r)=>N({id:e,index:t},n,r)},1681:(e,t,n)=>{"use strict";n.d(t,{l:()=>f,RA:()=>h,DO:()=>p,Wg:()=>m,qW:()=>u,W6:()=>d});const r=(e,t)=>{const{type:n}=e;let r;return"Form"===n?r=(e=>{let{title:t,body_text:n,input_label:r,input_placeholder:o,languageCode:a}=e;return{sections:[{title:t[a],description:n[a]},{form:{input:{label:r[a],placeholder:o[a],required:!0},button:{title:"Send skjema",icon:"icon",type:"submit"}}}]}})({...e,languageCode:t}):"Product"===n?r=(e=>{var t;let{title:n,body_text:r,button_text:o,button_link:a,carousel_title:i,image_carousel:s,languageCode:l}=e;return{sections:[{title:n[l],description:r[l],buttons:[{label:o[l],value:a[l],button_type:"link",is_active:!0}]},{products:{title:i[l],items:null===(t=s[l])||void 0===t?void 0:t.map((e=>{let{title:t,alt_text:n,description:r,image_url:o,product_url:a,link_text:i,link_url:s,price:l}=e;return{title:t,image:o,linkText:i,linkUrl:s,productUrl:a,altText:n,description:r,price:l}}))}}]}})({...e,languageCode:t}):"Text"===n?r=(e=>{let{title:t,body_text:n,link_text:r,link_location:o,languageCode:a}=e;return{sections:[{title:t[a],description:n[a]},{link:{text:r[a],location:o[a]}}]}})({...e,languageCode:t}):"Multiple choice"===n?r=(e=>{let{title:t,body_text:n,button_blocks:r,languageCode:o}=e;return{sections:[{title:t[o],description:n[o]},{choices:{buttons:r.map((e=>{let{button_text:t,dialogue_id:n}=e;return{text:t[o],triggerDialogue:n}}))}}]}})({...e,languageCode:t}):"Custom"===n&&(r={}),r};var o=n(8309),a=n(6810),i=n(5796),s=n(2832),l=n(5965);const c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=t.find((e=>{let{active:t}=e;return t})),o=n||r.code;return e.enabled[o]},u=e=>{let{slug:t,eventType:n,label:r}=e;return async(e,u)=>{if(!t||!n)return;const{nudges:d,languages:f}=u().bot,{currentLanguage:p}=u().chatbubble,h=(e=>{var t,n,r,o,a;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(a=null==e?void 0:e.multiple_choice_nudges)&&void 0!==a?a:[]]})(d),m=h.find((e=>e.slug===t&&c(e,f,p)));m&&(e({type:i.hu,slug:t}),n!==i.aq&&n!==i.Eb||await e((e=>{let{targetNudge:t,eventType:n,label:r,currentLanguage:i}=e;return async(e,c)=>{const{botKey:u}=c().chatbubble,{PAT_HOST:d}=c().environment,{token:f}=c().connection,p=await e((0,s.g0)());e((0,l.tV)({method:"post",url:`${d}/chatbubble/${o.gk}/nudge/`,data:{session_id:(0,a.N)(),nudge_id:t.id,action:n,type:t.type,label:r||null,language_code:i},...(0,l.IT)({botKey:u,token:f},{withCurrentUrl:!0,extra:p})}))}})({targetNudge:m,eventType:n,label:r,currentLanguage:p})))}},d=e=>(t,n)=>{const{show:r,slug:o}=n().nudge;r&&t(u({slug:o,eventType:i.aq,label:e}))},f=(e,t)=>(n,r)=>{const{show:o,isCustom:a,slug:s,trackEvent:l}=r().nudge;if(o){if(n({type:i.LH}),a){const e=document.getElementById("kindly-custom-nudge");e&&e.parentNode.removeChild(e)}l&&n(u({slug:s,eventType:e?i.aq:i.LH,label:t}))}},p=e=>{let{nudgeLayout:t,slug:n,trackEvent:a}=e;return(e,s)=>{var l,d,f,p,h,m,g;const{nudges:v,languages:y}=s().bot,{currentLanguage:b}=s().chatbubble,{show:x}=s().pushMessages,w=null==t?void 0:t.language;let E,k=null!==(l=null==t?void 0:t.webhook)&&void 0!==l?l:null,_=null!==(d=null==t?void 0:t.dialogueId)&&void 0!==d?d:null,C=t;const T=y.filter((e=>{let{active:t}=e;return t}))[0],S=[...null!==(f=null==v?void 0:v.form_nudges)&&void 0!==f?f:[],...null!==(p=null==v?void 0:v.custom_nudges)&&void 0!==p?p:[],...null!==(h=null==v?void 0:v.product_nudges)&&void 0!==h?h:[],...null!==(m=null==v?void 0:v.text_nudges)&&void 0!==m?m:[],...null!==(g=null==v?void 0:v.multiple_choice_nudges)&&void 0!==g?g:[]],I=w||b||T.code,O=n||t.slug;if(O){var P,A,N,M,L,R,D;if(E=S.filter((e=>e.slug===O))[0],void 0===E)return;if(_=null!==(P=null===(A=E)||void 0===A?void 0:A.dialogue_id)&&void 0!==P?P:_,k=null!==(N=null===(M=E)||void 0===M?void 0:M.webhook)&&void 0!==N?N:k,C=r(E,I),C.sections=[...null!==(L=null===(R=C)||void 0===R?void 0:R.sections)&&void 0!==L?L:[],...null!==(D=null==t?void 0:t.sections)&&void 0!==D?D:[]],C.backdrop=null==t?void 0:t.backdrop,!c(E,y,I))return void console.warn("Nudge is disabled for the current language:",I)}else console.error("Please set up a nudge in the platform to get a slug!");a&&e(u({slug:O,eventType:i.Xz})),x&&e({type:i.$D}),e({slug:O,type:i.Xz,nudgeLayout:C,dialogue:_,webhook:k,nudgeType:o.r.TEMPLATE,trackEvent:a})}},h=e=>{let{content:t,slug:n,onRendered:r,trackEvent:a}=e;return(e,s)=>{const{show:l}=s().pushMessages;a&&e(u({slug:n,eventType:i.Fd})),l&&e({type:i.$D}),e({type:i.Fd,content:t,slug:n,onRendered:r,nudgeType:o.r.CUSTOM})}},m=e=>{let{nudge:t,languageCode:n}=e;return e=>{const{autopopupTime:o}=t,a=r(t,n);o&&0!==o?setTimeout((()=>e({type:i.Xz,nudgeLayout:a})),o):e({type:i.Xz,nudgeLayout:a})}}},5645:(e,t,n)=>{"use strict";n.d(t,{GO:()=>d,gL:()=>u,Tt:()=>c});var r=n(3162),o=n.n(r),a=n(8309),i=n(5796),s=n(5965);const l=5e3,c=()=>({transformResponse:e=>e,responseType:"text"}),u=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"html";return async(n,r)=>{var i;let l=e?await e:null;if(!l){const{connection:{token:e},environment:{PAT_HOST:o}}=r(),i=`${o}/chatbubble/${a.gk}/privacy/export/${t}`,{headers:u}=(0,s.IT)({token:e}),d=c();l=await n((0,s.tV)({method:"get",url:i,...d,headers:u}))}if(200!==(null===(i=l)||void 0===i?void 0:i.status))return;const{headers:u,data:d}=l,f=function(e){if(!e)return null;const t=e.match(/filename="(.+)"/);return t&&2===t.length?t[1]:null}(u["content-disposition"])||"export.json",p=new Blob([d],{type:u["content-type"]});o()(p,f)}},d=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:o},environment:{PAT_HOST:c}}=n(),u=`${c}/chatbubble/${a.gk}/privacy/delete/`,d=e?await e:await t((0,s.tV)({method:"delete",url:u,...(0,s.IT)({token:r})}));200===(null==d?void 0:d.status)&&(setTimeout((()=>t((0,s.a$)(o))),l),t({type:i.hK}),t({type:i.Ll}))}}},3589:(e,t,n)=>{"use strict";n.d(t,{Q6:()=>a,TR:()=>s,VB:()=>i});var r=n(2969),o=n(5796);const a={TAKEOVER:"takeover",MESSAGE:"message"},i=e=>(t,n)=>{const{dismissedMessages:i}=n().pushMessages,{autopopupTime:s,enabled:l,title:c,message:u}=e;if(!l||(0,r.Z)(c,i))return;const d={type:o.Ds,pushMessageTitle:c,pushMessageType:a.MESSAGE,pushMessageText:u};s&&0!==s?setTimeout((()=>t(d)),s):t(d)},s=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:o.$D})}},5965:(e,t,n)=>{"use strict";n.d(t,{IT:()=>h,cM:()=>T,FQ:()=>S,a$:()=>v,ew:()=>_,tV:()=>k,U6:()=>C,GV:()=>m});var r=n(9669),o=n.n(r),a=n(1984),i=n(8309),s=n(6810),l=n(5023),c=n(4401),u=n(4155),d=n(2969),f=n(4147),p=n(5796);const h=function(e){let{token:t,botKey:n,jwt:r}=e,{withCurrentUrl:o,withVersion:a,extra:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{headers:{...t?{"kindly-chatbubble-token":t}:{},...n?{"kindly-bot-key":n}:{},...r?{Authorization:`Bearer ${r}`}:{},...o?{"Current-Url":window.location.href}:{},...a?{"kindly-chat-version":f.i8}:{},...i}}},m=e=>async(t,n)=>{const{connection:{token:r},environment:{PAT_HOST:a}}=n();return r?o().patch(`${a}/chatbubble/${i.gk}/user_left/`,{},h({token:r,botKey:e})):null},g=()=>(e,t)=>{const{heartbeatId:n}=t().connection;n&&(clearTimeout(n),e({type:p.g8,heartbeatId:void 0}))},v=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return async(n,r)=>{const{agent:{takenOver:o,requestedTakeover:i}}=r();i?n({type:p.Fm}):o&&n({type:p.gG,data:{taken_over:!1}}),n({type:p.En}),n(m(e)),n(g());try{(0,a.disconnect)(),t||n({type:p.bQ})}catch(e){console.warn(e)}finally{n({type:p.Ll}),n({type:p.Rx,botKey:e,keepOpen:t}),n({type:p.uY}),t||setTimeout((()=>n({type:p.j5,chatHasStarted:!1})),300)}}},y=Object.freeze({MAX:3,TIMEOUT_MS:2e3,TIMEOUT_MULTIPLIER:2,RESPONSE_STATUSES:[401,403]});let b=0;const x=(e,t)=>function(n){if(!e.response||!(0,d.Z)(e.response.status,y.RESPONSE_STATUSES))return console.error(e),null;if(b+=1,b>y.MAX)return console.error(`${t.url} returned ${e.response.status}, max chats restarts exceeded`),null;console.warn(`${t.url} returned ${e.response.status}, starting new chat`);const r=y.TIMEOUT_MS*y.TIMEOUT_MULTIPLIER**(b-1);return setTimeout((()=>n(((e,t)=>{const{botKey:n}=t().chatbubble;e(v(n,!0))}))),r),null},w=()=>e=>{e(g()),e(((e,t)=>{const{heartbeatTTL:n}=t().bot,r=setTimeout((()=>e(((e,t)=>{const{connection:{heartbeatId:n,token:r},environment:{PAT_HOST:o}}=t();clearTimeout(n),e({type:p.g8,heartbeatId:void 0}),e(k({method:"post",url:`${o}/chatbubble/${i.gk}/heartbeat/`,data:{version:f.i8},...h({token:r})}))}))),.75*n*1e3);e({type:p.g8,heartbeatId:r})}))},E=e=>{let{chatMessages:t,buttonClicks:n}=e;return(null==n?void 0:n.length)>0||Boolean((null!=t?t:[]).find((e=>{let{from_bot:t}=e;return!t})))},k=function(e){let{onError:t,restartOnError:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(r,a)=>{if(!e.url)return console.error("Tried to call transport without supplying url"),null;if(!e.method)return console.error("Tried to call transport without supplying method"),null;const{bot:i,messages:l}=a();e.headers={"kindly-chat-version":f.i8,[s.w]:(0,s.N)(),...e.headers||{}};try{const t=await o()(e);return i.heartbeatEnabled&&E(l)&&r(w()),t}catch(o){return t?t(o,e):n?r(x(o,e)):null}}},_=e=>{const t=`private-chatbubble-${e}`;(0,a.subscribe)(t,"message",p.$v),(0,a.subscribe)(t,"takeover",p.gG),(0,a.subscribe)(t,"agent_started_typing",p.n2),(0,a.subscribe)(t,"agent_stopped_typing",p.JZ),(0,a.subscribe)(t,"pattern-context-match",p.YX),(0,a.subscribe)(t,"spell-correction",p.st),(0,a.subscribe)(t,"message-attachments-updated",p.X4),(0,a.subscribe)(t,"new-attachments",p.yS)},C=e=>{const t=`private-chatbubble-${e}`;(0,a.unsubscribe)(t,"message",p.$v),(0,a.unsubscribe)(t,"takeover",p.gG),(0,a.unsubscribe)(t,"agent_started_typing",p.n2),(0,a.unsubscribe)(t,"agent_stopped_typing",p.JZ),(0,a.unsubscribe)(t,"pattern-context-match",p.YX),(0,a.unsubscribe)(t,"spell-correction",p.st),(0,a.unsubscribe)(t,"message-attachments-updated",p.X4),(0,a.unsubscribe)(t,"new-attachments",p.yS)},T=e=>{let{message:t,error:n,level:r="info",extra:o={}}=e;return(e,a)=>{const s=a(),{connection:{token:d},environment:{PAT_HOST:f}}=s,p=(e=>{var t,n;let{level:r="info",error:o,message:a,reduxState:i,extra:s}=e;a||null!=o&&o.message||(console.error("Attempted to log without message"),a="No error message provided");const d=(0,c.Z)(i||{},l.Z),f={version:u.env.VERSION,release:u.env.IS_PURE_BUILD?`${u.env.VERSION}-pure`:u.env.VERSION,userAgent:navigator.userAgent,state:i?JSON.stringify(d):void 0,...s},p={message:null!==(t=a)&&void 0!==t?t:null==o?void 0:o.message,name:null==o?void 0:o.name,stack:null==o?void 0:o.stack,code:null==o?void 0:o.code,signal:null==o?void 0:o.signal};return{message:null!==(n=a)&&void 0!==n?n:null==o?void 0:o.message,level:r,extra:f,error:p}})({level:r,error:n,message:t,reduxState:s,extra:o});e(k({method:"post",url:`${f}/chatbubble/${i.gk}/log`,data:p,...h({token:d,withCurrentUrl:!0})}))}},S=e=>t=>{t({type:p.QA,messageSentTime:e})}},3378:(e,t,n)=>{"use strict";n.d(t,{Fv:()=>m,yc:()=>g,U9:()=>f,IY:()=>w,OH:()=>p,vI:()=>y,R2:()=>x,dw:()=>b,VM:()=>v});var r=n(8309),o=n(5363),a=n(3338),i=n(5165),s=n(5796),l=n(3311),c=n(5965);const u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return{...e,[n.replace(/_\w/g,(e=>e[1].toUpperCase()))]:r}}),{})},d=function(){let{status:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e!==r.j3.PROCESSING},f=()=>async(e,t)=>{const{agent:{takenOver:n,requestedTakeover:l},chatbubble:{active:f,startedAt:p,chatHasStarted:m,botKey:g},connection:{token:v},environment:{PAT_HOST:y},messages:{attachments:b,buttonClicks:x,chatMessages:w,messageSentTime:E}}=t();if(!v||!m)return;const[k]=w.filter((e=>{let{from_bot:t}=e;return t})).slice(-1),[_]=b.filter(d).slice(-1),C=((e,t)=>{let{created:n}=e,{created:r}=t;return n&&r?new Date(n)>new Date(r)?n:r:n||r})(null!=k?k:{},null!=_?_:{})||E||p||(new Date).toISOString(),T=await e((0,c.tV)({method:"get",url:`${y}/chatbubble/${r.gk}/latest`,params:{timestamp:C},...(0,c.IT)({token:v})},{onError:t=>{403===t.response.status?(console.warn(`/chatbubble/${r.gk}/latest returned 403, starting new chat`),e({type:s.Go,error:403}),e((0,c.a$)(g,!0))):console.error(t)}}));if(!T||!T.data)return;const{chatMessages:S,buttonClicks:I=[],takenOver:O,requestedTakeover:P,attachments:A}=T.data,N=(0,i.Z)(w),M=(0,o.Z)(x),L=S.filter(N),R=I.map(u).filter(M),D=L.length>0;var j,B;e((e=>async(t,n)=>{if(!(null!=e&&e.length)>0)return;const{attachments:o=[]}=n().messages,{newAttachments:i=[],updated:l=[]}=(0,a.Z)(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter((e=>{let{sender:t,status:n}=e;return t===r.B6.USER||n===r.j3.CLEAN}))}(e),(e=>o.find((e=>{let{id:t,temporaryId:n}=e;return e=>{let{id:r,temporaryId:o}=e;return t&&t===r||n&&n===o}})(e))?"updated":"newAttachments"));i.length>0&&t({type:s.yS,data:{attachments:i}}),l.length>0&&t({type:s.X4,data:{attachments:l}})})(A)),e(h(D)),n!==O&&e({type:s.gG,data:{taken_over:O}}),l!==P&&e({type:s.OM,requestedTakeover:P}),(j=L,B="created",(j||[]).slice().sort(((e,t)=>e[B]<t[B]?-1:1))).forEach((t=>{e({type:s.$v,data:t,skipTypingIndicator:!0})})),R.forEach((t=>e({type:s.sS,buttonClick:t}))),D&&!f&&e({type:s.vo})},p=()=>(e,t)=>{const{replyTimeoutId:n,takeoverPollIntervalId:o}=t().websocketFallback;if(clearTimeout(n),o)return;const a=setTimeout((()=>e(f())),r.Dw.REPLY_TIMEOUT_MS);e({type:l.sj,replyTimeoutId:a,replyTimeoutAttempts:1})},h=e=>(t,n)=>{const{replyTimeoutId:o,replyTimeoutAttempts:a}=n().websocketFallback;if(clearTimeout(o),0===a)return;if(e||!(a<r.Dw.REPLY_TIMEOUT_MAX_ATTEMPTS))return e||console.error(`Reply timeout failed more than ${r.Dw.REPLY_TIMEOUT_MAX_ATTEMPTS} times`),void t({type:l.Dl});const i=r.Dw.REPLY_TIMEOUT_MS*r.Dw.REPLY_TIMEOUT_MS_MULTIPLIER**a,s=setTimeout((()=>t(f())),i);t({type:l.sj,replyTimeoutId:s,replyTimeoutAttempts:a+1})},m=()=>(e,t)=>{const{replyTimeoutId:n}=t().websocketFallback;clearTimeout(n),e({type:l.Dl})},g=()=>(e,t)=>{const{takeoverPollIntervalId:n,takeoverRequestPollIntervalId:o}=t().websocketFallback;if(clearInterval(n),clearInterval(o),"number"==typeof n){const t=setInterval((()=>e(f())),r.Dw.TAKEOVER_POLL_INTERVAL_MS);e({type:l.wz,takeoverPollIntervalId:t})}if("number"==typeof o){const t=setInterval((()=>e(f())),r.Dw.TAKEOVER_REQUEST_POLL_INTERVAL_MS);e({type:l.SB,takeoverRequestPollIntervalId:t})}},v=()=>(e,t)=>{const{takeoverPollIntervalId:n,takeoverRequestPollIntervalId:o,replyTimeoutId:a}=t().websocketFallback;if(clearTimeout(a),clearTimeout(o),e({type:l.Dl}),e({type:l.ae}),n)return;const i=setInterval((()=>e(f())),r.Dw.TAKEOVER_POLL_INTERVAL_MS);e({type:l.wz,takeoverPollIntervalId:i})},y=()=>(e,t)=>{const{takeoverPollIntervalId:n}=t().websocketFallback;clearInterval(n),e({type:l.ln})},b=()=>(e,t)=>{const{takeoverRequestPollIntervalId:n}=t().websocketFallback;if(n)return;const o=setInterval((()=>e(f())),r.Dw.TAKEOVER_REQUEST_POLL_INTERVAL_MS);e({type:l.SB,takeoverRequestPollIntervalId:o})},x=()=>(e,t)=>{const{takeoverRequestPollIntervalId:n}=t().websocketFallback;clearInterval(n),e({type:l.ae})},w=()=>(e,t)=>{const{messages:{chatMessages:n}}=t();n.find((e=>e.triggered_chat_start||"greeting"===e.exchange_type))||e(f())}},6086:(e,t,n)=>{"use strict";n.d(t,{$u:()=>o,Ep:()=>f,I1:()=>d,I_:()=>y,NZ:()=>c,P8:()=>u,Q7:()=>i,Ut:()=>h,W$:()=>s,Wt:()=>r,ZI:()=>l,_p:()=>m,cY:()=>b,hU:()=>g,oU:()=>v,p2:()=>a,sY:()=>p});const r=e=>{let{agent:t}=e;return t},o=e=>{let{alerts:t}=e;return t},a=e=>{let{announcement:t}=e;return t},i=e=>{let{bot:t}=e;return t},s=e=>{let{chatbubble:t}=e;return t},l=e=>{let{connection:t}=e;return t},c=e=>{let{environment:t}=e;return t},u=e=>{let{inspector:t}=e;return t},d=e=>{let{feedback:t}=e;return t},f=e=>{let{maintenanceAlert:t}=e;return t},p=e=>{let{messages:t}=e;return t},h=e=>{let{privacy:t}=e;return t},m=e=>{let{pushMessages:t}=e;return t},g=e=>{let{lightBox:t}=e;return t},v=e=>{let{nudge:t}=e;return t},y=e=>{let{local:t}=e;return t},b=e=>{let{messages:{forms:t}}=e;return t}},8426:(e,t,n)=>{"use strict";n.d(t,{AO:()=>g,AV:()=>o,CX:()=>m,fr:()=>b,lE:()=>v,lt:()=>p,ob:()=>y,rQ:()=>a});var r=n(540);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.iv)(["animation-timing-function:ease;animation-iteration-count:1;animation-fill-mode:forwards;animation-duration:","ms;"],e)},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.iv)(["height:0;width:0;padding:0;transition:width 0.1ms ease ","ms,padding 0.1ms ease ","ms,height 0.1ms ease ","ms;"],e,e,e)},i=(0,r.F4)(["0%{opacity:0;transform:translateY(-10px);}100%{opacity:1;transform:translateY(0);}"]),s=(0,r.F4)(["0%{opacity:0;transform:translateY(10px);}100%{opacity:1;transform:translateY(0);}"]),l=(0,r.F4)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:1;transform:translateX(0);}"]),c=(0,r.F4)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:0.8;transform:translateX(0);}"]),u=(0,r.F4)(["0%{opacity:0;transform:translateX(15px);}100%{opacity:1;transform:translateX(0);}"]),d=(0,r.F4)(["0%{opacity:0;transform:translateY(-100%);}100%{opacity:1;transform:translateY(0);}"]),f=(0,r.F4)(["0%{opacity:0;}100%{opacity:1;}"]),p=(0,r.F4)(["50%{opacity:0.5;}"]),h=((0,r.F4)(["50%{opacity:0.2;}"]),(0,r.F4)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"])),m=(0,r.iv)([""," animation-name:",""],o(),f),g=(0,r.iv)([""," animation-name:",""],o(),i),v=(0,r.iv)([""," animation-name:",""],o(),s),y=(0,r.iv)([""," animation-name:",""],o(),l),b=((0,r.iv)([""," animation-name:",""],o(),c),(0,r.iv)([""," animation-name:",""],o(),u));(0,r.iv)([""," animation-name:",""],o(),d),(0,r.iv)(["animation:1.8s "," infinite 0.3s;"],h)},3497:(e,t,n)=>{"use strict";n.d(t,{I:()=>r});const r={default:"'IBMPlex', 'Helvetica Neue', Helvetica, Arial, sans-serif",KindlySans:"KindlySans"}},8260:(e,t,n)=>{"use strict";n.d(t,{O:()=>r});const r=()=>"\n #chatContainer:not(.using-tab) & {\n outline: none;\n }\n"},7599:(e,t,n)=>{"use strict";n.d(t,{H2:()=>l,H3:()=>c,H5:()=>u,nv:()=>i,sk:()=>s,zd:()=>d});var r=n(540),o=n(3497),a=n(9729);const i=r.ZP.p.withConfig({displayName:"typography__Paragraph",componentId:"sc-ifap29-0"})(["color:",";font-size:",";font-weight:normal;line-height:170%;font-family:",";"],a.O9.darkColor,a.JB.fontSizeP,o.I.default),s=(0,r.ZP)(i).withConfig({displayName:"typography__SmallParagraph",componentId:"sc-ifap29-1"})(["font-size:",";opacity:0.6;"],a.JB.fontSizeSmall),l=r.ZP.h2.withConfig({displayName:"typography__H2",componentId:"sc-ifap29-2"})(["color:",";font-size:",";font-weight:normal;margin:0 0 30px;line-height:30px;font-family:",";"],a.O9.darkColor,a.JB.fontSizeH2,o.I.default),c=r.ZP.h3.withConfig({displayName:"typography__H3",componentId:"sc-ifap29-3"})(["color:",";font-size:",";font-weight:normal;line-height:30px;margin:0 0 15px;font-family:",";"],a.O9.darkColor,a.JB.fontSizeH3,o.I.default),u=(r.ZP.h4.withConfig({displayName:"typography__H4",componentId:"sc-ifap29-4"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;font-family:",";"],a.O9.darkColor,a.JB.fontSizeH4,o.I.default),r.ZP.h5.withConfig({displayName:"typography__H5",componentId:"sc-ifap29-5"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;line-height:24px;font-family:",";"],a.O9.darkColor,a.JB.fontSizeH5,o.I.default)),d=(r.ZP.h6.withConfig({displayName:"typography__H6",componentId:"sc-ifap29-6"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;font-family:",";"],a.O9.darkColor,a.JB.fontSizeBase,o.I.default),r.ZP.span.withConfig({displayName:"typography__KindlySpan",componentId:"sc-ifap29-7"})(["color:",";font-family:",";opacity:1;a{color:",";text-decoration:none;:hover,:focus,:active,:visited{color:",";}}"],a.O9.primaryColor,o.I.KindlySans,a.O9.primaryColor,a.O9.primaryColor))},7212:(e,t,n)=>{"use strict";n.d(t,{FL:()=>p,fv:()=>u,qH:()=>f,rU:()=>s,uf:()=>l,zx:()=>c});var r=n(540),o=n(3497),a=n(8260),i=n(9729);const s=r.ZP.a.withConfig({displayName:"utils__Link",componentId:"sc-g08yf6-0"})(["text-decoration:underline;cursor:pointer;",""],a.O),l=(0,r.iv)(["border:0;text-align:center;border-radius:6px;font-weight:normal;background:none;cursor:pointer;text-transform:none;transition:all 0.2s ease;"]),c=r.ZP.button.withConfig({displayName:"utils__Button",componentId:"sc-g08yf6-1"})([""," ",""],l,a.O),u=r.ZP.div.withConfig({displayName:"utils__InputContainer",componentId:"sc-g08yf6-2"})(["overflow:",";max-height:83px;min-height:41px;height:","px;width:100%;min-width:0;@media ","{height:","px;}"],(e=>{let{hasFiles:t}=e;return t?"visible":"hidden"}),(e=>e.active?e.targetHeight:"41"),i.Uh.maxTablet,(e=>e.active?e.targetHeight:"44")),d=(0,r.iv)(["max-height:41px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),f=(0,r.iv)(["position:relative;z-index:2;margin-bottom:0;color:",";font-size:",";line-height:1.5;padding:10px 16px;background:",";background-color:",";background-image:none;border:0;resize:none;box-shadow:none;border-radius:21px;max-height:83px;font-family:",";width:100%;min-height:0;transition:transform 0.3s ease;",";",";&:focus{color:",";box-shadow:none;border:none;","}@media ","{font-size:16px;",";}"],(e=>e.theme.inputText),i.JB.fontSizeP,(e=>e.theme.inputBackground),(e=>e.theme.inputBackground),o.I.default,(e=>e.$hide&&"transform: translateY(-60px)"),(e=>!e.$active&&d),(e=>e.theme.inputText),a.O,i.Uh.maxTablet,(e=>!e.$active&&"max-height: 44px;")),p=(0,r.iv)(["position:relative;&:before{content:'';left:0;right:20px;top:-15px;z-index:1;height:20px;position:absolute;background:linear-gradient( 0deg,"," 0%,"," 25%,rgba(248,248,248,0) 100% );opacity:1;transition:opacity linear 300ms;","}"],(e=>e.theme.background),(e=>e.theme.background),(e=>{let{inspectorOpen:t}=e;return t?"height: 0":""}))},9729:(e,t,n)=>{"use strict";n.d(t,{FB:()=>i,JB:()=>a,O9:()=>r,OU:()=>c,Oz:()=>u,Uh:()=>s,eR:()=>o,sQ:()=>l});const r={darkColor:"#2c2c2c",primaryColor:"#0069ff",grayColor:"#edeeef",errorColor:"#fa4d1e",warningColor:"#ffca3a",successColor:"#50e39b",shadowColor:"rgba(0, 0, 0, 0.15)",shadowColorDark:"rgba(0, 0, 0, 0.3)"},o={textColor:"#333333",textColorLight:"#757575"},a={fontSizeSmall:"11px",fontSize12:"12px",fontSizeP:"14px",fontSizeH2:"26px",fontSizeH3:"22px",fontSizeH4:"19px",fontSizeH5:"16px"},i={tablet:"768px",phone:"500px"},s={minTablet:`(min-width: calc(${i.tablet} + 1px))`,maxTablet:`(max-width: ${i.tablet})`,maxPhone:`(max-width: ${i.phone})`,maxPhoneHeight:"(max-height: 760px)"},l={headerIndex:"15",overlayIndex:"20",contextMenuIndex:"30"},c={minWidth:190},u={icon:"10px",wrapper:"6px"}},6810:(e,t,n)=>{"use strict";n.d(t,{N:()=>a,w:()=>o});var r=n(8721);const o="kindly-chat-browser-id",a=()=>{const e=localStorage.getItem(o);if(!e){const e=(0,r.Z)();return localStorage.setItem(o,e),e}return e}},5363:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const r=e=>{let{buttonId:t,chatMessageId:n}=e;return`button-click-${n}-${t}`},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>!e.find((e=>r(t)===r(e)))}},8035:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=e=>e.replace(/_\w/g,(e=>e[1].toUpperCase()))},8506:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(2236),o=n.n(r),a=n(2969);const i="kindly-chat-utm",s=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]),l=()=>{const e=new(o())(window.location.search);let t=Array.from(e.entries()).reduce(((e,t)=>{let[n,r]=t;return"UTM_"===n.toUpperCase().substring(0,4)&&(0,a.Z)(n.toUpperCase().substring(4),s)?{...e,[n]:r}:e}),null);if(t)window.sessionStorage.setItem(i,JSON.stringify(t));else{const e=window.sessionStorage.getItem(i);t=e?JSON.parse(e):null}return t}},3868:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=t.split(".").reduce(((e,t)=>e?e[t]:void 0),e))&&void 0!==n?n:r}},2988:(e,t,n)=>{"use strict";function r(e,t,n){return o(e)?n:t}function o(e){let t=e;i(e)&&(t=function(e){const t=e.indexOf(",")>-1?",":" ";let n=(+(e=e.substr(4).split(")")[0].split(t))[0]).toString(16),r=(+e[1]).toString(16),o=(+e[2]).toString(16);return 1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),1===o.length&&(o=`0${o}`),`#${n}${r}${o}`}(e)),s(e)&&(t=e.replace(a,((e,t,n,r)=>`#${t}${t}${n}${n}${r}${r}`)));const n="#"===t.charAt(0)?t.substring(1,7):t,r=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map((e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4));return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179}n.d(t,{R:()=>r,u:()=>o});const a=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,i=e=>e.match(/^rgb/),s=e=>e.match(a)},6239:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e,t,n)=>e?e[t||n]||e.en:null},7423:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(6239);const o=(e,t,n)=>Object.entries(e).reduce(((e,o)=>{let[a,i]=o;return{...e,[a]:"string"==typeof i?i:(0,r.Z)(i,t,n)}}),{})},3338:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((t,n)=>{var r;return{...t,[e(n)]:[...null!==(r=t[e(n)])&&void 0!==r?r:[],n]}}),{})}},6394:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7110),o=n(9428);const a=e=>{let{button_type:t,...n}=e;return{...n,button_type:(0,o.Z)(t),category:(0,r.Z)(t)}}},4625:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(6394);const o=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.Z)}}},2969:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e,t)=>-1!==t.indexOf(e)},7110:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8309);const o=e=>{const t=(null!=e?e:"").toUpperCase();return"LINK"===t?r.Dx.EXTERNAL_LINK:"TAKEOVER_REQUEST"===t?r.Dx.HANDOVER_REQUEST:t}},2914:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).reduce(((t,n)=>({...t,...e(n)})),{})}},9904:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e,t)=>Boolean((e=>{const t=e.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\//g,"\\/").replace(/\?/g,"\\?");return new RegExp(t,"i")})(t).test(e))},5165:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=e=>t=>{let{id:n,chatbubble_temporary_id:r}=t;return!e.find((e=>{let{id:t}=e;return n===t||r===t}))}},9115:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},9428:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=e=>{const t=(null!=e?e:"").toLowerCase();return"external_link"===t?"link":"handover_request"===t?"takeover_request":t}},3242:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=()=>{}},6204:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2902);const o=e=>"number"==typeof e?new Date(e):(0,r.Z)(e)},4401:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2969);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.entries(e).reduce(((e,n)=>{let[o,a]=n;return{...e,...(0,r.Z)(o,t)?{[o]:a}:{}}}),{})}},7693:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});let r=null;async function o(){try{if(!r){const{default:e}=await Promise.resolve().then(n.bind(n,2326));r=new Audio(e)}await r.play()}catch(e){console.error("Could not play notification sound:",e)}}},7058:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(3946),o=n(1820),a=n(3882),i=n(2902),s=n(9013);const l=e=>{let{messageSentTime:t,persistStateLifespan:n}=e;if(t){if(-1===n)return!0;if(0!==n)return function(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(e),r=(0,s.Z)(t);return n.getTime()>r.getTime()}(function(e,t){(0,a.Z)(2,arguments);var n=(0,r.Z)(t);return(0,o.Z)(e,1e3*n)}((0,i.Z)(t),n),new Date)}return!1}},2236:(e,t,n)=>{var r=n(3926);e.exports=r},4883:(e,t,n)=>{var r=n(7475),o=n(9826);e.exports=function(e){if(r(e))return e;throw TypeError(o(e)+" is not a function")}},1851:(e,t,n)=>{var r=n(7475);e.exports=function(e){if("object"==typeof e||r(e))return e;throw TypeError("Can't set "+String(e)+" as a prototype")}},8479:e=>{e.exports=function(){}},5743:e=>{e.exports=function(e,t,n){if(e instanceof t)return e;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}},6059:(e,t,n)=>{var r=n(941);e.exports=function(e){if(r(e))return e;throw TypeError(String(e)+" is not an object")}},1692:(e,t,n)=>{var r=n(4529),o=n(3057),a=n(9413),i=function(e){return function(t,n,i){var s,l=r(t),c=o(l.length),u=a(i,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},2532:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},9697:(e,t,n)=>{var r=n(2885),o=n(7475),a=n(2532),i=n(9813)("toStringTag"),s="Arguments"==a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:s?a(t):"Object"==(r=a(t))&&o(t.callee)?"Arguments":r}},4160:(e,t,n)=>{var r=n(5981);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},1046:(e,t,n)=>{"use strict";var r=n(5143).IteratorPrototype,o=n(9290),a=n(1887),i=n(904),s=n(2077),l=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=o(r,{next:a(1,n)}),i(e,c,!1,!0),s[c]=l,e}},2029:(e,t,n)=>{var r=n(5746),o=n(5988),a=n(1887);e.exports=r?function(e,t,n){return o.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},1887:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7771:(e,t,n)=>{"use strict";var r=n(6887),o=n(2529),a=n(9417),i=n(7475),s=n(1046),l=n(249),c=n(8929),u=n(904),d=n(2029),f=n(9754),p=n(9813),h=n(2077),m=n(5143),g=a.PROPER,v=a.CONFIGURABLE,y=m.IteratorPrototype,b=m.BUGGY_SAFARI_ITERATORS,x=p("iterator"),w="keys",E="values",k="entries",_=function(){return this};e.exports=function(e,t,n,a,p,m,C){s(n,t,a);var T,S,I,O=function(e){if(e===p&&L)return L;if(!b&&e in N)return N[e];switch(e){case w:case E:case k:return function(){return new n(this,e)}}return function(){return new n(this)}},P=t+" Iterator",A=!1,N=e.prototype,M=N[x]||N["@@iterator"]||p&&N[p],L=!b&&M||O(p),R="Array"==t&&N.entries||M;if(R&&(T=l(R.call(new e)))!==Object.prototype&&T.next&&(o||l(T)===y||(c?c(T,y):i(T[x])||f(T,x,_)),u(T,P,!0,!0),o&&(h[P]=_)),g&&p==E&&M&&M.name!==E&&(!o&&v?d(N,"name",E):(A=!0,L=function(){return M.call(this)})),p)if(S={values:O(E),keys:m?L:O(w),entries:O(k)},C)for(I in S)(b||A||!(I in N))&&f(N,I,S[I]);else r({target:t,proto:!0,forced:b||A},S);return o&&!C||N[x]===L||f(N,x,L,{name:p}),h[t]=L,S}},5746:(e,t,n)=>{var r=n(5981);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},1333:(e,t,n)=>{var r=n(1899),o=n(941),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},3281:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},2861:(e,t,n)=>{var r=n(626);e.exports=r("navigator","userAgent")||""},3385:(e,t,n)=>{var r,o,a=n(1899),i=n(2861),s=a.process,l=a.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u?o=(r=u.split("."))[0]<4?1:r[0]+r[1]:i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},6759:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6887:(e,t,n)=>{"use strict";var r=n(1899),o=n(7475),a=n(9677).f,i=n(7252),s=n(4058),l=n(6843),c=n(2029),u=n(7457),d=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,p,h,m,g,v,y,b=e.target,x=e.global,w=e.stat,E=e.proto,k=x?r:w?r[b]:(r[b]||{}).prototype,_=x?s:s[b]||c(s,b,{})[b],C=_.prototype;for(p in t)n=!i(x?p:b+(w?".":"#")+p,e.forced)&&k&&u(k,p),m=_[p],n&&(g=e.noTargetGet?(y=a(k,p))&&y.value:k[p]),h=n&&g?g:t[p],n&&typeof m==typeof h||(v=e.bind&&n?l(h,r):e.wrap&&n?d(h):E&&o(h)?l(Function.call,h):h,(e.sham||h&&h.sham||m&&m.sham)&&c(v,"sham",!0),c(_,p,v),E&&(u(s,f=b+"Prototype")||c(s,f,{}),c(s[f],p,h),e.real&&C&&!C[p]&&c(C,p,h)))}},5981:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},6843:(e,t,n)=>{var r=n(4883);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},9417:(e,t,n)=>{var r=n(5746),o=n(7457),a=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,s=o(a,"name"),l=s&&"something"===function(){}.name,c=s&&(!r||r&&i(a,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},626:(e,t,n)=>{var r=n(4058),o=n(1899),a=n(7475),i=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},7098:(e,t,n)=>{var r=n(9697),o=n(4229),a=n(2077),i=n(9813)("iterator");e.exports=function(e){if(null!=e)return o(e,i)||o(e,"@@iterator")||a[r(e)]}},3476:(e,t,n)=>{var r=n(4883),o=n(6059),a=n(7098);e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(r(n))return o(n.call(e));throw TypeError(String(e)+" is not iterable")}},4229:(e,t,n)=>{var r=n(4883);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},1899:(e,t,n)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},7457:(e,t,n)=>{var r=n(9678),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(r(e),t)}},7748:e=>{e.exports={}},5463:(e,t,n)=>{var r=n(626);e.exports=r("document","documentElement")},2840:(e,t,n)=>{var r=n(5746),o=n(5981),a=n(1333);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},7026:(e,t,n)=>{var r=n(5981),o=n(2532),a="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?a.call(e,""):Object(e)}:Object},1302:(e,t,n)=>{var r=n(7475),o=n(3030),a=Function.toString;r(o.inspectSource)||(o.inspectSource=function(e){return a.call(e)}),e.exports=o.inspectSource},5402:(e,t,n)=>{var r,o,a,i=n(8019),s=n(1899),l=n(941),c=n(2029),u=n(7457),d=n(3030),f=n(4262),p=n(7748),h="Object already initialized",m=s.WeakMap;if(i||d.state){var g=d.state||(d.state=new m),v=g.get,y=g.has,b=g.set;r=function(e,t){if(y.call(g,e))throw new TypeError(h);return t.facade=e,b.call(g,e,t),t},o=function(e){return v.call(g,e)||{}},a=function(e){return y.call(g,e)}}else{var x=f("state");p[x]=!0,r=function(e,t){if(u(e,x))throw new TypeError(h);return t.facade=e,c(e,x,t),t},o=function(e){return u(e,x)?e[x]:{}},a=function(e){return u(e,x)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7475:e=>{e.exports=function(e){return"function"==typeof e}},7252:(e,t,n)=>{var r=n(5981),o=n(7475),a=/#|\.prototype\./,i=function(e,t){var n=l[s(e)];return n==u||n!=c&&(o(t)?r(t):!!t)},s=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},l=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},941:(e,t,n)=>{var r=n(7475);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},2529:e=>{e.exports=!0},6664:(e,t,n)=>{var r=n(7475),o=n(626),a=n(2302);e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return r(t)&&Object(e)instanceof t}},5143:(e,t,n)=>{"use strict";var r,o,a,i=n(5981),s=n(7475),l=n(9290),c=n(249),u=n(9754),d=n(9813),f=n(2529),p=d("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(o=c(c(a)))!==Object.prototype&&(r=o):h=!0),null==r||i((function(){var e={};return r[p].call(e)!==e}))?r={}:f&&(r=l(r)),s(r[p])||u(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},2077:e=>{e.exports={}},2497:(e,t,n)=>{var r=n(3385),o=n(5981);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8468:(e,t,n)=>{var r=n(5981),o=n(9813),a=n(2529),i=o("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),a&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[i]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8019:(e,t,n)=>{var r=n(1899),o=n(7475),a=n(1302),i=r.WeakMap;e.exports=o(i)&&/native code/.test(a(i))},9290:(e,t,n)=>{var r,o=n(6059),a=n(9938),i=n(6759),s=n(7748),l=n(5463),c=n(1333),u=n(4262),d="prototype",f="script",p=u("IE_PROTO"),h=function(){},m=function(e){return"<"+f+">"+e+"</"+f+">"},g=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;v="undefined"!=typeof document?document.domain&&r?g(r):(t=c("iframe"),n="java"+f+":",t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):g(r);for(var o=i.length;o--;)delete v[d][i[o]];return v()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=o(e),n=new h,h[d]=null,n[p]=e):n=v(),void 0===t?n:a(n,t)}},9938:(e,t,n)=>{var r=n(5746),o=n(5988),a=n(6059),i=n(4771);e.exports=r?Object.defineProperties:function(e,t){a(e);for(var n,r=i(t),s=r.length,l=0;s>l;)o.f(e,n=r[l++],t[n]);return e}},5988:(e,t,n)=>{var r=n(5746),o=n(2840),a=n(6059),i=n(3894),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(a(e),t=i(t),a(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},9677:(e,t,n)=>{var r=n(5746),o=n(6760),a=n(1887),i=n(4529),s=n(3894),l=n(7457),c=n(2840),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=i(e),t=s(t),c)try{return u(e,t)}catch(e){}if(l(e,t))return a(!o.f.call(e,t),e[t])}},249:(e,t,n)=>{var r=n(7457),o=n(7475),a=n(9678),i=n(4262),s=n(4160),l=i("IE_PROTO"),c=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){var t=a(e);if(r(t,l))return t[l];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof Object?c:null}},5629:(e,t,n)=>{var r=n(7457),o=n(4529),a=n(1692).indexOf,i=n(7748);e.exports=function(e,t){var n,s=o(e),l=0,c=[];for(n in s)!r(i,n)&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},4771:(e,t,n)=>{var r=n(5629),o=n(6759);e.exports=Object.keys||function(e){return r(e,o)}},6760:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},8929:(e,t,n)=>{var r=n(6059),o=n(1851);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return r(n),o(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},5623:(e,t,n)=>{"use strict";var r=n(2885),o=n(9697);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},9811:(e,t,n)=>{var r=n(7475),o=n(941);e.exports=function(e,t){var n,a;if("string"===t&&r(n=e.toString)&&!o(a=n.call(e)))return a;if(r(n=e.valueOf)&&!o(a=n.call(e)))return a;if("string"!==t&&r(n=e.toString)&&!o(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},4058:e=>{e.exports={}},7524:(e,t,n)=>{var r=n(9754);e.exports=function(e,t,n){for(var o in t)n&&n.unsafe&&e[o]?e[o]=t[o]:r(e,o,t[o],n);return e}},9754:(e,t,n)=>{var r=n(2029);e.exports=function(e,t,n,o){o&&o.enumerable?e[t]=n:r(e,t,n)}},8219:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},4911:(e,t,n)=>{var r=n(1899);e.exports=function(e,t){try{Object.defineProperty(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},904:(e,t,n)=>{var r=n(2885),o=n(5988).f,a=n(2029),i=n(7457),s=n(5623),l=n(9813)("toStringTag");e.exports=function(e,t,n,c){if(e){var u=n?e:e.prototype;i(u,l)||o(u,l,{configurable:!0,value:t}),c&&!r&&a(u,"toString",s)}}},4262:(e,t,n)=>{var r=n(8726),o=n(9418),a=r("keys");e.exports=function(e){return a[e]||(a[e]=o(e))}},3030:(e,t,n)=>{var r=n(1899),o=n(4911),a="__core-js_shared__",i=r[a]||o(a,{});e.exports=i},8726:(e,t,n)=>{var r=n(2529),o=n(3030);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.18.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},9413:(e,t,n)=>{var r=n(8459),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},4529:(e,t,n)=>{var r=n(7026),o=n(8219);e.exports=function(e){return r(o(e))}},8459:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},3057:(e,t,n)=>{var r=n(8459),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},9678:(e,t,n)=>{var r=n(8219);e.exports=function(e){return Object(r(e))}},6935:(e,t,n)=>{var r=n(941),o=n(6664),a=n(4229),i=n(9811),s=n(9813)("toPrimitive");e.exports=function(e,t){if(!r(e)||o(e))return e;var n,l=a(e,s);if(l){if(void 0===t&&(t="default"),n=l.call(e,t),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),i(e,t)}},3894:(e,t,n)=>{var r=n(6935),o=n(6664);e.exports=function(e){var t=r(e,"string");return o(t)?t:String(t)}},2885:(e,t,n)=>{var r={};r[n(9813)("toStringTag")]="z",e.exports="[object z]"===String(r)},5803:(e,t,n)=>{var r=n(9697);e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},9826:e=>{e.exports=function(e){try{return String(e)}catch(e){return"Object"}}},9418:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},2302:(e,t,n)=>{var r=n(2497);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},9813:(e,t,n)=>{var r=n(1899),o=n(8726),a=n(7457),i=n(9418),s=n(2497),l=n(2302),c=o("wks"),u=r.Symbol,d=l?u:u&&u.withoutSetter||i;e.exports=function(e){return a(c,e)&&(s||"string"==typeof c[e])||(s&&a(u,e)?c[e]=u[e]:c[e]=d("Symbol."+e)),c[e]}},6274:(e,t,n)=>{"use strict";var r=n(4529),o=n(8479),a=n(2077),i=n(5402),s=n(7771),l="Array Iterator",c=i.set,u=i.getterFor(l);e.exports=s(Array,"Array",(function(e,t){c(this,{type:l,target:r(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},7634:(e,t,n)=>{n(6274);var r=n(3281),o=n(1899),a=n(9697),i=n(2029),s=n(2077),l=n(9813)("toStringTag");for(var c in r){var u=o[c],d=u&&u.prototype;d&&a(d)!==l&&i(d,l,c),s[c]=s.Array}},5304:(e,t,n)=>{"use strict";n(6274);var r=n(6887),o=n(626),a=n(8468),i=n(9754),s=n(7524),l=n(904),c=n(1046),u=n(5402),d=n(5743),f=n(7475),p=n(7457),h=n(6843),m=n(9697),g=n(6059),v=n(941),y=n(5803),b=n(9290),x=n(1887),w=n(3476),E=n(7098),k=n(9813),_=o("fetch"),C=o("Request"),T=C&&C.prototype,S=o("Headers"),I=k("iterator"),O="URLSearchParams",P=O+"Iterator",A=u.set,N=u.getterFor(O),M=u.getterFor(P),L=/\+/g,R=Array(4),D=function(e){return R[e-1]||(R[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},j=function(e){try{return decodeURIComponent(e)}catch(t){return e}},B=function(e){var t=e.replace(L," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(D(n--),j);return t}},Z=/[!'()~]|%20/g,F={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},U=function(e){return F[e]},z=function(e){return encodeURIComponent(e).replace(Z,U)},H=function(e,t){if(t)for(var n,r,o=t.split("&"),a=0;a<o.length;)(n=o[a++]).length&&(r=n.split("="),e.push({key:B(r.shift()),value:B(r.join("="))}))},$=function(e){this.entries.length=0,H(this.entries,e)},V=function(e,t){if(e<t)throw TypeError("Not enough arguments")},q=c((function(e,t){A(this,{type:P,iterator:w(N(e).entries),kind:t})}),"Iterator",(function(){var e=M(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),W=function(){d(this,W,O);var e,t,n,r,o,a,i,s,l,c=arguments.length>0?arguments[0]:void 0,u=[];if(A(this,{type:O,entries:u,updateURL:function(){},updateSearchParams:$}),void 0!==c)if(v(c))if(e=E(c))for(n=(t=w(c,e)).next;!(r=n.call(t)).done;){if((i=(a=(o=w(g(r.value))).next).call(o)).done||(s=a.call(o)).done||!a.call(o).done)throw TypeError("Expected sequence with length 2");u.push({key:y(i.value),value:y(s.value)})}else for(l in c)p(c,l)&&u.push({key:l,value:y(c[l])});else H(u,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:y(c))},G=W.prototype;if(s(G,{append:function(e,t){V(arguments.length,2);var n=N(this);n.entries.push({key:y(e),value:y(t)}),n.updateURL()},delete:function(e){V(arguments.length,1);for(var t=N(this),n=t.entries,r=y(e),o=0;o<n.length;)n[o].key===r?n.splice(o,1):o++;t.updateURL()},get:function(e){V(arguments.length,1);for(var t=N(this).entries,n=y(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){V(arguments.length,1);for(var t=N(this).entries,n=y(e),r=[],o=0;o<t.length;o++)t[o].key===n&&r.push(t[o].value);return r},has:function(e){V(arguments.length,1);for(var t=N(this).entries,n=y(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){V(arguments.length,1);for(var n,r=N(this),o=r.entries,a=!1,i=y(e),s=y(t),l=0;l<o.length;l++)(n=o[l]).key===i&&(a?o.splice(l--,1):(a=!0,n.value=s));a||o.push({key:i,value:s}),r.updateURL()},sort:function(){var e,t,n,r=N(this),o=r.entries,a=o.slice();for(o.length=0,n=0;n<a.length;n++){for(e=a[n],t=0;t<n;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===n&&o.push(e)}r.updateURL()},forEach:function(e){for(var t,n=N(this).entries,r=h(e,arguments.length>1?arguments[1]:void 0,3),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new q(this,"keys")},values:function(){return new q(this,"values")},entries:function(){return new q(this,"entries")}},{enumerable:!0}),i(G,I,G.entries,{name:"entries"}),i(G,"toString",(function(){for(var e,t=N(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(z(e.key)+"="+z(e.value));return n.join("&")}),{enumerable:!0}),l(W,O),r({global:!0,forced:!a},{URLSearchParams:W}),!a&&f(S)){var Y=function(e){if(v(e)){var t,n=e.body;if(m(n)===O)return(t=e.headers?new S(e.headers):new S).has("content-type")||t.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),b(e,{body:x(0,String(n)),headers:x(0,t)})}return e};if(f(_)&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return _(e,arguments.length>1?Y(arguments[1]):{})}}),f(C)){var X=function(e){return d(this,X,"Request"),new C(e,arguments.length>1?Y(arguments[1]):{})};T.constructor=X,X.prototype=T,r({global:!0,forced:!0},{Request:X})}}e.exports={URLSearchParams:W,getState:N}},3926:(e,t,n)=>{var r=n(7610);n(7634),e.exports=r},7610:(e,t,n)=>{n(5304);var r=n(4058);e.exports=r.URLSearchParams},3882:(e,t,n)=>{"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,{Z:()=>r})},3946:(e,t,n)=>{"use strict";function r(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,{Z:()=>r})},1820:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3946),o=n(9013),a=n(3882);function i(e,t){(0,a.Z)(2,arguments);var n=(0,o.Z)(e).getTime(),i=(0,r.Z)(t);return new Date(n+i)}},2902:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s}),Math.pow(10,8);var r=6e4,o=36e5,a=n(3882),i=n(3946);function s(e,t){var n;(0,a.Z)(1,arguments);var s=(0,i.Z)(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==s&&1!==s&&0!==s)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var g,v=function(e){var t,n={},r=e.split(l.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],l.timeZoneDelimiter.test(n.date)&&(n.date=e.split(l.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var o=l.timezone.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}(e);if(v.date){var y=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?o:100*a,restDateString:e.slice((r[1]||r[2]).length)}}(v.date,s);g=function(e,t){if(null===t)return new Date(NaN);var n=e.match(c);if(!n)return new Date(NaN);var r=!!n[4],o=f(n[1]),a=f(n[2])-1,i=f(n[3]),s=f(n[4]),l=f(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}(t,s,l):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(h[t]||(m(e)?29:28))}(t,a,i)&&function(e,t){return t>=1&&t<=(m(e)?366:365)}(t,o)?(u.setUTCFullYear(t,a,Math.max(o,i)),u):new Date(NaN)}(y.restDateString,y.year)}if(!g||isNaN(g.getTime()))return new Date(NaN);var b,x=g.getTime(),w=0;if(v.time&&(w=function(e){var t=e.match(u);if(!t)return NaN;var n=p(t[1]),a=p(t[2]),i=p(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,a,i)?n*o+a*r+1e3*i:NaN}(v.time),isNaN(w)))return new Date(NaN);if(!v.timezone){var E=new Date(x+w),k=new Date(0);return k.setFullYear(E.getUTCFullYear(),E.getUTCMonth(),E.getUTCDate()),k.setHours(E.getUTCHours(),E.getUTCMinutes(),E.getUTCSeconds(),E.getUTCMilliseconds()),k}return b=function(e){if("Z"===e)return 0;var t=e.match(d);if(!t)return 0;var n="+"===t[1]?-1:1,a=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(a*o+i*r):NaN}(v.timezone),isNaN(b)?new Date(NaN):new Date(x+w+b)}var l={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},c=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,u=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,d=/^([+-])(\d{2})(?::?(\d{2}))?$/;function f(e){return e?parseInt(e):1}function p(e){return e&&parseFloat(e.replace(",","."))||0}var h=[31,null,31,30,31,30,31,31,30,31,30,31];function m(e){return e%400==0||e%4==0&&e%100!=0}},9013:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(3882);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e){(0,r.Z)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===o(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},7856:function(e){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,a=Object.freeze,i=Object.seal,s=Object.create,l="undefined"!=typeof Reflect&&Reflect,c=l.apply,u=l.construct;c||(c=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),i||(i=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var d,f=E(Array.prototype.forEach),p=E(Array.prototype.pop),h=E(Array.prototype.push),m=E(String.prototype.toLowerCase),g=E(String.prototype.match),v=E(String.prototype.replace),y=E(String.prototype.indexOf),b=E(String.prototype.trim),x=E(RegExp.prototype.test),w=(d=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(d,t)});function E(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return c(e,t,r)}}function k(e,r){t&&t(e,null);for(var o=r.length;o--;){var a=r[o];if("string"==typeof a){var i=m(a);i!==a&&(n(r)||(r[o]=i),a=i)}e[a]=!0}return e}function _(t){var n=s(null),r=void 0;for(r in t)c(e,t,[r])&&(n[r]=t[r]);return n}function C(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return E(n.get);if("function"==typeof n.value)return E(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}var T=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),S=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),I=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=a(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),A=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=a(["#text"]),M=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),R=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),D=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=i(/\{\{[\s\S]*|[\s\S]*\}\}/gm),B=i(/<%[\s\S]*|[\s\S]*%>/gm),Z=i(/^data-[\-\w.\u00B7-\uFFFF]/),F=i(/^aria-[\-\w]+$/),U=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=i(/^(?:\w+script|data):/i),H=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function V(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var q=function(){return"undefined"==typeof window?null:window},W=function(e,t){if("object"!==(void 0===e?"undefined":$(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q(),n=function(t){return e(t)};if(n.version="2.2.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,i=t.DocumentFragment,s=t.HTMLTemplateElement,l=t.Node,c=t.Element,u=t.NodeFilter,d=t.NamedNodeMap,E=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,G=t.Text,Y=t.Comment,X=t.DOMParser,K=t.trustedTypes,Q=c.prototype,J=C(Q,"cloneNode"),ee=C(Q,"nextSibling"),te=C(Q,"childNodes"),ne=C(Q,"parentNode");if("function"==typeof s){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var oe=W(K,r),ae=oe&&De?oe.createHTML(""):"",ie=o,se=ie.implementation,le=ie.createNodeIterator,ce=ie.createDocumentFragment,ue=r.importNode,de={};try{de=_(o).documentMode?o.documentMode:{}}catch(e){}var fe={};n.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==de;var pe=j,he=B,me=Z,ge=F,ve=z,ye=H,be=U,xe=null,we=k({},[].concat(V(T),V(S),V(I),V(P),V(N))),Ee=null,ke=k({},[].concat(V(M),V(L),V(R),V(D))),_e=null,Ce=null,Te=!0,Se=!0,Ie=!1,Oe=!1,Pe=!1,Ae=!1,Ne=!1,Me=!1,Le=!1,Re=!0,De=!1,je=!0,Be=!0,Ze=!1,Fe={},Ue=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ze=null,He=k({},["audio","video","img","source","image","track"]),$e=null,Ve=k({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",We="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml",Ye=Ge,Xe=null,Ke=o.createElement("form"),Qe=function(e){Xe&&Xe===e||(e&&"object"===(void 0===e?"undefined":$(e))||(e={}),e=_(e),xe="ALLOWED_TAGS"in e?k({},e.ALLOWED_TAGS):we,Ee="ALLOWED_ATTR"in e?k({},e.ALLOWED_ATTR):ke,$e="ADD_URI_SAFE_ATTR"in e?k(_(Ve),e.ADD_URI_SAFE_ATTR):Ve,ze="ADD_DATA_URI_TAGS"in e?k(_(He),e.ADD_DATA_URI_TAGS):He,_e="FORBID_TAGS"in e?k({},e.FORBID_TAGS):{},Ce="FORBID_ATTR"in e?k({},e.FORBID_ATTR):{},Fe="USE_PROFILES"in e&&e.USE_PROFILES,Te=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=e.SAFE_FOR_TEMPLATES||!1,Pe=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,Le=e.RETURN_DOM_FRAGMENT||!1,Re=!1!==e.RETURN_DOM_IMPORT,De=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,je=!1!==e.SANITIZE_DOM,Be=!1!==e.KEEP_CONTENT,Ze=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Ye=e.NAMESPACE||Ye,Oe&&(Se=!1),Le&&(Me=!0),Fe&&(xe=k({},[].concat(V(N))),Ee=[],!0===Fe.html&&(k(xe,T),k(Ee,M)),!0===Fe.svg&&(k(xe,S),k(Ee,L),k(Ee,D)),!0===Fe.svgFilters&&(k(xe,I),k(Ee,L),k(Ee,D)),!0===Fe.mathMl&&(k(xe,P),k(Ee,R),k(Ee,D))),e.ADD_TAGS&&(xe===we&&(xe=_(xe)),k(xe,e.ADD_TAGS)),e.ADD_ATTR&&(Ee===ke&&(Ee=_(Ee)),k(Ee,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&k($e,e.ADD_URI_SAFE_ATTR),Be&&(xe["#text"]=!0),Pe&&k(xe,["html","head","body"]),xe.table&&(k(xe,["tbody"]),delete _e.tbody),a&&a(e),Xe=e)},Je=k({},["mi","mo","mn","ms","mtext"]),et=k({},["foreignobject","desc","title","annotation-xml"]),tt=k({},S);k(tt,I),k(tt,O);var nt=k({},P);k(nt,A);var rt=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},ot=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ee[e])if(Me||Le)try{rt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},at=function(e){var t=void 0,n=void 0;if(Ne)e="<remove></remove>"+e;else{var r=g(e,/^[\r\n\t ]+/);n=r&&r[0]}var a=oe?oe.createHTML(e):e;if(Ye===Ge)try{t=(new X).parseFromString(a,"text/html")}catch(e){}t&&t.documentElement||((t=se.createDocument(Ye,"template",null)).documentElement.innerHTML=a);var i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Pe?t.documentElement:i},it=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},st=function(e){return"object"===(void 0===l?"undefined":$(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":$(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},lt=function(e,t,r){fe[e]&&f(fe[e],(function(e){e.call(n,t,r,Xe)}))},ct=function(e){var t,r=void 0;if(lt("beforeSanitizeElements",e,null),!((t=e)instanceof G||t instanceof Y||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof E&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI&&"function"==typeof t.insertBefore))return rt(e),!0;if(g(e.nodeName,/[\u0080-\uFFFF]/))return rt(e),!0;var o=m(e.nodeName);if(lt("uponSanitizeElement",e,{tagName:o,allowedTags:xe}),!st(e.firstElementChild)&&(!st(e.content)||!st(e.content.firstElementChild))&&x(/<[/\w]/g,e.innerHTML)&&x(/<[/\w]/g,e.textContent))return rt(e),!0;if(!xe[o]||_e[o]){if(Be&&!Ue[o]){var a=ne(e)||e.parentNode,i=te(e)||e.childNodes;if(i&&a)for(var s=i.length-1;s>=0;--s)a.insertBefore(J(i[s],!0),ee(e))}return rt(e),!0}return e instanceof c&&!function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ge,tagName:"template"});var n=m(e.tagName),r=m(t.tagName);if(e.namespaceURI===We)return t.namespaceURI===Ge?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===r||Je[r]):Boolean(tt[n]);if(e.namespaceURI===qe)return t.namespaceURI===Ge?"math"===n:t.namespaceURI===We?"math"===n&&et[r]:Boolean(nt[n]);if(e.namespaceURI===Ge){if(t.namespaceURI===We&&!et[r])return!1;if(t.namespaceURI===qe&&!Je[r])return!1;var o=k({},["title","style","font","a","script"]);return!nt[n]&&(o[n]||!tt[n])}return!1}(e)?(rt(e),!0):"noscript"!==o&&"noembed"!==o||!x(/<\/no(script|embed)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(r=e.textContent,r=v(r,pe," "),r=v(r,he," "),e.textContent!==r&&(h(n.removed,{element:e.cloneNode()}),e.textContent=r)),lt("afterSanitizeElements",e,null),!1):(rt(e),!0)},ut=function(e,t,n){if(je&&("id"===t||"name"===t)&&(n in o||n in Ke))return!1;if(Se&&x(me,t));else if(Te&&x(ge,t));else{if(!Ee[t]||Ce[t])return!1;if($e[t]);else if(x(be,v(n,ye,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!ze[e])if(Ie&&!x(ve,v(n,ye,"")));else if(n)return!1}return!0},dt=function(e){var t=void 0,r=void 0,o=void 0,a=void 0;lt("beforeSanitizeAttributes",e,null);var i=e.attributes;if(i){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee};for(a=i.length;a--;){var l=t=i[a],c=l.name,u=l.namespaceURI;if(r=b(t.value),o=m(c),s.attrName=o,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,lt("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(ot(c,e),s.keepAttr))if(x(/\/>/i,r))ot(c,e);else{Oe&&(r=v(r,pe," "),r=v(r,he," "));var d=e.nodeName.toLowerCase();if(ut(d,o,r))try{u?e.setAttributeNS(u,c,r):e.setAttribute(c,r),p(n.removed)}catch(e){}}}lt("afterSanitizeAttributes",e,null)}},ft=function e(t){var n=void 0,r=it(t);for(lt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)lt("uponSanitizeShadowNode",n,null),ct(n)||(n.content instanceof i&&e(n.content),dt(n));lt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,o){var a=void 0,s=void 0,c=void 0,u=void 0,d=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!st(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported){if("object"===$(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(st(e))return t.toStaticHTML(e.outerHTML)}return e}if(Ae||Qe(o),n.removed=[],"string"==typeof e&&(Ze=!1),Ze);else if(e instanceof l)1===(s=(a=at("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?a=s:a.appendChild(s);else{if(!Me&&!Oe&&!Pe&&-1===e.indexOf("<"))return oe&&De?oe.createHTML(e):e;if(!(a=at(e)))return Me?null:ae}a&&Ne&&rt(a.firstChild);for(var f=it(Ze?e:a);c=f.nextNode();)3===c.nodeType&&c===u||ct(c)||(c.content instanceof i&&ft(c.content),dt(c),u=c);if(u=null,Ze)return e;if(Me){if(Le)for(d=ce.call(a.ownerDocument);a.firstChild;)d.appendChild(a.firstChild);else d=a;return Re&&(d=ue.call(r,d,!0)),d}var p=Pe?a.outerHTML:a.innerHTML;return Oe&&(p=v(p,pe," "),p=v(p,he," ")),oe&&De?oe.createHTML(p):p},n.setConfig=function(e){Qe(e),Ae=!0},n.clearConfig=function(){Xe=null,Ae=!1},n.isValidAttribute=function(e,t,n){Xe||Qe({});var r=m(e),o=m(t);return ut(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],h(fe[e],t))},n.removeHook=function(e){fe[e]&&p(fe[e])},n.removeHooks=function(e){fe[e]&&(fe[e]=[])},n.removeAllHooks=function(){fe={}},n}()}()},2326:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r="http://localhost:8081/src/assets/audio/newagent.mp3"},3162:function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,i=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,i){var s=a.URL||a.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):r(l.href)?t(e,n,i):o(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,a),n);else if(r(e))t(e,n,a);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){o(i)}))}}:function(e,n,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var i="application/octet-stream"===e.type,s=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&s)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},c.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,d=u.createObjectURL(e);o?o.location=d:location.href=d,o=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});a.saveAs=i.saveAs=i,e.exports=i})?r.apply(t,[]):r)||(e.exports=o)},8971:(e,t,n)=>{"use strict";n.d(t,{ww:()=>Ea,c$:()=>ka});var r={};n.r(r),n.d(r,{anticipate:()=>be,backIn:()=>ge,backInOut:()=>ye,backOut:()=>ve,bounceIn:()=>we,bounceInOut:()=>Ee,bounceOut:()=>xe,circIn:()=>pe,circInOut:()=>me,circOut:()=>he,createAnticipateEasing:()=>le,createBackIn:()=>se,createExpoIn:()=>ie,createMirroredEasing:()=>ae,createReversedEasing:()=>oe,cubicBezier:()=>Re,easeIn:()=>ue,easeInOut:()=>fe,easeOut:()=>de,linear:()=>ce,mirrored:()=>re,reversed:()=>ne});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},o(e,t)},a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}var l=n(8156),c=function(){},u=0,d="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(e){return window.requestAnimationFrame(e)}:function(e){var t=Date.now(),n=Math.max(0,16.7-(t-u));u=t+n,setTimeout((function(){return e(u)}),n)},f=1/60*1e3,p=!0,h=!1,m=!1,g={delta:0,timestamp:0},v=["read","update","preRender","render","postRender"],y=function(e){return h=e},b=v.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,a=0,i=new WeakSet,s=new WeakSet,l={cancel:function(e){var t=n.indexOf(e);i.add(e),-1!==t&&n.splice(t,1)},process:function(c){var u,d;if(o=!0,t=(u=[n,t])[0],(n=u[1]).length=0,r=t.length)for(a=0;a<r;a++)(d=t[a])(c),!0!==s.has(d)||i.has(d)||(l.schedule(d),e(!0));o=!1},schedule:function(e,a,l){void 0===a&&(a=!1),void 0===l&&(l=!1),c("function"==typeof e,"Argument must be a function");var u=l&&o,d=u?t:n;i.delete(e),a&&s.add(e),-1===d.indexOf(e)&&(d.push(e),u&&(r=t.length))}};return l}(y),e}),{}),x=v.reduce((function(e,t){var n=b[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),h||_(),n.schedule(e,t,r),e},e}),{}),w=v.reduce((function(e,t){return e[t]=b[t].cancel,e}),{}),E=function(e){return b[e].process(g)},k=function(e){h=!1,g.delta=p?f:Math.max(Math.min(e-g.timestamp,40),1),p||(f=g.delta),g.timestamp=e,m=!0,v.forEach(E),m=!1,h&&(p=!1,d(k))},_=function(){h=!0,p=!0,m||d(k)},C=function(){return g};const T=x;var S=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},I=function(e){return e%1?Number(e.toFixed(5)):e},O=/(-)?(\d[\d\.]*)/g,P=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,A=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,N={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},M=a(a({},N),{transform:S(0,1)}),L=a(a({},N),{default:1}),R=function(e){return{test:function(t){return"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},D=R("deg"),j=R("%"),B=R("px"),Z=R("vh"),F=R("vw"),U=a(a({},j),{parse:function(e){return j.parse(e)/100},transform:function(e){return j.transform(100*e)}}),z=S(0,255),H=function(e){return void 0!==e.red},$=function(e){return void 0!==e.hue},V=function(e){return function(t){if("string"!=typeof t)return t;for(var n={},r=function(e){return e.substring(e.indexOf("(")+1,e.lastIndexOf(")"))}(t).replace(/(,|\/)/g," ").split(/ \s*/),o=0;o<4;o++)n[e[o]]=void 0!==r[o]?parseFloat(r[o]):1;return n}},q=a(a({},N),{transform:function(e){return Math.round(z(e))}});function W(e,t){return e.startsWith(t)&&A.test(e)}var G={test:function(e){return"string"==typeof e?W(e,"rgb"):H(e)},parse:V(["red","green","blue","alpha"]),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,a=void 0===o?1:o;return function(e){var t=e.alpha;return"rgba("+e.red+", "+e.green+", "+e.blue+", "+(void 0===t?1:t)+")"}({red:q.transform(t),green:q.transform(n),blue:q.transform(r),alpha:I(M.transform(a))})}},Y={test:function(e){return"string"==typeof e?W(e,"hsl"):$(e)},parse:V(["hue","saturation","lightness","alpha"]),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,a=void 0===o?1:o;return function(e){var t=e.alpha;return"hsla("+e.hue+", "+e.saturation+", "+e.lightness+", "+(void 0===t?1:t)+")"}({hue:Math.round(t),saturation:j.transform(I(n)),lightness:j.transform(I(r)),alpha:I(M.transform(a))})}},X=a(a({},G),{test:function(e){return"string"==typeof e&&W(e,"#")},parse:function(e){var t="",n="",r="";return e.length>4?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),t+=t,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),K={test:function(e){return"string"==typeof e&&A.test(e)||H(e)||$(e)},parse:function(e){return G.test(e)?G.parse(e):Y.test(e)?Y.parse(e):X.test(e)?X.parse(e):e},transform:function(e){return H(e)?G.transform(e):$(e)?Y.transform(e):e}},Q="${c}",J="${n}",ee=function(e){return"number"==typeof e?0:e},te={test:function(e){if("string"!=typeof e||!isNaN(e))return!1;var t=0,n=e.match(O),r=e.match(P);return n&&(t+=n.length),r&&(t+=r.length),t>0},parse:function(e){var t=e,n=[],r=t.match(P);r&&(t=t.replace(P,Q),n.push.apply(n,r.map(K.parse)));var o=t.match(O);return o&&n.push.apply(n,o.map(N.parse)),n},createTransformer:function(e){var t=e,n=0,r=e.match(P),o=r?r.length:0;if(r)for(var a=0;a<o;a++)t=t.replace(r[a],Q),n++;var i=t.match(O),s=i?i.length:0;if(i)for(a=0;a<s;a++)t=t.replace(i[a],J),n++;return function(e){for(var r=t,a=0;a<n;a++)r=r.replace(a<o?Q:J,a<o?K.transform(e[a]):I(e[a]));return r}},getAnimatableNone:function(e){var t=te.parse(e);return te.createTransformer(e)(t.map(ee))}},ne=function(e){return function(t){return 1-e(1-t)}},re=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},oe=ne,ae=re,ie=function(e){return function(t){return Math.pow(t,e)}},se=function(e){return function(t){return t*t*((e+1)*t-e)}},le=function(e){var t=se(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}},ce=function(e){return e},ue=ie(2),de=ne(ue),fe=re(ue),pe=function(e){return 1-Math.sin(Math.acos(e))},he=ne(pe),me=re(he),ge=se(1.525),ve=ne(ge),ye=re(ge),be=le(1.525),xe=function(e){var t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},we=function(e){return 1-xe(1-e)},Ee=function(e){return e<.5?.5*(1-xe(1-2*e)):.5*xe(2*e-1)+.5},ke=8,_e=.001,Ce=1e-7,Te=10,Se=11,Ie=1/(Se-1),Oe="undefined"!=typeof Float32Array,Pe=function(e,t){return 1-3*t+3*e},Ae=function(e,t){return 3*t-6*e},Ne=function(e){return 3*e},Me=function(e,t,n){return 3*Pe(t,n)*e*e+2*Ae(t,n)*e+Ne(t)},Le=function(e,t,n){return((Pe(t,n)*e+Ae(t,n))*e+Ne(t))*e};function Re(e,t,n,r){var o=Oe?new Float32Array(Se):new Array(Se);return function(){for(var t=0;t<Se;++t)o[t]=Le(t*Ie,e,n)}(),function(a){return e===t&&n===r?a:0===a?0:1===a?1:Le(function(t){for(var r,a,i,s=0,l=1,c=Se-1;l!==c&&o[l]<=t;++l)s+=Ie;return--l,r=(t-o[l])/(o[l+1]-o[l]),(i=Me(a=s+r*Ie,e,n))>=_e?function(t,r){for(var o=0,a=0;o<ke;++o){if(0===(a=Me(r,e,n)))return r;r-=(Le(r,e,n)-t)/a}return r}(t,a):0===i?a:function(t,r,o){var a,i,s=0;do{(a=Le(i=r+(o-r)/2,e,n)-t)>0?o=i:r=i}while(Math.abs(a)>Ce&&++s<Te);return i}(t,s,s+Ie)}(a),t,r)}}var De={x:0,y:0,z:0},je=function(e){return"number"==typeof e},Be=function(e){return function(t,n,r){return void 0!==r?e(t,n,r):function(r){return e(t,n,r)}}},Ze=Be((function(e,t,n){return Math.min(Math.max(n,e),t)})),Fe=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Ue=function(e){return Fe(e)&&e.hasOwnProperty("z")},ze=function(e,t){return Math.abs(e-t)},He=function(e,t){if(void 0===t&&(t=De),je(e)&&je(t))return ze(e,t);if(Fe(e)&&Fe(t)){var n=ze(e.x,t.x),r=ze(e.y,t.y),o=Ue(e)&&Ue(t)?ze(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},$e=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},Ve=function(e,t,n){return-n*e+n*t+e},qe=function(){return qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qe.apply(this,arguments)},We=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},Ge=[X,G,Y],Ye=function(e){return Ge.find((function(t){return t.test(e)}))},Xe=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},Ke=function(e,t){var n=Ye(e),r=Ye(t);c(!!n,Xe(e)),c(!!r,Xe(t)),c(n.transform===r.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var o=n.parse(e),a=r.parse(t),i=qe({},o),s=n===Y?Ve:We;return function(e){for(var t in i)"alpha"!==t&&(i[t]=s(o[t],a[t],e));return i.alpha=Ve(o.alpha,a.alpha,e),n.transform(i)}},Qe=function(e,t){return function(n){return t(e(n))}},Je=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(Qe)};var et=function(e,t){var n=e.slice(),r=n.length,o=e.map((function(e,n){return r=e,o=t[n],je(r)?function(e){return Ve(r,o,e)}:K.test(r)?Ke(r,o):rt(r,o);var r,o}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}};function tt(e){for(var t=te.parse(e),n=t.length,r=0,o=0,a=0,i=0;i<n;i++)r||"number"==typeof t[i]?r++:void 0!==t[i].hue?a++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:a}}var nt,rt=function(e,t){var n=te.createTransformer(t),r=tt(e),o=tt(t);return c(r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers,"Complex values '"+e+"' and '"+t+"' too different to mix. Ensure all colors are of the same type."),Je(et(r.parsed,o.parsed),n)},ot=function(e){return e},at=function(e){return void 0===e&&(e=ot),Be((function(t,n,r){var o=n-r,a=-(0-t+1)*(0-e(Math.abs(o)));return o<=0?n+a:n-a}))},it=(at(),at(Math.sqrt),function(e,t){return t?e*(1e3/t):0}),st=(Be((function(e,t,n){var r=t-e;return((n-e)%r+r)%r+e})),Ze(0,1),function(e){var t=e.onRead,n=e.onRender,r=e.uncachedValues,o=void 0===r?new Set:r,a=e.useCache,s=void 0===a||a;return function(e){void 0===e&&(e={});var r=i(e,[]),a={},l=[],c=!1;function u(e,t){e.startsWith("--")&&(r.hasCSSVariable=!0);var n=a[e];a[e]=t,a[e]!==n&&(-1===l.indexOf(e)&&l.push(e),c||(c=!0,T.render(d.render)))}var d={get:function(e,n){return void 0===n&&(n=!1),n||!s||o.has(e)||void 0===a[e]?t(e,r):a[e]},set:function(e,t){if("string"==typeof e)u(e,t);else for(var n in e)u(n,e[n]);return this},render:function(e){return void 0===e&&(e=!1),(c||!0===e)&&(n(a,r,l),c=!1,l.length=0),this}};return d}}),lt=/([a-z])([A-Z])/g,ct=function(e){return e.replace(lt,"$1-$2").toLowerCase()},ut=new Map,dt=new Map,ft=["Webkit","Moz","O","ms",""],pt=ft.length,ht="undefined"!=typeof document,mt=function(e,t){return dt.set(e,ct(t))},gt=function(e,t){void 0===t&&(t=!1);var n=t?dt:ut;return n.has(e)||(ht?function(e){nt=nt||document.createElement("div");for(var t=0;t<pt;t++){var n=ft[t],r=""===n,o=r?e:n+e.charAt(0).toUpperCase()+e.slice(1);if(o in nt.style||r){if(r&&"clipPath"===e&&dt.has(e))return;ut.set(e,o),mt(e,(r?"":"-")+ct(o))}}}(e):function(e){mt(e,e)}(e)),n.get(e)||e},vt=["","X","Y","Z"],yt=["translate","scale","rotate","skew","transformPerspective"].reduce((function(e,t){return vt.reduce((function(e,n){return e.push(t+n),e}),e)}),["x","y","z"]),bt=yt.reduce((function(e,t){return e[t]=!0,e}),{});function xt(e){return!0===bt[e]}function wt(e,t){return yt.indexOf(e)-yt.indexOf(t)}var Et=new Set(["originX","originY","originZ"]);function kt(e){return Et.has(e)}var _t=a(a({},N),{transform:Math.round}),Ct={color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:D,rotateX:D,rotateY:D,rotateZ:D,scale:L,scaleX:L,scaleY:L,scaleZ:L,skew:D,skewX:D,skewY:D,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,opacity:M,originX:U,originY:U,originZ:B,zIndex:_t,fillOpacity:M,strokeOpacity:M,numOctaves:_t},Tt=function(e){return Ct[e]},St=function(e,t){return t&&"number"==typeof e?t.transform(e):e},It="scrollLeft",Ot="scrollTop",Pt=new Set([It,Ot]),At=new Set([It,Ot,"transform"]),Nt={x:"translateX",y:"translateY",z:"translateZ"};function Mt(e){return"function"==typeof e}function Lt(e,t,n,r,o,a,i,s){void 0===t&&(t=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===a&&(a=[]),void 0===i&&(i=!1),void 0===s&&(s=!0);var l=!0,c=!1,u=!1;for(var d in e){var f=e[d],p=Tt(d),h=St(f,p);xt(d)?(c=!0,r[d]=h,a.push(d),l&&(p.default&&f!==p.default||!p.default&&0!==f)&&(l=!1)):kt(d)?(o[d]=h,u=!0):At.has(d)&&Mt(h)||(n[gt(d,i)]=h)}return(c||"function"==typeof e.transform)&&(n.transform=function(e,t,n,r,o,a){void 0===a&&(a=!0);var i="",s=!1;n.sort(wt);for(var l=n.length,c=0;c<l;c++){var u=n[c];i+=(Nt[u]||u)+"("+t[u]+") ",s="z"===u||s}return!s&&o?i+="translateZ(0)":i=i.trim(),Mt(e.transform)?i=e.transform(t,r?"":i):a&&r&&(i="none"),i}(e,r,a,l,t,s)),u&&(n.transformOrigin=(o.originX||"50%")+" "+(o.originY||"50%")+" "+(o.originZ||0)),n}function Rt(e){var t=void 0===e?{}:e,n=t.enableHardwareAcceleration,r=void 0===n||n,o=t.isDashCase,a=void 0===o||o,i=t.allowTransformNone,s=void 0===i||i,l={},c={},u={},d=[];return function(e){return d.length=0,Lt(e,r,l,c,u,d,a,s),l}}var Dt=st({onRead:function(e,t){var n=t.element,r=t.preparseOutput,o=Tt(e);if(xt(e))return o&&o.default||0;if(Pt.has(e))return n[e];var a=window.getComputedStyle(n,null).getPropertyValue(gt(e,!0))||0;return r&&o&&o.test(a)&&o.parse?o.parse(a):a},onRender:function(e,t,n){var r=t.element,o=t.buildStyles,a=t.hasCSSVariable;if(Object.assign(r.style,o(e)),a)for(var i=n.length,s=0;s<i;s++){var l=n[s];l.startsWith("--")&&r.style.setProperty(l,e[l])}-1!==n.indexOf(It)&&(r[It]=e[It]),-1!==n.indexOf(Ot)&&(r[Ot]=e[Ot])},uncachedValues:Pt}),jt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),Bt=.5,Zt=function(){return{style:{}}},Ft=function(e,t){return B.transform(e*t)},Ut={x:0,y:0,width:0,height:0};function zt(e,t,n){return"string"==typeof e?e:B.transform(t+n*e)}var Ht={enableHardwareAcceleration:!1,isDashCase:!1};function $t(e,t,n,r,o,a){void 0===t&&(t=Ut),void 0===r&&(r=Rt(Ht)),void 0===o&&(o=Zt()),void 0===a&&(a=!0);var s=e.attrX,l=e.attrY,c=e.originX,u=e.originY,d=e.pathLength,f=e.pathSpacing,p=void 0===f?1:f,h=e.pathOffset,m=void 0===h?0:h,g=r(i(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]));for(var v in g)"transform"===v?o.style.transform=g[v]:o[a&&!jt.has(v)?ct(v):v]=g[v];return(void 0!==c||void 0!==u||g.transform)&&(o.style.transformOrigin=function(e,t,n){return zt(t,e.x,e.width)+" "+zt(n,e.y,e.height)}(t,void 0!==c?c:Bt,void 0!==u?u:Bt)),void 0!==s&&(o.x=s),void 0!==l&&(o.y=l),void 0!==n&&void 0!==d&&(o[a?"stroke-dashoffset":"strokeDashoffset"]=Ft(-m,n),o[a?"stroke-dasharray":"strokeDasharray"]=Ft(d,n)+" "+Ft(p,n)),o}function Vt(e,t,n){void 0===n&&(n=!0);var r=Zt(),o=Rt(Ht);return function(a){return $t(a,e,t,o,r,n)}}var qt=st({onRead:function(e,t){var n=t.element;if(xt(e=jt.has(e)?e:ct(e))){var r=Tt(e);return r&&r.default||0}return n.getAttribute(e)},onRender:function(e,t){var n=t.element,r=(0,t.buildAttrs)(e);for(var o in r)"style"===o?Object.assign(n.style,r.style):n.setAttribute(o,r[o])}}),Wt=st({useCache:!1,onRead:function(e){return"scrollTop"===e?window.pageYOffset:window.pageXOffset},onRender:function(e){var t=e.scrollTop,n=void 0===t?0:t,r=e.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,n)}}),Gt=new WeakMap,Yt=function(e,t){return Gt.has(e)?Gt.get(e):function(e,t){var n,r,o,s;return e===window?n=Wt(e):function(e){return e instanceof HTMLElement||"function"==typeof e.click}(e)?n=function(e,t){void 0===t&&(t={});var n=t.enableHardwareAcceleration,r=t.allowTransformNone,o=i(t,["enableHardwareAcceleration","allowTransformNone"]);return Dt(a({element:e,buildStyles:Rt({enableHardwareAcceleration:n,allowTransformNone:r}),preparseOutput:!0},o))}(e,t):function(e){return e instanceof SVGElement||"ownerSVGElement"in e}(e)&&(o=function(e){try{return function(e){return"function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}(e)}catch(e){return{x:0,y:0,width:0,height:0}}}(r=e),s=function(e){return"path"===e.tagName}(r)&&r.getTotalLength?r.getTotalLength():void 0,n=qt({element:r,buildAttrs:Vt(o,s)})),c(void 0!==n,"No valid node provided. Node must be HTMLElement, SVGElement or window."),Gt.set(e,n),n}(e,t)};const Xt=function(e,t){var n="string"==typeof e?document.querySelector(e):e;return Yt(n,t)};var Kt=function(){return function(e,t){var n=this,r=e.middleware,o=e.onComplete;this.isActive=!0,this.update=function(e){n.observer.update&&n.updateObserver(e)},this.complete=function(){n.observer.complete&&n.isActive&&n.observer.complete(),n.onComplete&&n.onComplete(),n.isActive=!1},this.error=function(e){n.observer.error&&n.isActive&&n.observer.error(e),n.isActive=!1},this.observer=t,this.updateObserver=function(e){return t.update(e)},this.onComplete=o,t.update&&r&&r.length&&r.forEach((function(e){return n.updateObserver=e(n.updateObserver,n.complete)}))}}(),Qt=function(){function e(e){void 0===e&&(e={}),this.props=e}return e.prototype.create=function(t){return new e(t)},e.prototype.start=function(e){void 0===e&&(e={});var t=!1,n={stop:function(){}},r=this.props,o=(0,r.init)(function(e,t,n){var r=t.middleware;return new Kt({middleware:r,onComplete:n},"function"==typeof e?{update:e}:e)}(e,i(r,["init"]),(function(){t=!0,n.stop()})));return n=o?a({},n,o):n,t&&n.stop(),n},e.prototype.applyMiddleware=function(e){return this.create(a({},this.props,{middleware:this.props.middleware?[e].concat(this.props.middleware):[e]}))},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=1===e.length?e[0]:Je.apply(void 0,e);return this.applyMiddleware((function(e){return function(t){return e(n(t))}}))},e}(),Jt=function(e){return new Qt({init:e})},en=[B,j,D,Z,F],tn=function(e){return en.find((function(t){return t.test(e)}))},nn=function(e,t){return e(t)},rn=function(e,t){var n=t.from,r=t.to,o=i(t,["from","to"]),s=tn(n)||tn(r),l=s.transform,c=s.parse;return e(a({},o,{from:"string"==typeof n?c(n):n,to:"string"==typeof r?c(r):r})).pipe(l)},on=function(e){return function(t,n){var r=n.from,o=n.to,s=i(n,["from","to"]);return t(a({},s,{from:0,to:1})).pipe(e(r,o))}},an=on(Ke),sn=on(rt),ln=function(e,t){var n=function(e){var t=Object.keys(e),n=function(t,n){return void 0!==t&&!e[n](t)};return{getVectorKeys:function(e){return t.reduce((function(t,r){return n(e[r],r)&&t.push(r),t}),[])},testVectorProps:function(e){return e&&t.some((function(t){return n(e[t],t)}))}}}(t),r=n.testVectorProps,o=n.getVectorKeys;return function(t){if(!r(t))return e(t);var n=o(t),a=t[n[0]];return cn(a)(e,t,n)}},cn=function(e){return"number"==typeof e?nn:function(e){return Boolean(tn(e))}(e)?rn:K.test(e)?an:te.test(e)?sn:nn},un=function(e){return void 0===e&&(e={}),Jt((function(t){var n=t.complete,r=t.update,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,l=e.power,c=void 0===l?.8:l,u=e.timeConstant,d=void 0===u?350:u,f=e.restDelta,p=void 0===f?.5:f,h=e.modifyTarget,m=0,g=c*a,v=Math.round(s+g),y=void 0===h?v:h(v),b=T.update((function(e){var t=e.delta;m+=t;var o=-g*Math.exp(-m/d),a=o>p||o<-p;r(a?y+o:y),a||(w.update(b),n())}),!0);return{stop:function(){return w.update(b)}}}))},dn=ln(un,{from:N.test,modifyTarget:function(e){return"function"==typeof e},velocity:N.test}),fn=function(e){return void 0===e&&(e={}),Jt((function(t){var n=t.update,r=t.complete,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,l=e.to,c=void 0===l?0:l,u=e.stiffness,d=void 0===u?100:u,f=e.damping,p=void 0===f?10:f,h=e.mass,m=void 0===h?1:h,g=e.restSpeed,v=void 0===g?.01:g,y=e.restDelta,b=void 0===y?.01:y,x=a?-a/1e3:0,E=0,k=c-s,_=s,C=_,S=T.update((function(e){var t=e.delta;E+=t;var o=p/(2*Math.sqrt(d*m)),i=Math.sqrt(d/m)/1e3;if(C=_,o<1){var s=Math.exp(-o*i*E),l=i*Math.sqrt(1-o*o);_=c-s*((x+o*i*k)/l*Math.sin(l*E)+k*Math.cos(l*E))}else s=Math.exp(-i*E),_=c-s*(k+(x+i*k)*E);a=it(_-C,t);var u=Math.abs(a)<=v,f=Math.abs(c-_)<=b;u&&f?(n(_=c),w.update(S),r()):n(_)}),!0);return{stop:function(){return w.update(S)}}}))},pn=ln(fn,{from:N.test,to:N.test,stiffness:N.test,damping:N.test,mass:N.test,velocity:N.test}),hn=function(e){var t=e.from,n=void 0===t?0:t,r=e.velocity,o=void 0===r?0:r,i=e.min,s=e.max,l=e.power,c=void 0===l?.8:l,u=e.timeConstant,d=void 0===u?700:u,f=e.bounceStiffness,p=void 0===f?500:f,h=e.bounceDamping,m=void 0===h?10:h,g=e.restDelta,v=void 0===g?1:g,y=e.modifyTarget;return Jt((function(e){var t,r=e.update,l=e.complete,u=n,f=n,h=!1,g=function(e){return void 0!==i&&e<=i},b=function(e){return void 0!==s&&e>=s},x=function(e){return g(e)||b(e)},w=function(e){r(e),u=f,o=it((f=e)-u,C().delta),t&&!h&&function(e,t){return g(e)&&t<0||b(e)&&t>0}(e,o)&&k({from:e,velocity:o})},E=function(e,n){t&&t.stop(),t=e.start({update:w,complete:function(){n?n():l()}})},k=function(e){h=!0,E(pn(a({},e,{to:g(e.from)?i:s,stiffness:p,damping:m,restDelta:v})))};if(x(n))k({from:n,velocity:o});else if(0!==o){var _=dn({from:n,velocity:o,timeConstant:d,power:c,restDelta:x(n)?20:v,modifyTarget:y});E(_,(function(){x(f)?k({from:f,velocity:o}):l()}))}else l();return{stop:function(){return t&&t.stop()}}}))},mn=ln(hn,{from:N.test,velocity:N.test,min:N.test,max:N.test,damping:N.test,stiffness:N.test,modifyTarget:function(e){return"function"==typeof e}}),gn=function(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.ease,i=void 0===a?ce:a,s=e.reverseEase;return void 0!==s&&s&&(i=oe(i)),Jt((function(e){var t=e.update;return{seek:function(e){return t(e)}}})).pipe(i,(function(e){return Ve(n,o,e)}))},vn=ln(gn,{ease:function(e){return"function"==typeof e},from:N.test,to:N.test}),yn=Ze(0,1),bn=function(e){return void 0===e&&(e={}),Jt((function(t){var n,r=t.update,o=t.complete,a=e.duration,i=void 0===a?300:a,s=e.ease,l=void 0===s?de:s,c=e.flip,u=void 0===c?0:c,d=e.loop,f=void 0===d?0:d,p=e.yoyo,h=void 0===p?0:p,m=e.repeatDelay,g=void 0===m?0:m,v=e.from,y=void 0===v?0:v,b=e.to,x=void 0===b?1:b,E=e.elapsed,k=void 0===E?0:E,_=e.flipCount,C=void 0===_?0:_,S=e.yoyoCount,I=void 0===S?0:S,O=e.loopCount,P=void 0===O?0:O,A=vn({from:y,to:x,ease:l}).start(r),N=0,M=!1,L=function(e){var t;void 0===e&&(e=!1),A=vn({from:y=(t=[x,y])[0],to:x=t[1],ease:l,reverseEase:e}).start(r)},R=function(){N=yn($e(0,i,k)),A.seek(N)},D=function(){M=!0,n=T.update((function(e){var t,r=e.delta;k+=r,R(),!(t=M&&k>i+g)||(!t||f||u||h)&&(k=k-i-g,f&&P<f?(P++,1):u&&C<u?(C++,L(),1):h&&I<h&&(I++,L(I%2!=0),1))||(w.update(n),o&&T.update(o,!1,!0))}),!0)},j=function(){M=!1,n&&w.update(n)};return D(),{isActive:function(){return M},getElapsed:function(){return Ze(0,i,k)},getProgress:function(){return N},stop:function(){j()},pause:function(){return j(),this},resume:function(){return M||D(),this},seek:function(e){return k=Ve(0,i,e),T.update(R,!1,!0),this},reverse:function(){return L(),this}}}))},xn=Ze(0,1),wn=function(e,t,n){return Jt((function(r){var o=r.update,a=t.split(" ").map((function(t){return e.addEventListener(t,o,n),t}));return{stop:function(){return a.forEach((function(t){return e.removeEventListener(t,o,n)}))}}}))},En=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},kn=function(e,t){return void 0===t&&(t={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),t.clientX=t.x=e.clientX,t.clientY=t.y=e.clientY,t.pageX=e.pageX,t.pageY=e.pageY,t},_n=[En()];"undefined"!=typeof document&&wn(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(e){var t=e.touches,n=t.length;_n.length=0;for(var r=0;r<n;r++){var o=t[r];_n.push(kn(o))}}));var Cn=En();"undefined"!=typeof document&&wn(document,"mousedown mousemove",!0).start((function(e){kn(e,Cn)}));var Tn=function(e){return Jt((function(t){var n=t.complete,r=setTimeout(n,e);return{stop:function(){return clearTimeout(r)}}}))},Sn=function(e){return!isNaN(parseFloat(e))},In=function(){function e(e,t){var n=this,r=void 0===t?{}:t,o=r.transformer,a=r.parent;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),n.prev=n.current,n.current=n.transformer?n.transformer(e):e,n.updateSubscribers&&n.prev!==n.current&&n.updateSubscribers.forEach(n.notifySubscriber),n.children&&n.children.forEach(n.setChild),t&&n.renderSubscribers&&n.renderSubscribers.forEach(n.notifySubscriber);var r=C(),o=r.delta,a=r.timestamp;n.lastUpdated!==a&&(n.timeDelta=o,n.lastUpdated=a,T.postRender(n.scheduleVelocityCheck))},this.notifySubscriber=function(e){e(n.current)},this.scheduleVelocityCheck=function(){return T.postRender(n.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==n.lastUpdated&&(n.prev=n.current)},this.setChild=function(e){return e.set(n.current)},this.parent=a,this.transformer=o,this.set(e,!1),this.canTrackVelocity=Sn(this.current)}return e.prototype.addChild=function(t){void 0===t&&(t={});var n=new e(this.current,a({parent:this},t));return this.children||(this.children=new Set),this.children.add(n),n},e.prototype.removeChild=function(e){this.children&&this.children.delete(e)},e.prototype.subscribeTo=function(e,t){var n=this,r=function(){return t(n.current)};return e.add(r),function(){return e.delete(r)}},e.prototype.onChange=function(e){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,e)},e.prototype.onRenderRequest=function(e){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(e),this.subscribeTo(this.renderSubscribers,e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getVelocity=function(){return this.canTrackVelocity?it(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.parent&&this.parent.removeChild(this),this.stop()},e}();function On(e,t){return new In(e,t)}function Pn(e){var t=(0,l.useRef)(null);return null===t.current&&(t.current=e()),t.current}var An,Nn=function(e){return e instanceof In},Mn=st({onRead:function(){return null},onRender:function(e,t){return(0,t.onUpdate)(e)}}),Ln=function(){function e(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}return e.prototype.has=function(e){return this.values.has(e)},e.prototype.set=function(e,t){this.values.set(e,t),this.hasMounted&&this.bindValueToOutput(e,t)},e.prototype.get=function(e,t){var n=this.values.get(e);return void 0===n&&void 0!==t&&(n=new In(t),this.set(e,n)),n},e.prototype.forEach=function(e){return this.values.forEach(e)},e.prototype.bindValueToOutput=function(e,t){var n=this,r=t.onRenderRequest((function(t){return n.output&&n.output(e,t)})),o=t.onChange((function(t){n.onUpdate&&n.onUpdate.set(e,t)}));this.unsubscribers.has(e)&&this.unsubscribers.get(e)(),this.unsubscribers.set(e,(function(){r(),o()}))},e.prototype.setOnUpdate=function(e){this.onUpdate=void 0,e&&(this.onUpdate=Mn({onUpdate:e}))},e.prototype.setTransformTemplate=function(e){this.transformTemplate!==e&&(this.transformTemplate=e,this.updateTransformTemplate())},e.prototype.getTransformTemplate=function(){return this.transformTemplate},e.prototype.updateTransformTemplate=function(){this.output&&this.output("transform",this.transformTemplate)},e.prototype.mount=function(e){var t=this;this.hasMounted=!0,e&&(this.output=e),this.values.forEach((function(e,n){return t.bindValueToOutput(n,e)})),this.updateTransformTemplate()},e.prototype.unmount=function(){var e=this;this.values.forEach((function(t,n){var r=e.unsubscribers.get(n);r&&r()}))},e}(),Rn=new Set(["dragOriginX","dragOriginY"]),Dn=null,jn=(0,l.memo)((function(e){var t=e.innerRef,n=e.values,r=e.isStatic;return(0,l.useEffect)((function(){c(t.current instanceof Element,"No `ref` found. Ensure components created with `motion.custom` forward refs using `React.forwardRef`");var e=Xt(t.current,{preparseOutput:!1,enableHardwareAcceleration:!r});return n.mount((function(t,n){var r;e.set(t,n),null!==Dn&&(r=e,c(null!==Dn,"No sync render session found"),Dn&&Dn.push(r))})),function(){return n.unmount()}}),[]),null})),Bn=(An=function(e){return e.get()},function(e){var t={};return e.forEach((function(e,n){return t[n]=An(e)})),t}),Zn=new Set(["originX","originY","originZ"]),Fn=function(e){return Zn.has(e)},Un=function(e,t,n){var r=Bn(e),o=e.getTransformTemplate();return o&&(r.transform=t.transform?o({},t.transform):o),Lt(a(a({},t),r),!n)},zn=function(e){return Array.isArray(e)},Hn=function(e){return zn(e)?e[e.length-1]||0:e},$n=[N,B,j,D,F,Z,{test:function(e){return"auto"===e},parse:function(e){return e}}],Vn=s($n,[K,te]),qn=function(e){return function(t){return t.test(e)}},Wn=function(e){return $n.find(qn(e))},Gn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Yn=function(e){return{type:"spring",stiffness:700,damping:0===e?100:35}},Xn=function(){return{ease:"linear",duration:.3}},Kn=function(e){return{type:"keyframes",duration:.8,values:e}},Qn={x:Gn,y:Gn,z:Gn,rotate:Gn,rotateX:Gn,rotateY:Gn,rotateZ:Gn,scaleX:Yn,scaleY:Yn,scale:Yn,opacity:Xn,backgroundColor:Xn,color:Xn,default:Yn},Jn=function(e){var t=e.to,n=e.duration;return Jt((function(e){var r=e.update,o=e.complete;r(t),n?Tn(n).start({complete:o}):o()}))},er=function(e){return Array.isArray(e)?(c(4===e.length,"Cubic bezier arrays must contain four numerical values."),Re(e[0],e[1],e[2],e[3])):"string"==typeof e?(c(void 0!==r[e],"Invalid easing type '"+e+"'"),r[e]):e},tr=function(e){return Array.isArray(e)&&"number"!=typeof e[0]},nr=function(e,t){return!("zIndex"===e||"number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!te.test(t)||t.startsWith("url(")))},rr=function(e){return 1e3*e},or={tween:bn,spring:pn,keyframes:function(e){var t=e.easings,n=e.ease,r=void 0===n?ce:n,o=e.times,s=e.values,l=i(e,["easings","ease","times","values"]);t=Array.isArray(t)?t:function(e,t){return e.map((function(){return t||de})).splice(0,e.length-1)}(s,t),o=o||function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(s);var c=t.map((function(e,t){return vn({from:s[t],to:s[t+1],ease:e})}));return bn(a({},l,{ease:r})).applyMiddleware((function(e){return function(e,t,n){var r=e.length,o=r-1,a=o-1,i=t.map((function(e){return e.start(n)}));return function(t){t<=e[0]&&i[0].seek(0),t>=e[o]&&i[a].seek(1);for(var n=1;n<r&&!(e[n]>t||n===o);n++);var s=$e(e[n-1],e[n],t);i[n-1].seek(xn(s))}}(o,c,e)}))},inertia:mn,just:Jn},ar={tween:function(e){if(e.ease){var t=tr(e.ease)?e.ease[0]:e.ease;e.ease=er(t)}return e},keyframes:function(e){var t=e.from,n=(e.to,e.velocity,i(e,["from","to","velocity"]));if(n.values&&null===n.values[0]){var r=s(n.values);r[0]=t,n.values=r}return n.ease&&(n.easings=tr(n.ease)?n.ease.map(er):er(n.ease)),n.ease=ce,n}},ir=function(e,t,n,r){var o,s=t.get(),l=nr(e,s),c=nr(e,n),u=function(e,t,n){var r=n?n.delay:0;if(void 0===n||!function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection;var t=i(e,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(t).length}(n))return a({delay:r},function(e,t){var n;return n=zn(t)?Kn:Qn[e]||Qn.default,a({to:t},n(t))}(e,t));var o=n[e]||n.default||n;return!1===o.type?{delay:o.hasOwnProperty("delay")?o.delay:r,to:zn(t)?t[t.length-1]:t,type:"just"}:zn(t)?a(a({values:t,duration:.8,delay:r,ease:"linear"},o),{type:"keyframes"}):a({type:"tween",to:t,delay:r},o)}(e,n,r),d=u.type,f=void 0===d?"tween":d,p=i(u,["type"]),h=l&&c?or[f]:Jn,m=function(e,t){return ar[e]?ar[e](t):t}(f,a({from:s,velocity:t.getVelocity()},p));return((o=m).hasOwnProperty("duration")||o.hasOwnProperty("repeatDelay"))&&(m.duration&&(m.duration=rr(m.duration)),m.repeatDelay&&(m.repeatDelay=rr(m.repeatDelay))),[h,m]};function sr(e,t,n,r){var o=r.delay,a=void 0===o?0:o,s=i(r,["delay"]);return t.start((function(r){var o,l=ir(e,t,n,s),c=l[0],u=l[1],d=u.delay,f=i(u,["delay"]);void 0!==d&&(a=d);var p=function(){var e=c(f);o=e.start({update:function(e){return t.set(e)},complete:r})};return a?o=Tn(rr(a)).start({complete:p}):p(),function(){o&&o.stop()}}))}var lr=function(){function e(e){var t=this,n=e.values,r=e.readValueFromSource,o=e.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(e){return!t.values.has(e)},this.values=n,this.readValueFromSource=r,this.makeTargetAnimatable=o,this.values.forEach((function(e,n){return t.baseTarget[n]=e.get()}))}return e.prototype.setProps=function(e){this.props=e},e.prototype.setVariants=function(e){e&&(this.variants=e)},e.prototype.setDefaultTransition=function(e){e&&(this.defaultTransition=e)},e.prototype.setValues=function(e,t){var n=this,r=void 0===t?{}:t,o=r.isActive,i=void 0===o?new Set:o,s=r.priority,l=this.resolveVariant(e),c=l.target,u=l.transitionEnd;return c=this.transformValues(a(a({},c),u)),Object.keys(c).forEach((function(e){if(!i.has(e)&&(i.add(e),c)){var t=Hn(c[e]);if(n.values.has(e)){var r=n.values.get(e);r&&r.set(t)}else n.values.set(e,On(t));s||(n.baseTarget[e]=t)}}))},e.prototype.transformValues=function(e){var t=this.props.transformValues;return t?t(e):e},e.prototype.checkForNewValues=function(e){var t,n=Object.keys(e).filter(this.hasValue),r=n.length;if(r)for(var o=0;o<r;o++){var a=n[o],i=e[a],s=null;Array.isArray(i)&&(s=i[0]),null===s&&(s=this.readValueFromSource(a),c(null!==s,'No initial value for "'+a+'" can be inferred. Ensure an initial value for "'+a+'" is defined on the component.')),"string"==typeof s&&/^\d*\.?\d+$/.test(s)?s=parseFloat(s):(t=s,!Vn.find(qn(t))&&te.test(i)&&(s=te.getAnimatableNone(i))),this.values.set(a,On(s)),this.baseTarget[a]=s}},e.prototype.resolveVariant=function(e){if(!e)return{target:void 0,transition:void 0,transitionEnd:void 0};var t,n;"function"==typeof e&&(e=e(this.props.custom,(t=this.values,n={},t.forEach((function(e,t){return n[t]=e.get()})),n),function(e){var t={};return e.forEach((function(e,n){return t[n]=e.getVelocity()})),t}(this.values)));var r=e.transition;return{transition:void 0===r?this.defaultTransition:r,transitionEnd:e.transitionEnd,target:i(e,["transition","transitionEnd"])}},e.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},e.prototype.setOverride=function(e,t){this.overrides[t]=e,this.children&&this.children.forEach((function(n){return n.setOverride(e,t)}))},e.prototype.startOverride=function(e){var t=this.overrides[e];if(t)return this.start(t,{priority:e})},e.prototype.clearOverride=function(e){var t=this;if(this.children&&this.children.forEach((function(t){return t.clearOverride(e)})),this.overrides[e]){this.activeOverrides.delete(e);var n=this.getHighestPriority();this.resetIsAnimating(),n&&this.overrides[n]&&this.startOverride(n);var r=this.resolvedOverrides[e];if(r){var o={};for(var a in this.baseTarget)void 0!==r[a]&&(o[a]=this.baseTarget[a]);this.onStart(),this.animate(o).then((function(){return t.onComplete()}))}}},e.prototype.apply=function(e){return Array.isArray(e)?this.applyVariantLabels(e):"string"==typeof e?this.applyVariantLabels([e]):void this.setValues(e)},e.prototype.applyVariantLabels=function(e){var t=this,n=new Set;s(e).reverse().forEach((function(r){var o=t.resolveVariant(t.variants[r]),a=o.target,i=o.transitionEnd;i&&t.setValues(i,{isActive:n}),a&&t.setValues(a,{isActive:n}),t.children&&t.children.size&&t.children.forEach((function(t){return t.applyVariantLabels(e)}))}))},e.prototype.start=function(e,t){var n,r,o=this;return void 0===t&&(t={}),t.priority&&this.activeOverrides.add(t.priority),this.resetIsAnimating(t.priority),r=e,n=Array.isArray(r)?this.animateVariantLabels(e,t):"string"==typeof e?this.animateVariant(e,t):this.animate(e,t),this.onStart(),n.then((function(){return o.onComplete()}))},e.prototype.animate=function(e,t){var n=this,r=void 0===t?{}:t,o=r.delay,i=void 0===o?0:o,s=r.priority,l=void 0===s?0:s,c=r.transitionOverride,u=this.resolveVariant(e),d=u.target,f=u.transition,p=u.transitionEnd;if(c&&(f=c),!d)return Promise.resolve();if(d=this.transformValues(d),p&&(p=this.transformValues(p)),this.checkForNewValues(d),this.makeTargetAnimatable){var h=this.makeTargetAnimatable(d,p);d=h.target,p=h.transitionEnd}l&&(this.resolvedOverrides[l]=d),this.checkForNewValues(d);var m=[];for(var g in d){var v=this.values.get(g);if(v&&d&&void 0!==d[g]){var y=d[g];l||(this.baseTarget[g]=Hn(y)),this.isAnimating.has(g)||(this.isAnimating.add(g),m.push(sr(g,v,y,a({delay:i},f))))}}var b=Promise.all(m);return p?b.then((function(){n.setValues(p,{priority:l})})):b},e.prototype.animateVariantLabels=function(e,t){var n=this,r=s(e).reverse().map((function(e){return n.animateVariant(e,t)}));return Promise.all(r)},e.prototype.animateVariant=function(e,t){var n=this,r=!1,o=0,a=0,i=1,s=t&&t.priority||0,l=this.variants[e],c=l?function(){return n.animate(l,t)}:function(){return Promise.resolve()},u=this.children?function(){return n.animateChildren(e,o,a,i,s)}:function(){return Promise.resolve()};if(l&&this.children){var d=this.resolveVariant(l).transition;d&&(r=d.when||r,o=d.delayChildren||o,a=d.staggerChildren||a,i=d.staggerDirection||i)}if(r){var f="beforeChildren"===r?[c,u]:[u,c],p=f[1];return(0,f[0])().then(p)}return Promise.all([c(),u()])},e.prototype.animateChildren=function(e,t,n,r,o){if(void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===o&&(o=0),!this.children)return Promise.resolve();var a=[],i=(this.children.size-1)*n,s=1===r?function(e){return e*n}:function(e){return i-e*n};return Array.from(this.children).forEach((function(n,r){var i=n.animateVariant(e,{priority:o,delay:t+s(r)});a.push(i)})),Promise.all(a)},e.prototype.onStart=function(){var e=this.props.onAnimationStart;e&&e()},e.prototype.onComplete=function(){var e=this.props.onAnimationComplete;e&&e()},e.prototype.checkOverrideIsAnimating=function(e){for(var t=this.overrides.length,n=e+1;n<t;n++){var r=this.resolvedOverrides[n];if(r)for(var o in r)this.isAnimating.add(o)}},e.prototype.resetIsAnimating=function(e){void 0===e&&(e=0),this.isAnimating.clear(),e<this.getHighestPriority()&&this.checkOverrideIsAnimating(e),this.children&&this.children.forEach((function(t){return t.resetIsAnimating(e)}))},e.prototype.stop=function(){this.values.forEach((function(e){return e.stop()}))},e.prototype.addChild=function(e){this.children||(this.children=new Set),this.children.add(e),this.overrides.forEach((function(t,n){t&&e.setOverride(t,n)}))},e.prototype.removeChild=function(e){this.children&&this.children.delete(e)},e.prototype.resetChildren=function(){this.children&&this.children.clear()},e}(),cr=function(){function e(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return e.prototype.setVariants=function(e){this.variants=e,this.componentControls.forEach((function(t){return t.setVariants(e)}))},e.prototype.setDefaultTransition=function(e){this.defaultTransition=e,this.componentControls.forEach((function(t){return t.setDefaultTransition(e)}))},e.prototype.subscribe=function(e){var t=this;return this.componentControls.add(e),this.variants&&e.setVariants(this.variants),this.defaultTransition&&e.setDefaultTransition(this.defaultTransition),function(){return t.componentControls.delete(e)}},e.prototype.start=function(e,t){var n=this;if(this.hasMounted){var r=[];return this.componentControls.forEach((function(n){var o=n.start(e,{transitionOverride:t});r.push(o)})),Promise.all(r)}return new Promise((function(r){n.pendingAnimations.push({animation:[e,t],resolve:r})}))},e.prototype.set=function(e){return c(this.hasMounted,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),this.componentControls.forEach((function(t){return t.apply(e)}))},e.prototype.stop=function(){this.componentControls.forEach((function(e){return e.stop()}))},e.prototype.mount=function(){var e=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(t){var n=t.animation,r=t.resolve;return e.start.apply(e,n).then(r)}))},e.prototype.unmount=function(){this.hasMounted=!1,this.stop()},e}(),ur=(0,l.createContext)(null),dr=(0,l.createContext)({static:!1}),fr=function(e){return"string"==typeof e||Array.isArray(e)},pr=function(e){return e instanceof cr},hr=function(e,t,n,r,o){void 0===r&&(r=!1);var a,i,s=o.initial,c=o.animate,u=o.variants,d=o.whileTap,f=o.whileHover,p=(0,l.useContext)(ur);void 0!==(null===(a=p)||void 0===a?void 0:a.initial)&&(s=p.initial),!1!==s||pr(c)?"boolean"!=typeof s&&(i=s):i=c;var h=(0,l.useRef)(!1),m=u||fr(c)||fr(d)||fr(f)||pr(c),g=fr(i)?i:e.initial,v=fr(c)?c:e.animate,y=r?g:null,b=m&&fr(v)?v:null,x=(0,l.useMemo)((function(){return{controls:m?t:e.controls,initial:g,animate:v,values:n,hasMounted:h,isReducedMotion:e.isReducedMotion}}),[y,b,e.isReducedMotion]);return x.static=r,function(n,r){void 0===r&&(r=!1);var o,a=(0,l.useRef)(!0);(!r||r&&a.current)&&(o=i||e.initial)&&t.apply(o),a.current=!1}(0,!r),(0,l.useEffect)((function(){h.current=!0}),[]),x};var mr=function(e){var t=e.animate,n=e.variants,r=e.inherit;return(void 0===r||r)&&!!n&&(!t||t instanceof cr)},gr=function(e){var t=e.getValueControlsConfig,n=e.loadFunctionalityComponents,r=e.renderComponent;return(0,l.forwardRef)((function(e,o){var a=function(e){var t=e&&"function"!=typeof e?e:(0,l.useRef)(null);return e&&"function"==typeof e&&(0,l.useEffect)((function(){return e(t.current),function(){return e(null)}}),[]),t}(o),s=(0,l.useContext)(dr),c=s.static||e.static||!1,u=function(e){var t=Pn((function(){var t=new Ln;for(var n in e)Nn(e[n])&&!Rn.has(n)&&t.set(n,e[n]);return t}));return t.setOnUpdate(e.onUpdate),t.setTransformTemplate(e.transformTemplate),t}(e),d=function(e,t,n,r){void 0===t&&(t={});var o={},a=(0,l.useRef)({}).current;for(var i in t){var s=t[i];Nn(s)?e.set(i,s):n||!xt(i)&&!Fn(i)?o[i]=s:(e.has(i)?s!==a[i]&&e.get(i).set(s):e.set(i,On(s)),a[i]=s)}return r?r(o):o}(u,e.style,c,e.transformValues),f=mr(e),p=function(e,t,n){var r=t.variants,o=t.transition,a=(0,l.useContext)(dr).controls,s=(0,l.useContext)(ur),c=Pn((function(){return new lr(e)}));return s&&!s.isPresent||(c.resetChildren(),c.setProps(t),c.setVariants(r),c.setDefaultTransition(o)),(0,l.useEffect)((function(){n&&a&&a.addChild(c)})),(0,l.useEffect)((function(){return function(){t.onAnimationComplete;var e=i(t,["onAnimationComplete"]);c.setProps(e),a&&a.removeChild(c)}}),[]),c}(Pn((function(){return t(a,u)})),e,f),h=hr(s,p,u,c,e),m=c?null:n(a,u,e,s,p,f),g=r(a,d,u,e,c);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dr.Provider,{value:h},g),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(jn,{innerRef:a,values:u,isStatic:c}),m))}))},vr=["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"],yr=(0,l.createContext)({transformPagePoint:function(e){return e}});function br(e){return(0,l.useEffect)((function(){return function(){return e()}}),[])}function xr(e,t,n,r){if(n)return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function wr(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function Er(e){return!!e.touches}var kr={pageX:0,pageY:0};function _r(e){var t=e.touches[0]||e.changedTouches[0]||kr;return{x:t.pageX,y:t.pageY}}function Cr(e){var t=e.pageX,n=void 0===t?0:t,r=e.pageY;return{x:n,y:void 0===r?0:r}}function Tr(e){return{point:Er(e)?_r(e):Cr(e)}}var Sr,Ir=function(e,t){if(void 0===t&&(t=!1),e){var n=function(t){return e(t,Tr(t))};return t?function(e){if(e)return function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}}(n):n}},Or="undefined"!=typeof window,Pr=function(){return Or&&null===window.onpointerdown},Ar=function(){return Or&&null===window.ontouchstart},Nr=function(){return Or&&null===window.onmousedown},Mr={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Lr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Rr(e){return Pr()?e:Ar()?Lr[e]:Nr()?Mr[e]:e}function Dr(e,t,n,r){return xr(e,Rr(t),Ir(n,"pointerdown"===t),r)}function jr(e,t,n,r){return function(e,t,n,r){(0,l.useEffect)((function(){var o=e.current;if(n&&o)return xr(o,t,n,r)}),[e,t,n,r])}(e,Rr(t),Ir(n,"pointerdown"===t),r)}!function(e){e.subtract=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},e.relativeTo=function(e){var t;return function(n){var r=n.x,o=n.y,a=void 0!==t?t:t="string"==typeof e?document.getElementById(e):e;if(a){var i=a.getBoundingClientRect();return{x:r-i.left-window.scrollX,y:o-i.top-window.scrollY}}}}}(Sr||(Sr={}));var Br=!1;"undefined"!=typeof window&&document.addEventListener("touchmove",(function(e){Br&&e.preventDefault()}),{passive:!1});var Zr=function(){return Br=!1},Fr=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=zr(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=He(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,i=C().timestamp;r.history.push(a(a({},o),{timestamp:i}));var s=r.handlers,l=s.onStart,c=s.onMove;t||(l&&l(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,e)}}},!(Er(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var i=Ur(Tr(e),this.transformPagePoint),s=i.point,l=C().timestamp;this.history=[a(a({},s),{timestamp:l})];var c=t.onSessionStart;c&&c(e,zr(i,this.history));var u=Dr(window,"pointermove",(function(e,t){return r.handlePointerMove(e,t)})),d=Dr(window,"pointerup",(function(e,t){return r.handlePointerUp(e,t)}));this.removeListeners=function(){u&&u(),d&&d()}}}return e.prototype.handlePointerMove=function(e,t){this.lastMoveEvent=e,this.lastMoveEventInfo=Ur(t,this.transformPagePoint),wr(e)&&0===e.buttons?this.handlePointerUp(e,t):T.update(this.updatePoint,!0)},e.prototype.handlePointerUp=function(e,t){this.end();var n=this.handlers.onEnd;if(n){var r=zr(Ur(t,this.transformPagePoint),this.history);n&&n(e,r)}},e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),w.update(this.updatePoint),Zr()},e}();function Ur(e,t){return t?{point:t(e.point)}:e}function zr(e,t){var n=e.point;return{point:n,delta:Sr.subtract(n,$r(t)),offset:Sr.subtract(n,Hr(t)),velocity:Vr(t,.1)}}function Hr(e){return e[0]}function $r(e){return e[e.length-1]}function Vr(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=$r(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>rr(t)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var qr=function(e,t){return!!t&&(e===t||qr(e,t.parentElement))},Wr=["whileHover","whileTap","whileDrag"],Gr=function(e){return Wr.indexOf(e)+1};function Yr(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var Xr=Yr("dragHorizontal"),Kr=Yr("dragVertical");function Qr(e){var t=!1;if("y"===e)t=Kr();else if("x"===e)t=Xr();else{var n=Xr(),r=Kr();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}var Jr=Gr("whileTap"),eo=Gr("whileHover"),to=function(e){return function(t,n){wr(t)&&e(t,n)}};var no=function(e){return function(t){return e(t),null}},ro=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],oo={key:"gestures",shouldRender:function(e){return ro.some((function(t){return e.hasOwnProperty(t)}))},Component:no((function(e){var t,n,r=e.innerRef;(function(e,t){var n=e.onPan,r=e.onPanStart,o=e.onPanEnd,a=e.onPanSessionStart,i=n||r||o||a,s=(0,l.useRef)(null),c=(0,l.useContext)(yr).transformPagePoint,u={onSessionStart:a,onStart:r,onMove:n,onEnd:function(e,t){s.current=null,o&&o(e,t)}};(0,l.useEffect)((function(){null!==s.current&&s.current.updateHandlers(u)})),jr(t,"pointerdown",i&&function(e){s.current=new Fr(e,u,{transformPagePoint:c})}),br((function(){return s.current&&s.current.end()}))})(t=i(e,["innerRef"]),n=r),function(e,t){var n=e.onTap,r=e.onTapStart,o=e.onTapCancel,a=e.whileTap,i=e.controls,s=n||r||o||a,c=(0,l.useRef)(!1),u=(0,l.useRef)(null);function d(){u.current&&u.current(),u.current=null}a&&i&&i.setOverride(a,Jr);var f=(0,l.useRef)(null);f.current=function(e,r){var s=t.current;if(d(),c.current&&s){c.current=!1,i&&a&&i.clearOverride(Jr);var l=Qr(!0);l&&(l(),qr(s,e.target)?n&&n(e,r):o&&o(e,r))}},jr(t,"pointerdown",s?function(e,n){d(),u.current=Dr(window,"pointerup",(function(e,t){return f.current(e,t)})),t.current&&!c.current&&(c.current=!0,r&&r(e,n),i&&a&&i.startOverride(Jr))}:void 0),br(d)}(t,n),function(e,t){var n=e.whileHover,r=e.onHoverStart,o=e.onHoverEnd,a=e.controls;n&&a&&a.setOverride(n,eo),jr(t,"pointerenter",to((function(e,t){r&&r(e,t),n&&a&&a.startOverride(eo)}))),jr(t,"pointerleave",to((function(e,t){o&&o(e,t),n&&a&&a.clearOverride(eo)})))}(t,n)}))},ao=function(e){return"object"==typeof e&&e.hasOwnProperty("current")},io=function(e){return e},so=function(){function e(e){var t=e.ref,n=e.values,r=e.controls;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={transformPagePoint:io},this.point={},this.origin={x:On(0),y:On(0)},this.openGlobalLock=null,this.panSession=null,this.prevConstraintsBox={width:0,height:0,x:0,y:0},this.ref=t,this.values=n,this.controls=r}return e.prototype.start=function(e,t){var n=this,r=(void 0===t?{}:t).snapToCursor;void 0!==r&&r&&this.snapToCursor(e);var o=this.props.transformPagePoint;this.panSession=new Fr(e,{onSessionStart:function(){Br=!0,lo((function(e){var t=n.point[e];t&&t.stop()}))},onStart:function(e,t){if(n.constraintsNeedResolution){var r=n.props,o=r.dragConstraints,a=r.transformPagePoint;n.constraints=po(o,n.ref,n.point,a),n.applyConstraintsToPoint()}lo((function(e){var t=n.point[e];t&&n.origin[e].set(t.get())}));var i=n.props,s=i.drag,l=i.dragPropagation;if(!s||l||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Qr(s),n.openGlobalLock)){n.isDragging=!0,n.currentDirection=null;var c=n.props.onDragStart;c&&c(e,co(t,n.point))}},onMove:function(e,t){var r=n.props,o=r.dragPropagation,a=r.dragDirectionLock;if(o||n.openGlobalLock){var i=t.offset;if(a&&null===n.currentDirection){if(n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(i),null!==n.currentDirection){var s=n.props.onDirectionLock;s&&s(n.currentDirection)}}else{n.updatePoint("x",i),n.updatePoint("y",i);var l=n.props.onDrag;l&&l(e,co(t,n.point))}}},onEnd:function(e,t){n.stop(e,t)}},{transformPagePoint:o})},e.prototype.cancelDrag=function(){Zr(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},e.prototype.stop=function(e,t){var n;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,a=o.dragMomentum,i=o.dragElastic,s=o.onDragEnd;if(a||i){var l=t.velocity;this.animateDragEnd(l)}else this.recordBoxInfo(this.constraints);s&&s(e,co(t,this.point))}},e.prototype.recordBoxInfo=function(e){if(e){var t=e.right,n=e.left,r=e.bottom,o=e.top;this.prevConstraintsBox.width=(t||0)-(n||0),this.prevConstraintsBox.height=(r||0)-(o||0)}this.point.x&&(this.prevConstraintsBox.x=this.point.x.get()),this.point.y&&(this.prevConstraintsBox.y=this.point.y.get())},e.prototype.snapToCursor=function(e){var t=this,n=this.props.transformPagePoint,r=Tr(e).point,o=ho(this.ref,n),a=o.width/2+o.left+window.scrollX,i=o.height/2+o.top+window.scrollY,s={x:r.x-a,y:r.y-i};lo((function(e){var n=t.point[e];n&&t.origin[e].set(n.get())})),this.updatePoint("x",s),this.updatePoint("y",s)},e.prototype.setPoint=function(e,t){this.point[e]=t},e.prototype.updatePoint=function(e,t){var n=this.props,r=n.drag,o=n.dragElastic,a=this.point[e];if(fo(e,r,this.currentDirection)&&a){var i=go(e,this.origin[e].get()+t[e],this.constraints,o);a.set(i)}},e.prototype.updateProps=function(e){var t=this,n=e.drag,r=void 0!==n&&n,o=e.dragDirectionLock,s=void 0!==o&&o,l=e.dragPropagation,c=void 0!==l&&l,u=e.dragConstraints,d=void 0!==u&&u,f=e.dragElastic,p=void 0===f||f,h=e.dragMomentum,m=void 0===h||h,g=i(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=a({drag:r,dragDirectionLock:s,dragPropagation:c,dragConstraints:d,dragElastic:p,dragMomentum:m},g);var v=g._dragValueX,y=g._dragValueY,b=g.dragOriginX,x=g.dragOriginY;b&&(this.origin.x=b),x&&(this.origin.y=x),lo((function(e){if(fo(e,r,t.currentDirection)){var n="x"===e?v:y;t.setPoint(e,n||t.values.get(e,0))}})),this.constraintsNeedResolution=ao(d),this.constraints=this.constraintsNeedResolution?this.constraints||!1:d},e.prototype.applyConstraintsToPoint=function(e){var t=this;return void 0===e&&(e=this.constraints),lo((function(n){var r=t.point[n];r&&!r.isAnimating()&&go(n,r,e,0)}))},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,o=n.dragMomentum,i=n.dragElastic,s=n.dragTransition,l=n._dragValueX,c=n._dragValueY,u=n._dragTransitionControls,d=lo((function(n){var d;if(fo(n,r,t.currentDirection)){var f=t.constraints?uo(n,t.constraints):{},p=i?200:1e6,h=i?40:1e7,m=u||t.controls,g=a(a({type:"inertia",velocity:o?e[n]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1},s),f),v="x"===n?l:c;return v?sr(n,v,0,g):m.start(((d={})[n]=0,d.transition=g,d))}}));return Promise.all(d).then((function(){t.recordBoxInfo(t.constraints),t.scalePoint();var e=t.props.onDragTransitionEnd;e&&e()}))},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.transformPagePoint;if(ao(n)){var o=ho(n,r),a=ho(this.ref,r),i=function(t,n){var r=e.point[t];if(r){if(r.isAnimating())return r.stop(),void e.recordBoxInfo();var i=e.prevConstraintsBox[n]?(o[n]-a[n])/e.prevConstraintsBox[n]:1;r.set(e.prevConstraintsBox[t]*i)}};i("x","width"),i("y","height")}},e.prototype.mount=function(e){var t=this,n=Dr(e,"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=xr(window,"resize",(function(){return t.scalePoint()}));if(this.constraintsNeedResolution){var o=this.props,a=o.dragConstraints,i=o.transformPagePoint,s=po(a,this.ref,this.point,i);this.applyConstraintsToPoint(s),this.recordBoxInfo(s)}else!this.isDragging&&this.constraints&&this.applyConstraintsToPoint();return function(){n&&n(),r&&r(),t.cancelDrag()}},e}();function lo(e){return[e("x"),e("y")]}function co(e,t){return a(a({},e),{point:{x:t.x?t.x.get():0,y:t.y?t.y.get():0}})}function uo(e,t){var n=t.top,r=t.right,o=t.bottom,a=t.left;return"x"===e?{min:a,max:r}:{min:n,max:o}}function fo(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}function po(e,t,n,r){c(null!==e.current&&null!==t.current,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=ho(e,r),a=ho(t,r),i=o.left-a.left+mo(n.x),s=o.top-a.top+mo(n.y);return{top:s,left:i,right:o.width-a.width+i,bottom:o.height-a.height+s}}function ho(e,t){var n=e.current.getBoundingClientRect(),r=t({x:n.left,y:n.top}),o=r.x,a=r.y,i=t({x:n.width,y:n.height});return{left:o,top:a,width:i.x,height:i.y}}function mo(e){return e?e.get():0}function go(e,t,n,r){var o=t instanceof In?t.get():t;if(!n)return o;var a=uo(e,n),i=a.min,s=a.max;return void 0!==i&&o<i?o=r?vo(i,o,r):Math.max(i,o):void 0!==s&&o>s&&(o=r?vo(s,o,r):Math.min(s,o)),t instanceof In&&t.set(o),o}function vo(e,t,n){return Ve(e,t,"number"==typeof n?n:.35)}var yo={key:"drag",shouldRender:function(e){return!!e.drag},Component:no((function(e){var t=e.innerRef,n=e.values,r=e.controls;return function(e,t,n,r){var o=e.dragControls,i=(0,l.useContext)(yr).transformPagePoint,s=Pn((function(){return new so({ref:t,values:n,controls:r})}));s.updateProps(a(a({},e),{transformPagePoint:i})),(0,l.useEffect)((function(){return o&&o.subscribe(s)}),[s]),(0,l.useEffect)((function(){return s.mount(t.current)}),[])}(i(e,["innerRef","values","controls"]),t,n,r)}))};function bo(e){return"string"==typeof e&&e.startsWith("var(--")}var xo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,wo=4;function Eo(e,t,n){void 0===n&&(n=1),c(n<=wo,'Max CSS variable fallback depth detected in property "'+e+'". This may indicate a circular fallback dependency.');var r=function(e){var t=xo.exec(e);return t?[t[1],t[2]]:[,]}(e),o=r[0],a=r[1];if(o)return window.getComputedStyle(t).getPropertyValue(o)||(bo(a)?Eo(a,t,n+1):a)}var ko,_o=new Set(["width","height","top","left","right","bottom","x","y"]),Co=function(e){return _o.has(e)},To=function(e,t){e.set(t,!1),e.set(t)},So=function(e){return e===N||e===B};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(ko||(ko={}));var Io,Oo,Po=function(e,t){return parseFloat(e.split(", ")[t])},Ao=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return Po(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return i?Po(i[1],e):0}},No=new Set(["x","y","z"]),Mo=yt.filter((function(e){return!No.has(e)})),Lo={width:function(e){return e.width},height:function(e){return e.height},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.height,r=t.top;return parseFloat(r)+n},right:function(e,t){var n=e.width,r=t.left;return parseFloat(r)+n},x:Ao(4,13),y:Ao(5,14)},Ro=function(e,t){return function(n,r){var o=function(e,t,n,r){var o=i(n,[]),s=t.current;if(!(s instanceof HTMLElement))return{target:o,transitionEnd:r};for(var l in r&&(r=a({},r)),e.forEach((function(e){var t=e.get();if(bo(t)){var n=Eo(t,s);n&&e.set(n)}})),o){var c=o[l];if(bo(c)){var u=Eo(c,s);u&&(o[l]=u,r&&void 0===r[l]&&(r[l]=c))}}return{target:o,transitionEnd:r}}(e,t,n,r);return n=o.target,r=o.transitionEnd,function(e,t,n,r){return function(e){return Object.keys(e).some(Co)}(n)?function(e,t,n,r){void 0===r&&(r={}),n=a({},n),r=a({},r);var o=t.current,i=Xt(o),s=Object.keys(n).filter(Co),l=[],u=!1,d=s.reduce((function(t,o){var a=e.get(o);if(!a)return t;var s,d=a.get(),f=n[o],p=Wn(d);if(zn(f))for(var h=f.length,m=null===f[0]?1:0;m<h;m++)s?c(Wn(f[m])===s,"All keyframes must be of the same type"):(s=Wn(f[m]),c(s===p||So(p)&&So(s),"Keyframes must be of the same dimension as the current value"));else s=Wn(f);if(p!==s)if(So(p)&&So(s)){var g=a.get();"string"==typeof g&&a.set(parseFloat(g)),"string"==typeof f?n[o]=parseFloat(f):Array.isArray(f)&&s===B&&(n[o]=f.map(parseFloat))}else u||(l=function(e,t){var n=[];return Mo.forEach((function(t){var r=e.get(t);void 0!==r&&(n.push([t,r.get()]),r.set(t.startsWith("scale")?1:0))})),n.length&&t.render(),n}(e,i),u=!0),t.push(o),r[o]=void 0!==r[o]?r[o]:n[o],To(a,f);return t}),[]);if(d.length){var f=function(e,t,n,r,o){var a=n.getBoundingClientRect(),i=getComputedStyle(n),s=i.display,l={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===s&&r.set("display",e.display||"block"),r.render();var c=n.getBoundingClientRect();return o.forEach((function(n){var r=t.get(n);To(r,Lo[n](a,l)),e[n]=Lo[n](c,i)})),e}(n,e,o,i,d);return l.length&&l.forEach((function(t){var n=t[0],r=t[1];e.get(n).set(r)})),i.render(),{target:f,transitionEnd:r}}return{target:n,transitionEnd:r}}(e,t,n,r):{target:n,transitionEnd:r}}(e,t,n,r)}},Do=(0,l.createContext)(null);!function(e){e.Prepare="prepare",e.Read="read",e.Render="render"}(Oo||(Oo={}));var jo=[Oo.Prepare,Oo.Read,Oo.Render].reduce((function(e,t){return e[t]=[],e}),{}),Bo=!1;function Zo(e){for(var t=e.length,n=0;n<t;n++)e[n]();e.length=0}var Fo=function(e){return function(t){t&&(Bo=!0,jo[e].push(t))}},Uo=((Io={})[Oo.Prepare]=Fo(Oo.Prepare),Io[Oo.Read]=Fo(Oo.Read),Io[Oo.Render]=Fo(Oo.Render),Io.flush=function(){Bo&&(Zo(jo.prepare),Zo(jo.read),Zo(jo.render),Bo=!1)},Io),zo={duration:.8,ease:[.45,.05,.19,1]},Ho={type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10},$o={id:"x",size:"width",min:"left",max:"right",origin:"originX"},Vo={id:"y",size:"height",min:"top",max:"bottom",origin:"originY"};function qo(e,t){return(e+t)/2}function Wo(e,t,n){var r,o=e[n.size]-t[n.size],a=.5;return o&&(e[n.min]===t[n.min]?a=0:e[n.max]===t[n.max]&&(a=1)),(r={})[n.size]=o,r[n.origin]=a,r[n.id]=.5===a?qo(e[n.min],e[n.max])-qo(t[n.min],t[n.max]):0,r}var Go={getLayout:function(e){return e.offset},measure:function(e){var t=e.offsetLeft,n=e.offsetTop,r=e.offsetWidth,o=e.offsetHeight;return{left:t,top:n,right:t+r,bottom:n+o,width:r,height:o}}},Yo={getLayout:function(e){return e.boundingBox},measure:function(e){var t=e.getBoundingClientRect();return{left:t.left,top:t.top,width:t.width,height:t.height,right:t.right,bottom:t.bottom}}};function Xo(e){return window.getComputedStyle(e).position}function Ko(e){return"width"===e||"height"===e}var Qo,Jo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.innerRef,n=e.positionTransition,r=e.values,o=e.controls,i=t.current;if(function(e){return e instanceof HTMLElement}(i)){var s,l,u,d=function(e){var t=e.layoutTransition,n=e.positionTransition;return t||n}(this.props),f=!!n,p=Xo(i),h={offset:Go.measure(i),boundingBox:Yo.measure(i)};return Uo.prepare((function(){s=i.style.transform,i.style.transform=""})),Uo.read((function(){l={offset:Go.measure(i),boundingBox:Yo.measure(i)};var e=Xo(i);u=function(e,t,n){return n&&e===t?Go:Yo}(p,e,f)})),Uo.render((function(){var e=function(e,t){return a(a({},Wo(e,t,$o)),Wo(e,t,Vo))}(u.getLayout(h),u.getLayout(l));if(e.x||e.y||e.width||e.height){Xt(i).set({originX:e.originX,originY:e.originY}),c(!Dn,"Sync render session already open"),Dn=[];var t={},n={},p=function(e){return"function"==typeof e}(d)?d({delta:e}):d;m("left","x",0,e.x),m("top","y",0,e.y),f||(m("width","scaleX",1,h.boundingBox.width/l.boundingBox.width),m("height","scaleY",1,h.boundingBox.height/l.boundingBox.height)),t.transition=n,p&&o.start(t),c(null!==Dn,"No sync render session found"),Dn&&Dn.forEach((function(e){return e.render()})),Dn=null}else s&&(i.style.transform=s);function m(o,i,s,l){var c=Ko(o)?o:i;if(e[c]){var d="boolean"==typeof p?a({},function(e){return e?Ho:zo}(f)):p,h=r.get(i,s),m=h.getVelocity();n[i]=d[i]?a({},d[i]):a({},d),void 0===n[i].velocity&&(n[i].velocity=m||0),t[i]=s;var g=Ko(o)||u!==Go?0:h.get();h.set(l+g)}}})),null}},t.prototype.componentDidUpdate=function(){Uo.flush()},t.prototype.render=function(){return null},t.contextType=Do,t}(l.Component),ea={key:"layout",shouldRender:function(e){var t=e.positionTransition,n=e.layoutTransition;return c(!(t&&n),"Don't set both positionTransition and layoutTransition on the same component"),"undefined"!=typeof window&&!(!t&&!n)},Component:Jo},ta=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","positionTransition","layoutTransition","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragElastic","dragMomentum","dragPropagation","dragTransition","_dragValueX","_dragValueY","_dragTransitionControls","dragOriginX","dragOriginY","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function na(e){return ta.has(e)}!function(e){e.Target="Target",e.VariantLabel="VariantLabel",e.AnimationSubscription="AnimationSubscription"}(Qo||(Qo={}));function ra(e,t){void 0===t&&(t=!1),e.transition;var n=e.transitionEnd,r=i(e,["transition","transitionEnd"]);return t?a(a({},r),n):r}var oa,aa,ia=function(e){var t,n=e instanceof In?e.get():e;return Array.from(new Set((t=n)?Array.isArray(t)?t:[t]:[]))},sa=((oa={})[Qo.Target]=no((function(e){return t=e.animate,n=e.controls,r=e.values,o=e.transition,i=(0,l.useRef)(!0),(s=(0,l.useRef)(null)).current||(s.current=ra(t,!0)),void(0,l.useEffect)((function(){var e,l,c={},u=ra(t),d=ra(t,!0);for(var f in u){var p=i.current&&(!r.has(f)||r.get(f).get()!==d[f]),h=null!==d[f],m=(e=s.current[f],void 0!==(l=d[f])&&(Array.isArray(e)&&Array.isArray(l)?!function(e,t){if(null===t)return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}(l,e):e!==l));h&&(m||p)&&(c[f]=u[f])}i.current=!1,s.current=a(a({},s.current),d),Object.keys(c).length&&n.start(a(a({},c),{transition:t.transition||o,transitionEnd:t.transitionEnd}))}),[t]);var t,n,r,o,i,s})),oa[Qo.VariantLabel]=no((function(e){var t=e.animate,n=e.inherit,r=void 0===n||n,o=e.controls;return function(e,t,n,r){var o=ia(t),a=(0,l.useContext)(dr),i=a.hasMounted&&a.hasMounted.current,s=(0,l.useRef)(!1);(0,l.useEffect)((function(){var t,l,c=!1;n?(c=!!i,o=ia(a.animate)):c=s.current||(t=ia(e),l=o,t.join(",")!==l.join(",")),c&&r.start(o),s.current=!0}),[o.join(",")])}(e.initial,t,r,o)})),oa[Qo.AnimationSubscription]=no((function(e){return t=e.animate,n=e.controls,r=(0,l.useMemo)((function(){return t.subscribe(n)}),[t]),void(0,l.useEffect)((function(){return function(){r&&r()}}),[r]);var t,n,r})),oa),la=function(e){return e.animate instanceof cr},ca=["initial","animate","whileTap","whileHover"],ua=((aa={})[Qo.Target]=function(e){return!(void 0===e.animate||(t=e.animate,Array.isArray(t)||"string"==typeof t)||la(e));var t},aa[Qo.VariantLabel]=function(e){return void 0!==e.variants||ca.some((function(t){return"string"==typeof e[t]}))},aa[Qo.AnimationSubscription]=la,aa),da=function(e){var t=void 0;for(var n in Qo)ua[n](e)&&(t=n);return t?sa[t]:void 0},fa={key:"exit",shouldRender:function(e){return!!e.exit&&!mr(e)},Component:no((function(e){var t,n=e.animate,r=e.controls,o=e.exit,i=function(){var e=(0,l.useContext)(ur);if(null===e)return[!0];var t=e.isPresent,n=e.onExitComplete,r=e.register;return(0,l.useEffect)(r,[]),!t&&n?[!1,n]:[!0]}(),s=i[0],c=i[1],u=(0,l.useContext)(ur),d=(0,l.useRef)(!1),f=void 0!==(null===(t=u)||void 0===t?void 0:t.custom)?u.custom:e.custom;(0,l.useEffect)((function(){s?!d.current||!n||n instanceof cr||r.start(n):(!d.current&&o&&(r.setProps(a(a({},e),{custom:f})),r.start(o).then(c)),d.current=!0),s&&(d.current=!1)}),[s])}))},pa=function(e){return!na(e)};try{var ha=n(8594).Z;pa=function(e){return e.startsWith("on")?!na(e):ha(e)}}catch(Io){}var ma=function(e,t,n,r){var o={style:Un(e,t,n)};return r&&(o.style.userSelect="none",o.draggable=!1),o},ga=function(e,t){var n=$t(Bn(e),void 0,void 0,void 0,void 0,!1);return n.style=a(a({},t),n.style),n},va=[ea,yo,oo,fa],ya=va.length;function ba(e){var t="string"==typeof e,n=t&&-1!==vr.indexOf(e);return{renderComponent:function(r,o,i,s,c){var u=t?function(e){var t={};for(var n in e)pa(n)&&(t[n]=e[n]);return t}(s):s,d=n?ga(i,o):ma(i,o,c,!!s.drag);return(0,l.createElement)(e,a(a(a({},u),{ref:r}),d))},loadFunctionalityComponents:function(e,t,n,r,o,i){var s=[],c=da(n);c&&s.push((0,l.createElement)(c,{key:"animation",initial:n.initial,animate:n.animate,variants:n.variants,transition:n.transition,controls:o,inherit:i,values:t}));for(var u=0;u<ya;u++){var d=va[u],f=d.shouldRender,p=d.key,h=d.Component;f(n,r)&&s.push((0,l.createElement)(h,a({key:p},n,{parentContext:r,values:t,controls:o,innerRef:e})))}return s},getValueControlsConfig:function(e,t){return{values:t,readValueFromSource:function(t){return Xt(e.current).get(t)},makeTargetAnimatable:Ro(t,e)}}}}var xa=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","webview"].reduce((function(e,t){var n=ba(t);return e[t]=gr(n),e}),{}),wa=vr.reduce((function(e,t){return e[t]=gr(ba(t)),e}),{}),Ea=a(a({custom:function(e){return gr(ba(e))}},xa),wa);function ka(e){return Pn((function(){return On(e)}))}"undefined"!=typeof window?l.useLayoutEffect:l.useEffect,On(0),On(0),On(0),On(0),function(){function e(){this.componentControls=new Set}e.prototype.subscribe=function(e){var t=this;return this.componentControls.add(e),function(){return t.componentControls.delete(e)}},e.prototype.start=function(e,t){this.componentControls.forEach((function(n){n.start(e.nativeEvent||e,t)}))}}();var _a=On(null);if("undefined"!=typeof window)if(window.matchMedia){var Ca=window.matchMedia("(prefers-reduced-motion)"),Ta=function(){return _a.set(Ca.matches)};Ca.addListener(Ta),Ta()}else _a.set(!1)},8679:(e,t,n)=>{"use strict";var r=n(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<i.length;++g){var v=i[g];if(!(a[v]||r&&r[v]||m&&m[v]||s&&s[v])){var y=f(n,v);try{c(t,v,y)}catch(e){}}}}return t}},2378:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=800,a=16,i=9007199254740991,s="[object Arguments]",l="[object AsyncFunction]",c="[object Function]",u="[object GeneratorFunction]",d="[object Null]",f="[object Object]",p="[object Proxy]",h="[object Undefined]",m=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[s]=v["[object Array]"]=v["[object ArrayBuffer]"]=v["[object Boolean]"]=v["[object DataView]"]=v["[object Date]"]=v["[object Error]"]=v[c]=v["[object Map]"]=v["[object Number]"]=v[f]=v["[object RegExp]"]=v["[object Set]"]=v["[object String]"]=v["[object WeakMap]"]=!1;var y,b,x,w="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,E="object"==typeof self&&self&&self.Object===Object&&self,k=w||E||Function("return this")(),_=t&&!t.nodeType&&t,C=_&&e&&!e.nodeType&&e,T=C&&C.exports===_,S=T&&w.process,I=function(){try{return C&&C.require&&C.require("util").types||S&&S.binding&&S.binding("util")}catch(e){}}(),O=I&&I.isTypedArray,P=Array.prototype,A=Function.prototype,N=Object.prototype,M=k["__core-js_shared__"],L=A.toString,R=N.hasOwnProperty,D=(y=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",j=N.toString,B=L.call(Object),Z=RegExp("^"+L.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=T?k.Buffer:void 0,U=k.Symbol,z=k.Uint8Array,H=(F&&F.allocUnsafe,b=Object.getPrototypeOf,x=Object,function(e){return b(x(e))}),$=Object.create,V=N.propertyIsEnumerable,q=P.splice,W=U?U.toStringTag:void 0,G=function(){try{var e=me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=F?F.isBuffer:void 0,X=Math.max,K=Date.now,Q=me(k,"Map"),J=me(Object,"create"),ee=function(){function e(){}return function(t){if(!Se(t))return{};if($)return $(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oe(e){var t=this.__data__=new ne(e);this.size=t.size}function ae(e,t,n){(void 0!==n&&!xe(e[t],n)||void 0===n&&!(t in e))&&le(e,t,n)}function ie(e,t,n){var r=e[t];R.call(e,t)&&xe(r,n)&&(void 0!==n||t in e)||le(e,t,n)}function se(e,t){for(var n=e.length;n--;)if(xe(e[n][0],t))return n;return-1}function le(e,t,n){"__proto__"==t&&G?G(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}te.prototype.clear=function(){this.__data__=J?J(null):{},this.size=0},te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},te.prototype.get=function(e){var t=this.__data__;if(J){var n=t[e];return n===r?void 0:n}return R.call(t,e)?t[e]:void 0},te.prototype.has=function(e){var t=this.__data__;return J?void 0!==t[e]:R.call(t,e)},te.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=J&&void 0===t?r:t,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,n=se(t,e);return!(n<0||(n==t.length-1?t.pop():q.call(t,n,1),--this.size,0))},ne.prototype.get=function(e){var t=this.__data__,n=se(t,e);return n<0?void 0:t[n][1]},ne.prototype.has=function(e){return se(this.__data__,e)>-1},ne.prototype.set=function(e,t){var n=this.__data__,r=se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},re.prototype.clear=function(){this.size=0,this.__data__={hash:new te,map:new(Q||ne),string:new te}},re.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},re.prototype.get=function(e){return he(this,e).get(e)},re.prototype.has=function(e){return he(this,e).has(e)},re.prototype.set=function(e,t){var n=he(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},oe.prototype.clear=function(){this.__data__=new ne,this.size=0},oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},oe.prototype.get=function(e){return this.__data__.get(e)},oe.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ne){var r=n.__data__;if(!Q||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new re(r)}return n.set(e,t),this.size=n.size,this};var ce=function(e,t,n){for(var r=-1,o=Object(e),a=n(e),i=a.length;i--;){var s=a[++r];if(!1===t(o[s],s,o))break}return e};function ue(e){return null==e?void 0===e?h:d:W&&W in Object(e)?function(e){var t=R.call(e,W),n=e[W];try{e[W]=void 0;var r=!0}catch(e){}var o=j.call(e);return r&&(t?e[W]=n:delete e[W]),o}(e):function(e){return j.call(e)}(e)}function de(e){return Ie(e)&&ue(e)==s}function fe(e,t,n,r,o){e!==t&&ce(t,(function(a,i){if(o||(o=new oe),Se(a))!function(e,t,n,r,o,a,i){var s=ye(e,n),l=ye(t,n),c=i.get(l);if(c)ae(e,n,c);else{var u,d,p,h,m,g=a?a(s,l,n+"",e,t,i):void 0,v=void 0===g;if(v){var y=Ee(l),b=!y&&_e(l),x=!y&&!b&&Oe(l);g=l,y||b||x?Ee(s)?g=s:Ie(m=s)&&ke(m)?g=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(s):b?(v=!1,g=function(e,t){return e.slice()}(l)):x?(v=!1,h=new(p=(u=l).buffer).constructor(p.byteLength),new z(h).set(new z(p)),d=h,g=new u.constructor(d,u.byteOffset,u.length)):g=[]:function(e){if(!Ie(e)||ue(e)!=f)return!1;var t=H(e);if(null===t)return!0;var n=R.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&L.call(n)==B}(l)||we(l)?(g=s,we(s)?g=function(e){return function(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=void 0;void 0===l&&(l=e[s]),o?le(n,s,l):ie(n,s,l)}return n}(e,Pe(e))}(s):Se(s)&&!Ce(s)||(g=function(e){return"function"!=typeof e.constructor||ve(e)?{}:ee(H(e))}(l))):v=!1}v&&(i.set(l,g),o(g,l,r,a,i),i.delete(l)),ae(e,n,g)}}(e,t,i,n,fe,r,o);else{var s=r?r(ye(e,i),a,i+"",e,t,o):void 0;void 0===s&&(s=a),ae(e,i,s)}}),Pe)}var pe=G?function(e,t){return G(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Me;function he(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Se(e)||function(e){return!!D&&D in e}(e))&&(Ce(e)?Z:m).test(function(e){if(null!=e){try{return L.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ge(e,t){var n=typeof e;return!!(t=null==t?i:t)&&("number"==n||"symbol"!=n&&g.test(e))&&e>-1&&e%1==0&&e<t}function ve(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||N)}function ye(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var be=function(e){var t=0,n=0;return function(){var r=K(),i=a-(r-n);if(n=r,i>0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(pe);function xe(e,t){return e===t||e!=e&&t!=t}var we=de(function(){return arguments}())?de:function(e){return Ie(e)&&R.call(e,"callee")&&!V.call(e,"callee")},Ee=Array.isArray;function ke(e){return null!=e&&Te(e.length)&&!Ce(e)}var _e=Y||function(){return!1};function Ce(e){if(!Se(e))return!1;var t=ue(e);return t==c||t==u||t==l||t==p}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Se(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ie(e){return null!=e&&"object"==typeof e}var Oe=O?function(e){return function(t){return e(t)}}(O):function(e){return Ie(e)&&Te(e.length)&&!!v[ue(e)]};function Pe(e){return ke(e)?function(e,t){var n=Ee(e),r=!n&&we(e),o=!n&&!r&&_e(e),a=!n&&!r&&!o&&Oe(e),i=n||r||o||a,s=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!R.call(e,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ge(c,l))||s.push(c);return s}(e,!0):function(e){if(!Se(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ve(e),n=[];for(var r in e)("constructor"!=r||!t&&R.call(e,r))&&n.push(r);return n}(e)}var Ae,Ne=(Ae=function(e,t,n){fe(e,t,n)},function(e,t){return be(function(e,t,n){return t=X(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=X(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,Me),e+"")}((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(o=Ae.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!Se(n))return!1;var r=typeof t;return!!("number"==r?ke(n)&&ge(t,n.length):"string"==r&&t in n)&&xe(n[t],e)}(t[0],t[1],a)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var i=t[n];i&&Ae(e,i,n)}return e})));function Me(e){return e}e.exports=Ne},1238:(e,t)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a={connecting:0,open:1,closing:2,closed:3},i=1e4,s={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},l={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},c={longpoll:"longpoll",websocket:"websocket"},u=function(){function e(t,n,r,a){o(this,e),this.channel=t,this.event=n,this.payload=r||{},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}return r(e,[{key:"resend",value:function(e){this.timeout=e,this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}},{key:"send",value:function(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref}))}},{key:"receive",value:function(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}},{key:"matchReceive",value:function(e){var t=e.status,n=e.response;e.ref,this.recHooks.filter((function(e){return e.status===t})).forEach((function(e){return e.callback(n)}))}},{key:"cancelRefEvent",value:function(){this.refEvent&&this.channel.off(this.refEvent)}},{key:"cancelTimeout",value:function(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}},{key:"startTimeout",value:function(){var e=this;this.timeoutTimer||(this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,(function(t){e.cancelRefEvent(),e.cancelTimeout(),e.receivedResp=t,e.matchReceive(t)})),this.timeoutTimer=setTimeout((function(){e.trigger("timeout",{})}),this.timeout))}},{key:"hasReceived",value:function(e){return this.receivedResp&&this.receivedResp.status===e}},{key:"trigger",value:function(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}}]),e}(),d=function(){function e(t,n,r){var a=this;o(this,e),this.state=s.closed,this.topic=t,this.params=n||{},this.socket=r,this.bindings=[],this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new u(this,l.join,this.params,this.timeout),this.pushBuffer=[],this.rejoinTimer=new h((function(){return a.rejoinUntilConnected()}),this.socket.reconnectAfterMs),this.joinPush.receive("ok",(function(){a.state=s.joined,a.rejoinTimer.reset(),a.pushBuffer.forEach((function(e){return e.send()})),a.pushBuffer=[]})),this.onClose((function(){a.rejoinTimer.reset(),a.socket.log("channel","close "+a.topic+" "+a.joinRef()),a.state=s.closed,a.socket.remove(a)})),this.onError((function(e){a.isLeaving()||a.isClosed()||(a.socket.log("channel","error "+a.topic,e),a.state=s.errored,a.rejoinTimer.scheduleTimeout())})),this.joinPush.receive("timeout",(function(){a.isJoining()&&(a.socket.log("channel","timeout "+a.topic,a.joinPush.timeout),a.state=s.errored,a.rejoinTimer.scheduleTimeout())})),this.on(l.reply,(function(e,t){a.trigger(a.replyEventName(t),e)}))}return r(e,[{key:"rejoinUntilConnected",value:function(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this.rejoin()}},{key:"join",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw"tried to join multiple times. 'join' can only be called a single time per channel instance";return this.joinedOnce=!0,this.rejoin(e),this.joinPush}},{key:"onClose",value:function(e){this.on(l.close,e)}},{key:"onError",value:function(e){this.on(l.error,(function(t){return e(t)}))}},{key:"on",value:function(e,t){this.bindings.push({event:e,callback:t})}},{key:"off",value:function(e){this.bindings=this.bindings.filter((function(t){return t.event!==e}))}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(!this.joinedOnce)throw"tried to push '"+e+"' to '"+this.topic+"' before joining. Use channel.join() before pushing events";var r=new u(this,e,t,n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.state=s.leaving;var n=function(){e.socket.log("channel","leave "+e.topic),e.trigger(l.close,"leave",e.joinRef())},r=new u(this,l.leave,{},t);return r.receive("ok",(function(){return n()})).receive("timeout",(function(){return n()})),r.send(),this.canPush()||r.trigger("ok",{}),r}},{key:"onMessage",value:function(e,t,n){return t}},{key:"isMember",value:function(e){return this.topic===e}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"sendJoin",value:function(e){this.state=s.joining,this.joinPush.resend(e)}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||this.sendJoin(e)}},{key:"trigger",value:function(e,t,n){var r=l.close,o=l.error,a=l.leave,i=l.join;if(!(n&&[r,o,a,i].indexOf(e)>=0&&n!==this.joinRef())){var s=this.onMessage(e,t,n);if(t&&!s)throw"channel onMessage callbacks must return the payload, modified or unmodified";this.bindings.filter((function(t){return t.event===e})).map((function(e){return e.callback(s,n)}))}}},{key:"replyEventName",value:function(e){return"chan_reply_"+e}},{key:"isClosed",value:function(){return this.state===s.closed}},{key:"isErrored",value:function(){return this.state===s.errored}},{key:"isJoined",value:function(){return this.state===s.joined}},{key:"isJoining",value:function(){return this.state===s.joining}},{key:"isLeaving",value:function(){return this.state===s.leaving}}]),e}(),f=(t.sk=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=r.timeout||i,this.transport=r.transport||window.WebSocket||f,this.heartbeatIntervalMs=r.heartbeatIntervalMs||3e4,this.reconnectAfterMs=r.reconnectAfterMs||function(e){return[1e3,2e3,5e3,1e4][e-1]||1e4},this.logger=r.logger||function(){},this.longpollerTimeout=r.longpollerTimeout||2e4,this.params=r.params||{},this.endPoint=t+"/"+c.websocket,this.reconnectTimer=new h((function(){n.disconnect((function(){return n.connect()}))}),this.reconnectAfterMs)}return r(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=p.appendParams(p.appendParams(this.endPoint,this.params),{vsn:"1.0.0"});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?this.protocol()+":"+e:this.protocol()+"://"+location.host+e}},{key:"disconnect",value:function(e,t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n||""):this.conn.close(),this.conn=null),e&&e()}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=e),this.conn||(this.conn=new this.transport(this.endPointURL()),this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,n){this.logger(e,t,n)}},{key:"onOpen",value:function(e){this.stateChangeCallbacks.open.push(e)}},{key:"onClose",value:function(e){this.stateChangeCallbacks.close.push(e)}},{key:"onError",value:function(e){this.stateChangeCallbacks.error.push(e)}},{key:"onMessage",value:function(e){this.stateChangeCallbacks.message.push(e)}},{key:"onConnOpen",value:function(){var e=this;this.log("transport","connected to "+this.endPointURL(),this.transport.prototype),this.flushSendBuffer(),this.reconnectTimer.reset(),this.conn.skipHeartbeat||(clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((function(){return e.sendHeartbeat()}),this.heartbeatIntervalMs)),this.stateChangeCallbacks.open.forEach((function(e){return e()}))}},{key:"onConnClose",value:function(e){this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((function(t){return t(e)}))}},{key:"onConnError",value:function(e){this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach((function(t){return t(e)}))}},{key:"triggerChanError",value:function(){this.channels.forEach((function(e){return e.trigger(l.error)}))}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case a.connecting:return"connecting";case a.open:return"open";case a.closing:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.channels=this.channels.filter((function(t){return t.joinRef()!==e.joinRef()}))}},{key:"channel",value:function(e){var t=new d(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},this);return this.channels.push(t),t}},{key:"push",value:function(e){var t=this,n=e.topic,r=e.event,o=e.payload,a=e.ref,i=function(){return t.conn.send(JSON.stringify(e))};this.log("push",n+" "+r+" ("+a+")",o),this.isConnected()?i():this.sendBuffer.push(i)}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){this.isConnected()&&this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.makeRef()})}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((function(e){return e()})),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=JSON.parse(e.data),n=t.topic,r=t.event,o=t.payload,a=t.ref;this.log("receive",(o.status||"")+" "+n+" "+r+" "+(a&&"("+a+")"||""),o),this.channels.filter((function(e){return e.isMember(n)})).forEach((function(e){return e.trigger(r,o,a)})),this.stateChangeCallbacks.message.forEach((function(e){return e(t)}))}}]),e}(),function(){function e(t){o(this,e),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=a.connecting,this.poll()}return r(e,[{key:"normalizeEndpoint",value:function(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+c.websocket),"$1/"+c.longpoll)}},{key:"endpointURL",value:function(){return p.appendParams(this.pollEndpoint,{token:this.token})}},{key:"closeAndRetry",value:function(){this.close(),this.readyState=a.connecting}},{key:"ontimeout",value:function(){this.onerror("timeout"),this.closeAndRetry()}},{key:"poll",value:function(){var e=this;this.readyState!==a.open&&this.readyState!==a.connecting||p.request("GET",this.endpointURL(),"application/json",null,this.timeout,this.ontimeout.bind(this),(function(t){if(t){var n=t.status,r=t.token,o=t.messages;e.token=r}else n=0;switch(n){case 200:o.forEach((function(t){return e.onmessage({data:JSON.stringify(t)})})),e.poll();break;case 204:e.poll();break;case 410:e.readyState=a.open,e.onopen(),e.poll();break;case 0:case 500:e.onerror(),e.closeAndRetry();break;default:throw"unhandled poll status "+n}}))}},{key:"send",value:function(e){var t=this;p.request("POST",this.endpointURL(),"application/json",e,this.timeout,this.onerror.bind(this,"timeout"),(function(e){e&&200===e.status||(t.onerror(status),t.closeAndRetry())}))}},{key:"close",value:function(e,t){this.readyState=a.closed,this.onclose()}}]),e}()),p=function(){function e(){o(this,e)}return r(e,null,[{key:"request",value:function(e,t,n,r,o,a,i){if(window.XDomainRequest){var s=new XDomainRequest;this.xdomainRequest(s,e,t,r,o,a,i)}else{var l=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.xhrRequest(l,e,t,n,r,o,a,i)}}},{key:"xdomainRequest",value:function(e,t,n,r,o,a,i){var s=this;e.timeout=o,e.open(t,n),e.onload=function(){var t=s.parseJSON(e.responseText);i&&i(t)},a&&(e.ontimeout=a),e.onprogress=function(){},e.send(r)}},{key:"xhrRequest",value:function(e,t,n,r,o,a,i,s){var l=this;e.timeout=a,e.open(t,n,!0),e.setRequestHeader("Content-Type",r),e.onerror=function(){s&&s(null)},e.onreadystatechange=function(){if(e.readyState===l.states.complete&&s){var t=l.parseJSON(e.responseText);s(t)}},i&&(e.ontimeout=i),e.send(o)}},{key:"parseJSON",value:function(e){return e&&""!==e?JSON.parse(e):null}},{key:"serialize",value:function(e,t){var r=[];for(var o in e)if(e.hasOwnProperty(o)){var a=t?t+"["+o+"]":o,i=e[o];"object"===(void 0===i?"undefined":n(i))?r.push(this.serialize(i,a)):r.push(encodeURIComponent(a)+"="+encodeURIComponent(i))}return r.join("&")}},{key:"appendParams",value:function(e,t){if(0===Object.keys(t).length)return e;var n=e.match(/\?/)?"&":"?";return""+e+n+this.serialize(t)}}]),e}();p.states={complete:4};var h=function(){function e(t,n){o(this,e),this.callback=t,this.timerCalc=n,this.timer=null,this.tries=0}return r(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout((function(){e.tries=e.tries+1,e.callback()}),this.timerCalc(this.tries+1))}}]),e}()},5669:(e,t,n)=>{"use strict";n.d(t,{_j:()=>D});var r=n(7462);function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function i(e,t,n){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&o(a,n.prototype),a},i.apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return i(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)},s(e)}var l=function(e){var t,n;function r(t){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/master/src/internalHelpers/errors.md#"+t+" for more information.")||this)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n),r}(s(Error));function c(e){return Math.round(255*e)}function u(e,t,n){return c(e)+","+c(t)+","+c(n)}function d(e,t,n,r){if(void 0===r&&(r=u),0===t)return r(n,n,n);var o=(e%360+360)%360/60,a=(1-Math.abs(2*n-1))*t,i=a*(1-Math.abs(o%2-1)),s=0,l=0,c=0;o>=0&&o<1?(s=a,l=i):o>=1&&o<2?(s=i,l=a):o>=2&&o<3?(l=a,c=i):o>=3&&o<4?(l=i,c=a):o>=4&&o<5?(s=i,c=a):o>=5&&o<6&&(s=a,c=i);var d=n-a/2;return r(s+d,l+d,c+d)}var f={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},p=/^#[a-fA-F0-9]{6}$/,h=/^#[a-fA-F0-9]{8}$/,m=/^#[a-fA-F0-9]{3}$/,g=/^#[a-fA-F0-9]{4}$/,v=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,y=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,b=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,x=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function w(e){if("string"!=typeof e)throw new l(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return f[t]?"#"+f[t]:e}(e);if(t.match(p))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(h)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(m))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(g)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var o=v.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var a=y.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var i=b.exec(t);if(i){var s="rgb("+d(parseInt(""+i[1],10),parseInt(""+i[2],10)/100,parseInt(""+i[3],10)/100)+")",c=v.exec(s);if(!c)throw new l(4,t,s);return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var u=x.exec(t);if(u){var w="rgb("+d(parseInt(""+u[1],10),parseInt(""+u[2],10)/100,parseInt(""+u[3],10)/100)+")",E=v.exec(w);if(!E)throw new l(4,t,w);return{red:parseInt(""+E[1],10),green:parseInt(""+E[2],10),blue:parseInt(""+E[3],10),alpha:parseFloat(""+u[4])}}throw new l(5)}var E=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function k(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function _(e){return k(Math.round(255*e))}function C(e,t,n){return E("#"+_(e)+_(t)+_(n))}function T(e,t,n){return d(e,t,n,C)}function S(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return E("#"+k(e)+k(t)+k(n));if("object"==typeof e&&void 0===t&&void 0===n)return E("#"+k(e.red)+k(e.green)+k(e.blue));throw new l(6)}var I=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)},O=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},P=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)},A=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha};function N(e){if("object"!=typeof e)throw new l(8);if(O(e))return function(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var o=w(e);return"rgba("+o.red+","+o.green+","+o.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?S(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?S(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new l(7)}(e);if(I(e))return S(e);if(A(e))return function(e,t,n,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?T(e,t,n):"rgba("+d(e,t,n)+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?T(e.hue,e.saturation,e.lightness):"rgba("+d(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new l(2)}(e);if(P(e))return function(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return T(e,t,n);if("object"==typeof e&&void 0===t&&void 0===n)return T(e.hue,e.saturation,e.lightness);throw new l(1)}(e);throw new l(8)}function M(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):M(e,t,r)}}function L(e){return M(e,e.length,[])}function R(e,t){if("transparent"===t)return t;var n,o,a,i=function(e){return function(e){var t,n=e.red/255,r=e.green/255,o=e.blue/255,a=Math.max(n,r,o),i=Math.min(n,r,o),s=(a+i)/2;if(a===i)return void 0!==e.alpha?{hue:0,saturation:0,lightness:s,alpha:e.alpha}:{hue:0,saturation:0,lightness:s};var l=a-i,c=s>.5?l/(2-a-i):l/(a+i);switch(a){case n:t=(r-o)/l+(r<o?6:0);break;case r:t=(o-n)/l+2;break;default:t=(n-r)/l+4}return t*=60,void 0!==e.alpha?{hue:t,saturation:c,lightness:s,alpha:e.alpha}:{hue:t,saturation:c,lightness:s}}(w(e))}(t);return N((0,r.Z)({},i,{lightness:(n=0,o=1,a=i.lightness-parseFloat(e),Math.max(n,Math.min(o,a)))}))}var D=L(R)},4155:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=i(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u<t;)s&&s[u].run();u=-1,t=l.length}s=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||i(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},9921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case s:case i:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case g:case m:case l:return e;default:return t}}case o:return t}}}function E(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=a,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||w(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===i||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},9864:(e,t,n)=>{"use strict";e.exports=n(9921)},7703:(e,t,n)=>{"use strict";n.d(t,{zt:()=>u,$j:()=>U,I0:()=>q,v9:()=>X,oR:()=>$});var r=n(8156),o=n.n(r),a=(n(5099),o().createContext(null)),i=function(e){e()},s=function(){return i},l={notify:function(){}},c=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=l,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=s(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=l)},e}();const u=function(e){var t=e.store,n=e.context,i=e.children,s=(0,r.useMemo)((function(){var e=new c(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),l=(0,r.useMemo)((function(){return t.getState()}),[t]);(0,r.useEffect)((function(){var e=s.subscription;return e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,l]);var u=n||a;return o().createElement(u.Provider,{value:s},i)};var d=n(7462),f=n(3366),p=n(8679),h=n.n(p),m=n(9864),g="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,v=[],y=[null,null];function b(e,t){var n=e[1];return[t.payload,n+1]}function x(e,t,n){g((function(){return e.apply(void 0,t)}),n)}function w(e,t,n,r,o,a,i){e.current=r,t.current=o,n.current=!1,a.current&&(a.current=null,i())}function E(e,t,n,r,o,a,i,s,l,c){if(e){var u=!1,d=null,f=function(){if(!u){var e,n,f=t.getState();try{e=r(f,o.current)}catch(e){n=e,d=e}n||(d=null),e===a.current?i.current||l():(a.current=e,s.current=e,i.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=f,n.trySubscribe(),f(),function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var k=function(){return[null,0]};function _(e,t){void 0===t&&(t={});var n=t,i=n.getDisplayName,s=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,l=n.methodName,u=void 0===l?"connectAdvanced":l,p=n.renderCountProp,g=void 0===p?void 0:p,_=n.shouldHandleStateChanges,C=void 0===_||_,T=n.storeKey,S=void 0===T?"store":T,I=(n.withRef,n.forwardRef),O=void 0!==I&&I,P=n.context,A=void 0===P?a:P,N=(0,f.Z)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),M=A;return function(t){var n=t.displayName||t.name||"Component",a=s(n),i=(0,d.Z)({},N,{getDisplayName:s,methodName:u,renderCountProp:g,shouldHandleStateChanges:C,storeKey:S,displayName:a,wrappedComponentName:n,WrappedComponent:t}),l=N.pure,p=l?r.useMemo:function(e){return e()};function _(n){var a=(0,r.useMemo)((function(){var e=n.forwardedRef,t=(0,f.Z)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),s=a[0],l=a[1],u=a[2],h=(0,r.useMemo)((function(){return s&&s.Consumer&&(0,m.isContextConsumer)(o().createElement(s.Consumer,null))?s:M}),[s,M]),g=(0,r.useContext)(h),_=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(g)&&Boolean(g.store);var T=_?n.store:g.store,S=(0,r.useMemo)((function(){return function(t){return e(t.dispatch,i)}(T)}),[T]),I=(0,r.useMemo)((function(){if(!C)return y;var e=new c(T,_?null:g.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[T,_,g]),O=I[0],P=I[1],A=(0,r.useMemo)((function(){return _?g:(0,d.Z)({},g,{subscription:O})}),[_,g,O]),N=(0,r.useReducer)(b,v,k),L=N[0][0],R=N[1];if(L&&L.error)throw L.error;var D=(0,r.useRef)(),j=(0,r.useRef)(u),B=(0,r.useRef)(),Z=(0,r.useRef)(!1),F=p((function(){return B.current&&u===j.current?B.current:S(T.getState(),u)}),[T,L,u]);x(w,[j,D,Z,u,F,B,P]),x(E,[C,T,O,S,j,D,Z,B,P,R],[T,O,S]);var U=(0,r.useMemo)((function(){return o().createElement(t,(0,d.Z)({},F,{ref:l}))}),[l,t,F]);return(0,r.useMemo)((function(){return C?o().createElement(h.Provider,{value:A},U):U}),[h,U,A])}var T=l?o().memo(_):_;if(T.WrappedComponent=t,T.displayName=a,O){var I=o().forwardRef((function(e,t){return o().createElement(T,(0,d.Z)({},e,{forwardedRef:t}))}));return I.displayName=a,I.WrappedComponent=t,h()(I,t)}return h()(T,t)}}function C(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(C(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!C(e[n[o]],t[n[o]]))return!1;return!0}var S=n(4890);function I(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function O(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function P(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=O(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=O(o),o=r(t,n)),o},r}}const A=[function(e){return"function"==typeof e?P(e):void 0},function(e){return e?void 0:I((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?I((function(t){return(0,S.DE)(e,t)})):void 0}],N=[function(e){return"function"==typeof e?P(e):void 0},function(e){return e?void 0:I((function(){return{}}))}];function M(e,t,n){return(0,d.Z)({},n,{},e,{},t)}const L=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,a=n.areMergedPropsEqual,i=!1;return function(t,n,s){var l=e(t,n,s);return i?o&&a(l,r)||(r=l):(i=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return M}}];function R(e,t,n,r){return function(o,a){return n(e(o,a),t(r,a),a)}}function D(e,t,n,r,o){var a,i,s,l,c,u=o.areStatesEqual,d=o.areOwnPropsEqual,f=o.areStatePropsEqual,p=!1;return function(o,h){return p?function(o,p){var h,m,g=!d(p,i),v=!u(o,a);return a=o,i=p,g&&v?(s=e(a,i),t.dependsOnOwnProps&&(l=t(r,i)),c=n(s,l,i)):g?(e.dependsOnOwnProps&&(s=e(a,i)),t.dependsOnOwnProps&&(l=t(r,i)),c=n(s,l,i)):v?(h=e(a,i),m=!f(h,s),s=h,m&&(c=n(s,l,i)),c):c}(o,h):(s=e(a=o,i=h),l=t(r,i),c=n(s,l,i),p=!0,c)}}function j(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,a=(0,f.Z)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),i=n(e,a),s=r(e,a),l=o(e,a);return(a.pure?D:R)(i,s,l,e,a)}function B(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Z(e,t){return e===t}function F(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?_:n,o=t.mapStateToPropsFactories,a=void 0===o?N:o,i=t.mapDispatchToPropsFactories,s=void 0===i?A:i,l=t.mergePropsFactories,c=void 0===l?L:l,u=t.selectorFactory,p=void 0===u?j:u;return function(e,t,n,o){void 0===o&&(o={});var i=o,l=i.pure,u=void 0===l||l,h=i.areStatesEqual,m=void 0===h?Z:h,g=i.areOwnPropsEqual,v=void 0===g?T:g,y=i.areStatePropsEqual,b=void 0===y?T:y,x=i.areMergedPropsEqual,w=void 0===x?T:x,E=(0,f.Z)(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),k=B(e,a,"mapStateToProps"),_=B(t,s,"mapDispatchToProps"),C=B(n,c,"mergeProps");return r(p,(0,d.Z)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:_,initMergeProps:C,pure:u,areStatesEqual:m,areOwnPropsEqual:v,areStatePropsEqual:b,areMergedPropsEqual:w},E))}}const U=F();function z(){return(0,r.useContext)(a)}function H(e){void 0===e&&(e=a);var t=e===a?z:function(){return(0,r.useContext)(e)};return function(){return t().store}}var $=H();function V(e){void 0===e&&(e=a);var t=e===a?$:H(e);return function(){return t().dispatch}}var q=V(),W=function(e,t){return e===t};function G(e){void 0===e&&(e=a);var t=e===a?z:function(){return(0,r.useContext)(e)};return function(e,n){void 0===n&&(n=W);var o=t();return function(e,t,n,o){var a,i=(0,r.useReducer)((function(e){return e+1}),0)[1],s=(0,r.useMemo)((function(){return new c(n,o)}),[n,o]),l=(0,r.useRef)(),u=(0,r.useRef)(),d=(0,r.useRef)();try{a=e!==u.current||l.current?e(n.getState()):d.current}catch(e){throw l.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+l.current.stack+"\n\n"),e}return g((function(){u.current=e,d.current=a,l.current=void 0})),g((function(){function e(){try{var e=u.current(n.getState());if(t(e,d.current))return;d.current=e}catch(e){l.current=e}i({})}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),a}(e,n,o.store,o.subscription)}}var Y,X=G();Y=n(7111).unstable_batchedUpdates,i=Y},1539:(e,t,n)=>{"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){switch((0,a.default)(e)){case"void":return function(e){return e};case"string":return function(t){return(0,o.default)(t,[e])};case"array":return function(t){return(0,o.default)(t,e)};default:return console.error("Invalid paths argument, should be of type String, Array or Void")}};var o=r(n(8855)),a=r(n(1555));e.exports=t.default},8855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};return t.forEach((function(t){var r=e[t];r&&(n[t]=r)})),n},e.exports=t.default},4417:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){var n=r({key:"redux",merge:i.default,slicer:a.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,s=n.merge,l=n.slicer,c=n.serialize,u=n.deserialize;return function(t){return function(n,r,a){"function"==typeof r&&void 0===a&&(a=r,r=void 0);var i=void 0,d=void 0;try{i=u(localStorage.getItem(o)),d=s(r,i)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var f=t(n,d,a),p=l(e);return f.subscribe((function(){var e=f.getState(),t=p(e);try{localStorage.setItem(o,c(t))}catch(e){console.warn("Unable to persist state to localStorage:",e)}})),f}}};var a=o(n(1539)),i=o(n(1944));e.exports=t.default},1944:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t){return t?n({},e,t):e},e.exports=t.default},1555:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?n(e)?e.length?"array":"void":typeof e:"void"};var n=Array.isArray||(Array.isArray=function(e){return""+e!==e&&"[object Array]"==={}.toString.call(e)});e.exports=t.default},4890:(e,t,n)=>{"use strict";n.d(t,{DE:()=>u,MT:()=>i,UY:()=>l,md:()=>h,qC:()=>p});var r=n(7121),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function i(e,t,n){var o;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(i)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var s=e,l=t,c=[],u=c,d=!1;function f(){u===c&&(u=c.slice())}function p(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function h(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return f(),u.push(e),function(){if(t){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,f();var n=u.indexOf(e);u.splice(n,1),c=null}}}function m(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,l=s(l,e)}finally{d=!1}for(var t=c=u,n=0;n<t.length;n++)(0,t[n])();return e}return m({type:a.INIT}),(o={dispatch:m,subscribe:h,getState:p,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");s=e,m({type:a.REPLACE})}})[r.Z]=function(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(p())}return n(),{unsubscribe:t(n)}}})[r.Z]=function(){return this},e},o}function s(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function l(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}var i,l=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},a=0;a<l.length;a++){var c=l[a],u=n[c],d=e[c],f=u(d,t);if(void 0===f){var p=s(c,t);throw new Error(p)}o[c]=f,r=r||f!==d}return(r=r||l.length!==Object.keys(e).length)?o:e}}function c(e,t){return function(){return t(e.apply(this,arguments))}}function u(e,t){if("function"==typeof e)return c(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=c(o,t))}return n}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(o)}));return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{dispatch:r=p.apply(void 0,a)(n.dispatch)})}}}},6774:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}},540:(e,t,n)=>{"use strict";n.d(t,{f6:()=>Pe,iv:()=>ye,ZP:()=>je,F4:()=>Re,Fg:()=>De});var r=n(9864),o=n(8156),a=n.n(o),i=n(6774),s=n.n(i);const l=function(e){function t(e,r,l,c,f){for(var p,h,m,g,x,E=0,k=0,_=0,C=0,T=0,N=0,L=m=p=0,D=0,j=0,B=0,Z=0,F=l.length,U=F-1,z="",H="",$="",V="";D<F;){if(h=l.charCodeAt(D),D===U&&0!==k+C+_+E&&(0!==k&&(h=47===k?10:47),C=_=E=0,F++,U++),0===k+C+_+E){if(D===U&&(0<j&&(z=z.replace(d,"")),0<z.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:z+=l.charAt(D)}h=59}switch(h){case 123:for(p=(z=z.trim()).charCodeAt(0),m=1,Z=++D;D<F;){switch(h=l.charCodeAt(D)){case 123:m++;break;case 125:m--;break;case 47:switch(h=l.charCodeAt(D+1)){case 42:case 47:e:{for(L=D+1;L<U;++L)switch(l.charCodeAt(L)){case 47:if(42===h&&42===l.charCodeAt(L-1)&&D+2!==L){D=L+1;break e}break;case 10:if(47===h){D=L+1;break e}}D=L}}break;case 91:h++;case 40:h++;case 34:case 39:for(;D++<U&&l.charCodeAt(D)!==h;);}if(0===m)break;D++}if(m=l.substring(Z,D),0===p&&(p=(z=z.replace(u,"").trim()).charCodeAt(0)),64===p){switch(0<j&&(z=z.replace(d,"")),h=z.charCodeAt(1)){case 100:case 109:case 115:case 45:j=r;break;default:j=A}if(Z=(m=t(r,j,m,h,f+1)).length,0<M&&(x=s(3,m,j=n(A,z,B),r,I,S,Z,h,f,c),z=j.join(""),void 0!==x&&0===(Z=(m=x.trim()).length)&&(h=0,m="")),0<Z)switch(h){case 115:z=z.replace(w,i);case 100:case 109:case 45:m=z+"{"+m+"}";break;case 107:m=(z=z.replace(v,"$1 $2"))+"{"+m+"}",m=1===P||2===P&&a("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=z+m,112===c&&(H+=m,m="")}else m=""}else m=t(r,n(r,z,B),m,c,f+1);$+=m,m=B=j=L=p=0,z="",h=l.charCodeAt(++D);break;case 125:case 59:if(1<(Z=(z=(0<j?z.replace(d,""):z).trim()).length))switch(0===L&&(p=z.charCodeAt(0),45===p||96<p&&123>p)&&(Z=(z=z.replace(" ",":")).length),0<M&&void 0!==(x=s(1,z,r,e,I,S,H.length,c,f,c))&&0===(Z=(z=x.trim()).length)&&(z="\0\0"),p=z.charCodeAt(0),h=z.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){V+=z+l.charAt(D);break}default:58!==z.charCodeAt(Z-1)&&(H+=o(z,p,h,z.charCodeAt(2)))}B=j=L=p=0,z="",h=l.charCodeAt(++D)}}switch(h){case 13:case 10:47===k?k=0:0===1+p&&107!==c&&0<z.length&&(j=1,z+="\0"),0<M*R&&s(0,z,r,e,I,S,H.length,c,f,c),S=1,I++;break;case 59:case 125:if(0===k+C+_+E){S++;break}default:switch(S++,g=l.charAt(D),h){case 9:case 32:if(0===C+E+k)switch(T){case 44:case 58:case 9:case 32:g="";break;default:32!==h&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===C+k+E&&(j=B=1,g="\f"+g);break;case 108:if(0===C+k+E+O&&0<L)switch(D-L){case 2:112===T&&58===l.charCodeAt(D-3)&&(O=T);case 8:111===N&&(O=N)}break;case 58:0===C+k+E&&(L=D);break;case 44:0===k+_+C+E&&(j=1,g+="\r");break;case 34:case 39:0===k&&(C=C===h?0:0===C?h:C);break;case 91:0===C+k+_&&E++;break;case 93:0===C+k+_&&E--;break;case 41:0===C+k+E&&_--;break;case 40:0===C+k+E&&(0===p&&(2*T+3*N==533||(p=1)),_++);break;case 64:0===k+_+C+E+L+m&&(m=1);break;case 42:case 47:if(!(0<C+E+_))switch(k){case 0:switch(2*h+3*l.charCodeAt(D+1)){case 235:k=47;break;case 220:Z=D,k=42}break;case 42:47===h&&42===T&&Z+2!==D&&(33===l.charCodeAt(Z+2)&&(H+=l.substring(Z,D+1)),g="",k=0)}}0===k&&(z+=g)}N=T,T=h,D++}if(0<(Z=H.length)){if(j=r,0<M&&void 0!==(x=s(2,H,j,e,I,S,Z,c,f,c))&&0===(H=x).length)return V+H+$;if(H=j.join(",")+"{"+H+"}",0!=P*O){switch(2!==P||a(H,2)||(O=0),O){case 111:H=H.replace(b,":-moz-$1")+H;break;case 112:H=H.replace(y,"::-webkit-input-$1")+H.replace(y,"::-moz-$1")+H.replace(y,":-ms-input-$1")+H}O=0}}return V+H+$}function n(e,t,n){var o=t.trim().split(m);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";s<a;++s)t[s]=r(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<a;++s)for(var c=0;c<i;++c)t[l++]=r(e[c]+" ",o[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var i=e+";",s=2*t+3*n+4*r;if(944===s){e=i.indexOf(":",9)+1;var l=i.substring(e,i.length-1).trim();return l=i.substring(0,e).trim()+l+";",1===P||2===P&&a(l,1)?"-webkit-"+l+l:l}if(0===P||2===P&&!a(i,1))return i;switch(s){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(T,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(l=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+l+i;case 1005:return p.test(i)?i.replace(f,":-webkit-")+i.replace(f,":-moz-")+i:i;case 1e3:switch(t=(l=i.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=i.replace(x,"tb");break;case 232:l=i.replace(x,"tb-rl");break;case 220:l=i.replace(x,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+l+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,s=(l=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:i=i.replace(l,"-webkit-"+l)+";"+i;break;case 207:case 102:i=i.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+i.replace(l,"-webkit-"+l)+";"+i.replace(l,"-ms-"+l+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return l=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+l+"-ms-flex-"+l+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(k,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(k,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):i.replace(l,"-webkit-"+l)+i.replace(l,"-moz-"+l.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+r&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(h,"$1-webkit-$2")+i}return i}function a(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),L(2!==t?r:r.replace(_,"$1"),n,t)}function i(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(E," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,o,a,i,s,l,u){for(var d,f=0,p=t;f<M;++f)switch(d=N[f].call(c,e,p,n,r,o,a,i,s,l,u)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function l(e){return void 0!==(e=e.prefix)&&(L=null,e?"function"!=typeof e?P=1:(P=2,L=e):P=0),l}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<M){var o=s(-1,n,r,r,I,S,0,0,0,0);void 0!==o&&"string"==typeof o&&(n=o)}var a=t(A,r,n,0,0);return 0<M&&void 0!==(o=s(-2,a,r,r,I,S,a.length,0,0,0))&&(a=o),O=0,S=I=1,a}var u=/^\0+/g,d=/[\0\r\f]/g,f=/: */g,p=/zoo|gra/,h=/([,: ])(transform)/g,m=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,k=/-self|flex-/g,_=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,T=/([^-])(image-set\()/,S=1,I=1,O=0,P=1,A=[],N=[],M=0,L=null,R=0;return c.use=function e(t){switch(t){case void 0:case null:M=N.length=0;break;default:if("function"==typeof t)N[M++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else R=0|!!t}return e},c.set=l,void 0!==e&&l(e),c},c={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var u=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const d=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=(n=e,u.test(n)||111===n.charCodeAt(0)&&110===n.charCodeAt(1)&&n.charCodeAt(2)<91)),t[e];var n}}();var f=n(8679),p=n.n(f),h=n(4155);function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var g=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},v=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,r.typeOf)(e)},y=Object.freeze([]),b=Object.freeze({});function x(e){return"function"==typeof e}function w(e){return e.displayName||e.name||"Component"}function E(e){return e&&"string"==typeof e.styledComponentId}var k=void 0!==h&&(h.env.REACT_APP_SC_ATTR||h.env.SC_ATTR)||"data-styled",_="undefined"!=typeof window&&"HTMLElement"in window,C=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==h&&void 0!==h.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==h.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==h.env.REACT_APP_SC_DISABLE_SPEEDY&&h.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==h&&void 0!==h.env.SC_DISABLE_SPEEDY&&""!==h.env.SC_DISABLE_SPEEDY&&"false"!==h.env.SC_DISABLE_SPEEDY&&h.env.SC_DISABLE_SPEEDY);function T(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var S=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&T(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+=this.tag.getRule(a)+"/*!sc*/\n";return t},e}(),I=new Map,O=new Map,P=1,A=function(e){if(I.has(e))return I.get(e);for(;O.has(P);)P++;var t=P++;return I.set(e,t),O.set(t,e),t},N=function(e){return O.get(e)},M=function(e,t){t>=P&&(P=t+1),I.set(e,t),O.set(t,e)},L="style["+k+'][data-styled-version="5.3.6"]',R=new RegExp("^"+k+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),D=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},j=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,a=n.length;o<a;o++){var i=n[o].trim();if(i){var s=i.match(R);if(s){var l=0|parseInt(s[1],10),c=s[2];0!==l&&(M(c,l),D(e,c,s[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(i)}}},B=function(){return n.nc},Z=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(k))return r}}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(k,"active"),r.setAttribute("data-styled-version","5.3.6");var i=B();return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},F=function(){function e(e){var t=this.element=Z(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}T(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),U=function(){function e(e){var t=this.element=Z(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),z=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),H=_,$={isServer:!_,useCSSOMInjection:!C},V=function(){function e(e,t,n){void 0===e&&(e=b),void 0===t&&(t={}),this.options=m({},$,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&_&&H&&(H=!1,function(e){for(var t=document.querySelectorAll(L),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(k)&&(j(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return A(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(m({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new z(o):r?new F(o):new U(o),new S(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(A(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(A(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(A(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var a=N(o);if(void 0!==a){var i=e.names.get(a),s=t.getGroup(o);if(i&&s&&i.size){var l=k+".g"+o+'[id="'+a+'"]',c="";void 0!==i&&i.forEach((function(e){e.length>0&&(c+=e+",")})),r+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),q=/(a)(d)/gi,W=function(e){return String.fromCharCode(e+(e>25?39:97))};function G(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=W(t%52)+n;return(W(t%52)+n).replace(q,"$1-$2")}var Y=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},X=function(e){return Y(5381,e)};function K(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(x(n)&&!E(n))return!1}return!0}var Q=X("5.3.6"),J=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&K(e),this.componentId=t,this.baseHash=Y(Q,t),this.baseStyle=n,V.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var a=ge(this.rules,e,t,n).join(""),i=G(Y(this.baseHash,a)>>>0);if(!t.hasNameForId(r,i)){var s=n(a,"."+i,void 0,r);t.insertRules(r,i,s)}o.push(i),this.staticRulesId=i}else{for(var l=this.rules.length,c=Y(this.baseHash,n.hash),u="",d=0;d<l;d++){var f=this.rules[d];if("string"==typeof f)u+=f;else if(f){var p=ge(f,e,t,n),h=Array.isArray(p)?p.join(""):p;c=Y(c,h+d),u+=h}}if(u){var m=G(c>>>0);if(!t.hasNameForId(r,m)){var g=n(u,"."+m,void 0,r);t.insertRules(r,m,g)}o.push(m)}}return o.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,o,a=void 0===e?b:e,i=a.options,s=void 0===i?b:i,c=a.plugins,u=void 0===c?y:c,d=new l(s),f=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,a,i,s,l,c,u,d){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),h=function(e,r,a){return 0===r&&-1!==te.indexOf(a[n.length])||a.match(o)?e:"."+t};function m(e,a,i,s){void 0===s&&(s="&");var l=e.replace(ee,""),c=a&&i?i+" "+a+" { "+l+" }":l;return t=s,n=a,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),d(i||!a?"":a,c)}return d.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,h))},p,function(e){if(-2===e){var t=f;return f=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||T(15),Y(e,t.name)}),5381).toString():"",m}var re=a().createContext(),oe=(re.Consumer,a().createContext()),ae=(oe.Consumer,new V),ie=ne();function se(){return(0,o.useContext)(re)||ae}function le(e){var t=(0,o.useState)(e.stylisPlugins),n=t[0],r=t[1],i=se(),l=(0,o.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=(0,o.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,o.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),a().createElement(re.Provider,{value:l},a().createElement(oe.Provider,{value:c},e.children))}var ce=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ie);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return T(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ie),this.name+e.hash},e}(),ue=/([A-Z])/,de=/([A-Z])/g,fe=/^ms-/,pe=function(e){return"-"+e.toLowerCase()};function he(e){return ue.test(e)?e.replace(de,pe).replace(fe,"-ms-"):e}var me=function(e){return null==e||!1===e||""===e};function ge(e,t,n,r){if(Array.isArray(e)){for(var o,a=[],i=0,s=e.length;i<s;i+=1)""!==(o=ge(e[i],t,n,r))&&(Array.isArray(o)?a.push.apply(a,o):a.push(o));return a}return me(e)?"":E(e)?"."+e.styledComponentId:x(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!t?e:ge(e(t),t,n,r):e instanceof ce?n?(e.inject(n,r),e.getName(r)):e:v(e)?function e(t,n){var r,o,a=[];for(var i in t)t.hasOwnProperty(i)&&!me(t[i])&&(Array.isArray(t[i])&&t[i].isCss||x(t[i])?a.push(he(i)+":",t[i],";"):v(t[i])?a.push.apply(a,e(t[i],i)):a.push(he(i)+": "+(r=i,(null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in c?String(o).trim():o+"px")+";")));return n?[n+" {"].concat(a,["}"]):a}(e):e.toString();var l}var ve=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function ye(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return x(e)||v(e)?ve(ge(g(y,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:ve(ge(g(e,n)))}new Set;var be=function(e,t,n){return void 0===n&&(n=b),e.theme!==n.theme&&e.theme||t||n.theme},xe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,we=/(^-|-$)/g;function Ee(e){return e.replace(xe,"-").replace(we,"")}var ke=function(e){return G(X(e)>>>0)};function _e(e){return"string"==typeof e&&!0}var Ce=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Te=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Se(e,t,n){var r=e[n];Ce(t)&&Ce(r)?Ie(r,t):e[n]=t}function Ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,a=n;o<a.length;o++){var i=a[o];if(Ce(i))for(var s in i)Te(s)&&Se(e,i[s],s)}return e}var Oe=a().createContext();function Pe(e){var t=(0,o.useContext)(Oe),n=(0,o.useMemo)((function(){return function(e,t){return e?x(e)?e(t):Array.isArray(e)||"object"!=typeof e?T(8):t?m({},t,{},e):e:T(14)}(e.theme,t)}),[e.theme,t]);return e.children?a().createElement(Oe.Provider,{value:n},e.children):null}Oe.Consumer;var Ae={};function Ne(e,t,n){var r=E(e),i=!_e(e),s=t.attrs,l=void 0===s?y:s,c=t.componentId,u=void 0===c?function(e,t){var n="string"!=typeof e?"sc":Ee(e);Ae[n]=(Ae[n]||0)+1;var r=n+"-"+ke("5.3.6"+n+Ae[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):c,f=t.displayName,h=void 0===f?function(e){return _e(e)?"styled."+e:"Styled("+w(e)+")"}(e):f,g=t.displayName&&t.componentId?Ee(t.displayName)+"-"+t.componentId:t.componentId||u,v=r&&e.attrs?Array.prototype.concat(e.attrs,l).filter(Boolean):l,k=t.shouldForwardProp;r&&e.shouldForwardProp&&(k=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var _,C=new J(n,g,r?e.componentStyle:void 0),T=C.isStatic&&0===l.length,S=function(e,t){return function(e,t,n,r){var a=e.attrs,i=e.componentStyle,s=e.defaultProps,l=e.foldedComponentIds,c=e.shouldForwardProp,u=e.styledComponentId,f=e.target,p=function(e,t,n){void 0===e&&(e=b);var r=m({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,a,i=e;for(t in x(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],a=i[t],n&&a?n+" "+a:n||a):i[t]})),[r,o]}(be(t,(0,o.useContext)(Oe),s)||b,t,a),h=p[0],g=p[1],v=function(e,t,n,r){var a=se(),i=(0,o.useContext)(oe)||ie;return t?e.generateAndInjectStyles(b,a,i):e.generateAndInjectStyles(n,a,i)}(i,r,h),y=n,w=g.$as||t.$as||g.as||t.as||f,E=_e(w),k=g!==t?m({},t,{},g):t,_={};for(var C in k)"$"!==C[0]&&"as"!==C&&("forwardedAs"===C?_.as=k[C]:(c?c(C,d,w):!E||d(C))&&(_[C]=k[C]));return t.style&&g.style!==t.style&&(_.style=m({},t.style,{},g.style)),_.className=Array.prototype.concat(l,u,v!==u?v:null,t.className,g.className).filter(Boolean).join(" "),_.ref=y,(0,o.createElement)(w,_)}(_,e,t,T)};return S.displayName=h,(_=a().forwardRef(S)).attrs=v,_.componentStyle=C,_.displayName=h,_.shouldForwardProp=k,_.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):y,_.styledComponentId=g,_.target=r?e.target:e,_.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),a=r&&r+"-"+(_e(e)?e:Ee(w(e)));return Ne(e,m({},o,{attrs:v,componentId:a}),n)},Object.defineProperty(_,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ie({},e.defaultProps,t):t}}),_.toString=function(){return"."+_.styledComponentId},i&&p()(_,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),_}var Me,Le=function(e){return function e(t,n,o){if(void 0===o&&(o=b),!(0,r.isValidElementType)(n))return T(1,String(n));var a=function(){return t(n,o,ye.apply(void 0,arguments))};return a.withConfig=function(r){return e(t,n,m({},o,{},r))},a.attrs=function(r){return e(t,n,m({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},a}(Ne,e)};function Re(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=ye.apply(void 0,[e].concat(n)).join(""),a=ke(o);return new ce(a,o)}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Le[e]=Le(e)})),(Me=function(e,t){this.rules=e,this.componentId=t,this.isStatic=K(e),V.registerId(this.componentId+1)}.prototype).createStyles=function(e,t,n,r){var o=r(ge(this.rules,t,n,r).join(""),""),a=this.componentId+e;n.insertRules(a,a,o)},Me.removeStyles=function(e,t){t.clearRules(this.componentId+e)},Me.renderStyles=function(e,t,n,r){e>2&&V.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},function(){var e=function(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=B();return"<style "+[n&&'nonce="'+n+'"',k+'="true"','data-styled-version="5.3.6"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?T(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return T(2);var n=((t={})[k]="",t["data-styled-version"]="5.3.6",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=B();return r&&(n.nonce=r),[a().createElement("style",m({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new V({isServer:!0}),this.sealed=!1}.prototype;e.collectStyles=function(e){return this.sealed?T(2):a().createElement(le,{sheet:this.instance},e)},e.interleaveWithNodeStream=function(e){return T(3)}}();var De=function(){return(0,o.useContext)(Oe)};const je=Le},7121:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r}),e=n.hmd(e);const r=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:e)},8721:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const a=new Uint8Array(16);function i(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(a)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));const l=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return function(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}(o)}},5099:t=>{"use strict";t.exports=e},5689:e=>{"use strict";e.exports=o},1984:e=>{"use strict";e.exports=r},8156:e=>{"use strict";e.exports=t},7111:e=>{"use strict";e.exports=n},7462:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},3366:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{Z:()=>r})},7536:(e,t,n)=>{"use strict";n.d(t,{Qr:()=>N,cI:()=>Ee,cl:()=>T,qo:()=>A});var r=n(8156),o=e=>"checkbox"===e.type,a=e=>e instanceof Date,i=e=>null==e;const s=e=>"object"==typeof e;var l=e=>!i(e)&&!Array.isArray(e)&&s(e)&&!a(e),c=e=>l(e)&&e.target?o(e.target)?e.target.checked:e.target.value:e,u=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),d=e=>Array.isArray(e)?e.filter(Boolean):[],f=e=>void 0===e,p=(e,t,n)=>{if(!t||!l(e))return n;const r=d(t.split(/[,[\].]+?/)).reduce(((e,t)=>i(e)?e:e[t]),e);return f(r)||r===e?f(e[t])?n:e[t]:r};const h={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},m={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},g="pattern",v="required",y=r.createContext(null),b=()=>r.useContext(y);var x=(e,t,n,r=!0)=>{const o={};for(const a in e)Object.defineProperty(o,a,{get:()=>{const o=a;return t[o]!==m.all&&(t[o]=!r||m.all),n&&(n[o]=!0),e[o]}});return o},w=e=>l(e)&&!Object.keys(e).length,E=(e,t,n)=>{const{name:r,...o}=e;return w(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!n||m.all)))},k=e=>Array.isArray(e)?e:[e],_=(e,t,n)=>n&&t?e===t:!e||!t||e===t||k(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function C(e){const t=r.useRef(e);t.current=e,r.useEffect((()=>{const n=!e.disabled&&t.current.subject.subscribe({next:t.current.callback});return()=>(e=>{e&&e.unsubscribe()})(n)}),[e.disabled])}function T(e){const t=b(),{control:n=t.control,disabled:o,name:a,exact:i}=e||{},[s,l]=r.useState(n._formState),c=r.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=r.useRef(a),d=r.useRef(!0);return u.current=a,C({disabled:o,callback:r.useCallback((e=>d.current&&_(u.current,e.name,i)&&E(e,c.current)&&l({...n._formState,...e})),[n,i]),subject:n._subjects.state}),r.useEffect((()=>(d.current=!0,()=>{d.current=!1})),[]),x(s,n._proxyFormState,c.current,!1)}var S=e=>"string"==typeof e,I=(e,t,n,r)=>{const o=Array.isArray(e);return S(e)?(r&&t.watch.add(e),p(n,e)):o?e.map((e=>(r&&t.watch.add(e),p(n,e)))):(r&&(t.watchAll=!0),n)},O=e=>"function"==typeof e,P=e=>{for(const t in e)if(O(e[t]))return!0;return!1};function A(e){const t=b(),{control:n=t.control,name:o,defaultValue:a,disabled:i,exact:s}=e||{},c=r.useRef(o);c.current=o;const u=r.useCallback((e=>{if(_(c.current,e.name,s)){const t=I(c.current,n._names,e.values||n._formValues);p(f(c.current)||l(t)&&!P(t)?{...t}:Array.isArray(t)?[...t]:f(t)?a:t)}}),[n,s,a]);C({disabled:i,subject:n._subjects.watch,callback:u});const[d,p]=r.useState(f(a)?n._getWatch(o):a);return r.useEffect((()=>{n._removeUnmounted()})),d}const N=e=>e.render(function(e){const t=b(),{name:n,control:o=t.control,shouldUnregister:a}=e,i=u(o._names.array,n),s=A({control:o,name:n,defaultValue:p(o._formValues,n,p(o._defaultValues,n,e.defaultValue)),exact:!0}),l=T({control:o,name:n}),d=r.useRef(o.register(n,{...e.rules,value:s}));return r.useEffect((()=>{const e=(e,t)=>{const n=p(o._fields,e);n&&(n._f.mount=t)};return e(n,!0),()=>{const t=o._options.shouldUnregister||a;(i?t&&!o._stateFlags.action:t)?o.unregister(n):e(n,!1)}}),[n,o,i,a]),{field:{name:n,value:s,onChange:r.useCallback((e=>{d.current.onChange({target:{value:c(e),name:n},type:h.CHANGE})}),[n]),onBlur:r.useCallback((()=>{d.current.onBlur({target:{value:p(o._formValues,n),name:n},type:h.BLUR})}),[n,o]),ref:r.useCallback((e=>{const t=p(o._fields,n);e&&t&&e.focus&&(t._f.ref={focus:()=>e.focus(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[n,o._fields])},formState:l,fieldState:Object.defineProperties({},{invalid:{get:()=>!!p(l.errors,n)},isDirty:{get:()=>!!p(l.dirtyFields,n)},isTouched:{get:()=>!!p(l.touchedFields,n)},error:{get:()=>p(l.errors,n)}})}}(e));var M=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},L=e=>/^\w*$/.test(e),R=e=>d(e.replace(/["|']|\]/g,"").split(/\.|\[/));function D(e,t,n){let r=-1;const o=L(t)?[t]:R(t),a=o.length,i=a-1;for(;++r<a;){const t=o[r];let a=n;if(r!==i){const n=e[t];a=l(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}e[t]=a,e=e[t]}return e}const j=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=p(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus&&f(e.ref.focus()))break;if(e.refs){e.refs[0].focus();break}}else l(r)&&j(r,t)}}};var B=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),Z="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function F(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(Z&&(e instanceof Blob||e instanceof FileList)||!n&&!l(e))return e;t=n?[]:{};for(const n in e){if(O(e[n])){t=e;break}t[n]=F(e[n])}}return t}function U(e,t){const n=L(t)?[t]:R(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=f(e)?r++:e[t[r++]];return e}(e,n),o=n[n.length-1];let a;r&&delete r[o];for(let t=0;t<n.slice(0,-1).length;t++){let r,o=-1;const i=n.slice(0,-(t+1)),s=i.length-1;for(t>0&&(a=e);++o<i.length;){const t=i[o];r=r?r[t]:e[t],s===o&&(l(r)&&w(r)||Array.isArray(r)&&!r.filter((e=>!f(e))).length)&&(a?delete a[t]:delete e[t]),a=r}}return e}function z(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var H=e=>i(e)||!s(e);function $(e,t){if(H(e)||H(t))return e===t;if(a(e)&&a(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const n=e[o];if(!r.includes(o))return!1;if("ref"!==o){const e=t[o];if(a(n)&&a(e)||l(n)&&l(e)||Array.isArray(n)&&Array.isArray(e)?!$(n,e):n!==e)return!1}}return!0}var V=e=>({isOnSubmit:!e||e===m.onSubmit,isOnBlur:e===m.onBlur,isOnChange:e===m.onChange,isOnAll:e===m.all,isOnTouch:e===m.onTouched}),q=e=>"boolean"==typeof e,W=e=>"file"===e.type,G=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Y=e=>"select-multiple"===e.type,X=e=>"radio"===e.type,K=e=>X(e)||o(e),Q=e=>G(e)&&e.isConnected;function J(e,t={}){const n=Array.isArray(e);if(l(e)||n)for(const n in e)Array.isArray(e[n])||l(e[n])&&!P(e[n])?(t[n]=Array.isArray(e[n])?[]:{},J(e[n],t[n])):i(e[n])||(t[n]=!0);return t}function ee(e,t,n){const r=Array.isArray(e);if(l(e)||r)for(const r in e)Array.isArray(e[r])||l(e[r])&&!P(e[r])?f(t)||H(n[r])?n[r]=Array.isArray(e[r])?J(e[r],[]):{...J(e[r])}:ee(e[r],i(t)?{}:t[r],n[r]):n[r]=!$(e[r],t[r]);return n}var te=(e,t)=>ee(e,t,J(t));const ne={value:!1,isValid:!1},re={value:!0,isValid:!0};var oe=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!f(e[0].attributes.value)?f(e[0].value)||""===e[0].value?re:{value:e[0].value,isValid:!0}:re:ne}return ne},ae=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>f(e)?e:t?""===e||i(e)?NaN:+e:n&&S(e)?new Date(e):r?r(e):e;const ie={isValid:!1,value:null};var se=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),ie):ie;function le(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return W(t)?t.files:X(t)?se(e.refs).value:Y(t)?[...t.selectedOptions].map((({value:e})=>e)):o(t)?oe(e.refs).value:ae(f(t.value)?e.ref.value:t.value,e)}var ce=(e,t,n,r)=>{const o={};for(const n of e){const e=p(t,n);e&&D(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},ue=e=>e instanceof RegExp,de=e=>f(e)?void 0:ue(e)?e.source:l(e)?ue(e.value)?e.value.source:e.value:e,fe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function pe(e,t,n){const r=p(e,n);if(r||L(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),a=p(t,r),i=p(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(i&&i.type)return{name:r,error:i};o.pop()}return{name:n}}var he=(e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e),me=(e,t)=>!d(p(e,t)).length&&U(e,t),ge=e=>S(e)||r.isValidElement(e);function ve(e,t,n="validate"){if(ge(e)||Array.isArray(e)&&e.every(ge)||q(e)&&!e)return{type:n,message:ge(e)?e:"",ref:t}}var ye=e=>l(e)&&!ue(e)?e:{value:e,message:""},be=async(e,t,n,r)=>{const{ref:a,refs:s,required:c,maxLength:u,minLength:d,min:f,max:p,pattern:h,validate:m,name:y,valueAsNumber:b,mount:x,disabled:E}=e._f;if(!x||E)return{};const k=s?s[0]:a,_=e=>{r&&k.reportValidity&&(k.setCustomValidity(q(e)?"":e||" "),k.reportValidity())},C={},T=X(a),I=o(a),P=T||I,A=(b||W(a))&&!a.value||""===t||Array.isArray(t)&&!t.length,N=M.bind(null,y,n,C),L=(e,t,n,r="maxLength",o="minLength")=>{const i=e?t:n;C[y]={type:e?r:o,message:i,ref:a,...N(e?r:o,i)}};if(c&&(!P&&(A||i(t))||q(t)&&!t||I&&!oe(s).isValid||T&&!se(s).isValid)){const{value:e,message:t}=ge(c)?{value:!!c,message:c}:ye(c);if(e&&(C[y]={type:v,message:t,ref:k,...N(v,t)},!n))return _(t),C}if(!(A||i(f)&&i(p))){let e,r;const o=ye(p),s=ye(f);if(i(t)||isNaN(t)){const n=a.valueAsDate||new Date(t);S(o.value)&&(e=n>new Date(o.value)),S(s.value)&&(r=n<new Date(s.value))}else{const n=a.valueAsNumber||+t;i(o.value)||(e=n>o.value),i(s.value)||(r=n<s.value)}if((e||r)&&(L(!!e,o.message,s.message,"max","min"),!n))return _(C[y].message),C}if((u||d)&&!A&&S(t)){const e=ye(u),r=ye(d),o=!i(e.value)&&t.length>e.value,a=!i(r.value)&&t.length<r.value;if((o||a)&&(L(o,e.message,r.message),!n))return _(C[y].message),C}if(h&&!A&&S(t)){const{value:e,message:r}=ye(h);if(ue(e)&&!t.match(e)&&(C[y]={type:g,message:r,ref:a,...N(g,r)},!n))return _(r),C}if(m)if(O(m)){const e=ve(await m(t),k);if(e&&(C[y]={...e,...N("validate",e.message)},!n))return _(e.message),C}else if(l(m)){let e={};for(const r in m){if(!w(e)&&!n)break;const o=ve(await m[r](t),k,r);o&&(e={...o,...N(r,o.message)},_(o.message),n&&(C[y]=e))}if(!w(e)&&(C[y]={ref:k,...e},!n))return C}return _(!0),C};const xe={mode:m.onSubmit,reValidateMode:m.onChange,shouldFocusError:!0};function we(e={}){let t,n={...xe,...e},r={isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}},s={},l=F(n.defaultValues)||{},g=n.shouldUnregister?{}:F(l),v={action:!1,mount:!1,watch:!1},y={mount:new Set,unMount:new Set,array:new Set,watch:new Set},b=0,x={};const E={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},_={watch:z(),array:z(),state:z()},C=V(n.mode),T=V(n.reValidateMode),P=n.criteriaMode===m.all,A=async e=>{let t=!1;return E.isValid&&(t=n.resolver?w((await L()).errors):await R(s,!0),e||t===r.isValid||(r.isValid=t,_.state.next({isValid:t}))),t},N=(e,t,n,r)=>{const o=p(s,e);if(o){const a=p(g,e,f(n)?p(l,e):n);f(a)||r&&r.defaultChecked||t?D(g,e,t?a:le(o._f)):ee(e,a),v.mount&&A()}},M=(e,t,n,o,a)=>{let i=!1;const s={name:e},c=p(r.touchedFields,e);if(E.isDirty){const e=r.isDirty;r.isDirty=s.isDirty=X(),i=e!==s.isDirty}if(E.dirtyFields&&(!n||o)){const n=p(r.dirtyFields,e);$(p(l,e),t)?U(r.dirtyFields,e):D(r.dirtyFields,e,!0),s.dirtyFields=r.dirtyFields,i=i||n!==p(r.dirtyFields,e)}return n&&!c&&(D(r.touchedFields,e,n),s.touchedFields=r.touchedFields,i=i||E.touchedFields&&c!==n),i&&a&&_.state.next(s),i?s:{}},L=async e=>n.resolver?await n.resolver({...g},n.context,ce(e||y.mount,s,n.criteriaMode,n.shouldUseNativeValidation)):{},R=async(e,t,o={valid:!0})=>{for(const a in e){const i=e[a];if(i){const{_f:e,...a}=i;if(e){const a=await be(i,p(g,e.name),P,n.shouldUseNativeValidation);if(a[e.name]&&(o.valid=!1,t))break;t||(a[e.name]?D(r.errors,e.name,a[e.name]):U(r.errors,e.name))}a&&await R(a,t,o)}}return o.valid},X=(e,t)=>(e&&t&&D(g,e,t),!$(se(),l)),J=(e,t,n)=>{const r={...v.mount?g:f(t)?l:S(e)?{[e]:t}:t};return I(e,y,r,n)},ee=(e,t,n={})=>{const r=p(s,e);let a=t;if(r){const n=r._f;n&&(!n.disabled&&D(g,e,ae(t,n)),a=Z&&G(n.ref)&&i(t)?"":t,Y(n.ref)?[...n.ref.options].forEach((e=>e.selected=a.includes(e.value))):n.refs?o(n.ref)?n.refs.length>1?n.refs.forEach((e=>!e.disabled&&(e.checked=Array.isArray(a)?!!a.find((t=>t===e.value)):a===e.value))):n.refs[0]&&(n.refs[0].checked=!!a):n.refs.forEach((e=>e.checked=e.value===a)):W(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||_.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&M(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&ie(e)},ne=(e,t,n)=>{for(const r in t){const o=t[r],i=`${e}.${r}`,l=p(s,i);!y.array.has(e)&&H(o)&&(!l||l._f)||a(o)?ee(i,o,n):ne(i,o,n)}},re=(e,t,n={})=>{const o=p(s,e),a=y.array.has(e),c=F(t);D(g,e,c),a?(_.array.next({name:e,values:g}),(E.isDirty||E.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=te(l,g),_.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:X(e,c)}))):!o||o._f||i(c)?ee(e,c,n):ne(e,c,n),B(e,y)&&_.state.next({}),_.watch.next({name:e})},oe=async o=>{const a=o.target;let i=a.name;const l=p(s,i);if(l){let u,d;const f=a.type?le(l._f):c(o),m=o.type===h.BLUR||o.type===h.FOCUS_OUT,v=!fe(l._f)&&!n.resolver&&!p(r.errors,i)&&!l._f.deps||he(m,p(r.touchedFields,i),r.isSubmitted,T,C),k=B(i,y,m);D(g,i,f),m?(l._f.onBlur&&l._f.onBlur(o),t&&t(0)):l._f.onChange&&l._f.onChange(o);const S=M(i,f,m,!1),I=!w(S)||k;if(!m&&_.watch.next({name:i,type:o.type}),v)return I&&_.state.next({name:i,...k?{}:S});if(!m&&k&&_.state.next({}),x[i]=(x[i],1),_.state.next({isValidating:!0}),n.resolver){const{errors:e}=await L([i]),t=pe(r.errors,s,i),n=pe(e,s,t.name||i);u=n.error,i=n.name,d=w(e)}else u=(await be(l,p(g,i),P,n.shouldUseNativeValidation))[i],d=await A(!0);l._f.deps&&ie(l._f.deps),(async(n,o,a,i)=>{const s=p(r.errors,n),l=E.isValid&&r.isValid!==o;var c;if(e.delayError&&a?(c=()=>((e,t)=>{D(r.errors,e,t),_.state.next({errors:r.errors})})(n,a),t=e=>{clearTimeout(b),b=window.setTimeout(c,e)},t(e.delayError)):(clearTimeout(b),t=null,a?D(r.errors,n,a):U(r.errors,n)),(a?!$(s,a):s)||!w(i)||l){const e={...i,...l?{isValid:o}:{},errors:r.errors,name:n};r={...r,...e},_.state.next(e)}x[n]--,E.isValidating&&!Object.values(x).some((e=>e))&&(_.state.next({isValidating:!1}),x={})})(i,d,u,S)}},ie=async(e,t={})=>{let o,a;const i=k(e);if(_.state.next({isValidating:!0}),n.resolver){const t=await(async e=>{const{errors:t}=await L();if(e)for(const n of e){const e=p(t,n);e?D(r.errors,n,e):U(r.errors,n)}else r.errors=t;return t})(f(e)?e:i);o=w(t),a=e?!i.some((e=>p(t,e))):o}else e?(a=(await Promise.all(i.map((async e=>{const t=p(s,e);return await R(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&A()):a=o=await R(s);return _.state.next({...!S(e)||E.isValid&&o!==r.isValid?{}:{name:e},...n.resolver?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!a&&j(s,(e=>p(r.errors,e)),e?i:y.mount),a},se=e=>{const t={...l,...v.mount?g:{}};return f(e)?t:S(e)?p(t,e):e.map((e=>p(t,e)))},ue=(e,t)=>({invalid:!!p((t||r).errors,e),isDirty:!!p((t||r).dirtyFields,e),isTouched:!!p((t||r).touchedFields,e),error:p((t||r).errors,e)}),ge=(e,t={})=>{for(const o of e?k(e):y.mount)y.mount.delete(o),y.array.delete(o),p(s,o)&&(t.keepValue||(U(s,o),U(g,o)),!t.keepError&&U(r.errors,o),!t.keepDirty&&U(r.dirtyFields,o),!t.keepTouched&&U(r.touchedFields,o),!n.shouldUnregister&&!t.keepDefaultValue&&U(l,o));_.watch.next({}),_.state.next({...r,...t.keepDirty?{isDirty:X()}:{}}),!t.keepIsValid&&A()},ve=(e,t={})=>{let r=p(s,e);const o=q(t.disabled);return D(s,e,{_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),y.mount.add(e),r?o&&D(g,e,t.disabled?void 0:p(g,e,le(r._f))):N(e,!0,t.value),{...o?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:de(t.min),max:de(t.max),minLength:de(t.minLength),maxLength:de(t.maxLength),pattern:de(t.pattern)}:{},name:e,onChange:oe,onBlur:oe,ref:o=>{if(o){ve(e,t),r=p(s,e);const n=f(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=K(n),i=r._f.refs||[];if(a?i.find((e=>e===n)):n===r._f.ref)return;D(s,e,{_f:{...r._f,...a?{refs:[...i.filter(Q),n,...Array.isArray(p(l,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),N(e,!1,void 0,n)}else r=p(s,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!u(y.array,e)||!v.action)&&y.unMount.add(e)}}};return{control:{register:ve,unregister:ge,getFieldState:ue,_executeSchema:L,_getWatch:J,_getDirty:X,_updateValid:A,_removeUnmounted:()=>{for(const e of y.unMount){const t=p(s,e);t&&(t._f.refs?t._f.refs.every((e=>!Q(e))):!Q(t._f.ref))&&ge(e)}y.unMount=new Set},_updateFieldArray:(e,t=[],n,o,a=!0,i=!0)=>{if(o&&n){if(v.action=!0,i&&Array.isArray(p(s,e))){const t=n(p(s,e),o.argA,o.argB);a&&D(s,e,t)}if(E.errors&&i&&Array.isArray(p(r.errors,e))){const t=n(p(r.errors,e),o.argA,o.argB);a&&D(r.errors,e,t),me(r.errors,e)}if(E.touchedFields&&i&&Array.isArray(p(r.touchedFields,e))){const t=n(p(r.touchedFields,e),o.argA,o.argB);a&&D(r.touchedFields,e,t)}E.dirtyFields&&(r.dirtyFields=te(l,g)),_.state.next({isDirty:X(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else D(g,e,t)},_getFieldArray:t=>d(p(v.mount?g:l,t,e.shouldUnregister?p(l,t,[]):[])),_subjects:_,_proxyFormState:E,get _fields(){return s},get _formValues(){return g},get _stateFlags(){return v},set _stateFlags(e){v=e},get _defaultValues(){return l},get _names(){return y},set _names(e){y=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:ie,register:ve,handleSubmit:(e,t)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let a=!0,i=F(g);_.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await L();r.errors=e,i=t}else await R(s);w(r.errors)?(_.state.next({errors:{},isSubmitting:!0}),await e(i,o)):(t&&await t({...r.errors},o),n.shouldFocusError&&j(s,(e=>p(r.errors,e)),y.mount))}catch(e){throw a=!1,e}finally{r.isSubmitted=!0,_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:w(r.errors)&&a,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>O(e)?_.watch.subscribe({next:n=>e(J(void 0,t),n)}):J(e,t,!0),setValue:re,getValues:se,reset:(t,n={})=>{const o=t||l,a=F(o),i=t&&!w(t)?a:l;if(n.keepDefaultValues||(l=o),!n.keepValues){if(n.keepDirtyValues)for(const e of y.mount)p(r.dirtyFields,e)?D(i,e,p(g,e)):re(e,p(i,e));else{if(Z&&f(t))for(const e of y.mount){const t=p(s,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;try{G(e)&&e.closest("form").reset();break}catch(e){}}}s={}}g=e.shouldUnregister?n.keepDefaultValues?F(l):{}:a,_.array.next({values:i}),_.watch.next({values:i})}y={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},v.mount=!E.isValid||!!n.keepIsValid,v.watch=!!e.shouldUnregister,_.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||$(t,l)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?te(l,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},resetField:(e,t={})=>{p(s,e)&&(f(t.defaultValue)?re(e,p(l,e)):(re(e,t.defaultValue),D(l,e,t.defaultValue)),t.keepTouched||U(r.touchedFields,e),t.keepDirty||(U(r.dirtyFields,e),r.isDirty=t.defaultValue?X(e,p(l,e)):X()),t.keepError||(U(r.errors,e),E.isValid&&A()),_.state.next({...r}))},clearErrors:e=>{e?k(e).forEach((e=>U(r.errors,e))):r.errors={},_.state.next({errors:r.errors})},unregister:ge,setError:(e,t,n)=>{const o=(p(s,e,{_f:{}})._f||{}).ref;D(r.errors,e,{...t,ref:o}),_.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},setFocus:(e,t={})=>{const n=p(s,e)._f,r=n.refs?n.refs[0]:n.ref;t.shouldSelect?r.select():r.focus()},getFieldState:ue}}function Ee(e={}){const t=r.useRef(),[n,o]=r.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}});t.current?t.current.control._options=e:t.current={...we(e),formState:n};const a=t.current.control,i=r.useCallback((e=>{E(e,a._proxyFormState,!0)&&(a._formState={...a._formState,...e},o({...a._formState}))}),[a]);return C({subject:a._subjects.state,callback:i}),r.useEffect((()=>{a._stateFlags.mount||(a._proxyFormState.isValid&&a._updateValid(),a._stateFlags.mount=!0),a._stateFlags.watch&&(a._stateFlags.watch=!1,a._subjects.state.next({})),a._removeUnmounted()})),t.current.formState=x(n,a._proxyFormState),t.current}},8593:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},4147:e=>{"use strict";e.exports={i8:"2.41.1"}}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.nc=void 0;var l={};return(()=>{"use strict";s.r(l),s.d(l,{default:()=>gn});var e={};s.r(e),s.d(e,{agent:()=>dt,alerts:()=>pt,announcement:()=>mt,auth:()=>vt,bot:()=>Xe,chatbubble:()=>Qe,connection:()=>bt,environment:()=>et,feedback:()=>kt,inspector:()=>wt,lightBox:()=>Yt,local:()=>Tt,maintenanceAlert:()=>It,messages:()=>Zt,nudge:()=>Kt,privacy:()=>Ut,pushMessages:()=>$t,websocketFallback:()=>Wt});var t=s(5099),n=s.n(t),r=s(8156),o=s.n(r),a=s(4344);n().shape({context:n().shape({}),language:n().string,getAuthToken:n().func,bubbleHidden:n().bool,buttonHandlers:a.Z,onLoad:n().func,environment:n().shape({PAT_HOST:n().string,PUSHER_KEY:n().string,STATUS_PAGE:n().string,KINDLY_CHAT_URL:n().string,SETTINGS_HOST:n().string,SAGE_WS_HOST:n().string,SAGE_HOST:n().string}),inPlatform:n().bool,admin:n().bool});var i=s(2969);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){e.apply(void 0,o),n=null}),t)}}function v(e,t){var n=0;return function(){var r=(new Date).getTime();if(!(r-n<t))return n=r,e.apply(void 0,arguments)}}var y="object"===("undefined"==typeof window||"undefined"==typeof window?"undefined":c(window)),b=y?document:{},x=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?m(e):t}(this,p(t).call(this,e)),d(m(n),"state",{idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null,pageX:null,pageY:null}),d(m(n),"tId",null),d(m(n),"_handleEvent",(function(e){var t=n.state,r=t.remaining,o=t.pageX,a=t.pageY,i=t.idle,s=n.props,l=s.timeout,c=s.onAction,u=s.debounce,d=s.throttle,f=s.stopOnIdle;if(u>0?n.debouncedAction(e):d>0?n.throttledAction(e):c(e),!r){if("mousemove"===e.type){if(e.pageX===o&&e.pageY===a)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(n.getElapsedTime()<200)return}clearTimeout(n.tId),n.tId=null;var p=new Date-n.getLastActiveTime();(i&&!f||!i&&p>l)&&n.toggleIdleState(e),n.setState({lastActive:+new Date,pageX:e.pageX,pageY:e.pageY}),i&&f||(n.tId=setTimeout(n.toggleIdleState,l))}})),e.debounce>0&&e.throttle>0)throw new Error("onAction can either be throttled or debounced (not both)");return e.debounce>0&&(n.debouncedAction=g(e.onAction,e.debounce)),e.throttle>0&&(n.throttledAction=v(e.onAction,e.throttle)),e.startOnMount||(n.state.idle=!0),n.toggleIdleState=n._toggleIdleState.bind(m(n)),n.reset=n.reset.bind(m(n)),n.pause=n.pause.bind(m(n)),n.resume=n.resume.bind(m(n)),n.getRemainingTime=n.getRemainingTime.bind(m(n)),n.getElapsedTime=n.getElapsedTime.bind(m(n)),n.getLastActiveTime=n.getLastActiveTime.bind(m(n)),n.isIdle=n._isIdle.bind(m(n)),n}return f(t,e),function(e,t,n){t&&u(e.prototype,t)}(t,[{key:"componentDidMount",value:function(){this._bindEvents(),this.props.startOnMount&&this.reset()}},{key:"componentDidUpdate",value:function(e){e.debounce!==this.props.debounce&&(this.debouncedAction=g(this.props.onAction,this.props.debounce)),e.throttle!==this.props.throttle&&(this.throttledAction=v(this.props.onAction,this.props.throttle))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.tId),this._unbindEvents(!0)}},{key:"render",value:function(){return this.props.children||null}},{key:"_bindEvents",value:function(){var e=this;if(y){var t=this.state.eventsBound,n=this.props,r=n.element,o=n.events,a=n.passive,i=n.capture;t||(o.forEach((function(t){r.addEventListener(t,e._handleEvent,{capture:i,passive:a})})),this.setState({eventsBound:!0}))}}},{key:"_unbindEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(y){var n=this.props,r=n.element,o=n.events,a=n.passive,i=n.capture;(this.state.eventsBound||t)&&(o.forEach((function(t){r.removeEventListener(t,e._handleEvent,{capture:i,passive:a})})),this.setState({eventsBound:!1}))}}},{key:"_toggleIdleState",value:function(e){var t=this;this.setState((function(e){return{idle:!e.idle}}),(function(){var n=t.props,r=n.onActive,o=n.onIdle,a=n.stopOnIdle;t.state.idle?(a&&(clearTimeout(t.tId),t.tId=null,t._unbindEvents()),o(e)):a||(t._bindEvents(),r(e))}))}},{key:"reset",value:function(){clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null});var e=this.props.timeout;this.tId=setTimeout(this.toggleIdleState,e)}},{key:"pause",value:function(){null===this.state.remaining&&(this._unbindEvents(),clearTimeout(this.tId),this.tId=null,this.setState({remaining:this.getRemainingTime()}))}},{key:"resume",value:function(){var e=this.state,t=e.remaining,n=e.idle;null!==t&&(this._bindEvents(),n||(this.setState({remaining:null,lastActive:+new Date}),this.tId=setTimeout(this.toggleIdleState,t)))}},{key:"getRemainingTime",value:function(){var e=this.state,t=e.remaining,n=e.lastActive,r=this.props.timeout;if(null!==t)return t<0?0:t;var o=r-(+new Date-n);return o<0?0:o}},{key:"getElapsedTime",value:function(){var e=this.state.oldDate;return+new Date-e}},{key:"getLastActiveTime",value:function(){return this.state.lastActive}},{key:"_isIdle",value:function(){return this.state.idle}}]),t}(r.Component);d(x,"propTypes",{timeout:n().number,events:n().arrayOf(n().string),onIdle:n().func,onActive:n().func,onAction:n().func,debounce:n().number,throttle:n().number,element:n().oneOfType([n().object,n().element]),startOnMount:n().bool,stopOnIdle:n().bool,passive:n().bool,capture:n().bool}),d(x,"defaultProps",{timeout:12e5,element:b,events:["mousemove","keydown","wheel","DOMMouseScroll","mouseWheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"],onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,startOnMount:!0,stopOnIdle:!1,capture:!0,passive:!0});const w=x;var E=s(7703),k=s(540),_=s(3542),C=s(1206),T=s(5689),S=s.n(T),I=s(1984),O=s(6105),P=s(2979);n().shape({name:n().string.isRequired,avatar:n().string.isRequired});var A=s(6221),N=s(6086),M=s(3868),L=s(2988),R=s(7423),D=s(9115),j=s(7693),B=s(8426),Z=s(3497),F=s(7212),U=s(9729);const z=k.ZP.div.withConfig({displayName:"styles__PushMessageContainer",componentId:"sc-na2ous-0"})(["right:40px;bottom:50px;z-index:",";position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";",";@media ","{margin-left:20px;","}"],(e=>e.zIndex),U.O9.shadowColor,B.fr,U.Uh.maxTablet,(e=>{let{bubbleSize:t}=e;return"SMALL"===t?"\n right: 30px;\n bottom: 30px;\n ":"\n bottom: 55px;"})),H=k.ZP.div.withConfig({displayName:"styles__PushMessageInner",componentId:"sc-na2ous-1"})(["padding:15px 20px;width:max-content;max-width:360px;min-width:130px;padding-right:60px;@media ","{width:unset;max-width:100%;}"],U.Uh.maxPhone),$=k.ZP.div.withConfig({displayName:"styles__ContentContainer",componentId:"sc-na2ous-2"})(["display:flex;cursor:pointer;align-items:center;"]),V=k.ZP.div.withConfig({displayName:"styles__AgentAvatar",componentId:"sc-na2ous-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin-right:15px;background:",";background-position:center;background-size:cover;background-color:",";"],(e=>e.theme.headerBackground),(e=>e.theme.headerBackground)),q=k.ZP.div.withConfig({displayName:"styles__ContentText",componentId:"sc-na2ous-4"})(["margin:0;color:",";font-size:",";font-weight:normal;line-height:24px;font-family:",";span{font-weight:500;}p{margin:0;}@media ","{font-size:14px;}"],U.O9.darkColor,U.JB.fontSizeH5,Z.I.default,U.Uh.maxTablet),W=(0,k.ZP)(F.zx).withConfig({displayName:"styles__PushMessageDismiss",componentId:"sc-na2ous-5"})(["top:-8px;left:-8px;z-index:",";display:flex;padding:0;border-radius:100px;background:",";background-color:",";position:absolute;&:hover{opacity:0.8;}"],(e=>e.zIndex),(e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground}),(e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground})),G=(0,D.Z)();function Y(e){let{agent:t}=e;const{currentLanguage:n}=(0,E.v9)(N.W$),{text:a}=(0,E.v9)(N.Q7),{defaultLanguage:i}=(0,P.Z)(),{agent_joined_text:s}=(0,R.Z)(a,n,i);return(0,r.useEffect)((()=>{(0,j.Z)()}),[]),o().createElement($,null,o().createElement(V,{style:{backgroundImage:`url(${t.avatar})`}}),o().createElement(q,null,o().createElement("span",null,t.name||"An agent")," ",s))}function X(e){let{text:t}=e;return o().createElement($,null,o().createElement(q,{dangerouslySetInnerHTML:{__html:t}}))}const K=function(e){let{settings:t}=e;const{bubbleSize:n}=(0,E.v9)(N.Q7),{agent:a,show:i,text:s,type:l}=(0,E.v9)(N._p),c=(0,E.I0)(),u=(0,M.Z)(t,"zIndex",15),d=(0,k.Fg)(),f=(0,r.useMemo)((()=>(0,L.R)(d.bubbleButtonBackground||d.buttonBackground,"#fff","#000")),[d.bubbleButtonBackground,d.buttonBackground]);return null===s?null:o().createElement(z,{"data-story":"PushMessageContainer",bubbleSize:n,"aria-hidden":i?"false":"true","aria-label":"Chat bot push message",onClick:()=>c((0,A.tq)()),role:"complementary",zIndex:u},o().createElement(W,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),c((0,A.TR)())},type:"button"},o().createElement(O.Tw,{color:f,width:G?20:25,height:G?20:25})),o().createElement(H,null,"message"===l&&o().createElement(X,{text:s}),"takeover"===l&&o().createElement(Y,{agent:a})))};var Q=s(8309),J=(s(172),s(8260));const ee=(0,k.iv)(["#chatContainer.using-tab &{outline-color:rgb(77,144,254);outline-offset:-2px;outline-style:auto;outline-width:5px;}"]),te=(0,k.iv)(["z-index:15;transition:all 0.2s ease;",";"],(e=>e.active&&"transform: rotate(45deg);")),ne=(0,k.ZP)(O.tp).withConfig({displayName:"styles__BubbleButton",componentId:"sc-1elsepj-0"})(["&&&{",";overflow:visible;path{stroke-width:2px;stroke:",";fill:",";transition:stroke 0.15s ease;}}"],te,(e=>{let{active:t,$bubbleOutline:n,theme:r,stroke:o}=e;return o||(!t&&n?r.bubbleButtonOutline:r.bubbleButtonBackground||r.buttonBackground)}),(e=>{let{theme:t,background:n}=e;return n||t.bubbleButtonBackground||t.buttonBackground})),re=k.ZP.button.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1elsepj-1"})(["z-index:10;overflow:visible;display:flex;justify-content:center;align-items:center;flex-direction:column;cursor:pointer;height:50px;width:50px;padding:9px 8px;text-align:center;border-radius:50%;border:2px solid ",";box-shadow:"," ",";background:",";",";transition:all 0.25s ease;"," @media ","{","}:focus{",";}:hover{background:",";}:focus ","{",";}"," path{",";",";}"],(e=>{let{bubbleOutline:t,theme:n,background:r}=e;return r||(t?n.bubbleButtonOutline:n.bubbleButtonBackground||n.buttonBackground)}),(e=>e.active?"0px 1px 5px 1px":"1px 0px 7px 7px"),U.O9.shadowColorDark,(e=>{let{theme:t,background:n}=e;return n||t.bubbleButtonBackground||t.buttonBackground}),(e=>{let{background:t}=e;return t?`border-color: ${t}`:void 0}),J.O,U.Uh.maxTablet,(e=>{let{smallBubble:t}=e;return t&&"\n height: 30px;\n width: 30px;\n\n svg {\n width: 45px;\n }\n "}),(e=>{let{active:t}=e;return!t&&"outline: none;"}),(e=>{let{background:t,theme:n}=e;return t||n.bubbleButtonBackground||n.buttonBackground}),ne,(e=>{let{active:t}=e;return!t&&ee}),ne,(e=>{let{background:t}=e;return t?`stroke: ${t}`:""}),(e=>{let{background:t}=e;return t?`fill: ${t}`:""})),oe=(0,k.iv)(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]),ae=k.ZP.div.withConfig({displayName:"styles__LogoContainer",componentId:"sc-1elsepj-2"})([""," top:calc(50% - 3px);opacity:1;width:calc(100% - 20px);height:calc(100% - 20px);background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url(",");transition:all 0.2s ease;",";"],oe,(e=>e.bubbleAvatar),(e=>e.active&&"opacity: 0;")),ie=k.ZP.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-1elsepj-3"})(["",""],oe),se=k.ZP.img.withConfig({displayName:"ChristmasBubbleButtonstyles__ChristmasBubbleButton",componentId:"sc-tjldpf-0"})(["z-index:15;position:absolute;top:-22px;left:2px;width:84px;opacity:1;transform:rotate(10deg);transition:all 0.2s ease;",";path{fill:",";}"],(e=>e.active&&"\n transform: rotate(32deg);\n width: 51px;\n top: -20px;\n left: 9px;\n "),(e=>{let{theme:t,active:n}=e;return n?t.bubbleButtonBackground||t.buttonBackground:""})),le=function(e){let{active:t,bubbleOutline:n}=e;return o().createElement(ie,null,o().createElement(se,{src:"http://localhost:8081/src/assets/images/santaHat.png",active:t?1:0,role:"presentation"}),o().createElement(ne,{active:t?1:0,bubbleOutline:n?1:0,width:t?33:65,height:t?35:67}))},ce=k.ZP.svg.withConfig({displayName:"EasterBubbleButtonstyles__EarFront",componentId:"sc-1djbf9y-0"})(["z-index:15;position:absolute;top:-22px;left:32px;width:31px;height:38px;opacity:1;&:focus{outline:none;}transition:all 0.2s ease;",";"],(e=>e.active&&"\n width: 18px;\n height: 23px;\n top: -6px;\n left: 29px;\n ")),ue=k.ZP.svg.withConfig({displayName:"EasterBubbleButtonstyles__EarBack",componentId:"sc-1djbf9y-1"})(["position:absolute;top:-26px;left:24px;width:31px;height:38px;opacity:1;z-index:-1;transition:all 0.2s ease;",";"],(e=>e.active&&"\n width: 12px;\n height: 15px;\n top: -8px;\n left: 31px;\n ")),de=k.ZP.svg.withConfig({displayName:"EasterBubbleButtonstyles__EyesNose",componentId:"sc-1djbf9y-2"})(["z-index:15;position:absolute;top:24px;left:-2px;width:29px;height:24px;opacity:1;transform:rotate(0deg);transition:all 0.2s ease;",";"],(e=>e.active&&"\n opacity: 0;\n top: 3px;\n left: -8px;\n width: 19px;\n height: 14px;\n transform: rotate(45deg);\n ")),fe=function(e){let{active:t,bubbleOutline:n}=e;return o().createElement(o().Fragment,null,o().createElement(ue,{width:"31px",height:"38px",viewBox:"0 0 31 38",active:t?1:0},o().createElement(O.s$,null)),o().createElement(ce,{width:"31px",height:"38px",viewBox:"0 0 31 38",active:t?1:0},o().createElement(O.s,null)),o().createElement(ie,null,!t&&o().createElement(de,{width:"29px",height:"24px",viewBox:"0 0 29 24",active:t?1:0},o().createElement(O.FS,null)),o().createElement(ne,{active:t?1:0,bubbleOutline:n?1:0,width:t?33:65,height:t?35:67,background:"#FFCA3A",stroke:"#FFCA3A"})))},pe=(0,k.ZP)(O.kt).withConfig({displayName:"PrideBubbleButtonstyles__PrideBubbleButton",componentId:"sc-10jy5tk-0"})(["",";path{fill:",";}",":focus &{",";}"],te,(e=>{let{theme:t,active:n}=e;return n?t.bubbleButtonBackground||t.buttonBackground:""}),re,(e=>{let{active:t}=e;return!t&&ee})),he=function(e){let{active:t}=e;return o().createElement(ie,null,o().createElement(pe,{active:t?1:0,width:t?35:65,height:t?37:67}))},me=function(e){let{active:t,season:n,bubbleOutline:r,children:a}=e;return n===Q.FA.PRIDE?o().createElement(he,{active:t}):n===Q.FA.EASTER?o().createElement(fe,{active:t,bubbleOutline:r}):n===Q.FA.CHRISTMAS?o().createElement(le,{active:t,bubbleOutline:r}):o().createElement(ie,null,o().createElement(ne,{active:t?1:0,$bubbleOutline:r?1:0,width:t?33:65,height:t?35:67}),a)},ge=function(e){let{title:t,active:n,onClick:r}=e;const{seasonalAppearance:a,bubbleOutline:i,bubbleSize:s,bubbleAvatar:l}=(0,E.v9)(N.Q7),c=(e=>{if(e===Q.FA.EASTER)return"#ffca3a"})(a);return o().createElement(re,{"aria-label":t,"aria-controls":"ChatButtonContainer",title:t,type:"button",active:n,onClick:r,"data-cy":"chat-bubble-button","data-testid":"chat-button",bubbleOutline:i?1:0,seasonalAppearance:a?1:0,background:c,smallBubble:"SMALL"===s},o().createElement(me,{active:n,season:a,bubbleOutline:i},l?o().createElement(ae,{bubbleAvatar:l,active:n,"data-cy":"chat-bubble-logo-container"}):void 0))},ve=(e,t)=>{if(null!=t&&t.includes("-")){const n=t.substring(0,t.indexOf("-"));if(e.toLowerCase()===n)return n}};var ye=s(6239),be=s(9904);const xe=function(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((o,a)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch((i=>{setTimeout((()=>{t<=1?a(i):xe(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,a)}),n)}))}))},we=xe;var Ee=s(852),ke=s(7058),_e=s(5965),Ce=s(5796),Te=s(6219);const Se=k.ZP.div.withConfig({displayName:"styles__ChatButtonContainer",componentId:"sc-18sln6s-0"})(["position:fixed;bottom:calc(",");right:calc(",");z-index:",";",";"],(e=>{var t,n;return`${null!==(t=null===(n=e.position)||void 0===n?void 0:n.bottom)&&void 0!==t?t:Q.qE.bottom} + 10px`}),(e=>{var t,n;return`${null!==(t=null===(n=e.position)||void 0===n?void 0:n.right)&&void 0!==t?t:Q.qE.right} + 10px`}),(e=>e.zIndex),(e=>e.inPlatform&&"display:flex; align-items: center")),Ie=k.ZP.div.withConfig({displayName:"styles__AlertContainer",componentId:"sc-18sln6s-1"})(["height:15px;width:15px;z-index:50;right:0;top:-10px;position:absolute;border-radius:100px;background:",";background-color:",";",";"],U.O9.errorColor,U.O9.errorColor,B.lE),Oe=(0,r.lazy)((()=>we((()=>Promise.resolve().then(s.bind(s,4210)))))),Pe=(0,r.lazy)((()=>we((()=>Promise.resolve().then(s.bind(s,1848)))))),Ae=(0,r.lazy)((()=>we((()=>Promise.resolve().then(s.bind(s,752)))))),Ne=(0,r.lazy)((()=>we((()=>Promise.resolve().then(s.bind(s,5606)))))),Me=function(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:a,onNudgeFormSubmit:i,chatSettings:s}=e;const l=(0,E.oR)(),c=(0,E.I0)(),{active:u,inPlatform:d}=(0,E.v9)(N.W$),{PAT_HOST:f,PUSHER_KEY:p,VERSION:h}=(0,E.v9)(N.NZ),{show:m}=(0,E.v9)(N._p),{feedbackFormOpen:g}=(0,E.v9)(N.I1),{show:v,nudgeLayout:y}=(0,E.v9)(N.oU),{bubbleNotification:b,position:x,fullscreenMode:w}=(0,E.v9)(N.Q7),{showBubbleNotification:k}=(0,E.v9)(N.$u),_=(0,D.Z)(),C=u?"Close chat":"Start chat",T=(0,r.useCallback)((()=>c(u?(0,A.BW)():(0,A.tq)())),[u,c]),O=(0,M.Z)(s,"zIndex",15);(u&&k||k&&!_)&&c((0,A.HW)()),u&&m&&c((0,A.TR)()),(0,r.useEffect)((()=>{const e=`${f}/chatbubble/${Q.gk}/auth/pusher?version=${h}`;(0,I.setPusherClient)(S()),(0,I.delayConfiguration)(l,p,{authEndpoint:e,cluster:"eu",disableStats:!0,pongTimeout:7500})}),[f,p,h,l]),function(){const e=(0,E.I0)(),[t,n]=(0,r.useState)("/"),[o,a]=(0,r.useState)(!1),{shownNudges:i}=(0,E.v9)(N.W$),s=(0,Te.Z)();(0,r.useEffect)((()=>{n(window.location.href),null!=i&&i.length&&!o&&Array.from(new Set(i).values()).map((e=>s.find((t=>t.slug===e)))).filter((e=>e)).filter((e=>e.analytics_completion_page_path)).filter((e=>(0,be.Z)(t,e.analytics_completion_page_path))).forEach((t=>{a(!0),e((0,A.qW)({slug:t.slug,eventType:Ce.Eb})),e({type:Ce.$,slug:t.slug})}))}),[e,t,s,i,o])}(),(()=>{const e=(0,E.I0)(),{languages:t}=(0,P.Z)(N.Q7),{currentLanguage:n}=(0,E.v9)(N.W$);(0,r.useEffect)((()=>{if(n)return;const r=(()=>{var e,n;if(1===t.length)return t[0].code;let r;const o=t.find((e=>{var t;let{code:n}=e;const o=null===(t=document.documentElement.lang)||void 0===t?void 0:t.toLowerCase(),a=n.toLowerCase();return r=ve(n,o),a===o}));if(o)return o.code;const a=t.find((e=>{var t;let{code:n}=e;const o=null===(t=window.navigator.userLanguage||window.navigator.language)||void 0===t?void 0:t.toLowerCase(),a=n.toLowerCase();return r||(r=ve(n,o)),a===o}));return a?a.code:(null===(e=window.navigator.languages)||void 0===e?void 0:e.find((e=>t.some((t=>{let{code:n}=t;const o=null==e?void 0:e.toLowerCase(),a=n.toLowerCase();return r||(r=ve(n,o)),o===a})))))||r||(null===(n=t[0])||void 0===n?void 0:n.code)||""})();r&&e((0,A.VH)(r,{skipRestart:!0}))}),[n,t,e])})(),function(){const e=(0,E.I0)(),{currentLanguage:t,active:n,chatHasStarted:o}=(0,E.v9)(N.W$),{pushGreetingsEnabled:a,pushGreetings:i}=(0,E.v9)(N.Q7),{defaultLanguage:s}=(0,P.Z)();(0,r.useEffect)((()=>{if(!a||!i||n||!t||o)return;const r=window.location.href;i.forEach((n=>{if((0,be.Z)(r,n.url)&&n.enabled[t]){const r=((e,t,n)=>Object.entries(e).filter((e=>{let[t]=e;return"url"!==t&&"autopopup_time"!==t})).reduce(((e,r)=>{let[o,a]=r;return{...e,[o]:(0,ye.Z)(a,t,n)}}),{}))(n,t,s);return r.autopopupTime=n.autopopup_time,e((0,A.VB)(r))}return!1}))}),[n,t,s,a,i,e,o])}(),function(e){const t=(0,E.I0)(),{token:n,pusherConnected:o,connectTriggerConfig:a}=(0,E.v9)(N.ZI),{takenOver:i}=(0,E.v9)(N.Wt),{persistStateLifespan:s}=(0,E.v9)(N.Q7),{botKey:l,active:c,disabledTransports:u,chatHasStarted:d,wasActiveOnLoad:f,inPlatform:p,userIsIdle:h,error:m}=(0,E.v9)(N.W$),{chatMessages:g,messageSentTime:v}=(0,E.v9)(N.sY),{labels:y}=(0,E.v9)(N.I_),[b,x]=(0,r.useState)(!1),[w,k]=(0,r.useState)(!1),_=localStorage.getItem(`kindly-chat-${l}`);(0,r.useEffect)((()=>(window.addEventListener("online",(()=>t((0,A.Mb)()))),window.addEventListener("offline",(()=>t((0,A.oE)()))),()=>{window.removeEventListener("online",(()=>t((0,A.Mb)()))),window.removeEventListener("offline",(()=>t((0,A.oE)())))})),[t]),(0,r.useEffect)((()=>{const n=e.welcomePage.type!==Q.JR.NONE;!d&&f&&!n&&t((0,A.xm)())})),(0,r.useEffect)((()=>{c&&d&&!o&&(x(!0),403!==m||n||t((0,A.wh)()))}),[c,d,t,m,o,n]),(0,r.useEffect)((()=>{a&&t((0,A.wh)(a))}),[a,t]),(0,r.useEffect)((()=>{o&&a&&t((0,A.W6)())}),[a,t,o]),(0,r.useEffect)((()=>{const e=c&&d;if(o||b||h||a)return;const r=(0,ke.Z)({messageSentTime:v,persistStateLifespan:s});e||n?e&&!n?(x(!0),t((0,A.wh)({shouldGreet:d}))):r&&(x(!0),(0,A.IW)(n,u)):!e&&y.length>0&&(x(!0),t((0,A.wh)({shouldGreet:!1})))}),[b,c,a,o,n,u,t,g.length,d,h,m,v,s,_,l,y]),(0,r.useEffect)((()=>{b&&o&&x(!1)}),[b,o]),(0,r.useEffect)((()=>{if(o&&h&&!i){(0,_e.U6)(n);try{(0,I.disconnect)()}catch{}}}),[h,o,i,n]),(0,r.useEffect)((()=>(c&&!p&&e.chatbubble.realtime_analytics&&t((0,Ee.e)(e.id)),Ee.x)),[c,t,p,e]),(0,r.useEffect)((()=>{n&&c&&!w&&(t((0,A.U9)()),k(!0))}),[c,t,w,n])}(s);const L=(!u||w)&&g,R=!u&&m&&!t&&!g;return o().createElement(o().Fragment,null,u&&o().createElement(Oe,{settings:s}),R&&o().createElement(K,{settings:s}),L&&o().createElement(Ae,null),!g&&v&&y&&o().createElement(Pe,{hidden:t,layout:y,onDismiss:n,onNewsletterSubmit:i,onProductClick:a}),o().createElement(Se,{inPlatform:d,position:x,zIndex:O,"data-story":"ChatButtonContainer",id:"ChatButtonContainer"},d&&o().createElement(Ne,{active:u}),!u&&b&&k&&o().createElement(Ie,null),!t&&o().createElement(ge,{title:C,active:u,onClick:T})))},Le=e=>!e||Date.now()-Number(e)>Q.Bw;var Re=s(1662);const De=2500;var je=s(4890),Be=s(4417),Ze=s.n(Be);function Fe(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var Ue=Fe();Ue.withExtraArgument=Fe;const ze=Ue;var He=s(2378),$e=s.n(He);const Ve=(e,t)=>$e()({},e,t),qe=(e,t,n)=>Ve(e,((e,t)=>e.split(".").reverse().reduce(((e,n,r)=>0===r?{[n]:t}:{[n]:e}),{}))(t,n));var We=s(6204),Ge=s(4147);const Ye={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,languages:[],startOverText:"Start over",placeholder:"",typingIndicator:!1,typingDuration:"",isTyping:!1,isTypingTimeoutId:null,feedbackForm:null,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,welcomePage:null,welcomePageType:Q.JR.COLOR,pushGreetingsEnabled:!1,pushGreetings:[],tabNotification:!0,bubbleNotification:!0,heartbeatEnabled:!1},Xe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ye,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.Rx:return localStorage.removeItem("kindly-chat-has-shown-feedback-form"),{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case Ce.wb:{var n;const r=null===(n=null==t?void 0:t.isTyping)||void 0===n||n;return{...e,isTyping:r}}case Ce.$v:return{...e,isTyping:t.isTyping,isTypingTimeoutId:t.isTypingTimeoutId,hasInteraction:!0,splitLabelTimestamp:Date.now()};case Ce.Zf:return{...e,splitLabelTimestamp:Date.now(),splitTestLabel:t.splitTestLabel};case Ce.MP:return{...e,splitLabelTimestamp:Date.now()};case Ce.fz:return{...e,splitTestLabel:null,hasInteraction:null,splitLabelTimestamp:null};default:return e}},Ke={botKey:null,inPlatform:!1,chatHasStarted:!1,active:!1,hideInputField:!1,previouslyPoppedUp:!1,currentlyPoppedUp:!1,optionsScreenOpen:!1,currentLanguage:null,startedAt:null,userIsIdle:!1,allGreetingsHideInput:!1,contactDetailsButton:null,uploadButtonWasClicked:null,hasRequestedGreeting:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},error:null},Qe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ke,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.Go:return{...e,error:t.error};case Ce.AF:return{...e,currentLanguage:t.code};case Ce.Rx:return{...e,error:null,botKey:t.botKey||e.botKey,optionsScreenOpen:!1,hideInputField:!1,userIsIdle:!1};case Ce.j5:return{...e,chatHasStarted:t.chatHasStarted,userIsIdle:!t.chatHasStarted&&e.userIsIdle};case Ce.$v:{const n=e.hideInputField&&"USER"===t.data.sender;return{...e,chatHasStarted:!0,hideInputField:!!n||t.data.chatbubble_hide_input_field}}case Ce.vo:return{...e,active:!0,userIsIdle:!1};case Ce.bQ:return{...e,active:!1,optionsScreenOpen:!1};case Ce.Bl:return{...e,previouslyPoppedUp:!0,currentlyPoppedUp:!0};case Ce.us:return{...e,optionsScreenOpen:!0};case Ce.lh:return{...e,optionsScreenOpen:!1};case Ce.FX:return{...e,chatId:t.chatId,allGreetingsHideInput:t.allGreetingsHideInput};case Ce.JQ:return e;case Ce.Q_:return{...e,hasRequestedGreeting:t.hasRequestedGreeting};case Ce.fQ:return{...e,startedAt:t.startedAt};case Ce.JT:return{...e,userIsIdle:t.userIsIdle};case Ce.r1:return{...e,contactDetailsButton:t.button};case Ce.kp:return{...e,contactDetailsButton:null};case Ce.hu:return{...e,shownNudges:(e.shownNudges||[]).concat(t.slug)};case Ce.iE:return{...e,attachments:{...e.attachments,buttonClicked:+new Date,exchangeId:t.button.value}};case Ce.PV:return{...e,attachments:{...e.attachments,files:t.files}};case Ce.ZN:return{...e,attachments:{exchangeId:null,buttonClicked:null,files:[]}};case Ce.$R:return{...e,attachments:{...e.attachments,buttonClicked:null}};case Ce.$:return{...e,shownNudges:(e.shownNudges||[]).filter((e=>e!==t.slug))};default:return e}},Je={PAT_HOST:"https://bot.kindly.ai",PUSHER_KEY:"0d15baa2a7308d71e79d",STATUS_PAGE:"https://status.kindly.ai",KINDLY_CHAT_URL:"http://localhost:8081",SAGE_WS_HOST:"wss://sage.kindly.ai",SAGE_HOST:"https://sage.kindly.ai",SETTINGS_HOST:"https://chat.kindlycdn.com",VERSION:"dev"},et=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Je,t=arguments.length>1?arguments[1]:void 0;return t.type===Ce.Rj?{...e,...t.env}:e},tt=(e,t)=>({...Ye,id:e.id,name:e.name,avatar:e.avatar,botName:e.name,botAvatar:e.avatar,languages:e.languages,includeDisabledLanguages:e.includeDisabledLanguages,startOverText:e.start_over_text,welcomePage:e.welcomePage,welcomePageType:t?Q.JR.NONE:e.welcomePage.type,maintenanceAlert:e.maintenanceAlert,maintenanceAlertEnabled:!t&&e.maintenanceAlert.alert_enabled,pushGreetingsEnabled:!t&&e.use_push_greetings,pushGreetings:e.push_greetings,tabNotification:e.tab_notification,bubbleNotification:e.bubble_notification,typingIndicator:e.typing_indicator,typingDuration:e.typing_duration,disabledTransports:e.disabled_transports,feedbackFormType:t?Q.MC.NONE:e.feedbackForm.type,feedbackForm:e.feedbackForm,text:e.text,bubbleSize:e.bubble_size,isTextDirectionRtl:e.text_right_to_left,realtimeAnalytics:e.chatbubble.realtime_analytics,inputLimitEnabled:e.chatbubble.input_limit_enabled,inputLimit:e.chatbubble.input_limit||140,hideHeader:e.hideHeader||!1,bubbleAvatar:e.chatbubble.icon_avatar_image||e.bubbleAvatar||null,position:{...Q.qE,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||Q.PL,persistStateLifespan:t?-1:e.chatbubble.persist_state_lifespan_seconds,showTakeoverQueue:e.show_takeover_queue,bubbleOutline:e.use_bubble_outline,seasonalAppearance:e.seasonal_appearance,noFeedbackAfterHandover:e.no_feedback_after_handover,nudges:e.nudges||[],handoverMode:e.handover_mode,heartbeatEnabled:Boolean(e.chatbubble_heartbeat_enabled),heartbeatTTL:e.chatbubble_heartbeat_ttl_s,splitTestEnabled:e.split_test_enabled,conversionPageUrl:e.conversion_page_url}),nt=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en};var rt=s(3378);const ot=Object.freeze({WARNING:"WARNING",CRITICAL:"CRITICAL"}),at=Object.freeze({OFFLINE:{en:"You seem to be offline, please check your internet connection",nb:"Du ser ut til å være frakoblet internett, vennligst sjekk tilgangen din"},WEBSOCKET_DOWN:{en:"There seems to be an issue with the connection, attempting to reconnect...",nb:"Det ser ut til å være et problem med tilkoblingen. Prøver å koble opp igjen..."}}),it=e=>t=>n=>{switch(n.type){case Ce.xo:return((e,t,n,r)=>{const{announcement:o,bot:a,chatbubble:i}=t;if(o.show)return n(r);const s={text:nt(0,i,e),alertType:ot.WARNING};return n({type:Ce.$6,payload:s}),n(r)})(at.OFFLINE,e.getState(),t,n);case Ce.nm:{const{announcement:r,connection:o}=e.getState();return r.show&&t({type:Ce.Rq}),o.connected||t((0,rt.U9)()),t(n)}default:return t(n)}},st=e=>t=>n=>{if(n.type!==Ce.$v)return t(n);const{chatbubble:{active:r,currentLanguage:o}}=e.getState();if("greeting"===n.data.exchange_type||n.data.triggered_chat_start){const e=n.data.chat_language_code;o!==e&&t({type:Ce.AF,code:e})}return("boolean"==typeof n.displayTypingIndicator?n.displayTypingIndicator:!n.data.from_bot)?(0,A.u1)()(t,e.getState):(0,A.RR)()(t,e.getState),!n.data.from_bot&&n.data.was_anonymized?t({type:Ce.ek,data:n.data}):n.data.from_bot?(!r&&"AGENT"!==n.data.sender&&"SYSTEM"!==n.data.sender&&"greeting"!==n.data.exchange_type&&t({type:Ce.vo}),t(n)):t(n)},lt=e=>t=>n=>{if(n.type===Ce.$v){const{bot:{typingDuration:r,typingIndicator:o},agent:{takenOver:a},chatbubble:{chatHasStarted:i}}=e.getState(),{isContactDetails:s,sender:l,from_bot:c,created:u}=n.data;if(!o||a||!i||l===Q.B6.SYSTEM||s)return t({...n,displayTypingIndicator:!1});if((0,A.u1)()(t,e.getState),!c)return t(n);const d=r-((new Date).getTime()-(0,We.Z)(u).getTime());return setTimeout((()=>{t(n)}),d>0?d:0)}return t(n)},ct=e=>t=>n=>{const{bot:{typingDuration:r,typingIndicator:o}}=e.getState(),a=o?Math.max(5e3,r):5e3;return n.type===Ce.FX&&setTimeout((()=>t((0,A.IY)())),a),n.type===Ce.$v&&n.data.from_bot?(t((0,A.yc)()),t((0,A.Fv)()),t(n)):t(n)},ut={names:[],avatars:[],isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedTakeover:!1,hasHadHandover:!1},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ut,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.gG:{const n=t.data.taken_over&&!e.takenOver,r=!t.data.taken_over&&e.takenOver;return n?{...e,requestedTakeover:!1,takenOver:!0,isTyping:!1,hasHadHandover:!0}:r?{...e,requestedTakeover:!1,takenOver:!1,isTyping:!1}:e}case Ce.$v:return{...e,isTyping:!1};case Ce.n2:return{...e,isTyping:!0};case Ce.JZ:return{...e,isTyping:!1};case Ce.un:return{...e,userIsTyping:!0};case Ce.Tz:return{...e,userIsTyping:!1};case Ce.OM:return{...e,requestedTakeover:t.requestedTakeover,takeoverClosed:t.closed||!1};case Ce.Fm:return{...e,requestedTakeover:!1};case Ce.uY:return{...e,hasHadHandover:!1};default:return e}},ft={showTabNotification:!1,showBubbleNotification:!1},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ft,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.$v:return t.data.from_bot&&"SYSTEM"!==t.data.sender?"visible"===document.visibilityState?{showBubbleNotification:!0}:{showTabNotification:!0}:e;case Ce.dF:return{showTabNotification:!0};case Ce.xT:return{showBubbleNotification:!0};case Ce.oy:return{...ft};default:return e}},ht={show:!1,text:null,url:null,type:null},mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ht,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.$6:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case Ce.Rq:return ht;default:return e}},gt={isAuthenticated:!1,token:null,avatarUrl:null,fullName:null,isRefreshing:!1,getAuthToken:null},vt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.tl:return{...e,isAuthenticated:!0,token:t.token,avatarUrl:t.avatarUrl,fullName:t.fullName};case Ce.e7:return{...e,avatarUrl:t.avatarUrl,fullName:t.fullName};case Ce.fI:return{...e,...gt};case Ce.xd:return{...e,isRefreshing:!0};case Ce.L8:return{...e,isRefreshing:!1};default:return e}},yt={token:null,connected:!0,pusherConnected:!1,connectTriggerConfig:void 0,heartbeatId:void 0},bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.M_:return{...e,token:t.token};case Ce.Rx:case Ce.Ll:return{...e,token:null};case Ce.nm:return{...e,connected:!0};case Ce.xo:return{...e,connected:!1};case Ce.dl:return{...e,pusherConnected:!0};case Ce.bD:return{...e,pusherConnected:!1};case Ce.NB:return{...e,connectTriggerConfig:t.triggerConfig};case Ce.g8:return{...e,heartbeatId:t.heartbeatId};default:return e}},xt={inspectorOpen:!1,currentMessageId:null},wt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.ck:return{...e,currentMessageId:t.chatMessageId};case Ce.M$:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}},Et={token:null,feedbackFormOpen:!1},kt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Et,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.jv:return{...e,feedbackFormOpen:!0,token:t.token};case Ce.iB:return Et;default:return e}};var _t=s(7890);const Ct={context:{},labels:[]},Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ct,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _t.h:return{...e,context:{...e.context,...t.context}};case _t.U:return{...e,labels:[...new Set([...e.labels,t.label])]};case Ce.Rx:case Ce.Ll:return{...e,labels:[]};default:return e}},St={show:!1,textContent:null,linkText:null,linkLocation:null,dismissed:!1},It=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:St,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.fr:return{show:!0,textContent:t.textContent,linkText:t.linkText,linkLocation:t.linkLocation};case Ce.zt:return{...St,dismissed:!0};default:return e}};var Ot=s(5363),Pt=s(8035);const At=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return{...e,[(0,Pt.Z)(n)]:r}}),{})},Nt=e=>Boolean(e.find((e=>{let{exchange_type:t}=e;return"greeting"===t})));var Mt=s(5165),Lt=s(4401);const Rt={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null},Dt=e=>{let{id:t}=e;return t},jt=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},Bt=(e,t,n)=>e.map((e=>t(e)?n(e):e)),Zt=function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rt,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case Ce.$v:{const{chatMessages:e}=o,{data:t}=a;return"greeting"===(0,M.Z)(t,"exchange_type")&&Nt(e)?o:(0,Mt.Z)(e)(t)?qe(o,"chatMessages",[...e,t]):o}case Ce.Rx:return Rt;case Ce.ek:{const{chatbubble_temporary_id:e,id:t}=a.data,n=n=>{let{id:r}=n;return(0,i.Z)(r,[e,t])},r=e=>({...e,message:a.data.message});return{...o,chatMessages:Bt(o.chatMessages,n,r)}}case Ce.QA:return{...o,messageSentTime:a.messageSentTime};case Ce.x3:{var s;const{created:e,id:t,temporaryId:n}=a,{chatMessages:r}=o,i=null!==(s=null==a?void 0:a.status)&&void 0!==s?s:null,l=r.findIndex((e=>{let{id:t}=e;return t===n}));if(l<0)return o;const c=r[l],u={...c,created:e||c.created,id:t||c.id,status:i},d=r.map(((e,t)=>t!==l?e:u));return{...o,chatMessages:d}}case Ce.YX:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,pattern_context_match:n});return{...o,chatMessages:Bt(o.chatMessages,r,i)}}case Ce.st:{const{chatMessageId:e,chatMessageTempId:t,correctedMessage:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,corrected_message:n});return{...o,chatMessages:Bt(o.chatMessages,r,i)}}case Ce.sS:var l;return(0,Ot.Z)(o.buttonClicks)(a.buttonClick)?{...o,buttonClicks:[...null!==(l=o.buttonClicks)&&void 0!==l?l:[],a.buttonClick]}:o;case Ce.GP:return{...o,lastMessageSeen:(0,Lt.Z)(a,["id","index"])};case Ce.yS:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=a.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(At))||[]]};case Ce.Ae:{const e=At(a.attachment),t=jt(e),n=t=>({...t,...e});return{...o,attachments:Bt(o.attachments,t,n)}}case Ce.X4:{var c;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=a.data,r=e.map(At),i=(null!==(c=o.attachments)&&void 0!==c?c:[]).map((e=>{const t=r.find(jt(e));return t?{...e,...t}:e}));let s=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},a=e=>({...e,id:n,attachment_ids:r.map(Dt)});s=Bt(o.chatMessages,e,a)}return{...o,attachments:i,chatMessages:s}}case Ce.W3:return null!==(r=a.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[a.formData.formKey]:a.formData}}:o;default:return o}},Ft={chatDeleted:!1},Ut=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ft,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.hK:return{...e,chatDeleted:!0};case Ce.j5:return{...e,chatDeleted:!t.chatHasStarted&&e.chatDeleted};case Ce.Rx:return{...e,chatDeleted:!1};default:return e}};var zt=s(3589);const Ht={show:!1,text:null,agent:null,dismissed:!1,type:zt.Q6.MESSAGE,dismissedMessages:[]},$t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.gG:return t.data.taken_over&&!e.taken_over?{...e,show:!0,agent:{name:t.data.name,avatar:t.data.avatar},text:void 0,type:zt.Q6.TAKEOVER}:e;case Ce.$v:return(0,D.Z)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:zt.Q6.MESSAGE};case Ce.Ds:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case Ce.$D:return{...e,show:!1,dismissed:!0};case Ce.En:return Ht;default:return e}};var Vt=s(3311);const qt={takeoverPollIntervalId:null,takeoverRequestPollIntervalId:null,replyTimeoutId:null,replyTimeoutAttempts:0},Wt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Vt.wz:return{...e,takeoverPollIntervalId:t.takeoverPollIntervalId};case Vt.SB:return{...e,takeoverRequestPollIntervalId:t.takeoverRequestPollIntervalId};case Vt.sj:return{...e,replyTimeoutId:t.replyTimeoutId,replyTimeoutAttempts:t.replyTimeoutAttempts};case Vt.ln:return{...e,takeoverPollIntervalId:null};case Vt.ae:return{...e,takeoverRequestPollIntervalId:null};case Vt.Dl:return{...e,replyTimeoutId:null,replyTimeoutAttempts:0};default:return e}},Gt={open:!1,imageUrl:""},Yt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.iS:return{...e,open:!0,imageUrl:t.imageUrl};case Ce.Cb:return{...e,open:!1,imageUrl:""};default:return e}},Xt={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:Q.r.TEMPLATE,hasInteraction:!1},Kt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.LH:return{...e,show:!1,nudgeLayout:{},hasInteraction:!0};case Ce.Xz:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:Q.r.TEMPLATE,trackEvent:t.trackEvent,hasInteraction:!0};case Ce.Fd:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:Q.r.CUSTOM,trackEvent:t.trackEvent,hasInteraction:!0};case Ce.ch:return{...e,hasInteraction:!1};default:return e}},Qt=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({trace:!0,traceLimit:25})||je.qC,Jt=(0,D.Z)(),en=function(){let{url:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e||"").startsWith("data:")?t:{...t,url:e}},tn=e=>{if((0,M.Z)(e,"bot.includeDisabledLanguages",!1))return e;const t=(0,M.Z)(e,"chatbubble.currentLanguage"),n=(0,M.Z)(e,"bot.languages",[]).find((e=>{let{code:n}=e;return n===t}));return(0,M.Z)(n,"active",!1)?e:Ve(e,{chatbubble:{currentLanguage:null}})},nn=t=>{let{botKey:n,settings:r,persist:o=!0,initialStateModifier:a}=t;const{language:i,inPlatform:s}=r,l=[ct,it,lt,st,ze],c=(e=>e.inPlatform||0!==e.chatbubble.persist_state_lifespan_seconds)(r),u=`kindly-chat-${n}`,d=(e=>e?()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},nudge:{hasInteraction:e.nudge.hasInteraction},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:Ke.currentlyPoppedUp,allGreetingsHideInput:Ke.allGreetingsHideInput,contactDetailsButton:Ke.contactDetailsButton,attachments:Ke.attachments,shownNudges:e.chatbubble.shownNudges},connection:{token:e.connection.token,connected:!0,pusherConnected:!1},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{names:e.agent.names,avatars:e.agent.avatars,requestedTakeover:e.agent.requestedTakeover,takenOver:e.agent.takenOver},messages:{forms:e.messages.forms,chatMessages:e.messages.chatMessages,buttonClicks:e.messages.buttonClicks,attachments:(e.messages.attachments||[]).map(en),messageSentTime:e.messages.messageSentTime,lastMessageSeen:e.messages.lastMessageSeen},local:{labels:e.local.labels}}):(localStorage.removeItem("kindly-chat-has-shown-feedback-form"),()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},nudge:{hasInteraction:e.nudge.hasInteraction},chatbubble:{active:!1,previouslyPoppedUp:e.chatbubble.previouslyPoppedUp,shownNudges:e.chatbubble.shownNudges},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{names:e.agent.names,avatars:e.agent.avatars}})))(c),f=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return t.reverse().slice(1).reduce(((e,t)=>t(e)),t[0](...arguments))}}(tn,(e=>t=>{var n,r,o;const a=(null==t||null===(n=t.messages)||void 0===n?void 0:n.chatMessages.filter((e=>e.from_bot)).sort(((e,t)=>(0,We.Z)(e.created).getTime()-(0,We.Z)(t.created).getTime())).slice(1))||[],i=null!==(r=null==a||null===(o=a[0])||void 0===o?void 0:o.chat_language_code)&&void 0!==r?r:null;return Ve(t,{chatbubble:{currentLanguage:i||e}})})(i),(e=>t=>{const n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!Jt)||Boolean(e.chatbubble.keep_open_mobile&&Jt));return Ve(t,{chatbubble:{active:n,wasActiveOnLoad:n}})})(r),(e=>{let{inPlatform:t,botKey:n}=e;return(e=>(t,n)=>{return r=Ve(t,n),e.reduce(((e,t)=>{let[n,r]=t;return qe(e,n,r)}),r);var r})([["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter((e=>{let[,t]=e;return void 0!==t})))})({inPlatform:s,botKey:n})),p=Qt((0,je.md)(...l),o?Ze()(null,{key:u,slicer:d,merge:f}):e=>e);let h=(e=>{let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:a,environment:i,getAuthToken:s}}=e;return{bot:tt(n,o),chatbubble:{...Ke,botKey:t,inPlatform:o,admin:a,renderedBy:n.renderedBy||"REACT"},local:{context:r,labels:[]},environment:{...Je,VERSION:Ge.i8,...i},auth:{getAuthToken:s}}})({botKey:n,settings:r});return a&&(h=Ve(h,a)),(0,je.MT)((0,je.UY)(e),h,p)},rn="kindly-last-conversion-timestamp",on=()=>{const e=(0,E.I0)(),[t,n]=(0,r.useState)("/"),{conversionPageUrl:o,splitTestLabel:a,hasInteraction:i,splitTestEnabled:s}=(0,E.v9)(N.Q7),l=(()=>{const[e,t]=(0,r.useState)(!1),{conversionPageUrl:n}=(0,E.v9)(N.Q7),o=((e,t)=>{let{enable:n=!0}=t;const[o,a]=(0,r.useState)(null);if(!n)return null;const i=setInterval((()=>{const e=document.querySelector("#klarna-checkout-iframe");e&&(a(e),clearInterval(i))}),500);return o})(0,{enable:null==n?void 0:n.match(/klarna/gi)}),a=(0,r.useRef)(null),i=(0,r.useCallback)((e=>{var n;const r=e.getAttribute("src")||"",o=(e=>{try{return JSON.parse(e)}catch(e){return null}})((null===(n=decodeURIComponent(r).match(/\{"(.*)/gim))||void 0===n?void 0:n[0])||"");o&&"object"==typeof o&&["created","checkout_complete"].indexOf(o.ORDER_STATUS)>-1&&t(!0)}),[]);return(0,r.useEffect)((()=>{o&&!a.current&&(i(o),a.current=setInterval((()=>i(o)),500))}),[o,a,i]),(0,r.useEffect)((()=>{e&&clearInterval(a.current)}),[e]),e})(),c=(0,r.useCallback)((()=>{if(!Le(localStorage.getItem(rn)))return;const t=s&&a,n=!i;localStorage.setItem(rn,Number(new Date)),e((0,A.De)(t,n)),e((0,A.lO)())}),[e,a,i,s]);(0,r.useEffect)((()=>{l&&c()}),[c,l]),(0,r.useEffect)((()=>{n(window.location.href),null!=o&&o.trim()&&(0,be.Z)(t,o)&&c()}),[c,t,o])};var an=s(1681);const sn=e=>{var t,n,r,o,a,i,s,l,c,u,d,f,p,h,m,g,v,y,b,x,w,E,k,_,C,T,S,I,O;return{customFont:null!==(t=null==e?void 0:e.customFont)&&void 0!==t?t:null,chatLogElements:null!==(n=null==e||null===(r=e.style)||void 0===r?void 0:r.color_chat_log_elements)&&void 0!==n?n:"#333333",background:null!==(o=null==e||null===(a=e.style)||void 0===a?void 0:a.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(i=null==e||null===(s=e.style)||void 0===s?void 0:s.color_button_outline)&&void 0!==i?i:"#0069ff",buttonBackground:null!==(l=null==e||null===(c=e.style)||void 0===c?void 0:c.color_button_background)&&void 0!==l?l:"#0069ff",bubbleButtonBackground:null!==(u=null==e||null===(d=e.style)||void 0===d?void 0:d.color_bubble_button_background)&&void 0!==u?u:"#0069ff",buttonText:null!==(f=null==e||null===(p=e.style)||void 0===p?void 0:p.color_button_text)&&void 0!==f?f:"#ffffff",headerBackground:null!==(h=null==e||null===(m=e.style)||void 0===m?void 0:m.color_header_background)&&void 0!==h?h:"#0069ff",headerText:null!==(g=null==e||null===(v=e.style)||void 0===v?void 0:v.color_header_text)&&void 0!==g?g:"#ffffff",inputBackground:null!==(y=null==e||null===(b=e.style)||void 0===b?void 0:b.color_input_background)&&void 0!==y?y:"#ffffff",inputText:null!==(x=null==e||null===(w=e.style)||void 0===w?void 0:w.color_input_text)&&void 0!==x?x:"#333333",userMessageBackground:null!==(E=null==e||null===(k=e.style)||void 0===k?void 0:k.color_user_message_background)&&void 0!==E?E:"#f5f5f5",userMessageText:null!==(_=null==e||null===(C=e.style)||void 0===C?void 0:C.color_user_message_text_color)&&void 0!==_?_:"#2c2c2c",botMessageBackground:null!==(T=null==e||null===(S=e.style)||void 0===S?void 0:S.color_bot_message_background)&&void 0!==T?T:"#f5f5f5",botMessageText:null!==(I=null==e||null===(O=e.style)||void 0===O?void 0:O.color_bot_message_text_color)&&void 0!==I?I:"#2c2c2c"}};function ln(e){let{settings:t}=e;const n=(0,E.I0)(),{inPlatform:a}=(0,E.v9)(N.W$),{canShow:i}=function(){const{splitTestEnabled:e,splitTestLabel:t,splitLabelTimestamp:n}=(0,E.v9)(N.Q7),o=(0,E.I0)(),a=(0,r.useCallback)((()=>{o((0,A.IM)())}),[o]),i=(0,Re.Z)(a,De);return(0,r.useEffect)((()=>{function t(){i()}return e&&window.addEventListener("mousemove",t),()=>e?window.removeEventListener("mousemove",t):void 0}),[e]),(0,r.useEffect)((()=>{n&&Le(n)&&o((0,A.lO)())}),[n]),(0,r.useEffect)((()=>{let n=t||Q.Zl.NO_SPLIT_LABEL;e&&!t&&(n=Math.random()>.5?Q.Zl.SPLIT_A:Q.Zl.SPLIT_B),t||o((0,A.Cw)(n))}),[e,t]),{canShow:e&&["A","X"].indexOf(t)>-1||!e,splitTestLabel:t}}();return on(),(0,r.useEffect)((()=>{i&&t.chatbubble.autopopup&&!(0,D.Z)()&&!a&&setTimeout((()=>n((0,A.re)())),t.chatbubble.autopopup_time)}),[n,a,t,i]),i?o().createElement(Me,{chatSettings:t,hidden:t.bubbleHidden,onNudgeDismiss:t.onNudgeDismiss,onNudgeFormSubmit:t.onNudgeFormSubmit,onNudgeProductClick:t.onNudgeProductClick}):null}let cn=!1;const un=(0,r.forwardRef)(((e,t)=>{let{botKey:n,settings:a}=e;const i=nn({botKey:n,settings:a});return(0,r.useImperativeHandle)(t,(()=>({openChat(){i.dispatch((0,A.tq)())},closeChat(){i.dispatch((0,A.BW)())},triggerDialogue(e,t){i.dispatch((0,A.Bc)(e,t))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;i.dispatch((0,A.DO)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;i.dispatch((0,A.RA)({content:t,slug:n,onRendered:r,trackEvent:o}))},closeNudge(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];i.dispatch((0,A.l)(e,t,n))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(i.dispatch((0,an.qW)({slug:e,eventType:Ce.Eb})),i.dispatch({type:Ce.$,slug:e}),sessionStorage.setItem("kindly-nudge-completion",!0))},closeFeedback(){i.dispatch((0,A.nh)())},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i.dispatch((0,an.W6)(e))},identifyUser(e){i.dispatch((0,A.$A)(e))},setNewContext(e){i.dispatch((0,A.PM)(e))},setNewLabel(e){i.dispatch((0,A.K5)(e))},cancelHandover(){i.dispatch((0,A.K1)())}}))),(0,r.useEffect)((()=>{(0,_.Fv)(a)}),[a]),(0,r.useEffect)((()=>{const{persistStateLifespan:e,heartbeatEnabled:t}=i.getState().bot;if(t)return;if(-1===e||e>0)return;let r=!1;const o=()=>{r||(r=!0,i.dispatch((0,A.GV)(n)))};window.onbeforeunload=o,window.onunload=o}),[n,a,i]),(0,r.useEffect)((()=>{!cn&&a.track_utm&&(cn=!0,Promise.resolve().then(s.bind(s,8506)).then((e=>{let{default:t}=e;const n=t();n&&i.dispatch((0,A.PM)({...n}))})))}),[a,i]),window.Cypress&&(window.store=i),o().createElement(E.zt,{store:i},o().createElement(k.f6,{theme:sn(a)},o().createElement(C.Z,{errorPoint:"inside ChatContainer",displayError:!1},a.user_idle_timeout_seconds>0?o().createElement(w,{onIdle:()=>i.dispatch((0,A.L5)()),onActive:()=>i.dispatch((0,A.mV)(a.id)),timeout:1e3*a.user_idle_timeout_seconds},o().createElement(ln,{settings:a})):o().createElement(ln,{settings:a}))))}));un.displayName="ChatContainer";const dn=un;var fn=s(9669),pn=s.n(fn),hn=s(6810);const mn=function(e){var t,n;let{botKey:a,setKindlyChatRef:s,options:l={}}=e;const c=((e,t)=>{const[n,o]=(0,r.useState)(t||{}),a=(0,r.useCallback)((async()=>{try{var n;const r=await async function(e,t){const n=(0,hn.N)();return we((()=>pn().get(`${e}/settings/${t}.json`,{params:{version:Ge.i8,[hn.w]:n}})),{retries:3,interval:2e3,intervalBackoffMultiplier:1})}((null===(n=t.environment)||void 0===n?void 0:n.SETTINGS_HOST)||"https://chat.kindlycdn.com",e),{welcome_page:a,feedback_form:i,maintenance_alert:s,notifications:l,settings:c,...u}=r.data,d={...u,...c,...l,feedbackForm:i,welcomePage:a,maintenanceAlert:s};o((e=>Ve(Ve(d,e),t)))}catch(e){var r,a;const t=null!==(r=e.response)&&void 0!==r&&null!==(a=r.data)&&void 0!==a&&a.error?e.response.data.error:e;console.error("Kindly chat failed to initialize.",t)}}),[e,t]);return(0,r.useEffect)((()=>{a()}),[a]),n})(a,l);if(!c.id)return null;const u=[null===(n=((null===(t=l.environment)||void 0===t?void 0:t.KINDLY_CHAT_URL)||"http://localhost:8081").match("^https?://(([^:/?#]*)(?::([0-9]+))?)"))||void 0===n?void 0:n[2],"*.kindly.ai","demokind.ly","*.demokind.ly",...c.chatbubble.domains].filter(Boolean);return c.chatbubble.inPlatform||(d=window.location.hostname,f=u,(0,i.Z)(f,"*")||d&&f.some((e=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(e).test(d))))?o().createElement(dn,{ref:s,botKey:a,settings:c}):(console.error(`Domain ${window.location.hostname} is not allowed to load Kindly Chat. Please check your bot settings if you think this is a mistake.`),null);var d,f},gn=function(e){let{botKey:t,setKindlyChatRef:n,options:a}=e;return o().createElement(r.Suspense,{fallback:""},o().createElement(mn,{botKey:t,setKindlyChatRef:n,options:a}))}})(),l})()));