PageSourceSearch

https://www.glitch.fun/static/js/77627.0b7b9708.chunk.js

js glitch.fun collected 2026-10-01 14:04:39 UTC 12,230 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[77627],{77627:function(n,e,t){t.r(e),t.d(e,{LiveChatWidget:function(){return G},TextWidget:function(){return A},useWidgetChatData:function(){return j},useWidgetCustomerData:function(){return W},useWidgetGreeting:function(){return R},useWidgetIsReady:function(){return L},useWidgetState:function(){return E}});var i=t(88094);function o(n){return{all:n=n||new Map,on:function(e,t){var i=n.get(e);i?i.push(t):n.set(e,[t])},off:function(e,t){var i=n.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):n.set(e,[]))},emit:function(e,t){var i=n.get(e);i&&i.slice().map((function(n){n(t)})),(i=n.get("*"))&&i.slice().map((function(n){n(e,t)}))}}}function r(n){return"state"===n?window.LiveChatWidget.get("state"):"chat"===n?window.LiveChatWidget.get("chat_data"):"customer"===n?window.LiveChatWidget.get("customer_data"):null}function a(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function u(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function c(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null==t)return;var i,o,r=[],a=!0,u=!1;try{for(t=t.call(n);!(a=(i=t.next()).done)&&(r.push(i.value),!e||r.length!==e);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return r}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return d(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=n[t];return i}t.dn(o);var l={current:null};function s(){var n,e=Array.prototype.slice;function t(n){return i._h?i._h.apply(null,n):i._q.push(n)}var i={_q:[],_h:null,_v:"2.0",on:function(){t(["on",e.call(arguments)])},once:function(){t(["once",e.call(arguments)])},off:function(){t(["off",e.call(arguments)])},get:function(){if(!i._h)throw new Error("[LiveChatWidget] You can't use getters before load.");return t(["get",e.call(arguments)])},call:function(){t(["call",e.call(arguments)])},init:function(){var n=document.createElement("script");n.async=!0,n.type="text/javascript",n.src="https://cdn.livechatinc.com/tracking.js",document.head.appendChild(n),l.current=n}};return null===(n=l.current)||void 0===n||n.remove(),window.LiveChatWidget=window.LiveChatWidget||i,l}function f(n,e){"off"===n&&"undefined"===typeof window.LiveChatWidget||("function"===typeof e.onReady&&window.LiveChatWidget[n]("ready",e.onReady),"function"===typeof e.onAvailabilityChanged&&window.LiveChatWidget[n]("availability_changed",e.onAvailabilityChanged),"function"===typeof e.onVisibilityChanged&&window.LiveChatWidget[n]("visibility_changed",e.onVisibilityChanged),"function"===typeof e.onCustomerStatusChanged&&window.LiveChatWidget[n]("customer_status_changed",e.onCustomerStatusChanged),"function"===typeof e.onNewEvent&&window.LiveChatWidget[n]("new_event",e.onNewEvent),"function"===typeof e.onFormSubmitted&&window.LiveChatWidget[n]("form_submitted",e.onFormSubmitted),"function"===typeof e.onRatingSubmitted&&window.LiveChatWidget[n]("rating_submitted",e.onRatingSubmitted),"function"===typeof e.onGreetingDisplayed&&window.LiveChatWidget[n]("greeting_displayed",e.onGreetingDisplayed),"function"===typeof e.onGreetingHidden&&window.LiveChatWidget[n]("greeting_hidden",e.onGreetingHidden),"function"===typeof e.onRichMessageButtonClicked&&window.LiveChatWidget[n]("rich_message_button_clicked",e.onRichMessageButtonClicked))}function g(n){"string"===typeof n.name&&window.LiveChatWidget.call("set_customer_name",n.name),"string"===typeof n.email&&window.LiveChatWidget.call("set_customer_email",n.email)}function y(n){"hidden"===n&&window.LiveChatWidget.call("hide"),"maximized"===n&&window.LiveChatWidget.call("maximize"),"minimized"===n&&window.LiveChatWidget.call("minimize")}var v=o(),h=v.emit.bind(null);function m(n){return v.on("init",n),"LiveChatWidget"in window&&n(),function(){v.off("init",n)}}function w(n){return v.on("destroy",n),function(){v.off("destroy",n)}}function p(n){var e={isLoading:!1,desiredState:"unknown",currentEventHandlers:{onReady:n.onReady,onNewEvent:n.onNewEvent,onFormSubmitted:n.onFormSubmitted,onGreetingHidden:n.onGreetingHidden,onRatingSubmitted:n.onRatingSubmitted,onGreetingDisplayed:n.onGreetingDisplayed,onVisibilityChanged:n.onVisibilityChanged,onAvailabilityChanged:n.onAvailabilityChanged,onCustomerStatusChanged:n.onCustomerStatusChanged,onRichMessageButtonClicked:n.onRichMessageButtonClicked}},t=s();return function(n){var e=n.license,t=n.organizationId,i=n.group,o=n.chatBetweenGroups,r=n.sessionVariables,a=n.customIdentityProvi
1der;if(window.__lc=window.__lc||{},"string"===typeof t&&""!==t.trim())window.__lc.organizationId=t;else{if("string"!==typeof e||""===e.trim())throw new Error("[LiveChatWidget] The license or organizationId property is required for initialization");window.__lc.license=Number(e)}"undefined"!==typeof i&&(window.__lc.group=Number(i)),"undefined"!==typeof o&&(window.__lc.chat_between_groups=Boolean(o)),r instanceof Object&&(window.__lc.params=Object.entries(r).map((function(n){var e=c(n,2);return{name:e[0],value:e[1]}}))),"function"===typeof a&&(window.__lc.custom_identity_provider=a)}(n),y(n.visibility),f("on",e.currentEventHandlers),g({name:n.customerName,email:n.customerEmail}),window.__lc.integration_name="@livechat/widget-core",{init:function(){var n=this;e.desiredState="loaded",e.isLoading||(window.LC_API=window.LC_API||{},window.LC_API.on_after_load=function(){e.isLoading=!1,"destroyed"===e.desiredState&&n.destroy(),e.desiredState="unknown"},h("init"),e.isLoading=!0,window.LiveChatWidget.init())},destroy:function(){var n;e.desiredState="destroyed",e.isLoading||(h("destroy"),null===(n=t.current)||void 0===n||n.remove(),window.LiveChatWidget.call("destroy"))},updateVisibility:function(n){y(n)},updateEventHandlers:function(n){f("off",e.currentEventHandlers),f("on",n),e.currentEventHandlers=function(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?a(Object(t),!0).forEach((function(e){u(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}({},n)},updateSessionVariables:function(n){n&&window.LiveChatWidget.call("update_session_variables",n)},hideGreeting:function(){window.LiveChatWidget.call("hide_greeting")},updateCustomerData:function(n){g(n)}}}function b(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function C(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?b(Object(t),!0).forEach((function(e){_(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function _(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function S(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null==t)return;var i,o,r=[],a=!0,u=!1;try{for(t=t.call(n);!(a=(i=t.next()).done)&&(r.push(i.value),!e||r.length!==e);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return r}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return O(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return O(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=n[t];return i}function L(){var n=S(i.useState(!1),2),e=n[0],t=n[1];return i.useEffect((function(){var n=function(){return t(!0)},e=m((function(){f("once",{onReady:n})})),i=w((function(){t(!1)}));return function(){f("off",{onReady:n}),e(),i()}}),[]),e}function E(){var n=S(i.useState(null),2),e=n[0],t=n[1];return i.useEffect((function(){var n=function(n){var e=n.state;return t(e)},e=function(n){var e=n.visibility;t((function(n){return n?C(C({},n),{},{visibility:e}):n}))},i=function(n){var e=n.availability;t((function(n){return n?C(C({},n),{},{availability:e}):n}))},o=m((function(){f("once",{onReady:n}),f("on",{onVisibilityChanged:e,onAvailabilityChanged:i})})),r=w((function(){t(null)}));return function(){f("off",{onReady:n,onVisibilityChanged:e,onAvailabilityChanged:i}),o(),r()}}),[]),e}function W(){var n=S(i.useState(null),2),e=n[0],t=n[1];return i.useEffect((function(){var n=function(n){var e=n.customerData;return t(e)},e=function(){return t(r("customer"))},i=m((function(){f("once",{onReady:n}),f("on",{onCustomerStatusChanged:e})})),o=w((function(){t(null)}));return function(){f("off",{onReady:n,onCustomerStatusChanged:e}),i(),o()}}),[]),e}function j(){var n=W(),e=null===n||void 0===n?void 0:n.status,t=S(i.useState(null),2),o=t[0],a=t[1];return i.useEffect((function(){a("chatting"===e?r("chat"):null)}),[e]),o}function R(){var n=S(i.useState(null),2),e=n[0],t=n[1];return i.useEffect((function(){var n=function(n){return t(n)},e=function(){return t(null)},i=m((function(){f("on",{onGreetingDisplayed:n,onGreetingHidden:e})})),o=w((function(){t(null)}));return function(){f("off",{onGreetingDisplayed:n,onGreetingHidden:e}),i(),o()}}),[]),e}function A(n){return D(n,"textapp")}function G(n){return D(n,"livechat")}function D(n,e){var t=i.useRef(null);return i.useEffect((function(){return t.current=p(n),window.__lc.integration_name="@livechat/widget-react","textapp"===e&&(window.__lc.product_name="text"),t.current.init(),function(){var n;null===(n=t.current)||void 0===n||n.destroy()}}),[n.organizationId,n.license,n.group,n.chatBetweenGroups]),i.useEffect((function(){var e;null===(e=t.current)||void 0===e||e.updateVisibility(n.visibility)}),[n.visibility]),i.useEffect((function(){var e;null===(e=t.current)||void 0===e||e.updateSessionVariables(n.sessionVariables)}),[n.sessionVariables]),i.useEffect((function(){var e;null===(e=t.current)||void 0===e||e.updateCustomerData({name:n.customerName,email:n.customerEmail})}),[n.customerName,n.customerEmail]),i.useEffect((function(){var e;null===(e=t.current)||void 0===e||e.updateEventHandlers(C(C(C(C(C(C(C(C(C(C({},n.onReady&&{onReady:n.onReady}),n.onNewEvent&&{onNewEvent:n.onNewEvent}),n.onFormSubmitted&&{onFormSubmitted:n.onFormSubmitted}),n.onGreetingHidden&&{onGreetingHidden:n.onGreetingHidden}),n.onRatingSubmitted&&{onRatingSubmitted:n.onRatingSubmitted}),n.onGreetingDisplayed&&{onGreetingDisplayed:n.onGreetingDisplayed}),n.onVisibilityChanged&&{onVisibilityChanged:n.onVisibilityChanged}),n.onAvailabilityChanged&&{onAvailabilityChanged:n.onAvailabilityChanged}),n.onCustomerStatusChanged&&{onCustomerStatusChanged:n.onCustomerStatusChanged}),n.onRichMessageButtonClicked&&{onRichMessageButtonClicked:n.onRichMessageButtonClicked}))}),[n.onReady,n.onNewEvent,n.onFormSubmitted,n.onGreetingHidden,n.onRatingSubmitted,n.onGreetingDisplayed,n.onVisibilityChanged,n.onAvailabilityChanged,n.onCustomerStatusChanged,n.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.