!function(){"use strict";function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},e.apply(null,arguments)}var t=e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let i,o=!1;n(0,e=>{o||(o=2===e,o&&"function"==typeof i&&i())}),o||(i=e(e=>{o||n(1,e)},e=>{o||void 0===e||(o=!0,n(2,e))},()=>{o||(o=!0,n(2))}))};const n=e=>(t,n)=>{if(0!==t)return;let i,o;function r(e,t){1===e&&(o||i)(1,t),2===e&&(o&&o(2),i&&i(2))}e(0,(e,t)=>{if(0===e)i=t,n(0,r);else if(1===e){const e=t;o&&o(2),e(0,(e,t)=>{0===e?(o=t,o(1)):1===e?n(1,t):2===e&&t?(i&&i(2),n(2,t)):2===e&&(i?(o=void 0,i(1)):n(2))})}else 2===e&&t?(o&&o(2),n(2,t)):2===e&&(o?i=void 0:n(2))})};var i=function(e,t){return e===t};function o(e){return void 0===e&&(e=i),function(t){return function(n,i){if(0===n){var o,r,a=!1;t(0,function(t,n){0===t&&(r=n),1===t?a&&e(o,n)?r(1):(a=!0,o=n,i(1,n)):i(t,n)})}}}}var r=e=>t=>(n,i)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,i(t,n)):1===t?e(n)?i(t,n):o(1):i(t,n)})};var a=e=>t=>{let n;t(0,(t,i)=>{0===t&&(n=i),1===t&&e(i),1!==t&&0!==t||n(1)})};const s=(e,t,n)=>(i,o)=>{if(0!==i)return;let r=!1;const a=e=>{o(1,e)};o(0,i=>{2===i&&(r=!0,e.removeEventListener(t,a,n))}),r||e.addEventListener(t,a,n)};var c=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return(e,n)=>{if(0!==e)return;const i=t.length,o=Array(i);let r=0,a=0;const s=e=>{if(0!==e)for(let t=0;i>t;t++)o[t]&&o[t](e)};for(let e=0;i>e;e++)t[e](0,(t,c)=>{0===t?(o[e]=c,1===++r&&n(0,s)):2===t?(o[e]=void 0,++a===i&&n(2)):n(t,c)})}};function l(e,n){return t(t=>(e.on(n,t),()=>{e.off(n,t)}))}!function(e){var t,n=e.Symbol;"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());var d=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];let i=t[0];for(let e=1,n=t.length;n>e;e++)i=t[e](i);return i};var u=e=>t=>(n,i)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,i(0,(e,t)=>{0!==e&&o(e,t)}),i(1,e)):i(t,n)})};var m=e=>t=>(n,i)=>{0===n&&t(0,(t,n)=>{i(t,1===t?e(n):n)})};function p(e){return t=>n(m(e)(t))}var f=function(){};function g(e,t){0===e&&t(0,f)}function h(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e,n){if(0===e){var i=!1;for(n(0,function(e){2===e&&(i=!0,t.length=0)});0!==t.length;)n(1,t.shift());i||n(2)}}}function v(e){return function(t,n){if(0===t){var i,o,r,a=0;e(0,function(e,t){if(0===e&&(r=t),1===e){var s=[o,t];i=s[0],o=s[1],2>++a?r(1):n(1,[i,o])}else n(e,t)})}}}var _=function(){},w={};function y(e){var t,n,i=[],o=!1,r=w;return function(a,s){if(0===a){if(r!==w)return s(0,_),o&&s(1,n),void s(2,r);i.push(s);var c=function(e,n){if(2!==e)r===w&&t(e,n);else{var o=i.indexOf(s);-1!==o&&i.splice(o,1)}};1!==i.length?(s(0,c),o&&r===w&&s(1,n)):e(0,function(e,a){if(0===e)return t=a,void s(0,c);1===e&&(o=!0,n=a);var l=i.slice(0);2===e&&(r=a,i=null),l.forEach(function(t){t(e,a)})})}}}var b=e=>t=>(n,i)=>{if(0!==n)return;let o,r=0;t(0,(t,n)=>{0===t?(o=n,i(t,n)):1===t&&e>r?(r++,o(1)):i(t,n)})};const x=function(e){return void 0===e&&(e={}),t=>{"function"==typeof e&&(e={next:e});let n,{next:i,error:o,complete:r}=e;t(0,(e,t)=>{0===e&&(n=t),1===e&&i&&i(t),1!==e&&0!==e||n(1),2===e&&!t&&r&&r(),2===e&&t&&o&&o(t)});return()=>{n&&n(2)}}};var k=e=>t=>(n,i)=>{if(0!==n)return;let o,r=0;function a(t,n){e>r&&o(t,n)}t(0,(t,n)=>{0===t?(o=n,i(0,a)):1===t?e>r&&(r++,i(t,n),r===e&&(i(2),o(2))):i(t,n)})};const C={},E=e=>t=>(n,i)=>{if(0!==n)return;let o,r,a=!1,s=C;t(0,(t,n)=>{if(0===t)return o=n,e(0,(e,t)=>0===e?(r=t,void r(1)):1===e?(s=void 0,r(2),o(2),void(a&&i(2))):void(2===e&&(r=null,t&&(s=t,o(2),a&&i(e,t))))),a=!0,i(0,(e,t)=>{s===C&&(2===e&&r&&r(2),o(e,t))}),void(s!==C&&i(2,s));2===t&&r(2),i(t,n)})};function I(e){return new Promise(function(t,n){x({next:t,error:n,complete:function(){var e=Error("No elements in sequence.");e.code="NO_ELEMENTS",n(e)}})(function(e){return function(t,n){if(0===t){var i,o,r=!1,a=!1;e(0,function(e,t){return 0===e?(i=t,void n(0,function(e,t){2===e&&(a=!0),i(e,t)})):1===e?(r=!0,o=t,void i(1)):void(2===e&&!t&&r&&(n(1,o),a)||n(e,t))})}}}(e))})}var L=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}(function(e,t){function n(e,t){return e===t}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=null,o=null;return function(){return function(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var i=t.length,o=0;i>o;o++)if(!e(t[o],n[o]))return!1;return!0}(t,i,arguments)||(o=e.apply(null,arguments)),i=arguments,o}}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return function(){for(var t=arguments.length,o=Array(t),r=0;t>r;r++)o[r]=arguments[r];var a=0,s=o.pop(),c=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var n=t.map(function(e){return typeof e}).join(", ");throw Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}(o),l=e.apply(void 0,[function(){return a++,s.apply(null,arguments)}].concat(n)),d=i(function(){for(var e=[],t=c.length,n=0;t>n;n++)e.push(c[n].apply(null,arguments));return l.apply(null,e)});return d.resultFunc=s,d.recomputations=function(){return a},d.resetRecomputations=function(){return a=0},d}}t.__esModule=!0,t.defaultMemoize=i,t.createSelectorCreator=o,t.createStructuredSelector=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if("object"!=typeof e)throw Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];return t.reduce(function(e,t,i){return e[n[i]]=t,e},{})})};var r=t.createSelector=o(i)}),A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cache={}}return e.prototype.set=function(e,t){this._cache[e]=t},e.prototype.get=function(e){return this._cache[e]},e.prototype.remove=function(e){delete this._cache[e]},e.prototype.clear=function(){this._cache={}},e}();function T(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var i=A;return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=void 0,r=void 0;"function"==typeof n?(console.warn('[re-reselect] Deprecation warning: "selectorCreator" argument is discouraged and will be removed in the upcoming major release. Please use "options.selectorCreator" instead.'),o=new i,r=n):(o=n.cacheObject||new i,r=n.selectorCreator||L.createSelector);var a=function(){var n=e.apply(void 0,arguments);if("string"==typeof n||"number"==typeof n){var i=o.get(n);return void 0===i&&(i=r.apply(void 0,t),o.set(n,i)),i.apply(void 0,arguments)}};return a.getMatchingSelector=function(){var t=e.apply(void 0,arguments);return o.get(t)},a.removeMatchingSelector=function(){var t=e.apply(void 0,arguments);o.remove(t)},a.clearCache=function(){o.clear()},a.resultFunc=t[t.length-1],a}}function P(e,t){return e+t}const{hasOwnProperty:z}={};function S(e,t){return z.call(t,e)}function O(){return O=Object.assign||function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return n.forEach(t=>{for(const n in t)S(n,t)&&(e[n]=t[n])}),e},O.apply(void 0,arguments)}function M(e){return Array.isArray(e)}function D(e){return"object"==typeof e&&null!==e&&!M(e)}function F(e){if("keys"in Object&&"function"==typeof Object.keys)return Object.keys(e);const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}function N(e,t){return F(t).reduce((n,i)=>(n[i]=e(t[i]),n),{})}function B(e){return M(e)?e.map(B):D(e)?N(B,e):e}function j(e){return M(e)?e.filter(e=>null!=e&&!Number.isNaN(e)):Object.keys(e).reduce((t,n)=>{const i=e[n];return null==i||Number.isNaN(i)||(t[n]=i),t},{})}function H(e,t){let n;return function(){clearTimeout(n);for(var i=arguments.length,o=Array(i),r=0;i>r;r++)o[r]=arguments[r];n=setTimeout.apply(void 0,[t,e].concat(o))}}function q(e,t){for(let n=0;t.length>n;n++){const i=t[n];if(e(i))return i}}function W(e,t){for(let n=t.length-1;n>=0;n--)if(e(t[n]))return t[n]}function V(e){return e}function R(e,t){return F(t).forEach(n=>{e(t[n],n)})}function G(){return Math.random().toString(36).substring(2)}function U(e){const t=G();return S(t,e)?U(e):t}function X(e,t,n){const i=function(e,t){const n="string"==typeof e?e.split("."):e;let i=0,o=t;for(;o&&n.length>i;)o=o[n[i++]];return o}(t,n);return null!=i?i:e}function Y(e,t){return-1!==t.indexOf(e)}function J(e){return 0===(M(e)?e:Object.keys(e)).length}function K(e){return!e}function $(e){return!!e}function Q(e){return e.length>0?e[e.length-1]:void 0}function Z(e,t){return F(t).reduce((n,i)=>(Object.defineProperty(n,e(i),{value:t[i],enumerable:!0}),n),{})}function ee(e,t){if(J(t))return e;const n={};return R((i,o)=>{if(S(o,t))if(D(e[o])&&D(t[o]))n[o]=ee(e[o],t[o]);else if(M(e[o])&&M(t[o])){const i=Math.max(e[o].length,t[o].length);n[o]=Array(i);for(let r=0;i>r;r++)r in t[o]?n[o][r]=t[o][r]:r in e[o]&&(n[o][r]=e[o][r])}else n[o]=t[o];else n[o]=e[o]},e),R((e,i)=>{S(i,n)||(n[i]=t[i])},t),n}function te(e){if(0===e.length)return{};const[t,...n]=e;return n.reduce((e,t)=>ee(e,t),t)}function ne(e){return function(e,t){const n={};return function(){const i=e.apply(void 0,arguments);if(S(i,n))return n[i];const o=t.apply(void 0,arguments);return n[i]=o,o}}(V,e)}function ie(){}function oe(e,t){return e.reduce((e,n)=>(e[n]=t[n],e),{})}function re(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ae(e,t){if(re(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;n.length>i;i++)if(!S(n[i],t)||!re(e[n[i]],t[n[i]]))return!1;return!0}function se(e){return e.reduce(P,0)}function ce(e){return Array.prototype.slice.call(e)}function le(e){return F(e).map(t=>[t,e[t]])}const de=(e,t)=>t,ue=(e,t)=>(e=>e.entities.chats.byIds)(e)[t],me=T([(e,t)=>ue(e,t).events.orderedIds,(e,t)=>ue(e,t).events.byIds],(e,t)=>e.map(e=>t[e]))(de),pe=T([ue,me],(t,n)=>e({},t,{events:n}))(de),fe=e=>e.entities.users.byIds,ge=e=>fe(e)[(e=>e.session.id)(e)],he=(e,t)=>fe(e)[t],ve=e=>ge(e).id;T([me,ve],(e,t)=>W(e=>{let{delivered:n,author:i}=e;return n&&i===t},e))(de),T([me,ve],(e,t)=>W(e=>{let{seen:n,author:i}=e;return n&&i===t},e))(de);const _e={boosters:!0,form:!0,system_message:!0};L.createSelector([me,e=>ge(e).id],(e,t)=>{return function(e,t,n){for(let i=t;i>=0;i--)if(e(n[i]))return i;return-1}(e=>e.author===t&&"message"===e.type&&!(e.properties&&"file"===e.properties.serverType)||!0===e.seen&&!_e[e.type]&&!!e.serverId,(n=e).length-1,n);var n}),T([(e,t)=>ue(e,t).participants,fe],(e,t)=>e.map(e=>t[e]))(de);function we(e,t){if(void 0===t)return e.application;return e.application[t]}var ye=(e,t)=>{R((e,n)=>{t.style[n]=e},e)},be=(e,t)=>{R((e,n)=>{"style"!==n?t.setAttribute(n,e):ye(e,t)},e)};const xe=()=>!!document.documentElement.currentStyle,ke=(e,t)=>{const n=window.getComputedStyle(t),i="border-box"===n.boxSizing,o=oe(e,n);if(xe()&&i&&S("width",o)&&null!==o.width){o.width=se([o.width,n.paddingLeft,n.paddingRight,n.borderLeftWidth,n.borderRightWidth].map(parseFloat))+"px"}if(xe()&&i&&S("height",o)&&null!==o.height){o.height=se([o.height,n.paddingTop,n.paddingBottom,n.borderTopWidth,n.borderBottomWidth].map(parseFloat))+"px"}return o};function Ce(){return new Promise(e=>{const t=()=>{document.body?e(document.body):setTimeout(t,100)};t()})}function Ee(e){const{parentNode:t}=e;t&&t.removeChild(e)}const Ie=(e,t)=>{const n=document.createElement(e);return be(t,n),n},Le=e=>le(e).map(e=>e.map(encodeURIComponent).join("=")).join("&"),Ae=e=>{const t=function(e){return e.reduce((e,t)=>{let[n,i]=t;return e[n]=i,e},{})}(e.split("&").filter(Boolean).map(e=>e.split("=").map(e=>decodeURIComponent(e.replace("+","%20")))).map(e=>2===e.length?e:[e[0],""]));return t},Te=/(?:[^:]+:\/\/)?([^/\s]+)/;const Pe=/[^:]+:\/\/[^(/|?)\s]+/,ze=e=>{const t=e.match(Pe);return t&&t[0]},Se=/.*?\?([^#]+)/,Oe=e=>{const t=e.match(Se);return t?"?"+t[1]:""},Me=e=>e.replace(/^\?/,""),De=e=>{if(null===ze(e))return Ae(Me(e));const t=Me(Oe(e));return t?Ae(t):{}},Fe=/^(?:https?:)?\/\/[^/]+\/([^?#]+)/,Ne=e=>{const t=e.match(Fe);return"/"+(t&&t[1]||"")},Be=e=>e.replace(/\w/g,"$&[\\r\\n\\t]*");RegExp("^[\0-]*("+Be("javascript")+"|"+Be("data")+"):","i");const je=/^((http(s)?:)?\/\/)/,He=/^((http(s)?:)?\/\/)/,qe=e=>{const t=e.match(He);return t?t[2]:null},We=(t,n)=>{if(-1===t.indexOf("?"))return t;const i=De(t);if(J(i))return t;if(Object.keys(i).every(e=>!n.includes(e)))return t;n.forEach(e=>delete i[e]);const[o]=t.split("?"),r=((t,n)=>{if(0===Object.keys(n).length)return t;const i=ze(t),o=Ne(t),r=Oe(t)?De(t):{},a=Le(e({},r,n));return t.indexOf("#")>-1?""+i+o+"?"+a+"#"+t.split("#")[1]:""+i+o+"?"+a})(o,i);return t.indexOf("#")>-1?r+"#"+t.split("#")[1]:r},Ve=e=>"https://"+(e=>e.replace(je,""))(e),Re="chat-widget",Ge="chat-widget-minimized",Ue="chat-widget-lightbox",Xe="LiveChat chat widget",Ye="OpenWidget widget",Je={opacity:0,visibility:"hidden",zIndex:-1},Ke={opacity:1,visibility:"visible",zIndex:2147483639},$e={id:Re+"-container",style:e({},Je,{position:"fixed",bottom:0,width:0,height:0,maxWidth:"100%",maxHeight:"100%",minHeight:0,minWidth:0,backgroundColor:"transparent",border:0,overflow:"hidden"})};e({},$e.style);const Qe={id:"livechat-eye-catcher",style:{position:"fixed",visibility:"visible",zIndex:2147483639,background:"transparent",border:0,padding:"10px 10px 0 0",float:"left",marginRight:"-10px",webkitBackfaceVisibility:"hidden"}},Ze={style:{position:"absolute",display:"none",top:"-5px",right:"-5px",width:"16px",lineHeight:"16px",textAlign:"center",cursor:"pointer",textDecoration:"none",color:"#000",fontSize:"20px",fontFamily:"Arial, sans-serif",borderRadius:"50%",backgroundColor:"rgba(255, 255, 255, 0.5)"}},et={id:"livechat-eye-catcher-img",style:{display:"block",overflow:"hidden",cursor:"pointer"}},tt={alt:"",style:{display:"block",border:0,float:"right"}},nt={position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px"},it={id:Re,name:Re,title:Xe,scrolling:"no",style:{width:"100%",height:"100%","min-height":"0px","min-width":"0px",margin:"0px",padding:"0px","background-image":"none","background-position-x":"0%","background-position-y":"0%","background-size":"initial","background-attachment":"scroll","background-origin":"initial","background-clip":"initial","background-color":"rgba(0, 0, 0, 0)","border-width":"0px",float:"none","color-scheme":"light"}},ot={id:Ue,name:Ue,title:"Lightbox image preview",scrolling:"no",style:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"100%",border:"none","z-index":"2147483647",background:"transparent","aria-hidden":"false",tabindex:"0"}},rt=e({},it,{id:Ge,name:Ge}),at=e=>"lc-aria-announcer-"+e;const st=(()=>{try{return!1}catch(e){return!1}})(),ct=new Set(["search","select","radio","checkbox"]);const lt="new_message",dt=e=>"function"==typeof e.start&&"function"==typeof e.stop,ut=e=>{dt(e)?e.start(0):e.noteOn(0)},mt=()=>{const e=new(window.AudioContext||window.webkitAudioContext);let t=!0,n=[];const i=t=>new Promise((n,i)=>{e.decodeAudioData(t,n,i)}),o=t=>({play:()=>{const n=e.createBufferSource();n.connect(e.destination),n.buffer=t;return{playback:new Promise((t,i)=>{if(n.onended=()=>t(),ut(n),"running"!==e.state){const t=Error("Playback failed, AudioContext is in incorrect state '"+e.state+"'");t.name="PlaybackError",i(t)}}),stop(){(e=>{dt(e)?e.stop(0):e.noteOff(0)})(n)}}}});return{preload:e=>(e=>new Promise((t,n)=>{const i=new XMLHttpRequest;i.onload=()=>{t(i.response)},i.onerror=n,i.open("GET",e),i.responseType="arraybuffer",i.send()}))(e).then(i).then(o),playSound:e=>{const i=e.play();return t&&n.push(i),i.playback},unlock:()=>new Promise(i=>{const o=()=>{document.removeEventListener("click",o,!0),t&&(n.forEach(e=>{e.stop()}),n=[],t=!1),e.resume(),(()=>{const t=e.createBuffer(1,1,22050),n=e.createBufferSource();n.buffer=t,n.connect(e.destination),ut(n)})(),i()};document.addEventListener("click",o,!0)})}};const pt=/\.(\w+)$/i,ft=new Audio,gt={mp3:"audio/mpeg",ogg:"audio/ogg"},ht=e=>{const t=(e=>{const t=e.match(pt);return t?t[1].toLowerCase():""})(e);return t in gt&&""!==ft.canPlayType(gt[t])},vt=e=>new Promise((t,n)=>{const i=new Audio(e);i.onloadeddata=()=>{t(i)},i.onerror=n}),_t=e=>{const t=e.play();return(n=t)&&"function"==typeof n.then?t:Promise.resolve();var n};const wt=()=>"function"==typeof window.webkitAudioContext||"function"==typeof window.AudioContext?(()=>{const e=mt(),t=ne(t=>{const n=e.preload(t);return n.catch(ie),n});return{play:n=>{const i=t(n).then(e.playSound);return i.catch(ie),i},preload:t,unlock:()=>e.unlock()}})():(()=>{const e=ne(vt);return{play:t=>e(t).then(_t),preload:e,unlock:()=>Promise.resolve()}})(),yt=e=>Object.keys(e).reduce((t,n)=>{const i=q(e=>ht(e),M(o=e[n])?o:[o]);var o;return t[n]=i,t},{});const bt=()=>{const e=(e=>{const t=wt(),n=yt(e);return{play:e=>{t.play(n[e]).then(ie,ie)},preload:e=>{t.preload(n[e]).then(ie,ie)},unlock:()=>t.unlock()}})({[lt]:["https://cdn.openwidget.com/widget/static/media/new_message.CTorF0S8.ogg","https://cdn.openwidget.com/widget/static/media/new_message.C32z5SiC.mp3"]});return st&&(window.parent.soundPlayer=e),e.unlock().then(()=>function(e,t){let n=0;return function(){const i=Date.now();e>i-n||(n=Date.now(),t.apply(void 0,arguments))}}(2e3,t=>{e.play(t)}))},xt={isBridgeActive:!1,isIframeActive:null,hasIframeUnlocked:!1},kt=e=>!!e&&/native code/.test(e+""),Ct=()=>Y(navigator.platform,["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"])&&Y("Version/15",navigator.userAgent),Et=()=>/mobile/gi.test(navigator.userAgent)&&!("MacIntel"===navigator.platform&&Y("iPad",navigator.userAgent)),It=()=>Y("Chrome",navigator.userAgent),Lt=()=>{const e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return e?parseInt(e[2],10):0},At=()=>/Firefox/.test(navigator.userAgent),Tt=(e,t)=>we(e,"visibility").state===t;function Pt(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}const zt={25:"#EDDDBF",50:"#FFFAE5",100:"#F7C56E",500:"#FFD000",700:"#7B664C",800:"#3A352C"},St={100:"#FF7C6B",500:"#D93311"},Ot={100:"#77Cf9D",500:"#268750"},Mt={100:"#FA6681",500:"#E30D34"},Dt={0:"#FFFFFF",15:"#F6F6F7",25:"#F0F0F0",50:"#F8F8F8",75:"#EDEDED",100:"#E3E3E3",200:"#D5D5D5",300:"#C0C0C0",400:"#B3B3B3",425:"#A6A4A4",450:"#949494",500:"#757575",525:"#707070",550:"#6E6E6E",600:"#575757",625:"#474747",650:"#333333",700:"#2E2E2E",800:"#252525",900:"#111111"};var Ft=Object.freeze({__proto__:null,yellow:zt,red:St,green:Ot,ruby:Mt,accent:"#2000F0",webkitOutline:"#3B99FC",grayscale:Dt,brand:{orange:"#FF5100",black:"#1B1B20"}});const Nt=e({},Ft,{border:Dt[500],borderSubtle:Dt[100],divider:Dt[100],error:St[500],errorContrast:Dt[0],errorSurface:"#FFFAFA",subtleFeedback:zt[50],subtleFeedbackContrast:Dt[900],caution:"#FFAE21",cautionDimmed:"#FFF3D6",cautionContrast:Dt[900],cautionDesaturated:zt[25],chatBackground:"#F6F6F7",success:Ot[500],successContrast:Dt[0],successSurface:Dt[0],primaryTextColor:Dt[900],secondaryTextColor:Dt[550],tertiaryTextColor:Dt[400],surface:Dt[0],surfaceVariant:Dt[25],surfaceVariantHover:"#E6E6E6",surfaceInteractive:Dt[50],surfaceInteractivePressed:Dt[600],surfaceDecorative:Dt[100],surfaceDimmed:"#E6E4E1",surfaceFade:Dt[15],hintSurface:Dt[800],floatSurface:Dt[0],pressedElement:Dt[300],notification:Mt[500],notificationContrast:Dt[0],widgetBackground:Dt[50],disabled:Dt[100],disabledContrast:Dt[600],inactiveElement:Dt[450],formIconColor:Dt[50],trademarkFooterText:Dt[600],itemHover:Dt[625],successHover:"#2FA763",inactiveElementHover:Dt[425],secondaryButtonBackground:Dt[100],secondaryButtonBackgroundHover:Dt[200],primaryTimelineSurface:Dt[0],decorations:{decorOne:"#FFDAB9",decorTwo:"#D9CCFA",decorThree:"#FACCCC",decorFour:"#F4F791",decorFive:"#F1C9FC"}}),Bt=e({},Ft,{border:Dt[600],borderSubtle:Dt[650],divider:Dt[700],error:St[100],errorContrast:Dt[900],errorSurface:"#570404",subtleFeedback:zt[800],subtleFeedbackContrast:zt[100],caution:zt[100],cautionDimmed:"#322B24",cautionContrast:Dt[900],cautionDesaturated:zt[700],chatBackground:"#1A1A1A",success:Ot[100],successContrast:Dt[900],successSurface:"#042602",primaryTextColor:Dt[0],secondaryTextColor:Dt[400],tertiaryTextColor:Dt[600],surface:Dt[800],surfaceVariant:Dt[700],surfaceVariantHover:"#333333",surfaceInteractive:Dt[700],surfaceInteractivePressed:Dt[400],surfaceDecorative:Dt[700],surfaceDimmed:"#1F1E1D",surfaceFade:Dt[700],hintSurface:Dt[550],floatSurface:Dt[700],pressedElement:Dt[600],notification:Mt[100],notificationContrast:Dt[900],widgetBackground:Dt[900],disabled:Dt[700],disabledContrast:Dt[400],inactiveElement:Dt[600],formIconColor:Dt[900],trademarkFooterText:Dt[400],itemHover:Dt[525],successHover:"#99DBB5",inactiveElementHover:Dt[800],secondaryButtonBackground:Dt[650],secondaryButtonBackgroundHover:Dt[625],primaryTimelineSurface:Dt[800],decorations:{decorOne:"#D7650F",decorTwo:"#400CC6",decorThree:"#AF3C3C",decorFour:"#ACB125",decorFive:"#831AA2"}});var jt=Object.freeze({__proto__:null,light:Nt,dark:Bt});var Ht="__test_storage_support__",qt="@@test",Wt=function(){var e=Object.create(null);return{getItem:function(t){var n=e[t];return"string"==typeof n?n:null},setItem:function(t,n){e[t]=n},removeItem:function(t){delete e[t]},clear:function(){e=Object.create(null)}}}();function Vt(e){try{return window.localStorage}catch(t){return"SecurityError"===t.name&&e?e:function(e){void 0===e&&(e="local");try{var t="session"===e?window.sessionStorage:window.localStorage;return t.setItem(Ht,qt),t.getItem(Ht)===qt&&(t.removeItem(Ht),!0)}catch(e){return!1}}()?window.localStorage:Wt}}!function(e){const t=Vt(e)}();const Rt=["all"],Gt=()=>{const t={all:o=o||new Map,on:function(e,t){var n=o.get(e);n?n.push(t):o.set(e,[t])},off:function(e,t){var n=o.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):o.set(e,[]))},emit:function(e,t){var n=o.get(e);n&&n.slice().map(function(e){e(t)}),(n=o.get("*"))&&n.slice().map(function(n){n(e,t)})}},{all:n}=t,i=Pt(t,Rt);var o;return e({},i,{off:(e,t)=>{e?i.off(e,t):n.clear()},once:(e,t)=>{i.on(e,function n(o,r){i.off(e,n),t(o,r)})}})};function Ut(e,t){let{retriesCount:n=1/0,minTime:i=100,maxTime:o=1e4}=void 0===t?{}:t;const r=(e=>{let{min:t=1e3,max:n=5e3,jitter:i=.5}=e,o=0;return{duration:()=>{let e=t*Math.pow(2,o++);if(i){const t=Math.random(),n=Math.floor(t*i*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,n)},reset:()=>{o=0}}})({min:i,max:o,jitter:0});return new Promise((t,i)=>{let o=0;const a=()=>e().then(t,()=>{n===1/0||o++t.map(t=>{switch(t.type){case"group_chooser":return e({},t,{options:t.options.map(t=>{let{group_id:n}=t;return e({},Pt(t,Xt),{groupId:n})})});case"rating":{const{comment_label:n}=t;return e({},Pt(t,Yt),{commentLabel:n})}default:return t}}),Kt=t=>{const n=t.map((t,n)=>e({},t,{id:n+""}));return Jt(n)},$t=e=>({id:e.id,fields:!("id"in e.fields[0])?Kt(e.fields):Jt(e.fields)}),Qt={};function Zt(t,n){let{query:i={},jsonpParam:o="jsonp",callbackName:r}=void 0===n?{}:n;return new Promise((n,a)=>{Ce().then(s=>{const c=document.createElement("script"),l=r||U(Qt);Qt[l]=!0;const d="__"+l;window[d]=e=>{delete Qt[l],delete window[d],Ee(c),n(e)},c.src=t+"?"+Le(e({},i,{[o]:d})),c.addEventListener("error",()=>{setTimeout(()=>a(Error("JSONP request failed.")),100)}),s.appendChild(c)})})}const en="not_ready",tn="ready",nn="bootstrapped",on=["buttons","allowed_domains","prechat_form","ticket_form","__priv","properties"],rn=["staticConfig","localization"],an=/\.([a-z]{1,})$/i,sn=e=>{let{__priv:t}=e;const n={enabled:!0,x:parseInt(t.group["embedded_chat.eye_grabber.x"])+15,y:parseInt(t.group["embedded_chat.eye_grabber.y"]),src:Ve(t.group["embedded_chat.eye_grabber.path"])};if(-1!==n.src.indexOf("/default/eyeCatchers/")){const e=n.src.match(an)[1];n.srcset={"1x":n.src,"2x":n.src.replace(RegExp("\\."+e,"i"),"-2x."+e)}}return n},cn=e=>{var t;return{"x-region":null!=(t=e.region)?t:""}},ln=(e,t)=>(e=>{let{region:t}=e;return"https://api"+(e=>"fra"===e||"eu-west3"===e?"-fra":"")(t)+".livechatinc.com"})(t)+"/v3.6/customer/action/"+e,dn=function(t,n){let{validateDefaultWidget:i=!0}=void 0===n?{}:n;return Zt(ln("get_dynamic_configuration",t),{query:e({},cn(t),t.organizationId?{organization_id:t.organizationId}:{},t.licenseId?{license_id:t.licenseId}:{},{client_id:null!="c5e4f61e1a6c3b1521b541bc5c5a2ac5"?"c5e4f61e1a6c3b1521b541bc5c5a2ac5":"",url:We(t.url,["cw_configurator","dev_language","dev_enable_textapp","dev_theme_variant","dev_theme_name","dev_minimized_type","dev_screen_position","dev_offset_x","dev_offset_y","dev_show_logo","dev_show_avatar","dev_sounds_enabled","dev_rating_enabled","dev_transcript_enabled","dev_company_logo_url","dev_agent_avatar_url"])},"number"==typeof t.groupId&&{group_id:t.groupId},t.channelType&&{channel_type:t.channelType},t.skipCodeInstallationTracking&&{test:1},t.productName&&{origin:t.productName},t.integrationName&&{implementation_type:t.integrationName})}).then(n=>{if(n.error)switch(n.error.type){case"misdirected_request":return dn(e({},t,{region:n.error.data.region}));case"license_not_found":{if("direct_link"===t.channelType){const e=Le({utm_source:"expired_chat_link",utm_medium:"referral",utm_campaign:"lc_"+t.licenseId});window.location.replace("https://www.livechat.com/expired-chat-link/?"+e)}const e=Error("License not found");throw e.code="LICENSE_NOT_FOUND",e}default:{const e=Error(n.error.message);throw e.code=n.error.type.toUpperCase(),e}}if(19196658!==t.licenseId&&"4c8c0751-837f-4a11-928e-047b2d095307"!==t.organizationId||(n.default_widget="livechat"),i&&"livechat"!==n.default_widget){const e=Error("The 'default_widget' is not 'livechat', but instead: '"+n.default_widget+"'");throw e.code="DEFAULT_WIDGET_NOT_LIVECHAT",e.organizationId=n.organization_id,e.defaultWidget=n.default_widget,e}if(!n.livechat_active){if("direct_link"===t.channelType){const e=Le({utm_source:"expired_chat_link",utm_medium:"referral",utm_campaign:"lc_"+t.licenseId});window.location.replace("https://www.livechat.com/expired-chat-link/?"+e)}const e=Error("License expired");throw e.code="LICENSE_EXPIRED",e}if(!n.livechat.domain_allowed){const e=Error("Current domain is not added to the allowlist.");throw e.code="DOMAIN_NOT_ALLOWED",e}return{organizationId:(o=n).organization_id,groupId:o.livechat.group_id,clientLimitExceeded:o.livechat.client_limit_exceeded,configVersion:o.livechat.config_version,localizationVersion:o.livechat.localization_version,onlineGroupIds:o.livechat.online_group_ids||[],region:t.region||null,language:o.livechat.language};var o})},un=e=>{var t,n;const i="feade1d6c3f17748ae4c8d917a1e1068",o=!!(null==(t=e.properties.group[i])?void 0:t.forwardTicketFormToHelpdesk),r=null==(n=e.properties.license[i])?void 0:n.hdLicenseID;return"number"==typeof r&&r>-1&&(o||"1"===e.__priv.license["helpdesk.inbound_forwarding"])},mn=(e,t)=>t.includes(e)?e:t[0],pn=(e,t)=>e,fn=t=>{const{buttons:n,allowed_domains:i,prechat_form:o,ticket_form:r,__priv:a,properties:s}=t,c=Pt(t,on),l=a.group,d=pn("boolean"==typeof a.enable_textapp?a.enable_textapp:void 0),u=pn(mn(l["chat_window.new_theme.name"],["smooth","modern"])),m=pn(mn(l["chat_window.new_theme.variant"],["light","dark"])),p=l["chat_window.new_theme.background_color"],f=pn(mn(l["chat_window.theme.minimized"],["circle","bar"])),g=pn("1"===l["chat_window.display_avatar"]),h=pn("0"===l["chat_window.disable_sounds"]),v=pn("1"===l["rate_me.enabled"]),_=pn("1"===l["chat_window.display_transcript_button"]),w=pn("1"===l["chat_window.display_logo"]),y=pn(l["chat_window.logo_path"]),b=pn(l.language),x=pn(mn(l["chat_window.screen_position"],["right","left"])),k=pn(parseInt(l["chat_window.offset_x"])),C=pn(parseInt(l["chat_window.offset_y"])),E="0"===a.group.tickets_enabled,I=!!!a.disable_native_tickets&&!!r,L=un(t),A=E||L||I;return e({},c,o&&{prechatForm:$t(o)},A&&r&&{ticketForm:$t(r)},{properties:s,buttons:n.map(e=>"image"===e.type?{id:e.id,type:e.type,onlineValue:Ve(e.online_value),offlineValue:Ve(e.offline_value)}:{id:e.id,type:e.type,onlineValue:e.online_value,offlineValue:e.offline_value})},i&&{allowedDomains:i},{__unsafeProperties:e({},a.s&&{s:!0},"boolean"==typeof d?{enableTextApp:d}:{},{group:{chatBoosters:a.group.chat_boosters,disabledMinimized:"1"===a.group["chat_window.disable_minimized"],disabledMinimizedOnMobile:"1"===a.group["chat_window.mobile_disable_minimized"],disabledOnMobile:"1"===a.group["chat_window.hide_on_mobile"],eyeCatcher:"1"===a.group["embedded_chat.display_eye_catcher"]?sn(t):{enabled:!1},hasAgentAvatarsEnabled:g,hasCustomMobileSettings:"1"===a.group["chat_window.custom_mobile_settings"],hasHiddenTrademark:"1"===a.group["chat_window.hide_trademark"],hasSoundsEnabled:h,initiallyHidden:"1"===a.group["chat_window.hide_on_init"]||"1"===a.group["chat_window.disable_minimized"],initiallyHiddenOnMobile:"1"===a.group["chat_window.mobile_hide_on_init"]||"1"===a.group["chat_window.mobile_disable_minimized"],hideOnInit:"1"===a.group["chat_window.hide_on_init"],language:b,linksUnfurlingEnabled:"1"===a.group.links_unfurling,privacyPolicy:{enabled:"1"===a.group["privacy_policy.enabled"],text:a.group["privacy_policy.text"]},logo:w?{enabled:!0,src:y}:{enabled:!1},minimizedType:f,minimizedTypeOnMobile:a.group["chat_window.mobile_minimized_theme"],offlineMessagesEnabled:E,offsetX:k,offsetXOnMobile:parseInt(a.group["chat_window.mobile_offset_x"]),offsetY:C,offsetYOnMobile:parseInt(a.group["chat_window.mobile_offset_y"]),prechatFormAfterGreetingEnabled:"1"===a.group.pre_chat_survey_after_greeting,ratingEnabled:v,screenPosition:x,screenPositionOnMobile:mn(a.group["chat_window.mobile_screen_position"],["right","left"]),transcriptButtonEnabled:_,theme:{name:u,variant:m,customJson:a.group["chat_window.new_theme.custom_json"],agentbarBackgroundColor:a.group["chat_window.new_theme.agentbar_background_color"],agentbarText:a.group["chat_window.new_theme.agentbar_text"],agentMessageColorBackground:a.group["chat_window.new_theme.agent_message_color_background"],agentMessageColorText:a.group["chat_window.new_theme.agent_message_color_text"],backgroundColor:p,ctaColor:a.group["chat_window.new_theme.cta_color"],minimizedColorBackground:a.group["chat_window.new_theme.minimized_color_background"],minimizedColorIcon:a.group["chat_window.new_theme.minimized_color_icon"],minimizedColorText:a.group["chat_window.new_theme.minimized_color_text"],systemMessageColor:a.group["chat_window.new_theme.system_message_color"],titlebarBackgroundColor:a.group["chat_window.new_theme.titlebar_background_color"],titlebarText:a.group["chat_window.new_theme.titlebar_text"],visitorMessageColorBackground:a.group["chat_window.new_theme.visitor_message_color_background"],visitorMessageColorText:a.group["chat_window.new_theme.visitor_message_color_text"]}},license:{creditCardMaskingEnabled:"1"===a.license.mask_credit_cards,nonProfit:"1"===a.license.non_profit,licenseinboundForwardingToHelpdeskEnabled:"1"===a.license["helpdesk.inbound_forwarding"]},helpdeskIntegrationEnabled:L,ticketFormMode:(T=t,un(T)?"helpdesk":"0"===T.__priv.group.tickets_enabled?"offline_message":"livechat")})});var T},gn=(t,n,i,o,r)=>{const a="https://api.openwidget.com/v1.0/configuration/"+t;return Ut(()=>Zt(a,{callbackName:"ow_config",query:e({},n&&{integration_name:n},i&&{tid:i},o&&{test:!0},r&&{url:r})}).then(n=>{let{staticConfig:i,localization:o}=n;return e({},Pt(n,rn),fn(i),{localization:Z(e=>e.toLowerCase(),o),organizationId:t})}),{minTime:500,maxTime:5e3,retriesCount:20})},hn=e=>{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},vn="data-lc-focus",_n="data-lc-event",wn="data-lc-prop",yn="data-lc-action",bn="data-lc-action-value",xn="data-lc-action-success";let kn=ie;function Cn(t,n,i,o){var r;const a=i.contentDocument,s=null!=(r=o.state.application.language)?r:"en";if(null===a)throw Error("Parameter `frame` needs to be inserted into any document before rendering");It()?(a.documentElement.lang=s,a.head.innerHTML=t,a.body.innerHTML=n):(a.open(),a.write('\n\t\t\t\n\t\t\t\n\t\t\t\t'+t+"\n\t\t\t\t"+n+"\n\t\t\t\n\t\t"),a.close());const c=a.documentElement,l=ce(c.querySelectorAll("["+_n+"]"));for(const t of l){const n=t.getAttribute(_n);if("string"==typeof n)for(const i of n.split(";")){const[n,r]=i.split(":");n&&r&&(t.removeAttribute(_n),t.addEventListener(n,i=>{i.stopPropagation();const a=i.currentTarget,s=i.target,c=e({type:i.type,bubbles:!0,isTrusted:i.isTrusted,cancelBubble:i.cancelBubble,cancelable:i.cancelable,composed:i.composed,defaultPrevented:i.defaultPrevented,eventPhase:i.eventPhase,timeStamp:i.timeStamp},"clientX"in i&&{clientX:i.clientX,clientY:i.clientY},{currentTarget:e({value:null==a?void 0:a.value,checked:null==a?void 0:a.checked,disabled:null==a?void 0:a.disabled,draggable:null==a?void 0:a.draggable,hidden:null==a?void 0:a.hidden,naturalWidth:null==a?void 0:a.naturalWidth,naturalHeight:null==a?void 0:a.naturalHeight,clientWidth:null==a?void 0:a.clientWidth,clientHeight:null==a?void 0:a.clientHeight},"function"==typeof(null==a?void 0:a.getBoundingClientRect)&&{boundingClientRect:a.getBoundingClientRect().toJSON()}),target:{value:null==s?void 0:s.value,checked:null==s?void 0:s.checked,disabled:null==s?void 0:s.disabled,draggable:null==s?void 0:s.draggable,hidden:null==s?void 0:s.hidden}});if("click"===n&&"copy"===t.getAttribute(yn))return l=t.getAttribute(bn),navigator.clipboard?navigator.clipboard.writeText(l).catch(hn):hn(l),void(t.innerHTML=t.getAttribute(xn));var l;o.call("crossFrameEvent",r,JSON.stringify(c))}))}}const d=c.querySelector("["+vn+"]");if(d&&(d.removeAttribute(vn),d.focus(),"INPUT"===d.nodeName)){d.setSelectionRange(d.value.length,d.value.length)}const u=[],m=ce(c.querySelectorAll("["+wn+"]"));for(const e of m){const t=e.getAttribute(wn);if("string"!=typeof t)continue;e.removeAttribute(wn);const[n,i]=t.split(":");u.push(t=>{var o;let r=null==(o=t.views)||null==(o=o.minimized)?void 0:o[i.replace("!","")];"string"==typeof r&&(r=r.trim()),"disabled"===n&&(r=i.includes("!")?!r:!!r),"boolean"==typeof r?e.toggleAttribute(n,r):r?e.setAttribute(n,r):e.removeAttribute(n)})}u.forEach(e=>e(o.state)),o.off("state_diff",kn),kn=e=>{var t;null!=e&&null!=(t=e.views)&&t.minimized&&u.forEach(t=>t(e))},o.on("state_diff",kn)}const En=e=>{let{allowAutoplay:t,allowVideoConferencing:n,allowClipboardWrite:i,allowDisplayCapture:o}=e,r=["clipboard-read; clipboard-write;"];if(t&&!At()&&r.push("autoplay;"),o&&r.push("display-capture *;"),n){const e={"display-capture *;":!It()||Lt()>=94,"picture-in-picture *;":"PictureInPictureEvent"in window,"fullscreen *;":"function"==typeof Element.prototype.requestFullscreen};r=[].concat(r,["microphone *;","camera *;"],Object.keys((a=Boolean,F(s=e).reduce((e,t)=>(a(s[t])&&(e[t]=s[t]),e),{}))))}var a,s;return i&&!At()&&r.push("clipboard-write *;"),r.join(" ")},In=e=>e.replace(/\?+$/,""),Ln="cubic-bezier(0.25, 1, 0.5, 1)",An="width 300ms "+Ln+", height 300ms "+Ln,Tn=st?100:2e3;let Pn=null;const zn=()=>{if(Pn)throw Error("Title notification service already initialized");Pn=(()=>{try{let e,t=document.title,n=null;const i=document.querySelector("title");return i&&new MutationObserver(e=>{const i=e[0].target.textContent;i&&![t,n].includes(i)&&(t=i)}).observe(i,{subtree:!0,characterData:!0,childList:!0}),{setTitleNotification:i=>{i!==n&&(n=i,t=document.title,document.title=n,clearInterval(e),e=window.setInterval(()=>{document.title=document.title===t&&n?n:t},Tn))},clearTitleNotification:()=>{document.title=t,clearInterval(e),n=null},getOriginalPageTitle:()=>t}}catch(e){return console.error("Error while creating title notification service",e),null}})()},Sn=()=>{if(!Pn)throw Error("Title notification service not initialized");return Pn},On=e=>{var t,n;const i=["http:","https:"];return!i.includes(null!=(t=qe(e))?t:"")&&i.includes(null!=(n=qe(document.referrer))?n:"")?document.referrer:e},Mn=()=>({title:Pn?Pn.getOriginalPageTitle():document.title,url:In(On(document.location+"")),referrer:document.referrer}),Dn=e=>{d(function(e,n){return t(t=>{const i=new MutationObserver(t);return i.observe(e,n),()=>{i.disconnect()}})}(document.body,{childList:!0,subtree:!0}),m(Mn),o((e,t)=>e.url===t.url),E(l(e,"unbind")),a(t=>{e.call("storeMethod",["setApplicationState",{page:t}])}))},Fn="lightbox-images-container",Nn=function(e,t,n,i){var o;void 0===i&&(i=!1);const r=e.indexOf(t);if(-1===r)return null;let a;return a="previous"===n?i?(r-1+e.length)%e.length:r-1:i?(r+1)%e.length:r+1,null!=(o=e[a])?o:null};var Bn="application/x-postmate-v1+json",jn=0,Hn={handshake:1,"handshake-reply":1,call:1,emit:1,reply:1,request:1},qn=function(e,t){return("string"!=typeof t||e.origin===t)&&(!!e.data&&("object"==typeof e.data&&("postmate"in e.data&&(e.data.type===Bn&&!!Hn[e.data.postmate]))))},Wn=function(){function e(e){var t=this;this.parent=e.parent,this.frame=e.frame,this.child=e.child,this.childOrigin=e.childOrigin,this.events={},this.listener=function(e){if(!qn(e,t.childOrigin))return!1;var n=((e||{}).data||{}).value||{},i=n.name;"emit"===e.data.postmate&&i in t.events&&t.events[i].call(t,n.data)},this.parent.addEventListener("message",this.listener,!1)}var t=e.prototype;return t.get=function(e){var t=this;return new Rn.Promise(function(n){var i=++jn,o=function(e){e.data.uid===i&&"reply"===e.data.postmate&&(t.parent.removeEventListener("message",o,!1),n(e.data.value))};t.parent.addEventListener("message",o,!1),t.child.postMessage({postmate:"request",type:Bn,property:e,uid:i},t.childOrigin)})},t.call=function(e,t){this.child.postMessage({postmate:"call",type:Bn,property:e,data:t},this.childOrigin)},t.on=function(e,t){this.events[e]=t},t.destroy=function(){window.removeEventListener("message",this.listener,!1),this.frame.parentNode.removeChild(this.frame)},e}(),Vn=function(){function e(e){var t=this;this.model=e.model,this.parent=e.parent,this.parentOrigin=e.parentOrigin,this.child=e.child,this.child.addEventListener("message",function(e){if(qn(e,t.parentOrigin)){var n=e.data,i=n.property,o=n.uid,r=n.data;"call"!==e.data.postmate?function(e,t){var n="function"==typeof e[t]?e[t]():e[t];return Rn.Promise.resolve(n)}(t.model,i).then(function(t){return e.source.postMessage({property:i,postmate:"reply",type:Bn,uid:o,value:t},e.origin)}):i in t.model&&"function"==typeof t.model[i]&&t.model[i].call(t,r)}})}return e.prototype.emit=function(e,t){this.parent.postMessage({postmate:"emit",type:Bn,value:{name:e,data:t}},this.parentOrigin)},e}(),Rn=function(){function e(e){var t=e.container,n=void 0===t?void 0!==n?n:document.body:t,i=e.model,o=e.url,r=e.iframeAllowedProperties;return this.parent=window,this.frame=document.createElement("iframe"),r&&(this.frame.allow=r),n.appendChild(this.frame),this.child=this.frame.contentWindow||this.frame.contentDocument.parentWindow,this.model=i||{},this.sendHandshake(o)}return e.prototype.sendHandshake=function(t){var n,i=this,o=function(e){var t=document.createElement("a");t.href=e;var n=t.protocol.length>4?t.protocol:window.location.protocol,i=t.host.length?"80"===t.port||"443"===t.port?t.hostname:t.host:window.location.host;return t.origin||n+"//"+i}(t),r=0;return new e.Promise(function(e,a){var s=function(t){return!!qn(t,o)&&("handshake-reply"===t.data.postmate?(clearInterval(n),i.parent.removeEventListener("message",s,!1),i.childOrigin=t.origin,e(new Wn(i))):a("Failed handshake"))};i.parent.addEventListener("message",s,!1);var c=function(){r++,i.child.postMessage({postmate:"handshake",type:Bn,model:i.model},o),5===r&&clearInterval(n)},l=function(){c(),n=setInterval(c,500)};i.frame.attachEvent?i.frame.attachEvent("onload",l):i.frame.addEventListener("load",l),i.frame.src=t})},e}();Rn.debug=!1,Rn.Promise=function(){try{return window?window.Promise:Promise}catch(e){return null}}(),Rn.Model=function(){function e(e){return this.child=window,this.model=e,this.parent=this.child.parent,this.sendHandshakeReply()}return e.prototype.sendHandshakeReply=function(){var e=this;return new Rn.Promise(function(t,n){var i=function(o){if(o.data.postmate){if("handshake"===o.data.postmate){e.child.removeEventListener("message",i,!1),o.source.postMessage({postmate:"handshake-reply",type:Bn},o.origin),e.parentOrigin=o.origin;var r=o.data.model;return r&&Object.keys(r).forEach(function(t){e.model[t]=r[t]}),t(new Vn(e))}return n("Handshake Reply Failed")}};e.child.addEventListener("message",i,!1)})},e}();const Gn=["methods"];Rn.Promise=Promise;let Un=function(e){let{methods:t}=e,n=Pt(e,Gn);return new Rn(n).then(e=>{const n=e.on,i=e.call,o=function(){for(var t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return i.apply(e,n)},r=Gt(),a={},s={};return t.resolveRemoteCall=e=>{let{id:t,value:n}=e;const i=s[t];delete s[t],i(n)},e.on=(t,i)=>{r.on(t,i),a[t]||(a[t]=!0,function(){for(var t=arguments.length,i=Array(t),o=0;t>o;o++)i[o]=arguments[o];n.apply(e,i)}(t,e=>{r.emit(t,e)}))},e.off=r.off,e.on("remote-call",n=>{let{id:i,method:r,args:a}=n;const s="function"==typeof t[r]?t[r].apply(e,a):void 0;s&&"function"==typeof s.then?s.then(e=>{o("resolveRemoteCall",{id:i,value:e})}):o("resolveRemoteCall",{id:i,value:s})}),e.emit=(e,t)=>{o("emitEvent",{event:e,data:t})},e._emit=r.emit,e.call=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return new Promise(t=>{const i=U(s);s[i]=t,o("remoteCall",{id:i,method:e,args:n})})},O(e,t)})};const Xn=window.Wix;var Yn=()=>new Promise(e=>{Xn.getSiteInfo(t=>{let n=t.url;const i=t.referrer||t.referer||"";t.baseUrl&&-1===n.indexOf(t.baseUrl)&&(n=t.baseUrl);e({title:t.pageTitle,referrer:i,url:n})})});const Jn=Promise.resolve(),Kn=e=>{Jn.then(e)},$n=e=>Kn(()=>{throw e});function Qn(e,t){return n((i=()=>d(l(e,"state_diff"),m(()=>e.state),u(e.state),m(t),o(ae),E(l(e,"unbind"))),(e,t)=>{if(0===e){let e=!1;t(0,t=>{2===t&&(e=!0)}),t(1,i()),e||t(2)}}));var i}const Zn=(e,t)=>d(Qn(e,t),b(1));function ei(e){return d(Qn(e,e=>we(e,"availability")),r($))}const ti="liveChatChatId";function ni(e){return d(Qn(e,e=>pe(e,ti).active),b(1),p(t=>t?d(Qn(e,e=>pe(e,ti).properties.currentAgent),r(Boolean),m(()=>t),k(1)):h(t)))}function ii(e,t){return d(l(e,"state_diff"),m(()=>we(e.state,"readyState")),r(e=>e===t),k(1),y)}function oi(e,t){return d(ii(e,tn),p(t))}function ri(e,t){return d(ii(e,nn),p(t))}function ai(e,t){return d(Qn(e,e=>we(e,"invitation")),m(e=>e[t]),r($),v,r(e=>{let[t,n]=e;return n.length>t.length}),m(e=>{let[,t]=e;return Q(t)}))}const si=()=>window.GoogleAnalyticsObject||"ga",ci=e=>{let{event:t,label:n,nonInteraction:i,trackerName:o}=e;const r=window[si()];r&&"function"==typeof r&&r([o,"send"].filter(Boolean).join("."),{hitType:"event",eventCategory:"LiveChat",eventAction:t,eventLabel:n,nonInteraction:i})},li={ga:ci,gaAll:t=>{const n=window[si()];if(!n||"function"!=typeof n.getAll)return;const i=n.getAll();M(i)&&i.forEach(n=>{ci(e({},t,{trackerName:n&&"function"==typeof n.get?n.get("name"):null}))})},gaq:e=>{let{event:t,label:n,nonInteraction:i}=e;const o=window._gaq;o&&"function"==typeof o.push&&o.push(["_trackEvent","LiveChat",t,n,null,i])},gtm:e=>{let{event:t,label:n,nonInteraction:i}=e;const o=window.dataLayer;o&&"function"==typeof o.push&&o.push({event:"LiveChat",eventCategory:"LiveChat",eventAction:t,eventLabel:n,nonInteraction:i})},pageTracker:e=>{let{event:t,label:n,nonInteraction:i}=e;const o=window.pageTracker;o&&"function"==typeof o._trackEvent&&o._trackEvent("LiveChat",t,n,null,i)},urchinTracker:e=>{let{event:t}=e;const n=window.urchinTracker;n&&"function"==typeof n&&n(t)},gtag:e=>{let{event:t,label:n,nonInteraction:i}=e;const o=window.gtag;o&&"function"==typeof o&&o("event",t,{event_category:"LiveChat",event_label:n,non_interaction:i})}},di=e=>{let{version:t,omitGtm:n,sendToAll:i}=e;if(t&&"function"==typeof li[t])return i&&"ga"===t?"gaAll":t;if("object"==typeof window.pageTracker&&"function"==typeof window.pageTracker._trackEvent)return"pageTracker";if("function"==typeof window.urchinTracker)return"urchinTracker";if("function"==typeof window.gtag)return"gtag";if(!n&&"object"==typeof window.dataLayer&&"function"==typeof window.dataLayer.push)return"gtm";if("object"==typeof window._gaq)return"gaq";if(window.GoogleAnalyticsObject&&"string"==typeof window.GoogleAnalyticsObject)return i?"gaAll":"ga";if("function"==typeof window.ga){let e=!1;if(window.ga(t=>{e="object"==typeof t}),e)return i?"gaAll":"ga"}return null},ui={Chat:"LiveChat Chat started","Automated greeting":"LiveChat Automated greeting displayed","Ticket form":"LiveChat Ticket form displayed","Ticket form filled in":"LiveChat Ticket form filled in","Pre-chat survey":"LiveChat Pre-chat survey displayed","Pre-chat survey filled in":"LiveChat Pre-chat survey filled in","Post-chat survey":"LiveChat Post-chat survey displayed","Post-chat survey filled in":"LiveChat Post-chat survey filled in"},mi=()=>window.mixpanel&&"function"==typeof window.mixpanel.track&&"function"==typeof window.mixpanel.register,pi={googleAnalytics:e=>{let{trackerName:t}=e;return t?li[t]:null},kissmetrics:()=>null,mixpanel:()=>{if(!mi())return null;return e=>{let{event:t,eventData:n,persistentData:i}=e;if(!mi())return;const{mixpanel:o}=window;i&&(o.register(i),!mi())||t in ui&&o.track(ui[t],n)}}};var fi=(t,n)=>{let{analytics:i}=n;const o=Object.keys(i).filter(e=>i[e].enabled).map(e=>{const t=i[e],n=pi[e];try{return n(t)}catch(e){return $n(e),null}}).filter(Boolean);if(0===o.length)return;const s=function(n,i){let{group:r=we(t.state,"group"),nonInteraction:a=!1,eventData:s={},persistentData:c=null,useDataAsLabel:l=!1}=void 0===i?{}:i;const d=0!==r?"Group ID: "+r:"(no group)",u=l?le(s).map(e=>{let[t,n]=e;return t+": "+n}).join(", "):d;o.forEach(t=>{try{t({event:n,nonInteraction:a,label:u,eventData:e({},s,{group:d}),persistentData:c})}catch(e){$n(e)}})};d(Qn(t,e=>we(e,"readyState")),r(e=>e===tn),k(1),p(()=>ni(t)),r(Boolean),a(()=>{const{email:e,name:n}=ge(t.state);s("Chat",{eventData:{email:e,name:n},persistentData:{"performed chat":!0}})})),t.on("add_event",e=>{let{event:{properties:t}}=e;t.invitation&&t.receivedFirstTime&&s("Automated greeting",{nonInteraction:!0})}),t.on("on_chat_booster_launched",e=>{let{id:t,title:n}=e;s("Chat Booster Launched: "+n,{eventData:{appId:t,title:n}})}),t.on("on_prechat_survey_submitted",()=>{s("Pre-chat survey filled in")}),t.on("on_postchat_survey_submitted",()=>{s("Post-chat survey filled in")}),t.on("on_ticket_created",e=>{let{visitor_email:t}=e;s("Ticket form filled in",{eventData:{email:t}})}),t.on("rich_greeting_button_clicked",e=>{let{button:t,event:n}=e;s("Rich greeting button clicked",{eventData:{buttonText:t.text,greetingId:n.properties.id},useDataAsLabel:!0})}),["prechat","postchat","ticket","offline"].forEach(e=>{var n;d(c(l(t,"set_default_view"),l(t,"set_current_view")),r(t=>t.viewInfo&&"Chat"===t.viewInfo.view&&t.viewInfo.default===e),E(l(t,"unbind")),(n=()=>{const[n,i]={prechat:["on_prechat_survey_submitted","Pre-chat survey"],postchat:["on_postchat_survey_submitted","Post-chat survey"],ticket:["on_ticket_created","Ticket form"],offline:["on_ticket_created","Ticket form"]}[e];return d(function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return(e,n)=>{if(0!==e)return;const i=t.length;if(0===i)return n(0,()=>{}),void n(2);let o,r=0;const a=(e,t)=>{o(e,t)};!function e(){r!==i?t[r](0,(t,i)=>{0===t?(o=i,0===r?n(0,a):o(1)):2===t&&i?n(2,i):2===t?(r++,e()):n(t,i)}):n(2)}()}}(h(i),g),(o=d(Qn(t,e=>Tt(e,"maximized")),r(Boolean)),c=void 0===(s=(void 0===a?{}:a).size)?100:s,function(e){return function(t,n){var i=[];if(0===t){var r,a,s=!1;e(0,function(e,t){if(0===e&&(r=t,o(0,function(e,t){if(0===e)(a=t)(1);else if(1===e){s=!0,a(2);var o=i.slice();i.length=0,o.forEach(function(e){return n(1,e)})}})),1===e)return s?void n(1,t):(i.push(t),i.length>c&&i.shift(),void r(1));n(e,t)})}}}),E(l(t,n)));var o,a,s,c},function(e){return function(t,i){if(0===t){var o,r=null,a=function(e,t){if(0!==e)return 1===e?(i(1,t),void r(1)):void(2===e&&(r=null));(r=t)(1)},s=function(e,t){2===e&&null!==r&&r(2,t),o(e,t)};e(0,function(e,t){if(0===e)return o=t,void i(0,s);if(1!==e){if(2===e){if(i(2,t),null===r)return;r(2,t)}}else{if(null!==r)return;n(t)(0,a)}})}}}),a(e=>{s(e)}))})};const gi=e=>{let{actingAsDirectLink:t,isInCustomContainer:n}=e;return t||n},hi=()=>{const e="lc_get_time_"+G();window.performance&&"function"==typeof window.performance.mark&&window.performance.mark(e);const[{startTime:t}]=performance.getEntriesByName(e);return performance.clearMarks(e),t},vi=()=>{if("undefined"==typeof PerformanceObserver)return null;const e=hi(),t=[],n=new PerformanceObserver(e=>{t.push.apply(t,e.getEntries())});n.observe({entryTypes:["longtask"]});const i=()=>{const n=Q(t);return n?(i=n,hi()-i.startTime+i.duration):hi()-e;var i};return{disconnect:()=>n.disconnect(),getLongTasks:()=>[].concat(t),waitForIdle:e=>new Promise(o=>{const r=()=>{t.push.apply(t,n.takeRecords());const a=i();e>a?setTimeout(r,Math.ceil(e-a)):o()};r()})}},_i=function(e){void 0===e&&(e="first-contentful-paint");const t=vi();return t?(n=e,new Promise(e=>{const t=performance.getEntriesByName(n);if(!J(t))return void e(t[0]);if("undefined"==typeof PerformanceObserver)return void e(null);const i=setTimeout(()=>{o.disconnect(),e(null)},6e4),o=new PerformanceObserver(t=>{const r=q(e=>e.name===n,t.getEntries());r&&(o.disconnect(),clearTimeout(i),e(r))});o.observe({entryTypes:["paint"]})})).then(e=>e?t.waitForIdle(5e3).then(()=>(t.disconnect(),t.getLongTasks())):null):Promise.resolve(null);var n},wi=e=>{const t=performance.getEntriesByName(e);return 1!==t.length?null:t[0]},yi=(e,t)=>e&&t?Math.abs(t.startTime-e.startTime):null,bi=e=>{if(!e)return null;const t=performance.getEntriesByType("navigation");return e.startTime-(J(t)?performance.timing.domContentLoadedEventStart-performance.timing.navigationStart:t[0].domContentLoadedEventStart)},xi=()=>{if(Math.floor(1e3*Math.random()))return;const e=_i().then(e=>e?se(e.filter(e=>Y(".livechatinc.com",e.attribution[0].containerSrc)).map(e=>e.duration)):null);return{getLogs:()=>e.then(e=>{const t=(()=>{const e=performance.getEntriesByType("resource").filter(e=>/livechatinc\.com\/(.+\/)?tracking.js/.test(e.name));return 1!==e.length?null:e[0]})(),n=wi("lc_bridge_init"),i=wi("lc_bridge_ready");return N(e=>e&&Number(e.toFixed(2)),{timeFromTrackingStart:yi(t,i),timeFromBridgeInit:yi(n,i),timeFromDomContentLoaded:bi(i),totalBlockingTimeContributedToOurScript:e})})}},ki=e=>{e.innerHTML=""};var Ci=(e,t)=>{const n=document.querySelectorAll(".livechat_button"),i=Y(t.groupId,t.onlineGroupIds||[]);[].forEach.call(n,n=>{const o=n.getAttribute("data-id"),r=q(e=>e.id===o,t.buttons);if(!r)return;const a=X("#","0.href",n);"image"===r.type?((e,t)=>{let{text:n,url:i,src:o}=e;ki(t);const r=Ie("a",{href:i}),a=Ie("img",{src:o,alt:n,title:n});r.appendChild(a),t.appendChild(r)})({url:a,text:n.textContent,src:i?r.onlineValue:r.offlineValue},n):((e,t)=>{let{text:n,url:i}=e;ki(t);const o=Ie("a",{href:i});o.appendChild(document.createTextNode(n)),t.appendChild(o)})({url:a,text:i?r.onlineValue:r.offlineValue},n),n.children[0].addEventListener("click",t=>{t.preventDefault(),e.maximize()})})};const Ei=function(e,t){return void 0===t&&(t=!1),t&&e.__unsafeProperties.group.hasCustomMobileSettings},Ii=(e,t)=>{const n=e.__unsafeProperties.group;return Ei(e,t)?n.screenPositionOnMobile:n.screenPosition},Li=(e,t)=>{const n=e.__unsafeProperties.group;return Ei(e,t)?{x:n.offsetXOnMobile,y:n.offsetYOnMobile}:{x:n.offsetX,y:n.offsetY}},Ai=(e,t)=>Object.keys(e.properties.license).some(n=>e.properties.license[n][t]),Ti=(e,t,n)=>{const i=document.createElement("div");i.id="loader",i.style.border="4px solid "+("light"===n.theme.variant?"rgba(0, 0, 0, 0.1)":"rgba(255, 255, 255, 0.1)"),i.style.borderTop="4px solid "+n.theme.colors.cta,t.document.body.append(i);const o=document.createElement("iframe");o.src=e,o.allow=En({allowAutoplay:!0,allowVideoConferencing:Ai(n,"microphone"),allowClipboardWrite:Ai(n,"clipboard_write"),allowDisplayCapture:!0}),o.addEventListener("load",()=>{i.remove()}),t.document.body.append(o),t.resizeTo(360,682)},Pi=(t,n)=>{let i=null,o=we(n.state).pipConsent;const r=Le(j(e({},t.organizationId?{organization_id:t.organizationId}:{},t.license?{license_id:t.license}:{},{group:t.group,unique_groups:Number(t.uniqueGroups),pip_mode:1}))),a=t.iframeAddress+"?"+r;function s(e){Math.random()>.001||n.call("logInfo",e)}const c=new BroadcastChannel(t.organizationId+(t.uniqueGroups&&"number"==typeof t.group?":"+t.group:"")+":detached_widget_visibility_broadcast_channel"),l=H(300,async function(){if(o=await n.call("getPipConsent",t),!document.hidden||"deny"===o||"dismissed"===o||!d)return d=!0,void(i&&i.close());const e=pe(n.state,"liveChatChatId").active,r="maximized"===we(n.state).visibility.state;if(!e||!r)return;const c=window.documentPictureInPicture.window;if(c)return void c.focus();const l={width:360,height:"allow"===o?682:300,preferInitialWindowPlacement:!0};"allow"===o&&(l.preferInitialWindowPlacement=!1);window.documentPictureInPicture.requestWindow(l).then(e=>{i=e;const t=e.document.createElement("style");t.textContent="\n body {\n\t\tfont-family: system-ui, sans-serif;\n\t\t-webkit-font-smoothing: antialiased;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\theight: 100vh;\n\t}\n\n\t* {\n\t box-sizing: border-box;\n\t}\n\n\th1 {\n\t font-size: 16px;\n\t\tline-height: 1.4;\n\t\tmargin: 0;\n\t}\n\n\tp {\n\t font-size: 14px;\n\t\tline-height: 1.1;\n\t\tmargin: 16px 0 32px;\n\t}\n\n\t#container {\n\t display: grid;\n\t\tplace-content: center;\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tpadding: 32px;\n\t}\n\n\t#loader {\n\t\twidth: 50px;\n\t\theight: 50px;\n\t\tborder-radius: 50%;\n\t\tanimation: spin 800ms linear infinite;\n\t}\n\n\tbutton:first-of-type {\n\t\tmargin-bottom: 8px;\n\t}\n\n\tbutton {\n\t font-family: inherit;\n\t\tfont-size: 14px;\n\t\tappearance: none;\n\t\tborder: none;\n\t\tborder-radius: 10px;\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\ttext-align: center;\n\t\tfont-weight: bold;\n\t\tpadding: 16px;\n\t\tcursor: pointer;\n\t\ttransition: filter 0.2s ease;\n\t}\n\n\tbutton:hover {\n\t filter: brightness(90%);\n\t}\n\n\tiframe {\n\t position: fixed;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tborder: none;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t@keyframes spin {\n\t\t0% { transform: rotate(0deg); }\n\t\t100% { transform: rotate(360deg); }\n\t}\n",e.document.head.append(t);const{config:r,rtl:c}=we(n.state);e.document.body.style.backgroundColor=jt[r.theme.variant].widgetBackground,e.document.body.style.color=jt[r.theme.variant].primaryTextColor,i.addEventListener("pagehide",()=>{document.hidden&&"allow"===o&&(o="dismissed",n.call("setPipConsent",null))}),o||((e,t,n,i,o,r)=>{const a=e.document.createElement("div");a.id="container",a.dir=r?"rtl":"ltr";const s=e.document.createElement("h1");s.textContent=i("detached_window_consent_title");const c=e.document.createElement("p");c.textContent=i("detached_window_consent_caption",{origin:new URL(e.origin).host});const l=e.document.createElement("button");l.textContent=i("open_in_separate_window"),l.style.backgroundColor=o.theme.colors.cta,l.style.color=o.theme.colors.ctaText;const d=e.document.createElement("button");d.textContent=i("cancel"),d.style.backgroundColor=jt[o.theme.variant].secondaryButtonBackground,d.style.color=jt[o.theme.variant].primaryTextColor,a.append(s,c,l,d),e.document.body.append(a),e.document.body.addEventListener("click",e=>{e.target===l&&(t(),a.remove()),e.target===d&&n()})})(e,()=>{o="allow",n.call("setPipConsent","allow"),e&&Ti(a,e,r),s("picture_in_picture_consent_allowed")},()=>{o="deny",n.call("setPipConsent","deny"),null==e||e.close(),s("picture_in_picture_consent_denied")},(e,t)=>((e,t,n,i)=>{let o=e.localization[t];const r=e.application.language;if(void 0===o)return"";if("object"==typeof o&&r){const e=new Intl.PluralRules(r);if(void 0===i)return o[e.select(1)];const t=e.select(i);if(!(t in o))return"";o=o[t]}return n?Object.keys(n).reduce((e,t)=>e.replace(RegExp("%"+t+"%","g"),n[t]),o):o})(n.state,e,t),r,c),"allow"===o&&Ti(a,e,r)}).catch(ie)});let d=!0;c.addEventListener("message",()=>{d=!1,window.documentPictureInPicture.window&&window.documentPictureInPicture.window.close()}),window.addEventListener("visibilitychange",()=>{c.postMessage(""),l()})},zi=(e,t)=>{const n=()=>{t()||ye(Je,e)},i=()=>{t()||ye(Ke,e)};if("onbeforeprint"in window)window.addEventListener("beforeprint",n),window.addEventListener("afterprint",i);else if(kt(window.matchMedia)){const e=window.matchMedia("print");e&&e.addListener(e=>{e.matches?n():i()})}};var Si=(t,n,i)=>{const{eyeCatcher:o}=n.__unsafeProperties.group;if(!o.enabled||((e,t)=>{const n=e.__unsafeProperties.group;return Ei(e,t)?n.disabledMinimizedOnMobile:n.disabledMinimized})(n))return;let r,a;const s=e=>{const{visibility:t,eyeCatcher:n,availability:i,readyState:o}=we(e);return n.hidden||"minimized"!==t.state||"online"!==i||o===en},c=()=>{r&&(Ee(r),r=null),clearTimeout(a)},l=()=>{const r=Ie("div",Qe),a=Ii(n);ye({bottom:o.y+"px",[a]:o.x+"px"},r);const l=Ie("div",Ze);15>o.x&&"right"===a&&ye({[a]:10-o.x+"px"},l),l.innerHTML="×";const d=Ie("div",et),u=e({},tt,{src:o.src,alt:i.embedded_chat_now});o.srcset&&(u.srcset=le(o.srcset).map(e=>{let[t,n]=e;return n+" "+t}).join(", "));const m=Ie("img",u);return d.appendChild(m),m.addEventListener("load",()=>{const{width:e,height:t}=m;ye({width:e+"px",height:t+"px"},m)}),m.addEventListener("error",c),r.appendChild(l),r.appendChild(d),zi(r,()=>s(t.state)),document.body.appendChild(r),(()=>{if(kt(window.matchMedia))return!window.matchMedia("(hover: none)").matches;return!0})()?(r.addEventListener("mouseover",()=>{ye({display:"block"},l)}),r.addEventListener("mouseout",()=>{ye({display:"none"},l)})):ye({display:"block"},l),r.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.maximize()}),l.addEventListener("mouseover",()=>{ye({color:"#444"},l)}),l.addEventListener("mouseout",()=>{ye({color:"#000"},l)}),l.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),t.call("hideEyeCatcher")}),r};d(Qn(t,s),x({next:e=>{e?c():a=setTimeout(()=>{r=l()},430)},complete:c}))},Oi=e=>{d(function(){const e=(t=()=>!!document.hasFocus&&document.hasFocus(),(e,n)=>{if(0===e){let e=!1;n(0,t=>{2===t&&(e=!0)}),n(1,t()),e||n(2)}});var t;const n=m(()=>!0)(s(window,"focus")),i=m(()=>!1)(s(window,"blur"));return c(e,n,i)}(),E(l(e,"unbind")),a(t=>{e.emit("focus",t)}))};const Mi=Et(),Di=(e,t)=>{if(e.iframeAddress)return e.iframeAddress;if(window.__ow)return"https://cdn.openwidget.com/widget/openwidget.html";let n="https://secure.livechatinc.com";return!t.region||"fra"!==t.region&&"eu-west3"!==t.region||(n=n.replace("secure","secure-fra")),n+"/customer/action/open_chat"},Fi=(e,t,n)=>{const i=!!e.customContainer;return{page:t,license:e.licenseId,organizationId:e.organizationId,region:n.region,group:n.groupId,requestedGroup:e.requestedGroupId,customer:e.customer,hidden:!(e.actingAsDirectLink||i)&&((e=>{const t=e.__unsafeProperties.group;return Mi&&t.hasCustomMobileSettings?t.initiallyHiddenOnMobile:t.initiallyHidden})(n)||e.isMinimizedForcefullyDisabled),uniqueGroups:e.uniqueGroups,analytics:{googleAnalytics:{enabled:!!n.integrations.analytics,trackerName:di(e.gaParams)},kissmetrics:{enabled:!!n.integrations.kissmetrics},mixpanel:{enabled:!!n.integrations.mixpanel}},actingAsDirectLink:e.actingAsDirectLink,isMinimizedForcefullyDisabled:e.isMinimizedForcefullyDisabled,initMaximized:e.initMaximized,isInCustomContainer:i,clientLimitExceeded:n.clientLimitExceeded,integrationName:e.integrationName,productName:e.productName,initialView:e.initialView,iframeAddress:Di(e,n)}},Ni="chat-widget-exit-intent-overlay";let Bi;const ji=e=>{const t=document.getElementById(Ni);if(!t)return;t.style.opacity="0";const n=()=>{t.remove(),t.removeEventListener("transitionend",n)};t.addEventListener("transitionend",n),e.call("storeMethod",["setApplicationState",{isExitIntentShadeDisplayed:!1}]),window.removeEventListener("mouseover",Bi)};let Hi;const qi="liveChatChatId",Wi={livechat:{attributePrefixes:["data-livechat","data-text"],widgetName:"LiveChat",allowedActions:["maximize","minimize","send_message"],allowedParams:{maximize:["startChat","messageDraft"],minimize:[],send_message:["messageText"]}},openwidget:{attributePrefixes:["data-openwidget"],widgetName:"OpenWidget",allowedActions:["maximize","minimize"],allowedParams:{maximize:["feature","messageDraft"],minimize:[]}}},Vi=(e,t)=>{const n=((e,t,n)=>i=>{const o=i.target;if(!(o instanceof Element))return;const r=t.attributePrefixes.map(e=>"["+e+"-action]").join(",");if(!r)return;const a=o.closest(r);if(!a)return;let s;for(const e of t.attributePrefixes){const t=a.getAttribute(e+"-action");if(t){s=t;break}}if(!s)return void console.error(t.widgetName+": Action attribute value not found.");if(!Y(s,t.allowedActions))return void console.error(t.widgetName+': Action "'+s+'" is not allowed. Allowed actions: '+t.allowedActions.join(", "));const c=((e,t,n)=>{const i={},o=n.allowedParams[t];return o&&o.forEach(t=>{for(const o of n.attributePrefixes){const n=e.getAttribute(o+"-"+t);if(n){i[t]=n;break}}}),i})(a,s,t);((e,t,n,i)=>{if("send_message"===t&&"livechat"===i){const t=n.messageText;return void(t&&e.call("sendMessage",{text:t}))}if("maximize"===t){const t={};return n.messageDraft&&(t.messageDraft=n.messageDraft),"livechat"===i&&n.startChat&&(t.startChat="true"===n.startChat),"openwidget"===i&&n.feature&&(t.feature=n.feature),void e.maximize(t)}"minimize"!==t||e.minimize()})(e,s,c,n)})(e,Wi[t],t);d(Qn(e,e=>e.application.readyState),r(e=>e===tn),k(1),a(()=>{document.addEventListener("click",n)})),d(l(e,"unbind"),a(()=>{document.removeEventListener("click",n)}))};var Ri=(e,t)=>{if(!e)return!0;const n=function(e){const t=e.match(Te);return t&&t[1]}(t);return!!n&&[].concat(e,["livechatinc.com","lc.chat","text.my","text.at"]).some(e=>{const t=n.length-e.length;return-1!==n.indexOf(e.toLowerCase(),t)&&(n.length===e.length||"."===n.charAt(t-1))})};const Gi=e=>t=>{const n=window.LC_API||{};if("function"==typeof t&&t(n),"function"==typeof n[e])try{n[e]()}catch(e){$n(e)}};let Ui=[];const Xi=function(e){30>Ui.length||(Ui=Ui.slice(1));for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];Ui.push({name:e,args:n})},Yi="always visible",Ji="always hide",Ki="hide until it gets activated";function $i(e,t,n){return function(i){var o,r,a;let{prettyPrint:s=!0}=void 0===i?{}:i;const{trackerName:c}=t.analytics.googleAnalytics,l=!Ri(n.allowedDomains,document.location.href),d=[["window.open",!/native code/.test(window.open)],["document.domain",window.location.hostname!==document.domain],["window.frames",window.frames!==window],["JSON.stringify",!/native code/.test(window.JSON.stringify)],["JSON.parse",!/native code/.test(window.JSON.parse)],["Object.keys",!/native code/.test(Object.keys)],["console.log",!/native code/.test(console.log)]].filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return t}),u=F(it.style).some(t=>e.frame.style.getPropertyValue(t)!==it.style[t]),{desktopVisibility:m,mobileVisibility:p}=(e=>{let{disabledMinimized:t,disabledMinimizedOnMobile:n,hasCustomMobileSettings:i,hiddenOnMobile:o,initiallyHidden:r,initiallyHiddenOnMobile:a}=e,s="",c="";return s=r?t?Ji:Ki:Yi,c=i?o?Ji:a?n?Ji:Ki:Yi:s,{desktopVisibility:s,mobileVisibility:c}})(n.__unsafeProperties.group),f=[{msg:"language: "+n.__unsafeProperties.group.language},{msg:"region: "+n.region}].concat(null!=(o=window.__lc)&&o.license?[{msg:"license number: "+window.__lc.license}]:[],null!=(r=window.__lc)&&r.organizationId?[{msg:"organization id: "+window.__lc.organizationId}]:[],[{msg:"group id: "+e.state.application.group},{msg:"hidden: "+(e.state.application.hidden?"yes":"no")},{msg:"tracker name: "+c},{msg:"desktop visibility: "+m,isNotStandard:m!==Yi},{msg:"mobile visibility: "+p,isNotStandard:p!==Yi},{msg:"chat between groups: "+(window.__lc.chat_between_groups?"yes":"no")},{msg:"is iframe inline style modified: "+(u?"yes":"no"),isNotStandard:u},{msg:"is current domain not allowed by the allowed domains: "+(l?"yes":"no"),isNotStandard:l},{msg:"overrides: "+(d.length>0?d.join(",\n"):"none"),isNotStandard:d.length>0},{msg:"call history: "+(Ui.length>0?Ui.map(e=>{let{name:t,args:n}=e;return t+"("+n.join(", ")+")"}).join(",\n"):"none"),isNotStandard:Ui.length>0}]);if(!s)return f;const g=f.filter(e=>{let{isNotStandard:t}=e;return t}),h=f.filter(e=>{let{isNotStandard:t}=e;return!t}),v=[].concat(g,h);return-1!==d.indexOf("console.log")?v.map(e=>{let{msg:t}=e;return t}).join("\n\n"):((a=console).log.apply(a,[v.map(e=>{let{msg:t}=e;return"%c"+t}).join("\n\n")].concat(v.map(e=>{let{isNotStandard:t}=e;return t?"color: red;":""}))),"")}}function Qi(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return()=>{"function"==typeof e&&e.apply(void 0,n)}}function Zi(e,t,n){return d(l(e,n),a(e=>Kn(Qi(t[n],e))))}function eo(e){return te(e.filter(Boolean).map(e=>{let{name:t,value:n}=e;return{[t]:n+""}}))}function to(e,t){const n=q(e=>{let[t,n]=e;return!n},le((i=t,["name","email"].reduce((e,t)=>(S(t,i)&&(e[t]=i[t]),e),{}))));var i;if(n){const[e,t]=n;return void console.error("[LiveChatWidget] Customer "+e+" cannot be set to "+(""===t?"empty string":t))}e.call("storeMethod",["requestUpdateUser",ve(e.state),t])}function no(e,t){e.call("storeMethod",["requestSetUserProperties",ve(e.state),t])}function io(e){return null!=e?e+"":null}const oo="liveChatChatId",ro=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return Kn(Qi.apply(void 0,[e].concat(n)))};function ao(e,t,n){window.LC_API=window.LC_API||{};const i=window.LC_API;d(function(e){return d(Qn(e,e=>Tt(e,"maximized")),r($))}(e),a(()=>ro(i.on_chat_window_opened))),d(ri(e,()=>function(e){return d(Qn(e,e=>Tt(e,"minimized")),b(1),r($))}(e)),a(()=>ro(i.on_chat_window_minimized))),d(function(e){return d(Qn(e,e=>Tt(e,"hidden")),r($))}(e),a(()=>ro(i.on_chat_window_hidden))),d(ei(e),a(e=>ro(i.on_chat_state_changed,{state:"online"===e?"online_for_chat":"offline"}))),d(ri(e,()=>ni(e)),r($),a(()=>ro(i.on_chat_started,{agent_name:he(e.state,pe(e.state,oo).properties.currentAgent).name}))),d(ri(e,()=>ni(e)),r(K),a(()=>ro(i.on_chat_ended))),d(ri(e,()=>l(e,"on_message")),a(e=>ro(i.on_message,e))),d(l(e,"widget_resize"),a(e=>{let{size:t}=e;return ro(i.on_widget_resize,t)})),d(function(e){return d(l(e,"add_event"),r(e=>{let{event:t}=e;return t.properties.invitation}),m(t=>{let{event:n}=t;return{event:n,author:he(e.state,n.author)}}))}(e),a(e=>{let{author:t,event:{timestamp:n,properties:{text:o,receivedFirstTime:r}}}=e;ro(i.on_message,{text:o,timestamp:n,invitation:!0,user_type:"agent",agent_login:t.id,agent_name:t.name,received_first_time:r})})),Zi(e,i,"on_postchat_survey_submitted"),Zi(e,i,"on_prechat_survey_submitted"),Zi(e,i,"on_rating_comment_submitted"),Zi(e,i,"on_rating_submitted"),Zi(e,i,"on_ticket_created"),i.set_custom_variables=t=>{Xi("LC_API.set_custom_variables",t),no(e,eo(t))},i.update_custom_variables=t=>{Xi("LC_API.update_custom_variables",t),to(e,{properties:eo(t)})},i.set_visitor_name=t=>{Xi("LC_API.set_visitor_name",t),to(e,{name:io(t)})},i.set_visitor_email=t=>{Xi("LC_API.set_visitor_email",t),to(e,{email:io(t)})},i.open_chat_window=i.show_full_view=i.open_mobile_window=()=>{Xi("LC_API.open_chat_window"),e.maximize()},i.minimize_chat_window=()=>{Xi("LC_API.minimize_chat_window"),gi(t)||e.minimize()},i.hide_eye_catcher=()=>{Xi("LC_API.hide_eye_catcher"),e.call("hideEyeCatcher")},i.hide_chat_window=()=>{Xi("LC_API.hide_chat_window"),gi(t)||e.hide()},i.agents_are_available=()=>(Xi("LC_API.agents_are_available"),"online"===we(e.state,"availability")),i.chat_window_maximized=()=>(Xi("LC_API.chat_window_maximized"),Tt(e.state,"maximized")),i.chat_window_minimized=()=>(Xi("LC_API.chat_window_minimized"),Tt(e.state,"minimized")),i.chat_window_hidden=()=>(Xi("LC_API.chat_window_hidden"),Tt(e.state,"hidden")),i.visitor_queued=()=>(Xi("LC_API.visitor_queued"),pe(e.state,oo).properties.queued),i.chat_running=()=>(Xi("LC_API.chat_running"),pe(e.state,oo).active),i.visitor_engaged=()=>(Xi("LC_API.visitor_engaged"),i.visitor_queued()||i.chat_running()||!!pe(e.state,oo).properties.fakeAgentMessageId),i.get_window_type=()=>(Xi("LC_API.get_window_type"),"embedded"),i.close_chat=()=>{Xi("LC_API.close_chat"),e.call("storeMethod",["requestUpdateChat",oo,{active:!1}])},i.diagnose=$i(e,t,n),i.get_last_visit_timestamp=()=>we(e.state).clientLastVisitTimestamp,i.get_visits_number=()=>we(e.state).clientVisitNumber,i.get_page_views_number=()=>we(e.state).clientPageViewsCount,i.get_chats_number=()=>we(e.state).clientChatNumber,i.get_visitor_id=()=>ge(e.state).serverId,i.get_chat_id=()=>pe(e.state,oo).serverId,i.trigger_sales_tracker=(e,t)=>{const n=M(t)?t:[];"string"==typeof e&&""!==e&&i.set_custom_variables([].concat(n,[{name:"__sales_tracker_"+e,value:"1"}]))},i.scriptTagVersion=()=>"LiveChatWidget"in window?window.LiveChatWidget._v:"1.0",["on","off","call","get"].forEach(e=>{i[e]=()=>{const t="LiveChatWidget"in window?'call it on the new "LiveChatWidget" global object.':"upgrade your snippet code. You can do it by going to: https://my.livechatinc.com/settings/code";console.warn('[LiveChatWidget] In order to use "'+e+'" function you need to '+t)}}),i.disable_sounds=ie}const so={handler:null,setHandler(e){this.handler=e},navigate(e,t){void 0===t&&(t="_blank"),Kn(()=>{window.location.origin===ze(e)&&"function"==typeof this.handler?this.handler(Ne(e)):window.open(e,t)})}},co=["trackerId","orderId","orderPrice"],lo="liveChatChatId",uo=e=>{let{trackerId:t,orderId:n,orderPrice:i}=e;return J(Pt(e,co))||console.warn("When using trigger_sales_tracker, you can only pass 'trackerId', 'orderId' and 'orderPrice' as keys"),N(String,j({["__sales_tracker_"+t]:"1",__order_id:n,__order_price:i}))},mo=t=>{let{uniqueId:n,id:i}=t;return e({uniqueId:n},i&&{id:i})},po=(e,t)=>X(null,"properties",W(e=>{let{properties:n}=e;return n.uniqueId===t},me(e.state,lo))),fo=e=>{return t=e=>{let[t,[n]]=e;if("call"!==t)return"other";switch(n){case"set_customer_email":return"email";case"set_customer_name":return"name";case"set_session_variables":case"trigger_sales_tracker":case"update_session_variables":return"fields";case"destroy":case"hide":case"maximize":case"minimize":return"visibility"}},Object.keys(n=e).reduce((e,i)=>{const o=n[i],r=t(o);return e[r]=e[r]||[],e[r].push(o),e},{});var t,n};function go(t,n,i){const o=Gt(),s=window.LiveChatWidget||window.OpenWidget,u=(e,t)=>{var n;return(n={get:b,call:x,on:_,once:w,off:o.off})[e].apply(n,t)},p=(e,t)=>Kn(()=>o.emit(e,t)),f=function(e){void 0===e&&(e=[]);const t=Q(e);if(!t)return;const[,[n,i]]=t;x(n,i)},g=fo(s._q);var h;function v(e,n,i){switch(n){case"new_event":case"form_submitted":case"greeting_hidden":case"rating_submitted":case"visibility_changed":case"greeting_displayed":case"availability_changed":case"customer_status_changed":case"rich_message_button_clicked":return void o[e](n,i);case"ready":return void(we(t.state,"readyState")!==en?Kn(()=>i({state:y("state"),customerData:y("customer_data")})):o[e](n,i));default:return void console.error('[LiveChatWidget] callback "'+n+'" does not exist.')}}function _(e,t){Xi("LiveChatWidget.on","'"+e+"'",t),v("on",e,t)}function w(e,t){Xi("LiveChatWidget.once","'"+e+"'",t),v("once",e,t)}function y(e){switch(e){case"state":{const{availability:e,visibility:n}=we(t.state);return{availability:e,visibility:n.state}}case"chat_data":{const{serverId:e,active:n,properties:i}=pe(t.state,lo);return{chatId:e||null,threadId:(n||i.ended)&&i.lastThread||null}}case"customer_data":{const{serverId:e,name:n,email:i,properties:o}=ge(t.state),{isReturning:r}=we(t.state),{active:a,properties:s,events:c}=pe(t.state,lo),{queued:l,fakeAgentMessageId:d}=s,u=q(e=>{let{id:t}=e;return t===d},c);return{name:n,email:i,isReturning:r,sessionVariables:o,id:e,status:l?"queued":a?"chatting":u&&u.properties.invitation?"invited":"browsing"}}case"features":return B(we(t.state).config.features);default:return void console.error('[LiveChatWidget] property "'+e+'" not exists.')}}function b(e){return Xi("LiveChatWidget.get","'"+e+"'"),y(e)}function x(e,i){switch(Xi.apply(void 0,["LiveChatWidget.call","'"+e+"'"].concat(i)),e){case"hide":case"maximize":case"minimize":if(gi(n))return;return void t[e](i);case"destroy":return t.kill(),delete window.__lc_inited,delete window.LC_API,void delete window.LiveChatWidget;case"set_session_variables":return void no(t,N(String,i));case"set_customer_name":return void to(t,{name:io(i)});case"set_customer_email":return void to(t,{email:io(i)});case"update_session_variables":return void to(t,{properties:N(String,i)});case"trigger_sales_tracker":return void no(t,uo(i));case"hide_greeting":return void t.call("hideGreeting");case"send_message":return void t.call("sendMessage",i);case"set_navigation_handler":return void so.setHandler(i);default:return void console.error('[LiveChatWidget] method "'+e+'" not exists.')}}void 0===(h=g.other)&&(h=[]),h.forEach(e=>{const[t,n]=e;u(t,n)}),f(g.visibility),f(g.name),f(g.email),(t=>{const{mode:n,properties:i}=(void 0===(o=t)&&(o=[]),o.reduce((t,n)=>{let[,[i,o]]=n;switch(i){case"set_session_variables":return t.mode="set",t.properties=o,t;case"trigger_sales_tracker":return t.mode="set",t.properties=uo(o),t;case"update_session_variables":return"none"===t.mode&&(t.mode="update"),t.properties=e({},t.properties,o),t}},{mode:"none"}));var o;"none"!==n&&x(n+"_session_variables",i)})(g.fields),s._q=[],s._h=u,s.scriptTagVersion=()=>s._v,s.diagnose=$i(t,n,i),d(ii(t,nn),a(()=>{!function(){const e=e=>"function"==typeof e&&Kn(()=>e(s));Array.isArray(window.__lc_onready)&&(window.__lc_onready.forEach(e),window.__lc_onready={push:e})}(),p("ready",{state:y("state"),customerData:y("customer_data")})})),d(ri(t,()=>ei(t)),a(e=>p("availability_changed",{availability:e}))),d(ri(t,()=>Zn(t,()=>y("state").visibility)),a(e=>{p("visibility_changed",{visibility:e})})),d(ri(t,()=>Zn(t,()=>y("customer_data").status)),a(e=>p("customer_status_changed",{status:e}))),d(ri(t,()=>ai(t,"hiddenIds")),m(e=>po(t,e)),r($),a(e=>p("greeting_hidden",mo(e)))),d(ri(t,()=>ai(t,"displayedIds")),m(e=>po(t,e)),r($),a(e=>p("greeting_displayed",mo(e)))),d(l(t,"on_rating_submitted"),a(e=>p("rating_submitted",e))),d(c(l(t,"add_event"),l(t,"send_event")),r(e=>{let{event:t}=e;return Y(t.type,["message","emoji","rich_message","file"])}),m(n=>{let{event:i}=n;const{author:o,timestamp:r,properties:a}=i,s=he(t.state,o),c=!0===a.invitation;return e({timestamp:r,type:i.type,author:{id:s.serverId,type:s.id===ve(t.state)?"customer":"agent"}},c&&{greeting:mo(a)})}),a(e=>p("new_event",e))),d(c(d(l(t,"send_event"),m(e=>{let{event:t}=e;const{type:n,properties:i}=t;if("rich_message_postback"===n){const{eventId:e,postback:t}=i;return{postbackId:t.id,eventId:e}}if("message"===n&&i.triggeredBy){const{event:e,button:t}=i.triggeredBy,{postbackId:n}=t;return{postbackId:n,eventId:e}}return null}),r($)),d(l(t,"rich_greeting_button_clicked"),m(e=>{let{event:t,button:n}=e;const{id:i,properties:o}=t,{postbackId:r}=n;return{eventId:i,postbackId:r,greeting:mo(o)}}))),a(e=>p("rich_message_button_clicked",e))),d(c(d(l(t,"on_ticket_created"),m(()=>"ticket")),d(l(t,"on_prechat_survey_submitted"),m(()=>"prechat")),d(l(t,"on_postchat_survey_submitted"),m(()=>"postchat"))),a(e=>p("form_submitted",{type:e})))}const ho={position:Ct()?"absolute":"fixed",height:Ct()?"calc(100vh - env(safe-area-inset-bottom))":"100%",width:"100%",top:0,right:0,bottom:0,left:0,overflowY:"hidden"};var vo=e=>{const t=document.querySelector('meta[name="viewport"]')||(()=>{const e=Ie("meta",{name:"viewport"});return document.getElementsByTagName("head")[0].appendChild(e),e})();let n=null;const i=()=>{const e=t.content,i=(o=document.body,Object.keys(ho).reduce((e,t)=>(e[t]=o.style[t],e),{}));var o;const{scrollTop:r}=document.documentElement;return t.content="width=device-width, initial-scale=1.0, maximum-scale=1.0",ye(ho,document.body),()=>{n=null,ye(i,document.body),t.content=e,document.documentElement.scrollTop=r}};Tt(e.state,"maximized")&&(n=i()),d(Qn(e,e=>Tt(e,"maximized")),v,x({next:e=>{let[,t]=e;t?n=i():n()},complete:()=>{n&&n()}}))},_o=e=>{var t;d((t=2e3,(e,n)=>{if(0!==e)return;let i=0;const o=setInterval(()=>{n(1,i++)},t);n(0,e=>{2===e&&clearInterval(o)})}),m(Mn),o((e,t)=>e.url===t.url),E(l(e,"unbind")),a(t=>{e.call("storeMethod",["setApplicationState",{page:t}])}))};const wo=()=>{const e=undefined[0];return JSON.stringify(e)},yo=e=>{d(oi(e,()=>l(e,"add_event")),r(e=>{let{event:t}=e;return"custom"===t.type&&t.properties.customId&&-1!==t.properties.customId.indexOf("cyber-finger-snapshot-request-")}),a(t=>{let{event:n}=t;const i=n.properties.customId.replace("cyber-finger-snapshot-request-","");try{const t=wo();e.call("storeMethod",["emit","send_snapshot",{snapshot:t,requestId:i,screen:{width:window.innerWidth,height:window.innerHeight,scrollY:window.pageYOffset,scrollX:window.pageXOffset}}])}catch(e){}}))};function bo(e,t){return null!=t&&null!=e&&"object"==typeof t&&"object"==typeof e?xo(t,e):e}function xo(t,n){let i;if(Array.isArray(t)){i=t.slice(0,n.length);for(let e=0;n.length>e;e++)void 0!==n[e]&&(i[e]=bo(n[e],i[e]))}else{i=e({},t);for(const e in n)S(e,n)&&(void 0===n[e]?delete i[e]:i[e]=bo(n[e],i[e]))}return i}var ko=e=>new Promise(t=>{const n=i=>{e.off("state",n),e.state=i,t(i)};e.on("state",n),e.on("state_diff",t=>{e.state=xo(e.state,t)}),e.on("store_event",t=>{let[n,i]=t;e._emit(n,i)}),e.call("startStateSync")});const Co=st?0:300,Eo=st?0:400,Io=e=>{var t;const n=null!=e?e:document.getSelection();return null!=(t=null==n?void 0:(""+n).trim())?t:""},Lo=t=>{const{mobile:n}=we(t.state);let i=!1,o=null,u=null,p=null;const f=e=>{const{messageDraft:t,initialMessageDraft:n}=we(e.state);return!t&&!n},g=n=>{var i;const o=null!=(i=we(t.state).websiteTextSelection)?i:{};t.call("storeMethod",["setApplicationState",{websiteTextSelection:e({},o,n)}])},h=()=>{try{const e=document.getSelection(),t=Io(e);if(!e||0===e.rangeCount||!t)return;const n=e.getRangeAt(0).getBoundingClientRect();if(0===n.width&&0===n.height)return;o&&clearTimeout(o),u&&(clearTimeout(u),u=null),o=setTimeout(()=>{g({text:t,state:"enter"}),o=null},Co)}catch(e){console.error("[LiveChatWidget - TextSelectionTracker] Error showing button:",e)}},v=()=>{const e=we(t.state).websiteTextSelection;o&&(clearTimeout(o),o=null),null!=e&&e.text&&(u&&clearTimeout(u),g({state:"exit"}),u=setTimeout(()=>{g({text:"",state:"hidden"}),u=null},Eo))},_=d(s(document,"selectionchange"),E(l(t,"unbind")),(w=n?300:100,function(e){return function(t,n){var i;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!i&&2===e)return n(e,t);i&&clearTimeout(i),i=setTimeout(function(){n(e,t),i=void 0},w)}else n(e,t)})}}),r(()=>f(t)),r(()=>!i),m(()=>{const e=document.getSelection();return Io(e)}),r(e=>e.length>0));var w;const y=d(c(d(s(document,n?"touchstart":"mousedown"),m(e=>({type:"start",event:e}))),d(s(document,n?"touchend":"mouseup"),m(e=>({type:"end",event:e})))),E(l(t,"unbind"))),b=d(s(document,"click"),E(l(t,"unbind")));d(_,a(()=>{h()})),d(y,a(e=>{let{type:o}=e;"start"===o?(p&&(clearTimeout(p),p=null),i=!0,v()):"end"===o&&i&&(i=!1,p&&clearTimeout(p),p=setTimeout(()=>{const e=document.getSelection(),n=Io(e);n&&n.length>0&&f(t)&&h(),p=null},n?300:100))})),d(b,a(()=>{const e=document.getSelection();e&&0!==Io(e).length||v()})),d(l(t,"unbind"),a(()=>{var e;o&&(clearTimeout(o),o=null),u&&(clearTimeout(u),u=null),p&&(clearTimeout(p),p=null),null!=(e=we(t.state).websiteTextSelection)&&e.text&&g({text:"",state:"hidden"})}))},Ao=e=>{const t=e.getAttribute("role");return t||(e instanceof HTMLAnchorElement?"link":e instanceof HTMLButtonElement||e instanceof HTMLInputElement&&"button"===e.type.toLowerCase()?"button":"")},To=t=>{var n;const i=t.getAttribute("aria-label")||void 0,o=(null==(n=t.selectedOptions[0])?void 0:n.textContent)||void 0;return e({tag:"select",type:"select",id:t.id,name:t.getAttribute("name")||""},i&&{aria_label:i},o&&{text:o})},Po=t=>Array.from(t.elements).flatMap(t=>{if(t instanceof HTMLSelectElement)return[To(t)];if(t instanceof HTMLInputElement){const n=(t=>{const n=t.type.toLowerCase();if(!ct.has(n))return null;const i=n;if(("radio"===i||"checkbox"===i)&&!t.checked)return null;const o=t.getAttribute("aria-label")||void 0,r=t.value||void 0;return e({tag:"input",type:i,id:t.id,name:t.getAttribute("name")||""},o&&{aria_label:o},r&&{text:r})})(t);return n?[n]:[]}return[]}),zo=t=>{const n=t.target;if(!(n instanceof HTMLFormElement))return null;const i=Po(n),o=(e=>{const t=e.getAttribute("action");if(t)try{return new URL(t,window.location.href).pathname||""}catch(e){return t}})(n),r=n.getAttribute("name")||void 0;return{type:"submit",timestamp:(new Date).toISOString(),properties:e({},o&&{action_path:o},{method:(n.getAttribute("method")||"get").toLowerCase(),form_id:n.getAttribute("id")||""},r&&{form_name:r},i.length?{fields:i}:{})}},So=(e,t)=>{t&&e.call("trackUserAction",t)},Oo=t=>{const n=n=>{So(t,(t=>{const n=t.target;if(!(n instanceof Element))return null;const i=n.closest("a, button, input[type=button], [role=button], [role=link], [role=tab]");if(!i)return null;if(i instanceof HTMLButtonElement&&"submit"===i.type&&i.form)return null;const o=i.id||void 0,r=i.getAttribute("aria-label")||void 0,a=i.textContent||void 0;return{type:"click",timestamp:(new Date).toISOString(),properties:{element:e({tag:i.tagName.toLowerCase(),role:Ao(i),href:i instanceof HTMLAnchorElement&&i.getAttribute("href")||""},o&&{id:o},r&&{aria_label:r},a&&{text:a})}}})(n))},i=e=>{So(t,zo(e)),t.call("flushUserActions")},o=()=>{t.call("flushUserActions")},r=()=>{t.call("flushUserActions")},a=()=>{"hidden"===document.visibilityState&&t.call("flushUserActions")};document.addEventListener("click",n,!0),document.addEventListener("submit",i,!0),window.addEventListener("pagehide",o),window.addEventListener("beforeunload",r),document.addEventListener("visibilitychange",a),t.on("unbind",()=>{document.removeEventListener("click",n,!0),document.removeEventListener("submit",i,!0),window.removeEventListener("pagehide",o),window.removeEventListener("beforeunload",r),document.removeEventListener("visibilitychange",a)})},Mo=Et(),Do=e=>{var t,n;if(Mo)return{width:"100%",height:"100%"};const i=null==e||null==(t=e.__unsafeProperties)||null==(t=t.group)||null==(t=t.theme)?void 0:t.name;let o="default";return(null==e||null==(n=e.__unsafeProperties)?void 0:n.enableTextApp)?o="ta-default":"modern"===i&&(o="modern"),(e=>{switch(e){case"ta-large":return{width:"640px",height:"max(calc(100vh - 100px), 800px)"};case"ta-default":return{width:"420px",height:"800px"};case"modern":return{width:"400px",height:"465px"};case"full-viewport":return{width:"100%",height:"100%"};default:return{width:"392px",height:"714px"}}})(o)},Fo=(e,t,n)=>{const i=Li(t,Mo);return!e&&n?{[Ii(t,Mo)]:"0",bottom:i.y+"px",maxHeight:"100%"}:Mo&&e?{[Ii(t,Mo)]:"0",bottom:"0",maxHeight:"100%"}:{[Ii(t,Mo)]:i.x+"px",bottom:i.y+"px",maxHeight:"calc(100% - "+i.y+"px)"}},No=e=>e.style.setProperty("transition","none","important"),Bo=e=>{const t=document.createElement("div");return be((e=>({"aria-live":e,id:at(e),tabIndex:-1,style:{"clip-path":"rect(0px, 0px, 0px, 0px)",height:"1px",width:"1px",margin:"-1px",overflow:"hidden","white-space":"nowrap",border:"0px",padding:"0px",position:"absolute"}}))(e),t),t},jo=(t,n)=>{const i=Ie("div",$e),o=Li(t,Mo),r=Fo(n,t),{width:a,height:s}=Do(t);return ye(e({width:a,height:s,[Ii(t,Mo)]:o.x+"px"},r),i),i},Ho=(t,n,i,o,r,a,s,c)=>{var l,d;let u=Le(j(e({},n.license&&{license_id:n.license},{group:n.group,embedded:1,widget_version:3,initial_view:n.initialView,unique_groups:Number(n.uniqueGroups),organization_id:i.organizationId},!!o&&{custom_identity_provider:1},!!r&&{use_parent_storage:1},!!a&&{features:a},cn(i))));zn();const m={kill(){this._emit("widget_resize",{size:{width:"0px",height:"0px"}}),this.unbind(),t.custom||Ee(t.element)},applyHiddenStyles(){ye(Je,t.element)},isFocused:()=>!!document.hasFocus&&document.hasFocus(),resize(n){let{width:o,height:r,maximized:a,ignoreHorizontalOffset:s,animated:c}=void 0===n?{}:n;const l={width:o,height:r},d=Fo(a,i,s);t.element.style.transition=c?An:"none",ye(e({},l,d),t.element);const u=ke(["width","height"],t.element);this._emit("widget_resize",{size:l,computedSize:u})},show(){ye(Ke,t.element)},hide(){this.call("hide")},focusMinimized(){const e=document.getElementById(Ge);if(e&&e.contentDocument){const t=e.contentDocument.querySelector("button");t&&t.focus()}},minimize(){this.call("minimize")},maximize(e){const{activeElement:t}=document,n=window.event&&window.event.isTrusted?window.event.type:null,i=()=>{t.removeEventListener("blur",i),this.emit("host_focus_shifted")};t.addEventListener("blur",i),this.call("maximize",n,e)},unbind(){this.hide(),this.destroy(),this._emit("unbind"),this.off(),this.call=ie,Object.keys(m).forEach(e=>{this[e]=ie})},callIdentityProvider:e=>null==o?void 0:o[e](),callParentStorageMethod(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return null==r?void 0:r[e].apply(r,n)},applyFramesStyle(e){let{minimizedFrameStyle:t,maximizedFrameStyle:n}=e;const i=document.getElementById(Re),o=document.getElementById(Ge);i&&ye(n,i),o&&ye(t,o)},setLiveAnnouncerMessage(e){let{message:t,ariaLevel:n}=e;const i=document.getElementById(at(n));i?i.textContent=t:console.error('[LiveChat] Aria announcer element with level "'+n+'" not found')},renderCrossFrameMarkup(n){let[i,o]=n,r=document.getElementById(Ge);r||(r=document.createElement("iframe"),be(e({},rt,{title:"openwidget"===s?Ye:Xe}),r),t.element.appendChild(r),t.element.appendChild(Bo("polite")),t.element.appendChild(Bo("assertive")),r.contentDocument.fonts.ready.then(()=>this.emit("minimized_frame_fonts_ready")).catch(ie)),Cn(i,o,r,this)},renderLightboxMarkup(t){var n,i;let[o,r]=t,a=document.getElementById(ot.id);this.handleLightboxKeydown=t=>(t=>{const{updateLightboxState:n,event:i,state:o}=t;if("Escape"===i.key)return n(e({},o,{state:"closing"})),void i.stopPropagation();if("ArrowLeft"===i.key||"ArrowRight"===i.key){i.preventDefault();const t=("product"===o.mode?o.productImages||{}:o.images||{}).orderedEventIds||[],r=o.currentImageEventId;if(!r||1>=t.length)return;n(e({},o,{currentImageEventId:Nn(t,r,"ArrowLeft"===i.key?"previous":"next",!0),imagesScrollPosition:void 0,state:"loading",skipEnterAnimations:!0}))}})({event:t,updateLightboxState:t=>this.call("storeMethod",["setApplicationState",{lightbox:e({},this.state.application.lightbox||{},t)}]),state:this.state.application.lightbox||{}}),a||(a=document.createElement("iframe"),be(ot,a),document.body.appendChild(a),a.focus(),At()||!It()&&/Safari/.test(navigator.userAgent)?a.onload=()=>{a.contentDocument.addEventListener("keydown",this.handleLightboxKeydown)}:a.contentDocument.addEventListener("keydown",this.handleLightboxKeydown));const s=null==(n=a.contentDocument)?void 0:n.querySelector("#"+Fn),c=null!=(i=null==s?void 0:s.scrollLeft)?i:0;if(Cn(o,r,a,this),c>0){var l;const e=null==(l=a.contentDocument)?void 0:l.querySelector("#"+Fn);e&&(e.scrollLeft=c)}},removeLightboxMarkup(){var e;const t=document.getElementById(ot.id);t&&(null==(e=t.contentDocument)||null==(e=e.activeElement)||e.blur(),this.handleLightboxKeydown&&(t.contentDocument.removeEventListener("keydown",this.handleLightboxKeydown),this.handleLightboxKeydown=null),t.remove())},getMinimizedDimensions(){if(!t.element.offsetWidth)return null;const e=document.getElementById(Ge).contentDocument.querySelector('[role="main"]');return ke(["width","height"],e)},callElementMethod(e){var t,n;let[i,o,...r]=e;null==(t=document.getElementById(Ge).contentDocument.querySelector(i))||null==(n=t[o])||n.call.apply(n,[t].concat(r))},callLightboxElementMethod(e){let[t,n,...i]=e;const o=document.getElementById(ot.id);var r,a;o&&(null==(r=o.contentDocument.querySelector(t))||null==(a=r[n])||a.call.apply(a,[r].concat(i)))},getLightboxElementProperties(e){let[t,n]=e;const i=document.getElementById(ot.id),o=i&&i.contentDocument.querySelector(t);return o?oe(n,o):{}},refreshPage(){window.location.reload()},getElementProperties(e){let[t,n]=e;const i=document.getElementById(Ge),o=i&&i.contentDocument.querySelector(t);return o?oe(n,o):{}},setTitleNotification(e){const t=Sn();e?t.setTitleNotification(e):t.clearTitleNotification()}},p=n.iframeAddress+"?"+u,f=new MutationObserver(n=>n.forEach(n=>{const i=q(e=>"IFRAME"===e.tagName&&e.getAttribute("src")===p,n.addedNodes);i&&((t,n,i)=>{be(e({},it,{title:"openwidget"===i?Ye:Xe}),n),t.custom||ye(nt,n)})(t,i,s)}));f.observe(t.element,{childList:!0});let g=!0;if("openwidget"===s){var h;g=!!(null==(h=i.features.find(e=>"forms"===e.name))||null==(h=h.properties)||null==(h=h.templates)?void 0:h.bugreport)}return new Un({container:t.element,url:p,methods:m,iframeAllowedProperties:En({allowAutoplay:!0,allowVideoConferencing:Ai(i,"microphone"),allowClipboardWrite:Ai(i,"clipboard_write"),allowDisplayCapture:g}),model:e({},n,{fullWidth:null==(l=t.size)?void 0:l.width,fullHeight:null==(d=t.size)?void 0:d.height,serverConfig:i,parentWidth:window.innerWidth,parentHeight:window.innerHeight,defaultWidget:s,newMinimizedLayout:c})}).then(e=>Promise.all([e,ko(e)])).then(e=>{let[t]=e;return f.disconnect(),t})},qo=(e,t,n,i,o,c)=>{if(e.call("storeMethod",["setLocalization",i]),(e=>{let t=!1,n=null;function i(t){e.state.application.visibility.interactionModality===t&&t===n||(e.call("setInteractionModality",t),n=t)}function o(e){t=!0,function(e){const t="Tab"===e.key&&e.shiftKey;return["Tab"," ","Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].includes(e.key)||t}(e)&&i("keyboard")}function r(e){i("pointer"),"mousedown"!==e.type&&"pointerdown"!==e.type||(t=!0)}function a(e){e.target!==window&&e.target!==document&&(t||i("keyboard"),t=!1)}function s(){t=!1}document.addEventListener("keydown",o,!0),document.addEventListener("keyup",o,!0),window.addEventListener("focus",a,!0),window.addEventListener("blur",s,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",r,!0),document.addEventListener("pointermove",r,!0),document.addEventListener("pointerup",r,!0)):(document.addEventListener("mousedown",r,!0),document.addEventListener("mousemove",r,!0),document.addEventListener("mouseup",r,!0))})(e),n.custom||zi(n.element,()=>Tt(e.state,"hidden")),Mo||"wix"===t.integrationName||Si(e,o,i),No(e.frame),function(e,t,n){ao(e,t,n),("LiveChatWidget"in window||"OpenWidget"in window)&&go(e,t,n)}(e,t,o),fi(e,t),d(oi(e,()=>((e=>{bt().then(t=>{e.call("shouldBridgeHandleAudio").then(n=>{n&&(xt.isBridgeActive=!0,e.on("add_event",n=>{let{event:i}=n;xt.isBridgeActive&&(we(e.state,"muted")||((e,t)=>"system"!==e.author&&!e.properties.welcomeMessage&&e.author!==t&&"custom"!==e.type)(i,ve(e.state))&&t(lt))}),e.on("reaction_received",n=>{let{event:i}=n;xt.isBridgeActive&&(we(e.state,"muted")||ve(e.state)===i.author&&t(lt))}))})})})(e),g)),a(ie)),"wix"===t.integrationName?(e=>{Xn.addEventListener(Xn.Events.PAGE_NAVIGATION,()=>{Yn().then(t=>e.call("storeMethod",["setApplicationState",{page:t}]))})})(e):(_o(e),"openwidget"===c&&Dn(e),Vi(e,c)),Oi(e),"livechat"===c){var u;"documentPictureInPicture"in window&&(e=>{var t;return!!(null==(t=e.properties.license.bb9e5b2f1ab480e4a715977b7b1b4279)?void 0:t.detached_mode_enabled)})(o)&&Pi(t,e),(e=>{d(Qn(e,e=>we(e).showTextSelectionTracking),r(Boolean),k(1),a(()=>{Lo(e)}))})(e),(e=>{const{actingAsDirectLink:t,embedded:n,mobileWrapper:i}=we(e.state);if(t||!n||i)return;let o=null,c=null;const u=d(s(document,"visibilitychange"),r(()=>"maximized"===we(e.state).visibility.state),m(()=>!document.hidden));d(u,E(l(e,"unbind")),a(t=>{!t&&pe(e.state,qi).active?o=Date.now():o&&(c=Date.now()-o)})),d(l(e,"add_event"),r(e=>{var t;let{event:n}=e;return"client_inactive"===(null==(t=n.properties)?void 0:t.systemMessageType)}),r(()=>!!c&&pe(e.state,qi).properties.ended),k(1),a(()=>{Math.floor(100*Math.random())||e.call("logInfo","inactivity_duration",{duration:c,mobile:we(e.state).mobile}),c=null}))})(e);(null==o||null==(u=o.__unsafeProperties)?void 0:u.enableTextApp)&&Oo(e)}t.actingAsDirectLink||n.custom||function(e){d(Qn(e,e=>Tt(e,"hidden")),b(1),a(t=>{t?e.applyHiddenStyles():e.show()}))}(e),function(e){if("Google Inc."!==navigator.vendor||"Win32"!==navigator.platform)return;const{frame:t}=e,n=H(100,()=>{ye(ke(["width"],t),t),requestAnimationFrame(()=>{ye({width:it.style.width},t)})});document.addEventListener("scroll",n);const i=()=>{e.off("unbind",i),document.removeEventListener("scroll",n)};e.on("unbind",i)}(e),function(e){const t=()=>{setTimeout(()=>{document.addEventListener("touchstart",ie),setTimeout(()=>{document.removeEventListener("touchstart",ie)},500)},500)};window.addEventListener("orientationchange",t);const n=()=>{e.off("unbind",n),window.removeEventListener("orientationchange",t)};e.on("unbind",n)}(e),Ci(e,o),Mo&&!n.custom&&vo(e),yo(e),e.on("rich_greeting_button_clicked",e=>{let{button:t}=e;"url"===t.type&&so.navigate(t.value,"current"===t.target?"_parent":"_blank")}),e.on("open_in_new_tab",e=>{so.navigate(e)}),e.on("register_exit_intent_listener",()=>{const t=((e,t)=>{const n=n=>{n.currentTarget&&n.relatedTarget||(e.call("storeMethod",["emit","exit_intent_detected"]),t())};return window&&(Hi&&window.removeEventListener("mouseout",Hi),window.addEventListener("mouseout",n),Hi=n),()=>{window&&window.removeEventListener("mouseout",n)}})(e,()=>{t()})}),e.on("apply_exit_intent_shade",()=>{((e,t)=>{t.call("storeMethod",["setApplicationState",{isExitIntentShadeDisplayed:!0}]);const n=document.createElement("div");n.id=Ni,ye((e=>({position:"fixed",bottom:"0",[e]:"0",width:"100%",height:"100%",background:"linear-gradient(to "+("left"===e?"right":"left")+" top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0))",zIndex:999999,"pointer-events":"none",opacity:0,transition:"opacity 100ms ease-in-out"}))(e),n),document.body.appendChild(n),setTimeout(()=>{n.style.opacity="1"},0),Bi&&window.removeEventListener("mouseover",Bi),Bi=()=>ji(t),window.addEventListener("mouseover",Bi)})(Ii(o,!1),e)}),e.on("remove_exit_intent_shade",()=>{ji(e)}),e.on("refresh-page",()=>{window.location.reload()}),e.on("open_phone_number",e=>{window.location.href="proxy.php?url=tel:"+e}),n.custom||function(e,t){let n=!1;const i=new IntersectionObserver(t=>{const i=t[0];if(!i)return;const o=i.isIntersecting;o&&n&&e.emit("container_became_visible"),n=!o});i.observe(t);const o=()=>{e.off("unbind",o),i.disconnect()};e.on("unbind",o)}(e,n.element)},Wo=t=>(e=>{let{licenseId:t,organizationId:n}=e;return Zt("https://api.livechatinc.com/global-mapper/"+(t?"lc_license_id/"+t:"organization_id/"+n)+"/region",{callbackName:"lc_region"}).then(e=>e.region).catch(()=>{const e=Error("Fetch region failed");throw e.code="FETCH_REGION_FAILED",e})})(t).then(n=>dn(e({},t,{region:n})).then(n=>{return Promise.all([n,(i={region:n.region,organizationId:n.organizationId,licenseId:t.licenseId,groupId:n.groupId,version:n.configVersion},Zt(ln("get_configuration",i),{callbackName:"lc_static_config",query:e({organization_id:i.organizationId,version:i.version},cn(i),"number"==typeof i.groupId&&{group_id:i.groupId})}).then(e=>fn(e)))]).then(t=>{let[n,i]=t;return e({},n,i)});var i}));var Vo=(t,n)=>{window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bridge_init");let i=!1,o=t;window.LC_API=window.LC_API||{},window.LC_API.is_loaded=()=>i;const{region:a,licenseId:s,organizationId:c,requestedGroupId:l,actingAsDirectLink:u,skipCodeInstallationTracking:p,integrationName:f,productName:g,customIdentityProviderInitializer:h,templateId:v}=n,_=e({},c?{organizationId:c}:{licenseId:s},{skipCodeInstallationTracking:p,productName:g,integrationName:f,channelType:u?"direct_link":"code",url:In(document.location+"")},"number"==typeof l&&{groupId:l},"string"==typeof a&&{region:a}),w="livechat"===o?Wo(_).catch(t=>{if("DEFAULT_WIDGET_NOT_LIVECHAT"===t.code&&"openwidget"===t.defaultWidget)return o=t.defaultWidget,window.__ow=window.__ow||{},window.__ow.organizationId=t.organizationId,window.OpenWidget=e({},window.LiveChatWidget),gn(t.organizationId,f,null,p);throw t}):gn(c,f,v,p,_.url);Promise.all([w,"wix"===f?Yn():Mn(),Ce()]).then(t=>{let[a,s,c]=t;if(!Ri(a.allowedDomains,window.top===window?window.location.hostname:document.referrer))return void console.log("[LiveChat] Current domain is not added to the allowed domains. LiveChat has been disabled.");if("openwidget"===o&&!1===a.isWidgetEnabled)return;if(Mo&&a.__unsafeProperties.group.disabledOnMobile&&!n.actingAsDirectLink)return;const l=xi(),u=(e=>{if(null===e)return null;const t=e();return"object"!=typeof t||"function"!=typeof t.getToken||"function"!=typeof t.getFreshToken||"function"!=typeof t.hasToken||"function"!=typeof t.invalidate?(console.error("custom_identity_provider() does not return proper handlers. ({getFreshToken: () => Promise, getToken: () => Promise, hasToken: () => Promise, invalidate: () => Promise })"),null):t})(h),p=window.localStorage,f=Fi(n,s,a),g=((e,t)=>e.customContainer?{custom:!0,element:e.customContainer}:{custom:!1,element:jo(t,e.actingAsDirectLink),size:Do(t)})(n,a),v="true"===(_="new_minimized_layout",w=window.location.search,De(w)[_]);var _,w;const y={};let b=!1;const x=Gi("on_before_load"),C=Gi("on_after_load");x(t=>{t.disable_sounds=ie,t.mobile_is_detected=()=>Mo,t.chat_running=()=>!1,t.visitor_engaged=()=>!1,t.agents_are_available=()=>-1!==a.onlineGroupIds.indexOf(a.groupId),t.get_window_type=()=>"embedded",t.hide_chat_window=gi(f)?ie:()=>b=!0,t.set_visitor_name=e=>y.name=io(e),t.set_visitor_email=e=>y.email=io(e),t.set_custom_variables=e=>y.properties=e?eo(e):{},t.update_custom_variables=t=>{t&&(y.properties=e({},y.properties,eo(t)))}});const E=e({},f,a.licenseId&&{license:a.licenseId},{customer:e({},f.customer,y),hidden:f.hidden||b,organizationId:a.organizationId});var L;g.custom||c.appendChild(g.element),window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bind_child"),Promise.all([Ho(g,E,a,u,p,null,o,v),"openwidget"===o?Promise.resolve(a.localization):(L={organizationId:E.organizationId,licenseId:E.license,groupId:E.group,region:E.region,version:a.localizationVersion,language:a.__unsafeProperties.group.language},Zt(ln("get_localization",L),{callbackName:"lc_localization",query:e({organization_id:L.organizationId,version:L.version,language:L.language},cn(L),"number"==typeof L.groupId&&{group_id:L.groupId})}).then(e=>Z(e=>e.toLowerCase(),e)))]).then(e=>{let[t,n]=e;return g.custom||No(g.element),qo(t,E,g,n,a,o),d(Qn(t,e=>we(e,"readyState")),r(e=>e===tn),k(1),m(()=>t),I)}).then(e=>{window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("lc_bridge_ready"),l&&l.getLogs().then(t=>{e.call("logInfo","loading_time_measured",j(t))}),C(()=>i=!0)})}).catch(e=>{switch(null==e?void 0:e.code){case"ACCESS_NOT_RESOLVED":case"CUSTOMER_BANNED":case"FETCH_REGION_FAILED":return void console.warn("[LiveChat] "+e.message);default:throw e}})};window.__ow_inited||(window.__ow_inited=!0,"msCrypto"in window?console.error("[OpenWidget] We don't support Internet Explorer"):Vo("openwidget",{gaParams:{},customIdentityProviderInitializer:null,integrationName:window.__ow.integration_name,organizationId:window.__ow.organizationId,initMaximized:!0===window.__ow.init_maximized,initialView:"string"==typeof window.__ow.initial_view?window.__ow.initial_view:null,productName:window.__ow.product_name,templateId:"string"==typeof window.__ow.template_id&&window.__ow.template_id!==window.__ow.organizationId?window.__ow.template_id:null,customContainer:window.__ow.custom_container||null,skipCodeInstallationTracking:!!window.__ow.test,iframeAddress:null}))}();