/*! For license information please see 479.cc0a525025edaba1.js.LICENSE.txt */ (this.webpackChunk_gorgias_chat_client=this.webpackChunk_gorgias_chat_client||[]).push([[479],{132:(e,n,t)=>{"use strict";t.d(n,{Q:()=>a,p:()=>r});var r=1e3,a=2},2216:(e,n)=>{var t;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",n=0;n{"use strict";t.d(n,{A:()=>y});var r,a,i=t(68831),o=t(47420),s=t(32663),l=t(27413),c=t(21253),d=t(62494),u=t(54171),p=t(89958),f=t(45835),h=t(59181),m=t(54240),g=t(61042),v=t(60438),x=t(60562),A=t(94177),E=d.A.div(r||(r=(0,l.A)(["\n margin-top: auto;\n"]))),b=d.A.span(a||(a=(0,l.A)(["\n font-size: 12px;\n color: var(--neutral10);\n\n svg {\n margin: 0 4px 0 10px;\n width: 16px;\n height: 16px;\n\n path {\n fill: var(--secondaryGreen);\n }\n }\n"])));const y=e=>{var n=e.isCodeVerificationInProgress,t=(0,c.useState)(!1),r=(0,s.A)(t,2),a=r[0],l=r[1],d=(0,u.d)(p.lu),y=(0,u.d)(p.vk),C=(0,u.d)(h.Z0),w=(0,u.d)(h.d8),S=(0,u.w)(),_=(0,v.o)().sspTexts,T=(0,g.A)(),I=function(){var e=(0,o.A)((0,i.A)().m(function e(){return(0,i.A)().w(function(e){for(;;)switch(e.n){case 0:if(y){e.n=1;break}return e.a(2);case 1:S((0,f.nD)([y.channel,y.sendTo,C,T,w])),l(!0);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return(0,A.jsxs)(E,{children:[(0,A.jsx)(x.A,{variant:"secondary",size:"large",isStretched:!0,disabled:d||n,onClick:I,children:_("resendCode")}),a&&(0,A.jsxs)(b,{"data-testid":"resendConfirmationText",children:[(0,A.jsx)(m.h,{fill:"green"}),_("sent")]})]})}},2910:(e,n,t)=>{"use strict";t.d(n,{A:()=>h});var r=t(22936),a=t(77161),i=t(9548),o=t(90911),s=t(21253),l=t(15653);function c(e,n){var t=Object.create(null);return e&&s.Children.map(e,function(e){return e}).forEach(function(e){t[e.key]=function(e){return n&&(0,s.isValidElement)(e)?n(e):e}(e)}),t}function d(e,n,t){return null!=t[n]?t[n]:e.props[n]}function u(e,n,t){var r=c(e.children),a=function(e,n){function t(t){return t in n?n[t]:e[t]}e=e||{},n=n||{};var r,a=Object.create(null),i=[];for(var o in e)o in n?i.length&&(a[o]=i,i=[]):i.push(o);var s={};for(var l in n){if(a[l])for(r=0;r{"use strict";t.d(n,{oJ:()=>s,z5:()=>o});var r=t(68233),a=t(94414),i=t(74524),o=()=>{var e=(0,i.rm)(r.default.localStorageUserJourneyId);return e||(e=(0,a.Z0)(),(0,i.$C)(r.default.localStorageUserJourneyId,e,{hours:1})),e},s=()=>{(0,i.$C)(r.default.localStorageUserJourneyId,o(),{hours:1})}},3250:(e,n,t)=>{"use strict";t.d(n,{A:()=>h});var r,a,i=t(27413),o=t(85002),s=(t(21253),t(74907)),l=t(62494),c=t(24909),d=t(59802),u=t(94177),p=(0,l.A)(s.h)(r||(r=(0,i.A)(["\n width: 4em;\n height: 4em;\n .widget-xs & {\n width: 7em;\n height: 7em;\n }\n & > path {\n fill: ",";\n }\n"])),o.Jy.Orange),f=l.A.div(a||(a=(0,i.A)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 0 2em;\n text-align: center;\n\n button {\n padding: 0.5rem 1rem;\n background-color: ",";\n border-radius: 5px;\n }\n"])),o.Jy.LightGrey);const h=()=>{var e=(0,(0,d.M)().appTexts)("actionPostbackError")||"An error occurred. Please retry.";return(0,u.jsxs)(f,{children:[(0,u.jsx)(p,{}),(0,u.jsx)("h5",{"aria-live":"assertive",role:"alert",children:e}),(0,u.jsx)(c.A,{onClick:()=>window.location.reload(),children:"Reload the page"})]})}},4105:(e,n,t)=>{"use strict";t.d(n,{A:()=>p});var r,a=t(57970),i=t(35980),o=t(27413),s=t(62494),l=t(99165),c=t(94177),d=["children"],u=s.A.div(r||(r=(0,o.A)(["\n border-radius: 8px;\n padding: 8px;\n\n background: ",";\n\n ","\n"])),l.nY.neutralGrey0,e=>e.shouldDisplayShadow?"box-shadow: 1px 1px 8px 0px rgba(22, 22, 22, 0.05);":"");const p=e=>{var n=e.children,t=(0,i.A)(e,d),r=t.shouldDisplayShadow,o=void 0===r||r;return(0,c.jsx)(u,(0,a.A)((0,a.A)({shouldDisplayShadow:o,role:"list"},t),{},{children:n}))}},4332:(e,n,t)=>{"use strict";n.__esModule=!0,n.getChildMapping=a,n.mergeChildMappings=i,n.getInitialChildMapping=function(e,n){return a(e.children,function(t){return(0,r.cloneElement)(t,{onExited:n.bind(null,t),in:!0,appear:o(t,"appear",e),enter:o(t,"enter",e),exit:o(t,"exit",e)})})},n.getNextChildMapping=function(e,n,t){var s=a(e.children),l=i(n,s);return Object.keys(l).forEach(function(a){var i=l[a];if((0,r.isValidElement)(i)){var c=a in n,d=a in s,u=n[a],p=(0,r.isValidElement)(u)&&!u.props.in;!d||c&&!p?d||!c||p?d&&c&&(0,r.isValidElement)(u)&&(l[a]=(0,r.cloneElement)(i,{onExited:t.bind(null,i),in:u.props.in,exit:o(i,"exit",e),enter:o(i,"enter",e)})):l[a]=(0,r.cloneElement)(i,{in:!1}):l[a]=(0,r.cloneElement)(i,{onExited:t.bind(null,i),in:!0,exit:o(i,"exit",e),enter:o(i,"enter",e)})}}),l};var r=t(21253);function a(e,n){var t=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){t[e.key]=function(e){return n&&(0,r.isValidElement)(e)?n(e):e}(e)}),t}function i(e,n){function t(t){return t in n?n[t]:e[t]}e=e||{},n=n||{};var r,a=Object.create(null),i=[];for(var o in e)o in n?i.length&&(a[o]=i,i=[]):i.push(o);var s={};for(var l in n){if(a[l])for(r=0;r{"use strict";t.d(n,{Fq:()=>m,gr:()=>h,vh:()=>f});var r,a,i,o,s,l,c=t(27413),d=t(96859),u=t(62494),p=t(99165),f=u.A.div(r||(r=(0,c.A)(["\n display: flex;\n padding: 20px 20px 15px 20px;\n flex-wrap: wrap;\n justify-content: end;\n background-color: ",";\n ",";\n"])),p.nY.white,e=>e.isChatUiRedesignEnabled?(0,d.css)(a||(a=(0,c.A)(["\n gap: 8px;\n padding-right: 0px;\n "]))):""),h=u.A.div(i||(i=(0,c.A)(["\n display: flex;\n padding: 20px 20px 15px 20px;\n flex-wrap: wrap;\n align-items: end;\n flex-direction: column;\n margin-left: auto;\n width: fit-content;\n background-color: ",";\n margin-bottom: 8px;\n ",";\n"])),p.nY.white,e=>e.isChatUiRedesignEnabled?(0,d.css)(o||(o=(0,c.A)(["\n gap: 8px;\n padding-right: 0px;\n "]))):""),m=u.A.div(s||(s=(0,c.A)(["\n display: flex;\n flex-wrap: wrap;\n justify-content: end;\n ",";\n"])),e=>e.isChatUiRedesignEnabled?(0,d.css)(l||(l=(0,c.A)(["\n gap: 8px;\n padding-right: 0px;\n "]))):"")},5507:(e,n,t)=>{"use strict";n.__esModule=!0,n.default=void 0;o(t(11908));var r=o(t(21253)),a=t(43181),i=o(t(72582));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var n,t;function o(){for(var n,t=arguments.length,r=new Array(t),a=0;a=0||(a[t]=e[t]);return a}(e,["children","in"]),o=r.default.Children.toArray(n),s=o[0],l=o[1];return delete a.onEnter,delete a.onEntering,delete a.onEntered,delete a.onExit,delete a.onExiting,delete a.onExited,r.default.createElement(i.default,a,t?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},o}(r.default.Component);s.propTypes={};var l=s;n.default=l,e.exports=n.default},5609:(e,n,t)=>{"use strict";t.d(n,{A:()=>L});var r,a,i,o,s,l,c,d,u=t(32663),p=t(78778),f=t(21253),h=t(54171),m=t(6345),g=t.n(m),v=t(58676),x=t(28730),A=t(39449),E=t(27413),b=t(96859),y=t(62494),C=t(26533),w=(0,b.css)(r||(r=(0,E.A)(["\n // Shared scale behavior\n &:hover {\n transform: scale(1.1) rotateX(180deg);\n transition: transform 200ms ease-out;\n }\n &:active {\n transform: scale(0.95) rotateX(180deg);\n transition: transform 150ms ease-out;\n }\n &:not(:hover):not(:active) {\n transform: scale(1) rotateX(180deg);\n transition: transform 200ms ease-out;\n }\n"]))),S=y.A.div(a||(a=(0,E.A)(["\n position: absolute;\n // size of the chat input\n bottom: ","px;\n // half of the button width\n left: calc(50% - 20px);\n\n ","\n"])),e=>e.bottomOffset+8,w),_=(0,b.keyframes)(i||(i=(0,E.A)(["\n 0% {\n transform: scale(1);\n opacity: 1;\n }\n\n 50% {\n transform: scale(0.5);\n opacity: 0;\n display: none;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0;\n display: none;\n }\n"]))),T=(0,b.keyframes)(o||(o=(0,E.A)(["\n 0% {\n transform: scale(0.5);\n opacity: 0;\n display: block;\n }\n\n 50% {\n transform: scale(1);\n opacity: 1;\n display: block;\n }\n\n 100% {\n transform: scale(1);\n opacity: 1;\n display: block;\n }\n"]))),I=(0,y.A)(C.A)(s||(s=(0,E.A)(["\n > div {\n // 32px is the size of the icon\n\n width: 32px;\n height: 32px;\n }\n\n box-shadow: 0px 3px 20px rgba(22, 22, 22, 0.16);\n"]))),R=y.A.div(l||(l=(0,E.A)(["\n opacity: ",";\n\n // forcing animation to not trigger on first render\n ","\n"])),e=>e.visible?1:0,e=>{var n=e.visible,t=e.isFirstRender;return n?(0,b.css)(c||(c=(0,E.A)(["\n animation: ","\n "," linear forwards;\n "])),T,t?"0ms":"100ms"):(0,b.css)(d||(d=(0,E.A)(["\n animation: ","\n "," linear forwards;\n "])),_,t?"0ms":"100ms")}),O=t(94177),j=e=>{var n=e.bottomOffset,t=(0,f.useRef)(!0),r=(0,x.o)(),a=(0,f.useState)(!1),i=(0,u.A)(a,2),o=i[0],s=i[1],l=(0,f.useRef)(g()(e=>s(e),250)).current,c=(0,h.d)(e=>e.application.status.isScrolledUp),d=(0,v.R)().scrollToBottomSmooth,m=(0,f.useCallback)(()=>{null===d||void 0===d||d()},[d]);return(0,f.useEffect)(()=>{c?l(!0):(l.cancel(),s(!1))},[c,l]),(0,f.useEffect)(()=>{t.current=!1},[]),(0,O.jsx)(S,{bottomOffset:n,children:(0,O.jsx)(R,{visible:o,isFirstRender:t.current,children:r?(0,O.jsx)(A.R,{id:"jump-to-last-conversation-message-floating-button",onClick:m,"aria-label":"Jump to the latest message",variant:"circle",size:r?"large":"medium",children:(0,O.jsx)(p.h,{width:16,height:16})}):(0,O.jsx)(I,{id:"jump-to-last-conversation-message-floating-button",variant:"primary",fill:"filled",shape:"rounded",size:"large",disabled:!1,"aria-label":"Jump to the latest message",icon:(0,O.jsx)(p.h,{}),onClick:m})})})};const L=(0,f.memo)(j)},9548:(e,n,t)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{A:()=>r})},9866:(e,n,t)=>{"use strict";t.d(n,{A:()=>r});const r="/* CSS variables. */\r\n:root {\r\n\t--PhoneInput-color--focus: #03b2cb;\r\n\t--PhoneInputInternationalIconPhone-opacity: 0.8;\r\n\t--PhoneInputInternationalIconGlobe-opacity: 0.65;\r\n\t--PhoneInputCountrySelect-marginRight: 0.35em;\r\n\t--PhoneInputCountrySelectArrow-width: 0.3em;\r\n\t--PhoneInputCountrySelectArrow-marginLeft: var(--PhoneInputCountrySelect-marginRight);\r\n\t--PhoneInputCountrySelectArrow-borderWidth: 1px;\r\n\t--PhoneInputCountrySelectArrow-opacity: 0.45;\r\n\t--PhoneInputCountrySelectArrow-color: currentColor;\r\n\t--PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);\r\n\t--PhoneInputCountrySelectArrow-transform: rotate(45deg);\r\n\t--PhoneInputCountryFlag-aspectRatio: 1.5;\r\n\t--PhoneInputCountryFlag-height: 1em;\r\n\t--PhoneInputCountryFlag-borderWidth: 1px;\r\n\t--PhoneInputCountryFlag-borderColor: rgba(0,0,0,0.5);\r\n\t--PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);\r\n\t--PhoneInputCountryFlag-backgroundColor--loading: rgba(0,0,0,0.1);\r\n}\r\n\r\n.PhoneInput {\r\n\t/* This is done to stretch the contents of this component. */\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.PhoneInputInput {\r\n\t/* The phone number input stretches to fill all empty space */\r\n\tflex: 1;\r\n\t/* The phone number input should shrink\r\n\t to make room for the extension input */\r\n\tmin-width: 0;\r\n}\r\n\r\n.PhoneInputCountryIcon {\r\n\twidth: calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));\r\n\theight: var(--PhoneInputCountryFlag-height);\r\n}\r\n\r\n.PhoneInputCountryIcon--square {\r\n\twidth: var(--PhoneInputCountryFlag-height);\r\n}\r\n\r\n.PhoneInputCountryIcon--border {\r\n\t/* Removed `background-color` because when an `` was still loading\r\n\t it would show a dark gray rectangle. */\r\n\t/* For some reason the `` is not stretched to 100% width and height\r\n\t and sometime there can be seen white pixels of the background at top and bottom. */\r\n\tbackground-color: var(--PhoneInputCountryFlag-backgroundColor--loading);\r\n\t/* Border is added via `box-shadow` because `border` interferes with `width`/`height`. */\r\n\t/* For some reason the `` is not stretched to 100% width and height\r\n\t and sometime there can be seen white pixels of the background at top and bottom,\r\n\t so an additional \"inset\" border is added. */\r\n\tbox-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor),\r\n\t\tinset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor);\r\n}\r\n\r\n.PhoneInputCountryIconImg {\r\n\t/* Fixes weird vertical space above the flag icon. */\r\n\t/* https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/7#note_348586559 */\r\n\tdisplay: block;\r\n\t/* 3rd party flag icons won't stretch if they have `width` and `height`.\r\n\t Also, if an icon's aspect ratio was different, it wouldn't fit too. */\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.PhoneInputInternationalIconPhone {\r\n\topacity: var(--PhoneInputInternationalIconPhone-opacity);\r\n}\r\n\r\n.PhoneInputInternationalIconGlobe {\r\n\topacity: var(--PhoneInputInternationalIconGlobe-opacity);\r\n}\r\n\r\n/* Styling native country `