1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="67798e35-274b-40ff-8484-3ef1ce7d5b0e",e._sentryDebugIdIdentifier="sentry-dbid-67798e35-274b-40ff-8484-3ef1ce7d5b0e")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6836],{46836:(e,t,n)=>{n.r(t),n.d(t,{LiveChatWidget:()=>E,TextWidget:()=>O,useWidgetChatData:()=>_,useWidgetCustomerData:()=>C,useWidgetGreeting:()=>S,useWidgetIsReady:()=>w,useWidgetState:()=>p});var i=n(39549);function o(e){return"state"===e?window.LiveChatWidget.get("state"):"chat"===e?window.LiveChatWidget.get("chat_data"):"customer"===e?window.LiveChatWidget.get("customer_data"):null}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var u={current:null};function c(e,t){("off"!==e||void 0!==window.LiveChatWidget)&&("function"==typeof t.onReady&&window.LiveChatWidget[e]("ready",t.onReady),"function"==typeof t.onAvailabilityChanged&&window.LiveChatWidget[e]("availability_changed",t.onAvailabilityChanged),"function"==typeof t.onVisibilityChanged&&window.LiveChatWidget[e]("visibility_changed",t.onVisibilityChanged),"function"==typeof t.onCustomerStatusChanged&&window.LiveChatWidget[e]("customer_status_changed",t.onCustomerStatusChanged),"function"==typeof t.onNewEvent&&window.LiveChatWidget[e]("new_event",t.onNewEvent),"function"==typeof t.onFormSubmitted&&window.LiveChatWidget[e]("form_submitted",t.onFormSubmitted),"function"==typeof t.onRatingSubmitted&&window.LiveChatWidget[e]("rating_submitted",t.onRatingSubmitted),"function"==typeof t.onGreetingDisplayed&&window.LiveChatWidget[e]("greeting_displayed",t.onGreetingDisplayed),"function"==typeof t.onGreetingHidden&&window.LiveChatWidget[e]("greeting_hidden",t.onGreetingHidden),"function"==typeof t.onRichMessageButtonClicked&&window.LiveChatWidget[e]("rich_message_button_clicked",t.onRichMessageButtonClicked))}function d(e){"string"==typeof e.name&&window.LiveChatWidget.call("set_customer_name",e.name),"string"==typeof e.email&&window.LiveChatWidget.call("set_customer_email",e.email)}function l(e){"hidden"===e&&window.LiveChatWidget.call("hide"),"maximized"===e&&window.LiveChatWidget.call("maximize"),"minimized"===e&&window.LiveChatWidget.call("minimize")}var s=function(e){return{all:e=e||new Map,on:function(t,n){var i=e.get(t);i?i.push(n):e.set(t,[n])},off:function(t,n){var i=e.get(t);i&&(n?i.splice(i.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var i=e.get(t);i&&i.slice().map(function(e){e(n)}),(i=e.get("*"))&&i.slice().map(function(e){e(t,n)})}}}(),f=s.emit.bind(null);function g(e){return s.on("init",e),"LiveChatWidget"in window&&e(),function(){s.off("init",e)}}function y(e){return s.on("destroy",e),function(){s.off("destroy",e)}}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){var i,o,r;i=e,o=t,r=n[t],o in i?Object.defineProperty(i,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,i,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var r=[],a=!0,u=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(r.push(n.value),!t||r.length!==t);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==o.return||o.return()}finally{if(u)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function w(){var e=b(i.useState(!1),2),t=e[0],n=e[1];return i.useEffect(function(){var e=function(){return n(!0)},t=g(function(){c("once",{onReady:e})}),i=y(function(){n(!1)});return function(){c("off",{onReady:e}),t(),i()}},[]),t}function p(){var e=b(i.useState(null),2),t=e[0],n=e[1];return i.useEffect(function(){var e=function(e){return n(e.state)},t=function(e){var t=e.visibility;n(function(e){return e?h(h({},e),{},{visibility:t}):e})},i=function(e){var t=e.availability;n(function(e){return e?h(h({},e),{},{availability:t}):e})},o=g(function(){c("once",{onReady:e}),c("on",{onVisibilityChanged:t,onAvailabilityChanged:i})}),r=y(function(){n(null)});return function(){c("off",{onReady:e,onVisibilityChanged:t,onAvailabilityChanged:i}),o(),r()}},[]),t}function C(){var e=b(i.useState(null),2),t=e[0],n=e[1];return i.useEffect(function(){var e=function(e){return n(e.customerData)},t=function(){return n(o("customer"))},i=g(function(){c("once",{onReady:e}),c("on",{onCustomerStatusChanged:t})}),r=y(function(){n(null)});return function(){c("off",{onReady:e,onCustomerStatusChanged:t}),i(),r()}},[]),t}function _(){var e=C(),t=null==e?void 0:e.status,n=b(i.useState(null),2),r=n[0],a=n[1];return i.useEffect(function(){"chatting"===t?a(o("chat")):a(null)},[t]),r}function S(){var e=b(i.useState(null),2),t=e[0],n=e[1];return i.useEffect(function(){var e=function(e){return n(e)},t=function(){return n(null)},i=g(function(){c("on",{onGreetingDisplayed:e,onGreetingHidden:t})}),o=y(function(){n(null)});return function(){c("off",{onGreetingDisplayed:e,onGreetingHidden:t}),i(),o()}},[]),t}function O(e){return L(e,"textapp")}function E(e){return L(e,"livechat")}function L(e,t){var n=i.useRef(null);return i.useEffect(function(){var i,o;return i={isLoading:!1,desiredState:"unknown",currentEventHandlers:{onReady:e.onReady,onNewEvent:e.onNewEvent,onFormSubmitted:e.onFormSubmitted,onGreetingHidden:e.onGreetingHidden,onRatingSubmitted:e.onRatingSubmitted,onGreetingDisplayed:e.onGreetingDisplayed,onVisibilityChanged:e.onVisibilityChanged,onAvailabilityChanged:e.onAvailabilityChanged,onCustomerStatusChanged:e.onCustomerStatusChanged,onRichMessageButtonClicked:e.onRichMessageButtonClicked}},o=function(){var e,t=Array.prototype.slice;function n(e){return i._h?i._h.apply(null,e):i._q.push(e)}var i={_q:[],_h:null,_v:"2.0",on:function(){n(["on",t.call(arguments)])},once:function(){n(["once",t.call(arguments)])},off:function(){n(["off",t.call(arguments)])},get:function(){if(!i._h)throw Error("[LiveChatWidget] You can't use getters before load.");return n(["get",t.call(arguments)])},call:function(){n(["call",t.call(arguments)])},init:function(){var e=document.createElement("script");e.async=!0,e.type="text/javascript",e.src="https://cdn.livechatinc.com/tracking.js",document.head.appendChild(e),u.current=e}};return null==(e=u.current)||e.remove(),window.LiveChatWidget=window.LiveChatWidget||i,u}(),function(e){var t=e.license,n=e.organizationId,i=e.group,o=e.chatBetweenGroups,r=e.sessionVariables,u=e.customIdentityProvider;if(window.__lc=window.__lc||{},"string"==typeof n&&""!==n.trim())window.__lc.organizationId=n;else if("string"==typeof t&&""!==t.trim())window.__lc.license=Number(t);else throw Error("[LiveChatWidget] The license or organizationId property is required for initialization");void 0!==i&&(window.__lc.group=Number(i)),void 0!==o&&(window.__lc.chat_between_groups=!!o),r instanceof Object&&(window.__lc.params=Object.entries(r).map(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,i,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var r=[],a=!0,u=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(r.push(n.value),r.length!==t);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==o.return||o.return()}finally{if(u)throw i}}return r}}(e,2)||function(e,t){if(e){if("string"==typeof e)return a(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}}
1(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return{name:t[0],value:t[1]}})),"function"==typeof u&&(window.__lc.custom_identity_provider=u)}(e),l(e.visibility),c("on",i.currentEventHandlers),d({name:e.customerName,email:e.customerEmail}),window.__lc.integration_name="@livechat/widget-core",n.current={init:function(){var e=this;i.desiredState="loaded",i.isLoading||(window.LC_API=window.LC_API||{},window.LC_API.on_after_load=function(){i.isLoading=!1,"destroyed"===i.desiredState&&e.destroy(),i.desiredState="unknown"},f("init"),i.isLoading=!0,window.LiveChatWidget.init())},destroy:function(){var e;i.desiredState="destroyed",i.isLoading||(f("destroy"),null==(e=o.current)||e.remove(),window.LiveChatWidget.call("destroy"))},updateVisibility:function(e){l(e)},updateEventHandlers:function(e){c("off",i.currentEventHandlers),c("on",e),i.currentEventHandlers=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var i,o,r;i=e,o=t,r=n[t],o in i?Object.defineProperty(i,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e)},updateSessionVariables:function(e){e&&window.LiveChatWidget.call("update_session_variables",e)},hideGreeting:function(){window.LiveChatWidget.call("hide_greeting")},updateCustomerData:function(e){d(e)}},window.__lc.integration_name="@livechat/widget-react","textapp"===t&&(window.__lc.product_name="text"),n.current.init(),function(){var e;null==(e=n.current)||e.destroy()}},[e.organizationId,e.license,e.group,e.chatBetweenGroups]),i.useEffect(function(){var t;null==(t=n.current)||t.updateVisibility(e.visibility)},[e.visibility]),i.useEffect(function(){var t;null==(t=n.current)||t.updateSessionVariables(e.sessionVariables)},[e.sessionVariables]),i.useEffect(function(){var t;null==(t=n.current)||t.updateCustomerData({name:e.customerName,email:e.customerEmail})},[e.customerName,e.customerEmail]),i.useEffect(function(){var t;null==(t=n.current)||t.updateEventHandlers(h(h(h(h(h(h(h(h(h(h({},e.onReady&&{onReady:e.onReady}),e.onNewEvent&&{onNewEvent:e.onNewEvent}),e.onFormSubmitted&&{onFormSubmitted:e.onFormSubmitted}),e.onGreetingHidden&&{onGreetingHidden:e.onGreetingHidden}),e.onRatingSubmitted&&{onRatingSubmitted:e.onRatingSubmitted}),e.onGreetingDisplayed&&{onGreetingDisplayed:e.onGreetingDisplayed}),e.onVisibilityChanged&&{onVisibilityChanged:e.onVisibilityChanged}),e.onAvailabilityChanged&&{onAvailabilityChanged:e.onAvailabilityChanged}),e.onCustomerStatusChanged&&{onCustomerStatusChanged:e.onCustomerStatusChanged}),e.onRichMessageButtonClicked&&{onRichMessageButtonClicked:e.onRichMessageButtonClicked}))},[e.onReady,e.onNewEvent,e.onFormSubmitted,e.onGreetingHidden,e.onRatingSubmitted,e.onGreetingDisplayed,e.onVisibilityChanged,e.onAvailabilityChanged,e.onCustomerStatusChanged,e.onRichMessageButtonClicked]),null}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.